Adds event dispatching for changes of the remote source id in RTP streams

cusax-fix
Emil Ivov 17 years ago
parent e2e338c924
commit a1975d9d81

@ -1238,7 +1238,7 @@ public void update(ReceiveStreamEvent event)
logger.trace("Received new ReceiveStream with ssrc "
+ receiveStream.getSSRC());
this.remoteSourceID = Long.toString( receiveStream.getSSRC() );
setRemoteSourceID( Long.toString( receiveStream.getSSRC() ));
synchronized (receiveStreams)
{
@ -1300,4 +1300,34 @@ public void update(SessionEvent event)
{
// TODO Auto-generated method stub
}
/**
* Sets the local SSRC identifier and fires the corresponding
* <tt>PropertyChangeEvent</tt>.
*
* @param ssrc the SSRC identifier that this stream will be using in
* outgoing RTP packets from now on.
*/
private void setLocalSourceID(String ssrc)
{
String oldValue = this.localSourceID;
this.localSourceID = ssrc;
firePropertyChange(PNAME_LOCAL_SSRC, oldValue, ssrc);
}
/**
* Sets the remote SSRC identifier and fires the corresponding
* <tt>PropertyChangeEvent</tt>.
*
* @param ssrc the SSRC identifier that this stream will be using in
* outgoing RTP packets from now on.
*/
private void setRemoteSourceID(String ssrc)
{
String oldValue = this.remoteSourceID;
this.remoteSourceID = ssrc;
firePropertyChange(PNAME_REMOTE_SSRC, oldValue, ssrc);
}
}

@ -29,15 +29,13 @@ public interface MediaStream
* The name of the property which indicates whether the remote SSRC is
* currently available.
*/
public static final String PNAME_LOCAL_SSRC_AVAILABLE
= "localSSRCAvailable";
public static final String PNAME_LOCAL_SSRC = "localSSRCAvailable";
/**
* The name of the property which indicates whether the local SSRC is
* currently available.
*/
public static final String PNAME_REMOTE_SSRC_AVAILABLE
= "remoteSSRCAvailable";
public static final String PNAME_REMOTE_SSRC = "remoteSSRCAvailable";
/**
* Starts capturing media from this stream's <tt>MediaDevice</tt> and then

Loading…
Cancel
Save