fm.liveswitch.VideoSource Class Referenceabstract

A video source. More...

Public Member Functions

void addOnRaiseSizeChange (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Adds a handler that is raised when a frame is about to be raised with a size that does not match the prior frame. More...
 
int getAverageFrameRate ()
 Gets the average frame rate. More...
 
String getContent ()
 Gets the content descriptor. More...
 
long getFrameCount ()
 Gets the frame count. More...
 
double getFrameRateDistance (double frameRate1, double frameRate2)
 Gets the distance between two frame rates. More...
 
fm.liveswitch.EncodingInfo getMaxOutputEncoding ()
 Gets the maximum allowed output encoding. More...
 
double getMaxOutputFrameRate ()
 Gets the maximum allowed output frame-rate, in fps. More...
 
int getMaxOutputHeight ()
 Gets the maximum allowed output height. More...
 
double getMaxOutputScale ()
 Gets the maximum allowed output scale. More...
 
fm.liveswitch.Size getMaxOutputSize ()
 Gets the maximum allowed output size. More...
 
int getMaxOutputWidth ()
 Gets the maximum allowed output width. More...
 
fm.liveswitch.EncodingInfo getMinOutputEncoding ()
 Gets the minimum allowed output encoding. More...
 
double getMinOutputFrameRate ()
 Gets the minimum allowed output frame-rate, in fps. More...
 
int getMinOutputHeight ()
 Gets the minimum allowed output height. More...
 
double getMinOutputScale ()
 Gets the minimum allowed output scale. More...
 
fm.liveswitch.Size getMinOutputSize ()
 Gets the minimum allowed output size. More...
 
int getMinOutputWidth ()
 Gets the minimum allowed output width. More...
 
boolean getOverConstrainedFrameRate ()
 Gets whether the source frame-rate is over-constrained. More...
 
boolean getOverConstrainedHeight ()
 Gets whether the source height is over-constrained. More...
 
boolean getOverConstrainedOutput ()
 Gets whether the output is over-contrained. More...
 
boolean getOverConstrainedOutputFrameRate ()
 Gets whether the minimum allowed output frame-rate exceeds the maximum allowed output frame-rate. More...
 
boolean getOverConstrainedOutputHeight ()
 Gets whether the minimum allowed output height exceeds the maximum allowed output height. More...
 
boolean getOverConstrainedOutputScale ()
 Gets whether the minimum allowed output scale exceeds the maximum allowed output scale. More...
 
boolean getOverConstrainedOutputSize ()
 Gets whether the minimum allowed output size exceeds the maximum allowed output size. More...
 
boolean getOverConstrainedOutputWidth ()
 Gets whether the minimum allowed output width exceeds the maximum allowed output width. More...
 
boolean getOverConstrainedScale ()
 Gets whether the source scale is over-constrained. More...
 
boolean getOverConstrainedSize ()
 Gets whether the source size is over-constrained. More...
 
boolean getOverConstrainedWidth ()
 Gets whether the source width is over-constrained. More...
 
int getSizeDistance (int width1, int height1, int width2, int height2)
 Gets the distance between two sizes. More...
 
fm.liveswitch.EncodingInfo getTargetOutputEncoding ()
 Gets the target output encoding. More...
 
double getTargetOutputFrameRate ()
 Gets the target output frame-rate, in fps. More...
 
int getTargetOutputHeight ()
 Gets the target output height. More...
 
double getTargetOutputScale ()
 Gets the target output scale. More...
 
fm.liveswitch.Size getTargetOutputSize ()
 Gets the target output size. More...
 
int getTargetOutputWidth ()
 Gets the target output width. More...
 
fm.liveswitch.VideoType getVideoType ()
 Gets the video type. More...
 
void removeOnRaiseSizeChange (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Removes a handler that is raised when a frame is about to be raised with a size that does not match the prior frame. More...
 
 VideoSource (fm.liveswitch.VideoFormat outputFormat)
 Initializes a new instance of the fm.liveswitch.VideoSource class. More...
 
- Public Member Functions inherited from fm.liveswitch.MediaSourceBase
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...
 
abstract fm.liveswitch.Future< Object > start ()
 Starts this instance. More...
 
abstract fm.liveswitch.Future< Object > stop ()
 Stops 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 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

fm.liveswitch.IVideoInputCollection createInputCollection (fm.liveswitch.IVideoOutput output)
 Creates an input collection. More...
 
boolean outputCanProcessFrame (fm.liveswitch.IVideoInput output)
 Determines whether an output can process a frame from this pipe. More...
 
void raiseFrame (fm.liveswitch.VideoFrame frame)
 Raises a frame. More...
 
void setMaxOutputEncoding (fm.liveswitch.EncodingInfo value)
 Sets the maximum allowed output encoding. More...
 
void setMaxOutputFrameRate (double value)
 Sets the maximum allowed output frame-rate, in fps. More...
 
void setMaxOutputScale (double value)
 Sets the maximum allowed output scale. More...
 
void setMaxOutputSize (fm.liveswitch.Size value)
 Sets the maximum allowed output size. More...
 
void setMinOutputEncoding (fm.liveswitch.EncodingInfo value)
 Sets the minimum allowed output encoding. More...
 
void setMinOutputFrameRate (double value)
 Sets the minimum allowed output frame-rate, in fps. More...
 
void setMinOutputScale (double value)
 Sets the minimum allowed output scale. More...
 
void setMinOutputSize (fm.liveswitch.Size value)
 Sets the minimum allowed output size. More...
 
void setTargetOutputEncoding (fm.liveswitch.EncodingInfo value)
 Sets the target output encoding. More...
 
void setTargetOutputFrameRate (double value)
 Sets the target output frame-rate, in fps. More...
 
void setTargetOutputScale (double value)
 Sets the target output scale. More...
 
void setTargetOutputSize (fm.liveswitch.Size value)
 Sets the target output size. More...
 
void setVideoType (fm.liveswitch.VideoType value)
 Sets the video type. More...
 
- Protected Member Functions inherited from fm.liveswitch.MediaSourceBase
 MediaSourceBase ()
 
- 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 video source.

Constructor & Destructor Documentation

◆ VideoSource()

fm.liveswitch.VideoSource.VideoSource ( fm.liveswitch.VideoFormat  outputFormat)

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

Parameters
outputFormatThe output format.

Member Function Documentation

◆ addOnRaiseSizeChange()

void fm.liveswitch.VideoSource.addOnRaiseSizeChange ( fm.liveswitch.IAction1< fm.liveswitch.Size value)

Adds a handler that is raised when a frame is about to be raised with a size that does not match the prior frame.

◆ createInputCollection()

fm.liveswitch.IVideoInputCollection fm.liveswitch.VideoSource.createInputCollection ( fm.liveswitch.IVideoOutput  output)
protected

Creates an input collection.

Parameters
outputThe source.

◆ getAverageFrameRate()

int fm.liveswitch.VideoSource.getAverageFrameRate ( )

Gets the average frame rate.

◆ getContent()

String fm.liveswitch.VideoSource.getContent ( )

Gets the content descriptor.

◆ getFrameCount()

long fm.liveswitch.VideoSource.getFrameCount ( )

Gets the frame count.

◆ getFrameRateDistance()

double fm.liveswitch.VideoSource.getFrameRateDistance ( double  frameRate1,
double  frameRate2 
)

Gets the distance between two frame rates.

Parameters
frameRate1The first frame rate.
frameRate2The second frame rate.
Returns
The positive distance between the two frame rates.

◆ getMaxOutputEncoding()

fm.liveswitch.EncodingInfo fm.liveswitch.VideoSource.getMaxOutputEncoding ( )

Gets the maximum allowed output encoding.

◆ getMaxOutputFrameRate()

double fm.liveswitch.VideoSource.getMaxOutputFrameRate ( )

Gets the maximum allowed output frame-rate, in fps.

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

Implements fm.liveswitch.IVideoOutput.

Reimplemented in fm.liveswitch.ScreenSourceBase, fm.liveswitch.NullVideoSource, and fm.liveswitch.CameraSourceBase.

◆ getMaxOutputHeight()

int fm.liveswitch.VideoSource.getMaxOutputHeight ( )

Gets the maximum allowed output height.

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

Implements fm.liveswitch.IVideoOutput.

◆ getMaxOutputScale()

double fm.liveswitch.VideoSource.getMaxOutputScale ( )

Gets the maximum allowed output scale.

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

Implements fm.liveswitch.IVideoOutput.

◆ getMaxOutputSize()

fm.liveswitch.Size fm.liveswitch.VideoSource.getMaxOutputSize ( )

Gets the maximum allowed output size.

A value of null indicates unset (no maximum).

Implements fm.liveswitch.IVideoOutput.

Reimplemented in fm.liveswitch.ScreenSourceBase, fm.liveswitch.NullVideoSource, and fm.liveswitch.CameraSourceBase.

◆ getMaxOutputWidth()

int fm.liveswitch.VideoSource.getMaxOutputWidth ( )

Gets the maximum allowed output width.

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

Implements fm.liveswitch.IVideoOutput.

◆ getMinOutputEncoding()

fm.liveswitch.EncodingInfo fm.liveswitch.VideoSource.getMinOutputEncoding ( )

Gets the minimum allowed output encoding.

◆ getMinOutputFrameRate()

double fm.liveswitch.VideoSource.getMinOutputFrameRate ( )

Gets the minimum allowed output frame-rate, in fps.

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

Implements fm.liveswitch.IVideoOutput.

Reimplemented in fm.liveswitch.ScreenSourceBase, fm.liveswitch.NullVideoSource, and fm.liveswitch.CameraSourceBase.

◆ getMinOutputHeight()

int fm.liveswitch.VideoSource.getMinOutputHeight ( )

Gets the minimum allowed output height.

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

Implements fm.liveswitch.IVideoOutput.

◆ getMinOutputScale()

double fm.liveswitch.VideoSource.getMinOutputScale ( )

Gets the minimum allowed output scale.

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

Implements fm.liveswitch.IVideoOutput.

◆ getMinOutputSize()

fm.liveswitch.Size fm.liveswitch.VideoSource.getMinOutputSize ( )

Gets the minimum allowed output size.

A value of null indicates unset (no minimum).

Implements fm.liveswitch.IVideoOutput.

Reimplemented in fm.liveswitch.ScreenSourceBase, fm.liveswitch.NullVideoSource, and fm.liveswitch.CameraSourceBase.

◆ getMinOutputWidth()

int fm.liveswitch.VideoSource.getMinOutputWidth ( )

Gets the minimum allowed output width.

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

Implements fm.liveswitch.IVideoOutput.

◆ getOverConstrainedFrameRate()

boolean fm.liveswitch.VideoSource.getOverConstrainedFrameRate ( )

Gets whether the source frame-rate is over-constrained.

A source frame-rate is over-constrained if the output frame-rate is over-constrained.

◆ getOverConstrainedHeight()

boolean fm.liveswitch.VideoSource.getOverConstrainedHeight ( )

Gets whether the source height is over-constrained.

A source height is over-constrained if the output height is over-constrained.

◆ getOverConstrainedOutput()

boolean fm.liveswitch.VideoSource.getOverConstrainedOutput ( )

Gets whether the output is over-contrained.

An output is over-constrained if it's output bitrate, output scale, output frame-rate, output size is over-contrained.

◆ getOverConstrainedOutputFrameRate()

boolean fm.liveswitch.VideoSource.getOverConstrainedOutputFrameRate ( )

Gets whether the minimum allowed output frame-rate exceeds the maximum allowed output frame-rate.

◆ getOverConstrainedOutputHeight()

boolean fm.liveswitch.VideoSource.getOverConstrainedOutputHeight ( )

Gets whether the minimum allowed output height exceeds the maximum allowed output height.

◆ getOverConstrainedOutputScale()

boolean fm.liveswitch.VideoSource.getOverConstrainedOutputScale ( )

Gets whether the minimum allowed output scale exceeds the maximum allowed output scale.

◆ getOverConstrainedOutputSize()

boolean fm.liveswitch.VideoSource.getOverConstrainedOutputSize ( )

Gets whether the minimum allowed output size exceeds the maximum allowed output size.

◆ getOverConstrainedOutputWidth()

boolean fm.liveswitch.VideoSource.getOverConstrainedOutputWidth ( )

Gets whether the minimum allowed output width exceeds the maximum allowed output width.

◆ getOverConstrainedScale()

boolean fm.liveswitch.VideoSource.getOverConstrainedScale ( )

Gets whether the source scale is over-constrained.

A source scale is over-constrained if the output scale is over-constrained.

◆ getOverConstrainedSize()

boolean fm.liveswitch.VideoSource.getOverConstrainedSize ( )

Gets whether the source size is over-constrained.

A source size is over-constrained if the output size is over-constrained.

◆ getOverConstrainedWidth()

boolean fm.liveswitch.VideoSource.getOverConstrainedWidth ( )

Gets whether the source width is over-constrained.

A source width is over-constrained if the output width is over-constrained.

◆ getSizeDistance()

int fm.liveswitch.VideoSource.getSizeDistance ( int  width1,
int  height1,
int  width2,
int  height2 
)

Gets the distance between two sizes.

Parameters
width1The first width.
height1The first height.
width2The second width.
height2The second height.
Returns
The positive linear distance between the two sizes.

◆ getTargetOutputEncoding()

fm.liveswitch.EncodingInfo fm.liveswitch.VideoSource.getTargetOutputEncoding ( )

Gets the target output encoding.

◆ getTargetOutputFrameRate()

double fm.liveswitch.VideoSource.getTargetOutputFrameRate ( )

Gets the target output frame-rate, in fps.

A value of -1 indicates unset (no target).

Implements fm.liveswitch.IVideoOutput.

Reimplemented in fm.liveswitch.ScreenSourceBase, fm.liveswitch.NullVideoSource, and fm.liveswitch.CameraSourceBase.

◆ getTargetOutputHeight()

int fm.liveswitch.VideoSource.getTargetOutputHeight ( )

Gets the target output height.

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

Implements fm.liveswitch.IVideoOutput.

◆ getTargetOutputScale()

double fm.liveswitch.VideoSource.getTargetOutputScale ( )

Gets the target output scale.

A value of -1 indicates unset (no target).

Implements fm.liveswitch.IVideoOutput.

◆ getTargetOutputSize()

fm.liveswitch.Size fm.liveswitch.VideoSource.getTargetOutputSize ( )

Gets the target output size.

A value of null indicates unset (no target).

Implements fm.liveswitch.IVideoOutput.

Reimplemented in fm.liveswitch.ScreenSourceBase, fm.liveswitch.NullVideoSource, and fm.liveswitch.CameraSourceBase.

◆ getTargetOutputWidth()

int fm.liveswitch.VideoSource.getTargetOutputWidth ( )

Gets the target output width.

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

Implements fm.liveswitch.IVideoOutput.

◆ getVideoType()

fm.liveswitch.VideoType fm.liveswitch.VideoSource.getVideoType ( )

Gets the video type.

Implements fm.liveswitch.IVideoOutput.

◆ outputCanProcessFrame()

boolean fm.liveswitch.VideoSource.outputCanProcessFrame ( fm.liveswitch.IVideoInput  output)
protected

Determines whether an output can process a frame from this pipe.

Parameters
outputThe output.

◆ raiseFrame()

void fm.liveswitch.VideoSource.raiseFrame ( fm.liveswitch.VideoFrame  frame)
protected

Raises a frame.

Parameters
frameThe frame.

◆ removeOnRaiseSizeChange()

void fm.liveswitch.VideoSource.removeOnRaiseSizeChange ( fm.liveswitch.IAction1< fm.liveswitch.Size value)

Removes a handler that is raised when a frame is about to be raised with a size that does not match the prior frame.

◆ setMaxOutputEncoding()

void fm.liveswitch.VideoSource.setMaxOutputEncoding ( fm.liveswitch.EncodingInfo  value)
protected

Sets the maximum allowed output encoding.

◆ setMaxOutputFrameRate()

void fm.liveswitch.VideoSource.setMaxOutputFrameRate ( double  value)
protected

Sets the maximum allowed output frame-rate, in fps.

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

Reimplemented in fm.liveswitch.ScreenSourceBase, fm.liveswitch.NullVideoSource, and fm.liveswitch.CameraSourceBase.

◆ setMaxOutputScale()

void fm.liveswitch.VideoSource.setMaxOutputScale ( double  value)
protected

Sets the maximum allowed output scale.

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

◆ setMaxOutputSize()

void fm.liveswitch.VideoSource.setMaxOutputSize ( fm.liveswitch.Size  value)
protected

Sets the maximum allowed output size.

A value of null indicates unset (no maximum).

Reimplemented in fm.liveswitch.ScreenSourceBase, fm.liveswitch.NullVideoSource, and fm.liveswitch.CameraSourceBase.

◆ setMinOutputEncoding()

void fm.liveswitch.VideoSource.setMinOutputEncoding ( fm.liveswitch.EncodingInfo  value)
protected

Sets the minimum allowed output encoding.

◆ setMinOutputFrameRate()

void fm.liveswitch.VideoSource.setMinOutputFrameRate ( double  value)
protected

Sets the minimum allowed output frame-rate, in fps.

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

Reimplemented in fm.liveswitch.ScreenSourceBase, fm.liveswitch.NullVideoSource, and fm.liveswitch.CameraSourceBase.

◆ setMinOutputScale()

void fm.liveswitch.VideoSource.setMinOutputScale ( double  value)
protected

Sets the minimum allowed output scale.

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

◆ setMinOutputSize()

void fm.liveswitch.VideoSource.setMinOutputSize ( fm.liveswitch.Size  value)
protected

Sets the minimum allowed output size.

A value of null indicates unset (no minimum).

Reimplemented in fm.liveswitch.ScreenSourceBase, fm.liveswitch.NullVideoSource, and fm.liveswitch.CameraSourceBase.

◆ setTargetOutputEncoding()

void fm.liveswitch.VideoSource.setTargetOutputEncoding ( fm.liveswitch.EncodingInfo  value)
protected

Sets the target output encoding.

◆ setTargetOutputFrameRate()

void fm.liveswitch.VideoSource.setTargetOutputFrameRate ( double  value)
protected

Sets the target output frame-rate, in fps.

A value of -1 indicates unset (no target).

Reimplemented in fm.liveswitch.ScreenSourceBase, fm.liveswitch.NullVideoSource, and fm.liveswitch.CameraSourceBase.

◆ setTargetOutputScale()

void fm.liveswitch.VideoSource.setTargetOutputScale ( double  value)
protected

Sets the target output scale.

A value of -1 indicates unset (no target).

◆ setTargetOutputSize()

void fm.liveswitch.VideoSource.setTargetOutputSize ( fm.liveswitch.Size  value)
protected

Sets the target output size.

A value of null indicates unset (no target).

Reimplemented in fm.liveswitch.ScreenSourceBase, fm.liveswitch.NullVideoSource, and fm.liveswitch.CameraSourceBase.

◆ setVideoType()

void fm.liveswitch.VideoSource.setVideoType ( fm.liveswitch.VideoType  value)
protected

Sets the video type.