After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 537544 - [pulse] allow setting pa context properties
[pulse] allow setting pa context properties
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal enhancement
: 0.10.26
Assigned To: Stefan Sauer (gstreamer, gtkdoc dev)
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-06-10 09:20 UTC by Marc-Andre Lureau
Modified: 2010-09-07 11:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add a proplist property (3.33 KB, patch)
2010-06-21 14:46 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review
use a gststructure for pulse stream properties (10.56 KB, patch)
2010-08-16 13:25 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review
use a gststructure for pulse stream properties (10.61 KB, patch)
2010-09-06 07:45 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
accepted-commit_now Details | Review
use a gststructure for pulse stream properties (10.68 KB, patch)
2010-09-06 11:54 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review

Description Marc-Andre Lureau 2008-06-10 09:20:22 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. (?)
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2008-06-10 19:28:17 UTC
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.

Comment 2 Marc-Andre Lureau 2008-06-11 21:09:09 UTC
(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?
Comment 3 Marc-Andre Lureau 2008-06-11 21:10:10 UTC
and semantic space http://live.gnome.org/AndersFeder/SemanticSpace/BusTopology
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2010-06-21 14:46:36 UTC
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
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2010-06-21 14:48:43 UTC
If people agree to the approach I can make the same patch for pulsesrc and apply.
Comment 6 Wim Taymans 2010-06-21 14:56:42 UTC
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.
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2010-06-21 19:01:08 UTC
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 :)
Comment 8 Stefan Sauer (gstreamer, gtkdoc dev) 2010-08-16 13:25:50 UTC
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.
Comment 9 Stefan Sauer (gstreamer, gtkdoc dev) 2010-09-06 07:45:17 UTC
Created attachment 169547 [details] [review]
use a gststructure for pulse stream properties

rebased patch.
Comment 10 Sebastian Dröge (slomo) 2010-09-06 08:26:33 UTC
Comment on attachment 169547 [details] [review]
use a gststructure for pulse stream properties

Looks good but we're at 0.10.26 now ;)
Comment 11 Tim-Philipp Müller 2010-09-06 09:45:19 UTC
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.
Comment 12 Stefan Sauer (gstreamer, gtkdoc dev) 2010-09-06 11:54:45 UTC
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) ...
Comment 13 Tim-Philipp Müller 2010-09-06 12:08:27 UTC
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.
Comment 14 Stefan Sauer (gstreamer, gtkdoc dev) 2010-09-07 11:23:35 UTC
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 15 Stefan Sauer (gstreamer, gtkdoc dev) 2010-09-07 11:23:58 UTC
Comment on attachment 169565 [details] [review]
use a gststructure for pulse stream properties

pushed with small updates