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

Unified Diff: media/capture/video/mac/video_capture_device_qtkit_mac.mm

Issue 1421583007: Mac Video Capture: Sending the timestamps provided by the driver to the capture pipeline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/capture/video/mac/video_capture_device_qtkit_mac.mm
diff --git a/media/capture/video/mac/video_capture_device_qtkit_mac.mm b/media/capture/video/mac/video_capture_device_qtkit_mac.mm
index 1ea4c9e44988f8cfb18d5f03ba8f2c13f236d948..484782e88d47e7fe5a082759628c11246e382c49 100644
--- a/media/capture/video/mac/video_capture_device_qtkit_mac.mm
+++ b/media/capture/video/mac/video_capture_device_qtkit_mac.mm
@@ -324,9 +324,16 @@
&aspectDenominator);
}
+ QTTime qt_timestamp = [sampleBuffer presentationTime];
mcasas 2015/10/31 03:24:25 const
qiangchen 2015/11/02 18:21:21 Done.
// Deliver the captured video frame.
+ const int microseconds_per_second = 1000000;
+ const base::TimeTicks timestamp =
+ base::TimeTicks() +
+ base::TimeDelta::FromMicroseconds(qt_timestamp.timeValue *
+ microseconds_per_second /
+ qt_timestamp.timeScale);
frameReceiver_->ReceiveFrame(addressToPass, frameSize, captureFormat,
- aspectNumerator, aspectDenominator);
+ aspectNumerator, aspectDenominator, timestamp);
CVPixelBufferUnlockBaseAddress(videoFrame, kLockFlags);
}

Powered by Google App Engine
This is Rietveld 408576698