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

## Class DashManifest

- java.lang.Object
- - com.google.android.exoplayer2.source.dash.manifest.DashManifest

- All Implemented Interfaces:
    `FilterableManifest<DashManifest>`

      public class DashManifest
      extends Object
      implements FilterableManifest<DashManifest>

  Represents a DASH media presentation description (mpd), as defined by ISO/IEC 23009-1:2014 Section 5.3.1.2.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `long` | `availabilityStartTimeMs` | The `availabilityStartTime` value in milliseconds since epoch, or `C.TIME_UNSET` if not present.
    `long` | `durationMs` | The duration of the presentation in milliseconds, or `C.TIME_UNSET` if not applicable.
    `boolean` | `dynamic` | Whether the manifest has value "dynamic" for the `type` attribute.
    `Uri` | `location` | The location of this manifest, or null if not present.
    `long` | `minBufferTimeMs` | The `minBufferTime` value in milliseconds, or `C.TIME_UNSET` if not present.
    `long` | `minUpdatePeriodMs` | The `minimumUpdatePeriod` value in milliseconds, or `C.TIME_UNSET` if not applicable.
    `ProgramInformation` | `programInformation` | The `ProgramInformation`, or null if not present.
    `long` | `publishTimeMs` | The `publishTime` value in milliseconds since epoch, or `C.TIME_UNSET` if not present.
    `ServiceDescriptionElement` | `serviceDescription` | The `ServiceDescriptionElement`, or null if not present.
    `long` | `suggestedPresentationDelayMs` | The `suggestedPresentationDelay` value in milliseconds, or `C.TIME_UNSET` if not present.
    `long` | `timeShiftBufferDepthMs` | The `timeShiftBufferDepth` value in milliseconds, or `C.TIME_UNSET` if not present.
    `UtcTimingElement` | `utcTiming` | The `UtcTimingElement`, or null if not present.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DashManifest​(long availabilityStartTimeMs, long durationMs, long minBufferTimeMs, boolean dynamic, long minUpdatePeriodMs, long timeShiftBufferDepthMs, long suggestedPresentationDelayMs, long publishTimeMs, ProgramInformation programInformation, UtcTimingElement utcTiming, ServiceDescriptionElement serviceDescription, Uri location, List<Period> periods)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `DashManifest` | `copy​(List<StreamKey> streamKeys)` | Returns a copy of the manifest including only the streams specified by the given keys.
    `Period` | `getPeriod​(int index)` |
    `int` | `getPeriodCount()` |
    `long` | `getPeriodDurationMs​(int index)` |
    `long` | `getPeriodDurationUs​(int index)` |

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

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

- - ### Field Detail

    - #### availabilityStartTimeMs

          public final long availabilityStartTimeMs

      The `availabilityStartTime` value in milliseconds since epoch, or `C.TIME_UNSET` if not present.

    - #### durationMs

          public final long durationMs

      The duration of the presentation in milliseconds, or `C.TIME_UNSET` if not applicable.

    - #### minBufferTimeMs

          public final long minBufferTimeMs

      The `minBufferTime` value in milliseconds, or `C.TIME_UNSET` if not present.

    - #### dynamic

          public final boolean dynamic

      Whether the manifest has value "dynamic" for the `type` attribute.

    - #### minUpdatePeriodMs

          public final long minUpdatePeriodMs

      The `minimumUpdatePeriod` value in milliseconds, or `C.TIME_UNSET` if not applicable.

    - #### timeShiftBufferDepthMs

          public final long timeShiftBufferDepthMs

      The `timeShiftBufferDepth` value in milliseconds, or `C.TIME_UNSET` if not present.

    - #### suggestedPresentationDelayMs

          public final long suggestedPresentationDelayMs

      The `suggestedPresentationDelay` value in milliseconds, or `C.TIME_UNSET` if not present.

    - #### publishTimeMs

          public final long publishTimeMs

      The `publishTime` value in milliseconds since epoch, or `C.TIME_UNSET` if not present.

    - #### utcTiming

          @Nullable
          public final UtcTimingElement utcTiming

      The `UtcTimingElement`, or null if not present. Defined in DVB A168:7/2016, Section 4.7.2.

    - #### serviceDescription

          @Nullable
          public final ServiceDescriptionElement serviceDescription

      The `ServiceDescriptionElement`, or null if not present.

    - #### location

          @Nullable
          public final Uri location

      The location of this manifest, or null if not present.

    - #### programInformation

          @Nullable
          public final ProgramInformation programInformation

      The `ProgramInformation`, or null if not present.

  - ### Constructor Detail

    - #### DashManifest

          public DashManifest​(long availabilityStartTimeMs,
                              long durationMs,
                              long minBufferTimeMs,
                              boolean dynamic,
                              long minUpdatePeriodMs,
                              long timeShiftBufferDepthMs,
                              long suggestedPresentationDelayMs,
                              long publishTimeMs,
                              @Nullable
                              ProgramInformation programInformation,
                              @Nullable
                              UtcTimingElement utcTiming,
                              @Nullable
                              ServiceDescriptionElement serviceDescription,
                              @Nullable
                              Uri location,
                              List<Period> periods)

  - ### Method Detail

    - #### getPeriodCount

          public final int getPeriodCount()

    - #### getPeriod

          public final Period getPeriod​(int index)

    - #### getPeriodDurationMs

          public final long getPeriodDurationMs​(int index)

    - #### getPeriodDurationUs

          public final long getPeriodDurationUs​(int index)

    - #### copy

          public final DashManifest copy​(List<StreamKey> streamKeys)

      Description copied from interface: `FilterableManifest`
      Returns a copy of the manifest including only the streams specified by the given keys. If the manifest is unchanged then the instance may return itself.
      Specified by:
        `copy` in interface `FilterableManifest<DashManifest>`
      Parameters:
        `streamKeys` - A non-empty list of stream keys.
      Returns:
        The filtered manifest.