diff --git a/webrtc/Sdp.cpp b/webrtc/Sdp.cpp index 04766eda..b30e6039 100644 --- a/webrtc/Sdp.cpp +++ b/webrtc/Sdp.cpp @@ -897,6 +897,17 @@ void RtcSession::loadFrom(const string &str) { RtcMedia rtc_media; rtc_media.type = mline.type; rtc_media.mid = media.getStringItem('a', "mid"); + rtc_media.proto = mline.proto; + rtc_media.type = mline.type; + rtc_media.port = mline.port; + rtc_media.direction = media.getDirection(); + rtc_media.rtp_addr = media.getItemClass('c'); + rtc_media.rtcp_addr = media.getItemClass('a',"rtcp"); + rtc_media.ice_ufrag = media.getStringItem('a',"ice-ufrag"); + rtc_media.ice_ufrag = media.getStringItem('a',"ice-pwd"); + rtc_media.fingerprint = media.getItemClass('a', "fingerprint"); + rtc_media.role = media.getItemClass('a',"setup").role; +// rtc_media.rtcp_mux = } } diff --git a/webrtc/Sdp.h b/webrtc/Sdp.h index fd56ec26..78ee3b6d 100644 --- a/webrtc/Sdp.h +++ b/webrtc/Sdp.h @@ -494,7 +494,7 @@ public: }; //rtc传输编码方案 -class RtcPlan{ +class RtcCodecPlan{ public: uint8_t pt; string codec; @@ -514,10 +514,10 @@ public: string proto; //////// rtp //////// - vector plan; + RtcSSRC ssrc; SdpConnection rtp_addr; RtpDirection direction; - RtcSSRC ssrc; + vector plan; //////// rtx - rtcp //////// bool rtcp_mux;