Class CsrcTransformEngine
- java.lang.Object
-
- org.jitsi.impl.neomedia.transform.SinglePacketTransformer
-
- org.jitsi.impl.neomedia.transform.csrc.CsrcTransformEngine
-
- All Implemented Interfaces:
PacketTransformer,TransformEngine
public class CsrcTransformEngine extends SinglePacketTransformer implements TransformEngine
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, Lyubomir Marinov
-
-
Constructor Summary
Constructors Constructor Description CsrcTransformEngine(MediaStreamImpl mediaStream)Creates an engine instance that will be adding CSRC lists to the specified stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes this PacketTransformer i.e.PacketTransformergetRTCPTransformer()Always returns null since this engine does not require any RTCP transformations.PacketTransformergetRTPTransformer()Returns a reference to this class since it is performing RTP transformations in here.RawPacketreverseTransform(RawPacket pkt)Extracts the list of CSRC identifiers and passes it to the MediaStream associated with this engine.voidsetCsrcAudioLevelExtensionID(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.RawPackettransform(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 org.jitsi.impl.neomedia.transform.SinglePacketTransformer
reverseTransform, transform
-
-
-
-
Constructor Detail
-
CsrcTransformEngine
public CsrcTransformEngine(MediaStreamImpl mediaStream)
Creates an engine instance that will be adding CSRC lists to the specified stream.- Parameters:
mediaStream- that MediaStream whose RTP packets we are going to be adding CSRC lists. to
-
-
Method Detail
-
close
public void close()
Closes this PacketTransformer i.e. releases the resources allocated by it and prepares it for garbage collection.- Specified by:
closein interfacePacketTransformer- Overrides:
closein classSinglePacketTransformer
-
getRTCPTransformer
public PacketTransformer getRTCPTransformer()
Always returns null since this engine does not require any RTCP transformations.- Specified by:
getRTCPTransformerin interfaceTransformEngine- 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:
getRTPTransformerin interfaceTransformEngine- 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:
reverseTransformin classSinglePacketTransformer- 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.
-
setCsrcAudioLevelExtensionID
public void setCsrcAudioLevelExtensionID(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 disableddir- the direction that we are expected to hand this extension in.
-
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:
transformin classSinglePacketTransformer- 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.
-
-