Loading camera/ndk/include/camera/NdkCameraCaptureSession.h +35 −4 Original line number Diff line number Diff line Loading @@ -61,6 +61,10 @@ typedef struct ACameraCaptureSession ACameraCaptureSession; */ typedef void (*ACameraCaptureSession_stateCallback)(void* context, ACameraCaptureSession *session); /** * Capture session state callbacks used in {@link ACameraDevice_createCaptureSession} and * {@link ACameraDevice_createCaptureSessionWithSessionParameters} */ typedef struct ACameraCaptureSession_stateCallbacks { /// optional application context. void* context; Loading Loading @@ -246,6 +250,10 @@ typedef void (*ACameraCaptureSession_captureCallback_bufferLost)( void* context, ACameraCaptureSession* session, ACaptureRequest* request, ACameraWindowType* window, int64_t frameNumber); /** * ACaptureCaptureSession_captureCallbacks structure used in * {@link ACameraCaptureSession_capture} and {@link ACameraCaptureSession_setRepeatingRequest}. */ typedef struct ACameraCaptureSession_captureCallbacks { /// optional application context. void* context; Loading Loading @@ -413,7 +421,10 @@ enum { */ void ACameraCaptureSession_close(ACameraCaptureSession* session); struct ACameraDevice; /** * ACameraDevice is opaque type that provides access to a camera device. * A pointer can be obtained using {@link ACameraManager_openCamera} method. */ typedef struct ACameraDevice ACameraDevice; /** Loading Loading @@ -591,6 +602,10 @@ camera_status_t ACameraCaptureSession_stopRepeating(ACameraCaptureSession* sessi camera_status_t ACameraCaptureSession_abortCaptures(ACameraCaptureSession* session) __INTRODUCED_IN(24); /** * Opaque object for capture session output, use {@link ACaptureSessionOutput_create} or * {@link ACaptureSessionSharedOutput_create} to create an instance. */ typedef struct ACaptureSessionOutput ACaptureSessionOutput; /** Loading @@ -604,9 +619,9 @@ typedef struct ACaptureSessionOutput ACaptureSessionOutput; * * <p>Native windows that get removed must not be part of any active repeating or single/burst * request or have any pending results. Consider updating repeating requests via * {@link ACaptureSessionOutput_setRepeatingRequest} and then wait for the last frame number * {@link ACameraCaptureSession_setRepeatingRequest} and then wait for the last frame number * when the sequence completes * {@link ACameraCaptureSession_captureCallback#onCaptureSequenceCompleted}.</p> * {@link ACameraCaptureSession_captureCallbacks#onCaptureSequenceCompleted}.</p> * * <p>Native windows that get added must not be part of any other registered ACaptureSessionOutput * and must be compatible. Compatible windows must have matching format, rotation and Loading Loading @@ -713,7 +728,15 @@ typedef struct ACameraCaptureSession_logicalCamera_captureCallbacks { * Same as ACameraCaptureSession_captureCallbacks */ void* context; /** * Same as {@link ACameraCaptureSession_captureCallbacks#onCaptureStarted}. */ ACameraCaptureSession_captureCallback_start onCaptureStarted; /** * Same as {@link ACameraCaptureSession_captureCallbacks#onCaptureProgressed}. */ ACameraCaptureSession_captureCallback_result onCaptureProgressed; /** Loading Loading @@ -751,10 +774,18 @@ typedef struct ACameraCaptureSession_logicalCamera_captureCallbacks { ACameraCaptureSession_logicalCamera_captureCallback_failed onLogicalCameraCaptureFailed; /** * Same as ACameraCaptureSession_captureCallbacks * Same as {@link ACameraCaptureSession_captureCallbacks#onCaptureSequenceCompleted}. */ ACameraCaptureSession_captureCallback_sequenceEnd onCaptureSequenceCompleted; /** * Same as {@link ACameraCaptureSession_captureCallbacks#onCaptureSequenceAborted}. */ ACameraCaptureSession_captureCallback_sequenceAbort onCaptureSequenceAborted; /** * Same as {@link ACameraCaptureSession_captureCallbacks#onCaptureBufferLost}. */ ACameraCaptureSession_captureCallback_bufferLost onCaptureBufferLost; } ACameraCaptureSession_logicalCamera_captureCallbacks; Loading camera/ndk/include/camera/NdkCameraDevice.h +14 −3 Original line number Diff line number Diff line Loading @@ -124,6 +124,10 @@ typedef void (*ACameraDevice_StateCallback)(void* context, ACameraDevice* device */ typedef void (*ACameraDevice_ErrorStateCallback)(void* context, ACameraDevice* device, int error); /** * Applications' callbacks for camera device state changes, register with * {@link ACameraManager_openCamera}. */ typedef struct ACameraDevice_StateCallbacks { /// optional application context. void* context; Loading Loading @@ -198,6 +202,10 @@ camera_status_t ACameraDevice_close(ACameraDevice* device) __INTRODUCED_IN(24); */ const char* ACameraDevice_getId(const ACameraDevice* device) __INTRODUCED_IN(24); /** * Capture request pre-defined template types, used in {@link ACameraDevice_createCaptureRequest} * and {@link ACameraDevice_createCaptureRequest_withPhysicalIds}. */ typedef enum { /** * Create a request suitable for a camera preview window. Specifically, this Loading Loading @@ -301,10 +309,12 @@ camera_status_t ACameraDevice_createCaptureRequest( const ACameraDevice* device, ACameraDevice_request_template templateId, /*out*/ACaptureRequest** request) __INTRODUCED_IN(24); /** * Opaque object for CaptureSessionOutput container, use * {@link ACaptureSessionOutputContainer_create} to create an instance. */ typedef struct ACaptureSessionOutputContainer ACaptureSessionOutputContainer; typedef struct ACaptureSessionOutput ACaptureSessionOutput; /** * Create a capture session output container. Loading Loading @@ -844,7 +854,7 @@ camera_status_t ACameraDevice_createCaptureRequest_withPhysicalIds( /*out*/ACaptureRequest** request) __INTRODUCED_IN(29); /** * Check whether a particular {@ACaptureSessionOutputContainer} is supported by * Check whether a particular {@link ACaptureSessionOutputContainer} is supported by * the camera device. * * <p>This method performs a runtime check of a given {@link Loading Loading @@ -875,6 +885,7 @@ camera_status_t ACameraDevice_createCaptureRequest_withPhysicalIds( * device.</li> * <li>{@link ACAMERA_ERROR_UNSUPPORTED_OPERATION} if the query operation is not * supported by the camera device.</li> * </ul> */ camera_status_t ACameraDevice_isSessionConfigurationSupported( const ACameraDevice* device, Loading camera/ndk/include/camera/NdkCameraError.h +6 −0 Original line number Diff line number Diff line Loading @@ -40,7 +40,13 @@ __BEGIN_DECLS /** * Camera status enum types. */ typedef enum { /** * Camera operation has succeeded. */ ACAMERA_OK = 0, ACAMERA_ERROR_BASE = -10000, Loading camera/ndk/include/camera/NdkCameraManager.h +1 −1 Original line number Diff line number Diff line Loading @@ -326,7 +326,7 @@ typedef void (*ACameraManager_AccessPrioritiesChangedCallback)(void* context); * @see ACameraManager_registerExtendedAvailabilityCallback */ typedef struct ACameraManager_ExtendedAvailabilityListener { /// /// Called when a camera becomes available or unavailable ACameraManager_AvailabilityCallbacks availabilityCallbacks; /// Called when there is camera access permission change Loading camera/ndk/include/camera/NdkCameraMetadata.h +11 −7 Original line number Diff line number Diff line Loading @@ -256,10 +256,12 @@ bool ACameraMetadata_isLogicalMultiCamera(const ACameraMetadata* staticMetadata, /** * Return a {@link ACameraMetadata} that references the same data as * {@link cameraMetadata}, which is an instance of * {@link android.hardware.camera2.CameraMetadata} (e.g., a * {@link android.hardware.camera2.CameraCharacteristics} or * {@link android.hardware.camera2.CaptureResult}). * <a href="/reference/android/hardware/camera2/CameraMetadata"> * android.hardware.camera2.CameraMetadata</a> from Java API. (e.g., a * <a href="/reference/android/hardware/camera2/CameraCharacteristics"> * android.hardware.camera2.CameraCharacteristics</a> * or <a href="/reference/android/hardware/camera2/CaptureResult"> * android.hardware.camera2.CaptureResult</a>). * * <p>The returned ACameraMetadata must be freed by the application by {@link ACameraMetadata_free} * after application is done using it.</p> Loading @@ -269,11 +271,13 @@ bool ACameraMetadata_isLogicalMultiCamera(const ACameraMetadata* staticMetadata, * the Java metadata is garbage collected. * * @param env the JNI environment. * @param cameraMetadata the source {@link android.hardware.camera2.CameraMetadata} from which the * @param cameraMetadata the source <a href="/reference/android/hardware/camera2/CameraMetadata"> android.hardware.camera2.CameraMetadata </a>from which the * returned {@link ACameraMetadata} is a view. * * @return a valid ACameraMetadata pointer or NULL if {@link cameraMetadata} is null or not a valid * instance of {@link android.hardware.camera2.CameraMetadata}. * @return a valid ACameraMetadata pointer or NULL if cameraMetadata is null or not a valid * instance of <a href="android/hardware/camera2/CameraMetadata"> * android.hardware.camera2.CameraMetadata</a>. * */ ACameraMetadata* ACameraMetadata_fromCameraMetadata(JNIEnv* env, jobject cameraMetadata) Loading Loading
camera/ndk/include/camera/NdkCameraCaptureSession.h +35 −4 Original line number Diff line number Diff line Loading @@ -61,6 +61,10 @@ typedef struct ACameraCaptureSession ACameraCaptureSession; */ typedef void (*ACameraCaptureSession_stateCallback)(void* context, ACameraCaptureSession *session); /** * Capture session state callbacks used in {@link ACameraDevice_createCaptureSession} and * {@link ACameraDevice_createCaptureSessionWithSessionParameters} */ typedef struct ACameraCaptureSession_stateCallbacks { /// optional application context. void* context; Loading Loading @@ -246,6 +250,10 @@ typedef void (*ACameraCaptureSession_captureCallback_bufferLost)( void* context, ACameraCaptureSession* session, ACaptureRequest* request, ACameraWindowType* window, int64_t frameNumber); /** * ACaptureCaptureSession_captureCallbacks structure used in * {@link ACameraCaptureSession_capture} and {@link ACameraCaptureSession_setRepeatingRequest}. */ typedef struct ACameraCaptureSession_captureCallbacks { /// optional application context. void* context; Loading Loading @@ -413,7 +421,10 @@ enum { */ void ACameraCaptureSession_close(ACameraCaptureSession* session); struct ACameraDevice; /** * ACameraDevice is opaque type that provides access to a camera device. * A pointer can be obtained using {@link ACameraManager_openCamera} method. */ typedef struct ACameraDevice ACameraDevice; /** Loading Loading @@ -591,6 +602,10 @@ camera_status_t ACameraCaptureSession_stopRepeating(ACameraCaptureSession* sessi camera_status_t ACameraCaptureSession_abortCaptures(ACameraCaptureSession* session) __INTRODUCED_IN(24); /** * Opaque object for capture session output, use {@link ACaptureSessionOutput_create} or * {@link ACaptureSessionSharedOutput_create} to create an instance. */ typedef struct ACaptureSessionOutput ACaptureSessionOutput; /** Loading @@ -604,9 +619,9 @@ typedef struct ACaptureSessionOutput ACaptureSessionOutput; * * <p>Native windows that get removed must not be part of any active repeating or single/burst * request or have any pending results. Consider updating repeating requests via * {@link ACaptureSessionOutput_setRepeatingRequest} and then wait for the last frame number * {@link ACameraCaptureSession_setRepeatingRequest} and then wait for the last frame number * when the sequence completes * {@link ACameraCaptureSession_captureCallback#onCaptureSequenceCompleted}.</p> * {@link ACameraCaptureSession_captureCallbacks#onCaptureSequenceCompleted}.</p> * * <p>Native windows that get added must not be part of any other registered ACaptureSessionOutput * and must be compatible. Compatible windows must have matching format, rotation and Loading Loading @@ -713,7 +728,15 @@ typedef struct ACameraCaptureSession_logicalCamera_captureCallbacks { * Same as ACameraCaptureSession_captureCallbacks */ void* context; /** * Same as {@link ACameraCaptureSession_captureCallbacks#onCaptureStarted}. */ ACameraCaptureSession_captureCallback_start onCaptureStarted; /** * Same as {@link ACameraCaptureSession_captureCallbacks#onCaptureProgressed}. */ ACameraCaptureSession_captureCallback_result onCaptureProgressed; /** Loading Loading @@ -751,10 +774,18 @@ typedef struct ACameraCaptureSession_logicalCamera_captureCallbacks { ACameraCaptureSession_logicalCamera_captureCallback_failed onLogicalCameraCaptureFailed; /** * Same as ACameraCaptureSession_captureCallbacks * Same as {@link ACameraCaptureSession_captureCallbacks#onCaptureSequenceCompleted}. */ ACameraCaptureSession_captureCallback_sequenceEnd onCaptureSequenceCompleted; /** * Same as {@link ACameraCaptureSession_captureCallbacks#onCaptureSequenceAborted}. */ ACameraCaptureSession_captureCallback_sequenceAbort onCaptureSequenceAborted; /** * Same as {@link ACameraCaptureSession_captureCallbacks#onCaptureBufferLost}. */ ACameraCaptureSession_captureCallback_bufferLost onCaptureBufferLost; } ACameraCaptureSession_logicalCamera_captureCallbacks; Loading
camera/ndk/include/camera/NdkCameraDevice.h +14 −3 Original line number Diff line number Diff line Loading @@ -124,6 +124,10 @@ typedef void (*ACameraDevice_StateCallback)(void* context, ACameraDevice* device */ typedef void (*ACameraDevice_ErrorStateCallback)(void* context, ACameraDevice* device, int error); /** * Applications' callbacks for camera device state changes, register with * {@link ACameraManager_openCamera}. */ typedef struct ACameraDevice_StateCallbacks { /// optional application context. void* context; Loading Loading @@ -198,6 +202,10 @@ camera_status_t ACameraDevice_close(ACameraDevice* device) __INTRODUCED_IN(24); */ const char* ACameraDevice_getId(const ACameraDevice* device) __INTRODUCED_IN(24); /** * Capture request pre-defined template types, used in {@link ACameraDevice_createCaptureRequest} * and {@link ACameraDevice_createCaptureRequest_withPhysicalIds}. */ typedef enum { /** * Create a request suitable for a camera preview window. Specifically, this Loading Loading @@ -301,10 +309,12 @@ camera_status_t ACameraDevice_createCaptureRequest( const ACameraDevice* device, ACameraDevice_request_template templateId, /*out*/ACaptureRequest** request) __INTRODUCED_IN(24); /** * Opaque object for CaptureSessionOutput container, use * {@link ACaptureSessionOutputContainer_create} to create an instance. */ typedef struct ACaptureSessionOutputContainer ACaptureSessionOutputContainer; typedef struct ACaptureSessionOutput ACaptureSessionOutput; /** * Create a capture session output container. Loading Loading @@ -844,7 +854,7 @@ camera_status_t ACameraDevice_createCaptureRequest_withPhysicalIds( /*out*/ACaptureRequest** request) __INTRODUCED_IN(29); /** * Check whether a particular {@ACaptureSessionOutputContainer} is supported by * Check whether a particular {@link ACaptureSessionOutputContainer} is supported by * the camera device. * * <p>This method performs a runtime check of a given {@link Loading Loading @@ -875,6 +885,7 @@ camera_status_t ACameraDevice_createCaptureRequest_withPhysicalIds( * device.</li> * <li>{@link ACAMERA_ERROR_UNSUPPORTED_OPERATION} if the query operation is not * supported by the camera device.</li> * </ul> */ camera_status_t ACameraDevice_isSessionConfigurationSupported( const ACameraDevice* device, Loading
camera/ndk/include/camera/NdkCameraError.h +6 −0 Original line number Diff line number Diff line Loading @@ -40,7 +40,13 @@ __BEGIN_DECLS /** * Camera status enum types. */ typedef enum { /** * Camera operation has succeeded. */ ACAMERA_OK = 0, ACAMERA_ERROR_BASE = -10000, Loading
camera/ndk/include/camera/NdkCameraManager.h +1 −1 Original line number Diff line number Diff line Loading @@ -326,7 +326,7 @@ typedef void (*ACameraManager_AccessPrioritiesChangedCallback)(void* context); * @see ACameraManager_registerExtendedAvailabilityCallback */ typedef struct ACameraManager_ExtendedAvailabilityListener { /// /// Called when a camera becomes available or unavailable ACameraManager_AvailabilityCallbacks availabilityCallbacks; /// Called when there is camera access permission change Loading
camera/ndk/include/camera/NdkCameraMetadata.h +11 −7 Original line number Diff line number Diff line Loading @@ -256,10 +256,12 @@ bool ACameraMetadata_isLogicalMultiCamera(const ACameraMetadata* staticMetadata, /** * Return a {@link ACameraMetadata} that references the same data as * {@link cameraMetadata}, which is an instance of * {@link android.hardware.camera2.CameraMetadata} (e.g., a * {@link android.hardware.camera2.CameraCharacteristics} or * {@link android.hardware.camera2.CaptureResult}). * <a href="/reference/android/hardware/camera2/CameraMetadata"> * android.hardware.camera2.CameraMetadata</a> from Java API. (e.g., a * <a href="/reference/android/hardware/camera2/CameraCharacteristics"> * android.hardware.camera2.CameraCharacteristics</a> * or <a href="/reference/android/hardware/camera2/CaptureResult"> * android.hardware.camera2.CaptureResult</a>). * * <p>The returned ACameraMetadata must be freed by the application by {@link ACameraMetadata_free} * after application is done using it.</p> Loading @@ -269,11 +271,13 @@ bool ACameraMetadata_isLogicalMultiCamera(const ACameraMetadata* staticMetadata, * the Java metadata is garbage collected. * * @param env the JNI environment. * @param cameraMetadata the source {@link android.hardware.camera2.CameraMetadata} from which the * @param cameraMetadata the source <a href="/reference/android/hardware/camera2/CameraMetadata"> android.hardware.camera2.CameraMetadata </a>from which the * returned {@link ACameraMetadata} is a view. * * @return a valid ACameraMetadata pointer or NULL if {@link cameraMetadata} is null or not a valid * instance of {@link android.hardware.camera2.CameraMetadata}. * @return a valid ACameraMetadata pointer or NULL if cameraMetadata is null or not a valid * instance of <a href="android/hardware/camera2/CameraMetadata"> * android.hardware.camera2.CameraMetadata</a>. * */ ACameraMetadata* ACameraMetadata_fromCameraMetadata(JNIEnv* env, jobject cameraMetadata) Loading