diff options
author | Nipun Kwatra <nkwatra@google.com> | 2010-06-30 18:51:31 -0700 |
---|---|---|
committer | Nipun Kwatra <nkwatra@google.com> | 2010-07-01 14:54:36 -0700 |
commit | fc20aab463f527ab3b0664986f0381a86b375884 (patch) | |
tree | 699a2eb0d208ebbe5d43e62fd4be162bb46440cf /include | |
parent | 633d8eadef0cd975c88e99ba7323f6414db09e3b (diff) | |
download | frameworks_av-fc20aab463f527ab3b0664986f0381a86b375884.zip frameworks_av-fc20aab463f527ab3b0664986f0381a86b375884.tar.gz frameworks_av-fc20aab463f527ab3b0664986f0381a86b375884.tar.bz2 |
Adding timelapse capture from videocamera.
Current implementation looks at the timestamps of all incoming frames in
CameraSource::dataCallbackTimestamp().
It drops all frames until enough time has elapsed to get the next time lapse frame.
When enough time has passed to capture the next time lapse frame, the frame is no longer dropped
and the timestamp of this frame is modified to be one frame time (1/framerate) ahead of the
last encoded frame's time stamp.
Change-Id: I82b9d5e96113dffa6901aac3b8a8ef999ffc1d0b
Diffstat (limited to 'include')
-rw-r--r-- | include/media/stagefright/CameraSource.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/media/stagefright/CameraSource.h b/include/media/stagefright/CameraSource.h index 3192d03..fd30ba5 100644 --- a/include/media/stagefright/CameraSource.h +++ b/include/media/stagefright/CameraSource.h @@ -35,6 +35,10 @@ public: static CameraSource *Create(); static CameraSource *CreateFromCamera(const sp<Camera> &camera); + void enableTimeLapseMode( + int64_t timeBetweenTimeLapseFrameCaptureUs, int32_t videoFrameRate); + void disableTimeLapseMode(); + virtual ~CameraSource(); virtual status_t start(MetaData *params = NULL); @@ -71,6 +75,14 @@ private: bool mCollectStats; bool mStarted; + // Time between capture of two frames during time lapse recording + // Negative value indicates that timelapse is disabled. + int64_t mTimeBetweenTimeLapseFrameCaptureUs; + // Time between two frames in final video (1/frameRate) + int64_t mTimeBetweenTimeLapseVideoFramesUs; + // Real timestamp of the last encoded time lapse frame + int64_t mLastTimeLapseFrameRealTimestampUs; + CameraSource(const sp<Camera> &camera); void dataCallbackTimestamp( |