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

Unified Diff: media/capture/video/file_video_capture_device.cc

Issue 1983193002: Decouple capture timestamp and reference time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve Comments 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
« no previous file with comments | « media/capture/video/file_video_capture_device.h ('k') | media/capture/video/linux/v4l2_capture_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/capture/video/file_video_capture_device.cc
diff --git a/media/capture/video/file_video_capture_device.cc b/media/capture/video/file_video_capture_device.cc
index d06741e705a04d2b82c7a9519ec70b383089fcfc..be5a557da4e4d50001921e46813f2ab592b9f638 100644
--- a/media/capture/video/file_video_capture_device.cc
+++ b/media/capture/video/file_video_capture_device.cc
@@ -366,8 +366,10 @@ void FileVideoCaptureDevice::OnCaptureTask() {
DCHECK(frame_size);
CHECK(frame_ptr);
const base::TimeTicks current_time = base::TimeTicks::Now();
+ if (first_ref_time_.is_null())
+ first_ref_time_ = current_time;
client_->OnIncomingCapturedData(frame_ptr, frame_size, capture_format_, 0,
- current_time);
+ current_time, current_time - first_ref_time_);
// Reschedule next CaptureTask.
const base::TimeDelta frame_interval =
base::TimeDelta::FromMicroseconds(1E6 / capture_format_.frame_rate);
« no previous file with comments | « media/capture/video/file_video_capture_device.h ('k') | media/capture/video/linux/v4l2_capture_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698