Android: Expose underlying EGL context in API
This CL adds a way to extract the underlying android.opengl.EGLContext and javax.microedition.khronos.egl.EGLContext for EglBase14 and EglBase10 respectively. The reason is that clients can't be expected to use only WebRTC's OpenGL code and might need to integrate with their own GL code. Bug: None Change-Id: Ie00a564de45a090683542a52005da7e43c586ced Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127888 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27205}
This commit is contained in:
committed by
Commit Bot
parent
d09bc55d3b
commit
98d85fe9a4
@ -660,7 +660,8 @@ public class MediaCodecVideoEncoder {
|
||||
mediaCodec.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE);
|
||||
|
||||
if (useSurface) {
|
||||
eglBase = new EglBase14((EglBase14.Context) getEglContext(), EglBase.CONFIG_RECORDABLE);
|
||||
eglBase =
|
||||
EglBase.createEgl14((EglBase14.Context) getEglContext(), EglBase.CONFIG_RECORDABLE);
|
||||
// Create an input surface and keep a reference since we must release the surface when done.
|
||||
inputSurface = mediaCodec.createInputSurface();
|
||||
eglBase.createSurface(inputSurface);
|
||||
|
||||
Reference in New Issue
Block a user