|
|||||||||
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 streamMethod 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 PushBufferStream
getFormat
in interface RTPControl
public void setTransferHandler(BufferTransferHandler transferHandler)
setTransferHandler
in interface PushBufferStream
transferHandler
- the object handling the datapublic ContentDescriptor getContentDescriptor()
getContentDescriptor
in interface SourceStream
public long getContentLength()
getContentLength
in interface SourceStream
public boolean endOfStream()
endOfStream
in interface SourceStream
public java.lang.Object[] getControls()
getControls
in interface Controls
public java.lang.Object getControl(java.lang.String controlType)
getControl
in interface Controls
controlType
- the control type
public abstract void read(Buffer buffer) throws java.io.IOException
read
in interface PushBufferStream
buffer
- the buffer in which to put the read data
java.io.IOException
- I/O Exceptionpublic void addFormat(Format fmt, int payload)
addFormat
in interface RTPControl
fmt
- formatpayload
- payload typepublic ReceptionStats getReceptionStats()
getReceptionStats
in interface RTPControl
public GlobalReceptionStats getGlobalStats()
getGlobalStats
in interface RTPControl
public Format[] getFormatList()
getFormatList
in interface RTPControl
public Format getFormat(int payload)
getFormat
in interface RTPControl
payload
- the payload type
public java.awt.Component getControlComponent()
getControlComponent
in interface Control
protected 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 |