Renamed new EncodeInternal to EncodeImpl to ensure proper backwards compatibility.

Renamed the new variant of EncodeInternal to EncodeImpl, so that
subclasses implementing one of the EncodeInternal don't need to
explicitly contain 'using AudioEncoder::EncodeInternal' to avoid their
implementation hiding the other variant of EncodeInternal. This causes
a warning (treated as an error) when building using GCC.

Review URL: https://codereview.webrtc.org/1764583003

Cr-Commit-Position: refs/heads/master@{#11868}
diff --git a/webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc b/webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc
index 00c1f04..463ff7b 100644
--- a/webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc
+++ b/webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc
@@ -1648,7 +1648,7 @@
   EXPECT_CALL(mock_encoder, GetTargetBitrate())
       .Times(AtLeast(1))
       .WillRepeatedly(Invoke(&encoder, &AudioEncoderPcmU::GetTargetBitrate));
-  EXPECT_CALL(mock_encoder, EncodeInternal(_, _, _))
+  EXPECT_CALL(mock_encoder, EncodeImpl(_, _, _))
       .Times(AtLeast(1))
       .WillRepeatedly(Invoke(&encoder,
                              static_cast<
diff --git a/webrtc/modules/audio_coding/acm2/rent_a_codec_unittest.cc b/webrtc/modules/audio_coding/acm2/rent_a_codec_unittest.cc
index bc68f15..8cc59d6 100644
--- a/webrtc/modules/audio_coding/acm2/rent_a_codec_unittest.cc
+++ b/webrtc/modules/audio_coding/acm2/rent_a_codec_unittest.cc
@@ -122,14 +122,14 @@
     ::testing::InSequence s;
     info.encoded_timestamp = 0;
     EXPECT_CALL(external_encoder,
-                EncodeInternal(0, rtc::ArrayView<const int16_t>(audio),
+                EncodeImpl(0, rtc::ArrayView<const int16_t>(audio),
                                &encoded))
         .WillOnce(Return(info));
     EXPECT_CALL(external_encoder, Mark("A"));
     EXPECT_CALL(external_encoder, Mark("B"));
     info.encoded_timestamp = 2;
     EXPECT_CALL(external_encoder,
-                EncodeInternal(2, rtc::ArrayView<const int16_t>(audio),
+                EncodeImpl(2, rtc::ArrayView<const int16_t>(audio),
                                &encoded))
         .WillOnce(Return(info));
     EXPECT_CALL(external_encoder, Die());
diff --git a/webrtc/modules/audio_coding/codecs/audio_encoder.cc b/webrtc/modules/audio_coding/codecs/audio_encoder.cc
index 0520918..6f793e2 100644
--- a/webrtc/modules/audio_coding/codecs/audio_encoder.cc
+++ b/webrtc/modules/audio_coding/codecs/audio_encoder.cc
@@ -32,7 +32,7 @@
                static_cast<size_t>(NumChannels() * SampleRateHz() / 100));
 
   const size_t old_size = encoded->size();
-  EncodedInfo info = EncodeInternal(rtp_timestamp, audio, encoded);
+  EncodedInfo info = EncodeImpl(rtp_timestamp, audio, encoded);
   RTC_CHECK_EQ(encoded->size() - old_size, info.encoded_bytes);
   return info;
 }
@@ -59,7 +59,7 @@
   return info;
 }
 
-AudioEncoder::EncodedInfo AudioEncoder::EncodeInternal(
+AudioEncoder::EncodedInfo AudioEncoder::EncodeImpl(
     uint32_t rtp_timestamp,
     rtc::ArrayView<const int16_t> audio,
     rtc::Buffer* encoded)
@@ -80,7 +80,7 @@
     uint8_t* encoded)
 {
   rtc::Buffer temp_buffer;
-  EncodedInfo info = EncodeInternal(rtp_timestamp, audio, &temp_buffer);
+  EncodedInfo info = EncodeImpl(rtp_timestamp, audio, &temp_buffer);
   RTC_DCHECK_LE(temp_buffer.size(), max_encoded_bytes);
   std::memcpy(encoded, temp_buffer.data(), info.encoded_bytes);
   return info;
diff --git a/webrtc/modules/audio_coding/codecs/audio_encoder.h b/webrtc/modules/audio_coding/codecs/audio_encoder.h
index 8da7ebd..3fdee25 100644
--- a/webrtc/modules/audio_coding/codecs/audio_encoder.h
+++ b/webrtc/modules/audio_coding/codecs/audio_encoder.h
@@ -89,7 +89,7 @@
   // NumChannels() samples). Multi-channel audio must be sample-interleaved.
   // The encoder appends zero or more bytes of output to |encoded| and returns
   // additional encoding information.  Encode() checks some preconditions, calls
-  // EncodeInternal() which does the actual work, and then checks some
+  // EncodeImpl() which does the actual work, and then checks some
   // postconditions.
   EncodedInfo Encode(uint32_t rtp_timestamp,
                      rtc::ArrayView<const int16_t> audio,
@@ -110,12 +110,12 @@
                                 size_t max_encoded_bytes,
                                 uint8_t* encoded);
 
-  // Deprecated interface of EncodeInternal (also bug 5591). May incur a copy.
+  // Deprecated interface EncodeInternal (see bug 5591). May incur a copy.
   // Subclasses implement this to perform the actual encoding. Called by
   // Encode(). By default, this is implemented as a call to the newer
-  // EncodeInternal() that accepts an rtc::Buffer instead of a raw pointer.
-  // That version is protected, so see below. At least one of the two
-  // interfaces of EncodeInternal _must_ be implemented by a subclass.
+  // EncodeImpl() that accepts an rtc::Buffer instead of a raw pointer.
+  // That version is protected, so see below. At least one of EncodeInternal
+  // or EncodeImpl _must_ be implemented by a subclass.
   virtual EncodedInfo EncodeInternal(
       uint32_t rtp_timestamp,
       rtc::ArrayView<const int16_t> audio,
@@ -163,12 +163,12 @@
  protected:
   // Subclasses implement this to perform the actual encoding. Called by
   // Encode(). For compatibility reasons, this is implemented by default as a
-  // call to the older version of EncodeInternal(). At least one of the two
-  // interfaces of EncodeInternal _must_ be implemented by a subclass.
-  // Preferably this one.
-  virtual EncodedInfo EncodeInternal(uint32_t rtp_timestamp,
-                                     rtc::ArrayView<const int16_t> audio,
-                                     rtc::Buffer* encoded);
+  // call to the older interface EncodeInternal(). At least one of
+  // EncodeInternal or EncodeImpl _must_ be implemented by a
+  // subclass. Preferably this one.
+  virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp,
+                                 rtc::ArrayView<const int16_t> audio,
+                                 rtc::Buffer* encoded);
 };
 }  // namespace webrtc
 #endif  // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_
diff --git a/webrtc/modules/audio_coding/codecs/audio_encoder_unittest.cc b/webrtc/modules/audio_coding/codecs/audio_encoder_unittest.cc
index 8252c6a..71ffcde 100644
--- a/webrtc/modules/audio_coding/codecs/audio_encoder_unittest.cc
+++ b/webrtc/modules/audio_coding/codecs/audio_encoder_unittest.cc
@@ -37,7 +37,7 @@
   EXPECT_CALL(old_impl, EncodeInternal(_, _, _, _)).WillOnce(
       Invoke(MockAudioEncoderDeprecated::CopyEncoding(payload)));
 
-  EXPECT_CALL(new_impl, EncodeInternal(_, _, _)).WillOnce(
+  EXPECT_CALL(new_impl, EncodeImpl(_, _, _)).WillOnce(
       Invoke(MockAudioEncoder::CopyEncoding(payload)));
 
   int16_t audio[80];
diff --git a/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc b/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc
index ab699ca..5daf7be 100644
--- a/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc
+++ b/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc
@@ -97,7 +97,7 @@
   return speech_encoder_->GetTargetBitrate();
 }
 
-AudioEncoder::EncodedInfo AudioEncoderCng::EncodeInternal(
+AudioEncoder::EncodedInfo AudioEncoderCng::EncodeImpl(
     uint32_t rtp_timestamp,
     rtc::ArrayView<const int16_t> audio,
     rtc::Buffer* encoded) {
diff --git a/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.h b/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.h
index 3c24260..b581e32 100644
--- a/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.h
+++ b/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.h
@@ -30,8 +30,6 @@
 
 class AudioEncoderCng final : public AudioEncoder {
  public:
-  using AudioEncoder::EncodeInternal;
-
   struct Config {
     bool IsOk() const;
 
@@ -59,9 +57,9 @@
   size_t Num10MsFramesInNextPacket() const override;
   size_t Max10MsFramesInAPacket() const override;
   int GetTargetBitrate() const override;
-  EncodedInfo EncodeInternal(uint32_t rtp_timestamp,
-                             rtc::ArrayView<const int16_t> audio,
-                             rtc::Buffer* encoded) override;
+  EncodedInfo EncodeImpl(uint32_t rtp_timestamp,
+                         rtc::ArrayView<const int16_t> audio,
+                         rtc::Buffer* encoded) override;
   void Reset() override;
   bool SetFec(bool enable) override;
   bool SetDtx(bool enable) override;
diff --git a/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc b/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc
index 459ccb5..a4416c9 100644
--- a/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc
+++ b/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc
@@ -88,11 +88,11 @@
     InSequence s;
     AudioEncoder::EncodedInfo info;
     for (size_t j = 0; j < num_calls - 1; ++j) {
-      EXPECT_CALL(mock_encoder_, EncodeInternal(_, _, _))
+      EXPECT_CALL(mock_encoder_, EncodeImpl(_, _, _))
           .WillOnce(Return(info));
     }
     info.encoded_bytes = kMockReturnEncodedBytes;
-    EXPECT_CALL(mock_encoder_, EncodeInternal(_, _, _))
+    EXPECT_CALL(mock_encoder_, EncodeImpl(_, _, _))
         .WillOnce(Invoke(
             MockAudioEncoder::FakeEncoding(kMockReturnEncodedBytes)));
   }
@@ -108,7 +108,7 @@
         .WillRepeatedly(Return(active_speech ? Vad::kActive : Vad::kPassive));
 
     // Don't expect any calls to the encoder yet.
-    EXPECT_CALL(mock_encoder_, EncodeInternal(_, _, _)).Times(0);
+    EXPECT_CALL(mock_encoder_, EncodeImpl(_, _, _)).Times(0);
     for (size_t i = 0; i < blocks_per_frame - 1; ++i) {
       Encode();
       EXPECT_EQ(0u, encoded_info_.encoded_bytes);
@@ -259,7 +259,7 @@
   EXPECT_CALL(*mock_vad_, VoiceActivity(_, _, _))
       .WillRepeatedly(Return(Vad::kPassive));
   // Expect no calls at all to the speech encoder mock.
-  EXPECT_CALL(mock_encoder_, EncodeInternal(_, _, _)).Times(0);
+  EXPECT_CALL(mock_encoder_, EncodeImpl(_, _, _)).Times(0);
   uint32_t expected_timestamp = timestamp_;
   for (size_t i = 0; i < 100; ++i) {
     Encode();
@@ -341,7 +341,7 @@
 // Verifies that the correct payload type is set when CNG is encoded.
 TEST_F(AudioEncoderCngTest, VerifyCngPayloadType) {
   CreateCng();
-  EXPECT_CALL(mock_encoder_, EncodeInternal(_, _, _)).Times(0);
+  EXPECT_CALL(mock_encoder_, EncodeImpl(_, _, _)).Times(0);
   EXPECT_CALL(mock_encoder_, Num10MsFramesInNextPacket()).WillOnce(Return(1U));
   EXPECT_CALL(*mock_vad_, VoiceActivity(_, _, _))
       .WillOnce(Return(Vad::kPassive));
@@ -373,7 +373,7 @@
   encoded_info_.payload_type = 0;
   EXPECT_CALL(*mock_vad_, VoiceActivity(_, _, _))
       .WillOnce(Return(Vad::kActive));
-  EXPECT_CALL(mock_encoder_, EncodeInternal(_, _, _)).WillOnce(
+  EXPECT_CALL(mock_encoder_, EncodeImpl(_, _, _)).WillOnce(
       Invoke(MockAudioEncoder::FakeEncoding(kMockReturnEncodedBytes)));
   Encode();
   EXPECT_EQ(kMockReturnEncodedBytes, encoded_info_.encoded_bytes);
diff --git a/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc b/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc
index d850675..a24b152 100644
--- a/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc
+++ b/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc
@@ -77,7 +77,7 @@
       8 * BytesPerSample() * SampleRateHz() * NumChannels());
 }
 
-AudioEncoder::EncodedInfo AudioEncoderPcm::EncodeInternal(
+AudioEncoder::EncodedInfo AudioEncoderPcm::EncodeImpl(
     uint32_t rtp_timestamp,
     rtc::ArrayView<const int16_t> audio,
     rtc::Buffer* encoded) {
diff --git a/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h b/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h
index 0b8baab..6b3cebfb 100644
--- a/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h
+++ b/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h
@@ -20,8 +20,6 @@
 
 class AudioEncoderPcm : public AudioEncoder {
  public:
-  using AudioEncoder::EncodeInternal;
-
   struct Config {
    public:
     bool IsOk() const;
@@ -48,9 +46,9 @@
  protected:
   AudioEncoderPcm(const Config& config, int sample_rate_hz);
 
-  EncodedInfo EncodeInternal(uint32_t rtp_timestamp,
-                             rtc::ArrayView<const int16_t> audio,
-                             rtc::Buffer* encoded) override;
+  EncodedInfo EncodeImpl(uint32_t rtp_timestamp,
+                         rtc::ArrayView<const int16_t> audio,
+                         rtc::Buffer* encoded) override;
 
   virtual size_t EncodeCall(const int16_t* audio,
                             size_t input_len,
diff --git a/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.cc b/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.cc
index 57d9594..9256518 100644
--- a/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.cc
+++ b/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.cc
@@ -97,7 +97,7 @@
     RTC_CHECK_EQ(0, WebRtcG722_EncoderInit(encoders_[i].encoder));
 }
 
-AudioEncoder::EncodedInfo AudioEncoderG722::EncodeInternal(
+AudioEncoder::EncodedInfo AudioEncoderG722::EncodeImpl(
     uint32_t rtp_timestamp,
     rtc::ArrayView<const int16_t> audio,
     rtc::Buffer* encoded) {
diff --git a/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.h b/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.h
index 0d7b919..dec87b2 100644
--- a/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.h
+++ b/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.h
@@ -23,8 +23,6 @@
 
 class AudioEncoderG722 final : public AudioEncoder {
  public:
-  using AudioEncoder::EncodeInternal;
-
   struct Config {
     bool IsOk() const;
 
@@ -47,9 +45,9 @@
   void Reset() override;
 
 protected:
-  EncodedInfo EncodeInternal(uint32_t rtp_timestamp,
-                             rtc::ArrayView<const int16_t> audio,
-                             rtc::Buffer* encoded) override;
+  EncodedInfo EncodeImpl(uint32_t rtp_timestamp,
+                         rtc::ArrayView<const int16_t> audio,
+                         rtc::Buffer* encoded) override;
 
  private:
   // The encoder state for one channel.
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc b/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc
index 419fdfb..c7d7411 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc
+++ b/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc
@@ -89,7 +89,7 @@
   }
 }
 
-AudioEncoder::EncodedInfo AudioEncoderIlbc::EncodeInternal(
+AudioEncoder::EncodedInfo AudioEncoderIlbc::EncodeImpl(
     uint32_t rtp_timestamp,
     rtc::ArrayView<const int16_t> audio,
     rtc::Buffer* encoded) {
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.h b/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.h
index e0ba289..27329bb 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.h
+++ b/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.h
@@ -21,8 +21,6 @@
 
 class AudioEncoderIlbc final : public AudioEncoder {
  public:
-  using AudioEncoder::EncodeInternal;
-
   struct Config {
     bool IsOk() const;
 
@@ -42,9 +40,9 @@
   size_t Num10MsFramesInNextPacket() const override;
   size_t Max10MsFramesInAPacket() const override;
   int GetTargetBitrate() const override;
-  EncodedInfo EncodeInternal(uint32_t rtp_timestamp,
-                             rtc::ArrayView<const int16_t> audio,
-                             rtc::Buffer* encoded) override;
+  EncodedInfo EncodeImpl(uint32_t rtp_timestamp,
+                         rtc::ArrayView<const int16_t> audio,
+                         rtc::Buffer* encoded) override;
   void Reset() override;
 
  private:
diff --git a/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h b/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h
index 2e15fb5..e840f3b 100644
--- a/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h
+++ b/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h
@@ -23,8 +23,6 @@
 template <typename T>
 class AudioEncoderIsacT final : public AudioEncoder {
  public:
-  using AudioEncoder::EncodeInternal;
-
   // Allowed combinations of sample rate, frame size, and bit rate are
   //  - 16000 Hz, 30 ms, 10000-32000 bps
   //  - 16000 Hz, 60 ms, 10000-32000 bps
@@ -62,9 +60,9 @@
   size_t Num10MsFramesInNextPacket() const override;
   size_t Max10MsFramesInAPacket() const override;
   int GetTargetBitrate() const override;
-  EncodedInfo EncodeInternal(uint32_t rtp_timestamp,
-                             rtc::ArrayView<const int16_t> audio,
-                             rtc::Buffer* encoded) override;
+  EncodedInfo EncodeImpl(uint32_t rtp_timestamp,
+                         rtc::ArrayView<const int16_t> audio,
+                         rtc::Buffer* encoded) override;
   void Reset() override;
 
  private:
diff --git a/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h b/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h
index 3832216..3ad0f27 100644
--- a/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h
+++ b/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h
@@ -114,7 +114,7 @@
 }
 
 template <typename T>
-AudioEncoder::EncodedInfo AudioEncoderIsacT<T>::EncodeInternal(
+AudioEncoder::EncodedInfo AudioEncoderIsacT<T>::EncodeImpl(
     uint32_t rtp_timestamp,
     rtc::ArrayView<const int16_t> audio,
     rtc::Buffer* encoded) {
diff --git a/webrtc/modules/audio_coding/codecs/mock/mock_audio_encoder.h b/webrtc/modules/audio_coding/codecs/mock/mock_audio_encoder.h
index 09cd078..58a1e75 100644
--- a/webrtc/modules/audio_coding/codecs/mock/mock_audio_encoder.h
+++ b/webrtc/modules/audio_coding/codecs/mock/mock_audio_encoder.h
@@ -43,10 +43,8 @@
 
 class MockAudioEncoder final : public MockAudioEncoderBase {
  public:
-  using AudioEncoder::EncodeInternal;
-
   // Note, we explicitly chose not to create a mock for the Encode method.
-  MOCK_METHOD3(EncodeInternal,
+  MOCK_METHOD3(EncodeImpl,
                EncodedInfo(uint32_t timestamp,
                            rtc::ArrayView<const int16_t> audio,
                            rtc::Buffer* encoded));
@@ -96,8 +94,6 @@
 
 class MockAudioEncoderDeprecated final : public MockAudioEncoderBase {
  public:
-  using AudioEncoder::EncodeInternal;
-
   // Note, we explicitly chose not to create a mock for the Encode method.
   MOCK_METHOD4(EncodeInternal,
                EncodedInfo(uint32_t timestamp,
diff --git a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
index 1f68e15..a599e29 100644
--- a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
+++ b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
@@ -182,7 +182,7 @@
   RTC_CHECK_EQ(0, WebRtcOpus_SetBitRate(inst_, config_.bitrate_bps));
 }
 
-AudioEncoder::EncodedInfo AudioEncoderOpus::EncodeInternal(
+AudioEncoder::EncodedInfo AudioEncoderOpus::EncodeImpl(
     uint32_t rtp_timestamp,
     rtc::ArrayView<const int16_t> audio,
     rtc::Buffer* encoded) {
diff --git a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h
index 343acd7..3f11af1 100644
--- a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h
+++ b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h
@@ -23,8 +23,6 @@
 
 class AudioEncoderOpus final : public AudioEncoder {
  public:
-  using AudioEncoder::EncodeInternal;
-
   enum ApplicationMode {
     kVoip = 0,
     kAudio = 1,
@@ -82,9 +80,9 @@
   bool dtx_enabled() const { return config_.dtx_enabled; }
 
 protected:
-  EncodedInfo EncodeInternal(uint32_t rtp_timestamp,
-                             rtc::ArrayView<const int16_t> audio,
-                             rtc::Buffer* encoded) override;
+  EncodedInfo EncodeImpl(uint32_t rtp_timestamp,
+                         rtc::ArrayView<const int16_t> audio,
+                         rtc::Buffer* encoded) override;
 
  private:
   size_t Num10msFramesPerPacket() const;
diff --git a/webrtc/modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.h b/webrtc/modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.h
index d298b99..34a780b 100644
--- a/webrtc/modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.h
+++ b/webrtc/modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.h
@@ -19,8 +19,6 @@
 
 class AudioEncoderPcm16B final : public AudioEncoderPcm {
  public:
-  using AudioEncoder::EncodeInternal;
-
   struct Config : public AudioEncoderPcm::Config {
    public:
     Config() : AudioEncoderPcm::Config(107), sample_rate_hz(8000) {}
diff --git a/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc b/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc
index 1dde49d1..b5a124e 100644
--- a/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc
+++ b/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc
@@ -52,7 +52,7 @@
   return speech_encoder_->GetTargetBitrate();
 }
 
-AudioEncoder::EncodedInfo AudioEncoderCopyRed::EncodeInternal(
+AudioEncoder::EncodedInfo AudioEncoderCopyRed::EncodeImpl(
     uint32_t rtp_timestamp,
     rtc::ArrayView<const int16_t> audio,
     rtc::Buffer* encoded) {
diff --git a/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.h b/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.h
index 48cec65..2aa8edc 100644
--- a/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.h
+++ b/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.h
@@ -24,8 +24,6 @@
 // into one packet.
 class AudioEncoderCopyRed final : public AudioEncoder {
  public:
-  using AudioEncoder::EncodeInternal;
-
   struct Config {
    public:
     int payload_type;
@@ -53,9 +51,9 @@
   void SetTargetBitrate(int target_bps) override;
 
 protected:
-  EncodedInfo EncodeInternal(uint32_t rtp_timestamp,
-                             rtc::ArrayView<const int16_t> audio,
-                             rtc::Buffer* encoded) override;
+  EncodedInfo EncodeImpl(uint32_t rtp_timestamp,
+                         rtc::ArrayView<const int16_t> audio,
+                         rtc::Buffer* encoded) override;
 
  private:
   AudioEncoder* speech_encoder_;
diff --git a/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red_unittest.cc b/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red_unittest.cc
index 74b3f30..fefcbe2 100644
--- a/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red_unittest.cc
+++ b/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red_unittest.cc
@@ -115,12 +115,12 @@
 // encoder.
 TEST_F(AudioEncoderCopyRedTest, CheckImmediateEncode) {
   // Interleaving the EXPECT_CALL sequence with expectations on the MockFunction
-  // check ensures that exactly one call to EncodeInternal happens in each
+  // check ensures that exactly one call to EncodeImpl happens in each
   // Encode call.
   InSequence s;
   MockFunction<void(int check_point_id)> check;
   for (int i = 1; i <= 6; ++i) {
-    EXPECT_CALL(mock_encoder_, EncodeInternal(_, _, _))
+    EXPECT_CALL(mock_encoder_, EncodeImpl(_, _, _))
         .WillRepeatedly(Return(AudioEncoder::EncodedInfo()));
     EXPECT_CALL(check, Call(i));
     Encode();
@@ -134,7 +134,7 @@
   static const size_t kEncodedSize = 17;
   {
     InSequence s;
-    EXPECT_CALL(mock_encoder_, EncodeInternal(_, _, _))
+    EXPECT_CALL(mock_encoder_, EncodeImpl(_, _, _))
         .WillOnce(Invoke(MockAudioEncoder::FakeEncoding(kEncodedSize)))
         .WillOnce(Invoke(MockAudioEncoder::FakeEncoding(0)))
         .WillOnce(Invoke(MockAudioEncoder::FakeEncoding(kEncodedSize)));
@@ -165,7 +165,7 @@
   static const int kNumPackets = 10;
   InSequence s;
   for (int encode_size = 1; encode_size <= kNumPackets; ++encode_size) {
-    EXPECT_CALL(mock_encoder_, EncodeInternal(_, _, _))
+    EXPECT_CALL(mock_encoder_, EncodeImpl(_, _, _))
         .WillOnce(Invoke(MockAudioEncoder::FakeEncoding(encode_size)));
   }
 
@@ -191,7 +191,7 @@
   info.encoded_bytes = 17;
   info.encoded_timestamp = timestamp_;
 
-  EXPECT_CALL(mock_encoder_, EncodeInternal(_, _, _))
+  EXPECT_CALL(mock_encoder_, EncodeImpl(_, _, _))
       .WillOnce(Invoke(MockAudioEncoder::FakeEncoding(info)));
 
   // First call is a special case, since it does not include a secondary
@@ -202,7 +202,7 @@
   uint32_t secondary_timestamp = primary_timestamp;
   primary_timestamp = timestamp_;
   info.encoded_timestamp = timestamp_;
-  EXPECT_CALL(mock_encoder_, EncodeInternal(_, _, _))
+  EXPECT_CALL(mock_encoder_, EncodeImpl(_, _, _))
       .WillOnce(Invoke(MockAudioEncoder::FakeEncoding(info)));
 
   Encode();
@@ -221,7 +221,7 @@
   for (uint8_t i = 0; i < kPayloadLenBytes; ++i) {
     payload[i] = i;
   }
-  EXPECT_CALL(mock_encoder_, EncodeInternal(_, _, _))
+  EXPECT_CALL(mock_encoder_, EncodeImpl(_, _, _))
       .WillRepeatedly(Invoke(MockAudioEncoder::CopyEncoding(payload)));
 
   // First call is a special case, since it does not include a secondary
@@ -257,7 +257,7 @@
   AudioEncoder::EncodedInfo info;
   info.encoded_bytes = 17;
   info.payload_type = primary_payload_type;
-  EXPECT_CALL(mock_encoder_, EncodeInternal(_, _, _))
+  EXPECT_CALL(mock_encoder_, EncodeImpl(_, _, _))
       .WillOnce(Invoke(MockAudioEncoder::FakeEncoding(info)));
 
   // First call is a special case, since it does not include a secondary
@@ -269,7 +269,7 @@
 
   const int secondary_payload_type = red_payload_type_ + 2;
   info.payload_type = secondary_payload_type;
-  EXPECT_CALL(mock_encoder_, EncodeInternal(_, _, _))
+  EXPECT_CALL(mock_encoder_, EncodeImpl(_, _, _))
       .WillOnce(Invoke(MockAudioEncoder::FakeEncoding(info)));
 
   Encode();