public class

SsManifest.StreamElement

extends java.lang.Object

 java.lang.Object

↳androidx.media3.exoplayer.smoothstreaming.manifest.SsManifest.StreamElement

Overview

Represents a StreamIndex element.

Summary

Fields
public final intchunkCount

public final intdisplayHeight

public final intdisplayWidth

public final Formatformats

public final java.lang.Stringlanguage

public final intmaxHeight

public final intmaxWidth

public final java.lang.Stringname

public final java.lang.StringsubType

public final longtimescale

public final inttype

Constructors
publicStreamElement(java.lang.String baseUri, java.lang.String chunkTemplate, int type, java.lang.String subType, long timescale, java.lang.String name, int maxWidth, int maxHeight, int displayWidth, int displayHeight, java.lang.String language, Format formats[], java.util.List<java.lang.Long> chunkStartTimes, long lastChunkDuration)

Methods
public UribuildRequestUri(int track, int chunkIndex)

Builds a uri for requesting the specified chunk of the specified track.

public SsManifest.StreamElementcopy(Format formats[])

Creates a copy of this stream element with the formats replaced with those specified.

public longgetChunkDurationUs(int chunkIndex)

Returns the duration of the specified chunk.

public intgetChunkIndex(long timeUs)

Returns the index of the chunk that contains the specified time.

public longgetStartTimeUs(int chunkIndex)

Returns the start time of the specified chunk.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public final int type

public final java.lang.String subType

public final long timescale

public final java.lang.String name

public final int maxWidth

public final int maxHeight

public final int displayWidth

public final int displayHeight

public final java.lang.String language

public final Format formats

public final int chunkCount

Constructors

public StreamElement(java.lang.String baseUri, java.lang.String chunkTemplate, int type, java.lang.String subType, long timescale, java.lang.String name, int maxWidth, int maxHeight, int displayWidth, int displayHeight, java.lang.String language, Format formats[], java.util.List<java.lang.Long> chunkStartTimes, long lastChunkDuration)

Methods

public SsManifest.StreamElement copy(Format formats[])

Creates a copy of this stream element with the formats replaced with those specified.

Parameters:

formats: The formats to be included in the copy.

Returns:

A copy of this stream element with the formats replaced.

public int getChunkIndex(long timeUs)

Returns the index of the chunk that contains the specified time.

Parameters:

timeUs: The time in microseconds.

Returns:

The index of the corresponding chunk.

public long getStartTimeUs(int chunkIndex)

Returns the start time of the specified chunk.

Parameters:

chunkIndex: The index of the chunk.

Returns:

The start time of the chunk, in microseconds.

public long getChunkDurationUs(int chunkIndex)

Returns the duration of the specified chunk.

Parameters:

chunkIndex: The index of the chunk.

Returns:

The duration of the chunk, in microseconds.

public Uri buildRequestUri(int track, int chunkIndex)

Builds a uri for requesting the specified chunk of the specified track.

Parameters:

track: The index of the track for which to build the URL.
chunkIndex: The index of the chunk for which to build the URL.

Returns:

The request uri.