@@ -39,12 +39,12 @@ CameraSourceTimeLapse *CameraSourceTimeLapse::CreateFromCamera(
3939 Size videoSize,
4040 int32_t videoFrameRate,
4141 const sp<Surface>& surface,
42- int64_t timeBetweenTimeLapseFrameCaptureUs ) {
42+ int64_t timeBetweenFrameCaptureUs ) {
4343
4444 CameraSourceTimeLapse *source = new
4545 CameraSourceTimeLapse (camera, proxy, cameraId,
4646 videoSize, videoFrameRate, surface,
47- timeBetweenTimeLapseFrameCaptureUs );
47+ timeBetweenFrameCaptureUs );
4848
4949 if (source != NULL ) {
5050 if (source->initCheck () != OK) {
@@ -62,15 +62,15 @@ CameraSourceTimeLapse::CameraSourceTimeLapse(
6262 Size videoSize,
6363 int32_t videoFrameRate,
6464 const sp<Surface>& surface,
65- int64_t timeBetweenTimeLapseFrameCaptureUs )
65+ int64_t timeBetweenFrameCaptureUs )
6666 : CameraSource(camera, proxy, cameraId, videoSize, videoFrameRate, surface, true ),
67- mTimeBetweenTimeLapseFrameCaptureUs (timeBetweenTimeLapseFrameCaptureUs),
6867 mTimeBetweenTimeLapseVideoFramesUs (1E6 /videoFrameRate),
6968 mLastTimeLapseFrameRealTimestampUs(0 ),
7069 mSkipCurrentFrame(false ) {
7170
71+ mTimeBetweenFrameCaptureUs = timeBetweenFrameCaptureUs;
7272 LOGD (" starting time lapse mode: %lld us" ,
73- mTimeBetweenTimeLapseFrameCaptureUs );
73+ mTimeBetweenFrameCaptureUs );
7474
7575 mVideoWidth = videoSize.width ;
7676 mVideoHeight = videoSize.height ;
@@ -271,14 +271,14 @@ bool CameraSourceTimeLapse::skipFrameAndModifyTimeStamp(int64_t *timestampUs) {
271271 // The first 2 output frames from the encoder are: decoder specific info and
272272 // the compressed video frame data for the first input video frame.
273273 if (mNumFramesEncoded >= 1 && *timestampUs <
274- (mLastTimeLapseFrameRealTimestampUs + mTimeBetweenTimeLapseFrameCaptureUs )) {
274+ (mLastTimeLapseFrameRealTimestampUs + mTimeBetweenFrameCaptureUs )) {
275275 // Skip all frames from last encoded frame until
276- // sufficient time (mTimeBetweenTimeLapseFrameCaptureUs ) has passed.
276+ // sufficient time (mTimeBetweenFrameCaptureUs ) has passed.
277277 // Tell the camera to release its recording frame and return.
278278 LOGV (" dataCallbackTimestamp timelapse: skipping intermediate frame" );
279279 return true ;
280280 } else {
281- // Desired frame has arrived after mTimeBetweenTimeLapseFrameCaptureUs time:
281+ // Desired frame has arrived after mTimeBetweenFrameCaptureUs time:
282282 // - Reset mLastTimeLapseFrameRealTimestampUs to current time.
283283 // - Artificially modify timestampUs to be one frame time (1/framerate) ahead
284284 // of the last encoded frame's time stamp.
0 commit comments