Commit 396acde3 authored by Rémi Duraffort's avatar Rémi Duraffort

mozilla plugin: fix compilation.

parent 992cf22c
This diff is collapsed.
......@@ -449,7 +449,7 @@ void VlcPlugin::set_player_window()
#endif
}
int VlcPlugin::playlist_add( const char *mrl, libvlc_exception_t *ex )
int VlcPlugin::playlist_add( const char *mrl )
{
int item = -1;
libvlc_media_t *p_m = libvlc_media_new(libvlc_instance,mrl);
......@@ -467,7 +467,7 @@ int VlcPlugin::playlist_add( const char *mrl, libvlc_exception_t *ex )
}
int VlcPlugin::playlist_add_extended_untrusted( const char *mrl, const char *name,
int optc, const char **optv, libvlc_exception_t *ex )
int optc, const char **optv )
{
libvlc_media_t *p_m = libvlc_media_new(libvlc_instance, mrl);
int item = -1;
......@@ -486,7 +486,7 @@ int VlcPlugin::playlist_add_extended_untrusted( const char *mrl, const char *nam
return item;
}
bool VlcPlugin::playlist_select( int idx, libvlc_exception_t *ex )
bool VlcPlugin::playlist_select( int idx )
{
libvlc_media_t *p_m = NULL;
......
......@@ -167,11 +167,10 @@ public:
NPError init(int argc, char* const argn[], char* const argv[]);
libvlc_instance_t* getVLC()
{ return libvlc_instance; };
libvlc_media_player_t* getMD(libvlc_exception_t *ex)
libvlc_media_player_t* getMD()
{
if( !libvlc_media_player )
{
libvlc_exception_raise(ex);
libvlc_printerr("no mediaplayer");
}
return libvlc_media_player;
......@@ -224,14 +223,14 @@ public:
char * psz_text;
char * psz_target;
void playlist_play(libvlc_exception_t *ex)
void playlist_play()
{
if( libvlc_media_player||playlist_select(0,ex) )
if( libvlc_media_player||playlist_select(0) )
libvlc_media_player_play(libvlc_media_player);
}
void playlist_play_item(int idx,libvlc_exception_t *ex)
void playlist_play_item(int idx)
{
if( playlist_select(idx,ex) )
if( playlist_select(idx) )
libvlc_media_player_play(libvlc_media_player);
}
void playlist_stop()
......@@ -239,14 +238,14 @@ public:
if( libvlc_media_player )
libvlc_media_player_stop(libvlc_media_player);
}
void playlist_next(libvlc_exception_t *ex)
void playlist_next()
{
if( playlist_select(playlist_index+1,ex) )
if( playlist_select(playlist_index+1) )
libvlc_media_player_play(libvlc_media_player);
}
void playlist_prev(libvlc_exception_t *ex)
void playlist_prev()
{
if( playlist_select(playlist_index-1,ex) )
if( playlist_select(playlist_index-1) )
libvlc_media_player_play(libvlc_media_player);
}
void playlist_pause()
......@@ -263,9 +262,9 @@ public:
return is_playing;
}
int playlist_add( const char *, libvlc_exception_t * );
int playlist_add( const char * );
int playlist_add_extended_untrusted( const char *, const char *, int,
const char **, libvlc_exception_t * );
const char ** );
int playlist_delete_item( int );
void playlist_clear();
int playlist_count();
......@@ -281,7 +280,7 @@ public:
EventObj events;
private:
bool playlist_select(int,libvlc_exception_t *);
bool playlist_select(int);
void set_player_window();
/* VLC reference */
......
......@@ -157,9 +157,6 @@ NPError NPP_SetValue( NPP instance, NPNVariable variable, void *value )
int16 NPP_HandleEvent( NPP instance, void * event )
{
static UInt32 lastMouseUp = 0;
libvlc_exception_t ex;
libvlc_exception_init(&ex);
if( instance == NULL )
{
return false;
......@@ -182,8 +179,7 @@ int16 NPP_HandleEvent( NPP instance, void * event )
if( (myEvent->when - lastMouseUp) < GetDblTime() )
{
/* double click */
p_plugin->toggle_fullscreen(&ex);
libvlc_exception_clear(&ex);
p_plugin->toggle_fullscreen();
}
return true;
}
......@@ -212,13 +208,12 @@ int16 NPP_HandleEvent( NPP instance, void * event )
area.top = 0;
area.right = npwindow.width;
area.bottom = npwindow.height;
libvlc_video_redraw_rectangle(p_plugin->getMD(&ex), &area, NULL);
libvlc_video_redraw_rectangle(p_plugin->getMD(), &area, NULL);
#else
#warning disabled code
#endif
}
}
libvlc_exception_clear(&ex);
if( ! hasVout )
{
......@@ -372,9 +367,6 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
control = p_plugin->getControlWindow();
#endif
libvlc_exception_t ex;
libvlc_exception_init(&ex);
libvlc_instance_t *p_vlc = p_plugin->getVLC();
/*
......@@ -413,8 +405,7 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
clip.bottom = window->clipRect.bottom;
clip.right = window->clipRect.right;
#ifdef NOT_WORKING
libvlc_video_set_viewport(p_vlc, p_plugin->getMD(&ex), &view, &clip, &ex);
libvlc_exception_clear(&ex);
libvlc_video_set_viewport(p_vlc, p_plugin->getMD(), &view, &clip);
#else
#warning disabled code
#endif
......@@ -548,12 +539,11 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
{
if( p_plugin->psz_target )
{
if( p_plugin->playlist_add( p_plugin->psz_target, NULL ) != -1 )
if( p_plugin->playlist_add( p_plugin->psz_target ) != -1 )
{
if( p_plugin->b_autoplay )
{
p_plugin->playlist_play(&ex);
libvlc_exception_clear(&ex);
p_plugin->playlist_play();
}
}
p_plugin->b_stream = true;
......@@ -627,11 +617,11 @@ void NPP_StreamAsFile( NPP instance, NPStream *stream, const char* fname )
return;
}
if( p_plugin->playlist_add( stream->url, NULL ) != -1 )
if( p_plugin->playlist_add( stream->url ) != -1 )
{
if( p_plugin->b_autoplay )
{
p_plugin->playlist_play(NULL);
p_plugin->playlist_play();
}
}
}
......@@ -806,11 +796,8 @@ static void ControlHandler( Widget w, XtPointer closure, XEvent *event )
if( p_plugin && p_plugin->b_toolbar )
{
int i_playing;
libvlc_exception_t ex;
libvlc_exception_init( &ex );
libvlc_media_player_t *p_md = p_plugin->getMD(&ex);
libvlc_exception_clear( &ex );
libvlc_media_player_t *p_md = p_plugin->getMD();
i_playing = p_plugin->playlist_isplaying();
......@@ -824,9 +811,7 @@ static void ControlHandler( Widget w, XtPointer closure, XEvent *event )
if( i_playing == 1 )
p_plugin->playlist_pause();
else
p_plugin->playlist_play( &ex );
libvlc_exception_clear( &ex );
p_plugin->playlist_play();
}
break;
......
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