整理和精简代码

This commit is contained in:
xiongziliang
2020-05-11 22:33:10 +08:00
parent 41f1df3acf
commit 625d7e30c0
23 changed files with 326 additions and 564 deletions

View File

@@ -20,8 +20,8 @@
namespace mediakit{
/**
* 合并一些时间戳相同的frame
*/
* 合并一些时间戳相同的frame
*/
class FrameMerger {
public:
FrameMerger() = default;
@@ -319,7 +319,9 @@ void RtpProcess::onDecode(int stream,int codecid,int flags,int64_t pts,int64_t d
WarnP(this) << "audio track change to G711 from codecid:" << getCodecName(_codecid_audio);
return;
}
_muxer->inputFrame(std::make_shared<G711FrameNoCacheAble>(codec, (char *) data, bytes, dts));
auto frame = std::make_shared<G711FrameNoCacheAble>((char *) data, bytes, dts);
frame->setCodec(codec);
_muxer->inputFrame(frame);
break;
}
default: