org.mobicents.media.server.impl.resource.dtmf
Class GeneratorImpl
java.lang.Object
org.mobicents.media.server.impl.BaseComponent
org.mobicents.media.server.impl.AbstractSource
org.mobicents.media.server.impl.resource.dtmf.GeneratorImpl
- All Implemented Interfaces:
- Serializable, Component, MediaSource, DtmfGenerator
public class GeneratorImpl
- extends AbstractSource
- implements DtmfGenerator
InbandGenerator generates Inband DTMF Tone only for uncompressed LINEAR
codec. After creating instance of InbandGenerator, it needs to be initialized
so that all the Tones are generated and kept ready for transmission once
start is called.
By default the Tone duration is 80ms. This is suited for Tone Detector who
has Tone duration of greater than 40 and less than 80ms. For Tone Detector
who's Tone duration is set greater than 80ms may fail to detect Tone
generated by InbandGenerator(with duration 80ms). In that case increase the
duration here too.
- Author:
- Oleg Kulikov, amit bhayani
- See Also:
- Serialized Form
| Methods inherited from class org.mobicents.media.server.impl.AbstractSource |
completed, connect, disconnect, failed, getBytesTransmitted, getDuration, getMediaTime, getPacketsTransmitted, isConnected, isStarted, report, reset, setDuration, setInitialDelay, setMediaTime, started, stopped, wakeup |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.mobicents.media.MediaSource |
connect, disconnect, getBytesTransmitted, getDuration, getMediaTime, getPacketsTransmitted, isConnected, isStarted, setDuration, setInitialDelay, setMediaTime |
events
public static final String[][] events
GeneratorImpl
public GeneratorImpl(String name,
org.mobicents.media.server.scheduler.Scheduler scheduler)
start
public void start()
- Specified by:
start in interface MediaSource- Specified by:
start in interface DtmfGenerator- Overrides:
start in class AbstractSource
setDigit
public void setDigit(String digit)
- Specified by:
setDigit in interface DtmfGenerator
getDigit
public String getDigit()
- Specified by:
getDigit in interface DtmfGenerator
setToneDuration
public void setToneDuration(int duration)
- Specified by:
setToneDuration in interface DtmfGenerator
getToneDuration
public int getToneDuration()
- Specified by:
getToneDuration in interface DtmfGenerator
getVolume
public int getVolume()
- Specified by:
getVolume in interface DtmfGenerator
setVolume
public void setVolume(int volume)
- Specified by:
setVolume in interface DtmfGenerator
getNativeFormats
public Formats getNativeFormats()
evolve
public Frame evolve(long timestamp)
- Specified by:
evolve in class AbstractSource
stop
public void stop()
- Specified by:
stop in interface MediaSource- Specified by:
stop in interface DtmfGenerator- Overrides:
stop in class AbstractSource
getInterface
public <T> T getInterface(Class<T> interfaceType)
- Specified by:
getInterface in interface Component- Overrides:
getInterface in class AbstractSource
Copyright © 2012 TeleStax, Inc.. All Rights Reserved.