Commit 334979d1 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

dbus: add command line option to disable MPRIS

parent 9d8dcfc7
......@@ -201,11 +201,14 @@ int main( int i_argc, const char *ppsz_argv[] )
pthread_t self = pthread_self ();
pthread_sigmask (SIG_SETMASK, &set, NULL);
const char *argv[i_argc + 2];
const char *argv[i_argc + 3];
int argc = 0;
argv[argc++] = "--no-ignore-config";
argv[argc++] = "--media-library";
#ifdef HAVE_DBUS
argv[argc++] = "--dbus";
#endif
ppsz_argv++; i_argc--; /* skip executable path */
#ifdef __OS2__
......@@ -237,9 +240,6 @@ int main( int i_argc, const char *ppsz_argv[] )
libvlc_add_intf (vlc, "hotkeys,none");
#if !defined (__OS2__)
libvlc_add_intf (vlc, "globalhotkeys,none");
#endif
#ifdef HAVE_DBUS
libvlc_add_intf (vlc, "dbus,none");
#endif
if (libvlc_add_intf (vlc, NULL))
goto out;
......
......@@ -1086,6 +1086,10 @@ static const char *const ppsz_prefres[] = {
"When using the one instance only option, enqueue items to playlist " \
"and keep playing current item.")
#define DBUS_TEXT N_("Expose media player via D-Bus")
#define DBUS_LONGTEXT N_("Allow other applications to control " \
"the VLC media player using the D-Bus MPRIS protocol.")
/*****************************************************************************
* Playlist
****************************************************************************/
......@@ -2037,6 +2041,9 @@ vlc_module_begin ()
ONEINSTANCEWHENSTARTEDFROMFILE_TEXT, true )
add_bool( "playlist-enqueue", 0, PLAYLISTENQUEUE_TEXT,
PLAYLISTENQUEUE_LONGTEXT, true )
#endif
#ifdef HAVE_DBUS
add_bool( "dbus", false, DBUS_TEXT, DBUS_LONGTEXT, true )
#endif
add_bool( "media-library", 0, ML_TEXT, ML_LONGTEXT, false )
add_bool( "playlist-tree", 0, PLTREE_TEXT, PLTREE_LONGTEXT, false )
......
......@@ -24,6 +24,7 @@
#include <vlc_common.h>
#include "../libvlc.h"
#include "../lib/libvlc_internal.h"
#ifdef HAVE_DBUS
/* used for one-instance mode */
......@@ -157,4 +158,8 @@ void system_Configure(libvlc_int_t *libvlc,
int argc, const char *const argv[])
{
system_ConfigureDbus(libvlc, argc, argv);
#ifdef HAVE_DBUS
if (var_InheritBool(libvlc, "dbus"))
libvlc_InternalAddIntf(libvlc, "dbus,none");
#endif
}
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