I want to develop an app, which will have 2 buttons and SurfaceView(Actually a class extends SurfaceView implements SurfaceHolder.Callback).
When user click on button1 - with ScreenCapture, I will get an image and using mediacodec, I will do vp8 encoding and the output saving in bytebuffer.(I am not saving in a file location)
When user click on button2 - I need to show it on SurfaceView with that output of bytebuffer which is captured.
i have tried as
MediaCodec decoder = MediaCodec.createDecoderByType("video/x-vnd.on2.vp8");
decoder.dequeueOutputBuffer(mBufferInfo, DEFAULT_TIMEOUT_US);
.....
but not able to update the surfaceview.
How can i update the surfaceview using bytebuffer data?