fm.liveswitch.android.MediaCodecUtility Class Reference

Static Public Member Functions

static void logAvailableCodecs ()
 
static MediaCodecInfo[] getEncoderInfos (String mimeType)
 
static MediaCodecInfo[] getEncoderInfos (String mimeType, int colorFormat)
 
static MediaCodecInfo[] getEncoderInfos (String mimeType, int colorFormat, boolean hardwareAcceleratedOnly)
 
static MediaCodecInfo[] getDecoderInfos (String mimeType)
 
static MediaCodecInfo[] getDecoderInfos (String mimeType, int colorFormat)
 
static MediaCodecInfo[] getDecoderInfos (String mimeType, int colorFormat, boolean hardwareAcceleratedOnly)
 
static boolean hasMimeType (MediaCodecInfo codecInfo, String mimeType)
 
static boolean isHardwareAccelerated (MediaCodecInfo codecInfo)
 
static boolean hasColorFormat (MediaCodecInfo codecInfo, String mimeType, int colorFormat)
 
static boolean isAudio (String mimeType)
 Whether the top-level type of. More...
 
static boolean isVideo (String mimeType)
 Whether the top-level type of. More...
 
static String getFormatName (String mimeType)
 Gets the output MediaFormat that will result from processing input in. More...
 
static String getMimeType (AudioFormat audioFormat)
 Gets the mime type of the audio format. More...
 
static String getMimeType (VideoFormat videoFormat)
 Gets the mime type of the video format. More...
 
static int getColorFormat (VideoFormat format)
 

Member Function Documentation

◆ getColorFormat()

static int fm.liveswitch.android.MediaCodecUtility.getColorFormat ( VideoFormat  format)
static

◆ getDecoderInfos() [1/3]

static MediaCodecInfo [] fm.liveswitch.android.MediaCodecUtility.getDecoderInfos ( String  mimeType)
static

◆ getDecoderInfos() [2/3]

static MediaCodecInfo [] fm.liveswitch.android.MediaCodecUtility.getDecoderInfos ( String  mimeType,
int  colorFormat 
)
static

◆ getDecoderInfos() [3/3]

static MediaCodecInfo [] fm.liveswitch.android.MediaCodecUtility.getDecoderInfos ( String  mimeType,
int  colorFormat,
boolean  hardwareAcceleratedOnly 
)
static

◆ getEncoderInfos() [1/3]

static MediaCodecInfo [] fm.liveswitch.android.MediaCodecUtility.getEncoderInfos ( String  mimeType)
static

◆ getEncoderInfos() [2/3]

static MediaCodecInfo [] fm.liveswitch.android.MediaCodecUtility.getEncoderInfos ( String  mimeType,
int  colorFormat 
)
static

◆ getEncoderInfos() [3/3]

static MediaCodecInfo [] fm.liveswitch.android.MediaCodecUtility.getEncoderInfos ( String  mimeType,
int  colorFormat,
boolean  hardwareAcceleratedOnly 
)
static

◆ getFormatName()

static String fm.liveswitch.android.MediaCodecUtility.getFormatName ( String  mimeType)
static

Gets the output MediaFormat that will result from processing input in.

mimeType

.

Parameters
mimeTypeThe MIME type of media that will be decoded or encoded.
Returns
The corresponding MediaFormat encoding.

◆ getMimeType() [1/2]

static String fm.liveswitch.android.MediaCodecUtility.getMimeType ( AudioFormat  audioFormat)
static

Gets the mime type of the audio format.

Parameters
audioFormat
Returns

◆ getMimeType() [2/2]

static String fm.liveswitch.android.MediaCodecUtility.getMimeType ( VideoFormat  videoFormat)
static

Gets the mime type of the video format.

Parameters
videoFormat
Returns

◆ hasColorFormat()

static boolean fm.liveswitch.android.MediaCodecUtility.hasColorFormat ( MediaCodecInfo  codecInfo,
String  mimeType,
int  colorFormat 
)
static

◆ hasMimeType()

static boolean fm.liveswitch.android.MediaCodecUtility.hasMimeType ( MediaCodecInfo  codecInfo,
String  mimeType 
)
static

◆ isAudio()

static boolean fm.liveswitch.android.MediaCodecUtility.isAudio ( String  mimeType)
static

Whether the top-level type of.

mimeType

is audio.

Parameters
mimeTypeThe mimeType to test.
Returns
Whether the top level type is audio.

◆ isHardwareAccelerated()

static boolean fm.liveswitch.android.MediaCodecUtility.isHardwareAccelerated ( MediaCodecInfo  codecInfo)
static

◆ isVideo()

static boolean fm.liveswitch.android.MediaCodecUtility.isVideo ( String  mimeType)
static

Whether the top-level type of.

mimeType

is video.

Parameters
mimeTypeThe mimeType to test.
Returns
Whether the top level type is video.

◆ logAvailableCodecs()

static void fm.liveswitch.android.MediaCodecUtility.logAvailableCodecs ( )
static