Class MediaStreamTarget


  • public class MediaStreamTarget
    extends Object
    The MediaStreamTarget contains a pair of host:port couples indicating data (RTP) and control (RTCP) locations.
    Author:
    Emil Ivov, Lyubomir Marinov
    • Constructor Detail

      • MediaStreamTarget

        public MediaStreamTarget​(InetSocketAddress rtpTarget,
                                 InetSocketAddress rtcpTarget)
        Initializes a new MediaStreamTarget instance with specific RTP and RTCP InetSocketAddresses.
        Parameters:
        rtpTarget - the InetSocketAddress that the new instance is to indicate as a data/RTP address.
        rtcpTarget - the InetSocketAddress that the new instance is to indicate as a control/RTCP address.
      • MediaStreamTarget

        public MediaStreamTarget​(InetAddress rtpAddr,
                                 int rtpPort,
                                 InetAddress rtcpAddr,
                                 int rtcpPort)
        Initializes a new MediaStreamTarget instance with specific RTP and RTCP InetAddresses and ports.
        Parameters:
        rtpAddr - the InetAddress that the new instance is to indicate as the IP address of a data/RTP address
        rtpPort - the port that the new instance is to indicate as the port of a data/RTP address
        rtcpAddr - the InetAddress that the new instance is to indicate as the IP address of a control/RTCP address
        rtcpPort - the port that the new instance is to indicate as the port of a control/RTCP address
    • Method Detail

      • addressesAreEqual

        public static boolean addressesAreEqual​(InetSocketAddress addr1,
                                                InetSocketAddress addr2)
        Determines whether two specific InetSocketAddress instances are equal.
        Parameters:
        addr1 - one of the InetSocketAddress instances to be compared
        addr2 - the other InetSocketAddress instance to be compared
        Returns:
        true if addr1 is equal to addr2; otherwise, false
      • equals

        public boolean equals​(Object obj)
        Determines whether this MediaStreamTarget is equal to a specific Object.
        Overrides:
        equals in class Object
        Parameters:
        obj - the Object to be compared to this MediaStreamTarget
        Returns:
        true if this MediaStreamTarget is equal to the specified obj; otherwise, false
      • getDataAddress

        public InetSocketAddress getDataAddress()
        Returns the InetSocketAddress that this MediaTarget is pointing to for all media (RTP) traffic.
        Returns:
        the InetSocketAddress that this MediaTarget is pointing to for all media (RTP) traffic.
      • getControlAddress

        public InetSocketAddress getControlAddress()
        Returns the InetSocketAddress that this MediaTarget is pointing to for all media (RTP) traffic.
        Returns:
        the InetSocketAddress that this MediaTarget is pointing to for all media (RTP) traffic.
      • hashCode

        public int hashCode()
        Returns a hash code for this MediaStreamTarget instance which is suitable for use in hash tables.
        Overrides:
        hashCode in class Object
        Returns:
        a hash code for this MediaStreamTarget instance which is suitable for use in hash tables
      • toString

        public String toString()
        Returns a human-readable representation of this MediaStreamTarget instance in the form of a String value.
        Overrides:
        toString in class Object
        Returns:
        a String value which gives a human-readable representation of this MediaStreamTarget instance