完善c api

This commit is contained in:
xia-chu
2021-02-02 15:11:16 +08:00
parent 39229f9e39
commit 2b971a188d
4 changed files with 27 additions and 9 deletions

View File

@@ -19,6 +19,13 @@ API_EXPORT mk_pusher API_CALL mk_pusher_create(const char *schema,const char *vh
return obj;
}
API_EXPORT mk_pusher API_CALL mk_pusher_create_src(mk_media_source ctx){
assert(ctx);
MediaSource *src = (MediaSource *)ctx;
MediaPusher::Ptr *obj = new MediaPusher::Ptr(new MediaPusher(src->shared_from_this()));
return obj;
}
API_EXPORT void API_CALL mk_pusher_release(mk_pusher ctx){
assert(ctx);
MediaPusher::Ptr *obj = (MediaPusher::Ptr *)ctx;