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

Commit 8b370c9c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Document newly updated NDK/Media constants" into udc-dev am: 2bdb535e

parents 16fd945e 2bdb535e
Loading
Loading
Loading
Loading
+30 −3
Original line number Diff line number Diff line
@@ -63,14 +63,41 @@ struct AMediaCodecBufferInfo {
typedef struct AMediaCodecBufferInfo AMediaCodecBufferInfo;
typedef struct AMediaCodecCryptoInfo AMediaCodecCryptoInfo;


/**
 * Definitions of per-buffer flags for operation with NdkMediaCodec.
 *
 * The semantics of these enums match those of the same name
 * in {@link android.media.MediaCodec}.
 */
enum {
    AMEDIACODEC_BUFFER_FLAG_KEY_FRAME = 1,
    /**
     * This indicates that the (encoded) buffer marked as such contains
     * the data for a key frame.
     *
     * Semantics are the same as {@link android.media.MediaCodec#BUFFER_FLAG_KEY_FRAME}
     */
    AMEDIACODEC_BUFFER_FLAG_KEY_FRAME = 1, // introduced in API 34
    AMEDIACODEC_BUFFER_FLAG_CODEC_CONFIG = 2,
    AMEDIACODEC_BUFFER_FLAG_END_OF_STREAM = 4,
    AMEDIACODEC_BUFFER_FLAG_PARTIAL_FRAME = 8,
    AMEDIACODEC_BUFFER_FLAG_MUXER_DATA = 16,
    AMEDIACODEC_BUFFER_FLAG_DECODE_ONLY = 32,
    /**
     * This indicates that the buffer contains non-media data for the
     * muxer to process.
     *
     * Semantics are the same as {@link android.media.MediaCodec#BUFFER_FLAG_MUXER_DATA}
     */
    AMEDIACODEC_BUFFER_FLAG_MUXER_DATA = 16,  // introduced in API 34
    /**
     * This indicates that the buffer is decoded and updates the internal state of the decoder,
     * but does not produce any output buffer.
     *
     * Semantics are the same as {@link android.media.MediaCodec#BUFFER_FLAG_DECODE_ONLY}
     */
    AMEDIACODEC_BUFFER_FLAG_DECODE_ONLY = 32,  // introduced in API 34
};

enum {
    AMEDIACODEC_CONFIGURE_FLAG_ENCODE = 1,
    AMEDIACODEC_INFO_OUTPUT_BUFFERS_CHANGED = -3,
    AMEDIACODEC_INFO_OUTPUT_FORMAT_CHANGED = -2,
+13 −0
Original line number Diff line number Diff line
@@ -135,6 +135,13 @@ extern const char* AMEDIAFORMAT_KEY_AAC_ENCODED_TARGET_LEVEL __INTRODUCED_IN(28)
extern const char* AMEDIAFORMAT_KEY_AAC_MAX_OUTPUT_CHANNEL_COUNT __INTRODUCED_IN(28);
extern const char* AMEDIAFORMAT_KEY_AAC_PROFILE __INTRODUCED_IN(21);
extern const char* AMEDIAFORMAT_KEY_AAC_SBR_MODE __INTRODUCED_IN(28);
/**
 * A key for applications to opt out of allowing
 * a Surface to discard undisplayed/unconsumed frames
 * as means to catch up after falling behind.
 *
 * Semantics match those of {@link android.media.MediaFormat#KEY_ALLOW_FRAME_DROP}
 */
extern const char* AMEDIAFORMAT_KEY_ALLOW_FRAME_DROP __INTRODUCED_IN(34);
extern const char* AMEDIAFORMAT_KEY_AUDIO_SESSION_ID __INTRODUCED_IN(28);
extern const char* AMEDIAFORMAT_KEY_BITRATE_MODE __INTRODUCED_IN(28);
@@ -170,6 +177,12 @@ extern const char* AMEDIAFORMAT_KEY_I_FRAME_INTERVAL __INTRODUCED_IN(21);
extern const char* AMEDIAFORMAT_KEY_LANGUAGE __INTRODUCED_IN(21);
extern const char* AMEDIAFORMAT_KEY_LATENCY __INTRODUCED_IN(28);
extern const char* AMEDIAFORMAT_KEY_LEVEL __INTRODUCED_IN(28);
/**
 * A key describing the maximum number of B frames between I or P frames,
 * to be used by a video encoder.
 *
 * Semantics match those of {@link android.media.MediaFormat#KEY_MAX_B_FRAMES}
 */
extern const char* AMEDIAFORMAT_KEY_MAX_B_FRAMES __INTRODUCED_IN(34);
extern const char* AMEDIAFORMAT_KEY_MAX_HEIGHT __INTRODUCED_IN(21);
extern const char* AMEDIAFORMAT_KEY_MAX_INPUT_SIZE __INTRODUCED_IN(21);
+12 −2
Original line number Diff line number Diff line
@@ -48,12 +48,22 @@ __BEGIN_DECLS
struct AMediaMuxer;
typedef struct AMediaMuxer AMediaMuxer;

/**
 * Defines the output format. These constants are used with constructor.
 *
 * These enums match the ones used in {@link android.media.MediaMuxer.OutputFormat}
 */
typedef enum {
    /** MPEG4 media file format*/
    AMEDIAMUXER_OUTPUT_FORMAT_MPEG_4 = 0,
    /** WEBM media file format*/
    AMEDIAMUXER_OUTPUT_FORMAT_WEBM = 1,
    /** 3GPP media file format*/
    AMEDIAMUXER_OUTPUT_FORMAT_THREE_GPP = 2,
    AMEDIAMUXER_OUTPUT_FORMAT_HEIF = 3,
    AMEDIAMUXER_OUTPUT_FORMAT_OGG = 4,
    /** HEIF media file format*/
    AMEDIAMUXER_OUTPUT_FORMAT_HEIF = 3,  // introduced in API 34
    /** Ogg media file format*/
    AMEDIAMUXER_OUTPUT_FORMAT_OGG = 4,  // introduced in API 34
} OutputFormat;

typedef enum {