Commit 9bb4b559 by xiongziliang

修复mk_media_start_send_rtp相关bug: #2044

parent 3d7fc44a
...@@ -258,7 +258,7 @@ API_EXPORT void API_CALL mk_media_start_send_rtp(mk_media ctx, const char *dst_u ...@@ -258,7 +258,7 @@ API_EXPORT void API_CALL mk_media_start_send_rtp(mk_media ctx, const char *dst_u
// sender参数无用 // sender参数无用
auto ref = *obj; 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) { ref->getChannel()->startSendRtp(MediaSource::NullMediaSource(), args, [cb, user_data](uint16_t local_port, const SockException &ex) {
if (cb) { if (cb) {
cb(user_data, local_port, ex.getErrCode(), ex.what()); 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){ ...@@ -273,12 +273,12 @@ API_EXPORT void API_CALL mk_media_stop_send_rtp(mk_media ctx, const char *ssrc){
// sender参数无用 // sender参数无用
auto ref = *obj; auto ref = *obj;
string ssrc_str = ssrc ? ssrc : ""; 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); ref->getChannel()->stopSendRtp(MediaSource::NullMediaSource(), ssrc_str);
}); });
} }
API_EXPORT mk_thread API_CALL mk_media_get_owner_thread(mk_media ctx) { API_EXPORT mk_thread API_CALL mk_media_get_owner_thread(mk_media ctx) {
MediaHelper::Ptr *obj = (MediaHelper::Ptr *)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
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论