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}
This commit is contained in:
@ -42,8 +42,7 @@ DecoderDatabase::DecoderInfo::DecoderInfo(const SdpAudioFormat& audio_format,
|
||||
|
||||
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 @@ int DecoderDatabase::RegisterPayload(uint8_t rtp_payload_type,
|
||||
!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 @@ int DecoderDatabase::InsertExternal(uint8_t rtp_payload_type,
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user