|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfi.helsinki.cs.ohtu.mpeg2.AccessUnit
public class AccessUnit
Represents a coded presentation of a presentation unit. A decoder handles its input in access units. Access units are queued into the decoder's input buffer and are removed after decoding.
The exact meaning of an access unit depends on a decoder. In case of audio, an access unit might be decoded into a frame of samples. A video decoder might generate a picture frame or field from an access unit.
Instances of this class are immutable. They can be shared safely between objects and threads.
Field Summary | |
---|---|
private byte[] |
data
|
private boolean |
discont
|
private long |
dts
|
private long |
pts
|
Constructor Summary | |
---|---|
AccessUnit(long pts,
long dts,
byte[] data)
Creates a new AccessUnit instance. |
|
AccessUnit(long pts,
long dts,
byte[] data,
boolean discont)
Creates a new AccessUnit instance. |
Method Summary | |
---|---|
byte |
byteAt(int i)
Returns the data byte at the specified index i . |
long |
getDts()
Returns the decoding timestamp of this AccessUnit . |
int |
getLength()
Returns the number of raw data bytes of this AccessUnit . |
long |
getPts()
Returns the presentation timestamp of this AccessUnit . |
boolean |
isDiscontinuous()
Returns whether decoding discontinuity precedes this AccessUnit . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final long pts
private final long dts
private final byte[] data
private final boolean discont
Constructor Detail |
---|
public AccessUnit(long pts, long dts, byte[] data, boolean discont)
AccessUnit
instance.
pts
- the PTS for the access unit, in ticks of
the 90kHz clockdts
- the DTS for the access unit, in ticks of
the 90kHz clockdata
- the data for the access unitdiscont
- true
if a decoding discontinuity precedes
the access unitpublic AccessUnit(long pts, long dts, byte[] data)
AccessUnit
instance.
pts
- the PTS for the access unit, in ticks of
the 90kHz clockdts
- the DTS for the access unit, in ticks of
the 90kHz clockdata
- the data for the access unitMethod Detail |
---|
public boolean isDiscontinuous()
AccessUnit
.
true
in the presence of deconfing discontinuitypublic long getPts()
AccessUnit
.
public long getDts()
AccessUnit
.
public int getLength()
AccessUnit
.
public byte byteAt(int i)
i
.
i
- the index of the data byte
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |