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

Commit 9ef4f8d6 authored by Elliott Hughes's avatar Elliott Hughes Committed by android-build-merger
Browse files

Merge "Consistently say "Available since API level"." am: 2218ec1a am: 22cd27bc

am: 8a58e728

Change-Id: Ie955a04f48091716a1cb5169444a84797f1ef76f
parents 7d484ddc 8a58e728
Loading
Loading
Loading
Loading
+97 −10
Original line number Diff line number Diff line
@@ -472,6 +472,8 @@ typedef struct AAudioStreamBuilderStruct AAudioStreamBuilder;
 * This is intended for developers to use when debugging.
 * It is not for display to users.
 *
 * Available since API level 26.
 *
 * @return pointer to a text representation of an AAudio result code.
 */
AAUDIO_API const char * AAudio_convertResultToText(aaudio_result_t returnCode) __INTRODUCED_IN(26);
@@ -482,6 +484,8 @@ AAUDIO_API const char * AAudio_convertResultToText(aaudio_result_t returnCode) _
 * This is intended for developers to use when debugging.
 * It is not for display to users.
 *
 * Available since API level 26.
 *
 * @return pointer to a text representation of an AAudio state.
 */
AAUDIO_API const char * AAudio_convertStreamStateToText(aaudio_stream_state_t state)
@@ -502,6 +506,8 @@ AAUDIO_API const char * AAudio_convertStreamStateToText(aaudio_stream_state_t st
 * chosen by the device when it is opened.
 *
 * AAudioStreamBuilder_delete() must be called when you are done using the builder.
 *
 * Available since API level 26.
 */
AAUDIO_API aaudio_result_t AAudio_createStreamBuilder(AAudioStreamBuilder** builder)
        __INTRODUCED_IN(26);
@@ -513,6 +519,8 @@ AAUDIO_API aaudio_result_t AAudio_createStreamBuilder(AAudioStreamBuilder** buil
 * The default, if you do not call this function, is {@link #AAUDIO_UNSPECIFIED},
 * in which case the primary device will be used.
 *
 * Available since API level 26.
 *
 * @param builder reference provided by AAudio_createStreamBuilder()
 * @param deviceId device identifier or {@link #AAUDIO_UNSPECIFIED}
 */
@@ -530,6 +538,8 @@ AAUDIO_API void AAudioStreamBuilder_setDeviceId(AAudioStreamBuilder* builder,
 * If an exact value is specified then an opened stream will use that value.
 * If a stream cannot be opened with the specified value then the open will fail.
 *
 * Available since API level 26.
 *
 * @param builder reference provided by AAudio_createStreamBuilder()
 * @param sampleRate frames per second. Common rates include 44100 and 48000 Hz.
 */
@@ -547,6 +557,8 @@ AAUDIO_API void AAudioStreamBuilder_setSampleRate(AAudioStreamBuilder* builder,
 * If an exact value is specified then an opened stream will use that value.
 * If a stream cannot be opened with the specified value then the open will fail.
 *
 * Available since API level 26.
 *
 * @param builder reference provided by AAudio_createStreamBuilder()
 * @param channelCount Number of channels desired.
 */
@@ -556,6 +568,8 @@ AAUDIO_API void AAudioStreamBuilder_setChannelCount(AAudioStreamBuilder* builder
/**
 * Identical to AAudioStreamBuilder_setChannelCount().
 *
 * Available since API level 26.
 *
 * @param builder reference provided by AAudio_createStreamBuilder()
 * @param samplesPerFrame Number of samples in a frame.
 */
@@ -573,6 +587,8 @@ AAUDIO_API void AAudioStreamBuilder_setSamplesPerFrame(AAudioStreamBuilder* buil
 * If an exact value is specified then an opened stream will use that value.
 * If a stream cannot be opened with the specified value then the open will fail.
 *
 * Available since API level 26.
 *
 * @param builder reference provided by AAudio_createStreamBuilder()
 * @param format common formats are {@link #AAUDIO_FORMAT_PCM_FLOAT} and
 *               {@link #AAUDIO_FORMAT_PCM_I16}.
@@ -588,6 +604,8 @@ AAUDIO_API void AAudioStreamBuilder_setFormat(AAudioStreamBuilder* builder,
 * The requested sharing mode may not be available.
 * The application can query for the actual mode after the stream is opened.
 *
 * Available since API level 26.
 *
 * @param builder reference provided by AAudio_createStreamBuilder()
 * @param sharingMode {@link #AAUDIO_SHARING_MODE_SHARED} or {@link #AAUDIO_SHARING_MODE_EXCLUSIVE}
 */
@@ -599,6 +617,8 @@ AAUDIO_API void AAudioStreamBuilder_setSharingMode(AAudioStreamBuilder* builder,
 *
 * The default, if you do not call this function, is {@link #AAUDIO_DIRECTION_OUTPUT}.
 *
 * Available since API level 26.
 *
 * @param builder reference provided by AAudio_createStreamBuilder()
 * @param direction {@link #AAUDIO_DIRECTION_OUTPUT} or {@link #AAUDIO_DIRECTION_INPUT}
 */
@@ -611,6 +631,8 @@ AAUDIO_API void AAudioStreamBuilder_setDirection(AAudioStreamBuilder* builder,
 *
 * The default, if you do not call this function, is {@link #AAUDIO_UNSPECIFIED}.
 *
 * Available since API level 26.
 *
 * @param builder reference provided by AAudio_createStreamBuilder()
 * @param numFrames the desired buffer capacity in frames or {@link #AAUDIO_UNSPECIFIED}
 */
@@ -629,6 +651,8 @@ AAUDIO_API void AAudioStreamBuilder_setBufferCapacityInFrames(AAudioStreamBuilde
 * You can call AAudioStream_getPerformanceMode()
 * to find out the final mode for the stream.
 *
 * Available since API level 26.
 *
 * @param builder reference provided by AAudio_createStreamBuilder()
 * @param mode the desired performance mode, eg. {@link #AAUDIO_PERFORMANCE_MODE_LOW_LATENCY}
 */
@@ -644,7 +668,7 @@ AAUDIO_API void AAudioStreamBuilder_setPerformanceMode(AAudioStreamBuilder* buil
 *
 * The default, if you do not call this function, is {@link #AAUDIO_USAGE_MEDIA}.
 *
 * Added in API level 28.
 * Available since API level 28.
 *
 * @param builder reference provided by AAudio_createStreamBuilder()
 * @param usage the desired usage, eg. {@link #AAUDIO_USAGE_GAME}
@@ -661,7 +685,7 @@ AAUDIO_API void AAudioStreamBuilder_setUsage(AAudioStreamBuilder* builder,
 *
 * The default, if you do not call this function, is {@link #AAUDIO_CONTENT_TYPE_MUSIC}.
 *
 * Added in API level 28.
 * Available since API level 28.
 *
 * @param builder reference provided by AAudio_createStreamBuilder()
 * @param contentType the type of audio data, eg. {@link #AAUDIO_CONTENT_TYPE_SPEECH}
@@ -681,7 +705,7 @@ AAUDIO_API void AAudioStreamBuilder_setContentType(AAudioStreamBuilder* builder,
 * That is because VOICE_RECOGNITION is the preset with the lowest latency
 * on many platforms.
 *
 * Added in API level 28.
 * Available since API level 28.
 *
 * @param builder reference provided by AAudio_createStreamBuilder()
 * @param inputPreset the desired configuration for recording
@@ -697,7 +721,7 @@ AAUDIO_API void AAudioStreamBuilder_setInputPreset(AAudioStreamBuilder* builder,
 * Note that an application can also set its global policy, in which case the most restrictive
 * policy is always applied. See {@link android.media.AudioAttributes#setAllowedCapturePolicy(int)}
 *
 * Added in API level 29.
 * Available since API level 29.
 *
 * @param builder reference provided by AAudio_createStreamBuilder()
 * @param capturePolicy the desired level of opt-out from being captured.
@@ -727,7 +751,7 @@ AAUDIO_API void AAudioStreamBuilder_setAllowedCapturePolicy(AAudioStreamBuilder*
 *
 * Allocated session IDs will always be positive and nonzero.
 *
 * Added in API level 28.
 * Available since API level 28.
 *
 * @param builder reference provided by AAudio_createStreamBuilder()
 * @param sessionId an allocated sessionID or {@link #AAUDIO_SESSION_ID_ALLOCATE}
@@ -826,6 +850,8 @@ typedef aaudio_data_callback_result_t (*AAudioStream_dataCallback)(
 *
 * Note that the AAudio callbacks will never be called simultaneously from multiple threads.
 *
 * Available since API level 26.
 *
 * @param builder reference provided by AAudio_createStreamBuilder()
 * @param callback pointer to a function that will process audio data.
 * @param userData pointer to an application data structure that will be passed
@@ -854,6 +880,8 @@ AAUDIO_API void AAudioStreamBuilder_setDataCallback(AAudioStreamBuilder* builder
 * If you do call this function then the requested size should be less than
 * half the buffer capacity, to allow double buffering.
 *
 * Available since API level 26.
 *
 * @param builder reference provided by AAudio_createStreamBuilder()
 * @param numFrames the desired buffer size in frames or {@link #AAUDIO_UNSPECIFIED}
 */
@@ -905,6 +933,8 @@ typedef void (*AAudioStream_errorCallback)(
 *
 * Note that the AAudio callbacks will never be called simultaneously from multiple threads.
 *
 * Available since API level 26.
 *
 * @param builder reference provided by AAudio_createStreamBuilder()
 * @param callback pointer to a function that will be called if an error occurs.
 * @param userData pointer to an application data structure that will be passed
@@ -919,6 +949,8 @@ AAUDIO_API void AAudioStreamBuilder_setErrorCallback(AAudioStreamBuilder* builde
 * AAudioStream_close() must be called when finished with the stream to recover
 * the memory and to free the associated resources.
 *
 * Available since API level 26.
 *
 * @param builder reference provided by AAudio_createStreamBuilder()
 * @param stream pointer to a variable to receive the new stream reference
 * @return {@link #AAUDIO_OK} or a negative error.
@@ -929,6 +961,8 @@ AAUDIO_API aaudio_result_t AAudioStreamBuilder_openStream(AAudioStreamBuilder*
/**
 * Delete the resources associated with the StreamBuilder.
 *
 * Available since API level 26.
 *
 * @param builder reference provided by AAudio_createStreamBuilder()
 * @return {@link #AAUDIO_OK} or a negative error.
 */
@@ -942,6 +976,8 @@ AAUDIO_API aaudio_result_t AAudioStreamBuilder_delete(AAudioStreamBuilder* buil
/**
 * Free the resources associated with a stream created by AAudioStreamBuilder_openStream()
 *
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return {@link #AAUDIO_OK} or a negative error.
 */
@@ -954,6 +990,8 @@ AAUDIO_API aaudio_result_t AAudioStream_close(AAudioStream* stream) __INTRODUCE
 * After this call the state will be in {@link #AAUDIO_STREAM_STATE_STARTING} or
 * {@link #AAUDIO_STREAM_STATE_STARTED}.
 *
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return {@link #AAUDIO_OK} or a negative error.
 */
@@ -969,6 +1007,8 @@ AAUDIO_API aaudio_result_t AAudioStream_requestStart(AAudioStream* stream) __IN
 * This will return {@link #AAUDIO_ERROR_UNIMPLEMENTED} for input streams.
 * For input streams use AAudioStream_requestStop().
 *
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return {@link #AAUDIO_OK} or a negative error.
 */
@@ -984,6 +1024,8 @@ AAUDIO_API aaudio_result_t AAudioStream_requestPause(AAudioStream* stream) __IN
 *
 * This will return {@link #AAUDIO_ERROR_UNIMPLEMENTED} for input streams.
 *
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return {@link #AAUDIO_OK} or a negative error.
 */
@@ -995,6 +1037,8 @@ AAUDIO_API aaudio_result_t AAudioStream_requestFlush(AAudioStream* stream) __IN
 * After this call the state will be in {@link #AAUDIO_STREAM_STATE_STOPPING} or
 * {@link #AAUDIO_STREAM_STATE_STOPPED}.
 *
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return {@link #AAUDIO_OK} or a negative error.
 */
@@ -1008,6 +1052,8 @@ AAUDIO_API aaudio_result_t AAudioStream_requestStop(AAudioStream* stream) __INT
 * call AAudioStream_waitForStateChange() with currentState
 * set to {@link #AAUDIO_STREAM_STATE_UNKNOWN} and a zero timeout.
 *
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 */
AAUDIO_API aaudio_stream_state_t AAudioStream_getState(AAudioStream* stream) __INTRODUCED_IN(26);
@@ -1028,6 +1074,8 @@ AAUDIO_API aaudio_stream_state_t AAudioStream_getState(AAudioStream* stream) __I
 * }
 * </code></pre>
 *
 * Available since API level 26.
 *
 * @param stream A reference provided by AAudioStreamBuilder_openStream()
 * @param inputState The state we want to avoid.
 * @param nextState Pointer to a variable that will be set to the new state.
@@ -1056,6 +1104,8 @@ AAUDIO_API aaudio_result_t AAudioStream_waitForStateChange(AAudioStream* stream,
 *
 * If the call times out then zero or a partial frame count will be returned.
 *
 * Available since API level 26.
 *
 * @param stream A stream created using AAudioStreamBuilder_openStream().
 * @param buffer The address of the first sample.
 * @param numFrames Number of frames to read. Only complete frames will be written.
@@ -1079,6 +1129,8 @@ AAUDIO_API aaudio_result_t AAudioStream_read(AAudioStream* stream,
 *
 * If the call times out then zero or a partial frame count will be returned.
 *
 * Available since API level 26.
 *
 * @param stream A stream created using AAudioStreamBuilder_openStream().
 * @param buffer The address of the first sample.
 * @param numFrames Number of frames to write. Only complete frames will be written.
@@ -1104,6 +1156,8 @@ AAUDIO_API aaudio_result_t AAudioStream_write(AAudioStream* stream,
 * You can check the return value or call AAudioStream_getBufferSizeInFrames()
 * to see what the actual final size is.
 *
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @param numFrames requested number of frames that can be filled without blocking
 * @return actual buffer size in frames or a negative error
@@ -1114,6 +1168,8 @@ AAUDIO_API aaudio_result_t AAudioStream_setBufferSizeInFrames(AAudioStream* stre
/**
 * Query the maximum number of frames that can be filled without blocking.
 *
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return buffer size in frames.
 */
@@ -1129,6 +1185,8 @@ AAUDIO_API int32_t AAudioStream_getBufferSizeInFrames(AAudioStream* stream) __IN
 * For some endpoints, the burst size can vary dynamically.
 * But these tend to be devices with high latency.
 *
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return burst size
 */
@@ -1137,6 +1195,8 @@ AAUDIO_API int32_t AAudioStream_getFramesPerBurst(AAudioStream* stream) __INTROD
/**
 * Query maximum buffer capacity in frames.
 *
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return  buffer capacity in frames
 */
@@ -1158,6 +1218,8 @@ AAUDIO_API int32_t AAudioStream_getBufferCapacityInFrames(AAudioStream* stream)
 * {@link #AAUDIO_UNSPECIFIED} indicates that the callback buffer size for this stream
 * may vary from one dataProc callback to the next.
 *
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return callback buffer size in frames or {@link #AAUDIO_UNSPECIFIED}
 */
@@ -1175,12 +1237,16 @@ AAUDIO_API int32_t AAudioStream_getFramesPerDataCallback(AAudioStream* stream) _
 * Note that some INPUT devices may not support this function.
 * In that case a 0 will always be returned.
 *
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return the underrun or overrun count
 */
AAUDIO_API int32_t AAudioStream_getXRunCount(AAudioStream* stream) __INTRODUCED_IN(26);

/**
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return actual sample rate
 */
@@ -1190,6 +1256,8 @@ AAUDIO_API int32_t AAudioStream_getSampleRate(AAudioStream* stream) __INTRODUCED
 * A stream has one or more channels of data.
 * A frame will contain one sample for each channel.
 *
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return actual number of channels
 */
@@ -1198,18 +1266,24 @@ AAUDIO_API int32_t AAudioStream_getChannelCount(AAudioStream* stream) __INTRODUC
/**
 * Identical to AAudioStream_getChannelCount().
 *
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return actual number of samples frame
 */
AAUDIO_API int32_t AAudioStream_getSamplesPerFrame(AAudioStream* stream) __INTRODUCED_IN(26);

/**
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return actual device ID
 */
AAUDIO_API int32_t AAudioStream_getDeviceId(AAudioStream* stream) __INTRODUCED_IN(26);

/**
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return actual data format
 */
@@ -1217,6 +1291,9 @@ AAUDIO_API aaudio_format_t AAudioStream_getFormat(AAudioStream* stream) __INTROD

/**
 * Provide actual sharing mode.
 *
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return  actual sharing mode
 */
@@ -1226,12 +1303,16 @@ AAUDIO_API aaudio_sharing_mode_t AAudioStream_getSharingMode(AAudioStream* strea
/**
 * Get the performance mode used by the stream.
 *
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 */
AAUDIO_API aaudio_performance_mode_t AAudioStream_getPerformanceMode(AAudioStream* stream)
        __INTRODUCED_IN(26);

/**
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return direction
 */
@@ -1245,6 +1326,8 @@ AAUDIO_API aaudio_direction_t AAudioStream_getDirection(AAudioStream* stream) __
 *
 * The frame position is monotonically increasing.
 *
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return frames written
 */
@@ -1258,6 +1341,8 @@ AAUDIO_API int64_t AAudioStream_getFramesWritten(AAudioStream* stream) __INTRODU
 *
 * The frame position is monotonically increasing.
 *
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return frames read
 */
@@ -1281,7 +1366,7 @@ AAUDIO_API int64_t AAudioStream_getFramesRead(AAudioStream* stream) __INTRODUCED
 *
 * The sessionID for a stream should not change once the stream has been opened.
 *
 * Added in API level 28.
 * Available since API level 28.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return session ID or {@link #AAUDIO_SESSION_ID_NONE}
@@ -1304,6 +1389,8 @@ AAUDIO_API aaudio_session_id_t AAudioStream_getSessionId(AAudioStream* stream) _
 *
 * The position and time passed back are monotonically increasing.
 *
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @param clockid CLOCK_MONOTONIC or CLOCK_BOOTTIME
 * @param framePosition pointer to a variable to receive the position
@@ -1316,7 +1403,7 @@ AAUDIO_API aaudio_result_t AAudioStream_getTimestamp(AAudioStream* stream,
/**
 * Return the use case for the stream.
 *
 * Added in API level 28.
 * Available since API level 28.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return frames read
@@ -1326,7 +1413,7 @@ AAUDIO_API aaudio_usage_t AAudioStream_getUsage(AAudioStream* stream) __INTRODUC
/**
 * Return the content type for the stream.
 *
 * Added in API level 28.
 * Available since API level 28.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return content type, for example {@link #AAUDIO_CONTENT_TYPE_MUSIC}
@@ -1337,7 +1424,7 @@ AAUDIO_API aaudio_content_type_t AAudioStream_getContentType(AAudioStream* strea
/**
 * Return the input preset for the stream.
 *
 * Added in API level 28.
 * Available since API level 28.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return input preset, for example {@link #AAUDIO_INPUT_PRESET_CAMCORDER}
@@ -1349,7 +1436,7 @@ AAUDIO_API aaudio_input_preset_t AAudioStream_getInputPreset(AAudioStream* strea
 * Return the policy that determines whether the audio may or may not be captured
 * by other apps or the system.
 *
 * Added in API level 29.
 * Available since API level 29.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return the allowed capture policy, for example {@link #AAUDIO_ALLOW_CAPTURE_BY_ALL}
+24 −0
Original line number Diff line number Diff line
@@ -570,6 +570,8 @@ typedef struct AImageCropRect {
 * return {@link AMEDIA_ERROR_INVALID_OBJECT}. Application still needs to call this method on those
 * {@link AImage} objects to fully delete the {@link AImage} object from memory.</p>
 *
 * Available since API level 24.
 *
 * @param image The {@link AImage} to be deleted.
 */
void AImage_delete(AImage* image) __INTRODUCED_IN(24);
@@ -577,6 +579,8 @@ void AImage_delete(AImage* image) __INTRODUCED_IN(24);
/**
 * Query the width of the input {@link AImage}.
 *
 * Available since API level 24.
 *
 * @param image the {@link AImage} of interest.
 * @param width the width of the image will be filled here if the method call succeeeds.
 *
@@ -591,6 +595,8 @@ media_status_t AImage_getWidth(const AImage* image, /*out*/int32_t* width) __INT
/**
 * Query the height of the input {@link AImage}.
 *
 * Available since API level 24.
 *
 * @param image the {@link AImage} of interest.
 * @param height the height of the image will be filled here if the method call succeeeds.
 *
@@ -607,6 +613,8 @@ media_status_t AImage_getHeight(const AImage* image, /*out*/int32_t* height) __I
 *
 * <p>The format value will be one of AIMAGE_FORMAT_* enum value.</p>
 *
 * Available since API level 24.
 *
 * @param image the {@link AImage} of interest.
 * @param format the format of the image will be filled here if the method call succeeeds.
 *
@@ -624,6 +632,8 @@ media_status_t AImage_getFormat(const AImage* image, /*out*/int32_t* format) __I
 * <p>The crop rectangle specifies the region of valid pixels in the image, using coordinates in the
 * largest-resolution plane.</p>
 *
 * Available since API level 24.
 *
 * @param image the {@link AImage} of interest.
 * @param rect the cropped rectangle of the image will be filled here if the method call succeeeds.
 *
@@ -648,6 +658,8 @@ media_status_t AImage_getCropRect(const AImage* image, /*out*/AImageCropRect* re
 * {@link ACameraCaptureSession_captureCallbacks#onCaptureCompleted} callback.
 * </p>
 *
 * Available since API level 24.
 *
 * @param image the {@link AImage} of interest.
 * @param timestampNs the timestamp of the image will be filled here if the method call succeeeds.
 *
@@ -665,6 +677,8 @@ media_status_t AImage_getTimestamp(const AImage* image, /*out*/int64_t* timestam
 * <p>The number of plane of an {@link AImage} is determined by its format, which can be queried by
 * {@link AImage_getFormat} method.</p>
 *
 * Available since API level 24.
 *
 * @param image the {@link AImage} of interest.
 * @param numPlanes the number of planes of the image will be filled here if the method call
 *         succeeeds.
@@ -687,6 +701,8 @@ media_status_t AImage_getNumberOfPlanes(const AImage* image, /*out*/int32_t* num
 * being returned.
 * For formats where pixel stride is well defined, the pixel stride is always greater than 0.</p>
 *
 * Available since API level 24.
 *
 * @param image the {@link AImage} of interest.
 * @param planeIdx the index of the plane. Must be less than the number of planes of input image.
 * @param pixelStride the pixel stride of the image will be filled here if the method call succeeeds.
@@ -714,6 +730,8 @@ media_status_t AImage_getPlanePixelStride(
 * being returned.
 * For formats where row stride is well defined, the row stride is always greater than 0.</p>
 *
 * Available since API level 24.
 *
 * @param image the {@link AImage} of interest.
 * @param planeIdx the index of the plane. Must be less than the number of planes of input image.
 * @param rowStride the row stride of the image will be filled here if the method call succeeeds.
@@ -739,6 +757,8 @@ media_status_t AImage_getPlaneRowStride(
 * pointer from previous AImage_getPlaneData call becomes invalid. Do NOT use it after the
 * {@link AImage} or the parent {@link AImageReader} is deleted.</p>
 *
 * Available since API level 24.
 *
 * @param image the {@link AImage} of interest.
 * @param planeIdx the index of the plane. Must be less than the number of planes of input image.
 * @param data the data pointer of the image will be filled here if the method call succeeeds.
@@ -769,6 +789,8 @@ media_status_t AImage_getPlaneData(
 * signal the release of the hardware buffer back to the {@link AImageReader}'s queue using
 * releaseFenceFd.</p>
 *
 * Available since API level 26.
 *
 * @param image The {@link AImage} to be deleted.
 * @param releaseFenceFd A sync fence fd defined in {@link sync.h}, which signals the release of
 *         underlying {@link AHardwareBuffer}.
@@ -794,6 +816,8 @@ void AImage_deleteAsync(AImage* image, int releaseFenceFd) __INTRODUCED_IN(26);
 * {@link AImageReader_setBufferRemovedListener} to be notified when the buffer is no longer used
 * by {@link AImageReader}.</p>
 *
 * Available since API level 26.
 *
 * @param image the {@link AImage} of interest.
 * @param outBuffer The memory area pointed to by buffer will contain the acquired AHardwareBuffer
 *         handle.
+30 −1
Original line number Diff line number Diff line
@@ -67,6 +67,8 @@ typedef struct AImageReader AImageReader;
 * The valid sizes and formats depend on the source of the image data.
 * </p>
 *
 * Available since API level 24.
 *
 * @param width The default width in pixels of the Images that this reader will produce.
 * @param height The default height in pixels of the Images that this reader will produce.
 * @param format The format of the Image that this reader will produce. This must be one of the
@@ -101,6 +103,8 @@ media_status_t AImageReader_new(
 * making any of data pointers obtained from {@link AImage_getPlaneData} invalid. Do NOT access
 * the reader object or any of those data pointers after this method returns.</p>
 *
 * Available since API level 24.
 *
 * @param reader The image reader to be deleted.
 */
void AImageReader_delete(AImageReader* reader) __INTRODUCED_IN(24);
@@ -108,6 +112,8 @@ void AImageReader_delete(AImageReader* reader) __INTRODUCED_IN(24);
/**
 * Get a {@link ANativeWindow} that can be used to produce {@link AImage} for this image reader.
 *
 * Available since API level 24.
 *
 * @param reader The image reader of interest.
 * @param window The output {@link ANativeWindow} will be filled here if the method call succeeds.
 *                The {@link ANativeWindow} is managed by this image reader. Do NOT call
@@ -126,6 +132,8 @@ media_status_t AImageReader_getWindow(AImageReader* reader, /*out*/ANativeWindow
 * {@link ANativeWindow}. If so, the actual width of the images can be found using
 * {@link AImage_getWidth}.</p>
 *
 * Available since API level 24.
 *
 * @param reader The image reader of interest.
 * @param width the default width of the reader will be filled here if the method call succeeeds.
 *
@@ -142,6 +150,8 @@ media_status_t AImageReader_getWidth(const AImageReader* reader, /*out*/int32_t*
 * {@link ANativeWindow}. If so, the actual height of the images can be found using
 * {@link AImage_getHeight}.</p>
 *
 * Available since API level 24.
 *
 * @param reader The image reader of interest.
 * @param height the default height of the reader will be filled here if the method call succeeeds.
 *
@@ -154,6 +164,8 @@ media_status_t AImageReader_getHeight(const AImageReader* reader, /*out*/int32_t
/**
 * Query the format of the {@link AImage} generated by this reader.
 *
 * Available since API level 24.
 *
 * @param reader The image reader of interest.
 * @param format the fromat of the reader will be filled here if the method call succeeeds. The
 *                value will be one of the AIMAGE_FORMAT_* enum value defiend in {@link NdkImage.h}.
@@ -167,6 +179,8 @@ media_status_t AImageReader_getFormat(const AImageReader* reader, /*out*/int32_t
/**
 * Query the maximum number of concurrently acquired {@link AImage}s of this reader.
 *
 * Available since API level 24.
 *
 * @param reader The image reader of interest.
 * @param maxImages the maximum number of concurrently acquired images of the reader will be filled
 *                here if the method call succeeeds.
@@ -197,6 +211,8 @@ media_status_t AImageReader_getMaxImages(const AImageReader* reader, /*out*/int3
 * {@link AImage_delete}.
 * </p>
 *
 * Available since API level 24.
 *
 * @param reader The image reader of interest.
 * @param image the acquired {@link AImage} will be filled here if the method call succeeeds.
 *
@@ -214,7 +230,6 @@ media_status_t AImageReader_getMaxImages(const AImageReader* reader, /*out*/int3
media_status_t AImageReader_acquireNextImage(AImageReader* reader, /*out*/AImage** image) __INTRODUCED_IN(24);

/**

 * Acquire the latest {@link AImage} from the image reader's queue, dropping older images.
 *
 * <p>
@@ -241,6 +256,8 @@ media_status_t AImageReader_acquireNextImage(AImageReader* reader, /*out*/AImage
 * {@link AImage_delete}.
 * </p>
 *
 * Available since API level 24.
 *
 * @param reader The image reader of interest.
 * @param image the acquired {@link AImage} will be filled here if the method call succeeeds.
 *
@@ -290,6 +307,8 @@ typedef struct AImageReader_ImageListener {
 *
 * Calling this method will replace previously registered listeners.
 *
 * Available since API level 24.
 *
 * @param reader The image reader of interest.
 * @param listener The {@link AImageReader_ImageListener} to be registered. Set this to NULL if
 *                 the application no longer needs to listen to new images.
@@ -356,6 +375,9 @@ media_status_t AImageReader_setImageListener(
 *   {@link AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE}, or combined</td>
 * </tr>
 * </table>
 *
 * Available since API level 26.
 *
 * @return <ul>
 *         <li>{@link AMEDIA_OK} if the method call succeeds.</li>
 *         <li>{@link AMEDIA_ERROR_INVALID_PARAMETER} if reader is NULL, or one or more of width,
@@ -377,6 +399,8 @@ media_status_t AImageReader_newWithUsage(
 * additional parameter for the sync fence. All other parameters and the return values are
 * identical to those passed to {@link AImageReader_acquireNextImage}.</p>
 *
 * Available since API level 26.
 *
 * @param acquireFenceFd A sync fence fd defined in {@link sync.h}, which is used to signal when the
 *         buffer is ready to consume. When synchronization fence is not needed, fence will be set
 *         to -1 and the {@link AImage} returned is ready for use immediately. Otherwise, user shall
@@ -397,6 +421,8 @@ media_status_t AImageReader_acquireNextImageAsync(
 * additional parameter for the sync fence. All other parameters and the return values are
 * identical to those passed to {@link AImageReader_acquireLatestImage}.</p>
 *
 * Available since API level 26.
 *
 * @param acquireFenceFd A sync fence fd defined in {@link sync.h}, which is used to signal when the
 *         buffer is ready to consume. When synchronization fence is not needed, fence will be set
 *         to -1 and the {@link AImage} returned is ready for use immediately. Otherwise, user shall
@@ -408,6 +434,7 @@ media_status_t AImageReader_acquireNextImageAsync(
 */
media_status_t AImageReader_acquireLatestImageAsync(
        AImageReader* reader, /*out*/AImage** image, /*out*/int* acquireFenceFd) __INTRODUCED_IN(26);

/**
 * Signature of the callback which is called when {@link AImageReader} is about to remove a buffer.
 *
@@ -451,6 +478,8 @@ typedef struct AImageReader_BufferRemovedListener {
 *
 * <p>Note that calling this method will replace previously registered listeners.</p>
 *
 * Available since API level 26.
 *
 * @param reader The image reader of interest.
 * @param listener the {@link AImageReader_BufferRemovedListener} to be registered. Set this to
 * NULL if application no longer needs to listen to buffer removed events.
+88 −6

File changed.

Preview size limit exceeded, changes collapsed.

+12 −0
Original line number Diff line number Diff line
@@ -49,12 +49,24 @@ typedef uint8_t AMediaUUID[16];

#if __ANDROID_API__ >= 21

/**
 * Available since API level 21.
 */
bool AMediaCrypto_isCryptoSchemeSupported(const AMediaUUID uuid) __INTRODUCED_IN(21);

/**
 * Available since API level 21.
 */
bool AMediaCrypto_requiresSecureDecoderComponent(const char *mime) __INTRODUCED_IN(21);

/**
 * Available since API level 21.
 */
AMediaCrypto* AMediaCrypto_new(const AMediaUUID uuid, const void *initData, size_t initDataSize) __INTRODUCED_IN(21);

/**
 * Available since API level 21.
 */
void AMediaCrypto_delete(AMediaCrypto* crypto) __INTRODUCED_IN(21);

#endif /* __ANDROID_API__ >= 21 */
Loading