javax.media.rtp.event
Class NewReceiveStreamEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.media.MediaEvent
              |
              +--javax.media.rtp.event.RTPEvent
                    |
                    +--javax.media.rtp.event.ReceiveStreamEvent
                          |
                          +--javax.media.rtp.event.NewReceiveStreamEvent

public class NewReceiveStreamEvent
extends ReceiveStreamEvent

Informs the RTP listener that a new stream of RTP data packets has been detected; in RTP parlance, this means that RTP data packets have been received from an SSRC that had not previously been sending data.

New ReceiveStreams announced with this callback may be created in one of two states. If the data packets have an SSRC that the RTPSM has already seen in RTCP control packets on this session, then the new ReceiveStream is created in the "unorphaned" state; in other words, it is permanently associated with an Participant. This Participant, whose presence would have been announced previously with the newParticipant() callback, is obtainable from the getParticipant() method in the ReceiveStream.

If, however, the SSRC in the data packets has never before been seen, the new ReceiveStream is created in the "orphaned" state and (as of yet) has no associated Participant; a call to getParticipant on the ReceiveStream will return null. When and if an RTCP packet arrives with the same SSRC, the CNAME contained therein will be extracted and checked against the CNAMEs of existing participants. If there is a match, than we have a case where a participant is sending a data stream with an SSRC it was not previously using; this should only happen when a participant is sending multiple streams. In this situation a recvStreamMapped() callback will be invoked by the RTPSM. If the CNAME was unrecognized then this is a case of a brand new participant, so in addition to recvStreamMapped(), RTPSM will also invoke the newParticipant() callback *before* calling recvStreamMapped().

See Also:
Serialized Form

Fields inherited from class java.util.EventObject
source
 
Constructor Summary
NewReceiveStreamEvent(SessionManager from, ReceiveStream recvStream)
           
 
Methods inherited from class javax.media.rtp.event.ReceiveStreamEvent
getParticipant, getReceiveStream
 
Methods inherited from class javax.media.rtp.event.RTPEvent
getSessionManager, getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NewReceiveStreamEvent

public NewReceiveStreamEvent(SessionManager from,
                             ReceiveStream recvStream)


Submit a bug or feature
Copyright 1994-2004 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved. See the Specification License for more details.
Sun, Sun Microsystems, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.