org.web3d.vrtp.rtp
Class RtpUtil

java.lang.Object
  |
  +--org.web3d.vrtp.rtp.RtpUtil

public class RtpUtil
extends java.lang.Object

A class with some RTP utilities (static methods)

Version:
1.0
Author:
Francisco Afonso (afonso@cs.nps.navy.mil)

Constructor Summary
RtpUtil()
           
 
Method Summary
static long correctSSRC(long ssrc)
          Converts an number represented as a signed integer(32 bits) to a long integer (64 bits).
static java.lang.String getUsername(javax.media.rtp.Participant part)
          Returns the participant username
static java.lang.String getUsernameOrCNAME(javax.media.rtp.Participant part)
          Returns the participant's username or his CNAME, if no username is known.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RtpUtil

public RtpUtil()
Method Detail

getUsername

public static java.lang.String getUsername(javax.media.rtp.Participant part)
Returns the participant username
Parameters:
part - the Participant object
Returns:
a string with the participant's username

getUsernameOrCNAME

public static java.lang.String getUsernameOrCNAME(javax.media.rtp.Participant part)
Returns the participant's username or his CNAME, if no username is known.
Parameters:
part - the Participant object
Returns:
a string with the participant's username or CNAME

correctSSRC

public static long correctSSRC(long ssrc)
Converts an number represented as a signed integer(32 bits) to a long integer (64 bits). JMF methods return the SSRC as an integer. As SSRC is a 32 bits number, some are represented in JMF as negative integers. This convertion is necessary to present SSRCs as a positive integer.