Wilhelm Bartel
Wilhelm Bartel
the reason for this is that the glib Value contains a type info, and via reflection this is a string if you pass in a string. We provide the following...
I think that is the only way, but currently there is no autogenerating for go-gst.
@Xeue for simple booleans and other values [Object.SetProperty](https://pkg.go.dev/github.com/go-gst/go-glib/glib#Object.SetProperty) is the way to set properties.
The solution for this will be implemented in #170, which contains the breaking changes. I'm not going to backport the fix.
If your element only needs one sink and one source pad, then take a look at the following links: * https://github.com/go-gst/go-gst/tree/main/examples/plugins/basetransform * https://gstreamer.freedesktop.org/documentation/base/gstbasetransform.html the first links shows the implementation, where...
I have not used all the gstreamer classes nor do I have enough test cases for this. Could you please create a (simplified) PR of what you managed to do?
From looking at it, this looks like an early GC of the `GValue`, before you are done with the structure. Could you please experiment with calling `runtime.GC()` between these lines....
Okay that confirms my suspicion, but the fixing these kinds of issues is annoying. I will check it when I have time. In the meantime you could look into it...
I checked the rust bindings for reference: * The `FromValue` used `get_boxed` https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/blob/main/gstreamer/src/structure.rs#L327-329 * `from_glib_none` uses `gst_structure_copy` https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/blob/main/gstreamer/src/structure.rs#L270 I think the fix for your issue is simply copying the structure...
After thinking a bit more about this, this is also an issue with messages, I reported in #31 but got it wrong there, structures are not refcounted, but they are...