From d8bbc7858622b6d9c278469aab701ca0b609cddf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:35:49 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- .../pc/peer_connection_integrationtest.cc | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'third_party/libwebrtc/pc/peer_connection_integrationtest.cc') diff --git a/third_party/libwebrtc/pc/peer_connection_integrationtest.cc b/third_party/libwebrtc/pc/peer_connection_integrationtest.cc index bfff86ee93..c960a36b5e 100644 --- a/third_party/libwebrtc/pc/peer_connection_integrationtest.cc +++ b/third_party/libwebrtc/pc/peer_connection_integrationtest.cc @@ -1356,15 +1356,15 @@ TEST_P(PeerConnectionIntegrationTest, NewGetStatsManyAudioAndManyVideoStreams) { ASSERT_EQ(outbound_stream_stats.size(), 4u); std::vector outbound_track_ids; for (const auto& stat : outbound_stream_stats) { - ASSERT_TRUE(stat->bytes_sent.is_defined()); + ASSERT_TRUE(stat->bytes_sent.has_value()); EXPECT_LT(0u, *stat->bytes_sent); if (*stat->kind == "video") { - ASSERT_TRUE(stat->key_frames_encoded.is_defined()); + ASSERT_TRUE(stat->key_frames_encoded.has_value()); EXPECT_GT(*stat->key_frames_encoded, 0u); - ASSERT_TRUE(stat->frames_encoded.is_defined()); + ASSERT_TRUE(stat->frames_encoded.has_value()); EXPECT_GE(*stat->frames_encoded, *stat->key_frames_encoded); } - ASSERT_TRUE(stat->media_source_id.is_defined()); + ASSERT_TRUE(stat->media_source_id.has_value()); const RTCMediaSourceStats* media_source = static_cast( caller_report->Get(*stat->media_source_id)); @@ -1381,12 +1381,12 @@ TEST_P(PeerConnectionIntegrationTest, NewGetStatsManyAudioAndManyVideoStreams) { ASSERT_EQ(4u, inbound_stream_stats.size()); std::vector inbound_track_ids; for (const auto& stat : inbound_stream_stats) { - ASSERT_TRUE(stat->bytes_received.is_defined()); + ASSERT_TRUE(stat->bytes_received.has_value()); EXPECT_LT(0u, *stat->bytes_received); if (*stat->kind == "video") { - ASSERT_TRUE(stat->key_frames_decoded.is_defined()); + ASSERT_TRUE(stat->key_frames_decoded.has_value()); EXPECT_GT(*stat->key_frames_decoded, 0u); - ASSERT_TRUE(stat->frames_decoded.is_defined()); + ASSERT_TRUE(stat->frames_decoded.has_value()); EXPECT_GE(*stat->frames_decoded, *stat->key_frames_decoded); } inbound_track_ids.push_back(*stat->track_identifier); @@ -1417,7 +1417,7 @@ TEST_P(PeerConnectionIntegrationTest, auto inbound_stream_stats = report->GetStatsOfType(); ASSERT_EQ(1U, inbound_stream_stats.size()); - ASSERT_TRUE(inbound_stream_stats[0]->bytes_received.is_defined()); + ASSERT_TRUE(inbound_stream_stats[0]->bytes_received.has_value()); ASSERT_GT(*inbound_stream_stats[0]->bytes_received, 0U); } @@ -1464,7 +1464,7 @@ TEST_P(PeerConnectionIntegrationTest, auto inbound_rtps = report->GetStatsOfType(); auto index = FindFirstMediaStatsIndexByKind("audio", inbound_rtps); ASSERT_GE(index, 0); - EXPECT_TRUE(inbound_rtps[index]->audio_level.is_defined()); + EXPECT_TRUE(inbound_rtps[index]->audio_level.has_value()); } // Test that DTLS 1.0 is used if both sides only support DTLS 1.0. @@ -2952,7 +2952,7 @@ double GetAudioEnergyStat(PeerConnectionIntegrationWrapper* pc) { auto inbound_rtps = report->GetStatsOfType(); RTC_CHECK(!inbound_rtps.empty()); auto* inbound_rtp = inbound_rtps[0]; - if (!inbound_rtp->total_audio_energy.is_defined()) { + if (!inbound_rtp->total_audio_energy.has_value()) { return 0.0; } return *inbound_rtp->total_audio_energy; @@ -3776,7 +3776,7 @@ int NacksReceivedCount(PeerConnectionIntegrationWrapper& pc) { ADD_FAILURE(); return 0; } - if (!sender_stats[0]->nack_count.is_defined()) { + if (!sender_stats[0]->nack_count.has_value()) { return 0; } return *sender_stats[0]->nack_count; @@ -3789,7 +3789,7 @@ int NacksSentCount(PeerConnectionIntegrationWrapper& pc) { ADD_FAILURE(); return 0; } - if (!receiver_stats[0]->nack_count.is_defined()) { + if (!receiver_stats[0]->nack_count.has_value()) { return 0; } return *receiver_stats[0]->nack_count; -- cgit v1.2.3