I am trying to implement screen recorder. I followed grafika . Simply giving Surface from encoder.getInputSurface()
to VirtualDisplay does the trick. Now my task is to encode a certain part of the screen. So, I was trying to modify the input Surface for the encoder using SurfaceTexture (I think this is right method). But I am not able to use the created surface to record screen and when I pass this Surface to VirtualDisplay I do not get any callback.
I also tried to record using TextureMovieEncoder(from grafika) but may be I do not know the correct method.
I tried to understand through following userful links. How does an output surface of a Decoder is passed to an input surface of an Encoder?
and
Android: Is it possible to create a SurfaceTexture without a SurfaceView?
And I am sure grafika is a great tutorial but I am stuck.
Please suggest solution or another workable method. I am now stuck for days.