Open Xeue opened 2 weeks ago
The "parsers" are actually called marshalers and are defined here: https://github.com/go-gst/go-glib/blob/main/glib/gvalue.go#L326 in go-glib
. Additional marshalers can be registered by other libraries like this: https://github.com/go-gst/go-gst/blob/main/gst/gstwebrtc/session_description.go#L13-L20
The two functions ToGValue
and marshalXXX
work as follows:
ToGValue
gets called when the values need to get passed into cgo, it creates a GValue
that holds the value and a type infomarshalXXX
gets registered for the specific type info and gets called when GValue.GoValue()
is called.Since the GValueArray
is located in glib, the bindings should be added to go-glib
.
Oftentimes the gtk rust bindings are also a good place for reference, since they do similar things.
Hey, we are trying to use the level element which produces messages as described here: https://gstreamer.freedesktop.org/documentation/level/index.html?gi-language=c
There is no parser for this built in and we are struggling to work out how to access the GValueArrays. The [GstClockTime] types are converted but the GetValues and Values functions. But the [GValueArray of doubles] is serialised.
We have tried messing around with go glib and havn't really got anywhere other than a few SIGSEGV violations and other such nasty things...
Is there a way to parse these values and if not how can we go about writing a parser?
Thanks!