| 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 ea70997c14e9d321c73fcfb942fef686aae7cf04..866e550130a97a62c7b879dbb188e724a1983590 100644
|
| --- a/webrtc/modules/audio_coding/neteq/decoder_database.h
|
| +++ b/webrtc/modules/audio_coding/neteq/decoder_database.h
|
| @@ -12,8 +12,10 @@
|
| #define WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECODER_DATABASE_H_
|
|
|
| #include <map>
|
| +#include <string>
|
|
|
| #include "webrtc/base/constructormagic.h"
|
| +#include "webrtc/base/scoped_ptr.h"
|
| #include "webrtc/common_types.h" // NULL
|
| #include "webrtc/modules/audio_coding/neteq/audio_decoder_impl.h"
|
| #include "webrtc/modules/audio_coding/neteq/packet.h"
|
| @@ -35,25 +37,28 @@ class DecoderDatabase {
|
|
|
| // Struct used to store decoder info in the database.
|
| struct DecoderInfo {
|
| - // Constructors.
|
| - DecoderInfo()
|
| - : codec_type(NetEqDecoder::kDecoderArbitrary),
|
| - fs_hz(8000),
|
| - decoder(NULL),
|
| - external(false) {}
|
| + DecoderInfo() = default;
|
| DecoderInfo(NetEqDecoder ct, int fs, AudioDecoder* dec, bool ext)
|
| + : DecoderInfo(ct, "", fs, dec, ext) {}
|
| + DecoderInfo(NetEqDecoder ct,
|
| + const std::string& nm,
|
| + int fs,
|
| + AudioDecoder* dec,
|
| + bool ext)
|
| : codec_type(ct),
|
| + name(nm),
|
| fs_hz(fs),
|
| + rtp_sample_rate_hz(fs),
|
| decoder(dec),
|
| - external(ext) {
|
| - }
|
| - // Destructor. (Defined in decoder_database.cc.)
|
| + external(ext) {}
|
| ~DecoderInfo();
|
|
|
| - NetEqDecoder codec_type;
|
| - int fs_hz;
|
| - AudioDecoder* decoder;
|
| - bool external;
|
| + NetEqDecoder codec_type = NetEqDecoder::kDecoderArbitrary;
|
| + std::string name;
|
| + int fs_hz = 8000;
|
| + int rtp_sample_rate_hz = 8000;
|
| + AudioDecoder* decoder = nullptr;
|
| + bool external = false;
|
| };
|
|
|
| // Maximum value for 8 bits, and an invalid RTP payload type (since it is
|
| @@ -84,7 +89,9 @@ class DecoderDatabase {
|
| // as a decoder of type |codec_type| with |rtp_payload_type|.
|
| virtual int InsertExternal(uint8_t rtp_payload_type,
|
| NetEqDecoder codec_type,
|
| - int fs_hz, AudioDecoder* decoder);
|
| + const std::string& codec_name,
|
| + int fs_hz,
|
| + AudioDecoder* decoder);
|
|
|
| // Removes the entry for |rtp_payload_type| from the database.
|
| // Returns kDecoderNotFound or kOK depending on the outcome of the operation.
|
|
|