Fix cyclic deps: rent_a_codec<->audio_coding and rent_a_codec<->neteq
In short, what I did was to
* Remove acm_common_defs.h (the stuff in it was used only by
acm_codec_database.cc).
* Move audio_coding_module_typedefs.h to a new build target.
* Move the NetEqDecoder enum (and the associated
NetEqDecoderToSdpAudioFormat function) to a new file in a new
build target.
BUG=webrtc:7243, webrtc:7244
Review-Url: https://codereview.webrtc.org/2723253005
Cr-Commit-Position: refs/heads/master@{#17005}
diff --git a/webrtc/modules/audio_coding/neteq/decoder_database.cc b/webrtc/modules/audio_coding/neteq/decoder_database.cc
index 16bec04..d147d67 100644
--- a/webrtc/modules/audio_coding/neteq/decoder_database.cc
+++ b/webrtc/modules/audio_coding/neteq/decoder_database.cc
@@ -42,8 +42,7 @@
DecoderDatabase::DecoderInfo::DecoderInfo(NetEqDecoder ct,
AudioDecoderFactory* factory)
- : DecoderInfo(*acm2::RentACodec::NetEqDecoderToSdpAudioFormat(ct),
- factory) {}
+ : DecoderInfo(*NetEqDecoderToSdpAudioFormat(ct), factory) {}
DecoderDatabase::DecoderInfo::DecoderInfo(const SdpAudioFormat& audio_format,
AudioDecoder* ext_dec,
@@ -135,8 +134,7 @@
!CodecSupported(codec_type)) {
return kCodecNotSupported;
}
- const auto opt_format =
- acm2::RentACodec::NetEqDecoderToSdpAudioFormat(codec_type);
+ const auto opt_format = NetEqDecoderToSdpAudioFormat(codec_type);
if (!opt_format) {
return kCodecNotSupported;
}
@@ -175,8 +173,7 @@
return kInvalidPointer;
}
- const auto opt_db_format =
- acm2::RentACodec::NetEqDecoderToSdpAudioFormat(codec_type);
+ const auto opt_db_format = NetEqDecoderToSdpAudioFormat(codec_type);
const SdpAudioFormat format = opt_db_format.value_or({"arbitrary", 0, 0});
std::pair<DecoderMap::iterator, bool> ret;