org.mobicents.media.server.impl.resource.test
Class SineGenerator
java.lang.Object
org.mobicents.media.server.impl.BaseComponent
org.mobicents.media.server.impl.AbstractSource
org.mobicents.media.server.impl.resource.test.SineGenerator
- All Implemented Interfaces:
- java.io.Serializable, org.mobicents.media.Component, org.mobicents.media.MediaSource, org.mobicents.media.server.spi.clock.Task
public class SineGenerator
- extends AbstractSource
Generates sine wave signal with specified Amplitude and frequence.
The format of output signal is Linear, 16bit, 8kHz.
- Author:
- Oleg Kulikov
- See Also:
- Serialized Form
|
Constructor Summary |
SineGenerator(org.mobicents.media.server.spi.Endpoint endpoint,
java.lang.String name)
Creates a new instance of Generator |
SineGenerator(java.lang.String name,
org.mobicents.media.server.spi.clock.Timer timer)
|
| 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, getSyncSource, isActive, isConnected, isMultipleConnectionsAllowed, isStarted, perform, resetStats, setDuration, setMediaTime, setPreffered, setSyncSource, start, started, stop, 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 |
SineGenerator
public SineGenerator(java.lang.String name,
org.mobicents.media.server.spi.clock.Timer timer)
SineGenerator
public SineGenerator(org.mobicents.media.server.spi.Endpoint endpoint,
java.lang.String name)
- Creates a new instance of Generator
setAmplitude
public void setAmplitude(short A)
getAmplitude
public short getAmplitude()
setFrequency
public void setFrequency(int f)
getFrequency
public int getFrequency()
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.
getFormats
public org.mobicents.media.Format[] getFormats()
Copyright © 2010. All Rights Reserved.