OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_RENDERER_GPU_VIDEO_DECODER_HOST_H_ | 5 #ifndef CHROME_RENDERER_GPU_VIDEO_DECODER_HOST_H_ |
6 #define CHROME_RENDERER_GPU_VIDEO_DECODER_HOST_H_ | 6 #define CHROME_RENDERER_GPU_VIDEO_DECODER_HOST_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 | 10 |
| 11 #include "base/shared_memory.h" |
11 #include "base/singleton.h" | 12 #include "base/singleton.h" |
12 #include "chrome/common/gpu_video_common.h" | |
13 #include "chrome/renderer/gpu_channel_host.h" | 13 #include "chrome/renderer/gpu_channel_host.h" |
14 #include "ipc/ipc_message.h" | 14 #include "ipc/ipc_message.h" |
15 #include "media/base/buffers.h" | 15 #include "media/base/buffers.h" |
16 #include "media/base/video_frame.h" | 16 #include "media/base/video_frame.h" |
17 #include "media/video/video_decode_engine.h" | 17 #include "media/video/video_decode_engine.h" |
18 | 18 |
19 using media::VideoFrame; | 19 using media::VideoFrame; |
20 using media::Buffer; | 20 using media::Buffer; |
21 | 21 |
22 class MessageRouter; | 22 class MessageRouter; |
| 23 struct GpuVideoDecoderInitDoneParam; |
23 | 24 |
24 // This class is used to talk to GpuVideoDecoder in the GPU process through | 25 // This class is used to talk to GpuVideoDecoder in the GPU process through |
25 // IPC messages. It implements the interface of VideoDecodeEngine so users | 26 // IPC messages. It implements the interface of VideoDecodeEngine so users |
26 // view it as a regular video decode engine, the implementation is a portal | 27 // view it as a regular video decode engine, the implementation is a portal |
27 // to the GPU process. | 28 // to the GPU process. |
28 // | 29 // |
29 // THREAD SEMANTICS | 30 // THREAD SEMANTICS |
30 // | 31 // |
31 // All methods of this class can be accessed on any thread. A message loop | 32 // All methods of this class can be accessed on any thread. A message loop |
32 // needs to be provided to class through Initialize() for accessing the | 33 // needs to be provided to class through Initialize() for accessing the |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 // The list of video frames allocated by VideoDecodeContext. | 157 // The list of video frames allocated by VideoDecodeContext. |
157 std::vector<scoped_refptr<media::VideoFrame> > video_frames_; | 158 std::vector<scoped_refptr<media::VideoFrame> > video_frames_; |
158 | 159 |
159 // The mapping between video frame ID and a video frame. | 160 // The mapping between video frame ID and a video frame. |
160 VideoFrameMap video_frame_map_; | 161 VideoFrameMap video_frame_map_; |
161 | 162 |
162 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoderHost); | 163 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoderHost); |
163 }; | 164 }; |
164 | 165 |
165 #endif // CHROME_RENDERER_GPU_VIDEO_DECODER_HOST_H_ | 166 #endif // CHROME_RENDERER_GPU_VIDEO_DECODER_HOST_H_ |
OLD | NEW |