Loading camera/device/3.2/ICameraDeviceCallback.hal +16 −9 Original line number Diff line number Diff line Loading @@ -35,7 +35,8 @@ interface ICameraDeviceCallback { /** * processCaptureResult: * * Send results from a completed capture to the framework. * Send results from one or more completed or partially completed captures * to the framework. * processCaptureResult() may be invoked multiple times by the HAL in * response to a single capture request. This allows, for example, the * metadata and low-resolution buffers to be returned in one call, and Loading @@ -61,11 +62,14 @@ interface ICameraDeviceCallback { * acceptable and expected that the buffer for request 5 for stream A may be * returned after the buffer for request 6 for stream B is. And it is * acceptable that the result metadata for request 6 for stream B is * returned before the buffer for request 5 for stream A is. * returned before the buffer for request 5 for stream A is. If multiple * capture results are included in a single call, camera framework must * process results sequentially from lower index to higher index, as if * these results were sent to camera framework one by one, from lower index * to higher index. * * The HAL retains ownership of result structure, which only needs to be * valid to access during this call. The framework must copy whatever it * needs before this call returns. * valid to access during this call. * * The output buffers do not need to be filled yet; the framework must wait * on the stream buffer release sync fence before reading the buffer Loading Loading @@ -93,20 +97,23 @@ interface ICameraDeviceCallback { * * Performance requirements: * * This is a non-blocking call. The framework must return this call in 5ms. * This is a non-blocking call. The framework must handle each CaptureResult * within 5ms. * * The pipeline latency (see S7 for definition) should be less than or equal to * 4 frame intervals, and must be less than or equal to 8 frame intervals. * */ processCaptureResult(CaptureResult result); processCaptureResult(vec<CaptureResult> results); /** * notify: * * Asynchronous notification callback from the HAL, fired for various * reasons. Only for information independent of frame capture, or that * require specific timing. * require specific timing. Multiple messages may be sent in one call; a * message with a higher index must be considered to have occurred after a * message with a lower index. * * Multiple threads may call notify() simultaneously. * Loading @@ -119,8 +126,8 @@ interface ICameraDeviceCallback { * ------------------------------------------------------------------------ * Performance requirements: * * This is a non-blocking call. The framework must return this call in 5ms. * This is a non-blocking call. The framework must handle each message in 5ms. */ notify(NotifyMsg msg); notify(vec<NotifyMsg> msgs); }; camera/device/3.2/ICameraDeviceSession.hal +16 −10 Original line number Diff line number Diff line Loading @@ -171,14 +171,16 @@ interface ICameraDeviceSession { /** * processCaptureRequest: * * Send a new capture request to the HAL. The HAL must not return from * this call until it is ready to accept the next request to process. Only * one call to processCaptureRequest() must be made at a time by the * framework, and the calls must all be from the same thread. The next call * to processCaptureRequest() must be made as soon as a new request and * its associated buffers are available. In a normal preview scenario, this * means the function is generally called again by the framework almost * instantly. * Send a list of capture requests to the HAL. The HAL must not return from * this call until it is ready to accept the next set of requests to * process. Only one call to processCaptureRequest() must be made at a time * by the framework, and the calls must all be from the same thread. The * next call to processCaptureRequest() must be made as soon as a new * request and its associated buffers are available. In a normal preview * scenario, this means the function is generally called again by the * framework almost instantly. If more than one request is provided by the * client, the HAL must process the requests in order of lowest index to * highest index. * * The actual request processing is asynchronous, with the results of * capture being returned by the HAL through the processCaptureResult() Loading Loading @@ -229,10 +231,14 @@ interface ICameraDeviceSession { * If the camera device has encountered a serious error. After this * error is returned, only the close() method can be successfully * called by the framework. * @return numRequestProcessed Number of requests successfully processed by * camera HAL. When status is OK, this must be equal to the size of * requests. When the call fails, this number is the number of requests * that HAL processed successfully before HAL runs into an error. * */ processCaptureRequest(CaptureRequest request) generates (Status status); processCaptureRequest(vec<CaptureRequest> requests) generates (Status status, uint32_t numRequestProcessed); /** * flush: Loading camera/device/3.2/default/CameraDevice.cpp +12 −1 Original line number Diff line number Diff line Loading @@ -229,7 +229,18 @@ Return<void> CameraDevice::open(const sp<ICameraDeviceCallback>& callback, open_ return Void(); } session = new CameraDeviceSession(device, callback); struct camera_info info; res = mModule->getCameraInfo(mCameraIdInt, &info); if (res != OK) { ALOGE("%s: Could not open camera: getCameraInfo failed", __FUNCTION__); device->common.close(&device->common); mLock.unlock(); _hidl_cb(Status::ILLEGAL_ARGUMENT, nullptr); return Void(); } session = new CameraDeviceSession( device, info.static_camera_characteristics, callback); if (session == nullptr) { ALOGE("%s: camera device session allocation failed", __FUNCTION__); mLock.unlock(); Loading Loading
camera/device/3.2/ICameraDeviceCallback.hal +16 −9 Original line number Diff line number Diff line Loading @@ -35,7 +35,8 @@ interface ICameraDeviceCallback { /** * processCaptureResult: * * Send results from a completed capture to the framework. * Send results from one or more completed or partially completed captures * to the framework. * processCaptureResult() may be invoked multiple times by the HAL in * response to a single capture request. This allows, for example, the * metadata and low-resolution buffers to be returned in one call, and Loading @@ -61,11 +62,14 @@ interface ICameraDeviceCallback { * acceptable and expected that the buffer for request 5 for stream A may be * returned after the buffer for request 6 for stream B is. And it is * acceptable that the result metadata for request 6 for stream B is * returned before the buffer for request 5 for stream A is. * returned before the buffer for request 5 for stream A is. If multiple * capture results are included in a single call, camera framework must * process results sequentially from lower index to higher index, as if * these results were sent to camera framework one by one, from lower index * to higher index. * * The HAL retains ownership of result structure, which only needs to be * valid to access during this call. The framework must copy whatever it * needs before this call returns. * valid to access during this call. * * The output buffers do not need to be filled yet; the framework must wait * on the stream buffer release sync fence before reading the buffer Loading Loading @@ -93,20 +97,23 @@ interface ICameraDeviceCallback { * * Performance requirements: * * This is a non-blocking call. The framework must return this call in 5ms. * This is a non-blocking call. The framework must handle each CaptureResult * within 5ms. * * The pipeline latency (see S7 for definition) should be less than or equal to * 4 frame intervals, and must be less than or equal to 8 frame intervals. * */ processCaptureResult(CaptureResult result); processCaptureResult(vec<CaptureResult> results); /** * notify: * * Asynchronous notification callback from the HAL, fired for various * reasons. Only for information independent of frame capture, or that * require specific timing. * require specific timing. Multiple messages may be sent in one call; a * message with a higher index must be considered to have occurred after a * message with a lower index. * * Multiple threads may call notify() simultaneously. * Loading @@ -119,8 +126,8 @@ interface ICameraDeviceCallback { * ------------------------------------------------------------------------ * Performance requirements: * * This is a non-blocking call. The framework must return this call in 5ms. * This is a non-blocking call. The framework must handle each message in 5ms. */ notify(NotifyMsg msg); notify(vec<NotifyMsg> msgs); };
camera/device/3.2/ICameraDeviceSession.hal +16 −10 Original line number Diff line number Diff line Loading @@ -171,14 +171,16 @@ interface ICameraDeviceSession { /** * processCaptureRequest: * * Send a new capture request to the HAL. The HAL must not return from * this call until it is ready to accept the next request to process. Only * one call to processCaptureRequest() must be made at a time by the * framework, and the calls must all be from the same thread. The next call * to processCaptureRequest() must be made as soon as a new request and * its associated buffers are available. In a normal preview scenario, this * means the function is generally called again by the framework almost * instantly. * Send a list of capture requests to the HAL. The HAL must not return from * this call until it is ready to accept the next set of requests to * process. Only one call to processCaptureRequest() must be made at a time * by the framework, and the calls must all be from the same thread. The * next call to processCaptureRequest() must be made as soon as a new * request and its associated buffers are available. In a normal preview * scenario, this means the function is generally called again by the * framework almost instantly. If more than one request is provided by the * client, the HAL must process the requests in order of lowest index to * highest index. * * The actual request processing is asynchronous, with the results of * capture being returned by the HAL through the processCaptureResult() Loading Loading @@ -229,10 +231,14 @@ interface ICameraDeviceSession { * If the camera device has encountered a serious error. After this * error is returned, only the close() method can be successfully * called by the framework. * @return numRequestProcessed Number of requests successfully processed by * camera HAL. When status is OK, this must be equal to the size of * requests. When the call fails, this number is the number of requests * that HAL processed successfully before HAL runs into an error. * */ processCaptureRequest(CaptureRequest request) generates (Status status); processCaptureRequest(vec<CaptureRequest> requests) generates (Status status, uint32_t numRequestProcessed); /** * flush: Loading
camera/device/3.2/default/CameraDevice.cpp +12 −1 Original line number Diff line number Diff line Loading @@ -229,7 +229,18 @@ Return<void> CameraDevice::open(const sp<ICameraDeviceCallback>& callback, open_ return Void(); } session = new CameraDeviceSession(device, callback); struct camera_info info; res = mModule->getCameraInfo(mCameraIdInt, &info); if (res != OK) { ALOGE("%s: Could not open camera: getCameraInfo failed", __FUNCTION__); device->common.close(&device->common); mLock.unlock(); _hidl_cb(Status::ILLEGAL_ARGUMENT, nullptr); return Void(); } session = new CameraDeviceSession( device, info.static_camera_characteristics, callback); if (session == nullptr) { ALOGE("%s: camera device session allocation failed", __FUNCTION__); mLock.unlock(); Loading