feat: 补充C API拉流代理缺少retry_count重试次数配置

This commit is contained in:
李道甫 2024-05-29 09:59:59 +08:00
parent 0859ff6909
commit 4258bbe927
2 changed files with 4 additions and 14 deletions

View File

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

View File

@ -16,12 +16,7 @@ using namespace toolkit;
using namespace mediakit; 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) { 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) {
assert(vhost && app && stream); mk_proxy_player_create1(vhost, app, stream, hls_enabled, mp4_enabled,-1);
ProtocolOption option;
option.enable_hls = hls_enabled;
option.enable_mp4 = mp4_enabled;
PlayerProxy::Ptr *obj(new PlayerProxy::Ptr(new PlayerProxy(vhost, app, stream, option)));
return (mk_proxy_player) obj;
} }
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_create1(const char *vhost, const char *app, const char *stream, int hls_enabled, int mp4_enabled, int retry_count) {
@ -34,10 +29,7 @@ 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) { API_EXPORT mk_proxy_player API_CALL mk_proxy_player_create2(const char *vhost, const char *app, const char *stream, mk_ini ini) {
assert(vhost && app && stream); mk_proxy_player_create3(vhost, app, stream, ini, -1);
ProtocolOption option(*((mINI *)ini));
PlayerProxy::Ptr *obj(new PlayerProxy::Ptr(new PlayerProxy(vhost, app, stream, option)));
return (mk_proxy_player)obj;
} }