From 9bb4b55924f0c7c282c794cba91eee6fbbc91987 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sat, 29 Oct 2022 16:48:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dmk=5Fmedia=5Fstart=5Fsend=5Fr?= =?UTF-8?q?tp=E7=9B=B8=E5=85=B3bug:=20#2044?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/source/mk_media.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/source/mk_media.cpp b/api/source/mk_media.cpp index 49f65342..c6c97e4c 100755 --- a/api/source/mk_media.cpp +++ b/api/source/mk_media.cpp @@ -258,7 +258,7 @@ API_EXPORT void API_CALL mk_media_start_send_rtp(mk_media ctx, const char *dst_u // sender参数无用 auto ref = *obj; - (*obj)->getOwnerPoller(MediaSource::NullMediaSource())->async([args, ref, cb, user_data]() { + (*obj)->getChannel()->getOwnerPoller(MediaSource::NullMediaSource())->async([args, ref, cb, user_data]() { ref->getChannel()->startSendRtp(MediaSource::NullMediaSource(), args, [cb, user_data](uint16_t local_port, const SockException &ex) { if (cb) { cb(user_data, local_port, ex.getErrCode(), ex.what()); @@ -273,12 +273,12 @@ API_EXPORT void API_CALL mk_media_stop_send_rtp(mk_media ctx, const char *ssrc){ // sender参数无用 auto ref = *obj; string ssrc_str = ssrc ? ssrc : ""; - (*obj)->getOwnerPoller(MediaSource::NullMediaSource())->async([ref, ssrc_str]() { + (*obj)->getChannel()->getOwnerPoller(MediaSource::NullMediaSource())->async([ref, ssrc_str]() { ref->getChannel()->stopSendRtp(MediaSource::NullMediaSource(), ssrc_str); }); } API_EXPORT mk_thread API_CALL mk_media_get_owner_thread(mk_media ctx) { MediaHelper::Ptr *obj = (MediaHelper::Ptr *)ctx; - return (*obj)->getOwnerPoller(MediaSource::NullMediaSource()).get(); + return (*obj)->getChannel()->getOwnerPoller(MediaSource::NullMediaSource()).get(); } \ No newline at end of file