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 693168 - Implement support for GstValueList and other fundamental types
Implement support for GstValueList and other fundamental types
Status: RESOLVED DUPLICATE of bug 753754
Product: GStreamer
Classification: Platform
Component: gst-python
1.0.5
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-02-04 22:28 UTC by Alex Kaye
Modified: 2017-03-21 18:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gstvalue: make GstValueList/Array GBoxed-derived types (9.27 KB, patch)
2013-05-02 15:03 UTC, Akihiro Tsukada
needs-work Details | Review

Description Alex Kaye 2013-02-04 22:28:40 UTC
TypeError: unknown type GstValueList

I encountered this error whilst trying to pull magnitude/phase data from the spectrum plugin.

Using:
message.get_structure().get_value('magnitude')

Guess it needs an override. I haven't checked other 'GstValue' types, but if this is missing, maybe there are others.
Comment 1 Виктор 2013-04-21 05:29:36 UTC
I've this bug too.

Traceback (most recent call last):
  • File "/home/popsul/projects/foobnix/src/foobnix/regui/engine/gstreamer.py", line 420 in on_sync_message
    magnitude = struct.get_value("magnitude")
  • File "/usr/lib/python2.7/dist-packages/gi/types.py", line 113 in function
    return info.invoke(*args, **kwargs)
TypeError: unknown type GstValueLis

Ubuntu:                13.04
GStreamer:             1.0.6-1
gir1.2-gstreamer-1.0:  1.0.6-1
python-gi:             3.8.0-2
Comment 2 Akihiro Tsukada 2013-05-02 15:03:38 UTC
Created attachment 243064 [details] [review]
gstvalue: make GstValueList/Array GBoxed-derived types
Comment 3 Akihiro Tsukada 2013-05-02 15:07:19 UTC
Comment on attachment 243064 [details] [review]
gstvalue: make GstValueList/Array GBoxed-derived types

I have the same problem in accessing to a GstValueList member of GstStructure from my python script, and the attached patch to gstreamer core solved it.
Comment 4 Daniel Manrique 2013-06-20 18:44:00 UTC
Hello, I'm experiencing this problem as well; without GstValueList, data from spectrum messages is near useless from Python.

Would it be possible to set this bug to something other than UNCONFIRMED? There are at least four people experiencing it, and I bet any of us could provide sample code to trivially reproduce this issue if needed.

I found a possible workaround: the structure's to_string method does work properly and it returns a textual representation which *does* include the spectrum data, as seen below. So a possible workaround (although a very kludgy one) would be to get this and then somehow parse it into a usable Python data structure.

spectrum, endtime=(guint64)4900000000, timestamp=(guint64)4800000000, stream-time=(guint64)4800000000, running-time=(guint64)4800000000, duration=(guint64)100000000, magnitude=(float){ -32.074737548828125, -39.380210876464844, -55.870075225830078, -57.512611389160156, -54.572360992431641, -54.207714080810547, -54.9658203125, -55.589195251464844, -58.231952667236328, -59.436054229736328, -60, -60, -60, -59.5567626953125, -59.763156890869141, -59.887001037597656, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60 };
Comment 5 Sebastian Dröge (slomo) 2013-11-03 09:46:41 UTC
Comment on attachment 243064 [details] [review]
gstvalue: make GstValueList/Array GBoxed-derived types

The solution would be to add support for these types to gst-python.

Making them boxed types will break API/ABI and can (if at all) only be done when we move to 2.0.
Comment 6 Sebastian Dröge (slomo) 2013-12-23 14:25:00 UTC
gst-python should implement overrides for the GstValueList and the other fundamental types we implement. It already does that for GstFraction, shouldn't be too hard to implement for the others.
Comment 7 Nicolas Dufresne (ndufresne) 2017-03-21 18:04:38 UTC

*** This bug has been marked as a duplicate of bug 753754 ***