InAppMuxer.Factory


class InAppMuxer.Factory : Muxer.Factory


Muxer.Factory for InAppMuxer.

Summary

Nested types

A builder for Factory instances.

Public functions

InAppMuxer!
create(path: String!)

Returns a new Muxer.

ImmutableList<String!>!

Returns the supported sample MIME types for the given .

InAppMuxer.Factory!

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

Public functions

create

fun create(path: String!): InAppMuxer!

Returns a new Muxer.

Parameters
path: String!

The path to the output file.

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

setVideoDurationUs

@CanIgnoreReturnValue
fun setVideoDurationUs(videoDurationUs: Long): InAppMuxer.Factory!

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 is set to 0.

Parameters
videoDurationUs: Long

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
InAppMuxer.Factory!

This factory.