OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef MEDIA_CDM_CDM_ALLOCATOR_H_ | |
6 #define MEDIA_CDM_CDM_ALLOCATOR_H_ | |
7 | |
8 #include <stdint.h> | |
9 | |
10 #include "base/macros.h" | |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "media/base/media_export.h" | |
13 | |
14 namespace cdm { | |
15 class Buffer; | |
16 } | |
17 | |
18 namespace media { | |
19 | |
20 class VideoFrameImpl; | |
21 | |
22 class MEDIA_EXPORT CdmAllocator { | |
23 public: | |
24 virtual ~CdmAllocator(); | |
25 | |
26 // Allocates a buffer with at least |capacity| bytes. Caller is required to | |
27 // call Destroy() on the returned buffer when it is done with it. | |
28 virtual cdm::Buffer* Allocate(uint32_t capacity) = 0; | |
xhwang
2016/02/12 08:45:30
nit: "Allocate" is from existing code. But it seem
jrummell
2016/02/12 23:14:20
I like the consistency. Done.
| |
29 | |
30 // Returns a new VideoFrameImpl. | |
31 virtual scoped_ptr<VideoFrameImpl> CreateCdmVideoFrame() = 0; | |
32 | |
33 protected: | |
34 CdmAllocator(); | |
35 | |
36 private: | |
37 DISALLOW_COPY_AND_ASSIGN(CdmAllocator); | |
38 }; | |
39 | |
40 } // namespace media | |
41 | |
42 #endif // MEDIA_CDM_CDM_ALLOCATOR_H_ | |
OLD | NEW |