Class REDTransformEngine

    • Constructor Detail

      • REDTransformEngine

        public REDTransformEngine​(byte incomingPT,
                                  byte outgoingPT)
        Initializes a new REDTransformEngine instance.
        Parameters:
        incomingPT - the RED payload type number for incoming packets.
        outgoingPT - the RED payload type number for outgoing packets.
      • REDTransformEngine

        public REDTransformEngine()
        Initializes a new REDTransformEngine instance.
    • Method Detail

      • setIncomingPT

        public void setIncomingPT​(byte incomingPT)
        Sets the RED payload type for incoming red packets.
        Parameters:
        incomingPT - the payload type to set.
      • setOutgoingPT

        public void setOutgoingPT​(byte outgoingPT)
        Sets the RED payload type for outgoing red packets.
        Parameters:
        outgoingPT - the payload type to set.
      • close

        public void close()
        Closes this PacketTransformer i.e. releases the resources allocated by it and prepares it for garbage collection.
        Specified by:
        close in interface PacketTransformer
      • reverseTransform

        public RawPacket[] reverseTransform​(RawPacket[] pkts)
        Reverse-transforms each packet in an array of packets. Null values must be ignored. Reverse-transform a RED (RFC2198) packet.
        Specified by:
        reverseTransform in interface PacketTransformer
        Parameters:
        pkts - the transformed packets to be restored.
        Returns:
        the restored packets.
      • transform

        public RawPacket[] transform​(RawPacket[] pkts)
        Transforms each packet in an array of packets. Null values must be ignored. Encapsulates the packets in pkts with RED (RFC2198). Effectively inserts the following 1-byte RED header right after the RTP header (where "Block PT" is the payload type of the original packet) and changes the payload type of the packet to outgoingPT 0 1 2 3 4 5 6 7 +-+-+-+-+-+-+-+-+ |0| Block PT | +-+-+-+-+-+-+-+-+
        Specified by:
        transform in interface PacketTransformer
        Parameters:
        pkts - the packets to be transformed
        Returns:
        the transformed packets
      • getRTPTransformer

        public PacketTransformer getRTPTransformer()
        Gets the PacketTransformer for RTP packets. Return the single PacketTransformer for this TransformEngine
        Specified by:
        getRTPTransformer in interface TransformEngine
        Returns:
        the PacketTransformer for RTP packets