新增Frame多转发代理

This commit is contained in:
xiongziliang
2018-10-26 16:09:48 +08:00
parent 6870292fd6
commit f26076635d
10 changed files with 145 additions and 79 deletions

View File

@@ -93,7 +93,7 @@ void RtspDemuxer::makeAudioTrack(const SdpTrack::Ptr &audio) {
_audioRtpDecoder = Factory::getRtpDecoderById(_audioTrack->getCodecId());
if(_audioRtpDecoder){
//设置rtp解码器代理生成的frame写入该Track
_audioRtpDecoder->setDelegate(_audioTrack);
_audioRtpDecoder->addDelegate(_audioTrack);
} else{
//找不到相应的rtp解码器该track无效
_audioTrack.reset();
@@ -109,7 +109,7 @@ void RtspDemuxer::makeVideoTrack(const SdpTrack::Ptr &video) {
_videoRtpDecoder = Factory::getRtpDecoderById(_videoTrack->getCodecId());
if(_videoRtpDecoder){
//设置rtp解码器代理生成的frame写入该Track
_videoRtpDecoder->setDelegate(_videoTrack);
_videoRtpDecoder->addDelegate(_videoTrack);
}else{
//找不到相应的rtp解码器该track无效
_videoTrack.reset();