Package org.jitsi.impl.neomedia.control
Class FrameProcessingControlImpl
- java.lang.Object
-
- org.jitsi.impl.neomedia.control.FrameProcessingControlImpl
-
- All Implemented Interfaces:
javax.media.Control,javax.media.control.FrameProcessingControl
public class FrameProcessingControlImpl extends Object implements javax.media.control.FrameProcessingControl
Provides a base implementation of FrameProcessingControl which keeps track of the minimalProcessing property, switches its value to true when it's notified that its owner is at least one frame behind and doesn't implement the controlComponent and framesDropped properties.- Author:
- Lyubomir Marinov
-
-
Constructor Summary
Constructors Constructor Description FrameProcessingControlImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComponentgetControlComponent()Gets the UI Component associated with this Control object.intgetFramesDropped()Gets the number of output frames that were dropped during processing since the last call to this method.booleanisMinimalProcessing()Determines whether the owner of this FrameProcessingControl is to perform only the minimum operations necessary to keep it working normally but without producing output.voidsetFramesBehind(float framesBehind)Sets the number of frames the owner of this FrameProcessingControl is lagging behind.booleansetMinimalProcessing(boolean minimalProcessing)Sets the indicator which determines whether the owner of this FrameProcessingControl is to perform only the minimal operations necessary to keep it working normally but without producing output.
-
-
-
Method Detail
-
getControlComponent
public Component getControlComponent()
Gets the UI Component associated with this Control object.- Specified by:
getControlComponentin interfacejavax.media.Control- Returns:
- the UI Component associated with this Control object
-
getFramesDropped
public int getFramesDropped()
Gets the number of output frames that were dropped during processing since the last call to this method.- Specified by:
getFramesDroppedin interfacejavax.media.control.FrameProcessingControl- Returns:
- the number of output frame that were dropped during processing since the last call to this method
-
isMinimalProcessing
public boolean isMinimalProcessing()
Determines whether the owner of this FrameProcessingControl is to perform only the minimum operations necessary to keep it working normally but without producing output.- Returns:
- true if the owner of this FrameProcessingControl is to perform only the minimum operations necessary to keep it working normally but without producing output; otherwise, false
-
setFramesBehind
public void setFramesBehind(float framesBehind)
Sets the number of frames the owner of this FrameProcessingControl is lagging behind. It is a hint to do minimal processing for the next framesBehind frames in order to catch up.- Specified by:
setFramesBehindin interfacejavax.media.control.FrameProcessingControl- Parameters:
framesBehind- the number of frames the owner of this FrameProcessingControl is lagging behind
-
setMinimalProcessing
public boolean setMinimalProcessing(boolean minimalProcessing)
Sets the indicator which determines whether the owner of this FrameProcessingControl is to perform only the minimal operations necessary to keep it working normally but without producing output.- Specified by:
setMinimalProcessingin interfacejavax.media.control.FrameProcessingControl- Parameters:
minimalProcessing- true if minimal processing mode is to be turned on or false if minimal processing mode is to be turned off- Returns:
- the actual minimal processing mode in effect after the set attempt
-
-