feat: 补充C API拉流代理缺少retry_count重试次数配置 修改函数名称

This commit is contained in:
李道甫 2024-05-29 10:45:46 +08:00
parent b5c0f73849
commit 84209bec26
4 changed files with 11 additions and 8 deletions

View File

@ -51,6 +51,9 @@ extern "C" {
//输出日志到回调函数(mk_events::on_mk_log)
#define LOG_CALLBACK (1 << 2)
//向下兼容
#define mk_env_init1 mk_env_init2
//回调user_data回调函数
typedef void(API_CALL *on_user_data_free)(void *user_data);
@ -104,7 +107,7 @@ API_EXPORT void API_CALL mk_stop_all_server();
* @param ssl ssl证书内容或路径NULL
* @param ssl_pwd NULL
*/
API_EXPORT void API_CALL mk_env_init1(int thread_num,
API_EXPORT void API_CALL mk_env_init2(int thread_num,
int log_level,
int log_mask,
const char *log_file_path,

View File

@ -44,7 +44,7 @@ API_EXPORT mk_proxy_player API_CALL mk_proxy_player_create(const char *vhost, co
* @param retry_count <0
* @return
*/
API_EXPORT mk_proxy_player API_CALL mk_proxy_player_create1(const char *vhost, const char *app, const char *stream, int hls_enabled, int mp4_enabled, int retry_count);
API_EXPORT mk_proxy_player API_CALL mk_proxy_player_create3(const char *vhost, const char *app, const char *stream, int hls_enabled, int mp4_enabled, int retry_count);
/**
*
@ -66,7 +66,7 @@ API_EXPORT mk_proxy_player API_CALL mk_proxy_player_create2(const char *vhost, c
* @param retry_count <0
* @return
*/
API_EXPORT mk_proxy_player API_CALL mk_proxy_player_create3(const char *vhost, const char *app, const char *stream, mk_ini option, int retry_count);
API_EXPORT mk_proxy_player API_CALL mk_proxy_player_create4(const char *vhost, const char *app, const char *stream, mk_ini option, int retry_count);
/**

View File

@ -83,7 +83,7 @@ API_EXPORT void API_CALL mk_stop_all_server(){
stopAllTcpServer();
}
API_EXPORT void API_CALL mk_env_init1(int thread_num,
API_EXPORT void API_CALL mk_env_init2(int thread_num,
int log_level,
int log_mask,
const char *log_file_path,

View File

@ -16,10 +16,10 @@ using namespace toolkit;
using namespace mediakit;
API_EXPORT mk_proxy_player API_CALL mk_proxy_player_create(const char *vhost, const char *app, const char *stream, int hls_enabled, int mp4_enabled) {
return mk_proxy_player_create1(vhost, app, stream, hls_enabled, mp4_enabled,-1);
return mk_proxy_player_create3(vhost, app, stream, hls_enabled, mp4_enabled,-1);
}
API_EXPORT mk_proxy_player API_CALL mk_proxy_player_create1(const char *vhost, const char *app, const char *stream, int hls_enabled, int mp4_enabled, int retry_count) {
API_EXPORT mk_proxy_player API_CALL mk_proxy_player_create3(const char *vhost, const char *app, const char *stream, int hls_enabled, int mp4_enabled, int retry_count) {
assert(vhost && app && stream);
ProtocolOption option;
option.enable_hls = hls_enabled;
@ -29,11 +29,11 @@ API_EXPORT mk_proxy_player API_CALL mk_proxy_player_create1(const char *vhost, c
}
API_EXPORT mk_proxy_player API_CALL mk_proxy_player_create2(const char *vhost, const char *app, const char *stream, mk_ini ini) {
return mk_proxy_player_create3(vhost, app, stream, ini, -1);
return mk_proxy_player_create4(vhost, app, stream, ini, -1);
}
API_EXPORT mk_proxy_player API_CALL mk_proxy_player_create3(const char *vhost, const char *app, const char *stream, mk_ini ini, int retry_count) {
API_EXPORT mk_proxy_player API_CALL mk_proxy_player_create4(const char *vhost, const char *app, const char *stream, mk_ini ini, int retry_count) {
assert(vhost && app && stream);
ProtocolOption option(*((mINI *)ini));
PlayerProxy::Ptr *obj(new PlayerProxy::Ptr(new PlayerProxy(vhost, app, stream, option, retry_count)));