优化pauseRtpCheck接口,新增pause_seconds参数

This commit is contained in:
xia-chu
2025-09-09 23:11:19 +08:00
parent 5686027fc2
commit 88b422db08
5 changed files with 28 additions and 25 deletions

View File

@@ -1734,7 +1734,7 @@ void installWebApi() {
auto src = MediaSource::find(vhost, app, allArgs["stream_id"]);
auto process = src ? src->getRtpProcess() : nullptr;
if (process) {
process->setStopCheckRtp(true);
process->pauseRtpTimeout(true, allArgs["pause_seconds"]);
} else {
val["code"] = API::NotFound;
}
@@ -1754,7 +1754,7 @@ void installWebApi() {
auto src = MediaSource::find(vhost, app, allArgs["stream_id"]);
auto process = src ? src->getRtpProcess() : nullptr;
if (process) {
process->setStopCheckRtp(false);
process->pauseRtpTimeout(false);
} else {
val["code"] = API::NotFound;
}