Replace rtc::Optional with absl::optional
This is a no-op change because rtc::Optional is an alias to absl::optional
This CL generated by running script from modules with parameters
'pacing video_coding congestion_controller remote_bitrate_estimator':
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: I8ea501d7f1ee36e8d8cd3ed37e6b763c7fe29118
Reviewed-on: https://webrtc-review.googlesource.com/83900
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23640}
This commit is contained in:
committed by
Commit Bot
parent
ae1888629a
commit
0040b66ad3
@ -43,7 +43,7 @@ bool IsH264CodecSupported() {
|
||||
SdpVideoFormat CreateH264Format(H264::Profile profile,
|
||||
H264::Level level,
|
||||
const std::string& packetization_mode) {
|
||||
const rtc::Optional<std::string> profile_string =
|
||||
const absl::optional<std::string> profile_string =
|
||||
H264::ProfileLevelIdToString(H264::ProfileLevelId(profile, level));
|
||||
RTC_CHECK(profile_string);
|
||||
return SdpVideoFormat(
|
||||
|
||||
@ -325,7 +325,7 @@ int32_t H264DecoderImpl::Decode(const EncodedImage& input_image,
|
||||
RTC_CHECK_EQ(av_frame_->data[kVPlaneIndex], i420_buffer->DataV());
|
||||
video_frame->set_timestamp(input_image._timeStamp);
|
||||
|
||||
rtc::Optional<uint8_t> qp;
|
||||
absl::optional<uint8_t> qp;
|
||||
// TODO(sakal): Maybe it is possible to get QP directly from FFmpeg.
|
||||
h264_bitstream_parser_.ParseBitstream(input_image._buffer,
|
||||
input_image._length);
|
||||
@ -351,10 +351,10 @@ int32_t H264DecoderImpl::Decode(const EncodedImage& input_image,
|
||||
video_frame->rotation());
|
||||
// TODO(nisse): Timestamp and rotation are all zero here. Change decoder
|
||||
// interface to pass a VideoFrameBuffer instead of a VideoFrame?
|
||||
decoded_image_callback_->Decoded(cropped_frame, rtc::nullopt, qp);
|
||||
decoded_image_callback_->Decoded(cropped_frame, absl::nullopt, qp);
|
||||
} else {
|
||||
// Return decoded frame.
|
||||
decoded_image_callback_->Decoded(*video_frame, rtc::nullopt, qp);
|
||||
decoded_image_callback_->Decoded(*video_frame, absl::nullopt, qp);
|
||||
}
|
||||
// Stop referencing it, possibly freeing |video_frame|.
|
||||
av_frame_unref(av_frame_.get());
|
||||
|
||||
@ -50,7 +50,7 @@ TEST_F(TestH264Impl, MAYBE_EncodeDecode) {
|
||||
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
|
||||
decoder_->Decode(encoded_frame, false, nullptr, 0));
|
||||
std::unique_ptr<VideoFrame> decoded_frame;
|
||||
rtc::Optional<uint8_t> decoded_qp;
|
||||
absl::optional<uint8_t> decoded_qp;
|
||||
ASSERT_TRUE(WaitForDecodedFrame(&decoded_frame, &decoded_qp));
|
||||
ASSERT_TRUE(decoded_frame);
|
||||
EXPECT_GT(I420PSNR(input_frame, decoded_frame.get()), 36);
|
||||
@ -67,7 +67,7 @@ TEST_F(TestH264Impl, MAYBE_DecodedQpEqualsEncodedQp) {
|
||||
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
|
||||
decoder_->Decode(encoded_frame, false, nullptr, 0));
|
||||
std::unique_ptr<VideoFrame> decoded_frame;
|
||||
rtc::Optional<uint8_t> decoded_qp;
|
||||
absl::optional<uint8_t> decoded_qp;
|
||||
ASSERT_TRUE(WaitForDecodedFrame(&decoded_frame, &decoded_qp));
|
||||
ASSERT_TRUE(decoded_frame);
|
||||
ASSERT_TRUE(decoded_qp);
|
||||
|
||||
Reference in New Issue
Block a user