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}
This commit is contained in:
kwiberg
2016-11-03 05:29:05 -07:00
committed by Commit bot
parent 2dbaec7949
commit e941306bd6
4 changed files with 32 additions and 22 deletions

View File

@ -41,11 +41,16 @@ class DecoderDatabase {
// 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 @@ class DecoderDatabase {
// 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_;