mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-18 06:02:21 +08:00
添加rtp pause接口,目前默认3分钟
This commit is contained in:
@@ -903,6 +903,20 @@ void installWebApi() {
|
||||
val["local_ip"] = process->get_local_ip();
|
||||
});
|
||||
|
||||
api_regist1("/index/api/setRtpPause", [](API_ARGS1){
|
||||
CHECK_SECRET();
|
||||
CHECK_ARGS("stream_id", "pause");
|
||||
|
||||
auto process = RtpSelector::Instance().getProcess(allArgs["stream_id"], false);
|
||||
if (!process) {
|
||||
val["code"] = "-1";
|
||||
return;
|
||||
}
|
||||
|
||||
auto pause = allArgs["pause"];
|
||||
process->setRtpPause(pause);
|
||||
});
|
||||
|
||||
api_regist1("/index/api/openRtpServer",[](API_ARGS1){
|
||||
CHECK_SECRET();
|
||||
CHECK_ARGS("port", "enable_tcp", "stream_id");
|
||||
|
||||
Reference in New Issue
Block a user