# 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)

*** ** * ** ***


```
public class SegmentBase.SingleSegmentBase extends SegmentBase
```

<br />

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

*** ** * ** ***

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

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/SegmentBase.SingleSegmentBase#SingleSegmentBase()()` |
| `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/SegmentBase.SingleSegmentBase#SingleSegmentBase(androidx.media3.exoplayer.dash.manifest.RangedUri,long,long,long,long)( @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/RangedUri initialization, long timescale, long presentationTimeOffset, long indexStart, long indexLength )` |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/SegmentBase.SingleSegmentBase` | `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/SegmentBase.SingleSegmentBase#copyWithPresentationTimeOffset(long)(long newPresentationTimeOffset)` Returns a copy of this `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/SegmentBase` with its presentation time offset replaced by ` newPresentationTimeOffset`. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/RangedUri` | `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/SegmentBase.SingleSegmentBase#getIndex()()` |

| ### Inherited methods |
|---|
| From [androidx.media3.exoplayer.dash.manifest.SegmentBase](https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/SegmentBase) |---|---| | `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/RangedUri` | `https://developer.android.com/reference/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/androidx/media3/exoplayer/dash/manifest/Representation) @https://checkerframework.org/api/org/checkerframework/checker/initialization/qual/UnderInitialization.html(value = https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Representation) https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Representation representation )` Returns the `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/RangedUri` defining the location of initialization data for a given representation, or null if no initialization data exists. | | `long` | `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/SegmentBase#getPresentationTimeOffsetUs()()` Returns the presentation time offset, in microseconds. | |

## Public constructors

### SingleSegmentBase

```
public SingleSegmentBase()
```

### SingleSegmentBase

```
public SingleSegmentBase(
    @Nullable RangedUri initialization,
    long timescale,
    long presentationTimeOffset,
    long indexStart,
    long indexLength
)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/RangedUri initialization` | A `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/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 indexStart` | The byte offset of the index data in the segment. |
| `long indexLength` | The length of the index data in bytes. |

## Public methods

### copyWithPresentationTimeOffset

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

Returns a copy of this `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/SegmentBase` with its presentation time offset replaced by `
newPresentationTimeOffset`.

### getIndex

```
public @Nullable RangedUri getIndex()
```