Package androidx.media3.decoder.ffmpeg
Class FfmpegLibrary
java.lang.Object
androidx.media3.decoder.ffmpeg.FfmpegLibrary
Configures and queries the underlying native library.
-
Method Summary
Modifier and TypeMethodDescriptionstatic intReturns the required amount of padding for input buffers in bytes, orC.LENGTH_UNSETif the underlying library is not available.static StringReturns the version of the underlying library if available, or null otherwise.static booleanReturns whether the underlying library is available, loading it if necessary.static voidsetLibraries(String... libraries) Override the names of the FFmpeg native libraries.static booleansupportsFormat(String mimeType) Returns whether the underlying library supports the specified MIME type.
-
Method Details
-
setLibraries
Override the names of the FFmpeg native libraries. If an application wishes to call this method, it must do so before calling any other method defined by this class, and before instantiating aFfmpegAudioRendererorExperimentalFfmpegVideoRendererinstance.- Parameters:
libraries- The names of the FFmpeg native libraries.
-
isAvailable
public static boolean isAvailable()Returns whether the underlying library is available, loading it if necessary. -
getVersion
Returns the version of the underlying library if available, or null otherwise. -
getInputBufferPaddingSize
public static int getInputBufferPaddingSize()Returns the required amount of padding for input buffers in bytes, orC.LENGTH_UNSETif the underlying library is not available. -
supportsFormat
Returns whether the underlying library supports the specified MIME type.- Parameters:
mimeType- The MIME type to check.
-