Media tuple refactor (#3715)

Co-authored-by: cqm <cqm@97kid.com>
This commit is contained in:
mtdxc
2024-07-14 09:32:41 +08:00
committed by GitHub
parent 0eb38635ce
commit d735aa1797
18 changed files with 61 additions and 59 deletions

View File

@@ -28,7 +28,8 @@ API_EXPORT mk_proxy_player API_CALL mk_proxy_player_create3(const char *vhost, c
ProtocolOption option;
option.enable_hls = hls_enabled;
option.enable_mp4 = mp4_enabled;
PlayerProxy::Ptr *obj(new PlayerProxy::Ptr(new PlayerProxy(vhost, app, stream, option, retry_count)));
MediaTuple tuple = {vhost, app, stream, ""};
PlayerProxy::Ptr *obj(new PlayerProxy::Ptr(new PlayerProxy(tuple, option, retry_count)));
return (mk_proxy_player)obj;
}
@@ -36,7 +37,8 @@ API_EXPORT mk_proxy_player API_CALL mk_proxy_player_create3(const char *vhost, c
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)));
MediaTuple tuple = {vhost, app, stream, ""};
PlayerProxy::Ptr *obj(new PlayerProxy::Ptr(new PlayerProxy(tuple, option, retry_count)));
return (mk_proxy_player)obj;
}