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 libvlc_playlist_play( p_instance1, 0,NULL, NULL );
28 libvlc_exception_init( &exception );
29 p_input = libvlc_playlist_get_input( p_instance1, &exception );
31 if( libvlc_exception_raised( &exception ) )
43 fprintf( stderr, "Length %lli - Time %lli\n",
44 libvlc_input_get_length( p_input, NULL ),
45 libvlc_input_get_time( p_input, NULL ) );
46 libvlc_input_free( p_input );
49 libvlc_destroy( p_instance1 );