Class CsrcAudioLevelDispatcher
- java.lang.Object
-
- org.jitsi.impl.neomedia.transform.csrc.CsrcAudioLevelDispatcher
-
public class CsrcAudioLevelDispatcher extends Object
A simple dispatcher that handles new audio levels reported from incoming RTP packets and then asynchronously delivers them to associated AudioMediaStreamImpl. The asynchronous processing is necessary due to time sensitive nature of incoming RTP packets.- Author:
- Emil Ivov, Lyubomir Marinov, Yura Yaroshevich
-
-
Constructor Summary
Constructors Constructor Description CsrcAudioLevelDispatcher(AudioMediaStreamImpl mediaStream)Initializes a new CsrcAudioLevelDispatcher to dispatch events to a specific AudioMediaStreamImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLevels(long[] levels, long rtpTime)A level matrix that we should deliver to our media stream and its listeners in a separate thread.voidclose()Closes currentCsrcAudioLevelDispatcherto prevent further audio level updates delivery to associated media stream.
-
-
-
Constructor Detail
-
CsrcAudioLevelDispatcher
public CsrcAudioLevelDispatcher(AudioMediaStreamImpl mediaStream)
Initializes a new CsrcAudioLevelDispatcher to dispatch events to a specific AudioMediaStreamImpl.- Parameters:
mediaStream- the AudioMediaStreamImpl to which the new instance is to dispatch events
-
-
Method Detail
-
addLevels
public void addLevels(long[] levels, long rtpTime)A level matrix that we should deliver to our media stream and its listeners in a separate thread.- Parameters:
levels- the levels that we'd like to queue for processing.rtpTime- the timestamp carried by the RTP packet which carries the specified levels
-
close
public void close()
Closes currentCsrcAudioLevelDispatcherto prevent further audio level updates delivery to associated media stream.
-
-