NetEq: Don't forget to save the codec name
BUG=chromium:661362
Review-Url: https://codereview.webrtc.org/2472083002
Cr-Commit-Position: refs/heads/master@{#14909}
diff --git a/webrtc/modules/audio_coding/neteq/decoder_database.h b/webrtc/modules/audio_coding/neteq/decoder_database.h
index 157e022..6e17260 100644
--- a/webrtc/modules/audio_coding/neteq/decoder_database.h
+++ b/webrtc/modules/audio_coding/neteq/decoder_database.h
@@ -41,11 +41,16 @@
// Class that stores decoder info in the database.
class DecoderInfo {
public:
+ DecoderInfo(const SdpAudioFormat& audio_format,
+ AudioDecoderFactory* factory,
+ const std::string& codec_name);
explicit DecoderInfo(const SdpAudioFormat& audio_format,
AudioDecoderFactory* factory = nullptr);
explicit DecoderInfo(NetEqDecoder ct,
AudioDecoderFactory* factory = nullptr);
- DecoderInfo(const SdpAudioFormat& audio_format, AudioDecoder* ext_dec);
+ DecoderInfo(const SdpAudioFormat& audio_format,
+ AudioDecoder* ext_dec,
+ const std::string& codec_name);
DecoderInfo(DecoderInfo&&);
~DecoderInfo();
@@ -85,12 +90,14 @@
// Returns true if the decoder's format is named |name|.
bool IsType(const std::string& name) const;
- // TODO(ossu): |name| is kept here while we retain the old external decoder
- // interface. Remove this once using an AudioDecoderFactory has
- // supplanted the old functionality.
- std::string name;
+ const std::string& get_name() const { return name_; }
private:
+ // TODO(ossu): |name_| is kept here while we retain the old external
+ // decoder interface. Remove this once using an
+ // AudioDecoderFactory has supplanted the old functionality.
+ const std::string name_;
+
const SdpAudioFormat audio_format_;
AudioDecoderFactory* const factory_;
mutable std::unique_ptr<AudioDecoder> decoder_;