新增无人观看自动关闭流(无须hook返回)功能 (#2643)

auto_close参数适用于配置文件、addStreamProxy接口、on_publish hook
This commit is contained in:
夏楚
2023-07-08 21:36:34 +08:00
committed by GitHub
parent e52c1cc510
commit beae515bb2
5 changed files with 28 additions and 2 deletions

View File

@@ -151,6 +151,11 @@ public:
bool enable_audio;
//添加静音音频,在关闭音频时,此开关无效
bool add_mute_audio;
// 无人观看时,是否直接关闭(而不是通过on_none_reader hook返回close)
// 此配置置1时此流如果无人观看将不触发on_none_reader hook回调
// 而是将直接关闭流
bool auto_close;
//断连续推延时,单位毫秒,默认采用配置文件
uint32_t continue_push_ms;
@@ -199,6 +204,7 @@ public:
GET_OPT_VALUE(modify_stamp);
GET_OPT_VALUE(enable_audio);
GET_OPT_VALUE(add_mute_audio);
GET_OPT_VALUE(auto_close);
GET_OPT_VALUE(continue_push_ms);
GET_OPT_VALUE(enable_hls);