VorbisUtil
@UnstableApi
public final class VorbisUtil
Utility methods for parsing Vorbis streams.
Summary
Public methods |
|
|---|---|
static @Nullable ImmutableIntArray |
getVorbisToAndroidChannelLayoutMapping(int channelCount)Returns the mapping from VORBIS channel layout to the channel layout expected by Android, or null if the mapping is unchanged. |
static @Nullable Metadata |
parseVorbisComments(List<String> vorbisComments)Builds a |
static ImmutableList<byte[]> |
parseVorbisCsdFromEsdsInitializationData(byte[] initializationData)Returns codec-specific data for configuring a media codec for decoding Vorbis. |
Public methods
getVorbisToAndroidChannelLayoutMapping
public static @Nullable ImmutableIntArray getVorbisToAndroidChannelLayoutMapping(int channelCount)
Returns the mapping from VORBIS channel layout to the channel layout expected by Android, or null if the mapping is unchanged.
See https://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-810004.3.9 and https://developer.android.com/reference/android/media/AudioFormat#channelMask.
parseVorbisComments
public static @Nullable Metadata parseVorbisComments(List<String> vorbisComments)
Builds a Metadata instance from a list of Vorbis Comments.
METADATA_BLOCK_PICTURE comments will be transformed into PictureFrame entries. All others will be transformed into VorbisComment entries.
parseVorbisCsdFromEsdsInitializationData
public static ImmutableList<byte[]> parseVorbisCsdFromEsdsInitializationData(byte[] initializationData)
Returns codec-specific data for configuring a media codec for decoding Vorbis.
| Parameters | |
|---|---|
byte[] initializationData |
The initialization data from the ESDS box. |
| Returns | |
|---|---|
ImmutableList<byte[]> |
Codec-specific data for configuring a media codec for decoding Vorbis. |