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_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ |
6 #define CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 virtual void Destroy() OVERRIDE; | 44 virtual void Destroy() OVERRIDE; |
45 | 45 |
46 protected: | 46 protected: |
47 virtual ~GpuVideoDecodeAcceleratorHost(); | 47 virtual ~GpuVideoDecodeAcceleratorHost(); |
48 | 48 |
49 private: | 49 private: |
50 void Send(IPC::Message* message); | 50 void Send(IPC::Message* message); |
51 | 51 |
52 void OnBitstreamBufferProcessed(int32 bitstream_buffer_id); | 52 void OnBitstreamBufferProcessed(int32 bitstream_buffer_id); |
53 void OnProvidePictureBuffer( | 53 void OnProvidePictureBuffer( |
54 uint32 num_requested_buffers, const gfx::Size& buffer_size); | 54 uint32 num_requested_buffers, |
| 55 const gfx::Size& buffer_size, |
| 56 media::VideoDecodeAccelerator::TextureTarget texture_target); |
55 void OnDismissPictureBuffer(int32 picture_buffer_id); | 57 void OnDismissPictureBuffer(int32 picture_buffer_id); |
56 void OnPictureReady(int32 picture_buffer_id, int32 bitstream_buffer_id); | 58 void OnPictureReady(int32 picture_buffer_id, int32 bitstream_buffer_id); |
57 void OnFlushDone(); | 59 void OnFlushDone(); |
58 void OnResetDone(); | 60 void OnResetDone(); |
59 void OnErrorNotification(uint32 error); | 61 void OnErrorNotification(uint32 error); |
60 | 62 |
61 // Sends IPC messages to the Gpu process. | 63 // Sends IPC messages to the Gpu process. |
62 GpuChannelHost* channel_; | 64 GpuChannelHost* channel_; |
63 | 65 |
64 // Route ID for the associated decoder in the GPU process. | 66 // Route ID for the associated decoder in the GPU process. |
65 // TODO(fischman): storing route_id's for GPU process entities in the client | 67 // TODO(fischman): storing route_id's for GPU process entities in the client |
66 // process is vulnerable to GPU process crashing & being respawned, and | 68 // process is vulnerable to GPU process crashing & being respawned, and |
67 // attempting to use an outdated or reused route id. | 69 // attempting to use an outdated or reused route id. |
68 int32 decoder_route_id_; | 70 int32 decoder_route_id_; |
69 | 71 |
70 // Reference to the client that will receive callbacks from the decoder. | 72 // Reference to the client that will receive callbacks from the decoder. |
71 media::VideoDecodeAccelerator::Client* client_; | 73 media::VideoDecodeAccelerator::Client* client_; |
72 | 74 |
73 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecodeAcceleratorHost); | 75 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecodeAcceleratorHost); |
74 }; | 76 }; |
75 | 77 |
76 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ | 78 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ |
OLD | NEW |