net.sf.fmj.media.rtp
Class RTPSendStream

java.lang.Object
  extended by net.sf.fmj.media.rtp.RTPSendStream
All Implemented Interfaces:
BufferTransferHandler, SourceTransferHandler, RTPStream, SendStream

public class RTPSendStream
extends java.lang.Object
implements SendStream, SourceTransferHandler, BufferTransferHandler

Represnts an RTP sending stream

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

Constructor Summary
RTPSendStream(long ssrc, DataSource dataSource, OutputDataStream rtpDataStream, int index, RTPLocalParticipant participant, int format, double clockRate)
          Creates a new RTPSendStream
 
Method Summary
 void addSourceDescription(SourceDescription sdes)
          Adds a source description to this send stream
 void close()
           
 DataSource getDataSource()
           
 long getLastSendTime()
          Returns the last time a packet was sent
 long getLastTimestamp()
          Returns the last timestamp of a packet sent
 Participant getParticipant()
           
 int getSdesSize()
          Returns the number of bytes of sdes that this participant requires
 SenderReport getSenderReport()
           
 java.util.Vector getSourceDescription()
          Returns the source description for this source
 TransmissionStats getSourceTransmissionStats()
           
 long getSSRC()
           
 int setBitRate(int bitRate)
           
 void setSourceDescription(SourceDescription[] sourceDesc)
           
 void start()
           
 void stop()
           
 void transferData(PushBufferStream stream)
           
 void transferData(PushSourceStream stream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RTPSendStream

public RTPSendStream(long ssrc,
                     DataSource dataSource,
                     OutputDataStream rtpDataStream,
                     int index,
                     RTPLocalParticipant participant,
                     int format,
                     double clockRate)
Creates a new RTPSendStream

Parameters:
ssrc - The ssrc of the stream
dataSource - The datasource of the stream
rtpDataStream - The rtp output
Method Detail

addSourceDescription

public void addSourceDescription(SourceDescription sdes)
Adds a source description to this send stream

Parameters:
sdes - The description to add

setSourceDescription

public void setSourceDescription(SourceDescription[] sourceDesc)
Specified by:
setSourceDescription in interface SendStream

close

public void close()
Specified by:
close in interface SendStream

stop

public void stop()
          throws java.io.IOException
Specified by:
stop in interface SendStream
Throws:
java.io.IOException

start

public void start()
           throws java.io.IOException
Specified by:
start in interface SendStream
Throws:
java.io.IOException

setBitRate

public int setBitRate(int bitRate)
Specified by:
setBitRate in interface SendStream

getSourceTransmissionStats

public TransmissionStats getSourceTransmissionStats()
Specified by:
getSourceTransmissionStats in interface SendStream

getParticipant

public Participant getParticipant()
Specified by:
getParticipant in interface RTPStream

getSenderReport

public SenderReport getSenderReport()
Specified by:
getSenderReport in interface RTPStream

getSSRC

public long getSSRC()
Specified by:
getSSRC in interface RTPStream

getDataSource

public DataSource getDataSource()
Specified by:
getDataSource in interface RTPStream

transferData

public void transferData(PushSourceStream stream)
Specified by:
transferData in interface SourceTransferHandler

transferData

public void transferData(PushBufferStream stream)
Specified by:
transferData in interface BufferTransferHandler

getSourceDescription

public java.util.Vector getSourceDescription()
Returns the source description for this source

Returns:
The source description objects

getSdesSize

public int getSdesSize()
Returns the number of bytes of sdes that this participant requires


getLastSendTime

public long getLastSendTime()
Returns the last time a packet was sent


getLastTimestamp

public long getLastTimestamp()
Returns the last timestamp of a packet sent