# SegmentBase.SingleSegmentBase

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.SingleSegmentBase)

*** ** * ** ***


```
class SegmentBase.SingleSegmentBase : 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.SingleSegmentBase](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.SingleSegmentBase) |

*** ** * ** ***

A `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase` that defines a single segment.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.SingleSegmentBase#SingleSegmentBase()()` |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.SingleSegmentBase#SingleSegmentBase(androidx.media3.exoplayer.dash.manifest.RangedUri,long,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, indexStart: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, indexLength: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.SingleSegmentBase!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.SingleSegmentBase#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.SingleSegmentBase#getIndex()()` |

| ### Inherited functions |
|---|
| From [androidx.media3.exoplayer.dash.manifest.SegmentBase](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase) |---|---| | `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

### SingleSegmentBase

```
SingleSegmentBase()
```

### SingleSegmentBase

```
SingleSegmentBase(
    initialization: RangedUri?,
    timescale: Long,
    presentationTimeOffset: Long,
    indexStart: Long,
    indexLength: 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`. |
| `indexStart: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The byte offset of the index data in the segment. |
| `indexLength: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The length of the index data in bytes. |

## Public functions

### copyWithPresentationTimeOffset

```
fun copyWithPresentationTimeOffset(newPresentationTimeOffset: Long): SegmentBase.SingleSegmentBase!
```

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`.

### getIndex

```
fun getIndex(): RangedUri?
```