docs/doc/reference/com/google/android/exoplayer2/extractor/ts/TsPayloadReader.TrackIdGenerator.html
Package com.google.android.exoplayer2.extractor.ts
Enclosing interface:TsPayloadReader
public static final classTsPayloadReader.TrackIdGeneratorextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Generates track ids for initializing TsPayloadReaders' TrackOutputs.
Constructors | Constructor | Description |
| --- | --- |
| TrackIdGenerator(int firstTrackId, int trackIdIncrement) | |
| TrackIdGenerator(int programNumber, int firstTrackId, int trackIdIncrement) | |
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| void | generateNewId() |
Generates a new set of track and track format ids.
|
| String | getFormatId() |
Returns the last generated format id, with the format "programNumber/trackId".
|
| int | getTrackId() |
Returns the last generated track id.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public TrackIdGenerator(int firstTrackId,
int trackIdIncrement)
-
public TrackIdGenerator(int programNumber,
int firstTrackId,
int trackIdIncrement)
-
public void generateNewId()
Generates a new set of track and track format ids. Must be called before get* methods.
-
public int getTrackId()
Returns the last generated track id. Must be called after the first generateNewId() call.
Returns:The last generated track id.
-
public[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")getFormatId()
Returns the last generated format id, with the format "programNumber/trackId". If no programNumber was provided, the trackId alone is used as format id. Must be called after the first generateNewId() call.
Returns:The last generated format id, with the format "programNumber/trackId". If no programNumber was provided, the trackId alone is used as format id.