From 9e17b44e7787cf6aecdb1165710fb1ea0e150167 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Wed, 29 Aug 2018 14:11:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE=E6=97=B6?= =?UTF-8?q?=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- c_wrapper/src/media.cpp | 4 ++-- c_wrapper/src/media.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/c_wrapper/src/media.cpp b/c_wrapper/src/media.cpp index 1403672b..8fa916e0 100755 --- a/c_wrapper/src/media.cpp +++ b/c_wrapper/src/media.cpp @@ -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 lck(s_mtxMapMedia); s_mapMedia.emplace((void *) (ret.get()), ret); return ret.get(); diff --git a/c_wrapper/src/media.h b/c_wrapper/src/media.h index 11d2f20b..aaf6b086 100755 --- a/c_wrapper/src/media.h +++ b/c_wrapper/src/media.h @@ -39,10 +39,10 @@ extern "C" { typedef void* MediaContext; /* * 描述:创建一个媒体源 - * 参数:mediaName:媒体名称,url地址的一部分,bEanbleHls:是否启用hls,bEnableMp4:是否录制mp4 + * 参数:mediaName:媒体名称,url地址的一部分,fDuration:文件长度(单位秒),直播输入0,bEanbleHls:是否启用hls,bEnableMp4:是否录制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); /* * 描述:销毁媒体源