Merge pull request #1822 from Dw9/master

c api支持从mp4推送rtp
This commit is contained in:
夏楚 2022-07-25 10:33:29 +08:00 committed by GitHub
commit e7cb05d3b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -128,6 +128,7 @@ API_EXPORT void API_CALL mk_media_source_find(const char *schema,
const char *vhost,
const char *app,
const char *stream,
int from_mp4,
void *user_data,
on_mk_media_source_find_cb cb);
//MediaSource::for_each_media()

View File

@ -241,10 +241,11 @@ API_EXPORT void API_CALL mk_media_source_find(const char *schema,
const char *vhost,
const char *app,
const char *stream,
int from_mp4,
void *user_data,
on_mk_media_source_find_cb cb) {
assert(schema && vhost && app && stream && cb);
auto src = MediaSource::find(schema, vhost, app, stream);
auto src = MediaSource::find(schema, vhost, app, stream, from_mp4);
cb(user_data, src.get());
}