2019-12-18 11:47:49 +08:00
|
|
|
|
/*
|
2020-04-04 20:30:09 +08:00
|
|
|
|
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
|
2019-12-17 18:45:31 +08:00
|
|
|
|
*
|
|
|
|
|
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
|
|
|
|
|
*
|
2020-04-04 20:30:09 +08:00
|
|
|
|
* Use of this source code is governed by MIT license that can be found in the
|
|
|
|
|
* LICENSE file in the root of the source tree. All contributing project authors
|
|
|
|
|
* may be found in the AUTHORS file in the root of the source tree.
|
2019-12-17 18:45:31 +08:00
|
|
|
|
*/
|
|
|
|
|
|
2019-12-24 16:19:33 +08:00
|
|
|
|
#ifndef MK_RECORDER_API_H_
|
|
|
|
|
#define MK_RECORDER_API_H_
|
2019-12-17 18:45:31 +08:00
|
|
|
|
|
2019-12-27 10:10:31 +08:00
|
|
|
|
#include "mk_common.h"
|
2019-12-17 18:45:31 +08:00
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2019-12-24 16:19:33 +08:00
|
|
|
|
///////////////////////////////////////////flv录制/////////////////////////////////////////////
|
|
|
|
|
|
2019-12-17 18:45:31 +08:00
|
|
|
|
typedef void* mk_flv_recorder;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 创建flv录制器
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
API_EXPORT mk_flv_recorder API_CALL mk_flv_recorder_create();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 释放flv录制器
|
|
|
|
|
* @param ctx
|
|
|
|
|
*/
|
|
|
|
|
API_EXPORT void API_CALL mk_flv_recorder_release(mk_flv_recorder ctx);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 开始录制flv
|
|
|
|
|
* @param ctx flv录制器
|
2019-12-27 13:56:02 +08:00
|
|
|
|
* @param vhost 虚拟主机
|
2019-12-17 18:45:31 +08:00
|
|
|
|
* @param app 绑定的RtmpMediaSource的 app名
|
|
|
|
|
* @param stream 绑定的RtmpMediaSource的 stream名
|
|
|
|
|
* @param file_path 文件存放地址
|
|
|
|
|
* @return 0:开始超过,-1:失败,打开文件失败或该RtmpMediaSource不存在
|
|
|
|
|
*/
|
2019-12-27 13:56:02 +08:00
|
|
|
|
API_EXPORT int API_CALL mk_flv_recorder_start(mk_flv_recorder ctx, const char *vhost, const char *app, const char *stream, const char *file_path);
|
2019-12-17 18:45:31 +08:00
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
2019-12-24 16:19:33 +08:00
|
|
|
|
#endif /* MK_RECORDER_API_H_ */
|