1. 程式人生 > >Android [Camera 原始碼] 錯誤和資訊流處理(Errors and Streams) Google官方文件(七)

Android [Camera 原始碼] 錯誤和資訊流處理(Errors and Streams) Google官方文件(七)

Google原始碼網地址連結:https://source.android.com/devices/camera

該Google Camera的文件為系列文章,文章列表:

overview

Camera3

HAL Subsystem

Metadata and Controls

3A Modes and State

Output and Cropping

Errors and Streams

Request Creation

External USB Cameras

Multi-Camera Support

Motion Tracking

Session Parameters

Single Producer,Multiple Consumer

Version Support

 

錯誤和資訊流處理

 

錯誤管理


與相機互動的 HIDL 介面方法必須生成相應的相機特定狀態。

如果呼叫了 ICameraDeviceCallbacks::notify() 且返回 ERROR_DEVICE,則只能成功呼叫 ICameraDeviceSession::close() 方法。其他所有方法都將返回 INTERNAL_ERROR。

影象拍攝過程中的瞬時錯誤必須通過 ICameraDeviceCallbacks::notify() 進行報告且返回相應的錯誤程式碼。在發生各種瞬時失敗的情況下,HAL 必須仍然呼叫 ICameraDeviceCallbacks::processCaptureResult() 且返回相應的捕獲結果。

 

資訊流管理


configure_streams
HAL 客戶端必須通過呼叫 ICameraDeviceSession::configurestreams() 來配置相機資訊流。