新增mk_media_source_broadcast_msg接口

通过该接口可以广播webrtc datachannel消息给webrtc播放器
This commit is contained in:
xia-chu
2023-09-02 12:58:20 +08:00
parent e3e7495c90
commit 144165d537
2 changed files with 13 additions and 0 deletions

View File

@@ -100,6 +100,9 @@ API_EXPORT int API_CALL mk_media_source_get_total_reader_count(const mk_media_so
API_EXPORT int API_CALL mk_media_source_get_track_count(const mk_media_source ctx);
// copy track reference by index from MediaSource, please use mk_track_unref to release it
API_EXPORT mk_track API_CALL mk_media_source_get_track(const mk_media_source ctx, int index);
// MediaSource::broadcastMessage
API_EXPORT int API_CALL mk_media_source_broadcast_msg(const mk_media_source ctx, const char *msg, size_t len);
/**
* 直播源在ZLMediaKit中被称作为MediaSource
* 目前支持3种分别是RtmpMediaSource、RtspMediaSource、HlsMediaSource