rtp级联(ps/ts/es)新增支持gop缓存功能 (#2395)

该修改主要解决rtp级联(调用startSendRtp接口)未做gop缓存导致上级无法秒开的问题。
同时通过RingBuffer对象线程隔离的特性,实现了在断连续推场景下归属线程切换导致的线程安全问题。
用户如未使用rtp级联功能,请修改配置文件关闭GOP缓存(rtp_proxy.gop_cache=0)以便节省内存。

---------

Co-authored-by: 夏楚 <771730766@qq.com>
This commit is contained in:
Dw9
2023-04-17 12:19:24 +08:00
committed by GitHub
parent 6841ad3306
commit 978143c86d
10 changed files with 115 additions and 84 deletions

View File

@@ -32,13 +32,10 @@ protected:
*/
void input(uint64_t stamp, toolkit::Buffer::Ptr buffer,bool is_key = false);
bool firstKeyReady(bool in);
protected:
void onFlush(std::shared_ptr<toolkit::List<toolkit::Buffer::Ptr> > rtp_list, bool) override;
private:
bool _first_key = false;
onFlushed _cb;
};