OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | 5 #ifndef MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ |
6 #define MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | 6 #define MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace base { | 21 namespace base { |
22 class SingleThreadTaskRunner; | 22 class SingleThreadTaskRunner; |
23 class SharedMemory; | 23 class SharedMemory; |
24 } | 24 } |
25 | 25 |
26 namespace gfx { | 26 namespace gfx { |
27 class Rect; | 27 class Rect; |
28 class Size; | 28 class Size; |
29 } | 29 } |
30 | 30 |
| 31 namespace gpu { |
| 32 struct SyncToken; |
| 33 }; |
| 34 |
31 namespace media { | 35 namespace media { |
32 | 36 |
33 class VideoDecodeAccelerator; | 37 class VideoDecodeAccelerator; |
34 | 38 |
35 // Helper interface for specifying factories needed to instantiate a hardware | 39 // Helper interface for specifying factories needed to instantiate a hardware |
36 // video accelerator. | 40 // video accelerator. |
37 // Threading model: | 41 // Threading model: |
38 // * The GpuVideoAcceleratorFactories may be constructed on any thread. | 42 // * The GpuVideoAcceleratorFactories may be constructed on any thread. |
39 // * The GpuVideoAcceleratorFactories has an associated message loop, which may | 43 // * The GpuVideoAcceleratorFactories has an associated message loop, which may |
40 // be retrieved as |GetMessageLoop()|. | 44 // be retrieved as |GetMessageLoop()|. |
(...skipping 24 matching lines...) Expand all Loading... |
65 virtual scoped_ptr<VideoEncodeAccelerator> CreateVideoEncodeAccelerator() = 0; | 69 virtual scoped_ptr<VideoEncodeAccelerator> CreateVideoEncodeAccelerator() = 0; |
66 | 70 |
67 // Allocate & delete native textures. | 71 // Allocate & delete native textures. |
68 virtual bool CreateTextures(int32 count, | 72 virtual bool CreateTextures(int32 count, |
69 const gfx::Size& size, | 73 const gfx::Size& size, |
70 std::vector<uint32>* texture_ids, | 74 std::vector<uint32>* texture_ids, |
71 std::vector<gpu::Mailbox>* texture_mailboxes, | 75 std::vector<gpu::Mailbox>* texture_mailboxes, |
72 uint32 texture_target) = 0; | 76 uint32 texture_target) = 0; |
73 virtual void DeleteTexture(uint32 texture_id) = 0; | 77 virtual void DeleteTexture(uint32 texture_id) = 0; |
74 | 78 |
75 virtual void WaitSyncPoint(uint32 sync_point) = 0; | 79 virtual void WaitSyncToken(const gpu::SyncToken& sync_token) = 0; |
76 | 80 |
77 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( | 81 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( |
78 const gfx::Size& size, | 82 const gfx::Size& size, |
79 gfx::BufferFormat format, | 83 gfx::BufferFormat format, |
80 gfx::BufferUsage usage) = 0; | 84 gfx::BufferUsage usage) = 0; |
81 | 85 |
82 virtual bool ShouldUseGpuMemoryBuffersForVideoFrames() const = 0; | 86 virtual bool ShouldUseGpuMemoryBuffersForVideoFrames() const = 0; |
83 virtual unsigned ImageTextureTarget() = 0; | 87 virtual unsigned ImageTextureTarget() = 0; |
84 // Pixel format of the hardware video frames created when GpuMemoryBuffers | 88 // Pixel format of the hardware video frames created when GpuMemoryBuffers |
85 // video frames are enabled. | 89 // video frames are enabled. |
(...skipping 16 matching lines...) Expand all Loading... |
102 GetVideoEncodeAcceleratorSupportedProfiles() = 0; | 106 GetVideoEncodeAcceleratorSupportedProfiles() = 0; |
103 | 107 |
104 protected: | 108 protected: |
105 friend class base::RefCounted<GpuVideoAcceleratorFactories>; | 109 friend class base::RefCounted<GpuVideoAcceleratorFactories>; |
106 virtual ~GpuVideoAcceleratorFactories() {} | 110 virtual ~GpuVideoAcceleratorFactories() {} |
107 }; | 111 }; |
108 | 112 |
109 } // namespace media | 113 } // namespace media |
110 | 114 |
111 #endif // MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | 115 #endif // MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ |
OLD | NEW |