添加媒体注册回调事件:#373

This commit is contained in:
xiongziliang
2020-07-02 18:14:39 +08:00
parent 5195475116
commit 3c858a8351
8 changed files with 73 additions and 1 deletions

View File

@@ -12,6 +12,7 @@
#define MK_MEDIA_H_
#include "mk_common.h"
#include "mk_events_objects.h"
#ifdef __cplusplus
extern "C" {
@@ -158,6 +159,22 @@ API_EXPORT void API_CALL mk_media_set_on_seek(mk_media ctx, on_mk_media_seek cb,
*/
API_EXPORT int API_CALL mk_media_total_reader_count(mk_media ctx);
/**
* 生成的MediaSource注册或注销事件
* @param user_data 设置回调时的用户数据指针
* @param sender 生成的MediaSource对象
* @param regist 1为注册事件0为注销事件
*/
typedef void(API_CALL *on_mk_media_source_regist)(void *user_data, mk_media_source sender, int regist);
/**
* 设置MediaSource注册或注销事件回调函数
* @param ctx 对象指针
* @param cb 回调指针
* @param user_data 用户数据指针
*/
API_EXPORT void API_CALL mk_media_set_on_regist(mk_media ctx, on_mk_media_source_regist cb, void *user_data);
#ifdef __cplusplus
}
#endif