diff options
author | Nipun Kwatra <nkwatra@google.com> | 2010-09-02 11:43:15 -0700 |
---|---|---|
committer | Nipun Kwatra <nkwatra@google.com> | 2010-09-03 17:09:36 -0700 |
commit | 4a857e620fecd91d051d8e58f573b5ff30d81aaf (patch) | |
tree | 115280da6f02ce144863960052fe75340aa9225b /include | |
parent | ab15bce98d44b67f221b6fb8a377744940dda46c (diff) | |
download | frameworks_base-4a857e620fecd91d051d8e58f573b5ff30d81aaf.zip frameworks_base-4a857e620fecd91d051d8e58f573b5ff30d81aaf.tar.gz frameworks_base-4a857e620fecd91d051d8e58f573b5ff30d81aaf.tar.bz2 |
Moving decision to use still camera to CameraSourceTimeLapse
CameraSourceTimeLapse now decides whether to use still or video
camera automatically. It checks if the passed in size is a valid
preview size and if it is, then uses the video camera else uses
the still camera.
Removed from StagefrightRecorder the support to set parameter
useStillCameraForTimeLapse.
Change-Id: I71f5b0fc7080ca524792381efe918d22e41a7f36
Diffstat (limited to 'include')
-rw-r--r-- | include/media/stagefright/CameraSourceTimeLapse.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/media/stagefright/CameraSourceTimeLapse.h b/include/media/stagefright/CameraSourceTimeLapse.h index 7135a33..e1cd0c8 100644 --- a/include/media/stagefright/CameraSourceTimeLapse.h +++ b/include/media/stagefright/CameraSourceTimeLapse.h @@ -31,13 +31,12 @@ class Camera; class CameraSourceTimeLapse : public CameraSource { public: - static CameraSourceTimeLapse *Create(bool useStillCameraForTimeLapse, + static CameraSourceTimeLapse *Create( int64_t timeBetweenTimeLapseFrameCaptureUs, int32_t width, int32_t height, int32_t videoFrameRate); static CameraSourceTimeLapse *CreateFromCamera(const sp<Camera> &camera, - bool useStillCameraForTimeLapse, int64_t timeBetweenTimeLapseFrameCaptureUs, int32_t width, int32_t height, int32_t videoFrameRate); @@ -87,7 +86,6 @@ private: bool mCameraIdle; CameraSourceTimeLapse(const sp<Camera> &camera, - bool useStillCameraForTimeLapse, int64_t timeBetweenTimeLapseFrameCaptureUs, int32_t width, int32_t height, int32_t videoFrameRate); @@ -124,6 +122,11 @@ private: virtual void dataCallbackTimestamp(int64_t timestampUs, int32_t msgType, const sp<IMemory> &data); + // If the passed in size (width x height) is a supported preview size, + // the function sets the camera's preview size to it and returns true. + // Otherwise returns false. + bool trySettingPreviewSize(int32_t width, int32_t height); + // The still camera may not support the demanded video width and height. // We look for the supported picture sizes from the still camera and // choose the smallest one with either dimensions higher than the corresponding |