webrtc不支持的mline设置为inactive

This commit is contained in:
ziyue 2021-07-07 17:58:29 +08:00
parent 4b694ccde8
commit d62cdd81b8
2 changed files with 2 additions and 7 deletions

View File

@ -1406,7 +1406,6 @@ void RtcConfigure::RtcTrackConfigure::enableREMB(bool enable){
} }
void RtcConfigure::RtcTrackConfigure::setDefaultSetting(TrackType type){ void RtcConfigure::RtcTrackConfigure::setDefaultSetting(TrackType type){
enable = true;
rtcp_mux = true; rtcp_mux = true;
rtcp_rsize = false; rtcp_rsize = false;
group_bundle = true; group_bundle = true;
@ -1455,7 +1454,6 @@ void RtcConfigure::RtcTrackConfigure::setDefaultSetting(TrackType type){
break; break;
} }
case TrackApplication: { case TrackApplication: {
enable = false;
break; break;
} }
default: break; default: break;
@ -1575,9 +1573,6 @@ shared_ptr<RtcSession> RtcConfigure::createAnswer(const RtcSession &offer){
} }
void RtcConfigure::matchMedia(shared_ptr<RtcSession> &ret, TrackType type, const vector<RtcMedia> &medias, const RtcTrackConfigure &configure){ void RtcConfigure::matchMedia(shared_ptr<RtcSession> &ret, TrackType type, const vector<RtcMedia> &medias, const RtcTrackConfigure &configure){
if (!configure.enable) {
return;
}
bool check_profile = true; bool check_profile = true;
bool check_codec = true; bool check_codec = true;
@ -1667,7 +1662,8 @@ RETRY:
} }
case RtpDirection::sendrecv : { case RtpDirection::sendrecv : {
//对方支持发送接收,那么最终能力根据配置来决定 //对方支持发送接收,那么最终能力根据配置来决定
answer_media.direction = configure.direction; answer_media.direction = (configure.direction == RtpDirection::invalid ? RtpDirection::inactive
: configure.direction);
break; break;
} }
default: continue; default: continue;

View File

@ -684,7 +684,6 @@ public:
using Ptr = std::shared_ptr<RtcConfigure>; using Ptr = std::shared_ptr<RtcConfigure>;
class RtcTrackConfigure { class RtcTrackConfigure {
public: public:
bool enable;
bool rtcp_mux; bool rtcp_mux;
bool rtcp_rsize; bool rtcp_rsize;
bool group_bundle; bool group_bundle;