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