Green border
tulioccalazans opened this issue · 2 comments
Hi, I'm recording a MP4 video like some examples in Grafika (CameraToMpegTest), but I'm getting a green border in Galaxy J2 (only on this device).
I know that the green border is related to:
// (optional) clear to green so we can see if we're failing to set pixels
GLES20.glClearColor(0.0f, 1.0f, 0.0f, 1.0f);
in DrawFrame. But why the pixels couldn't be set? How can I fix it?
Are needed some special configuration for Samsung devices?
I realized that is necessary to set the GLES20.glViewport with real resolution of the video for Samsung Galaxy J2 in opposite of other devices that you can define the viewPort as the GLSurfaceView size.
GLES20.glViewport(0, 0, VIDEO_WIDTH, VIDEO_HEIGHT);
When I did it, the video recorded was OK, but my display in GLSurfaceView was with zoom.
So, to show corretly in my display, I set a fizedSize for Samsung Galaxy J2 too.
glSurfaceView.getHolder().setFixedSize(VIDEO_WIDTH, VIDEO_HEIGHT);
You can check for Samsung devices like that:
String manufacturer = android.os.Build.MANUFACTURER.toLowerCase();
if(manufacturer.equals("samsung"))