org.mobicents.media.server.spi.recorder
Interface Recorder

All Superinterfaces:
Component, MediaSink, Serializable

public interface Recorder
extends MediaSink

Author:
amit bhayani

Method Summary
 void addListener(RecorderListener listener)
          Adds listener for the recorder
 void removeListener(RecorderListener listener)
          Unregisters listener
 void setMaxRecordTime(long maxRecordTime)
          Sets the time for recording.
 void setPostSpeechTimer(long value)
          Changes post-speech timer value.
 void setRecordDir(String recordDir)
          Set the Record path.
 void setRecordFile(String uri, boolean append)
          Assign file for recording.
 
Methods inherited from interface org.mobicents.media.MediaSink
connect, disconnect, getBytesReceived, getFormats, getPacketsReceived, isConnected, isStarted, setDsp, setFormats, start, stop
 
Methods inherited from interface org.mobicents.media.Component
getId, getInterface, getName, reset
 

Method Detail

setRecordDir

void setRecordDir(String recordDir)
Set the Record path. This will be the parent path and file path passed in start(String file) will be appended to this base record path. For example if recordDir = "/home/user/recordedfiles" (for Win OS c:/recordedfiles), then calling start("myapp/recordedFile.wav") will create recorded file /home/user/recordedfiles/myapp/recordedFile.wav (for win OS c:/recordedfiles/myapp/recordedFile.wav)

Parameters:
recordDir -

setRecordFile

void setRecordFile(String uri,
                   boolean append)
                   throws IOException
Assign file for recording.

Parameters:
uri - the URI which points to a file.
Throws:
IOException
FileNotFoundException

setMaxRecordTime

void setMaxRecordTime(long maxRecordTime)
Sets the time for recording.

Parameters:
maxRecordTime - the time measured in nanoseconds

setPostSpeechTimer

void setPostSpeechTimer(long value)
Changes post-speech timer value.

Parameters:
value - the time expressed in nanoseconds.

addListener

void addListener(RecorderListener listener)
                 throws TooManyListenersException
Adds listener for the recorder

Parameters:
listener - the listener instance
Throws:
TooManyListenersException

removeListener

void removeListener(RecorderListener listener)
Unregisters listener

Parameters:
listener - the listener to be unregistered


Copyright © 2011. All Rights Reserved.