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

Side by Side Diff: webrtc/logging/rtc_event_log/rtc_event_log_parser.cc

Issue 2856063003: Replace AudioSendStream::Config with rtclog::StreamConfig. (Closed)
Patch Set: Rebased Created 3 years, 7 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
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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 // Get SSRCs. 429 // Get SSRCs.
430 RTC_CHECK(receiver_config.has_remote_ssrc()); 430 RTC_CHECK(receiver_config.has_remote_ssrc());
431 config->remote_ssrc = receiver_config.remote_ssrc(); 431 config->remote_ssrc = receiver_config.remote_ssrc();
432 RTC_CHECK(receiver_config.has_local_ssrc()); 432 RTC_CHECK(receiver_config.has_local_ssrc());
433 config->local_ssrc = receiver_config.local_ssrc(); 433 config->local_ssrc = receiver_config.local_ssrc();
434 // Get header extensions. 434 // Get header extensions.
435 GetHeaderExtensions(&config->rtp_extensions, 435 GetHeaderExtensions(&config->rtp_extensions,
436 receiver_config.header_extensions()); 436 receiver_config.header_extensions());
437 } 437 }
438 438
439 void ParsedRtcEventLog::GetAudioSendConfig( 439 void ParsedRtcEventLog::GetAudioSendConfig(size_t index,
440 size_t index, 440 rtclog::StreamConfig* config) const {
441 AudioSendStream::Config* config) const {
442 RTC_CHECK_LT(index, GetNumberOfEvents()); 441 RTC_CHECK_LT(index, GetNumberOfEvents());
443 const rtclog::Event& event = events_[index]; 442 const rtclog::Event& event = events_[index];
444 RTC_CHECK(config != nullptr); 443 RTC_CHECK(config != nullptr);
445 RTC_CHECK(event.has_type()); 444 RTC_CHECK(event.has_type());
446 RTC_CHECK_EQ(event.type(), rtclog::Event::AUDIO_SENDER_CONFIG_EVENT); 445 RTC_CHECK_EQ(event.type(), rtclog::Event::AUDIO_SENDER_CONFIG_EVENT);
447 RTC_CHECK(event.has_audio_sender_config()); 446 RTC_CHECK(event.has_audio_sender_config());
448 const rtclog::AudioSendConfig& sender_config = event.audio_sender_config(); 447 const rtclog::AudioSendConfig& sender_config = event.audio_sender_config();
449 // Get SSRCs. 448 // Get SSRCs.
450 RTC_CHECK(sender_config.has_ssrc()); 449 RTC_CHECK(sender_config.has_ssrc());
451 config->rtp.ssrc = sender_config.ssrc(); 450 config->local_ssrc = sender_config.ssrc();
452 // Get header extensions. 451 // Get header extensions.
453 GetHeaderExtensions(&config->rtp.extensions, 452 GetHeaderExtensions(&config->rtp_extensions,
454 sender_config.header_extensions()); 453 sender_config.header_extensions());
455 } 454 }
456 455
457 void ParsedRtcEventLog::GetAudioPlayout(size_t index, uint32_t* ssrc) const { 456 void ParsedRtcEventLog::GetAudioPlayout(size_t index, uint32_t* ssrc) const {
458 RTC_CHECK_LT(index, GetNumberOfEvents()); 457 RTC_CHECK_LT(index, GetNumberOfEvents());
459 const rtclog::Event& event = events_[index]; 458 const rtclog::Event& event = events_[index];
460 RTC_CHECK(event.has_type()); 459 RTC_CHECK(event.has_type());
461 RTC_CHECK_EQ(event.type(), rtclog::Event::AUDIO_PLAYOUT_EVENT); 460 RTC_CHECK_EQ(event.type(), rtclog::Event::AUDIO_PLAYOUT_EVENT);
462 RTC_CHECK(event.has_audio_playout_event()); 461 RTC_CHECK(event.has_audio_playout_event());
463 const rtclog::AudioPlayoutEvent& loss_event = event.audio_playout_event(); 462 const rtclog::AudioPlayoutEvent& loss_event = event.audio_playout_event();
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 rtc::Optional<ProbeFailureReason>(kInvalidSendReceiveRatio); 582 rtc::Optional<ProbeFailureReason>(kInvalidSendReceiveRatio);
584 } else if (pr_event.result() == rtclog::BweProbeResult::TIMEOUT) { 583 } else if (pr_event.result() == rtclog::BweProbeResult::TIMEOUT) {
585 res.failure_reason = rtc::Optional<ProbeFailureReason>(kTimeout); 584 res.failure_reason = rtc::Optional<ProbeFailureReason>(kTimeout);
586 } else { 585 } else {
587 RTC_NOTREACHED(); 586 RTC_NOTREACHED();
588 } 587 }
589 588
590 return res; 589 return res;
591 } 590 }
592 } // namespace webrtc 591 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/logging/rtc_event_log/rtc_event_log_parser.h ('k') | webrtc/logging/rtc_event_log/rtc_event_log_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698