[vlc-devel] Re: D-Bus multiple APIs in vlc code

Jean-Paul Saman jean-paul.saman at planet.nl
Tue Nov 28 14:53:43 CET 2006


Rafaël Carré wrote:
> Hello,
> 
> VLC, in trunk, at the moment support 4 different versions of D-Bus api ( < 0.30, 0.30, 0.92, 1.0.0) and 2 different versions of HAL api ( >= 0.2.97, >= 0.5.0 )
> 
> D-Bus has been changing API fast over its development, and now has reached version 1.0, with a stable API.
> You will note that before D-Bus 1.0RC3 (released 6 days before 1.0) you had to define "DBUS_API_SUBJECT_TO_CHANGE" to be able to compile code using it, to ensure programmers did know that API was unstable.
> 
> HAL is still considered API-unstable.
> 
> 
> 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.
> 
> However JP Saman noticed that this would cause vlc to segfault on his distro, using version 0.33 of D-Bus.
> 
> 
> 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() function.
> 
> You have to provide this function pointers to a lot of function needed for threads management, and it is not possible given current vlc threads implementation.
> 
> However, this is simple since D-Bus 0.93, because this version added dbus_thread_init_default() that is all we really need.
> 
> 
> 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 stuff.
> 
> The same could be applied for HAL, but I got no trouble reports on that part. Anyway that would make code look far better to only support one API.
> 
> --
> Rafaël Carré

Let me note that the downside is that vlc features that depend on dbus 
won't be usable whe switching to D-Bus >= 1.0.0. Systems with older dbus 
versions will break.

Gtz,
Jean-Paul Saman.

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list