catch ();
} while( state != libvlc_Playing &&
state != libvlc_Error &&
- state != libvlc_MediaPlayerEndReached );
+ state != libvlc_Ended );
- assert( state == libvlc_Playing || state == libvlc_MediaPlayerEndReached );
+ assert( state == libvlc_Playing || state == libvlc_Ended );
libvlc_media_player_stop (mi, &ex);
catch ();
libvlc_media_player_t *mi;
const char * file = test_default_sample;
- log ("Testing play and pause of %s\n", file);
+ log ("Testing pause and stop of %s\n", file);
libvlc_exception_init (&ex);
vlc = libvlc_new (argc, argv, &ex);
libvlc_media_player_play (mi, &ex);
catch ();
+ log ("Waiting for playing\n");
+
/* Wait a correct state */
libvlc_state_t state;
do {
catch ();
} while( state != libvlc_Playing &&
state != libvlc_Error &&
- state != libvlc_MediaPlayerEndReached );
+ state != libvlc_Ended );
- assert( state == libvlc_Playing || state == libvlc_MediaPlayerEndReached );
+ assert( state == libvlc_Playing || state == libvlc_Ended );
libvlc_media_player_pause (mi, &ex);
+ catch();
+
+ log ("Waiting for pause\n");
/* Wait a correct state */
do {
catch ();
} while( state != libvlc_Paused &&
state != libvlc_Error &&
- state != libvlc_MediaPlayerEndReached );
+ state != libvlc_Ended );
- assert( libvlc_media_player_get_state (mi, &ex) == libvlc_Paused );
+ assert( state == libvlc_Paused || state == libvlc_Ended );
catch();
libvlc_media_player_stop (mi, &ex);