Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(446)

Unified Diff: webrtc/modules/audio_coding/neteq/decoder_database.h

Issue 2472083002: NetEq: Don't forget to save the codec name (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/neteq/decoder_database.h
diff --git a/webrtc/modules/audio_coding/neteq/decoder_database.h b/webrtc/modules/audio_coding/neteq/decoder_database.h
index 157e0225d2282fa006f4a578235e78d3b18f9d37..6e172600b7b304bd50fb303709324009887e4109 100644
--- a/webrtc/modules/audio_coding/neteq/decoder_database.h
+++ b/webrtc/modules/audio_coding/neteq/decoder_database.h
@@ -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_;

Powered by Google App Engine
This is Rietveld 408576698