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

Side by Side Diff: media/cdm/cdm_allocator.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, 7 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
« no previous file with comments | « media/cdm/cdm_adapter_unittest.cc ('k') | media/cdm/cenc_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_CDM_ALLOCATOR_H_ 5 #ifndef MEDIA_CDM_CDM_ALLOCATOR_H_
6 #define MEDIA_CDM_CDM_ALLOCATOR_H_ 6 #define MEDIA_CDM_CDM_ALLOCATOR_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory>
12
11 #include "base/macros.h" 13 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "media/base/media_export.h" 14 #include "media/base/media_export.h"
14 15
15 namespace cdm { 16 namespace cdm {
16 class Buffer; 17 class Buffer;
17 } 18 }
18 19
19 namespace media { 20 namespace media {
20 21
21 class VideoFrameImpl; 22 class VideoFrameImpl;
22 23
23 class MEDIA_EXPORT CdmAllocator { 24 class MEDIA_EXPORT CdmAllocator {
24 public: 25 public:
25 virtual ~CdmAllocator(); 26 virtual ~CdmAllocator();
26 27
27 // Creates a buffer with at least |capacity| bytes. Caller is required to 28 // Creates a buffer with at least |capacity| bytes. Caller is required to
28 // call Destroy() on the returned buffer when it is done with it. 29 // call Destroy() on the returned buffer when it is done with it.
29 virtual cdm::Buffer* CreateCdmBuffer(size_t capacity) = 0; 30 virtual cdm::Buffer* CreateCdmBuffer(size_t capacity) = 0;
30 31
31 // Returns a new VideoFrameImpl. 32 // Returns a new VideoFrameImpl.
32 virtual scoped_ptr<VideoFrameImpl> CreateCdmVideoFrame() = 0; 33 virtual std::unique_ptr<VideoFrameImpl> CreateCdmVideoFrame() = 0;
33 34
34 protected: 35 protected:
35 CdmAllocator(); 36 CdmAllocator();
36 37
37 private: 38 private:
38 DISALLOW_COPY_AND_ASSIGN(CdmAllocator); 39 DISALLOW_COPY_AND_ASSIGN(CdmAllocator);
39 }; 40 };
40 41
41 } // namespace media 42 } // namespace media
42 43
43 #endif // MEDIA_CDM_CDM_ALLOCATOR_H_ 44 #endif // MEDIA_CDM_CDM_ALLOCATOR_H_
OLDNEW
« no previous file with comments | « media/cdm/cdm_adapter_unittest.cc ('k') | media/cdm/cenc_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698