| 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 MEDIA_GPU_IPC_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ | 5 #ifndef MEDIA_GPU_IPC_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ |
| 6 #define MEDIA_GPU_IPC_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ | 6 #define MEDIA_GPU_IPC_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 uint32_t texture_target); | 73 uint32_t texture_target); |
| 74 void OnDismissPictureBuffer(int32_t picture_buffer_id); | 74 void OnDismissPictureBuffer(int32_t picture_buffer_id); |
| 75 void OnPictureReady( | 75 void OnPictureReady( |
| 76 const AcceleratedVideoDecoderHostMsg_PictureReady_Params& params); | 76 const AcceleratedVideoDecoderHostMsg_PictureReady_Params& params); |
| 77 void OnFlushDone(); | 77 void OnFlushDone(); |
| 78 void OnResetDone(); | 78 void OnResetDone(); |
| 79 void OnNotifyError(uint32_t error); | 79 void OnNotifyError(uint32_t error); |
| 80 | 80 |
| 81 scoped_refptr<gpu::GpuChannelHost> channel_; | 81 scoped_refptr<gpu::GpuChannelHost> channel_; |
| 82 | 82 |
| 83 // Callback to a function that releases |channel_|. |
| 84 base::Callback<void(void)> channel_error_cb_; |
| 85 |
| 83 // Route ID for the associated decoder in the GPU process. | 86 // Route ID for the associated decoder in the GPU process. |
| 84 int32_t decoder_route_id_; | 87 int32_t decoder_route_id_; |
| 85 | 88 |
| 86 // The client that will receive callbacks from the decoder. | 89 // The client that will receive callbacks from the decoder. |
| 87 Client* client_; | 90 Client* client_; |
| 88 | 91 |
| 92 // Protect |impl_|. |impl_| is used on media thread, but it can be invalidated |
| 93 // on main thread. |
| 94 base::Lock impl_lock_; |
| 95 |
| 89 // Unowned reference to the gpu::CommandBufferProxyImpl that created us. | 96 // Unowned reference to the gpu::CommandBufferProxyImpl that created us. |
| 90 // |this| registers as a DeletionObserver of |impl_|, the so reference is | 97 // |this| registers as a DeletionObserver of |impl_|, the so reference is |
| 91 // always valid as long as it is not NULL. | 98 // always valid as long as it is not NULL. |
| 92 gpu::CommandBufferProxyImpl* impl_; | 99 gpu::CommandBufferProxyImpl* impl_; |
| 93 | 100 |
| 94 // Requested dimensions of the buffer, from ProvidePictureBuffers(). | 101 // Requested dimensions of the buffer, from ProvidePictureBuffers(). |
| 95 gfx::Size picture_buffer_dimensions_; | 102 gfx::Size picture_buffer_dimensions_; |
| 96 | 103 |
| 97 // WeakPtr factory for posting tasks back to itself. | 104 // WeakPtr factory for posting tasks back to itself. |
| 98 base::WeakPtrFactory<GpuVideoDecodeAcceleratorHost> weak_this_factory_; | 105 base::WeakPtrFactory<GpuVideoDecodeAcceleratorHost> weak_this_factory_; |
| 99 | 106 |
| 100 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecodeAcceleratorHost); | 107 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecodeAcceleratorHost); |
| 101 }; | 108 }; |
| 102 | 109 |
| 103 } // namespace media | 110 } // namespace media |
| 104 | 111 |
| 105 #endif // MEDIA_GPU_IPC_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ | 112 #endif // MEDIA_GPU_IPC_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ |
| OLD | NEW |