| <html devsite> |
| <head> |
| <title>Error and stream handling</title> |
| <meta name="project_path" value="/_project.yaml" /> |
| <meta name="book_path" value="/_book.yaml" /> |
| </head> |
| <body> |
| <!-- |
| Copyright 2017 The Android Open Source Project |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| |
| |
| <h2 id="error-mgmt">Error management</h2> |
| <p>HIDL interface methods that interact with the camera must generate |
| the corresponding camera specific |
| <a href="https://source.android.com/reference/hidl/android/hardware/camera/common/1.0/types">status</a>.</p> |
| <p>If |
| <a href="/reference/hidl/android/hardware/camera/device/3.2/ICameraDeviceCallback#notify">ICameraDeviceCallbacks::notify()</a> |
| is called with |
| <a href="https://source.android.com/reference/hidl/android/hardware/camera/device/3.2/types#errorcode">ERROR_DEVICE</a>, |
| only the |
| <a href="/reference/hidl/android/hardware/camera/device/3.2/ICameraDeviceSession#close">ICameraDeviceSession::close()</a> method can be called successfully. All other |
| methods will return |
| <a href="/reference/hidl/android/hardware/camera/common/1.0/types#status">INTERNAL_ERROR</a>.</p> |
| |
| <p>Transient errors in image capture must be reported through |
| <a href="https://source.android.com/reference/hidl/android/hardware/camera/device/3.2/ICameraDeviceCallback#notify">ICameraDeviceCallbacks::notify()</a> |
| with the appropriate |
| <a href="/reference/hidl/android/hardware/camera/device/3.2/types#errorcode">error code</a>. |
| In each transient failure case, the HAL must still call |
| <a href="/reference/hidl/android/hardware/camera/device/3.2/ICameraDeviceCallback#processcaptureresult">ICameraDeviceCallbacks::processCaptureResult()</a> |
| with an appropriate |
| <a href="/reference/hidl/android/hardware/camera/device/3.2/types#captureresult">capture result</a>.</p> |
| |
| <h2 id="stream-mgmt">Stream management</h2> |
| <h3 id="configure_streams">configure_streams</h3> |
| <p>HAL clients must configure camera streams by calling |
| <a href="/reference/hidl/android/hardware/camera/device/3.2/ICameraDeviceSession#configurestreams">ICameraDeviceSession::configurestreams()</a>.</p> |
| |
| </body> |
| </html> |