Java android.media MediaFormat fields, constructors, methods, implement or subclass

Example usage for Java android.media MediaFormat fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.media MediaFormat.

The text is from its open source code.

Field

StringKEY_MIME
A key describing the mime type of the MediaFormat.
StringKEY_SAMPLE_RATE
A key describing the sample rate of an audio format.
StringKEY_CHANNEL_COUNT
A key describing the number of channels in an audio format.
StringKEY_WIDTH
A key describing the width of the content in a video format.
StringKEY_HEIGHT
A key describing the height of the content in a video format.
StringKEY_MAX_INPUT_SIZE
A key describing the maximum size in bytes of a buffer of data described by this MediaFormat.
StringKEY_BIT_RATE
A key describing the average bitrate in bits/sec.
StringKEY_COLOR_FORMAT
A key describing the color format of the content in a video format.
StringKEY_FRAME_RATE
A key describing the frame rate of a video format in frames/sec.
StringKEY_I_FRAME_INTERVAL
A key describing the frequency of key frames expressed in seconds between key frames.
StringKEY_REPEAT_PREVIOUS_FRAME_AFTER
Applies only when configuring a video encoder in "surface-input" mode.
StringKEY_DURATION
A key describing the duration (in microseconds) of the content.
StringKEY_IS_ADTS
A key mapping to a value of 1 if the content is AAC audio and audio frames are prefixed with an ADTS header.
StringKEY_CHANNEL_MASK
A key describing the channel composition of audio content.
StringKEY_AAC_PROFILE
A key describing the AAC profile to be used (AAC audio formats only).
StringKEY_AAC_SBR_MODE
A key describing the AAC SBR mode to be used (AAC audio formats only).

Constructor

MediaFormat()
Creates an empty MediaFormat

Method

booleancontainsKey(String name)
Returns true iff a key of the given name exists in the format.
MediaFormatcreateSubtitleFormat(String mime, String language)
Creates a minimal subtitle format.
MediaFormatcreateVideoFormat(String mime, int width, int height)
Creates a minimal video format.
ByteBuffergetByteBuffer(String name)
Returns the value of a ByteBuffer key.
intgetInteger(String name)
Returns the value of an integer key.
longgetLong(String name)
Returns the value of a long key.
StringgetString(String name)
Returns the value of a string key.
voidsetByteBuffer(String name, ByteBuffer bytes)
Sets the value of a ByteBuffer key.
voidsetInteger(String name, int value)
Sets the value of an integer key.
voidsetLong(String name, long value)
Sets the value of a long key.
voidsetString(String name, String value)
Sets the value of a string key.