Package com.google.android.exoplayer2.transformer

## Class DefaultMuxer.Factory

- java.lang.Object
- - com.google.android.exoplayer2.transformer.DefaultMuxer.Factory

- All Implemented Interfaces:
    `Muxer.Factory`
  Enclosing class:
    DefaultMuxer

      public static final class DefaultMuxer.Factory
      extends Object
      implements Muxer.Factory

  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.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Muxer` | `create​(ParcelFileDescriptor parcelFileDescriptor)` | Returns a new muxer writing to a file descriptor.
    `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()`.

  - ### Method Detail

    - #### create

          public Muxer create​(String path)
                       throws Muxer.MuxerException

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

    - #### create

          public Muxer create​(ParcelFileDescriptor parcelFileDescriptor)
                       throws Muxer.MuxerException

      Description copied from interface: `Muxer.Factory`
      Returns a new muxer writing to a file descriptor.
      Specified by:
        `create` in interface `Muxer.Factory`
      Parameters:
        `parcelFileDescriptor` - A readable and writable `ParcelFileDescriptor` of the output. The file referenced by this ParcelFileDescriptor should not be used before the muxer is released. It is the responsibility of the caller to close the ParcelFileDescriptor. This can be done after this method returns.
      Throws:
        `Muxer.MuxerException` - If an error occurs opening the output file descriptor for writing.

    - #### getSupportedSampleMimeTypes

          public ImmutableList<String> 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`