|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfi.helsinki.cs.ohtu.mpeg2.PESPacket
fi.helsinki.cs.ohtu.mpeg2.AudioVideoPESPacket
public final class AudioVideoPESPacket
Represents a PES packet carrying data from a MPEG-2 audio/video stream or any other type of stream with the same packet format.
Field Summary | |
---|---|
private java.lang.Double |
dts
|
private java.lang.Double |
pts
|
private int |
stuffing
|
Constructor Summary | |
---|---|
AudioVideoPESPacket(StreamID streamID)
Class constructor. |
Method Summary | |
---|---|
double |
getDecodingTimestamp()
Gets the decoding timestamp specified by the packet. |
double |
getPresentationTimestamp()
Gets the presentation timestamp specified by the packet. |
int |
getStuffingLength()
Returns the number of stuffing bytes. |
boolean |
hasDecodingTimestamp()
Determines whether this packet specifies a decoding timestamp or not. |
boolean |
hasPresentationTimestamp()
Determines whether this packet specifies a presentation timestamp or not. |
protected void |
insertTemplateBytes()
Overload of the base class method, inserting the additional header bytes. |
void |
setPresentationTimestamp(double timestamp)
Sets the packet to specify only a presentation timestamp. |
void |
setStuffingLength(int stuffing)
Sets the number of stuffing bytes in this AudioVideoPESPacket . |
void |
setTimestamps(double pts,
double dts)
Sets the packet to specify both a presentation timestamp and a decoding timestamp. |
void |
unsetTimestamps()
Unsets the time stamps set by setPresentationTimeStamp() and/or setTimestamps(). |
Methods inherited from class fi.helsinki.cs.ohtu.mpeg2.PESPacket |
---|
addAboutToResetListener, getAboutToResetListeners, getPacketLength, getStream, getStreamID, getTotalLength, removeAboutToResetListener, reset, writeTo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.Double pts
private java.lang.Double dts
private int stuffing
Constructor Detail |
---|
public AudioVideoPESPacket(StreamID streamID)
streamID
- The ID of the stream the carried data belongs to.Method Detail |
---|
public boolean hasPresentationTimestamp()
public double getPresentationTimestamp()
public double getDecodingTimestamp()
public boolean hasDecodingTimestamp()
public void unsetTimestamps()
public int getStuffingLength()
public void setPresentationTimestamp(double timestamp)
timestamp
- The timestamp to specify, in seconds. Must be non-negative.public void setTimestamps(double pts, double dts)
pts
- The presentation timestamp to specify, in seconds. Must be non-negative.dts
- The decoding timestamp to specify, in seconds. Must be non-negative.public void setStuffingLength(int stuffing)
AudioVideoPESPacket
.
stuffing
- the number of stuffing bytes, in range [0..255]protected void insertTemplateBytes()
insertTemplateBytes
in class PESPacket
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |