部分恢复录制相关接口

This commit is contained in:
xiongziliang
2020-04-05 09:26:29 +08:00
parent c040f472fa
commit e5d5cabf89
15 changed files with 612 additions and 165 deletions

View File

@@ -26,7 +26,7 @@ public:
~MediaHelper(){}
void attachEvent(){
_channel->setListener(shared_from_this());
_channel->setMediaListener(shared_from_this());
}
DevChannel::Ptr &getChannel(){

View File

@@ -33,4 +33,20 @@ API_EXPORT int API_CALL mk_flv_recorder_start(mk_flv_recorder ctx, const char *v
WarnL << ex.what();
return -1;
}
}
}
///////////////////////////////////////////hls/mp4录制/////////////////////////////////////////////
API_EXPORT int API_CALL mk_recorder_is_recording(int type, const char *vhost, const char *app, const char *stream){
assert(vhost && app && stream);
return Recorder::isRecording((Recorder::type)type,vhost,app,stream);
}
API_EXPORT int API_CALL mk_recorder_start(int type, const char *vhost, const char *app, const char *stream,const char *customized_path){
assert(vhost && app && stream);
return Recorder::startRecord((Recorder::type)type,vhost,app,stream,customized_path ? customized_path : "");
}
API_EXPORT int API_CALL mk_recorder_stop(int type, const char *vhost, const char *app, const char *stream){
assert(vhost && app && stream);
return Recorder::stopRecord((Recorder::type)type,vhost,app,stream);
}