OLD | NEW |
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_SIMPLE_CDM_ALLOCATOR_H_ | 5 #ifndef MEDIA_CDM_SIMPLE_CDM_ALLOCATOR_H_ |
6 #define MEDIA_CDM_SIMPLE_CDM_ALLOCATOR_H_ | 6 #define MEDIA_CDM_SIMPLE_CDM_ALLOCATOR_H_ |
7 | 7 |
| 8 #include <stddef.h> |
8 #include <stdint.h> | 9 #include <stdint.h> |
9 | 10 |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "media/cdm/cdm_allocator.h" | 12 #include "media/cdm/cdm_allocator.h" |
12 | 13 |
13 namespace media { | 14 namespace media { |
14 | 15 |
15 // This is a simple CdmAllocator for testing. | 16 // This is a simple CdmAllocator for testing. |
16 class SimpleCdmAllocator : public CdmAllocator { | 17 class SimpleCdmAllocator : public CdmAllocator { |
17 public: | 18 public: |
18 SimpleCdmAllocator(); | 19 SimpleCdmAllocator(); |
19 ~SimpleCdmAllocator() final; | 20 ~SimpleCdmAllocator() final; |
20 | 21 |
21 // CdmAllocator implementation. | 22 // CdmAllocator implementation. |
22 cdm::Buffer* CreateCdmBuffer(uint32_t capacity) final; | 23 cdm::Buffer* CreateCdmBuffer(size_t capacity) final; |
23 scoped_ptr<VideoFrameImpl> CreateCdmVideoFrame() final; | 24 scoped_ptr<VideoFrameImpl> CreateCdmVideoFrame() final; |
24 | 25 |
25 private: | 26 private: |
26 DISALLOW_COPY_AND_ASSIGN(SimpleCdmAllocator); | 27 DISALLOW_COPY_AND_ASSIGN(SimpleCdmAllocator); |
27 }; | 28 }; |
28 | 29 |
29 } // namespace media | 30 } // namespace media |
30 | 31 |
31 #endif // MEDIA_CDM_SIMPLE_CDM_ALLOCATOR_H_ | 32 #endif // MEDIA_CDM_SIMPLE_CDM_ALLOCATOR_H_ |
OLD | NEW |