AudioCodingModule: Specify decoders using SdpAudioFormat
NetEq already uses SdpAudioFormat internally; this CL adds an
AudioCodingModule::RegisterReceiveCodec overload that accepts
SdpAudioFormat, and propagates it through AcmReceiver into NetEq.
The intention is to get rid of the other ways to specify decoders and
always use SdpAudioFormat. (And eventually to do the same for encoders
too.)
NOTRY=true
BUG=5801
Review-Url: https://codereview.webrtc.org/2365653004
Cr-Commit-Position: refs/heads/master@{#14506}
diff --git a/webrtc/modules/audio_coding/neteq/include/neteq.h b/webrtc/modules/audio_coding/neteq/include/neteq.h
index 8520905..5b17e12 100644
--- a/webrtc/modules/audio_coding/neteq/include/neteq.h
+++ b/webrtc/modules/audio_coding/neteq/include/neteq.h
@@ -178,6 +178,11 @@
const std::string& codec_name,
uint8_t rtp_payload_type) = 0;
+ // Associates |rtp_payload_type| with the given codec, which NetEq will
+ // instantiate when it needs it. Returns true iff successful.
+ virtual bool RegisterPayloadType(int rtp_payload_type,
+ const SdpAudioFormat& audio_format) = 0;
+
// Removes |rtp_payload_type| from the codec database. Returns 0 on success,
// -1 on failure.
virtual int RemovePayloadType(uint8_t rtp_payload_type) = 0;