Back to Exoplayer

SegmentDownloader.Segment (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/offline/SegmentDownloader.Segment.html

latest3.0 KB
Original Source

Package com.google.android.exoplayer2.offline

Class SegmentDownloader.Segment


protected static classSegmentDownloader.Segmentextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[Comparable](https://developer.android.com/reference/java/lang/Comparable.html "class or interface in java.lang")<[SegmentDownloader.Segment](SegmentDownloader.Segment.html "class in com.google.android.exoplayer2.offline")>

Smallest unit of content to be downloaded.

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | DataSpec | dataSpec | The DataSpec of the segment. | | long | startTimeUs | The start time of the segment in microseconds. |

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | Segment​(long startTimeUs, DataSpec dataSpec) | Constructs a Segment. |

Method Summary

All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description | | --- | --- | --- | | int | compareTo​(SegmentDownloader.Segment other) | |

- 

Methods inherited from class java.lang.Object

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

Field Detail

- 

startTimeUs

public final long startTimeUs

The start time of the segment in microseconds.

- 

dataSpec

public final[DataSpec](../upstream/DataSpec.html "class in com.google.android.exoplayer2.upstream")dataSpec

The DataSpec of the segment.

Constructor Detail

- 

Segment

public Segment​(long startTimeUs,[DataSpec](../upstream/DataSpec.html "class in com.google.android.exoplayer2.upstream")dataSpec)

Constructs a Segment.

Method Detail

- 

compareTo

public int compareTo​([SegmentDownloader.Segment](SegmentDownloader.Segment.html "class in com.google.android.exoplayer2.offline")other)

Specified by:compareTo in interface Comparable<SegmentDownloader.Segment>