diff options
author | James Dong <jdong@google.com> | 2011-11-21 21:08:55 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-11-21 21:08:55 -0800 |
commit | 7c56bb3ac1fb758a222a0c23805704a2789657b6 (patch) | |
tree | 9eadb09e607c361c36f37218f8121433eaff2574 /media/libstagefright/CameraSourceTimeLapse.cpp | |
parent | c637289fdfbea45a322601ce74f743595c477339 (diff) | |
parent | 88b00e9b79a0242251435b399971be4ca9738395 (diff) | |
download | frameworks_av-7c56bb3ac1fb758a222a0c23805704a2789657b6.zip frameworks_av-7c56bb3ac1fb758a222a0c23805704a2789657b6.tar.gz frameworks_av-7c56bb3ac1fb758a222a0c23805704a2789657b6.tar.bz2 |
am d0a25456: am 02740dc4: Merge "Fix log spamming during time lapse video recording" into ics-mr1
* commit 'd0a254566f5f0be5607b4d64839a575c888c94f6':
Fix log spamming during time lapse video recording
Diffstat (limited to 'media/libstagefright/CameraSourceTimeLapse.cpp')
-rw-r--r-- | media/libstagefright/CameraSourceTimeLapse.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp index 23e6e35..4f6c8d1 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>& 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>& 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. ALOGV("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. |