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

Side by Side Diff: logging/rtc_event_log/rtc_event_log_parser.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 | « call/video_receive_stream.cc ('k') | logging/rtc_event_log/rtc_event_log_unittest.cc » ('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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 // Get RTX map. 379 // Get RTX map.
380 std::map<uint32_t, const rtclog::RtxConfig> rtx_map; 380 std::map<uint32_t, const rtclog::RtxConfig> rtx_map;
381 for (int i = 0; i < receiver_config.rtx_map_size(); i++) { 381 for (int i = 0; i < receiver_config.rtx_map_size(); i++) {
382 const rtclog::RtxMap& map = receiver_config.rtx_map(i); 382 const rtclog::RtxMap& map = receiver_config.rtx_map(i);
383 RTC_CHECK(map.has_payload_type()); 383 RTC_CHECK(map.has_payload_type());
384 RTC_CHECK(map.has_config()); 384 RTC_CHECK(map.has_config());
385 RTC_CHECK(map.config().has_rtx_ssrc()); 385 RTC_CHECK(map.config().has_rtx_ssrc());
386 RTC_CHECK(map.config().has_rtx_payload_type()); 386 RTC_CHECK(map.config().has_rtx_payload_type());
387 rtx_map.insert(std::make_pair(map.payload_type(), map.config())); 387 rtx_map.insert(std::make_pair(map.payload_type(), map.config()));
388 } 388 }
389 389 #if 0
390 // Get header extensions. 390 // Get header extensions.
391 GetHeaderExtensions(&config.rtp_extensions, 391 GetHeaderExtensions(&config.rtp_extensions,
392 receiver_config.header_extensions()); 392 receiver_config.header_extensions());
393 #endif
393 // Get decoders. 394 // Get decoders.
394 config.codecs.clear(); 395 config.codecs.clear();
395 for (int i = 0; i < receiver_config.decoders_size(); i++) { 396 for (int i = 0; i < receiver_config.decoders_size(); i++) {
396 RTC_CHECK(receiver_config.decoders(i).has_name()); 397 RTC_CHECK(receiver_config.decoders(i).has_name());
397 RTC_CHECK(receiver_config.decoders(i).has_payload_type()); 398 RTC_CHECK(receiver_config.decoders(i).has_payload_type());
398 int rtx_payload_type = 0; 399 int rtx_payload_type = 0;
399 auto rtx_it = rtx_map.find(receiver_config.decoders(i).payload_type()); 400 auto rtx_it = rtx_map.find(receiver_config.decoders(i).payload_type());
400 if (rtx_it != rtx_map.end()) { 401 if (rtx_it != rtx_map.end()) {
401 rtx_payload_type = rtx_it->second.rtx_payload_type(); 402 rtx_payload_type = rtx_it->second.rtx_payload_type();
402 if (config.rtx_ssrc != 0 && 403 if (config.rtx_ssrc != 0 &&
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 ParsedRtcEventLog::MediaType ParsedRtcEventLog::GetMediaType( 648 ParsedRtcEventLog::MediaType ParsedRtcEventLog::GetMediaType(
648 uint32_t ssrc, 649 uint32_t ssrc,
649 PacketDirection direction) const { 650 PacketDirection direction) const {
650 for (auto rit = streams_.rbegin(); rit != streams_.rend(); ++rit) { 651 for (auto rit = streams_.rbegin(); rit != streams_.rend(); ++rit) {
651 if (rit->ssrc == ssrc && rit->direction == direction) 652 if (rit->ssrc == ssrc && rit->direction == direction)
652 return rit->media_type; 653 return rit->media_type;
653 } 654 }
654 return MediaType::ANY; 655 return MediaType::ANY;
655 } 656 }
656 } // namespace webrtc 657 } // namespace webrtc
OLDNEW
« no previous file with comments | « call/video_receive_stream.cc ('k') | logging/rtc_event_log/rtc_event_log_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698