List of usage examples for android.opengl GLSurfaceView getHolder
public SurfaceHolder getHolder()
From source file:net.nanocosmos.bintu.demo.encoder.activities.StreamActivity.java
@Override public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) { Surface foo = new Surface(surface); SurfaceView foo1 = new SurfaceView(this); foo = foo1.getHolder().getSurface(); GLSurfaceView foo2 = new GLSurfaceView(this); foo = foo2.getHolder().getSurface(); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { initStreamLib();/*from w w w . j a v a2 s. com*/ } else { appPermissions = new CheckAppPermissions(this); boolean needPermission = false; if (streamVideo) { needPermission |= !appPermissions.checkCameraPermissions(); } if (streamAudio) { needPermission |= !appPermissions.checkRecordAudioPermission(); } if (recordMp4) { needPermission |= !appPermissions.checkWriteExternalStoragePermission(); } if (needPermission) { appPermissions.requestMissingPermissions(); } else { initStreamLib(); } } }