net.sf.fmj.media.rtp
Class RTPAudioDataStream

java.lang.Object
  extended by net.sf.fmj.media.rtp.RTPDataStream
      extended by net.sf.fmj.media.rtp.RTPAudioDataStream
All Implemented Interfaces:
Control, Controls, PushBufferStream, SourceStream, RTPControl

public class RTPAudioDataStream
extends RTPDataStream
implements PushBufferStream

Represents a stream sent via RTP

Version:
1-1-alpha3
Author:
Andrew G D Rowley, Christian Vincenot

Field Summary
 
Fields inherited from class net.sf.fmj.media.rtp.RTPDataStream
bitsPerSecond, bytesProcessed, clockRate, controls, format, handler, itsRTPBuffer, jitter, lastTimestamp, packetSize, receptionStats, rtpbufferlen, rtpbufferlenMS, ssrc, threshold
 
Fields inherited from interface javax.media.protocol.SourceStream
LENGTH_UNKNOWN
 
Constructor Summary
RTPAudioDataStream(long ssrc, Format format)
          Creates a new RTPDataStream
 
Method Summary
protected  void addPacket(RTPHeader header, byte[] data, int offset, int length)
          Adds a packet to the buffers
 void read(Buffer buffer)
          Reads the data from this stream and returns them in the buffer passed as argument.
 
Methods inherited from class net.sf.fmj.media.rtp.RTPDataStream
addFormat, calculateJitter, endOfStream, getContentDescriptor, getContentLength, getControl, getControlComponent, getControls, getFormat, getFormat, getFormatList, getGlobalStats, getJitter, getJitterBufferItemCount, getJitterBufferSize, getReceptionStats, setTransferHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.media.protocol.PushBufferStream
getFormat, setTransferHandler
 
Methods inherited from interface javax.media.protocol.SourceStream
endOfStream, getContentDescriptor, getContentLength
 
Methods inherited from interface javax.media.Controls
getControl, getControls
 

Constructor Detail

RTPAudioDataStream

public RTPAudioDataStream(long ssrc,
                          Format format)
Creates a new RTPDataStream

Parameters:
ssrc - the SSRC of this stream
format - The format of the data
Method Detail

addPacket

protected void addPacket(RTPHeader header,
                         byte[] data,
                         int offset,
                         int length)
Adds a packet to the buffers

Specified by:
addPacket in class RTPDataStream
Parameters:
header - The header of the packet
data - The data of the packet
offset - The offset of the packet
length - The length of the packet

read

public void read(Buffer buffer)
          throws java.io.IOException
Reads the data from this stream and returns them in the buffer passed as argument.

Specified by:
read in interface PushBufferStream
Specified by:
read in class RTPDataStream
Parameters:
buffer - the buffer in which the data read must be stored
Throws:
java.io.IOException - I/O Exception