|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interface implemented by the SessionManager. This is the starting point for creating, maintaining and closing an RTP session.
Field Summary | |
static long |
SSRC_UNSPEC
Used to specify an unspecified SSRC for methods which retrieve an SSRC |
Method Summary | |
void |
addFormat(Format fmt,
int payload)
This method is used to add a dynamic payload ---> Format mapping in the SessionManager. |
void |
addPeer(SessionAddress peerAddress)
Adds a peer to the list of peers. |
void |
addReceiveStreamListener(ReceiveStreamListener listener)
Adds a ReceiveStreamListener. |
void |
addRemoteListener(RemoteListener listener)
Adds a RTPRemoteListener to the session. |
void |
addSendStreamListener(SendStreamListener listener)
Adds a SendStreamListener. |
void |
addSessionListener(SessionListener listener)
Adds a SessionListener. |
void |
closeSession(java.lang.String reason)
Informs RTP that the application is ready to terminate the session. |
SendStream |
createSendStream(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. |
SendStream |
createSendStream(int ssrc,
DataSource ds,
int streamindex)
This method is used to create a sending stream within the RTP session. |
java.lang.String |
generateCNAME()
This function can be used to generate a CNAME using the scheme described in RFC1889. |
long |
generateSSRC()
This function can be used to generate a SSRC using the scheme described in RFC1889. |
java.util.Vector |
getActiveParticipants()
Returns a vector of all the active (data sending) participants. |
java.util.Vector |
getAllParticipants()
Returns all the participants of this session. |
long |
getDefaultSSRC()
Returns the default SSRC for this session. |
GlobalReceptionStats |
getGlobalReceptionStats()
This method will provide access to overall data and control messsage reception statistics for this Session. |
GlobalTransmissionStats |
getGlobalTransmissionStats()
This method will provide access to overall data and control messsage transmission statistics for this Session. |
LocalParticipant |
getLocalParticipant()
Retrieves the local participant |
SessionAddress |
getLocalSessionAddress()
Method to get the local SessionAddress of this SessionManager. |
int |
getMulticastScope()
Allows the user to retrieve the multicast TTL set for this session |
java.util.Vector |
getPassiveParticipants()
Returns all the passive participants. |
java.util.Vector |
getPeers()
Gets the list of peers. |
java.util.Vector |
getReceiveStreams()
Returns the ReceiveStreams created by the SessionManager. |
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. |
java.util.Vector |
getSendStreams()
Returns the SendStreams created by the SessionManager. |
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. |
RTPStream |
getStream(long filterssrc)
Returns the RTPStream created by the SessionManager that has the same SSRC as the filterssrc. |
int |
initSession(SessionAddress localAddress,
long defaultSSRC,
SourceDescription[] defaultUserDesc,
double rtcp_bw_fraction,
double rtcp_sender_bw_fraction)
Initializes the session. |
int |
initSession(SessionAddress localAddress,
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. |
void |
removeAllPeers()
Removes all peers from the list of peers. |
void |
removePeer(SessionAddress peerAddress)
Removes a peer from the list of peers. |
void |
removeReceiveStreamListener(ReceiveStreamListener listener)
removes a ReceiveStreamListener |
void |
removeRemoteListener(RemoteListener listener)
removes a RTPRemoteListener |
void |
removeSendStreamListener(SendStreamListener listener)
removes a SendStreamListener |
void |
removeSessionListener(SessionListener listener)
removes a SessionListener |
void |
setMulticastScope(int multicastScope)
Sets the IP Multicast TTL for this session. |
int |
startSession(int mcastScope,
EncryptionInfo encryptionInfo)
This variant of the startSession() method is for starting a session with an empty list of peers. |
int |
startSession(SessionAddress destAddress,
int mcastScope,
EncryptionInfo encryptionInfo)
This method starts the session, causing RTCP reports to generated and callbacks to be made through the SessionListener interface. |
int |
startSession(SessionAddress localReceiverAddress,
SessionAddress localSenderAddress,
SessionAddress remoteReceiverAddress,
EncryptionInfo encryptionInfo)
This method may be used instead of startSession() above, but only in case of UNICAST sessions. |
Methods inherited from interface javax.media.Controls |
getControl,
getControls |
Field Detail |
public static final long SSRC_UNSPEC
Method Detail |
public int initSession(SessionAddress localAddress, long defaultSSRC, SourceDescription[] defaultUserDesc, double rtcp_bw_fraction, double rtcp_sender_bw_fraction) throws InvalidSessionAddressException
localAddress
- Encapsulates the *local* control and data
addresses to be used for the session. If either InetAddress
contained in this parameter is null, a default local address
will be chosen; this should be adequate except for multi-homed
systems with more than one IP
interface. The ports do not necessarily need to be specified
(i.e. they may be the ANY_PORT constant); RTPSM will pick
appropriate ports in that case. In any case, the fully specified
local addresses to be used are returned in this object. Note: The localAddress is the interface and port used by the sending/transmitting threads of the SessionManager. The receiving threads will use the address and port of the RTP session that is supplied in startSession().
defaultSSRC
- Identifies an SSRC value to use for this
participant. This SSRC value will go out in RTCP listener
reports from this participant.
.If the user wishes that RTPSM generate the SSRC, it must use the
initSession() call mentioned below.defaultSourceDesc
- An array of SourceDescription
objects containing information to send in RTCP SDES packets
for the local participant. This information can be changed by
calling setSourceDescription() on the local Participant
object.rtcp_bw_fraction
- The fraction of the session bandwidth
that the RTPSM must use when sending out RTCP reports.rtcp_sender_bw_fraction
- The fraction of the
rtcp_bw_fraction that the RTPSM must use to send out RTCP Sender
reports from the local participant. The remaining fraction of the
rtcp_bw is used for sending out RTCP Receiver reports. Note : The rtcp_bw_fraction is set to zero for a non-participating observer of this Session. In this case the application will receive both RTP and RTCP messages, but will not send out any RTCP feedback reports. This is equivalent to setting the outgoing RTP/RTCP bandwidth of this application to zero, implying that this application may NOT send out any data or control streams and can thus not make a call to createSendStream(). If it does, it will receive an exception. Further, this application is NOT considered an Participant since it does not send out any RTCP information. Consequently, this client will NOT appear in the list of Participants for this session.
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 int initSession(SessionAddress localAddress, SourceDescription[] defaultUserDesc, double rtcp_bw_fraction, double rtcp_sender_bw_fraction) throws InvalidSessionAddressException
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 int startSession(SessionAddress destAddress, int mcastScope, EncryptionInfo encryptionInfo) throws java.io.IOException, InvalidSessionAddressException
destAddress
- The RTP session address which is defined as
the address,port combination pair to which data and
control packets will be sent. As opposed to the localAddress
parameter specified in initSession,some portions of this
SessionAddress *must* be specified.This is the Session
Address and is defined in the RFC as one network address and a
port pair for RTP/RTCP. The RTP ports is even and one lower than
the RTCP port.Either of the RTP or RTCP address, port pair must
be supplied in destAddress parameter.
Note: For multicast sessions, this address will be the
multicast address to which data will be sent. In case of a
UNICAST session, you can enter either the IP address of the
receiver of data i.e. address to which data is destined OR the IP
address of the sender i.e. address to which control packets are
to be sent. For broadcast session, this
address will be the subnet broadcast address.mcastScope
- If the destination address specified is an IP
multicast address, this value
specifies the ttl of outgoing packets on that address. encryptionInfo
- Encryption information for this
session. public int startSession(SessionAddress localReceiverAddress, SessionAddress localSenderAddress, SessionAddress remoteReceiverAddress, EncryptionInfo encryptionInfo) throws java.io.IOException, InvalidSessionAddressException
localReceiverAddress
- specifies the RTP session address of the
local end point of this unicast session. i.e. the IP
address, data/ control port of the local hostlocalSenderAddress
- specifies the local RTP session address that
is used for sending out RTP and RTCP packets.remoteReceiverAddress
- The RTP session address of the remote end
point of this unicast session. i.e. the IP address,port of the
remote hostpublic void addSessionListener(SessionListener listener)
public void addRemoteListener(RemoteListener listener)
public void addReceiveStreamListener(ReceiveStreamListener listener)
public void addSendStreamListener(SendStreamListener listener)
public void removeSessionListener(SessionListener listener)
public void removeRemoteListener(RemoteListener listener)
public void removeReceiveStreamListener(ReceiveStreamListener listener)
public void removeSendStreamListener(SendStreamListener listener)
public long getDefaultSSRC()
public java.util.Vector getRemoteParticipants()
public java.util.Vector getActiveParticipants()
public java.util.Vector getPassiveParticipants()
public LocalParticipant getLocalParticipant()
public java.util.Vector getAllParticipants()
public java.util.Vector getReceiveStreams()
public java.util.Vector getSendStreams()
public RTPStream getStream(long filterssrc)
public int getMulticastScope()
public void setMulticastScope(int multicastScope)
multicastScope
- Specifies the new multicast scope for the
session. A multicastScope less than 1 defaults to a scope of 1
set for the session. public void closeSession(java.lang.String reason)
reason
- A string that RTCP will send out to other
participants as the reason the local participant has quit the
session.This RTCP packet will go out with the default SSRC of the
session. If supplied as null, a default reason will be supplied
by RTP. public java.lang.String generateCNAME()
public long generateSSRC()
public SessionAddress getSessionAddress()
public SessionAddress getLocalSessionAddress()
public GlobalReceptionStats getGlobalReceptionStats()
public GlobalTransmissionStats getGlobalTransmissionStats()
public SendStream createSendStream(int ssrc, DataSource ds, int streamindex) throws UnsupportedFormatException, SSRCInUseException, java.io.IOException
ssrc
- The Synchronisation source identifier to be used when
sending out this data stream. Note: Since the ssrc to be used by
the local member is supplied in the initSession() call as well,
the first SendStream created will use that ssrc and hence
IGNORE the ssrc supplied in createSendStream. Subsequent calls to
createSendStream() will use the ssrc supplied as this argument.
Use createSendStream (DataSource, int, int) to start a send
stream without supplying an SSRC. ds
- This is the PushOutputDataSource or
PullOutputDataSource which is the output datasource of the
Processor. This datasource may contain more than one
stream. The stream which is used in creating this RTP
stream is specified in the next parameter of stream.streamindex
- The index of the sourcestream from which
data is sent out on this RTP stream. An index of 1 would indicate the first
sourcestream of this datasource should be used to create the RTP
stream. If the index is set to zero, it would indicate a RTP
mixer operation is desired. i.e. all the streams of this
datasource must be mixed into one single stream from one single
SSRC. packet_interval
- This is the packetization interval in
millisecs that must constitute each RTP packet when it is
transmitted over the network. The packetization interval
determines the minimum end-to-end delay; longer packets
introduce less header overhead but higher delay and make packet loss more
noticeable. For non interactive applications such as lectures or
links with severe bandwidth constraints, a higher packetization delay may be
appropriate. public SendStream createSendStream(DataSource ds, int streamindex) throws UnsupportedFormatException, java.io.IOException
ds
- This is the PushOutputDataSource or
PullOutputDataSource which is the output datasource of the
Processor. This datasource may contain more than one
stream. The stream which is used in creating this RTP
stream is specified in the next parameter of stream.streamindex
- The index of the sourcestream from which
data is sent out on this RTP stream. An index of 1 would indicate the first
sourcestream of this datasource should be used to create the RTP
stream. If the index is set to zero, it would indicate a RTP
mixer operation is desired. i.e. all the streams of this
datasource must be mixed into one single stream from one single
SSRC. packet_interval
- This is the packetization interval in
millisecs that must constitute each RTP packet when it is
transmitted over the network. The packetization interval
determines the minimum end-to-end delay; longer packets
introduce less header overhead but higher delay and make packet loss more
noticeable. For non interactive applications such as lectures or
links with severe bandwidth constraints, a higher packetization delay may be
appropriate. public void addFormat(Format fmt, int payload)
fmt
- The Format to be associated with this dynamic
payload number.payload
- The RTP payload numberFormat
public int startSession(int mcastScope, EncryptionInfo encryptionInfo) throws java.io.IOException
mcastScope
- if the address in the addPeer() method is a
multicast address, the packets are sent out with this ttl.encryptionInfo
- the encryption information to be used in
this session.public void addPeer(SessionAddress peerAddress) throws java.io.IOException, InvalidSessionAddressException
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.]
peerAddress
- The unicast address pair (RTP transport address,
RTCP transport address) of the peer.public void removePeer(SessionAddress peerAddress)
If the peer is not in the list the method call is ignored.
peerAddress
- The unicast address pair (RTP transport address,
RTCP transport address) of the peer.public void removeAllPeers()
public java.util.Vector getPeers()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |