3 #include <vlc/libvlc.h>
5 int main(int argc, char **argv)
7 libvlc_instance_t *p_instance1;
8 libvlc_exception_t exception;
9 libvlc_input_t *p_input;
12 libvlc_exception_init( &exception );
14 p_instance1 = libvlc_new( argc,argv, &exception );
16 if( libvlc_exception_raised( &exception ) )
18 fprintf( stderr, "FATAL: %s\n",
19 libvlc_exception_get_message( &exception ) );
23 fprintf (stderr, "Playing\n");
24 libvlc_playlist_play( p_instance1, 0, 0,NULL, NULL );
25 fprintf (stderr, "Playback started\n");
30 libvlc_exception_init( &exception );
31 p_input = libvlc_playlist_get_input( p_instance1, &exception );
33 if( libvlc_exception_raised( &exception ) )
45 libvlc_toggle_fullscreen( p_input, &exception );
46 if( libvlc_exception_raised( &exception ) )
48 fprintf( stderr, "EX : %s\n", libvlc_exception_get_message( &exception ) );
50 fprintf( stderr, "Length %lli - Time %lli - Full screen %i\n",
51 libvlc_input_get_length( p_input, NULL ),
52 libvlc_input_get_time( p_input, NULL ),
53 libvlc_get_fullscreen( p_input, NULL ) );
54 libvlc_input_free( p_input );
57 libvlc_destroy( p_instance1 );