Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
ZLMediaKit
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
张翔宇
ZLMediaKit
Commits
7b3527e7
Commit
7b3527e7
authored
Dec 24, 2019
by
xiongziliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加hls/mp4录制相关接口
parent
aa03d7d0
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
9 行增加
和
8 行删除
+9
-8
api/include/recorder.h
+4
-4
api/source/recorder.cpp
+5
-4
没有找到文件。
api/include/recorder.h
查看文件 @
7b3527e7
...
@@ -70,7 +70,7 @@ API_EXPORT int API_CALL mk_flv_recorder_start(mk_flv_recorder ctx, const char *a
...
@@ -70,7 +70,7 @@ API_EXPORT int API_CALL mk_flv_recorder_start(mk_flv_recorder ctx, const char *a
* @param stream 流id
* @param stream 流id
* @return 录制状态,0:未录制,1:等待MediaSource注册,注册成功后立即开始录制,2:MediaSource已注册,并且正在录制
* @return 录制状态,0:未录制,1:等待MediaSource注册,注册成功后立即开始录制,2:MediaSource已注册,并且正在录制
*/
*/
API_EXPORT
int
mk_recorder_status
(
int
type
,
const
char
*
vhost
,
const
char
*
app
,
const
char
*
stream
);
API_EXPORT
int
API_CALL
mk_recorder_status
(
int
type
,
const
char
*
vhost
,
const
char
*
app
,
const
char
*
stream
);
/**
/**
* 开始录制
* 开始录制
...
@@ -82,7 +82,7 @@ API_EXPORT int mk_recorder_status(int type, const char *vhost, const char *app,
...
@@ -82,7 +82,7 @@ API_EXPORT int mk_recorder_status(int type, const char *vhost, const char *app,
* @param continue_record 流注销时是否继续等待录制还是立即停止录制
* @param continue_record 流注销时是否继续等待录制还是立即停止录制
* @return 0代表成功,负数代表失败
* @return 0代表成功,负数代表失败
*/
*/
API_EXPORT
int
mk_recorder_start
(
int
type
,
const
char
*
vhost
,
const
char
*
app
,
const
char
*
stream
,
bool
wait_for_record
,
bool
continue_record
);
API_EXPORT
int
API_CALL
mk_recorder_start
(
int
type
,
const
char
*
vhost
,
const
char
*
app
,
const
char
*
stream
,
bool
wait_for_record
,
bool
continue_record
);
/**
/**
* 停止录制
* 停止录制
...
@@ -92,12 +92,12 @@ API_EXPORT int mk_recorder_start(int type, const char *vhost, const char *app, c
...
@@ -92,12 +92,12 @@ API_EXPORT int mk_recorder_start(int type, const char *vhost, const char *app, c
* @param stream 流id
* @param stream 流id
* @return 1:成功,0:失败
* @return 1:成功,0:失败
*/
*/
API_EXPORT
int
mk_recorder_stop
(
int
type
,
const
char
*
vhost
,
const
char
*
app
,
const
char
*
stream
);
API_EXPORT
int
API_CALL
mk_recorder_stop
(
int
type
,
const
char
*
vhost
,
const
char
*
app
,
const
char
*
stream
);
/**
/**
* 停止所有录制,一般程序退出时调用
* 停止所有录制,一般程序退出时调用
*/
*/
API_EXPORT
void
mk_recorder_stop_all
();
API_EXPORT
void
API_CALL
mk_recorder_stop_all
();
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
api/source/recorder.cpp
查看文件 @
7b3527e7
...
@@ -52,21 +52,21 @@ API_EXPORT int API_CALL mk_flv_recorder_start(mk_flv_recorder ctx, const char *a
...
@@ -52,21 +52,21 @@ API_EXPORT int API_CALL mk_flv_recorder_start(mk_flv_recorder ctx, const char *a
}
}
///////////////////////////////////////////hls/mp4录制/////////////////////////////////////////////
///////////////////////////////////////////hls/mp4录制/////////////////////////////////////////////
API_EXPORT
int
mk_recorder_status
(
int
type
,
const
char
*
vhost
,
const
char
*
app
,
const
char
*
stream
){
API_EXPORT
int
API_CALL
mk_recorder_status
(
int
type
,
const
char
*
vhost
,
const
char
*
app
,
const
char
*
stream
){
assert
(
vhost
&&
app
&&
stream
);
assert
(
vhost
&&
app
&&
stream
);
return
Recorder
::
getRecordStatus
((
Recorder
::
type
)
type
,
vhost
,
app
,
stream
);
return
Recorder
::
getRecordStatus
((
Recorder
::
type
)
type
,
vhost
,
app
,
stream
);
}
}
API_EXPORT
int
mk_recorder_start
(
int
type
,
const
char
*
vhost
,
const
char
*
app
,
const
char
*
stream
,
bool
wait_for_record
,
bool
continue_record
){
API_EXPORT
int
API_CALL
mk_recorder_start
(
int
type
,
const
char
*
vhost
,
const
char
*
app
,
const
char
*
stream
,
bool
wait_for_record
,
bool
continue_record
){
assert
(
vhost
&&
app
&&
stream
);
assert
(
vhost
&&
app
&&
stream
);
return
Recorder
::
startRecord
((
Recorder
::
type
)
type
,
vhost
,
app
,
stream
,
wait_for_record
,
continue_record
);
return
Recorder
::
startRecord
((
Recorder
::
type
)
type
,
vhost
,
app
,
stream
,
wait_for_record
,
continue_record
);
}
}
API_EXPORT
int
mk_recorder_stop
(
int
type
,
const
char
*
vhost
,
const
char
*
app
,
const
char
*
stream
){
API_EXPORT
int
API_CALL
mk_recorder_stop
(
int
type
,
const
char
*
vhost
,
const
char
*
app
,
const
char
*
stream
){
assert
(
vhost
&&
app
&&
stream
);
assert
(
vhost
&&
app
&&
stream
);
return
Recorder
::
stopRecord
((
Recorder
::
type
)
type
,
vhost
,
app
,
stream
);
return
Recorder
::
stopRecord
((
Recorder
::
type
)
type
,
vhost
,
app
,
stream
);
}
}
API_EXPORT
void
mk_recorder_stop_all
(){
API_EXPORT
void
API_CALL
mk_recorder_stop_all
(){
Recorder
::
stopAll
();
Recorder
::
stopAll
();
}
}
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论