Android MediaMuxer Attaching Surface to Codec input

view story

http://stackoverflow.com – Following Fadden's example I am trying to write to a surface input for a MP4 muxed codec. 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 s (HowTos)