DefaultMuxer.Factory


public final class DefaultMuxer.Factory implements Muxer.Factory


A Muxer.Factory for DefaultMuxer.

Summary

Public constructors

Creates an instance with videoDurationMs set to TIME_UNSET.

Factory(long videoDurationMs)

Creates an instance.

Public methods

Muxer
create(String path)

Returns a new Muxer.

ImmutableList<String>

Returns the supported sample MIME types for the given .

Public constructors

Factory

public Factory()

Creates an instance with videoDurationMs set to TIME_UNSET.

Factory

public Factory(long videoDurationMs)

Creates an instance.

Parameters
long videoDurationMs

The duration of the video track (in milliseconds) to enforce in the output, or TIME_UNSET to not enforce. Only applicable when a video track is added.

Public methods

create

public Muxer create(String path)

Returns a new Muxer.

Parameters
String path

The path to the output file.

Throws
androidx.media3.muxer.Muxer.MuxerException

If an error occurs opening the output file for writing.

getSupportedSampleMimeTypes

public ImmutableList<StringgetSupportedSampleMimeTypes(@C.TrackType int trackType)

Returns the supported sample MIME types for the given .