org.mobicents.media.server.impl.resource.cnf
Class AudioMixer

java.lang.Object
  extended by org.mobicents.media.server.impl.BaseComponent
      extended by org.mobicents.media.server.impl.AbstractSink
          extended by org.mobicents.media.server.impl.resource.cnf.AudioMixer
All Implemented Interfaces:
java.io.Serializable, org.mobicents.media.Component, org.mobicents.media.MediaSink

public class AudioMixer
extends AbstractSink
implements java.io.Serializable

Author:
Oleg Kulikov
See Also:
Serialized Form

Field Summary
protected static org.mobicents.media.Format[] formats
           
protected static org.mobicents.media.format.AudioFormat LINEAR
           
 
Fields inherited from class org.mobicents.media.server.impl.AbstractSink
otherParty
 
Fields inherited from interface org.mobicents.media.Component
AUDIO_PLAYER, AUDIO_RECORDER, DTMF_DETECTOR, DTMF_GENERATOR
 
Constructor Summary
AudioMixer(org.mobicents.media.server.spi.Endpoint endpoint, java.lang.String name)
          Creates a new instance of AudioMixer.
 
Method Summary
 void connect(org.mobicents.media.MediaSource stream)
          (Non Java-doc).
 void disconnect(org.mobicents.media.MediaSource stream)
          (Non Java-doc).
 org.mobicents.media.Format[] getFormats()
           
 int getInputCount()
           
 org.mobicents.media.MediaSource getOutput()
           
 boolean isAcceptable(org.mobicents.media.Format fmt)
           
 void receive(org.mobicents.media.Buffer buffer)
           
 int size()
          Gets the numbers of input streams used for mixing.
 void start()
          Starts mixer.
 void stop()
          Terminates mixer.
 java.lang.String toString()
           
 
Methods inherited from class org.mobicents.media.server.impl.AbstractSink
isConnected
 
Methods inherited from class org.mobicents.media.server.impl.BaseComponent
addListener, getConnection, getEndpoint, getId, getName, getResourceType, removeListener, sendEvent, setConnection, setEndpoint, setResourceType
 
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, getId, getName, getResourceType, removeListener, setConnection, setEndpoint, setResourceType
 

Field Detail

LINEAR

protected static final org.mobicents.media.format.AudioFormat LINEAR

formats

protected static final org.mobicents.media.Format[] formats
Constructor Detail

AudioMixer

public AudioMixer(org.mobicents.media.server.spi.Endpoint endpoint,
                  java.lang.String name)
Creates a new instance of AudioMixer.

Parameters:
packetPeriod - packetization period in milliseconds.
fmt - format of the output stream.
Method Detail

size

public int size()
Gets the numbers of input streams used for mixing.

Returns:
the numbers of streams.

getOutput

public org.mobicents.media.MediaSource getOutput()

connect

public void connect(org.mobicents.media.MediaSource stream)
Description copied from class: AbstractSink
(Non Java-doc).

Specified by:
connect in interface org.mobicents.media.MediaSink
Overrides:
connect in class AbstractSink
See Also:
org.mobicents.MediaSink#connect(MediaStream).

disconnect

public void disconnect(org.mobicents.media.MediaSource stream)
Description copied from class: AbstractSink
(Non Java-doc).

Specified by:
disconnect in interface org.mobicents.media.MediaSink
Overrides:
disconnect in class AbstractSink
See Also:
org.mobicents.MediaSink#disconnect(MediaStream).

getInputCount

public int getInputCount()

start

public void start()
Starts mixer.


stop

public void stop()
Terminates mixer.


toString

public java.lang.String toString()
Overrides:
toString in class BaseComponent

isAcceptable

public boolean isAcceptable(org.mobicents.media.Format fmt)
Specified by:
isAcceptable in interface org.mobicents.media.MediaSink

receive

public void receive(org.mobicents.media.Buffer buffer)
Specified by:
receive in interface org.mobicents.media.MediaSink

getFormats

public org.mobicents.media.Format[] getFormats()
Specified by:
getFormats in interface org.mobicents.media.MediaSink


Copyright © 2009. All Rights Reserved.