6 #include <vlc/libvlc.h>
7 #include <stdlib.h> // for free
9 void handle_vlc_exception( JNIEnv*, libvlc_exception_t* );
10 jlong getInstance ( JNIEnv* , jobject );
12 #define CHECK_EXCEPTION \
13 if ( libvlc_exception_raised( &exception )) \
15 handle_vlc_exception( env, &exception ); \
19 #define INIT_FUNCTION \
21 libvlc_exception_t exception; \
22 libvlc_exception_init( &exception ); \
23 instance = getInstance( env, _this );
25 #define GET_INPUT_THREAD \
26 libvlc_media_instance_t *input; \
27 input = libvlc_playlist_get_media_instance( ( libvlc_instance_t *) instance, &exception ); \
32 jvm->AttachCurrentThread( ( void ** ) &env, NULL );