Chromium Code Reviews| 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); |