GNOME Bugzilla – Bug 693168
Implement support for GstValueList and other fundamental types
Last modified: 2017-03-21 18:04:38 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.
I've this bug too. Traceback (most recent call last):
+ Trace 231823
magnitude = struct.get_value("magnitude")
return info.invoke(*args, **kwargs)
Ubuntu: 13.04 GStreamer: 1.0.6-1 gir1.2-gstreamer-1.0: 1.0.6-1 python-gi: 3.8.0-2
Created attachment 243064 [details] [review] gstvalue: make GstValueList/Array GBoxed-derived types
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.
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 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.
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.
*** This bug has been marked as a duplicate of bug 753754 ***