Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
4423fd4b
Commit
4423fd4b
authored
May 16, 2011
by
Mirsal Ennaime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbus: Remove warnings and dead code
parent
950b29f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
41 deletions
+18
-41
modules/control/dbus/dbus.c
modules/control/dbus/dbus.c
+5
-38
modules/control/dbus/dbus_player.c
modules/control/dbus/dbus_player.c
+13
-3
No files found.
modules/control/dbus/dbus.c
View file @
4423fd4b
...
...
@@ -95,7 +95,6 @@ static int Open ( vlc_object_t * );
static
void
Close
(
vlc_object_t
*
);
static
void
Run
(
intf_thread_t
*
);
static
int
StateChange
(
intf_thread_t
*
);
static
int
TrackChange
(
intf_thread_t
*
);
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 )
static
DBusHandlerResult
MPRISEntryPoint
(
DBusConnection
*
p_conn
,
DBusMessage
*
p_from
,
void
*
p_this
)
{
char
*
psz_target_interface
;
c
onst
c
har
*
psz_target_interface
;
const
char
*
psz_interface
=
dbus_message_get_interface
(
p_from
);
const
char
*
psz_method
=
dbus_message_get_member
(
p_from
);
...
...
@@ -968,7 +967,7 @@ static int InputIntfEventCallback( intf_thread_t *p_intf,
dbus_int32_t
i_state
=
PLAYBACK_STATE_INVALID
;
assert
(
!
p_info
->
signal
);
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
)
{
...
...
@@ -1075,8 +1074,9 @@ static int AllCallback( vlc_object_t *p_this, const char *psz_var,
else
if
(
!
strcmp
(
"intf-event"
,
psz_var
)
)
{
int
i_res
;
i_res
=
InputIntfEventCallback
(
p_intf
,
p_this
,
newval
.
i_int
,
info
);
int
i_res
=
InputIntfEventCallback
(
p_intf
,
(
input_thread_t
*
)
p_this
,
newval
.
i_int
,
info
);
if
(
VLC_SUCCESS
!=
i_res
)
{
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
lock
);
...
...
@@ -1108,39 +1108,6 @@ static int AllCallback( vlc_object_t *p_this, const char *psz_var,
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"
*****************************************************************************/
...
...
modules/control/dbus/dbus_player.c
View file @
4423fd4b
...
...
@@ -38,7 +38,7 @@
#include "dbus_player.h"
#include "dbus_common.h"
static
int
Marshal
Status
(
intf_thread_t
*
,
DBusMessageIter
*
);
static
void
MarshalLoop
Status
(
intf_thread_t
*
,
DBusMessageIter
*
);
DBUS_METHOD
(
Position
)
{
/* returns position in microseconds */
...
...
@@ -371,6 +371,8 @@ DBUS_METHOD( CanPause )
DBUS_METHOD
(
CanControl
)
{
VLC_UNUSED
(
p_this
);
REPLY_INIT
;
OUT_ARGUMENTS
;
...
...
@@ -464,7 +466,8 @@ static void
MarshalPlaybackStatus
(
intf_thread_t
*
p_intf
,
DBusMessageIter
*
container
)
{
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
)
)
)
{
switch
(
var_GetInteger
(
p_input
,
"state"
)
)
...
...
@@ -564,6 +567,8 @@ DBUS_METHOD( RateSet )
DBUS_METHOD
(
MinimumRate
)
{
VLC_UNUSED
(
p_this
);
REPLY_INIT
;
OUT_ARGUMENTS
;
...
...
@@ -584,6 +589,8 @@ DBUS_METHOD( MinimumRate )
DBUS_METHOD
(
MaximumRate
)
{
VLC_UNUSED
(
p_this
);
REPLY_INIT
;
OUT_ARGUMENTS
;
...
...
@@ -605,11 +612,14 @@ DBUS_METHOD( MaximumRate )
static
void
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"
)
)
psz_loop_status
=
LOOP_STATUS_TRACK
;
else
if
(
var_GetBool
(
p_intf
->
p_sys
->
p_playlist
,
"loop"
)
)
psz_loop_status
=
LOOP_STATUS_PLAYLIST
;
else
psz_loop_status
=
LOOP_STATUS_NONE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment