fm.liveswitch.matroska.AudioSink Class Reference

A Matroska-file-based audio sink. More...

Public Member Functions

void addOnFileClose (fm.liveswitch.IAction0 value)
 Adds a handler that is raised when an existing file is close in response to this sink being deactivated or destroyed. More...
 
void addOnFileOpen (fm.liveswitch.IAction0 value)
 Adds a handler that is raised when a new file is opened in response to this sink being activated and processing a frame. More...
 
 AudioSink (String path)
 Initializes a new instance of the fm.liveswitch.matroska.AudioSink class. More...
 
 AudioSink (String path, fm.liveswitch.AudioFormat format)
 Initializes a new instance of the fm.liveswitch.matroska.AudioSink class. More...
 
 AudioSink (String path, fm.liveswitch.IAudioOutput input)
 Initializes a new instance of the fm.liveswitch.matroska.AudioSink class. More...
 
long getBaseTimestamp ()
 Gets the base timestamp - the timestamp of the first frame processed by the recorder after being activated. More...
 
String getLabel ()
 Gets a label that identifies this class. More...
 
String getLastFilePath ()
 Gets the last known file path. More...
 
long getLastTimestamp ()
 Gets the last timestamp processed by the recorder. More...
 
String getOpenFilePath ()
 Gets the currently open file path. More...
 
String getPath ()
 Gets the path. More...
 
void removeOnFileClose (fm.liveswitch.IAction0 value)
 Removes a handler that is raised when an existing file is close in response to this sink being deactivated or destroyed. More...
 
void removeOnFileOpen (fm.liveswitch.IAction0 value)
 Removes a handler that is raised when a new file is opened in response to this sink being activated and processing a frame. More...
 
- Public Member Functions inherited from fm.liveswitch.AudioSink
 AudioSink ()
 Initializes a new instance of the fm.liveswitch.AudioSink class. More...
 
 AudioSink (fm.liveswitch.AudioFormat inputFormat)
 Initializes a new instance of the fm.liveswitch.AudioSink class. More...
 
fm.liveswitch.AudioConfig getConfig ()
 Gets the input configuration. More...
 
double getGain ()
 Gets a value indicating the gain (input amplification) of this sink. More...
 
boolean processFrame (fm.liveswitch.AudioFrame frame)
 Processes a frame. More...
 
void setGain (double value)
 Sets a value indicating the gain (input amplification) of this sink. More...
 
- Public Member Functions inherited from fm.liveswitch.MediaSinkBase
String getExternalId ()
 Gets the external identifier. More...
 
String getId ()
 Gets the identifier. More...
 
String getTag ()
 Gets optional data to associate with this instance. More...
 
void setExternalId (String value)
 Sets the external identifier. More...
 
void setTag (String value)
 Sets optional data to associate with this instance. More...
 
- Public Member Functions inherited from fm.liveswitch.Dynamic
java.util.HashMap< String, Object > getDynamicProperties ()
 Gets all dynamic properties on this instance. More...
 
Object getDynamicValue (String key)
 Gets a property value from the local cache. More...
 
void setDynamicValue (String key, Object value)
 Sets a property value in the local cache. More...
 
boolean unsetDynamicValue (String key)
 Removes a property value from the local cache. More...
 
- Public Member Functions inherited from fm.liveswitch.IElement
abstract String getExternalId ()
 Gets the external identifier. More...
 
abstract String getId ()
 Gets the identifier. More...
 
abstract String getPipelineJson ()
 Gets the pipeline JSON with this as the central point. More...
 
abstract void setExternalId (String value)
 Sets the external identifier. More...
 
- Public Member Functions inherited from fm.liveswitch.IMediaElement
abstract boolean destroy ()
 Destroys this instance. More...
 
abstract boolean getDeactivated ()
 Gets a value indicating whether this instance is deactivated. More...
 
abstract boolean getDisabled ()
 Gets a value indicating whether this instance is disabled. More...
 
abstract boolean getMuted ()
 Gets a value indicating whether this instance is muted. More...
 
abstract boolean getPaused ()
 Gets a value indicating whether this instance is paused. More...
 
abstract boolean getPersistent ()
 Gets a value indicating whether this instance is persistent. More...
 
abstract void setDeactivated (boolean value)
 Sets a value indicating whether this instance is deactivated. More...
 
abstract void setMuted (boolean value)
 Sets a value indicating whether this instance is muted. More...
 

