public final class MediaFormatUtil
extends java.lang.Object
MediaFormat instances.| Modifier and Type | Method and Description |
|---|---|
static void |
maybeSetByteBuffer(android.media.MediaFormat format,
java.lang.String key,
byte[] value)
Sets a
MediaFormat ByteBuffer value. |
static void |
maybeSetColorInfo(android.media.MediaFormat format,
ColorInfo colorInfo)
Sets a
MediaFormat's color information. |
static void |
maybeSetFloat(android.media.MediaFormat format,
java.lang.String key,
float value)
Sets a
MediaFormat float value. |
static void |
maybeSetInteger(android.media.MediaFormat format,
java.lang.String key,
int value)
Sets a
MediaFormat integer value. |
static void |
setCsdBuffers(android.media.MediaFormat format,
java.util.List<byte[]> csdBuffers)
Sets a
MediaFormat's codec specific data buffers. |
static void |
setString(android.media.MediaFormat format,
java.lang.String key,
java.lang.String value)
Sets a
MediaFormat String value. |
public static void setString(android.media.MediaFormat format,
java.lang.String key,
java.lang.String value)
MediaFormat String value.format - The MediaFormat being configured.key - The key to set.value - The value to set.public static void setCsdBuffers(android.media.MediaFormat format,
java.util.List<byte[]> csdBuffers)
MediaFormat's codec specific data buffers.format - The MediaFormat being configured.csdBuffers - The csd buffers to set.public static void maybeSetInteger(android.media.MediaFormat format,
java.lang.String key,
int value)
format - The MediaFormat being configured.key - The key to set.value - The value to set.public static void maybeSetFloat(android.media.MediaFormat format,
java.lang.String key,
float value)
format - The MediaFormat being configured.key - The key to set.value - The value to set.public static void maybeSetByteBuffer(android.media.MediaFormat format,
java.lang.String key,
@Nullable
byte[] value)
MediaFormat ByteBuffer value. Does nothing if value is null.format - The MediaFormat being configured.key - The key to set.value - The byte[] that will be wrapped to obtain the value.public static void maybeSetColorInfo(android.media.MediaFormat format,
@Nullable
ColorInfo colorInfo)
MediaFormat's color information. Does nothing if colorInfo is null.format - The MediaFormat being configured.colorInfo - The color info to set.