Compare commits

..

No commits in common. "41bdfa0755d3c7eef6fffc2577b501226fde7cd2" and "dfca520857fdc67c431bf811c14d174b123a88a6" have entirely different histories.

4 changed files with 39 additions and 43 deletions

View File

@ -1,4 +1,4 @@
#include <atomic> #include <atomic>
static int test() static int test()
{ {

View File

@ -1,5 +1,5 @@
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
#error "This file is not editable by Visual C++." #error This file is not editable by Visual C++.
#endif //APSTUDIO_INVOKED #endif //APSTUDIO_INVOKED
#include "winres.h" #include "winres.h"

View File

@ -1191,27 +1191,25 @@ 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"], allArgs["stream"],
allArgs["stream"], allArgs["dst_url"],
allArgs["dst_url"], retry_count,
retry_count, allArgs["rtp_type"],
allArgs["rtp_type"], allArgs["timeout_sec"],
allArgs["timeout_sec"], args,
args, [invoker, val, headerOut, dst_url](const SockException &ex, const string &key) mutable {
[invoker, val, headerOut, dst_url](const SockException &ex, const string &key) mutable { if (ex) {
if (ex) { val["code"] = API::OtherFailed;
val["code"] = API::OtherFailed; val["msg"] = ex.what();
val["msg"] = ex.what(); } else {
} else { val["data"]["key"] = key;
val["data"]["key"] = key; InfoL << "Publish success, please play with player:" << dst_url;
InfoL << "Publish success, please play with player:" << dst_url; }
} invoker(200, headerOut, val.toStyledString());
invoker(200, headerOut, val.toStyledString()); });
});
});
}); });
// 关闭推流代理 [AUTO-TRANSLATED:91602b75] // 关闭推流代理 [AUTO-TRANSLATED:91602b75]
@ -1260,24 +1258,22 @@ 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, option,
option, allArgs["rtp_type"],
allArgs["rtp_type"], allArgs["timeout_sec"],
allArgs["timeout_sec"], args,
args, [invoker,val,headerOut](const SockException &ex,const string &key) mutable{
[invoker,val,headerOut](const SockException &ex,const string &key) mutable{ if (ex) {
if (ex) { val["code"] = API::OtherFailed;
val["code"] = API::OtherFailed; val["msg"] = ex.what();
val["msg"] = ex.what(); } else {
} else { val["data"]["key"] = key;
val["data"]["key"] = key; }
} invoker(200, headerOut, val.toStyledString());
invoker(200, headerOut, val.toStyledString()); });
});
});
}); });
// 关闭拉流代理 [AUTO-TRANSLATED:5204f128] // 关闭拉流代理 [AUTO-TRANSLATED:5204f128]

View File

@ -1,4 +1,4 @@
/* /*
* Copyright (c) 2016-present The ZLMediaKit project authors. All Rights Reserved. * Copyright (c) 2016-present The ZLMediaKit project authors. All Rights Reserved.
* *
* This file is part of ZLMediaKit(https://github.com/ZLMediaKit/ZLMediaKit). * This file is part of ZLMediaKit(https://github.com/ZLMediaKit/ZLMediaKit).