From d62cdd81b86637a35046b340e96684199fb02a8d Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Wed, 7 Jul 2021 17:58:29 +0800 Subject: [PATCH] =?UTF-8?q?webrtc=E4=B8=8D=E6=94=AF=E6=8C=81=E7=9A=84mline?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=BAinactive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webrtc/Sdp.cpp | 8 ++------ webrtc/Sdp.h | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/webrtc/Sdp.cpp b/webrtc/Sdp.cpp index 29c67e1e..d73f9bc1 100644 --- a/webrtc/Sdp.cpp +++ b/webrtc/Sdp.cpp @@ -1406,7 +1406,6 @@ void RtcConfigure::RtcTrackConfigure::enableREMB(bool enable){ } void RtcConfigure::RtcTrackConfigure::setDefaultSetting(TrackType type){ - enable = true; rtcp_mux = true; rtcp_rsize = false; group_bundle = true; @@ -1455,7 +1454,6 @@ void RtcConfigure::RtcTrackConfigure::setDefaultSetting(TrackType type){ break; } case TrackApplication: { - enable = false; break; } default: break; @@ -1575,9 +1573,6 @@ shared_ptr RtcConfigure::createAnswer(const RtcSession &offer){ } void RtcConfigure::matchMedia(shared_ptr &ret, TrackType type, const vector &medias, const RtcTrackConfigure &configure){ - if (!configure.enable) { - return; - } bool check_profile = true; bool check_codec = true; @@ -1667,7 +1662,8 @@ RETRY: } case RtpDirection::sendrecv : { //对方支持发送接收,那么最终能力根据配置来决定 - answer_media.direction = configure.direction; + answer_media.direction = (configure.direction == RtpDirection::invalid ? RtpDirection::inactive + : configure.direction); break; } default: continue; diff --git a/webrtc/Sdp.h b/webrtc/Sdp.h index 614cfd50..999df44d 100644 --- a/webrtc/Sdp.h +++ b/webrtc/Sdp.h @@ -684,7 +684,6 @@ public: using Ptr = std::shared_ptr; class RtcTrackConfigure { public: - bool enable; bool rtcp_mux; bool rtcp_rsize; bool group_bundle;