mirror of
https://gitee.com/xia-chu/ZLMediaKit.git
synced 2026-05-23 01:57:50 +08:00
Pre Merge pull request !25 from Leon/master
This commit is contained in:
commit
b92101b883
@ -1,4 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
|
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit).
|
* This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit).
|
||||||
@ -537,7 +537,7 @@ void addStreamProxy(const string &vhost, const string &app, const string &stream
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//添加拉流代理
|
//添加拉流代理
|
||||||
auto player = std::make_shared<PlayerProxy>(vhost, app, stream, option, retry_count ? retry_count : -1);
|
auto player = std::make_shared<PlayerProxy>(vhost, app, stream, option, retry_count >=0? retry_count : -1);
|
||||||
s_proxyMap[key] = player;
|
s_proxyMap[key] = player;
|
||||||
|
|
||||||
//指定RTP over TCP(播放rtsp时有效)
|
//指定RTP over TCP(播放rtsp时有效)
|
||||||
@ -952,7 +952,7 @@ void installWebApi() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//添加推流代理
|
//添加推流代理
|
||||||
PusherProxy::Ptr pusher(new PusherProxy(src, retry_count ? retry_count : -1));
|
PusherProxy::Ptr pusher(new PusherProxy(src, retry_count >=0 ? retry_count : -1));
|
||||||
s_proxyPusherMap[key] = pusher;
|
s_proxyPusherMap[key] = pusher;
|
||||||
|
|
||||||
//指定RTP over TCP(播放rtsp时有效)
|
//指定RTP over TCP(播放rtsp时有效)
|
||||||
@ -988,12 +988,13 @@ void installWebApi() {
|
|||||||
CHECK_SECRET();
|
CHECK_SECRET();
|
||||||
CHECK_ARGS("schema", "vhost", "app", "stream", "dst_url");
|
CHECK_ARGS("schema", "vhost", "app", "stream", "dst_url");
|
||||||
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>();
|
||||||
addStreamPusherProxy(allArgs["schema"],
|
addStreamPusherProxy(allArgs["schema"],
|
||||||
allArgs["vhost"],
|
allArgs["vhost"],
|
||||||
allArgs["app"],
|
allArgs["app"],
|
||||||
allArgs["stream"],
|
allArgs["stream"],
|
||||||
allArgs["dst_url"],
|
allArgs["dst_url"],
|
||||||
allArgs["retry_count"],
|
retry_count,
|
||||||
allArgs["rtp_type"],
|
allArgs["rtp_type"],
|
||||||
allArgs["timeout_sec"],
|
allArgs["timeout_sec"],
|
||||||
[invoker, val, headerOut, dst_url](const SockException &ex, const string &key) mutable {
|
[invoker, val, headerOut, dst_url](const SockException &ex, const string &key) mutable {
|
||||||
@ -1024,12 +1025,13 @@ void installWebApi() {
|
|||||||
CHECK_ARGS("vhost","app","stream","url");
|
CHECK_ARGS("vhost","app","stream","url");
|
||||||
|
|
||||||
ProtocolOption option(allArgs);
|
ProtocolOption option(allArgs);
|
||||||
|
auto retry_count = allArgs["retry_count"].empty()? -1: allArgs["retry_count"].as<int>();
|
||||||
|
|
||||||
addStreamProxy(allArgs["vhost"],
|
addStreamProxy(allArgs["vhost"],
|
||||||
allArgs["app"],
|
allArgs["app"],
|
||||||
allArgs["stream"],
|
allArgs["stream"],
|
||||||
allArgs["url"],
|
allArgs["url"],
|
||||||
allArgs["retry_count"],
|
retry_count,
|
||||||
option,
|
option,
|
||||||
allArgs["rtp_type"],
|
allArgs["rtp_type"],
|
||||||
allArgs["timeout_sec"],
|
allArgs["timeout_sec"],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user