Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1038)

Side by Side Diff: media/gpu/ipc/service/gpu_video_encode_accelerator.cc

Issue 1996453003: RTC Video Encoder: Use capturer timestamp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 size_t output_buffer_size) { 144 size_t output_buffer_size) {
145 Send(new AcceleratedVideoEncoderHostMsg_RequireBitstreamBuffers( 145 Send(new AcceleratedVideoEncoderHostMsg_RequireBitstreamBuffers(
146 host_route_id_, input_count, input_coded_size, output_buffer_size)); 146 host_route_id_, input_count, input_coded_size, output_buffer_size));
147 input_coded_size_ = input_coded_size; 147 input_coded_size_ = input_coded_size;
148 output_buffer_size_ = output_buffer_size; 148 output_buffer_size_ = output_buffer_size;
149 } 149 }
150 150
151 void GpuVideoEncodeAccelerator::BitstreamBufferReady( 151 void GpuVideoEncodeAccelerator::BitstreamBufferReady(
152 int32_t bitstream_buffer_id, 152 int32_t bitstream_buffer_id,
153 size_t payload_size, 153 size_t payload_size,
154 bool key_frame) { 154 bool key_frame,
155 base::TimeDelta timestamp) {
155 Send(new AcceleratedVideoEncoderHostMsg_BitstreamBufferReady( 156 Send(new AcceleratedVideoEncoderHostMsg_BitstreamBufferReady(
156 host_route_id_, bitstream_buffer_id, payload_size, key_frame)); 157 host_route_id_, bitstream_buffer_id, payload_size, key_frame, timestamp));
157 } 158 }
158 159
159 void GpuVideoEncodeAccelerator::NotifyError( 160 void GpuVideoEncodeAccelerator::NotifyError(
160 media::VideoEncodeAccelerator::Error error) { 161 media::VideoEncodeAccelerator::Error error) {
161 Send(new AcceleratedVideoEncoderHostMsg_NotifyError(host_route_id_, error)); 162 Send(new AcceleratedVideoEncoderHostMsg_NotifyError(host_route_id_, error));
162 } 163 }
163 164
164 void GpuVideoEncodeAccelerator::OnWillDestroyStub() { 165 void GpuVideoEncodeAccelerator::OnWillDestroyStub() {
165 DCHECK(stub_); 166 DCHECK(stub_);
166 stub_->channel()->RemoveRoute(host_route_id_); 167 stub_->channel()->RemoveRoute(host_route_id_);
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 Send(new AcceleratedVideoEncoderHostMsg_NotifyInputDone(host_route_id_, 371 Send(new AcceleratedVideoEncoderHostMsg_NotifyInputDone(host_route_id_,
371 frame_id)); 372 frame_id));
372 // Just let |shm| fall out of scope. 373 // Just let |shm| fall out of scope.
373 } 374 }
374 375
375 void GpuVideoEncodeAccelerator::Send(IPC::Message* message) { 376 void GpuVideoEncodeAccelerator::Send(IPC::Message* message) {
376 stub_->channel()->Send(message); 377 stub_->channel()->Send(message);
377 } 378 }
378 379
379 } // namespace media 380 } // namespace media
OLDNEW
« no previous file with comments | « media/gpu/ipc/service/gpu_video_encode_accelerator.h ('k') | media/gpu/v4l2_video_encode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698