// Code generated by girgen for GstController-1. DO NOT EDIT. package gstcontroller import ( "fmt" "runtime" "unsafe" "github.com/diamondburned/gotk4/pkg/glib/v2" "github.com/diamondburned/gotk4/pkg/gobject/v2" "github.com/go-gst/go-gst/pkg/gst" ) // #cgo pkg-config: gstreamer-controller-1.0 // #cgo CFLAGS: -Wno-deprecated-declarations // #include import "C" // GType values. var ( TypeInterpolationMode = gobject.Type(C.gst_interpolation_mode_get_type()) TypeLFOWaveform = gobject.Type(C.gst_lfo_waveform_get_type()) TypeARGBControlBinding = gobject.Type(C.gst_argb_control_binding_get_type()) TypeDirectControlBinding = gobject.Type(C.gst_direct_control_binding_get_type()) TypeLFOControlSource = gobject.Type(C.gst_lfo_control_source_get_type()) TypeProxyControlBinding = gobject.Type(C.gst_proxy_control_binding_get_type()) TypeTimedValueControlSource = gobject.Type(C.gst_timed_value_control_source_get_type()) TypeTriggerControlSource = gobject.Type(C.gst_trigger_control_source_get_type()) TypeInterpolationControlSource = gobject.Type(C.gst_interpolation_control_source_get_type()) TypeControlPoint = gobject.Type(C.gst_control_point_get_type()) ) func init() { gobject.RegisterGValueMarshalers([]gobject.TypeMarshaler{ gobject.TypeMarshaler{T: TypeInterpolationMode, F: marshalInterpolationMode}, gobject.TypeMarshaler{T: TypeLFOWaveform, F: marshalLFOWaveform}, gobject.TypeMarshaler{T: TypeARGBControlBinding, F: marshalARGBControlBindingInstance}, gobject.TypeMarshaler{T: TypeDirectControlBinding, F: marshalDirectControlBindingInstance}, gobject.TypeMarshaler{T: TypeLFOControlSource, F: marshalLFOControlSourceInstance}, gobject.TypeMarshaler{T: TypeProxyControlBinding, F: marshalProxyControlBindingInstance}, gobject.TypeMarshaler{T: TypeTimedValueControlSource, F: marshalTimedValueControlSourceInstance}, gobject.TypeMarshaler{T: TypeTriggerControlSource, F: marshalTriggerControlSourceInstance}, gobject.TypeMarshaler{T: TypeInterpolationControlSource, F: marshalInterpolationControlSourceInstance}, gobject.TypeMarshaler{T: TypeControlPoint, F: marshalControlPoint}, }) } // InterpolationMode wraps GstInterpolationMode // // The various interpolation modes available. type InterpolationMode C.int const ( // InterpolationModeNone wraps GST_INTERPOLATION_MODE_NONE // // steps-like interpolation, default InterpolationModeNone InterpolationMode = 0 // InterpolationModeLinear wraps GST_INTERPOLATION_MODE_LINEAR // // linear interpolation InterpolationModeLinear InterpolationMode = 1 // InterpolationModeCubic wraps GST_INTERPOLATION_MODE_CUBIC // // cubic interpolation (natural), may overshoot // the min or max values set by the control point, but is more 'curvy' InterpolationModeCubic InterpolationMode = 2 // InterpolationModeCubicMonotonic wraps GST_INTERPOLATION_MODE_CUBIC_MONOTONIC // // monotonic cubic interpolation, will not // produce any values outside of the min-max range set by the control points // (Since: 1.8) InterpolationModeCubicMonotonic InterpolationMode = 3 ) func marshalInterpolationMode(p unsafe.Pointer) (any, error) { return InterpolationMode(gobject.ValueFromNative(p).Enum()), nil } var _ gobject.GoValueInitializer = InterpolationMode(0) func (e InterpolationMode) InitGoValue(v *gobject.Value) { v.Init(TypeInterpolationMode) v.SetEnum(int(e)) } func (e InterpolationMode) String() string { switch e { case InterpolationModeCubic: return "InterpolationModeCubic" case InterpolationModeCubicMonotonic: return "InterpolationModeCubicMonotonic" case InterpolationModeLinear: return "InterpolationModeLinear" case InterpolationModeNone: return "InterpolationModeNone" default: return fmt.Sprintf("InterpolationMode(%d)", e) } } // LFOWaveform wraps GstLFOWaveform // // The various waveform modes available. type LFOWaveform C.int const ( // LfoWaveformSine wraps GST_LFO_WAVEFORM_SINE // // sine waveform LfoWaveformSine LFOWaveform = 0 // LfoWaveformSquare wraps GST_LFO_WAVEFORM_SQUARE // // square waveform LfoWaveformSquare LFOWaveform = 1 // LfoWaveformSaw wraps GST_LFO_WAVEFORM_SAW // // saw waveform LfoWaveformSaw LFOWaveform = 2 // LfoWaveformReverseSaw wraps GST_LFO_WAVEFORM_REVERSE_SAW // // reverse saw waveform LfoWaveformReverseSaw LFOWaveform = 3 // LfoWaveformTriangle wraps GST_LFO_WAVEFORM_TRIANGLE // // triangle waveform LfoWaveformTriangle LFOWaveform = 4 ) func marshalLFOWaveform(p unsafe.Pointer) (any, error) { return LFOWaveform(gobject.ValueFromNative(p).Enum()), nil } var _ gobject.GoValueInitializer = LFOWaveform(0) func (e LFOWaveform) InitGoValue(v *gobject.Value) { v.Init(TypeLFOWaveform) v.SetEnum(int(e)) } func (e LFOWaveform) String() string { switch e { case LfoWaveformReverseSaw: return "LfoWaveformReverseSaw" case LfoWaveformSaw: return "LfoWaveformSaw" case LfoWaveformSine: return "LfoWaveformSine" case LfoWaveformSquare: return "LfoWaveformSquare" case LfoWaveformTriangle: return "LfoWaveformTriangle" default: return fmt.Sprintf("LFOWaveform(%d)", e) } } // TimedValueControlInvalidateCache wraps gst_timed_value_control_invalidate_cache // // The function takes the following parameters: // // - self TimedValueControlSource: the #GstTimedValueControlSource // // Reset the controlled value cache. func TimedValueControlInvalidateCache(self TimedValueControlSource) { var carg1 *C.GstTimedValueControlSource // in, none, converted carg1 = (*C.GstTimedValueControlSource)(UnsafeTimedValueControlSourceToGlibNone(self)) C.gst_timed_value_control_invalidate_cache(carg1) runtime.KeepAlive(self) } // ARGBControlBindingInstance is the instance type used by all types extending GstARGBControlBinding. It is used internally by the bindings. Users should use the interface [ARGBControlBinding] instead. type ARGBControlBindingInstance struct { _ [0]func() // equal guard gst.ControlBindingInstance } var _ ARGBControlBinding = (*ARGBControlBindingInstance)(nil) // ARGBControlBinding wraps GstARGBControlBinding // // A value mapping object that attaches multiple control sources to a guint // gobject properties representing a color. A control value of 0.0 will turn the // color component off and a value of 1.0 will be the color level. type ARGBControlBinding interface { gst.ControlBinding upcastToGstARGBControlBinding() *ARGBControlBindingInstance } func unsafeWrapARGBControlBinding(base *gobject.ObjectInstance) *ARGBControlBindingInstance { return &ARGBControlBindingInstance{ ControlBindingInstance: gst.ControlBindingInstance{ ObjectInstance: gst.ObjectInstance{ InitiallyUnownedInstance: gobject.InitiallyUnownedInstance{ ObjectInstance: *base, }, }, }, } } func marshalARGBControlBindingInstance(p unsafe.Pointer) (any, error) { return unsafeWrapARGBControlBinding(gobject.ValueFromNative(p).Object()), nil } // UnsafeARGBControlBindingFromGlibNone is used to convert raw GstARGBControlBinding pointers to go while taking a reference and attaching a finalizer. This is used by the bindings internally. func UnsafeARGBControlBindingFromGlibNone(c unsafe.Pointer) ARGBControlBinding { return gobject.UnsafeObjectFromGlibNone(c).(ARGBControlBinding) } // UnsafeARGBControlBindingFromGlibFull is used to convert raw GstARGBControlBinding pointers to go while attaching a finalizer. This is used by the bindings internally. func UnsafeARGBControlBindingFromGlibFull(c unsafe.Pointer) ARGBControlBinding { return gobject.UnsafeObjectFromGlibFull(c).(ARGBControlBinding) } func (a *ARGBControlBindingInstance) upcastToGstARGBControlBinding() *ARGBControlBindingInstance { return a } // UnsafeARGBControlBindingToGlibNone is used to convert the instance to it's C value GstARGBControlBinding. This is used by the bindings internally. func UnsafeARGBControlBindingToGlibNone(c ARGBControlBinding) unsafe.Pointer { return gobject.UnsafeObjectToGlibNone(c) } // UnsafeARGBControlBindingToGlibFull is used to convert the instance to it's C value GstARGBControlBinding, while removeing the finalizer. This is used by the bindings internally. func UnsafeARGBControlBindingToGlibFull(c ARGBControlBinding) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } // NewARGBControlBinding wraps gst_argb_control_binding_new // // The function takes the following parameters: // // - object gst.Object: the object of the property // - propertyName string: the property-name to attach the control source // - csA gst.ControlSource: the control source for the alpha channel // - csR gst.ControlSource: the control source for the red channel // - csG gst.ControlSource: the control source for the green channel // - csB gst.ControlSource: the control source for the blue channel // // The function returns the following values: // // - goret gst.ControlBinding // // Create a new control-binding that attaches the given #GstControlSource to the // #GObject property. func NewARGBControlBinding(object gst.Object, propertyName string, csA gst.ControlSource, csR gst.ControlSource, csG gst.ControlSource, csB gst.ControlSource) gst.ControlBinding { var carg1 *C.GstObject // in, none, converted var carg2 *C.gchar // in, none, string var carg3 *C.GstControlSource // in, none, converted var carg4 *C.GstControlSource // in, none, converted var carg5 *C.GstControlSource // in, none, converted var carg6 *C.GstControlSource // in, none, converted var cret *C.GstControlBinding // return, none, converted carg1 = (*C.GstObject)(gst.UnsafeObjectToGlibNone(object)) carg2 = (*C.gchar)(unsafe.Pointer(C.CString(propertyName))) defer C.free(unsafe.Pointer(carg2)) carg3 = (*C.GstControlSource)(gst.UnsafeControlSourceToGlibNone(csA)) carg4 = (*C.GstControlSource)(gst.UnsafeControlSourceToGlibNone(csR)) carg5 = (*C.GstControlSource)(gst.UnsafeControlSourceToGlibNone(csG)) carg6 = (*C.GstControlSource)(gst.UnsafeControlSourceToGlibNone(csB)) cret = C.gst_argb_control_binding_new(carg1, carg2, carg3, carg4, carg5, carg6) runtime.KeepAlive(object) runtime.KeepAlive(propertyName) runtime.KeepAlive(csA) runtime.KeepAlive(csR) runtime.KeepAlive(csG) runtime.KeepAlive(csB) var goret gst.ControlBinding goret = gst.UnsafeControlBindingFromGlibNone(unsafe.Pointer(cret)) return goret } // ARGBControlBindingOverrides is the struct used to override the default implementation of virtual methods. // it is generic over the extending instance type. type ARGBControlBindingOverrides[Instance ARGBControlBinding] struct { // gst.ControlBindingOverrides allows you to override virtual methods from the parent class gst.ControlBinding gst.ControlBindingOverrides[Instance] } // UnsafeApplyARGBControlBindingOverrides applies the overrides to init the gclass by setting the trampoline functions. // This is used by the bindings internally and only exported for visibility to other bindings code. func UnsafeApplyARGBControlBindingOverrides[Instance ARGBControlBinding](gclass unsafe.Pointer, overrides ARGBControlBindingOverrides[Instance]) { gst.UnsafeApplyControlBindingOverrides(gclass, overrides.ControlBindingOverrides) } // RegisterARGBControlBindingSubClass is used to register a go subclass of GstARGBControlBinding. For this to work safely please implement the // virtual methods required by the implementation. func RegisterARGBControlBindingSubClass[InstanceT ARGBControlBinding]( name string, classInit func(class *ARGBControlBindingClass), constructor func() InstanceT, overrides ARGBControlBindingOverrides[InstanceT], signals map[string]gobject.SignalDefinition, interfaceInits ...gobject.SubClassInterfaceInit[InstanceT], ) gobject.Type { return gobject.UnsafeRegisterSubClass( name, classInit, constructor, overrides, signals, TypeARGBControlBinding, UnsafeARGBControlBindingClassFromGlibBorrow, UnsafeApplyARGBControlBindingOverrides, func (obj *gobject.ObjectInstance) gobject.Object { return unsafeWrapARGBControlBinding(obj) }, interfaceInits..., ) } // DirectControlBindingInstance is the instance type used by all types extending GstDirectControlBinding. It is used internally by the bindings. Users should use the interface [DirectControlBinding] instead. type DirectControlBindingInstance struct { _ [0]func() // equal guard gst.ControlBindingInstance } var _ DirectControlBinding = (*DirectControlBindingInstance)(nil) // DirectControlBinding wraps GstDirectControlBinding // // A value mapping object that attaches control sources to gobject properties. It // will map the control values directly to the target property range. If a // non-absolute direct control binding is used, the value range [0.0 ... 1.0] // is mapped to full target property range, and all values outside the range // will be clipped. An absolute control binding will not do any value // transformations. type DirectControlBinding interface { gst.ControlBinding upcastToGstDirectControlBinding() *DirectControlBindingInstance } func unsafeWrapDirectControlBinding(base *gobject.ObjectInstance) *DirectControlBindingInstance { return &DirectControlBindingInstance{ ControlBindingInstance: gst.ControlBindingInstance{ ObjectInstance: gst.ObjectInstance{ InitiallyUnownedInstance: gobject.InitiallyUnownedInstance{ ObjectInstance: *base, }, }, }, } } func marshalDirectControlBindingInstance(p unsafe.Pointer) (any, error) { return unsafeWrapDirectControlBinding(gobject.ValueFromNative(p).Object()), nil } // UnsafeDirectControlBindingFromGlibNone is used to convert raw GstDirectControlBinding pointers to go while taking a reference and attaching a finalizer. This is used by the bindings internally. func UnsafeDirectControlBindingFromGlibNone(c unsafe.Pointer) DirectControlBinding { return gobject.UnsafeObjectFromGlibNone(c).(DirectControlBinding) } // UnsafeDirectControlBindingFromGlibFull is used to convert raw GstDirectControlBinding pointers to go while attaching a finalizer. This is used by the bindings internally. func UnsafeDirectControlBindingFromGlibFull(c unsafe.Pointer) DirectControlBinding { return gobject.UnsafeObjectFromGlibFull(c).(DirectControlBinding) } func (d *DirectControlBindingInstance) upcastToGstDirectControlBinding() *DirectControlBindingInstance { return d } // UnsafeDirectControlBindingToGlibNone is used to convert the instance to it's C value GstDirectControlBinding. This is used by the bindings internally. func UnsafeDirectControlBindingToGlibNone(c DirectControlBinding) unsafe.Pointer { return gobject.UnsafeObjectToGlibNone(c) } // UnsafeDirectControlBindingToGlibFull is used to convert the instance to it's C value GstDirectControlBinding, while removeing the finalizer. This is used by the bindings internally. func UnsafeDirectControlBindingToGlibFull(c DirectControlBinding) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } // NewDirectControlBinding wraps gst_direct_control_binding_new // // The function takes the following parameters: // // - object gst.Object: the object of the property // - propertyName string: the property-name to attach the control source // - cs gst.ControlSource: the control source // // The function returns the following values: // // - goret gst.ControlBinding // // Create a new control-binding that attaches the #GstControlSource to the // #GObject property. It will map the control source range [0.0 ... 1.0] to // the full target property range, and clip all values outside this range. func NewDirectControlBinding(object gst.Object, propertyName string, cs gst.ControlSource) gst.ControlBinding { var carg1 *C.GstObject // in, none, converted var carg2 *C.gchar // in, none, string var carg3 *C.GstControlSource // in, none, converted var cret *C.GstControlBinding // return, none, converted carg1 = (*C.GstObject)(gst.UnsafeObjectToGlibNone(object)) carg2 = (*C.gchar)(unsafe.Pointer(C.CString(propertyName))) defer C.free(unsafe.Pointer(carg2)) carg3 = (*C.GstControlSource)(gst.UnsafeControlSourceToGlibNone(cs)) cret = C.gst_direct_control_binding_new(carg1, carg2, carg3) runtime.KeepAlive(object) runtime.KeepAlive(propertyName) runtime.KeepAlive(cs) var goret gst.ControlBinding goret = gst.UnsafeControlBindingFromGlibNone(unsafe.Pointer(cret)) return goret } // NewDirectControlBindingAbsolute wraps gst_direct_control_binding_new_absolute // // The function takes the following parameters: // // - object gst.Object: the object of the property // - propertyName string: the property-name to attach the control source // - cs gst.ControlSource: the control source // // The function returns the following values: // // - goret gst.ControlBinding // // Create a new control-binding that attaches the #GstControlSource to the // #GObject property. It will directly map the control source values to the // target property range without any transformations. func NewDirectControlBindingAbsolute(object gst.Object, propertyName string, cs gst.ControlSource) gst.ControlBinding { var carg1 *C.GstObject // in, none, converted var carg2 *C.gchar // in, none, string var carg3 *C.GstControlSource // in, none, converted var cret *C.GstControlBinding // return, none, converted carg1 = (*C.GstObject)(gst.UnsafeObjectToGlibNone(object)) carg2 = (*C.gchar)(unsafe.Pointer(C.CString(propertyName))) defer C.free(unsafe.Pointer(carg2)) carg3 = (*C.GstControlSource)(gst.UnsafeControlSourceToGlibNone(cs)) cret = C.gst_direct_control_binding_new_absolute(carg1, carg2, carg3) runtime.KeepAlive(object) runtime.KeepAlive(propertyName) runtime.KeepAlive(cs) var goret gst.ControlBinding goret = gst.UnsafeControlBindingFromGlibNone(unsafe.Pointer(cret)) return goret } // DirectControlBindingOverrides is the struct used to override the default implementation of virtual methods. // it is generic over the extending instance type. type DirectControlBindingOverrides[Instance DirectControlBinding] struct { // gst.ControlBindingOverrides allows you to override virtual methods from the parent class gst.ControlBinding gst.ControlBindingOverrides[Instance] } // UnsafeApplyDirectControlBindingOverrides applies the overrides to init the gclass by setting the trampoline functions. // This is used by the bindings internally and only exported for visibility to other bindings code. func UnsafeApplyDirectControlBindingOverrides[Instance DirectControlBinding](gclass unsafe.Pointer, overrides DirectControlBindingOverrides[Instance]) { gst.UnsafeApplyControlBindingOverrides(gclass, overrides.ControlBindingOverrides) } // RegisterDirectControlBindingSubClass is used to register a go subclass of GstDirectControlBinding. For this to work safely please implement the // virtual methods required by the implementation. func RegisterDirectControlBindingSubClass[InstanceT DirectControlBinding]( name string, classInit func(class *DirectControlBindingClass), constructor func() InstanceT, overrides DirectControlBindingOverrides[InstanceT], signals map[string]gobject.SignalDefinition, interfaceInits ...gobject.SubClassInterfaceInit[InstanceT], ) gobject.Type { return gobject.UnsafeRegisterSubClass( name, classInit, constructor, overrides, signals, TypeDirectControlBinding, UnsafeDirectControlBindingClassFromGlibBorrow, UnsafeApplyDirectControlBindingOverrides, func (obj *gobject.ObjectInstance) gobject.Object { return unsafeWrapDirectControlBinding(obj) }, interfaceInits..., ) } // LFOControlSourceInstance is the instance type used by all types extending GstLFOControlSource. It is used internally by the bindings. Users should use the interface [LFOControlSource] instead. type LFOControlSourceInstance struct { _ [0]func() // equal guard gst.ControlSourceInstance } var _ LFOControlSource = (*LFOControlSourceInstance)(nil) // LFOControlSource wraps GstLFOControlSource // // #GstLFOControlSource is a #GstControlSource, that provides several periodic // waveforms as control values. // // To use #GstLFOControlSource get a new instance by calling // gst_lfo_control_source_new(), bind it to a #GParamSpec and set the relevant // properties. // // All functions are MT-safe. type LFOControlSource interface { gst.ControlSource upcastToGstLFOControlSource() *LFOControlSourceInstance } func unsafeWrapLFOControlSource(base *gobject.ObjectInstance) *LFOControlSourceInstance { return &LFOControlSourceInstance{ ControlSourceInstance: gst.ControlSourceInstance{ ObjectInstance: gst.ObjectInstance{ InitiallyUnownedInstance: gobject.InitiallyUnownedInstance{ ObjectInstance: *base, }, }, }, } } func marshalLFOControlSourceInstance(p unsafe.Pointer) (any, error) { return unsafeWrapLFOControlSource(gobject.ValueFromNative(p).Object()), nil } // UnsafeLFOControlSourceFromGlibNone is used to convert raw GstLFOControlSource pointers to go while taking a reference and attaching a finalizer. This is used by the bindings internally. func UnsafeLFOControlSourceFromGlibNone(c unsafe.Pointer) LFOControlSource { return gobject.UnsafeObjectFromGlibNone(c).(LFOControlSource) } // UnsafeLFOControlSourceFromGlibFull is used to convert raw GstLFOControlSource pointers to go while attaching a finalizer. This is used by the bindings internally. func UnsafeLFOControlSourceFromGlibFull(c unsafe.Pointer) LFOControlSource { return gobject.UnsafeObjectFromGlibFull(c).(LFOControlSource) } func (l *LFOControlSourceInstance) upcastToGstLFOControlSource() *LFOControlSourceInstance { return l } // UnsafeLFOControlSourceToGlibNone is used to convert the instance to it's C value GstLFOControlSource. This is used by the bindings internally. func UnsafeLFOControlSourceToGlibNone(c LFOControlSource) unsafe.Pointer { return gobject.UnsafeObjectToGlibNone(c) } // UnsafeLFOControlSourceToGlibFull is used to convert the instance to it's C value GstLFOControlSource, while removeing the finalizer. This is used by the bindings internally. func UnsafeLFOControlSourceToGlibFull(c LFOControlSource) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } // NewLFOControlSource wraps gst_lfo_control_source_new // // The function returns the following values: // // - goret gst.ControlSource // // This returns a new, unbound #GstLFOControlSource. func NewLFOControlSource() gst.ControlSource { var cret *C.GstControlSource // return, full, converted cret = C.gst_lfo_control_source_new() var goret gst.ControlSource goret = gst.UnsafeControlSourceFromGlibFull(unsafe.Pointer(cret)) return goret } // LFOControlSourceOverrides is the struct used to override the default implementation of virtual methods. // it is generic over the extending instance type. type LFOControlSourceOverrides[Instance LFOControlSource] struct { // gst.ControlSourceOverrides allows you to override virtual methods from the parent class gst.ControlSource gst.ControlSourceOverrides[Instance] } // UnsafeApplyLFOControlSourceOverrides applies the overrides to init the gclass by setting the trampoline functions. // This is used by the bindings internally and only exported for visibility to other bindings code. func UnsafeApplyLFOControlSourceOverrides[Instance LFOControlSource](gclass unsafe.Pointer, overrides LFOControlSourceOverrides[Instance]) { gst.UnsafeApplyControlSourceOverrides(gclass, overrides.ControlSourceOverrides) } // RegisterLFOControlSourceSubClass is used to register a go subclass of GstLFOControlSource. For this to work safely please implement the // virtual methods required by the implementation. func RegisterLFOControlSourceSubClass[InstanceT LFOControlSource]( name string, classInit func(class *LFOControlSourceClass), constructor func() InstanceT, overrides LFOControlSourceOverrides[InstanceT], signals map[string]gobject.SignalDefinition, interfaceInits ...gobject.SubClassInterfaceInit[InstanceT], ) gobject.Type { return gobject.UnsafeRegisterSubClass( name, classInit, constructor, overrides, signals, TypeLFOControlSource, UnsafeLFOControlSourceClassFromGlibBorrow, UnsafeApplyLFOControlSourceOverrides, func (obj *gobject.ObjectInstance) gobject.Object { return unsafeWrapLFOControlSource(obj) }, interfaceInits..., ) } // ProxyControlBindingInstance is the instance type used by all types extending GstProxyControlBinding. It is used internally by the bindings. Users should use the interface [ProxyControlBinding] instead. type ProxyControlBindingInstance struct { _ [0]func() // equal guard gst.ControlBindingInstance } var _ ProxyControlBinding = (*ProxyControlBindingInstance)(nil) // ProxyControlBinding wraps GstProxyControlBinding // // A #GstControlBinding that forwards requests to another #GstControlBinding type ProxyControlBinding interface { gst.ControlBinding upcastToGstProxyControlBinding() *ProxyControlBindingInstance } func unsafeWrapProxyControlBinding(base *gobject.ObjectInstance) *ProxyControlBindingInstance { return &ProxyControlBindingInstance{ ControlBindingInstance: gst.ControlBindingInstance{ ObjectInstance: gst.ObjectInstance{ InitiallyUnownedInstance: gobject.InitiallyUnownedInstance{ ObjectInstance: *base, }, }, }, } } func marshalProxyControlBindingInstance(p unsafe.Pointer) (any, error) { return unsafeWrapProxyControlBinding(gobject.ValueFromNative(p).Object()), nil } // UnsafeProxyControlBindingFromGlibNone is used to convert raw GstProxyControlBinding pointers to go while taking a reference and attaching a finalizer. This is used by the bindings internally. func UnsafeProxyControlBindingFromGlibNone(c unsafe.Pointer) ProxyControlBinding { return gobject.UnsafeObjectFromGlibNone(c).(ProxyControlBinding) } // UnsafeProxyControlBindingFromGlibFull is used to convert raw GstProxyControlBinding pointers to go while attaching a finalizer. This is used by the bindings internally. func UnsafeProxyControlBindingFromGlibFull(c unsafe.Pointer) ProxyControlBinding { return gobject.UnsafeObjectFromGlibFull(c).(ProxyControlBinding) } func (p *ProxyControlBindingInstance) upcastToGstProxyControlBinding() *ProxyControlBindingInstance { return p } // UnsafeProxyControlBindingToGlibNone is used to convert the instance to it's C value GstProxyControlBinding. This is used by the bindings internally. func UnsafeProxyControlBindingToGlibNone(c ProxyControlBinding) unsafe.Pointer { return gobject.UnsafeObjectToGlibNone(c) } // UnsafeProxyControlBindingToGlibFull is used to convert the instance to it's C value GstProxyControlBinding, while removeing the finalizer. This is used by the bindings internally. func UnsafeProxyControlBindingToGlibFull(c ProxyControlBinding) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } // NewProxyControlBinding wraps gst_proxy_control_binding_new // // The function takes the following parameters: // // - object gst.Object: a #GstObject // - propertyName string: the property name in @object to control // - refObject gst.Object: a #GstObject to forward all // #GstControlBinding requests to // - refPropertyName string: the property_name in @ref_object to control // // The function returns the following values: // // - goret gst.ControlBinding // // #GstProxyControlBinding forwards all access to data or `sync_values()` // requests from @property_name on @object to the control binding at // @ref_property_name on @ref_object. func NewProxyControlBinding(object gst.Object, propertyName string, refObject gst.Object, refPropertyName string) gst.ControlBinding { var carg1 *C.GstObject // in, none, converted var carg2 *C.gchar // in, none, string var carg3 *C.GstObject // in, none, converted var carg4 *C.gchar // in, none, string var cret *C.GstControlBinding // return, none, converted carg1 = (*C.GstObject)(gst.UnsafeObjectToGlibNone(object)) carg2 = (*C.gchar)(unsafe.Pointer(C.CString(propertyName))) defer C.free(unsafe.Pointer(carg2)) carg3 = (*C.GstObject)(gst.UnsafeObjectToGlibNone(refObject)) carg4 = (*C.gchar)(unsafe.Pointer(C.CString(refPropertyName))) defer C.free(unsafe.Pointer(carg4)) cret = C.gst_proxy_control_binding_new(carg1, carg2, carg3, carg4) runtime.KeepAlive(object) runtime.KeepAlive(propertyName) runtime.KeepAlive(refObject) runtime.KeepAlive(refPropertyName) var goret gst.ControlBinding goret = gst.UnsafeControlBindingFromGlibNone(unsafe.Pointer(cret)) return goret } // ProxyControlBindingOverrides is the struct used to override the default implementation of virtual methods. // it is generic over the extending instance type. type ProxyControlBindingOverrides[Instance ProxyControlBinding] struct { // gst.ControlBindingOverrides allows you to override virtual methods from the parent class gst.ControlBinding gst.ControlBindingOverrides[Instance] } // UnsafeApplyProxyControlBindingOverrides applies the overrides to init the gclass by setting the trampoline functions. // This is used by the bindings internally and only exported for visibility to other bindings code. func UnsafeApplyProxyControlBindingOverrides[Instance ProxyControlBinding](gclass unsafe.Pointer, overrides ProxyControlBindingOverrides[Instance]) { gst.UnsafeApplyControlBindingOverrides(gclass, overrides.ControlBindingOverrides) } // RegisterProxyControlBindingSubClass is used to register a go subclass of GstProxyControlBinding. For this to work safely please implement the // virtual methods required by the implementation. func RegisterProxyControlBindingSubClass[InstanceT ProxyControlBinding]( name string, classInit func(class *ProxyControlBindingClass), constructor func() InstanceT, overrides ProxyControlBindingOverrides[InstanceT], signals map[string]gobject.SignalDefinition, interfaceInits ...gobject.SubClassInterfaceInit[InstanceT], ) gobject.Type { return gobject.UnsafeRegisterSubClass( name, classInit, constructor, overrides, signals, TypeProxyControlBinding, UnsafeProxyControlBindingClassFromGlibBorrow, UnsafeApplyProxyControlBindingOverrides, func (obj *gobject.ObjectInstance) gobject.Object { return unsafeWrapProxyControlBinding(obj) }, interfaceInits..., ) } // TimedValueControlSourceInstance is the instance type used by all types extending GstTimedValueControlSource. It is used internally by the bindings. Users should use the interface [TimedValueControlSource] instead. type TimedValueControlSourceInstance struct { _ [0]func() // equal guard gst.ControlSourceInstance } var _ TimedValueControlSource = (*TimedValueControlSourceInstance)(nil) // TimedValueControlSource wraps GstTimedValueControlSource // // Base class for #GstControlSource that use time-stamped values. // // When overriding bind, chain up first to give this bind implementation a // chance to setup things. // // All functions are MT-safe. type TimedValueControlSource interface { gst.ControlSource upcastToGstTimedValueControlSource() *TimedValueControlSourceInstance // FindControlPointIter wraps gst_timed_value_control_source_find_control_point_iter // // The function takes the following parameters: // // - timestamp gst.ClockTime: the search key // // The function returns the following values: // // - goret *glib.SequenceIter (nullable) // // Find last value before given timestamp in control point list. // If all values in the control point list come after the given // timestamp or no values exist, %NULL is returned. // // For use in control source implementations. FindControlPointIter(gst.ClockTime) *glib.SequenceIter // GetAll wraps gst_timed_value_control_source_get_all // // The function returns the following values: // // - goret []*gst.TimedValue // // Returns a read-only copy of the list of #GstTimedValue for the given property. // Free the list after done with it. GetAll() []*gst.TimedValue // GetCount wraps gst_timed_value_control_source_get_count // // The function returns the following values: // // - goret int // // Get the number of control points that are set. GetCount() int // Set wraps gst_timed_value_control_source_set // // The function takes the following parameters: // // - timestamp gst.ClockTime: the time the control-change is scheduled for // - value float64: the control-value // // The function returns the following values: // // - goret bool // // Set the value of given controller-handled property at a certain time. Set(gst.ClockTime, float64) bool // Unset wraps gst_timed_value_control_source_unset // // The function takes the following parameters: // // - timestamp gst.ClockTime: the time the control-change should be removed from // // The function returns the following values: // // - goret bool // // Used to remove the value of given controller-handled property at a certain // time. Unset(gst.ClockTime) bool // UnsetAll wraps gst_timed_value_control_source_unset_all // // Used to remove all time-stamped values of given controller-handled property UnsetAll() // ConnectValueAdded connects the provided callback to the "value-added" signal // // Emitted right after the new value has been added to @self ConnectValueAdded(func(TimedValueControlSource, ControlPoint)) gobject.SignalHandle // ConnectValueChanged connects the provided callback to the "value-changed" signal // // Emitted right after the new value has been set on @timed_signals ConnectValueChanged(func(TimedValueControlSource, ControlPoint)) gobject.SignalHandle // ConnectValueRemoved connects the provided callback to the "value-removed" signal // // Emitted when @timed_value is removed from @self ConnectValueRemoved(func(TimedValueControlSource, ControlPoint)) gobject.SignalHandle } func unsafeWrapTimedValueControlSource(base *gobject.ObjectInstance) *TimedValueControlSourceInstance { return &TimedValueControlSourceInstance{ ControlSourceInstance: gst.ControlSourceInstance{ ObjectInstance: gst.ObjectInstance{ InitiallyUnownedInstance: gobject.InitiallyUnownedInstance{ ObjectInstance: *base, }, }, }, } } func marshalTimedValueControlSourceInstance(p unsafe.Pointer) (any, error) { return unsafeWrapTimedValueControlSource(gobject.ValueFromNative(p).Object()), nil } // UnsafeTimedValueControlSourceFromGlibNone is used to convert raw GstTimedValueControlSource pointers to go while taking a reference and attaching a finalizer. This is used by the bindings internally. func UnsafeTimedValueControlSourceFromGlibNone(c unsafe.Pointer) TimedValueControlSource { return gobject.UnsafeObjectFromGlibNone(c).(TimedValueControlSource) } // UnsafeTimedValueControlSourceFromGlibFull is used to convert raw GstTimedValueControlSource pointers to go while attaching a finalizer. This is used by the bindings internally. func UnsafeTimedValueControlSourceFromGlibFull(c unsafe.Pointer) TimedValueControlSource { return gobject.UnsafeObjectFromGlibFull(c).(TimedValueControlSource) } func (t *TimedValueControlSourceInstance) upcastToGstTimedValueControlSource() *TimedValueControlSourceInstance { return t } // UnsafeTimedValueControlSourceToGlibNone is used to convert the instance to it's C value GstTimedValueControlSource. This is used by the bindings internally. func UnsafeTimedValueControlSourceToGlibNone(c TimedValueControlSource) unsafe.Pointer { return gobject.UnsafeObjectToGlibNone(c) } // UnsafeTimedValueControlSourceToGlibFull is used to convert the instance to it's C value GstTimedValueControlSource, while removeing the finalizer. This is used by the bindings internally. func UnsafeTimedValueControlSourceToGlibFull(c TimedValueControlSource) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } // FindControlPointIter wraps gst_timed_value_control_source_find_control_point_iter // // The function takes the following parameters: // // - timestamp gst.ClockTime: the search key // // The function returns the following values: // // - goret *glib.SequenceIter (nullable) // // Find last value before given timestamp in control point list. // If all values in the control point list come after the given // timestamp or no values exist, %NULL is returned. // // For use in control source implementations. func (self *TimedValueControlSourceInstance) FindControlPointIter(timestamp gst.ClockTime) *glib.SequenceIter { var carg0 *C.GstTimedValueControlSource // in, none, converted var carg1 C.GstClockTime // in, none, casted, alias var cret *C.GSequenceIter // return, none, converted, nullable carg0 = (*C.GstTimedValueControlSource)(UnsafeTimedValueControlSourceToGlibNone(self)) carg1 = C.GstClockTime(timestamp) cret = C.gst_timed_value_control_source_find_control_point_iter(carg0, carg1) runtime.KeepAlive(self) runtime.KeepAlive(timestamp) var goret *glib.SequenceIter if cret != nil { goret = glib.UnsafeSequenceIterFromGlibNone(unsafe.Pointer(cret)) } return goret } // GetAll wraps gst_timed_value_control_source_get_all // // The function returns the following values: // // - goret []*gst.TimedValue // // Returns a read-only copy of the list of #GstTimedValue for the given property. // Free the list after done with it. func (self *TimedValueControlSourceInstance) GetAll() []*gst.TimedValue { var carg0 *C.GstTimedValueControlSource // in, none, converted var cret *C.GList // container, transfer: container carg0 = (*C.GstTimedValueControlSource)(UnsafeTimedValueControlSourceToGlibNone(self)) cret = C.gst_timed_value_control_source_get_all(carg0) runtime.KeepAlive(self) var goret []*gst.TimedValue goret = glib.UnsafeListFromGlibFull( unsafe.Pointer(cret), func(v unsafe.Pointer) *gst.TimedValue { var dst *gst.TimedValue // converted dst = gst.UnsafeTimedValueFromGlibNone(v) return dst }, ) return goret } // GetCount wraps gst_timed_value_control_source_get_count // // The function returns the following values: // // - goret int // // Get the number of control points that are set. func (self *TimedValueControlSourceInstance) GetCount() int { var carg0 *C.GstTimedValueControlSource // in, none, converted var cret C.gint // return, none, casted carg0 = (*C.GstTimedValueControlSource)(UnsafeTimedValueControlSourceToGlibNone(self)) cret = C.gst_timed_value_control_source_get_count(carg0) runtime.KeepAlive(self) var goret int goret = int(cret) return goret } // Set wraps gst_timed_value_control_source_set // // The function takes the following parameters: // // - timestamp gst.ClockTime: the time the control-change is scheduled for // - value float64: the control-value // // The function returns the following values: // // - goret bool // // Set the value of given controller-handled property at a certain time. func (self *TimedValueControlSourceInstance) Set(timestamp gst.ClockTime, value float64) bool { var carg0 *C.GstTimedValueControlSource // in, none, converted var carg1 C.GstClockTime // in, none, casted, alias var carg2 C.gdouble // in, none, casted var cret C.gboolean // return carg0 = (*C.GstTimedValueControlSource)(UnsafeTimedValueControlSourceToGlibNone(self)) carg1 = C.GstClockTime(timestamp) carg2 = C.gdouble(value) cret = C.gst_timed_value_control_source_set(carg0, carg1, carg2) runtime.KeepAlive(self) runtime.KeepAlive(timestamp) runtime.KeepAlive(value) var goret bool if cret != 0 { goret = true } return goret } // Unset wraps gst_timed_value_control_source_unset // // The function takes the following parameters: // // - timestamp gst.ClockTime: the time the control-change should be removed from // // The function returns the following values: // // - goret bool // // Used to remove the value of given controller-handled property at a certain // time. func (self *TimedValueControlSourceInstance) Unset(timestamp gst.ClockTime) bool { var carg0 *C.GstTimedValueControlSource // in, none, converted var carg1 C.GstClockTime // in, none, casted, alias var cret C.gboolean // return carg0 = (*C.GstTimedValueControlSource)(UnsafeTimedValueControlSourceToGlibNone(self)) carg1 = C.GstClockTime(timestamp) cret = C.gst_timed_value_control_source_unset(carg0, carg1) runtime.KeepAlive(self) runtime.KeepAlive(timestamp) var goret bool if cret != 0 { goret = true } return goret } // UnsetAll wraps gst_timed_value_control_source_unset_all // // Used to remove all time-stamped values of given controller-handled property func (self *TimedValueControlSourceInstance) UnsetAll() { var carg0 *C.GstTimedValueControlSource // in, none, converted carg0 = (*C.GstTimedValueControlSource)(UnsafeTimedValueControlSourceToGlibNone(self)) C.gst_timed_value_control_source_unset_all(carg0) runtime.KeepAlive(self) } // ConnectValueAdded connects the provided callback to the "value-added" signal // // Emitted right after the new value has been added to @self func (o *TimedValueControlSourceInstance) ConnectValueAdded(fn func(TimedValueControlSource, ControlPoint)) gobject.SignalHandle { return o.Connect("value-added", fn) } // ConnectValueChanged connects the provided callback to the "value-changed" signal // // Emitted right after the new value has been set on @timed_signals func (o *TimedValueControlSourceInstance) ConnectValueChanged(fn func(TimedValueControlSource, ControlPoint)) gobject.SignalHandle { return o.Connect("value-changed", fn) } // ConnectValueRemoved connects the provided callback to the "value-removed" signal // // Emitted when @timed_value is removed from @self func (o *TimedValueControlSourceInstance) ConnectValueRemoved(fn func(TimedValueControlSource, ControlPoint)) gobject.SignalHandle { return o.Connect("value-removed", fn) } // TimedValueControlSourceOverrides is the struct used to override the default implementation of virtual methods. // it is generic over the extending instance type. type TimedValueControlSourceOverrides[Instance TimedValueControlSource] struct { // gst.ControlSourceOverrides allows you to override virtual methods from the parent class gst.ControlSource gst.ControlSourceOverrides[Instance] } // UnsafeApplyTimedValueControlSourceOverrides applies the overrides to init the gclass by setting the trampoline functions. // This is used by the bindings internally and only exported for visibility to other bindings code. func UnsafeApplyTimedValueControlSourceOverrides[Instance TimedValueControlSource](gclass unsafe.Pointer, overrides TimedValueControlSourceOverrides[Instance]) { gst.UnsafeApplyControlSourceOverrides(gclass, overrides.ControlSourceOverrides) } // RegisterTimedValueControlSourceSubClass is used to register a go subclass of GstTimedValueControlSource. For this to work safely please implement the // virtual methods required by the implementation. func RegisterTimedValueControlSourceSubClass[InstanceT TimedValueControlSource]( name string, classInit func(class *TimedValueControlSourceClass), constructor func() InstanceT, overrides TimedValueControlSourceOverrides[InstanceT], signals map[string]gobject.SignalDefinition, interfaceInits ...gobject.SubClassInterfaceInit[InstanceT], ) gobject.Type { return gobject.UnsafeRegisterSubClass( name, classInit, constructor, overrides, signals, TypeTimedValueControlSource, UnsafeTimedValueControlSourceClassFromGlibBorrow, UnsafeApplyTimedValueControlSourceOverrides, func (obj *gobject.ObjectInstance) gobject.Object { return unsafeWrapTimedValueControlSource(obj) }, interfaceInits..., ) } // TriggerControlSourceInstance is the instance type used by all types extending GstTriggerControlSource. It is used internally by the bindings. Users should use the interface [TriggerControlSource] instead. type TriggerControlSourceInstance struct { _ [0]func() // equal guard TimedValueControlSourceInstance } var _ TriggerControlSource = (*TriggerControlSourceInstance)(nil) // TriggerControlSource wraps GstTriggerControlSource // // #GstTriggerControlSource is a #GstControlSource, that returns values from user-given // control points. It allows for a tolerance on the time-stamps. // // To use #GstTriggerControlSource get a new instance by calling // gst_trigger_control_source_new(), bind it to a #GParamSpec and set some // control points by calling gst_timed_value_control_source_set(). // // All functions are MT-safe. type TriggerControlSource interface { TimedValueControlSource upcastToGstTriggerControlSource() *TriggerControlSourceInstance } func unsafeWrapTriggerControlSource(base *gobject.ObjectInstance) *TriggerControlSourceInstance { return &TriggerControlSourceInstance{ TimedValueControlSourceInstance: TimedValueControlSourceInstance{ ControlSourceInstance: gst.ControlSourceInstance{ ObjectInstance: gst.ObjectInstance{ InitiallyUnownedInstance: gobject.InitiallyUnownedInstance{ ObjectInstance: *base, }, }, }, }, } } func marshalTriggerControlSourceInstance(p unsafe.Pointer) (any, error) { return unsafeWrapTriggerControlSource(gobject.ValueFromNative(p).Object()), nil } // UnsafeTriggerControlSourceFromGlibNone is used to convert raw GstTriggerControlSource pointers to go while taking a reference and attaching a finalizer. This is used by the bindings internally. func UnsafeTriggerControlSourceFromGlibNone(c unsafe.Pointer) TriggerControlSource { return gobject.UnsafeObjectFromGlibNone(c).(TriggerControlSource) } // UnsafeTriggerControlSourceFromGlibFull is used to convert raw GstTriggerControlSource pointers to go while attaching a finalizer. This is used by the bindings internally. func UnsafeTriggerControlSourceFromGlibFull(c unsafe.Pointer) TriggerControlSource { return gobject.UnsafeObjectFromGlibFull(c).(TriggerControlSource) } func (t *TriggerControlSourceInstance) upcastToGstTriggerControlSource() *TriggerControlSourceInstance { return t } // UnsafeTriggerControlSourceToGlibNone is used to convert the instance to it's C value GstTriggerControlSource. This is used by the bindings internally. func UnsafeTriggerControlSourceToGlibNone(c TriggerControlSource) unsafe.Pointer { return gobject.UnsafeObjectToGlibNone(c) } // UnsafeTriggerControlSourceToGlibFull is used to convert the instance to it's C value GstTriggerControlSource, while removeing the finalizer. This is used by the bindings internally. func UnsafeTriggerControlSourceToGlibFull(c TriggerControlSource) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } // NewTriggerControlSource wraps gst_trigger_control_source_new // // The function returns the following values: // // - goret gst.ControlSource // // This returns a new, unbound #GstTriggerControlSource. func NewTriggerControlSource() gst.ControlSource { var cret *C.GstControlSource // return, full, converted cret = C.gst_trigger_control_source_new() var goret gst.ControlSource goret = gst.UnsafeControlSourceFromGlibFull(unsafe.Pointer(cret)) return goret } // TriggerControlSourceOverrides is the struct used to override the default implementation of virtual methods. // it is generic over the extending instance type. type TriggerControlSourceOverrides[Instance TriggerControlSource] struct { // TimedValueControlSourceOverrides allows you to override virtual methods from the parent class TimedValueControlSource TimedValueControlSourceOverrides[Instance] } // UnsafeApplyTriggerControlSourceOverrides applies the overrides to init the gclass by setting the trampoline functions. // This is used by the bindings internally and only exported for visibility to other bindings code. func UnsafeApplyTriggerControlSourceOverrides[Instance TriggerControlSource](gclass unsafe.Pointer, overrides TriggerControlSourceOverrides[Instance]) { UnsafeApplyTimedValueControlSourceOverrides(gclass, overrides.TimedValueControlSourceOverrides) } // RegisterTriggerControlSourceSubClass is used to register a go subclass of GstTriggerControlSource. For this to work safely please implement the // virtual methods required by the implementation. func RegisterTriggerControlSourceSubClass[InstanceT TriggerControlSource]( name string, classInit func(class *TriggerControlSourceClass), constructor func() InstanceT, overrides TriggerControlSourceOverrides[InstanceT], signals map[string]gobject.SignalDefinition, interfaceInits ...gobject.SubClassInterfaceInit[InstanceT], ) gobject.Type { return gobject.UnsafeRegisterSubClass( name, classInit, constructor, overrides, signals, TypeTriggerControlSource, UnsafeTriggerControlSourceClassFromGlibBorrow, UnsafeApplyTriggerControlSourceOverrides, func (obj *gobject.ObjectInstance) gobject.Object { return unsafeWrapTriggerControlSource(obj) }, interfaceInits..., ) } // InterpolationControlSourceInstance is the instance type used by all types extending GstInterpolationControlSource. It is used internally by the bindings. Users should use the interface [InterpolationControlSource] instead. type InterpolationControlSourceInstance struct { _ [0]func() // equal guard TimedValueControlSourceInstance } var _ InterpolationControlSource = (*InterpolationControlSourceInstance)(nil) // InterpolationControlSource wraps GstInterpolationControlSource // // #GstInterpolationControlSource is a #GstControlSource, that interpolates values between user-given // control points. It supports several interpolation modes and property types. // // To use #GstInterpolationControlSource get a new instance by calling // gst_interpolation_control_source_new(), bind it to a #GParamSpec and set some // control points by calling gst_timed_value_control_source_set(). // // All functions are MT-safe. type InterpolationControlSource interface { TimedValueControlSource upcastToGstInterpolationControlSource() *InterpolationControlSourceInstance } func unsafeWrapInterpolationControlSource(base *gobject.ObjectInstance) *InterpolationControlSourceInstance { return &InterpolationControlSourceInstance{ TimedValueControlSourceInstance: TimedValueControlSourceInstance{ ControlSourceInstance: gst.ControlSourceInstance{ ObjectInstance: gst.ObjectInstance{ InitiallyUnownedInstance: gobject.InitiallyUnownedInstance{ ObjectInstance: *base, }, }, }, }, } } func marshalInterpolationControlSourceInstance(p unsafe.Pointer) (any, error) { return unsafeWrapInterpolationControlSource(gobject.ValueFromNative(p).Object()), nil } // UnsafeInterpolationControlSourceFromGlibNone is used to convert raw GstInterpolationControlSource pointers to go while taking a reference and attaching a finalizer. This is used by the bindings internally. func UnsafeInterpolationControlSourceFromGlibNone(c unsafe.Pointer) InterpolationControlSource { return gobject.UnsafeObjectFromGlibNone(c).(InterpolationControlSource) } // UnsafeInterpolationControlSourceFromGlibFull is used to convert raw GstInterpolationControlSource pointers to go while attaching a finalizer. This is used by the bindings internally. func UnsafeInterpolationControlSourceFromGlibFull(c unsafe.Pointer) InterpolationControlSource { return gobject.UnsafeObjectFromGlibFull(c).(InterpolationControlSource) } func (i *InterpolationControlSourceInstance) upcastToGstInterpolationControlSource() *InterpolationControlSourceInstance { return i } // UnsafeInterpolationControlSourceToGlibNone is used to convert the instance to it's C value GstInterpolationControlSource. This is used by the bindings internally. func UnsafeInterpolationControlSourceToGlibNone(c InterpolationControlSource) unsafe.Pointer { return gobject.UnsafeObjectToGlibNone(c) } // UnsafeInterpolationControlSourceToGlibFull is used to convert the instance to it's C value GstInterpolationControlSource, while removeing the finalizer. This is used by the bindings internally. func UnsafeInterpolationControlSourceToGlibFull(c InterpolationControlSource) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } // NewInterpolationControlSource wraps gst_interpolation_control_source_new // // The function returns the following values: // // - goret gst.ControlSource // // This returns a new, unbound #GstInterpolationControlSource. func NewInterpolationControlSource() gst.ControlSource { var cret *C.GstControlSource // return, full, converted cret = C.gst_interpolation_control_source_new() var goret gst.ControlSource goret = gst.UnsafeControlSourceFromGlibFull(unsafe.Pointer(cret)) return goret } // InterpolationControlSourceOverrides is the struct used to override the default implementation of virtual methods. // it is generic over the extending instance type. type InterpolationControlSourceOverrides[Instance InterpolationControlSource] struct { // TimedValueControlSourceOverrides allows you to override virtual methods from the parent class TimedValueControlSource TimedValueControlSourceOverrides[Instance] } // UnsafeApplyInterpolationControlSourceOverrides applies the overrides to init the gclass by setting the trampoline functions. // This is used by the bindings internally and only exported for visibility to other bindings code. func UnsafeApplyInterpolationControlSourceOverrides[Instance InterpolationControlSource](gclass unsafe.Pointer, overrides InterpolationControlSourceOverrides[Instance]) { UnsafeApplyTimedValueControlSourceOverrides(gclass, overrides.TimedValueControlSourceOverrides) } // RegisterInterpolationControlSourceSubClass is used to register a go subclass of GstInterpolationControlSource. For this to work safely please implement the // virtual methods required by the implementation. func RegisterInterpolationControlSourceSubClass[InstanceT InterpolationControlSource]( name string, classInit func(class *InterpolationControlSourceClass), constructor func() InstanceT, overrides InterpolationControlSourceOverrides[InstanceT], signals map[string]gobject.SignalDefinition, interfaceInits ...gobject.SubClassInterfaceInit[InstanceT], ) gobject.Type { return gobject.UnsafeRegisterSubClass( name, classInit, constructor, overrides, signals, TypeInterpolationControlSource, UnsafeInterpolationControlSourceClassFromGlibBorrow, UnsafeApplyInterpolationControlSourceOverrides, func (obj *gobject.ObjectInstance) gobject.Object { return unsafeWrapInterpolationControlSource(obj) }, interfaceInits..., ) } // ARGBControlBindingClass wraps GstARGBControlBindingClass // // The class structure of #GstARGBControlBinding. // // ARGBControlBindingClass is the type struct for [ARGBControlBinding] type ARGBControlBindingClass struct { *argbControlBindingClass } // argbControlBindingClass is the struct that's finalized type argbControlBindingClass struct { native *C.GstARGBControlBindingClass } // UnsafeARGBControlBindingClassFromGlibBorrow is used to convert raw C.GstARGBControlBindingClass pointers to go. This is used by the bindings internally. func UnsafeARGBControlBindingClassFromGlibBorrow(p unsafe.Pointer) *ARGBControlBindingClass { return &ARGBControlBindingClass{&argbControlBindingClass{(*C.GstARGBControlBindingClass)(p)}} } // UnsafeARGBControlBindingClassFree unrefs/frees the underlying resource. This is used by the bindings internally. // // After this is called, no other method on [ARGBControlBindingClass] is expected to work anymore. func UnsafeARGBControlBindingClassFree(a *ARGBControlBindingClass) { C.free(unsafe.Pointer(a.native)) } // UnsafeARGBControlBindingClassToGlibNone returns the underlying C pointer. This is used by the bindings internally. func UnsafeARGBControlBindingClassToGlibNone(a *ARGBControlBindingClass) unsafe.Pointer { return unsafe.Pointer(a.native) } // ParentClass returns the type struct of the parent class of this type struct. // This essentially casts the underlying c pointer. func (a *ARGBControlBindingClass) ParentClass() *gst.ControlBindingClass { parent := gst.UnsafeControlBindingClassFromGlibBorrow(UnsafeARGBControlBindingClassToGlibNone(a)) // attach a cleanup to keep the instance alive as long as the parent is referenced runtime.AddCleanup(parent, func(_ *ARGBControlBindingClass) {}, a) return parent } // ControlPoint wraps GstControlPoint // // An internal structure for value+time and various temporary // values used for interpolation. This "inherits" from // GstTimedValue. type ControlPoint struct { *controlPoint } // controlPoint is the struct that's finalized type controlPoint struct { native *C.GstControlPoint } var _ gobject.GoValueInitializer = (*ControlPoint)(nil) func marshalControlPoint(p unsafe.Pointer) (interface{}, error) { b := gobject.ValueFromNative(p).Boxed() return UnsafeControlPointFromGlibBorrow(b), nil } func (r *ControlPoint) InitGoValue(v *gobject.Value) { v.Init(TypeControlPoint) v.SetBoxed(unsafe.Pointer(r.native)) } // UnsafeControlPointFromGlibBorrow is used to convert raw C.GstControlPoint pointers to go. This is used by the bindings internally. func UnsafeControlPointFromGlibBorrow(p unsafe.Pointer) *ControlPoint { return &ControlPoint{&controlPoint{(*C.GstControlPoint)(p)}} } // UnsafeControlPointFromGlibNone is used to convert raw C.GstControlPoint pointers to go without transferring ownership. This is used by the bindings internally. func UnsafeControlPointFromGlibNone(p unsafe.Pointer) *ControlPoint { // FIXME: this has no ref function, what should we do here? wrapped := UnsafeControlPointFromGlibBorrow(p) runtime.SetFinalizer( wrapped.controlPoint, func (intern *controlPoint) { C.gst_control_point_free(intern.native) }, ) return wrapped } // UnsafeControlPointFromGlibFull is used to convert raw C.GstControlPoint pointers to go while taking ownership. This is used by the bindings internally. func UnsafeControlPointFromGlibFull(p unsafe.Pointer) *ControlPoint { wrapped := UnsafeControlPointFromGlibBorrow(p) runtime.SetFinalizer( wrapped.controlPoint, func (intern *controlPoint) { C.gst_control_point_free(intern.native) }, ) return wrapped } // UnsafeControlPointFree unrefs/frees the underlying resource. This is used by the bindings internally. // // After this is called, no other method on [ControlPoint] is expected to work anymore. func UnsafeControlPointFree(c *ControlPoint) { C.gst_control_point_free(c.native) } // UnsafeControlPointToGlibNone returns the underlying C pointer. This is used by the bindings internally. func UnsafeControlPointToGlibNone(c *ControlPoint) unsafe.Pointer { return unsafe.Pointer(c.native) } // UnsafeControlPointToGlibFull returns the underlying C pointer and gives up ownership. // This is used by the bindings internally. func UnsafeControlPointToGlibFull(c *ControlPoint) unsafe.Pointer { runtime.SetFinalizer(c.controlPoint, nil) _p := unsafe.Pointer(c.native) c.native = nil // ControlPoint is invalid from here on return _p } // Copy wraps gst_control_point_copy // // The function returns the following values: // // - goret *ControlPoint // // Copies a #GstControlPoint func (cp *ControlPoint) Copy() *ControlPoint { var carg0 *C.GstControlPoint // in, none, converted var cret *C.GstControlPoint // return, full, converted carg0 = (*C.GstControlPoint)(UnsafeControlPointToGlibNone(cp)) cret = C.gst_control_point_copy(carg0) runtime.KeepAlive(cp) var goret *ControlPoint goret = UnsafeControlPointFromGlibFull(unsafe.Pointer(cret)) return goret } // DirectControlBindingClass wraps GstDirectControlBindingClass // // The class structure of #GstDirectControlBinding. // // DirectControlBindingClass is the type struct for [DirectControlBinding] type DirectControlBindingClass struct { *directControlBindingClass } // directControlBindingClass is the struct that's finalized type directControlBindingClass struct { native *C.GstDirectControlBindingClass } // UnsafeDirectControlBindingClassFromGlibBorrow is used to convert raw C.GstDirectControlBindingClass pointers to go. This is used by the bindings internally. func UnsafeDirectControlBindingClassFromGlibBorrow(p unsafe.Pointer) *DirectControlBindingClass { return &DirectControlBindingClass{&directControlBindingClass{(*C.GstDirectControlBindingClass)(p)}} } // UnsafeDirectControlBindingClassFree unrefs/frees the underlying resource. This is used by the bindings internally. // // After this is called, no other method on [DirectControlBindingClass] is expected to work anymore. func UnsafeDirectControlBindingClassFree(d *DirectControlBindingClass) { C.free(unsafe.Pointer(d.native)) } // UnsafeDirectControlBindingClassToGlibNone returns the underlying C pointer. This is used by the bindings internally. func UnsafeDirectControlBindingClassToGlibNone(d *DirectControlBindingClass) unsafe.Pointer { return unsafe.Pointer(d.native) } // ParentClass returns the type struct of the parent class of this type struct. // This essentially casts the underlying c pointer. func (d *DirectControlBindingClass) ParentClass() *gst.ControlBindingClass { parent := gst.UnsafeControlBindingClassFromGlibBorrow(UnsafeDirectControlBindingClassToGlibNone(d)) // attach a cleanup to keep the instance alive as long as the parent is referenced runtime.AddCleanup(parent, func(_ *DirectControlBindingClass) {}, d) return parent } // InterpolationControlSourceClass wraps GstInterpolationControlSourceClass // // InterpolationControlSourceClass is the type struct for [InterpolationControlSource] type InterpolationControlSourceClass struct { *interpolationControlSourceClass } // interpolationControlSourceClass is the struct that's finalized type interpolationControlSourceClass struct { native *C.GstInterpolationControlSourceClass } // UnsafeInterpolationControlSourceClassFromGlibBorrow is used to convert raw C.GstInterpolationControlSourceClass pointers to go. This is used by the bindings internally. func UnsafeInterpolationControlSourceClassFromGlibBorrow(p unsafe.Pointer) *InterpolationControlSourceClass { return &InterpolationControlSourceClass{&interpolationControlSourceClass{(*C.GstInterpolationControlSourceClass)(p)}} } // UnsafeInterpolationControlSourceClassFree unrefs/frees the underlying resource. This is used by the bindings internally. // // After this is called, no other method on [InterpolationControlSourceClass] is expected to work anymore. func UnsafeInterpolationControlSourceClassFree(i *InterpolationControlSourceClass) { C.free(unsafe.Pointer(i.native)) } // UnsafeInterpolationControlSourceClassToGlibNone returns the underlying C pointer. This is used by the bindings internally. func UnsafeInterpolationControlSourceClassToGlibNone(i *InterpolationControlSourceClass) unsafe.Pointer { return unsafe.Pointer(i.native) } // ParentClass returns the type struct of the parent class of this type struct. // This essentially casts the underlying c pointer. func (i *InterpolationControlSourceClass) ParentClass() *TimedValueControlSourceClass { parent := UnsafeTimedValueControlSourceClassFromGlibBorrow(UnsafeInterpolationControlSourceClassToGlibNone(i)) // attach a cleanup to keep the instance alive as long as the parent is referenced runtime.AddCleanup(parent, func(_ *InterpolationControlSourceClass) {}, i) return parent } // LFOControlSourceClass wraps GstLFOControlSourceClass // // LFOControlSourceClass is the type struct for [LFOControlSource] type LFOControlSourceClass struct { *lfoControlSourceClass } // lfoControlSourceClass is the struct that's finalized type lfoControlSourceClass struct { native *C.GstLFOControlSourceClass } // UnsafeLFOControlSourceClassFromGlibBorrow is used to convert raw C.GstLFOControlSourceClass pointers to go. This is used by the bindings internally. func UnsafeLFOControlSourceClassFromGlibBorrow(p unsafe.Pointer) *LFOControlSourceClass { return &LFOControlSourceClass{&lfoControlSourceClass{(*C.GstLFOControlSourceClass)(p)}} } // UnsafeLFOControlSourceClassFree unrefs/frees the underlying resource. This is used by the bindings internally. // // After this is called, no other method on [LFOControlSourceClass] is expected to work anymore. func UnsafeLFOControlSourceClassFree(l *LFOControlSourceClass) { C.free(unsafe.Pointer(l.native)) } // UnsafeLFOControlSourceClassToGlibNone returns the underlying C pointer. This is used by the bindings internally. func UnsafeLFOControlSourceClassToGlibNone(l *LFOControlSourceClass) unsafe.Pointer { return unsafe.Pointer(l.native) } // ParentClass returns the type struct of the parent class of this type struct. // This essentially casts the underlying c pointer. func (l *LFOControlSourceClass) ParentClass() *gst.ControlSourceClass { parent := gst.UnsafeControlSourceClassFromGlibBorrow(UnsafeLFOControlSourceClassToGlibNone(l)) // attach a cleanup to keep the instance alive as long as the parent is referenced runtime.AddCleanup(parent, func(_ *LFOControlSourceClass) {}, l) return parent } // ProxyControlBindingClass wraps GstProxyControlBindingClass // // Opaque #GstProxyControlBindingClass struct // // ProxyControlBindingClass is the type struct for [ProxyControlBinding] type ProxyControlBindingClass struct { *proxyControlBindingClass } // proxyControlBindingClass is the struct that's finalized type proxyControlBindingClass struct { native *C.GstProxyControlBindingClass } // UnsafeProxyControlBindingClassFromGlibBorrow is used to convert raw C.GstProxyControlBindingClass pointers to go. This is used by the bindings internally. func UnsafeProxyControlBindingClassFromGlibBorrow(p unsafe.Pointer) *ProxyControlBindingClass { return &ProxyControlBindingClass{&proxyControlBindingClass{(*C.GstProxyControlBindingClass)(p)}} } // UnsafeProxyControlBindingClassFree unrefs/frees the underlying resource. This is used by the bindings internally. // // After this is called, no other method on [ProxyControlBindingClass] is expected to work anymore. func UnsafeProxyControlBindingClassFree(p *ProxyControlBindingClass) { C.free(unsafe.Pointer(p.native)) } // UnsafeProxyControlBindingClassToGlibNone returns the underlying C pointer. This is used by the bindings internally. func UnsafeProxyControlBindingClassToGlibNone(p *ProxyControlBindingClass) unsafe.Pointer { return unsafe.Pointer(p.native) } // ParentClass returns the type struct of the parent class of this type struct. // This essentially casts the underlying c pointer. func (p *ProxyControlBindingClass) ParentClass() *gst.ControlBindingClass { parent := gst.UnsafeControlBindingClassFromGlibBorrow(UnsafeProxyControlBindingClassToGlibNone(p)) // attach a cleanup to keep the instance alive as long as the parent is referenced runtime.AddCleanup(parent, func(_ *ProxyControlBindingClass) {}, p) return parent } // TimedValueControlSourceClass wraps GstTimedValueControlSourceClass // // TimedValueControlSourceClass is the type struct for [TimedValueControlSource] type TimedValueControlSourceClass struct { *timedValueControlSourceClass } // timedValueControlSourceClass is the struct that's finalized type timedValueControlSourceClass struct { native *C.GstTimedValueControlSourceClass } // UnsafeTimedValueControlSourceClassFromGlibBorrow is used to convert raw C.GstTimedValueControlSourceClass pointers to go. This is used by the bindings internally. func UnsafeTimedValueControlSourceClassFromGlibBorrow(p unsafe.Pointer) *TimedValueControlSourceClass { return &TimedValueControlSourceClass{&timedValueControlSourceClass{(*C.GstTimedValueControlSourceClass)(p)}} } // UnsafeTimedValueControlSourceClassFree unrefs/frees the underlying resource. This is used by the bindings internally. // // After this is called, no other method on [TimedValueControlSourceClass] is expected to work anymore. func UnsafeTimedValueControlSourceClassFree(t *TimedValueControlSourceClass) { C.free(unsafe.Pointer(t.native)) } // UnsafeTimedValueControlSourceClassToGlibNone returns the underlying C pointer. This is used by the bindings internally. func UnsafeTimedValueControlSourceClassToGlibNone(t *TimedValueControlSourceClass) unsafe.Pointer { return unsafe.Pointer(t.native) } // ParentClass returns the type struct of the parent class of this type struct. // This essentially casts the underlying c pointer. func (t *TimedValueControlSourceClass) ParentClass() *gst.ControlSourceClass { parent := gst.UnsafeControlSourceClassFromGlibBorrow(UnsafeTimedValueControlSourceClassToGlibNone(t)) // attach a cleanup to keep the instance alive as long as the parent is referenced runtime.AddCleanup(parent, func(_ *TimedValueControlSourceClass) {}, t) return parent } // TriggerControlSourceClass wraps GstTriggerControlSourceClass // // TriggerControlSourceClass is the type struct for [TriggerControlSource] type TriggerControlSourceClass struct { *triggerControlSourceClass } // triggerControlSourceClass is the struct that's finalized type triggerControlSourceClass struct { native *C.GstTriggerControlSourceClass } // UnsafeTriggerControlSourceClassFromGlibBorrow is used to convert raw C.GstTriggerControlSourceClass pointers to go. This is used by the bindings internally. func UnsafeTriggerControlSourceClassFromGlibBorrow(p unsafe.Pointer) *TriggerControlSourceClass { return &TriggerControlSourceClass{&triggerControlSourceClass{(*C.GstTriggerControlSourceClass)(p)}} } // UnsafeTriggerControlSourceClassFree unrefs/frees the underlying resource. This is used by the bindings internally. // // After this is called, no other method on [TriggerControlSourceClass] is expected to work anymore. func UnsafeTriggerControlSourceClassFree(t *TriggerControlSourceClass) { C.free(unsafe.Pointer(t.native)) } // UnsafeTriggerControlSourceClassToGlibNone returns the underlying C pointer. This is used by the bindings internally. func UnsafeTriggerControlSourceClassToGlibNone(t *TriggerControlSourceClass) unsafe.Pointer { return unsafe.Pointer(t.native) } // ParentClass returns the type struct of the parent class of this type struct. // This essentially casts the underlying c pointer. func (t *TriggerControlSourceClass) ParentClass() *TimedValueControlSourceClass { parent := UnsafeTimedValueControlSourceClassFromGlibBorrow(UnsafeTriggerControlSourceClassToGlibNone(t)) // attach a cleanup to keep the instance alive as long as the parent is referenced runtime.AddCleanup(parent, func(_ *TriggerControlSourceClass) {}, t) return parent }