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 CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ |
6 #define CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | 6 #define CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
8 #include <vector> | 11 #include <vector> |
9 | 12 |
10 #include "base/basictypes.h" | 13 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
12 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
13 #include "base/synchronization/waitable_event.h" | 16 #include "base/synchronization/waitable_event.h" |
14 #include "content/child/thread_safe_sender.h" | 17 #include "content/child/thread_safe_sender.h" |
15 #include "content/common/content_export.h" | 18 #include "content/common/content_export.h" |
16 #include "media/renderers/gpu_video_accelerator_factories.h" | 19 #include "media/renderers/gpu_video_accelerator_factories.h" |
17 #include "ui/gfx/geometry/size.h" | 20 #include "ui/gfx/geometry/size.h" |
18 | 21 |
19 namespace base { | 22 namespace base { |
20 class WaitableEvent; | 23 class WaitableEvent; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 bool enable_video_accelerator); | 56 bool enable_video_accelerator); |
54 | 57 |
55 // media::GpuVideoAcceleratorFactories implementation. | 58 // media::GpuVideoAcceleratorFactories implementation. |
56 bool IsGpuVideoAcceleratorEnabled() override; | 59 bool IsGpuVideoAcceleratorEnabled() override; |
57 scoped_ptr<media::VideoDecodeAccelerator> CreateVideoDecodeAccelerator() | 60 scoped_ptr<media::VideoDecodeAccelerator> CreateVideoDecodeAccelerator() |
58 override; | 61 override; |
59 scoped_ptr<media::VideoEncodeAccelerator> CreateVideoEncodeAccelerator() | 62 scoped_ptr<media::VideoEncodeAccelerator> CreateVideoEncodeAccelerator() |
60 override; | 63 override; |
61 // Creates textures and produces them into mailboxes. Returns true on success | 64 // Creates textures and produces them into mailboxes. Returns true on success |
62 // or false on failure. | 65 // or false on failure. |
63 bool CreateTextures(int32 count, | 66 bool CreateTextures(int32_t count, |
64 const gfx::Size& size, | 67 const gfx::Size& size, |
65 std::vector<uint32>* texture_ids, | 68 std::vector<uint32_t>* texture_ids, |
66 std::vector<gpu::Mailbox>* texture_mailboxes, | 69 std::vector<gpu::Mailbox>* texture_mailboxes, |
67 uint32 texture_target) override; | 70 uint32_t texture_target) override; |
68 void DeleteTexture(uint32 texture_id) override; | 71 void DeleteTexture(uint32_t texture_id) override; |
69 void WaitSyncToken(const gpu::SyncToken& sync_token) override; | 72 void WaitSyncToken(const gpu::SyncToken& sync_token) override; |
70 | 73 |
71 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( | 74 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( |
72 const gfx::Size& size, | 75 const gfx::Size& size, |
73 gfx::BufferFormat format, | 76 gfx::BufferFormat format, |
74 gfx::BufferUsage usage) override; | 77 gfx::BufferUsage usage) override; |
75 | 78 |
76 bool ShouldUseGpuMemoryBuffersForVideoFrames() const override; | 79 bool ShouldUseGpuMemoryBuffersForVideoFrames() const override; |
77 unsigned ImageTextureTarget() override; | 80 unsigned ImageTextureTarget() override; |
78 media::VideoPixelFormat VideoFrameOutputFormat() override; | 81 media::VideoPixelFormat VideoFrameOutputFormat() override; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 127 |
125 // For sending requests to allocate shared memory in the Browser process. | 128 // For sending requests to allocate shared memory in the Browser process. |
126 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 129 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
127 | 130 |
128 DISALLOW_COPY_AND_ASSIGN(RendererGpuVideoAcceleratorFactories); | 131 DISALLOW_COPY_AND_ASSIGN(RendererGpuVideoAcceleratorFactories); |
129 }; | 132 }; |
130 | 133 |
131 } // namespace content | 134 } // namespace content |
132 | 135 |
133 #endif // CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | 136 #endif // CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ |
OLD | NEW |