Index: webrtc/modules/video_coding/codec_database.h |
diff --git a/webrtc/modules/video_coding/codec_database.h b/webrtc/modules/video_coding/codec_database.h |
index 1317e2262c2d9ddec6483389b36b185bb413f071..5f8656df8d82f2179a3fe5a752f98e3b6646b0f4 100644 |
--- a/webrtc/modules/video_coding/codec_database.h |
+++ b/webrtc/modules/video_coding/codec_database.h |
@@ -107,9 +107,9 @@ class VCMCodecDataBase { |
const VCMEncodedFrame& frame, |
VCMDecodedFrameCallback* decoded_frame_callback); |
- // Deletes the memory of the decoder instance |decoder|. Used to delete |
- // deep copies returned by CreateDecoderCopy(). |
- void ReleaseDecoder(VCMGenericDecoder* decoder) const; |
+ // Returns the current decoder (i.e. the same value as was last returned from |
+ // GetDecoder(); |
+ VCMGenericDecoder* GetCurrentDecoder(); |
// Returns true if the currently active decoder prefer to decode frames late. |
// That means that frames must be decoded near the render times stamp. |
@@ -121,8 +121,9 @@ class VCMCodecDataBase { |
typedef std::map<uint8_t, VCMDecoderMapItem*> DecoderMap; |
typedef std::map<uint8_t, VCMExtDecoderMapItem*> ExternalDecoderMap; |
- VCMGenericDecoder* CreateAndInitDecoder(const VCMEncodedFrame& frame, |
- VideoCodec* new_codec) const; |
+ std::unique_ptr<VCMGenericDecoder> CreateAndInitDecoder( |
+ const VCMEncodedFrame& frame, |
+ VideoCodec* new_codec) const; |
// Determines whether a new codec has to be created or not. |
// Checks every setting apart from maxFramerate and startBitrate. |
@@ -130,9 +131,6 @@ class VCMCodecDataBase { |
void DeleteEncoder(); |
- // Create an internal Decoder given a codec type |
- VCMGenericDecoder* CreateDecoder(VideoCodecType type) const; |
- |
const VCMDecoderMapItem* FindDecoderItem(uint8_t payload_type) const; |
const VCMExtDecoderMapItem* FindExternalDecoderItem( |
@@ -149,7 +147,7 @@ class VCMCodecDataBase { |
bool internal_source_; |
VCMEncodedFrameCallback* const encoded_frame_callback_; |
std::unique_ptr<VCMGenericEncoder> ptr_encoder_; |
- VCMGenericDecoder* ptr_decoder_; |
+ std::unique_ptr<VCMGenericDecoder> ptr_decoder_; |
DecoderMap dec_map_; |
ExternalDecoderMap dec_external_map_; |
}; // VCMCodecDataBase |