Package com.wowza.wms.transport.mpeg2
Class MPEG2PESPacketProcessor
- Object
-
- com.wowza.wms.transport.mpeg2.MPEG2PESPacketProcessor
-
- All Implemented Interfaces:
IMPEG2PacketProcessor
- Direct Known Subclasses:
MPEG2AudioPacketProcessor
,MPEG2PESAssembler
,MPEG2VideoPacketProcessor
public abstract class MPEG2PESPacketProcessor extends Object implements IMPEG2PacketProcessor
The Class mpeg2PESPacketProcessor.
-
-
Field Summary
Fields Modifier and Type Field Description int
continuityCounter
The continuity counter.boolean
continuityError
The continuity error.protected MPEG2MPTS.MPEG2MPTSBuffer.MPEG2Packet
currentPacket
The current packet.static int
INVALID
The Constant INVALID.protected IMPEG2StreamListener
listener
The listener.protected MPEG2PESPacket
pesPacket
int
PID
The pid.
-
Constructor Summary
Constructors Constructor Description MPEG2PESPacketProcessor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
checkContinuity()
Check continuity.int
findPESHeader()
Find pes header.int
getCodec()
abstract void
handlePESData(int length, MPEG2PESPacket.PESHeader header)
Handle pes data.void
notifyAdaptationHeaders(boolean deliver)
Notify adaptation headers.void
processMpeg2Buffer(int pid, byte[] bytes, int offset, int count)
Process mpeg2 raw buffer.void
processMpeg2Packet(MPEG2MPTS.MPEG2MPTSBuffer.MPEG2Packet packet)
Process mpeg2 packet.MPEG2PESPacket.PESHeader
processPESHeader()
Process pes header.void
setCodec(int codec)
-
-
-
Field Detail
-
INVALID
public static final int INVALID
The Constant INVALID.- See Also:
- Constant Field Values
-
PID
public int PID
The pid.
-
continuityCounter
public int continuityCounter
The continuity counter.
-
continuityError
public boolean continuityError
The continuity error.
-
listener
protected IMPEG2StreamListener listener
The listener.
-
pesPacket
protected MPEG2PESPacket pesPacket
-
currentPacket
protected MPEG2MPTS.MPEG2MPTSBuffer.MPEG2Packet currentPacket
The current packet.
-
-
Method Detail
-
notifyAdaptationHeaders
public void notifyAdaptationHeaders(boolean deliver)
Description copied from interface:IMPEG2PacketProcessor
Notify adaptation headers.- Specified by:
notifyAdaptationHeaders
in interfaceIMPEG2PacketProcessor
- Parameters:
deliver
- the notify
-
setCodec
public void setCodec(int codec)
-
getCodec
public int getCodec()
-
handlePESData
public abstract void handlePESData(int length, MPEG2PESPacket.PESHeader header)
Handle pes data.- Parameters:
length
- the lengthheader
- the header
-
checkContinuity
public void checkContinuity()
Check continuity.
-
findPESHeader
public int findPESHeader()
Find pes header.- Returns:
- the int
-
processMpeg2Buffer
public void processMpeg2Buffer(int pid, byte[] bytes, int offset, int count)
Description copied from interface:IMPEG2PacketProcessor
Process mpeg2 raw buffer.- Specified by:
processMpeg2Buffer
in interfaceIMPEG2PacketProcessor
-
processMpeg2Packet
public final void processMpeg2Packet(MPEG2MPTS.MPEG2MPTSBuffer.MPEG2Packet packet) throws java.io.IOException
Description copied from interface:IMPEG2PacketProcessor
Process mpeg2 packet.- Specified by:
processMpeg2Packet
in interfaceIMPEG2PacketProcessor
- Parameters:
packet
- the packet- Throws:
java.io.IOException
- Signals that an I/O exception has occurred.
-
processPESHeader
public MPEG2PESPacket.PESHeader processPESHeader()
Process pes header.- Returns:
- the pES header
-
-