> Documentation index: https://developer.android.com/reference/llms.txt

# SegmentBase.SegmentList

Artifact: [androidx.media3:media3-exoplayer-dash](https://developer.android.com/jetpack/androidx/releases/media3.md.txt) [View Source](https://cs.android.com/search?q=file:androidx/media3/exoplayer/dash/manifest/SegmentBase.java+class:androidx.media3.exoplayer.dash.manifest.SegmentBase.SegmentList)

*** ** * ** ***


```
public final class SegmentBase.SegmentList extends SegmentBase.MultiSegmentBase
```

<br />

|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.md.txt) ||||
| ↳ | [androidx.media3.exoplayer.dash.manifest.SegmentBase](https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/SegmentBase.md.txt) |||
|   | ↳ | [androidx.media3.exoplayer.dash.manifest.SegmentBase.MultiSegmentBase](https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/SegmentBase.MultiSegmentBase.md.txt) ||
|   |   | ↳ | [androidx.media3.exoplayer.dash.manifest.SegmentBase.SegmentList](https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/SegmentBase.SegmentList.md.txt) |

*** ** * ** ***

A `MultiSegmentBase` that uses a SegmentList to define its segments.

## Summary

| ### Public constructors |
|---|
| `SegmentList( @Nullable RangedUri initialization, long timescale, long presentationTimeOffset, long startNumber, long duration, @Nullable List<SegmentBase.SegmentTimelineElement> segmentTimeline, long availabilityTimeOffsetUs, @Nullable List<RangedUri> mediaSegments, long timeShiftBufferDepthUs, long periodStartUnixTimeUs )` |

| ### Public methods |
|---|---|
| `SegmentBase.SegmentList` | `copyWithPresentationTimeOffset(long newPresentationTimeOffset)` Returns a copy of this `SegmentBase` with its presentation time offset replaced by ` newPresentationTimeOffset`. |
| `long` | `getSegmentCount(long periodDurationUs)` See `getSegmentCount`. |
| `RangedUri` | `getSegmentUrl(Representation representation, long sequenceNumber)` Returns a `RangedUri` defining the location of a segment for the given index in the given representation. |
| `boolean` | `isExplicit()` See `isExplicit` |

### Inherited methods

From [androidx.media3.exoplayer.dash.manifest.SegmentBase](https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/SegmentBase.md.txt) `@Nullable RangedUri` `getInitialization(
@UnderInitialization(value = Representation) @UnderInitialization(value = Representation) Representation representation
)`

Returns the `RangedUri` defining the location of initialization data for a given representation, or null if no initialization data exists.
`long` `getPresentationTimeOffsetUs()`

Returns the presentation time offset, in microseconds.
From [androidx.media3.exoplayer.dash.manifest.SegmentBase.MultiSegmentBase](https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/SegmentBase.MultiSegmentBase.md.txt) `long` `getAvailableSegmentCount(long periodDurationUs, long nowUnixTimeUs)`

See `getAvailableSegmentCount`.
`long` `getFirstAvailableSegmentNum(long periodDurationUs, long nowUnixTimeUs)`

See `getFirstAvailableSegmentNum`.
`long` `getFirstSegmentNum()`

See `getFirstSegmentNum`.
`long` `getNextSegmentAvailableTimeUs(
long periodDurationUs,
long nowUnixTimeUs
)`

See `getNextSegmentAvailableTimeUs`.
`final long` `getSegmentDurationUs(long sequenceNumber, long periodDurationUs)`

See `getDurationUs`.
`long` `getSegmentNum(long timeUs, long periodDurationUs)`

See `getSegmentNum`.
`final long` `getSegmentTimeUs(long sequenceNumber)`

See `getTimeUs`.

## Public constructors

### SegmentList

```
public SegmentList(
    @Nullable RangedUri initialization,
    long timescale,
    long presentationTimeOffset,
    long startNumber,
    long duration,
    @Nullable List<SegmentBase.SegmentTimelineElement> segmentTimeline,
    long availabilityTimeOffsetUs,
    @Nullable List<RangedUri> mediaSegments,
    long timeShiftBufferDepthUs,
    long periodStartUnixTimeUs
)
```

| Parameters |
|---|---|
| `@Nullable RangedUri initialization` | A `RangedUri` corresponding to initialization data, if such data exists. |
| `long timescale` | The timescale in units per second. |
| `long presentationTimeOffset` | The presentation time offset. The value in seconds is the division of this value and `timescale`. |
| `long startNumber` | The sequence number of the first segment. |
| `long duration` | The duration of each segment in the case of fixed duration segments. The value in seconds is the division of this value and `timescale`. If ` segmentTimeline` is non-null then this parameter is ignored. |
| `@Nullable List<SegmentBase.SegmentTimelineElement> segmentTimeline` | A segment timeline corresponding to the segments. If null, then segments are assumed to be of fixed duration as specified by the `duration` parameter. |
| `long availabilityTimeOffsetUs` | The offset to the current realtime at which segments become available in microseconds, or `TIME_UNSET` if not applicable. |
| `@Nullable List<RangedUri> mediaSegments` | A list of `RangedUri`s indicating the locations of the segments. |
| `long timeShiftBufferDepthUs` | The time shift buffer depth in microseconds. |
| `long periodStartUnixTimeUs` | The start of the enclosing period in microseconds since the Unix epoch. |

## Public methods

### copyWithPresentationTimeOffset

```
public SegmentBase.SegmentList copyWithPresentationTimeOffset(long newPresentationTimeOffset)
```

Returns a copy of this `SegmentBase` with its presentation time offset replaced by `
newPresentationTimeOffset`.

### getSegmentCount

```
public long getSegmentCount(long periodDurationUs)
```

See `getSegmentCount`.

### getSegmentUrl

```
public RangedUri getSegmentUrl(Representation representation, long sequenceNumber)
```

Returns a `RangedUri` defining the location of a segment for the given index in the given representation.

See `getSegmentUrl`.

### isExplicit

```
public boolean isExplicit()
```

See `isExplicit`