1 /* 2 * Copyright (C) 2015 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 /** 18 * @addtogroup Camera 19 * @{ 20 */ 21 22 /** 23 * @file NdkCaptureRequest.h 24 */ 25 26 /* 27 * This file defines an NDK API. 28 * Do not remove methods. 29 * Do not change method signatures. 30 * Do not change the value of constants. 31 * Do not change the size of any of the classes defined in here. 32 * Do not reference types that are not part of the NDK. 33 * Do not #include files that aren't part of the NDK. 34 */ 35 36 #include <sys/cdefs.h> 37 38 #include "NdkCameraError.h" 39 #include "NdkCameraMetadata.h" 40 #include "NdkCameraWindowType.h" 41 42 #ifndef _NDK_CAPTURE_REQUEST_H 43 #define _NDK_CAPTURE_REQUEST_H 44 45 __BEGIN_DECLS 46 47 #if __ANDROID_API__ >= 24 48 49 // Container for output targets 50 typedef struct ACameraOutputTargets ACameraOutputTargets; 51 52 // Container for a single output target 53 typedef struct ACameraOutputTarget ACameraOutputTarget; 54 55 /** 56 * ACaptureRequest is an opaque type that contains settings and output targets needed to capture 57 * a single image from camera device. 58 * 59 * <p>ACaptureRequest contains the configuration for the capture hardware (sensor, lens, flash), 60 * the processing pipeline, the control algorithms, and the output buffers. Also 61 * contains the list of target {@link ANativeWindow}s to send image data to for this 62 * capture.</p> 63 * 64 * <p>ACaptureRequest is created by {@link ACameraDevice_createCaptureRequest}. 65 * 66 * <p>ACaptureRequest is given to {@link ACameraCaptureSession_capture} or 67 * {@link ACameraCaptureSession_setRepeatingRequest} to capture images from a camera.</p> 68 * 69 * <p>Each request can specify a different subset of target {@link ANativeWindow}s for the 70 * camera to send the captured data to. All the {@link ANativeWindow}s used in a request must 71 * be part of the {@link ANativeWindow} list given to the last call to 72 * {@link ACameraDevice_createCaptureSession}, when the request is submitted to the 73 * session.</p> 74 * 75 * <p>For example, a request meant for repeating preview might only include the 76 * {@link ANativeWindow} for the preview SurfaceView or SurfaceTexture, while a 77 * high-resolution still capture would also include a {@link ANativeWindow} from a 78 * {@link AImageReader} configured for high-resolution JPEG images.</p> 79 * 80 * @see ACameraDevice_createCaptureRequest 81 * @see ACameraCaptureSession_capture 82 * @see ACameraCaptureSession_setRepeatingRequest 83 */ 84 typedef struct ACaptureRequest ACaptureRequest; 85 86 /** 87 * Create a ACameraOutputTarget object. 88 * 89 * <p>The ACameraOutputTarget is used in {@link ACaptureRequest_addTarget} method to add an output 90 * {@link ANativeWindow} to ACaptureRequest. Use {@link ACameraOutputTarget_free} to free the object 91 * and its memory after application no longer needs the {@link ACameraOutputTarget}.</p> 92 * 93 * @param window the {@link ANativeWindow} to be associated with the {@link ACameraOutputTarget} 94 * @param output the output {@link ACameraOutputTarget} will be stored here if the 95 * method call succeeds. 96 * 97 * @return <ul> 98 * <li>{@link ACAMERA_OK} if the method call succeeds. The created ACameraOutputTarget will 99 * be filled in the output argument.</li> 100 * <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if window or output is NULL.</li></ul> 101 * 102 * @see ACaptureRequest_addTarget 103 */ 104 camera_status_t ACameraOutputTarget_create(ACameraWindowType* window, 105 ACameraOutputTarget** output) __INTRODUCED_IN(24); 106 107 /** 108 * Free a ACameraOutputTarget object. 109 * 110 * @param output the {@link ACameraOutputTarget} to be freed. 111 * 112 * @see ACameraOutputTarget_create 113 */ 114 void ACameraOutputTarget_free(ACameraOutputTarget* output) __INTRODUCED_IN(24); 115 116 /** 117 * Add an {@link ACameraOutputTarget} object to {@link ACaptureRequest}. 118 * 119 * @param request the {@link ACaptureRequest} of interest. 120 * @param output the output {@link ACameraOutputTarget} to be added to capture request. 121 * 122 * @return <ul> 123 * <li>{@link ACAMERA_OK} if the method call succeeds.</li> 124 * <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if request or output is NULL.</li></ul> 125 */ 126 camera_status_t ACaptureRequest_addTarget(ACaptureRequest* request, 127 const ACameraOutputTarget* output) __INTRODUCED_IN(24); 128 129 /** 130 * Remove an {@link ACameraOutputTarget} object from {@link ACaptureRequest}. 131 * 132 * <p>This method has no effect if the ACameraOutputTarget does not exist in ACaptureRequest.</p> 133 * 134 * @param request the {@link ACaptureRequest} of interest. 135 * @param output the output {@link ACameraOutputTarget} to be removed from capture request. 136 * 137 * @return <ul> 138 * <li>{@link ACAMERA_OK} if the method call succeeds.</li> 139 * <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if request or output is NULL.</li></ul> 140 */ 141 camera_status_t ACaptureRequest_removeTarget(ACaptureRequest* request, 142 const ACameraOutputTarget* output) __INTRODUCED_IN(24); 143 144 /** 145 * Get a metadata entry from input {@link ACaptureRequest}. 146 * 147 * <p>The memory of the data field in returned entry is managed by camera framework. Do not 148 * attempt to free it.</p> 149 * 150 * @param request the {@link ACaptureRequest} of interest. 151 * @param tag the tag value of the camera metadata entry to be get. 152 * @param entry the output {@link ACameraMetadata_const_entry} will be filled here if the method 153 * call succeeeds. 154 * 155 * @return <ul> 156 * <li>{@link ACAMERA_OK} if the method call succeeds.</li> 157 * <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if metadata or entry is NULL.</li> 158 * <li>{@link ACAMERA_ERROR_METADATA_NOT_FOUND} if the capture request does not contain an 159 * entry of input tag value.</li></ul> 160 */ 161 camera_status_t ACaptureRequest_getConstEntry( 162 const ACaptureRequest* request, uint32_t tag, ACameraMetadata_const_entry* entry) __INTRODUCED_IN(24); 163 164 /* 165 * List all the entry tags in input {@link ACaptureRequest}. 166 * 167 * @param request the {@link ACaptureRequest} of interest. 168 * @param numEntries number of metadata entries in input {@link ACaptureRequest} 169 * @param tags the tag values of the metadata entries. Length of tags is returned in numEntries 170 * argument. The memory is managed by ACaptureRequest itself and must NOT be free/delete 171 * by application. Calling ACaptureRequest_setEntry_* methods will invalidate previous 172 * output of ACaptureRequest_getAllTags. Do not access tags after calling 173 * ACaptureRequest_setEntry_*. To get new list of tags after updating capture request, 174 * application must call ACaptureRequest_getAllTags again. Do NOT access tags after 175 * calling ACaptureRequest_free. 176 * 177 * @return <ul> 178 * <li>{@link ACAMERA_OK} if the method call succeeds.</li> 179 * <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if request, numEntries or tags is NULL.</li> 180 * <li>{@link ACAMERA_ERROR_UNKNOWN} if the method fails for some other reasons.</li></ul> 181 */ 182 camera_status_t ACaptureRequest_getAllTags( 183 const ACaptureRequest* request, /*out*/int32_t* numTags, /*out*/const uint32_t** tags) __INTRODUCED_IN(24); 184 185 /** 186 * Set/change a camera capture control entry with unsigned 8 bits data type. 187 * 188 * <p>Set count to 0 and data to NULL to remove a tag from the capture request.</p> 189 * 190 * @param request the {@link ACaptureRequest} of interest. 191 * @param tag the tag value of the camera metadata entry to be set. 192 * @param count number of elements to be set in data argument 193 * @param data the entries to be set/change in the capture request. 194 * 195 * @return <ul> 196 * <li>{@link ACAMERA_OK} if the method call succeeds.</li> 197 * <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if request is NULL, count is larger than 198 * zero while data is NULL, the data type of the tag is not unsigned 8 bits, or 199 * the tag is not controllable by application.</li></ul> 200 */ 201 camera_status_t ACaptureRequest_setEntry_u8( 202 ACaptureRequest* request, uint32_t tag, uint32_t count, const uint8_t* data) __INTRODUCED_IN(24); 203 204 /** 205 * Set/change a camera capture control entry with signed 32 bits data type. 206 * 207 * <p>Set count to 0 and data to NULL to remove a tag from the capture request.</p> 208 * 209 * @param request the {@link ACaptureRequest} of interest. 210 * @param tag the tag value of the camera metadata entry to be set. 211 * @param count number of elements to be set in data argument 212 * @param data the entries to be set/change in the capture request. 213 * 214 * @return <ul> 215 * <li>{@link ACAMERA_OK} if the method call succeeds.</li> 216 * <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if request is NULL, count is larger than 217 * zero while data is NULL, the data type of the tag is not signed 32 bits, or 218 * the tag is not controllable by application.</li></ul> 219 */ 220 camera_status_t ACaptureRequest_setEntry_i32( 221 ACaptureRequest* request, uint32_t tag, uint32_t count, const int32_t* data) __INTRODUCED_IN(24); 222 223 /** 224 * Set/change a camera capture control entry with float data type. 225 * 226 * <p>Set count to 0 and data to NULL to remove a tag from the capture request.</p> 227 * 228 * @param request the {@link ACaptureRequest} of interest. 229 * @param tag the tag value of the camera metadata entry to be set. 230 * @param count number of elements to be set in data argument 231 * @param data the entries to be set/change in the capture request. 232 * 233 * @return <ul> 234 * <li>{@link ACAMERA_OK} if the method call succeeds.</li> 235 * <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if request is NULL, count is larger than 236 * zero while data is NULL, the data type of the tag is not float, or 237 * the tag is not controllable by application.</li></ul> 238 */ 239 camera_status_t ACaptureRequest_setEntry_float( 240 ACaptureRequest* request, uint32_t tag, uint32_t count, const float* data) __INTRODUCED_IN(24); 241 242 /** 243 * Set/change a camera capture control entry with signed 64 bits data type. 244 * 245 * <p>Set count to 0 and data to NULL to remove a tag from the capture request.</p> 246 * 247 * @param request the {@link ACaptureRequest} of interest. 248 * @param tag the tag value of the camera metadata entry to be set. 249 * @param count number of elements to be set in data argument 250 * @param data the entries to be set/change in the capture request. 251 * 252 * @return <ul> 253 * <li>{@link ACAMERA_OK} if the method call succeeds.</li> 254 * <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if request is NULL, count is larger than 255 * zero while data is NULL, the data type of the tag is not signed 64 bits, or 256 * the tag is not controllable by application.</li></ul> 257 */ 258 camera_status_t ACaptureRequest_setEntry_i64( 259 ACaptureRequest* request, uint32_t tag, uint32_t count, const int64_t* data) __INTRODUCED_IN(24); 260 261 /** 262 * Set/change a camera capture control entry with double data type. 263 * 264 * <p>Set count to 0 and data to NULL to remove a tag from the capture request.</p> 265 * 266 * @param request the {@link ACaptureRequest} of interest. 267 * @param tag the tag value of the camera metadata entry to be set. 268 * @param count number of elements to be set in data argument 269 * @param data the entries to be set/change in the capture request. 270 * 271 * @return <ul> 272 * <li>{@link ACAMERA_OK} if the method call succeeds.</li> 273 * <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if request is NULL, count is larger than 274 * zero while data is NULL, the data type of the tag is not double, or 275 * the tag is not controllable by application.</li></ul> 276 */ 277 camera_status_t ACaptureRequest_setEntry_double( 278 ACaptureRequest* request, uint32_t tag, uint32_t count, const double* data) __INTRODUCED_IN(24); 279 280 /** 281 * Set/change a camera capture control entry with rational data type. 282 * 283 * <p>Set count to 0 and data to NULL to remove a tag from the capture request.</p> 284 * 285 * @param request the {@link ACaptureRequest} of interest. 286 * @param tag the tag value of the camera metadata entry to be set. 287 * @param count number of elements to be set in data argument 288 * @param data the entries to be set/change in the capture request. 289 * 290 * @return <ul> 291 * <li>{@link ACAMERA_OK} if the method call succeeds.</li> 292 * <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if request is NULL, count is larger than 293 * zero while data is NULL, the data type of the tag is not rational, or 294 * the tag is not controllable by application.</li></ul> 295 */ 296 camera_status_t ACaptureRequest_setEntry_rational( 297 ACaptureRequest* request, uint32_t tag, uint32_t count, 298 const ACameraMetadata_rational* data) __INTRODUCED_IN(24); 299 300 /** 301 * Free a {@link ACaptureRequest} structure. 302 * 303 * @param request the {@link ACaptureRequest} to be freed. 304 */ 305 void ACaptureRequest_free(ACaptureRequest* request) __INTRODUCED_IN(24); 306 307 #endif /* __ANDROID_API__ >= 24 */ 308 309 #if __ANDROID_API__ >= 28 310 311 /** 312 * Associate an arbitrary user context pointer to the {@link ACaptureRequest} 313 * 314 * This method is useful for user to identify the capture request in capture session callbacks. 315 * The context is NULL for newly created request. 316 * {@link ACameraOutputTarget_free} will not free the context. Also calling this method twice 317 * will not cause the previous context be freed. 318 * Also note that calling this method after the request has been sent to capture session will not 319 * change the context pointer in the capture callbacks. 320 * 321 * @param request the {@link ACaptureRequest} of interest. 322 * @param context the user context pointer to be associated with this capture request. 323 * 324 * @return <ul> 325 * <li>{@link ACAMERA_OK} if the method call succeeds.</li> 326 * <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if request is NULL.</li></ul> 327 */ 328 camera_status_t ACaptureRequest_setUserContext( 329 ACaptureRequest* request, void* context) __INTRODUCED_IN(28); 330 331 /** 332 * Get the user context pointer of the {@link ACaptureRequest} 333 * 334 * This method is useful for user to identify the capture request in capture session callbacks. 335 * The context is NULL for newly created request. 336 * 337 * @param request the {@link ACaptureRequest} of interest. 338 * @param context the user context pointer of this capture request. 339 * 340 * @return <ul> 341 * <li>{@link ACAMERA_OK} if the method call succeeds.</li> 342 * <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if request is NULL.</li></ul> 343 */ 344 camera_status_t ACaptureRequest_getUserContext( 345 const ACaptureRequest* request, /*out*/void** context) __INTRODUCED_IN(28); 346 347 /** 348 * Create a copy of input {@link ACaptureRequest}. 349 * 350 * <p>The returned ACaptureRequest must be freed by the application by {@link ACaptureRequest_free} 351 * after application is done using it.</p> 352 * 353 * @param src the input {@link ACaptureRequest} to be copied. 354 * 355 * @return a valid ACaptureRequest pointer or NULL if the input request cannot be copied. 356 */ 357 ACaptureRequest* ACaptureRequest_copy(const ACaptureRequest* src) __INTRODUCED_IN(28); 358 359 #endif /* __ANDROID_API__ >= 28 */ 360 361 #if __ANDROID_API__ >= 29 362 363 /** 364 * Get a metadata entry from input {@link ACaptureRequest} for 365 * a physical camera backing a logical multi-camera device. 366 * 367 * <p>Same as ACaptureRequest_getConstEntry, except that if the key is contained 368 * in {@link ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS}, this function 369 * returns the entry set by ACaptureRequest_setEntry_physicalCamera_* class of 370 * functions on the particular physical camera.</p> 371 * 372 * @param request the {@link ACaptureRequest} of interest created by 373 * {@link ACameraDevice_createCaptureRequest_withPhysicalIds}. 374 * @param physicalId one of the physical Ids used when request is created with 375 * {@link ACameraDevice_createCaptureRequest_withPhysicalIds}. 376 * @param tag the capture request metadata tag in 377 * {@link ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS} 378 * that is set by ACaptureRequest_setEntry_physicalCamera_* class of functions. 379 * 380 * @return <ul> 381 * <li>{@link ACAMERA_OK} if the method call succeeds.</li> 382 * <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if metadata, physicalId, or entry is NULL, 383 * physicalId is not one of the Ids used in creating the request, or if the capture 384 * request is a regular request with no physical Ids at all.</li> 385 * <li>{@link ACAMERA_ERROR_METADATA_NOT_FOUND} if the capture request does not contain an 386 * entry of input tag value.</li></ul> 387 */ 388 camera_status_t ACaptureRequest_getConstEntry_physicalCamera( 389 const ACaptureRequest* request, const char* physicalId, uint32_t tag, 390 ACameraMetadata_const_entry* entry) __INTRODUCED_IN(29); 391 392 /** 393 * Set/change a camera capture control entry with unsigned 8 bits data type for 394 * a physical camera backing a logical multi-camera device. 395 * 396 * <p>Same as ACaptureRequest_setEntry_u8, except that if {@link tag} is contained 397 * in {@link ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS}, this function 398 * sets the entry for a particular physical sub-camera backing the logical multi-camera. 399 * If {@link tag} is not contained in 400 * {@link ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS}, the key will be ignored 401 * by the camera device.</p> 402 * 403 * @param request the {@link ACaptureRequest} of interest created by 404 * {@link ACameraDevice_createCaptureRequest_withPhysicalIds}. 405 * @param physicalId one of the physical Ids used when request is created with 406 * {@link ACameraDevice_createCaptureRequest_withPhysicalIds}. 407 * @param tag one of the capture request metadata tags in 408 * {@link ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS}. 409 * 410 * @return <ul> 411 * <li>{@link ACAMERA_OK} if the method call succeeds.</li> 412 * <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if request or physicalId is NULL, count is 413 * larger than zero while data is NULL, the data type of the tag is not unsigned 8 bits, 414 * the tag is not controllable by application, physicalId is not one of the Ids used 415 * in creating the request, or if the capture request is a regular request with no 416 * physical Ids at all.</li></ul> 417 */ 418 camera_status_t ACaptureRequest_setEntry_physicalCamera_u8( 419 ACaptureRequest* request, const char* physicalId, uint32_t tag, 420 uint32_t count, const uint8_t* data) __INTRODUCED_IN(29); 421 422 /** 423 * Set/change a camera capture control entry with signed 32 bits data type for 424 * a physical camera of a logical multi-camera device. 425 * 426 * <p>Same as ACaptureRequest_setEntry_i32, except that if {@link tag} is contained 427 * in {@link ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS}, this function 428 * sets the entry for a particular physical sub-camera backing the logical multi-camera. 429 * If {@link tag} is not contained in 430 * {@link ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS}, the key will be ignored 431 * by the camera device.</p> 432 * 433 * @param request the {@link ACaptureRequest} of interest created by 434 * {@link ACameraDevice_createCaptureRequest_withPhysicalIds}. 435 * @param physicalId one of the physical Ids used when request is created with 436 * {@link ACameraDevice_createCaptureRequest_withPhysicalIds}. 437 * @param tag one of the capture request metadata tags in 438 * {@link ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS}. 439 * 440 * @return <ul> 441 * <li>{@link ACAMERA_OK} if the method call succeeds.</li> 442 * <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if request or physicalId is NULL, count is 443 * larger than zero while data is NULL, the data type of the tag is not signed 32 bits, 444 * the tag is not controllable by application, physicalId is not one of the Ids used 445 * in creating the request, or if the capture request is a regular request with no 446 * physical Ids at all.</li></ul> 447 */ 448 camera_status_t ACaptureRequest_setEntry_physicalCamera_i32( 449 ACaptureRequest* request, const char* physicalId, uint32_t tag, 450 uint32_t count, const int32_t* data) __INTRODUCED_IN(29); 451 452 /** 453 * Set/change a camera capture control entry with float data type for 454 * a physical camera of a logical multi-camera device. 455 * 456 * <p>Same as ACaptureRequest_setEntry_float, except that if {@link tag} is contained 457 * in {@link ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS}, this function 458 * sets the entry for a particular physical sub-camera backing the logical multi-camera. 459 * If {@link tag} is not contained in 460 * {@link ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS}, the key will be ignored 461 * by the camera device.</p> 462 * 463 * @param request the {@link ACaptureRequest} of interest created by 464 * {@link ACameraDevice_createCaptureRequest_withPhysicalIds}. 465 * @param physicalId one of the physical Ids used when request is created with 466 * {@link ACameraDevice_createCaptureRequest_withPhysicalIds}. 467 * @param tag one of the capture request metadata tags in 468 * {@link ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS}. 469 * 470 * @return <ul> 471 * <li>{@link ACAMERA_OK} if the method call succeeds.</li> 472 * <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if request or physicalId is NULL, count is 473 * larger than zero while data is NULL, the data type of the tag is not float, 474 * the tag is not controllable by application, physicalId is not one of the Ids used 475 * in creating the request, or if the capture request is a regular request with no 476 * physical Ids at all.</li></ul> 477 */ 478 camera_status_t ACaptureRequest_setEntry_physicalCamera_float( 479 ACaptureRequest* request, const char* physicalId, uint32_t tag, 480 uint32_t count, const float* data) __INTRODUCED_IN(29); 481 482 /** 483 * Set/change a camera capture control entry with signed 64 bits data type for 484 * a physical camera of a logical multi-camera device. 485 * 486 * <p>Same as ACaptureRequest_setEntry_i64, except that if {@link tag} is contained 487 * in {@link ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS}, this function 488 * sets the entry for a particular physical sub-camera backing the logical multi-camera. 489 * If {@link tag} is not contained in 490 * {@link ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS}, the key will be ignored 491 * by the camera device.</p> 492 * 493 * @param request the {@link ACaptureRequest} of interest created by 494 * {@link ACameraDevice_createCaptureRequest_withPhysicalIds}. 495 * @param physicalId one of the physical Ids used when request is created with 496 * {@link ACameraDevice_createCaptureRequest_withPhysicalIds}. 497 * @param tag one of the capture request metadata tags in 498 * {@link ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS}. 499 * 500 * @return <ul> 501 * <li>{@link ACAMERA_OK} if the method call succeeds.</li> 502 * <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if request or physicalId is NULL, count is 503 * larger than zero while data is NULL, the data type of the tag is not signed 64 bits, 504 * the tag is not controllable by application, physicalId is not one of the Ids used 505 * in creating the request, or if the capture request is a regular request with no 506 * physical Ids at all.</li></ul> 507 */ 508 camera_status_t ACaptureRequest_setEntry_physicalCamera_i64( 509 ACaptureRequest* request, const char* physicalId, uint32_t tag, 510 uint32_t count, const int64_t* data) __INTRODUCED_IN(29); 511 512 /** 513 * Set/change a camera capture control entry with double data type for 514 * a physical camera of a logical multi-camera device. 515 * 516 * <p>Same as ACaptureRequest_setEntry_double, except that if {@link tag} is contained 517 * in {@link ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS}, this function 518 * sets the entry for a particular physical sub-camera backing the logical multi-camera. 519 * If {@link tag} is not contained in 520 * {@link ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS}, the key will be ignored 521 * by the camera device.</p> 522 * 523 * @param request the {@link ACaptureRequest} of interest created by 524 * {@link ACameraDevice_createCaptureRequest_withPhysicalIds}. 525 * @param physicalId one of the physical Ids used when request is created with 526 * {@link ACameraDevice_createCaptureRequest_withPhysicalIds}. 527 * @param tag one of the capture request metadata tags in 528 * {@link ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS}. 529 * 530 * @return <ul> 531 * <li>{@link ACAMERA_OK} if the method call succeeds.</li> 532 * <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if request or physicalId is NULL, count is 533 * larger than zero while data is NULL, the data type of the tag is not double, 534 * the tag is not controllable by application, physicalId is not one of the Ids used 535 * in creating the request, or if the capture request is a regular request with no 536 * physical Ids at all.</li></ul> 537 */ 538 camera_status_t ACaptureRequest_setEntry_physicalCamera_double( 539 ACaptureRequest* request, const char* physicalId, uint32_t tag, 540 uint32_t count, const double* data) __INTRODUCED_IN(29); 541 542 /** 543 * Set/change a camera capture control entry with rational data type for 544 * a physical camera of a logical multi-camera device. 545 * 546 * <p>Same as ACaptureRequest_setEntry_rational, except that if {@link tag} is contained 547 * in {@link ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS}, this function 548 * sets the entry for a particular physical sub-camera backing the logical multi-camera. 549 * If {@link tag} is not contained in 550 * {@link ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS}, the key will be ignored 551 * by the camera device.</p> 552 * 553 * @param request the {@link ACaptureRequest} of interest created by 554 * {@link ACameraDevice_createCaptureRequest_withPhysicalIds}. 555 * @param physicalId one of the physical Ids used when request is created with 556 * {@link ACameraDevice_createCaptureRequest_withPhysicalIds}. 557 * @param tag one of the capture request metadata tags in 558 * {@link ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS}. 559 * 560 * @return <ul> 561 * <li>{@link ACAMERA_OK} if the method call succeeds.</li> 562 * <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if request or physicalId is NULL, count is 563 * larger than zero while data is NULL, the data type of the tag is not rational, 564 * the tag is not controllable by application, physicalId is not one of the Ids used 565 * in creating the request, or if the capture request is a regular request with no 566 * physical Ids at all.</li></ul> 567 */ 568 camera_status_t ACaptureRequest_setEntry_physicalCamera_rational( 569 ACaptureRequest* request, const char* physicalId, uint32_t tag, 570 uint32_t count, const ACameraMetadata_rational* data) __INTRODUCED_IN(29); 571 572 #endif /* __ANDROID_API__ >= 29 */ 573 574 __END_DECLS 575 576 #endif /* _NDK_CAPTURE_REQUEST_H */ 577 578 /** @} */ 579