Replace rtc::Optional with absl::optional in modules/audio_coding
This is a no-op change because rtc::Optional is an alias to absl::optional This CL generated by running script with parameter 'modules/audio_coding' 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: Ic980ee605148fdb160666d4aa03cc87175e48fe8 Reviewed-on: https://webrtc-review.googlesource.com/84130 Reviewed-by: Oskar Sundbom <ossu@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23659}
This commit is contained in:

committed by
Commit Bot

parent
bbfcc703ad
commit
b602123a5a
@ -29,7 +29,7 @@ namespace webrtc {
|
||||
|
||||
TEST(DecoderDatabase, CreateAndDestroy) {
|
||||
DecoderDatabase db(new rtc::RefCountedObject<MockAudioDecoderFactory>,
|
||||
rtc::nullopt);
|
||||
absl::nullopt);
|
||||
EXPECT_EQ(0, db.Size());
|
||||
EXPECT_TRUE(db.Empty());
|
||||
}
|
||||
@ -42,7 +42,7 @@ TEST(DecoderDatabase, InsertAndRemove) {
|
||||
EXPECT_EQ("pcmu", format.name);
|
||||
return true;
|
||||
}));
|
||||
DecoderDatabase db(factory, rtc::nullopt);
|
||||
DecoderDatabase db(factory, absl::nullopt);
|
||||
const uint8_t kPayloadType = 0;
|
||||
const std::string kCodecName = "Robert\'); DROP TABLE Students;";
|
||||
EXPECT_EQ(
|
||||
@ -67,7 +67,7 @@ TEST(DecoderDatabase, InsertAndRemoveAll) {
|
||||
EXPECT_EQ("pcma", format.name);
|
||||
return true;
|
||||
}));
|
||||
DecoderDatabase db(factory, rtc::nullopt);
|
||||
DecoderDatabase db(factory, absl::nullopt);
|
||||
const std::string kCodecName1 = "Robert\'); DROP TABLE Students;";
|
||||
const std::string kCodecName2 = "https://xkcd.com/327/";
|
||||
EXPECT_EQ(DecoderDatabase::kOK,
|
||||
@ -92,12 +92,12 @@ TEST(DecoderDatabase, GetDecoderInfo) {
|
||||
auto* decoder = new MockAudioDecoder;
|
||||
EXPECT_CALL(*factory, MakeAudioDecoderMock(_, _, _))
|
||||
.WillOnce(Invoke([decoder](const SdpAudioFormat& format,
|
||||
rtc::Optional<AudioCodecPairId> codec_pair_id,
|
||||
absl::optional<AudioCodecPairId> codec_pair_id,
|
||||
std::unique_ptr<AudioDecoder>* dec) {
|
||||
EXPECT_EQ("pcmu", format.name);
|
||||
dec->reset(decoder);
|
||||
}));
|
||||
DecoderDatabase db(factory, rtc::nullopt);
|
||||
DecoderDatabase db(factory, absl::nullopt);
|
||||
const uint8_t kPayloadType = 0;
|
||||
const std::string kCodecName = "Robert\'); DROP TABLE Students;";
|
||||
EXPECT_EQ(
|
||||
@ -114,7 +114,7 @@ TEST(DecoderDatabase, GetDecoderInfo) {
|
||||
}
|
||||
|
||||
TEST(DecoderDatabase, GetDecoder) {
|
||||
DecoderDatabase db(CreateBuiltinAudioDecoderFactory(), rtc::nullopt);
|
||||
DecoderDatabase db(CreateBuiltinAudioDecoderFactory(), absl::nullopt);
|
||||
const uint8_t kPayloadType = 0;
|
||||
const std::string kCodecName = "Robert\'); DROP TABLE Students;";
|
||||
EXPECT_EQ(DecoderDatabase::kOK,
|
||||
@ -132,7 +132,7 @@ TEST(DecoderDatabase, TypeTests) {
|
||||
EXPECT_EQ("pcmu", format.name);
|
||||
return true;
|
||||
}));
|
||||
DecoderDatabase db(factory, rtc::nullopt);
|
||||
DecoderDatabase db(factory, absl::nullopt);
|
||||
const uint8_t kPayloadTypePcmU = 0;
|
||||
const uint8_t kPayloadTypeCng = 13;
|
||||
const uint8_t kPayloadTypeDtmf = 100;
|
||||
@ -168,7 +168,7 @@ TEST(DecoderDatabase, TypeTests) {
|
||||
|
||||
TEST(DecoderDatabase, ExternalDecoder) {
|
||||
DecoderDatabase db(new rtc::RefCountedObject<MockAudioDecoderFactory>,
|
||||
rtc::nullopt);
|
||||
absl::nullopt);
|
||||
const uint8_t kPayloadType = 0;
|
||||
const std::string kCodecName = "Robert\'); DROP TABLE Students;";
|
||||
MockAudioDecoder decoder;
|
||||
@ -205,7 +205,7 @@ TEST(DecoderDatabase, CheckPayloadTypes) {
|
||||
EXPECT_EQ("pcmu", format.name);
|
||||
return true;
|
||||
}));
|
||||
DecoderDatabase db(factory, rtc::nullopt);
|
||||
DecoderDatabase db(factory, absl::nullopt);
|
||||
// Load a number of payloads into the database. Payload types are 0, 1, ...,
|
||||
// while the decoder type is the same for all payload types (this does not
|
||||
// matter for the test).
|
||||
@ -245,7 +245,7 @@ TEST(DecoderDatabase, CheckPayloadTypes) {
|
||||
|
||||
// Test the methods for setting and getting active speech and CNG decoders.
|
||||
TEST(DecoderDatabase, IF_ISAC(ActiveDecoders)) {
|
||||
DecoderDatabase db(CreateBuiltinAudioDecoderFactory(), rtc::nullopt);
|
||||
DecoderDatabase db(CreateBuiltinAudioDecoderFactory(), absl::nullopt);
|
||||
// Load payload types.
|
||||
ASSERT_EQ(DecoderDatabase::kOK,
|
||||
db.RegisterPayload(0, NetEqDecoder::kDecoderPCMu, "pcmu"));
|
||||
|
Reference in New Issue
Block a user