How to make a videoplayer using FFmpeg on android ndk
===

I'm trying to make a Video Player using ffmpeg and I use this tutorial http://dranger.com/ffmpeg/tutorial08.html, what I understand this tutorial convert a video to a video Image YUV, I'm trying to make the file that interact from .c to .java, I have this 

code c from the tutorial08(http://dranger.com/ffmpeg/tutorial08.c), then I made

public class RtspReceiver extends Activity {

	public SurfaceView sfv;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.principal);
        sfv=(SurfaceView) findViewById(R.id.im);
    }
    
    /* load our native library */
    static {
        System.loadLibrary("Interface");
    }
	
	private static native void Receive(SurfaceView  sf);
}

In the c I'm trying to understand how I can use this




    JNIEXPORT void JNICALL isec_projecto_rtspreceiver_RtspReceiver_Receive(JNIEnv * env, jobject  obj, jobject Surface)
    {
    //what I have to put in here?
    }

How can I put the SurfaceView that I have in the java, in the c???
and other thing, in the tutorial08.c how can I extract the video and put them in the java? am I thinking correctly? 
