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
@ -38,7 +38,7 @@ class OpusFrame : public AudioDecoder::EncodedAudioFrame {
|
||||
|
||||
bool IsDtxPacket() const override { return payload_.size() <= 2; }
|
||||
|
||||
rtc::Optional<DecodeResult> Decode(
|
||||
absl::optional<DecodeResult> Decode(
|
||||
rtc::ArrayView<int16_t> decoded) const override {
|
||||
AudioDecoder::SpeechType speech_type = AudioDecoder::kSpeech;
|
||||
int ret;
|
||||
@ -53,7 +53,7 @@ class OpusFrame : public AudioDecoder::EncodedAudioFrame {
|
||||
}
|
||||
|
||||
if (ret < 0)
|
||||
return rtc::nullopt;
|
||||
return absl::nullopt;
|
||||
|
||||
return DecodeResult{static_cast<size_t>(ret), speech_type};
|
||||
}
|
||||
|
||||
@ -105,18 +105,18 @@ float OptimizePacketLossRate(float new_loss_rate, float old_loss_rate) {
|
||||
}
|
||||
}
|
||||
|
||||
rtc::Optional<std::string> GetFormatParameter(const SdpAudioFormat& format,
|
||||
const std::string& param) {
|
||||
absl::optional<std::string> GetFormatParameter(const SdpAudioFormat& format,
|
||||
const std::string& param) {
|
||||
auto it = format.parameters.find(param);
|
||||
if (it == format.parameters.end())
|
||||
return rtc::nullopt;
|
||||
return absl::nullopt;
|
||||
|
||||
return it->second;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
rtc::Optional<T> GetFormatParameter(const SdpAudioFormat& format,
|
||||
const std::string& param) {
|
||||
absl::optional<T> GetFormatParameter(const SdpAudioFormat& format,
|
||||
const std::string& param) {
|
||||
return rtc::StringToNumber<T>(GetFormatParameter(format, param).value_or(""));
|
||||
}
|
||||
|
||||
@ -139,7 +139,7 @@ int CalculateDefaultBitrate(int max_playback_rate, size_t num_channels) {
|
||||
// out how invalid it is and accurately log invalid values.
|
||||
int CalculateBitrate(int max_playback_rate_hz,
|
||||
size_t num_channels,
|
||||
rtc::Optional<std::string> bitrate_param) {
|
||||
absl::optional<std::string> bitrate_param) {
|
||||
const int default_bitrate =
|
||||
CalculateDefaultBitrate(max_playback_rate_hz, num_channels);
|
||||
|
||||
@ -242,7 +242,7 @@ std::unique_ptr<AudioEncoder> AudioEncoderOpusImpl::MakeAudioEncoder(
|
||||
return rtc::MakeUnique<AudioEncoderOpusImpl>(config, payload_type);
|
||||
}
|
||||
|
||||
rtc::Optional<AudioCodecInfo> AudioEncoderOpusImpl::QueryAudioEncoder(
|
||||
absl::optional<AudioCodecInfo> AudioEncoderOpusImpl::QueryAudioEncoder(
|
||||
const SdpAudioFormat& format) {
|
||||
if (STR_CASE_CMP(format.name.c_str(), GetPayloadName()) == 0 &&
|
||||
format.clockrate_hz == 48000 && format.num_channels == 2) {
|
||||
@ -258,7 +258,7 @@ rtc::Optional<AudioCodecInfo> AudioEncoderOpusImpl::QueryAudioEncoder(
|
||||
|
||||
return info;
|
||||
}
|
||||
return rtc::nullopt;
|
||||
return absl::nullopt;
|
||||
}
|
||||
|
||||
AudioEncoderOpusConfig AudioEncoderOpusImpl::CreateConfig(
|
||||
@ -274,11 +274,11 @@ AudioEncoderOpusConfig AudioEncoderOpusImpl::CreateConfig(
|
||||
return config;
|
||||
}
|
||||
|
||||
rtc::Optional<AudioEncoderOpusConfig> AudioEncoderOpusImpl::SdpToConfig(
|
||||
absl::optional<AudioEncoderOpusConfig> AudioEncoderOpusImpl::SdpToConfig(
|
||||
const SdpAudioFormat& format) {
|
||||
if (STR_CASE_CMP(format.name.c_str(), "opus") != 0 ||
|
||||
format.clockrate_hz != 48000 || format.num_channels != 2) {
|
||||
return rtc::nullopt;
|
||||
return absl::nullopt;
|
||||
}
|
||||
|
||||
AudioEncoderOpusConfig config;
|
||||
@ -313,7 +313,7 @@ rtc::Optional<AudioEncoderOpusConfig> AudioEncoderOpusImpl::SdpToConfig(
|
||||
return config;
|
||||
}
|
||||
|
||||
rtc::Optional<int> AudioEncoderOpusImpl::GetNewComplexity(
|
||||
absl::optional<int> AudioEncoderOpusImpl::GetNewComplexity(
|
||||
const AudioEncoderOpusConfig& config) {
|
||||
RTC_DCHECK(config.IsOk());
|
||||
const int bitrate_bps = GetBitrateBps(config);
|
||||
@ -322,7 +322,7 @@ rtc::Optional<int> AudioEncoderOpusImpl::GetNewComplexity(
|
||||
bitrate_bps <= config.complexity_threshold_bps +
|
||||
config.complexity_threshold_window_bps) {
|
||||
// Within the hysteresis window; make no change.
|
||||
return rtc::nullopt;
|
||||
return absl::nullopt;
|
||||
} else {
|
||||
return bitrate_bps <= config.complexity_threshold_bps
|
||||
? config.low_rate_complexity
|
||||
@ -330,7 +330,7 @@ rtc::Optional<int> AudioEncoderOpusImpl::GetNewComplexity(
|
||||
}
|
||||
}
|
||||
|
||||
rtc::Optional<int> AudioEncoderOpusImpl::GetNewBandwidth(
|
||||
absl::optional<int> AudioEncoderOpusImpl::GetNewBandwidth(
|
||||
const AudioEncoderOpusConfig& config,
|
||||
OpusEncInst* inst) {
|
||||
constexpr int kMinWidebandBitrate = 8000;
|
||||
@ -339,17 +339,17 @@ rtc::Optional<int> AudioEncoderOpusImpl::GetNewBandwidth(
|
||||
RTC_DCHECK(config.IsOk());
|
||||
const int bitrate = GetBitrateBps(config);
|
||||
if (bitrate > kAutomaticThreshold) {
|
||||
return rtc::Optional<int>(OPUS_AUTO);
|
||||
return absl::optional<int>(OPUS_AUTO);
|
||||
}
|
||||
const int bandwidth = WebRtcOpus_GetBandwidth(inst);
|
||||
RTC_DCHECK_GE(bandwidth, 0);
|
||||
if (bitrate > kMaxNarrowbandBitrate && bandwidth < OPUS_BANDWIDTH_WIDEBAND) {
|
||||
return rtc::Optional<int>(OPUS_BANDWIDTH_WIDEBAND);
|
||||
return absl::optional<int>(OPUS_BANDWIDTH_WIDEBAND);
|
||||
} else if (bitrate < kMinWidebandBitrate &&
|
||||
bandwidth > OPUS_BANDWIDTH_NARROWBAND) {
|
||||
return rtc::Optional<int>(OPUS_BANDWIDTH_NARROWBAND);
|
||||
return absl::optional<int>(OPUS_BANDWIDTH_NARROWBAND);
|
||||
}
|
||||
return rtc::Optional<int>();
|
||||
return absl::optional<int>();
|
||||
}
|
||||
|
||||
class AudioEncoderOpusImpl::PacketLossFractionSmoother {
|
||||
@ -529,7 +529,7 @@ void AudioEncoderOpusImpl::OnReceivedUplinkRecoverablePacketLossFraction(
|
||||
|
||||
void AudioEncoderOpusImpl::OnReceivedUplinkBandwidth(
|
||||
int target_audio_bitrate_bps,
|
||||
rtc::Optional<int64_t> bwe_period_ms) {
|
||||
absl::optional<int64_t> bwe_period_ms) {
|
||||
if (audio_network_adaptor_) {
|
||||
audio_network_adaptor_->SetTargetAudioBitrate(target_audio_bitrate_bps);
|
||||
// We give smoothed bitrate allocation to audio network adaptor as
|
||||
@ -801,7 +801,7 @@ void AudioEncoderOpusImpl::MaybeUpdateUplinkBandwidth() {
|
||||
if (!bitrate_smoother_last_update_time_ ||
|
||||
now_ms - *bitrate_smoother_last_update_time_ >=
|
||||
config_.uplink_bandwidth_update_interval_ms) {
|
||||
rtc::Optional<float> smoothed_bitrate = bitrate_smoother_->GetAverage();
|
||||
absl::optional<float> smoothed_bitrate = bitrate_smoother_->GetAverage();
|
||||
if (smoothed_bitrate)
|
||||
audio_network_adaptor_->SetUplinkBandwidth(*smoothed_bitrate);
|
||||
bitrate_smoother_last_update_time_ = now_ms;
|
||||
|
||||
@ -16,10 +16,10 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/audio_codecs/audio_encoder.h"
|
||||
#include "api/audio_codecs/audio_format.h"
|
||||
#include "api/audio_codecs/opus/audio_encoder_opus_config.h"
|
||||
#include "api/optional.h"
|
||||
#include "common_audio/smoothing_filter.h"
|
||||
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h"
|
||||
#include "modules/audio_coding/codecs/opus/opus_interface.h"
|
||||
@ -40,13 +40,13 @@ class AudioEncoderOpusImpl final : public AudioEncoder {
|
||||
// defined by complexity_threshold_bps +/- complexity_threshold_window_bps.
|
||||
// Otherwise, returns the current complexity depending on whether the
|
||||
// current bitrate is above or below complexity_threshold_bps.
|
||||
static rtc::Optional<int> GetNewComplexity(
|
||||
static absl::optional<int> GetNewComplexity(
|
||||
const AudioEncoderOpusConfig& config);
|
||||
|
||||
// Returns OPUS_AUTO if the the current bitrate is above wideband threshold.
|
||||
// Returns empty if it is below, but bandwidth coincides with the desired one.
|
||||
// Otherwise returns the desired bandwidth.
|
||||
static rtc::Optional<int> GetNewBandwidth(
|
||||
static absl::optional<int> GetNewBandwidth(
|
||||
const AudioEncoderOpusConfig& config,
|
||||
OpusEncInst* inst);
|
||||
|
||||
@ -69,7 +69,7 @@ class AudioEncoderOpusImpl final : public AudioEncoder {
|
||||
|
||||
// Static interface for use by BuiltinAudioEncoderFactory.
|
||||
static constexpr const char* GetPayloadName() { return "opus"; }
|
||||
static rtc::Optional<AudioCodecInfo> QueryAudioEncoder(
|
||||
static absl::optional<AudioCodecInfo> QueryAudioEncoder(
|
||||
const SdpAudioFormat& format);
|
||||
|
||||
int SampleRateHz() const override;
|
||||
@ -98,7 +98,7 @@ class AudioEncoderOpusImpl final : public AudioEncoder {
|
||||
float uplink_recoverable_packet_loss_fraction) override;
|
||||
void OnReceivedUplinkBandwidth(
|
||||
int target_audio_bitrate_bps,
|
||||
rtc::Optional<int64_t> bwe_period_ms) override;
|
||||
absl::optional<int64_t> bwe_period_ms) override;
|
||||
void OnReceivedRtt(int rtt_ms) override;
|
||||
void OnReceivedOverhead(size_t overhead_bytes_per_packet) override;
|
||||
void SetReceiverFrameLengthRange(int min_frame_length_ms,
|
||||
@ -125,7 +125,7 @@ class AudioEncoderOpusImpl final : public AudioEncoder {
|
||||
private:
|
||||
class PacketLossFractionSmoother;
|
||||
|
||||
static rtc::Optional<AudioEncoderOpusConfig> SdpToConfig(
|
||||
static absl::optional<AudioEncoderOpusConfig> SdpToConfig(
|
||||
const SdpAudioFormat& format);
|
||||
static void AppendSupportedEncoders(std::vector<AudioCodecSpec>* specs);
|
||||
static AudioCodecInfo QueryAudioEncoder(const AudioEncoderOpusConfig& config);
|
||||
@ -167,9 +167,9 @@ class AudioEncoderOpusImpl final : public AudioEncoder {
|
||||
std::unique_ptr<PacketLossFractionSmoother> packet_loss_fraction_smoother_;
|
||||
const AudioNetworkAdaptorCreator audio_network_adaptor_creator_;
|
||||
std::unique_ptr<AudioNetworkAdaptor> audio_network_adaptor_;
|
||||
rtc::Optional<size_t> overhead_bytes_per_packet_;
|
||||
absl::optional<size_t> overhead_bytes_per_packet_;
|
||||
const std::unique_ptr<SmoothingFilter> bitrate_smoother_;
|
||||
rtc::Optional<int64_t> bitrate_smoother_last_update_time_;
|
||||
absl::optional<int64_t> bitrate_smoother_last_update_time_;
|
||||
int consecutive_dtx_frames_;
|
||||
|
||||
friend struct AudioEncoderOpus;
|
||||
|
||||
@ -198,20 +198,20 @@ TEST(AudioEncoderOpusTest,
|
||||
const int kMinBitrateBps = 6000;
|
||||
const int kMaxBitrateBps = 510000;
|
||||
// Set a too low bitrate.
|
||||
states->encoder->OnReceivedUplinkBandwidth(kMinBitrateBps - 1, rtc::nullopt);
|
||||
states->encoder->OnReceivedUplinkBandwidth(kMinBitrateBps - 1, absl::nullopt);
|
||||
EXPECT_EQ(kMinBitrateBps, states->encoder->GetTargetBitrate());
|
||||
// Set a too high bitrate.
|
||||
states->encoder->OnReceivedUplinkBandwidth(kMaxBitrateBps + 1, rtc::nullopt);
|
||||
states->encoder->OnReceivedUplinkBandwidth(kMaxBitrateBps + 1, absl::nullopt);
|
||||
EXPECT_EQ(kMaxBitrateBps, states->encoder->GetTargetBitrate());
|
||||
// Set the minimum rate.
|
||||
states->encoder->OnReceivedUplinkBandwidth(kMinBitrateBps, rtc::nullopt);
|
||||
states->encoder->OnReceivedUplinkBandwidth(kMinBitrateBps, absl::nullopt);
|
||||
EXPECT_EQ(kMinBitrateBps, states->encoder->GetTargetBitrate());
|
||||
// Set the maximum rate.
|
||||
states->encoder->OnReceivedUplinkBandwidth(kMaxBitrateBps, rtc::nullopt);
|
||||
states->encoder->OnReceivedUplinkBandwidth(kMaxBitrateBps, absl::nullopt);
|
||||
EXPECT_EQ(kMaxBitrateBps, states->encoder->GetTargetBitrate());
|
||||
// Set rates from kMaxBitrateBps up to 32000 bps.
|
||||
for (int rate = kMinBitrateBps; rate <= 32000; rate += 1000) {
|
||||
states->encoder->OnReceivedUplinkBandwidth(rate, rtc::nullopt);
|
||||
states->encoder->OnReceivedUplinkBandwidth(rate, absl::nullopt);
|
||||
EXPECT_EQ(rate, states->encoder->GetTargetBitrate());
|
||||
}
|
||||
}
|
||||
@ -392,7 +392,7 @@ TEST(AudioEncoderOpusTest, DoNotInvokeSetTargetBitrateIfOverheadUnknown) {
|
||||
auto states = CreateCodec(2);
|
||||
|
||||
states->encoder->OnReceivedUplinkBandwidth(kDefaultOpusSettings.rate * 2,
|
||||
rtc::nullopt);
|
||||
absl::nullopt);
|
||||
|
||||
// Since |OnReceivedOverhead| has not been called, the codec bitrate should
|
||||
// not change.
|
||||
@ -409,7 +409,7 @@ TEST(AudioEncoderOpusTest, OverheadRemovedFromTargetAudioBitrate) {
|
||||
states->encoder->OnReceivedOverhead(kOverheadBytesPerPacket);
|
||||
|
||||
constexpr int kTargetBitrateBps = 40000;
|
||||
states->encoder->OnReceivedUplinkBandwidth(kTargetBitrateBps, rtc::nullopt);
|
||||
states->encoder->OnReceivedUplinkBandwidth(kTargetBitrateBps, absl::nullopt);
|
||||
|
||||
int packet_rate = rtc::CheckedDivExact(48000, kDefaultOpusSettings.pacsize);
|
||||
EXPECT_EQ(kTargetBitrateBps -
|
||||
@ -435,14 +435,14 @@ TEST(AudioEncoderOpusTest, BitrateBounded) {
|
||||
// subtracted. The eventual codec rate should be bounded by |kMinBitrateBps|.
|
||||
int target_bitrate =
|
||||
kOverheadBytesPerPacket * 8 * packet_rate + kMinBitrateBps - 1;
|
||||
states->encoder->OnReceivedUplinkBandwidth(target_bitrate, rtc::nullopt);
|
||||
states->encoder->OnReceivedUplinkBandwidth(target_bitrate, absl::nullopt);
|
||||
EXPECT_EQ(kMinBitrateBps, states->encoder->GetTargetBitrate());
|
||||
|
||||
// Set a target rate that is greater than |kMaxBitrateBps| when overhead is
|
||||
// subtracted. The eventual codec rate should be bounded by |kMaxBitrateBps|.
|
||||
target_bitrate =
|
||||
kOverheadBytesPerPacket * 8 * packet_rate + kMaxBitrateBps + 1;
|
||||
states->encoder->OnReceivedUplinkBandwidth(target_bitrate, rtc::nullopt);
|
||||
states->encoder->OnReceivedUplinkBandwidth(target_bitrate, absl::nullopt);
|
||||
EXPECT_EQ(kMaxBitrateBps, states->encoder->GetTargetBitrate());
|
||||
}
|
||||
|
||||
@ -454,7 +454,7 @@ TEST(AudioEncoderOpusTest, ConfigComplexityAdaptation) {
|
||||
|
||||
// Bitrate within hysteresis window. Expect empty output.
|
||||
config.bitrate_bps = 12500;
|
||||
EXPECT_EQ(rtc::nullopt, AudioEncoderOpusImpl::GetNewComplexity(config));
|
||||
EXPECT_EQ(absl::nullopt, AudioEncoderOpusImpl::GetNewComplexity(config));
|
||||
|
||||
// Bitrate below hysteresis window. Expect higher complexity.
|
||||
config.bitrate_bps = 10999;
|
||||
@ -462,7 +462,7 @@ TEST(AudioEncoderOpusTest, ConfigComplexityAdaptation) {
|
||||
|
||||
// Bitrate within hysteresis window. Expect empty output.
|
||||
config.bitrate_bps = 12500;
|
||||
EXPECT_EQ(rtc::nullopt, AudioEncoderOpusImpl::GetNewComplexity(config));
|
||||
EXPECT_EQ(absl::nullopt, AudioEncoderOpusImpl::GetNewComplexity(config));
|
||||
|
||||
// Bitrate above hysteresis window. Expect lower complexity.
|
||||
config.bitrate_bps = 14001;
|
||||
@ -488,9 +488,9 @@ TEST(AudioEncoderOpusTest, ConfigBandwidthAdaptation) {
|
||||
: 1));
|
||||
|
||||
// Bitrate below minmum wideband. Expect narrowband.
|
||||
config.bitrate_bps = rtc::Optional<int>(7999);
|
||||
config.bitrate_bps = absl::optional<int>(7999);
|
||||
auto bandwidth = AudioEncoderOpusImpl::GetNewBandwidth(config, inst);
|
||||
EXPECT_EQ(rtc::Optional<int>(OPUS_BANDWIDTH_NARROWBAND), bandwidth);
|
||||
EXPECT_EQ(absl::optional<int>(OPUS_BANDWIDTH_NARROWBAND), bandwidth);
|
||||
WebRtcOpus_SetBandwidth(inst, *bandwidth);
|
||||
// It is necessary to encode here because Opus has some logic in the encoder
|
||||
// that goes from the user-set bandwidth to the used and returned one.
|
||||
@ -499,14 +499,14 @@ TEST(AudioEncoderOpusTest, ConfigBandwidthAdaptation) {
|
||||
kMaxBytes, bitstream);
|
||||
|
||||
// Bitrate not yet above maximum narrowband. Expect empty.
|
||||
config.bitrate_bps = rtc::Optional<int>(9000);
|
||||
config.bitrate_bps = absl::optional<int>(9000);
|
||||
bandwidth = AudioEncoderOpusImpl::GetNewBandwidth(config, inst);
|
||||
EXPECT_EQ(rtc::Optional<int>(), bandwidth);
|
||||
EXPECT_EQ(absl::optional<int>(), bandwidth);
|
||||
|
||||
// Bitrate above maximum narrowband. Expect wideband.
|
||||
config.bitrate_bps = rtc::Optional<int>(9001);
|
||||
config.bitrate_bps = absl::optional<int>(9001);
|
||||
bandwidth = AudioEncoderOpusImpl::GetNewBandwidth(config, inst);
|
||||
EXPECT_EQ(rtc::Optional<int>(OPUS_BANDWIDTH_WIDEBAND), bandwidth);
|
||||
EXPECT_EQ(absl::optional<int>(OPUS_BANDWIDTH_WIDEBAND), bandwidth);
|
||||
WebRtcOpus_SetBandwidth(inst, *bandwidth);
|
||||
// It is necessary to encode here because Opus has some logic in the encoder
|
||||
// that goes from the user-set bandwidth to the used and returned one.
|
||||
@ -515,14 +515,14 @@ TEST(AudioEncoderOpusTest, ConfigBandwidthAdaptation) {
|
||||
kMaxBytes, bitstream);
|
||||
|
||||
// Bitrate not yet below minimum wideband. Expect empty.
|
||||
config.bitrate_bps = rtc::Optional<int>(8000);
|
||||
config.bitrate_bps = absl::optional<int>(8000);
|
||||
bandwidth = AudioEncoderOpusImpl::GetNewBandwidth(config, inst);
|
||||
EXPECT_EQ(rtc::Optional<int>(), bandwidth);
|
||||
EXPECT_EQ(absl::optional<int>(), bandwidth);
|
||||
|
||||
// Bitrate above automatic threshold. Expect automatic.
|
||||
config.bitrate_bps = rtc::Optional<int>(12001);
|
||||
config.bitrate_bps = absl::optional<int>(12001);
|
||||
bandwidth = AudioEncoderOpusImpl::GetNewBandwidth(config, inst);
|
||||
EXPECT_EQ(rtc::Optional<int>(OPUS_AUTO), bandwidth);
|
||||
EXPECT_EQ(absl::optional<int>(OPUS_AUTO), bandwidth);
|
||||
|
||||
EXPECT_EQ(0, WebRtcOpus_EncoderFree(inst));
|
||||
}
|
||||
@ -586,7 +586,7 @@ TEST(AudioEncoderOpusTest, EncodeAtMinBitrate) {
|
||||
rtc::Buffer encoded;
|
||||
uint32_t rtp_timestamp = 12345; // Just a number not important to this test.
|
||||
|
||||
states->encoder->OnReceivedUplinkBandwidth(0, rtc::nullopt);
|
||||
states->encoder->OnReceivedUplinkBandwidth(0, absl::nullopt);
|
||||
for (int packet_index = 0; packet_index < kNumPacketsToEncode;
|
||||
packet_index++) {
|
||||
// Make sure we are not encoding before we have enough data for
|
||||
|
||||
@ -110,7 +110,7 @@ TEST(BandwidthAdaptationTest, BandwidthAdaptationTest) {
|
||||
|
||||
// Create encoder.
|
||||
AudioEncoderOpusConfig enc_config;
|
||||
enc_config.bitrate_bps = rtc::Optional<int>(7999);
|
||||
enc_config.bitrate_bps = absl::optional<int>(7999);
|
||||
enc_config.num_channels = kNumChannels;
|
||||
constexpr int payload_type = 17;
|
||||
auto encoder = AudioEncoderOpus::MakeAudioEncoder(enc_config, payload_type);
|
||||
|
||||
Reference in New Issue
Block a user