vehicle_camera_device_t 結構體參考資料
  
   #include <
   
    vehicle_camera.h
   
   >
  
 
| 資料欄位 | |
| struct hw_device_t | 通用 | 
| const uint32_t | camera_type | 
| int(* | get_capabilities )(struct vehicle_camera_device_t *device, vehicle_camera_cap_t *cap) | 
| int(* | get_camera_crop )(struct vehicle_camera_device_t *device, android_native_rect_t *rect) | 
| int(* | set_camera_crop )(struct vehicle_camera_device_t *device, const android_native_rect_t *rect) | 
| int(* | get_camera_position )(struct vehicle_camera_device_t *device, android_native_rect_t *rect) | 
| int(* | set_camera_position )(struct vehicle_camera_device_t *device, const android_native_rect_t *rect) | 
| int(* | get_camera_state )(struct vehicle_camera_device_t *device, vehicle_camera_state_t *state) | 
| int(* | set_camera_state )(struct vehicle_camera_device_t *device, const vehicle_camera_state_t *state) | 
詳細說明
定義位於檔案 vehicle_camera.h 的 109 行。
欄位說明文件
| const uint32_t camera_type | 
定義位於檔案 vehicle_camera.h 的 112 行。
| struct hw_device_t common | 
定義位於檔案 vehicle_camera.h 的 110 行。
| int(* get_camera_crop)(struct vehicle_camera_device_t *device, android_native_rect_t *rect) | 
取得目前的相機裁剪設定。
- 參數
- 
     裝置 - 裝置控制代碼 rect - 目前的相機裁剪設定 
- 退貨
- 成功:0 - 裝置未初始化:-EPERM - 錯誤:errno
定義位於檔案 vehicle_camera.h 的 131 行。
| int(* get_camera_position)(struct vehicle_camera_device_t *device, android_native_rect_t *rect) | 
取得攝影機在螢幕上的位置。
- 參數
- 
     裝置 - 裝置控制代碼 rect - 開啟時攝影機會顯示的螢幕區域 
- 退貨
- 成功:0 - 裝置未初始化:-EPERM - 錯誤:errno
定義位於檔案 vehicle_camera.h 的 152 行。
| int(* get_camera_state)(struct vehicle_camera_device_t *device, vehicle_camera_state_t *state) | 
取得目前的攝影機狀態。
- 參數
- 
     裝置 - 裝置控制代碼 state - 相機的最後設定 
- 退貨
- 成功:0 - 如果裝置未完成初始化,則為 EPERM
定義位於檔案 vehicle_camera.h 的 173 行。
| int(* get_capabilities)(struct vehicle_camera_device_t *device, vehicle_camera_cap_t *cap) | 
傳回此攝影機的功能。
- 參數
- 
     裝置 - 裝置控制代碼 上限 - 指向傳回的功能標記 
- 退貨
- 成功:0 - 如果裝置無效或未初始化,則為 EPERM
定義位於檔案 vehicle_camera.h 的 121 行。
| int(* set_camera_crop)(struct vehicle_camera_device_t *device, const android_native_rect_t *rect) | 
設定相機裁剪方式。
- 參數
- 
     裝置 - 裝置控制代碼 rect - 要裁剪的相機輸入區域。必須符合相機的寬度和高度限制。 
- 退貨
- 成功:0 - 裝置未初始化:-EPERM - 錯誤:errno
定義位於檔案 vehicle_camera.h 的 142 行。
| int(* set_camera_position)(struct vehicle_camera_device_t *device, const android_native_rect_t *rect) | 
設定攝影機在螢幕上的顯示位置。
- 參數
- 
     裝置 - 裝置控制代碼 rect - 開啟時,攝影機會顯示在螢幕上的區域。必須符合攝影機的顯示寬度和高度。 
- 退貨
- 成功:0 - 裝置未初始化:-EPERM - 錯誤:errno
定義位於檔案 vehicle_camera.h 的 164 行。
| int(* set_camera_state)(struct vehicle_camera_device_t *device, const vehicle_camera_state_t *state) | 
設定攝影機狀態。
- 參數
- 
     裝置 - 裝置控制代碼 state - 攝影機的所需設定 
- 退貨
- 成功時為 0 - 裝置未初始化時為 EPERM - 發生錯誤時為 errno
定義位於檔案 vehicle_camera.h 的 第 183 行。
這個結構體的說明文件是由下列檔案產生:
- hardware/libhardware/include/hardware/ vehicle_camera.h
