Package org.jitsi.service.neomedia
Class MediaStreamTarget
- java.lang.Object
-
- org.jitsi.service.neomedia.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 Summary
Constructors Constructor Description MediaStreamTarget(InetAddress rtpAddr, int rtpPort, InetAddress rtcpAddr, int rtcpPort)Initializes a new MediaStreamTarget instance with specific RTP and RTCP InetAddresses and ports.MediaStreamTarget(InetSocketAddress rtpTarget, InetSocketAddress rtcpTarget)Initializes a new MediaStreamTarget instance with specific RTP and RTCP InetSocketAddresses.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaddressesAreEqual(InetSocketAddress addr1, InetSocketAddress addr2)Determines whether two specific InetSocketAddress instances are equal.booleanequals(Object obj)Determines whether this MediaStreamTarget is equal to a specific Object.InetSocketAddressgetControlAddress()Returns the InetSocketAddress that this MediaTarget is pointing to for all media (RTP) traffic.InetSocketAddressgetDataAddress()Returns the InetSocketAddress that this MediaTarget is pointing to for all media (RTP) traffic.inthashCode()Returns a hash code for this MediaStreamTarget instance which is suitable for use in hash tables.StringtoString()Returns a human-readable representation of this MediaStreamTarget instance in the form of a String value.
-
-
-
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 addressrtpPort- the port that the new instance is to indicate as the port of a data/RTP addressrtcpAddr- the InetAddress that the new instance is to indicate as the IP address of a control/RTCP addressrtcpPort- 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 comparedaddr2- 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.
-
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.
-
-