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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 virtual std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( | 87 virtual std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( |
88 const gfx::Size& size, | 88 const gfx::Size& size, |
89 gfx::BufferFormat format, | 89 gfx::BufferFormat format, |
90 gfx::BufferUsage usage) = 0; | 90 gfx::BufferUsage usage) = 0; |
91 | 91 |
92 virtual bool ShouldUseGpuMemoryBuffersForVideoFrames() const = 0; | 92 virtual bool ShouldUseGpuMemoryBuffersForVideoFrames() const = 0; |
93 virtual unsigned ImageTextureTarget(gfx::BufferFormat format) = 0; | 93 virtual unsigned ImageTextureTarget(gfx::BufferFormat format) = 0; |
94 // Pixel format of the hardware video frames created when GpuMemoryBuffers | 94 // Pixel format of the hardware video frames created when GpuMemoryBuffers |
95 // video frames are enabled. | 95 // video frames are enabled. |
96 virtual VideoPixelFormat VideoFrameOutputFormat() = 0; | 96 virtual VideoPixelFormat VideoFrameOutputFormat(media::VideoPixelFormat) = 0; |
97 | 97 |
98 virtual std::unique_ptr<ScopedGLContextLock> GetGLContextLock() = 0; | 98 virtual std::unique_ptr<ScopedGLContextLock> GetGLContextLock() = 0; |
99 | 99 |
100 // Allocate & return a shared memory segment. | 100 // Allocate & return a shared memory segment. |
101 virtual std::unique_ptr<base::SharedMemory> CreateSharedMemory( | 101 virtual std::unique_ptr<base::SharedMemory> CreateSharedMemory( |
102 size_t size) = 0; | 102 size_t size) = 0; |
103 | 103 |
104 // Returns the task runner the video accelerator runs on. | 104 // Returns the task runner the video accelerator runs on. |
105 virtual scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() = 0; | 105 virtual scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() = 0; |
106 | 106 |
107 // Return the capabilities of video decode accelerator, which includes the | 107 // Return the capabilities of video decode accelerator, which includes the |
108 // supported codec profiles. | 108 // supported codec profiles. |
109 virtual VideoDecodeAccelerator::Capabilities | 109 virtual VideoDecodeAccelerator::Capabilities |
110 GetVideoDecodeAcceleratorCapabilities() = 0; | 110 GetVideoDecodeAcceleratorCapabilities() = 0; |
111 | 111 |
112 // Returns the supported codec profiles of video encode accelerator. | 112 // Returns the supported codec profiles of video encode accelerator. |
113 virtual VideoEncodeAccelerator::SupportedProfiles | 113 virtual VideoEncodeAccelerator::SupportedProfiles |
114 GetVideoEncodeAcceleratorSupportedProfiles() = 0; | 114 GetVideoEncodeAcceleratorSupportedProfiles() = 0; |
115 | 115 |
116 protected: | 116 protected: |
117 friend class base::RefCounted<GpuVideoAcceleratorFactories>; | 117 friend class base::RefCounted<GpuVideoAcceleratorFactories>; |
118 virtual ~GpuVideoAcceleratorFactories() {} | 118 virtual ~GpuVideoAcceleratorFactories() {} |
119 }; | 119 }; |
120 | 120 |
121 } // namespace media | 121 } // namespace media |
122 | 122 |
123 #endif // MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | 123 #endif // MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ |
OLD | NEW |