Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia.transform.csrc
Class CsrcTransformEngine

java.lang.Object
  extended by net.java.sip.communicator.impl.neomedia.transform.csrc.CsrcTransformEngine
All Implemented Interfaces:
PacketTransformer, TransformEngine

public class CsrcTransformEngine
extends Object
implements TransformEngine, PacketTransformer

We use this engine to add the list of CSRC identifiers in RTP packets that we send to conference participants during calls where we are the mixer.

Author:
Emil Ivov

Constructor Summary
CsrcTransformEngine(MediaStreamImpl stream)
          Creates an engine instance that will be adding CSRC lists to the specified stream.
 
Method Summary
 PacketTransformer getRTCPTransformer()
          Always returns null since this engine does not require any RTCP transformations.
 PacketTransformer getRTPTransformer()
          Returns a reference to this class since it is performing RTP transformations in here.
 RawPacket reverseTransform(RawPacket pkt)
          Extracts the list of CSRC identifiers and passes it to the MediaStream associated with this engine.
 void setCsrcAudioLevelAudioLevelExtensionID(byte extID, MediaDirection dir)
          Sets the ID that this transformer should be using for audio level extensions or disables audio level extensions if extID is -1.
 void stop()
          Stops threads that this transform engine is using for even delivery.
 RawPacket transform(RawPacket pkt)
          Extracts the list of CSRC identifiers representing participants currently contributing to the media being sent by the MediaStream associated with this engine and (unless the list is empty) encodes them into the RawPacket.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CsrcTransformEngine

public CsrcTransformEngine(MediaStreamImpl stream)
Creates an engine instance that will be adding CSRC lists to the specified stream.

Parameters:
stream - that MediaStream whose RTP packets we are going to be adding CSRC lists. to
Method Detail

getRTCPTransformer

public PacketTransformer getRTCPTransformer()
Always returns null since this engine does not require any RTCP transformations.

Specified by:
getRTCPTransformer in interface TransformEngine
Returns:
null since this engine does not require any RTCP transformations.

getRTPTransformer

public PacketTransformer getRTPTransformer()
Returns a reference to this class since it is performing RTP transformations in here.

Specified by:
getRTPTransformer in interface TransformEngine
Returns:
a reference to this instance of the CsrcTransformEngine.

reverseTransform

public RawPacket reverseTransform(RawPacket pkt)
Extracts the list of CSRC identifiers and passes it to the MediaStream associated with this engine. Other than that the method does not do any transformations since CSRC lists are part of RFC 3550 and they shouldn't be disrupting the rest of the application.

Specified by:
reverseTransform in interface PacketTransformer
Parameters:
pkt - the RTP RawPacket that we are to extract a CSRC list from.
Returns:
the same RawPacket that was received as a parameter since we don't need to worry about hiding the CSRC list from the rest of the RTP stack.

transform

public RawPacket transform(RawPacket pkt)
Extracts the list of CSRC identifiers representing participants currently contributing to the media being sent by the MediaStream associated with this engine and (unless the list is empty) encodes them into the RawPacket.

Specified by:
transform in interface PacketTransformer
Parameters:
pkt - the RTP RawPacket that we need to add a CSRC list to.
Returns:
the updated RawPacket instance containing the list of CSRC identifiers.

stop

public void stop()
Stops threads that this transform engine is using for even delivery.


setCsrcAudioLevelAudioLevelExtensionID

public void setCsrcAudioLevelAudioLevelExtensionID(byte extID,
                                                   MediaDirection dir)
Sets the ID that this transformer should be using for audio level extensions or disables audio level extensions if extID is -1.

Parameters:
extID - ID that this transformer should be using for audio level extensions or -1 if audio level extensions should be disabled
dir - the direction that we are expected to hand this extension in.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.