]> git.sesse.net Git - vlc/blobdiff - test/libvlc/media_player.c
LibVLC core: remove exceptions
[vlc] / test / libvlc / media_player.c
index 8ebde89d2bed30061bc25af977ede7b4e7442a38..2137fa7210cc8176dea43a2d91f15486026a73d1 100644 (file)
@@ -33,19 +33,18 @@ static void test_media_player_play_stop(const char** argv, int argc)
     log ("Testing play and pause of %s\n", file);
 
     libvlc_exception_init (&ex);
-    vlc = libvlc_new (argc, argv, &ex);
-    catch ();
+    vlc = libvlc_new (argc, argv);
+    assert (vlc != NULL);
 
     md = libvlc_media_new (vlc, file, &ex);
     catch ();
 
-    mi = libvlc_media_player_new_from_media (md, &ex);
-    catch ();
+    mi = libvlc_media_player_new_from_media (md);
+    assert (mi != NULL);
 
     libvlc_media_release (md);
 
-    libvlc_media_player_play (mi, &ex);
-    catch ();
+    libvlc_media_player_play (mi);
 
     /* Wait a correct state */
     libvlc_state_t state;
@@ -72,19 +71,18 @@ static void test_media_player_pause_stop(const char** argv, int argc)
     log ("Testing pause and stop of %s\n", file);
 
     libvlc_exception_init (&ex);
-    vlc = libvlc_new (argc, argv, &ex);
-    catch ();
+    vlc = libvlc_new (argc, argv);
+    assert (vlc != NULL);
 
     md = libvlc_media_new (vlc, file, &ex);
     catch ();
 
-    mi = libvlc_media_player_new_from_media (md, &ex);
-    catch ();
+    mi = libvlc_media_player_new_from_media (md);
+    assert (mi != NULL);
 
     libvlc_media_release (md);
 
-    libvlc_media_player_play (mi, &ex);
-    catch ();
+    libvlc_media_player_play (mi);
 
     log ("Waiting for playing\n");
 
@@ -102,8 +100,7 @@ static void test_media_player_pause_stop(const char** argv, int argc)
 #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, &ex);
-    catch();
+    libvlc_media_player_pause (mi);
 
     log ("Waiting for pause\n");