新增mk_media_source_get_track方法: #2530

This commit is contained in:
xia-chu
2023-06-10 09:34:00 +08:00
committed by 夏楚
parent d3f1c2fab1
commit 24fb666fb3
2 changed files with 21 additions and 0 deletions

View File

@@ -12,6 +12,7 @@
#define MK_EVENT_OBJECTS_H
#include "mk_common.h"
#include "mk_tcp.h"
#include "mk_track.h"
#ifdef __cplusplus
extern "C" {
#endif
@@ -95,6 +96,10 @@ API_EXPORT const char* API_CALL mk_media_source_get_stream(const mk_media_source
API_EXPORT int API_CALL mk_media_source_get_reader_count(const mk_media_source ctx);
//MediaSource::totalReaderCount()
API_EXPORT int API_CALL mk_media_source_get_total_reader_count(const mk_media_source ctx);
// get track count from MediaSource
API_EXPORT int API_CALL mk_media_source_get_track_count(const mk_media_source ctx);
// get track by index from MediaSource
API_EXPORT mk_track API_CALL mk_media_source_get_track(const mk_media_source ctx, int index);
/**
* 直播源在ZLMediaKit中被称作为MediaSource
* 目前支持3种分别是RtmpMediaSource、RtspMediaSource、HlsMediaSource