Class SsrcTransformEngine

  • All Implemented Interfaces:
    PacketTransformer, TransformEngine

    public class SsrcTransformEngine
    extends SinglePacketTransformerAdapter
    implements TransformEngine
    Implements read-only support for "A Real-Time Transport Protocol (RTP) Header Extension for Client-to-Mixer Audio Level Indication". Optionally, drops RTP packets indicated to be generated from a muted audio source in order to avoid wasting processing power such as decrypting, decoding and audio mixing.
    Author:
    Emil Ivov, Lyubomir Marinov
    • Field Detail

      • DROP_MUTED_AUDIO_SOURCE_IN_REVERSE_TRANSFORM

        public static final String DROP_MUTED_AUDIO_SOURCE_IN_REVERSE_TRANSFORM
        The name of the ConfigurationService property which specifies whether SsrcTransformEngine is to drop RTP packets indicated as generated from a muted audio source in reverseTransform(RawPacket).
    • Constructor Detail

      • SsrcTransformEngine

        public SsrcTransformEngine​(MediaStreamImpl mediaStream)
        Initializes a new SsrcTransformEngine to be utilized by a specific MediaStreamImpl.
        Parameters:
        mediaStream - the MediaStreamImpl to utilize the new instance
    • 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 SsrcTransformEngine.
      • 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.
        Overrides:
        reverseTransform in class SinglePacketTransformerAdapter
        Parameters:
        pkt - the RTP RawPacket that we are to extract a SSRC list from.
        Returns:
        the same RawPacket that was received as a parameter since we don't need to worry about hiding the SSRC list from the rest of the RTP stack.
      • setSsrcAudioLevelExtensionID

        public void setSsrcAudioLevelExtensionID​(byte extID,
                                                 MediaDirection dir)