优化rtp推流相关代码

This commit is contained in:
xiongziliang
2020-03-08 21:19:20 +08:00
parent ae45c24fa3
commit 10884340b0
10 changed files with 31 additions and 41 deletions

View File

@@ -38,5 +38,16 @@ Frame::Ptr Frame::getCacheAbleFrame(const Frame::Ptr &frame){
return std::make_shared<FrameCacheAble>(frame);
}
#define SWITCH_CASE(codec_id) case codec_id : return #codec_id
char *CodecInfo::getCodecName() {
switch (getCodecId()) {
SWITCH_CASE(CodecH264);
SWITCH_CASE(CodecH265);
SWITCH_CASE(CodecAAC);
default:
return "unknown codec";
}
}
}//namespace mediakit