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

Unified Diff: media/gpu/v4l2_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, 7 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 side-by-side diff with in-line comments
Download patch
Index: media/gpu/v4l2_video_encode_accelerator.cc
diff --git a/media/gpu/v4l2_video_encode_accelerator.cc b/media/gpu/v4l2_video_encode_accelerator.cc
index 202a502038d3bd514ca2aa5f015c927484c42e1f..a9cb6bac634aa675829c53864f976a5b6c608511 100644
--- a/media/gpu/v4l2_video_encode_accelerator.cc
+++ b/media/gpu/v4l2_video_encode_accelerator.cc
@@ -664,7 +664,8 @@ void V4L2VideoEncodeAccelerator::Dequeue() {
child_task_runner_->PostTask(
FROM_HERE,
base::Bind(&Client::BitstreamBufferReady, client_,
- output_record.buffer_ref->id, output_size, key_frame));
+ output_record.buffer_ref->id, output_size, key_frame,
+ base::TimeDelta::FromMicroseconds(dqbuf.timestamp.tv_usec)));
output_record.at_device = false;
output_record.buffer_ref.reset();
free_output_buffers_.push_back(dqbuf.index);
@@ -689,6 +690,7 @@ bool V4L2VideoEncodeAccelerator::EnqueueInputRecord() {
qbuf.index = index;
qbuf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
qbuf.m.planes = qbuf_planes;
+ qbuf.timestamp.tv_usec = frame->timestamp().InMicroseconds();
DCHECK_EQ(device_input_format_, frame->format());
for (size_t i = 0; i < input_planes_count_; ++i) {

Powered by Google App Engine
This is Rietveld 408576698