Package com.google.android.exoplayer2.source.dash

## Class DefaultDashChunkSource.Factory

- java.lang.Object
- - com.google.android.exoplayer2.source.dash.DefaultDashChunkSource.Factory

- All Implemented Interfaces:
    `DashChunkSource.Factory`
  Enclosing class:
    DefaultDashChunkSource

      public static final class DefaultDashChunkSource.Factory
      extends Object
      implements DashChunkSource.Factory

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Factory​(ChunkExtractor.Factory chunkExtractorFactory, DataSource.Factory dataSourceFactory, int maxSegmentsPerLoad)` | Creates a new instance.
    `Factory​(DataSource.Factory dataSourceFactory)` | Equivalent to `new Factory(BundledChunkExtractor.FACTORY, dataSourceFactory, maxSegmentsPerLoad = 1)`.
    `Factory​(DataSource.Factory dataSourceFactory, int maxSegmentsPerLoad)` | Equivalent to `new Factory(BundledChunkExtractor.FACTORY, dataSourceFactory, maxSegmentsPerLoad)`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `DashChunkSource` | `createDashChunkSource​(LoaderErrorThrower manifestLoaderErrorThrower, DashManifest manifest, BaseUrlExclusionList baseUrlExclusionList, int periodIndex, int[] adaptationSetIndices, ExoTrackSelection trackSelection, int trackType, long elapsedRealtimeOffsetMs, boolean enableEventMessageTrack, List<Format> closedCaptionFormats, PlayerEmsgHandler.PlayerTrackEmsgHandler playerEmsgHandler, TransferListener transferListener)` |

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### Factory

          public Factory​(DataSource.Factory dataSourceFactory)

      Equivalent to `new Factory(BundledChunkExtractor.FACTORY, dataSourceFactory, maxSegmentsPerLoad = 1)`.

    - #### Factory

          public Factory​(DataSource.Factory dataSourceFactory,
                         int maxSegmentsPerLoad)

      Equivalent to `new Factory(BundledChunkExtractor.FACTORY, dataSourceFactory, maxSegmentsPerLoad)`.

    - #### Factory

          public Factory​(ChunkExtractor.Factory chunkExtractorFactory,
                         DataSource.Factory dataSourceFactory,
                         int maxSegmentsPerLoad)

      Creates a new instance.
      Parameters:
        `chunkExtractorFactory` - Creates `ChunkExtractor` instances to use for extracting chunks.
        `dataSourceFactory` - Creates the `DataSource` to use for downloading chunks.
        `maxSegmentsPerLoad` - See `DefaultDashChunkSource(com.google.android.exoplayer2.source.chunk.ChunkExtractor.Factory, com.google.android.exoplayer2.upstream.LoaderErrorThrower, com.google.android.exoplayer2.source.dash.manifest.DashManifest, com.google.android.exoplayer2.source.dash.BaseUrlExclusionList, int, int[], com.google.android.exoplayer2.trackselection.ExoTrackSelection, int, com.google.android.exoplayer2.upstream.DataSource, long, int, boolean, java.util.List<com.google.android.exoplayer2.Format>, com.google.android.exoplayer2.source.dash.PlayerEmsgHandler.PlayerTrackEmsgHandler)`.

  - ### Method Detail

    - #### createDashChunkSource

          public DashChunkSource createDashChunkSource​(LoaderErrorThrower manifestLoaderErrorThrower,
                                                       DashManifest manifest,
                                                       BaseUrlExclusionList baseUrlExclusionList,
                                                       int periodIndex,
                                                       int[] adaptationSetIndices,
                                                       ExoTrackSelection trackSelection,
                                                       int trackType,
                                                       long elapsedRealtimeOffsetMs,
                                                       boolean enableEventMessageTrack,
                                                       List<Format> closedCaptionFormats,
                                                       @Nullable
                                                       PlayerEmsgHandler.PlayerTrackEmsgHandler playerEmsgHandler,
                                                       @Nullable
                                                       TransferListener transferListener)

      Specified by:
        `createDashChunkSource` in interface `DashChunkSource.Factory`
      Parameters:
        `manifestLoaderErrorThrower` - Throws errors affecting loading of manifests.
        `manifest` - The initial manifest.
        `baseUrlExclusionList` - The base URL exclusion list.
        `periodIndex` - The index of the corresponding period in the manifest.
        `adaptationSetIndices` - The indices of the corresponding adaptation sets in the period.
        `trackSelection` - The track selection.
        `elapsedRealtimeOffsetMs` - If known, an estimate of the instantaneous difference between server-side unix time and `SystemClock.elapsedRealtime()` in milliseconds, specified as the server's unix time minus the local elapsed time. Or `C.TIME_UNSET` if unknown.
        `enableEventMessageTrack` - Whether to output an event message track.
        `closedCaptionFormats` - The `Formats` of closed caption tracks to be output.
        `transferListener` - The transfer listener which should be informed of any data transfers. May be null if no listener is available.
      Returns:
        The created `DashChunkSource`.