CMSV6Help Center
/
839 DOCS · 213 VIDEOS中文

265 video docking

Author 谢周轩Updated 2026-05-09 11:12:47Doc ID 2372307 words · 1 min readView original ↗

1. function description

265 video docking

2. operating instructions

2.1 devices are video in 265 format

**Called at startup **

int TTXNET_SetMediaInfo(int nAudioType, int nAudioChannel, int nAudioSamplesPerSec, int nAudioBitPerSamples, int nVideoCoder)
Configure nVideoCoder as TTX_VIDEO_CODEC_H265

**Different video formats for different channels **

// Get video parameters
// @ nChannel: channel number starts from 0
// @ nStreamType: TTX_STREAM_TYPE_MAIN or TTX_STREAM_TYPE_SUB
// @ nVideoCoder: TTX_VIDEO_CODEC_H265 such as audio type TTX_VIDEO_CODEC_H264
// If the video format of different channels is different, please reload this interface, for example, channel 1 is 264, channel 2 is 265
// If the video format is the same, you do not need to overload the GetVideoParam interface.
virtual bool GetVideoParam(int nChannel, int nStreamType, int& nVideoCoder) { return false;}
Overload the GetVideoParam to return different video formats depending on the channel format.
Example:
bool GetVideoParam(int nChannel, int nStreamType, int& nVideoCoder)
{
if (nChannel == 1)
{
nVideoCoder = TTX_VIDEO_CODEC_H264;
}
else
{
nVideoCoder = TTX_VIDEO_CODEC_H265;
}
return true;
}

(I frame data in front of the need to add vps,sps and pps)

2.2 remote playback

// Get file information
virtual void GetFileInfo(TTXFILEInfo_S* pFileInfo) = 0;
// file information
typedef struct _tagTTXFILEInfo_S
{
int nYear; // Year 2013
int nMonth; // Month 5
int nDay; // Day 29
int nBegHour; // start time
int nBegMinute;
int nBegSecond;
_u64long u64BegPts; // file start timestamp
unsigned int uiTotalMinSecond; // Total file duration, in milliseconds
unsigned int uiAudioCodec; // Audio decoder type TTX_AUDIO_TYPE_G726_40KBPS
unsigned int uiAudioChannel; // audio channel
unsigned int uiAudioSamplesPerSec; // audio sample rate
unsigned int uiAudioBitPerSamples; // The number of bits required for each sample of the audio
unsigned int uiInfoCodec; // information frame decoder TTX_INFO_CODEC_WKP
unsigned int uiVideoCodec; // video frame decoder TTX_VIDEO_CODEC_H264
unsigned char ucResolution; // resolution TTX_RESOLUTION_720P
char szReserve[59]; // reserved fields
} TTXFILEInfo_S, * LPTTXFILEInfo_S;
uiVideoCodec to return the corresponding video format
Source help.cmsv7.com
839 documents · 213 videos · docs.alwaycare.com