net.sf.fmj.media.rtp
Class RTPDataSource

java.lang.Object
  extended by javax.media.protocol.DataSource
      extended by javax.media.protocol.PushBufferDataSource
          extended by net.sf.fmj.media.rtp.RTPDataSource
All Implemented Interfaces:
Controls, Duration

public class RTPDataSource
extends PushBufferDataSource

Represents an RTP Data Source

Version:
1-1-alpha3
Author:
Andrew G D Rowley

Field Summary
 
Fields inherited from interface javax.media.Duration
DURATION_UNBOUNDED, DURATION_UNKNOWN
 
Constructor Summary
RTPDataSource(long ssrc, Format format)
          Creates a new RTPDataSource
 
Method Summary
 void connect()
           
 void disconnect()
           
 java.lang.String getContentType()
           
 java.lang.Object getControl(java.lang.String arg0)
           
 java.lang.Object[] getControls()
           
 Time getDuration()
           
 long getJitter()
          Returns the jitter value
 ReceptionStats getSourceReceptionStats()
          Returns the reception statistics of the source
 PushBufferStream[] getStreams()
           
 void handleRTPPacket(RTPHeader header, byte[] data, int offset, int length)
          Handles an RTP data packet
 void start()
           
 void stop()
           
 
Methods inherited from class javax.media.protocol.DataSource
getLocator, initCheck, setLocator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RTPDataSource

public RTPDataSource(long ssrc,
                     Format format)
Creates a new RTPDataSource

Parameters:
format - The format of the data
Method Detail

getStreams

public PushBufferStream[] getStreams()
Specified by:
getStreams in class PushBufferDataSource

getContentType

public java.lang.String getContentType()
Specified by:
getContentType in class DataSource

connect

public void connect()
Specified by:
connect in class DataSource

disconnect

public void disconnect()
Specified by:
disconnect in class DataSource

start

public void start()
Specified by:
start in class DataSource

stop

public void stop()
Specified by:
stop in class DataSource

getControl

public java.lang.Object getControl(java.lang.String arg0)
Specified by:
getControl in interface Controls
Specified by:
getControl in class DataSource

getControls

public java.lang.Object[] getControls()
Specified by:
getControls in interface Controls
Specified by:
getControls in class DataSource

getDuration

public Time getDuration()
Specified by:
getDuration in interface Duration
Specified by:
getDuration in class DataSource

handleRTPPacket

public void handleRTPPacket(RTPHeader header,
                            byte[] data,
                            int offset,
                            int length)
Handles an RTP data packet

Parameters:
header - The RTP header
data - The RTP data
offset - The offset in the data
length - The length of the data

getJitter

public long getJitter()
Returns the jitter value


getSourceReceptionStats

public ReceptionStats getSourceReceptionStats()
Returns the reception statistics of the source