[vlc-devel] [vlc-commits] single instance: Avoid initializing twice because of dbus activation

Mirsal Ennaime mirsal at videolan.org
Mon Jun 4 19:42:52 CEST 2012


On Sun, 2012-05-13 at 10:26 +0300, Rémi Denis-Courmont wrote:
> Le dimanche 13 mai 2012 08:24:16 Mirsal Ennaime, vous avez écrit :
> > I disagree, registering the well-known name here would serve no useful
> > purpose other than checking if another instance is running,
> 
> You are totally missing the point of name registration.
> You are wrong.

I do get dbus name registration very well. However, the libvlc
initialization sequence and the dbus control module do not share the
same connection, because they are running on different threads while
connection handling in dbus is not thread safe.

They are then to be considered as two separate entities on the bus
because a name is owned with the scope of a dbus connection. It is not
per-process.

The role of the connection used in src/libvlc.c is only to make an mpris
client call, it can not make any use of the well-known name, given that
only the dbus control module can answer calls for which the well-known
name is set as a destination

> > it takes as
> > much time if not more and it is subject to the exact same limitations.
> 
> That's patently untrue. The name will be have to be registered anyway. This 
> actually saves time.

It will have to be registered indeed, but over a different, private
connection unless there is a way to reuse the same connection in the
dbus control interface.

This is probably where lies our misunderstanding, do you know how I can
use the same connection for the single instance mode and the dbus
control module ?


Best regards,

-- 
mirsal 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120604/bbeae5ac/attachment.sig>


More information about the vlc-devel mailing list