DefaultMuxer.Factory


class DefaultMuxer.Factory : Muxer.Factory


A Muxer.Factory for DefaultMuxer.

Summary

Constants

const Long

The default value returned by getMaxDelayBetweenSamplesMs.

Public constructors

Creates an instance with maxDelayBetweenSamplesMs set to DEFAULT_MAX_DELAY_BETWEEN_SAMPLES_MS.

Factory(maxDelayBetweenSamplesMs: Long)

Creates an instance.

Factory(maxDelayBetweenSamplesMs: Long, videoDurationMs: Long)

Creates an instance.

Public functions

Muxer!
create(path: String!)

Returns a new muxer writing to a file.

ImmutableList<String!>!

Returns the supported sample MIME types for the given .

Constants

DEFAULT_MAX_DELAY_BETWEEN_SAMPLES_MS

const val DEFAULT_MAX_DELAY_BETWEEN_SAMPLES_MS = 10000: Long

The default value returned by getMaxDelayBetweenSamplesMs.

Public constructors

Factory

Factory()

Creates an instance with maxDelayBetweenSamplesMs set to DEFAULT_MAX_DELAY_BETWEEN_SAMPLES_MS.

Factory

Factory(maxDelayBetweenSamplesMs: Long)

Creates an instance.

Parameters
maxDelayBetweenSamplesMs: Long

See getMaxDelayBetweenSamplesMs.

Factory

Factory(maxDelayBetweenSamplesMs: Long, videoDurationMs: Long)

Creates an instance.

Parameters
maxDelayBetweenSamplesMs: Long

See getMaxDelayBetweenSamplesMs.

videoDurationMs: Long

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 functions

create

fun create(path: String!): Muxer!

Returns a new muxer writing to a file.

Parameters
path: String!

The path to the output file.

Throws
java.lang.IllegalArgumentException

If the path is invalid.

androidx.media3.transformer.Muxer.MuxerException

If an error occurs opening the output file for writing.

getSupportedSampleMimeTypes

fun getSupportedSampleMimeTypes(@C.TrackType trackType: Int): ImmutableList<String!>!

Returns the supported sample MIME types for the given .