支持设置时长

This commit is contained in:
xiongziliang 2018-08-29 14:11:12 +08:00
parent 370d31121c
commit 9e17b44e77
2 changed files with 4 additions and 4 deletions

View File

@ -49,8 +49,8 @@ static onceToken s_token([](){
//////////////////////////Rtsp media///////////////////////////
API_EXPORT MediaContext API_CALL createMedia(const char *appName,const char *mediaName , int bEanbleHls, int bEnableMp4) {
DevChannel::Ptr ret(new DevChannel(DEFAULT_VHOST,appName,mediaName,0,bEanbleHls,bEnableMp4));
API_EXPORT MediaContext API_CALL createMedia(const char *appName,const char *mediaName , float fDuration,int bEanbleHls, int bEnableMp4) {
DevChannel::Ptr ret(new DevChannel(DEFAULT_VHOST,appName,mediaName,fDuration,bEanbleHls,bEnableMp4));
lock_guard<recursive_mutex> lck(s_mtxMapMedia);
s_mapMedia.emplace((void *) (ret.get()), ret);
return ret.get();

View File

@ -39,10 +39,10 @@ extern "C" {
typedef void* MediaContext;
/*
* :
* :mediaName:,url地址的一部分,bEanbleHls:hlsbEnableMp4:mp4
* :mediaName:,url地址的一部分,fDuration:()0,bEanbleHls:hlsbEnableMp4:mp4
* :
*/
API_EXPORT MediaContext API_CALL createMedia(const char *appName,const char *mediaName,int bEanbleHls, int bEnableMp4);
API_EXPORT MediaContext API_CALL createMedia(const char *appName,const char *mediaName,float fDuration,int bEanbleHls, int bEnableMp4);
/*
* :