feat: add support of codec plugin

This commit is contained in:
xia-chu
2023-12-10 10:21:40 +08:00
committed by 夏楚
parent 9ff4c09211
commit 25c99470ee
42 changed files with 772 additions and 356 deletions

View File

@@ -92,7 +92,7 @@ void RtspDemuxer::makeAudioTrack(const SdpTrack::Ptr &audio) {
}
setBitRate(audio, _audio_track);
//生成RtpCodec对象以便解码rtp
_audio_rtp_decoder = Factory::getRtpDecoderByTrack(_audio_track);
_audio_rtp_decoder = Factory::getRtpDecoderByCodecId(_audio_track->getCodecId());
if (!_audio_rtp_decoder) {
//找不到相应的rtp解码器该track无效
_audio_track.reset();
@@ -114,7 +114,7 @@ void RtspDemuxer::makeVideoTrack(const SdpTrack::Ptr &video) {
}
setBitRate(video, _video_track);
//生成RtpCodec对象以便解码rtp
_video_rtp_decoder = Factory::getRtpDecoderByTrack(_video_track);
_video_rtp_decoder = Factory::getRtpDecoderByCodecId(_video_track->getCodecId());
if (!_video_rtp_decoder) {
//找不到相应的rtp解码器该track无效
_video_track.reset();