diff options
author | Nipun Kwatra <nkwatra@google.com> | 2010-09-15 15:08:49 -0700 |
---|---|---|
committer | Nipun Kwatra <nkwatra@google.com> | 2010-09-17 09:50:27 -0700 |
commit | 78eff720c86eb6d4e3d45a144df60b2ca464d2d4 (patch) | |
tree | 74d93ba7c4ae2d3904d40ef69f614d257c596547 /media/libmediaplayerservice/StagefrightRecorder.h | |
parent | 302a965f4bf5d179ccc68b7d853e2806941de020 (diff) | |
download | frameworks_av-78eff720c86eb6d4e3d45a144df60b2ca464d2d4.zip frameworks_av-78eff720c86eb6d4e3d45a144df60b2ca464d2d4.tar.gz frameworks_av-78eff720c86eb6d4e3d45a144df60b2ca464d2d4.tar.bz2 |
Implemented frequent read returns for quick stop in time lapse.
If the frame capture interval is large, read will block for a long time.
Due to the way the mediaRecorder framework works, a stop() call from
mediaRecorder waits until the read returns, causing a long wait for
stop() to return. To avoid this, we return a copy of the last read
frame with the same time stamp if a frame is not available quickly.
This keeps the read() call from blocking too long. This method is
triggered when startQuickReadReturns() is called on
CameraSourceTimeLapse.
In the still camera case, also using waitRelative on Condition
instaed of sleeping, so that we can wake it up.
Also for the idle check instead of sleeping, we now wait on a
condition variable, which is woken up when the last takePicture
callback gets called.
Change-Id: Ia74386e175536aee0f44ae2f8b114c353d3d72f5
Diffstat (limited to 'media/libmediaplayerservice/StagefrightRecorder.h')
-rw-r--r-- | media/libmediaplayerservice/StagefrightRecorder.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/media/libmediaplayerservice/StagefrightRecorder.h b/media/libmediaplayerservice/StagefrightRecorder.h index f1dc9e6..02d9a01 100644 --- a/media/libmediaplayerservice/StagefrightRecorder.h +++ b/media/libmediaplayerservice/StagefrightRecorder.h @@ -25,6 +25,7 @@ namespace android { class Camera; class CameraSource; +class CameraSourceTimeLapse; class MediaSourceSplitter; struct MediaSource; struct MediaWriter; @@ -101,6 +102,7 @@ private: int64_t mTimeBetweenTimeLapseFrameCaptureUs; bool mCaptureAuxVideo; sp<MediaSourceSplitter> mCameraSourceSplitter; + sp<CameraSourceTimeLapse> mCameraSourceTimeLapse; String8 mParams; int mOutputFd, mOutputFdAux; |