Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17e83a3f authored by Ryan Prichard's avatar Ryan Prichard Committed by Gerrit Code Review
Browse files

Merge changes from topic "b113052379-cp-from-pi-dev-p1"

* changes:
  Camera: update hardware level related docs
  Fix copy/paste error
  Annotate remaining AMEDIAFORMAT variables
  Add __INTRODUCED_IN to more NdkMediaFormat.h variables
  Add __INTRODUCED_IN to NdkMediaFormat.h variables too.
  Add __INTRODUCED_IN to audio/camera/media headers.
  Camera: NDK codegen doc update
parents 89bdf3ae 0bf1ac17
Loading
Loading
Loading
Loading
+8 −13
Original line number Diff line number Diff line
@@ -45,8 +45,6 @@

__BEGIN_DECLS

#if __ANDROID_API__ >= 24

/**
 * ACameraCaptureSession is an opaque type that manages frame captures of a camera device.
 *
@@ -434,7 +432,7 @@ typedef struct ACameraDevice ACameraDevice;
 *
 */
camera_status_t ACameraCaptureSession_getDevice(
        ACameraCaptureSession* session, /*out*/ACameraDevice** device);
        ACameraCaptureSession* session, /*out*/ACameraDevice** device) __INTRODUCED_IN(24);

/**
 * Submit an array of requests to be captured in sequence as a burst in the minimum of time possible.
@@ -472,7 +470,7 @@ camera_status_t ACameraCaptureSession_capture(
        ACameraCaptureSession* session,
        /*optional*/ACameraCaptureSession_captureCallbacks* callbacks,
        int numRequests, ACaptureRequest** requests,
        /*optional*/int* captureSequenceId);
        /*optional*/int* captureSequenceId) __INTRODUCED_IN(24);

/**
 * Request endlessly repeating capture of a sequence of images by this capture session.
@@ -526,7 +524,7 @@ camera_status_t ACameraCaptureSession_setRepeatingRequest(
        ACameraCaptureSession* session,
        /*optional*/ACameraCaptureSession_captureCallbacks* callbacks,
        int numRequests, ACaptureRequest** requests,
        /*optional*/int* captureSequenceId);
        /*optional*/int* captureSequenceId) __INTRODUCED_IN(24);

/**
 * Cancel any ongoing repeating capture set by {@link ACameraCaptureSession_setRepeatingRequest}.
@@ -549,7 +547,8 @@ camera_status_t ACameraCaptureSession_setRepeatingRequest(
 *         <li>{@link ACAMERA_ERROR_CAMERA_SERVICE} if the camera service encounters fatal error</li>
 *         <li>{@link ACAMERA_ERROR_UNKNOWN} if the method fails for some other reasons</li></ul>
 */
camera_status_t ACameraCaptureSession_stopRepeating(ACameraCaptureSession* session);
camera_status_t ACameraCaptureSession_stopRepeating(ACameraCaptureSession* session)
        __INTRODUCED_IN(24);

/**
 * Discard all captures currently pending and in-progress as fast as possible.
@@ -589,11 +588,8 @@ camera_status_t ACameraCaptureSession_stopRepeating(ACameraCaptureSession* sessi
 *         <li>{@link ACAMERA_ERROR_CAMERA_SERVICE} if the camera service encounters fatal error</li>
 *         <li>{@link ACAMERA_ERROR_UNKNOWN} if the method fails for some other reasons</li></ul>
 */
camera_status_t ACameraCaptureSession_abortCaptures(ACameraCaptureSession* session);

#endif /* __ANDROID_API__ >= 24 */

#if __ANDROID_API__ >= 28
camera_status_t ACameraCaptureSession_abortCaptures(ACameraCaptureSession* session)
        __INTRODUCED_IN(24);

typedef struct ACaptureSessionOutput ACaptureSessionOutput;

@@ -638,8 +634,7 @@ typedef struct ACaptureSessionOutput ACaptureSessionOutput;
 *         <li>{@link ACAMERA_ERROR_UNKNOWN} if the method fails for some other reasons</li></ul>
 */
camera_status_t ACameraCaptureSession_updateSharedOutput(ACameraCaptureSession* session,
        ACaptureSessionOutput* output);
#endif /* __ANDROID_API__ >= 28 */
        ACaptureSessionOutput* output) __INTRODUCED_IN(28);

__END_DECLS

+18 −22
Original line number Diff line number Diff line
@@ -44,8 +44,6 @@

__BEGIN_DECLS

#if __ANDROID_API__ >= 24

