From 62036d0f5d7f3962fb1231b412b75cd2f274cf6d Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Mon, 29 Mar 2021 18:31:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84sdp=E6=8F=90=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webrtc/Sdp.cpp | 11 +++++++++++ webrtc/Sdp.h | 6 +++--- 2 files changed, 14 insertions(+), 3 deletions(-) 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;