# SegmentBase.MultiSegmentBase

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

*** ** * ** ***


```
abstract class SegmentBase.MultiSegmentBase : SegmentBase
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.media3.exoplayer.dash.manifest.SegmentBase](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase) ||
|   | ↳ | [androidx.media3.exoplayer.dash.manifest.SegmentBase.MultiSegmentBase](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.MultiSegmentBase) |

Known direct subclasses [SegmentBase.SegmentList](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.SegmentList), [SegmentBase.SegmentTemplate](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.SegmentTemplate)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.SegmentList` | A `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.MultiSegmentBase` that uses a SegmentList to define its segments. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.SegmentTemplate` | A `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.MultiSegmentBase` that uses a SegmentTemplate to define its segments. |

*** ** * ** ***

A `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase` that consists of multiple segments.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.MultiSegmentBase#MultiSegmentBase(androidx.media3.exoplayer.dash.manifest.RangedUri,long,long,long,long,java.util.List<androidx.media3.exoplayer.dash.manifest.SegmentBase.SegmentTimelineElement>,long,long,long)( initialization: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/RangedUri?, timescale: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, presentationTimeOffset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, startNumber: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, duration: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, segmentTimeline: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.SegmentTimelineElement!>?, availabilityTimeOffsetUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, timeShiftBufferDepthUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, periodStartUnixTimeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.MultiSegmentBase#getAvailableSegmentCount(long,long)(periodDurationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, nowUnixTimeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex#getAvailableSegmentCount(long,long)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.MultiSegmentBase#getFirstAvailableSegmentNum(long,long)(periodDurationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, nowUnixTimeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex#getFirstAvailableSegmentNum(long,long)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.MultiSegmentBase#getFirstSegmentNum()()` See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex#getFirstSegmentNum()`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.MultiSegmentBase#getNextSegmentAvailableTimeUs(long,long)( periodDurationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, nowUnixTimeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex#getNextSegmentAvailableTimeUs(long,long)`. |
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.MultiSegmentBase#getSegmentCount(long)(periodDurationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex#getSegmentCount(long)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.MultiSegmentBase#getSegmentDurationUs(long,long)(sequenceNumber: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, periodDurationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex#getDurationUs(long,long)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.MultiSegmentBase#getSegmentNum(long,long)(timeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, periodDurationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex#getSegmentNum(long,long)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.MultiSegmentBase#getSegmentTimeUs(long)(sequenceNumber: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex#getTimeUs(long)`. |
| `abstract https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/RangedUri!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.MultiSegmentBase#getSegmentUrl(androidx.media3.exoplayer.dash.manifest.Representation,long)(representation: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation!, index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Returns a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/RangedUri` defining the location of a segment for the given index in the given representation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.MultiSegmentBase#isExplicit()()` See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex#isExplicit()` |

| ### Inherited functions |
|---|
| From [androidx.media3.exoplayer.dash.manifest.SegmentBase](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase) |---|---| | `abstract https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase#copyWithPresentationTimeOffset(long)(newPresentationTimeOffset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Returns a copy of this `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase` with its presentation time offset replaced by ` newPresentationTimeOffset`. | | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/RangedUri?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase#getInitialization(androidx.media3.exoplayer.dash.manifest.Representation)( @https://checkerframework.org/api/org/checkerframework/checker/initialization/qual/UnderInitialization.html(value = https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation) representation: @https://checkerframework.org/api/org/checkerframework/checker/initialization/qual/UnderInitialization.html(value = https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation) https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation! )` Returns the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/RangedUri` defining the location of initialization data for a given representation, or null if no initialization data exists. | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase#getPresentationTimeOffsetUs()()` Returns the presentation time offset, in microseconds. | |

## Public constructors

### MultiSegmentBase

```
MultiSegmentBase(
    initialization: RangedUri?,
    timescale: Long,
    presentationTimeOffset: Long,
    startNumber: Long,
    duration: Long,
    segmentTimeline: (Mutable)List<SegmentBase.SegmentTimelineElement!>?,
    availabilityTimeOffsetUs: Long,
    timeShiftBufferDepthUs: Long,
    periodStartUnixTimeUs: Long
)
```

| Parameters |
|---|---|
| `initialization: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/RangedUri?` | A `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/RangedUri` corresponding to initialization data, if such data exists. |
| `timescale: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The timescale in units per second. |
| `presentationTimeOffset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The presentation time offset. The value in seconds is the division of this value and `timescale`. |
| `startNumber: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The sequence number of the first segment. |
| `duration: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | 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. |
| `segmentTimeline: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.SegmentTimelineElement!>?` | A segment timeline corresponding to the segments. If null, then segments are assumed to be of fixed duration as specified by the `duration` parameter. |
| `availabilityTimeOffsetUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The offset to the current realtime at which segments become available in microseconds, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if not applicable. |
| `timeShiftBufferDepthUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The time shift buffer depth in microseconds. |
| `periodStartUnixTimeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The start of the enclosing period in microseconds since the Unix epoch. |

## Public functions

### getAvailableSegmentCount

```
fun getAvailableSegmentCount(periodDurationUs: Long, nowUnixTimeUs: Long): Long
```

See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex#getAvailableSegmentCount(long,long)`.

### getFirstAvailableSegmentNum

```
fun getFirstAvailableSegmentNum(periodDurationUs: Long, nowUnixTimeUs: Long): Long
```

See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex#getFirstAvailableSegmentNum(long,long)`.

### getFirstSegmentNum

```
fun getFirstSegmentNum(): Long
```

See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex#getFirstSegmentNum()`.

### getNextSegmentAvailableTimeUs

```
fun getNextSegmentAvailableTimeUs(
    periodDurationUs: Long,
    nowUnixTimeUs: Long
): Long
```

See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex#getNextSegmentAvailableTimeUs(long,long)`.

### getSegmentCount

```
abstract fun getSegmentCount(periodDurationUs: Long): Long
```

See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex#getSegmentCount(long)`.

### getSegmentDurationUs

```
fun getSegmentDurationUs(sequenceNumber: Long, periodDurationUs: Long): Long
```

See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex#getDurationUs(long,long)`.

### getSegmentNum

```
fun getSegmentNum(timeUs: Long, periodDurationUs: Long): Long
```

See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex#getSegmentNum(long,long)`.

### getSegmentTimeUs

```
fun getSegmentTimeUs(sequenceNumber: Long): Long
```

See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex#getTimeUs(long)`.

### getSegmentUrl

```
abstract fun getSegmentUrl(representation: Representation!, index: Long): RangedUri!
```

Returns a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/RangedUri` defining the location of a segment for the given index in the given representation.

See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex#getSegmentUrl(long)`.

### isExplicit

```
fun isExplicit(): Boolean
```

See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex#isExplicit()`