[vlc-devel] Issue with libVLC and pulse

Colin Guthrie gmane at colin.guthr.ie
Fri May 28 16:31:19 CEST 2010


'Twas brillig, and Rémi Denis-Courmont at 25/05/10 13:23 did gyre and
gimble:
> There is only one way: let the application set the name (through
> libvlc_set_user_agent() or whatever). Of course, if phono does not provide
> the infos, you are screwed. But then it really is a Phonon design bug, in
> addition to the libvlc design bug, and vlc-devel is about libvlc not
> Phonon.

If there was a libvlc_set_user_agent() API call then this could be
filled in automatically in the backend just as is done in GStreamer
currently:

http://gitorious.org/phonon/phonon/blobs/master/gstreamer/backend.cpp#line63

That said, this API call would have to be called prior to libvlc opening
the pulse context. I'm not sure of the internals in VLC but I'm sure
this can be arranged/documented appropriately.

With regards to how the actual .desktop parsing stuff in PA works, well
it's all inside a module called module-augment-properties.
(src/modules/module-augment-properties.c)

It looks in /usr/share/applications and one level of subfolder below
that looking for a .desktop file that matches the current process name.
It only looks in these folders so if there is a custom folder or some
other path that you use, it wont find them. If there is an XDG variable
name that should also be honored here, I can cook up a patch
($XDG_DATA_DIR??) to check it too.

If it finds a Name= entry in the .desktop file it will use that as the
application name.

I think overall, it's "nicer" to be able to set it explicitly via API as
that gives more complete control over things.

FWIW, an alternative method would be to expose a generic key->value
setting system API system that we could ultimately push into pulse. It
accepts various bits of data via a "proplist" (property list). This can
include things like application name, icon, media name etc. Perhaps a
similarly generic/general purpose system could be exposed in VLC and
then mapped to pulse? This could save building fixed APIs to deal with
each individual eventuality?

More info on the properties supported by pulse here:
http://0pointer.de/lennart/projects/pulseaudio/doxygen/proplist_8h.html
(note that some of the properties apply at to different things: For VLC
the "For Streams" or "For Clients" are likely the most appropriate).

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]




More information about the vlc-devel mailing list