• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1component_class: HAL_CONVENTIONAL
2component_type: CAMERA
3component_type_version: 2.1
4
5original_data_structure_name: "camera_module_t"
6
7header: "<hardware/hardware.h>"
8header: "<hardware/camera_common.h>"
9header: "<hardware/camera.h>"
10
11interface: {
12  sub_struct: {
13    name: "common"
14    is_pointer: true
15
16    attribute: {
17      name: "module_api_version"
18      type: TYPE_SCALAR
19      scalar_type: "uint16_t"
20    }
21
22    sub_struct: {
23      name: "methods"
24
25      api: {
26        name: "open"
27        return_type: {
28          type: TYPE_SCALAR
29          scalar_type: "int32_t"
30        }
31        arg: {
32          type: TYPE_PREDEFINED
33          predefined_type: "hw_module_t*"
34          is_const: true
35        }
36        arg: {
37          type: TYPE_SCALAR
38          scalar_type: "char_pointer"
39        }
40        arg: {
41          type: TYPE_PREDEFINED
42          predefined_type: "hw_device_t**"
43          is_output: true
44        }
45        callflow: {
46          entry: true
47        }
48      }
49    }
50  }
51
52  api: {
53    name: "get_number_of_cameras"
54    return_type: {
55      type: TYPE_SCALAR
56      scalar_type: "int32_t"
57    }
58  }
59
60  api: {
61    name: "get_camera_info"
62    return_type: {
63      type: TYPE_SCALAR
64      scalar_type: "int32_t"
65    }
66    arg: {
67      type: TYPE_SCALAR
68      scalar_type: "int32_t"
69    }
70    arg: {
71      type: TYPE_PREDEFINED
72      predefined_type: "camera_info_t*"
73      is_output: true
74      is_input: false
75    }
76  }
77
78  api: {
79    name: "set_callbacks"
80    return_type: {
81      type: TYPE_SCALAR
82      scalar_type: "int32_t"
83    }
84    arg: {
85      type: TYPE_PREDEFINED
86      predefined_type: "camera_module_callbacks_t*"
87      is_const: true
88      is_callback: true
89    }
90  }
91
92  api: {
93    name: "init"
94    return_type: {
95      type: TYPE_SCALAR
96      scalar_type: "int32_t"
97    }
98  }
99
100  attribute: {
101    type: TYPE_ENUM
102    enum_value: {
103      scalar_type: "int32_t"
104
105      enumerator: "CAMERA_FACING_BACK"
106      scalar_value: {
107        int32_t: 0
108      }
109
110      enumerator: "CAMERA_FACING_FRONT"
111      scalar_value: {
112        int32_t: 1
113      }
114    }
115  }
116
117  attribute: {
118    type: TYPE_STRUCT
119    name: "camera_info_t"
120
121    struct_value: {
122      name: "facing"
123      type: TYPE_SCALAR
124      scalar_value: {
125        int32_t: 0
126      }
127      scalar_type: "int32_t"
128    }
129
130    struct_value: {
131      name: "orientation"
132      type: TYPE_SCALAR
133      scalar_value: {
134        int32_t: 0
135      }
136      scalar_type: "int32_t"
137    }
138
139    struct_value: {
140      name: "device_version"
141      type: TYPE_SCALAR
142      scalar_value: {
143        uint32_t: 772
144      }
145      scalar_type: "uint32_t"
146    }
147
148    struct_value: {
149      name: "static_camera_characteristics"
150      struct_type: "camera_metadata_t"
151      type: TYPE_STRUCT
152      struct_value: {
153        name: "xyz"
154        scalar_type: "int32_t"
155        scalar_value: {
156          int32_t: 0
157        }
158      }
159    }
160
161    struct_value: {
162      name: "resource_cost"
163      type: TYPE_SCALAR
164      scalar_value: {
165        int32_t: 50
166      }
167      scalar_type: "int32_t"
168    }
169
170    struct_value: {
171      name: "conflicting_devices"
172      type: TYPE_SCALAR
173      scalar_type: "pointer_pointer"
174    }
175
176    struct_value: {
177      name: "conflicting_devices_length"
178      type: TYPE_SCALAR
179      scalar_type: "int32_t"
180      scalar_value: {
181        int32_t: 0
182      }
183    }
184  }
185
186  attribute: {
187    name: "camera_module_callbacks_t"
188
189    type: TYPE_FUNCTION_POINTER
190
191    function_pointer: {
192      function_name: "camera_device_status_change"
193      arg: {
194        type: TYPE_PREDEFINED
195        predefined_type: "const struct camera_module_callbacks*"
196        scalar_type: "pointer"
197        is_const: true
198      }
199      arg: {
200        type: TYPE_SCALAR
201        scalar_type: "int32_t"
202      }
203      arg: {
204        type: TYPE_SCALAR
205        scalar_type: "int32_t"
206      }
207    }
208
209    function_pointer: {
210      function_name: "torch_mode_status_change"
211      arg: {
212        type: TYPE_PREDEFINED
213        predefined_type: "struct camera_module_callbacks*"
214        scalar_type: "pointer"
215        is_const: true
216      }
217      arg: {
218        type: TYPE_SCALAR
219        scalar_type: "char_pointer"
220        is_const: true
221      }
222      arg: {
223        type: TYPE_SCALAR
224        scalar_type: "int32_t"
225      }
226    }
227
228    is_callback: true
229  }
230}
231