完善接口

This commit is contained in:
xiongziliang 2020-04-19 00:05:02 +08:00
parent b7b839a06f
commit 003cd58371
2 changed files with 8 additions and 3 deletions

View File

@ -25,11 +25,14 @@ typedef void *mk_media;
* @param app live
* @param stream idcamera
* @param duration ()0
* @param rtsp_enabled rtsp协议
* @param rtmp_enabled rtmp协议
* @param hls_enabled hls
* @param mp4_enabled mp4
* @return
*/
API_EXPORT mk_media API_CALL mk_media_create(const char *vhost, const char *app, const char *stream, float duration, int hls_enabled, int mp4_enabled);
API_EXPORT mk_media API_CALL mk_media_create(const char *vhost, const char *app, const char *stream, float duration,
int rtsp_enabled, int rtmp_enabled, int hls_enabled, int mp4_enabled);
/**
*

View File

@ -96,9 +96,11 @@ API_EXPORT int API_CALL mk_media_total_reader_count(mk_media ctx){
return (*obj)->getChannel()->totalReaderCount();
}
API_EXPORT mk_media API_CALL mk_media_create(const char *vhost, const char *app, const char *stream, float duration, int hls_enabled, int mp4_enabled) {
API_EXPORT mk_media API_CALL mk_media_create(const char *vhost, const char *app, const char *stream, float duration,
int rtsp_enabled, int rtmp_enabled, int hls_enabled, int mp4_enabled) {
assert(vhost && app && stream);
MediaHelper::Ptr *obj(new MediaHelper::Ptr(new MediaHelper(vhost, app, stream, duration, true, true, hls_enabled, mp4_enabled)));
MediaHelper::Ptr *obj(new MediaHelper::Ptr(new MediaHelper(vhost, app, stream, duration,
rtsp_enabled, rtmp_enabled, hls_enabled, mp4_enabled)));
(*obj)->attachEvent();
return (mk_media) obj;
}