public abstract class RTPDataStream extends java.lang.Object implements PushBufferStream, RTPControl
| Modifier and Type | Field and Description |
|---|---|
protected int |
bitsPerSecond |
protected int |
bytesProcessed |
protected double |
clockRate |
protected java.lang.Object[] |
controls |
protected Format |
format |
protected BufferTransferHandler |
handler |
protected RTPBuffer |
itsRTPBuffer |
protected long |
jitter |
protected long |
lastTimestamp |
protected int |
packetSize |
protected RTPReceptionStats |
receptionStats |
protected int |
rtpbufferlen |
protected long |
rtpbufferlenMS |
protected long |
ssrc |
protected long |
threshold |
LENGTH_UNKNOWN| Constructor and Description |
|---|
RTPDataStream(long ssrc,
Format format)
Creates a new RTPDataStream
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFormat(Format fmt,
int payload)
Add the specified format as corresponding to the specified payload.
|
protected abstract void |
addPacket(RTPHeader header,
byte[] data,
int offset,
int length)
Add an RTP packet to this datastream.
|
protected void |
calculateJitter(long rtpTimestamp)
Performs jitter calculations
(Conforming to RFC-3550 6.4.1)
|
boolean |
endOfStream()
Indicates if we're reached the end of stream.
|
ContentDescriptor |
getContentDescriptor()
Returns the content descriptor of this stream.
|
long |
getContentLength()
Returns the content's length.
|
java.lang.Object |
getControl(java.lang.String controlType)
Returns the control specific to this content type.
|
java.awt.Component |
getControlComponent()
Returns the control component.
|
java.lang.Object[] |
getControls()
Returns all the possible controls of this datastream.
|
Format |
getFormat()
Returns the format carried by this datastream.
|
Format |
getFormat(int payload)
Returns the format corresponding to this payload type.
|
Format[] |
getFormatList()
Returns the list of formats supported.
|
GlobalReceptionStats |
getGlobalStats()
Returns the global stats.
|
long |
getJitter()
Returns the current jitter calculated.
|
long |
getJitterBufferItemCount() |
long |
getJitterBufferSize() |
ReceptionStats |
getReceptionStats()
Returns the reception stats.
|
abstract void |
read(Buffer buffer)
Reads the data available into the buffer.
|
void |
setTransferHandler(BufferTransferHandler transferHandler)
Sets the handler responsible for treating the incoming data.
|
protected Format format
protected double clockRate
protected int packetSize
protected BufferTransferHandler handler
protected long ssrc
protected long threshold
protected java.lang.Object[] controls
protected RTPReceptionStats receptionStats
protected long jitter
protected RTPBuffer itsRTPBuffer
protected int rtpbufferlen
protected long rtpbufferlenMS
protected long lastTimestamp
protected int bytesProcessed
protected int bitsPerSecond
public RTPDataStream(long ssrc,
Format format)
ssrc - the SSRC associated with this datastreamformat - The format of the streamprotected abstract void addPacket(RTPHeader header, byte[] data, int offset, int length)
header - the RTP headerdata - the dataoffset - the offsetlength - the lengthpublic Format getFormat()
getFormat in interface PushBufferStreamgetFormat in interface RTPControlpublic void setTransferHandler(BufferTransferHandler transferHandler)
setTransferHandler in interface PushBufferStreamtransferHandler - the object handling the datapublic ContentDescriptor getContentDescriptor()
getContentDescriptor in interface SourceStreampublic long getContentLength()
getContentLength in interface SourceStreampublic boolean endOfStream()
endOfStream in interface SourceStreampublic java.lang.Object[] getControls()
getControls in interface Controlspublic java.lang.Object getControl(java.lang.String controlType)
getControl in interface ControlscontrolType - the control typepublic abstract void read(Buffer buffer) throws java.io.IOException
read in interface PushBufferStreambuffer - the buffer in which to put the read datajava.io.IOException - I/O Exceptionpublic void addFormat(Format fmt, int payload)
addFormat in interface RTPControlfmt - formatpayload - payload typepublic ReceptionStats getReceptionStats()
getReceptionStats in interface RTPControlpublic GlobalReceptionStats getGlobalStats()
getGlobalStats in interface RTPControlpublic Format[] getFormatList()
getFormatList in interface RTPControlpublic Format getFormat(int payload)
getFormat in interface RTPControlpayload - the payload typepublic java.awt.Component getControlComponent()
getControlComponent in interface Controlprotected void calculateJitter(long rtpTimestamp)
rtpTimestamp - the RTP timestamp present in the packetpublic long getJitter()
public long getJitterBufferSize()
public long getJitterBufferItemCount()