Replace rtc::Optional with absl::optional in audio, call and video
This is a no-op change because rtc::Optional is an alias to absl::optional
This CL generated by running script with parameters 'audio call video':
#!/bin/bash
find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+
find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"(../)*api:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;
git cl format
Bug: webrtc:9078
Change-Id: I02c5db956846a88a268a300ba086703a02d62e36
Reviewed-on: https://webrtc-review.googlesource.com/83722
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23628}
diff --git a/video/end_to_end_tests/call_operation_tests.cc b/video/end_to_end_tests/call_operation_tests.cc
index ed06aa8..2c45665 100644
--- a/video/end_to_end_tests/call_operation_tests.cc
+++ b/video/end_to_end_tests/call_operation_tests.cc
@@ -134,7 +134,7 @@
// to check that the callbacks are done after processing video.
std::unique_ptr<test::FrameGenerator> frame_generator(
test::FrameGenerator::CreateSquareGenerator(
- kWidth, kHeight, rtc::nullopt, rtc::nullopt));
+ kWidth, kHeight, absl::nullopt, absl::nullopt));
video_send_stream_->SetSource(&frame_forwarder,
DegradationPreference::MAINTAIN_FRAMERATE);
@@ -190,7 +190,7 @@
Start();
frame_generator = test::FrameGenerator::CreateSquareGenerator(
- kDefaultWidth, kDefaultHeight, rtc::nullopt, rtc::nullopt);
+ kDefaultWidth, kDefaultHeight, absl::nullopt, absl::nullopt);
video_send_stream_->SetSource(&frame_forwarder,
DegradationPreference::MAINTAIN_FRAMERATE);
frame_forwarder.IncomingCapturedFrame(*frame_generator->NextFrame());
@@ -268,7 +268,7 @@
Start();
frame_generator = test::FrameGenerator::CreateSquareGenerator(
- kDefaultWidth, kDefaultHeight, rtc::nullopt, rtc::nullopt);
+ kDefaultWidth, kDefaultHeight, absl::nullopt, absl::nullopt);
video_send_stream_->SetSource(&forwarder,
DegradationPreference::MAINTAIN_FRAMERATE);
forwarder.IncomingCapturedFrame(*frame_generator->NextFrame());
diff --git a/video/end_to_end_tests/histogram_tests.cc b/video/end_to_end_tests/histogram_tests.cc
index c3a86b4..04255a8 100644
--- a/video/end_to_end_tests/histogram_tests.cc
+++ b/video/end_to_end_tests/histogram_tests.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "api/optional.h"
+#include "absl/types/optional.h"
#include "modules/video_coding/codecs/vp8/include/vp8.h"
#include "system_wrappers/include/metrics.h"
#include "system_wrappers/include/metrics_default.h"
@@ -123,7 +123,7 @@
const bool use_fec_;
const bool screenshare_;
test::FunctionVideoEncoderFactory encoder_factory_;
- rtc::Optional<int64_t> start_runtime_ms_;
+ absl::optional<int64_t> start_runtime_ms_;
int num_frames_received_ RTC_GUARDED_BY(&crit_);
} test(use_rtx, use_fec, screenshare);
diff --git a/video/end_to_end_tests/multi_codec_receive_tests.cc b/video/end_to_end_tests/multi_codec_receive_tests.cc
index 5afb147..ffbf8fb 100644
--- a/video/end_to_end_tests/multi_codec_receive_tests.cc
+++ b/video/end_to_end_tests/multi_codec_receive_tests.cc
@@ -132,8 +132,8 @@
}
rtc::CriticalSection crit_;
- rtc::Optional<uint32_t> last_timestamp_;
- rtc::Optional<uint8_t> last_payload_type_;
+ absl::optional<uint32_t> last_timestamp_;
+ absl::optional<uint8_t> last_payload_type_;
int num_sent_frames_ RTC_GUARDED_BY(crit_) = 0;
int num_rendered_frames_ RTC_GUARDED_BY(crit_) = 0;
std::vector<uint32_t> sent_timestamps_ RTC_GUARDED_BY(crit_);
diff --git a/video/end_to_end_tests/multi_stream_tester.cc b/video/end_to_end_tests/multi_stream_tester.cc
index 4ed3af6..92fa938 100644
--- a/video/end_to_end_tests/multi_stream_tester.cc
+++ b/video/end_to_end_tests/multi_stream_tester.cc
@@ -99,7 +99,7 @@
receive_streams[i]->Start();
frame_generators[i] = test::FrameGeneratorCapturer::Create(
- width, height, rtc::nullopt, rtc::nullopt, 30,
+ width, height, absl::nullopt, absl::nullopt, 30,
Clock::GetRealTimeClock());
send_streams[i]->SetSource(frame_generators[i],
DegradationPreference::MAINTAIN_FRAMERATE);
diff --git a/video/end_to_end_tests/retransmission_tests.cc b/video/end_to_end_tests/retransmission_tests.cc
index 425c0c2..fc09141 100644
--- a/video/end_to_end_tests/retransmission_tests.cc
+++ b/video/end_to_end_tests/retransmission_tests.cc
@@ -190,7 +190,7 @@
uint32_t local_ssrc_;
uint32_t remote_ssrc_;
Transport* receive_transport_;
- rtc::Optional<uint16_t> sequence_number_to_retransmit_;
+ absl::optional<uint16_t> sequence_number_to_retransmit_;
} test;
RunBaseTest(&test);
diff --git a/video/end_to_end_tests/rtp_rtcp_tests.cc b/video/end_to_end_tests/rtp_rtcp_tests.cc
index 5317242..1c953ac 100644
--- a/video/end_to_end_tests/rtp_rtcp_tests.cc
+++ b/video/end_to_end_tests/rtp_rtcp_tests.cc
@@ -453,9 +453,9 @@
return SEND_PACKET;
}
- rtc::Optional<uint16_t> last_observed_sequence_number_
+ absl::optional<uint16_t> last_observed_sequence_number_
RTC_GUARDED_BY(crit_);
- rtc::Optional<uint32_t> last_observed_timestamp_ RTC_GUARDED_BY(crit_);
+ absl::optional<uint32_t> last_observed_timestamp_ RTC_GUARDED_BY(crit_);
size_t num_flexfec_packets_sent_ RTC_GUARDED_BY(crit_);
rtc::CriticalSection crit_;
} observer;