Camera: default implementation of device 1.0
Also some updates to HIDL interface:
- Add releaseRecordingFrameHandle to ICameraDevice
for native handle metadata recording mode
- Add handleCallbackTimestamp to ICameraDevieCallback
for native handle metadata recording mode
- Add missing face detection metadata to
ICameraDeviceCallback::dataCallback
- Instead of passing native handle, pass buffer ID
in dequeueBuffer/enqueueBuffer/cancelBuffer in
ICameraDevicePreviewCallback
- Add CameraFrameMetadata in types.hal for face
metadata
Test: Camera CTS passing (except FlashLightTest) on Angler
Bug: 30985004
Change-Id: Idf72a4b5f4c934845ac698f0b13536608ffd0100
diff --git a/camera/device/1.0/ICameraDevicePreviewCallback.hal b/camera/device/1.0/ICameraDevicePreviewCallback.hal
index ebc7460..4c9b517 100644
--- a/camera/device/1.0/ICameraDevicePreviewCallback.hal
+++ b/camera/device/1.0/ICameraDevicePreviewCallback.hal
@@ -30,28 +30,31 @@
*
* @return status The status code for this operation. If not OK, then
* buffer and stride must not be used.
- * @return buffer A handle to the buffer to write into.
+ * @return bufferId A unique ID for the returned buffer.
+ * @return buffer A handle to the buffer to write into. Must be non-null if the bufferId has not
+ * been seen by HAL before. Must be null if the bufferId is seen before. HAL must keep track
+ * of the bufferId to actual buffer handle mapping.
* @return stride The stride between two rows of pixels in this buffer.
*/
- dequeueBuffer() generates (Status status, handle buffer, uint32_t stride);
+ dequeueBuffer() generates (Status status, uint64_t bufferId, handle buffer, uint32_t stride);
/**
* Send a filled preview buffer to its consumer.
*
- * @param buffer The handle to the preview buffer that's been filled.
+ * @param bufferId The bufferId of the preview buffer
* @return status The status code for this operation.
*/
- enqueueBuffer(handle buffer) generates (Status status);
+ enqueueBuffer(uint64_t bufferId) generates (Status status);
/**
* Return a preview buffer unfilled. This buffer must not be sent on to the
* preview consumer as a valid buffer, but may be reused as if it were
* empty.
*
- * @param buffer The handle to the preview buffer to return.
+ * @param bufferId The bufferId of the preview buffer
* @return status The status code for this operation.
*/
- cancelBuffer(handle buffer) generates (Status status);
+ cancelBuffer(uint64_t bufferId) generates (Status status);
/**
* Set the number of preview buffers needed by the HAL.