添加配置项:是否直接rtsp拉流代理

This commit is contained in:
xiongziliang
2019-07-19 11:54:29 +08:00
parent d71f1dd293
commit 9c0fb9e676
3 changed files with 13 additions and 1 deletions

View File

@@ -130,7 +130,10 @@ void PlayerProxy::play(const string &strUrlTmp) {
MediaSource::Ptr mediaSource;
if(dynamic_pointer_cast<RtspPlayer>(_parser)){
//rtsp拉流
mediaSource = std::make_shared<RtspMediaSource>(_strVhost,_strApp,_strSrc);
GET_CONFIG(bool,directProxy,Rtsp::kDirectProxy);
if(directProxy){
mediaSource = std::make_shared<RtspMediaSource>(_strVhost,_strApp,_strSrc);
}
}else if(dynamic_pointer_cast<RtmpPlayer>(_parser)){
//rtmp拉流
mediaSource = std::make_shared<RtmpMediaSource>(_strVhost,_strApp,_strSrc);