de.humatic.dsj.src.rtp
Class RTPChannel

java.lang.Object
  extended by de.humatic.dsj.src.rtp.RTPChannel

public class RTPChannel
extends java.lang.Object

RTPChannel represents a single subsession within an rtsp/rtp stream. Channels are setup by either RTP / RTSPSources during stream negotiation / sdp parsing and later on receive payload specific data from the Source or from RTPSink to handle packetizing of sample data. RTPChannels will themselves construct a dedicated RTPHandler object, that knows how to deal with a specific mediatype and its transport via RTP.
Methods in this class are called by the Source or its Filtergraph and are public for package design reasons, application code does not directly use this class.


Constructor Summary
RTPChannel(JSink sink, java.lang.String tID, int pt, int cNr, int inssrc)
          Constructs an RTPChannel for outgoing data, used by RTPSink.
RTPChannel(Source src, java.lang.String tID, int pt, int cNr, int flags)
          Constructs an RTPChannel for incoming data as used by RTPSource and RTSPSource.
 
Method Summary
 void close()
           
 int getChannelNr()
           
 int getInterleavedChannel(boolean data)
           
 int getLastSentTime()
           
 DSMediaType getMediaType()
           
 int getPayloadType()
           
 int getRTPTimeStampDelta()
           
 CompressedJavaSource getSourceFilter()
           
 int getSSRC()
           
 java.lang.String getTrackID()
           
 byte[][] handleSample(SampleBuffer buffer, int cType)
           
 void prepareNextPacket(int nextTimeStamp, int nextLength, int seqNumber, boolean markerSet)
           
 void read(byte b)
           
 void seekTo(int newTime)
           
 int setClockRate(int cr)
           
 void setInterleavedChannels(int dataChannel, int ctrlChannel)
           
 void setMediaType(DSMediaType t)
           
 void setSDPCodecInfo(java.lang.String codecInfo)
           
 void setSeekOffset()
           
 void setSSRC(int SSRC)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RTPChannel

public RTPChannel(Source src,
                  java.lang.String tID,
                  int pt,
                  int cNr,
                  int flags)
Constructs an RTPChannel for incoming data as used by RTPSource and RTSPSource. This constructor as well as methods in this class are called by the Sources / Sinks and are public for package design reasons, application code does not directly use this class.


RTPChannel

public RTPChannel(JSink sink,
                  java.lang.String tID,
                  int pt,
                  int cNr,
                  int inssrc)
Constructs an RTPChannel for outgoing data, used by RTPSink. This constructor as well as methods in this class are called by the Sources / Sinks and are public for package design reasons, application code does not directly use this class.

Method Detail

close

public void close()

setMediaType

public void setMediaType(DSMediaType t)

setSDPCodecInfo

public void setSDPCodecInfo(java.lang.String codecInfo)

setClockRate

public int setClockRate(int cr)

getMediaType

public DSMediaType getMediaType()

getSourceFilter

public CompressedJavaSource getSourceFilter()

getTrackID

public java.lang.String getTrackID()

getPayloadType

public int getPayloadType()

getChannelNr

public int getChannelNr()

getSSRC

public int getSSRC()

setSSRC

public void setSSRC(int SSRC)

setInterleavedChannels

public void setInterleavedChannels(int dataChannel,
                                   int ctrlChannel)

getInterleavedChannel

public int getInterleavedChannel(boolean data)

setSeekOffset

public void setSeekOffset()

seekTo

public void seekTo(int newTime)

prepareNextPacket

public void prepareNextPacket(int nextTimeStamp,
                              int nextLength,
                              int seqNumber,
                              boolean markerSet)
                       throws DSJException
Throws:
DSJException

read

public void read(byte b)

getLastSentTime

public int getLastSentTime()

getRTPTimeStampDelta

public int getRTPTimeStampDelta()

handleSample

public byte[][] handleSample(SampleBuffer buffer,
                             int cType)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object