mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
支持设置时长
This commit is contained in:
parent
370d31121c
commit
9e17b44e77
@ -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();
|
||||
|
@ -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);
|
||||
|
||||
/*
|
||||
* 描述:销毁媒体源
|
||||
|
Loading…
Reference in New Issue
Block a user