diff --git a/webrtc/Sdp.cpp b/webrtc/Sdp.cpp index 04f40c53..0831a1cf 100644 --- a/webrtc/Sdp.cpp +++ b/webrtc/Sdp.cpp @@ -1447,16 +1447,14 @@ void RtcConfigure::RtcTrackConfigure::setDefaultSetting(TrackType type){ } } -void RtcConfigure::setDefaultSetting(string ice_ufrag, - string ice_pwd, - RtpDirection direction, +void RtcConfigure::setDefaultSetting(string ice_ufrag, string ice_pwd, RtpDirection direction, const SdpAttrFingerprint &fingerprint) { video.setDefaultSetting(TrackVideo); audio.setDefaultSetting(TrackAudio); application.setDefaultSetting(TrackApplication); - video.ice_ufrag = audio.ice_ufrag = application.ice_ufrag = ice_ufrag; - video.ice_pwd = audio.ice_pwd = application.ice_pwd = ice_pwd; + video.ice_ufrag = audio.ice_ufrag = application.ice_ufrag = std::move(ice_ufrag); + video.ice_pwd = audio.ice_pwd = application.ice_pwd = std::move(ice_pwd); video.direction = audio.direction = application.direction = direction; video.fingerprint = audio.fingerprint = application.fingerprint = fingerprint; } @@ -1579,7 +1577,7 @@ static RtpDirection matchDirection(RtpDirection offer_direction, RtpDirection su } } -void RtcConfigure::matchMedia(shared_ptr &ret, TrackType type, const vector &medias, const RtcTrackConfigure &configure){ +void RtcConfigure::matchMedia(const shared_ptr &ret, TrackType type, const vector &medias, const RtcTrackConfigure &configure){ bool check_profile = true; bool check_codec = true; diff --git a/webrtc/Sdp.h b/webrtc/Sdp.h index 9e8f8f71..d75f58e0 100644 --- a/webrtc/Sdp.h +++ b/webrtc/Sdp.h @@ -710,10 +710,7 @@ public: RtcTrackConfigure audio; RtcTrackConfigure application; - void setDefaultSetting(string ice_ufrag, - string ice_pwd, - RtpDirection direction, - const SdpAttrFingerprint &fingerprint); + void setDefaultSetting(string ice_ufrag, string ice_pwd, RtpDirection direction, const SdpAttrFingerprint &fingerprint); void addCandidate(const SdpAttrCandidate &candidate, TrackType type = TrackInvalid); shared_ptr createAnswer(const RtcSession &offer); @@ -724,7 +721,7 @@ public: void enableREMB(bool enable = true, TrackType type = TrackInvalid); private: - void matchMedia(shared_ptr &ret, TrackType type, const vector &medias, const RtcTrackConfigure &configure); + void matchMedia(const shared_ptr &ret, TrackType type, const vector &medias, const RtcTrackConfigure &configure); bool onCheckCodecProfile(const RtcCodecPlan &plan, CodecId codec); void onSelectPlan(RtcCodecPlan &plan, CodecId codec);