android.media
Class MediaFormat

java.lang.Object
  extended by android.media.MediaFormat

public final class MediaFormat
extends Object


Field Summary
static String KEY_AAC_PROFILE
           
static String KEY_BIT_RATE
           
static String KEY_CHANNEL_COUNT
           
static String KEY_CHANNEL_MASK
           
static String KEY_COLOR_FORMAT
           
static String KEY_DURATION
           
static String KEY_FLAC_COMPRESSION_LEVEL
           
static String KEY_FRAME_RATE
           
static String KEY_HEIGHT
           
static String KEY_I_FRAME_INTERVAL
           
static String KEY_IS_ADTS
           
static String KEY_MAX_INPUT_SIZE
           
static String KEY_MIME
           
static String KEY_SAMPLE_RATE
           
static String KEY_WIDTH
           
 
Constructor Summary
MediaFormat()
           
 
Method Summary
 boolean containsKey(String name)
           
static MediaFormat createAudioFormat(String mime, int sampleRate, int channelCount)
           
static MediaFormat createVideoFormat(String mime, int width, int height)
           
 ByteBuffer getByteBuffer(String name)
           
 float getFloat(String name)
           
 int getInteger(String name)
           
 long getLong(String name)
           
 String getString(String name)
           
 void setByteBuffer(String name, ByteBuffer bytes)
           
 void setFloat(String name, float value)
           
 void setInteger(String name, int value)
           
 void setLong(String name, long value)
           
 void setString(String name, String value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY_MIME

public static final String KEY_MIME
See Also:
Constant Field Values

KEY_SAMPLE_RATE

public static final String KEY_SAMPLE_RATE
See Also:
Constant Field Values

KEY_CHANNEL_COUNT

public static final String KEY_CHANNEL_COUNT
See Also:
Constant Field Values

KEY_WIDTH

public static final String KEY_WIDTH
See Also:
Constant Field Values

KEY_HEIGHT

public static final String KEY_HEIGHT
See Also:
Constant Field Values

KEY_MAX_INPUT_SIZE

public static final String KEY_MAX_INPUT_SIZE
See Also:
Constant Field Values

KEY_BIT_RATE

public static final String KEY_BIT_RATE
See Also:
Constant Field Values

KEY_COLOR_FORMAT

public static final String KEY_COLOR_FORMAT
See Also:
Constant Field Values

KEY_FRAME_RATE

public static final String KEY_FRAME_RATE
See Also:
Constant Field Values

KEY_I_FRAME_INTERVAL

public static final String KEY_I_FRAME_INTERVAL
See Also:
Constant Field Values

KEY_DURATION

public static final String KEY_DURATION
See Also:
Constant Field Values

KEY_IS_ADTS

public static final String KEY_IS_ADTS
See Also:
Constant Field Values

KEY_CHANNEL_MASK

public static final String KEY_CHANNEL_MASK
See Also:
Constant Field Values

KEY_AAC_PROFILE

public static final String KEY_AAC_PROFILE
See Also:
Constant Field Values

KEY_FLAC_COMPRESSION_LEVEL

public static final String KEY_FLAC_COMPRESSION_LEVEL
See Also:
Constant Field Values
Constructor Detail

MediaFormat

public MediaFormat()
Method Detail

containsKey

public final boolean containsKey(String name)

getInteger

public final int getInteger(String name)

getLong

public final long getLong(String name)

getFloat

public final float getFloat(String name)

getString

public final String getString(String name)

getByteBuffer

public final ByteBuffer getByteBuffer(String name)

setInteger

public final void setInteger(String name,
                             int value)

setLong

public final void setLong(String name,
                          long value)

setFloat

public final void setFloat(String name,
                           float value)

setString

public final void setString(String name,
                            String value)

setByteBuffer

public final void setByteBuffer(String name,
                                ByteBuffer bytes)

createAudioFormat

public static final MediaFormat createAudioFormat(String mime,
                                                  int sampleRate,
                                                  int channelCount)

createVideoFormat

public static final MediaFormat createVideoFormat(String mime,
                                                  int width,
                                                  int height)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008-2012. All Rights Reserved.