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

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: 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/mac/video_capture_device_mac.h ('k') | media/capture/video/video_capture_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e3c14edfa5e50d8a7048ba3165469d7bf5ebda15..f032280d68e9a150dc54e94220a5323d7de32b38 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(
« no previous file with comments | « media/capture/video/mac/video_capture_device_mac.h ('k') | media/capture/video/video_capture_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698