Class RtxTransformer
- java.lang.Object
-
- org.jitsi.impl.neomedia.transform.RtxTransformer
-
- All Implemented Interfaces:
TransformEngine
public class RtxTransformer extends Object implements TransformEngine
Intercepts RTX (RFC-4588) packets coming from anMediaStream, and removes their RTX encapsulation. Intercepts NACKs and retransmits packets to a mediaStream (using the RTX format if the destination supports it).- Author:
- Boris Grozev, George Politis
-
-
Field Summary
Fields Modifier and Type Field Description static StringDISABLE_NACK_TERMINATION_PNAMEThe name of the property used to disable NACK termination.
-
Constructor Summary
Constructors Constructor Description RtxTransformer(MediaStreamImpl mediaStream)Initializes a new RtxTransformer with a specific MediaStreamImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandestinationSupportsRtx()Returns a boolean that indicates whether or not the destination endpoint supports RTX.PacketTransformergetRTCPTransformer()ImplementsTransformEngine.getRTCPTransformer().PacketTransformergetRTPTransformer()ImplementsTransformEngine.getRTPTransformer().voidonDynamicPayloadTypesChanged()Notifies this instance that the dynamic payload types of the associatedMediaStreamhave changed.intsendPadding(long ssrc, int bytes)Sends padding packets with the RTX SSRC associated to the media SSRC that is passed as a parameter.
-
-
-
Field Detail
-
DISABLE_NACK_TERMINATION_PNAME
public static final String DISABLE_NACK_TERMINATION_PNAME
The name of the property used to disable NACK termination.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RtxTransformer
public RtxTransformer(MediaStreamImpl mediaStream)
Initializes a new RtxTransformer with a specific MediaStreamImpl.- Parameters:
mediaStream- the MediaStreamImpl for the transformer.
-
-
Method Detail
-
getRTPTransformer
public PacketTransformer getRTPTransformer()
ImplementsTransformEngine.getRTPTransformer().- Specified by:
getRTPTransformerin interfaceTransformEngine- Returns:
- the PacketTransformer for RTP packets
-
getRTCPTransformer
public PacketTransformer getRTCPTransformer()
ImplementsTransformEngine.getRTCPTransformer().- Specified by:
getRTCPTransformerin interfaceTransformEngine- Returns:
- the PacketTransformer for RTCP packets
-
destinationSupportsRtx
public boolean destinationSupportsRtx()
Returns a boolean that indicates whether or not the destination endpoint supports RTX.- Returns:
- true if the destination endpoint supports RTX, otherwise false.
-
onDynamicPayloadTypesChanged
public void onDynamicPayloadTypesChanged()
Notifies this instance that the dynamic payload types of the associatedMediaStreamhave changed.
-
sendPadding
public int sendPadding(long ssrc, int bytes)Sends padding packets with the RTX SSRC associated to the media SSRC that is passed as a parameter. It implements packet triplication.- Parameters:
ssrc- the media SSRC to protect.bytes- the amount of padding to send in bytes.- Returns:
- the remaining padding bytes budget.
-
-