mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 10:40:05 +08:00
格式化与精简代码
This commit is contained in:
parent
384c8677ea
commit
23f9a42f72
@ -537,7 +537,7 @@ void addStreamProxy(const string &vhost, const string &app, const string &stream
|
||||
return;
|
||||
}
|
||||
//添加拉流代理
|
||||
auto player = std::make_shared<PlayerProxy>(vhost, app, stream, option, retry_count >=0 ? retry_count : -1);
|
||||
auto player = std::make_shared<PlayerProxy>(vhost, app, stream, option, retry_count);
|
||||
s_proxyMap[key] = player;
|
||||
|
||||
//指定RTP over TCP(播放rtsp时有效)
|
||||
@ -952,7 +952,7 @@ void installWebApi() {
|
||||
}
|
||||
|
||||
//添加推流代理
|
||||
PusherProxy::Ptr pusher(new PusherProxy(src, retry_count>=0 ? retry_count : -1));
|
||||
auto pusher = std::make_shared<PusherProxy>(src, retry_count);
|
||||
s_proxyPusherMap[key] = pusher;
|
||||
|
||||
//指定RTP over TCP(播放rtsp时有效)
|
||||
@ -988,7 +988,7 @@ void installWebApi() {
|
||||
CHECK_SECRET();
|
||||
CHECK_ARGS("schema", "vhost", "app", "stream", "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"],
|
||||
allArgs["vhost"],
|
||||
allArgs["app"],
|
||||
|
@ -161,7 +161,7 @@ void do_http_hook(const string &url, const ArgsType &body, const function<void(c
|
||||
GET_CONFIG(float, retry_delay, Hook::kRetryDelay);
|
||||
|
||||
const_cast<ArgsType &>(body)["mediaServerId"] = mediaServerId;
|
||||
HttpRequester::Ptr requester(new HttpRequester);
|
||||
auto requester = std::make_shared<HttpRequester>();
|
||||
requester->setMethod("POST");
|
||||
auto bodyStr = to_string(body);
|
||||
requester->setBody(bodyStr);
|
||||
|
@ -108,7 +108,7 @@ onceToken token1([](){
|
||||
class CMD_main : public CMD {
|
||||
public:
|
||||
CMD_main() {
|
||||
_parser.reset(new OptionParser(nullptr));
|
||||
_parser = std::make_shared<OptionParser>(nullptr);
|
||||
|
||||
#if !defined(_WIN32)
|
||||
(*_parser) << Option('d',/*该选项简称,如果是\x00则说明无简称*/
|
||||
|
Loading…
Reference in New Issue
Block a user