mirror of
https://gitee.com/xia-chu/ZLMediaKit.git
synced 2026-05-23 01:57:50 +08:00
Compare commits
2 Commits
dfca520857
...
41bdfa0755
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41bdfa0755 | ||
|
|
21610f5ddf |
@ -1,4 +1,4 @@
|
|||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
|
||||||
static int test()
|
static int test()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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"
|
||||||
|
|||||||
@ -1191,25 +1191,27 @@ 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>();
|
||||||
addStreamPusherProxy(allArgs["schema"],
|
EventPollerPool::Instance().getPoller(false)->async([=](){
|
||||||
allArgs["vhost"],
|
addStreamPusherProxy(allArgs["schema"],
|
||||||
allArgs["app"],
|
allArgs["vhost"],
|
||||||
allArgs["stream"],
|
allArgs["app"],
|
||||||
allArgs["dst_url"],
|
allArgs["stream"],
|
||||||
retry_count,
|
allArgs["dst_url"],
|
||||||
allArgs["rtp_type"],
|
retry_count,
|
||||||
allArgs["timeout_sec"],
|
allArgs["rtp_type"],
|
||||||
args,
|
allArgs["timeout_sec"],
|
||||||
[invoker, val, headerOut, dst_url](const SockException &ex, const string &key) mutable {
|
args,
|
||||||
if (ex) {
|
[invoker, val, headerOut, dst_url](const SockException &ex, const string &key) mutable {
|
||||||
val["code"] = API::OtherFailed;
|
if (ex) {
|
||||||
val["msg"] = ex.what();
|
val["code"] = API::OtherFailed;
|
||||||
} else {
|
val["msg"] = ex.what();
|
||||||
val["data"]["key"] = key;
|
} else {
|
||||||
InfoL << "Publish success, please play with player:" << dst_url;
|
val["data"]["key"] = key;
|
||||||
}
|
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]
|
||||||
@ -1258,22 +1260,24 @@ void installWebApi() {
|
|||||||
vhost = allArgs["vhost"];
|
vhost = allArgs["vhost"];
|
||||||
}
|
}
|
||||||
auto tuple = MediaTuple { vhost, allArgs["app"], allArgs["stream"], "" };
|
auto tuple = MediaTuple { vhost, allArgs["app"], allArgs["stream"], "" };
|
||||||
addStreamProxy(tuple,
|
EventPollerPool::Instance().getPoller(false)->async([=]() {
|
||||||
allArgs["url"],
|
addStreamProxy(tuple,
|
||||||
retry_count,
|
allArgs["url"],
|
||||||
option,
|
retry_count,
|
||||||
allArgs["rtp_type"],
|
option,
|
||||||
allArgs["timeout_sec"],
|
allArgs["rtp_type"],
|
||||||
args,
|
allArgs["timeout_sec"],
|
||||||
[invoker,val,headerOut](const SockException &ex,const string &key) mutable{
|
args,
|
||||||
if (ex) {
|
[invoker,val,headerOut](const SockException &ex,const string &key) mutable{
|
||||||
val["code"] = API::OtherFailed;
|
if (ex) {
|
||||||
val["msg"] = ex.what();
|
val["code"] = API::OtherFailed;
|
||||||
} else {
|
val["msg"] = ex.what();
|
||||||
val["data"]["key"] = key;
|
} else {
|
||||||
}
|
val["data"]["key"] = key;
|
||||||
invoker(200, headerOut, val.toStyledString());
|
}
|
||||||
});
|
invoker(200, headerOut, val.toStyledString());
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// 关闭拉流代理 [AUTO-TRANSLATED:5204f128]
|
// 关闭拉流代理 [AUTO-TRANSLATED:5204f128]
|
||||||
|
|||||||
@ -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).
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user