[vlc-devel] commit: FIx mozilla plugin compilation (Jean-Baptiste Kempf )
git version control
git at videolan.org
Thu Feb 4 02:35:00 CET 2010
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Feb 4 02:34:45 2010 +0100| [f6f321dc78104c8aa2a56be6e09082904db8cc8d] | committer: Jean-Baptiste Kempf
FIx mozilla plugin compilation
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f6f321dc78104c8aa2a56be6e09082904db8cc8d
---
projects/mozilla/control/npolibvlc.cpp | 8 ++++----
projects/mozilla/vlcplugin.cpp | 15 +++++++--------
projects/mozilla/vlcplugin.h | 2 +-
3 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/projects/mozilla/control/npolibvlc.cpp b/projects/mozilla/control/npolibvlc.cpp
index 68d048c..9f6a982 100644
--- a/projects/mozilla/control/npolibvlc.cpp
+++ b/projects/mozilla/control/npolibvlc.cpp
@@ -708,8 +708,8 @@ LibvlcPlaylistItemsNPObject::invoke(int index, const NPVariant *args,
case ID_playlistitems_remove:
if( (argCount == 1) && isNumberValue(args[0]) )
{
- p_plugin->playlist_delete_item(numberValue(args[0]),&ex);
- RETURN_ON_EXCEPTION(this,ex);
+ if( !p_plugin->playlist_delete_item(numberValue(args[0])) )
+ return INVOKERESULT_GENERIC_ERROR;
VOID_TO_NPVARIANT(result);
return INVOKERESULT_NO_ERROR;
}
@@ -971,8 +971,8 @@ LibvlcPlaylistNPObject::invoke(int index, const NPVariant *args,
case ID_playlist_removeitem: /* deprecated */
if( (argCount == 1) && isNumberValue(args[0]) )
{
- p_plugin->playlist_delete_item(numberValue(args[0]), &ex);
- RETURN_ON_EXCEPTION(this,ex);
+ if( !p_plugin->playlist_delete_item(numberValue(args[0])) )
+ return INVOKERESULT_GENERIC_ERROR;
VOID_TO_NPVARIANT(result);
return INVOKERESULT_NO_ERROR;
}
diff --git a/projects/mozilla/vlcplugin.cpp b/projects/mozilla/vlcplugin.cpp
index d438e02..41ba919 100644
--- a/projects/mozilla/vlcplugin.cpp
+++ b/projects/mozilla/vlcplugin.cpp
@@ -457,8 +457,7 @@ int VlcPlugin::playlist_add( const char *mrl, libvlc_exception_t *ex )
return -1;
libvlc_media_list_lock(libvlc_media_list);
- libvlc_media_list_add_media(libvlc_media_list,p_m,ex);
- if( !libvlc_exception_raised(ex) )
+ if( !libvlc_media_list_add_media(libvlc_media_list,p_m) )
item = libvlc_media_list_count(libvlc_media_list)-1;
libvlc_media_list_unlock(libvlc_media_list);
@@ -479,8 +478,7 @@ int VlcPlugin::playlist_add_extended_untrusted( const char *mrl, const char *nam
libvlc_media_add_option_flag(p_m, optv[i], libvlc_media_option_unique);
libvlc_media_list_lock(libvlc_media_list);
- libvlc_media_list_add_media(libvlc_media_list,p_m,ex);
- if( !libvlc_exception_raised(ex) )
+ if( !libvlc_media_list_add_media(libvlc_media_list,p_m) )
item = libvlc_media_list_count(libvlc_media_list)-1;
libvlc_media_list_unlock(libvlc_media_list);
libvlc_media_release(p_m);
@@ -501,10 +499,10 @@ bool VlcPlugin::playlist_select( int idx, libvlc_exception_t *ex )
playlist_index = idx;
- p_m = libvlc_media_list_item_at_index(libvlc_media_list,playlist_index,ex);
+ p_m = libvlc_media_list_item_at_index(libvlc_media_list,playlist_index);
libvlc_media_list_unlock(libvlc_media_list);
- if( libvlc_exception_raised(ex) )
+ if( !p_m )
return false;
if( libvlc_media_player )
@@ -531,11 +529,12 @@ bad_unlock:
return false;
}
-void VlcPlugin::playlist_delete_item( int idx, libvlc_exception_t *ex )
+int VlcPlugin::playlist_delete_item( int idx )
{
libvlc_media_list_lock(libvlc_media_list);
- libvlc_media_list_remove_index(libvlc_media_list,idx,ex);
+ int ret = libvlc_media_list_remove_index(libvlc_media_list,idx);
libvlc_media_list_unlock(libvlc_media_list);
+ return ret;
}
void VlcPlugin::playlist_clear()
diff --git a/projects/mozilla/vlcplugin.h b/projects/mozilla/vlcplugin.h
index 9e89570..4ace15b 100644
--- a/projects/mozilla/vlcplugin.h
+++ b/projects/mozilla/vlcplugin.h
@@ -266,7 +266,7 @@ public:
int playlist_add( const char *, libvlc_exception_t * );
int playlist_add_extended_untrusted( const char *, const char *, int,
const char **, libvlc_exception_t * );
- void playlist_delete_item( int, libvlc_exception_t * );
+ int playlist_delete_item( int );
void playlist_clear();
int playlist_count();
More information about the vlc-devel
mailing list