添加mk_media_init_complete接口

This commit is contained in:
xiongziliang 2020-02-27 11:40:38 +08:00
parent a0001bf2f4
commit 38584a7478
2 changed files with 14 additions and 0 deletions

View File

@ -81,6 +81,14 @@ API_EXPORT void API_CALL mk_media_init_h265(mk_media ctx, int width, int height,
*/
API_EXPORT void API_CALL mk_media_init_aac(mk_media ctx, int channel, int sample_bit, int sample_rate, int profile);
/**
* h264/h265/aac完毕后调用此函数
* track()ZLMediaKit不知道后续是否还要添加track3
* Track类型便(3)
* @param ctx
*/
API_EXPORT void API_CALL mk_media_init_complete(mk_media ctx);
/**
* H264视频00 00 01,00 00 00 01
* @param ctx

View File

@ -75,6 +75,12 @@ API_EXPORT void API_CALL mk_media_init_aac(mk_media ctx, int channel, int sample
(*obj)->initAudio(info);
}
API_EXPORT void API_CALL mk_media_init_complete(mk_media ctx){
assert(ctx);
DevChannel::Ptr *obj = (DevChannel::Ptr *) ctx;
(*obj)->addTrackCompleted();
}
API_EXPORT void API_CALL mk_media_input_h264(mk_media ctx, void *data, int len, uint32_t dts, uint32_t pts) {
assert(ctx && data && len > 0);
DevChannel::Ptr *obj = (DevChannel::Ptr *) ctx;