mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-19 16:47:50 +01:00
remove mslabel and mslabel ssrc-specific attributes
Removes support for parsing and serializing a=ssrc:1 mslabel:stream a=ssrc:1 label:track which have been superceeded by a=ssrc:1 msid:stream track a long time ago. Bug: webrtc:7110 Change-Id: I3aca47728098b6e7e049b82ed34c59426d411c41 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168244 Commit-Queue: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30801}
This commit is contained in:
parent
0357b3e7b6
commit
e3f257c4ee
5 changed files with 39 additions and 126 deletions
|
@ -429,8 +429,8 @@ void DataChannelController::UpdateRemoteRtpDataChannels(
|
||||||
RTC_DCHECK_RUN_ON(signaling_thread());
|
RTC_DCHECK_RUN_ON(signaling_thread());
|
||||||
// Find new and active data channels.
|
// Find new and active data channels.
|
||||||
for (const cricket::StreamParams& params : streams) {
|
for (const cricket::StreamParams& params : streams) {
|
||||||
// The data channel label is either the mslabel or the SSRC if the mslabel
|
// The data channel label is either the msid stream id or the SSRC if
|
||||||
// does not exist. Ex a=ssrc:444330170 mslabel:test1.
|
// the msid does not exist. Ex a=ssrc:444330170 msid:test1 test1.
|
||||||
std::string label = params.first_stream_id().empty()
|
std::string label = params.first_stream_id().empty()
|
||||||
? rtc::ToString(params.first_ssrc())
|
? rtc::ToString(params.first_ssrc())
|
||||||
: params.first_stream_id();
|
: params.first_stream_id();
|
||||||
|
|
|
@ -135,8 +135,7 @@ static const char kSdpStringWithStream1PlanB[] =
|
||||||
"a=rtcp-mux\r\n"
|
"a=rtcp-mux\r\n"
|
||||||
"a=rtpmap:103 ISAC/16000\r\n"
|
"a=rtpmap:103 ISAC/16000\r\n"
|
||||||
"a=ssrc:1 cname:stream1\r\n"
|
"a=ssrc:1 cname:stream1\r\n"
|
||||||
"a=ssrc:1 mslabel:stream1\r\n"
|
"a=ssrc:1 msid:stream1 audiotrack0\r\n"
|
||||||
"a=ssrc:1 label:audiotrack0\r\n"
|
|
||||||
"m=video 1 RTP/AVPF 120\r\n"
|
"m=video 1 RTP/AVPF 120\r\n"
|
||||||
"a=ice-ufrag:e5785931\r\n"
|
"a=ice-ufrag:e5785931\r\n"
|
||||||
"a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n"
|
"a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n"
|
||||||
|
@ -147,11 +146,10 @@ static const char kSdpStringWithStream1PlanB[] =
|
||||||
"a=rtcp-mux\r\n"
|
"a=rtcp-mux\r\n"
|
||||||
"a=rtpmap:120 VP8/90000\r\n"
|
"a=rtpmap:120 VP8/90000\r\n"
|
||||||
"a=ssrc:2 cname:stream1\r\n"
|
"a=ssrc:2 cname:stream1\r\n"
|
||||||
"a=ssrc:2 mslabel:stream1\r\n"
|
"a=ssrc:2 msid:stream1 videotrack0\r\n";
|
||||||
"a=ssrc:2 label:videotrack0\r\n";
|
// Same string as above but with the MID changed to the Unified Plan default and
|
||||||
// Same string as above but with the MID changed to the Unified Plan default.
|
// a=msid added. This is needed so that this SDP can be used as an answer for a
|
||||||
// This is needed so that this SDP can be used as an answer for a Unified Plan
|
// Unified Plan offer.
|
||||||
// offer.
|
|
||||||
static const char kSdpStringWithStream1UnifiedPlan[] =
|
static const char kSdpStringWithStream1UnifiedPlan[] =
|
||||||
"v=0\r\n"
|
"v=0\r\n"
|
||||||
"o=- 0 0 IN IP4 127.0.0.1\r\n"
|
"o=- 0 0 IN IP4 127.0.0.1\r\n"
|
||||||
|
@ -166,9 +164,8 @@ static const char kSdpStringWithStream1UnifiedPlan[] =
|
||||||
"a=sendrecv\r\n"
|
"a=sendrecv\r\n"
|
||||||
"a=rtcp-mux\r\n"
|
"a=rtcp-mux\r\n"
|
||||||
"a=rtpmap:103 ISAC/16000\r\n"
|
"a=rtpmap:103 ISAC/16000\r\n"
|
||||||
|
"a=msid:stream1 audiotrack0\r\n"
|
||||||
"a=ssrc:1 cname:stream1\r\n"
|
"a=ssrc:1 cname:stream1\r\n"
|
||||||
"a=ssrc:1 mslabel:stream1\r\n"
|
|
||||||
"a=ssrc:1 label:audiotrack0\r\n"
|
|
||||||
"m=video 1 RTP/AVPF 120\r\n"
|
"m=video 1 RTP/AVPF 120\r\n"
|
||||||
"a=ice-ufrag:e5785931\r\n"
|
"a=ice-ufrag:e5785931\r\n"
|
||||||
"a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n"
|
"a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n"
|
||||||
|
@ -178,9 +175,8 @@ static const char kSdpStringWithStream1UnifiedPlan[] =
|
||||||
"a=sendrecv\r\n"
|
"a=sendrecv\r\n"
|
||||||
"a=rtcp-mux\r\n"
|
"a=rtcp-mux\r\n"
|
||||||
"a=rtpmap:120 VP8/90000\r\n"
|
"a=rtpmap:120 VP8/90000\r\n"
|
||||||
"a=ssrc:2 cname:stream1\r\n"
|
"a=msid:stream1 videotrack0\r\n"
|
||||||
"a=ssrc:2 mslabel:stream1\r\n"
|
"a=ssrc:2 cname:stream1\r\n";
|
||||||
"a=ssrc:2 label:videotrack0\r\n";
|
|
||||||
|
|
||||||
// Reference SDP with a MediaStream with label "stream1" and audio track with
|
// Reference SDP with a MediaStream with label "stream1" and audio track with
|
||||||
// id "audio_1";
|
// id "audio_1";
|
||||||
|
@ -198,8 +194,7 @@ static const char kSdpStringWithStream1AudioTrackOnly[] =
|
||||||
"a=sendrecv\r\n"
|
"a=sendrecv\r\n"
|
||||||
"a=rtpmap:103 ISAC/16000\r\n"
|
"a=rtpmap:103 ISAC/16000\r\n"
|
||||||
"a=ssrc:1 cname:stream1\r\n"
|
"a=ssrc:1 cname:stream1\r\n"
|
||||||
"a=ssrc:1 mslabel:stream1\r\n"
|
"a=ssrc:1 msid:stream1 audiotrack0\r\n"
|
||||||
"a=ssrc:1 label:audiotrack0\r\n"
|
|
||||||
"a=rtcp-mux\r\n";
|
"a=rtcp-mux\r\n";
|
||||||
|
|
||||||
// Reference SDP with two MediaStreams with label "stream1" and "stream2. Each
|
// Reference SDP with two MediaStreams with label "stream1" and "stream2. Each
|
||||||
|
@ -440,8 +435,6 @@ static const char kDtlsSdesFallbackSdp[] =
|
||||||
"a=rtcp-mux\r\n"
|
"a=rtcp-mux\r\n"
|
||||||
"a=mid:audio\r\n"
|
"a=mid:audio\r\n"
|
||||||
"a=ssrc:1 cname:stream1\r\n"
|
"a=ssrc:1 cname:stream1\r\n"
|
||||||
"a=ssrc:1 mslabel:stream1\r\n"
|
|
||||||
"a=ssrc:1 label:audiotrack0\r\n"
|
|
||||||
"a=ice-ufrag:e5785931\r\n"
|
"a=ice-ufrag:e5785931\r\n"
|
||||||
"a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n"
|
"a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n"
|
||||||
"a=rtpmap:0 pcmu/8000\r\n"
|
"a=rtpmap:0 pcmu/8000\r\n"
|
||||||
|
|
|
@ -126,8 +126,6 @@ static const char kMediaStreamSemantic[] = "WMS";
|
||||||
static const char kSsrcAttributeMsid[] = "msid";
|
static const char kSsrcAttributeMsid[] = "msid";
|
||||||
static const char kDefaultMsid[] = "default";
|
static const char kDefaultMsid[] = "default";
|
||||||
static const char kNoStreamMsid[] = "-";
|
static const char kNoStreamMsid[] = "-";
|
||||||
static const char kSsrcAttributeMslabel[] = "mslabel";
|
|
||||||
static const char kSSrcAttributeLabel[] = "label";
|
|
||||||
static const char kAttributeSsrcGroup[] = "ssrc-group";
|
static const char kAttributeSsrcGroup[] = "ssrc-group";
|
||||||
static const char kAttributeCrypto[] = "crypto";
|
static const char kAttributeCrypto[] = "crypto";
|
||||||
static const char kAttributeCandidate[] = "candidate";
|
static const char kAttributeCandidate[] = "candidate";
|
||||||
|
@ -244,11 +242,6 @@ struct SsrcInfo {
|
||||||
std::string cname;
|
std::string cname;
|
||||||
std::string stream_id;
|
std::string stream_id;
|
||||||
std::string track_id;
|
std::string track_id;
|
||||||
|
|
||||||
// For backward compatibility.
|
|
||||||
// TODO(ronghuawu): Remove below 2 fields once all the clients support msid.
|
|
||||||
std::string label;
|
|
||||||
std::string mslabel;
|
|
||||||
};
|
};
|
||||||
typedef std::vector<SsrcInfo> SsrcInfoVec;
|
typedef std::vector<SsrcInfo> SsrcInfoVec;
|
||||||
typedef std::vector<SsrcGroup> SsrcGroupVec;
|
typedef std::vector<SsrcGroup> SsrcGroupVec;
|
||||||
|
@ -702,12 +695,6 @@ void CreateTracksFromSsrcInfos(const SsrcInfoVec& ssrc_infos,
|
||||||
// This is the case with Plan B SDP msid signaling.
|
// This is the case with Plan B SDP msid signaling.
|
||||||
stream_ids.push_back(ssrc_info.stream_id);
|
stream_ids.push_back(ssrc_info.stream_id);
|
||||||
track_id = ssrc_info.track_id;
|
track_id = ssrc_info.track_id;
|
||||||
} else if (!ssrc_info.mslabel.empty()) {
|
|
||||||
// Since there's no a=msid or a=ssrc msid signaling, this is a sdp from
|
|
||||||
// an older version of client that doesn't support msid.
|
|
||||||
// In that case, we use the mslabel and label to construct the track.
|
|
||||||
stream_ids.push_back(ssrc_info.mslabel);
|
|
||||||
track_id = ssrc_info.label;
|
|
||||||
} else {
|
} else {
|
||||||
// Since no media streams isn't supported with older SDP signaling, we
|
// Since no media streams isn't supported with older SDP signaling, we
|
||||||
// use a default a stream id.
|
// use a default a stream id.
|
||||||
|
@ -1716,15 +1703,6 @@ void BuildRtpContentAttributes(const MediaContentDescription* media_desc,
|
||||||
<< kSsrcAttributeMsid << kSdpDelimiterColon << stream_id
|
<< kSsrcAttributeMsid << kSdpDelimiterColon << stream_id
|
||||||
<< kSdpDelimiterSpace << track.id;
|
<< kSdpDelimiterSpace << track.id;
|
||||||
AddLine(os.str(), message);
|
AddLine(os.str(), message);
|
||||||
|
|
||||||
// TODO(ronghuawu): Remove below code which is for backward
|
|
||||||
// compatibility.
|
|
||||||
// draft-alvestrand-rtcweb-mid-01
|
|
||||||
// a=ssrc:<ssrc-id> mslabel:<value>
|
|
||||||
// The label isn't yet defined.
|
|
||||||
// a=ssrc:<ssrc-id> label:<value>
|
|
||||||
AddSsrcLine(ssrc, kSsrcAttributeMslabel, stream_id, message);
|
|
||||||
AddSsrcLine(ssrc, kSSrcAttributeLabel, track.id, message);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3488,14 +3466,8 @@ bool ParseSsrcAttribute(const std::string& line,
|
||||||
ssrc_info.track_id = fields[1];
|
ssrc_info.track_id = fields[1];
|
||||||
}
|
}
|
||||||
*msid_signaling |= cricket::kMsidSignalingSsrcAttribute;
|
*msid_signaling |= cricket::kMsidSignalingSsrcAttribute;
|
||||||
} else if (attribute == kSsrcAttributeMslabel) {
|
} else {
|
||||||
// draft-alvestrand-rtcweb-mid-01
|
RTC_LOG(LS_INFO) << "Ignored unknown ssrc-specific attribute: " << line;
|
||||||
// mslabel:<value>
|
|
||||||
ssrc_info.mslabel = value;
|
|
||||||
} else if (attribute == kSSrcAttributeLabel) {
|
|
||||||
// The label isn't defined.
|
|
||||||
// label:<value>
|
|
||||||
ssrc_info.label = value;
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,8 +184,6 @@ static const char kSdpFullString[] =
|
||||||
"a=rtpmap:104 ISAC/32000\r\n"
|
"a=rtpmap:104 ISAC/32000\r\n"
|
||||||
"a=ssrc:1 cname:stream_1_cname\r\n"
|
"a=ssrc:1 cname:stream_1_cname\r\n"
|
||||||
"a=ssrc:1 msid:local_stream_1 audio_track_id_1\r\n"
|
"a=ssrc:1 msid:local_stream_1 audio_track_id_1\r\n"
|
||||||
"a=ssrc:1 mslabel:local_stream_1\r\n"
|
|
||||||
"a=ssrc:1 label:audio_track_id_1\r\n"
|
|
||||||
"m=video 3457 RTP/SAVPF 120\r\n"
|
"m=video 3457 RTP/SAVPF 120\r\n"
|
||||||
"c=IN IP4 74.125.224.39\r\n"
|
"c=IN IP4 74.125.224.39\r\n"
|
||||||
"a=rtcp:3456 IN IP4 74.125.224.39\r\n"
|
"a=rtcp:3456 IN IP4 74.125.224.39\r\n"
|
||||||
|
@ -210,12 +208,8 @@ static const char kSdpFullString[] =
|
||||||
"a=ssrc-group:FEC 2 3\r\n"
|
"a=ssrc-group:FEC 2 3\r\n"
|
||||||
"a=ssrc:2 cname:stream_1_cname\r\n"
|
"a=ssrc:2 cname:stream_1_cname\r\n"
|
||||||
"a=ssrc:2 msid:local_stream_1 video_track_id_1\r\n"
|
"a=ssrc:2 msid:local_stream_1 video_track_id_1\r\n"
|
||||||
"a=ssrc:2 mslabel:local_stream_1\r\n"
|
|
||||||
"a=ssrc:2 label:video_track_id_1\r\n"
|
|
||||||
"a=ssrc:3 cname:stream_1_cname\r\n"
|
"a=ssrc:3 cname:stream_1_cname\r\n"
|
||||||
"a=ssrc:3 msid:local_stream_1 video_track_id_1\r\n"
|
"a=ssrc:3 msid:local_stream_1 video_track_id_1\r\n";
|
||||||
"a=ssrc:3 mslabel:local_stream_1\r\n"
|
|
||||||
"a=ssrc:3 label:video_track_id_1\r\n";
|
|
||||||
|
|
||||||
// SDP reference string without the candidates.
|
// SDP reference string without the candidates.
|
||||||
static const char kSdpString[] =
|
static const char kSdpString[] =
|
||||||
|
@ -240,8 +234,6 @@ static const char kSdpString[] =
|
||||||
"a=rtpmap:104 ISAC/32000\r\n"
|
"a=rtpmap:104 ISAC/32000\r\n"
|
||||||
"a=ssrc:1 cname:stream_1_cname\r\n"
|
"a=ssrc:1 cname:stream_1_cname\r\n"
|
||||||
"a=ssrc:1 msid:local_stream_1 audio_track_id_1\r\n"
|
"a=ssrc:1 msid:local_stream_1 audio_track_id_1\r\n"
|
||||||
"a=ssrc:1 mslabel:local_stream_1\r\n"
|
|
||||||
"a=ssrc:1 label:audio_track_id_1\r\n"
|
|
||||||
"m=video 9 RTP/SAVPF 120\r\n"
|
"m=video 9 RTP/SAVPF 120\r\n"
|
||||||
"c=IN IP4 0.0.0.0\r\n"
|
"c=IN IP4 0.0.0.0\r\n"
|
||||||
"a=rtcp:9 IN IP4 0.0.0.0\r\n"
|
"a=rtcp:9 IN IP4 0.0.0.0\r\n"
|
||||||
|
@ -254,12 +246,8 @@ static const char kSdpString[] =
|
||||||
"a=ssrc-group:FEC 2 3\r\n"
|
"a=ssrc-group:FEC 2 3\r\n"
|
||||||
"a=ssrc:2 cname:stream_1_cname\r\n"
|
"a=ssrc:2 cname:stream_1_cname\r\n"
|
||||||
"a=ssrc:2 msid:local_stream_1 video_track_id_1\r\n"
|
"a=ssrc:2 msid:local_stream_1 video_track_id_1\r\n"
|
||||||
"a=ssrc:2 mslabel:local_stream_1\r\n"
|
|
||||||
"a=ssrc:2 label:video_track_id_1\r\n"
|
|
||||||
"a=ssrc:3 cname:stream_1_cname\r\n"
|
"a=ssrc:3 cname:stream_1_cname\r\n"
|
||||||
"a=ssrc:3 msid:local_stream_1 video_track_id_1\r\n"
|
"a=ssrc:3 msid:local_stream_1 video_track_id_1\r\n";
|
||||||
"a=ssrc:3 mslabel:local_stream_1\r\n"
|
|
||||||
"a=ssrc:3 label:video_track_id_1\r\n";
|
|
||||||
|
|
||||||
static const char kSdpRtpDataChannelString[] =
|
static const char kSdpRtpDataChannelString[] =
|
||||||
"m=application 9 RTP/SAVPF 101\r\n"
|
"m=application 9 RTP/SAVPF 101\r\n"
|
||||||
|
@ -273,9 +261,7 @@ static const char kSdpRtpDataChannelString[] =
|
||||||
"inline:FvLcvU2P3ZWmQxgPAgcDu7Zl9vftYElFOjEzhWs5\r\n"
|
"inline:FvLcvU2P3ZWmQxgPAgcDu7Zl9vftYElFOjEzhWs5\r\n"
|
||||||
"a=rtpmap:101 google-data/90000\r\n"
|
"a=rtpmap:101 google-data/90000\r\n"
|
||||||
"a=ssrc:10 cname:data_channel_cname\r\n"
|
"a=ssrc:10 cname:data_channel_cname\r\n"
|
||||||
"a=ssrc:10 msid:data_channel data_channeld0\r\n"
|
"a=ssrc:10 msid:data_channel data_channeld0\r\n";
|
||||||
"a=ssrc:10 mslabel:data_channel\r\n"
|
|
||||||
"a=ssrc:10 label:data_channeld0\r\n";
|
|
||||||
|
|
||||||
// draft-ietf-mmusic-sctp-sdp-03
|
// draft-ietf-mmusic-sctp-sdp-03
|
||||||
static const char kSdpSctpDataChannelString[] =
|
static const char kSdpSctpDataChannelString[] =
|
||||||
|
@ -350,9 +336,7 @@ static const char kSdpAudioString[] =
|
||||||
"a=sendrecv\r\n"
|
"a=sendrecv\r\n"
|
||||||
"a=rtpmap:111 opus/48000/2\r\n"
|
"a=rtpmap:111 opus/48000/2\r\n"
|
||||||
"a=ssrc:1 cname:stream_1_cname\r\n"
|
"a=ssrc:1 cname:stream_1_cname\r\n"
|
||||||
"a=ssrc:1 msid:local_stream audio_track_id_1\r\n"
|
"a=ssrc:1 msid:local_stream audio_track_id_1\r\n";
|
||||||
"a=ssrc:1 mslabel:local_stream\r\n"
|
|
||||||
"a=ssrc:1 label:audio_track_id_1\r\n";
|
|
||||||
|
|
||||||
static const char kSdpVideoString[] =
|
static const char kSdpVideoString[] =
|
||||||
"m=video 9 RTP/SAVPF 120\r\n"
|
"m=video 9 RTP/SAVPF 120\r\n"
|
||||||
|
@ -363,9 +347,7 @@ static const char kSdpVideoString[] =
|
||||||
"a=sendrecv\r\n"
|
"a=sendrecv\r\n"
|
||||||
"a=rtpmap:120 VP8/90000\r\n"
|
"a=rtpmap:120 VP8/90000\r\n"
|
||||||
"a=ssrc:2 cname:stream_1_cname\r\n"
|
"a=ssrc:2 cname:stream_1_cname\r\n"
|
||||||
"a=ssrc:2 msid:local_stream video_track_id_1\r\n"
|
"a=ssrc:2 msid:local_stream video_track_id_1\r\n";
|
||||||
"a=ssrc:2 mslabel:local_stream\r\n"
|
|
||||||
"a=ssrc:2 label:video_track_id_1\r\n";
|
|
||||||
|
|
||||||
// Reference sdp string using bundle-only.
|
// Reference sdp string using bundle-only.
|
||||||
static const char kBundleOnlySdpFullString[] =
|
static const char kBundleOnlySdpFullString[] =
|
||||||
|
@ -405,8 +387,6 @@ static const char kBundleOnlySdpFullString[] =
|
||||||
"a=rtpmap:104 ISAC/32000\r\n"
|
"a=rtpmap:104 ISAC/32000\r\n"
|
||||||
"a=ssrc:1 cname:stream_1_cname\r\n"
|
"a=ssrc:1 cname:stream_1_cname\r\n"
|
||||||
"a=ssrc:1 msid:local_stream_1 audio_track_id_1\r\n"
|
"a=ssrc:1 msid:local_stream_1 audio_track_id_1\r\n"
|
||||||
"a=ssrc:1 mslabel:local_stream_1\r\n"
|
|
||||||
"a=ssrc:1 label:audio_track_id_1\r\n"
|
|
||||||
"m=video 0 RTP/SAVPF 120\r\n"
|
"m=video 0 RTP/SAVPF 120\r\n"
|
||||||
"c=IN IP4 0.0.0.0\r\n"
|
"c=IN IP4 0.0.0.0\r\n"
|
||||||
"a=rtcp:9 IN IP4 0.0.0.0\r\n"
|
"a=rtcp:9 IN IP4 0.0.0.0\r\n"
|
||||||
|
@ -419,12 +399,8 @@ static const char kBundleOnlySdpFullString[] =
|
||||||
"a=ssrc-group:FEC 2 3\r\n"
|
"a=ssrc-group:FEC 2 3\r\n"
|
||||||
"a=ssrc:2 cname:stream_1_cname\r\n"
|
"a=ssrc:2 cname:stream_1_cname\r\n"
|
||||||
"a=ssrc:2 msid:local_stream_1 video_track_id_1\r\n"
|
"a=ssrc:2 msid:local_stream_1 video_track_id_1\r\n"
|
||||||
"a=ssrc:2 mslabel:local_stream_1\r\n"
|
|
||||||
"a=ssrc:2 label:video_track_id_1\r\n"
|
|
||||||
"a=ssrc:3 cname:stream_1_cname\r\n"
|
"a=ssrc:3 cname:stream_1_cname\r\n"
|
||||||
"a=ssrc:3 msid:local_stream_1 video_track_id_1\r\n"
|
"a=ssrc:3 msid:local_stream_1 video_track_id_1\r\n";
|
||||||
"a=ssrc:3 mslabel:local_stream_1\r\n"
|
|
||||||
"a=ssrc:3 label:video_track_id_1\r\n";
|
|
||||||
|
|
||||||
// Plan B SDP reference string, with 2 streams, 2 audio tracks and 3 video
|
// Plan B SDP reference string, with 2 streams, 2 audio tracks and 3 video
|
||||||
// tracks.
|
// tracks.
|
||||||
|
@ -464,12 +440,8 @@ static const char kPlanBSdpFullString[] =
|
||||||
"a=rtpmap:104 ISAC/32000\r\n"
|
"a=rtpmap:104 ISAC/32000\r\n"
|
||||||
"a=ssrc:1 cname:stream_1_cname\r\n"
|
"a=ssrc:1 cname:stream_1_cname\r\n"
|
||||||
"a=ssrc:1 msid:local_stream_1 audio_track_id_1\r\n"
|
"a=ssrc:1 msid:local_stream_1 audio_track_id_1\r\n"
|
||||||
"a=ssrc:1 mslabel:local_stream_1\r\n"
|
|
||||||
"a=ssrc:1 label:audio_track_id_1\r\n"
|
|
||||||
"a=ssrc:4 cname:stream_2_cname\r\n"
|
"a=ssrc:4 cname:stream_2_cname\r\n"
|
||||||
"a=ssrc:4 msid:local_stream_2 audio_track_id_2\r\n"
|
"a=ssrc:4 msid:local_stream_2 audio_track_id_2\r\n"
|
||||||
"a=ssrc:4 mslabel:local_stream_2\r\n"
|
|
||||||
"a=ssrc:4 label:audio_track_id_2\r\n"
|
|
||||||
"m=video 3457 RTP/SAVPF 120\r\n"
|
"m=video 3457 RTP/SAVPF 120\r\n"
|
||||||
"c=IN IP4 74.125.224.39\r\n"
|
"c=IN IP4 74.125.224.39\r\n"
|
||||||
"a=rtcp:3456 IN IP4 74.125.224.39\r\n"
|
"a=rtcp:3456 IN IP4 74.125.224.39\r\n"
|
||||||
|
@ -494,20 +466,12 @@ static const char kPlanBSdpFullString[] =
|
||||||
"a=ssrc-group:FEC 2 3\r\n"
|
"a=ssrc-group:FEC 2 3\r\n"
|
||||||
"a=ssrc:2 cname:stream_1_cname\r\n"
|
"a=ssrc:2 cname:stream_1_cname\r\n"
|
||||||
"a=ssrc:2 msid:local_stream_1 video_track_id_1\r\n"
|
"a=ssrc:2 msid:local_stream_1 video_track_id_1\r\n"
|
||||||
"a=ssrc:2 mslabel:local_stream_1\r\n"
|
|
||||||
"a=ssrc:2 label:video_track_id_1\r\n"
|
|
||||||
"a=ssrc:3 cname:stream_1_cname\r\n"
|
"a=ssrc:3 cname:stream_1_cname\r\n"
|
||||||
"a=ssrc:3 msid:local_stream_1 video_track_id_1\r\n"
|
"a=ssrc:3 msid:local_stream_1 video_track_id_1\r\n"
|
||||||
"a=ssrc:3 mslabel:local_stream_1\r\n"
|
|
||||||
"a=ssrc:3 label:video_track_id_1\r\n"
|
|
||||||
"a=ssrc:5 cname:stream_2_cname\r\n"
|
"a=ssrc:5 cname:stream_2_cname\r\n"
|
||||||
"a=ssrc:5 msid:local_stream_2 video_track_id_2\r\n"
|
"a=ssrc:5 msid:local_stream_2 video_track_id_2\r\n"
|
||||||
"a=ssrc:5 mslabel:local_stream_2\r\n"
|
|
||||||
"a=ssrc:5 label:video_track_id_2\r\n"
|
|
||||||
"a=ssrc:6 cname:stream_2_cname\r\n"
|
"a=ssrc:6 cname:stream_2_cname\r\n"
|
||||||
"a=ssrc:6 msid:local_stream_2 video_track_id_3\r\n"
|
"a=ssrc:6 msid:local_stream_2 video_track_id_3\r\n";
|
||||||
"a=ssrc:6 mslabel:local_stream_2\r\n"
|
|
||||||
"a=ssrc:6 label:video_track_id_3\r\n";
|
|
||||||
|
|
||||||
// Unified Plan SDP reference string, with 2 streams, 2 audio tracks and 3 video
|
// Unified Plan SDP reference string, with 2 streams, 2 audio tracks and 3 video
|
||||||
// tracks.
|
// tracks.
|
||||||
|
@ -661,8 +625,6 @@ static const char kUnifiedPlanSdpFullStringWithSpecialMsid[] =
|
||||||
"a=rtpmap:104 ISAC/32000\r\n"
|
"a=rtpmap:104 ISAC/32000\r\n"
|
||||||
"a=ssrc:1 cname:stream_1_cname\r\n"
|
"a=ssrc:1 cname:stream_1_cname\r\n"
|
||||||
"a=ssrc:1 msid:local_stream_1 audio_track_id_1\r\n"
|
"a=ssrc:1 msid:local_stream_1 audio_track_id_1\r\n"
|
||||||
"a=ssrc:1 mslabel:local_stream_1\r\n"
|
|
||||||
"a=ssrc:1 label:audio_track_id_1\r\n"
|
|
||||||
// Audio track 2, with two stream ids.
|
// Audio track 2, with two stream ids.
|
||||||
"m=audio 9 RTP/SAVPF 111 103 104\r\n"
|
"m=audio 9 RTP/SAVPF 111 103 104\r\n"
|
||||||
"c=IN IP4 0.0.0.0\r\n"
|
"c=IN IP4 0.0.0.0\r\n"
|
||||||
|
@ -684,8 +646,6 @@ static const char kUnifiedPlanSdpFullStringWithSpecialMsid[] =
|
||||||
// The support for Plan B msid signaling only includes the
|
// The support for Plan B msid signaling only includes the
|
||||||
// first media stream id "local_stream_1."
|
// first media stream id "local_stream_1."
|
||||||
"a=ssrc:4 msid:local_stream_1 audio_track_id_2\r\n"
|
"a=ssrc:4 msid:local_stream_1 audio_track_id_2\r\n"
|
||||||
"a=ssrc:4 mslabel:local_stream_1\r\n"
|
|
||||||
"a=ssrc:4 label:audio_track_id_2\r\n"
|
|
||||||
// Audio track 3, with no stream ids.
|
// Audio track 3, with no stream ids.
|
||||||
"m=audio 9 RTP/SAVPF 111 103 104\r\n"
|
"m=audio 9 RTP/SAVPF 111 103 104\r\n"
|
||||||
"c=IN IP4 0.0.0.0\r\n"
|
"c=IN IP4 0.0.0.0\r\n"
|
||||||
|
@ -703,9 +663,7 @@ static const char kUnifiedPlanSdpFullStringWithSpecialMsid[] =
|
||||||
"a=rtpmap:103 ISAC/16000\r\n"
|
"a=rtpmap:103 ISAC/16000\r\n"
|
||||||
"a=rtpmap:104 ISAC/32000\r\n"
|
"a=rtpmap:104 ISAC/32000\r\n"
|
||||||
"a=ssrc:7 cname:stream_2_cname\r\n"
|
"a=ssrc:7 cname:stream_2_cname\r\n"
|
||||||
"a=ssrc:7 msid:- audio_track_id_3\r\n"
|
"a=ssrc:7 msid:- audio_track_id_3\r\n";
|
||||||
"a=ssrc:7 mslabel:-\r\n"
|
|
||||||
"a=ssrc:7 label:audio_track_id_3\r\n";
|
|
||||||
|
|
||||||
// SDP string for unified plan without SSRCs
|
// SDP string for unified plan without SSRCs
|
||||||
static const char kUnifiedPlanSdpFullStringNoSsrc[] =
|
static const char kUnifiedPlanSdpFullStringNoSsrc[] =
|
||||||
|
@ -2749,21 +2707,6 @@ TEST_F(WebRtcSdpTest, DeserializeSessionDescriptionWithRejectedAudioVideo) {
|
||||||
EXPECT_TRUE(TestDeserializeRejected(true, true));
|
EXPECT_TRUE(TestDeserializeRejected(true, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tests that we can still handle the sdp uses mslabel and label instead of
|
|
||||||
// msid for backward compatibility.
|
|
||||||
TEST_F(WebRtcSdpTest, DeserializeSessionDescriptionWithoutMsid) {
|
|
||||||
jdesc_.description()->set_msid_supported(false);
|
|
||||||
JsepSessionDescription jdesc(kDummyType);
|
|
||||||
std::string sdp_without_msid = kSdpFullString;
|
|
||||||
Replace("msid", "xmsid", &sdp_without_msid);
|
|
||||||
// Deserialize
|
|
||||||
EXPECT_TRUE(SdpDeserialize(sdp_without_msid, &jdesc));
|
|
||||||
// Verify
|
|
||||||
EXPECT_TRUE(CompareSessionDescription(jdesc_, jdesc));
|
|
||||||
EXPECT_FALSE(jdesc.description()->msid_signaling() &
|
|
||||||
~cricket::kMsidSignalingSsrcAttribute);
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(WebRtcSdpTest, DeserializeSessionDescriptionWithExtmapAllowMixed) {
|
TEST_F(WebRtcSdpTest, DeserializeSessionDescriptionWithExtmapAllowMixed) {
|
||||||
jdesc_.description()->set_extmap_allow_mixed(true);
|
jdesc_.description()->set_extmap_allow_mixed(true);
|
||||||
std::string sdp_with_extmap_allow_mixed = kSdpFullString;
|
std::string sdp_with_extmap_allow_mixed = kSdpFullString;
|
||||||
|
@ -3222,7 +3165,7 @@ TEST_F(WebRtcSdpTest, DeserializeSessionDescriptionWithoutEndLineBreak) {
|
||||||
// Deserialize
|
// Deserialize
|
||||||
SdpParseError error;
|
SdpParseError error;
|
||||||
EXPECT_FALSE(webrtc::SdpDeserialize(sdp, &jdesc, &error));
|
EXPECT_FALSE(webrtc::SdpDeserialize(sdp, &jdesc, &error));
|
||||||
const std::string lastline = "a=ssrc:3 label:video_track_id_1";
|
const std::string lastline = "a=ssrc:3 msid:local_stream_1 video_track_id_1";
|
||||||
EXPECT_EQ(lastline, error.line);
|
EXPECT_EQ(lastline, error.line);
|
||||||
EXPECT_EQ("Invalid SDP line.", error.description);
|
EXPECT_EQ("Invalid SDP line.", error.description);
|
||||||
}
|
}
|
||||||
|
@ -4344,15 +4287,16 @@ TEST_F(WebRtcSdpTest, DeserializeEmptySessionName) {
|
||||||
|
|
||||||
// Simulcast malformed input test for invalid format.
|
// Simulcast malformed input test for invalid format.
|
||||||
TEST_F(WebRtcSdpTest, DeserializeSimulcastNegative_EmptyAttribute) {
|
TEST_F(WebRtcSdpTest, DeserializeSimulcastNegative_EmptyAttribute) {
|
||||||
ExpectParseFailureWithNewLines("a=ssrc:3 label:video_track_id_1\r\n",
|
ExpectParseFailureWithNewLines(
|
||||||
"a=simulcast:\r\n", "a=simulcast:");
|
"a=ssrc:3 msid:local_stream_1 video_track_id_1\r\n", "a=simulcast:\r\n",
|
||||||
|
"a=simulcast:");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tests that duplicate simulcast entries in the SDP triggers a parse failure.
|
// Tests that duplicate simulcast entries in the SDP triggers a parse failure.
|
||||||
TEST_F(WebRtcSdpTest, DeserializeSimulcastNegative_DuplicateAttribute) {
|
TEST_F(WebRtcSdpTest, DeserializeSimulcastNegative_DuplicateAttribute) {
|
||||||
ExpectParseFailureWithNewLines("a=ssrc:3 label:video_track_id_1\r\n",
|
ExpectParseFailureWithNewLines(
|
||||||
"a=simulcast:send 1\r\na=simulcast:recv 2\r\n",
|
"a=ssrc:3 msid:local_stream_1 video_track_id_1\r\n",
|
||||||
"a=simulcast:");
|
"a=simulcast:send 1\r\na=simulcast:recv 2\r\n", "a=simulcast:");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validates that deserialization uses the a=simulcast: attribute
|
// Validates that deserialization uses the a=simulcast: attribute
|
||||||
|
@ -4690,3 +4634,13 @@ TEST_F(WebRtcSdpTest, DeserializeSessionDescriptionWithoutCname) {
|
||||||
jdesc_.session_version()));
|
jdesc_.session_version()));
|
||||||
EXPECT_TRUE(CompareSessionDescription(jdesc_, new_jdesc));
|
EXPECT_TRUE(CompareSessionDescription(jdesc_, new_jdesc));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This tests parsing of SDP with unknown ssrc-specific attributes.
|
||||||
|
TEST_F(WebRtcSdpTest, ParseIgnoreUnknownSsrcSpecificAttribute) {
|
||||||
|
std::string sdp = kSdpString;
|
||||||
|
sdp += "a=ssrc:1 mslabel:something\r\n";
|
||||||
|
|
||||||
|
JsepSessionDescription output(kDummyType);
|
||||||
|
SdpParseError error;
|
||||||
|
ASSERT_TRUE(webrtc::SdpDeserialize(sdp, &output, &error));
|
||||||
|
}
|
||||||
|
|
|
@ -90,8 +90,6 @@
|
||||||
"a=maxptime:60\r\n"
|
"a=maxptime:60\r\n"
|
||||||
"a=ssrc:1504474588 cname:V+FdIC5AJpxLhdYQ\r\n"
|
"a=ssrc:1504474588 cname:V+FdIC5AJpxLhdYQ\r\n"
|
||||||
"a=ssrc:1504474588 msid:ARDAMS ARDAMSa0\r\n"
|
"a=ssrc:1504474588 msid:ARDAMS ARDAMSa0\r\n"
|
||||||
"a=ssrc:1504474588 mslabel:ARDAMS\r\n"
|
|
||||||
"a=ssrc:1504474588 label:ARDAMSa0\r\n"
|
|
||||||
"m=video 9 UDP/TLS/RTP/SAVPF 100 116 117 96\r\n"
|
"m=video 9 UDP/TLS/RTP/SAVPF 100 116 117 96\r\n"
|
||||||
"c=IN IP4 0.0.0.0\r\n"
|
"c=IN IP4 0.0.0.0\r\n"
|
||||||
"a=rtcp:9 IN IP4 0.0.0.0\r\n"
|
"a=rtcp:9 IN IP4 0.0.0.0\r\n"
|
||||||
|
@ -120,12 +118,8 @@
|
||||||
"a=ssrc-group:FID 498297514 1644357692\r\n"
|
"a=ssrc-group:FID 498297514 1644357692\r\n"
|
||||||
"a=ssrc:498297514 cname:V+FdIC5AJpxLhdYQ\r\n"
|
"a=ssrc:498297514 cname:V+FdIC5AJpxLhdYQ\r\n"
|
||||||
"a=ssrc:498297514 msid:ARDAMS ARDAMSv0\r\n"
|
"a=ssrc:498297514 msid:ARDAMS ARDAMSv0\r\n"
|
||||||
"a=ssrc:498297514 mslabel:ARDAMS\r\n"
|
|
||||||
"a=ssrc:498297514 label:ARDAMSv0\r\n"
|
|
||||||
"a=ssrc:1644357692 cname:V+FdIC5AJpxLhdYQ\r\n"
|
"a=ssrc:1644357692 cname:V+FdIC5AJpxLhdYQ\r\n"
|
||||||
"a=ssrc:1644357692 msid:ARDAMS ARDAMSv0\r\n"
|
"a=ssrc:1644357692 msid:ARDAMS ARDAMSv0\r\n";
|
||||||
"a=ssrc:1644357692 mslabel:ARDAMS\r\n"
|
|
||||||
"a=ssrc:1644357692 label:ARDAMSv0\r\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in a new issue