Methods Summary |
---|
public void | activate()
if (Looper.myLooper() != null && Looper.myLooper().equals(Looper.getMainLooper())) {
Log.e("FilterFramework", "Activating GL context in UI thread!");
}
if (mManageContext && !nativeActivate()) {
throw new RuntimeException("Could not activate GLEnvironment!");
}
|
public void | activateSurfaceWithId(int surfaceId)
if (!nativeActivateSurfaceId(surfaceId)) {
throw new RuntimeException("Could not activate surface " + surfaceId + "!");
}
|
public void | deactivate()
if (mManageContext && !nativeDeactivate()) {
throw new RuntimeException("Could not deactivate GLEnvironment!");
}
|
protected void | finalize()
tearDown();
|
public void | initWithCurrentContext()
mManageContext = false;
if (!nativeInitWithCurrentContext()) {
throw new RuntimeException("Could not initialize GLEnvironment with current context!");
}
|
public void | initWithNewContext()
mManageContext = true;
if (!nativeInitWithNewContext()) {
throw new RuntimeException("Could not initialize GLEnvironment with new context!");
}
|
public boolean | isActive()
return nativeIsActive();
|
public static boolean | isAnyContextActive()
return nativeIsAnyContextActive();
|
public boolean | isContextActive()
return nativeIsContextActive();
|
private native boolean | nativeActivate()
|
private native boolean | nativeActivateSurfaceId(int surfaceId)
|
private native int | nativeAddSurface(android.view.Surface surface)
|
private native int | nativeAddSurfaceFromMediaRecorder(android.media.MediaRecorder mediaRecorder)
|
private native int | nativeAddSurfaceWidthHeight(android.view.Surface surface, int width, int height)
|
private native boolean | nativeAllocate()
|
private native boolean | nativeDeactivate()
|
private native boolean | nativeDeallocate()
|
private native boolean | nativeDisconnectSurfaceMediaSource(android.media.MediaRecorder mediaRecorder)
|
private native boolean | nativeInitWithCurrentContext()
|
private native boolean | nativeInitWithNewContext()
|
private native boolean | nativeIsActive()
|
private static native boolean | nativeIsAnyContextActive()
|
private native boolean | nativeIsContextActive()
|
private native boolean | nativeRemoveSurfaceId(int surfaceId)
|
private native boolean | nativeSetSurfaceTimestamp(long timestamp)
|
private native boolean | nativeSwapBuffers()
|
public int | registerSurface(android.view.Surface surface)
int result = nativeAddSurface(surface);
if (result < 0) {
throw new RuntimeException("Error registering surface " + surface + "!");
}
return result;
|
public int | registerSurfaceFromMediaRecorder(android.media.MediaRecorder mediaRecorder)
int result = nativeAddSurfaceFromMediaRecorder(mediaRecorder);
if (result < 0) {
throw new RuntimeException("Error registering surface from "
+ "MediaRecorder" + mediaRecorder + "!");
}
return result;
|
public int | registerSurfaceTexture(android.graphics.SurfaceTexture surfaceTexture, int width, int height)
Surface surface = new Surface(surfaceTexture);
int result = nativeAddSurfaceWidthHeight(surface, width, height);
surface.release();
if (result < 0) {
throw new RuntimeException("Error registering surfaceTexture " + surfaceTexture + "!");
}
return result;
|
public void | setSurfaceTimestamp(long timestamp)
if (!nativeSetSurfaceTimestamp(timestamp)) {
throw new RuntimeException("Could not set timestamp for current surface!");
}
|
public void | swapBuffers()
if (!nativeSwapBuffers()) {
throw new RuntimeException("Error swapping EGL buffers!");
}
|
public synchronized void | tearDown()
if (glEnvId != -1) {
nativeDeallocate();
glEnvId = -1;
}
|
public void | unregisterSurfaceId(int surfaceId)
if (!nativeRemoveSurfaceId(surfaceId)) {
throw new RuntimeException("Could not unregister surface " + surfaceId + "!");
}
|