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 670303 - [0.11] Can't access "rms", "peak" and "decay" keys from GstLevel bus message trough PyGI
[0.11] Can't access "rms", "peak" and "decay" keys from GstLevel bus message ...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.11.x
Other Linux
: Normal normal
: 0.11.2
Assigned To: Tim-Philipp Müller
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-02-17 16:45 UTC by Peteris Krisjanis
Modified: 2012-02-18 11:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Updated GstLevel methods for creating and populating message to use GValueArray (2.95 KB, patch)
2012-02-17 16:46 UTC, Peteris Krisjanis
none Details | Review

Description Peteris Krisjanis 2012-02-17 16:45:27 UTC
I can't access rms/peak/decay keys from bus GstLevel element message, because they are exposed using GstValueList, which isn't supported by Gstreamer GI. When I try to access them Python returns TypeInfo error about that it can't access GstValueList because it doesn't know that.

Solutions would either expose GstValueList to GI, or return variables in another type of array/list, for example, GValueArray.
Comment 1 Peteris Krisjanis 2012-02-17 16:46:18 UTC
Created attachment 207865 [details] [review]
Updated GstLevel methods for creating and populating message to use GValueArray
Comment 2 Tim-Philipp Müller 2012-02-18 11:40:05 UTC
Thanks, pushed with some minor changes:

 - suppress GValueArray deprecation warnings for now

 - combine  g_value_take_boxed() and g_value_array_new()

 - remove now superfluous  g_value_unset (&v);

 - updated docs

- update unit test for this change


commit dc3beab0abdcc5f1a1b645796b33c1147c2a2625
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Sat Feb 18 11:38:36 2012 +0000

    tests: fix up level test for GstValueList -> GValueArray change
    
    https://bugzilla.gnome.org/show_bug.cgi?id=670303

commit d44b3fd8ece1ba51dd676d563cd903718046be09
Author: Peteris Krisjanis <pecisk@gmail.com>
Date:   Thu Feb 16 18:01:29 2012 +0200

    level: use GValueArray instead of GstValueList in messages
    
    Updated GstLevel element to use GValueArray instead of
    GstValueList for rms/peak/decay keys attached to element
    message.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=670303