fm.liveswitch.RemoteMedia Class Reference

A collection of remote audio/video tracks. More...

Public Member Functions

fm.liveswitch.Future< Object > changeAudioSinkOutput (fm.liveswitch.SinkOutput audioSinkOutput)
 Changes the audio sink output of the first audio track while the media is active. More...
 
fm.liveswitch.Future< Object > changeVideoSinkOutput (fm.liveswitch.SinkOutput videoSinkOutput)
 Changes the video sink output of the first video track while the media is active. More...
 
fm.liveswitch.AudioSink getAudioSink ()
 Gets the first audio sink. More...
 
fm.liveswitch.SinkOutput getAudioSinkOutput ()
 Gets the current audio sink output of the first audio track. More...
 
fm.liveswitch.Future< fm.liveswitch.SinkOutput[]> getAudioSinkOutputs ()
 Gets the available audio sink outputs of the first audio track. More...
 
fm.liveswitch.AudioSink[] getAudioSinks ()
 Gets the audio sinks. More...
 
fm.liveswitch.MediaSinkBase[] getMediaSinks ()
 Gets the audio/video sinks. More...
 
fm.liveswitch.VideoSink getVideoSink ()
 Gets the first video sink. More...
 
fm.liveswitch.SinkOutput getVideoSinkOutput ()
 Gets the current video sink output of the first video track. More...
 
fm.liveswitch.Future< fm.liveswitch.SinkOutput[]> getVideoSinkOutputs ()
 Gets the available video sink outputs of the first video track. More...
 
fm.liveswitch.VideoSink[] getVideoSinks ()
 Gets the video sinks. More...
 
 RemoteMedia ()
 
void setAudioSinkOutput (fm.liveswitch.SinkOutput value)
 Sets the current audio sink output of the first audio track. More...
 
void setVideoSinkOutput (fm.liveswitch.SinkOutput value)
 Sets the current video sink output of the first video track. More...
 
- Public Member Functions inherited from fm.liveswitch.Media< fm.liveswitch.AudioTrack, fm.liveswitch.VideoTrack >
void addOnAudioDestroyed (fm.liveswitch.IAction0 value)
 Adds a handler that is raised when the audio track is destroyed. More...
 
void addOnAudioLevel (fm.liveswitch.IAction1< Double > value)
 Adds a handler that is raised periodically when the audio's level is calculated. More...
 
void addOnVideoDestroyed (fm.liveswitch.IAction0 value)
 Adds a handler that is raised when the video track is destroyed. More...
 
