Gst.ValueArray containing other Gst.ValueArrays is not accepted as property value where it should be
I'm trying to set the 'mix-matrix' property of an audioconvert element from Python. The property type is a Gst.ValueArray containing Gst.ValueArrays that contain floats.
I'm on these versions:
- OS: Ubuntu 22.10
- python3-gst-1.0 package: 1.20.3-1
- gstreamer1.0-plugins-base package: 1.20.3-2
Here's an example where it fails:
import sys
import gi
gi.require_version('Gst', '1.0')
gi.require_version('GLib', '2.0')
from gi.repository import Gst, GObject, GLib
Gst.init(sys.argv)
audioconvert = Gst.ElementFactory.make('audioconvert')
mix_matrix = Gst.ValueArray([Gst.ValueArray([0.5, 0.5]), Gst.ValueArray([0.5, 0.5])])
audioconvert.set_property('mix-matrix', mix_matrix)
print(audioconvert.get_property('mix-matrix'))
The first time I set the property, I get a warning:
Warning: value "< < 0.500000, 0.500000 >, < 0.500000, 0.500000 > >" of type 'GstValueArray' is invalid or out of range for property 'mix-matrix' of type 'GstValueArray'
And the value I'm trying to set does not take:
>>> print(audioconvert.get_property('mix-matrix'))
<>
If I try to set the mix-matrix again, I don't get a warning anymore, but the value still doesn't take.
Is there a pure-Python workaround for this problem? My current workaround is a custom Python C-extension that does it from C, which is quite inconvenient.