Protected Member Functions

void doDestroy ()
 Destroys this instance. More...
 
void doProcessFrame (fm.liveswitch.AudioFrame frame, fm.liveswitch.AudioBuffer inputBuffer)
 Processes a frame. More...
 
- Protected Member Functions inherited from fm.liveswitch.AudioSink
fm.liveswitch.IAudioOutputCollection createOutputCollection (fm.liveswitch.IAudioInput input)
 Creates an output collection. More...
 
- Protected Member Functions inherited from fm.liveswitch.MediaSinkBase
 MediaSinkBase ()
 
- Protected Member Functions inherited from fm.liveswitch.Dynamic
 Dynamic ()
 
- Protected Member Functions inherited from fm.liveswitch.Serializable
boolean getIsDirty ()
 Gets a value indicating whether this instance is dirty. More...
 
 Serializable ()
 Initializes a new instance of the fm.liveswitch.Serializable class. More...
 
void setIsDirty (boolean value)
 Sets a value indicating whether this instance is dirty. More...
 

Detailed Description

A Matroska-file-based audio sink.

Constructor & Destructor Documentation

◆ AudioSink() [1/3]

fm.liveswitch.matroska.AudioSink.AudioSink ( String  path)

Initializes a new instance of the fm.liveswitch.matroska.AudioSink class.

Parameters
pathThe path.

◆ AudioSink() [2/3]

fm.liveswitch.matroska.AudioSink.AudioSink ( String  path,
fm.liveswitch.AudioFormat  format 
)

Initializes a new instance of the fm.liveswitch.matroska.AudioSink class.

Parameters
pathThe path.
formatThe format.

◆ AudioSink() [3/3]

fm.liveswitch.matroska.AudioSink.AudioSink ( String  path,
fm.liveswitch.IAudioOutput  input 
)

Initializes a new instance of the fm.liveswitch.matroska.AudioSink class.

Parameters
pathThe path.
inputThe input.

Member Function Documentation

◆ addOnFileClose()

void fm.liveswitch.matroska.AudioSink.addOnFileClose ( fm.liveswitch.IAction0  value)

Adds a handler that is raised when an existing file is close in response to this sink being deactivated or destroyed.

◆ addOnFileOpen()

void fm.liveswitch.matroska.AudioSink.addOnFileOpen ( fm.liveswitch.IAction0  value)

Adds a handler that is raised when a new file is opened in response to this sink being activated and processing a frame.

◆ doDestroy()

void fm.liveswitch.matroska.AudioSink.doDestroy ( )
protected

Destroys this instance.

◆ doProcessFrame()

void fm.liveswitch.matroska.AudioSink.doProcessFrame ( fm.liveswitch.AudioFrame  frame,
fm.liveswitch.AudioBuffer  inputBuffer 
)
protected

Processes a frame.

Parameters
frameThe frame.
inputBufferThe input buffer.

◆ getBaseTimestamp()

long fm.liveswitch.matroska.AudioSink.getBaseTimestamp ( )

Gets the base timestamp - the timestamp of the first frame processed by the recorder after being activated.

This timestamp will change each time a new file is created in response to the sink being activated.

◆ getLabel()

String fm.liveswitch.matroska.AudioSink.getLabel ( )

Gets a label that identifies this class.

Implements fm.liveswitch.IMediaElement.

◆ getLastFilePath()

String fm.liveswitch.matroska.AudioSink.getLastFilePath ( )

Gets the last known file path.

◆ getLastTimestamp()

long fm.liveswitch.matroska.AudioSink.getLastTimestamp ( )

Gets the last timestamp processed by the recorder.

◆ getOpenFilePath()

String fm.liveswitch.matroska.AudioSink.getOpenFilePath ( )

Gets the currently open file path.

◆ getPath()

String fm.liveswitch.matroska.AudioSink.getPath ( )

Gets the path.

◆ removeOnFileClose()

void fm.liveswitch.matroska.AudioSink.removeOnFileClose ( fm.liveswitch.IAction0  value)

Removes a handler that is raised when an existing file is close in response to this sink being deactivated or destroyed.

◆ removeOnFileOpen()

void fm.liveswitch.matroska.AudioSink.removeOnFileOpen ( fm.liveswitch.IAction0  value)

Removes a handler that is raised when a new file is opened in response to this sink being activated and processing a frame.