1 #ifndef HIDL_GENERATED_ANDROID_HARDWARE_CAMERA_DEVICE_V3_7_ICAMERADEVICESESSION_H
2 #define HIDL_GENERATED_ANDROID_HARDWARE_CAMERA_DEVICE_V3_7_ICAMERADEVICESESSION_H
3
4 #include <android/hardware/camera/common/1.0/types.h>
5 #include <android/hardware/camera/device/3.2/types.h>
6 #include <android/hardware/camera/device/3.6/ICameraDeviceSession.h>
7 #include <android/hardware/camera/device/3.6/types.h>
8 #include <android/hardware/camera/device/3.7/types.h>
9
10 #include <android/hidl/manager/1.0/IServiceNotification.h>
11
12 #include <hidl/HidlSupport.h>
13 #include <hidl/MQDescriptor.h>
14 #include <hidl/Status.h>
15 #include <utils/NativeHandle.h>
16 #include <utils/misc.h>
17
18 namespace android {
19 namespace hardware {
20 namespace camera {
21 namespace device {
22 namespace V3_7 {
23
24 /**
25 * Camera device active session interface.
26 *
27 * Obtained via ICameraDevice::open(), this interface contains the methods to
28 * configure and request captures from an active camera device.
29 */
30 struct ICameraDeviceSession : public ::android::hardware::camera::device::V3_6::ICameraDeviceSession {
31 /**
32 * Type tag for use in template logic that indicates this is a 'pure' class.
33 */
34 typedef ::android::hardware::details::i_tag _hidl_tag;
35
36 /**
37 * Fully qualified interface name: "[email protected]::ICameraDeviceSession"
38 */
39 static const char* descriptor;
40
41 /**
42 * Returns whether this object's implementation is outside of the current process.
43 */
isRemoteICameraDeviceSession44 virtual bool isRemote() const override { return false; }
45
46 /**
47 * Return callback for constructDefaultRequestSettings
48 */
49 using constructDefaultRequestSettings_cb = std::function<void(::android::hardware::camera::common::V1_0::Status status, const ::android::hardware::hidl_vec<uint8_t>& requestTemplate)>;
50 /**
51 * constructDefaultRequestSettings:
52 *
53 * Create capture settings for standard camera use cases.
54 *
55 * The device must return a settings buffer that is configured to meet the
56 * requested use case, which must be one of the CAMERA3_TEMPLATE_*
57 * enums. All request control fields must be included.
58 *
59 * Performance requirements:
60 *
61 * This must be a non-blocking call. The HAL should return from this call
62 * in 1ms, and must return from this call in 5ms.
63 *
64 * Return values:
65 * @return status Status code for the operation, one of:
66 * OK:
67 * On a successful construction of default settings.
68 * INTERNAL_ERROR:
69 * An unexpected internal error occurred, and the default settings
70 * are not available.
71 * ILLEGAL_ARGUMENT:
72 * The camera HAL does not support the input template type
73 * CAMERA_DISCONNECTED:
74 * An external camera device has been disconnected, and is no longer
75 * available. This camera device interface is now stale, and a new
76 * instance must be acquired if the device is reconnected. All
77 * subsequent calls on this interface must return
78 * CAMERA_DISCONNECTED.
79 * @return template The default capture request settings for the requested
80 * use case, or an empty metadata structure if status is not OK.
81 *
82 */
83 virtual ::android::hardware::Return<void> constructDefaultRequestSettings(::android::hardware::camera::device::V3_2::RequestTemplate type, constructDefaultRequestSettings_cb _hidl_cb) override = 0;
84
85 /**
86 * Return callback for configureStreams
87 */
88 using configureStreams_cb = std::function<void(::android::hardware::camera::common::V1_0::Status status, const ::android::hardware::camera::device::V3_2::HalStreamConfiguration& halConfiguration)>;
89 /**
90 * configureStreams:
91 *
92 * Reset the HAL camera device processing pipeline and set up new input and
93 * output streams. This call replaces any existing stream configuration with
94 * the streams defined in the streamList. This method must be called at
95 * least once before a request is submitted with processCaptureRequest().
96 *
97 * The streamList must contain at least one output-capable stream, and may
98 * not contain more than one input-capable stream.
99 *
100 * The streamList may contain streams that are also in the currently-active
101 * set of streams (from the previous call to configureStreams()). These
102 * streams must already have valid values for usage, maxBuffers, and the
103 * private pointer.
104 *
105 * If the HAL needs to change the stream configuration for an existing
106 * stream due to the new configuration, it may rewrite the values of usage
107 * and/or maxBuffers during the configure call.
108 *
109 * The framework must detect such a change, and may then reallocate the
110 * stream buffers before using buffers from that stream in a request.
111 *
112 * If a currently-active stream is not included in streamList, the HAL may
113 * safely remove any references to that stream. It must not be reused in a
114 * later configureStreams() call by the framework, and all the gralloc
115 * buffers for it must be freed after the configureStreams() call returns.
116 *
117 * If the stream is new, the client must set the consumer usage flags in
118 * requestedConfiguration. Upon return, the HAL device must set producerUsage,
119 * maxBuffers, and other fields in the configureStreams() return values. These
120 * fields are then used by the framework and the platform gralloc module to
121 * allocate the gralloc buffers for each stream.
122 *
123 * Newly allocated buffers may be included in a capture request at any time
124 * by the framework. Once a gralloc buffer is returned to the framework
125 * with processCaptureResult (and its respective releaseFence has been
126 * signaled) the framework may free or reuse it at any time.
127 *
128 * ------------------------------------------------------------------------
129 *
130 * Preconditions:
131 *
132 * The framework must only call this method when no captures are being
133 * processed. That is, all results have been returned to the framework, and
134 * all in-flight input and output buffers have been returned and their
135 * release sync fences have been signaled by the HAL. The framework must not
136 * submit new requests for capture while the configureStreams() call is
137 * underway.
138 *
139 * Postconditions:
140 *
141 * The HAL device must configure itself to provide maximum possible output
142 * frame rate given the sizes and formats of the output streams, as
143 * documented in the camera device's static metadata.
144 *
145 * Performance requirements:
146 *
147 * This call is expected to be heavyweight and possibly take several hundred
148 * milliseconds to complete, since it may require resetting and
149 * reconfiguring the image sensor and the camera processing pipeline.
150 * Nevertheless, the HAL device should attempt to minimize the
151 * reconfiguration delay to minimize the user-visible pauses during
152 * application operational mode changes (such as switching from still
153 * capture to video recording).
154 *
155 * The HAL should return from this call in 500ms, and must return from this
156 * call in 1000ms.
157 *
158 * @return Status Status code for the operation, one of:
159 * OK:
160 * On successful stream configuration.
161 * INTERNAL_ERROR:
162 * If there has been a fatal error and the device is no longer
163 * operational. Only close() can be called successfully by the
164 * framework after this error is returned.
165 * ILLEGAL_ARGUMENT:
166 * If the requested stream configuration is invalid. Some examples
167 * of invalid stream configurations include:
168 * - Including more than 1 INPUT stream
169 * - Not including any OUTPUT streams
170 * - Including streams with unsupported formats, or an unsupported
171 * size for that format.
172 * - Including too many output streams of a certain format.
173 * - Unsupported rotation configuration
174 * - Stream sizes/formats don't satisfy the
175 * StreamConfigurationMode requirements for non-NORMAL mode, or
176 * the requested operation_mode is not supported by the HAL.
177 * - Unsupported usage flag
178 * The camera service cannot filter out all possible illegal stream
179 * configurations, since some devices may support more simultaneous
180 * streams or larger stream resolutions than the minimum required
181 * for a given camera device hardware level. The HAL must return an
182 * ILLEGAL_ARGUMENT for any unsupported stream set, and then be
183 * ready to accept a future valid stream configuration in a later
184 * configureStreams call.
185 * @return finalConfiguration The stream parameters desired by the HAL for
186 * each stream, including maximum buffers, the usage flags, and the
187 * override format.
188 *
189 */
190 virtual ::android::hardware::Return<void> configureStreams(const ::android::hardware::camera::device::V3_2::StreamConfiguration& requestedConfiguration, configureStreams_cb _hidl_cb) override = 0;
191
192 /**
193 * Return callback for processCaptureRequest
194 */
195 using processCaptureRequest_cb = std::function<void(::android::hardware::camera::common::V1_0::Status status, uint32_t numRequestProcessed)>;
196 /**
197 * processCaptureRequest:
198 *
199 * Send a list of capture requests to the HAL. The HAL must not return from
200 * this call until it is ready to accept the next set of requests to
201 * process. Only one call to processCaptureRequest() must be made at a time
202 * by the framework, and the calls must all be from the same thread. The
203 * next call to processCaptureRequest() must be made as soon as a new
204 * request and its associated buffers are available. In a normal preview
205 * scenario, this means the function is generally called again by the
206 * framework almost instantly. If more than one request is provided by the
207 * client, the HAL must process the requests in order of lowest index to
208 * highest index.
209 *
210 * The cachesToRemove argument contains a list of buffer caches (see
211 * StreamBuffer document for more information on buffer cache) to be removed
212 * by camera HAL. Camera HAL must remove these cache entries whether or not
213 * this method returns OK.
214 *
215 * The actual request processing is asynchronous, with the results of
216 * capture being returned by the HAL through the processCaptureResult()
217 * call. This call requires the result metadata to be available, but output
218 * buffers may simply provide sync fences to wait on. Multiple requests are
219 * expected to be in flight at once, to maintain full output frame rate.
220 *
221 * The framework retains ownership of the request structure. It is only
222 * guaranteed to be valid during this call. The HAL device must make copies
223 * of the information it needs to retain for the capture processing. The HAL
224 * is responsible for waiting on and closing the buffers' fences and
225 * returning the buffer handles to the framework.
226 *
227 * The HAL must write the file descriptor for the input buffer's release
228 * sync fence into input_buffer->release_fence, if input_buffer is not
229 * valid. If the HAL returns -1 for the input buffer release sync fence, the
230 * framework is free to immediately reuse the input buffer. Otherwise, the
231 * framework must wait on the sync fence before refilling and reusing the
232 * input buffer.
233 *
234 * The input/output buffers provided by the framework in each request
235 * may be brand new (having never before seen by the HAL).
236 *
237 * ------------------------------------------------------------------------
238 * Performance considerations:
239 *
240 * Handling a new buffer should be extremely lightweight and there must be
241 * no frame rate degradation or frame jitter introduced.
242 *
243 * This call must return fast enough to ensure that the requested frame
244 * rate can be sustained, especially for streaming cases (post-processing
245 * quality settings set to FAST). The HAL should return this call in 1
246 * frame interval, and must return from this call in 4 frame intervals.
247 *
248 * @return status Status code for the operation, one of:
249 * OK:
250 * On a successful start to processing the capture request
251 * ILLEGAL_ARGUMENT:
252 * If the input is malformed (the settings are empty when not
253 * allowed, there are 0 output buffers, etc) and capture processing
254 * cannot start. Failures during request processing must be
255 * handled by calling ICameraDeviceCallback::notify(). In case of
256 * this error, the framework retains responsibility for the
257 * stream buffers' fences and the buffer handles; the HAL must not
258 * close the fences or return these buffers with
259 * ICameraDeviceCallback::processCaptureResult().
260 * INTERNAL_ERROR:
261 * If the camera device has encountered a serious error. After this
262 * error is returned, only the close() method can be successfully
263 * called by the framework.
264 * @return numRequestProcessed Number of requests successfully processed by
265 * camera HAL. When status is OK, this must be equal to the size of
266 * requests. When the call fails, this number is the number of requests
267 * that HAL processed successfully before HAL runs into an error.
268 *
269 */
270 virtual ::android::hardware::Return<void> processCaptureRequest(const ::android::hardware::hidl_vec<::android::hardware::camera::device::V3_2::CaptureRequest>& requests, const ::android::hardware::hidl_vec<::android::hardware::camera::device::V3_2::BufferCache>& cachesToRemove, processCaptureRequest_cb _hidl_cb) override = 0;
271
272 /**
273 * Return callback for getCaptureRequestMetadataQueue
274 */
275 using getCaptureRequestMetadataQueue_cb = std::function<void(const ::android::hardware::MQDescriptorSync<uint8_t>& queue)>;
276 /**
277 * getCaptureRequestMetadataQueue:
278 *
279 * Retrieves the queue used along with processCaptureRequest. If
280 * client decides to use fast message queue to pass request metadata,
281 * it must:
282 * - Call getCaptureRequestMetadataQueue to retrieve the fast message queue;
283 * - In each of the requests sent in processCaptureRequest, set
284 * fmqSettingsSize field of CaptureRequest to be the size to read from the
285 * fast message queue; leave settings field of CaptureRequest empty.
286 *
287 * @return queue the queue that client writes request metadata to.
288 */
289 virtual ::android::hardware::Return<void> getCaptureRequestMetadataQueue(getCaptureRequestMetadataQueue_cb _hidl_cb) override = 0;
290
291 /**
292 * Return callback for getCaptureResultMetadataQueue
293 */
294 using getCaptureResultMetadataQueue_cb = std::function<void(const ::android::hardware::MQDescriptorSync<uint8_t>& queue)>;
295 /**
296 * getCaptureResultMetadataQueue:
297 *
298 * Retrieves the queue used along with
299 * ICameraDeviceCallback.processCaptureResult.
300 *
301 * Clients to ICameraDeviceSession must:
302 * - Call getCaptureRequestMetadataQueue to retrieve the fast message queue;
303 * - In implementation of ICameraDeviceCallback, test whether
304 * .fmqResultSize field is zero.
305 * - If .fmqResultSize != 0, read result metadata from the fast message
306 * queue;
307 * - otherwise, read result metadata in CaptureResult.result.
308 *
309 * @return queue the queue that implementation writes result metadata to.
310 */
311 virtual ::android::hardware::Return<void> getCaptureResultMetadataQueue(getCaptureResultMetadataQueue_cb _hidl_cb) override = 0;
312
313 /**
314 * flush:
315 *
316 * Flush all currently in-process captures and all buffers in the pipeline
317 * on the given device. Generally, this method is used to dump all state as
318 * quickly as possible in order to prepare for a configure_streams() call.
319 *
320 * No buffers are required to be successfully returned, so every buffer
321 * held at the time of flush() (whether successfully filled or not) may be
322 * returned with CAMERA3_BUFFER_STATUS_ERROR. Note the HAL is still allowed
323 * to return valid (CAMERA3_BUFFER_STATUS_OK) buffers during this call,
324 * provided they are successfully filled.
325 *
326 * All requests currently in the HAL are expected to be returned as soon as
327 * possible. Not-in-process requests must return errors immediately. Any
328 * interruptible hardware blocks must be stopped, and any uninterruptible
329 * blocks must be waited on.
330 *
331 * flush() may be called concurrently to processCaptureRequest(), with the
332 * expectation that processCaptureRequest returns quickly and the
333 * request submitted in that processCaptureRequest call is treated like
334 * all other in-flight requests. Due to concurrency issues, it is possible
335 * that from the HAL's point of view, a processCaptureRequest() call may
336 * be started after flush has been invoked but has not returned yet. If such
337 * a call happens before flush() returns, the HAL must treat the new
338 * capture request like other in-flight pending requests (see #4 below).
339 *
340 * More specifically, the HAL must follow below requirements for various
341 * cases:
342 *
343 * 1. For captures that are too late for the HAL to cancel/stop, and must be
344 * completed normally by the HAL; i.e. the HAL can send shutter/notify
345 * and processCaptureResult and buffers as normal.
346 *
347 * 2. For pending requests that have not done any processing, the HAL must
348 * call notify CAMERA3_MSG_ERROR_REQUEST, and return all the output
349 * buffers with processCaptureResult in the error state
350 * (CAMERA3_BUFFER_STATUS_ERROR). The HAL must not place the release
351 * fence into an error state, instead, the release fences must be set to
352 * the acquire fences passed by the framework, or -1 if they have been
353 * waited on by the HAL already. This is also the path to follow for any
354 * captures for which the HAL already called notify() with
355 * CAMERA3_MSG_SHUTTER but won't be producing any metadata/valid buffers
356 * for. After CAMERA3_MSG_ERROR_REQUEST, for a given frame, only
357 * processCaptureResults with buffers in CAMERA3_BUFFER_STATUS_ERROR
358 * are allowed. No further notifys or processCaptureResult with
359 * non-empty metadata is allowed.
360 *
361 * 3. For partially completed pending requests that do not have all the
362 * output buffers or perhaps missing metadata, the HAL must follow
363 * below:
364 *
365 * 3.1. Call notify with CAMERA3_MSG_ERROR_RESULT if some of the expected
366 * result metadata (i.e. one or more partial metadata) won't be
367 * available for the capture.
368 *
369 * 3.2. Call notify with CAMERA3_MSG_ERROR_BUFFER for every buffer that
370 * won't be produced for the capture.
371 *
372 * 3.3. Call notify with CAMERA3_MSG_SHUTTER with the capture timestamp
373 * before any buffers/metadata are returned with
374 * processCaptureResult.
375 *
376 * 3.4. For captures that will produce some results, the HAL must not
377 * call CAMERA3_MSG_ERROR_REQUEST, since that indicates complete
378 * failure.
379 *
380 * 3.5. Valid buffers/metadata must be passed to the framework as
381 * normal.
382 *
383 * 3.6. Failed buffers must be returned to the framework as described
384 * for case 2. But failed buffers do not have to follow the strict
385 * ordering valid buffers do, and may be out-of-order with respect
386 * to valid buffers. For example, if buffers A, B, C, D, E are sent,
387 * D and E are failed, then A, E, B, D, C is an acceptable return
388 * order.
389 *
390 * 3.7. For fully-missing metadata, calling CAMERA3_MSG_ERROR_RESULT is
391 * sufficient, no need to call processCaptureResult with empty
392 * metadata or equivalent.
393 *
394 * 4. If a flush() is invoked while a processCaptureRequest() invocation
395 * is active, that process call must return as soon as possible. In
396 * addition, if a processCaptureRequest() call is made after flush()
397 * has been invoked but before flush() has returned, the capture request
398 * provided by the late processCaptureRequest call must be treated
399 * like a pending request in case #2 above.
400 *
401 * flush() must only return when there are no more outstanding buffers or
402 * requests left in the HAL. The framework may call configure_streams (as
403 * the HAL state is now quiesced) or may issue new requests.
404 *
405 * Note that it's sufficient to only support fully-succeeded and
406 * fully-failed result cases. However, it is highly desirable to support
407 * the partial failure cases as well, as it could help improve the flush
408 * call overall performance.
409 *
410 * Performance requirements:
411 *
412 * The HAL should return from this call in 100ms, and must return from this
413 * call in 1000ms. And this call must not be blocked longer than pipeline
414 * latency (see S7 for definition).
415 *
416 * @return status Status code for the operation, one of:
417 * OK:
418 * On a successful flush of the camera HAL.
419 * INTERNAL_ERROR:
420 * If the camera device has encountered a serious error. After this
421 * error is returned, only the close() method can be successfully
422 * called by the framework.
423 */
424 virtual ::android::hardware::Return<::android::hardware::camera::common::V1_0::Status> flush() override = 0;
425
426 /**
427 * close:
428 *
429 * Shut down the camera device.
430 *
431 * After this call, all calls to this session instance must return
432 * INTERNAL_ERROR.
433 *
434 * This method must always succeed, even if the device has encountered a
435 * serious error.
436 */
437 virtual ::android::hardware::Return<void> close() override = 0;
438
439 /**
440 * Return callback for configureStreams_3_3
441 */
442 using configureStreams_3_3_cb = std::function<void(::android::hardware::camera::common::V1_0::Status status, const ::android::hardware::camera::device::V3_3::HalStreamConfiguration& halConfiguration)>;
443 /**
444 * configureStreams_3_3:
445 *
446 * Identical to @3.2::ICameraDeviceSession.configureStreams, except that:
447 *
448 * - The output HalStreamConfiguration now contains an overrideDataspace
449 * field, to be used by the HAL to select a different dataspace for some
450 * use cases when dealing with the IMPLEMENTATION_DEFINED pixel format.
451 *
452 * Clients may invoke either this method or
453 * @3.2::ICameraDeviceSession.configureStreams() for stream configuration.
454 * This method is recommended for clients to use since it provides more
455 * flexibility.
456 */
457 virtual ::android::hardware::Return<void> configureStreams_3_3(const ::android::hardware::camera::device::V3_2::StreamConfiguration& requestedConfiguration, configureStreams_3_3_cb _hidl_cb) override = 0;
458
459 /**
460 * Return callback for configureStreams_3_4
461 */
462 using configureStreams_3_4_cb = std::function<void(::android::hardware::camera::common::V1_0::Status status, const ::android::hardware::camera::device::V3_4::HalStreamConfiguration& halConfiguration)>;
463 /**
464 * configureStreams_3_4:
465 *
466 * Identical to @3.3::ICameraDeviceSession.configureStreams, except that:
467 *
468 * - The requested configuration includes session parameters.
469 *
470 * @return Status Status code for the operation, one of:
471 * OK:
472 * On successful stream configuration.
473 * INTERNAL_ERROR:
474 * If there has been a fatal error and the device is no longer
475 * operational. Only close() can be called successfully by the
476 * framework after this error is returned.
477 * ILLEGAL_ARGUMENT:
478 * If the requested stream configuration is invalid. Some examples
479 * of invalid stream configurations include:
480 * - Including more than 1 INPUT stream
481 * - Not including any OUTPUT streams
482 * - Including streams with unsupported formats, or an unsupported
483 * size for that format.
484 * - Including too many output streams of a certain format.
485 * - Unsupported rotation configuration
486 * - Stream sizes/formats don't satisfy the
487 * StreamConfigurationMode requirements
488 * for non-NORMAL mode, or the requested operation_mode is not
489 * supported by the HAL.
490 * - Unsupported usage flag
491 * The camera service cannot filter out all possible illegal stream
492 * configurations, since some devices may support more simultaneous
493 * streams or larger stream resolutions than the minimum required
494 * for a given camera device hardware level. The HAL must return an
495 * ILLEGAL_ARGUMENT for any unsupported stream set, and then be
496 * ready to accept a future valid stream configuration in a later
497 * configureStreams call.
498 * @return halConfiguration The stream parameters desired by the HAL for
499 * each stream, including maximum buffers, the usage flags, and the
500 * override format.
501 */
502 virtual ::android::hardware::Return<void> configureStreams_3_4(const ::android::hardware::camera::device::V3_4::StreamConfiguration& requestedConfiguration, configureStreams_3_4_cb _hidl_cb) override = 0;
503
504 /**
505 * Return callback for processCaptureRequest_3_4
506 */
507 using processCaptureRequest_3_4_cb = std::function<void(::android::hardware::camera::common::V1_0::Status status, uint32_t numRequestProcessed)>;
508 /**
509 * processCaptureRequest_3_4:
510 *
511 * Identical to @3.2::ICameraDeviceSession.processCaptureRequest, except that:
512 *
513 * - The capture request can include individual settings for physical camera devices
514 * backing a logical multi-camera.
515 *
516 * @return status Status code for the operation, one of:
517 * OK:
518 * On a successful start to processing the capture request
519 * ILLEGAL_ARGUMENT:
520 * If the input is malformed (the settings are empty when not
521 * allowed, the physical camera settings are invalid, there are 0
522 * output buffers, etc) and capture processing
523 * cannot start. Failures during request processing must be
524 * handled by calling ICameraDeviceCallback::notify(). In case of
525 * this error, the framework retains responsibility for the
526 * stream buffers' fences and the buffer handles; the HAL must not
527 * close the fences or return these buffers with
528 * ICameraDeviceCallback::processCaptureResult().
529 * INTERNAL_ERROR:
530 * If the camera device has encountered a serious error. After this
531 * error is returned, only the close() method can be successfully
532 * called by the framework.
533 * @return numRequestProcessed Number of requests successfully processed by
534 * camera HAL. When status is OK, this must be equal to the size of
535 * requests. When the call fails, this number is the number of requests
536 * that HAL processed successfully before HAL runs into an error.
537 *
538 */
539 virtual ::android::hardware::Return<void> processCaptureRequest_3_4(const ::android::hardware::hidl_vec<::android::hardware::camera::device::V3_4::CaptureRequest>& requests, const ::android::hardware::hidl_vec<::android::hardware::camera::device::V3_2::BufferCache>& cachesToRemove, processCaptureRequest_3_4_cb _hidl_cb) override = 0;
540
541 /**
542 * Return callback for configureStreams_3_5
543 */
544 using configureStreams_3_5_cb = std::function<void(::android::hardware::camera::common::V1_0::Status status, const ::android::hardware::camera::device::V3_4::HalStreamConfiguration& halConfiguration)>;
545 /**
546 * configureStreams_3_5:
547 *
548 * Identical to @3.4::ICameraDeviceSession.configureStreams, except that:
549 *
550 * - a streamConfigCounter counter is provided to check for race condition
551 * between configureStreams_3_5 and signalStreamFlush call.
552 * - In case the HAL overrides dataspace or format for
553 * IMPLEMENTATION_DEFINED pixel format, camera framework must use original
554 * dataspace and format in subsequent configureStreams_3_5 calls for the same
555 * stream. HAL is allowed to change the overriding behavior of format or
556 * dataspace for reconfiguration of the same stream depending on the stream
557 * combination.
558 *
559 * @return status Status code for the operation, one of:
560 * OK:
561 * On successful stream configuration.
562 * INTERNAL_ERROR:
563 * If there has been a fatal error and the device is no longer
564 * operational. Only close() can be called successfully by the
565 * framework after this error is returned.
566 * ILLEGAL_ARGUMENT:
567 * If the requested stream configuration is invalid. Some examples
568 * of invalid stream configurations include:
569 * - Including more than 1 INPUT stream
570 * - Not including any OUTPUT streams
571 * - Including streams with unsupported formats, or an unsupported
572 * size for that format.
573 * - Including too many output streams of a certain format.
574 * - Unsupported rotation configuration
575 * - Stream sizes/formats don't satisfy the
576 * StreamConfigurationMode requirements
577 * for non-NORMAL mode, or the requested operation_mode is not
578 * supported by the HAL.
579 * - Unsupported usage flag
580 * The camera service cannot filter out all possible illegal stream
581 * configurations, since some devices may support more simultaneous
582 * streams or larger stream resolutions than the minimum required
583 * for a given camera device hardware level. The HAL must return an
584 * ILLEGAL_ARGUMENT for any unsupported stream set, and then be
585 * ready to accept a future valid stream configuration in a later
586 * configureStreams call.
587 * @return halConfiguration The stream parameters desired by the HAL for
588 * each stream, including maximum buffers, the usage flags, and the
589 * override format.
590 */
591 virtual ::android::hardware::Return<void> configureStreams_3_5(const ::android::hardware::camera::device::V3_5::StreamConfiguration& requestedConfiguration, configureStreams_3_5_cb _hidl_cb) override = 0;
592
593 /**
594 * signalStreamFlush:
595 *
596 * Signaling HAL camera service is about to perform configureStreams_3_5 and
597 * HAL must return all buffers of designated streams. HAL must finish
598 * inflight requests normally and return all buffers that belongs to the
599 * designated streams through processCaptureResult or returnStreamBuffer
600 * API in a timely manner, or camera service will run into a fatal error.
601 *
602 * Note that this call serves as an optional hint and camera service may
603 * skip sending this call if all buffers are already returned.
604 *
605 * @param streamIds The ID of streams camera service need all of its
606 * buffers returned.
607 *
608 * @param streamConfigCounter Note that due to concurrency nature, it is
609 * possible the signalStreamFlush call arrives later than the
610 * corresponding configureStreams_3_5 call, HAL must check
611 * streamConfigCounter for such race condition. If the counter is less
612 * than the counter in the last configureStreams_3_5 call HAL last
613 * received, the call is stale and HAL should just return this call.
614 */
615 virtual ::android::hardware::Return<void> signalStreamFlush(const ::android::hardware::hidl_vec<int32_t>& streamIds, uint32_t streamConfigCounter) override = 0;
616
617 /**
618 * Return callback for isReconfigurationRequired
619 */
620 using isReconfigurationRequired_cb = std::function<void(::android::hardware::camera::common::V1_0::Status status, bool reconfigurationNeeded)>;
621 /**
622 * isReconfigurationRequired:
623 *
624 * Check whether complete stream reconfiguration is required for possible new session
625 * parameter values.
626 *
627 * This method must be called by the camera framework in case the client changes
628 * the value of any advertised session parameters. Depending on the specific values
629 * the HAL can decide whether a complete stream reconfiguration is required. In case
630 * the HAL returns false, the camera framework must skip the internal reconfiguration.
631 * In case Hal returns true, the framework must reconfigure the streams and pass the
632 * new session parameter values accordingly.
633 * This call may be done by the framework some time before the request with new parameters
634 * is submitted to the HAL, and the request may be cancelled before it ever gets submitted.
635 * Therefore, the HAL must not use this query as an indication to change its behavior in any
636 * way.
637 * ------------------------------------------------------------------------
638 *
639 * Preconditions:
640 *
641 * The framework can call this method at any time after active
642 * session configuration. There must be no impact on the performance of
643 * pending camera requests in any way. In particular there must not be
644 * any glitches or delays during normal camera streaming.
645 *
646 * Performance requirements:
647 * HW and SW camera settings must not be changed and there must not be
648 * a user-visible impact on camera performance.
649 *
650 * @param oldSessionParams Before session parameters, usually the current session parameters.
651 * @param newSessionParams The new session parameters which may be set by client.
652 *
653 * @return Status Status code for the operation, one of:
654 * OK:
655 * On successful reconfiguration required query.
656 * METHOD_NOT_SUPPORTED:
657 * The camera device does not support the reconfiguration query.
658 * INTERNAL_ERROR:
659 * The reconfiguration query cannot complete due to internal
660 * error.
661 * @return true in case the stream reconfiguration is required, false otherwise.
662 */
663 virtual ::android::hardware::Return<void> isReconfigurationRequired(const ::android::hardware::hidl_vec<uint8_t>& oldSessionParams, const ::android::hardware::hidl_vec<uint8_t>& newSessionParams, isReconfigurationRequired_cb _hidl_cb) override = 0;
664
665 /**
666 * Return callback for configureStreams_3_6
667 */
668 using configureStreams_3_6_cb = std::function<void(::android::hardware::camera::common::V1_0::Status status, const ::android::hardware::camera::device::V3_6::HalStreamConfiguration& halConfiguration)>;
669 /**
670 * configureStreams_3_6:
671 *
672 * Identical to @3.5::ICameraDeviceSession.configureStreams, except that:
673 *
674 * - a boolean supportOffline is added to HalStreamConfiguration to indicate
675 * if this stream can be switched to offline mode later.
676 *
677 * @return status Status code for the operation, one of:
678 * OK:
679 * On successful stream configuration.
680 * INTERNAL_ERROR:
681 * If there has been a fatal error and the device is no longer
682 * operational. Only close() can be called successfully by the
683 * framework after this error is returned.
684 * ILLEGAL_ARGUMENT:
685 * If the requested stream configuration is invalid. Some examples
686 * of invalid stream configurations include:
687 * - Including more than 1 INPUT stream
688 * - Not including any OUTPUT streams
689 * - Including streams with unsupported formats, or an unsupported
690 * size for that format.
691 * - Including too many output streams of a certain format.
692 * - Unsupported rotation configuration
693 * - Stream sizes/formats don't satisfy the
694 * StreamConfigurationMode requirements
695 * for non-NORMAL mode, or the requested operation_mode is not
696 * supported by the HAL.
697 * - Unsupported usage flag
698 * The camera service cannot filter out all possible illegal stream
699 * configurations, since some devices may support more simultaneous
700 * streams or larger stream resolutions than the minimum required
701 * for a given camera device hardware level. The HAL must return an
702 * ILLEGAL_ARGUMENT for any unsupported stream set, and then be
703 * ready to accept a future valid stream configuration in a later
704 * configureStreams call.
705 * @return halConfiguration The stream parameters desired by the HAL for
706 * each stream, including maximum buffers, the usage flags, and the
707 * override format.
708 */
709 virtual ::android::hardware::Return<void> configureStreams_3_6(const ::android::hardware::camera::device::V3_5::StreamConfiguration& requestedConfiguration, configureStreams_3_6_cb _hidl_cb) override = 0;
710
711 /**
712 * Return callback for switchToOffline
713 */
714 using switchToOffline_cb = std::function<void(::android::hardware::camera::common::V1_0::Status status, const ::android::hardware::camera::device::V3_6::CameraOfflineSessionInfo& offlineSessionInfo, const ::android::sp<::android::hardware::camera::device::V3_6::ICameraOfflineSession>& offlineSession)>;
715 /**
716 * switchToOffline:
717 *
718 * Switch the current running session from actively streaming mode to the
719 * offline mode. See ICameraOfflineSession for more details.
720 *
721 * The streamsToKeep argument contains list of streams IDs where application
722 * still needs its output. For all streams application does not need anymore,
723 * camera HAL can send ERROR_BUFFER to speed up the transition, or even send
724 * ERROR_REQUEST if all output targets of a request is not needed. By the
725 * time this call returns, camera HAL must have returned all buffers coming
726 * from streams no longer needed and have erased buffer caches of such streams.
727 *
728 * For all requests that are going to be transferred to offline session,
729 * the ICameraDeviceSession is responsible to capture all input buffers from
730 * the image sensor before the switchToOffline call returns. Before
731 * switchToOffline returns, camera HAL must have completed all requests not
732 * switching to offline mode, and collected information on what streams and
733 * requests are going to continue in the offline session, in the
734 * offlineSessionInfo output argument.
735 *
736 * If there are no requests qualified to be transferred to offline session,
737 * the camera HAL must return a null ICameraOfflineSession object with OK
738 * status. In this scenario, the camera HAL still must flush all inflight
739 * requests and unconfigure all streams before returning this call.
740 *
741 * After switchToOffline returns, the ICameraDeviceSession must be back to
742 * unconfigured state as if it is just created and no streams are configured.
743 * Also, camera HAL must not call any methods in ICameraDeviceCallback since
744 * all unfinished requests are now transferred to the offline session.
745 * After the call returns, camera service may then call close to close
746 * the camera device, or call configureStream* again to reconfigure the
747 * camera and then send new capture requests with processCaptureRequest. In
748 * the latter case, it is legitimate for camera HAL to call methods in
749 * ICameraDeviceCallback again in response to the newly submitted capture
750 * requests.
751 *
752 * @return status Status code for the operation, one of:
753 * OK:
754 * On switching to offline session and unconfiguring streams
755 * successfully.
756 * ILLEGAL_ARGUMENT:
757 * If camera does not support offline mode in any one of streams
758 * in streamsToKeep argument. Note that the camera HAL must report
759 * if a stream supports offline mode in HalStreamConfiguration
760 * output of configureStreams_3_6 method. If all streams in
761 * streamsToKeep argument support offline mode, then the camera HAL
762 * must not return this error.
763 *
764 *
765 * @return offlineSessionInfo Information on what streams and requests will
766 * be transferred to offline session to continue processing.
767 *
768 * @return offlineSession The offline session object camera service will use
769 * to interact with.
770 */
771 virtual ::android::hardware::Return<void> switchToOffline(const ::android::hardware::hidl_vec<int32_t>& streamsToKeep, switchToOffline_cb _hidl_cb) override = 0;
772
773 /**
774 * Return callback for configureStreams_3_7
775 */
776 using configureStreams_3_7_cb = std::function<void(::android::hardware::camera::common::V1_0::Status status, const ::android::hardware::camera::device::V3_6::HalStreamConfiguration& halConfiguration)>;
777 /**
778 * configureStreams_3_7:
779 *
780 * Identical to @3.6::ICameraDeviceSession.configureStreams_3_6, except that:
781 *
782 * - The requestedConfiguration allows the camera framework to configure
783 * stream groups.
784 * - For requested configurations of streams within the same group, the
785 * corresponding halConfiguration must have the same usage flags and
786 * maxBuffers.
787 * - Within a CaptureRequest, the application is guaranteed not to request
788 * more than one streams within the same stream group. When one of the
789 * stream within a stream group is requested, the camera HAL can either
790 * produce output on that stream, or any other stream within the same
791 * stream group.
792 * - The requestedConfiguration allows the camera framework to indicate that
793 * input images of different sizes may be submitted within capture
794 * requests.
795 *
796 * @return status Status code for the operation, one of:
797 * OK:
798 * On successful stream configuration.
799 * INTERNAL_ERROR:
800 * If there has been a fatal error and the device is no longer
801 * operational. Only close() can be called successfully by the
802 * framework after this error is returned.
803 * ILLEGAL_ARGUMENT:
804 * If the requested stream configuration is invalid. Some examples
805 * of invalid stream configurations include:
806 * - Including more than 1 INPUT stream
807 * - Not including any OUTPUT streams
808 * - Including streams with unsupported formats, or an unsupported
809 * size for that format.
810 * - Including too many output streams of a certain format.
811 * - Unsupported rotation configuration
812 * - Stream sizes/formats don't satisfy the
813 * StreamConfigurationMode requirements
814 * for non-NORMAL mode, or the requested operation_mode is not
815 * supported by the HAL.
816 * - Unsupported usage flag
817 * - Unsupported stream groupIds, or unsupported multi-resolution
818 * input stream.
819 * The camera service cannot filter out all possible illegal stream
820 * configurations, since some devices may support more simultaneous
821 * streams or larger stream resolutions than the minimum required
822 * for a given camera device hardware level. The HAL must return an
823 * ILLEGAL_ARGUMENT for any unsupported stream set, and then be
824 * ready to accept a future valid stream configuration in a later
825 * configureStreams call.
826 * @return halConfiguration The stream parameters desired by the HAL for
827 * each stream, including maximum buffers, the usage flags, and the
828 * override format.
829 */
830 virtual ::android::hardware::Return<void> configureStreams_3_7(const ::android::hardware::camera::device::V3_7::StreamConfiguration& requestedConfiguration, configureStreams_3_7_cb _hidl_cb) = 0;
831
832 /**
833 * Return callback for processCaptureRequest_3_7
834 */
835 using processCaptureRequest_3_7_cb = std::function<void(::android::hardware::camera::common::V1_0::Status status, uint32_t numRequestProcessed)>;
836 /**
837 * processCaptureRequest_3_7:
838 *
839 * Identical to @3.4::ICameraDeviceSession.processCaptureRequest, except that:
840 *
841 * - The capture request can include width and height of the input buffer for
842 * a reprocessing request.
843 *
844 * @return status Status code for the operation, one of:
845 * OK:
846 * On a successful start to processing the capture request
847 * ILLEGAL_ARGUMENT:
848 * If the input is malformed (the settings are empty when not
849 * allowed, the physical camera settings are invalid, there are 0
850 * output buffers, etc) and capture processing
851 * cannot start. Failures during request processing must be
852 * handled by calling ICameraDeviceCallback::notify(). In case of
853 * this error, the framework retains responsibility for the
854 * stream buffers' fences and the buffer handles; the HAL must not
855 * close the fences or return these buffers with
856 * ICameraDeviceCallback::processCaptureResult().
857 * In case of multi-resolution input image, this error must be returned
858 * if the caller passes in a CaptureRequest with an invalid
859 * [inputWith, inputHeight].
860 * INTERNAL_ERROR:
861 * If the camera device has encountered a serious error. After this
862 * error is returned, only the close() method can be successfully
863 * called by the framework.
864 * @return numRequestProcessed Number of requests successfully processed by
865 * camera HAL. When status is OK, this must be equal to the size of
866 * requests. When the call fails, this number is the number of requests
867 * that HAL processed successfully before HAL runs into an error.
868 *
869 */
870 virtual ::android::hardware::Return<void> processCaptureRequest_3_7(const ::android::hardware::hidl_vec<::android::hardware::camera::device::V3_7::CaptureRequest>& requests, const ::android::hardware::hidl_vec<::android::hardware::camera::device::V3_2::BufferCache>& cachesToRemove, processCaptureRequest_3_7_cb _hidl_cb) = 0;
871
872 /**
873 * Return callback for interfaceChain
874 */
875 using interfaceChain_cb = std::function<void(const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& descriptors)>;
876 /*
877 * Provides run-time type information for this object.
878 * For example, for the following interface definition:
879 * package [email protected];
880 * interface IParent {};
881 * interface IChild extends IParent {};
882 * Calling interfaceChain on an IChild object must yield the following:
883 * ["[email protected]::IChild",
884 * "[email protected]::IParent"
885 * "[email protected]::IBase"]
886 *
887 * @return descriptors a vector of descriptors of the run-time type of the
888 * object.
889 */
890 virtual ::android::hardware::Return<void> interfaceChain(interfaceChain_cb _hidl_cb) override;
891
892 /*
893 * Emit diagnostic information to the given file.
894 *
895 * Optionally overriden.
896 *
897 * @param fd File descriptor to dump data to.
898 * Must only be used for the duration of this call.
899 * @param options Arguments for debugging.
900 * Must support empty for default debug information.
901 */
902 virtual ::android::hardware::Return<void> debug(const ::android::hardware::hidl_handle& fd, const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& options) override;
903
904 /**
905 * Return callback for interfaceDescriptor
906 */
907 using interfaceDescriptor_cb = std::function<void(const ::android::hardware::hidl_string& descriptor)>;
908 /*
909 * Provides run-time type information for this object.
910 * For example, for the following interface definition:
911 * package [email protected];
912 * interface IParent {};
913 * interface IChild extends IParent {};
914 * Calling interfaceDescriptor on an IChild object must yield
915 * "[email protected]::IChild"
916 *
917 * @return descriptor a descriptor of the run-time type of the
918 * object (the first element of the vector returned by
919 * interfaceChain())
920 */
921 virtual ::android::hardware::Return<void> interfaceDescriptor(interfaceDescriptor_cb _hidl_cb) override;
922
923 /**
924 * Return callback for getHashChain
925 */
926 using getHashChain_cb = std::function<void(const ::android::hardware::hidl_vec<::android::hardware::hidl_array<uint8_t, 32>>& hashchain)>;
927 /*
928 * Returns hashes of the source HAL files that define the interfaces of the
929 * runtime type information on the object.
930 * For example, for the following interface definition:
931 * package [email protected];
932 * interface IParent {};
933 * interface IChild extends IParent {};
934 * Calling interfaceChain on an IChild object must yield the following:
935 * [(hash of IChild.hal),
936 * (hash of IParent.hal)
937 * (hash of IBase.hal)].
938 *
939 * SHA-256 is used as the hashing algorithm. Each hash has 32 bytes
940 * according to SHA-256 standard.
941 *
942 * @return hashchain a vector of SHA-1 digests
943 */
944 virtual ::android::hardware::Return<void> getHashChain(getHashChain_cb _hidl_cb) override;
945
946 /*
947 * This method trigger the interface to enable/disable instrumentation based
948 * on system property hal.instrumentation.enable.
949 */
950 virtual ::android::hardware::Return<void> setHALInstrumentation() override;
951
952 /*
953 * Registers a death recipient, to be called when the process hosting this
954 * interface dies.
955 *
956 * @param recipient a hidl_death_recipient callback object
957 * @param cookie a cookie that must be returned with the callback
958 * @return success whether the death recipient was registered successfully.
959 */
960 virtual ::android::hardware::Return<bool> linkToDeath(const ::android::sp<::android::hardware::hidl_death_recipient>& recipient, uint64_t cookie) override;
961
962 /*
963 * Provides way to determine if interface is running without requesting
964 * any functionality.
965 */
966 virtual ::android::hardware::Return<void> ping() override;
967
968 /**
969 * Return callback for getDebugInfo
970 */
971 using getDebugInfo_cb = std::function<void(const ::android::hidl::base::V1_0::DebugInfo& info)>;
972 /*
973 * Get debug information on references on this interface.
974 * @return info debugging information. See comments of DebugInfo.
975 */
976 virtual ::android::hardware::Return<void> getDebugInfo(getDebugInfo_cb _hidl_cb) override;
977
978 /*
979 * This method notifies the interface that one or more system properties
980 * have changed. The default implementation calls
981 * (C++) report_sysprop_change() in libcutils or
982 * (Java) android.os.SystemProperties.reportSyspropChanged,
983 * which in turn calls a set of registered callbacks (eg to update trace
984 * tags).
985 */
986 virtual ::android::hardware::Return<void> notifySyspropsChanged() override;
987
988 /*
989 * Unregisters the registered death recipient. If this service was registered
990 * multiple times with the same exact death recipient, this unlinks the most
991 * recently registered one.
992 *
993 * @param recipient a previously registered hidl_death_recipient callback
994 * @return success whether the death recipient was unregistered successfully.
995 */
996 virtual ::android::hardware::Return<bool> unlinkToDeath(const ::android::sp<::android::hardware::hidl_death_recipient>& recipient) override;
997
998 // cast static functions
999 /**
1000 * This performs a checked cast based on what the underlying implementation actually is.
1001 */
1002 static ::android::hardware::Return<::android::sp<::android::hardware::camera::device::V3_7::ICameraDeviceSession>> castFrom(const ::android::sp<::android::hardware::camera::device::V3_7::ICameraDeviceSession>& parent, bool emitError = false);
1003 /**
1004 * This performs a checked cast based on what the underlying implementation actually is.
1005 */
1006 static ::android::hardware::Return<::android::sp<::android::hardware::camera::device::V3_7::ICameraDeviceSession>> castFrom(const ::android::sp<::android::hardware::camera::device::V3_6::ICameraDeviceSession>& parent, bool emitError = false);
1007 /**
1008 * This performs a checked cast based on what the underlying implementation actually is.
1009 */
1010 static ::android::hardware::Return<::android::sp<::android::hardware::camera::device::V3_7::ICameraDeviceSession>> castFrom(const ::android::sp<::android::hardware::camera::device::V3_5::ICameraDeviceSession>& parent, bool emitError = false);
1011 /**
1012 * This performs a checked cast based on what the underlying implementation actually is.
1013 */
1014 static ::android::hardware::Return<::android::sp<::android::hardware::camera::device::V3_7::ICameraDeviceSession>> castFrom(const ::android::sp<::android::hardware::camera::device::V3_4::ICameraDeviceSession>& parent, bool emitError = false);
1015 /**
1016 * This performs a checked cast based on what the underlying implementation actually is.
1017 */
1018 static ::android::hardware::Return<::android::sp<::android::hardware::camera::device::V3_7::ICameraDeviceSession>> castFrom(const ::android::sp<::android::hardware::camera::device::V3_3::ICameraDeviceSession>& parent, bool emitError = false);
1019 /**
1020 * This performs a checked cast based on what the underlying implementation actually is.
1021 */
1022 static ::android::hardware::Return<::android::sp<::android::hardware::camera::device::V3_7::ICameraDeviceSession>> castFrom(const ::android::sp<::android::hardware::camera::device::V3_2::ICameraDeviceSession>& parent, bool emitError = false);
1023 /**
1024 * This performs a checked cast based on what the underlying implementation actually is.
1025 */
1026 static ::android::hardware::Return<::android::sp<::android::hardware::camera::device::V3_7::ICameraDeviceSession>> castFrom(const ::android::sp<::android::hidl::base::V1_0::IBase>& parent, bool emitError = false);
1027
1028 // helper methods for interactions with the hwservicemanager
1029 /**
1030 * This gets the service of this type with the specified instance name. If the
1031 * service is currently not available or not in the VINTF manifest on a Trebilized
1032 * device, this will return nullptr. This is useful when you don't want to block
1033 * during device boot. If getStub is true, this will try to return an unwrapped
1034 * passthrough implementation in the same process. This is useful when getting an
1035 * implementation from the same partition/compilation group.
1036 *
1037 * In general, prefer getService(std::string,bool)
1038 */
1039 static ::android::sp<ICameraDeviceSession> tryGetService(const std::string &serviceName="default", bool getStub=false);
1040 /**
1041 * Deprecated. See tryGetService(std::string, bool)
1042 */
1043 static ::android::sp<ICameraDeviceSession> tryGetService(const char serviceName[], bool getStub=false) { std::string str(serviceName ? serviceName : ""); return tryGetService(str, getStub); }
1044 /**
1045 * Deprecated. See tryGetService(std::string, bool)
1046 */
1047 static ::android::sp<ICameraDeviceSession> tryGetService(const ::android::hardware::hidl_string& serviceName, bool getStub=false) { std::string str(serviceName.c_str()); return tryGetService(str, getStub); }
1048 /**
1049 * Calls tryGetService("default", bool). This is the recommended instance name for singleton services.
1050 */
tryGetServiceICameraDeviceSession1051 static ::android::sp<ICameraDeviceSession> tryGetService(bool getStub) { return tryGetService("default", getStub); }
1052 /**
1053 * This gets the service of this type with the specified instance name. If the
1054 * service is not in the VINTF manifest on a Trebilized device, this will return
1055 * nullptr. If the service is not available, this will wait for the service to
1056 * become available. If the service is a lazy service, this will start the service
1057 * and return when it becomes available. If getStub is true, this will try to
1058 * return an unwrapped passthrough implementation in the same process. This is
1059 * useful when getting an implementation from the same partition/compilation group.
1060 */
1061 static ::android::sp<ICameraDeviceSession> getService(const std::string &serviceName="default", bool getStub=false);
1062 /**
1063 * Deprecated. See getService(std::string, bool)
1064 */
1065 static ::android::sp<ICameraDeviceSession> getService(const char serviceName[], bool getStub=false) { std::string str(serviceName ? serviceName : ""); return getService(str, getStub); }
1066 /**
1067 * Deprecated. See getService(std::string, bool)
1068 */
1069 static ::android::sp<ICameraDeviceSession> getService(const ::android::hardware::hidl_string& serviceName, bool getStub=false) { std::string str(serviceName.c_str()); return getService(str, getStub); }
1070 /**
1071 * Calls getService("default", bool). This is the recommended instance name for singleton services.
1072 */
getServiceICameraDeviceSession1073 static ::android::sp<ICameraDeviceSession> getService(bool getStub) { return getService("default", getStub); }
1074 /**
1075 * Registers a service with the service manager. For Trebilized devices, the service
1076 * must also be in the VINTF manifest.
1077 */
1078 __attribute__ ((warn_unused_result))::android::status_t registerAsService(const std::string &serviceName="default");
1079 /**
1080 * Registers for notifications for when a service is registered.
1081 */
1082 static bool registerForNotifications(
1083 const std::string &serviceName,
1084 const ::android::sp<::android::hidl::manager::V1_0::IServiceNotification> ¬ification);
1085 };
1086
1087 //
1088 // type declarations for package
1089 //
1090
1091 static inline std::string toString(const ::android::sp<::android::hardware::camera::device::V3_7::ICameraDeviceSession>& o);
1092
1093 //
1094 // type header definitions for package
1095 //
1096
toString(const::android::sp<::android::hardware::camera::device::V3_7::ICameraDeviceSession> & o)1097 static inline std::string toString(const ::android::sp<::android::hardware::camera::device::V3_7::ICameraDeviceSession>& o) {
1098 std::string os = "[class or subclass of ";
1099 os += ::android::hardware::camera::device::V3_7::ICameraDeviceSession::descriptor;
1100 os += "]";
1101 os += o->isRemote() ? "@remote" : "@local";
1102 return os;
1103 }
1104
1105
1106 } // namespace V3_7
1107 } // namespace device
1108 } // namespace camera
1109 } // namespace hardware
1110 } // namespace android
1111
1112 //
1113 // global type declarations for package
1114 //
1115
1116
1117 #endif // HIDL_GENERATED_ANDROID_HARDWARE_CAMERA_DEVICE_V3_7_ICAMERADEVICESESSION_H
1118