CMSV6Help Center
/
839 DOCS · 211 VIDEOS中文

ttx protocol sound docking description

Author 谢周轩Updated 2025-10-16 15:31:50Doc ID 2390341 words · 1 min readView original ↗

Function description

**Real- time audio and video integration **
Use Scenario: Hear the sound on the device in real- time video. If no sound is heard in the real- time video, the recording file recorded on the client or server will not be heard


Open the sound button on the client real- time preview interface to hear the sound

/very/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** *
// Start audio and video encoding. This interface is called when the server requests real- time video and audio monitoring.
// Also need to know the format parameters of the audio
// @ nMediaType: media type, TTX_MEDIA_TYPE_AV or TTX_MEDIA_TYPE_AUDIO
// @ nChannel: The channel number starts from 0. If it is audio, the nChannel can also be a microphone channel.
// @ nStreamType: the stream type. This parameter is valid when the media type is video.
// @ pfnEncoderCB: data callback function
// @ pEncUsr: code callback function user- defined data
// @ ppAVUsr: Encode the user- defined data of the object and return it to the network library. In the StopAVEnc, return this parameter
// The upper layer saves the pfnEncoderCB and pUsr, and tells the network layer through this interface when encoding and generating data.
// The upper layer transmits audio and video data to the network library in sequence.
Wash ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
virtual bool StartAVEnc(int nMediaType, int nChannel, int nStreamType, TTXPfnAVEncoderCB pfnEncoderCB, void* pEncUsr, void** ppAVUsr) {
return true;
}

Integrated Description: When the upper layer calls the pfnEncoderCB callback function to send video data, it is necessary to send audio data at the same time, and the audio frame type is TTX_FRM_TYPE_A

Source help.cmsv7.com
839 documents · 211 videos · docs.alwaycare.com