addTrack/inputFrame接口支持返回值;新增全局添加静音音频接口

This commit is contained in:
ziyue
2021-09-27 13:12:53 +08:00
parent 1f99708548
commit e9008afca0
63 changed files with 447 additions and 357 deletions

View File

@@ -61,15 +61,16 @@ public:
return hls_demand ? (_clear_cache ? true : _enabled) : true;
}
void inputFrame(const Frame::Ptr &frame) override {
bool inputFrame(const Frame::Ptr &frame) override {
GET_CONFIG(bool, hls_demand, General::kHlsDemand);
if (_clear_cache && hls_demand) {
_clear_cache = false;
_hls->clearCache();
}
if (_enabled || !hls_demand) {
TsMuxer::inputFrame(frame);
return TsMuxer::inputFrame(frame);
}
return false;
}
private: