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

Side by Side Diff: media/cdm/cdm_allocator.h

Issue 2900773004: media: Add experimental feature to enable Mojo CDM on desktop Chromium (Closed)
Patch Set: drop utility_process_host_impl.cc change Created 3 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_factory.cc ('k') | media/media_options.gni » ('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> 11 #include <memory>
12 12
13 #include "base/callback.h"
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "media/base/media_export.h" 15 #include "media/base/media_export.h"
15 16
16 namespace cdm { 17 namespace cdm {
17 class Buffer; 18 class Buffer;
18 } 19 }
19 20
20 namespace media { 21 namespace media {
21 22
22 class VideoFrameImpl; 23 class VideoFrameImpl;
23 24
24 class MEDIA_EXPORT CdmAllocator { 25 class MEDIA_EXPORT CdmAllocator {
25 public: 26 public:
27 // Callback to create CdmAllocator for the created CDM.
28 using CreationCB = base::RepeatingCallback<std::unique_ptr<CdmAllocator>()>;
29
26 virtual ~CdmAllocator(); 30 virtual ~CdmAllocator();
27 31
28 // Creates a buffer with at least |capacity| bytes. Caller is required to 32 // Creates a buffer with at least |capacity| bytes. Caller is required to
29 // call Destroy() on the returned buffer when it is done with it. 33 // call Destroy() on the returned buffer when it is done with it.
30 virtual cdm::Buffer* CreateCdmBuffer(size_t capacity) = 0; 34 virtual cdm::Buffer* CreateCdmBuffer(size_t capacity) = 0;
31 35
32 // Returns a new VideoFrameImpl. 36 // Returns a new VideoFrameImpl.
33 virtual std::unique_ptr<VideoFrameImpl> CreateCdmVideoFrame() = 0; 37 virtual std::unique_ptr<VideoFrameImpl> CreateCdmVideoFrame() = 0;
34 38
35 protected: 39 protected:
36 CdmAllocator(); 40 CdmAllocator();
37 41
38 private: 42 private:
39 DISALLOW_COPY_AND_ASSIGN(CdmAllocator); 43 DISALLOW_COPY_AND_ASSIGN(CdmAllocator);
40 }; 44 };
41 45
42 } // namespace media 46 } // namespace media
43 47
44 #endif // MEDIA_CDM_CDM_ALLOCATOR_H_ 48 #endif // MEDIA_CDM_CDM_ALLOCATOR_H_
OLDNEW
« no previous file with comments | « media/cdm/cdm_adapter_factory.cc ('k') | media/media_options.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698