Okay I've reviewed Fadden's example of implementing Android MediaMux. I am not sure how to get my scene into the surface input for a MP4 muxed codec. I am working on a audio processor which eats up the audio and video I/O so MediaRecord fails, but the MediaMux sounds like a viable solution.
From the codec create an inputSurface:
videoInputSurface = codec.createInputSurface();
I already have an implemented openGLSurfaceView. I can get the surface from the view simply by calling:
myGLSurface = myGLView.getHolder().getSurface();
but this doesn't set the surface. It just grabs it. Is there an easy way to get myGLSurface to write to videoInputSurface.
To further complicate things I have a cameraPreview being added to same viewgroup, vg, myGLView is written to:
vg.addView(mCameraPreview);
And myGLView is set to transparent so that the openGL scene is overlayed ontop of the cameraPreview.
myGLView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
Is there an easy way to get at the surface element of a vg? To simply put what is being written to the vg frame on the videoInputSurface for the codec?
Thanks,