Class TsPayloadReader.TrackIdGenerator
- java.lang.Object
 - 
- com.google.android.exoplayer2.extractor.ts.TsPayloadReader.TrackIdGenerator
 
 
- 
- Enclosing interface:
 - TsPayloadReader
 
public static final class TsPayloadReader.TrackIdGenerator extends Object
Generates track ids for initializingTsPayloadReaders'TrackOutputs. 
- 
- 
Constructor Summary
Constructors Constructor Description TrackIdGenerator(int firstTrackId, int trackIdIncrement)TrackIdGenerator(int programNumber, int firstTrackId, int trackIdIncrement) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgenerateNewId()Generates a new set of track and track format ids.StringgetFormatId()Returns the last generated format id, with the format"programNumber/trackId".intgetTrackId()Returns the last generated track id. 
 - 
 
- 
- 
Method Detail
- 
generateNewId
public void generateNewId()
Generates a new set of track and track format ids. Must be called beforeget*methods. 
- 
getTrackId
public int getTrackId()
Returns the last generated track id. Must be called after the firstgenerateNewId()call.- Returns:
 - The last generated track id.
 
 
- 
getFormatId
public String getFormatId()
Returns the last generated format id, with the format"programNumber/trackId". If noprogramNumberwas provided, thetrackIdalone is used as format id. Must be called after the firstgenerateNewId()call.- Returns:
 - The last generated format id, with the format 
"programNumber/trackId". If noprogramNumberwas provided, thetrackIdalone is used as format id. 
 
 - 
 
 -