Add a method to remove an existing renderer from the internal list of Android renderers.
BUG=4290 R=jiayl@webrtc.org, mquiros@google.com Review URL: https://webrtc-codereview.appspot.com/36089004 Cr-Commit-Position: refs/heads/master@{#8320} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8320 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
bc40324d9c
commit
bc35703694
@ -690,6 +690,19 @@ public class VideoRendererGui implements GLSurfaceView.Renderer {
|
||||
}
|
||||
}
|
||||
|
||||
public static void remove(VideoRenderer.Callbacks renderer) {
|
||||
Log.d(TAG, "VideoRendererGui.remove");
|
||||
if (instance == null) {
|
||||
throw new RuntimeException(
|
||||
"Attempt to remove yuv renderer before setting GLSurfaceView");
|
||||
}
|
||||
synchronized (instance.yuvImageRenderers) {
|
||||
if (!instance.yuvImageRenderers.remove(renderer)) {
|
||||
Log.w(TAG, "Couldn't remove renderer (not present in current list)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSurfaceCreated(GL10 unused, EGLConfig config) {
|
||||
Log.d(TAG, "VideoRendererGui.onSurfaceCreated");
|
||||
|
Loading…
Reference in New Issue
Block a user