FrameworkMuxer.Factory


public final class FrameworkMuxer.Factory implements Muxer.Factory


Muxer.Factory for FrameworkMuxer.

Summary

Public constructors

Public methods

FrameworkMuxer
create(String path)

Returns a new Muxer.

ImmutableList<String>

Returns the supported sample MIME types for the given C.TrackType.

FrameworkMuxer.Factory

Sets the duration of the video track (in microseconds) in the output.

Inherited methods

From androidx.media3.muxer.Muxer.Factory
boolean

Whether the muxer supports writing negative timestamps into an edit list to instruct players to ignore these samples.

Public constructors

Factory

public Factory()

Public methods

create

public FrameworkMuxer create(String path)

Returns a new Muxer.

Parameters
String path

The path to the output file.

Throws
androidx.media3.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 C.TrackType.

setVideoDurationUs

@CanIgnoreReturnValue
public FrameworkMuxer.Factory setVideoDurationUs(long videoDurationUs)

Sets the duration of the video track (in microseconds) in the output.

Only the duration of the last sample is adjusted to achieve the given duration. Duration of the other samples remains unchanged.

The default is TIME_UNSET to not set any duration in the output. In this case the video track duration is determined by the samples written to it and the duration of the last sample would be the same as that of the sample before that.

Parameters
long videoDurationUs

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

Returns
FrameworkMuxer.Factory

This factory.