fm.liveswitch.AudioDecoder Class Referenceabstract

An audio decoder. More...

Public Member Functions

 AudioDecoder (fm.liveswitch.AudioFormat inputFormat, fm.liveswitch.AudioFormat outputFormat)
 Initializes a new instance of the fm.liveswitch.AudioDecoder class. More...
 
boolean getDisablePlc ()
 Gets a value indicating whether to disable packet loss concealment (PLC). More...
 
long getFramesDecoded ()
 Gets the number of decoded frames. More...
 
int getMaxInputBitrate ()
 Gets the maximum allowed input bitrate, in kbps. More...
 
int getMaxOutputBitrate ()
 Gets the maximum allowed output bitrate, in kbps. More...
 
int getMinInputBitrate ()
 Gets the minimum allowed input bitrate, in kbps. More...
 
int getMinOutputBitrate ()
 Gets the minimum allowed output bitrate, in kbps. More...
 
boolean processFrame (fm.liveswitch.AudioFrame frame)
 Processes a frame. More...
 
void setDisablePlc (boolean value)
 Sets a value indicating whether to disable packet loss concealment (PLC). More...
 
- Public Member Functions inherited from fm.liveswitch.AudioPipe
 AudioPipe (fm.liveswitch.AudioFormat inputFormat, fm.liveswitch.AudioFormat outputFormat)
 Initializes a new instance of the fm.liveswitch.AudioPipe class. More...
 
 AudioPipe (fm.liveswitch.AudioFormat outputFormat)
 Initializes a new instance of the fm.liveswitch.AudioPipe class. More...
 
fm.liveswitch.AudioConfig getConfig ()
 Gets the output configuration. More...
 
double getGain ()
 Gets a value indicating the gain (input amplification) of this sink. More...
 
fm.liveswitch.AudioConfig getInputConfig ()
 Gets the input configuration. More...
 
fm.liveswitch.AudioConfig getOutputConfig ()
 Gets the output configuration. More...
 
double getVolume ()
 Gets a value indicating the volume (output resistance) of this source. More...
 
void setGain (double value)
 Sets a value indicating the gain (input amplification) of this sink. More...
 
void setVolume (double value)
 Sets a value indicating the volume (output resistance) of this source. 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 String getLabel ()
 Gets a label that identifies this instance. 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 doProcessTrackStatsFromInput (fm.liveswitch.MediaTrackStats trackStats)
 Process track stats from an input. More...
 
fm.liveswitch.AudioBuffer generatePlc (int duration)
 Generates a PLC buffer. More...
 
int getMissingDuration ()
 Gets the number of milliseconds missing in the stream between the last frame processed and the current frame. More...
 
void raiseFrame (fm.liveswitch.AudioFrame frame)
 Raises a frame. More...
 
void setMissingDuration (int value)
 Sets the number of milliseconds missing in the stream between the last frame processed and the current frame. More...
 
- Protected Member Functions inherited from fm.liveswitch.AudioPipe
fm.liveswitch.AudioFrame createFrame (fm.liveswitch.AudioBuffer buffer)
 Creates a frame. More...
 
fm.liveswitch.IAudioInputCollection createInputCollection (fm.liveswitch.IAudioOutput output)
 Creates an input collection. More...
 
fm.liveswitch.IAudioOutputCollection createOutputCollection (fm.liveswitch.IAudioInput input)
 Creates an output collection. More...
 
- 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

An audio decoder.

Constructor & Destructor Documentation

◆ AudioDecoder()

fm.liveswitch.AudioDecoder.AudioDecoder ( fm.liveswitch.AudioFormat  inputFormat,
fm.liveswitch.AudioFormat  outputFormat 
)

Initializes a new instance of the fm.liveswitch.AudioDecoder class.

Parameters
inputFormatThe input format.
outputFormatThe output format.

Member Function Documentation

◆ doProcessTrackStatsFromInput()

void fm.liveswitch.AudioDecoder.doProcessTrackStatsFromInput ( fm.liveswitch.MediaTrackStats  trackStats)
protected

Process track stats from an input.

Parameters
trackStatsThe track stats.

◆ generatePlc()

fm.liveswitch.AudioBuffer fm.liveswitch.AudioDecoder.generatePlc ( int  duration)
protected

Generates a PLC buffer.

This method uses the fm.liveswitch.DataBufferPool so the returned value MUST be freed.

Parameters
duration

◆ getDisablePlc()

boolean fm.liveswitch.AudioDecoder.getDisablePlc ( )

Gets a value indicating whether to disable packet loss concealment (PLC).

◆ getFramesDecoded()

long fm.liveswitch.AudioDecoder.getFramesDecoded ( )

Gets the number of decoded frames.

◆ getMaxInputBitrate()

int fm.liveswitch.AudioDecoder.getMaxInputBitrate ( )

Gets the maximum allowed input bitrate, in kbps.

A value of -1 indicates unset (no maximum). Returns -1 by default.

◆ getMaxOutputBitrate()

int fm.liveswitch.AudioDecoder.getMaxOutputBitrate ( )

Gets the maximum allowed output bitrate, in kbps.

A value of -1 indicates unset (no maximum). Returns -1 by default.

◆ getMinInputBitrate()

int fm.liveswitch.AudioDecoder.getMinInputBitrate ( )

Gets the minimum allowed input bitrate, in kbps.

A value of -1 indicates unset (no maximum). Returns -1 by default.

◆ getMinOutputBitrate()

int fm.liveswitch.AudioDecoder.getMinOutputBitrate ( )

Gets the minimum allowed output bitrate, in kbps.

A value of -1 indicates unset (no minimum). Returns -1 by default.

◆ getMissingDuration()

int fm.liveswitch.AudioDecoder.getMissingDuration ( )
protected

Gets the number of milliseconds missing in the stream between the last frame processed and the current frame.

This value is updated constantly, just before a frame is processed.

◆ processFrame()

boolean fm.liveswitch.AudioDecoder.processFrame ( fm.liveswitch.AudioFrame  frame)

Processes a frame.

Parameters
frameThe frame.

Reimplemented from fm.liveswitch.AudioPipe.

◆ raiseFrame()

void fm.liveswitch.AudioDecoder.raiseFrame ( fm.liveswitch.AudioFrame  frame)
protected

Raises a frame.

Parameters
frameThe frame.

Reimplemented from fm.liveswitch.AudioPipe.

◆ setDisablePlc()

void fm.liveswitch.AudioDecoder.setDisablePlc ( boolean  value)

Sets a value indicating whether to disable packet loss concealment (PLC).

◆ setMissingDuration()

void fm.liveswitch.AudioDecoder.setMissingDuration ( int  value)
protected

Sets the number of milliseconds missing in the stream between the last frame processed and the current frame.

This value is updated constantly, just before a frame is processed.