OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/shared_memory.h" | 13 #include "base/memory/shared_memory.h" |
14 #include "base/synchronization/waitable_event.h" | 14 #include "base/synchronization/waitable_event.h" |
15 #include "content/common/gpu/gpu_command_buffer_stub.h" | 15 #include "content/common/gpu/gpu_command_buffer_stub.h" |
16 #include "content/common/gpu/media/video_decode_accelerator_impl.h" | |
17 #include "gpu/command_buffer/service/texture_manager.h" | 16 #include "gpu/command_buffer/service/texture_manager.h" |
18 #include "ipc/ipc_listener.h" | 17 #include "ipc/ipc_listener.h" |
19 #include "ipc/ipc_sender.h" | 18 #include "ipc/ipc_sender.h" |
| 19 #include "media/types/video_decode_accelerator_impl.h" |
20 #include "media/video/video_decode_accelerator.h" | 20 #include "media/video/video_decode_accelerator.h" |
21 #include "ui/gfx/size.h" | 21 #include "ui/gfx/size.h" |
22 | 22 |
23 namespace base { | 23 namespace base { |
24 class MessageLoopProxy; | 24 class MessageLoopProxy; |
25 } | 25 } |
26 | 26 |
27 namespace content { | 27 namespace content { |
28 | 28 |
29 class GpuVideoDecodeAccelerator | 29 class GpuVideoDecodeAccelerator |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 // Route ID to communicate with the host. | 92 // Route ID to communicate with the host. |
93 int32 host_route_id_; | 93 int32 host_route_id_; |
94 | 94 |
95 // Unowned pointer to the underlying GpuCommandBufferStub. |this| is | 95 // Unowned pointer to the underlying GpuCommandBufferStub. |this| is |
96 // registered as a DestuctionObserver of |stub_| and will self-delete when | 96 // registered as a DestuctionObserver of |stub_| and will self-delete when |
97 // |stub_| is destroyed. | 97 // |stub_| is destroyed. |
98 GpuCommandBufferStub* stub_; | 98 GpuCommandBufferStub* stub_; |
99 | 99 |
100 // The underlying VideoDecodeAccelerator. | 100 // The underlying VideoDecodeAccelerator. |
101 scoped_ptr<VideoDecodeAcceleratorImpl> video_decode_accelerator_; | 101 scoped_ptr<media::VideoDecodeAcceleratorImpl> video_decode_accelerator_; |
102 | 102 |
103 // Callback for making the relevant context current for GL calls. | 103 // Callback for making the relevant context current for GL calls. |
104 // Returns false if failed. | 104 // Returns false if failed. |
105 base::Callback<bool(void)> make_context_current_; | 105 base::Callback<bool(void)> make_context_current_; |
106 | 106 |
107 // The texture dimensions as requested by ProvidePictureBuffers(). | 107 // The texture dimensions as requested by ProvidePictureBuffers(). |
108 gfx::Size texture_dimensions_; | 108 gfx::Size texture_dimensions_; |
109 | 109 |
110 // The texture target as requested by ProvidePictureBuffers(). | 110 // The texture target as requested by ProvidePictureBuffers(). |
111 uint32 texture_target_; | 111 uint32 texture_target_; |
(...skipping 21 matching lines...) Expand all Loading... |
133 | 133 |
134 // A map from picture buffer ID to TextureRef that have not been cleared. | 134 // A map from picture buffer ID to TextureRef that have not been cleared. |
135 std::map<int32, scoped_refptr<gpu::gles2::TextureRef> > uncleared_textures_; | 135 std::map<int32, scoped_refptr<gpu::gles2::TextureRef> > uncleared_textures_; |
136 | 136 |
137 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); | 137 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); |
138 }; | 138 }; |
139 | 139 |
140 } // namespace content | 140 } // namespace content |
141 | 141 |
142 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 142 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |