Back to Exoplayer

DefaultMuxer.Factory (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/transformer/DefaultMuxer.Factory.html

latest5.2 KB
Original Source

Package com.google.android.exoplayer2.transformer

Class DefaultMuxer.Factory

  • java.lang.Object

    • com.google.android.exoplayer2.transformer.DefaultMuxer.Factory
  • All Implemented Interfaces:Muxer.FactoryEnclosing class:DefaultMuxer


public static final classDefaultMuxer.Factoryextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[Muxer.Factory](Muxer.Factory.html "interface in com.google.android.exoplayer2.transformer")

A Muxer.Factory for DefaultMuxer.

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | static long | DEFAULT_MAX_DELAY_BETWEEN_SAMPLES_MS | The default value returned by Muxer.getMaxDelayBetweenSamplesMs(). |

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | Factory() | Creates an instance with maxDelayBetweenSamplesMs set to DEFAULT_MAX_DELAY_BETWEEN_SAMPLES_MS. | | Factory​(long maxDelayBetweenSamplesMs) | Creates an instance. | | Factory​(long maxDelayBetweenSamplesMs, long videoDurationMs) | Creates an instance. |

Method Summary

All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description | | --- | --- | --- | | Muxer | create​(String path) | Returns a new muxer writing to a file. | | ImmutableList<String> | getSupportedSampleMimeTypes​(@com.google.android.exoplayer2.C.TrackType int trackType) | Returns the supported sample MIME types for the given C.TrackType. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

- 

DEFAULT_MAX_DELAY_BETWEEN_SAMPLES_MS

public static final long DEFAULT_MAX_DELAY_BETWEEN_SAMPLES_MS

The default value returned by Muxer.getMaxDelayBetweenSamplesMs(). See Also:Constant Field Values

Constructor Detail

- 

Factory

public Factory()

Creates an instance with maxDelayBetweenSamplesMs set to DEFAULT_MAX_DELAY_BETWEEN_SAMPLES_MS.

- 

Factory

public Factory​(long maxDelayBetweenSamplesMs)

Creates an instance. Parameters:maxDelayBetweenSamplesMs - See Muxer.getMaxDelayBetweenSamplesMs().

- 

Factory

public Factory​(long maxDelayBetweenSamplesMs,
               long videoDurationMs)

Creates an instance. Parameters:maxDelayBetweenSamplesMs - See Muxer.getMaxDelayBetweenSamplesMs().videoDurationMs - The duration of the video track (in milliseconds) to enforce in the output, or C.TIME_UNSET to not enforce. Only applicable when a video track is added.

Method Detail

- 

create

public[Muxer](Muxer.html "interface in com.google.android.exoplayer2.transformer")create​([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")path)
             throws[Muxer.MuxerException](Muxer.MuxerException.html "class in com.google.android.exoplayer2.transformer")

Description copied from interface: Muxer.Factory

Returns a new muxer writing to a file. Specified by:create in interface Muxer.FactoryParameters:path - The path to the output file.Throws:Muxer.MuxerException - If an error occurs opening the output file for writing.

- 

getSupportedSampleMimeTypes

public[ImmutableList](https://guava.dev/releases/31.1-android/api/docs/com/google/common/collect/ImmutableList.html?is-external=true "class or interface in com.google.common.collect")<[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")> getSupportedSampleMimeTypes​(@com.google.android.exoplayer2.C.TrackType int trackType)

Description copied from interface: Muxer.Factory

Returns the supported sample MIME types for the given C.TrackType. Specified by:getSupportedSampleMimeTypes in interface Muxer.Factory