Interface AudioMediaStream

  • All Superinterfaces:
    MediaStream
    All Known Implementing Classes:
    AudioMediaStreamImpl

    public interface AudioMediaStream
    extends MediaStream
    Extends the MediaStream interface and adds methods specific to audio streaming.
    Author:
    Emil Ivov, Lyubomir Marinov
    • Field Detail

      • DISABLE_DTMF_HANDLING_PNAME

        static final String DISABLE_DTMF_HANDLING_PNAME
        The name of the property which controls whether handling of RFC4733 DTMF packets should be disabled or enabled. If disabled, packets will not be processed or dropped (regardless of whether there is a payload type number registered for the telephone-event format).
    • Method Detail

      • addDTMFListener

        void addDTMFListener​(DTMFListener listener)
        Registers a listener that would receive notification events if the remote party starts sending DTMF tones to us.
        Parameters:
        listener - the DTMFListener that we'd like to register.
      • removeDTMFListener

        void removeDTMFListener​(DTMFListener listener)
        Removes listener from the list of DTMFListeners registered to receive events for incoming DTMF tones.
        Parameters:
        listener - the listener that we'd like to unregister
      • setCsrcAudioLevelListener

        void setCsrcAudioLevelListener​(CsrcAudioLevelListener listener)
        Registers listener as the CsrcAudioLevelListener that will receive notifications for changes in the levels of conference participants that the remote party could be mixing.
        Parameters:
        listener - the CsrcAudioLevelListener that we'd like to register or null if we'd like to stop receiving notifications.
      • setLocalUserAudioLevelListener

        void setLocalUserAudioLevelListener​(SimpleAudioLevelListener listener)
        Sets listener as the SimpleAudioLevelListener registered to receive notifications for changes in the levels of the audio that this stream is sending out.
        Parameters:
        listener - the SimpleAudioLevelListener that we'd like to register or null if we want to stop local audio level measurements.
      • setOutputVolumeControl

        void setOutputVolumeControl​(VolumeControl outputVolumeControl)
        Sets the VolumeControl which is to control the volume (level) of the audio received in/by this AudioMediaStream and played back.
        Parameters:
        outputVolumeControl - the VolumeControl which is to control the volume (level) of the audio received in this AudioMediaStream and played back
      • setStreamAudioLevelListener

        void setStreamAudioLevelListener​(SimpleAudioLevelListener listener)
        Sets listener as the SimpleAudioLevelListener registered to receive notifications for changes in the levels of the party that's at the other end of this stream.
        Parameters:
        listener - the SimpleAudioLevelListener that we'd like to register or null if we want to stop stream audio level measurements.
      • startSendingDTMF

        void startSendingDTMF​(DTMFTone tone,
                              DTMFMethod dtmfMethod,
                              int minimalToneDuration,
                              int maximalToneDuration,
                              int volume)
        Starts sending the specified DTMFTone until the stopSendingDTMF() method is called (Excepts for INBAND DTMF, which stops by itself this is why where there is no need to call the stopSendingDTMF). Callers should keep in mind the fact that calling this method would most likely interrupt all audio transmission until the corresponding stop method is called. Also, calling this method successively without invoking the corresponding stop method between the calls will simply replace the DTMFTone from the first call with that from the second.
        Parameters:
        tone - the DTMFTone to start sending.
        dtmfMethod - The kind of DTMF used (RTP, SIP-INOF or INBAND).
        minimalToneDuration - The minimal DTMF tone duration.
        maximalToneDuration - The maximal DTMF tone duration.
        volume - The DTMF tone volume. Describes the power level of the tone, expressed in dBm0 after dropping the sign.
      • stopSendingDTMF

        void stopSendingDTMF​(DTMFMethod dtmfMethod)
        Interrupts transmission of a DTMFTone started with the startSendingDTMF method. This method has no effect if no tone is being currently sent.
        Parameters:
        dtmfMethod - the DTMFMethod to stop sending.