From 7757f5010a771fb8824b6fdf9788f588a1577e3f Mon Sep 17 00:00:00 2001 From: James Dong Date: Tue, 25 Jan 2011 16:31:28 -0800 Subject: Make sure that key frame is generated for timelapse video recording if there are at least two input video frames from camera source. This will fix the stop failure issue where we have to wait n * time_interval before a key frame can be received by the file writer, where o n is the actual number of buffers advertised by the video encoder o time_interval is the interval settings for timelapse video recording specifying the time distance between neighboring input video frames The fix includes two parts: o OMXCodec will not submit all n buffers at one time, but instead submit one input frame at one time if it become available. o Timelapse camera source made available the first two input frames and do not skip them so that the first compressed output frame data can be received regardless the specified time_interval bug - 3367659 Change-Id: Ia68cc2cb0d71aa7dc54540e9ad82fae911ad530b --- media/libstagefright/CameraSource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'media/libstagefright/CameraSource.cpp') diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp index b1c6b18..66e0657 100644 --- a/media/libstagefright/CameraSource.cpp +++ b/media/libstagefright/CameraSource.cpp @@ -147,8 +147,8 @@ CameraSource::CameraSource( mNumFramesReceived(0), mLastFrameTimestampUs(0), mStarted(false), - mFirstFrameTimeUs(0), mNumFramesEncoded(0), + mFirstFrameTimeUs(0), mNumFramesDropped(0), mNumGlitches(0), mGlitchDurationThresholdUs(200000), -- cgit v1.1