mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-23 03:10:04 +08:00
完善录制相关功能
This commit is contained in:
parent
e5d5cabf89
commit
d3db5e0ce0
@ -126,9 +126,9 @@ public:
|
|||||||
// 该流无人观看
|
// 该流无人观看
|
||||||
void onNoneReader();
|
void onNoneReader();
|
||||||
// 开启或关闭录制
|
// 开启或关闭录制
|
||||||
bool setupRecord(Recorder::type type, bool start, const string &custom_path);
|
virtual bool setupRecord(Recorder::type type, bool start, const string &custom_path);
|
||||||
// 获取录制状态
|
// 获取录制状态
|
||||||
bool isRecording(Recorder::type type);
|
virtual bool isRecording(Recorder::type type);
|
||||||
|
|
||||||
// 同步查找流
|
// 同步查找流
|
||||||
static Ptr find(const string &schema, const string &vhost, const string &app, const string &id, bool bMake = true) ;
|
static Ptr find(const string &schema, const string &vhost, const string &app, const string &id, bool bMake = true) ;
|
||||||
|
@ -79,6 +79,33 @@ public:
|
|||||||
return readerCount() + (_muxer ? _muxer->totalReaderCount() : 0);
|
return readerCount() + (_muxer ? _muxer->totalReaderCount() : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置录制状态
|
||||||
|
* @param type 录制类型
|
||||||
|
* @param start 开始或停止
|
||||||
|
* @param custom_path 开启录制时,指定自定义路径
|
||||||
|
* @return 是否设置成功
|
||||||
|
*/
|
||||||
|
bool setupRecord(Recorder::type type, bool start, const string &custom_path) override{
|
||||||
|
if(_muxer){
|
||||||
|
return _muxer->setupRecord(*this,type, start, custom_path);
|
||||||
|
}
|
||||||
|
return RtmpMediaSource::setupRecord(type, start, custom_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取录制状态
|
||||||
|
* @param type 录制类型
|
||||||
|
* @return 录制状态
|
||||||
|
*/
|
||||||
|
bool isRecording(Recorder::type type) override{
|
||||||
|
if(_muxer){
|
||||||
|
return _muxer->isRecording(*this,type);
|
||||||
|
}
|
||||||
|
return RtmpMediaSource::isRecording(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置协议转换
|
* 设置协议转换
|
||||||
* @param enableRtsp 是否转换成rtsp
|
* @param enableRtsp 是否转换成rtsp
|
||||||
|
@ -70,6 +70,33 @@ public:
|
|||||||
return readerCount() + (_muxer ? _muxer->totalReaderCount() : 0);
|
return readerCount() + (_muxer ? _muxer->totalReaderCount() : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置录制状态
|
||||||
|
* @param type 录制类型
|
||||||
|
* @param start 开始或停止
|
||||||
|
* @param custom_path 开启录制时,指定自定义路径
|
||||||
|
* @return 是否设置成功
|
||||||
|
*/
|
||||||
|
bool setupRecord(Recorder::type type, bool start, const string &custom_path) override{
|
||||||
|
if(_muxer){
|
||||||
|
return _muxer->setupRecord(*this,type, start, custom_path);
|
||||||
|
}
|
||||||
|
return RtspMediaSource::setupRecord(type, start, custom_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取录制状态
|
||||||
|
* @param type 录制类型
|
||||||
|
* @return 录制状态
|
||||||
|
*/
|
||||||
|
bool isRecording(Recorder::type type) override{
|
||||||
|
if(_muxer){
|
||||||
|
return _muxer->isRecording(*this,type);
|
||||||
|
}
|
||||||
|
return RtspMediaSource::isRecording(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置协议转换
|
* 设置协议转换
|
||||||
* @param enableRtmp 是否转换成rtmp
|
* @param enableRtmp 是否转换成rtmp
|
||||||
|
Loading…
Reference in New Issue
Block a user