mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
调整 RtspSession::_push_src类型,统一为 RtspMediaSource::Ptr _push_src;
This commit is contained in:
parent
efa839c60b
commit
722097be05
@ -187,9 +187,9 @@ bool MultiMediaSourceMuxer::setupRecord(MediaSource &sender, Recorder::type type
|
|||||||
bool MultiMediaSourceMuxer::isRecording(MediaSource &sender, Recorder::type type) {
|
bool MultiMediaSourceMuxer::isRecording(MediaSource &sender, Recorder::type type) {
|
||||||
switch (type){
|
switch (type){
|
||||||
case Recorder::type_hls :
|
case Recorder::type_hls :
|
||||||
return _hls ? true : false;
|
return !!_hls;
|
||||||
case Recorder::type_mp4 :
|
case Recorder::type_mp4 :
|
||||||
return _mp4 ? true : false;
|
return !!_mp4;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -259,10 +259,11 @@ void RtspSession::handleReq_ANNOUNCE(const Parser &parser) {
|
|||||||
for (auto &track : _sdp_track) {
|
for (auto &track : _sdp_track) {
|
||||||
_rtcp_context.emplace_back(std::make_shared<RtcpContextForRecv>());
|
_rtcp_context.emplace_back(std::make_shared<RtcpContextForRecv>());
|
||||||
}
|
}
|
||||||
_push_src = std::make_shared<RtspMediaSourceImp>(_media_info._vhost, _media_info._app, _media_info._streamid);
|
auto push_src = std::make_shared<RtspMediaSourceImp>(_media_info._vhost, _media_info._app, _media_info._streamid);
|
||||||
_push_src->setListener(dynamic_pointer_cast<MediaSourceEvent>(shared_from_this()));
|
push_src->setListener(dynamic_pointer_cast<MediaSourceEvent>(shared_from_this()));
|
||||||
_push_src->setProtocolTranslation(enableHls, enableMP4);
|
push_src->setProtocolTranslation(enableHls, enableMP4);
|
||||||
_push_src->setSdp(parser.Content());
|
push_src->setSdp(parser.Content());
|
||||||
|
_push_src = std::move(push_src);
|
||||||
sendRtspResponse("200 OK");
|
sendRtspResponse("200 OK");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ private:
|
|||||||
//url解析后保存的相关信息
|
//url解析后保存的相关信息
|
||||||
MediaInfo _media_info;
|
MediaInfo _media_info;
|
||||||
//rtsp推流相关绑定的源
|
//rtsp推流相关绑定的源
|
||||||
RtspMediaSourceImp::Ptr _push_src;
|
RtspMediaSource::Ptr _push_src;
|
||||||
//rtsp播放器绑定的直播源
|
//rtsp播放器绑定的直播源
|
||||||
std::weak_ptr<RtspMediaSource> _play_src;
|
std::weak_ptr<RtspMediaSource> _play_src;
|
||||||
//直播源读取器
|
//直播源读取器
|
||||||
|
Loading…
Reference in New Issue
Block a user