public void StartCapture(int width, int height, int fps) { this.width = width; this.height = height; textureHelper.SetTextureSize(width, height); int[] textures = new int[1]; GLES20.GlGenTextures(1, textures, 0); textureId = textures[0]; GLES20.GlBindTexture(GLES20.GlTexture2d, textureId); GLES20.GlTexParameteri(GLES20.GlTexture2d, GLES20.GlTextureMinFilter, GLES20.GlNearest); GLES20.GlTexParameteri(GLES20.GlTexture2d, GLES20.GlTextureMagFilter, GLES20.GlNearest); //var matrix = new Android.Graphics.Matrix(); //matrix.PreTranslate(0.5f, 0.5f); //matrix.PreScale(-1f, -1f); //matrix.PreTranslate(-0.5f, -0.5f); //YuvConverter yuvConverter = new YuvConverter(); //buffer = new TextureBufferImpl( // width, // height, // VideoFrame.TextureBufferType.Oes, // 1, // matrix, // textureHelper.Handler, // yuvConverter, // null); //capturerObserver.OnCapturerStarted(true); startTime = DateTime.Now; //imageSource.ImageAvailable += ImageSource_ImageAvailable; imageSource.VideoFrameAvailable += ImageSource_VideoFrameAvailable; //imageSource.Texture2dAvailable += ImageSource_Texture2dAvailable; imageSource.Start(); }