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 #include "media/gpu/ipc/service/gpu_video_encode_accelerator.h" | 5 #include "media/gpu/ipc/service/gpu_video_encode_accelerator.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 size_t output_buffer_size) { | 145 size_t output_buffer_size) { |
146 Send(new AcceleratedVideoEncoderHostMsg_RequireBitstreamBuffers( | 146 Send(new AcceleratedVideoEncoderHostMsg_RequireBitstreamBuffers( |
147 host_route_id_, input_count, input_coded_size, output_buffer_size)); | 147 host_route_id_, input_count, input_coded_size, output_buffer_size)); |
148 input_coded_size_ = input_coded_size; | 148 input_coded_size_ = input_coded_size; |
149 output_buffer_size_ = output_buffer_size; | 149 output_buffer_size_ = output_buffer_size; |
150 } | 150 } |
151 | 151 |
152 void GpuVideoEncodeAccelerator::BitstreamBufferReady( | 152 void GpuVideoEncodeAccelerator::BitstreamBufferReady( |
153 int32_t bitstream_buffer_id, | 153 int32_t bitstream_buffer_id, |
154 size_t payload_size, | 154 size_t payload_size, |
155 bool key_frame) { | 155 bool key_frame, |
| 156 base::TimeDelta timestamp) { |
156 Send(new AcceleratedVideoEncoderHostMsg_BitstreamBufferReady( | 157 Send(new AcceleratedVideoEncoderHostMsg_BitstreamBufferReady( |
157 host_route_id_, bitstream_buffer_id, payload_size, key_frame)); | 158 host_route_id_, bitstream_buffer_id, payload_size, key_frame, timestamp)); |
158 } | 159 } |
159 | 160 |
160 void GpuVideoEncodeAccelerator::NotifyError( | 161 void GpuVideoEncodeAccelerator::NotifyError( |
161 media::VideoEncodeAccelerator::Error error) { | 162 media::VideoEncodeAccelerator::Error error) { |
162 Send(new AcceleratedVideoEncoderHostMsg_NotifyError(host_route_id_, error)); | 163 Send(new AcceleratedVideoEncoderHostMsg_NotifyError(host_route_id_, error)); |
163 } | 164 } |
164 | 165 |
165 void GpuVideoEncodeAccelerator::OnWillDestroyStub() { | 166 void GpuVideoEncodeAccelerator::OnWillDestroyStub() { |
166 DCHECK(stub_); | 167 DCHECK(stub_); |
167 stub_->channel()->RemoveRoute(host_route_id_); | 168 stub_->channel()->RemoveRoute(host_route_id_); |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 Send(new AcceleratedVideoEncoderHostMsg_NotifyInputDone(host_route_id_, | 376 Send(new AcceleratedVideoEncoderHostMsg_NotifyInputDone(host_route_id_, |
376 frame_id)); | 377 frame_id)); |
377 // Just let |shm| fall out of scope. | 378 // Just let |shm| fall out of scope. |
378 } | 379 } |
379 | 380 |
380 void GpuVideoEncodeAccelerator::Send(IPC::Message* message) { | 381 void GpuVideoEncodeAccelerator::Send(IPC::Message* message) { |
381 stub_->channel()->Send(message); | 382 stub_->channel()->Send(message); |
382 } | 383 } |
383 | 384 |
384 } // namespace media | 385 } // namespace media |
OLD | NEW |