diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2012-08-29 17:37:16 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-09-06 10:38:22 -0700 |
commit | 69230df9905534cda15becd44c0109874c4be5f0 (patch) | |
tree | 579a2bd3dbea0c49b02a185324ec4724e2ba15ca /services/camera/libcameraservice/Camera2Client.h | |
parent | 56cd317a35a18ba5c40b344f0a5bf436546246a1 (diff) | |
download | frameworks_av-69230df9905534cda15becd44c0109874c4be5f0.zip frameworks_av-69230df9905534cda15becd44c0109874c4be5f0.tar.gz frameworks_av-69230df9905534cda15becd44c0109874c4be5f0.tar.bz2 |
Camera2: Basic ZSL and precapture trigger support.
- Add capture sequencer to control still image capture process
- Use precapture trigger for standard capture in sequencer
- Add infrastructure for reprocessing streams
- Add ZSL processor to maintain ZSL queue
- Add ZSL capture sequence to sequencer
This patch sets up ZSL mode and precapture triggers.
For now, to enable zsl mode, set the system property camera.zsl_mode
to 1.
Bug: 6243944
Change-Id: Icf8cb1a83a7c11a152a11007c8f3c54f8ea1c70c
Diffstat (limited to 'services/camera/libcameraservice/Camera2Client.h')
-rw-r--r-- | services/camera/libcameraservice/Camera2Client.h | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/services/camera/libcameraservice/Camera2Client.h b/services/camera/libcameraservice/Camera2Client.h index b2fd636..df5dbf4 100644 --- a/services/camera/libcameraservice/Camera2Client.h +++ b/services/camera/libcameraservice/Camera2Client.h @@ -21,7 +21,9 @@ #include "CameraService.h" #include "camera2/Parameters.h" #include "camera2/FrameProcessor.h" -#include "camera2/CaptureProcessor.h" +#include "camera2/JpegProcessor.h" +#include "camera2/ZslProcessor.h" +#include "camera2/CaptureSequencer.h" #include "camera2/CallbackProcessor.h" #include <binder/MemoryBase.h> #include <binder/MemoryHeapBase.h> @@ -95,10 +97,20 @@ public: * Interface used by independent components of Camera2Client. */ - int getCameraId(); + int getCameraId() const; const sp<Camera2Device>& getCameraDevice(); camera2::SharedParameters& getParameters(); + int getPreviewStreamId() const; + int getCaptureStreamId() const; + int getCallbackStreamId() const; + int getRecordingStreamId() const; + int getZslStreamId() const; + + status_t registerFrameListener(int32_t id, + wp<camera2::FrameProcessor::FilteredListener> listener); + status_t removeFrameListener(int32_t id); + // Simple class to ensure that access to ICameraClient is serialized by // requiring mCameraClientLock to be locked before access to mCameraClient // is possible. @@ -123,6 +135,10 @@ public: static size_t calculateBufferSize(int width, int height, int format, int stride); + static const int32_t kPreviewRequestId = 1000; + static const int32_t kRecordRequestId = 2000; + static const int32_t kFirstCaptureRequestId = 3000; + private: /** ICamera interface-related private members */ @@ -183,9 +199,9 @@ private: /* Still image capture related members */ - sp<camera2::CaptureProcessor> mCaptureProcessor; - CameraMetadata mCaptureRequest; - status_t updateCaptureRequest(const Parameters ¶ms); + sp<camera2::CaptureSequencer> mCaptureSequencer; + sp<camera2::JpegProcessor> mJpegProcessor; + sp<camera2::ZslProcessor> mZslProcessor; /* Recording related members */ @@ -228,18 +244,6 @@ private: // Verify that caller is the owner of the camera status_t checkPid(const char *checkLocation) const; - - // Update parameters all requests use, based on mParameters - status_t updateRequestCommon(CameraMetadata *request, const Parameters ¶ms) const; - - // Map from sensor active array pixel coordinates to normalized camera - // parameter coordinates. The former are (0,0)-(array width - 1, array height - // - 1), the latter from (-1000,-1000)-(1000,1000) - int normalizedXToArray(int x) const; - int normalizedYToArray(int y) const; - int arrayXToNormalized(int width) const; - int arrayYToNormalized(int height) const; - }; }; // namespace android |