| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_ENCODE_ACCELERATOR_HOST_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_ |
| 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 const gfx::Size& input_coded_size, | 81 const gfx::Size& input_coded_size, |
| 82 uint32 output_buffer_size); | 82 uint32 output_buffer_size); |
| 83 void OnNotifyInputDone(int32 frame_id); | 83 void OnNotifyInputDone(int32 frame_id); |
| 84 void OnBitstreamBufferReady(int32 bitstream_buffer_id, | 84 void OnBitstreamBufferReady(int32 bitstream_buffer_id, |
| 85 uint32 payload_size, | 85 uint32 payload_size, |
| 86 bool key_frame); | 86 bool key_frame); |
| 87 void OnNotifyError(Error error); | 87 void OnNotifyError(Error error); |
| 88 | 88 |
| 89 // Unowned reference to the GpuChannelHost to send IPC messages to the GPU | 89 // Unowned reference to the GpuChannelHost to send IPC messages to the GPU |
| 90 // process. |channel_| outlives |impl_|, so the reference is always valid as | 90 // process. |channel_| outlives |impl_|, so the reference is always valid as |
| 91 // long as it is not NULL. | 91 // long as it is not nullptr. |
| 92 GpuChannelHost* channel_; | 92 GpuChannelHost* channel_; |
| 93 | 93 |
| 94 // Route ID for the associated encoder in the GPU process. | 94 // Route ID for the associated encoder in the GPU process. |
| 95 int32 encoder_route_id_; | 95 int32 encoder_route_id_; |
| 96 | 96 |
| 97 // The client that will receive callbacks from the encoder. | 97 // The client that will receive callbacks from the encoder. |
| 98 Client* client_; | 98 Client* client_; |
| 99 | 99 |
| 100 // Unowned reference to the CommandBufferProxyImpl that created us. |this| | 100 // Unowned reference to the CommandBufferProxyImpl that created us. |this| |
| 101 // registers as a DeletionObserver of |impl_|, so the reference is always | 101 // registers as a DeletionObserver of |impl_|, so the reference is always |
| 102 // valid as long as it is not NULL. | 102 // valid as long as it is not nullptr. |
| 103 CommandBufferProxyImpl* impl_; | 103 CommandBufferProxyImpl* impl_; |
| 104 | 104 |
| 105 // media::VideoFrames sent to the encoder. | 105 // media::VideoFrames sent to the encoder. |
| 106 // base::IDMap not used here, since that takes pointers, not scoped_refptr. | 106 // base::IDMap not used here, since that takes pointers, not scoped_refptr. |
| 107 typedef base::hash_map<int32, scoped_refptr<media::VideoFrame> > FrameMap; | 107 typedef base::hash_map<int32, scoped_refptr<media::VideoFrame> > FrameMap; |
| 108 FrameMap frame_map_; | 108 FrameMap frame_map_; |
| 109 | 109 |
| 110 // ID serial number for the next frame to send to the GPU process. | 110 // ID serial number for the next frame to send to the GPU process. |
| 111 int32 next_frame_id_; | 111 int32 next_frame_id_; |
| 112 | 112 |
| 113 // WeakPtr factory for posting tasks back to itself. | 113 // WeakPtr factory for posting tasks back to itself. |
| 114 base::WeakPtrFactory<GpuVideoEncodeAcceleratorHost> weak_this_factory_; | 114 base::WeakPtrFactory<GpuVideoEncodeAcceleratorHost> weak_this_factory_; |
| 115 | 115 |
| 116 DISALLOW_COPY_AND_ASSIGN(GpuVideoEncodeAcceleratorHost); | 116 DISALLOW_COPY_AND_ASSIGN(GpuVideoEncodeAcceleratorHost); |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 } // namespace content | 119 } // namespace content |
| 120 | 120 |
| 121 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_ | 121 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_ |
| OLD | NEW |