2025 年 3 月 27 日より、AOSP のビルドとコントリビューションには aosp-main
ではなく android-latest-release
を使用することをおすすめします。詳細については、AOSP の変更をご覧ください。
エラーとストリームの処理
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
エラーの管理
カメラとやり取りする HIDL インターフェース メソッドでは、対応するカメラに固有のステータスを生成する必要があります。
ICameraDeviceCallbacks::notify()
が ERROR_DEVICE
で呼び出される場合、正常に呼び出すことができるのは ICameraDeviceSession::close()
メソッドのみです。他のメソッドでは、いずれも INTERNAL_ERROR
が返されます。
画像キャプチャの一時的なエラーは、ICameraDeviceCallbacks::notify()
を使って、適切なエラーコードでレポートする必要があります。HAL では、一時的なエラーが発生するたびに、適切なキャプチャ結果で ICameraDeviceCallbacks::processCaptureResult()
を呼び出す必要があります。
ストリームの管理
HAL クライアントでは、カメラ ストリームを構成する際には ICameraDeviceSession::configurestreams()
を呼び出す必要があります。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-03-26 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-03-26 UTC。"],[],[],null,["# Error and stream handling\n\nError management\n----------------\n\nHIDL interface methods that interact with the camera must generate\nthe corresponding camera-specific\n[status](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/camera/common/1.0/types.hal).\n\nIf\n[`ICameraDeviceCallbacks::notify()`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/camera/device/3.2/ICameraDeviceCallback.hal#133) is called with\n[`ERROR_DEVICE`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/camera/device/3.2/types.hal#575), only the\n[`ICameraDeviceSession::close()`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/camera/device/3.2/ICameraDeviceSession.hal#406) method can be called\nsuccessfully. All other methods will return\n[`INTERNAL_ERROR`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/camera/common/1.0/types.hal#69).\n\nTransient errors in image capture must be reported through\n[`ICameraDeviceCallbacks::notify()`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/camera/device/3.2/ICameraDeviceCallback.hal#133) with the appropriate\n[error code](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/camera/device/3.2/types.hal#568). In each transient failure case, the HAL must still call\n[`ICameraDeviceCallbacks::processCaptureResult()`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/camera/device/3.2/ICameraDeviceCallback.hal#109) with an\nappropriate\n[capture result](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/camera/device/3.2/types.hal#846).\n\nStream management\n-----------------\n\nHAL clients must configure camera streams by calling\n[`ICameraDeviceSession::configurestreams()`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/camera/device/3.2/ICameraDeviceSession.hal#167)."]]