/**
 * ACameraDevice is opaque type that provides access to a camera device.
 *
@@ -176,7 +174,7 @@ typedef ACameraDevice_StateCallbacks ACameraDevice_stateCallbacks;
 *         <li>{@link ACAMERA_OK} if the method call succeeds.</li>
 *         <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if device is NULL.</li></ul>
 */
camera_status_t ACameraDevice_close(ACameraDevice* device);
camera_status_t ACameraDevice_close(ACameraDevice* device) __INTRODUCED_IN(24);

/**
 * Return the camera id associated with this camera device.
@@ -187,7 +185,7 @@ camera_status_t ACameraDevice_close(ACameraDevice* device);
 * delete/free by the application. Also the returned string must not be used after the device
 * has been closed.
 */
const char* ACameraDevice_getId(const ACameraDevice* device);
const char* ACameraDevice_getId(const ACameraDevice* device) __INTRODUCED_IN(24);

typedef enum {
    /**
@@ -290,7 +288,7 @@ typedef enum {
 */
camera_status_t ACameraDevice_createCaptureRequest(
        const ACameraDevice* device, ACameraDevice_request_template templateId,
        /*out*/ACaptureRequest** request);
        /*out*/ACaptureRequest** request) __INTRODUCED_IN(24);


typedef struct ACaptureSessionOutputContainer ACaptureSessionOutputContainer;
@@ -313,7 +311,7 @@ typedef struct ACaptureSessionOutput ACaptureSessionOutput;
 *         <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if container is NULL.</li></ul>
 */
camera_status_t ACaptureSessionOutputContainer_create(
        /*out*/ACaptureSessionOutputContainer** container);
        /*out*/ACaptureSessionOutputContainer** container) __INTRODUCED_IN(24);

/**
 * Free a capture session output container.
@@ -322,7 +320,8 @@ camera_status_t ACaptureSessionOutputContainer_create(
 *
 * @see ACaptureSessionOutputContainer_create
 */
void            ACaptureSessionOutputContainer_free(ACaptureSessionOutputContainer* container);
void            ACaptureSessionOutputContainer_free(ACaptureSessionOutputContainer* container)
        __INTRODUCED_IN(24);

/**
 * Create a ACaptureSessionOutput object.
@@ -344,7 +343,7 @@ void ACaptureSessionOutputContainer_free(ACaptureSessionOutputContain
 * @see ACaptureSessionOutputContainer_add
 */
camera_status_t ACaptureSessionOutput_create(
        ANativeWindow* anw, /*out*/ACaptureSessionOutput** output);
        ANativeWindow* anw, /*out*/ACaptureSessionOutput** output) __INTRODUCED_IN(24);

/**
 * Free a ACaptureSessionOutput object.
@@ -353,7 +352,7 @@ camera_status_t ACaptureSessionOutput_create(
 *
 * @see ACaptureSessionOutput_create
 */
void            ACaptureSessionOutput_free(ACaptureSessionOutput* output);
void            ACaptureSessionOutput_free(ACaptureSessionOutput* output) __INTRODUCED_IN(24);

/**
 * Add an {@link ACaptureSessionOutput} object to {@link ACaptureSessionOutputContainer}.
@@ -366,7 +365,8 @@ void ACaptureSessionOutput_free(ACaptureSessionOutput* output);
 *         <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if container or output is NULL.</li></ul>
 */
camera_status_t ACaptureSessionOutputContainer_add(
        ACaptureSessionOutputContainer* container, const ACaptureSessionOutput* output);
        ACaptureSessionOutputContainer* container, const ACaptureSessionOutput* output)
        __INTRODUCED_IN(24);

/**
 * Remove an {@link ACaptureSessionOutput} object from {@link ACaptureSessionOutputContainer}.
@@ -382,7 +382,8 @@ camera_status_t ACaptureSessionOutputContainer_add(
 *         <li>{@link ACAMERA_ERROR_INVALID_PARAMETER} if container or output is NULL.</li></ul>
 */
camera_status_t ACaptureSessionOutputContainer_remove(
        ACaptureSessionOutputContainer* container, const ACaptureSessionOutput* output);
        ACaptureSessionOutputContainer* container, const ACaptureSessionOutput* output)
        __INTRODUCED_IN(24);

/**
 * Create a new camera capture session by providing the target output set of {@link ANativeWindow}
@@ -663,11 +664,7 @@ camera_status_t ACameraDevice_createCaptureSession(
        ACameraDevice* device,
        const ACaptureSessionOutputContainer*       outputs,
        const ACameraCaptureSession_stateCallbacks* callbacks,
        /*out*/ACameraCaptureSession** session);

#endif /* __ANDROID_API__ >= 24 */

#if __ANDROID_API__ >= 28
        /*out*/ACameraCaptureSession** session) __INTRODUCED_IN(24);

