Package com.google.android.exoplayer2.upstream

## Class PriorityDataSourceFactory

- java.lang.Object
- - com.google.android.exoplayer2.upstream.PriorityDataSourceFactory

- All Implemented Interfaces:
    `DataSource.Factory`

      public final class PriorityDataSourceFactory
      extends Object
      implements DataSource.Factory

  A `DataSource.Factory` that produces `PriorityDataSource` instances.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `PriorityDataSourceFactory​(DataSource.Factory upstreamFactory, PriorityTaskManager priorityTaskManager, int priority)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `PriorityDataSource` | `createDataSource()` | Creates a `DataSource` instance.

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

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

- - ### Constructor Detail

    - #### PriorityDataSourceFactory

          public PriorityDataSourceFactory​(DataSource.Factory upstreamFactory,
                                           PriorityTaskManager priorityTaskManager,
                                           int priority)

      Parameters:
        `upstreamFactory` - A `DataSource.Factory` to be used to create an upstream `DataSource` for `PriorityDataSource`.
        `priorityTaskManager` - The priority manager to which PriorityDataSource task is registered.
        `priority` - The priority of PriorityDataSource task.

  - ### Method Detail

    - #### createDataSource

          public PriorityDataSource createDataSource()

      Description copied from interface: `DataSource.Factory`
      Creates a `DataSource` instance.
      Specified by:
        `createDataSource` in interface `DataSource.Factory`