录制接口支持指定切片时间大小:#747

This commit is contained in:
xiongziliang
2021-03-07 10:41:57 +08:00
parent daedbed737
commit c0f4899950
13 changed files with 54 additions and 40 deletions

View File

@@ -171,13 +171,13 @@ void MediaSource::onReaderChanged(int size) {
}
}
bool MediaSource::setupRecord(Recorder::type type, bool start, const string &custom_path){
bool MediaSource::setupRecord(Recorder::type type, bool start, const string &custom_path, size_t max_second){
auto listener = _listener.lock();
if (!listener) {
WarnL << "未设置MediaSource的事件监听者setupRecord失败:" << getSchema() << "/" << getVhost() << "/" << getApp() << "/" << getId();
return false;
}
return listener->setupRecord(*this, type, start, custom_path);
return listener->setupRecord(*this, type, start, custom_path, max_second);
}
bool MediaSource::isRecording(Recorder::type type){
@@ -626,12 +626,12 @@ void MediaSourceEventInterceptor::onRegist(MediaSource &sender, bool regist) {
}
}
bool MediaSourceEventInterceptor::setupRecord(MediaSource &sender, Recorder::type type, bool start, const string &custom_path) {
bool MediaSourceEventInterceptor::setupRecord(MediaSource &sender, Recorder::type type, bool start, const string &custom_path, size_t max_second) {
auto listener = _listener.lock();
if (!listener) {
return false;
}
return listener->setupRecord(sender, type, start, custom_path);
return listener->setupRecord(sender, type, start, custom_path, max_second);
}
bool MediaSourceEventInterceptor::isRecording(MediaSource &sender, Recorder::type type) {