Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(949)

Side by Side Diff: webrtc/api/peerconnectioninterface_unittest.cc

Issue 2043193003: Make the default value of rtcp-mux policy to required. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merge with new changes. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 "o=- 0 0 IN IP4 127.0.0.1\r\n" 72 "o=- 0 0 IN IP4 127.0.0.1\r\n"
73 "s=-\r\n" 73 "s=-\r\n"
74 "t=0 0\r\n" 74 "t=0 0\r\n"
75 "a=ice-ufrag:e5785931\r\n" 75 "a=ice-ufrag:e5785931\r\n"
76 "a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n" 76 "a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n"
77 "a=fingerprint:sha-256 58:AB:6E:F5:F1:E4:57:B7:E9:46:F4:86:04:28:F9:A7:ED:" 77 "a=fingerprint:sha-256 58:AB:6E:F5:F1:E4:57:B7:E9:46:F4:86:04:28:F9:A7:ED:"
78 "BD:AB:AE:40:EF:CE:9A:51:2C:2A:B1:9B:8B:78:84\r\n" 78 "BD:AB:AE:40:EF:CE:9A:51:2C:2A:B1:9B:8B:78:84\r\n"
79 "m=audio 1 RTP/AVPF 103\r\n" 79 "m=audio 1 RTP/AVPF 103\r\n"
80 "a=mid:audio\r\n" 80 "a=mid:audio\r\n"
81 "a=sendrecv\r\n" 81 "a=sendrecv\r\n"
82 "a=rtcp-mux\r\n"
82 "a=rtpmap:103 ISAC/16000\r\n" 83 "a=rtpmap:103 ISAC/16000\r\n"
83 "a=ssrc:1 cname:stream1\r\n" 84 "a=ssrc:1 cname:stream1\r\n"
84 "a=ssrc:1 mslabel:stream1\r\n" 85 "a=ssrc:1 mslabel:stream1\r\n"
85 "a=ssrc:1 label:audiotrack0\r\n" 86 "a=ssrc:1 label:audiotrack0\r\n"
86 "m=video 1 RTP/AVPF 120\r\n" 87 "m=video 1 RTP/AVPF 120\r\n"
87 "a=mid:video\r\n" 88 "a=mid:video\r\n"
88 "a=sendrecv\r\n" 89 "a=sendrecv\r\n"
90 "a=rtcp-mux\r\n"
89 "a=rtpmap:120 VP8/90000\r\n" 91 "a=rtpmap:120 VP8/90000\r\n"
90 "a=ssrc:2 cname:stream1\r\n" 92 "a=ssrc:2 cname:stream1\r\n"
91 "a=ssrc:2 mslabel:stream1\r\n" 93 "a=ssrc:2 mslabel:stream1\r\n"
92 "a=ssrc:2 label:videotrack0\r\n"; 94 "a=ssrc:2 label:videotrack0\r\n";
93 95
94 // Reference SDP with a MediaStream with label "stream1" and audio track with 96 // Reference SDP with a MediaStream with label "stream1" and audio track with
95 // id "audio_1"; 97 // id "audio_1";
96 static const char kSdpStringWithStream1AudioTrackOnly[] = 98 static const char kSdpStringWithStream1AudioTrackOnly[] =
97 "v=0\r\n" 99 "v=0\r\n"
98 "o=- 0 0 IN IP4 127.0.0.1\r\n" 100 "o=- 0 0 IN IP4 127.0.0.1\r\n"
99 "s=-\r\n" 101 "s=-\r\n"
100 "t=0 0\r\n" 102 "t=0 0\r\n"
101 "a=ice-ufrag:e5785931\r\n" 103 "a=ice-ufrag:e5785931\r\n"
102 "a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n" 104 "a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n"
103 "a=fingerprint:sha-256 58:AB:6E:F5:F1:E4:57:B7:E9:46:F4:86:04:28:F9:A7:ED:" 105 "a=fingerprint:sha-256 58:AB:6E:F5:F1:E4:57:B7:E9:46:F4:86:04:28:F9:A7:ED:"
104 "BD:AB:AE:40:EF:CE:9A:51:2C:2A:B1:9B:8B:78:84\r\n" 106 "BD:AB:AE:40:EF:CE:9A:51:2C:2A:B1:9B:8B:78:84\r\n"
105 "m=audio 1 RTP/AVPF 103\r\n" 107 "m=audio 1 RTP/AVPF 103\r\n"
106 "a=mid:audio\r\n" 108 "a=mid:audio\r\n"
107 "a=sendrecv\r\n" 109 "a=sendrecv\r\n"
108 "a=rtpmap:103 ISAC/16000\r\n" 110 "a=rtpmap:103 ISAC/16000\r\n"
109 "a=ssrc:1 cname:stream1\r\n" 111 "a=ssrc:1 cname:stream1\r\n"
110 "a=ssrc:1 mslabel:stream1\r\n" 112 "a=ssrc:1 mslabel:stream1\r\n"
111 "a=ssrc:1 label:audiotrack0\r\n"; 113 "a=ssrc:1 label:audiotrack0\r\n"
114 "a=rtcp-mux\r\n";
112 115
113 // Reference SDP with two MediaStreams with label "stream1" and "stream2. Each 116 // Reference SDP with two MediaStreams with label "stream1" and "stream2. Each
114 // MediaStreams have one audio track and one video track. 117 // MediaStreams have one audio track and one video track.
115 // This uses MSID. 118 // This uses MSID.
116 static const char kSdpStringWithStream1And2[] = 119 static const char kSdpStringWithStream1And2[] =
117 "v=0\r\n" 120 "v=0\r\n"
118 "o=- 0 0 IN IP4 127.0.0.1\r\n" 121 "o=- 0 0 IN IP4 127.0.0.1\r\n"
119 "s=-\r\n" 122 "s=-\r\n"
120 "t=0 0\r\n" 123 "t=0 0\r\n"
121 "a=ice-ufrag:e5785931\r\n" 124 "a=ice-ufrag:e5785931\r\n"
122 "a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n" 125 "a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n"
123 "a=fingerprint:sha-256 58:AB:6E:F5:F1:E4:57:B7:E9:46:F4:86:04:28:F9:A7:ED:" 126 "a=fingerprint:sha-256 58:AB:6E:F5:F1:E4:57:B7:E9:46:F4:86:04:28:F9:A7:ED:"
124 "BD:AB:AE:40:EF:CE:9A:51:2C:2A:B1:9B:8B:78:84\r\n" 127 "BD:AB:AE:40:EF:CE:9A:51:2C:2A:B1:9B:8B:78:84\r\n"
125 "a=msid-semantic: WMS stream1 stream2\r\n" 128 "a=msid-semantic: WMS stream1 stream2\r\n"
126 "m=audio 1 RTP/AVPF 103\r\n" 129 "m=audio 1 RTP/AVPF 103\r\n"
127 "a=mid:audio\r\n" 130 "a=mid:audio\r\n"
128 "a=sendrecv\r\n" 131 "a=sendrecv\r\n"
132 "a=rtcp-mux\r\n"
129 "a=rtpmap:103 ISAC/16000\r\n" 133 "a=rtpmap:103 ISAC/16000\r\n"
130 "a=ssrc:1 cname:stream1\r\n" 134 "a=ssrc:1 cname:stream1\r\n"
131 "a=ssrc:1 msid:stream1 audiotrack0\r\n" 135 "a=ssrc:1 msid:stream1 audiotrack0\r\n"
132 "a=ssrc:3 cname:stream2\r\n" 136 "a=ssrc:3 cname:stream2\r\n"
133 "a=ssrc:3 msid:stream2 audiotrack1\r\n" 137 "a=ssrc:3 msid:stream2 audiotrack1\r\n"
134 "m=video 1 RTP/AVPF 120\r\n" 138 "m=video 1 RTP/AVPF 120\r\n"
135 "a=mid:video\r\n" 139 "a=mid:video\r\n"
136 "a=sendrecv\r\n" 140 "a=sendrecv\r\n"
141 "a=rtcp-mux\r\n"
137 "a=rtpmap:120 VP8/0\r\n" 142 "a=rtpmap:120 VP8/0\r\n"
138 "a=ssrc:2 cname:stream1\r\n" 143 "a=ssrc:2 cname:stream1\r\n"
139 "a=ssrc:2 msid:stream1 videotrack0\r\n" 144 "a=ssrc:2 msid:stream1 videotrack0\r\n"
140 "a=ssrc:4 cname:stream2\r\n" 145 "a=ssrc:4 cname:stream2\r\n"
141 "a=ssrc:4 msid:stream2 videotrack1\r\n"; 146 "a=ssrc:4 msid:stream2 videotrack1\r\n";
142 147
143 // Reference SDP without MediaStreams. Msid is not supported. 148 // Reference SDP without MediaStreams. Msid is not supported.
144 static const char kSdpStringWithoutStreams[] = 149 static const char kSdpStringWithoutStreams[] =
145 "v=0\r\n" 150 "v=0\r\n"
146 "o=- 0 0 IN IP4 127.0.0.1\r\n" 151 "o=- 0 0 IN IP4 127.0.0.1\r\n"
147 "s=-\r\n" 152 "s=-\r\n"
148 "t=0 0\r\n" 153 "t=0 0\r\n"
149 "a=ice-ufrag:e5785931\r\n" 154 "a=ice-ufrag:e5785931\r\n"
150 "a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n" 155 "a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n"
151 "a=fingerprint:sha-256 58:AB:6E:F5:F1:E4:57:B7:E9:46:F4:86:04:28:F9:A7:ED:" 156 "a=fingerprint:sha-256 58:AB:6E:F5:F1:E4:57:B7:E9:46:F4:86:04:28:F9:A7:ED:"
152 "BD:AB:AE:40:EF:CE:9A:51:2C:2A:B1:9B:8B:78:84\r\n" 157 "BD:AB:AE:40:EF:CE:9A:51:2C:2A:B1:9B:8B:78:84\r\n"
153 "m=audio 1 RTP/AVPF 103\r\n" 158 "m=audio 1 RTP/AVPF 103\r\n"
154 "a=mid:audio\r\n" 159 "a=mid:audio\r\n"
155 "a=sendrecv\r\n" 160 "a=sendrecv\r\n"
161 "a=rtcp-mux\r\n"
156 "a=rtpmap:103 ISAC/16000\r\n" 162 "a=rtpmap:103 ISAC/16000\r\n"
157 "m=video 1 RTP/AVPF 120\r\n" 163 "m=video 1 RTP/AVPF 120\r\n"
158 "a=mid:video\r\n" 164 "a=mid:video\r\n"
159 "a=sendrecv\r\n" 165 "a=sendrecv\r\n"
166 "a=rtcp-mux\r\n"
160 "a=rtpmap:120 VP8/90000\r\n"; 167 "a=rtpmap:120 VP8/90000\r\n";
161 168
162 // Reference SDP without MediaStreams. Msid is supported. 169 // Reference SDP without MediaStreams. Msid is supported.
163 static const char kSdpStringWithMsidWithoutStreams[] = 170 static const char kSdpStringWithMsidWithoutStreams[] =
164 "v=0\r\n" 171 "v=0\r\n"
165 "o=- 0 0 IN IP4 127.0.0.1\r\n" 172 "o=- 0 0 IN IP4 127.0.0.1\r\n"
166 "s=-\r\n" 173 "s=-\r\n"
167 "t=0 0\r\n" 174 "t=0 0\r\n"
168 "a=ice-ufrag:e5785931\r\n" 175 "a=ice-ufrag:e5785931\r\n"
169 "a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n" 176 "a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n"
170 "a=fingerprint:sha-256 58:AB:6E:F5:F1:E4:57:B7:E9:46:F4:86:04:28:F9:A7:ED:" 177 "a=fingerprint:sha-256 58:AB:6E:F5:F1:E4:57:B7:E9:46:F4:86:04:28:F9:A7:ED:"
171 "BD:AB:AE:40:EF:CE:9A:51:2C:2A:B1:9B:8B:78:84\r\n" 178 "BD:AB:AE:40:EF:CE:9A:51:2C:2A:B1:9B:8B:78:84\r\n"
172 "a=msid-semantic: WMS\r\n" 179 "a=msid-semantic: WMS\r\n"
173 "m=audio 1 RTP/AVPF 103\r\n" 180 "m=audio 1 RTP/AVPF 103\r\n"
174 "a=mid:audio\r\n" 181 "a=mid:audio\r\n"
175 "a=sendrecv\r\n" 182 "a=sendrecv\r\n"
183 "a=rtcp-mux\r\n"
176 "a=rtpmap:103 ISAC/16000\r\n" 184 "a=rtpmap:103 ISAC/16000\r\n"
177 "m=video 1 RTP/AVPF 120\r\n" 185 "m=video 1 RTP/AVPF 120\r\n"
178 "a=mid:video\r\n" 186 "a=mid:video\r\n"
179 "a=sendrecv\r\n" 187 "a=sendrecv\r\n"
188 "a=rtcp-mux\r\n"
180 "a=rtpmap:120 VP8/90000\r\n"; 189 "a=rtpmap:120 VP8/90000\r\n";
181 190
182 // Reference SDP without MediaStreams and audio only. 191 // Reference SDP without MediaStreams and audio only.
183 static const char kSdpStringWithoutStreamsAudioOnly[] = 192 static const char kSdpStringWithoutStreamsAudioOnly[] =
184 "v=0\r\n" 193 "v=0\r\n"
185 "o=- 0 0 IN IP4 127.0.0.1\r\n" 194 "o=- 0 0 IN IP4 127.0.0.1\r\n"
186 "s=-\r\n" 195 "s=-\r\n"
187 "t=0 0\r\n" 196 "t=0 0\r\n"
188 "a=ice-ufrag:e5785931\r\n" 197 "a=ice-ufrag:e5785931\r\n"
189 "a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n" 198 "a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n"
190 "a=fingerprint:sha-256 58:AB:6E:F5:F1:E4:57:B7:E9:46:F4:86:04:28:F9:A7:ED:" 199 "a=fingerprint:sha-256 58:AB:6E:F5:F1:E4:57:B7:E9:46:F4:86:04:28:F9:A7:ED:"
191 "BD:AB:AE:40:EF:CE:9A:51:2C:2A:B1:9B:8B:78:84\r\n" 200 "BD:AB:AE:40:EF:CE:9A:51:2C:2A:B1:9B:8B:78:84\r\n"
192 "m=audio 1 RTP/AVPF 103\r\n" 201 "m=audio 1 RTP/AVPF 103\r\n"
193 "a=mid:audio\r\n" 202 "a=mid:audio\r\n"
194 "a=sendrecv\r\n" 203 "a=sendrecv\r\n"
204 "a=rtcp-mux\r\n"
195 "a=rtpmap:103 ISAC/16000\r\n"; 205 "a=rtpmap:103 ISAC/16000\r\n";
196 206
197 // Reference SENDONLY SDP without MediaStreams. Msid is not supported. 207 // Reference SENDONLY SDP without MediaStreams. Msid is not supported.
198 static const char kSdpStringSendOnlyWithoutStreams[] = 208 static const char kSdpStringSendOnlyWithoutStreams[] =
199 "v=0\r\n" 209 "v=0\r\n"
200 "o=- 0 0 IN IP4 127.0.0.1\r\n" 210 "o=- 0 0 IN IP4 127.0.0.1\r\n"
201 "s=-\r\n" 211 "s=-\r\n"
202 "t=0 0\r\n" 212 "t=0 0\r\n"
203 "a=ice-ufrag:e5785931\r\n" 213 "a=ice-ufrag:e5785931\r\n"
204 "a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n" 214 "a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n"
205 "a=fingerprint:sha-256 58:AB:6E:F5:F1:E4:57:B7:E9:46:F4:86:04:28:F9:A7:ED:" 215 "a=fingerprint:sha-256 58:AB:6E:F5:F1:E4:57:B7:E9:46:F4:86:04:28:F9:A7:ED:"
206 "BD:AB:AE:40:EF:CE:9A:51:2C:2A:B1:9B:8B:78:84\r\n" 216 "BD:AB:AE:40:EF:CE:9A:51:2C:2A:B1:9B:8B:78:84\r\n"
207 "m=audio 1 RTP/AVPF 103\r\n" 217 "m=audio 1 RTP/AVPF 103\r\n"
208 "a=mid:audio\r\n" 218 "a=mid:audio\r\n"
209 "a=sendrecv\r\n" 219 "a=sendrecv\r\n"
210 "a=sendonly\r\n" 220 "a=sendonly\r\n"
221 "a=rtcp-mux\r\n"
211 "a=rtpmap:103 ISAC/16000\r\n" 222 "a=rtpmap:103 ISAC/16000\r\n"
212 "m=video 1 RTP/AVPF 120\r\n" 223 "m=video 1 RTP/AVPF 120\r\n"
213 "a=mid:video\r\n" 224 "a=mid:video\r\n"
214 "a=sendrecv\r\n" 225 "a=sendrecv\r\n"
215 "a=sendonly\r\n" 226 "a=sendonly\r\n"
227 "a=rtcp-mux\r\n"
216 "a=rtpmap:120 VP8/90000\r\n"; 228 "a=rtpmap:120 VP8/90000\r\n";
217 229
218 static const char kSdpStringInit[] = 230 static const char kSdpStringInit[] =
219 "v=0\r\n" 231 "v=0\r\n"
220 "o=- 0 0 IN IP4 127.0.0.1\r\n" 232 "o=- 0 0 IN IP4 127.0.0.1\r\n"
221 "s=-\r\n" 233 "s=-\r\n"
222 "t=0 0\r\n" 234 "t=0 0\r\n"
223 "a=ice-ufrag:e5785931\r\n" 235 "a=ice-ufrag:e5785931\r\n"
224 "a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n" 236 "a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n"
225 "a=fingerprint:sha-256 58:AB:6E:F5:F1:E4:57:B7:E9:46:F4:86:04:28:F9:A7:ED:" 237 "a=fingerprint:sha-256 58:AB:6E:F5:F1:E4:57:B7:E9:46:F4:86:04:28:F9:A7:ED:"
226 "BD:AB:AE:40:EF:CE:9A:51:2C:2A:B1:9B:8B:78:84\r\n" 238 "BD:AB:AE:40:EF:CE:9A:51:2C:2A:B1:9B:8B:78:84\r\n"
227 "a=msid-semantic: WMS\r\n"; 239 "a=msid-semantic: WMS\r\n";
228 240
229 static const char kSdpStringAudio[] = 241 static const char kSdpStringAudio[] =
230 "m=audio 1 RTP/AVPF 103\r\n" 242 "m=audio 1 RTP/AVPF 103\r\n"
231 "a=mid:audio\r\n" 243 "a=mid:audio\r\n"
232 "a=sendrecv\r\n" 244 "a=sendrecv\r\n"
245 "a=rtcp-mux\r\n"
233 "a=rtpmap:103 ISAC/16000\r\n"; 246 "a=rtpmap:103 ISAC/16000\r\n";
234 247
235 static const char kSdpStringVideo[] = 248 static const char kSdpStringVideo[] =
236 "m=video 1 RTP/AVPF 120\r\n" 249 "m=video 1 RTP/AVPF 120\r\n"
237 "a=mid:video\r\n" 250 "a=mid:video\r\n"
238 "a=sendrecv\r\n" 251 "a=sendrecv\r\n"
252 "a=rtcp-mux\r\n"
239 "a=rtpmap:120 VP8/90000\r\n"; 253 "a=rtpmap:120 VP8/90000\r\n";
240 254
241 static const char kSdpStringMs1Audio0[] = 255 static const char kSdpStringMs1Audio0[] =
242 "a=ssrc:1 cname:stream1\r\n" 256 "a=ssrc:1 cname:stream1\r\n"
243 "a=ssrc:1 msid:stream1 audiotrack0\r\n"; 257 "a=ssrc:1 msid:stream1 audiotrack0\r\n";
244 258
245 static const char kSdpStringMs1Video0[] = 259 static const char kSdpStringMs1Video0[] =
246 "a=ssrc:2 cname:stream1\r\n" 260 "a=ssrc:2 cname:stream1\r\n"
247 "a=ssrc:2 msid:stream1 videotrack0\r\n"; 261 "a=ssrc:2 msid:stream1 videotrack0\r\n";
248 262
(...skipping 2718 matching lines...) Expand 10 before | Expand all | Expand 10 after
2967 FakeConstraints updated_answer_c; 2981 FakeConstraints updated_answer_c;
2968 answer_c.SetMandatoryReceiveAudio(false); 2982 answer_c.SetMandatoryReceiveAudio(false);
2969 answer_c.SetMandatoryReceiveVideo(false); 2983 answer_c.SetMandatoryReceiveVideo(false);
2970 2984
2971 cricket::MediaSessionOptions updated_answer_options; 2985 cricket::MediaSessionOptions updated_answer_options;
2972 EXPECT_TRUE( 2986 EXPECT_TRUE(
2973 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); 2987 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options));
2974 EXPECT_TRUE(updated_answer_options.has_audio()); 2988 EXPECT_TRUE(updated_answer_options.has_audio());
2975 EXPECT_TRUE(updated_answer_options.has_video()); 2989 EXPECT_TRUE(updated_answer_options.has_video());
2976 } 2990 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698