]> git.sesse.net Git - vlc/blobdiff - bin/vlc.c
LibVLC core: remove exceptions
[vlc] / bin / vlc.c
index bad420bacc584dc13f96d830ebe3b3081ff0fbb5..f944aaeecf89810368bd5c356015a0e72e6ace1c 100644 (file)
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -133,9 +133,7 @@ int main( int i_argc, const char *ppsz_argv[] )
     argv[argc++] = FromLocale ("--plugin-path="TOP_BUILDDIR"/modules");
 #endif
 #ifdef TOP_SRCDIR
-# ifdef ENABLE_HTTPD
-    argv[argc++] = FromLocale ("--http-src="TOP_SRCDIR"/share/http");
-# endif
+    argv[argc++] = FromLocale ("--data-path="TOP_SRCDIR"/share");
 #endif
 
     int i = 1;
@@ -152,36 +150,26 @@ int main( int i_argc, const char *ppsz_argv[] )
             return 1; // BOOM!
     argv[argc] = NULL;
 
-    libvlc_exception_t ex, dummy;
-    libvlc_exception_init (&ex);
-    libvlc_exception_init (&dummy);
-
     /* Initialize libvlc */
-    libvlc_instance_t *vlc = libvlc_new (argc, argv, &ex);
+    libvlc_instance_t *vlc = libvlc_new (argc, argv);
 
     if (vlc != NULL)
     {
-        libvlc_add_intf (vlc, "signals", &ex);
-        if (libvlc_exception_raised (&ex))
-        {
-            libvlc_exception_clear (&ex);
+        if (libvlc_add_intf (vlc, "signals"))
             pthread_sigmask (SIG_UNBLOCK, &set, NULL);
-        }
 #if !defined (HAVE_MAEMO)
-        libvlc_add_intf (vlc, "globalhotkeys,none", &ex);
+        libvlc_add_intf (vlc, "globalhotkeys,none");
 #endif
-        libvlc_exception_clear (&ex);
-        libvlc_add_intf (vlc, NULL, &ex);
-        libvlc_playlist_play (vlc, -1, 0, NULL, &dummy);
-        libvlc_wait (vlc);
-
-        if (libvlc_exception_raised (&ex))
-            fprintf( stderr, "%s\n", libvlc_errmsg() );
+        if (libvlc_add_intf (vlc, NULL) == 0)
+        {
+            libvlc_playlist_play (vlc, -1, 0, NULL);
+            libvlc_wait (vlc);
+        }
         libvlc_release (vlc);
     }
 
     for (int i = 1; i < argc; i++)
         LocaleFree (argv[i]);
 
-    return vlc == NULL || libvlc_exception_raised (&ex);
+    return 0;
 }