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
76c94cb5
Commit
76c94cb5
authored
Nov 27, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbus: do not use pf_run
parent
70f43de3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
13 deletions
+19
-13
modules/control/dbus/dbus.c
modules/control/dbus/dbus.c
+18
-13
modules/control/dbus/dbus_common.h
modules/control/dbus/dbus_common.h
+1
-0
No files found.
modules/control/dbus/dbus.c
View file @
76c94cb5
...
...
@@ -104,7 +104,7 @@ enum
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
void
Run
(
intf_thread_t
*
);
static
void
*
Run
(
void
*
);
static
int
TrackChange
(
intf_thread_t
*
);
static
int
AllCallback
(
vlc_object_t
*
,
const
char
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
...
...
@@ -157,6 +157,7 @@ vlc_module_end ()
static
int
Open
(
vlc_object_t
*
p_this
)
{
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
#warning Leaks on error paths!
/* initialisation of the connection */
if
(
!
dbus_threads_init_default
()
)
...
...
@@ -230,7 +231,7 @@ static int Open( vlc_object_t *p_this )
dbus_connection_flush
(
p_conn
);
p_intf
->
pf_run
=
Run
;
p_intf
->
pf_run
=
NULL
;
p_intf
->
p_sys
=
p_sys
;
p_sys
->
p_conn
=
p_conn
;
p_sys
->
p_events
=
vlc_array_new
();
...
...
@@ -257,28 +258,27 @@ static int Open( vlc_object_t *p_this )
remove_timeout
,
timeout_toggled
,
p_intf
,
NULL
)
)
{
dbus_connection_unref
(
p_conn
);
free
(
p_sys
);
return
VLC_ENOMEM
;
}
goto
error
;
if
(
!
dbus_connection_set_watch_functions
(
p_conn
,
add_watch
,
remove_watch
,
watch_toggled
,
p_intf
,
NULL
)
)
{
dbus_connection_unref
(
p_conn
);
free
(
p_sys
);
return
VLC_ENOMEM
;
}
goto
error
;
/* dbus_connection_set_wakeup_main_function( p_conn,
wakeup_main_loop,
p_intf, NULL); */
if
(
vlc_clone
(
&
p_sys
->
thread
,
Run
,
p_intf
,
VLC_THREAD_PRIORITY_LOW
)
)
goto
error
;
return
VLC_SUCCESS
;
error:
dbus_connection_unref
(
p_conn
);
free
(
p_sys
);
return
VLC_ENOMEM
;
}
/*****************************************************************************
...
...
@@ -291,6 +291,9 @@ static void Close ( vlc_object_t *p_this )
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
;
playlist_t
*
p_playlist
=
p_sys
->
p_playlist
;
vlc_cancel
(
p_sys
->
thread
);
vlc_join
(
p_sys
->
thread
,
NULL
);
var_DelCallback
(
p_playlist
,
"activity"
,
AllCallback
,
p_intf
);
var_DelCallback
(
p_playlist
,
"intf-change"
,
AllCallback
,
p_intf
);
var_DelCallback
(
p_playlist
,
"volume"
,
AllCallback
,
p_intf
);
...
...
@@ -771,8 +774,9 @@ MPRISEntryPoint ( DBusConnection *p_conn, DBusMessage *p_from, void *p_this )
* Run: main loop
*****************************************************************************/
static
void
Run
(
intf_thread_t
*
p_intf
)
static
void
*
Run
(
void
*
data
)
{
intf_thread_t
*
p_intf
=
data
;
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
;
mtime_t
i_last_run
=
mdate
();
...
...
@@ -862,6 +866,7 @@ static void Run ( intf_thread_t *p_intf )
vlc_restorecancel
(
canc
);
}
assert
(
0
);
}
static
void
wakeup_main_loop
(
void
*
p_data
)
...
...
modules/control/dbus/dbus_common.h
View file @
76c94cb5
...
...
@@ -100,6 +100,7 @@ struct intf_sys_t
vlc_array_t
*
p_watches
;
int
p_pipe_fds
[
2
];
vlc_mutex_t
lock
;
vlc_thread_t
thread
;
input_thread_t
*
p_input
;
mtime_t
i_last_input_pos
;
/* Only access from input thread */
...
...
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