Commit 271b1800 by xiongziliang

修复流注册事件track和regist字段缺失的bug

parent 67e1b1f1
...@@ -272,7 +272,7 @@ Value makeMediaSourceJson(MediaSource &media){ ...@@ -272,7 +272,7 @@ Value makeMediaSourceJson(MediaSource &media){
item["originSock"] = Json::nullValue; item["originSock"] = Json::nullValue;
} }
for(auto &track : media.getTracks()){ for(auto &track : media.getTracks(false)){
Value obj; Value obj;
auto codec_type = track->getTrackType(); auto codec_type = track->getTrackType();
obj["codec_id"] = track->getCodecId(); obj["codec_id"] = track->getCodecId();
......
...@@ -301,14 +301,15 @@ void installWebHook(){ ...@@ -301,14 +301,15 @@ void installWebHook(){
return; return;
} }
ArgsType body; ArgsType body;
body["regist"] = bRegist;
if (bRegist) { if (bRegist) {
body = makeMediaSourceJson(sender); body = makeMediaSourceJson(sender);
body["regist"] = bRegist;
} else { } else {
body["schema"] = sender.getSchema(); body["schema"] = sender.getSchema();
body["vhost"] = sender.getVhost(); body["vhost"] = sender.getVhost();
body["app"] = sender.getApp(); body["app"] = sender.getApp();
body["stream"] = sender.getId(); body["stream"] = sender.getId();
body["regist"] = bRegist;
} }
//执行hook //执行hook
do_http_hook(hook_stream_chaned,body, nullptr); do_http_hook(hook_stream_chaned,body, nullptr);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论