去除转协议开关参数

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

@@ -75,14 +75,7 @@ int domain(const string &playUrl, const string &pushUrl) {
//拉一个流生成一个RtmpMediaSource源的名称是"app/stream"
//你也可以以其他方式生成RtmpMediaSource比如说MP4文件请查看test_rtmpPusherMp4.cpp代码
MediaInfo info(pushUrl);
bool enable_rtsp = true;
bool enable_rtmp = true;
if(info._schema == RTSP_SCHEMA){
enable_rtmp = false;
}else if(info._schema == RTMP_SCHEMA){
enable_rtsp = false;
}
PlayerProxy::Ptr player(new PlayerProxy(DEFAULT_VHOST, "app", "stream",enable_rtsp,enable_rtmp,false,false,-1 , poller));
PlayerProxy::Ptr player(new PlayerProxy(DEFAULT_VHOST, "app", "stream",false,false,-1 , poller));
//可以指定rtsp拉流方式支持tcp和udp方式默认tcp
// (*player)[Client::kRtpType] = Rtsp::RTP_UDP;
player->play(playUrl.data());