mirror of
https://gitee.com/xia-chu/ZLMediaKit.git
synced 2026-05-17 15:27:49 +08:00
addStreamProxy、addStreamPusherProxy接口确保线程负载均衡
Some checks failed
Android / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Docker / build (push) Has been cancelled
Linux / build (push) Has been cancelled
macOS / build (push) Has been cancelled
Windows / build (push) Has been cancelled
Some checks failed
Android / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Docker / build (push) Has been cancelled
Linux / build (push) Has been cancelled
macOS / build (push) Has been cancelled
Windows / build (push) Has been cancelled
This commit is contained in:
parent
21610f5ddf
commit
41bdfa0755
@ -1191,6 +1191,7 @@ void installWebApi() {
|
|||||||
|
|
||||||
auto dst_url = allArgs["dst_url"];
|
auto dst_url = allArgs["dst_url"];
|
||||||
auto retry_count = allArgs["retry_count"].empty() ? -1 : allArgs["retry_count"].as<int>();
|
auto retry_count = allArgs["retry_count"].empty() ? -1 : allArgs["retry_count"].as<int>();
|
||||||
|
EventPollerPool::Instance().getPoller(false)->async([=](){
|
||||||
addStreamPusherProxy(allArgs["schema"],
|
addStreamPusherProxy(allArgs["schema"],
|
||||||
allArgs["vhost"],
|
allArgs["vhost"],
|
||||||
allArgs["app"],
|
allArgs["app"],
|
||||||
@ -1211,6 +1212,7 @@ void installWebApi() {
|
|||||||
invoker(200, headerOut, val.toStyledString());
|
invoker(200, headerOut, val.toStyledString());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// 关闭推流代理 [AUTO-TRANSLATED:91602b75]
|
// 关闭推流代理 [AUTO-TRANSLATED:91602b75]
|
||||||
// Close the push stream proxy
|
// Close the push stream proxy
|
||||||
@ -1258,6 +1260,7 @@ void installWebApi() {
|
|||||||
vhost = allArgs["vhost"];
|
vhost = allArgs["vhost"];
|
||||||
}
|
}
|
||||||
auto tuple = MediaTuple { vhost, allArgs["app"], allArgs["stream"], "" };
|
auto tuple = MediaTuple { vhost, allArgs["app"], allArgs["stream"], "" };
|
||||||
|
EventPollerPool::Instance().getPoller(false)->async([=]() {
|
||||||
addStreamProxy(tuple,
|
addStreamProxy(tuple,
|
||||||
allArgs["url"],
|
allArgs["url"],
|
||||||
retry_count,
|
retry_count,
|
||||||
@ -1275,6 +1278,7 @@ void installWebApi() {
|
|||||||
invoker(200, headerOut, val.toStyledString());
|
invoker(200, headerOut, val.toStyledString());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// 关闭拉流代理 [AUTO-TRANSLATED:5204f128]
|
// 关闭拉流代理 [AUTO-TRANSLATED:5204f128]
|
||||||
// Close the pull stream proxy
|
// Close the pull stream proxy
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user