GNOME Bugzilla – Bug 537544
[pulse] allow setting pa context properties
Last modified: 2010-09-07 11:23:58 UTC
PulseAudio 0.9.11 have a dynamic object property interface: http://pulseaudio.org/browser/trunk/src/pulse/proplist.h GStreamer should offer an interface for the application to provide more information about the context / the content ... An interface is maybe not a good solution. Cymacs proposed to have additional properties on the elementes to get the PA context/stream pointers. Though we might have threading issues. (?)
Phew, the infomation that is possible to be passed needs to come from different areas: * GstTaglist * Gio: mime types and icon * glib: appname * application: window.* Applications could set a GstStructure with some of those fileds and we could add api to retrieve that from elements. Any idea if this would be nice to have elsewhere too.
(In reply to comment #1) > Phew, the infomation that is possible to be passed needs to come from different > areas: > * GstTaglist > * Gio: mime types and icon > * glib: appname > * application: window.* > > Applications could set a GstStructure with some of those fileds and we could > add api to retrieve that from elements. Any idea if this would be nice to have > elsewhere too. > libnotify?
and semantic space http://live.gnome.org/AndersFeder/SemanticSpace/BusTopology
Created attachment 164222 [details] [review] add a proplist property This patch is in use on N900 and survived testing for quite some time already. http://meego.gitorious.org/maemo-multimedia/gst-plugins-good/commit/adb7d27d08de070b8fbed4f037c973cd8646f3ad
If people agree to the approach I can make the same patch for pulsesrc and apply.
Wouldn't it be better to not expose the pa API? It requires apps to use the PA api to create the proplist, which goes against the abstraction that GStreamer provides. We could probably expose a GStructure that is then converted to a pa_proplist internally.
Wim, thats indeed better for this case. I'll rewrite the patch. In general I was thinking of exposing the fileseskriptor or underlying handle is a good way to unblock apps that have special needs. They should of course file a feature request everytime they use that :)
Created attachment 167967 [details] [review] use a gststructure for pulse stream properties If this patch is in principle okay I need to do a mass copy'n'paste to import the properties from http://0pointer.de/lennart/projects/pulseaudio/doxygen/proplist_8h.html http://git.0pointer.de/?p=pulseaudio.git;a=blob;f=src/pulse/proplist.h;hb=HEAD into gstreamers namespace.
Created attachment 169547 [details] [review] use a gststructure for pulse stream properties rebased patch.
Comment on attachment 169547 [details] [review] use a gststructure for pulse stream properties Looks good but we're at 0.10.26 now ;)
Comment on attachment 169547 [details] [review] use a gststructure for pulse stream properties >+ g_object_class_install_property (gobject_class, >+ PROP_PROPERTIES, >+ g_param_spec_boxed ("properties", "stream properties", >+ "list of pulseaudio stream properties", >+ GST_TYPE_STRUCTURE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); > } How about calling this property "stream-properties" then? Sounds less generic and might be less confusing when used with certain bindings.
Created attachment 169565 [details] [review] use a gststructure for pulse stream properties Renamed the "properties" to "stream-properties". Any good idea about the key defines? There are no installed headers for the pulse plugin. a) Should I add a doc blob pointing to the upstream definitions b) Should I add a doc blob and copy upstream definitions into it c) ...
I think pointing to the upstream docs is sufficient. Or you could list the ones you consider most important/interesting and refer to the docs for the rest.
commit f604e20499901bdaf3cf136b9cf383d66c422d9a Author: Stefan Kost <ensonic@users.sf.net> Date: Mon Aug 16 15:35:51 2010 +0300 pulse: allow setting stream properties Add a "properties" property to the elements to allow setting extra stream properties.
Comment on attachment 169565 [details] [review] use a gststructure for pulse stream properties pushed with small updates