From 01abbb1c3220c31d86ebfee8f715dabdb19917de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Bostr=C3=B6m?= Date: Fri, 23 Dec 2022 15:46:05 +0100 Subject: [PATCH] Remove the last internal C++ reference to deprecated 'track' stats. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: webrtc:14175 Change-Id: I939a65e0ae63ac327d44a8e819bcb21e91eb60ae Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/289042 Reviewed-by: Mirko Bonadei Commit-Queue: Henrik Boström Cr-Commit-Position: refs/heads/main@{#38952} --- test/pc/e2e/cross_media_metrics_reporter.cc | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/test/pc/e2e/cross_media_metrics_reporter.cc b/test/pc/e2e/cross_media_metrics_reporter.cc index b2c91089c8..0d4fe7478d 100644 --- a/test/pc/e2e/cross_media_metrics_reporter.cc +++ b/test/pc/e2e/cross_media_metrics_reporter.cc @@ -47,13 +47,10 @@ void CrossMediaMetricsReporter::OnStatsReports( std::map> sync_group_stats; for (const auto& stat : inbound_stats) { - auto media_source_stat = - report->GetAs(*stat->track_id); if (stat->estimated_playout_timestamp.ValueOrDefault(0.) > 0 && - media_source_stat->track_identifier.is_defined()) { + stat->track_identifier.is_defined()) { sync_group_stats[reporter_helper_ - ->GetStreamInfoFromTrackId( - *media_source_stat->track_identifier) + ->GetStreamInfoFromTrackId(*stat->track_identifier) .sync_group] .push_back(stat); } @@ -80,20 +77,14 @@ void CrossMediaMetricsReporter::OnStatsReports( // Stream labels of a sync group are same for all polls, so we need it add // it only once. if (stats_info_.find(sync_group) == stats_info_.end()) { - auto audio_source_stat = - report->GetAs( - *audio_stat->track_id); - auto video_source_stat = - report->GetAs( - *video_stat->track_id); - // *_source_stat->track_identifier is always defined here because we - // checked it while grouping stats. + RTC_CHECK(audio_stat->track_identifier.is_defined()); + RTC_CHECK(video_stat->track_identifier.is_defined()); stats_info_[sync_group].audio_stream_info = reporter_helper_->GetStreamInfoFromTrackId( - *audio_source_stat->track_identifier); + *audio_stat->track_identifier); stats_info_[sync_group].video_stream_info = reporter_helper_->GetStreamInfoFromTrackId( - *video_source_stat->track_identifier); + *video_stat->track_identifier); } double audio_video_playout_diff = *audio_stat->estimated_playout_timestamp -