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..52f9106ab8a51ea426bc8d6899540492d0e5c769 100644 |
--- a/media/gpu/v4l2_video_encode_accelerator.cc |
+++ b/media/gpu/v4l2_video_encode_accelerator.cc |
@@ -663,8 +663,12 @@ void V4L2VideoEncodeAccelerator::Dequeue() { |
<< ", key_frame=" << key_frame; |
child_task_runner_->PostTask( |
FROM_HERE, |
- base::Bind(&Client::BitstreamBufferReady, client_, |
- output_record.buffer_ref->id, output_size, key_frame)); |
+ base::Bind( |
+ &Client::BitstreamBufferReady, client_, |
+ output_record.buffer_ref->id, output_size, key_frame, |
+ base::TimeDelta::FromMicroseconds( |
Pawel Osciak
2016/05/27 04:46:38
Perhaps we could use Time::FromTimeVal()...
shenghao
2016/05/30 09:18:02
Talked offline. Time::FromTimeVal() does not fit o
|
+ dqbuf.timestamp.tv_usec + |
+ dqbuf.timestamp.tv_sec * base::Time::kMicrosecondsPerSecond))); |
output_record.at_device = false; |
output_record.buffer_ref.reset(); |
free_output_buffers_.push_back(dqbuf.index); |
@@ -689,6 +693,10 @@ bool V4L2VideoEncodeAccelerator::EnqueueInputRecord() { |
qbuf.index = index; |
qbuf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; |
qbuf.m.planes = qbuf_planes; |
+ qbuf.timestamp.tv_sec = static_cast<time_t>(frame->timestamp().InSeconds()); |
Pawel Osciak
2016/05/27 04:46:38
... and Time::ToTimeVal().
shenghao
2016/05/30 09:18:02
Talked offline. Time::ToTimeVal() does not fit our
|
+ qbuf.timestamp.tv_usec = |
+ frame->timestamp().InMicroseconds() - |
+ frame->timestamp().InSeconds() * base::Time::kMicrosecondsPerSecond; |
DCHECK_EQ(device_input_format_, frame->format()); |
for (size_t i = 0; i < input_planes_count_; ++i) { |