From e8e5f86e9e310b065596c8cbbca1543eb833dee1 Mon Sep 17 00:00:00 2001 From: James Dong Date: Sun, 20 Nov 2011 09:45:44 -0800 Subject: Fix log spamming during time lapse video recording Change-Id: I4fc0809203684ebb02eaf217d7abad00aefc898f related-to-bug: 5626569 --- media/libstagefright/CameraSourceTimeLapse.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'media/libstagefright/CameraSourceTimeLapse.cpp') diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp index e4de20a..eb456f4 100644 --- a/media/libstagefright/CameraSourceTimeLapse.cpp +++ b/media/libstagefright/CameraSourceTimeLapse.cpp @@ -39,12 +39,12 @@ CameraSourceTimeLapse *CameraSourceTimeLapse::CreateFromCamera( Size videoSize, int32_t videoFrameRate, const sp& surface, - int64_t timeBetweenTimeLapseFrameCaptureUs) { + int64_t timeBetweenFrameCaptureUs) { CameraSourceTimeLapse *source = new CameraSourceTimeLapse(camera, proxy, cameraId, videoSize, videoFrameRate, surface, - timeBetweenTimeLapseFrameCaptureUs); + timeBetweenFrameCaptureUs); if (source != NULL) { if (source->initCheck() != OK) { @@ -62,15 +62,15 @@ CameraSourceTimeLapse::CameraSourceTimeLapse( Size videoSize, int32_t videoFrameRate, const sp& surface, - int64_t timeBetweenTimeLapseFrameCaptureUs) + int64_t timeBetweenFrameCaptureUs) : CameraSource(camera, proxy, cameraId, videoSize, videoFrameRate, surface, true), - mTimeBetweenTimeLapseFrameCaptureUs(timeBetweenTimeLapseFrameCaptureUs), mTimeBetweenTimeLapseVideoFramesUs(1E6/videoFrameRate), mLastTimeLapseFrameRealTimestampUs(0), mSkipCurrentFrame(false) { + mTimeBetweenFrameCaptureUs = timeBetweenFrameCaptureUs; LOGD("starting time lapse mode: %lld us", - mTimeBetweenTimeLapseFrameCaptureUs); + mTimeBetweenFrameCaptureUs); mVideoWidth = videoSize.width; mVideoHeight = videoSize.height; @@ -271,14 +271,14 @@ bool CameraSourceTimeLapse::skipFrameAndModifyTimeStamp(int64_t *timestampUs) { // The first 2 output frames from the encoder are: decoder specific info and // the compressed video frame data for the first input video frame. if (mNumFramesEncoded >= 1 && *timestampUs < - (mLastTimeLapseFrameRealTimestampUs + mTimeBetweenTimeLapseFrameCaptureUs)) { + (mLastTimeLapseFrameRealTimestampUs + mTimeBetweenFrameCaptureUs)) { // Skip all frames from last encoded frame until - // sufficient time (mTimeBetweenTimeLapseFrameCaptureUs) has passed. + // sufficient time (mTimeBetweenFrameCaptureUs) has passed. // Tell the camera to release its recording frame and return. LOGV("dataCallbackTimestamp timelapse: skipping intermediate frame"); return true; } else { - // Desired frame has arrived after mTimeBetweenTimeLapseFrameCaptureUs time: + // Desired frame has arrived after mTimeBetweenFrameCaptureUs time: // - Reset mLastTimeLapseFrameRealTimestampUs to current time. // - Artificially modify timestampUs to be one frame time (1/framerate) ahead // of the last encoded frame's time stamp. -- cgit v1.1