public enum MediaFormat extends Enum<MediaFormat>
Enum Constant and Description |
---|
M4A |
MP3 |
MPEG_4 |
OGG |
OPUS |
SRT |
TRANSCRIPT1 |
TRANSCRIPT2 |
TRANSCRIPT3 |
TTML |
v3GPP |
VTT |
WEBM |
WEBMA |
WEBMA_OPUS |
Modifier and Type | Field and Description |
---|---|
int |
id |
String |
mimeType |
String |
name |
String |
suffix |
Modifier and Type | Method and Description |
---|---|
static MediaFormat |
getFormatById(int id)
Get the media format by its id.
|
static MediaFormat |
getFromMimeType(String mimeType)
Return the MediaFormat with the supplied mime type
|
static MediaFormat |
getFromSuffix(String suffix) |
static String |
getMimeById(int id)
Return the MIME type of the media format with the supplied id
|
String |
getMimeType()
Get the mime type
|
String |
getName()
Get the name of the format
|
static String |
getNameById(int id)
Return the friendly name of the media format with the supplied id
|
String |
getSuffix()
Get the filename extension
|
static String |
getSuffixById(int id)
Return the file extension of the media format with the supplied id
|
static MediaFormat |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MediaFormat[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MediaFormat MPEG_4
public static final MediaFormat v3GPP
public static final MediaFormat WEBM
public static final MediaFormat M4A
public static final MediaFormat WEBMA
public static final MediaFormat MP3
public static final MediaFormat OPUS
public static final MediaFormat OGG
public static final MediaFormat WEBMA_OPUS
public static final MediaFormat VTT
public static final MediaFormat TTML
public static final MediaFormat TRANSCRIPT1
public static final MediaFormat TRANSCRIPT2
public static final MediaFormat TRANSCRIPT3
public static final MediaFormat SRT
public final int id
public final String name
public final String suffix
public final String mimeType
public static MediaFormat[] values()
for (MediaFormat c : MediaFormat.values()) System.out.println(c);
public static MediaFormat valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static String getNameById(int id)
id
- the id of the media format. Currently an arbitrary, NewPipe-specific number.public static String getSuffixById(int id)
id
- the id of the media format. Currently an arbitrary, NewPipe-specific number.public static String getMimeById(int id)
id
- the id of the media format. Currently an arbitrary, NewPipe-specific number.public static MediaFormat getFromMimeType(String mimeType)
public static MediaFormat getFormatById(int id)
id
- the idpublic static MediaFormat getFromSuffix(String suffix)
public String getName()
public String getSuffix()
public String getMimeType()