mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-17 05:25:57 +08:00
完善Rtmp复用器,可以灵活设置sps pps等信息
This commit is contained in:
@@ -196,18 +196,19 @@ RtpCodec::Ptr Factory::getRtpDecoderById(CodecId codecId, uint32_t ui32SampleRat
|
||||
}
|
||||
}
|
||||
|
||||
RtmpCodec::Ptr Factory::getRtmpCodecById(CodecId codecId) {
|
||||
switch (codecId){
|
||||
RtmpCodec::Ptr Factory::getRtmpCodecByTrack(const Track::Ptr &track) {
|
||||
switch (track->getCodecId()){
|
||||
case CodecH264:
|
||||
return std::make_shared<H264RtmpEncoder>();
|
||||
return std::make_shared<H264RtmpEncoder>(track);
|
||||
case CodecAAC:
|
||||
return std::make_shared<AACRtmpEncoder>();
|
||||
return std::make_shared<AACRtmpEncoder>(track);
|
||||
default:
|
||||
WarnL << "暂不支持该CodecId:" << codecId;
|
||||
WarnL << "暂不支持该CodecId:" << track->getCodecId();
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}//namespace mediakit
|
||||
|
||||
|
||||
Reference in New Issue
Block a user