Camera2: Add trigger support, and implement autofocus
- Add skeletons for all triggering actions into Camera2Device
- Add support for AF triggers to HAL
- Add support for AF notifications from HAL
Bug: 6243944
Change-Id: I21025440849ae41f7083e1dcb72c99f8e5b2d5f7
diff --git a/services/camera/libcameraservice/Camera2Client.h b/services/camera/libcameraservice/Camera2Client.h
index 8c10d6b..dffd4ab 100644
--- a/services/camera/libcameraservice/Camera2Client.h
+++ b/services/camera/libcameraservice/Camera2Client.h
@@ -200,6 +200,11 @@
// listed in Camera.Parameters
bool storeMetadataInBuffers;
bool playShutterSound;
+ bool enableFocusMoveMessages;
+
+ int afTriggerCounter;
+ int currentAfTriggerId;
+ bool afInMotion;
};
class LockedParameters {
@@ -313,9 +318,6 @@
camera_metadata_t *mRecordingRequest;
sp<Camera2Heap> mRecordingHeap;
- // TODO: This needs to be queried from somewhere, or the BufferQueue needs
- // to be passed all the way to stagefright. Right now, set to a large number
- // to avoid starvation of the video encoders.
static const size_t kDefaultRecordingHeapCount = 8;
size_t mRecordingHeapCount;
size_t mRecordingHeapHead, mRecordingHeapFree;
@@ -325,6 +327,10 @@
status_t updateRecordingRequest(const Parameters ¶ms);
status_t updateRecordingStream(const Parameters ¶ms);
+ /** Notification-related members */
+
+ bool mAfInMotion;
+
/** Camera2Device instance wrapping HAL2 entry */
sp<Camera2Device> mDevice;