]> git.sesse.net Git - vlc/commitdiff
Mozilla: fix compilation.
authorRémi Duraffort <ivoire@videolan.org>
Tue, 2 Feb 2010 08:20:44 +0000 (09:20 +0100)
committerRémi Duraffort <ivoire@videolan.org>
Tue, 2 Feb 2010 08:34:38 +0000 (09:34 +0100)
projects/mozilla/control/npolibvlc.cpp
projects/mozilla/vlcplugin.cpp
projects/mozilla/vlcplugin.h
projects/mozilla/vlcshell.cpp

index f2697a06a2bcd081d6463bd7040db4656f6e9b2e..68d048ce821b2b180fa383d965d6111c1b68b82c 100644 (file)
@@ -529,8 +529,7 @@ LibvlcInputNPObject::getProperty(int index, NPVariant &result)
             }
             case ID_input_hasvout:
             {
-                bool val = p_plugin->player_has_vout(&ex);
-                RETURN_ON_EXCEPTION(this,ex);
+                bool val = p_plugin->player_has_vout();
                 BOOLEAN_TO_NPVARIANT(val, result);
                 return INVOKERESULT_NO_ERROR;
             }
@@ -701,8 +700,7 @@ LibvlcPlaylistItemsNPObject::invoke(int index, const NPVariant *args,
             case ID_playlistitems_clear:
                 if( argCount == 0 )
                 {
-                    p_plugin->playlist_clear(&ex);
-                    RETURN_ON_EXCEPTION(this,ex);
+                    p_plugin->playlist_clear();
                     VOID_TO_NPVARIANT(result);
                     return INVOKERESULT_NO_ERROR;
                 }
@@ -965,8 +963,7 @@ LibvlcPlaylistNPObject::invoke(int index, const NPVariant *args,
             case ID_playlist_clear: /* deprecated */
                 if( argCount == 0 )
                 {
-                    p_plugin->playlist_clear(&ex);
-                    RETURN_ON_EXCEPTION(this,ex);
+                    p_plugin->playlist_clear();
                     VOID_TO_NPVARIANT(result);
                     return INVOKERESULT_NO_ERROR;
                 }
@@ -1160,8 +1157,7 @@ LibvlcSubtitleNPObject::getProperty(int index, NPVariant &result)
             case ID_subtitle_track:
             {
                 /* get the current subtitle ID */
-                int i_spu = libvlc_video_get_spu(p_md, &ex);
-                RETURN_ON_EXCEPTION(this,ex);
+                int i_spu = libvlc_video_get_spu(p_md);
                 /* return it */
                 INT32_TO_NPVARIANT(i_spu, result);
                 return INVOKERESULT_NO_ERROR;
@@ -1169,8 +1165,7 @@ LibvlcSubtitleNPObject::getProperty(int index, NPVariant &result)
             case ID_subtitle_count:
             {
                 /* get the number of subtitles available */
-                int i_spu = libvlc_video_get_spu_count(p_md, &ex);
-                RETURN_ON_EXCEPTION(this,ex);
+                int i_spu = libvlc_video_get_spu_count(p_md);
                 /* return it */
                 INT32_TO_NPVARIANT(i_spu, result);
                 return INVOKERESULT_NO_ERROR;
@@ -1200,8 +1195,7 @@ LibvlcSubtitleNPObject::setProperty(int index, const NPVariant &value)
                 if( isNumberValue(value) )
                 {
                     /* set the new subtitle track to show */
-                    libvlc_video_set_spu(p_md, numberValue(value), &ex);
-                    RETURN_ON_EXCEPTION(this,ex);
+                    libvlc_video_set_spu(p_md, numberValue(value));
 
                     return INVOKERESULT_NO_ERROR;
                 }
@@ -1253,8 +1247,7 @@ LibvlcSubtitleNPObject::invoke(int index, const NPVariant *args,
                         return INVOKERESULT_GENERIC_ERROR;
 
                     /* get the number of subtitle available */
-                    i_limit = libvlc_video_get_spu_count(p_md, &ex);
-                    RETURN_ON_EXCEPTION(this,ex);
+                    i_limit = libvlc_video_get_spu_count(p_md);
 
                     /* check if a number is given by the user
                      * and get the subtitle number */
@@ -1346,29 +1339,25 @@ LibvlcVideoNPObject::getProperty(int index, NPVariant &result)
         {
             case ID_video_fullscreen:
             {
-                int val = p_plugin->get_fullscreen(&ex);
-                RETURN_ON_EXCEPTION(this,ex);
+                int val = p_plugin->get_fullscreen();
                 BOOLEAN_TO_NPVARIANT(val, result);
                 return INVOKERESULT_NO_ERROR;
             }
             case ID_video_height:
             {
-                int val = libvlc_video_get_height(p_md, &ex);
-                RETURN_ON_EXCEPTION(this,ex);
+                int val = libvlc_video_get_height(p_md);
                 INT32_TO_NPVARIANT(val, result);
                 return INVOKERESULT_NO_ERROR;
             }
             case ID_video_width:
             {
-                int val = libvlc_video_get_width(p_md, &ex);
-                RETURN_ON_EXCEPTION(this,ex);
+                int val = libvlc_video_get_width(p_md);
                 INT32_TO_NPVARIANT(val, result);
                 return INVOKERESULT_NO_ERROR;
             }
             case ID_video_aspectratio:
             {
-                NPUTF8 *psz_aspect = libvlc_video_get_aspect_ratio(p_md, &ex);
-                RETURN_ON_EXCEPTION(this,ex);
+                NPUTF8 *psz_aspect = libvlc_video_get_aspect_ratio(p_md);
                 if( !psz_aspect )
                     return INVOKERESULT_GENERIC_ERROR;
 
@@ -1377,15 +1366,13 @@ LibvlcVideoNPObject::getProperty(int index, NPVariant &result)
             }
             case ID_video_subtitle:
             {
-                int i_spu = libvlc_video_get_spu(p_md, &ex);
-                RETURN_ON_EXCEPTION(this,ex);
+                int i_spu = libvlc_video_get_spu(p_md);
                 INT32_TO_NPVARIANT(i_spu, result);
                 return INVOKERESULT_NO_ERROR;
             }
             case ID_video_crop:
             {
-                NPUTF8 *psz_geometry = libvlc_video_get_crop_geometry(p_md, &ex);
-                RETURN_ON_EXCEPTION(this,ex);
+                NPUTF8 *psz_geometry = libvlc_video_get_crop_geometry(p_md);
                 if( !psz_geometry )
                     return INVOKERESULT_GENERIC_ERROR;
 
@@ -1447,8 +1434,7 @@ LibvlcVideoNPObject::setProperty(int index, const NPVariant &value)
                 }
 
                 int val = NPVARIANT_TO_BOOLEAN(value);
-                p_plugin->set_fullscreen(val, &ex);
-                RETURN_ON_EXCEPTION(this,ex);
+                p_plugin->set_fullscreen(val);
                 return INVOKERESULT_NO_ERROR;
             }
             case ID_video_aspectratio:
@@ -1466,9 +1452,8 @@ LibvlcVideoNPObject::setProperty(int index, const NPVariant &value)
                     return INVOKERESULT_GENERIC_ERROR;
                 }
 
-                libvlc_video_set_aspect_ratio(p_md, psz_aspect, &ex);
+                libvlc_video_set_aspect_ratio(p_md, psz_aspect);
                 free(psz_aspect);
-                RETURN_ON_EXCEPTION(this,ex);
 
                 return INVOKERESULT_NO_ERROR;
             }
@@ -1476,8 +1461,7 @@ LibvlcVideoNPObject::setProperty(int index, const NPVariant &value)
             {
                 if( isNumberValue(value) )
                 {
-                    libvlc_video_set_spu(p_md, numberValue(value), &ex);
-                    RETURN_ON_EXCEPTION(this,ex);
+                    libvlc_video_set_spu(p_md, numberValue(value));
 
                     return INVOKERESULT_NO_ERROR;
                 }
@@ -1498,9 +1482,8 @@ LibvlcVideoNPObject::setProperty(int index, const NPVariant &value)
                     return INVOKERESULT_GENERIC_ERROR;
                 }
 
-                libvlc_video_set_crop_geometry(p_md, psz_geometry, &ex);
+                libvlc_video_set_crop_geometry(p_md, psz_geometry);
                 free(psz_geometry);
-                RETURN_ON_EXCEPTION(this,ex);
 
                 return INVOKERESULT_NO_ERROR;
             }
@@ -1556,8 +1539,7 @@ LibvlcVideoNPObject::invoke(int index, const NPVariant *args,
             {
                 if( argCount == 0 )
                 {
-                    p_plugin->toggle_fullscreen(&ex);
-                    RETURN_ON_EXCEPTION(this,ex);
+                    p_plugin->toggle_fullscreen();
                     VOID_TO_NPVARIANT(result);
                     return INVOKERESULT_NO_ERROR;
                 }
@@ -2003,8 +1985,7 @@ LibvlcDeinterlaceNPObject::invoke(int index, const NPVariant *args,
     switch( index )
     {
     case ID_deint_disable:
-        libvlc_video_set_deinterlace(p_md, 0, "", &ex);
-        RETURN_ON_EXCEPTION(this,ex);
+        libvlc_video_set_deinterlace(p_md, NULL);
         break;
 
     case ID_deint_enable:
@@ -2012,9 +1993,8 @@ LibvlcDeinterlaceNPObject::invoke(int index, const NPVariant *args,
             return INVOKERESULT_INVALID_VALUE;
 
         psz = stringValue( NPVARIANT_TO_STRING( args[0] ) );
-        libvlc_video_set_deinterlace(p_md, 1, psz, &ex);
+        libvlc_video_set_deinterlace(p_md, psz);
         free(psz);
-        RETURN_ON_EXCEPTION(this,ex);
         break;
 
     default:
index f6b88322f89cc992e04e790373c9fea5c67900b1..def5928bffa47018154d4276878e56f3ddda6296 100644 (file)
@@ -535,7 +535,7 @@ void VlcPlugin::playlist_delete_item( int idx, libvlc_exception_t *ex )
     libvlc_media_list_unlock(libvlc_media_list);
 }
 
-void VlcPlugin::playlist_clear( libvlc_exception_t *ex )
+void VlcPlugin::playlist_clear()
 {
     if( libvlc_media_list )
         libvlc_media_list_release(libvlc_media_list);
@@ -551,25 +551,25 @@ int VlcPlugin::playlist_count()
     return items_count;
 }
 
-void VlcPlugin::toggle_fullscreen( libvlc_exception_t *ex )
+void VlcPlugin::toggle_fullscreen()
 {
     if( playlist_isplaying() )
-        libvlc_toggle_fullscreen(libvlc_media_player,ex);
+        libvlc_toggle_fullscreen(libvlc_media_player);
 }
-void VlcPlugin::set_fullscreen( int yes, libvlc_exception_t *ex )
+void VlcPlugin::set_fullscreen( int yes)
 {
     if( playlist_isplaying() )
-        libvlc_set_fullscreen(libvlc_media_player,yes,ex);
+        libvlc_set_fullscreen(libvlc_media_player,yes);
 }
-int  VlcPlugin::get_fullscreen( libvlc_exception_t *ex )
+int  VlcPlugin::get_fullscreen()
 {
     int r = 0;
     if( playlist_isplaying() )
-        r = libvlc_get_fullscreen(libvlc_media_player,ex);
+        r = libvlc_get_fullscreen(libvlc_media_player);
     return r;
 }
 
-bool  VlcPlugin::player_has_vout( libvlc_exception_t *ex )
+bool  VlcPlugin::player_has_vout()
 {
     bool r = false;
     if( playlist_isplaying() )
index bc1c314a8f63fa421e2b0e79e4c24c1af21e58f3..9e8957070c4cfb8f13b3b036faf6bd4c6d1eaa84 100644 (file)
@@ -267,14 +267,14 @@ public:
     int playlist_add_extended_untrusted( const char *, const char *, int,
                                 const char **, libvlc_exception_t * );
     void playlist_delete_item( int, libvlc_exception_t * );
-    void playlist_clear( libvlc_exception_t * );
+    void playlist_clear();
     int  playlist_count();
 
-    void toggle_fullscreen( libvlc_exception_t * );
-    void set_fullscreen( int, libvlc_exception_t * );
-    int  get_fullscreen( libvlc_exception_t * );
+    void toggle_fullscreen();
+    void set_fullscreen( int );
+    int  get_fullscreen();
 
-    bool  player_has_vout( libvlc_exception_t * );
+    bool  player_has_vout();
 
 
     static bool canUseEventListener();
index 5f7ac8bfd56ca982b1a2ad4ad6abf3e9b7fd3456..8d42e1251711db19e4c05d211cec8d58cbac7d15 100644 (file)
@@ -838,8 +838,7 @@ static void ControlHandler( Widget w, XtPointer closure, XEvent *event )
 
             case clicked_Fullscreen:
             {
-                p_plugin->set_fullscreen( 1, &ex );
-                libvlc_exception_clear( &ex );
+                p_plugin->set_fullscreen( 1 );
             }
             break;