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

Side by Side Diff: logging/rtc_event_log/rtc_event_log_unittest_helper.cc

Issue 2826263004: Move responsibility for RTP header extensions on video receive. (Closed)
Patch Set: Crude rebase. Created 3 years, 2 months 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
« no previous file with comments | « logging/rtc_event_log/rtc_event_log_unittest.cc ('k') | media/base/mediachannel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 EXPECT_EQ(config.rtx_ssrc, rtx_config.rtx_ssrc()); 208 EXPECT_EQ(config.rtx_ssrc, rtx_config.rtx_ssrc());
209 auto codec_found = 209 auto codec_found =
210 std::find_if(config.codecs.begin(), config.codecs.end(), 210 std::find_if(config.codecs.begin(), config.codecs.end(),
211 [&rtx_map](const rtclog::StreamConfig::Codec& codec) { 211 [&rtx_map](const rtclog::StreamConfig::Codec& codec) {
212 return rtx_map.payload_type() == codec.payload_type; 212 return rtx_map.payload_type() == codec.payload_type;
213 }); 213 });
214 ASSERT_TRUE(codec_found != config.codecs.end()); 214 ASSERT_TRUE(codec_found != config.codecs.end());
215 EXPECT_EQ(rtx_config.rtx_payload_type(), codec_found->rtx_payload_type); 215 EXPECT_EQ(rtx_config.rtx_payload_type(), codec_found->rtx_payload_type);
216 } 216 }
217 #if 0
217 // Check header extensions. 218 // Check header extensions.
218 ASSERT_EQ(static_cast<int>(config.rtp_extensions.size()), 219 ASSERT_EQ(static_cast<int>(config.rtp_extensions.size()),
219 receiver_config.header_extensions_size()); 220 receiver_config.header_extensions_size());
220 for (int i = 0; i < receiver_config.header_extensions_size(); i++) { 221 for (int i = 0; i < receiver_config.header_extensions_size(); i++) {
221 ASSERT_TRUE(receiver_config.header_extensions(i).has_name()); 222 ASSERT_TRUE(receiver_config.header_extensions(i).has_name());
222 ASSERT_TRUE(receiver_config.header_extensions(i).has_id()); 223 ASSERT_TRUE(receiver_config.header_extensions(i).has_id());
223 const std::string& name = receiver_config.header_extensions(i).name(); 224 const std::string& name = receiver_config.header_extensions(i).name();
224 int id = receiver_config.header_extensions(i).id(); 225 int id = receiver_config.header_extensions(i).id();
225 EXPECT_EQ(config.rtp_extensions[i].id, id); 226 EXPECT_EQ(config.rtp_extensions[i].id, id);
226 EXPECT_EQ(config.rtp_extensions[i].uri, name); 227 EXPECT_EQ(config.rtp_extensions[i].uri, name);
227 } 228 }
229 #endif
228 // Check decoders. 230 // Check decoders.
229 ASSERT_EQ(static_cast<int>(config.codecs.size()), 231 ASSERT_EQ(static_cast<int>(config.codecs.size()),
230 receiver_config.decoders_size()); 232 receiver_config.decoders_size());
231 for (int i = 0; i < receiver_config.decoders_size(); i++) { 233 for (int i = 0; i < receiver_config.decoders_size(); i++) {
232 ASSERT_TRUE(receiver_config.decoders(i).has_name()); 234 ASSERT_TRUE(receiver_config.decoders(i).has_name());
233 ASSERT_TRUE(receiver_config.decoders(i).has_payload_type()); 235 ASSERT_TRUE(receiver_config.decoders(i).has_payload_type());
234 const std::string& decoder_name = receiver_config.decoders(i).name(); 236 const std::string& decoder_name = receiver_config.decoders(i).name();
235 int decoder_type = receiver_config.decoders(i).payload_type(); 237 int decoder_type = receiver_config.decoders(i).payload_type();
236 EXPECT_EQ(config.codecs[i].payload_name, decoder_name); 238 EXPECT_EQ(config.codecs[i].payload_name, decoder_name);
237 EXPECT_EQ(config.codecs[i].payload_type, decoder_type); 239 EXPECT_EQ(config.codecs[i].payload_type, decoder_type);
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 ASSERT_TRUE(bwe_event.has_id()); 566 ASSERT_TRUE(bwe_event.has_id());
565 EXPECT_EQ(id, bwe_event.id()); 567 EXPECT_EQ(id, bwe_event.id());
566 ASSERT_TRUE(bwe_event.has_result()); 568 ASSERT_TRUE(bwe_event.has_result());
567 EXPECT_EQ(GetProbeResultType(failure_reason), bwe_event.result()); 569 EXPECT_EQ(GetProbeResultType(failure_reason), bwe_event.result());
568 ASSERT_FALSE(bwe_event.has_bitrate_bps()); 570 ASSERT_FALSE(bwe_event.has_bitrate_bps());
569 571
570 // TODO(philipel): Verify the parser when parsing has been implemented. 572 // TODO(philipel): Verify the parser when parsing has been implemented.
571 } 573 }
572 574
573 } // namespace webrtc 575 } // namespace webrtc
OLDNEW
« no previous file with comments | « logging/rtc_event_log/rtc_event_log_unittest.cc ('k') | media/base/mediachannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698