[vlc-devel] Re: D-Bus multiple APIs in vlc code
rem at videolan.org
Tue Nov 28 16:03:16 CET 2006
Le mardi 28 novembre 2006 14:38, Rafaël Carré a écrit :
> When doing some D-Bus and HAL related code, I fixed a non-critical
> bug, where vlc didn't unreference the D-Bus connection when it
> wouldn't use it anymore. This is the correct way to use D-Bus.
Then it is the way to go.
> However JP Saman noticed that this would cause vlc to segfault on his
> distro, using version 0.33 of D-Bus.
Supporting a bunch of versions of an unstable API in very impractical
and error-prone. I would support checking the API version in configure
and ignoring if it is an unstable one. If DBus was explicitly requested
on the configure line, than print an explicit error message.
I think GNU portable threads are unusable because it breaks too many
dependencies. And then, apart from Win32 threads, I suspect none of the
implementations are actually still in use.
> Another problem of D-Bus is that for an application to be able to use
> it from multiple threads, it has to call the dbus_thread_init()
AFAICT, VLC uses POSIX threads on systems with dbus. I presume you can
tell dbus to use POSIX threads directly. The GnuTLS plugin already does
that when LIBVLC_USE_PTHREAD is defined. One obvious advantage is that
it may avoid confusing the library when something else also uses it
within the same process.
Which features are missing from the VLC threading API by the way?
> So my proposal is to get rid of 4 D-Bus dependancies, and only be
> compatible with D-Bus >= 1.0.0 to avoid using old, buggy & deprecated
I fully support that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the vlc-devel