From f0a538d37de356b823634d42813e07cb41da377a Mon Sep 17 00:00:00 2001 From: lyg1949 Date: Wed, 24 Jun 2020 08:54:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E8=BE=93=E5=85=A5PCM?= =?UTF-8?q?=E5=B8=A7=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 实现输入PCM帧的接口 --- api/source/mk_media.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/api/source/mk_media.cpp b/api/source/mk_media.cpp index c3309c5d..c6bdaf19 100755 --- a/api/source/mk_media.cpp +++ b/api/source/mk_media.cpp @@ -157,6 +157,15 @@ API_EXPORT void API_CALL mk_media_input_aac(mk_media ctx, void *data, int len, u (*obj)->getChannel()->inputAAC((char *) data, len, dts, (char *) adts); } +#ifdef ENABLE_FAAC +API_EXPORT void API_CALL mk_media_input_PCM(mk_media ctx, void *data , int len, uint32_t pts) +{ + assert(ctx && data && len > 0); + MediaHelper::Ptr* obj = (MediaHelper::Ptr*) ctx; + (*obj)->getChannel()->inputPCM((char*)data, len, pts); +} +#endif //ENABLE_FAAC + API_EXPORT void API_CALL mk_media_input_g711(mk_media ctx, void* data, int len, uint32_t dts){ assert(ctx && data && len > 0); MediaHelper::Ptr* obj = (MediaHelper::Ptr*) ctx;