去除转协议开关参数

This commit is contained in:
xiongziliang
2020-09-20 09:26:00 +08:00
parent 00a7414f67
commit 9c873e1d19
9 changed files with 23 additions and 46 deletions

View File

@@ -596,8 +596,6 @@ void installWebApi() {
const string &app,
const string &stream,
const string &url,
bool enable_rtsp,
bool enable_rtmp,
bool enable_hls,
bool enable_mp4,
int rtp_type,
@@ -610,7 +608,7 @@ void installWebApi() {
return;
}
//添加拉流代理
PlayerProxy::Ptr player(new PlayerProxy(vhost,app,stream,enable_rtsp,enable_rtmp,enable_hls,enable_mp4));
PlayerProxy::Ptr player(new PlayerProxy(vhost, app, stream, enable_hls, enable_mp4));
s_proxyMap[key] = player;
//指定RTP over TCP(播放rtsp时有效)
@@ -636,13 +634,11 @@ void installWebApi() {
//测试url http://127.0.0.1/index/api/addStreamProxy?vhost=__defaultVhost__&app=proxy&enable_rtsp=1&enable_rtmp=1&stream=0&url=rtmp://127.0.0.1/live/obs
api_regist2("/index/api/addStreamProxy",[](API_ARGS2){
CHECK_SECRET();
CHECK_ARGS("vhost","app","stream","url","enable_rtsp","enable_rtmp");
CHECK_ARGS("vhost","app","stream","url");
addStreamProxy(allArgs["vhost"],
allArgs["app"],
allArgs["stream"],
allArgs["url"],
allArgs["enable_rtsp"],/* 是否rtsp转发 */
allArgs["enable_rtmp"],/* 是否rtmp转发 */
allArgs["enable_hls"],/* 是否hls转发 */
allArgs["enable_mp4"],/* 是否MP4录制 */
allArgs["rtp_type"],
@@ -1071,8 +1067,6 @@ void installWebApi() {
allArgs["stream"],
/** 支持rtsp和rtmp方式拉流 rtsp支持h265/h264/aac,rtmp仅支持h264/aac **/
"rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov",
true,/* 开启rtsp转发 */
true,/* 开启rtmp转发 */
true,/* 开启hls转发 */
false,/* 禁用MP4录制 */
0,//rtp over tcp方式拉流