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

Side by Side Diff: media/cdm/ppapi/external_clear_key/ffmpeg_cdm_video_decoder.h

Issue 1915443003: Replace scoped_ptr with std::unique_ptr in //media. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptr-media-base
Patch Set: scopedptr-media: rebase Created 4 years, 8 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_FFMPEG_CDM_VIDEO_DECODER_H_ 5 #ifndef MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_FFMPEG_CDM_VIDEO_DECODER_H_
6 #define MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_FFMPEG_CDM_VIDEO_DECODER_H_ 6 #define MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_FFMPEG_CDM_VIDEO_DECODER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
11
10 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
11 #include "base/macros.h" 13 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "media/cdm/ppapi/external_clear_key/cdm_video_decoder.h" 14 #include "media/cdm/ppapi/external_clear_key/cdm_video_decoder.h"
14 #include "media/cdm/ppapi/external_clear_key/clear_key_cdm_common.h" 15 #include "media/cdm/ppapi/external_clear_key/clear_key_cdm_common.h"
15 #include "media/ffmpeg/ffmpeg_deleters.h" 16 #include "media/ffmpeg/ffmpeg_deleters.h"
16 17
17 struct AVCodecContext; 18 struct AVCodecContext;
18 struct AVFrame; 19 struct AVFrame;
19 20
20 namespace media { 21 namespace media {
21 22
22 class FFmpegCdmVideoDecoder : public CdmVideoDecoder { 23 class FFmpegCdmVideoDecoder : public CdmVideoDecoder {
(...skipping 17 matching lines...) Expand all
40 const cdm::Size& data_size); 41 const cdm::Size& data_size);
41 42
42 private: 43 private:
43 // Allocates storage, then copies video frame stored in |av_frame_| to 44 // Allocates storage, then copies video frame stored in |av_frame_| to
44 // |cdm_video_frame|. Returns true when allocation and copy succeed. 45 // |cdm_video_frame|. Returns true when allocation and copy succeed.
45 bool CopyAvFrameTo(cdm::VideoFrame* cdm_video_frame); 46 bool CopyAvFrameTo(cdm::VideoFrame* cdm_video_frame);
46 47
47 void ReleaseFFmpegResources(); 48 void ReleaseFFmpegResources();
48 49
49 // FFmpeg structures owned by this object. 50 // FFmpeg structures owned by this object.
50 scoped_ptr<AVCodecContext, ScopedPtrAVFreeContext> codec_context_; 51 std::unique_ptr<AVCodecContext, ScopedPtrAVFreeContext> codec_context_;
51 scoped_ptr<AVFrame, ScopedPtrAVFreeFrame> av_frame_; 52 std::unique_ptr<AVFrame, ScopedPtrAVFreeFrame> av_frame_;
52 53
53 bool is_initialized_; 54 bool is_initialized_;
54 55
55 ClearKeyCdmHost* const host_; 56 ClearKeyCdmHost* const host_;
56 57
57 DISALLOW_COPY_AND_ASSIGN(FFmpegCdmVideoDecoder); 58 DISALLOW_COPY_AND_ASSIGN(FFmpegCdmVideoDecoder);
58 }; 59 };
59 60
60 } // namespace media 61 } // namespace media
61 62
62 #endif // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_FFMPEG_CDM_VIDEO_DECODER_H_ 63 #endif // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_FFMPEG_CDM_VIDEO_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698