Methods Summary |
---|
final void | addGraph(FilterGraph graph)
mGraphs.add(graph);
|
public synchronized android.filterfw.core.Frame | fetchFrame(java.lang.String key)
Frame frame = mStoredFrames.get(key);
if (frame != null) {
frame.onFrameFetch();
}
return frame;
|
public android.filterfw.core.FrameManager | getFrameManager()
return mFrameManager;
|
public android.filterfw.core.GLEnvironment | getGLEnvironment()
return mGLEnvironment;
|
public void | initGLEnvironment(android.filterfw.core.GLEnvironment environment)
if (mGLEnvironment == null) {
mGLEnvironment = environment;
} else {
throw new RuntimeException("Attempting to re-initialize GL Environment for " +
"FilterContext!");
}
|
public synchronized void | removeFrame(java.lang.String key)
Frame frame = mStoredFrames.get(key);
if (frame != null) {
mStoredFrames.remove(key);
frame.release();
}
|
public void | setFrameManager(android.filterfw.core.FrameManager manager)
if (manager == null) {
throw new NullPointerException("Attempting to set null FrameManager!");
} else if (manager.getContext() != null) {
throw new IllegalArgumentException("Attempting to set FrameManager which is already "
+ "bound to another FilterContext!");
} else {
mFrameManager = manager;
mFrameManager.setContext(this);
}
|
public synchronized void | storeFrame(java.lang.String key, android.filterfw.core.Frame frame)
Frame storedFrame = fetchFrame(key);
if (storedFrame != null) {
storedFrame.release();
}
frame.onFrameStore();
mStoredFrames.put(key, frame.retain());
|
public synchronized void | tearDown()
// Release stored frames
for (Frame frame : mStoredFrames.values()) {
frame.release();
}
mStoredFrames.clear();
// Release graphs
for (FilterGraph graph : mGraphs) {
graph.tearDown(this);
}
mGraphs.clear();
// Release frame manager
if (mFrameManager != null) {
mFrameManager.tearDown();
mFrameManager = null;
}
// Release GL context
if (mGLEnvironment != null) {
mGLEnvironment.tearDown();
mGLEnvironment = null;
}
|