public class RTPHandler
extends java.lang.Object
| Constructor and Description |
|---|
RTPHandler(DSMediaType mt,
RTPChannel owner)
When extending RTPHandler you must override this constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
checkForHeader(byte[] stack,
int readPos)
In input mode called from RTPChannel during normal read operation.
|
static RTPHandler |
forMediaType(DSMediaType mt,
RTPChannel owner)
Returns the mediatype specific handler implementation.
|
java.lang.String |
getMIMEType() |
boolean |
handlePacket(byte[] data,
int dataOffset,
int dataLength,
int seqNumber,
int rtpTimeStamp,
int flags)
Main packet handling method (input mode) called from the RTPChannel after a sample has been completely received.
|
byte[][] |
handleSample(SampleBuffer sb,
int headerLength)
Sample packetizing method (output mode), called from RTSPSink with full video or audio samples.
|
void |
newPacket(int readPos)
In input mode called from RTPChannel on the start of a new sample fragment.
|
void |
notifyStreamEvent(int event,
int param)
Called by RTPChannel, currently only used with seeking.
|
boolean |
prescan(byte[] data,
int dataLength)
In input mode called during setup, returns true when enough information has been collected to validate the media type passed in on constructiuon.
|
static void |
setHandlerForType(DSMediaType mediaType,
java.lang.String fullyQualifiedClassName)
Allows to set a preferred RTPHandler for the given media type.
|
void |
setSDPCodecInfo(java.lang.String info)
Passes the (eventually base64 encoded) extra info, that some payload types require to the handler.
|
public RTPHandler(DSMediaType mt, RTPChannel owner)
public static RTPHandler forMediaType(DSMediaType mt, RTPChannel owner) throws DSJException
DSJExceptionpublic static void setHandlerForType(DSMediaType mediaType, java.lang.String fullyQualifiedClassName)
public java.lang.String getMIMEType()
public void setSDPCodecInfo(java.lang.String info)
public void notifyStreamEvent(int event,
int param)
public void newPacket(int readPos)
public int checkForHeader(byte[] stack,
int readPos)
public boolean prescan(byte[] data,
int dataLength)
public boolean handlePacket(byte[] data,
int dataOffset,
int dataLength,
int seqNumber,
int rtpTimeStamp,
int flags)
public byte[][] handleSample(SampleBuffer sb, int headerLength)