NetEq: Add codec name and RTP timestamp rate to DecoderInfo
The new fields are default-populated for built-in decoders, but for
external decoders, the name can now be given when registering the
decoder.
BUG=webrtc:3520
Review URL: https://codereview.webrtc.org/1484343003
Cr-Commit-Position: refs/heads/master@{#10952}
diff --git a/webrtc/modules/audio_coding/neteq/include/neteq.h b/webrtc/modules/audio_coding/neteq/include/neteq.h
index 88677d8..abe09a3 100644
--- a/webrtc/modules/audio_coding/neteq/include/neteq.h
+++ b/webrtc/modules/audio_coding/neteq/include/neteq.h
@@ -174,17 +174,24 @@
size_t* samples_per_channel, int* num_channels,
NetEqOutputType* type) = 0;
- // Associates |rtp_payload_type| with |codec| and stores the information in
- // the codec database. Returns 0 on success, -1 on failure.
+ // Associates |rtp_payload_type| with |codec| and |codec_name|, and stores the
+ // information in the codec database. Returns 0 on success, -1 on failure.
+ // The name is only used to provide information back to the caller about the
+ // decoders. Hence, the name is arbitrary, and may be empty.
virtual int RegisterPayloadType(NetEqDecoder codec,
+ const std::string& codec_name,
uint8_t rtp_payload_type) = 0;
// Provides an externally created decoder object |decoder| to insert in the
// decoder database. The decoder implements a decoder of type |codec| and
- // associates it with |rtp_payload_type|. The decoder will produce samples
- // at the rate |sample_rate_hz|. Returns kOK on success, kFail on failure.
+ // associates it with |rtp_payload_type| and |codec_name|. The decoder will
+ // produce samples at the rate |sample_rate_hz|. Returns kOK on success, kFail
+ // on failure.
+ // The name is only used to provide information back to the caller about the
+ // decoders. Hence, the name is arbitrary, and may be empty.
virtual int RegisterExternalDecoder(AudioDecoder* decoder,
NetEqDecoder codec,
+ const std::string& codec_name,
uint8_t rtp_payload_type,
int sample_rate_hz) = 0;