[vlc-commits] dbus: Update comments related to the bus name policy

Mirsal Ennaime git at videolan.org
Tue Apr 17 11:34:22 CEST 2012


vlc | branch: master | Mirsal Ennaime <mirsal at videolan.org> | Tue Apr 17 11:33:25 2012 +0200| [e072818352c8b62d3f65726a5060999194806b28] | committer: Mirsal Ennaime

dbus: Update comments related to the bus name policy

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e072818352c8b62d3f65726a5060999194806b28
---

 modules/control/dbus/dbus.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/modules/control/dbus/dbus.c b/modules/control/dbus/dbus.c
index c663d85..b3035c3 100644
--- a/modules/control/dbus/dbus.c
+++ b/modules/control/dbus/dbus.c
@@ -184,7 +184,9 @@ static int Open( vlc_object_t *p_this )
 
     dbus_connection_set_exit_on_disconnect( p_conn, FALSE );
 
-    /* register a well-known name on the bus */
+    /* register an instance-specific well known name of the form
+     * org.mpris.MediaPlayer2.vlc.instanceXXXX where XXXX is the
+     * current process's pid */
     size_t i_length = sizeof( DBUS_MPRIS_BUS_NAME ) +
         sizeof( DBUS_INSTANCE_ID_PREFIX ) + 10;
 
@@ -206,6 +208,8 @@ static int Open( vlc_object_t *p_this )
     }
     msg_Dbg( p_intf, "listening on dbus as: %s", unique_service );
 
+    /* Try to register org.mpris.MediaPlayer2.vlc as well in case we are
+     * the only VLC instance currently connected to the bus */
     dbus_bus_request_name( p_conn, DBUS_MPRIS_BUS_NAME, 0, NULL );
 
     /* Register the entry point object path */



More information about the vlc-commits mailing list