mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 10:40:05 +08:00
新增mk_media_source_find2接口
This commit is contained in:
parent
d4f8017117
commit
936babf459
@ -132,6 +132,12 @@ API_EXPORT void API_CALL mk_media_source_find(const char *schema,
|
|||||||
int from_mp4,
|
int from_mp4,
|
||||||
void *user_data,
|
void *user_data,
|
||||||
on_mk_media_source_find_cb cb);
|
on_mk_media_source_find_cb cb);
|
||||||
|
|
||||||
|
API_EXPORT const mk_media_source API_CALL mk_media_source_find2(const char *schema,
|
||||||
|
const char *vhost,
|
||||||
|
const char *app,
|
||||||
|
const char *stream,
|
||||||
|
int from_mp4);
|
||||||
//MediaSource::for_each_media()
|
//MediaSource::for_each_media()
|
||||||
API_EXPORT void API_CALL mk_media_source_for_each(void *user_data, on_mk_media_source_find_cb cb, const char *schema,
|
API_EXPORT void API_CALL mk_media_source_for_each(void *user_data, on_mk_media_source_find_cb cb, const char *schema,
|
||||||
const char *vhost, const char *app, const char *stream);
|
const char *vhost, const char *app, const char *stream);
|
||||||
|
@ -248,6 +248,16 @@ API_EXPORT void API_CALL mk_media_source_find(const char *schema,
|
|||||||
cb(user_data, (mk_media_source)src.get());
|
cb(user_data, (mk_media_source)src.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
API_EXPORT const mk_media_source API_CALL mk_media_source_find2(const char *schema,
|
||||||
|
const char *vhost,
|
||||||
|
const char *app,
|
||||||
|
const char *stream,
|
||||||
|
int from_mp4) {
|
||||||
|
assert(schema && vhost && app && stream);
|
||||||
|
auto src = MediaSource::find(schema, vhost, app, stream, from_mp4);
|
||||||
|
return (mk_media_source)src.get();
|
||||||
|
}
|
||||||
|
|
||||||
API_EXPORT void API_CALL mk_media_source_for_each(void *user_data, on_mk_media_source_find_cb cb, const char *schema,
|
API_EXPORT void API_CALL mk_media_source_for_each(void *user_data, on_mk_media_source_find_cb cb, const char *schema,
|
||||||
const char *vhost, const char *app, const char *stream) {
|
const char *vhost, const char *app, const char *stream) {
|
||||||
assert(cb);
|
assert(cb);
|
||||||
|
Loading…
Reference in New Issue
Block a user