/**
 * Create a shared ACaptureSessionOutput object.
@@ -691,7 +688,7 @@ camera_status_t ACameraDevice_createCaptureSession(
 * @see ACaptureSessionOutputContainer_add
 */
camera_status_t ACaptureSessionSharedOutput_create(
        ANativeWindow* anw, /*out*/ACaptureSessionOutput** output);
        ANativeWindow* anw, /*out*/ACaptureSessionOutput** output) __INTRODUCED_IN(28);

/**
 * Add a native window to shared ACaptureSessionOutput.
@@ -708,7 +705,8 @@ camera_status_t ACaptureSessionSharedOutput_create(
 *             window associated with ACaptureSessionOutput; or anw is already present inside
 *             ACaptureSessionOutput.</li></ul>
 */
camera_status_t ACaptureSessionSharedOutput_add(ACaptureSessionOutput *output, ANativeWindow *anw);
camera_status_t ACaptureSessionSharedOutput_add(ACaptureSessionOutput *output,
        ANativeWindow *anw) __INTRODUCED_IN(28);

/**
 * Remove a native window from shared ACaptureSessionOutput.
@@ -724,7 +722,7 @@ camera_status_t ACaptureSessionSharedOutput_add(ACaptureSessionOutput *output, A
 *             ACaptureSessionOutput.</li></ul>
 */
camera_status_t ACaptureSessionSharedOutput_remove(ACaptureSessionOutput *output,
        ANativeWindow* anw);
        ANativeWindow* anw) __INTRODUCED_IN(28);

/**
 * Create a new camera capture session similar to {@link ACameraDevice_createCaptureSession}. This
@@ -757,9 +755,7 @@ camera_status_t ACameraDevice_createCaptureSessionWithSessionParameters(
        const ACaptureSessionOutputContainer* outputs,
        const ACaptureRequest* sessionParameters,
        const ACameraCaptureSession_stateCallbacks* callbacks,
        /*out*/ACameraCaptureSession** session);

#endif /* __ANDROID_API__ >= 28 */
        /*out*/ACameraCaptureSession** session) __INTRODUCED_IN(28);

__END_DECLS

+0 −4
Original line number Diff line number Diff line
@@ -40,8 +40,6 @@

__BEGIN_DECLS

#if __ANDROID_API__ >= 24

typedef enum {
    ACAMERA_OK = 0,

@@ -132,8 +130,6 @@ typedef enum {
    ACAMERA_ERROR_PERMISSION_DENIED     = ACAMERA_ERROR_BASE - 13,
} camera_status_t;

#endif /* __ANDROID_API__ >= 24 */

__END_DECLS

#endif /* _NDK_CAMERA_ERROR_H */
+12 −13
Original line number Diff line number Diff line
@@ -44,8 +44,6 @@

__BEGIN_DECLS

#if __ANDROID_API__ >= 24

/**
 * ACameraManager is opaque type that provides access to camera service.
 *
@@ -65,14 +63,14 @@ typedef struct ACameraManager ACameraManager;
 * @return a {@link ACameraManager} instance.
 *
 */
ACameraManager* ACameraManager_create();
ACameraManager* ACameraManager_create() __INTRODUCED_IN(24);

/**
 * <p>Delete the {@link ACameraManager} instance and free its resources. </p>
 *
 * @param manager the {@link ACameraManager} instance to be deleted.
 */
void ACameraManager_delete(ACameraManager* manager);
void ACameraManager_delete(ACameraManager* manager) __INTRODUCED_IN(24);

/// Struct to hold list of camera devices
typedef struct ACameraIdList {
@@ -102,14 +100,14 @@ typedef struct ACameraIdList {
 *         <li>{@link ACAMERA_ERROR_NOT_ENOUGH_MEMORY} if allocating memory fails.</li></ul>
 */
camera_status_t ACameraManager_getCameraIdList(ACameraManager* manager,
                                              /*out*/ACameraIdList** cameraIdList);
        /*out*/ACameraIdList** cameraIdList) __INTRODUCED_IN(24);

/**
 * Delete a list of camera devices allocated via {@link ACameraManager_getCameraIdList}.
 *
 * @param cameraIdList the {@link ACameraIdList} to be deleted.
 */
void ACameraManager_deleteCameraIdList(ACameraIdList* cameraIdList);
void ACameraManager_deleteCameraIdList(ACameraIdList* cameraIdList) __INTRODUCED_IN(24);

/**
 * Definition of camera availability callbacks.
@@ -120,7 +118,8 @@ void ACameraManager_deleteCameraIdList(ACameraIdList* cameraIdList);
 *                 argument is owned by camera framework and will become invalid immediately after
 *                 this callback returns.
 */
typedef void (*ACameraManager_AvailabilityCallback)(void* context, const char* cameraId);
typedef void (*ACameraManager_AvailabilityCallback)(void* context,
        const char* cameraId) __INTRODUCED_IN(24);

/**
 * A listener for camera devices becoming available or unavailable to open.
@@ -168,7 +167,8 @@ typedef struct ACameraManager_AvailabilityListener {
 *                  {ACameraManager_AvailabilityCallbacks#onCameraUnavailable} is NULL.</li></ul>
 */
camera_status_t ACameraManager_registerAvailabilityCallback(
        ACameraManager* manager, const ACameraManager_AvailabilityCallbacks* callback);
        ACameraManager* manager,
        const ACameraManager_AvailabilityCallbacks* callback) __INTRODUCED_IN(24);

/**
 * Unregister camera availability callbacks.
@@ -185,7 +185,8 @@ camera_status_t ACameraManager_registerAvailabilityCallback(
 *                  {ACameraManager_AvailabilityCallbacks#onCameraUnavailable} is NULL.</li></ul>
 */
camera_status_t ACameraManager_unregisterAvailabilityCallback(
        ACameraManager* manager, const ACameraManager_AvailabilityCallbacks* callback);
        ACameraManager* manager,
        const ACameraManager_AvailabilityCallbacks* callback) __INTRODUCED_IN(24);

