mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 03:31:45 +08:00
添加媒体注册回调事件:#373
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user