整理MediaSource派生类

修复转协议或录制时忽然Track的问题
This commit is contained in:
xiongziliang
2019-12-26 11:53:19 +08:00
parent 806747a9d5
commit 3830792c57
15 changed files with 172 additions and 150 deletions

View File

@@ -169,7 +169,7 @@ void RtmpSession::onCmd_publish(AMFDecoder &dec) {
shutdown(SockException(Err_shutdown,errMsg));
return;
}
_pPublisherSrc.reset(new RtmpToRtspMediaSource(_mediaInfo._vhost,_mediaInfo._app,_mediaInfo._streamid));
_pPublisherSrc.reset(new RtmpMediaSourceImp(_mediaInfo._vhost,_mediaInfo._app,_mediaInfo._streamid));
_pPublisherSrc->setListener(dynamic_pointer_cast<MediaSourceEvent>(shared_from_this()));
//设置转协议
_pPublisherSrc->setProtocolTranslation(enableRtxp,enableHls,enableMP4);