public class ActiveSpeakerDetectorImpl extends java.lang.Object implements ActiveSpeakerDetector
ActiveSpeakerDetector
(factory) which uses/delegates to
an actual algorithm implementation for the detections/identification of the
active/dominant speaker in a multipoint conference.Constructor and Description |
---|
ActiveSpeakerDetectorImpl()
Initializes a new ActiveSpeakerDetectorImpl which is to use a
default algorithm implementation for the detection/identification of the
active/dominant speaker in a multipoint conference.
|
ActiveSpeakerDetectorImpl(java.lang.String... implClassNames)
Initializes a new ActiveSpeakerDetectorImpl which is to use the
first available algorithm from a specific list of algorithms (identified
by the names of their implementing classes) for the
detection/identification of the active/dominant speaker in a multipoint
conference.
|
Modifier and Type | Method and Description |
---|---|
void |
addActiveSpeakerChangedListener(ActiveSpeakerChangedListener listener)
Adds a listener to be notified by this active speaker detector when the
active stream changes.
|
ActiveSpeakerDetector |
getImpl()
Gets the actual algorithm implementation used by this instance for the
detection/identification of the active/dominant speaker in a 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 |
removeActiveSpeakerChangedListener(ActiveSpeakerChangedListener listener)
Removes a listener to no longer be notified by this active speaker
detector when the active stream changes.
|
public ActiveSpeakerDetectorImpl()
public ActiveSpeakerDetectorImpl(java.lang.String... implClassNames)
implClassNames
- the class names of the algorithm implementations to
search through and in which the first available is to be found and used
for the detection/identification of the active/dominant speaker in a
multipoint conferencejava.lang.RuntimeException
- if none of the algorithm implementations
specified by implClassNames is availablepublic void addActiveSpeakerChangedListener(ActiveSpeakerChangedListener listener)
addActiveSpeakerChangedListener
in interface ActiveSpeakerDetector
listener
- the listener to register with this instance for
notifications about changes of the active speakerpublic ActiveSpeakerDetector getImpl()
public void levelChanged(long ssrc, int level)
levelChanged
in interface ActiveSpeakerDetector
ssrc
- the SSRC of the stream/speakerlevel
- the latest/current audio level of the stream/speaker with
the specified ssrcpublic void removeActiveSpeakerChangedListener(ActiveSpeakerChangedListener listener)
removeActiveSpeakerChangedListener
in interface ActiveSpeakerDetector
listener
- the listener to unregister with this instance for
notifications about changes of the active speaker
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.