gstreamer-1.0 binding: no way to create a Gst.AllocationParams --- bind as struct instead of compact class?
Gst.AllocationParams is bound as a compact class. In the binding for Gst.AllocationParams, there is no public constructor or static initializer for AllocationParams
. I can't for the life of me find any way to create an AllocationParams
instance!
Upstream, GstAllocationParams is a plain struct. Its GType is a boxed type, and it can be used as a plain struct without boxing. That makes me think it should be bound as a Vala struct instead of as a compact class. (Either that, or we should add a Vala factory function!) What say you?
Examples of things I've tried
Object constructor
foo.vala:3.13-3.38: error: `Gst.AllocationParams' does not have a default constructor
var a = new Gst.AllocationParams();
^^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation failed: 1 error(s), 0 warning(s)
Struct creation function
foo.vala:3.13-3.34: error: use `new' operator to create new objects
var a = Gst.AllocationParams();
^^^^^^^^^^^^^^^^^^^^^^
Object.new()
This compiles:
var a = GLib.Object.new(typeof(Gst.AllocationParams));
but produces at runtime:
(process:64988): GLib-GObject-CRITICAL **: 22:35:39.864: g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed
since boxed types aren't GObject types.