Unable to append GValueArray to GValueArray.
usdin opened this issue · 2 comments
Hi, I am new to Gstreamer and fairly good with Java. While I was trying to create array of array as described here
https://gstreamer.freedesktop.org/documentation/audioconvert/index.html?gi-language=c#example-matrix-generation-code.
I couldn't find any api to do so. Please suggest.
You could probably do this with lowlevel classes, although if you use them directly they're not guaranteed to be stable across releases. See https://github.com/gstreamer-java/gst1-java-core/blob/master/src/org/freedesktop/gstreamer/lowlevel/GValueAPI.java#L242
We ideally need to have a look at refactoring GObject::set to support passing in arrays, as well as supporting GStreamer's string formats, at https://github.com/gstreamer-java/gst1-java-core/blob/master/src/org/freedesktop/gstreamer/glib/GObject.java#L308
If you only need to create an element with that property and not change the property later, then you should also be able to use Gst::parseLaunch and the same format given under launch lines in the link you shared.
eg. (not tested) this should work.
Element convert = Gst.parseLaunch("audioconvert mix-matrix=\"<<(float)1.0, (float)0.0, (float)0.0, (float)0.0>, <(float)0.0, (float)1.0, (float)0.0, (float)0.0>>\"");
Added setAsString
support to GstObject
, which at the moment is probably as much support as we can give this use case, so closing issue. Will be in 1.2 release soon.