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_BUFFER_ALLOCATOR_IMPL_H_ | |
6 #define MEDIA_CDM_CDM_BUFFER_ALLOCATOR_IMPL_H_ | |
7 | |
8 #include <stdint.h> | |
9 | |
10 #include "base/macros.h" | |
11 #include "media/base/media_export.h" | |
12 #include "media/cdm/cdm_buffer_allocator.h" | |
13 | |
14 namespace media { | |
15 | |
16 // This is a simple CdmBufferAllocator that simply allocates a new | |
17 // CdmBufferImpl on every Allocate() request. It does not keep track | |
18 // of the memory allocated. The caller is responsible for calling Destroy() | |
19 // on the returned buffer when it is no longer needed. | |
xhwang
2016/02/09 18:27:32
How about Release()? Can Release() be called after
jrummell
2016/02/11 01:39:38
Updated to mention Release() instead.
| |
20 class MEDIA_EXPORT CdmBufferAllocatorImpl : public CdmBufferAllocator { | |
xhwang
2016/02/09 18:27:32
The "Impl" part makes it look like it'll be the de
jrummell
2016/02/11 01:39:39
Done.
| |
21 public: | |
22 CdmBufferAllocatorImpl(); | |
23 ~CdmBufferAllocatorImpl() override; | |
24 | |
25 // CdmBufferAllocator implementation. | |
26 CdmBuffer* Allocate(uint32_t capacity) final; | |
27 void Release(uint32_t buffer_id) final; | |
28 | |
29 private: | |
30 DISALLOW_COPY_AND_ASSIGN(CdmBufferAllocatorImpl); | |
31 }; | |
32 | |
33 } // namespace media | |
34 | |
35 #endif // MEDIA_CDM_CDM_BUFFER_ALLOCATOR_IMPL_H_ | |
OLD | NEW |