void addOnVideoSize (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Adds a handler that is raised whenever the video's frame size is known, once per frame. More...
 
void addOnVideoSizeChange (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Adds a handler that is raised whenever the video's frame size changes. More...
 
void destroy ()
 Destroys all non-persistent internal objects encapsulated by the Media class. More...
 
int getAudioLevelInterval ()
 Gets the interval in milliseconds between fm.liveswitch.Media#addOnAudioLevel events. More...
 
TAudioTrack[] getAudioTracks ()
 Gets all audio tracks from this media. More...
 
boolean getIsRecordingAudio ()
 Gets whether audio is being recorded locally. More...
 
boolean getIsRecordingVideo ()
 Gets whether video is being recorded locally. More...
 
fm.liveswitch.Size getVideoSize ()
 Gets the size of the video track. More...
 
TVideoTrack[] getVideoTracks ()
 Gets all video tracks from this media. More...
 
fm.liveswitch.Future< fm.liveswitch.VideoBuffergrabVideoFrame ()
 Gets the next frame from the video track once it is rendered. More...
 
 Media ()
 Initializes a new instance of the fm.liveswitch.Media class. More...
 
void removeOnAudioDestroyed (fm.liveswitch.IAction0 value)
 Removes a handler that is raised when the audio track is destroyed. More...
 
void removeOnAudioLevel (fm.liveswitch.IAction1< Double > value)
 Removes a handler that is raised periodically when the audio's level is calculated. More...
 
void removeOnVideoDestroyed (fm.liveswitch.IAction0 value)
 Removes a handler that is raised when the video track is destroyed. More...
 
void removeOnVideoSize (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Removes a handler that is raised whenever the video's frame size is known, once per frame. More...
 
void removeOnVideoSizeChange (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Removes a handler that is raised whenever the video's frame size changes. More...
 
void setAudioLevelInterval (int value)
 Sets the interval in milliseconds between fm.liveswitch.Media#addOnAudioLevel events. More...
 
- Public Member Functions inherited from fm.liveswitch.IRemoteMedia< fm.liveswitch.AudioTrack, fm.liveswitch.VideoTrack >
abstract fm.liveswitch.Future< Object > changeAudioSinkOutput (fm.liveswitch.SinkOutput audioSinkOutput)
 Changes the audio sink output of the first audio track while the media is active. More...
 
abstract fm.liveswitch.Future< Object > changeVideoSinkOutput (fm.liveswitch.SinkOutput videoSinkOutput)
 Changes the video sink output of the first video track while the media is active. More...
 
abstract fm.liveswitch.SinkOutput getAudioSinkOutput ()
 Gets the current audio sink output of the first audio track. More...
 
abstract fm.liveswitch.Future< fm.liveswitch.SinkOutput[]> getAudioSinkOutputs ()
 Gets the available audio sink outputs of the first audio track. More...
 
abstract fm.liveswitch.SinkOutput getVideoSinkOutput ()
 Gets the current video sink output of the first video track. More...
 
abstract fm.liveswitch.Future< fm.liveswitch.SinkOutput[]> getVideoSinkOutputs ()
 Gets the available video sink outputs of the first video track. More...
 
abstract void setAudioSinkOutput (fm.liveswitch.SinkOutput value)
 Sets the current audio sink output of the first audio track. More...
 
abstract void setVideoSinkOutput (fm.liveswitch.SinkOutput value)
 Sets the current video sink output of the first video track. More...
 
- Public Member Functions inherited from fm.liveswitch.IMedia< fm.liveswitch.AudioTrack, fm.liveswitch.VideoTrack >
abstract void addOnAudioDestroyed (fm.liveswitch.IAction0 value)
 Adds a handler that is raised when the audio track is destroyed. More...
 
abstract void addOnAudioLevel (fm.liveswitch.IAction1< Double > value)
 Adds a handler that is raised periodically when the audio's level is calculated. More...
 
abstract void addOnVideoDestroyed (fm.liveswitch.IAction0 value)
 Adds a handler that is raised when the video track is destroyed. More...
 
abstract void addOnVideoSize (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Adds a handler that is raised whenever the video's frame size is known, once per frame. More...
 
abstract void addOnVideoSizeChange (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Adds a handler that is raised whenever the video's frame size changes. More...
 
abstract void destroy ()
 Destroys this media stack. More...
 
abstract double getAudioGain ()
 Gets a value indicating the audio gain (input amplification). More...
 
abstract int getAudioLevelInterval ()
 Gets the interval in milliseconds between fm.liveswitch.IMedia#addOnAudioLevel events. More...
 
abstract boolean getAudioMuted ()
 Gets a value indicating whether the audio is muted. More...
 
abstract TIAudioTrack getAudioTrack ()
 Gets the audio track. More...
 
abstract TIAudioTrack[] getAudioTracks ()
 Gets the audio tracks. More...
 
abstract double getAudioVolume ()
 Gets a value indicating the audio volume (output resistance). More...
 
abstract String getId ()
 Gets the identifier. More...
 
abstract boolean getVideoMuted ()
 Gets a value indicating whether the video is muted. More...
 
abstract fm.liveswitch.Size getVideoSize ()
 Gets the size of the last processed video frame, if known. More...
 
abstract TIVideoTrack getVideoTrack ()
 Gets the video track. More...
 
abstract TIVideoTrack[] getVideoTracks ()
 Gets the video tracks. More...
 
abstract fm.liveswitch.Future< fm.liveswitch.VideoBuffergrabVideoFrame ()
 Gets the next raw video frame. More...
 
abstract void removeOnAudioDestroyed (fm.liveswitch.IAction0 value)
 Removes a handler that is raised when the audio track is destroyed. More...
 
abstract void removeOnAudioLevel (fm.liveswitch.IAction1< Double > value)
 Removes a handler that is raised periodically when the audio's level is calculated. More...
 
abstract void removeOnVideoDestroyed (fm.liveswitch.IAction0 value)
 Removes a handler that is raised when the video track is destroyed. More...
 
abstract void removeOnVideoSize (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Removes a handler that is raised whenever the video's frame size is known, once per frame. More...
 
abstract void removeOnVideoSizeChange (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Removes a handler that is raised whenever the video's frame size changes. More...
 
abstract void setAudioGain (double value)
 Sets a value indicating the audio gain (input amplification). More...
 
abstract void setAudioLevelInterval (int value)
 Sets the interval in milliseconds between fm.liveswitch.IMedia#addOnAudioLevel events. More...
 
abstract void setAudioMuted (boolean value)
 Sets a value indicating whether the audio is muted. More...
 
abstract void setAudioVolume (double value)
 Sets a value indicating the audio volume (output resistance). More...
 
abstract void setId (String value)
 Sets the identifier. More...
 
abstract void setVideoMuted (boolean value)
 Sets a value indicating whether the video is muted. More...
 

Protected Member Functions

fm.liveswitch.AudioTrack[] arrayFromAudioTracks (java.util.ArrayList< fm.liveswitch.AudioTrack > tracks)
 Creates an array of tracks from a list of audio tracks. More...
 
fm.liveswitch.VideoTrack[] arrayFromVideoTracks (java.util.ArrayList< fm.liveswitch.VideoTrack > tracks)
 Creates an array of tracks from a list of video tracks. More...
 
java.util.ArrayList< fm.liveswitch.AudioTrackcreateAudioTrackCollection ()
 Creates an audio track collection. More...
 
java.util.ArrayList< fm.liveswitch.VideoTrackcreateVideoTrackCollection ()
 Creates a video track collection. More...
 
- Protected Member Functions inherited from fm.liveswitch.Media< fm.liveswitch.AudioTrack, fm.liveswitch.VideoTrack >
void addAudioTrack (TAudioTrack audioTrack)
 Adds an audio track. More...
 
void addVideoTrack (TVideoTrack videoTrack)
 Adds a video track. More...
 
abstract TAudioTrack[] arrayFromAudioTracks (java.util.ArrayList< TAudioTrack > tracks)
 Creates an array of tracks from a list of audio tracks. More...
 
abstract TVideoTrack[] arrayFromVideoTracks (java.util.ArrayList< TVideoTrack > tracks)
 Creates an array of tracks from a list of video tracks. More...
 
abstract java.util.ArrayList< TAudioTrack > createAudioTrackCollection ()
 Creates an audio track collection. More...
 
abstract java.util.ArrayList< TVideoTrack > createVideoTrackCollection ()
 Creates a video track collection. More...
 
boolean removeAudioTrack (TAudioTrack audioTrack)
 Removes an audio track. More...
 
boolean removeVideoTrack (TVideoTrack videoTrack)
 Removes a video track. More...
 
void setIsRecordingAudio (boolean value)
 Sets whether audio is being recorded locally. More...
 
void setIsRecordingVideo (boolean value)
 Sets whether video is being recorded locally. More...
 

Detailed Description

A collection of remote audio/video tracks.

Constructor & Destructor Documentation

◆ RemoteMedia()

fm.liveswitch.RemoteMedia.RemoteMedia ( )

Member Function Documentation

◆ arrayFromAudioTracks()

fm.liveswitch.AudioTrack [] fm.liveswitch.RemoteMedia.arrayFromAudioTracks ( java.util.ArrayList< fm.liveswitch.AudioTrack tracks)
protected

Creates an array of tracks from a list of audio tracks.

Parameters
tracksThe list of tracks.

◆ arrayFromVideoTracks()

fm.liveswitch.VideoTrack [] fm.liveswitch.RemoteMedia.arrayFromVideoTracks ( java.util.ArrayList< fm.liveswitch.VideoTrack tracks)
protected

Creates an array of tracks from a list of video tracks.

Parameters
tracksThe list of tracks.

◆ changeAudioSinkOutput()

fm.liveswitch.Future<Object> fm.liveswitch.RemoteMedia.changeAudioSinkOutput ( fm.liveswitch.SinkOutput  audioSinkOutput)

Changes the audio sink output of the first audio track while the media is active.

Parameters
audioSinkOutputThe audio sink output.

◆ changeVideoSinkOutput()

fm.liveswitch.Future<Object> fm.liveswitch.RemoteMedia.changeVideoSinkOutput ( fm.liveswitch.SinkOutput  videoSinkOutput)

Changes the video sink output of the first video track while the media is active.

Parameters
videoSinkOutputThe video sink output.

◆ createAudioTrackCollection()

java.util.ArrayList<fm.liveswitch.AudioTrack> fm.liveswitch.RemoteMedia.createAudioTrackCollection ( )
protected

Creates an audio track collection.

◆ createVideoTrackCollection()

java.util.ArrayList<fm.liveswitch.VideoTrack> fm.liveswitch.RemoteMedia.createVideoTrackCollection ( )
protected

Creates a video track collection.

◆ getAudioSink()

fm.liveswitch.AudioSink fm.liveswitch.RemoteMedia.getAudioSink ( )

Gets the first audio sink.

◆ getAudioSinkOutput()

fm.liveswitch.SinkOutput fm.liveswitch.RemoteMedia.getAudioSinkOutput ( )

Gets the current audio sink output of the first audio track.

◆ getAudioSinkOutputs()

fm.liveswitch.Future<fm.liveswitch.SinkOutput[]> fm.liveswitch.RemoteMedia.getAudioSinkOutputs ( )

Gets the available audio sink outputs of the first audio track.

Returns
A future with an array of audio sink outputs.

◆ getAudioSinks()

fm.liveswitch.AudioSink [] fm.liveswitch.RemoteMedia.getAudioSinks ( )

Gets the audio sinks.

◆ getMediaSinks()

fm.liveswitch.MediaSinkBase [] fm.liveswitch.RemoteMedia.getMediaSinks ( )

Gets the audio/video sinks.

◆ getVideoSink()

fm.liveswitch.VideoSink fm.liveswitch.RemoteMedia.getVideoSink ( )

Gets the first video sink.

◆ getVideoSinkOutput()

fm.liveswitch.SinkOutput fm.liveswitch.RemoteMedia.getVideoSinkOutput ( )

Gets the current video sink output of the first video track.

◆ getVideoSinkOutputs()

fm.liveswitch.Future<fm.liveswitch.SinkOutput[]> fm.liveswitch.RemoteMedia.getVideoSinkOutputs ( )

Gets the available video sink outputs of the first video track.

Returns
A future with an array of video sink outputs.

◆ getVideoSinks()

fm.liveswitch.VideoSink [] fm.liveswitch.RemoteMedia.getVideoSinks ( )

Gets the video sinks.

◆ setAudioSinkOutput()

void fm.liveswitch.RemoteMedia.setAudioSinkOutput ( fm.liveswitch.SinkOutput  value)

Sets the current audio sink output of the first audio track.

◆ setVideoSinkOutput()

void fm.liveswitch.RemoteMedia.setVideoSinkOutput ( fm.liveswitch.SinkOutput  value)

Sets the current video sink output of the first video track.