Commit 0db6b5e5 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Test libvlc_media_player_set_pause()

(cherry picked from commit 2a14fb71bc4b3cd817856d2187305b0529c0a629)
parent 77f52d97
......@@ -36,6 +36,18 @@ static void wait_playing(libvlc_media_player_t *mp)
assert(state == libvlc_Playing || state == libvlc_Ended);
}
static void wait_paused(libvlc_media_player_t *mp)
{
libvlc_state_t state;
do {
state = libvlc_media_player_get_state (mp);
} while(state != libvlc_Paused &&
state != libvlc_Ended );
state = libvlc_media_player_get_state (mp);
assert(state == libvlc_Paused || state == libvlc_Ended);
}
static void test_media_player_set_media(const char** argv, int argc)
{
const char * file = test_default_sample;
......@@ -119,15 +131,9 @@ static void test_media_player_pause_stop(const char** argv, int argc)
wait_playing (mi);
#if 0
/* This can't work because under some condition (short file, this is the case) this will be
* equivalent to a play() */
libvlc_media_player_pause (mi);
libvlc_media_player_set_pause (mi, true);
log ("Waiting for pause\n");
wait_paused (mp);
#endif
wait_paused (mi);
libvlc_media_player_stop (mi);
libvlc_media_player_release (mi);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment