Commit 4423fd4b authored by Mirsal Ennaime's avatar Mirsal Ennaime

dbus: Remove warnings and dead code

parent 950b29f8
...@@ -95,7 +95,6 @@ static int Open ( vlc_object_t * ); ...@@ -95,7 +95,6 @@ static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * ); static void Close ( vlc_object_t * );
static void Run ( intf_thread_t * ); static void Run ( intf_thread_t * );
static int StateChange( intf_thread_t * );
static int TrackChange( intf_thread_t * ); static int TrackChange( intf_thread_t * );
static int AllCallback( vlc_object_t*, const char*, vlc_value_t, vlc_value_t, void* ); static int AllCallback( vlc_object_t*, const char*, vlc_value_t, vlc_value_t, void* );
...@@ -780,7 +779,7 @@ static void DispatchDBusMessages( intf_thread_t *p_intf ) ...@@ -780,7 +779,7 @@ static void DispatchDBusMessages( intf_thread_t *p_intf )
static DBusHandlerResult static DBusHandlerResult
MPRISEntryPoint ( DBusConnection *p_conn, DBusMessage *p_from, void *p_this ) MPRISEntryPoint ( DBusConnection *p_conn, DBusMessage *p_from, void *p_this )
{ {
char *psz_target_interface; const char *psz_target_interface;
const char *psz_interface = dbus_message_get_interface( p_from ); const char *psz_interface = dbus_message_get_interface( p_from );
const char *psz_method = dbus_message_get_member( p_from ); const char *psz_method = dbus_message_get_member( p_from );
...@@ -968,7 +967,7 @@ static int InputIntfEventCallback( intf_thread_t *p_intf, ...@@ -968,7 +967,7 @@ static int InputIntfEventCallback( intf_thread_t *p_intf,
dbus_int32_t i_state = PLAYBACK_STATE_INVALID; dbus_int32_t i_state = PLAYBACK_STATE_INVALID;
assert(!p_info->signal); assert(!p_info->signal);
mtime_t i_now = mdate(), i_pos, i_projected_pos, i_interval; mtime_t i_now = mdate(), i_pos, i_projected_pos, i_interval;
float f_current_rate, f_computed_rate; float f_current_rate;
switch( i_event ) switch( i_event )
{ {
...@@ -1075,8 +1074,9 @@ static int AllCallback( vlc_object_t *p_this, const char *psz_var, ...@@ -1075,8 +1074,9 @@ static int AllCallback( vlc_object_t *p_this, const char *psz_var,
else if( !strcmp( "intf-event", psz_var ) ) else if( !strcmp( "intf-event", psz_var ) )
{ {
int i_res; int i_res = InputIntfEventCallback( p_intf,
i_res = InputIntfEventCallback( p_intf, p_this, newval.i_int, info ); (input_thread_t*) p_this,
newval.i_int, info );
if( VLC_SUCCESS != i_res ) if( VLC_SUCCESS != i_res )
{ {
vlc_mutex_unlock( &p_intf->p_sys->lock ); vlc_mutex_unlock( &p_intf->p_sys->lock );
...@@ -1108,39 +1108,6 @@ static int AllCallback( vlc_object_t *p_this, const char *psz_var, ...@@ -1108,39 +1108,6 @@ static int AllCallback( vlc_object_t *p_this, const char *psz_var,
return VLC_SUCCESS; return VLC_SUCCESS;
} }
/*****************************************************************************
* StateChange: callback on input "state"
*****************************************************************************/
static int StateChange( intf_thread_t *p_intf )
{
intf_sys_t *p_sys = p_intf->p_sys;
playlist_t *p_playlist = p_sys->p_playlist;
input_thread_t *p_input;
input_item_t *p_item;
if( p_intf->p_sys->b_dead )
return VLC_SUCCESS;
if( !p_sys->b_meta_read && p_sys->i_playing_state == 0)
{
p_input = playlist_CurrentInput( p_playlist );
if( p_input )
{
p_item = input_GetItem( p_input );
if( p_item )
{
p_sys->b_meta_read = true;
TrackChangedEmit( p_intf, p_item );
}
vlc_object_release( p_input );
}
}
PlayerStatusChangedEmit( p_intf );
return VLC_SUCCESS;
}
/***************************************************************************** /*****************************************************************************
* TrackChange: callback on playlist "item-current" * TrackChange: callback on playlist "item-current"
*****************************************************************************/ *****************************************************************************/
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#include "dbus_player.h" #include "dbus_player.h"
#include "dbus_common.h" #include "dbus_common.h"
static int MarshalStatus ( intf_thread_t *, DBusMessageIter * ); static void MarshalLoopStatus ( intf_thread_t *, DBusMessageIter * );
DBUS_METHOD( Position ) DBUS_METHOD( Position )
{ /* returns position in microseconds */ { /* returns position in microseconds */
...@@ -371,6 +371,8 @@ DBUS_METHOD( CanPause ) ...@@ -371,6 +371,8 @@ DBUS_METHOD( CanPause )
DBUS_METHOD( CanControl ) DBUS_METHOD( CanControl )
{ {
VLC_UNUSED( p_this );
REPLY_INIT; REPLY_INIT;
OUT_ARGUMENTS; OUT_ARGUMENTS;
...@@ -464,7 +466,8 @@ static void ...@@ -464,7 +466,8 @@ static void
MarshalPlaybackStatus( intf_thread_t *p_intf, DBusMessageIter *container ) MarshalPlaybackStatus( intf_thread_t *p_intf, DBusMessageIter *container )
{ {
input_thread_t *p_input; input_thread_t *p_input;
char *psz_playback_status; const char *psz_playback_status;
if( ( p_input = playlist_CurrentInput( p_intf->p_sys->p_playlist ) ) ) if( ( p_input = playlist_CurrentInput( p_intf->p_sys->p_playlist ) ) )
{ {
switch( var_GetInteger( p_input, "state" ) ) switch( var_GetInteger( p_input, "state" ) )
...@@ -564,6 +567,8 @@ DBUS_METHOD( RateSet ) ...@@ -564,6 +567,8 @@ DBUS_METHOD( RateSet )
DBUS_METHOD( MinimumRate ) DBUS_METHOD( MinimumRate )
{ {
VLC_UNUSED( p_this );
REPLY_INIT; REPLY_INIT;
OUT_ARGUMENTS; OUT_ARGUMENTS;
...@@ -584,6 +589,8 @@ DBUS_METHOD( MinimumRate ) ...@@ -584,6 +589,8 @@ DBUS_METHOD( MinimumRate )
DBUS_METHOD( MaximumRate ) DBUS_METHOD( MaximumRate )
{ {
VLC_UNUSED( p_this );
REPLY_INIT; REPLY_INIT;
OUT_ARGUMENTS; OUT_ARGUMENTS;
...@@ -605,11 +612,14 @@ DBUS_METHOD( MaximumRate ) ...@@ -605,11 +612,14 @@ DBUS_METHOD( MaximumRate )
static void static void
MarshalLoopStatus( intf_thread_t *p_intf, DBusMessageIter *container ) MarshalLoopStatus( intf_thread_t *p_intf, DBusMessageIter *container )
{ {
char *psz_loop_status; const char *psz_loop_status;
if( var_GetBool( p_intf->p_sys->p_playlist, "repeat" ) ) if( var_GetBool( p_intf->p_sys->p_playlist, "repeat" ) )
psz_loop_status = LOOP_STATUS_TRACK; psz_loop_status = LOOP_STATUS_TRACK;
else if( var_GetBool( p_intf->p_sys->p_playlist, "loop" ) ) else if( var_GetBool( p_intf->p_sys->p_playlist, "loop" ) )
psz_loop_status = LOOP_STATUS_PLAYLIST; psz_loop_status = LOOP_STATUS_PLAYLIST;
else else
psz_loop_status = LOOP_STATUS_NONE; psz_loop_status = LOOP_STATUS_NONE;
......
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