|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.fmj.media.rtp.RTPDataStream
public abstract class RTPDataStream
A generic RTP Data Stream
| Field Summary | |
|---|---|
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
|
| Fields inherited from interface javax.media.protocol.SourceStream |
|---|
LENGTH_UNKNOWN |
| Constructor Summary | |
|---|---|
RTPDataStream(long ssrc,
Format format)
Creates a new RTPDataStream |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
public RTPDataStream(long ssrc,
Format format)
ssrc - the SSRC associated with this datastreamformat - The format of the stream| Method Detail |
|---|
protected 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 type
public abstract void read(Buffer buffer)
throws java.io.IOException
read in interface PushBufferStreambuffer - the buffer in which to put the read data
java.io.IOException - I/O Exception
public 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 type
public 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()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||