| 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 CONTENT_RENDERER_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ | 5 #ifndef CONTENT_RENDERER_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ |
| 6 #define CONTENT_RENDERER_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ | 6 #define CONTENT_RENDERER_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 const std::vector<media::GLESBuffer>& buffers) OVERRIDE; | 43 const std::vector<media::GLESBuffer>& buffers) OVERRIDE; |
| 44 virtual void AssignSysmemBuffers( | 44 virtual void AssignSysmemBuffers( |
| 45 const std::vector<media::SysmemBuffer>& buffers) OVERRIDE; | 45 const std::vector<media::SysmemBuffer>& buffers) OVERRIDE; |
| 46 virtual void ReusePictureBuffer(int32 picture_buffer_id) OVERRIDE; | 46 virtual void ReusePictureBuffer(int32 picture_buffer_id) OVERRIDE; |
| 47 virtual bool Flush() OVERRIDE; | 47 virtual bool Flush() OVERRIDE; |
| 48 virtual bool Abort() OVERRIDE; | 48 virtual bool Abort() OVERRIDE; |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 void OnBitstreamBufferProcessed(int32 bitstream_buffer_id); | 51 void OnBitstreamBufferProcessed(int32 bitstream_buffer_id); |
| 52 void OnProvidePictureBuffer( | 52 void OnProvidePictureBuffer( |
| 53 uint32 num_requested_buffers, const gfx::Size& buffer_size, int32 mem_type); | 53 uint32 num_requested_buffers, const gfx::Size& buffer_size); |
| 54 void OnDismissPictureBuffer(int32 picture_buffer_id); | 54 void OnDismissPictureBuffer(int32 picture_buffer_id); |
| 55 void OnCreateDone(int32 decoder_id); | 55 void OnCreateDone(int32 decoder_id); |
| 56 void OnPictureReady(int32 picture_buffer_id, | 56 void OnPictureReady(int32 picture_buffer_id, int32 bitstream_buffer_id); |
| 57 int32 bitstream_buffer_id, | |
| 58 const gfx::Size& visible_size, | |
| 59 const gfx::Size& decoded_size); | |
| 60 void OnFlushDone(); | 57 void OnFlushDone(); |
| 61 void OnAbortDone(); | 58 void OnAbortDone(); |
| 62 void OnEndOfStream(); | 59 void OnEndOfStream(); |
| 63 void OnErrorNotification(uint32 error); | 60 void OnErrorNotification(uint32 error); |
| 64 | 61 |
| 65 // A router used to send us IPC messages. | 62 // A router used to send us IPC messages. |
| 66 MessageRouter* router_; | 63 MessageRouter* router_; |
| 67 | 64 |
| 68 // Sends IPC messages to the Gpu process. | 65 // Sends IPC messages to the Gpu process. |
| 69 IPC::Message::Sender* ipc_sender_; | 66 IPC::Message::Sender* ipc_sender_; |
| 70 | 67 |
| 71 // ID of this GpuVideoDecodeAcceleratorHost. | 68 // ID of this GpuVideoDecodeAcceleratorHost. |
| 72 int32 decoder_host_id_; | 69 int32 decoder_host_id_; |
| 73 | 70 |
| 74 // ID of VideoDecodeAccelerator in the Gpu process. | 71 // ID of VideoDecodeAccelerator in the Gpu process. |
| 75 int32 decoder_id_; | 72 int32 decoder_id_; |
| 76 | 73 |
| 77 // Temporarily store configs here in between Create and Initialize phase. | 74 // Temporarily store configs here in between Create and Initialize phase. |
| 78 std::vector<uint32> configs_; | 75 std::vector<uint32> configs_; |
| 79 | 76 |
| 80 // Reference to the client that will receive callbacks from the decoder. | 77 // Reference to the client that will receive callbacks from the decoder. |
| 81 media::VideoDecodeAccelerator::Client* client_; | 78 media::VideoDecodeAccelerator::Client* client_; |
| 82 | 79 |
| 83 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecodeAcceleratorHost); | 80 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecodeAcceleratorHost); |
| 84 }; | 81 }; |
| 85 | 82 |
| 86 #endif // CONTENT_RENDERER_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ | 83 #endif // CONTENT_RENDERER_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ |
| OLD | NEW |