public abstract class GraphRunner extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
GraphRunner.OnRunnerDoneListener
Interface for listeners waiting for the runner to complete.
|
Modifier and Type | Field and Description |
---|---|
protected FilterContext |
mFilterContext |
static int |
RESULT_BLOCKED |
static int |
RESULT_ERROR |
static int |
RESULT_FINISHED |
static int |
RESULT_RUNNING |
static int |
RESULT_SLEEPING |
static int |
RESULT_STOPPED |
static int |
RESULT_UNKNOWN |
Constructor and Description |
---|
GraphRunner(FilterContext context) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
activateGlContext()
Helper function for subclasses to activate the GL environment before running.
|
abstract void |
close()
Closes the filters in a graph.
|
protected void |
deactivateGlContext()
Helper function for subclasses to deactivate the GL environment after running.
|
FilterContext |
getContext() |
abstract Exception |
getError()
Returns the last exception that happened during an asynchronous run.
|
abstract FilterGraph |
getGraph() |
abstract boolean |
isRunning() |
abstract void |
run()
Starts running the graph.
|
abstract void |
setDoneCallback(GraphRunner.OnRunnerDoneListener listener) |
abstract void |
stop()
Stops graph execution.
|
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
public GraphRunner(FilterContext context)
public abstract FilterGraph getGraph()
public FilterContext getContext()
protected boolean activateGlContext()
protected void deactivateGlContext()
public abstract void run()
public abstract void setDoneCallback(GraphRunner.OnRunnerDoneListener listener)
public abstract boolean isRunning()
public abstract void stop()
public abstract void close()
public abstract Exception getError()