diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /third_party/libwebrtc/test/pc/e2e/analyzer/video | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | third_party/libwebrtc/test/pc/e2e/analyzer/video/video_quality_metrics_reporter.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/third_party/libwebrtc/test/pc/e2e/analyzer/video/video_quality_metrics_reporter.cc b/third_party/libwebrtc/test/pc/e2e/analyzer/video/video_quality_metrics_reporter.cc index 817b3caad0..87f1590cb0 100644 --- a/third_party/libwebrtc/test/pc/e2e/analyzer/video/video_quality_metrics_reporter.cc +++ b/third_party/libwebrtc/test/pc/e2e/analyzer/video/video_quality_metrics_reporter.cc @@ -58,12 +58,14 @@ void VideoQualityMetricsReporter::OnStatsReports( auto transport_stats = report->GetStatsOfType<RTCTransportStats>(); if (transport_stats.size() == 0u || - !transport_stats[0]->selected_candidate_pair_id.is_defined()) { + !transport_stats[0]->selected_candidate_pair_id.has_value()) { return; } RTC_DCHECK_EQ(transport_stats.size(), 1); std::string selected_ice_id = - transport_stats[0]->selected_candidate_pair_id.ValueToString(); + transport_stats[0] + ->GetAttribute(transport_stats[0]->selected_candidate_pair_id) + .ToString(); // Use the selected ICE candidate pair ID to get the appropriate ICE stats. const RTCIceCandidatePairStats ice_candidate_pair_stats = report->Get(selected_ice_id)->cast_to<const RTCIceCandidatePairStats>(); @@ -71,7 +73,7 @@ void VideoQualityMetricsReporter::OnStatsReports( auto outbound_rtp_stats = report->GetStatsOfType<RTCOutboundRtpStreamStats>(); StatsSample sample; for (auto& s : outbound_rtp_stats) { - if (!s->kind.is_defined()) { + if (!s->kind.has_value()) { continue; } if (!(*s->kind == "video")) { @@ -81,15 +83,15 @@ void VideoQualityMetricsReporter::OnStatsReports( sample.sample_time = s->timestamp(); } sample.retransmitted_bytes_sent += - DataSize::Bytes(s->retransmitted_bytes_sent.ValueOrDefault(0ul)); - sample.bytes_sent += DataSize::Bytes(s->bytes_sent.ValueOrDefault(0ul)); + DataSize::Bytes(s->retransmitted_bytes_sent.value_or(0ul)); + sample.bytes_sent += DataSize::Bytes(s->bytes_sent.value_or(0ul)); sample.header_bytes_sent += - DataSize::Bytes(s->header_bytes_sent.ValueOrDefault(0ul)); + DataSize::Bytes(s->header_bytes_sent.value_or(0ul)); } MutexLock lock(&video_bwe_stats_lock_); VideoBweStats& video_bwe_stats = video_bwe_stats_[std::string(pc_label)]; - if (ice_candidate_pair_stats.available_outgoing_bitrate.is_defined()) { + if (ice_candidate_pair_stats.available_outgoing_bitrate.has_value()) { video_bwe_stats.available_send_bandwidth.AddSample( DataRate::BitsPerSec( *ice_candidate_pair_stats.available_outgoing_bitrate) |