整理代码

This commit is contained in:
xiongziliang
2019-03-27 18:56:49 +08:00
parent b1a2de3853
commit e44c2d5508
14 changed files with 73 additions and 91 deletions

View File

@@ -1,4 +1,4 @@
/*
/*
* MIT License
*
* Copyright (c) 2016 xiongziliang <771730766@qq.com>
@@ -259,7 +259,7 @@ int main(int argc,char *argv[]) {
PlayerProxy::Ptr player(new PlayerProxy(DEFAULT_VHOST, "live", to_string(i).data()));
//指定RTP over TCP(播放rtsp时有效)
(*player)[RtspPlayer::kRtpType] = PlayerBase::RTP_TCP;
(*player)[RtspPlayer::kRtpType] = Rtsp::RTP_TCP;
//开始播放,如果播放失败或者播放中止,将会自动重试若干次,重试次数在配置文件中配置,默认一直重试
player->play(url);
//需要保存PlayerProxy否则作用域结束就会销毁该对象