Hide the AudioEncoderCng class behind a create function
And put codecs/cng/webrtc_cng.h in a non-public build target while we're at it. Bug: webrtc:8396 Change-Id: I9f51dffadfb645cd1454617fad30e09d639ff53c Reviewed-on: https://webrtc-review.googlesource.com/c/108782 Reviewed-by: Ivo Creusen <ivoc@webrtc.org> Commit-Queue: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25486}
This commit is contained in:
@ -175,12 +175,12 @@ void TestRedFec::RegisterSendCodec(
|
||||
EXPECT_NE(encoder, nullptr);
|
||||
if (!absl::EqualsIgnoreCase(codec_format.name, "opus")) {
|
||||
if (vad_mode.has_value()) {
|
||||
AudioEncoderCng::Config config;
|
||||
AudioEncoderCngConfig config;
|
||||
config.speech_encoder = std::move(encoder);
|
||||
config.num_channels = 1;
|
||||
config.payload_type = cn_payload_type;
|
||||
config.vad_mode = vad_mode.value();
|
||||
encoder = absl::make_unique<AudioEncoderCng>(std::move(config));
|
||||
encoder = CreateComfortNoiseEncoder(std::move(config));
|
||||
EXPECT_EQ(true,
|
||||
other_acm->RegisterReceiveCodec(
|
||||
cn_payload_type, {"CN", codec_format.clockrate_hz, 1}));
|
||||
|
||||
@ -83,12 +83,12 @@ bool TestVadDtx::RegisterCodec(const SdpAudioFormat& codec_format,
|
||||
absl::nullopt);
|
||||
if (vad_mode.has_value() &&
|
||||
!absl::EqualsIgnoreCase(codec_format.name, "opus")) {
|
||||
AudioEncoderCng::Config config;
|
||||
AudioEncoderCngConfig config;
|
||||
config.speech_encoder = std::move(encoder);
|
||||
config.num_channels = 1;
|
||||
config.payload_type = cn_payload_type;
|
||||
config.vad_mode = vad_mode.value();
|
||||
encoder = absl::make_unique<AudioEncoderCng>(std::move(config));
|
||||
encoder = CreateComfortNoiseEncoder(std::move(config));
|
||||
added_comfort_noise = true;
|
||||
}
|
||||
channel_->SetIsStereo(encoder->NumChannels() > 1);
|
||||
|
||||
Reference in New Issue
Block a user