Commit b3958ce9 authored by Rémi Duraffort's avatar Rémi Duraffort

mozilla: fix compilation.

parent 141d72fe
This diff is collapsed.
...@@ -516,7 +516,7 @@ bool VlcPlugin::playlist_select( int idx, libvlc_exception_t *ex ) ...@@ -516,7 +516,7 @@ bool VlcPlugin::playlist_select( int idx, libvlc_exception_t *ex )
libvlc_media_player = NULL; libvlc_media_player = NULL;
} }
libvlc_media_player = libvlc_media_player_new_from_media(p_m,ex); libvlc_media_player = libvlc_media_player_new_from_media(p_m);
if( libvlc_media_player ) if( libvlc_media_player )
{ {
set_player_window(); set_player_window();
...@@ -526,7 +526,7 @@ bool VlcPlugin::playlist_select( int idx, libvlc_exception_t *ex ) ...@@ -526,7 +526,7 @@ bool VlcPlugin::playlist_select( int idx, libvlc_exception_t *ex )
} }
libvlc_media_release( p_m ); libvlc_media_release( p_m );
return !libvlc_exception_raised(ex); return true;
bad_unlock: bad_unlock:
libvlc_media_list_unlock(libvlc_media_list); libvlc_media_list_unlock(libvlc_media_list);
...@@ -578,7 +578,7 @@ bool VlcPlugin::player_has_vout( libvlc_exception_t *ex ) ...@@ -578,7 +578,7 @@ bool VlcPlugin::player_has_vout( libvlc_exception_t *ex )
{ {
bool r = false; bool r = false;
if( playlist_isplaying() ) if( playlist_isplaying() )
r = libvlc_media_player_has_vout(libvlc_media_player, ex); r = libvlc_media_player_has_vout(libvlc_media_player);
return r; return r;
} }
...@@ -900,7 +900,7 @@ void VlcPlugin::redrawToolbar() ...@@ -900,7 +900,7 @@ void VlcPlugin::redrawToolbar()
/* get mute info */ /* get mute info */
b_mute = libvlc_audio_get_mute( getVLC() ); b_mute = libvlc_audio_get_mute( libvlc_media_player );
gcv.foreground = BlackPixel( p_display, 0 ); gcv.foreground = BlackPixel( p_display, 0 );
gc = XCreateGC( p_display, control, GCForeground, &gcv ); gc = XCreateGC( p_display, control, GCForeground, &gcv );
...@@ -968,11 +968,8 @@ void VlcPlugin::redrawToolbar() ...@@ -968,11 +968,8 @@ void VlcPlugin::redrawToolbar()
/* get movie position in % */ /* get movie position in % */
if( playlist_isplaying() ) if( playlist_isplaying() )
{ {
libvlc_exception_t ex;
libvlc_exception_init( &ex );
i_last_position = (int)((window.width-(dst_x+BTN_SPACE))* i_last_position = (int)((window.width-(dst_x+BTN_SPACE))*
libvlc_media_player_get_position(libvlc_media_player,&ex)); libvlc_media_player_get_position(libvlc_media_player));
libvlc_exception_clear( &ex );
} }
if( p_btnTime ) if( p_btnTime )
...@@ -1007,7 +1004,7 @@ vlc_toolbar_clicked_t VlcPlugin::getToolbarButtonClicked( int i_xpos, int i_ypos ...@@ -1007,7 +1004,7 @@ vlc_toolbar_clicked_t VlcPlugin::getToolbarButtonClicked( int i_xpos, int i_ypos
is_playing = playlist_isplaying(); is_playing = playlist_isplaying();
/* get mute info */ /* get mute info */
b_mute = libvlc_audio_get_mute( getVLC() ); b_mute = libvlc_audio_get_mute( libvlc_media_player );
/* is Pause of Play button clicked */ /* is Pause of Play button clicked */
if( (is_playing != 1) && if( (is_playing != 1) &&
......
...@@ -227,12 +227,12 @@ public: ...@@ -227,12 +227,12 @@ public:
void playlist_play(libvlc_exception_t *ex) void playlist_play(libvlc_exception_t *ex)
{ {
if( libvlc_media_player||playlist_select(0,ex) ) if( libvlc_media_player||playlist_select(0,ex) )
libvlc_media_player_play(libvlc_media_player,ex); libvlc_media_player_play(libvlc_media_player);
} }
void playlist_play_item(int idx,libvlc_exception_t *ex) void playlist_play_item(int idx,libvlc_exception_t *ex)
{ {
if( playlist_select(idx,ex) ) if( playlist_select(idx,ex) )
libvlc_media_player_play(libvlc_media_player,ex); libvlc_media_player_play(libvlc_media_player);
} }
void playlist_stop() void playlist_stop()
{ {
...@@ -242,17 +242,17 @@ public: ...@@ -242,17 +242,17 @@ public:
void playlist_next(libvlc_exception_t *ex) void playlist_next(libvlc_exception_t *ex)
{ {
if( playlist_select(playlist_index+1,ex) ) if( playlist_select(playlist_index+1,ex) )
libvlc_media_player_play(libvlc_media_player,ex); libvlc_media_player_play(libvlc_media_player);
} }
void playlist_prev(libvlc_exception_t *ex) void playlist_prev(libvlc_exception_t *ex)
{ {
if( playlist_select(playlist_index-1,ex) ) if( playlist_select(playlist_index-1,ex) )
libvlc_media_player_play(libvlc_media_player,ex); libvlc_media_player_play(libvlc_media_player);
} }
void playlist_pause(libvlc_exception_t *ex) void playlist_pause(libvlc_exception_t *ex)
{ {
if( libvlc_media_player ) if( libvlc_media_player )
libvlc_media_player_pause(libvlc_media_player,ex); libvlc_media_player_pause(libvlc_media_player);
} }
int playlist_isplaying() int playlist_isplaying()
{ {
......
...@@ -846,7 +846,7 @@ static void ControlHandler( Widget w, XtPointer closure, XEvent *event ) ...@@ -846,7 +846,7 @@ static void ControlHandler( Widget w, XtPointer closure, XEvent *event )
case clicked_Mute: case clicked_Mute:
case clicked_Unmute: case clicked_Unmute:
{ {
libvlc_audio_toggle_mute( p_plugin->getVLC() ); libvlc_audio_toggle_mute( p_md );
} }
break; break;
...@@ -856,14 +856,12 @@ static void ControlHandler( Widget w, XtPointer closure, XEvent *event ) ...@@ -856,14 +856,12 @@ static void ControlHandler( Widget w, XtPointer closure, XEvent *event )
if( p_md ) if( p_md )
{ {
int64_t f_length; int64_t f_length;
f_length = libvlc_media_player_get_length( p_md, &ex ) / 100; f_length = libvlc_media_player_get_length( p_md ) / 100;
libvlc_exception_clear( &ex );
f_length = (float)f_length * f_length = (float)f_length *
( ((float)i_xPos-4.0 ) / ( ((float)i_width-8.0)/100) ); ( ((float)i_xPos-4.0 ) / ( ((float)i_width-8.0)/100) );
libvlc_media_player_set_time( p_md, f_length, &ex ); libvlc_media_player_set_time( p_md, f_length );
libvlc_exception_clear( &ex );
} }
} }
break; 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