mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-01 23:57:37 +08:00
完善 c api
This commit is contained in:
@@ -40,8 +40,13 @@ extern "C" {
|
||||
typedef struct {
|
||||
// 线程数
|
||||
int thread_num;
|
||||
|
||||
// 日志级别,支持0~4
|
||||
int log_level;
|
||||
//文件日志保存路径,路径可以不存在(内部可以创建文件夹),设置为NULL关闭日志输出至文件
|
||||
const char *log_file_path;
|
||||
//文件日志保存天数,设置为0关闭日志文件
|
||||
int log_file_days;
|
||||
|
||||
// 配置文件是内容还是路径
|
||||
int ini_is_path;
|
||||
@@ -71,19 +76,23 @@ API_EXPORT void API_CALL mk_stop_all_server();
|
||||
* 基础类型参数版本的mk_env_init,为了方便其他语言调用
|
||||
* @param thread_num 线程数
|
||||
* @param log_level 日志级别,支持0~4
|
||||
* @param log_file_path 文件日志保存路径,路径可以不存在(内部可以创建文件夹),设置为NULL关闭日志输出至文件
|
||||
* @param log_file_days 文件日志保存天数,设置为0关闭日志文件
|
||||
* @param ini_is_path 配置文件是内容还是路径
|
||||
* @param ini 配置文件内容或路径,可以为NULL,如果该文件不存在,那么将导出默认配置至该文件
|
||||
* @param ssl_is_path ssl证书是内容还是路径
|
||||
* @param ssl ssl证书内容或路径,可以为NULL
|
||||
* @param ssl_pwd 证书密码,可以为NULL
|
||||
*/
|
||||
API_EXPORT void API_CALL mk_env_init1( int thread_num,
|
||||
int log_level,
|
||||
int ini_is_path,
|
||||
const char *ini,
|
||||
int ssl_is_path,
|
||||
const char *ssl,
|
||||
const char *ssl_pwd);
|
||||
API_EXPORT void API_CALL mk_env_init1(int thread_num,
|
||||
int log_level,
|
||||
const char *log_file_path,
|
||||
int log_file_days,
|
||||
int ini_is_path,
|
||||
const char *ini,
|
||||
int ssl_is_path,
|
||||
const char *ssl,
|
||||
const char *ssl_pwd);
|
||||
|
||||
/**
|
||||
* 设置配置项
|
||||
|
||||
@@ -73,6 +73,10 @@ API_EXPORT const char* API_CALL mk_media_info_get_vhost(const mk_media_info ctx)
|
||||
API_EXPORT const char* API_CALL mk_media_info_get_app(const mk_media_info ctx);
|
||||
//MediaInfo::_streamid
|
||||
API_EXPORT const char* API_CALL mk_media_info_get_stream(const mk_media_info ctx);
|
||||
//MediaInfo::_host
|
||||
API_EXPORT const char* API_CALL mk_media_info_get_host(const mk_media_info ctx);
|
||||
//MediaInfo::_port
|
||||
API_EXPORT uint16_t API_CALL mk_media_info_get_port(const mk_media_info ctx);
|
||||
|
||||
|
||||
///////////////////////////////////////////MediaSource/////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user