Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
c1f69cc7
Commit
c1f69cc7
authored
Mar 21, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbus: UpdateCaps is now always called with the playlist unlocked.
parent
cccd154d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
modules/control/dbus.c
modules/control/dbus.c
+15
-14
No files found.
modules/control/dbus.c
View file @
c1f69cc7
...
...
@@ -74,7 +74,7 @@ static int AllCallback( vlc_object_t*, const char*, vlc_value_t, vlc_value_t, vo
static
int
GetInputMeta
(
input_item_t
*
,
DBusMessageIter
*
);
static
int
MarshalStatus
(
intf_thread_t
*
,
DBusMessageIter
*
,
bool
);
static
int
UpdateCaps
(
intf_thread_t
*
,
bool
);
static
int
UpdateCaps
(
intf_thread_t
*
);
/* GetCaps() capabilities */
enum
...
...
@@ -763,6 +763,12 @@ static int Open( vlc_object_t *p_this )
dbus_connection_flush
(
p_conn
);
p_intf
->
pf_run
=
Run
;
p_intf
->
p_sys
=
p_sys
;
p_sys
->
p_conn
=
p_conn
;
p_sys
->
p_events
=
vlc_array_new
();
vlc_mutex_init
(
&
p_sys
->
lock
);
p_playlist
=
pl_Hold
(
p_intf
);
PL_LOCK
;
var_AddCallback
(
p_playlist
,
"item-current"
,
AllCallback
,
p_intf
);
...
...
@@ -775,13 +781,7 @@ static int Open( vlc_object_t *p_this )
PL_UNLOCK
;
pl_Release
(
p_intf
);
p_intf
->
pf_run
=
Run
;
p_intf
->
p_sys
=
p_sys
;
p_sys
->
p_conn
=
p_conn
;
p_sys
->
p_events
=
vlc_array_new
();
vlc_mutex_init
(
&
p_sys
->
lock
);
UpdateCaps
(
p_intf
,
false
);
UpdateCaps
(
p_intf
);
return
VLC_SUCCESS
;
}
...
...
@@ -969,7 +969,7 @@ static int TrackListChangeEmit( intf_thread_t *p_intf, int signal, int i_node )
if
(
p_intf
->
p_sys
->
b_dead
)
return
VLC_SUCCESS
;
UpdateCaps
(
p_intf
,
pl_Unlocked
);
UpdateCaps
(
p_intf
);
TrackListChangeSignal
(
p_intf
->
p_sys
->
p_conn
,
p_intf
);
return
VLC_SUCCESS
;
}
...
...
@@ -1019,7 +1019,7 @@ static int StateChange( intf_thread_t *p_intf, int i_input_state )
if
(
p_intf
->
p_sys
->
b_dead
)
return
VLC_SUCCESS
;
UpdateCaps
(
p_intf
,
pl_Unlocked
);
UpdateCaps
(
p_intf
);
if
(
!
p_sys
->
b_meta_read
&&
i_input_state
==
PLAYING_S
)
{
...
...
@@ -1055,7 +1055,7 @@ static int StatusChangeEmit( intf_thread_t * p_intf )
if
(
p_intf
->
p_sys
->
b_dead
)
return
VLC_SUCCESS
;
UpdateCaps
(
p_intf
,
pl_Unlocked
);
UpdateCaps
(
p_intf
);
StatusChangeSignal
(
p_intf
->
p_sys
->
p_conn
,
p_intf
);
return
VLC_SUCCESS
;
}
...
...
@@ -1106,17 +1106,18 @@ static int TrackChange( intf_thread_t *p_intf )
/*****************************************************************************
* UpdateCaps: update p_sys->i_caps
* This function have to be called with the playlist unlocked
****************************************************************************/
static
int
UpdateCaps
(
intf_thread_t
*
p_intf
,
bool
b_playlist_locked
)
static
int
UpdateCaps
(
intf_thread_t
*
p_intf
)
{
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
;
dbus_int32_t
i_caps
=
CAPS_CAN_HAS_TRACKLIST
;
playlist_t
*
p_playlist
=
pl_Hold
(
p_intf
);
if
(
!
b_playlist_locked
)
PL_LOCK
;
PL_LOCK
;
if
(
p_playlist
->
current
.
i_size
>
0
)
i_caps
|=
CAPS_CAN_PLAY
|
CAPS_CAN_GO_PREV
|
CAPS_CAN_GO_NEXT
;
if
(
!
b_playlist_locked
)
PL_UNLOCK
;
PL_UNLOCK
;
input_thread_t
*
p_input
=
playlist_CurrentInput
(
p_playlist
);
if
(
p_input
)
...
...
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