@ Override public void onFrameAvailable ( SurfaceTexture surfaceTexture ) { // Pass SurfaceTexture to Encoding thread via Handler // Then Encode and display frame mHandler . sendMessage ( mHandler . obtainMessage ( MSG_FRAME_AVAILABLE , surfaceTexture ) ) ; }
Called on an arbitrary thread