FileDocCategorySizeDatePackage
GraphRunner.javaAPI DocAndroid 5.1 API3442Thu Mar 12 22:22:30 GMT 2015android.filterfw.core

GraphRunner

public abstract class GraphRunner extends Object
hide

Fields Summary
protected FilterContext
mFilterContext
public static final int
RESULT_UNKNOWN
public static final int
RESULT_RUNNING
public static final int
RESULT_FINISHED
public static final int
RESULT_SLEEPING
public static final int
RESULT_BLOCKED
public static final int
RESULT_STOPPED
public static final int
RESULT_ERROR
Constructors Summary
public GraphRunner(FilterContext context)


       
        mFilterContext = context;
    
Methods Summary
protected booleanactivateGlContext()
Helper function for subclasses to activate the GL environment before running.

return
true, if the GL environment was activated. Returns false, if the GL environment was already active.

        GLEnvironment glEnv = mFilterContext.getGLEnvironment();
        if (glEnv != null && !glEnv.isActive()) {
            glEnv.activate();
            return true;
        }
        return false;
    
public abstract voidclose()
Closes the filters in a graph. Can only be called if the graph is not running.

protected voiddeactivateGlContext()
Helper function for subclasses to deactivate the GL environment after running.

        GLEnvironment glEnv = mFilterContext.getGLEnvironment();
        if (glEnv != null) {
            glEnv.deactivate();
        }
    
public FilterContextgetContext()

        return mFilterContext;
    
public abstract java.lang.ExceptiongetError()
Returns the last exception that happened during an asynchronous run. Returns null if there is nothing to report.

public abstract FilterGraphgetGraph()

public abstract booleanisRunning()

public abstract voidrun()
Starts running the graph. Will open the filters in the graph if they are not already open.

public abstract voidsetDoneCallback(android.filterfw.core.GraphRunner$OnRunnerDoneListener listener)

public abstract voidstop()
Stops graph execution. As part of stopping, also closes the graph nodes.