/**
 * Query the capabilities of a camera device. These capabilities are
@@ -211,7 +212,7 @@ camera_status_t ACameraManager_unregisterAvailabilityCallback(
 */
camera_status_t ACameraManager_getCameraCharacteristics(
        ACameraManager* manager, const char* cameraId,
        /*out*/ACameraMetadata** characteristics);
        /*out*/ACameraMetadata** characteristics) __INTRODUCED_IN(24);

/**
 * Open a connection to a camera with the given ID. The opened camera device will be
@@ -271,9 +272,7 @@ camera_status_t ACameraManager_getCameraCharacteristics(
camera_status_t ACameraManager_openCamera(
        ACameraManager* manager, const char* cameraId,
        ACameraDevice_StateCallbacks* callback,
        /*out*/ACameraDevice** device);

#endif /* __ANDROID_API__ >= 24 */
        /*out*/ACameraDevice** device) __INTRODUCED_IN(24);

__END_DECLS

+6 −8
Original line number Diff line number Diff line
@@ -44,8 +44,6 @@

__BEGIN_DECLS

#if __ANDROID_API__ >= 24

/**
 * ACameraMetadata is opaque type that provides access to read-only camera metadata like camera
 * characteristics (via {@link ACameraManager_getCameraCharacteristics}) or capture results (via
@@ -191,7 +189,8 @@ typedef struct ACameraMetadata_const_entry {
 *             of input tag value.</li></ul>
 */
camera_status_t ACameraMetadata_getConstEntry(
        const ACameraMetadata* metadata, uint32_t tag, /*out*/ACameraMetadata_const_entry* entry);
        const ACameraMetadata* metadata,
        uint32_t tag, /*out*/ACameraMetadata_const_entry* entry) __INTRODUCED_IN(24);

/**
 * List all the entry tags in input {@link ACameraMetadata}.
@@ -208,7 +207,8 @@ camera_status_t ACameraMetadata_getConstEntry(
 *         <li>{@link ACAMERA_ERROR_UNKNOWN} if the method fails for some other reasons.</li></ul>
 */
camera_status_t ACameraMetadata_getAllTags(
        const ACameraMetadata* metadata, /*out*/int32_t* numEntries, /*out*/const uint32_t** tags);
        const ACameraMetadata* metadata,
        /*out*/int32_t* numEntries, /*out*/const uint32_t** tags) __INTRODUCED_IN(24);

/**
 * Create a copy of input {@link ACameraMetadata}.
@@ -220,16 +220,14 @@ camera_status_t ACameraMetadata_getAllTags(
 *
 * @return a valid ACameraMetadata pointer or NULL if the input metadata cannot be copied.
 */
ACameraMetadata* ACameraMetadata_copy(const ACameraMetadata* src);
ACameraMetadata* ACameraMetadata_copy(const ACameraMetadata* src) __INTRODUCED_IN(24);

/**
 * Free a {@link ACameraMetadata} structure.
 *
 * @param metadata the {@link ACameraMetadata} to be freed.
 */
void ACameraMetadata_free(ACameraMetadata* metadata);

#endif /* __ANDROID_API__ >= 24 */
void ACameraMetadata_free(ACameraMetadata* metadata) __INTRODUCED_IN(24);

__END_DECLS

Loading