Methods Summary |
---|
public void | addFormat(javax.media.Format fmt, int payload)This method is used to add a dynamic payload ---> Format
mapping in the SessionManager. The SessionManager maintains
all static payload numbers and their correspnding Formats as
mentioned in the Audio/Video profile document. Using the plugin
packethandler interface, a user may plugin his own packetizer or
depacketizer to handle RTP streams of a proprietary format using
dynamic payload numbers as specified in the AV profile. Before
streaming payload of a dynamic nature, a Format object needs to
be created for the dynamic payload and associated with a dynamic
payload number.
|
public void | addPeer(javax.media.rtp.SessionAddress peerAddress)Adds a peer to the list of peers.
This method can be used when an RTP Session is to be built based on a
full mesh of unicast streams between participants (this is called
multi-unicast).
If there is more than one peer in the list the SessionManager
duplicates outbound RTP or RTCP packets.
The duplicates are addressed to each peer in the list of peers.
If the peer is already in the list the method call is ignored.
[Note: The notion of a list of peers can be readily extended
to contain multicast addresses as well.
This would enable hybrid multicast and multi-unicast RTP Sessions.]
|
public void | addReceiveStreamListener(javax.media.rtp.ReceiveStreamListener listener)Adds a ReceiveStreamListener. This listener listens to all the
events that notify state transitions for a particular
ReceiveStream.
|
public void | addRemoteListener(javax.media.rtp.RemoteListener listener)Adds a RemoteListener to the session. This listener listens
to all remote RTP events. Currently, these include
ReceiverReportEvent, ReceiveSenderReportEvent and
RemoteCollisionEvent. This interface would be usefuly for an RTCP
monitor that does not wish to receive any particular stream
transitionEvents but just wants to monitor the session quality
and statistics.
|
public void | addSendStreamListener(javax.media.rtp.SendStreamListener listener)Adds a SendStreamListener. This listener listens to all the
events that notify state transitions for a particular
SendStream.
|
public void | addSessionListener(javax.media.rtp.SessionListener listener)Adds a SessionListener. A SessionListener will receive
events that pertain to the Session as a whole. Currently,
these include the NewParticipantEvent and
LocalCollisionEvent. Events are notified in the
update(SessionEvent) method which must be implemented by all
SessionListeners.
|
public void | closeSession(java.lang.String reason)Informs RTP that the application is ready to terminate the
session. All open streams will be closed after this call
completes, and the object implementing this interface is no longer
useful as an SessionManager.
|
public javax.media.rtp.SendStream | createSendStream(int ssrc, javax.media.protocol.DataSource ds, int streamindex)This method is used to create a sending stream within the RTP
session. For each time the call is made, a new sending stream
will be created. This stream will use the SDES items as entered
in the initSession() call for all its RTCP messages. Each stream
is sent out with a new SSRC (Synchronisation SouRCe
identifier), but from the same participant i.e. local
participant.
|
public javax.media.rtp.SendStream | createSendStream(javax.media.protocol.DataSource ds, int streamindex)This method is the same as the createSendStream(int ssrc,
DataSource ds, in t streamindex, int packet_interval) except
that the user need not supply the SSRC of the stream. The SSRC
will be chosen by the SessionManager itself.
This method is used to create a sending stream within the RTP
session. For each time the call is made, a new sending stream
will be created. This stream will use the SDES items as entered
in the initSession() call for all its RTCP messages. Each stream
is sent out with a new SSRC (Synchronisation SouRCe
identifier), but from the same participant i.e. local
participant.
|
public java.lang.String | generateCNAME()This function can be used to generate a CNAME using the scheme
described in RFC1889. This function is provided in order to facilitate CNAME
generation prior to actual stream creation.
|
public long | generateSSRC()This function can be used to generate a SSRC using the scheme
described in RFC1889. This function is provided in order to facilitate SSRC
generation prior to actual stream creation, which may be useful for call
control functions which need to exchange SSRCs before stream transmission
commences.
Note: the return type has been changed from long to int.
|
public java.util.Vector | getActiveParticipants()Returns a vector of all the active (data sending)
participants. These participants may be remote and/or the local participant.
|
public java.util.Vector | getAllParticipants()Returns all the participants of this session.
|
public long | getDefaultSSRC()Returns the default SSRC for this session. Returns SSRC_UNSPEC
if the session has not yet been initialized.
|
public javax.media.rtp.GlobalReceptionStats | getGlobalReceptionStats()This method will provide access to overall data and control
messsage reception statistics for this Session. Statistics on
data from individual sources is available from method
getSourceReceptionStats() of interface ReceiveStream
|
public javax.media.rtp.GlobalTransmissionStats | getGlobalTransmissionStats()This method will provide access to overall data and control
messsage transmission statistics for this Session. Statistics on
data from individual sources is available from method
getSourceTransmissionStats() of interface SendStream
|
public javax.media.rtp.LocalParticipant | getLocalParticipant()Retrieves the local participant
|
public javax.media.rtp.SessionAddress | getLocalSessionAddress()Method to get the local SessionAddress of this
SessionManager. This will return the local address and port
bound to of the socket which is sending out RTP/RTCP packets. Since the
RTPSM does not send out any RTP packets, the destaddress/port
field of SessionAddress will not be filled in.
Note: current implementations of JDK will return
0.0.0.0/0.0.0.0 for a socket.getLocalAddress() call.
|
public int | getMulticastScope()Allows the user to retrieve the multicast TTL set for this
session.
|
public java.util.Vector | getPassiveParticipants()Returns all the passive participants. These participants will
include the local participant and some remote participants that
do not send any data.
|
public java.util.Vector | getPeers()Gets the list of peers.
|
public java.util.Vector | getReceiveStreams()Returns the ReceiveStreams created by the
SessionManager. These are streams formed when the RTPSM
detects a new source of RTP data.
ReceiveStreams returned are a snapshot of the current state in the
RTPSesionManager and the ReceiveStreamListener interface may be used
to get notified of additional streams.
|
public java.util.Vector | getRemoteParticipants()Returns a Vector of all the remote participants in the
session.This vector is simply a snapshot of the current state in
the SessionManager.The SessionListener interface can be
used to get notified of additional participants for the
Session.
|
public java.util.Vector | getSendStreams()Returns the SendStreams created by the
SessionManager.
SendStreams returned are a snapshot of the current state in the
RTPSesionManager and the SendStreamListener interface may be used
to get notified of additional streams.
|
public javax.media.rtp.SessionAddress | getSessionAddress()Method to get the Destination SessionAddress of this SessionManager
This will return the data address/port and control address/port
that the RTP manager is receiving data/control packets on and
sending RTCP packets to.
|
public javax.media.rtp.RTPStream | getStream(long filterssrc)Returns the RTPStream created by the SessionManager that
has the same SSRC as the filterssrc. If no stream with the
filterssrc exits, null is returned.
Note: the return type for this method has been changed from long
to int.
|
public int | initSession(javax.media.rtp.SessionAddress localAddress, long defaultSSRC, javax.media.rtp.rtcp.SourceDescription[] defaultUserDesc, double rtcp_bw_fraction, double rtcp_sender_bw_fraction)Initializes the session. Once this method has been called, the
session is "initialized" and this method cannot be called again.
|
public int | initSession(javax.media.rtp.SessionAddress localAddress, javax.media.rtp.rtcp.SourceDescription[] defaultUserDesc, double rtcp_bw_fraction, double rtcp_sender_bw_fraction)This form of initSession is to be used when the SSRC is to be
generated by the RTPSM. In this case, the client allows the
underlying implementation to choose an appropriate SSRC, and
the SSRC chosen can be retrieved with getDefaultSSRC().
InitSession called a second time or thereafter will return
without doing anything, since the session had already been
initialized. If parameters to initSession() are different from
before, the user must note that the new parameters will ignored
as a result of no action being performed. In this case,
The return value is -1
indicating no action was taken since initSession had previously
been called
|
public void | removeAllPeers()Removes all peers from the list of peers.
|
public void | removePeer(javax.media.rtp.SessionAddress peerAddress)Removes a peer from the list of peers.
If the peer is not in the list the method call is ignored.
|
public void | removeReceiveStreamListener(javax.media.rtp.ReceiveStreamListener listener)removes a ReceiveStreamListener
|
public void | removeRemoteListener(javax.media.rtp.RemoteListener listener)removes a RTPRemoteListener
|
public void | removeSendStreamListener(javax.media.rtp.SendStreamListener listener)removes a SendStreamListener
|
public void | removeSessionListener(javax.media.rtp.SessionListener listener)removes a SessionListener
|
public void | setMulticastScope(int multicastScope)Sets the IP Multicast TTL for this session.
|
public int | startSession(javax.media.rtp.SessionAddress destAddress, int mcastScope, javax.media.rtp.EncryptionInfo encryptionInfo)This method starts the session, causing RTCP reports to
generated and callbacks to be made through the
SessionListener interface. This method must be called after
session initialization and prior to the creation of any streams
on a session. A valid destination address is required
even for sessions that will have no sending streams so that RTCP
control messages can be sent.
|
public int | startSession(int mcastScope, javax.media.rtp.EncryptionInfo encryptionInfo)This variant of the startSession() method is for starting
a session with an empty list of peers. This method is meant to be
used to start a multi-unicast session. For more details, please see
documentation on multi-unicast sessions.
|
public int | startSession(javax.media.rtp.SessionAddress localReceiverAddress, javax.media.rtp.SessionAddress localSenderAddress, javax.media.rtp.SessionAddress remoteReceiverAddress, javax.media.rtp.EncryptionInfo encryptionInfo)This method may be used instead of startSession() above, but only
in case of UNICAST sessions. It allows a user to specify
distinct port pairs for the two end points of a unicast session
only.
Note: This feature is not in RFC 1889, but has been added in a later
RTP draft.
|