public class DominantSpeakerIdentification extends AbstractActiveSpeakerDetector
ActiveSpeakerDetector
with inspiration from the paper
"Dominant Speaker Identification for Multipoint Videoconferencing"
by Ilana Volfin and Israel Cohen.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DOMINANT_SPEAKER_PROPERTY_NAME
The name of the DominantSpeakerIdentification property
dominantSpeaker which specifies the dominant speaker identified
by synchronization source identifier (SSRC).
|
Constructor and Description |
---|
DominantSpeakerIdentification()
Initializes a new DominantSpeakerIdentification instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to the list of listeners
interested in and notified about changes in the values of the properties
of this DominantSpeakerIdentification.
|
(package private) void |
decisionMakerExited(org.jitsi.impl.neomedia.DominantSpeakerIdentification.DecisionMaker decisionMaker)
Notifies this DominantSpeakerIdentification instance that a
specific DecisionMaker has permanently stopped executing (in its
background/daemon Thread).
|
org.json.simple.JSONObject |
doGetJSON()
Retrieves a JSON representation of this instance for the purposes of the
REST API of Videobridge.
|
protected void |
firePropertyChange(java.lang.String property,
java.lang.Long oldValue,
java.lang.Long newValue)
Fires a new PropertyChangeEvent to the
PropertyChangeListeners registered with this
DominantSpeakerIdentification in order to notify about a change
in the value of a specific property which had its old value modified to a
specific new value.
|
protected void |
firePropertyChange(java.lang.String property,
java.lang.Object oldValue,
java.lang.Object newValue)
Fires a new PropertyChangeEvent to the
PropertyChangeListeners registered with this
DominantSpeakerIdentification in order to notify about a change
in the value of a specific property which had its old value modified to a
specific new value.
|
long |
getDominantSpeaker()
Gets the synchronization source identifier (SSRC) of the dominant speaker
in this multipoint conference.
|
void |
levelChanged(long ssrc,
int level)
Notifies this ActiveSpeakerDetector about the latest/current
audio level of a stream/speaker identified by a specific synchronization
source identifier/SSRC.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener from the list of listeners
interested in and notified about changes in the values of the properties
of this DominantSpeakerIdentification.
|
(package private) long |
runInDecisionMaker(org.jitsi.impl.neomedia.DominantSpeakerIdentification.DecisionMaker decisionMaker)
Runs in the background/daemon Thread of a specific
DecisionMaker and makes the decision whether there has been a
speaker switch event.
|
addActiveSpeakerChangedListener, fireActiveSpeakerChanged, getActiveSpeakerChangedListeners, removeActiveSpeakerChangedListener
public static final java.lang.String DOMINANT_SPEAKER_PROPERTY_NAME
public DominantSpeakerIdentification()
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- a PropertyChangeListener to be notified about
changes in the values of the properties of this
DominantSpeakerIdentificationvoid decisionMakerExited(org.jitsi.impl.neomedia.DominantSpeakerIdentification.DecisionMaker decisionMaker)
decisionMaker
- the DecisionMaker which has exitedpublic org.json.simple.JSONObject doGetJSON()
By the way, the method name reflects the fact that the method handles an HTTP GET request.
protected void firePropertyChange(java.lang.String property, java.lang.Long oldValue, java.lang.Long newValue)
property
- the name of the property of this
DominantSpeakerIdentification which had its value changedoldValue
- the value of the property with the specified name before
the changenewValue
- the value of the property with the specified name after
the changeprotected void firePropertyChange(java.lang.String property, java.lang.Object oldValue, java.lang.Object newValue)
property
- the name of the property of this
DominantSpeakerIdentification which had its value changedoldValue
- the value of the property with the specified name before
the changenewValue
- the value of the property with the specified name after
the changepublic long getDominantSpeaker()
public void levelChanged(long ssrc, int level)
ssrc
- the SSRC of the stream/speakerlevel
- the latest/current audio level of the stream/speaker with
the specified ssrcpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- a PropertyChangeListener to no longer be
notified about changes in the values of the properties of this
DominantSpeakerIdentificationlong runInDecisionMaker(org.jitsi.impl.neomedia.DominantSpeakerIdentification.DecisionMaker decisionMaker)
decisionMaker
- the DecisionMaker invoking the method
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.