Class HlsMediaPlaylist.Segment
- java.lang.Object
-
- com.google.android.exoplayer2.source.hls.playlist.HlsMediaPlaylist.SegmentBase
-
- com.google.android.exoplayer2.source.hls.playlist.HlsMediaPlaylist.Segment
-
- All Implemented Interfaces:
Comparable<Long>
- Enclosing class:
- HlsMediaPlaylist
public static final class HlsMediaPlaylist.Segment extends HlsMediaPlaylist.SegmentBase
Media segment reference.
-
-
Field Summary
Fields Modifier and Type Field Description List<HlsMediaPlaylist.Part>
parts
The parts belonging to this segment.String
title
The human readable title of the segment.-
Fields inherited from class com.google.android.exoplayer2.source.hls.playlist.HlsMediaPlaylist.SegmentBase
byteRangeLength, byteRangeOffset, drmInitData, durationUs, encryptionIV, fullSegmentEncryptionKeyUri, hasGapTag, initializationSegment, relativeDiscontinuitySequence, relativeStartTimeUs, url
-
-
Constructor Summary
Constructors Constructor Description Segment(String uri, long byteRangeOffset, long byteRangeLength, String fullSegmentEncryptionKeyUri, String encryptionIV)
Creates an instance to be used as init segment.Segment(String url, HlsMediaPlaylist.Segment initializationSegment, String title, long durationUs, int relativeDiscontinuitySequence, long relativeStartTimeUs, DrmInitData drmInitData, String fullSegmentEncryptionKeyUri, String encryptionIV, long byteRangeOffset, long byteRangeLength, boolean hasGapTag, List<HlsMediaPlaylist.Part> parts)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HlsMediaPlaylist.Segment
copyWith(long relativeStartTimeUs, int relativeDiscontinuitySequence)
-
Methods inherited from class com.google.android.exoplayer2.source.hls.playlist.HlsMediaPlaylist.SegmentBase
compareTo
-
-
-
-
Field Detail
-
title
public final String title
The human readable title of the segment.
-
parts
public final List<HlsMediaPlaylist.Part> parts
The parts belonging to this segment.
-
-
Constructor Detail
-
Segment
public Segment(String uri, long byteRangeOffset, long byteRangeLength, @Nullable String fullSegmentEncryptionKeyUri, @Nullable String encryptionIV)
Creates an instance to be used as init segment.- Parameters:
uri
- SeeHlsMediaPlaylist.SegmentBase.url
.byteRangeOffset
- SeeHlsMediaPlaylist.SegmentBase.byteRangeOffset
.byteRangeLength
- SeeHlsMediaPlaylist.SegmentBase.byteRangeLength
.fullSegmentEncryptionKeyUri
- SeeHlsMediaPlaylist.SegmentBase.fullSegmentEncryptionKeyUri
.encryptionIV
- SeeHlsMediaPlaylist.SegmentBase.encryptionIV
.
-
Segment
public Segment(String url, @Nullable HlsMediaPlaylist.Segment initializationSegment, String title, long durationUs, int relativeDiscontinuitySequence, long relativeStartTimeUs, @Nullable DrmInitData drmInitData, @Nullable String fullSegmentEncryptionKeyUri, @Nullable String encryptionIV, long byteRangeOffset, long byteRangeLength, boolean hasGapTag, List<HlsMediaPlaylist.Part> parts)
Creates an instance.- Parameters:
url
- SeeHlsMediaPlaylist.SegmentBase.url
.initializationSegment
- SeeHlsMediaPlaylist.SegmentBase.initializationSegment
.title
- Seetitle
.durationUs
- SeeHlsMediaPlaylist.durationUs
.relativeDiscontinuitySequence
- SeeHlsMediaPlaylist.SegmentBase.relativeDiscontinuitySequence
.relativeStartTimeUs
- SeeHlsMediaPlaylist.SegmentBase.relativeStartTimeUs
.drmInitData
- SeeHlsMediaPlaylist.SegmentBase.drmInitData
.fullSegmentEncryptionKeyUri
- SeeHlsMediaPlaylist.SegmentBase.fullSegmentEncryptionKeyUri
.encryptionIV
- SeeHlsMediaPlaylist.SegmentBase.encryptionIV
.byteRangeOffset
- SeeHlsMediaPlaylist.SegmentBase.byteRangeOffset
.byteRangeLength
- SeeHlsMediaPlaylist.SegmentBase.byteRangeLength
.hasGapTag
- SeeHlsMediaPlaylist.SegmentBase.hasGapTag
.parts
- Seeparts
.
-
-
Method Detail
-
copyWith
public HlsMediaPlaylist.Segment copyWith(long relativeStartTimeUs, int relativeDiscontinuitySequence)
-
-