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

Unified Diff: media/capture/video/android/video_capture_device_android.cc

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/android/video_capture_device_android.cc
diff --git a/media/capture/video/android/video_capture_device_android.cc b/media/capture/video/android/video_capture_device_android.cc
index da2434275ae58dcdb02521c3581b9a7f7a8d7b22..28bf0532b47bc8423853edcfae565bd1701defb8 100644
--- a/media/capture/video/android/video_capture_device_android.cc
+++ b/media/capture/video/android/video_capture_device_android.cc
@@ -184,6 +184,7 @@ void VideoCaptureDeviceAndroid::OnFrameAvailable(
if (!got_first_frame_) {
// Set aside one frame allowance for fluctuation.
expected_next_frame_time_ = current_time - frame_interval_;
+ first_ref_time_ = current_time;
miu 2016/05/18 22:35:40 There's probably a way to pass the video capture t
qiangchen 2016/05/20 17:55:14 Done.
got_first_frame_ = true;
}
@@ -192,8 +193,8 @@ void VideoCaptureDeviceAndroid::OnFrameAvailable(
expected_next_frame_time_ += frame_interval_;
client_->OnIncomingCapturedData(reinterpret_cast<uint8_t*>(buffer), length,
- capture_format_, rotation,
- base::TimeTicks::Now());
+ capture_format_, rotation, current_time,
+ current_time - first_ref_time_);
}
env->ReleaseByteArrayElements(data, buffer, JNI_ABORT);

Powered by Google App Engine
This is Rietveld 408576698