mirror of
https://github.com/androidx/media.git
synced 2025-05-16 12:09:50 +08:00
Document usage of MATCH_LONGEST_US.
Handling of this constant is already in place everywhere, this just documents that its use is allowed.
This commit is contained in:
parent
2358004951
commit
b4879236b5
@ -29,6 +29,12 @@ public final class C {
|
||||
*/
|
||||
public static final long UNKNOWN_TIME_US = -1L;
|
||||
|
||||
/**
|
||||
* Represents a microsecond duration whose exact value is unknown, but which should match the
|
||||
* longest of some other known durations.
|
||||
*/
|
||||
public static final long MATCH_LONGEST_US = -2L;
|
||||
|
||||
/**
|
||||
* The number of microseconds in one second.
|
||||
*/
|
||||
|
@ -26,14 +26,17 @@ public final class TrackInfo {
|
||||
public final String mimeType;
|
||||
|
||||
/**
|
||||
* The duration in microseconds, or {@link C#UNKNOWN_TIME_US} if the duration is unknown.
|
||||
* The duration in microseconds, or {@link C#UNKNOWN_TIME_US} if the duration is unknown, or
|
||||
* {@link C#MATCH_LONGEST_US} if the duration should match the duration of the longest track whose
|
||||
* duration is known.
|
||||
*/
|
||||
public final long durationUs;
|
||||
|
||||
/**
|
||||
* @param mimeType The mime type.
|
||||
* @param durationUs The duration in microseconds, or {@link C#UNKNOWN_TIME_US} if the duration
|
||||
* is unknown.
|
||||
* is unknown, or {@link C#MATCH_LONGEST_US} if the duration should match the duration of the
|
||||
* longest track whose duration is known.
|
||||
*/
|
||||
public TrackInfo(String mimeType, long durationUs) {
|
||||
this.mimeType = mimeType;
|
||||
|
@ -70,9 +70,9 @@ public abstract class TrackRenderer implements ExoPlayerComponent {
|
||||
public static final long UNKNOWN_TIME_US = C.UNKNOWN_TIME_US; // -1
|
||||
/**
|
||||
* Represents a time or duration that should match the duration of the longest track whose
|
||||
* duration is known.
|
||||
* duration is known. Equal to {@link C#MATCH_LONGEST_US}.
|
||||
*/
|
||||
public static final long MATCH_LONGEST_US = -2;
|
||||
public static final long MATCH_LONGEST_US = C.MATCH_LONGEST_US; // -2
|
||||
/**
|
||||
* Represents the time of the end of the track.
|
||||
*/
|
||||
|
@ -44,7 +44,8 @@ public class SingleSampleChunkSource implements ChunkSource {
|
||||
* @param dataSpec Defines the location of the sample.
|
||||
* @param format The format of the sample.
|
||||
* @param durationUs The duration of the sample in microseconds, or {@link C#UNKNOWN_TIME_US} if
|
||||
* the duration is unknown.
|
||||
* the duration is unknown, or {@link C#MATCH_LONGEST_US} if the duration should match the
|
||||
* duration of the longest track whose duration is known.
|
||||
* @param mediaFormat The sample media format. May be null.
|
||||
*/
|
||||
public SingleSampleChunkSource(DataSource dataSource, DataSpec dataSpec, Format format,
|
||||
|
Loading…
x
Reference in New Issue
Block a user