mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 11:41:44 +08:00
shell登录鉴权改成广播方式
删除rtsp/rtmp shell命令,添加media命令 加载配置文件后发送广播
This commit is contained in:
@@ -131,6 +131,7 @@ void PlayerProxy::initMedia() {
|
||||
return;
|
||||
}
|
||||
m_pChn.reset(new DevChannel(m_strVhost.data(),m_strApp.data(),m_strSrc.data(),getDuration(),m_bEnableHls,m_bEnableMp4));
|
||||
m_pChn->setListener(shared_from_this());
|
||||
if (containVideo()) {
|
||||
VideoInfo info;
|
||||
info.iFrameRate = getVideoFps();
|
||||
@@ -146,6 +147,18 @@ void PlayerProxy::initMedia() {
|
||||
m_pChn->initAudio(info);
|
||||
}
|
||||
}
|
||||
bool PlayerProxy::shutDown() {
|
||||
//通知其停止推流
|
||||
weak_ptr<PlayerProxy> weakSlef = dynamic_pointer_cast<PlayerProxy>(shared_from_this());
|
||||
ASYNC_TRACE([weakSlef](){
|
||||
auto stronSelf = weakSlef.lock();
|
||||
if(stronSelf){
|
||||
stronSelf->m_pChn.reset();
|
||||
stronSelf->teardown();
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
} /* namespace Player */
|
||||
|
||||
Reference in New Issue
Block a user