org.mobicents.media.server.impl.resource.audio
Class AudioNoiseGenerator

java.lang.Object
  extended by org.mobicents.media.server.impl.BaseComponent
      extended by org.mobicents.media.server.impl.AbstractSource
          extended by org.mobicents.media.server.impl.resource.audio.AudioNoiseGenerator
All Implemented Interfaces:
java.io.Serializable, org.mobicents.media.Component, org.mobicents.media.MediaSource, org.mobicents.media.server.spi.clock.Task

public class AudioNoiseGenerator
extends AbstractSource

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

Field Summary
 
Fields inherited from class org.mobicents.media.server.impl.AbstractSource
logger, otherParty
 
Fields inherited from class org.mobicents.media.server.impl.BaseComponent
format
 
Constructor Summary
AudioNoiseGenerator(java.lang.String name)
           
 
Method Summary
 void evolve(org.mobicents.media.Buffer buffer, long timestamp)
          This method must be overriden by concrete media source.
 org.mobicents.media.Format[] getFormats()
           
 void setPreffered(org.mobicents.media.Format fmt)
          This methods is called by media sink to setup preffered format.
 void stop()
          (Non Java-doc).
 
Methods inherited from class org.mobicents.media.server.impl.AbstractSource
afterStop, beforeStart, cancel, completed, connect, connect, disconnect, disconnect, failed, getBytesTransmitted, getDuration, getInterface, getMediaTime, getPacketsTransmitted, getSupportedFormatList, isActive, isConnected, isMultipleConnectionsAllowed, isStarted, perform, resetStats, setDuration, setMediaTime, setStarted, start, started, stopped
 
Methods inherited from class org.mobicents.media.server.impl.BaseComponent
addListener, getConnection, getEndpoint, getFormat, getId, getName, removeListener, sendEvent, setConnection, setEndpoint, subset, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mobicents.media.Component
addListener, getConnection, getEndpoint, getFormat, getId, getName, removeListener, setConnection, setEndpoint
 

Constructor Detail

AudioNoiseGenerator

public AudioNoiseGenerator(java.lang.String name)
Method Detail

setPreffered

public void setPreffered(org.mobicents.media.Format fmt)
Description copied from class: AbstractSource
This methods is called by media sink to setup preffered format. Media source in opposite direction can ask media sink to get preffered format by calling sink.getPreffred(Collection) where collection is a subset of common formats.

Overrides:
setPreffered in class AbstractSource
Parameters:
fmt - preffred format.

getFormats

public org.mobicents.media.Format[] getFormats()

evolve

public void evolve(org.mobicents.media.Buffer buffer,
                   long timestamp)
Description copied from class: AbstractSource
This method must be overriden by concrete media source. The media have to fill buffer with media data and attributes.

Specified by:
evolve in class AbstractSource
Parameters:
buffer - the buffer object for media.

stop

public void stop()
Description copied from class: AbstractSource
(Non Java-doc).

Specified by:
stop in interface org.mobicents.media.MediaSource
Overrides:
stop in class AbstractSource
See Also:
MediaSource.stop().


Copyright © 2010. All Rights Reserved.