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

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

Issue 1983193002: Decouple capture timestamp and reference time (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/capture/video/mac/video_capture_device_mac.mm
diff --git a/media/capture/video/mac/video_capture_device_mac.mm b/media/capture/video/mac/video_capture_device_mac.mm
index 776082ba8e1197d58aceba90577c674421515843..3916092e8e7ae8c802edc2230e7647b3048e45e8 100644
--- a/media/capture/video/mac/video_capture_device_mac.mm
+++ b/media/capture/video/mac/video_capture_device_mac.mm
@@ -316,7 +316,6 @@ VideoCaptureDeviceMac::VideoCaptureDeviceMac(const Name& device_name)
task_runner_(base::ThreadTaskRunnerHandle::Get()),
state_(kNotInitialized),
capture_device_(nil),
- first_timestamp_(media::kNoTimestamp()),
weak_factory_(this) {
}
@@ -423,18 +422,8 @@ void VideoCaptureDeviceMac::ReceiveFrame(const uint8_t* video_frame,
return;
}
- base::TimeTicks aligned_timestamp;
- if (timestamp == media::kNoTimestamp()) {
- aligned_timestamp = base::TimeTicks::Now();
- } else {
- if (first_timestamp_ == media::kNoTimestamp()) {
- first_timestamp_ = timestamp;
- first_aligned_timestamp_ = base::TimeTicks::Now();
- }
- aligned_timestamp = first_aligned_timestamp_ + timestamp - first_timestamp_;
- }
client_->OnIncomingCapturedData(video_frame, video_frame_length, frame_format,
- 0, aligned_timestamp);
+ 0, base::TimeTicks::Now(), timestamp);
}
void VideoCaptureDeviceMac::ReceiveError(

Powered by Google App Engine
This is Rietveld 408576698