public class MediaTrackInfo
extends java.lang.Object
MediaTrackInfo
- media track info.Modifier and Type | Class and Description |
---|---|
static class |
MediaTrackInfo.TimeInterval
TimePeriod - time interval. |
Modifier and Type | Field and Description |
---|---|
static MediaTrackInfo |
ALL_TRACKS
ALL_TRACKS - all tracks identifier. |
static int |
AUDIO
AUDIO - 0 : audio track id. |
int |
codec
track codec.
|
byte[] |
codecConfig
track codec configuration.
|
static int |
DATA
DATA - 2 : data track id. |
long |
duration
track duration (in milliseconds),
-1 if track duration is unknown. |
long |
frames
number of track frames,
-1 if number of frames is unknown. |
int |
id
track id (starting with 0).
|
long |
start
track start time (in milliseconds).
|
static int |
STREAM
STREAM - 3 : media (audio/video) stream track id. |
java.lang.Object |
tag
tag associated with the media track info.
|
int |
type
track type (one of AUDIO/VIDEO/DATA constants).
|
static int |
UNKNOWN
UNKNOWN - unknown track id. |
static long |
UNKNOWN_DURATION
UNKNOWN_DURATION - -1 |
static int |
VIDEO
VIDEO - 1 : video track id. |
Constructor and Description |
---|
MediaTrackInfo(int id,
int type,
int codec,
byte[] codecConfig)
Constructor.
|
MediaTrackInfo(int id,
int type,
int codec,
byte[] codecConfig,
long start)
Constructor.
|
MediaTrackInfo(int id,
int type,
int codec,
byte[] codecConfig,
long duration,
long frames)
Constructor.
|
MediaTrackInfo(int id,
int type,
int codec,
byte[] codecConfig,
long start,
long duration,
long frames)
Constructor.
|
MediaTrackInfo(MediaTrackInfo track)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
static MediaTrackInfo |
findFirstTrack(MediaTrackInfo[] tracks,
int type)
Finds the first track of
type in the tracks . |
static java.lang.String |
getCodecDescription(int codec)
Returns codec description.
|
static java.lang.String |
getTrackTypeDescription(int type)
Returns track type description.
|
int |
hashCode() |
void |
setDurationAndFrames(long duration,
long frames)
Sets 'duration' and 'frames' number.
|
java.lang.String |
toString() |
public static final MediaTrackInfo ALL_TRACKS
ALL_TRACKS
- all tracks identifier.public static final int UNKNOWN
UNKNOWN
- unknown track id.public static final int AUDIO
AUDIO
- 0 : audio track id.public static final int VIDEO
VIDEO
- 1 : video track id.public static final int DATA
DATA
- 2 : data track id.public static final int STREAM
STREAM
- 3 : media (audio/video) stream track id.public static final long UNKNOWN_DURATION
UNKNOWN_DURATION
- -1public final int id
public final int type
public final int codec
public final byte[] codecConfig
public final long start
public long duration
-1
if track duration is unknown.public long frames
-1
if number of frames is unknown.public java.lang.Object tag
public MediaTrackInfo(int id, int type, int codec, byte[] codecConfig)
public MediaTrackInfo(int id, int type, int codec, byte[] codecConfig, long start)
public MediaTrackInfo(int id, int type, int codec, byte[] codecConfig, long duration, long frames)
public MediaTrackInfo(int id, int type, int codec, byte[] codecConfig, long start, long duration, long frames)
public MediaTrackInfo(MediaTrackInfo track)
track
- public static MediaTrackInfo findFirstTrack(MediaTrackInfo[] tracks, int type)
type
in the tracks
.tracks
- trackstype
- track type to find (one of MediaTrackInfo
constants)public static java.lang.String getTrackTypeDescription(int type)
type
- track typepublic static java.lang.String getCodecDescription(int codec)
codec
- codec id (one of AudioCodec
or VideoCodec
constants)null
for invalid codecpublic void setDurationAndFrames(long duration, long frames)
duration
- frames
- public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object