diff --git a/examples/plugins/registered_elements/internal/custombin/element.go b/examples/plugins/registered_elements/internal/custombin/element.go index f041d5b..92ec845 100644 --- a/examples/plugins/registered_elements/internal/custombin/element.go +++ b/examples/plugins/registered_elements/internal/custombin/element.go @@ -6,6 +6,22 @@ import ( "github.com/go-gst/go-gst/pkg/gst" ) +func classInit(class *gst.BinClass) { + class.ParentClass().SetStaticMetadata( + "custom test source", + "Src/Test", + "Demo source bin with volume", + "Wilhelm Bartel ", + ) + + class.ParentClass().AddPadTemplate(gst.NewPadTemplate( + "src", + gst.PadSrc, + gst.PadAlways, + gst.CapsFromString("audio/x-raw,channels=2,rate=48000"), + )) +} + type customBin struct { gst.BinInstance // parent object must be first embedded field source1 gst.Element @@ -15,11 +31,11 @@ type customBin struct { // constructed is the method we use to override the GOBject.constructed method. func (bin *customBin) constructed() { - bin.source1 = gst.ElementFactoryMakeWithProperties("gocustomsrc", map[string]interface{}{ + bin.source1 = gst.ElementFactoryMakeWithProperties("gocustomsrc", map[string]any{ "duration": int64(5 * time.Second), }) - bin.source2 = gst.ElementFactoryMakeWithProperties("gocustomsrc", map[string]interface{}{ + bin.source2 = gst.ElementFactoryMakeWithProperties("gocustomsrc", map[string]any{ "duration": int64(10 * time.Second), }) diff --git a/examples/plugins/registered_elements/internal/custombin/register.go b/examples/plugins/registered_elements/internal/custombin/register.go index 3e00947..f2e28af 100644 --- a/examples/plugins/registered_elements/internal/custombin/register.go +++ b/examples/plugins/registered_elements/internal/custombin/register.go @@ -10,14 +10,7 @@ import ( func Register() bool { registered := gst.RegisterBinSubClass[*customBin]( "gocustombin", - func(class *gst.BinClass) { - class.ParentClass().SetStaticMetadata( - "custom test source", - "Src/Test", - "Demo source bin with volume", - "Wilhelm Bartel ", - ) - }, + classInit, nil, gst.BinOverrides[*customBin]{ ElementOverrides: gst.ElementOverrides[*customBin]{ diff --git a/examples/plugins/registered_elements/internal/customsrc/element.go b/examples/plugins/registered_elements/internal/customsrc/element.go index 0c43ad5..ab4cbc9 100644 --- a/examples/plugins/registered_elements/internal/customsrc/element.go +++ b/examples/plugins/registered_elements/internal/customsrc/element.go @@ -1,6 +1,8 @@ package customsrc import ( + "fmt" + "log" "math" "time" @@ -13,6 +15,33 @@ const samplesperbuffer = 4800 const samplerate = 48000 +func classInit(class *gst.BinClass) { + class.ParentClass().SetStaticMetadata( + "custom test source", + "Src/Test", + "Demo source bin with volume", + "Wilhelm Bartel ", + ) + + class.ParentClass().AddPadTemplate(gst.NewPadTemplate( + "src", + gst.PadSrc, + gst.PadAlways, + gst.CapsFromString(fmt.Sprintf("audio/x-raw,channels=2,rate=%d", samplerate)), + )) + + class.ParentClass().ParentClass().ParentClass().ParentClass().InstallProperties([]*gobject.ParamSpec{ + gobject.ParamSpecInt64( + "duration", + "duration", + "Duration of the source in nanoseconds", + 0, + math.MaxInt64, + 0, + gobject.ParamReadwrite|gobject.ParamConstruct), + }) +} + type customSrc struct { gst.BinInstance // parent must be embedded as the first field @@ -24,7 +53,9 @@ type customSrc struct { // InstanceInit should initialize the element. Keep in mind that the properties are not yet present. When this is called. func (bin *customSrc) init() { - bin.source = gst.ElementFactoryMake("audiotestsrc", "") + bin.source = gst.ElementFactoryMakeWithProperties("audiotestsrc", map[string]any{ + "samplesperbuffer": samplesperbuffer, + }) bin.volume = gst.ElementFactoryMake("volume", "") bin.AddMany( @@ -49,7 +80,8 @@ func (bin *customSrc) init() { func (bin *customSrc) setProperty(_ uint, value any, pspec *gobject.ParamSpec) { switch pspec.Name() { case "duration": - bin.Duration = value.(time.Duration) + bin.Duration = time.Duration(value.(int64)) // declared as int64 property in classInit + log.Printf("set duration to %s", bin.Duration) bin.updateSource() default: panic("unknown property") @@ -59,7 +91,7 @@ func (bin *customSrc) setProperty(_ uint, value any, pspec *gobject.ParamSpec) { func (bin *customSrc) getProperty(_ uint, pspec *gobject.ParamSpec) any { switch pspec.Name() { case "duration": - return bin.Duration + return int64(bin.Duration) // declared as int64 property in classInit default: panic("unknown property") } @@ -67,9 +99,14 @@ func (bin *customSrc) getProperty(_ uint, pspec *gobject.ParamSpec) any { // updateSource will get called to update the audiotestsrc when a property changes func (s *customSrc) updateSource() { - if s.source != nil { - numBuffers := (float64(s.Duration / time.Second)) / (float64(samplesperbuffer) / float64(samplerate)) - - s.source.SetObjectProperty("num-buffers", int(math.Ceil(numBuffers))) + if s.source == nil { + // the construct param may be set before we initialized the source + return } + + numBuffers := (float64(s.Duration / time.Second)) / (float64(samplesperbuffer) / float64(samplerate)) + + s.source.SetObjectProperty("num-buffers", int32(math.Ceil(numBuffers))) + + log.Printf("set num-buffers to %d", int(math.Ceil(numBuffers))) } diff --git a/examples/plugins/registered_elements/internal/customsrc/register.go b/examples/plugins/registered_elements/internal/customsrc/register.go index 18f5a13..25bb67e 100644 --- a/examples/plugins/registered_elements/internal/customsrc/register.go +++ b/examples/plugins/registered_elements/internal/customsrc/register.go @@ -1,8 +1,6 @@ package customsrc import ( - "math" - "github.com/diamondburned/gotk4/pkg/gobject/v2" "github.com/go-gst/go-gst/pkg/gst" ) @@ -12,25 +10,7 @@ import ( func Register() bool { registered := gst.RegisterBinSubClass[*customSrc]( "gocustomsrc", - func(class *gst.BinClass) { - class.ParentClass().SetStaticMetadata( - "custom test source", - "Src/Test", - "Demo source bin with volume", - "Wilhelm Bartel ", - ) - - class.ParentClass().ParentClass().ParentClass().ParentClass().InstallProperties([]*gobject.ParamSpec{ - gobject.ParamSpecInt( - "duration", - "Duration", - "Duration of the source in nanoseconds", - 0, - math.MaxInt64, - 0, - gobject.ParamWritable|gobject.ParamReadable|gst.ParamMutableReady), - }) - }, + classInit, nil, gst.BinOverrides[*customSrc]{ ElementOverrides: gst.ElementOverrides[*customSrc]{ diff --git a/examples/plugins/registered_elements/main.go b/examples/plugins/registered_elements/main.go index 016ed17..39fe286 100644 --- a/examples/plugins/registered_elements/main.go +++ b/examples/plugins/registered_elements/main.go @@ -3,6 +3,7 @@ package main import ( "context" "fmt" + "log" "os" "os/signal" "path/filepath" @@ -30,6 +31,10 @@ func run(ctx context.Context) error { systemclock := gst.SystemClockObtain() + log.Printf("using system clock: %s", systemclock.GetName()) + + // After registering the elements, we can use them in the parsed pipeline strings as if they were + // provided by a plugin. ret, err := gst.ParseLaunch("gocustombin ! fakesink sync=true") if err != nil { @@ -42,8 +47,6 @@ func run(ctx context.Context) error { bus := pipeline.GetBus() - pipeline.SetState(gst.StatePlaying) - go func() { for msg := range bus.Messages(ctx) { switch msg.Type() { @@ -75,11 +78,11 @@ func run(ctx context.Context) error { default: fmt.Println("got message:", msg.String()) } - - return } }() + pipeline.SetState(gst.StatePlaying) + <-ctx.Done() pipeline.BlockSetState(gst.StateNull, gst.ClockTime(time.Second)) diff --git a/pkg/gst/bus_manual.go b/pkg/gst/bus_manual.go index f57b8fb..e8874ad 100644 --- a/pkg/gst/bus_manual.go +++ b/pkg/gst/bus_manual.go @@ -3,6 +3,7 @@ package gst import ( "context" "iter" + "sync/atomic" ) type BusExtManual interface { @@ -18,15 +19,23 @@ type BusExtManual interface { func (bus *BusInstance) Messages(ctx context.Context) iter.Seq[*Message] { messages := make(chan *Message, 20) // arbitrary cap to not block instantly + c := atomic.Pointer[chan *Message]{} + c.Store(&messages) + bus.SetSyncHandler(func(bus Bus, message *Message) BusSyncReply { - messages <- message.Copy() + messages := c.Load() + if messages == nil { + return BusDrop + } + *messages <- message.Copy() return BusDrop }) return func(yield func(*Message) bool) { + defer func() { bus.SetSyncHandler(nil) - close(messages) + c.Store(nil) }() for { diff --git a/pkg/gst/element_manual.go b/pkg/gst/element_manual.go index 083094d..c694d56 100644 --- a/pkg/gst/element_manual.go +++ b/pkg/gst/element_manual.go @@ -8,14 +8,14 @@ import ( ) type ElementExtManual interface { - // BlockSetState is a convenience wrapper around calling SetState and State to wait for async state changes. See [Element.State] for more info. + // BlockSetState is a convenience wrapper around calling [Element.SetState] and [Element.GetState] to wait for async state changes. See [Element.State] for more info. BlockSetState(state State, timeout ClockTime) StateChangeReturn // MessageError is a convenience wrapper for posting an error message from inside an element. See [Element.MessageFull] for more info. - MessageError(domain glib.Quark, code int, text, debug string) + MessageError(domain glib.Quark, code int32, text, debug string) } -// BlockSetState is a convenience wrapper around calling SetState and State to wait for async state changes. See State for more info. +// BlockSetState is a convenience wrapper around calling [Element.SetState] and [Element.GetState] to wait for async state changes. See State for more info. func (el *ElementInstance) BlockSetState(state State, timeout ClockTime) StateChangeReturn { ret := el.SetState(state) @@ -27,9 +27,9 @@ func (el *ElementInstance) BlockSetState(state State, timeout ClockTime) StateCh } // MessageError is a convenience wrapper for posting an error message from inside an element. See [Element.MessageFull] for more info. -func (e *ElementInstance) MessageError(domain glib.Quark, code int, text, debug string) { +func (e *ElementInstance) MessageError(domain glib.Quark, code int32, text, debug string) { function, file, line, _ := runtime.Caller(1) - e.MessageFull(MessageError, domain, code, text, debug, path.Base(file), runtime.FuncForPC(function).Name(), line) + e.MessageFull(MessageError, domain, code, text, debug, path.Base(file), runtime.FuncForPC(function).Name(), int32(line)) } func LinkMany(elements ...Element) bool { diff --git a/pkg/gst/gst.gen.go b/pkg/gst/gst.gen.go index 4465e6d..b9388a5 100644 --- a/pkg/gst/gst.gen.go +++ b/pkg/gst/gst.gen.go @@ -33,8 +33,11 @@ import ( // extern gboolean _gotk4_gst1_PluginFilter(GstPlugin*, gpointer); // extern gboolean _gotk4_gst1_PluginInitFullFunc(GstPlugin*, gpointer); // extern gboolean _gotk4_gst1_StructureFilterMapFunc(GQuark, GValue*, gpointer); +// extern gboolean _gotk4_gst1_StructureFilterMapIDStrFunc(GstIdStr*, GValue*, gpointer); // extern gboolean _gotk4_gst1_StructureForEachFunc(GQuark, GValue*, gpointer); +// extern gboolean _gotk4_gst1_StructureForEachIDStrFunc(GstIdStr*, GValue*, gpointer); // extern gboolean _gotk4_gst1_StructureMapFunc(GQuark, GValue*, gpointer); +// extern gboolean _gotk4_gst1_StructureMapIDStrFunc(GstIdStr*, GValue*, gpointer); // extern void _gotk4_gst1_ElementCallAsyncFunc(GstElement*, gpointer); // extern void _gotk4_gst1_IteratorForEachFunction(GValue*, gpointer); // extern void _gotk4_gst1_LogFunction(GstDebugCategory*, GstDebugLevel, gchar*, gchar*, gint, GObject*, GstDebugMessage*, gpointer); @@ -467,6 +470,7 @@ var ( TypeContext = gobject.Type(C.gst_context_get_type()) TypeDateTime = gobject.Type(C.gst_date_time_get_type()) TypeEvent = gobject.Type(C.gst_event_get_type()) + TypeIdStr = gobject.Type(C.gst_id_str_get_type()) TypeIterator = gobject.Type(C.gst_iterator_get_type()) TypeMemory = gobject.Type(C.gst_memory_get_type()) TypeMessage = gobject.Type(C.gst_message_get_type()) @@ -620,6 +624,7 @@ func init() { gobject.TypeMarshaler{T: TypeContext, F: marshalContext}, gobject.TypeMarshaler{T: TypeDateTime, F: marshalDateTime}, gobject.TypeMarshaler{T: TypeEvent, F: marshalEvent}, + gobject.TypeMarshaler{T: TypeIdStr, F: marshalIdStr}, gobject.TypeMarshaler{T: TypeIterator, F: marshalIterator}, gobject.TypeMarshaler{T: TypeMemory, F: marshalMemory}, gobject.TypeMarshaler{T: TypeMessage, F: marshalMessage}, @@ -762,11 +767,11 @@ const VERSION_MAJOR = 1 // VERSION_MICRO wraps GST_VERSION_MICRO // // The micro version of GStreamer at compile time: -const VERSION_MICRO = 10 +const VERSION_MICRO = 0 // VERSION_MINOR wraps GST_VERSION_MINOR // // The minor version of GStreamer at compile time: -const VERSION_MINOR = 24 +const VERSION_MINOR = 26 // VERSION_NANO wraps GST_VERSION_NANO // // The nano version of GStreamer at compile time: @@ -814,8 +819,11 @@ func marshalBufferingMode(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = BufferingMode(0) -func (e BufferingMode) InitGoValue(v *gobject.Value) { - v.Init(TypeBufferingMode) +func (e BufferingMode) GoValueType() gobject.Type { + return TypeBufferingMode +} + +func (e BufferingMode) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -855,8 +863,11 @@ func marshalBusSyncReply(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = BusSyncReply(0) -func (e BusSyncReply) InitGoValue(v *gobject.Value) { - v.Init(TypeBusSyncReply) +func (e BusSyncReply) GoValueType() gobject.Type { + return TypeBusSyncReply +} + +func (e BusSyncReply) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -911,8 +922,11 @@ func marshalCapsIntersectMode(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = CapsIntersectMode(0) -func (e CapsIntersectMode) InitGoValue(v *gobject.Value) { - v.Init(TypeCapsIntersectMode) +func (e CapsIntersectMode) GoValueType() gobject.Type { + return TypeCapsIntersectMode +} + +func (e CapsIntersectMode) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -946,8 +960,11 @@ func marshalClockEntryType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = ClockEntryType(0) -func (e ClockEntryType) InitGoValue(v *gobject.Value) { - v.Init(TypeClockEntryType) +func (e ClockEntryType) GoValueType() gobject.Type { + return TypeClockEntryType +} + +func (e ClockEntryType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1005,8 +1022,11 @@ func marshalClockReturn(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = ClockReturn(0) -func (e ClockReturn) InitGoValue(v *gobject.Value) { - v.Init(TypeClockReturn) +func (e ClockReturn) GoValueType() gobject.Type { + return TypeClockReturn +} + +func (e ClockReturn) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1056,8 +1076,11 @@ func marshalClockType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = ClockType(0) -func (e ClockType) InitGoValue(v *gobject.Value) { - v.Init(TypeClockType) +func (e ClockType) GoValueType() gobject.Type { + return TypeClockType +} + +func (e ClockType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1149,8 +1172,11 @@ func marshalCoreError(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = CoreError(0) -func (e CoreError) InitGoValue(v *gobject.Value) { - v.Init(TypeCoreError) +func (e CoreError) GoValueType() gobject.Type { + return TypeCoreError +} + +func (e CoreError) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1217,8 +1243,11 @@ func marshalDebugColorMode(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = DebugColorMode(0) -func (e DebugColorMode) InitGoValue(v *gobject.Value) { - v.Init(TypeDebugColorMode) +func (e DebugColorMode) GoValueType() gobject.Type { + return TypeDebugColorMode +} + +func (e DebugColorMode) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1313,8 +1342,11 @@ func marshalDebugLevel(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = DebugLevel(0) -func (e DebugLevel) InitGoValue(v *gobject.Value) { - v.Init(TypeDebugLevel) +func (e DebugLevel) GoValueType() gobject.Type { + return TypeDebugLevel +} + +func (e DebugLevel) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1537,8 +1569,11 @@ func marshalEventType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = EventType(0) -func (e EventType) InitGoValue(v *gobject.Value) { - v.Init(TypeEventType) +func (e EventType) GoValueType() gobject.Type { + return TypeEventType +} + +func (e EventType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1768,8 +1803,11 @@ func marshalFlowReturn(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = FlowReturn(0) -func (e FlowReturn) InitGoValue(v *gobject.Value) { - v.Init(TypeFlowReturn) +func (e FlowReturn) GoValueType() gobject.Type { + return TypeFlowReturn +} + +func (e FlowReturn) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1835,8 +1873,11 @@ func marshalFormat(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = Format(0) -func (e Format) InitGoValue(v *gobject.Value) { - v.Init(TypeFormat) +func (e Format) GoValueType() gobject.Type { + return TypeFormat +} + +func (e Format) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -2045,8 +2086,11 @@ func marshalIteratorItem(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = IteratorItem(0) -func (e IteratorItem) InitGoValue(v *gobject.Value) { - v.Init(TypeIteratorItem) +func (e IteratorItem) GoValueType() gobject.Type { + return TypeIteratorItem +} + +func (e IteratorItem) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -2089,8 +2133,11 @@ func marshalIteratorResult(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = IteratorResult(0) -func (e IteratorResult) InitGoValue(v *gobject.Value) { - v.Init(TypeIteratorResult) +func (e IteratorResult) GoValueType() gobject.Type { + return TypeIteratorResult +} + +func (e IteratorResult) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -2149,8 +2196,11 @@ func marshalLibraryError(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = LibraryError(0) -func (e LibraryError) InitGoValue(v *gobject.Value) { - v.Init(TypeLibraryError) +func (e LibraryError) GoValueType() gobject.Type { + return TypeLibraryError +} + +func (e LibraryError) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -2210,8 +2260,11 @@ func marshalPadDirection(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = PadDirection(0) -func (e PadDirection) InitGoValue(v *gobject.Value) { - v.Init(TypePadDirection) +func (e PadDirection) GoValueType() gobject.Type { + return TypePadDirection +} + +func (e PadDirection) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -2266,8 +2319,11 @@ func marshalPadLinkReturn(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = PadLinkReturn(0) -func (e PadLinkReturn) InitGoValue(v *gobject.Value) { - v.Init(TypePadLinkReturn) +func (e PadLinkReturn) GoValueType() gobject.Type { + return TypePadLinkReturn +} + +func (e PadLinkReturn) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -2312,8 +2368,11 @@ func marshalPadMode(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = PadMode(0) -func (e PadMode) InitGoValue(v *gobject.Value) { - v.Init(TypePadMode) +func (e PadMode) GoValueType() gobject.Type { + return TypePadMode +} + +func (e PadMode) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -2380,8 +2439,11 @@ func marshalPadPresence(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = PadPresence(0) -func (e PadPresence) InitGoValue(v *gobject.Value) { - v.Init(TypePadPresence) +func (e PadPresence) GoValueType() gobject.Type { + return TypePadPresence +} + +func (e PadPresence) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -2447,8 +2509,11 @@ func marshalPadProbeReturn(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = PadProbeReturn(0) -func (e PadProbeReturn) InitGoValue(v *gobject.Value) { - v.Init(TypePadProbeReturn) +func (e PadProbeReturn) GoValueType() gobject.Type { + return TypePadProbeReturn +} + +func (e PadProbeReturn) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -2509,8 +2574,11 @@ func marshalParseError(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = ParseError(0) -func (e ParseError) InitGoValue(v *gobject.Value) { - v.Init(TypeParseError) +func (e ParseError) GoValueType() gobject.Type { + return TypeParseError +} + +func (e ParseError) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -2573,8 +2641,11 @@ func marshalPluginError(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = PluginError(0) -func (e PluginError) InitGoValue(v *gobject.Value) { - v.Init(TypePluginError) +func (e PluginError) GoValueType() gobject.Type { + return TypePluginError +} + +func (e PluginError) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -2642,8 +2713,11 @@ func marshalProgressType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = ProgressType(0) -func (e ProgressType) InitGoValue(v *gobject.Value) { - v.Init(TypeProgressType) +func (e ProgressType) GoValueType() gobject.Type { + return TypeProgressType +} + +func (e ProgressType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -2691,8 +2765,11 @@ func marshalPromiseResult(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = PromiseResult(0) -func (e PromiseResult) InitGoValue(v *gobject.Value) { - v.Init(TypePromiseResult) +func (e PromiseResult) GoValueType() gobject.Type { + return TypePromiseResult +} + +func (e PromiseResult) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -2739,8 +2816,11 @@ func marshalQOSType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = QOSType(0) -func (e QOSType) InitGoValue(v *gobject.Value) { - v.Init(TypeQOSType) +func (e QOSType) GoValueType() gobject.Type { + return TypeQOSType +} + +func (e QOSType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -2852,8 +2932,11 @@ func marshalQueryType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = QueryType(0) -func (e QueryType) InitGoValue(v *gobject.Value) { - v.Init(TypeQueryType) +func (e QueryType) GoValueType() gobject.Type { + return TypeQueryType +} + +func (e QueryType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3001,8 +3084,11 @@ func marshalRank(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = Rank(0) -func (e Rank) InitGoValue(v *gobject.Value) { - v.Init(TypeRank) +func (e Rank) GoValueType() gobject.Type { + return TypeRank +} + +func (e Rank) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3101,8 +3187,11 @@ func marshalResourceError(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = ResourceError(0) -func (e ResourceError) InitGoValue(v *gobject.Value) { - v.Init(TypeResourceError) +func (e ResourceError) GoValueType() gobject.Type { + return TypeResourceError +} + +func (e ResourceError) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3171,8 +3260,11 @@ func marshalSearchMode(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = SearchMode(0) -func (e SearchMode) InitGoValue(v *gobject.Value) { - v.Init(TypeSearchMode) +func (e SearchMode) GoValueType() gobject.Type { + return TypeSearchMode +} + +func (e SearchMode) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3212,8 +3304,11 @@ func marshalSeekType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = SeekType(0) -func (e SeekType) InitGoValue(v *gobject.Value) { - v.Init(TypeSeekType) +func (e SeekType) GoValueType() gobject.Type { + return TypeSeekType +} + +func (e SeekType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3264,8 +3359,11 @@ func marshalState(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = State(0) -func (e State) InitGoValue(v *gobject.Value) { - v.Init(TypeState) +func (e State) GoValueType() gobject.Type { + return TypeState +} + +func (e State) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3388,8 +3486,11 @@ func marshalStateChange(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = StateChange(0) -func (e StateChange) InitGoValue(v *gobject.Value) { - v.Init(TypeStateChange) +func (e StateChange) GoValueType() gobject.Type { + return TypeStateChange +} + +func (e StateChange) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3469,8 +3570,11 @@ func marshalStateChangeReturn(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = StateChangeReturn(0) -func (e StateChangeReturn) InitGoValue(v *gobject.Value) { - v.Init(TypeStateChangeReturn) +func (e StateChangeReturn) GoValueType() gobject.Type { + return TypeStateChangeReturn +} + +func (e StateChangeReturn) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3565,8 +3669,11 @@ func marshalStreamError(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = StreamError(0) -func (e StreamError) InitGoValue(v *gobject.Value) { - v.Init(TypeStreamError) +func (e StreamError) GoValueType() gobject.Type { + return TypeStreamError +} + +func (e StreamError) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3650,8 +3757,11 @@ func marshalStreamStatusType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = StreamStatusType(0) -func (e StreamStatusType) InitGoValue(v *gobject.Value) { - v.Init(TypeStreamStatusType) +func (e StreamStatusType) GoValueType() gobject.Type { + return TypeStreamStatusType +} + +func (e StreamStatusType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3690,8 +3800,11 @@ func marshalStructureChangeType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = StructureChangeType(0) -func (e StructureChangeType) InitGoValue(v *gobject.Value) { - v.Init(TypeStructureChangeType) +func (e StructureChangeType) GoValueType() gobject.Type { + return TypeStructureChangeType +} + +func (e StructureChangeType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3737,8 +3850,11 @@ func marshalTagFlag(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = TagFlag(0) -func (e TagFlag) InitGoValue(v *gobject.Value) { - v.Init(TypeTagFlag) +func (e TagFlag) GoValueType() gobject.Type { + return TypeTagFlag +} + +func (e TagFlag) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3814,8 +3930,11 @@ func marshalTagMergeMode(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = TagMergeMode(0) -func (e TagMergeMode) InitGoValue(v *gobject.Value) { - v.Init(TypeTagMergeMode) +func (e TagMergeMode) GoValueType() gobject.Type { + return TypeTagMergeMode +} + +func (e TagMergeMode) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3856,8 +3975,11 @@ func marshalTagScope(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = TagScope(0) -func (e TagScope) InitGoValue(v *gobject.Value) { - v.Init(TypeTagScope) +func (e TagScope) GoValueType() gobject.Type { + return TypeTagScope +} + +func (e TagScope) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3895,8 +4017,11 @@ func marshalTaskState(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = TaskState(0) -func (e TaskState) InitGoValue(v *gobject.Value) { - v.Init(TypeTaskState) +func (e TaskState) GoValueType() gobject.Type { + return TypeTaskState +} + +func (e TaskState) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3953,8 +4078,11 @@ func marshalTocEntryType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = TocEntryType(0) -func (e TocEntryType) InitGoValue(v *gobject.Value) { - v.Init(TypeTocEntryType) +func (e TocEntryType) GoValueType() gobject.Type { + return TypeTocEntryType +} + +func (e TocEntryType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -4029,8 +4157,11 @@ func marshalTocLoopType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = TocLoopType(0) -func (e TocLoopType) InitGoValue(v *gobject.Value) { - v.Init(TypeTocLoopType) +func (e TocLoopType) GoValueType() gobject.Type { + return TypeTocLoopType +} + +func (e TocLoopType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -4072,8 +4203,11 @@ func marshalTocScope(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = TocScope(0) -func (e TocScope) InitGoValue(v *gobject.Value) { - v.Init(TypeTocScope) +func (e TocScope) GoValueType() gobject.Type { + return TypeTocScope +} + +func (e TocScope) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -4119,8 +4253,11 @@ func marshalTracerValueScope(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = TracerValueScope(0) -func (e TracerValueScope) InitGoValue(v *gobject.Value) { - v.Init(TypeTracerValueScope) +func (e TracerValueScope) GoValueType() gobject.Type { + return TypeTracerValueScope +} + +func (e TracerValueScope) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -4173,8 +4310,11 @@ func marshalTypeFindProbability(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = TypeFindProbability(0) -func (e TypeFindProbability) InitGoValue(v *gobject.Value) { - v.Init(TypeTypeFindProbability) +func (e TypeFindProbability) GoValueType() gobject.Type { + return TypeTypeFindProbability +} + +func (e TypeFindProbability) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -4222,8 +4362,11 @@ func marshalURIError(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = URIError(0) -func (e URIError) InitGoValue(v *gobject.Value) { - v.Init(TypeURIError) +func (e URIError) GoValueType() gobject.Type { + return TypeURIError +} + +func (e URIError) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -4280,8 +4423,11 @@ func marshalURIType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = URIType(0) -func (e URIType) InitGoValue(v *gobject.Value) { - v.Init(TypeURIType) +func (e URIType) GoValueType() gobject.Type { + return TypeURIType +} + +func (e URIType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -4330,8 +4476,11 @@ func (a AllocatorFlags) Has(other AllocatorFlags) bool { var _ gobject.GoValueInitializer = AllocatorFlags(0) -func (f AllocatorFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeAllocatorFlags) +func (f AllocatorFlags) GoValueType() gobject.Type { + return TypeAllocatorFlags +} + +func (f AllocatorFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -4387,8 +4536,11 @@ func (b BinFlags) Has(other BinFlags) bool { var _ gobject.GoValueInitializer = BinFlags(0) -func (f BinFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeBinFlags) +func (f BinFlags) GoValueType() gobject.Type { + return TypeBinFlags +} + +func (f BinFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -4465,8 +4617,11 @@ func (b BufferCopyFlagsType) Has(other BufferCopyFlagsType) bool { var _ gobject.GoValueInitializer = BufferCopyFlagsType(0) -func (f BufferCopyFlagsType) InitGoValue(v *gobject.Value) { - v.Init(TypeBufferCopyFlagsType) +func (f BufferCopyFlagsType) GoValueType() gobject.Type { + return TypeBufferCopyFlagsType +} + +func (f BufferCopyFlagsType) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -4598,8 +4753,11 @@ func (b BufferFlags) Has(other BufferFlags) bool { var _ gobject.GoValueInitializer = BufferFlags(0) -func (f BufferFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeBufferFlags) +func (f BufferFlags) GoValueType() gobject.Type { + return TypeBufferFlags +} + +func (f BufferFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -4695,8 +4853,11 @@ func (b BufferPoolAcquireFlags) Has(other BufferPoolAcquireFlags) bool { var _ gobject.GoValueInitializer = BufferPoolAcquireFlags(0) -func (f BufferPoolAcquireFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeBufferPoolAcquireFlags) +func (f BufferPoolAcquireFlags) GoValueType() gobject.Type { + return TypeBufferPoolAcquireFlags +} + +func (f BufferPoolAcquireFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -4750,8 +4911,11 @@ func (b BusFlags) Has(other BusFlags) bool { var _ gobject.GoValueInitializer = BusFlags(0) -func (f BusFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeBusFlags) +func (f BusFlags) GoValueType() gobject.Type { + return TypeBusFlags +} + +func (f BusFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -4793,8 +4957,11 @@ func (c CapsFlags) Has(other CapsFlags) bool { var _ gobject.GoValueInitializer = CapsFlags(0) -func (f CapsFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeCapsFlags) +func (f CapsFlags) GoValueType() gobject.Type { + return TypeCapsFlags +} + +func (f CapsFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -4860,8 +5027,11 @@ func (c ClockFlags) Has(other ClockFlags) bool { var _ gobject.GoValueInitializer = ClockFlags(0) -func (f ClockFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeClockFlags) +func (f ClockFlags) GoValueType() gobject.Type { + return TypeClockFlags +} + +func (f ClockFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -4989,8 +5159,11 @@ func (d DebugColorFlags) Has(other DebugColorFlags) bool { var _ gobject.GoValueInitializer = DebugColorFlags(0) -func (f DebugColorFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeDebugColorFlags) +func (f DebugColorFlags) GoValueType() gobject.Type { + return TypeDebugColorFlags +} + +func (f DebugColorFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -5107,8 +5280,11 @@ func (d DebugGraphDetails) Has(other DebugGraphDetails) bool { var _ gobject.GoValueInitializer = DebugGraphDetails(0) -func (f DebugGraphDetails) InitGoValue(v *gobject.Value) { - v.Init(TypeDebugGraphDetails) +func (f DebugGraphDetails) GoValueType() gobject.Type { + return TypeDebugGraphDetails +} + +func (f DebugGraphDetails) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -5188,8 +5364,11 @@ func (e ElementFlags) Has(other ElementFlags) bool { var _ gobject.GoValueInitializer = ElementFlags(0) -func (f ElementFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeElementFlags) +func (f ElementFlags) GoValueType() gobject.Type { + return TypeElementFlags +} + +func (f ElementFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -5265,8 +5444,11 @@ func (e EventTypeFlags) Has(other EventTypeFlags) bool { var _ gobject.GoValueInitializer = EventTypeFlags(0) -func (f EventTypeFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeEventTypeFlags) +func (f EventTypeFlags) GoValueType() gobject.Type { + return TypeEventTypeFlags +} + +func (f EventTypeFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -5318,8 +5500,11 @@ func (g GapFlags) Has(other GapFlags) bool { var _ gobject.GoValueInitializer = GapFlags(0) -func (f GapFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeGapFlags) +func (f GapFlags) GoValueType() gobject.Type { + return TypeGapFlags +} + +func (f GapFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -5369,8 +5554,11 @@ func (l LockFlags) Has(other LockFlags) bool { var _ gobject.GoValueInitializer = LockFlags(0) -func (f LockFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeLockFlags) +func (f LockFlags) GoValueType() gobject.Type { + return TypeLockFlags +} + +func (f LockFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -5425,8 +5613,11 @@ func (m MapFlags) Has(other MapFlags) bool { var _ gobject.GoValueInitializer = MapFlags(0) -func (f MapFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeMapFlags) +func (f MapFlags) GoValueType() gobject.Type { + return TypeMapFlags +} + +func (f MapFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -5501,8 +5692,11 @@ func (m MemoryFlags) Has(other MemoryFlags) bool { var _ gobject.GoValueInitializer = MemoryFlags(0) -func (f MemoryFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeMemoryFlags) +func (f MemoryFlags) GoValueType() gobject.Type { + return TypeMemoryFlags +} + +func (f MemoryFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -5777,8 +5971,11 @@ func (m MessageType) Has(other MessageType) bool { var _ gobject.GoValueInitializer = MessageType(0) -func (f MessageType) InitGoValue(v *gobject.Value) { - v.Init(TypeMessageType) +func (f MessageType) GoValueType() gobject.Type { + return TypeMessageType +} + +func (f MessageType) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -6009,8 +6206,11 @@ func (m MetaFlags) Has(other MetaFlags) bool { var _ gobject.GoValueInitializer = MetaFlags(0) -func (f MetaFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeMetaFlags) +func (f MetaFlags) GoValueType() gobject.Type { + return TypeMetaFlags +} + +func (f MetaFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -6076,8 +6276,11 @@ func (m MiniObjectFlags) Has(other MiniObjectFlags) bool { var _ gobject.GoValueInitializer = MiniObjectFlags(0) -func (f MiniObjectFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeMiniObjectFlags) +func (f MiniObjectFlags) GoValueType() gobject.Type { + return TypeMiniObjectFlags +} + +func (f MiniObjectFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -6139,8 +6342,11 @@ func (o ObjectFlags) Has(other ObjectFlags) bool { var _ gobject.GoValueInitializer = ObjectFlags(0) -func (f ObjectFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeObjectFlags) +func (f ObjectFlags) GoValueType() gobject.Type { + return TypeObjectFlags +} + +func (f ObjectFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -6253,8 +6459,11 @@ func (p PadFlags) Has(other PadFlags) bool { var _ gobject.GoValueInitializer = PadFlags(0) -func (f PadFlags) InitGoValue(v *gobject.Value) { - v.Init(TypePadFlags) +func (f PadFlags) GoValueType() gobject.Type { + return TypePadFlags +} + +func (f PadFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -6365,8 +6574,11 @@ func (p PadLinkCheck) Has(other PadLinkCheck) bool { var _ gobject.GoValueInitializer = PadLinkCheck(0) -func (f PadLinkCheck) InitGoValue(v *gobject.Value) { - v.Init(TypePadLinkCheck) +func (f PadLinkCheck) GoValueType() gobject.Type { + return TypePadLinkCheck +} + +func (f PadLinkCheck) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -6508,8 +6720,11 @@ func (p PadProbeType) Has(other PadProbeType) bool { var _ gobject.GoValueInitializer = PadProbeType(0) -func (f PadProbeType) InitGoValue(v *gobject.Value) { - v.Init(TypePadProbeType) +func (f PadProbeType) GoValueType() gobject.Type { + return TypePadProbeType +} + +func (f PadProbeType) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -6610,8 +6825,11 @@ func (p PadTemplateFlags) Has(other PadTemplateFlags) bool { var _ gobject.GoValueInitializer = PadTemplateFlags(0) -func (f PadTemplateFlags) InitGoValue(v *gobject.Value) { - v.Init(TypePadTemplateFlags) +func (f PadTemplateFlags) GoValueType() gobject.Type { + return TypePadTemplateFlags +} + +func (f PadTemplateFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -6666,8 +6884,11 @@ func (p ParseFlags) Has(other ParseFlags) bool { var _ gobject.GoValueInitializer = ParseFlags(0) -func (f ParseFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeParseFlags) +func (f ParseFlags) GoValueType() gobject.Type { + return TypeParseFlags +} + +func (f ParseFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -6718,8 +6939,11 @@ func (p PipelineFlags) Has(other PipelineFlags) bool { var _ gobject.GoValueInitializer = PipelineFlags(0) -func (f PipelineFlags) InitGoValue(v *gobject.Value) { - v.Init(TypePipelineFlags) +func (f PipelineFlags) GoValueType() gobject.Type { + return TypePipelineFlags +} + +func (f PipelineFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -6760,8 +6984,11 @@ func (p PluginAPIFlags) Has(other PluginAPIFlags) bool { var _ gobject.GoValueInitializer = PluginAPIFlags(0) -func (f PluginAPIFlags) InitGoValue(v *gobject.Value) { - v.Init(TypePluginAPIFlags) +func (f PluginAPIFlags) GoValueType() gobject.Type { + return TypePluginAPIFlags +} + +func (f PluginAPIFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -6826,8 +7053,11 @@ func (p PluginDependencyFlags) Has(other PluginDependencyFlags) bool { var _ gobject.GoValueInitializer = PluginDependencyFlags(0) -func (f PluginDependencyFlags) InitGoValue(v *gobject.Value) { - v.Init(TypePluginDependencyFlags) +func (f PluginDependencyFlags) GoValueType() gobject.Type { + return TypePluginDependencyFlags +} + +func (f PluginDependencyFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -6884,8 +7114,11 @@ func (p PluginFlags) Has(other PluginFlags) bool { var _ gobject.GoValueInitializer = PluginFlags(0) -func (f PluginFlags) InitGoValue(v *gobject.Value) { - v.Init(TypePluginFlags) +func (f PluginFlags) GoValueType() gobject.Type { + return TypePluginFlags +} + +func (f PluginFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -6937,8 +7170,11 @@ func (q QueryTypeFlags) Has(other QueryTypeFlags) bool { var _ gobject.GoValueInitializer = QueryTypeFlags(0) -func (f QueryTypeFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeQueryTypeFlags) +func (f QueryTypeFlags) GoValueType() gobject.Type { + return TypeQueryTypeFlags +} + +func (f QueryTypeFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -6990,8 +7226,11 @@ func (s SchedulingFlags) Has(other SchedulingFlags) bool { var _ gobject.GoValueInitializer = SchedulingFlags(0) -func (f SchedulingFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeSchedulingFlags) +func (f SchedulingFlags) GoValueType() gobject.Type { + return TypeSchedulingFlags +} + +func (f SchedulingFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -7161,8 +7400,11 @@ func (s SeekFlags) Has(other SeekFlags) bool { var _ gobject.GoValueInitializer = SeekFlags(0) -func (f SeekFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeSeekFlags) +func (f SeekFlags) GoValueType() gobject.Type { + return TypeSeekFlags +} + +func (f SeekFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -7273,8 +7515,11 @@ func (s SegmentFlags) Has(other SegmentFlags) bool { var _ gobject.GoValueInitializer = SegmentFlags(0) -func (f SegmentFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeSegmentFlags) +func (f SegmentFlags) GoValueType() gobject.Type { + return TypeSegmentFlags +} + +func (f SegmentFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -7341,8 +7586,11 @@ func (s SerializeFlags) Has(other SerializeFlags) bool { var _ gobject.GoValueInitializer = SerializeFlags(0) -func (f SerializeFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeSerializeFlags) +func (f SerializeFlags) GoValueType() gobject.Type { + return TypeSerializeFlags +} + +func (f SerializeFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -7392,8 +7640,11 @@ func (s StackTraceFlags) Has(other StackTraceFlags) bool { var _ gobject.GoValueInitializer = StackTraceFlags(0) -func (f StackTraceFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeStackTraceFlags) +func (f StackTraceFlags) GoValueType() gobject.Type { + return TypeStackTraceFlags +} + +func (f StackTraceFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -7452,8 +7703,11 @@ func (s StreamFlags) Has(other StreamFlags) bool { var _ gobject.GoValueInitializer = StreamFlags(0) -func (f StreamFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeStreamFlags) +func (f StreamFlags) GoValueType() gobject.Type { + return TypeStreamFlags +} + +func (f StreamFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -7521,8 +7775,11 @@ func (s StreamType) Has(other StreamType) bool { var _ gobject.GoValueInitializer = StreamType(0) -func (f StreamType) InitGoValue(v *gobject.Value) { - v.Init(TypeStreamType) +func (f StreamType) GoValueType() gobject.Type { + return TypeStreamType +} + +func (f StreamType) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -7611,8 +7868,11 @@ func (t TracerValueFlags) Has(other TracerValueFlags) bool { var _ gobject.GoValueInitializer = TracerValueFlags(0) -func (f TracerValueFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeTracerValueFlags) +func (f TracerValueFlags) GoValueType() gobject.Type { + return TypeTracerValueFlags +} + +func (f TracerValueFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -7695,7 +7955,7 @@ type IteratorForEachFunction func(item *gobject.Value) // Function prototype for a logging function that can be registered with // gst_debug_add_log_function(). // Use G_GNUC_NO_INSTRUMENT on that function. -type LogFunction func(category *DebugCategory, level DebugLevel, file string, function string, line int, object gobject.Object, message *DebugMessage) +type LogFunction func(category *DebugCategory, level DebugLevel, file string, function string, line int32, object gobject.Object, message *DebugMessage) // MiniObjectNotify wraps GstMiniObjectNotify // @@ -7749,18 +8009,37 @@ type PromiseChangeFunc func(promise *Promise) // the structure if %FALSE is returned. type StructureFilterMapFunc func(fieldId glib.Quark, value *gobject.Value) (goret bool) +// StructureFilterMapIDStrFunc wraps GstStructureFilterMapIdStrFunc +// +// A function that will be called in gst_structure_filter_and_map_in_place_id_str(). +// The function may modify @value, and the value will be removed from the +// structure if %FALSE is returned. +type StructureFilterMapIDStrFunc func(fieldname *IdStr, value *gobject.Value) (goret bool) + // StructureForEachFunc wraps GstStructureForeachFunc // // A function that will be called in gst_structure_foreach(). The function may // not modify @value. type StructureForEachFunc func(fieldId glib.Quark, value *gobject.Value) (goret bool) +// StructureForEachIDStrFunc wraps GstStructureForeachIdStrFunc +// +// A function that will be called in gst_structure_foreach_id_str(). The +// function may not modify @value. +type StructureForEachIDStrFunc func(fieldname *IdStr, value *gobject.Value) (goret bool) + // StructureMapFunc wraps GstStructureMapFunc // // A function that will be called in gst_structure_map_in_place(). The function // may modify @value. type StructureMapFunc func(fieldId glib.Quark, value *gobject.Value) (goret bool) +// StructureMapIDStrFunc wraps GstStructureMapIdStrFunc +// +// A function that will be called in gst_structure_map_in_place_id_str(). The +// function may modify @value. +type StructureMapIDStrFunc func(fieldname *IdStr, value *gobject.Value) (goret bool) + // TagForEachFunc wraps GstTagForeachFunc // // A function that will be called in gst_tag_list_foreach(). The function may @@ -7998,14 +8277,14 @@ func DebugConstructTermColor(colorinfo uint) string { // // The function returns the following values: // -// - goret int +// - goret int32 // // Constructs an integer that can be used for getting the desired color in // windows' terminals (cmd.exe). As there is no mean to underline, we simply // ignore this attribute. // // This function returns 0 on non-windows machines. -func DebugConstructWinColor(colorinfo uint) int { +func DebugConstructWinColor(colorinfo uint) int32 { var carg1 C.guint // in, none, casted var cret C.gint // return, none, casted @@ -8014,9 +8293,9 @@ func DebugConstructWinColor(colorinfo uint) int { cret = C.gst_debug_construct_win_color(carg1) runtime.KeepAlive(colorinfo) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -8166,7 +8445,7 @@ func DebugIsColored() bool { // - level DebugLevel: level of the message // - file string: the file that emitted the message, usually the __FILE__ identifier // - function string: the function that emitted the message -// - line int: the line from that the message was emitted, usually __LINE__ +// - line int32: the line from that the message was emitted, usually __LINE__ // - object gobject.Object (nullable): the object this message relates to, // or %NULL if none // - message *DebugMessage: the actual message @@ -8180,7 +8459,7 @@ func DebugIsColored() bool { // without color. The purpose is to make it easy for custom log output // handlers to get a log output that is identical to what the default handler // would write out. -func DebugLogGetLine(category *DebugCategory, level DebugLevel, file string, function string, line int, object gobject.Object, message *DebugMessage) string { +func DebugLogGetLine(category *DebugCategory, level DebugLevel, file string, function string, line int32, object gobject.Object, message *DebugMessage) string { var carg1 *C.GstDebugCategory // in, none, converted var carg2 C.GstDebugLevel // in, none, casted var carg3 *C.gchar // in, none, string @@ -8227,13 +8506,13 @@ func DebugLogGetLine(category *DebugCategory, level DebugLevel, file string, fun // - level DebugLevel: level of the message is in // - file string: the file that emitted the message, usually the __FILE__ identifier // - function string: the function that emitted the message -// - line int: the line from that the message was emitted, usually __LINE__ +// - line int32: the line from that the message was emitted, usually __LINE__ // - id string (nullable): the identifier of the object this message relates to // or %NULL if none // - messageString string: a message string // // Logs the given message using the currently registered debugging handlers. -func DebugLogIDLiteral(category *DebugCategory, level DebugLevel, file string, function string, line int, id string, messageString string) { +func DebugLogIDLiteral(category *DebugCategory, level DebugLevel, file string, function string, line int32, id string, messageString string) { var carg1 *C.GstDebugCategory // in, none, converted var carg2 C.GstDebugLevel // in, none, casted var carg3 *C.gchar // in, none, string @@ -8274,13 +8553,13 @@ func DebugLogIDLiteral(category *DebugCategory, level DebugLevel, file string, f // - level DebugLevel: level of the message is in // - file string: the file that emitted the message, usually the __FILE__ identifier // - function string: the function that emitted the message -// - line int: the line from that the message was emitted, usually __LINE__ +// - line int32: the line from that the message was emitted, usually __LINE__ // - object gobject.Object (nullable): the object this message relates to, // or %NULL if none // - messageString string: a message string // // Logs the given message using the currently registered debugging handlers. -func DebugLogLiteral(category *DebugCategory, level DebugLevel, file string, function string, line int, object gobject.Object, messageString string) { +func DebugLogLiteral(category *DebugCategory, level DebugLevel, file string, function string, line int32, object gobject.Object, messageString string) { var carg1 *C.GstDebugCategory // in, none, converted var carg2 C.GstDebugLevel // in, none, casted var carg3 *C.gchar // in, none, string @@ -8312,6 +8591,39 @@ func DebugLogLiteral(category *DebugCategory, level DebugLevel, file string, fun runtime.KeepAlive(messageString) } +// DebugPrintSegment wraps gst_debug_print_segment +// +// The function takes the following parameters: +// +// - segment *Segment (nullable): the %GstSegment +// +// The function returns the following values: +// +// - goret string +// +// Returns a string that represents @segments. +// +// The string representation is meant to be used for debugging purposes and +// might change between GStreamer versions. +func DebugPrintSegment(segment *Segment) string { + var carg1 *C.GstSegment // in, none, converted, nullable + var cret *C.gchar // return, full, string + + if segment != nil { + carg1 = (*C.GstSegment)(UnsafeSegmentToGlibNone(segment)) + } + + cret = C.gst_debug_print_segment(carg1) + runtime.KeepAlive(segment) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + + return goret +} + // DebugPrintStackTrace wraps gst_debug_print_stack_trace // // If libunwind, glibc backtrace or DbgHelp are present @@ -8574,14 +8886,14 @@ func DynamicTypeRegister(plugin Plugin, typ gobject.Type) bool { // The function takes the following parameters: // // - domain glib.Quark: the GStreamer error domain this error belongs to. -// - code int: the error code belonging to the domain. +// - code int32: the error code belonging to the domain. // // The function returns the following values: // // - goret string // // Get a string describing the error message in the current locale. -func ErrorGetMessage(domain glib.Quark, code int) string { +func ErrorGetMessage(domain glib.Quark, code int32) string { var carg1 C.GQuark // in, none, casted, alias var carg2 C.gint // in, none, casted var cret *C.gchar // return, full, string @@ -8759,37 +9071,6 @@ func GetMainExecutablePath() string { return goret } -// IsCapsFeatures wraps gst_is_caps_features -// -// The function takes the following parameters: -// -// - obj unsafe.Pointer (nullable) -// -// The function returns the following values: -// -// - goret bool -// -// Checks if @obj is a #GstCapsFeatures -func IsCapsFeatures(obj unsafe.Pointer) bool { - var carg1 C.gconstpointer // in, none, casted, nullable - var cret C.gboolean // return - - if obj != nil { - carg1 = C.gconstpointer(obj) - } - - cret = C.gst_is_caps_features(carg1) - runtime.KeepAlive(obj) - - var goret bool - - if cret != 0 { - goret = true - } - - return goret -} - // IsInitialized wraps gst_is_initialized // // The function returns the following values: @@ -8868,12 +9149,12 @@ func ParamSpecArray(name string, nick string, blurb string, elementSpec *gobject // - name string: canonical name of the property specified // - nick string: nick name for the property specified // - blurb string: description of the property specified -// - minNum int: minimum value (fraction numerator) -// - minDenom int: minimum value (fraction denominator) -// - maxNum int: maximum value (fraction numerator) -// - maxDenom int: maximum value (fraction denominator) -// - defaultNum int: default value (fraction numerator) -// - defaultDenom int: default value (fraction denominator) +// - minNum int32: minimum value (fraction numerator) +// - minDenom int32: minimum value (fraction denominator) +// - maxNum int32: maximum value (fraction numerator) +// - maxDenom int32: maximum value (fraction denominator) +// - defaultNum int32: default value (fraction numerator) +// - defaultDenom int32: default value (fraction denominator) // - flags gobject.ParamFlags: flags for the property specified // // The function returns the following values: @@ -8884,7 +9165,7 @@ func ParamSpecArray(name string, nick string, blurb string, elementSpec *gobject // that want to expose properties of fraction type. This function is typically // used in connection with g_object_class_install_property() in a GObjects's // instance_init function. -func ParamSpecFraction(name string, nick string, blurb string, minNum int, minDenom int, maxNum int, maxDenom int, defaultNum int, defaultDenom int, flags gobject.ParamFlags) *gobject.ParamSpec { +func ParamSpecFraction(name string, nick string, blurb string, minNum int32, minDenom int32, maxNum int32, maxDenom int32, defaultNum int32, defaultDenom int32, flags gobject.ParamFlags) *gobject.ParamSpec { var carg1 *C.gchar // in, none, string var carg2 *C.gchar // in, none, string var carg3 *C.gchar // in, none, string @@ -9695,12 +9976,12 @@ func UtilCeilLog2(v uint32) uint { // // The function returns the following values: // -// - destN int: pointer to a #gint to hold the result numerator -// - destD int: pointer to a #gint to hold the result denominator +// - destN int32: pointer to a #gint to hold the result numerator +// - destD int32: pointer to a #gint to hold the result denominator // // Transforms a #gdouble to a fraction and simplifies // the result. -func UtilDoubleToFraction(src float64) (int, int) { +func UtilDoubleToFraction(src float64) (int32, int32) { var carg1 C.gdouble // in, none, casted var carg2 C.gint // out, full, casted var carg3 C.gint // out, full, casted @@ -9710,11 +9991,11 @@ func UtilDoubleToFraction(src float64) (int, int) { C.gst_util_double_to_fraction(carg1, &carg2, &carg3) runtime.KeepAlive(src) - var destN int - var destD int + var destN int32 + var destD int32 - destN = int(carg2) - destD = int(carg3) + destN = int32(carg2) + destD = int32(carg3) return destN, destD } @@ -9764,10 +10045,10 @@ func UtilDumpMem(mem []byte) { // // The function returns the following values: // -// - goret int +// - goret int32 // // Compares the given filenames using natural ordering. -func UtilFilenameCompare(a string, b string) int { +func UtilFilenameCompare(a string, b string) int32 { var carg1 *C.gchar // in, none, string var carg2 *C.gchar // in, none, string var cret C.gint // return, none, casted @@ -9781,9 +10062,36 @@ func UtilFilenameCompare(a string, b string) int { runtime.KeepAlive(a) runtime.KeepAlive(b) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) + + return goret +} + +// UtilFloorLog2 wraps gst_util_floor_log2 +// +// The function takes the following parameters: +// +// - v uint32: a #guint32 value. +// +// The function returns the following values: +// +// - goret uint +// +// Returns smallest integral value not bigger than log2(v). +func UtilFloorLog2(v uint32) uint { + var carg1 C.guint32 // in, none, casted + var cret C.guint // return, none, casted + + carg1 = C.guint32(v) + + cret = C.gst_util_floor_log2(carg1) + runtime.KeepAlive(v) + + var goret uint + + goret = uint(cret) return goret } @@ -9792,20 +10100,20 @@ func UtilFilenameCompare(a string, b string) int { // // The function takes the following parameters: // -// - aN int: Numerator of first value -// - aD int: Denominator of first value -// - bN int: Numerator of second value -// - bD int: Denominator of second value +// - aN int32: Numerator of first value +// - aD int32: Denominator of first value +// - bN int32: Numerator of second value +// - bD int32: Denominator of second value // // The function returns the following values: // -// - resN int: Pointer to #gint to hold the result numerator -// - resD int: Pointer to #gint to hold the result denominator +// - resN int32: Pointer to #gint to hold the result numerator +// - resD int32: Pointer to #gint to hold the result denominator // - goret bool // // Adds the fractions @a_n/@a_d and @b_n/@b_d and stores // the result in @res_n and @res_d. -func UtilFractionAdd(aN int, aD int, bN int, bD int) (int, int, bool) { +func UtilFractionAdd(aN int32, aD int32, bN int32, bD int32) (int32, int32, bool) { var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted @@ -9825,12 +10133,12 @@ func UtilFractionAdd(aN int, aD int, bN int, bD int) (int, int, bool) { runtime.KeepAlive(bN) runtime.KeepAlive(bD) - var resN int - var resD int + var resN int32 + var resD int32 var goret bool - resN = int(carg5) - resD = int(carg6) + resN = int32(carg5) + resD = int32(carg6) if cret != 0 { goret = true } @@ -9842,18 +10150,18 @@ func UtilFractionAdd(aN int, aD int, bN int, bD int) (int, int, bool) { // // The function takes the following parameters: // -// - aN int: Numerator of first value -// - aD int: Denominator of first value -// - bN int: Numerator of second value -// - bD int: Denominator of second value +// - aN int32: Numerator of first value +// - aD int32: Denominator of first value +// - bN int32: Numerator of second value +// - bD int32: Denominator of second value // // The function returns the following values: // -// - goret int +// - goret int32 // // Compares the fractions @a_n/@a_d and @b_n/@b_d and returns // -1 if a < b, 0 if a = b and 1 if a > b. -func UtilFractionCompare(aN int, aD int, bN int, bD int) int { +func UtilFractionCompare(aN int32, aD int32, bN int32, bD int32) int32 { var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted @@ -9871,9 +10179,9 @@ func UtilFractionCompare(aN int, aD int, bN int, bD int) int { runtime.KeepAlive(bN) runtime.KeepAlive(bD) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -9882,20 +10190,20 @@ func UtilFractionCompare(aN int, aD int, bN int, bD int) int { // // The function takes the following parameters: // -// - aN int: Numerator of first value -// - aD int: Denominator of first value -// - bN int: Numerator of second value -// - bD int: Denominator of second value +// - aN int32: Numerator of first value +// - aD int32: Denominator of first value +// - bN int32: Numerator of second value +// - bD int32: Denominator of second value // // The function returns the following values: // -// - resN int: Pointer to #gint to hold the result numerator -// - resD int: Pointer to #gint to hold the result denominator +// - resN int32: Pointer to #gint to hold the result numerator +// - resD int32: Pointer to #gint to hold the result denominator // - goret bool // // Multiplies the fractions @a_n/@a_d and @b_n/@b_d and stores // the result in @res_n and @res_d. -func UtilFractionMultiply(aN int, aD int, bN int, bD int) (int, int, bool) { +func UtilFractionMultiply(aN int32, aD int32, bN int32, bD int32) (int32, int32, bool) { var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted @@ -9915,12 +10223,62 @@ func UtilFractionMultiply(aN int, aD int, bN int, bD int) (int, int, bool) { runtime.KeepAlive(bN) runtime.KeepAlive(bD) - var resN int - var resD int + var resN int32 + var resD int32 var goret bool - resN = int(carg5) - resD = int(carg6) + resN = int32(carg5) + resD = int32(carg6) + if cret != 0 { + goret = true + } + + return resN, resD, goret +} + +// UtilFractionMultiplyInt64 wraps gst_util_fraction_multiply_int64 +// +// The function takes the following parameters: +// +// - aN int64: Numerator of first value +// - aD int64: Denominator of first value +// - bN int64: Numerator of second value +// - bD int64: Denominator of second value +// +// The function returns the following values: +// +// - resN int64: Pointer to #gint to hold the result numerator +// - resD int64: Pointer to #gint to hold the result denominator +// - goret bool +// +// Multiplies the fractions @a_n/@a_d and @b_n/@b_d and stores +// the result in @res_n and @res_d. +func UtilFractionMultiplyInt64(aN int64, aD int64, bN int64, bD int64) (int64, int64, bool) { + var carg1 C.gint64 // in, none, casted + var carg2 C.gint64 // in, none, casted + var carg3 C.gint64 // in, none, casted + var carg4 C.gint64 // in, none, casted + var carg5 C.gint64 // out, full, casted + var carg6 C.gint64 // out, full, casted + var cret C.gboolean // return + + carg1 = C.gint64(aN) + carg2 = C.gint64(aD) + carg3 = C.gint64(bN) + carg4 = C.gint64(bD) + + cret = C.gst_util_fraction_multiply_int64(carg1, carg2, carg3, carg4, &carg5, &carg6) + runtime.KeepAlive(aN) + runtime.KeepAlive(aD) + runtime.KeepAlive(bN) + runtime.KeepAlive(bD) + + var resN int64 + var resD int64 + var goret bool + + resN = int64(carg5) + resD = int64(carg6) if cret != 0 { goret = true } @@ -9932,15 +10290,15 @@ func UtilFractionMultiply(aN int, aD int, bN int, bD int) (int, int, bool) { // // The function takes the following parameters: // -// - srcN int: Fraction numerator as #gint -// - srcD int: Fraction denominator #gint +// - srcN int32: Fraction numerator as #gint +// - srcD int32: Fraction denominator #gint // // The function returns the following values: // // - dest float64: pointer to a #gdouble for the result // // Transforms a fraction to a #gdouble. -func UtilFractionToDouble(srcN int, srcD int) float64 { +func UtilFractionToDouble(srcN int32, srcD int32) float64 { var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted var carg3 C.gdouble // out, full, casted @@ -10008,16 +10366,16 @@ func UtilGetTimestamp() ClockTime { // // The function takes the following parameters: // -// - a int: First value as #gint -// - b int: Second value as #gint +// - a int32: First value as #gint +// - b int32: Second value as #gint // // The function returns the following values: // -// - goret int +// - goret int32 // // Calculates the greatest common divisor of @a // and @b. -func UtilGreatestCommonDivisor(a int, b int) int { +func UtilGreatestCommonDivisor(a int32, b int32) int32 { var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted var cret C.gint // return, none, casted @@ -10029,9 +10387,9 @@ func UtilGreatestCommonDivisor(a int, b int) int { runtime.KeepAlive(a) runtime.KeepAlive(b) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -10210,8 +10568,8 @@ func UtilSetObjectArg(object gobject.Object, name string, value string) { // // The function takes the following parameters: // -// - numerator *int: First value as #gint -// - denominator *int: Second value as #gint +// - numerator *int32: First value as #gint +// - denominator *int32: Second value as #gint // - nTerms uint: non-significative terms (typical value: 8) // - threshold uint: threshold (typical value: 333) // @@ -10224,7 +10582,7 @@ func UtilSetObjectArg(object gobject.Object, name string, value string) { // upon two arbitrary parameters to remove non-significative terms from // the simple continued fraction decomposition. Using 8 and 333 for // @n_terms and @threshold respectively seems to give nice results. -func UtilSimplifyFraction(numerator *int, denominator *int, nTerms uint, threshold uint) { +func UtilSimplifyFraction(numerator *int32, denominator *int32, nTerms uint, threshold uint) { var carg1 *C.gint // in, transfer: none, C Pointers: 1, Name: gint var carg2 *C.gint // in, transfer: none, C Pointers: 1, Name: gint var carg3 C.guint // in, none, casted @@ -10232,10 +10590,10 @@ func UtilSimplifyFraction(numerator *int, denominator *int, nTerms uint, thresho _ = numerator _ = carg1 - panic("unimplemented conversion of *int (gint*)") + panic("unimplemented conversion of *int32 (gint*)") _ = denominator _ = carg2 - panic("unimplemented conversion of *int (gint*)") + panic("unimplemented conversion of *int32 (gint*)") carg3 = C.guint(nTerms) carg4 = C.guint(threshold) @@ -10329,8 +10687,8 @@ func UtilUint64ScaleCeil(val uint64, num uint64, denom uint64) uint64 { // The function takes the following parameters: // // - val uint64: guint64 (such as a #GstClockTime) to scale. -// - num int: numerator of the scale factor. -// - denom int: denominator of the scale factor. +// - num int32: numerator of the scale factor. +// - denom int32: denominator of the scale factor. // // The function returns the following values: // @@ -10339,7 +10697,7 @@ func UtilUint64ScaleCeil(val uint64, num uint64, denom uint64) uint64 { // Scale @val by the rational number @num / @denom, avoiding overflows and // underflows and without loss of precision. @num must be non-negative and // @denom must be positive. -func UtilUint64ScaleInt(val uint64, num int, denom int) uint64 { +func UtilUint64ScaleInt(val uint64, num int32, denom int32) uint64 { var carg1 C.guint64 // in, none, casted var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted @@ -10366,8 +10724,8 @@ func UtilUint64ScaleInt(val uint64, num int, denom int) uint64 { // The function takes the following parameters: // // - val uint64: guint64 (such as a #GstClockTime) to scale. -// - num int: numerator of the scale factor. -// - denom int: denominator of the scale factor. +// - num int32: numerator of the scale factor. +// - denom int32: denominator of the scale factor. // // The function returns the following values: // @@ -10376,7 +10734,7 @@ func UtilUint64ScaleInt(val uint64, num int, denom int) uint64 { // Scale @val by the rational number @num / @denom, avoiding overflows and // underflows and without loss of precision. @num must be non-negative and // @denom must be positive. -func UtilUint64ScaleIntCeil(val uint64, num int, denom int) uint64 { +func UtilUint64ScaleIntCeil(val uint64, num int32, denom int32) uint64 { var carg1 C.guint64 // in, none, casted var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted @@ -10403,8 +10761,8 @@ func UtilUint64ScaleIntCeil(val uint64, num int, denom int) uint64 { // The function takes the following parameters: // // - val uint64: guint64 (such as a #GstClockTime) to scale. -// - num int: numerator of the scale factor. -// - denom int: denominator of the scale factor. +// - num int32: numerator of the scale factor. +// - denom int32: denominator of the scale factor. // // The function returns the following values: // @@ -10413,7 +10771,7 @@ func UtilUint64ScaleIntCeil(val uint64, num int, denom int) uint64 { // Scale @val by the rational number @num / @denom, avoiding overflows and // underflows and without loss of precision. @num must be non-negative and // @denom must be positive. -func UtilUint64ScaleIntRound(val uint64, num int, denom int) uint64 { +func UtilUint64ScaleIntRound(val uint64, num int32, denom int32) uint64 { var carg1 C.guint64 // in, none, casted var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted @@ -10623,14 +10981,14 @@ func ValueCanUnion(value1 *gobject.Value, value2 *gobject.Value) bool { // // The function returns the following values: // -// - goret int +// - goret int32 // // Compares @value1 and @value2. If @value1 and @value2 cannot be // compared, the function returns GST_VALUE_UNORDERED. Otherwise, // if @value1 is greater than @value2, GST_VALUE_GREATER_THAN is returned. // If @value1 is less than @value2, GST_VALUE_LESS_THAN is returned. // If the values are equal, GST_VALUE_EQUAL is returned. -func ValueCompare(value1 *gobject.Value, value2 *gobject.Value) int { +func ValueCompare(value1 *gobject.Value, value2 *gobject.Value) int32 { var carg1 *C.GValue // in, none, converted var carg2 *C.GValue // in, none, converted var cret C.gint // return, none, casted @@ -10642,9 +11000,9 @@ func ValueCompare(value1 *gobject.Value, value2 *gobject.Value) int { runtime.KeepAlive(value1) runtime.KeepAlive(value2) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -11042,10 +11400,10 @@ func ValueGetFlagsetMask(value *gobject.Value) uint { // // The function returns the following values: // -// - goret int +// - goret int32 // // Gets the denominator of the fraction specified by @value. -func ValueGetFractionDenominator(value *gobject.Value) int { +func ValueGetFractionDenominator(value *gobject.Value) int32 { var carg1 *C.GValue // in, none, converted var cret C.gint // return, none, casted @@ -11054,9 +11412,9 @@ func ValueGetFractionDenominator(value *gobject.Value) int { cret = C.gst_value_get_fraction_denominator(carg1) runtime.KeepAlive(value) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -11069,10 +11427,10 @@ func ValueGetFractionDenominator(value *gobject.Value) int { // // The function returns the following values: // -// - goret int +// - goret int32 // // Gets the numerator of the fraction specified by @value. -func ValueGetFractionNumerator(value *gobject.Value) int { +func ValueGetFractionNumerator(value *gobject.Value) int32 { var carg1 *C.GValue // in, none, converted var cret C.gint // return, none, casted @@ -11081,9 +11439,9 @@ func ValueGetFractionNumerator(value *gobject.Value) int { cret = C.gst_value_get_fraction_numerator(carg1) runtime.KeepAlive(value) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -11235,10 +11593,10 @@ func ValueGetInt64RangeStep(value *gobject.Value) int64 { // // The function returns the following values: // -// - goret int +// - goret int32 // // Gets the maximum of the range specified by @value. -func ValueGetIntRangeMax(value *gobject.Value) int { +func ValueGetIntRangeMax(value *gobject.Value) int32 { var carg1 *C.GValue // in, none, converted var cret C.gint // return, none, casted @@ -11247,9 +11605,9 @@ func ValueGetIntRangeMax(value *gobject.Value) int { cret = C.gst_value_get_int_range_max(carg1) runtime.KeepAlive(value) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -11262,10 +11620,10 @@ func ValueGetIntRangeMax(value *gobject.Value) int { // // The function returns the following values: // -// - goret int +// - goret int32 // // Gets the minimum of the range specified by @value. -func ValueGetIntRangeMin(value *gobject.Value) int { +func ValueGetIntRangeMin(value *gobject.Value) int32 { var carg1 *C.GValue // in, none, converted var cret C.gint // return, none, casted @@ -11274,9 +11632,9 @@ func ValueGetIntRangeMin(value *gobject.Value) int { cret = C.gst_value_get_int_range_min(carg1) runtime.KeepAlive(value) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -11289,10 +11647,10 @@ func ValueGetIntRangeMin(value *gobject.Value) int { // // The function returns the following values: // -// - goret int +// - goret int32 // // Gets the step of the range specified by @value. -func ValueGetIntRangeStep(value *gobject.Value) int { +func ValueGetIntRangeStep(value *gobject.Value) int32 { var carg1 *C.GValue // in, none, converted var cret C.gint // return, none, casted @@ -11301,9 +11659,9 @@ func ValueGetIntRangeStep(value *gobject.Value) int { cret = C.gst_value_get_int_range_step(carg1) runtime.KeepAlive(value) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -11641,13 +11999,13 @@ func ValueSetFlagset(value *gobject.Value, flags uint, mask uint) { // The function takes the following parameters: // // - value *gobject.Value: a GValue initialized to #GST_TYPE_FRACTION -// - numerator int: the numerator of the fraction -// - denominator int: the denominator of the fraction +// - numerator int32: the numerator of the fraction +// - denominator int32: the denominator of the fraction // // Sets @value to the fraction specified by @numerator over @denominator. // The fraction gets reduced to the smallest numerator and denominator, // and if necessary the sign is moved to the numerator. -func ValueSetFraction(value *gobject.Value, numerator int, denominator int) { +func ValueSetFraction(value *gobject.Value, numerator int32, denominator int32) { var carg1 *C.GValue // in, none, converted var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted @@ -11691,14 +12049,14 @@ func ValueSetFractionRange(value *gobject.Value, start *gobject.Value, end *gobj // The function takes the following parameters: // // - value *gobject.Value: a GValue initialized to GST_TYPE_FRACTION_RANGE -// - numeratorStart int: the numerator start of the range -// - denominatorStart int: the denominator start of the range -// - numeratorEnd int: the numerator end of the range -// - denominatorEnd int: the denominator end of the range +// - numeratorStart int32: the numerator start of the range +// - denominatorStart int32: the denominator start of the range +// - numeratorEnd int32: the numerator end of the range +// - denominatorEnd int32: the denominator end of the range // // Sets @value to the range specified by @numerator_start/@denominator_start // and @numerator_end/@denominator_end. -func ValueSetFractionRangeFull(value *gobject.Value, numeratorStart int, denominatorStart int, numeratorEnd int, denominatorEnd int) { +func ValueSetFractionRangeFull(value *gobject.Value, numeratorStart int32, denominatorStart int32, numeratorEnd int32, denominatorEnd int32) { var carg1 *C.GValue // in, none, converted var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted @@ -11776,11 +12134,11 @@ func ValueSetInt64RangeStep(value *gobject.Value, start int64, end int64, step i // The function takes the following parameters: // // - value *gobject.Value: a GValue initialized to GST_TYPE_INT_RANGE -// - start int: the start of the range -// - end int: the end of the range +// - start int32: the start of the range +// - end int32: the end of the range // // Sets @value to the range specified by @start and @end. -func ValueSetIntRange(value *gobject.Value, start int, end int) { +func ValueSetIntRange(value *gobject.Value, start int32, end int32) { var carg1 *C.GValue // in, none, converted var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted @@ -11800,12 +12158,12 @@ func ValueSetIntRange(value *gobject.Value, start int, end int) { // The function takes the following parameters: // // - value *gobject.Value: a GValue initialized to GST_TYPE_INT_RANGE -// - start int: the start of the range -// - end int: the end of the range -// - step int: the step of the range +// - start int32: the start of the range +// - end int32: the end of the range +// - step int32: the step of the range // // Sets @value to the range specified by @start, @end and @step. -func ValueSetIntRangeStep(value *gobject.Value, start int, end int, step int) { +func ValueSetIntRangeStep(value *gobject.Value, start int32, end int32, step int32) { var carg1 *C.GValue // in, none, converted var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted @@ -12129,6 +12487,11 @@ func UnsafeChildProxyFromGlibFull(c unsafe.Pointer) ChildProxy { return gobject.UnsafeObjectFromGlibFull(c).(ChildProxy) } +// UnsafeChildProxyFromGlibBorrow is used to convert raw GstChildProxy pointers to go without touching any references. This is used by the bindings internally. +func UnsafeChildProxyFromGlibBorrow(c unsafe.Pointer) ChildProxy { + return gobject.UnsafeObjectFromGlibBorrow(c).(ChildProxy) +} + // UnsafeChildProxyToGlibNone is used to convert the instance to it's C value GstChildProxy. This is used by the bindings internally. func UnsafeChildProxyToGlibNone(c ChildProxy) unsafe.Pointer { i := c.upcastToGstChildProxy() @@ -12433,7 +12796,7 @@ func UnsafeApplyChildProxyOverrides[Instance ChildProxy](gclass unsafe.Pointer, var child gobject.Object // in, none, converted var name string // in, none, string - parent = UnsafeChildProxyFromGlibNone(unsafe.Pointer(carg0)).(Instance) + parent = UnsafeChildProxyFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) child = gobject.UnsafeObjectFromGlibNone(unsafe.Pointer(carg1)) name = C.GoString((*C.char)(unsafe.Pointer(carg2))) @@ -12452,7 +12815,7 @@ func UnsafeApplyChildProxyOverrides[Instance ChildProxy](gclass unsafe.Pointer, var child gobject.Object // in, none, converted var name string // in, none, string - parent = UnsafeChildProxyFromGlibNone(unsafe.Pointer(carg0)).(Instance) + parent = UnsafeChildProxyFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) child = gobject.UnsafeObjectFromGlibNone(unsafe.Pointer(carg1)) name = C.GoString((*C.char)(unsafe.Pointer(carg2))) @@ -12471,7 +12834,7 @@ func UnsafeApplyChildProxyOverrides[Instance ChildProxy](gclass unsafe.Pointer, var index uint // in, none, casted var goret gobject.Object // return, full, converted, nullable - parent = UnsafeChildProxyFromGlibNone(unsafe.Pointer(carg0)).(Instance) + parent = UnsafeChildProxyFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) index = uint(carg1) goret = overrides.GetChildByIndex(parent, index) @@ -12495,7 +12858,7 @@ func UnsafeApplyChildProxyOverrides[Instance ChildProxy](gclass unsafe.Pointer, var name string // in, none, string var goret gobject.Object // return, full, converted, nullable - parent = UnsafeChildProxyFromGlibNone(unsafe.Pointer(carg0)).(Instance) + parent = UnsafeChildProxyFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) name = C.GoString((*C.char)(unsafe.Pointer(carg1))) goret = overrides.GetChildByName(parent, name) @@ -12518,7 +12881,7 @@ func UnsafeApplyChildProxyOverrides[Instance ChildProxy](gclass unsafe.Pointer, var parent Instance // go GstChildProxy subclass var goret uint // return, none, casted - parent = UnsafeChildProxyFromGlibNone(unsafe.Pointer(carg0)).(Instance) + parent = UnsafeChildProxyFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GetChildrenCount(parent) @@ -12700,6 +13063,11 @@ func UnsafePresetFromGlibFull(c unsafe.Pointer) Preset { return gobject.UnsafeObjectFromGlibFull(c).(Preset) } +// UnsafePresetFromGlibBorrow is used to convert raw GstPreset pointers to go without touching any references. This is used by the bindings internally. +func UnsafePresetFromGlibBorrow(c unsafe.Pointer) Preset { + return gobject.UnsafeObjectFromGlibBorrow(c).(Preset) +} + // UnsafePresetToGlibNone is used to convert the instance to it's C value GstPreset. This is used by the bindings internally. func UnsafePresetToGlibNone(c Preset) unsafe.Pointer { i := c.upcastToGstPreset() @@ -13160,7 +13528,7 @@ func UnsafeApplyPresetOverrides[Instance Preset](gclass unsafe.Pointer, override var name string // in, none, string var goret bool // return - preset = UnsafePresetFromGlibNone(unsafe.Pointer(carg0)).(Instance) + preset = UnsafePresetFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) name = C.GoString((*C.char)(unsafe.Pointer(carg1))) goret = overrides.DeletePreset(preset, name) @@ -13186,7 +13554,7 @@ func UnsafeApplyPresetOverrides[Instance Preset](gclass unsafe.Pointer, override var value string // out, full, string var goret bool // return - preset = UnsafePresetFromGlibNone(unsafe.Pointer(carg0)).(Instance) + preset = UnsafePresetFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) name = C.GoString((*C.char)(unsafe.Pointer(carg1))) tag = C.GoString((*C.char)(unsafe.Pointer(carg2))) @@ -13211,7 +13579,7 @@ func UnsafeApplyPresetOverrides[Instance Preset](gclass unsafe.Pointer, override var preset Instance // go GstPreset subclass var goret []string // return, transfer: full, C Pointers: 2, Name: array[utf8], scope: , array (inner: *typesystem.StringPrimitive, zero-terminated) - preset = UnsafePresetFromGlibNone(unsafe.Pointer(carg0)).(Instance) + preset = UnsafePresetFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GetPresetNames(preset) @@ -13233,7 +13601,7 @@ func UnsafeApplyPresetOverrides[Instance Preset](gclass unsafe.Pointer, override var preset Instance // go GstPreset subclass var goret []string // return, transfer: full, C Pointers: 2, Name: array[utf8], scope: , array (inner: *typesystem.StringPrimitive, zero-terminated) - preset = UnsafePresetFromGlibNone(unsafe.Pointer(carg0)).(Instance) + preset = UnsafePresetFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GetPropertyNames(preset) @@ -13256,7 +13624,7 @@ func UnsafeApplyPresetOverrides[Instance Preset](gclass unsafe.Pointer, override var name string // in, none, string var goret bool // return - preset = UnsafePresetFromGlibNone(unsafe.Pointer(carg0)).(Instance) + preset = UnsafePresetFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) name = C.GoString((*C.char)(unsafe.Pointer(carg1))) goret = overrides.LoadPreset(preset, name) @@ -13281,7 +13649,7 @@ func UnsafeApplyPresetOverrides[Instance Preset](gclass unsafe.Pointer, override var newName string // in, none, string var goret bool // return - preset = UnsafePresetFromGlibNone(unsafe.Pointer(carg0)).(Instance) + preset = UnsafePresetFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) oldName = C.GoString((*C.char)(unsafe.Pointer(carg1))) newName = C.GoString((*C.char)(unsafe.Pointer(carg2))) @@ -13306,7 +13674,7 @@ func UnsafeApplyPresetOverrides[Instance Preset](gclass unsafe.Pointer, override var name string // in, none, string var goret bool // return - preset = UnsafePresetFromGlibNone(unsafe.Pointer(carg0)).(Instance) + preset = UnsafePresetFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) name = C.GoString((*C.char)(unsafe.Pointer(carg1))) goret = overrides.SavePreset(preset, name) @@ -13332,7 +13700,7 @@ func UnsafeApplyPresetOverrides[Instance Preset](gclass unsafe.Pointer, override var value string // in, none, string, nullable-string var goret bool // return - preset = UnsafePresetFromGlibNone(unsafe.Pointer(carg0)).(Instance) + preset = UnsafePresetFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) name = C.GoString((*C.char)(unsafe.Pointer(carg1))) tag = C.GoString((*C.char)(unsafe.Pointer(carg2))) if carg3 != nil { @@ -13438,6 +13806,11 @@ func UnsafeURIHandlerFromGlibFull(c unsafe.Pointer) URIHandler { return gobject.UnsafeObjectFromGlibFull(c).(URIHandler) } +// UnsafeURIHandlerFromGlibBorrow is used to convert raw GstURIHandler pointers to go without touching any references. This is used by the bindings internally. +func UnsafeURIHandlerFromGlibBorrow(c unsafe.Pointer) URIHandler { + return gobject.UnsafeObjectFromGlibBorrow(c).(URIHandler) +} + // UnsafeURIHandlerToGlibNone is used to convert the instance to it's C value GstURIHandler. This is used by the bindings internally. func UnsafeURIHandlerToGlibNone(c URIHandler) unsafe.Pointer { i := c.upcastToGstURIHandler() @@ -13598,7 +13971,7 @@ func UnsafeApplyURIHandlerOverrides[Instance URIHandler](gclass unsafe.Pointer, var handler Instance // go GstURIHandler subclass var goret string // return, full, string, nullable-string - handler = UnsafeURIHandlerFromGlibNone(unsafe.Pointer(carg0)).(Instance) + handler = UnsafeURIHandlerFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GetURI(handler) @@ -13622,7 +13995,7 @@ func UnsafeApplyURIHandlerOverrides[Instance URIHandler](gclass unsafe.Pointer, var goret bool // return var _goerr error // out, full, converted - handler = UnsafeURIHandlerFromGlibNone(unsafe.Pointer(carg0)).(Instance) + handler = UnsafeURIHandlerFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) uri = C.GoString((*C.char)(unsafe.Pointer(carg1))) goret, _goerr = overrides.SetURI(handler, uri) @@ -13764,6 +14137,11 @@ func UnsafeTagSetterFromGlibFull(c unsafe.Pointer) TagSetter { return gobject.UnsafeObjectFromGlibFull(c).(TagSetter) } +// UnsafeTagSetterFromGlibBorrow is used to convert raw GstTagSetter pointers to go without touching any references. This is used by the bindings internally. +func UnsafeTagSetterFromGlibBorrow(c unsafe.Pointer) TagSetter { + return gobject.UnsafeObjectFromGlibBorrow(c).(TagSetter) +} + // UnsafeTagSetterToGlibNone is used to convert the instance to it's C value GstTagSetter. This is used by the bindings internally. func UnsafeTagSetterToGlibNone(c TagSetter) unsafe.Pointer { i := c.upcastToGstTagSetter() @@ -13973,6 +14351,11 @@ func UnsafeTocSetterFromGlibFull(c unsafe.Pointer) TocSetter { return gobject.UnsafeObjectFromGlibFull(c).(TocSetter) } +// UnsafeTocSetterFromGlibBorrow is used to convert raw GstTocSetter pointers to go without touching any references. This is used by the bindings internally. +func UnsafeTocSetterFromGlibBorrow(c unsafe.Pointer) TocSetter { + return gobject.UnsafeObjectFromGlibBorrow(c).(TocSetter) +} + // UnsafeTocSetterToGlibNone is used to convert the instance to it's C value GstTocSetter. This is used by the bindings internally. func UnsafeTocSetterToGlibNone(c TocSetter) unsafe.Pointer { i := c.upcastToGstTocSetter() @@ -14401,6 +14784,11 @@ func UnsafeObjectFromGlibFull(c unsafe.Pointer) Object { return gobject.UnsafeObjectFromGlibFull(c).(Object) } +// UnsafeObjectFromGlibBorrow is used to convert raw GstObject pointers to go without touching any references. This is used by the bindings internally. +func UnsafeObjectFromGlibBorrow(c unsafe.Pointer) Object { + return gobject.UnsafeObjectFromGlibBorrow(c).(Object) +} + func (o *ObjectInstance) upcastToGstObject() *ObjectInstance { return o } @@ -15092,7 +15480,7 @@ func UnsafeApplyObjectOverrides[Instance Object](gclass unsafe.Pointer, override var orig Object // in, none, converted var pspec *gobject.ParamSpec // in, none, converted - object = UnsafeObjectFromGlibNone(unsafe.Pointer(carg0)).(Instance) + object = UnsafeObjectFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) orig = UnsafeObjectFromGlibNone(unsafe.Pointer(carg1)) pspec = gobject.UnsafeParamSpecFromGlibNone(unsafe.Pointer(carg2)) @@ -15222,8 +15610,8 @@ type Pad interface { // The function takes the following parameters: // // - mask PadProbeType: the probe mask - // - callback PadProbeCallback: #GstPadProbeCallback that will be called with notifications of - // the pad state + // - callback PadProbeCallback: #GstPadProbeCallback that will be called with + // notifications of the pad state // // The function returns the following values: // @@ -16148,7 +16536,10 @@ type Pad interface { // // - offset int64: the offset // - // Set the offset that will be applied to the running time of @pad. + // Set the offset that will be applied to the running time of @pad. Upon next + // buffer, every sticky events (notably segment) will be pushed again with + // their running time adjusted. For that reason this is only reliable on + // source pads. SetOffset(int64) // StartTask wraps gst_pad_start_task // @@ -16250,6 +16641,11 @@ func UnsafePadFromGlibFull(c unsafe.Pointer) Pad { return gobject.UnsafeObjectFromGlibFull(c).(Pad) } +// UnsafePadFromGlibBorrow is used to convert raw GstPad pointers to go without touching any references. This is used by the bindings internally. +func UnsafePadFromGlibBorrow(c unsafe.Pointer) Pad { + return gobject.UnsafeObjectFromGlibBorrow(c).(Pad) +} + func (p *PadInstance) upcastToGstPad() *PadInstance { return p } @@ -16446,8 +16842,8 @@ func (pad *PadInstance) ActivateMode(mode PadMode, active bool) bool { // The function takes the following parameters: // // - mask PadProbeType: the probe mask -// - callback PadProbeCallback: #GstPadProbeCallback that will be called with notifications of -// the pad state +// - callback PadProbeCallback: #GstPadProbeCallback that will be called with +// notifications of the pad state // // The function returns the following values: // @@ -18518,7 +18914,10 @@ func (pad *PadInstance) SetActive(active bool) bool { // // - offset int64: the offset // -// Set the offset that will be applied to the running time of @pad. +// Set the offset that will be applied to the running time of @pad. Upon next +// buffer, every sticky events (notably segment) will be pushed again with +// their running time adjusted. For that reason this is only reliable on +// source pads. func (pad *PadInstance) SetOffset(offset int64) { var carg0 *C.GstPad // in, none, converted var carg1 C.gint64 // in, none, casted @@ -18732,7 +19131,7 @@ func UnsafeApplyPadOverrides[Instance Pad](gclass unsafe.Pointer, overrides PadO var pad Instance // go GstPad subclass var peer Pad // in, none, converted - pad = UnsafePadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pad = UnsafePadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) peer = UnsafePadFromGlibNone(unsafe.Pointer(carg1)) overrides.Linked(pad, peer) @@ -18749,7 +19148,7 @@ func UnsafeApplyPadOverrides[Instance Pad](gclass unsafe.Pointer, overrides PadO var pad Instance // go GstPad subclass var peer Pad // in, none, converted - pad = UnsafePadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pad = UnsafePadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) peer = UnsafePadFromGlibNone(unsafe.Pointer(carg1)) overrides.Unlinked(pad, peer) @@ -18923,6 +19322,11 @@ func UnsafePadTemplateFromGlibFull(c unsafe.Pointer) PadTemplate { return gobject.UnsafeObjectFromGlibFull(c).(PadTemplate) } +// UnsafePadTemplateFromGlibBorrow is used to convert raw GstPadTemplate pointers to go without touching any references. This is used by the bindings internally. +func UnsafePadTemplateFromGlibBorrow(c unsafe.Pointer) PadTemplate { + return gobject.UnsafeObjectFromGlibBorrow(c).(PadTemplate) +} + func (p *PadTemplateInstance) upcastToGstPadTemplate() *PadTemplateInstance { return p } @@ -19183,7 +19587,7 @@ func UnsafeApplyPadTemplateOverrides[Instance PadTemplate](gclass unsafe.Pointer var templ Instance // go GstPadTemplate subclass var pad Pad // in, none, converted - templ = UnsafePadTemplateFromGlibNone(unsafe.Pointer(carg0)).(Instance) + templ = UnsafePadTemplateFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) pad = UnsafePadFromGlibNone(unsafe.Pointer(carg1)) overrides.PadCreated(templ, pad) @@ -19493,6 +19897,11 @@ func UnsafePluginFromGlibFull(c unsafe.Pointer) Plugin { return gobject.UnsafeObjectFromGlibFull(c).(Plugin) } +// UnsafePluginFromGlibBorrow is used to convert raw GstPlugin pointers to go without touching any references. This is used by the bindings internally. +func UnsafePluginFromGlibBorrow(c unsafe.Pointer) Plugin { + return gobject.UnsafeObjectFromGlibBorrow(c).(Plugin) +} + func (p *PluginInstance) upcastToGstPlugin() *PluginInstance { return p } @@ -19575,9 +19984,9 @@ func PluginLoadFile(filename string) (Plugin, error) { // // The function takes the following parameters: // -// - majorVersion int: the major version number of the GStreamer core that the +// - majorVersion int32: the major version number of the GStreamer core that the // plugin was compiled for, you can just use GST_VERSION_MAJOR here -// - minorVersion int: the minor version number of the GStreamer core that the +// - minorVersion int32: the minor version number of the GStreamer core that the // plugin was compiled for, you can just use GST_VERSION_MINOR here // - name string: a unique name of the plugin (ideally prefixed with an application- or // library-specific namespace prefix in order to avoid name conflicts in @@ -19604,7 +20013,7 @@ func PluginLoadFile(filename string) (Plugin, error) { // // You must make sure that GStreamer has been initialised (with gst_init() or // via gst_init_get_option_group()) before calling this function. -func PluginRegisterStaticFull(majorVersion int, minorVersion int, name string, description string, initFullFunc PluginInitFullFunc, version string, license string, source string, pkg string, origin string) bool { +func PluginRegisterStaticFull(majorVersion int32, minorVersion int32, name string, description string, initFullFunc PluginInitFullFunc, version string, license string, source string, pkg string, origin string) bool { var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted var carg3 *C.gchar // in, none, string @@ -20331,6 +20740,11 @@ func UnsafePluginFeatureFromGlibFull(c unsafe.Pointer) PluginFeature { return gobject.UnsafeObjectFromGlibFull(c).(PluginFeature) } +// UnsafePluginFeatureFromGlibBorrow is used to convert raw GstPluginFeature pointers to go without touching any references. This is used by the bindings internally. +func UnsafePluginFeatureFromGlibBorrow(c unsafe.Pointer) PluginFeature { + return gobject.UnsafeObjectFromGlibBorrow(c).(PluginFeature) +} + func (p *PluginFeatureInstance) upcastToGstPluginFeature() *PluginFeatureInstance { return p } @@ -20345,42 +20759,6 @@ func UnsafePluginFeatureToGlibFull(c PluginFeature) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } -// PluginFeatureRankCompareFunc wraps gst_plugin_feature_rank_compare_func -// -// The function takes the following parameters: -// -// - p1 unsafe.Pointer (nullable): a #GstPluginFeature -// - p2 unsafe.Pointer (nullable): a #GstPluginFeature -// -// The function returns the following values: -// -// - goret int -// -// Compares the two given #GstPluginFeature instances. This function can be -// used as a #GCompareFunc when sorting by rank and then by name. -func PluginFeatureRankCompareFunc(p1 unsafe.Pointer, p2 unsafe.Pointer) int { - var carg1 C.gconstpointer // in, none, casted, nullable - var carg2 C.gconstpointer // in, none, casted, nullable - var cret C.gint // return, none, casted - - if p1 != nil { - carg1 = C.gconstpointer(p1) - } - if p2 != nil { - carg2 = C.gconstpointer(p2) - } - - cret = C.gst_plugin_feature_rank_compare_func(carg1, carg2) - runtime.KeepAlive(p1) - runtime.KeepAlive(p2) - - var goret int - - goret = int(cret) - - return goret -} - // CheckVersion wraps gst_plugin_feature_check_version // // The function takes the following parameters: @@ -20608,6 +20986,11 @@ func UnsafeProxyPadFromGlibFull(c unsafe.Pointer) ProxyPad { return gobject.UnsafeObjectFromGlibFull(c).(ProxyPad) } +// UnsafeProxyPadFromGlibBorrow is used to convert raw GstProxyPad pointers to go without touching any references. This is used by the bindings internally. +func UnsafeProxyPadFromGlibBorrow(c unsafe.Pointer) ProxyPad { + return gobject.UnsafeObjectFromGlibBorrow(c).(ProxyPad) +} + func (p *ProxyPadInstance) upcastToGstProxyPad() *ProxyPadInstance { return p } @@ -21159,6 +21542,11 @@ func UnsafeRegistryFromGlibFull(c unsafe.Pointer) Registry { return gobject.UnsafeObjectFromGlibFull(c).(Registry) } +// UnsafeRegistryFromGlibBorrow is used to convert raw GstRegistry pointers to go without touching any references. This is used by the bindings internally. +func UnsafeRegistryFromGlibBorrow(c unsafe.Pointer) Registry { + return gobject.UnsafeObjectFromGlibBorrow(c).(Registry) +} + func (r *RegistryInstance) upcastToGstRegistry() *RegistryInstance { return r } @@ -21980,6 +22368,11 @@ func UnsafeStreamFromGlibFull(c unsafe.Pointer) Stream { return gobject.UnsafeObjectFromGlibFull(c).(Stream) } +// UnsafeStreamFromGlibBorrow is used to convert raw GstStream pointers to go without touching any references. This is used by the bindings internally. +func UnsafeStreamFromGlibBorrow(c unsafe.Pointer) Stream { + return gobject.UnsafeObjectFromGlibBorrow(c).(Stream) +} + func (s *StreamInstance) upcastToGstStream() *StreamInstance { return s } @@ -22384,6 +22777,11 @@ func UnsafeStreamCollectionFromGlibFull(c unsafe.Pointer) StreamCollection { return gobject.UnsafeObjectFromGlibFull(c).(StreamCollection) } +// UnsafeStreamCollectionFromGlibBorrow is used to convert raw GstStreamCollection pointers to go without touching any references. This is used by the bindings internally. +func UnsafeStreamCollectionFromGlibBorrow(c unsafe.Pointer) StreamCollection { + return gobject.UnsafeObjectFromGlibBorrow(c).(StreamCollection) +} + func (s *StreamCollectionInstance) upcastToGstStreamCollection() *StreamCollectionInstance { return s } @@ -22581,7 +22979,7 @@ func UnsafeApplyStreamCollectionOverrides[Instance StreamCollection](gclass unsa var stream Stream // in, none, converted var pspec *gobject.ParamSpec // in, none, converted - collection = UnsafeStreamCollectionFromGlibNone(unsafe.Pointer(carg0)).(Instance) + collection = UnsafeStreamCollectionFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) stream = UnsafeStreamFromGlibNone(unsafe.Pointer(carg1)) pspec = gobject.UnsafeParamSpecFromGlibNone(unsafe.Pointer(carg2)) @@ -22798,6 +23196,11 @@ func UnsafeTaskFromGlibFull(c unsafe.Pointer) Task { return gobject.UnsafeObjectFromGlibFull(c).(Task) } +// UnsafeTaskFromGlibBorrow is used to convert raw GstTask pointers to go without touching any references. This is used by the bindings internally. +func UnsafeTaskFromGlibBorrow(c unsafe.Pointer) Task { + return gobject.UnsafeObjectFromGlibBorrow(c).(Task) +} + func (t *TaskInstance) upcastToGstTask() *TaskInstance { return t } @@ -23215,6 +23618,11 @@ func UnsafeTaskPoolFromGlibFull(c unsafe.Pointer) TaskPool { return gobject.UnsafeObjectFromGlibFull(c).(TaskPool) } +// UnsafeTaskPoolFromGlibBorrow is used to convert raw GstTaskPool pointers to go without touching any references. This is used by the bindings internally. +func UnsafeTaskPoolFromGlibBorrow(c unsafe.Pointer) TaskPool { + return gobject.UnsafeObjectFromGlibBorrow(c).(TaskPool) +} + func (t *TaskPoolInstance) upcastToGstTaskPool() *TaskPoolInstance { return t } @@ -23321,7 +23729,7 @@ func UnsafeApplyTaskPoolOverrides[Instance TaskPool](gclass unsafe.Pointer, over func(carg0 *C.GstTaskPool) { var pool Instance // go GstTaskPool subclass - pool = UnsafeTaskPoolFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pool = UnsafeTaskPoolFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.Cleanup(pool) }, @@ -23337,7 +23745,7 @@ func UnsafeApplyTaskPoolOverrides[Instance TaskPool](gclass unsafe.Pointer, over var pool Instance // go GstTaskPool subclass var _goerr error // out, full, converted - pool = UnsafeTaskPoolFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pool = UnsafeTaskPoolFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) _goerr = overrides.Prepare(pool) @@ -23416,6 +23824,11 @@ func UnsafeTracerFromGlibFull(c unsafe.Pointer) Tracer { return gobject.UnsafeObjectFromGlibFull(c).(Tracer) } +// UnsafeTracerFromGlibBorrow is used to convert raw GstTracer pointers to go without touching any references. This is used by the bindings internally. +func UnsafeTracerFromGlibBorrow(c unsafe.Pointer) Tracer { + return gobject.UnsafeObjectFromGlibBorrow(c).(Tracer) +} + func (t *TracerInstance) upcastToGstTracer() *TracerInstance { return t } @@ -23565,6 +23978,11 @@ func UnsafeTracerFactoryFromGlibFull(c unsafe.Pointer) TracerFactory { return gobject.UnsafeObjectFromGlibFull(c).(TracerFactory) } +// UnsafeTracerFactoryFromGlibBorrow is used to convert raw GstTracerFactory pointers to go without touching any references. This is used by the bindings internally. +func UnsafeTracerFactoryFromGlibBorrow(c unsafe.Pointer) TracerFactory { + return gobject.UnsafeObjectFromGlibBorrow(c).(TracerFactory) +} + func (t *TracerFactoryInstance) upcastToGstTracerFactory() *TracerFactoryInstance { return t } @@ -23676,6 +24094,11 @@ func UnsafeTracerRecordFromGlibFull(c unsafe.Pointer) TracerRecord { return gobject.UnsafeObjectFromGlibFull(c).(TracerRecord) } +// UnsafeTracerRecordFromGlibBorrow is used to convert raw GstTracerRecord pointers to go without touching any references. This is used by the bindings internally. +func UnsafeTracerRecordFromGlibBorrow(c unsafe.Pointer) TracerRecord { + return gobject.UnsafeObjectFromGlibBorrow(c).(TracerRecord) +} + func (t *TracerRecordInstance) upcastToGstTracerRecord() *TracerRecordInstance { return t } @@ -23819,6 +24242,11 @@ func UnsafeTypeFindFactoryFromGlibFull(c unsafe.Pointer) TypeFindFactory { return gobject.UnsafeObjectFromGlibFull(c).(TypeFindFactory) } +// UnsafeTypeFindFactoryFromGlibBorrow is used to convert raw GstTypeFindFactory pointers to go without touching any references. This is used by the bindings internally. +func UnsafeTypeFindFactoryFromGlibBorrow(c unsafe.Pointer) TypeFindFactory { + return gobject.UnsafeObjectFromGlibBorrow(c).(TypeFindFactory) +} + func (t *TypeFindFactoryInstance) upcastToGstTypeFindFactory() *TypeFindFactoryInstance { return t } @@ -24055,6 +24483,11 @@ func UnsafeAllocatorFromGlibFull(c unsafe.Pointer) Allocator { return gobject.UnsafeObjectFromGlibFull(c).(Allocator) } +// UnsafeAllocatorFromGlibBorrow is used to convert raw GstAllocator pointers to go without touching any references. This is used by the bindings internally. +func UnsafeAllocatorFromGlibBorrow(c unsafe.Pointer) Allocator { + return gobject.UnsafeObjectFromGlibBorrow(c).(Allocator) +} + func (a *AllocatorInstance) upcastToGstAllocator() *AllocatorInstance { return a } @@ -24247,7 +24680,7 @@ func UnsafeApplyAllocatorOverrides[Instance Allocator](gclass unsafe.Pointer, ov var params *AllocationParams // in, none, converted, nullable var goret *Memory // return, full, converted, nullable - allocator = UnsafeAllocatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + allocator = UnsafeAllocatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) size = uint(carg1) if carg2 != nil { params = UnsafeAllocationParamsFromGlibNone(unsafe.Pointer(carg2)) @@ -24273,7 +24706,7 @@ func UnsafeApplyAllocatorOverrides[Instance Allocator](gclass unsafe.Pointer, ov var allocator Instance // go GstAllocator subclass var memory *Memory // in, full, converted - allocator = UnsafeAllocatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + allocator = UnsafeAllocatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) memory = UnsafeMemoryFromGlibFull(unsafe.Pointer(carg1)) overrides.Free(allocator, memory) @@ -24508,6 +24941,11 @@ func UnsafeBufferPoolFromGlibFull(c unsafe.Pointer) BufferPool { return gobject.UnsafeObjectFromGlibFull(c).(BufferPool) } +// UnsafeBufferPoolFromGlibBorrow is used to convert raw GstBufferPool pointers to go without touching any references. This is used by the bindings internally. +func UnsafeBufferPoolFromGlibBorrow(c unsafe.Pointer) BufferPool { + return gobject.UnsafeObjectFromGlibBorrow(c).(BufferPool) +} + func (b *BufferPoolInstance) upcastToGstBufferPool() *BufferPoolInstance { return b } @@ -25252,7 +25690,7 @@ func UnsafeApplyBufferPoolOverrides[Instance BufferPool](gclass unsafe.Pointer, var buffer *Buffer // out, full, converted var goret FlowReturn // return, none, casted - pool = UnsafeBufferPoolFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pool = UnsafeBufferPoolFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg2 != nil { params = UnsafeBufferPoolAcquireParamsFromGlibNone(unsafe.Pointer(carg2)) } @@ -25278,7 +25716,7 @@ func UnsafeApplyBufferPoolOverrides[Instance BufferPool](gclass unsafe.Pointer, var buffer *Buffer // out, full, converted var goret FlowReturn // return, none, casted - pool = UnsafeBufferPoolFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pool = UnsafeBufferPoolFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg2 != nil { params = UnsafeBufferPoolAcquireParamsFromGlibNone(unsafe.Pointer(carg2)) } @@ -25301,7 +25739,7 @@ func UnsafeApplyBufferPoolOverrides[Instance BufferPool](gclass unsafe.Pointer, func(carg0 *C.GstBufferPool) { var pool Instance // go GstBufferPool subclass - pool = UnsafeBufferPoolFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pool = UnsafeBufferPoolFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.FlushStart(pool) }, @@ -25316,7 +25754,7 @@ func UnsafeApplyBufferPoolOverrides[Instance BufferPool](gclass unsafe.Pointer, func(carg0 *C.GstBufferPool) { var pool Instance // go GstBufferPool subclass - pool = UnsafeBufferPoolFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pool = UnsafeBufferPoolFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.FlushStop(pool) }, @@ -25332,7 +25770,7 @@ func UnsafeApplyBufferPoolOverrides[Instance BufferPool](gclass unsafe.Pointer, var pool Instance // go GstBufferPool subclass var buffer *Buffer // in, none, converted - pool = UnsafeBufferPoolFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pool = UnsafeBufferPoolFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) buffer = UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) overrides.FreeBuffer(pool, buffer) @@ -25349,7 +25787,7 @@ func UnsafeApplyBufferPoolOverrides[Instance BufferPool](gclass unsafe.Pointer, var pool Instance // go GstBufferPool subclass var goret []string // return, transfer: none, C Pointers: 2, Name: array[utf8], scope: , array (inner: *typesystem.StringPrimitive, zero-terminated) - pool = UnsafeBufferPoolFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pool = UnsafeBufferPoolFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GetOptions(pool) @@ -25371,7 +25809,7 @@ func UnsafeApplyBufferPoolOverrides[Instance BufferPool](gclass unsafe.Pointer, var pool Instance // go GstBufferPool subclass var buffer *Buffer // in, full, converted - pool = UnsafeBufferPoolFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pool = UnsafeBufferPoolFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) buffer = UnsafeBufferFromGlibFull(unsafe.Pointer(carg1)) overrides.ReleaseBuffer(pool, buffer) @@ -25388,7 +25826,7 @@ func UnsafeApplyBufferPoolOverrides[Instance BufferPool](gclass unsafe.Pointer, var pool Instance // go GstBufferPool subclass var buffer *Buffer // in, none, converted - pool = UnsafeBufferPoolFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pool = UnsafeBufferPoolFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) buffer = UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) overrides.ResetBuffer(pool, buffer) @@ -25406,7 +25844,7 @@ func UnsafeApplyBufferPoolOverrides[Instance BufferPool](gclass unsafe.Pointer, var config *Structure // in, full, converted var goret bool // return - pool = UnsafeBufferPoolFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pool = UnsafeBufferPoolFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) config = UnsafeStructureFromGlibFull(unsafe.Pointer(carg1)) goret = overrides.SetConfig(pool, config) @@ -25429,7 +25867,7 @@ func UnsafeApplyBufferPoolOverrides[Instance BufferPool](gclass unsafe.Pointer, var pool Instance // go GstBufferPool subclass var goret bool // return - pool = UnsafeBufferPoolFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pool = UnsafeBufferPoolFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Start(pool) @@ -25451,7 +25889,7 @@ func UnsafeApplyBufferPoolOverrides[Instance BufferPool](gclass unsafe.Pointer, var pool Instance // go GstBufferPool subclass var goret bool // return - pool = UnsafeBufferPoolFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pool = UnsafeBufferPoolFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Stop(pool) @@ -25564,7 +26002,7 @@ type Bus interface { // // The function takes the following parameters: // - // - priority int: The priority of the watch. + // - priority int32: The priority of the watch. // // Adds a bus signal watch to the default main context with the given @priority // (e.g. %G_PRIORITY_DEFAULT). It is also possible to use a non-default main @@ -25581,12 +26019,12 @@ type Bus interface { // // There can only be a single bus watch per bus, you must remove any signal // watch before you can set another type of watch. - AddSignalWatchFull(int) + AddSignalWatchFull(int32) // AddWatchFull wraps gst_bus_add_watch_full // // The function takes the following parameters: // - // - priority int: The priority of the watch. + // - priority int32: The priority of the watch. // - fn BusFunc: A function to call when a message is received. // // The function returns the following values: @@ -25614,7 +26052,7 @@ type Bus interface { // // The bus watch will take its own reference to the @bus, so it is safe to unref // @bus using gst_object_unref() after setting the bus watch. - AddWatchFull(int, BusFunc) uint + AddWatchFull(int32, BusFunc) uint // CreateWatch wraps gst_bus_create_watch // // The function returns the following values: @@ -25888,6 +26326,11 @@ func UnsafeBusFromGlibFull(c unsafe.Pointer) Bus { return gobject.UnsafeObjectFromGlibFull(c).(Bus) } +// UnsafeBusFromGlibBorrow is used to convert raw GstBus pointers to go without touching any references. This is used by the bindings internally. +func UnsafeBusFromGlibBorrow(c unsafe.Pointer) Bus { + return gobject.UnsafeObjectFromGlibBorrow(c).(Bus) +} + func (b *BusInstance) upcastToGstBus() *BusInstance { return b } @@ -25948,7 +26391,7 @@ func (bus *BusInstance) AddSignalWatch() { // // The function takes the following parameters: // -// - priority int: The priority of the watch. +// - priority int32: The priority of the watch. // // Adds a bus signal watch to the default main context with the given @priority // (e.g. %G_PRIORITY_DEFAULT). It is also possible to use a non-default main @@ -25965,7 +26408,7 @@ func (bus *BusInstance) AddSignalWatch() { // // There can only be a single bus watch per bus, you must remove any signal // watch before you can set another type of watch. -func (bus *BusInstance) AddSignalWatchFull(priority int) { +func (bus *BusInstance) AddSignalWatchFull(priority int32) { var carg0 *C.GstBus // in, none, converted var carg1 C.gint // in, none, casted @@ -25981,7 +26424,7 @@ func (bus *BusInstance) AddSignalWatchFull(priority int) { // // The function takes the following parameters: // -// - priority int: The priority of the watch. +// - priority int32: The priority of the watch. // - fn BusFunc: A function to call when a message is received. // // The function returns the following values: @@ -26009,7 +26452,7 @@ func (bus *BusInstance) AddSignalWatchFull(priority int) { // // The bus watch will take its own reference to the @bus, so it is safe to unref // @bus using gst_object_unref() after setting the bus watch. -func (bus *BusInstance) AddWatchFull(priority int, fn BusFunc) uint { +func (bus *BusInstance) AddWatchFull(priority int32, fn BusFunc) uint { var carg0 *C.GstBus // in, none, converted var carg1 C.gint // in, none, casted var carg2 C.GstBusFunc // callback, scope: notified, closure: carg3, destroy: carg4 @@ -26584,7 +27027,7 @@ func UnsafeApplyBusOverrides[Instance Bus](gclass unsafe.Pointer, overrides BusO var bus Instance // go GstBus subclass var message *Message // in, none, converted - bus = UnsafeBusFromGlibNone(unsafe.Pointer(carg0)).(Instance) + bus = UnsafeBusFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) message = UnsafeMessageFromGlibNone(unsafe.Pointer(carg1)) overrides.Message(bus, message) @@ -26601,7 +27044,7 @@ func UnsafeApplyBusOverrides[Instance Bus](gclass unsafe.Pointer, overrides BusO var bus Instance // go GstBus subclass var message *Message // in, none, converted - bus = UnsafeBusFromGlibNone(unsafe.Pointer(carg0)).(Instance) + bus = UnsafeBusFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) message = UnsafeMessageFromGlibNone(unsafe.Pointer(carg1)) overrides.SyncMessage(bus, message) @@ -26726,18 +27169,18 @@ type Clock interface { // // The function takes the following parameters: // - // - slave ClockTime: a time on the slave - // - master ClockTime: a time on the master + // - observationInternal ClockTime: a time on the internal clock + // - observationExternal ClockTime: a time on the external clock // // The function returns the following values: // // - rSquared float64: a pointer to hold the result // - goret bool // - // The time @master of the master clock and the time @slave of the slave - // clock are added to the list of observations. If enough observations - // are available, a linear regression algorithm is run on the - // observations and @clock is recalibrated. + // The time @observation_external of the external or master clock and the time + // @observation_internal of the internal or slave clock are added to the list of + // observations. If enough observations are available, a linear regression + // algorithm is run on the observations and @clock is recalibrated. // // If this functions returns %TRUE, @r_squared will contain the // correlation coefficient of the interpolation. A value of 1.0 @@ -26749,8 +27192,8 @@ type Clock interface { // // The function takes the following parameters: // - // - slave ClockTime: a time on the slave - // - master ClockTime: a time on the master + // - observationInternal ClockTime: a time on the internal clock + // - observationExternal ClockTime: a time on the external clock // // The function returns the following values: // @@ -26762,8 +27205,8 @@ type Clock interface { // - goret bool // // Add a clock observation to the internal slaving algorithm the same as - // gst_clock_add_observation(), and return the result of the master clock - // estimation, without updating the internal calibration. + // gst_clock_add_observation(), and return the result of the external or master + // clock estimation, without updating the internal calibration. // // The caller can then take the results and call gst_clock_set_calibration() // with the values, or some modified version of them. @@ -27117,6 +27560,11 @@ func UnsafeClockFromGlibFull(c unsafe.Pointer) Clock { return gobject.UnsafeObjectFromGlibFull(c).(Clock) } +// UnsafeClockFromGlibBorrow is used to convert raw GstClock pointers to go without touching any references. This is used by the bindings internally. +func UnsafeClockFromGlibBorrow(c unsafe.Pointer) Clock { + return gobject.UnsafeObjectFromGlibBorrow(c).(Clock) +} + func (c *ClockInstance) upcastToGstClock() *ClockInstance { return c } @@ -27131,42 +27579,6 @@ func UnsafeClockToGlibFull(c Clock) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } -// ClockIDCompareFunc wraps gst_clock_id_compare_func -// -// The function takes the following parameters: -// -// - id1 unsafe.Pointer (nullable): A #GstClockID -// - id2 unsafe.Pointer (nullable): A #GstClockID to compare with -// -// The function returns the following values: -// -// - goret int -// -// Compares the two #GstClockID instances. This function can be used -// as a GCompareFunc when sorting ids. -func ClockIDCompareFunc(id1 unsafe.Pointer, id2 unsafe.Pointer) int { - var carg1 C.gconstpointer // in, none, casted, nullable - var carg2 C.gconstpointer // in, none, casted, nullable - var cret C.gint // return, none, casted - - if id1 != nil { - carg1 = C.gconstpointer(id1) - } - if id2 != nil { - carg2 = C.gconstpointer(id2) - } - - cret = C.gst_clock_id_compare_func(carg1, carg2) - runtime.KeepAlive(id1) - runtime.KeepAlive(id2) - - var goret int - - goret = int(cret) - - return goret -} - // ClockIDGetClock wraps gst_clock_id_get_clock // // The function takes the following parameters: @@ -27412,25 +27824,25 @@ func ClockIDWaitAsync(id ClockID, fn ClockCallback) ClockReturn { // // The function takes the following parameters: // -// - slave ClockTime: a time on the slave -// - master ClockTime: a time on the master +// - observationInternal ClockTime: a time on the internal clock +// - observationExternal ClockTime: a time on the external clock // // The function returns the following values: // // - rSquared float64: a pointer to hold the result // - goret bool // -// The time @master of the master clock and the time @slave of the slave -// clock are added to the list of observations. If enough observations -// are available, a linear regression algorithm is run on the -// observations and @clock is recalibrated. +// The time @observation_external of the external or master clock and the time +// @observation_internal of the internal or slave clock are added to the list of +// observations. If enough observations are available, a linear regression +// algorithm is run on the observations and @clock is recalibrated. // // If this functions returns %TRUE, @r_squared will contain the // correlation coefficient of the interpolation. A value of 1.0 // means a perfect regression was performed. This value can // be used to control the sampling frequency of the master and slave // clocks. -func (clock *ClockInstance) AddObservation(slave ClockTime, master ClockTime) (float64, bool) { +func (clock *ClockInstance) AddObservation(observationInternal ClockTime, observationExternal ClockTime) (float64, bool) { var carg0 *C.GstClock // in, none, converted var carg1 C.GstClockTime // in, none, casted, alias var carg2 C.GstClockTime // in, none, casted, alias @@ -27438,13 +27850,13 @@ func (clock *ClockInstance) AddObservation(slave ClockTime, master ClockTime) (f var cret C.gboolean // return carg0 = (*C.GstClock)(UnsafeClockToGlibNone(clock)) - carg1 = C.GstClockTime(slave) - carg2 = C.GstClockTime(master) + carg1 = C.GstClockTime(observationInternal) + carg2 = C.GstClockTime(observationExternal) cret = C.gst_clock_add_observation(carg0, carg1, carg2, &carg3) runtime.KeepAlive(clock) - runtime.KeepAlive(slave) - runtime.KeepAlive(master) + runtime.KeepAlive(observationInternal) + runtime.KeepAlive(observationExternal) var rSquared float64 var goret bool @@ -27461,8 +27873,8 @@ func (clock *ClockInstance) AddObservation(slave ClockTime, master ClockTime) (f // // The function takes the following parameters: // -// - slave ClockTime: a time on the slave -// - master ClockTime: a time on the master +// - observationInternal ClockTime: a time on the internal clock +// - observationExternal ClockTime: a time on the external clock // // The function returns the following values: // @@ -27474,12 +27886,12 @@ func (clock *ClockInstance) AddObservation(slave ClockTime, master ClockTime) (f // - goret bool // // Add a clock observation to the internal slaving algorithm the same as -// gst_clock_add_observation(), and return the result of the master clock -// estimation, without updating the internal calibration. +// gst_clock_add_observation(), and return the result of the external or master +// clock estimation, without updating the internal calibration. // // The caller can then take the results and call gst_clock_set_calibration() // with the values, or some modified version of them. -func (clock *ClockInstance) AddObservationUnapplied(slave ClockTime, master ClockTime) (float64, ClockTime, ClockTime, ClockTime, ClockTime, bool) { +func (clock *ClockInstance) AddObservationUnapplied(observationInternal ClockTime, observationExternal ClockTime) (float64, ClockTime, ClockTime, ClockTime, ClockTime, bool) { var carg0 *C.GstClock // in, none, converted var carg1 C.GstClockTime // in, none, casted, alias var carg2 C.GstClockTime // in, none, casted, alias @@ -27491,13 +27903,13 @@ func (clock *ClockInstance) AddObservationUnapplied(slave ClockTime, master Cloc var cret C.gboolean // return carg0 = (*C.GstClock)(UnsafeClockToGlibNone(clock)) - carg1 = C.GstClockTime(slave) - carg2 = C.GstClockTime(master) + carg1 = C.GstClockTime(observationInternal) + carg2 = C.GstClockTime(observationExternal) cret = C.gst_clock_add_observation_unapplied(carg0, carg1, carg2, &carg3, &carg4, &carg5, &carg6, &carg7) runtime.KeepAlive(clock) - runtime.KeepAlive(slave) - runtime.KeepAlive(master) + runtime.KeepAlive(observationInternal) + runtime.KeepAlive(observationExternal) var rSquared float64 var internal ClockTime @@ -28320,7 +28732,7 @@ func UnsafeApplyClockOverrides[Instance Clock](gclass unsafe.Pointer, overrides var newResolution ClockTime // in, none, casted, alias var goret ClockTime // return, none, casted, alias - clock = UnsafeClockFromGlibNone(unsafe.Pointer(carg0)).(Instance) + clock = UnsafeClockFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) oldResolution = ClockTime(carg1) newResolution = ClockTime(carg2) @@ -28342,7 +28754,7 @@ func UnsafeApplyClockOverrides[Instance Clock](gclass unsafe.Pointer, overrides var clock Instance // go GstClock subclass var goret ClockTime // return, none, casted, alias - clock = UnsafeClockFromGlibNone(unsafe.Pointer(carg0)).(Instance) + clock = UnsafeClockFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GetInternalTime(clock) @@ -28362,7 +28774,7 @@ func UnsafeApplyClockOverrides[Instance Clock](gclass unsafe.Pointer, overrides var clock Instance // go GstClock subclass var goret ClockTime // return, none, casted, alias - clock = UnsafeClockFromGlibNone(unsafe.Pointer(carg0)).(Instance) + clock = UnsafeClockFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GetResolution(clock) @@ -28382,7 +28794,7 @@ func UnsafeApplyClockOverrides[Instance Clock](gclass unsafe.Pointer, overrides var clock Instance // go GstClock subclass var entry *ClockEntry // in, none, converted - clock = UnsafeClockFromGlibNone(unsafe.Pointer(carg0)).(Instance) + clock = UnsafeClockFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) entry = UnsafeClockEntryFromGlibNone(unsafe.Pointer(carg1)) overrides.Unschedule(clock, entry) @@ -28401,7 +28813,7 @@ func UnsafeApplyClockOverrides[Instance Clock](gclass unsafe.Pointer, overrides var jitter ClockTimeDiff // out, full, casted, alias var goret ClockReturn // return, none, casted - clock = UnsafeClockFromGlibNone(unsafe.Pointer(carg0)).(Instance) + clock = UnsafeClockFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) entry = UnsafeClockEntryFromGlibNone(unsafe.Pointer(carg1)) jitter, goret = overrides.Wait(clock, entry) @@ -28424,7 +28836,7 @@ func UnsafeApplyClockOverrides[Instance Clock](gclass unsafe.Pointer, overrides var entry *ClockEntry // in, none, converted var goret ClockReturn // return, none, casted - clock = UnsafeClockFromGlibNone(unsafe.Pointer(carg0)).(Instance) + clock = UnsafeClockFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) entry = UnsafeClockEntryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.WaitAsync(clock, entry) @@ -28543,6 +28955,11 @@ func UnsafeControlBindingFromGlibFull(c unsafe.Pointer) ControlBinding { return gobject.UnsafeObjectFromGlibFull(c).(ControlBinding) } +// UnsafeControlBindingFromGlibBorrow is used to convert raw GstControlBinding pointers to go without touching any references. This is used by the bindings internally. +func UnsafeControlBindingFromGlibBorrow(c unsafe.Pointer) ControlBinding { + return gobject.UnsafeObjectFromGlibBorrow(c).(ControlBinding) +} + func (c *ControlBindingInstance) upcastToGstControlBinding() *ControlBindingInstance { return c } @@ -28687,7 +29104,7 @@ func UnsafeApplyControlBindingOverrides[Instance ControlBinding](gclass unsafe.P var lastSync ClockTime // in, none, casted, alias var goret bool // return - binding = UnsafeControlBindingFromGlibNone(unsafe.Pointer(carg0)).(Instance) + binding = UnsafeControlBindingFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) object = UnsafeObjectFromGlibNone(unsafe.Pointer(carg1)) timestamp = ClockTime(carg2) lastSync = ClockTime(carg3) @@ -28811,6 +29228,11 @@ func UnsafeControlSourceFromGlibFull(c unsafe.Pointer) ControlSource { return gobject.UnsafeObjectFromGlibFull(c).(ControlSource) } +// UnsafeControlSourceFromGlibBorrow is used to convert raw GstControlSource pointers to go without touching any references. This is used by the bindings internally. +func UnsafeControlSourceFromGlibBorrow(c unsafe.Pointer) ControlSource { + return gobject.UnsafeObjectFromGlibBorrow(c).(ControlSource) +} + func (c *ControlSourceInstance) upcastToGstControlSource() *ControlSourceInstance { return c } @@ -29085,6 +29507,11 @@ func UnsafeDeviceFromGlibFull(c unsafe.Pointer) Device { return gobject.UnsafeObjectFromGlibFull(c).(Device) } +// UnsafeDeviceFromGlibBorrow is used to convert raw GstDevice pointers to go without touching any references. This is used by the bindings internally. +func UnsafeDeviceFromGlibBorrow(c unsafe.Pointer) Device { + return gobject.UnsafeObjectFromGlibBorrow(c).(Device) +} + func (d *DeviceInstance) upcastToGstDevice() *DeviceInstance { return d } @@ -29391,7 +29818,7 @@ func UnsafeApplyDeviceOverrides[Instance Device](gclass unsafe.Pointer, override var name string // in, none, string, nullable-string var goret Element // return, none, converted, nullable - device = UnsafeDeviceFromGlibNone(unsafe.Pointer(carg0)).(Instance) + device = UnsafeDeviceFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != nil { name = C.GoString((*C.char)(unsafe.Pointer(carg1))) } @@ -29417,7 +29844,7 @@ func UnsafeApplyDeviceOverrides[Instance Device](gclass unsafe.Pointer, override var element Element // in, none, converted var goret bool // return - device = UnsafeDeviceFromGlibNone(unsafe.Pointer(carg0)).(Instance) + device = UnsafeDeviceFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) element = UnsafeElementFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.ReconfigureElement(device, element) @@ -29654,6 +30081,11 @@ func UnsafeDeviceMonitorFromGlibFull(c unsafe.Pointer) DeviceMonitor { return gobject.UnsafeObjectFromGlibFull(c).(DeviceMonitor) } +// UnsafeDeviceMonitorFromGlibBorrow is used to convert raw GstDeviceMonitor pointers to go without touching any references. This is used by the bindings internally. +func UnsafeDeviceMonitorFromGlibBorrow(c unsafe.Pointer) DeviceMonitor { + return gobject.UnsafeObjectFromGlibBorrow(c).(DeviceMonitor) +} + func (d *DeviceMonitorInstance) upcastToGstDeviceMonitor() *DeviceMonitorInstance { return d } @@ -30181,6 +30613,11 @@ func UnsafeDeviceProviderFromGlibFull(c unsafe.Pointer) DeviceProvider { return gobject.UnsafeObjectFromGlibFull(c).(DeviceProvider) } +// UnsafeDeviceProviderFromGlibBorrow is used to convert raw GstDeviceProvider pointers to go without touching any references. This is used by the bindings internally. +func UnsafeDeviceProviderFromGlibBorrow(c unsafe.Pointer) DeviceProvider { + return gobject.UnsafeObjectFromGlibBorrow(c).(DeviceProvider) +} + func (d *DeviceProviderInstance) upcastToGstDeviceProvider() *DeviceProviderInstance { return d } @@ -30642,7 +31079,7 @@ func UnsafeApplyDeviceProviderOverrides[Instance DeviceProvider](gclass unsafe.P var provider Instance // go GstDeviceProvider subclass var goret bool // return - provider = UnsafeDeviceProviderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + provider = UnsafeDeviceProviderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Start(provider) @@ -30663,7 +31100,7 @@ func UnsafeApplyDeviceProviderOverrides[Instance DeviceProvider](gclass unsafe.P func(carg0 *C.GstDeviceProvider) { var provider Instance // go GstDeviceProvider subclass - provider = UnsafeDeviceProviderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + provider = UnsafeDeviceProviderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.Stop(provider) }, @@ -30812,6 +31249,11 @@ func UnsafeDeviceProviderFactoryFromGlibFull(c unsafe.Pointer) DeviceProviderFac return gobject.UnsafeObjectFromGlibFull(c).(DeviceProviderFactory) } +// UnsafeDeviceProviderFactoryFromGlibBorrow is used to convert raw GstDeviceProviderFactory pointers to go without touching any references. This is used by the bindings internally. +func UnsafeDeviceProviderFactoryFromGlibBorrow(c unsafe.Pointer) DeviceProviderFactory { + return gobject.UnsafeObjectFromGlibBorrow(c).(DeviceProviderFactory) +} + func (d *DeviceProviderFactoryInstance) upcastToGstDeviceProviderFactory() *DeviceProviderFactoryInstance { return d } @@ -31163,6 +31605,11 @@ func UnsafeDynamicTypeFactoryFromGlibFull(c unsafe.Pointer) DynamicTypeFactory { return gobject.UnsafeObjectFromGlibFull(c).(DynamicTypeFactory) } +// UnsafeDynamicTypeFactoryFromGlibBorrow is used to convert raw GstDynamicTypeFactory pointers to go without touching any references. This is used by the bindings internally. +func UnsafeDynamicTypeFactoryFromGlibBorrow(c unsafe.Pointer) DynamicTypeFactory { + return gobject.UnsafeObjectFromGlibBorrow(c).(DynamicTypeFactory) +} + func (d *DynamicTypeFactoryInstance) upcastToGstDynamicTypeFactory() *DynamicTypeFactoryInstance { return d } @@ -31879,7 +32326,7 @@ type Element interface { // // - typ MessageType: the #GstMessageType // - domain glib.Quark: the GStreamer GError domain this message belongs to - // - code int: the GError code belonging to the domain + // - code int32: the GError code belonging to the domain // - text string (nullable): an allocated text string to be used // as a replacement for the default message connected to code, // or %NULL @@ -31888,7 +32335,7 @@ type Element interface { // or %NULL // - file string: the source code file where the error was generated // - function string: the source code function where the error was generated - // - line int: the source code line where the error was generated + // - line int32: the source code line where the error was generated // // Post an error, warning or info message on the bus from inside an element. // @@ -31896,14 +32343,14 @@ type Element interface { // #GST_MESSAGE_INFO. // // MT safe. - MessageFull(MessageType, glib.Quark, int, string, string, string, string, int) + MessageFull(MessageType, glib.Quark, int32, string, string, string, string, int32) // MessageFullWithDetails wraps gst_element_message_full_with_details // // The function takes the following parameters: // // - typ MessageType: the #GstMessageType // - domain glib.Quark: the GStreamer GError domain this message belongs to - // - code int: the GError code belonging to the domain + // - code int32: the GError code belonging to the domain // - text string (nullable): an allocated text string to be used // as a replacement for the default message connected to code, // or %NULL @@ -31912,14 +32359,14 @@ type Element interface { // or %NULL // - file string: the source code file where the error was generated // - function string: the source code function where the error was generated - // - line int: the source code line where the error was generated + // - line int32: the source code line where the error was generated // - structure *Structure: optional details structure // // Post an error, warning or info message on the bus from inside an element. // // @type must be of #GST_MESSAGE_ERROR, #GST_MESSAGE_WARNING or // #GST_MESSAGE_INFO. - MessageFullWithDetails(MessageType, glib.Quark, int, string, string, string, string, int, *Structure) + MessageFullWithDetails(MessageType, glib.Quark, int32, string, string, string, string, int32, *Structure) // NoMorePads wraps gst_element_no_more_pads // // Use this function to signal that the element does not expect any more pads @@ -32378,6 +32825,11 @@ func UnsafeElementFromGlibFull(c unsafe.Pointer) Element { return gobject.UnsafeObjectFromGlibFull(c).(Element) } +// UnsafeElementFromGlibBorrow is used to convert raw GstElement pointers to go without touching any references. This is used by the bindings internally. +func UnsafeElementFromGlibBorrow(c unsafe.Pointer) Element { + return gobject.UnsafeObjectFromGlibBorrow(c).(Element) +} + func (e *ElementInstance) upcastToGstElement() *ElementInstance { return e } @@ -33976,7 +34428,7 @@ func (element *ElementInstance) LostState() { // // - typ MessageType: the #GstMessageType // - domain glib.Quark: the GStreamer GError domain this message belongs to -// - code int: the GError code belonging to the domain +// - code int32: the GError code belonging to the domain // - text string (nullable): an allocated text string to be used // as a replacement for the default message connected to code, // or %NULL @@ -33985,7 +34437,7 @@ func (element *ElementInstance) LostState() { // or %NULL // - file string: the source code file where the error was generated // - function string: the source code function where the error was generated -// - line int: the source code line where the error was generated +// - line int32: the source code line where the error was generated // // Post an error, warning or info message on the bus from inside an element. // @@ -33993,7 +34445,7 @@ func (element *ElementInstance) LostState() { // #GST_MESSAGE_INFO. // // MT safe. -func (element *ElementInstance) MessageFull(typ MessageType, domain glib.Quark, code int, text string, debug string, file string, function string, line int) { +func (element *ElementInstance) MessageFull(typ MessageType, domain glib.Quark, code int32, text string, debug string, file string, function string, line int32) { var carg0 *C.GstElement // in, none, converted var carg1 C.GstMessageType // in, none, casted var carg2 C.GQuark // in, none, casted, alias @@ -34038,7 +34490,7 @@ func (element *ElementInstance) MessageFull(typ MessageType, domain glib.Quark, // // - typ MessageType: the #GstMessageType // - domain glib.Quark: the GStreamer GError domain this message belongs to -// - code int: the GError code belonging to the domain +// - code int32: the GError code belonging to the domain // - text string (nullable): an allocated text string to be used // as a replacement for the default message connected to code, // or %NULL @@ -34047,14 +34499,14 @@ func (element *ElementInstance) MessageFull(typ MessageType, domain glib.Quark, // or %NULL // - file string: the source code file where the error was generated // - function string: the source code function where the error was generated -// - line int: the source code line where the error was generated +// - line int32: the source code line where the error was generated // - structure *Structure: optional details structure // // Post an error, warning or info message on the bus from inside an element. // // @type must be of #GST_MESSAGE_ERROR, #GST_MESSAGE_WARNING or // #GST_MESSAGE_INFO. -func (element *ElementInstance) MessageFullWithDetails(typ MessageType, domain glib.Quark, code int, text string, debug string, file string, function string, line int, structure *Structure) { +func (element *ElementInstance) MessageFullWithDetails(typ MessageType, domain glib.Quark, code int32, text string, debug string, file string, function string, line int32, structure *Structure) { var carg0 *C.GstElement // in, none, converted var carg1 C.GstMessageType // in, none, casted var carg2 C.GQuark // in, none, casted, alias @@ -35155,7 +35607,7 @@ func UnsafeApplyElementOverrides[Instance Element](gclass unsafe.Pointer, overri var transition StateChange // in, none, casted var goret StateChangeReturn // return, none, casted - element = UnsafeElementFromGlibNone(unsafe.Pointer(carg0)).(Instance) + element = UnsafeElementFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) transition = StateChange(carg1) goret = overrides.ChangeState(element, transition) @@ -35179,7 +35631,7 @@ func UnsafeApplyElementOverrides[Instance Element](gclass unsafe.Pointer, overri var pending State // out, full, casted var goret StateChangeReturn // return, none, casted - element = UnsafeElementFromGlibNone(unsafe.Pointer(carg0)).(Instance) + element = UnsafeElementFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) timeout = ClockTime(carg3) state, pending, goret = overrides.GetState(element, timeout) @@ -35201,7 +35653,7 @@ func UnsafeApplyElementOverrides[Instance Element](gclass unsafe.Pointer, overri func(carg0 *C.GstElement) { var element Instance // go GstElement subclass - element = UnsafeElementFromGlibNone(unsafe.Pointer(carg0)).(Instance) + element = UnsafeElementFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.NoMorePads(element) }, @@ -35217,7 +35669,7 @@ func UnsafeApplyElementOverrides[Instance Element](gclass unsafe.Pointer, overri var element Instance // go GstElement subclass var pad Pad // in, none, converted - element = UnsafeElementFromGlibNone(unsafe.Pointer(carg0)).(Instance) + element = UnsafeElementFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) pad = UnsafePadFromGlibNone(unsafe.Pointer(carg1)) overrides.PadAdded(element, pad) @@ -35234,7 +35686,7 @@ func UnsafeApplyElementOverrides[Instance Element](gclass unsafe.Pointer, overri var element Instance // go GstElement subclass var pad Pad // in, none, converted - element = UnsafeElementFromGlibNone(unsafe.Pointer(carg0)).(Instance) + element = UnsafeElementFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) pad = UnsafePadFromGlibNone(unsafe.Pointer(carg1)) overrides.PadRemoved(element, pad) @@ -35252,7 +35704,7 @@ func UnsafeApplyElementOverrides[Instance Element](gclass unsafe.Pointer, overri var message *Message // in, full, converted var goret bool // return - element = UnsafeElementFromGlibNone(unsafe.Pointer(carg0)).(Instance) + element = UnsafeElementFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) message = UnsafeMessageFromGlibFull(unsafe.Pointer(carg1)) goret = overrides.PostMessage(element, message) @@ -35275,7 +35727,7 @@ func UnsafeApplyElementOverrides[Instance Element](gclass unsafe.Pointer, overri var element Instance // go GstElement subclass var goret Clock // return, full, converted, nullable - element = UnsafeElementFromGlibNone(unsafe.Pointer(carg0)).(Instance) + element = UnsafeElementFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.ProvideClock(element) @@ -35298,7 +35750,7 @@ func UnsafeApplyElementOverrides[Instance Element](gclass unsafe.Pointer, overri var query *Query // in, none, converted var goret bool // return - element = UnsafeElementFromGlibNone(unsafe.Pointer(carg0)).(Instance) + element = UnsafeElementFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Query(element, query) @@ -35321,7 +35773,7 @@ func UnsafeApplyElementOverrides[Instance Element](gclass unsafe.Pointer, overri var element Instance // go GstElement subclass var pad Pad // in, none, converted - element = UnsafeElementFromGlibNone(unsafe.Pointer(carg0)).(Instance) + element = UnsafeElementFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) pad = UnsafePadFromGlibNone(unsafe.Pointer(carg1)) overrides.ReleasePad(element, pad) @@ -35341,7 +35793,7 @@ func UnsafeApplyElementOverrides[Instance Element](gclass unsafe.Pointer, overri var caps *Caps // in, none, converted, nullable var goret Pad // return, full, converted, nullable - element = UnsafeElementFromGlibNone(unsafe.Pointer(carg0)).(Instance) + element = UnsafeElementFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) templ = UnsafePadTemplateFromGlibNone(unsafe.Pointer(carg1)) if carg2 != nil { name = C.GoString((*C.char)(unsafe.Pointer(carg2))) @@ -35371,7 +35823,7 @@ func UnsafeApplyElementOverrides[Instance Element](gclass unsafe.Pointer, overri var event *Event // in, full, converted var goret bool // return - element = UnsafeElementFromGlibNone(unsafe.Pointer(carg0)).(Instance) + element = UnsafeElementFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = UnsafeEventFromGlibFull(unsafe.Pointer(carg1)) goret = overrides.SendEvent(element, event) @@ -35394,7 +35846,7 @@ func UnsafeApplyElementOverrides[Instance Element](gclass unsafe.Pointer, overri var element Instance // go GstElement subclass var bus Bus // in, none, converted, nullable - element = UnsafeElementFromGlibNone(unsafe.Pointer(carg0)).(Instance) + element = UnsafeElementFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != nil { bus = UnsafeBusFromGlibNone(unsafe.Pointer(carg1)) } @@ -35414,7 +35866,7 @@ func UnsafeApplyElementOverrides[Instance Element](gclass unsafe.Pointer, overri var clock Clock // in, none, converted, nullable var goret bool // return - element = UnsafeElementFromGlibNone(unsafe.Pointer(carg0)).(Instance) + element = UnsafeElementFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != nil { clock = UnsafeClockFromGlibNone(unsafe.Pointer(carg1)) } @@ -35439,7 +35891,7 @@ func UnsafeApplyElementOverrides[Instance Element](gclass unsafe.Pointer, overri var element Instance // go GstElement subclass var _context *Context // in, none, converted - element = UnsafeElementFromGlibNone(unsafe.Pointer(carg0)).(Instance) + element = UnsafeElementFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) _context = UnsafeContextFromGlibNone(unsafe.Pointer(carg1)) overrides.SetContext(element, _context) @@ -35457,7 +35909,7 @@ func UnsafeApplyElementOverrides[Instance Element](gclass unsafe.Pointer, overri var state State // in, none, casted var goret StateChangeReturn // return, none, casted - element = UnsafeElementFromGlibNone(unsafe.Pointer(carg0)).(Instance) + element = UnsafeElementFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) state = State(carg1) goret = overrides.SetState(element, state) @@ -35480,7 +35932,7 @@ func UnsafeApplyElementOverrides[Instance Element](gclass unsafe.Pointer, overri var newstate State // in, none, casted var pending State // in, none, casted - element = UnsafeElementFromGlibNone(unsafe.Pointer(carg0)).(Instance) + element = UnsafeElementFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) oldstate = State(carg1) newstate = State(carg2) pending = State(carg3) @@ -35759,6 +36211,11 @@ func UnsafeElementFactoryFromGlibFull(c unsafe.Pointer) ElementFactory { return gobject.UnsafeObjectFromGlibFull(c).(ElementFactory) } +// UnsafeElementFactoryFromGlibBorrow is used to convert raw GstElementFactory pointers to go without touching any references. This is used by the bindings internally. +func UnsafeElementFactoryFromGlibBorrow(c unsafe.Pointer) ElementFactory { + return gobject.UnsafeObjectFromGlibBorrow(c).(ElementFactory) +} + func (e *ElementFactoryInstance) upcastToGstElementFactory() *ElementFactoryInstance { return e } @@ -36468,6 +36925,11 @@ func UnsafeGhostPadFromGlibFull(c unsafe.Pointer) GhostPad { return gobject.UnsafeObjectFromGlibFull(c).(GhostPad) } +// UnsafeGhostPadFromGlibBorrow is used to convert raw GstGhostPad pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGhostPadFromGlibBorrow(c unsafe.Pointer) GhostPad { + return gobject.UnsafeObjectFromGlibBorrow(c).(GhostPad) +} + func (g *GhostPadInstance) upcastToGstGhostPad() *GhostPadInstance { return g } @@ -36927,6 +37389,11 @@ func UnsafeSharedTaskPoolFromGlibFull(c unsafe.Pointer) SharedTaskPool { return gobject.UnsafeObjectFromGlibFull(c).(SharedTaskPool) } +// UnsafeSharedTaskPoolFromGlibBorrow is used to convert raw GstSharedTaskPool pointers to go without touching any references. This is used by the bindings internally. +func UnsafeSharedTaskPoolFromGlibBorrow(c unsafe.Pointer) SharedTaskPool { + return gobject.UnsafeObjectFromGlibBorrow(c).(SharedTaskPool) +} + func (s *SharedTaskPoolInstance) upcastToGstSharedTaskPool() *SharedTaskPoolInstance { return s } @@ -37099,6 +37566,11 @@ func UnsafeSystemClockFromGlibFull(c unsafe.Pointer) SystemClock { return gobject.UnsafeObjectFromGlibFull(c).(SystemClock) } +// UnsafeSystemClockFromGlibBorrow is used to convert raw GstSystemClock pointers to go without touching any references. This is used by the bindings internally. +func UnsafeSystemClockFromGlibBorrow(c unsafe.Pointer) SystemClock { + return gobject.UnsafeObjectFromGlibBorrow(c).(SystemClock) +} + func (s *SystemClockInstance) upcastToGstSystemClock() *SystemClockInstance { return s } @@ -37600,6 +38072,11 @@ func UnsafeBinFromGlibFull(c unsafe.Pointer) Bin { return gobject.UnsafeObjectFromGlibFull(c).(Bin) } +// UnsafeBinFromGlibBorrow is used to convert raw GstBin pointers to go without touching any references. This is used by the bindings internally. +func UnsafeBinFromGlibBorrow(c unsafe.Pointer) Bin { + return gobject.UnsafeObjectFromGlibBorrow(c).(Bin) +} + func (b *BinInstance) upcastToGstBin() *BinInstance { return b } @@ -38290,7 +38767,7 @@ func UnsafeApplyBinOverrides[Instance Bin](gclass unsafe.Pointer, overrides BinO var element Element // in, none, converted var goret bool // return - bin = UnsafeBinFromGlibNone(unsafe.Pointer(carg0)).(Instance) + bin = UnsafeBinFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) element = UnsafeElementFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.AddElement(bin, element) @@ -38314,7 +38791,7 @@ func UnsafeApplyBinOverrides[Instance Bin](gclass unsafe.Pointer, overrides BinO var subBin Bin // in, none, converted var child Element // in, none, converted - bin = UnsafeBinFromGlibNone(unsafe.Pointer(carg0)).(Instance) + bin = UnsafeBinFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) subBin = UnsafeBinFromGlibNone(unsafe.Pointer(carg1)) child = UnsafeElementFromGlibNone(unsafe.Pointer(carg2)) @@ -38333,7 +38810,7 @@ func UnsafeApplyBinOverrides[Instance Bin](gclass unsafe.Pointer, overrides BinO var subBin Bin // in, none, converted var child Element // in, none, converted - bin = UnsafeBinFromGlibNone(unsafe.Pointer(carg0)).(Instance) + bin = UnsafeBinFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) subBin = UnsafeBinFromGlibNone(unsafe.Pointer(carg1)) child = UnsafeElementFromGlibNone(unsafe.Pointer(carg2)) @@ -38351,7 +38828,7 @@ func UnsafeApplyBinOverrides[Instance Bin](gclass unsafe.Pointer, overrides BinO var bin Instance // go GstBin subclass var goret bool // return - bin = UnsafeBinFromGlibNone(unsafe.Pointer(carg0)).(Instance) + bin = UnsafeBinFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.DoLatency(bin) @@ -38373,7 +38850,7 @@ func UnsafeApplyBinOverrides[Instance Bin](gclass unsafe.Pointer, overrides BinO var bin Instance // go GstBin subclass var child Element // in, none, converted - bin = UnsafeBinFromGlibNone(unsafe.Pointer(carg0)).(Instance) + bin = UnsafeBinFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) child = UnsafeElementFromGlibNone(unsafe.Pointer(carg1)) overrides.ElementAdded(bin, child) @@ -38390,7 +38867,7 @@ func UnsafeApplyBinOverrides[Instance Bin](gclass unsafe.Pointer, overrides BinO var bin Instance // go GstBin subclass var child Element // in, none, converted - bin = UnsafeBinFromGlibNone(unsafe.Pointer(carg0)).(Instance) + bin = UnsafeBinFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) child = UnsafeElementFromGlibNone(unsafe.Pointer(carg1)) overrides.ElementRemoved(bin, child) @@ -38407,7 +38884,7 @@ func UnsafeApplyBinOverrides[Instance Bin](gclass unsafe.Pointer, overrides BinO var bin Instance // go GstBin subclass var message *Message // in, full, converted - bin = UnsafeBinFromGlibNone(unsafe.Pointer(carg0)).(Instance) + bin = UnsafeBinFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) message = UnsafeMessageFromGlibFull(unsafe.Pointer(carg1)) overrides.HandleMessage(bin, message) @@ -38425,7 +38902,7 @@ func UnsafeApplyBinOverrides[Instance Bin](gclass unsafe.Pointer, overrides BinO var element Element // in, none, converted var goret bool // return - bin = UnsafeBinFromGlibNone(unsafe.Pointer(carg0)).(Instance) + bin = UnsafeBinFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) element = UnsafeElementFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.RemoveElement(bin, element) @@ -38703,6 +39180,11 @@ func UnsafePipelineFromGlibFull(c unsafe.Pointer) Pipeline { return gobject.UnsafeObjectFromGlibFull(c).(Pipeline) } +// UnsafePipelineFromGlibBorrow is used to convert raw GstPipeline pointers to go without touching any references. This is used by the bindings internally. +func UnsafePipelineFromGlibBorrow(c unsafe.Pointer) Pipeline { + return gobject.UnsafeObjectFromGlibBorrow(c).(Pipeline) +} + func (p *PipelineInstance) upcastToGstPipeline() *PipelineInstance { return p } @@ -39112,8 +39594,11 @@ func marshalAllocationParams(p unsafe.Pointer) (interface{}, error) { return UnsafeAllocationParamsFromGlibBorrow(b), nil } -func (r *AllocationParams) InitGoValue(v *gobject.Value) { - v.Init(TypeAllocationParams) +func (r *AllocationParams) GoValueType() gobject.Type { + return TypeAllocationParams +} + +func (r *AllocationParams) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -39290,8 +39775,11 @@ func marshalAtomicQueue(p unsafe.Pointer) (interface{}, error) { return UnsafeAtomicQueueFromGlibBorrow(b), nil } -func (r *AtomicQueue) InitGoValue(v *gobject.Value) { - v.Init(TypeAtomicQueue) +func (r *AtomicQueue) GoValueType() gobject.Type { + return TypeAtomicQueue +} + +func (r *AtomicQueue) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -39561,8 +40049,11 @@ func marshalBuffer(p unsafe.Pointer) (interface{}, error) { return UnsafeBufferFromGlibBorrow(b), nil } -func (r *Buffer) InitGoValue(v *gobject.Value) { - v.Init(TypeBuffer) +func (r *Buffer) GoValueType() gobject.Type { + return TypeBuffer +} + +func (r *Buffer) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -40309,7 +40800,7 @@ func (buffer *Buffer) GetMemory(idx uint) *Memory { // The function takes the following parameters: // // - idx uint: an index -// - length int: a length +// - length int32: a length // // The function returns the following values: // @@ -40319,7 +40810,7 @@ func (buffer *Buffer) GetMemory(idx uint) *Memory { // be merged into one large #GstMemory. // // If @length is -1, all memory starting from @idx is merged. -func (buffer *Buffer) GetMemoryRange(idx uint, length int) *Memory { +func (buffer *Buffer) GetMemoryRange(idx uint, length int32) *Memory { var carg0 *C.GstBuffer // in, none, converted var carg1 C.guint // in, none, casted var carg2 C.gint // in, none, casted @@ -40510,7 +41001,7 @@ func (buffer *Buffer) GetSizes() (uint, uint, uint) { // The function takes the following parameters: // // - idx uint: an index -// - length int: a length +// - length int32: a length // // The function returns the following values: // @@ -40526,7 +41017,7 @@ func (buffer *Buffer) GetSizes() (uint, uint, uint) { // @length -1. // @offset and @maxsize can be used to resize the buffer memory blocks with // gst_buffer_resize_range(). -func (buffer *Buffer) GetSizesRange(idx uint, length int) (uint, uint, uint) { +func (buffer *Buffer) GetSizesRange(idx uint, length int32) (uint, uint, uint) { var carg0 *C.GstBuffer // in, none, converted var carg1 C.guint // in, none, casted var carg2 C.gint // in, none, casted @@ -40590,7 +41081,7 @@ func (buffer *Buffer) HasFlags(flags BufferFlags) bool { // // The function takes the following parameters: // -// - idx int: the index to add the memory at, or -1 to append it to the end +// - idx int32: the index to add the memory at, or -1 to append it to the end // - mem *Memory: a #GstMemory. // // Inserts the memory block @mem into @buffer at @idx. This function takes ownership @@ -40599,7 +41090,7 @@ func (buffer *Buffer) HasFlags(flags BufferFlags) bool { // Only gst_buffer_get_max_memory() can be added to a buffer. If more memory is // added, existing memory blocks will automatically be merged to make room for // the new memory. -func (buffer *Buffer) InsertMemory(idx int, mem *Memory) { +func (buffer *Buffer) InsertMemory(idx int32, mem *Memory) { var carg0 *C.GstBuffer // in, none, converted var carg1 C.gint // in, none, casted var carg2 *C.GstMemory // in, full, converted @@ -40647,7 +41138,7 @@ func (buffer *Buffer) IsAllMemoryWritable() bool { // The function takes the following parameters: // // - idx uint: an index -// - length int: a length, should not be 0 +// - length int32: a length, should not be 0 // // The function returns the following values: // @@ -40659,7 +41150,7 @@ func (buffer *Buffer) IsAllMemoryWritable() bool { // // Note that this function does not check if @buffer is writable, use // gst_buffer_is_writable() to check that if needed. -func (buffer *Buffer) IsMemoryRangeWritable(idx uint, length int) bool { +func (buffer *Buffer) IsMemoryRangeWritable(idx uint, length int32) bool { var carg0 *C.GstBuffer // in, none, converted var carg1 C.guint // in, none, casted var carg2 C.gint // in, none, casted @@ -40839,12 +41330,12 @@ func (buffer *Buffer) RemoveMemory(idx uint) { // The function takes the following parameters: // // - idx uint: an index -// - length int: a length +// - length int32: a length // // Removes @length memory blocks in @buffer starting from @idx. // // @length can be -1, in which case all memory starting from @idx is removed. -func (buffer *Buffer) RemoveMemoryRange(idx uint, length int) { +func (buffer *Buffer) RemoveMemoryRange(idx uint, length int32) { var carg0 *C.GstBuffer // in, none, converted var carg1 C.guint // in, none, casted var carg2 C.gint // in, none, casted @@ -40938,7 +41429,7 @@ func (buffer *Buffer) ReplaceMemory(idx uint, mem *Memory) { // The function takes the following parameters: // // - idx uint: an index -// - length int: a length, should not be 0 +// - length int32: a length, should not be 0 // - mem *Memory: a #GstMemory // // Replaces @length memory blocks in @buffer starting at @idx with @mem. @@ -40947,7 +41438,7 @@ func (buffer *Buffer) ReplaceMemory(idx uint, mem *Memory) { // replaced with @mem. // // @buffer should be writable. -func (buffer *Buffer) ReplaceMemoryRange(idx uint, length int, mem *Memory) { +func (buffer *Buffer) ReplaceMemoryRange(idx uint, length int32, mem *Memory) { var carg0 *C.GstBuffer // in, none, converted var carg1 C.guint // in, none, casted var carg2 C.gint // in, none, casted @@ -40993,7 +41484,7 @@ func (buffer *Buffer) Resize(offset int, size int) { // The function takes the following parameters: // // - idx uint: an index -// - length int: a length +// - length int32: a length // - offset int: the offset adjustment // - size int: the new size or -1 to just adjust the offset // @@ -41003,7 +41494,7 @@ func (buffer *Buffer) Resize(offset int, size int) { // // Sets the total size of the @length memory blocks starting at @idx in // @buffer -func (buffer *Buffer) ResizeRange(idx uint, length int, offset int, size int) bool { +func (buffer *Buffer) ResizeRange(idx uint, length int32, offset int, size int) bool { var carg0 *C.GstBuffer // in, none, converted var carg1 C.guint // in, none, casted var carg2 C.gint // in, none, casted @@ -41142,8 +41633,11 @@ func marshalBufferList(p unsafe.Pointer) (interface{}, error) { return UnsafeBufferListFromGlibBorrow(b), nil } -func (r *BufferList) InitGoValue(v *gobject.Value) { - v.Init(TypeBufferList) +func (r *BufferList) GoValueType() gobject.Type { + return TypeBufferList +} + +func (r *BufferList) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -41340,7 +41834,7 @@ func (list *BufferList) ForEach(fn BufferListFunc) bool { // // The function returns the following values: // -// - goret *Buffer (nullable) +// - goret *Buffer // // Gets the buffer at @idx. // @@ -41349,7 +41843,7 @@ func (list *BufferList) ForEach(fn BufferListFunc) bool { func (list *BufferList) Get(idx uint) *Buffer { var carg0 *C.GstBufferList // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.GstBuffer // return, borrow, converted, nullable + var cret *C.GstBuffer // return, borrow, converted carg0 = (*C.GstBufferList)(UnsafeBufferListToGlibNone(list)) carg1 = C.guint(idx) @@ -41360,10 +41854,8 @@ func (list *BufferList) Get(idx uint) *Buffer { var goret *Buffer - if cret != nil { - goret = UnsafeBufferFromGlibBorrow(unsafe.Pointer(cret)) - runtime.AddCleanup(goret, func(_ *BufferList) {}, list) - } + goret = UnsafeBufferFromGlibBorrow(unsafe.Pointer(cret)) + runtime.AddCleanup(goret, func(_ *BufferList) {}, list) return goret } @@ -41376,7 +41868,7 @@ func (list *BufferList) Get(idx uint) *Buffer { // // The function returns the following values: // -// - goret *Buffer (nullable) +// - goret *Buffer // // Gets the buffer at @idx, ensuring it is a writable buffer. // @@ -41385,7 +41877,7 @@ func (list *BufferList) Get(idx uint) *Buffer { func (list *BufferList) GetWritable(idx uint) *Buffer { var carg0 *C.GstBufferList // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.GstBuffer // return, borrow, converted, nullable + var cret *C.GstBuffer // return, borrow, converted carg0 = (*C.GstBufferList)(UnsafeBufferListToGlibNone(list)) carg1 = C.guint(idx) @@ -41396,10 +41888,8 @@ func (list *BufferList) GetWritable(idx uint) *Buffer { var goret *Buffer - if cret != nil { - goret = UnsafeBufferFromGlibBorrow(unsafe.Pointer(cret)) - runtime.AddCleanup(goret, func(_ *BufferList) {}, list) - } + goret = UnsafeBufferFromGlibBorrow(unsafe.Pointer(cret)) + runtime.AddCleanup(goret, func(_ *BufferList) {}, list) return goret } @@ -41408,14 +41898,14 @@ func (list *BufferList) GetWritable(idx uint) *Buffer { // // The function takes the following parameters: // -// - idx int: the index +// - idx int32: the index // - buffer *Buffer: a #GstBuffer // // Inserts @buffer at @idx in @list. Other buffers are moved to make room for // this new buffer. // // A -1 value for @idx will append the buffer at the end. -func (list *BufferList) Insert(idx int, buffer *Buffer) { +func (list *BufferList) Insert(idx int32, buffer *Buffer) { var carg0 *C.GstBufferList // in, none, converted var carg1 C.gint // in, none, casted var carg2 *C.GstBuffer // in, full, converted @@ -41747,8 +42237,11 @@ func marshalCaps(p unsafe.Pointer) (interface{}, error) { return UnsafeCapsFromGlibBorrow(b), nil } -func (r *Caps) InitGoValue(v *gobject.Value) { - v.Init(TypeCaps) +func (r *Caps) GoValueType() gobject.Type { + return TypeCaps +} + +func (r *Caps) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -41873,6 +42366,66 @@ func NewCapsEmptySimple(mediaType string) *Caps { return goret } +// NewCapsIDStrEmptySimple wraps gst_caps_new_id_str_empty_simple +// +// The function takes the following parameters: +// +// - mediaType *IdStr: the media type of the structure +// +// The function returns the following values: +// +// - goret *Caps +// +// Creates a new #GstCaps that contains one #GstStructure with name +// @media_type. +func NewCapsIDStrEmptySimple(mediaType *IdStr) *Caps { + var carg1 *C.GstIdStr // in, none, converted + var cret *C.GstCaps // return, full, converted + + carg1 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(mediaType)) + + cret = C.gst_caps_new_id_str_empty_simple(carg1) + runtime.KeepAlive(mediaType) + + var goret *Caps + + goret = UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// NewCapsStaticStrEmptySimple wraps gst_caps_new_static_str_empty_simple +// +// The function takes the following parameters: +// +// - mediaType string: the media type of the structure +// +// The function returns the following values: +// +// - goret *Caps +// +// Creates a new #GstCaps that contains one #GstStructure with name +// @media_type. +// +// @media_type needs to be valid for the remaining lifetime of the process, e.g. +// has to be a static string. +func NewCapsStaticStrEmptySimple(mediaType string) *Caps { + var carg1 *C.char // in, none, string, casted *C.gchar + var cret *C.GstCaps // return, full, converted + + carg1 = (*C.char)(unsafe.Pointer(C.CString(mediaType))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_caps_new_static_str_empty_simple(carg1) + runtime.KeepAlive(mediaType) + + var goret *Caps + + goret = UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + // CapsFromString wraps gst_caps_from_string // // The function takes the following parameters: @@ -42267,6 +42820,31 @@ func (caps *Caps) GetStructure(index uint) *Structure { return goret } +// IDStrSetValue wraps gst_caps_id_str_set_value +// +// The function takes the following parameters: +// +// - field *IdStr: name of the field to set +// - value *gobject.Value: value to set the field to +// +// Sets the given @field on all structures of @caps to the given @value. +// This is a convenience function for calling gst_structure_set_value() on +// all structures of @caps. +func (caps *Caps) IDStrSetValue(field *IdStr, value *gobject.Value) { + var carg0 *C.GstCaps // in, none, converted + var carg1 *C.GstIdStr // in, none, converted + var carg2 *C.GValue // in, none, converted + + carg0 = (*C.GstCaps)(UnsafeCapsToGlibNone(caps)) + carg1 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(field)) + carg2 = (*C.GValue)(gobject.UnsafeValueToGlibUseAnyInstead(value)) + + C.gst_caps_id_str_set_value(carg0, carg1, carg2) + runtime.KeepAlive(caps) + runtime.KeepAlive(field) + runtime.KeepAlive(value) +} + // Intersect wraps gst_caps_intersect // // The function takes the following parameters: @@ -42942,6 +43520,35 @@ func (caps *Caps) SetValue(field string, value *gobject.Value) { runtime.KeepAlive(value) } +// SetValueStaticStr wraps gst_caps_set_value_static_str +// +// The function takes the following parameters: +// +// - field string: name of the field to set +// - value *gobject.Value: value to set the field to +// +// Sets the given @field on all structures of @caps to the given @value. +// This is a convenience function for calling gst_structure_set_value() on +// all structures of @caps. +// +// @field needs to be valid for the remaining lifetime of the process, e.g. +// has to be a static string. +func (caps *Caps) SetValueStaticStr(field string, value *gobject.Value) { + var carg0 *C.GstCaps // in, none, converted + var carg1 *C.char // in, none, string, casted *C.gchar + var carg2 *C.GValue // in, none, converted + + carg0 = (*C.GstCaps)(UnsafeCapsToGlibNone(caps)) + carg1 = (*C.char)(unsafe.Pointer(C.CString(field))) + defer C.free(unsafe.Pointer(carg1)) + carg2 = (*C.GValue)(gobject.UnsafeValueToGlibUseAnyInstead(value)) + + C.gst_caps_set_value_static_str(carg0, carg1, carg2) + runtime.KeepAlive(caps) + runtime.KeepAlive(field) + runtime.KeepAlive(value) +} + // Simplify wraps gst_caps_simplify // // The function returns the following values: @@ -43143,8 +43750,11 @@ func marshalCapsFeatures(p unsafe.Pointer) (interface{}, error) { return UnsafeCapsFeaturesFromGlibBorrow(b), nil } -func (r *CapsFeatures) InitGoValue(v *gobject.Value) { - v.Init(TypeCapsFeatures) +func (r *CapsFeatures) GoValueType() gobject.Type { + return TypeCapsFeatures +} + +func (r *CapsFeatures) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -43267,6 +43877,37 @@ func NewCapsFeaturesSingle(feature string) *CapsFeatures { return goret } +// NewCapsFeaturesSingleStaticStr wraps gst_caps_features_new_single_static_str +// +// The function takes the following parameters: +// +// - feature string: The feature +// +// The function returns the following values: +// +// - goret *CapsFeatures +// +// Creates a new #GstCapsFeatures with a single feature. +// +// @feature needs to be valid for the remaining lifetime of the process, e.g. has +// to be a static string. +func NewCapsFeaturesSingleStaticStr(feature string) *CapsFeatures { + var carg1 *C.gchar // in, none, string + var cret *C.GstCapsFeatures // return, full, converted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(feature))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_caps_features_new_single_static_str(carg1) + runtime.KeepAlive(feature) + + var goret *CapsFeatures + + goret = UnsafeCapsFeaturesFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + // CapsFeaturesFromString wraps gst_caps_features_from_string // // The function takes the following parameters: @@ -43324,6 +43965,8 @@ func (features *CapsFeatures) Add(feature string) { // - feature glib.Quark: a feature. // // Adds @feature to @features. +// +// Deprecated: (since 1.26.0) Use gst_caps_features_add_id_str(). func (features *CapsFeatures) AddID(feature glib.Quark) { var carg0 *C.GstCapsFeatures // in, none, converted var carg1 C.GQuark // in, none, casted, alias @@ -43336,6 +43979,48 @@ func (features *CapsFeatures) AddID(feature glib.Quark) { runtime.KeepAlive(feature) } +// AddIDStr wraps gst_caps_features_add_id_str +// +// The function takes the following parameters: +// +// - feature *IdStr: a feature. +// +// Adds @feature to @features. +func (features *CapsFeatures) AddIDStr(feature *IdStr) { + var carg0 *C.GstCapsFeatures // in, none, converted + var carg1 *C.GstIdStr // in, none, converted + + carg0 = (*C.GstCapsFeatures)(UnsafeCapsFeaturesToGlibNone(features)) + carg1 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(feature)) + + C.gst_caps_features_add_id_str(carg0, carg1) + runtime.KeepAlive(features) + runtime.KeepAlive(feature) +} + +// AddStaticStr wraps gst_caps_features_add_static_str +// +// The function takes the following parameters: +// +// - feature string: a feature. +// +// Adds @feature to @features. +// +// @feature needs to be valid for the remaining lifetime of the process, e.g. has +// to be a static string. +func (features *CapsFeatures) AddStaticStr(feature string) { + var carg0 *C.GstCapsFeatures // in, none, converted + var carg1 *C.gchar // in, none, string + + carg0 = (*C.GstCapsFeatures)(UnsafeCapsFeaturesToGlibNone(features)) + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(feature))) + defer C.free(unsafe.Pointer(carg1)) + + C.gst_caps_features_add_static_str(carg0, carg1) + runtime.KeepAlive(features) + runtime.KeepAlive(feature) +} + // Contains wraps gst_caps_features_contains // // The function takes the following parameters: @@ -43380,6 +44065,8 @@ func (features *CapsFeatures) Contains(feature string) bool { // - goret bool // // Checks if @features contains @feature. +// +// Deprecated: (since 1.26.0) Use gst_caps_features_contains_id_str(). func (features *CapsFeatures) ContainsID(feature glib.Quark) bool { var carg0 *C.GstCapsFeatures // in, none, converted var carg1 C.GQuark // in, none, casted, alias @@ -43401,6 +44088,38 @@ func (features *CapsFeatures) ContainsID(feature glib.Quark) bool { return goret } +// ContainsIDStr wraps gst_caps_features_contains_id_str +// +// The function takes the following parameters: +// +// - feature *IdStr: a feature +// +// The function returns the following values: +// +// - goret bool +// +// Checks if @features contains @feature. +func (features *CapsFeatures) ContainsIDStr(feature *IdStr) bool { + var carg0 *C.GstCapsFeatures // in, none, converted + var carg1 *C.GstIdStr // in, none, converted + var cret C.gboolean // return + + carg0 = (*C.GstCapsFeatures)(UnsafeCapsFeaturesToGlibNone(features)) + carg1 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(feature)) + + cret = C.gst_caps_features_contains_id_str(carg0, carg1) + runtime.KeepAlive(features) + runtime.KeepAlive(feature) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + // Copy wraps gst_caps_features_copy // // The function returns the following values: @@ -43467,6 +44186,8 @@ func (features *CapsFeatures) GetNth(i uint) string { // - goret glib.Quark // // Returns the @i-th feature of @features. +// +// Deprecated: (since 1.26.0) Use gst_caps_features_get_nth_id_str(). func (features *CapsFeatures) GetNthID(i uint) glib.Quark { var carg0 *C.GstCapsFeatures // in, none, converted var carg1 C.guint // in, none, casted @@ -43486,6 +44207,36 @@ func (features *CapsFeatures) GetNthID(i uint) glib.Quark { return goret } +// GetNthIDStr wraps gst_caps_features_get_nth_id_str +// +// The function takes the following parameters: +// +// - i uint: index of the feature +// +// The function returns the following values: +// +// - goret *IdStr +// +// Returns the @i-th feature of @features. +func (features *CapsFeatures) GetNthIDStr(i uint) *IdStr { + var carg0 *C.GstCapsFeatures // in, none, converted + var carg1 C.guint // in, none, casted + var cret *C.GstIdStr // return, none, converted + + carg0 = (*C.GstCapsFeatures)(UnsafeCapsFeaturesToGlibNone(features)) + carg1 = C.guint(i) + + cret = C.gst_caps_features_get_nth_id_str(carg0, carg1) + runtime.KeepAlive(features) + runtime.KeepAlive(i) + + var goret *IdStr + + goret = UnsafeIdStrFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // GetSize wraps gst_caps_features_get_size // // The function returns the following values: @@ -43593,6 +44344,8 @@ func (features *CapsFeatures) Remove(feature string) { // - feature glib.Quark: a feature. // // Removes @feature from @features. +// +// Deprecated: (since 1.26.0) Use gst_caps_features_remove_id_str(). func (features *CapsFeatures) RemoveID(feature glib.Quark) { var carg0 *C.GstCapsFeatures // in, none, converted var carg1 C.GQuark // in, none, casted, alias @@ -43605,11 +44358,30 @@ func (features *CapsFeatures) RemoveID(feature glib.Quark) { runtime.KeepAlive(feature) } +// RemoveIDStr wraps gst_caps_features_remove_id_str +// +// The function takes the following parameters: +// +// - feature *IdStr: a feature. +// +// Removes @feature from @features. +func (features *CapsFeatures) RemoveIDStr(feature *IdStr) { + var carg0 *C.GstCapsFeatures // in, none, converted + var carg1 *C.GstIdStr // in, none, converted + + carg0 = (*C.GstCapsFeatures)(UnsafeCapsFeaturesToGlibNone(features)) + carg1 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(feature)) + + C.gst_caps_features_remove_id_str(carg0, carg1) + runtime.KeepAlive(features) + runtime.KeepAlive(feature) +} + // SetParentRefcount wraps gst_caps_features_set_parent_refcount // // The function takes the following parameters: // -// - refcount *int: a pointer to the parent's refcount +// - refcount *int32: a pointer to the parent's refcount // // The function returns the following values: // @@ -43619,7 +44391,7 @@ func (features *CapsFeatures) RemoveID(feature glib.Quark) { // determine whether a caps features is mutable or not. This function should only be // called by code implementing parent objects of #GstCapsFeatures, as described in // [the MT refcounting design document](additional/design/MT-refcounting.md). -func (features *CapsFeatures) SetParentRefcount(refcount *int) bool { +func (features *CapsFeatures) SetParentRefcount(refcount *int32) bool { var carg0 *C.GstCapsFeatures // in, none, converted var carg1 *C.gint // in, transfer: none, C Pointers: 1, Name: gint var cret C.gboolean // return @@ -43627,7 +44399,7 @@ func (features *CapsFeatures) SetParentRefcount(refcount *int) bool { carg0 = (*C.GstCapsFeatures)(UnsafeCapsFeaturesToGlibNone(features)) _ = refcount _ = carg1 - panic("unimplemented conversion of *int (gint*)") + panic("unimplemented conversion of *int32 (gint*)") cret = C.gst_caps_features_set_parent_refcount(carg0, carg1) runtime.KeepAlive(features) @@ -43891,8 +44663,11 @@ func marshalContext(p unsafe.Pointer) (interface{}, error) { return UnsafeContextFromGlibBorrow(b), nil } -func (r *Context) InitGoValue(v *gobject.Value) { - v.Init(TypeContext) +func (r *Context) GoValueType() gobject.Type { + return TypeContext +} + +func (r *Context) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -44339,8 +45114,11 @@ func marshalDateTime(p unsafe.Pointer) (interface{}, error) { return UnsafeDateTimeFromGlibBorrow(b), nil } -func (r *DateTime) InitGoValue(v *gobject.Value) { - v.Init(TypeDateTime) +func (r *DateTime) GoValueType() gobject.Type { + return TypeDateTime +} + +func (r *DateTime) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -44407,11 +45185,11 @@ func UnsafeDateTimeToGlibFull(d *DateTime) unsafe.Pointer { // The function takes the following parameters: // // - tzoffset float32: Offset from UTC in hours. -// - year int: the gregorian year -// - month int: the gregorian month -// - day int: the day of the gregorian month -// - hour int: the hour of the day -// - minute int: the minute of the hour +// - year int32: the gregorian year +// - month int32: the gregorian month +// - day int32: the day of the gregorian month +// - hour int32: the hour of the day +// - minute int32: the minute of the hour // - seconds float64: the second of the minute // // The function returns the following values: @@ -44432,7 +45210,7 @@ func UnsafeDateTimeToGlibFull(d *DateTime) unsafe.Pointer { // if @month == -1, then #GstDateTime will be created only for @year. If // @day == -1, then #GstDateTime will be created for @year and @month and // so on. -func NewDateTime(tzoffset float32, year int, month int, day int, hour int, minute int, seconds float64) *DateTime { +func NewDateTime(tzoffset float32, year int32, month int32, day int32, hour int32, minute int32, seconds float64) *DateTime { var carg1 C.gfloat // in, none, casted var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted @@ -44660,11 +45438,11 @@ func NewDateTimeFromUnixEpochUTCUsecs(usecs int64) *DateTime { // // The function takes the following parameters: // -// - year int: the gregorian year -// - month int: the gregorian month, or -1 -// - day int: the day of the gregorian month, or -1 -// - hour int: the hour of the day, or -1 -// - minute int: the minute of the hour, or -1 +// - year int32: the gregorian year +// - month int32: the gregorian month, or -1 +// - day int32: the day of the gregorian month, or -1 +// - hour int32: the hour of the day, or -1 +// - minute int32: the minute of the hour, or -1 // - seconds float64: the second of the minute, or -1 // // The function returns the following values: @@ -44686,7 +45464,7 @@ func NewDateTimeFromUnixEpochUTCUsecs(usecs int64) *DateTime { // If @hour is -1, then the #GstDateTime created will only contain @year and // @month and @day, and the time fields will be considered not set. In this // case @minute and @seconds should also be -1. -func NewDateTimeLocalTime(year int, month int, day int, hour int, minute int, seconds float64) *DateTime { +func NewDateTimeLocalTime(year int32, month int32, day int32, hour int32, minute int32, seconds float64) *DateTime { var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted @@ -44766,7 +45544,7 @@ func NewDateTimeNowUTC() *DateTime { // // The function takes the following parameters: // -// - year int: the gregorian year +// - year int32: the gregorian year // // The function returns the following values: // @@ -44776,7 +45554,7 @@ func NewDateTimeNowUTC() *DateTime { // in the local timezone. // // @year should be from 1 to 9999. -func NewDateTimeY(year int) *DateTime { +func NewDateTimeY(year int32) *DateTime { var carg1 C.gint // in, none, casted var cret *C.GstDateTime // return, full, converted, nullable @@ -44798,8 +45576,8 @@ func NewDateTimeY(year int) *DateTime { // // The function takes the following parameters: // -// - year int: the gregorian year -// - month int: the gregorian month +// - year int32: the gregorian year +// - month int32: the gregorian month // // The function returns the following values: // @@ -44812,7 +45590,7 @@ func NewDateTimeY(year int) *DateTime { // // If value is -1 then all over value will be ignored. For example // if @month == -1, then #GstDateTime will created only for @year. -func NewDateTimeYM(year int, month int) *DateTime { +func NewDateTimeYM(year int32, month int32) *DateTime { var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted var cret *C.GstDateTime // return, full, converted, nullable @@ -44837,9 +45615,9 @@ func NewDateTimeYM(year int, month int) *DateTime { // // The function takes the following parameters: // -// - year int: the gregorian year -// - month int: the gregorian month -// - day int: the day of the gregorian month +// - year int32: the gregorian year +// - month int32: the gregorian month +// - day int32: the day of the gregorian month // // The function returns the following values: // @@ -44855,7 +45633,7 @@ func NewDateTimeYM(year int, month int) *DateTime { // if @month == -1, then #GstDateTime will created only for @year. If // @day == -1, then #GstDateTime will created for @year and @month and // so on. -func NewDateTimeYmd(year int, month int, day int) *DateTime { +func NewDateTimeYmd(year int32, month int32, day int32) *DateTime { var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted @@ -44883,10 +45661,10 @@ func NewDateTimeYmd(year int, month int, day int) *DateTime { // // The function returns the following values: // -// - goret int +// - goret int32 // // Returns the day of the month of this #GstDateTime. -func (datetime *DateTime) GetDay() int { +func (datetime *DateTime) GetDay() int32 { var carg0 *C.GstDateTime // in, none, converted var cret C.gint // return, none, casted @@ -44895,9 +45673,9 @@ func (datetime *DateTime) GetDay() int { cret = C.gst_date_time_get_day(carg0) runtime.KeepAlive(datetime) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -44906,11 +45684,11 @@ func (datetime *DateTime) GetDay() int { // // The function returns the following values: // -// - goret int +// - goret int32 // // Retrieves the hour of the day represented by @datetime in the gregorian // calendar. The return is in the range of 0 to 23. -func (datetime *DateTime) GetHour() int { +func (datetime *DateTime) GetHour() int32 { var carg0 *C.GstDateTime // in, none, converted var cret C.gint // return, none, casted @@ -44919,9 +45697,9 @@ func (datetime *DateTime) GetHour() int { cret = C.gst_date_time_get_hour(carg0) runtime.KeepAlive(datetime) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -44930,11 +45708,11 @@ func (datetime *DateTime) GetHour() int { // // The function returns the following values: // -// - goret int +// - goret int32 // // Retrieves the fractional part of the seconds in microseconds represented by // @datetime in the gregorian calendar. -func (datetime *DateTime) GetMicrosecond() int { +func (datetime *DateTime) GetMicrosecond() int32 { var carg0 *C.GstDateTime // in, none, converted var cret C.gint // return, none, casted @@ -44943,9 +45721,9 @@ func (datetime *DateTime) GetMicrosecond() int { cret = C.gst_date_time_get_microsecond(carg0) runtime.KeepAlive(datetime) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -44954,11 +45732,11 @@ func (datetime *DateTime) GetMicrosecond() int { // // The function returns the following values: // -// - goret int +// - goret int32 // // Retrieves the minute of the hour represented by @datetime in the gregorian // calendar. -func (datetime *DateTime) GetMinute() int { +func (datetime *DateTime) GetMinute() int32 { var carg0 *C.GstDateTime // in, none, converted var cret C.gint // return, none, casted @@ -44967,9 +45745,9 @@ func (datetime *DateTime) GetMinute() int { cret = C.gst_date_time_get_minute(carg0) runtime.KeepAlive(datetime) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -44978,10 +45756,10 @@ func (datetime *DateTime) GetMinute() int { // // The function returns the following values: // -// - goret int +// - goret int32 // // Returns the month of this #GstDateTime. January is 1, February is 2, etc.. -func (datetime *DateTime) GetMonth() int { +func (datetime *DateTime) GetMonth() int32 { var carg0 *C.GstDateTime // in, none, converted var cret C.gint // return, none, casted @@ -44990,9 +45768,9 @@ func (datetime *DateTime) GetMonth() int { cret = C.gst_date_time_get_month(carg0) runtime.KeepAlive(datetime) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -45001,11 +45779,11 @@ func (datetime *DateTime) GetMonth() int { // // The function returns the following values: // -// - goret int +// - goret int32 // // Retrieves the second of the minute represented by @datetime in the gregorian // calendar. -func (datetime *DateTime) GetSecond() int { +func (datetime *DateTime) GetSecond() int32 { var carg0 *C.GstDateTime // in, none, converted var cret C.gint // return, none, casted @@ -45014,9 +45792,9 @@ func (datetime *DateTime) GetSecond() int { cret = C.gst_date_time_get_second(carg0) runtime.KeepAlive(datetime) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -45051,11 +45829,11 @@ func (datetime *DateTime) GetTimeZoneOffset() float32 { // // The function returns the following values: // -// - goret int +// - goret int32 // // Returns the year of this #GstDateTime. // Call gst_date_time_has_year() before, to avoid warnings. -func (datetime *DateTime) GetYear() int { +func (datetime *DateTime) GetYear() int32 { var carg0 *C.GstDateTime // in, none, converted var cret C.gint // return, none, casted @@ -45064,9 +45842,9 @@ func (datetime *DateTime) GetYear() int { cret = C.gst_date_time_get_year(carg0) runtime.KeepAlive(datetime) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -46371,8 +47149,11 @@ func marshalEvent(p unsafe.Pointer) (interface{}, error) { return UnsafeEventFromGlibBorrow(b), nil } -func (r *Event) InitGoValue(v *gobject.Value) { - v.Init(TypeEvent) +func (r *Event) GoValueType() gobject.Type { + return TypeEvent +} + +func (r *Event) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -47631,6 +48412,8 @@ func (event *Event) HasName(name string) bool { // // Checks if @event has the given @name. This function is usually used to // check the name of a custom event. +// +// Deprecated: (since 1.26.0) Use gst_event_has_name(). func (event *Event) HasNameID(name glib.Quark) bool { var carg0 *C.GstEvent // in, none, converted var carg1 C.GQuark // in, none, casted, alias @@ -48638,6 +49421,447 @@ func (g *GhostPadClass) ParentClass() *ProxyPadClass { return parent } +// IdStr wraps GstIdStr +// +// A #GstIdStr is string type optimized for short strings and used for structure +// names, structure field names and in other places. +// +// Strings up to 16 bytes (including NUL terminator) are stored inline, other +// strings are stored on the heap. +// +// ```cpp +// GstIdStr s = GST_ID_STR_INIT; +// +// gst_id_str_set (&s, "Hello, World!"); +// g_print ("%s\n", gst_id_str_as_str (&s)); +// +// gst_id_str_clear (&s); +// ``` +type IdStr struct { + *idStr +} + +// idStr is the struct that's finalized +type idStr struct { + native *C.GstIdStr +} + +var _ gobject.GoValueInitializer = (*IdStr)(nil) + +func marshalIdStr(p unsafe.Pointer) (interface{}, error) { + b := gobject.ValueFromNative(p).Boxed() + return UnsafeIdStrFromGlibBorrow(b), nil +} + +func (r *IdStr) GoValueType() gobject.Type { + return TypeIdStr +} + +func (r *IdStr) SetGoValue(v *gobject.Value) { + v.SetBoxed(unsafe.Pointer(r.native)) +} + +// UnsafeIdStrFromGlibBorrow is used to convert raw C.GstIdStr pointers to go. This is used by the bindings internally. +func UnsafeIdStrFromGlibBorrow(p unsafe.Pointer) *IdStr { + return &IdStr{&idStr{(*C.GstIdStr)(p)}} +} + +// UnsafeIdStrFromGlibNone is used to convert raw C.GstIdStr pointers to go without transferring ownership. This is used by the bindings internally. +func UnsafeIdStrFromGlibNone(p unsafe.Pointer) *IdStr { + // FIXME: this has no ref function, what should we do here? + wrapped := UnsafeIdStrFromGlibBorrow(p) + runtime.SetFinalizer( + wrapped.idStr, + func (intern *idStr) { + C.gst_id_str_free(intern.native) + }, + ) + return wrapped +} + +// UnsafeIdStrFromGlibFull is used to convert raw C.GstIdStr pointers to go while taking ownership. This is used by the bindings internally. +func UnsafeIdStrFromGlibFull(p unsafe.Pointer) *IdStr { + wrapped := UnsafeIdStrFromGlibBorrow(p) + runtime.SetFinalizer( + wrapped.idStr, + func (intern *idStr) { + C.gst_id_str_free(intern.native) + }, + ) + return wrapped +} + +// UnsafeIdStrFree unrefs/frees the underlying resource. This is used by the bindings internally. +// +// After this is called, no other method on [IdStr] is expected to work anymore. +func UnsafeIdStrFree(i *IdStr) { + C.gst_id_str_free(i.native) +} + +// UnsafeIdStrToGlibNone returns the underlying C pointer. This is used by the bindings internally. +func UnsafeIdStrToGlibNone(i *IdStr) unsafe.Pointer { + return unsafe.Pointer(i.native) +} + +// UnsafeIdStrToGlibFull returns the underlying C pointer and gives up ownership. +// This is used by the bindings internally. +func UnsafeIdStrToGlibFull(i *IdStr) unsafe.Pointer { + runtime.SetFinalizer(i.idStr, nil) + _p := unsafe.Pointer(i.native) + i.native = nil // IdStr is invalid from here on + return _p +} + +// NewIdStr wraps gst_id_str_new +// +// The function returns the following values: +// +// - goret *IdStr +// +// Returns a newly heap allocated empty string. +func NewIdStr() *IdStr { + var cret *C.GstIdStr // return, full, converted + + cret = C.gst_id_str_new() + + var goret *IdStr + + goret = UnsafeIdStrFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// AsStr wraps gst_id_str_as_str +// +// The function returns the following values: +// +// - goret string +func (s *IdStr) AsStr() string { + var carg0 *C.GstIdStr // in, none, converted + var cret *C.gchar // return, none, string + + carg0 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(s)) + + cret = C.gst_id_str_as_str(carg0) + runtime.KeepAlive(s) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + +// Clear wraps gst_id_str_clear +// +// Clears @s and sets it to the empty string. +func (s *IdStr) Clear() { + var carg0 *C.GstIdStr // in, none, converted + + carg0 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(s)) + + C.gst_id_str_clear(carg0) + runtime.KeepAlive(s) +} + +// Copy wraps gst_id_str_copy +// +// The function returns the following values: +// +// - goret *IdStr +// +// Copies @s into newly allocated heap memory. +func (s *IdStr) Copy() *IdStr { + var carg0 *C.GstIdStr // in, none, converted + var cret *C.GstIdStr // return, full, converted + + carg0 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(s)) + + cret = C.gst_id_str_copy(carg0) + runtime.KeepAlive(s) + + var goret *IdStr + + goret = UnsafeIdStrFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// CopyInto wraps gst_id_str_copy_into +// +// The function takes the following parameters: +// +// - s *IdStr: The source %GstIdStr +// +// Copies @s into @d. +func (d *IdStr) CopyInto(s *IdStr) { + var carg0 *C.GstIdStr // in, none, converted + var carg1 *C.GstIdStr // in, none, converted + + carg0 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(d)) + carg1 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(s)) + + C.gst_id_str_copy_into(carg0, carg1) + runtime.KeepAlive(d) + runtime.KeepAlive(s) +} + +// GetLen wraps gst_id_str_get_len +// +// The function returns the following values: +// +// - goret uint +// +// Returns the length of @s, exluding the NUL-terminator. This is equivalent to +// calling `strcmp()` but potentially faster. +func (s *IdStr) GetLen() uint { + var carg0 *C.GstIdStr // in, none, converted + var cret C.gsize // return, none, casted + + carg0 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(s)) + + cret = C.gst_id_str_get_len(carg0) + runtime.KeepAlive(s) + + var goret uint + + goret = uint(cret) + + return goret +} + +// Init wraps gst_id_str_init +// +// Initializes a (usually stack-allocated) id string @s. The newly-initialized +// id string will contain an empty string by default as value. +func (s *IdStr) Init() { + var carg0 *C.GstIdStr // in, none, converted + + carg0 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(s)) + + C.gst_id_str_init(carg0) + runtime.KeepAlive(s) +} + +// IsEqual wraps gst_id_str_is_equal +// +// The function takes the following parameters: +// +// - s2 *IdStr: A %GstIdStr +// +// The function returns the following values: +// +// - goret bool +// +// Compares @s1 and @s2 for equality. +func (s1 *IdStr) IsEqual(s2 *IdStr) bool { + var carg0 *C.GstIdStr // in, none, converted + var carg1 *C.GstIdStr // in, none, converted + var cret C.gboolean // return + + carg0 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(s1)) + carg1 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(s2)) + + cret = C.gst_id_str_is_equal(carg0, carg1) + runtime.KeepAlive(s1) + runtime.KeepAlive(s2) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + +// IsEqualToStr wraps gst_id_str_is_equal_to_str +// +// The function takes the following parameters: +// +// - s2 string: A string +// +// The function returns the following values: +// +// - goret bool +// +// Compares @s1 and @s2 for equality. +func (s1 *IdStr) IsEqualToStr(s2 string) bool { + var carg0 *C.GstIdStr // in, none, converted + var carg1 *C.gchar // in, none, string + var cret C.gboolean // return + + carg0 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(s1)) + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(s2))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_id_str_is_equal_to_str(carg0, carg1) + runtime.KeepAlive(s1) + runtime.KeepAlive(s2) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + +// IsEqualToStrWithLen wraps gst_id_str_is_equal_to_str_with_len +// +// The function takes the following parameters: +// +// - s2 string: A string +// - len uint: Length of @s2. +// +// The function returns the following values: +// +// - goret bool +// +// Compares @s1 and @s2 with length @len for equality. @s2 does not have to be +// NUL-terminated and @len should not include the NUL-terminator. +// +// This is generally faster than gst_id_str_is_equal_to_str() if the length is +// already known. +func (s1 *IdStr) IsEqualToStrWithLen(s2 string, len uint) bool { + var carg0 *C.GstIdStr // in, none, converted + var carg1 *C.gchar // in, none, string + var carg2 C.gsize // in, none, casted + var cret C.gboolean // return + + carg0 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(s1)) + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(s2))) + defer C.free(unsafe.Pointer(carg1)) + carg2 = C.gsize(len) + + cret = C.gst_id_str_is_equal_to_str_with_len(carg0, carg1, carg2) + runtime.KeepAlive(s1) + runtime.KeepAlive(s2) + runtime.KeepAlive(len) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + +// Move wraps gst_id_str_move +// +// The function takes the following parameters: +// +// - s *IdStr: The source %GstIdStr +// +// Moves @s into @d and resets @s. +func (d *IdStr) Move(s *IdStr) { + var carg0 *C.GstIdStr // in, none, converted + var carg1 *C.GstIdStr // in, none, converted + + carg0 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(d)) + carg1 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(s)) + + C.gst_id_str_move(carg0, carg1) + runtime.KeepAlive(d) + runtime.KeepAlive(s) +} + +// Set wraps gst_id_str_set +// +// The function takes the following parameters: +// +// - value string: A NUL-terminated string +// +// Sets @s to the string @value. +func (s *IdStr) Set(value string) { + var carg0 *C.GstIdStr // in, none, converted + var carg1 *C.gchar // in, none, string + + carg0 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(s)) + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(value))) + defer C.free(unsafe.Pointer(carg1)) + + C.gst_id_str_set(carg0, carg1) + runtime.KeepAlive(s) + runtime.KeepAlive(value) +} + +// SetStaticStr wraps gst_id_str_set_static_str +// +// The function takes the following parameters: +// +// - value string: A NUL-terminated string +// +// Sets @s to the string @value. @value needs to be valid for the remaining +// lifetime of the process, e.g. has to be a static string. +func (s *IdStr) SetStaticStr(value string) { + var carg0 *C.GstIdStr // in, none, converted + var carg1 *C.gchar // in, none, string + + carg0 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(s)) + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(value))) + defer C.free(unsafe.Pointer(carg1)) + + C.gst_id_str_set_static_str(carg0, carg1) + runtime.KeepAlive(s) + runtime.KeepAlive(value) +} + +// SetStaticStrWithLen wraps gst_id_str_set_static_str_with_len +// +// The function takes the following parameters: +// +// - value string: A string +// - len uint: Length of the string +// +// Sets @s to the string @value of length @len. @value needs to be valid for the +// remaining lifetime of the process, e.g. has to be a static string. +// +// @value must be NUL-terminated and @len should not include the +// NUL-terminator. +func (s *IdStr) SetStaticStrWithLen(value string, len uint) { + var carg0 *C.GstIdStr // in, none, converted + var carg1 *C.gchar // in, none, string + var carg2 C.gsize // in, none, casted + + carg0 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(s)) + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(value))) + defer C.free(unsafe.Pointer(carg1)) + carg2 = C.gsize(len) + + C.gst_id_str_set_static_str_with_len(carg0, carg1, carg2) + runtime.KeepAlive(s) + runtime.KeepAlive(value) + runtime.KeepAlive(len) +} + +// SetWithLen wraps gst_id_str_set_with_len +// +// The function takes the following parameters: +// +// - value string: A string +// - len uint: Length of the string +// +// Sets @s to the string @value of length @len. @value does not have to be +// NUL-terminated and @len should not include the NUL-terminator. +func (s *IdStr) SetWithLen(value string, len uint) { + var carg0 *C.GstIdStr // in, none, converted + var carg1 *C.gchar // in, none, string + var carg2 C.gsize // in, none, casted + + carg0 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(s)) + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(value))) + defer C.free(unsafe.Pointer(carg1)) + carg2 = C.gsize(len) + + C.gst_id_str_set_with_len(carg0, carg1, carg2) + runtime.KeepAlive(s) + runtime.KeepAlive(value) + runtime.KeepAlive(len) +} + // Iterator wraps GstIterator // // A GstIterator is used to retrieve multiple objects from another object in @@ -48694,8 +49918,11 @@ func marshalIterator(p unsafe.Pointer) (interface{}, error) { return UnsafeIteratorFromGlibBorrow(b), nil } -func (r *Iterator) InitGoValue(v *gobject.Value) { - v.Init(TypeIterator) +func (r *Iterator) GoValueType() gobject.Type { + return TypeIterator +} + +func (r *Iterator) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -48993,8 +50220,11 @@ func marshalMemory(p unsafe.Pointer) (interface{}, error) { return UnsafeMemoryFromGlibBorrow(b), nil } -func (r *Memory) InitGoValue(v *gobject.Value) { - v.Init(TypeMemory) +func (r *Memory) GoValueType() gobject.Type { + return TypeMemory +} + +func (r *Memory) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -49289,8 +50519,11 @@ func marshalMessage(p unsafe.Pointer) (interface{}, error) { return UnsafeMessageFromGlibBorrow(b), nil } -func (r *Message) InitGoValue(v *gobject.Value) { - v.Init(TypeMessage) +func (r *Message) GoValueType() gobject.Type { + return TypeMessage +} + +func (r *Message) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -49451,7 +50684,7 @@ func NewMessageAsyncStart(src Object) *Message { // The function takes the following parameters: // // - src Object (nullable): The object originating the message. -// - percent int: The buffering percent +// - percent int32: The buffering percent // // The function returns the following values: // @@ -49469,7 +50702,7 @@ func NewMessageAsyncStart(src Object) *Message { // completed prerolling. // // MT safe. -func NewMessageBuffering(src Object, percent int) *Message { +func NewMessageBuffering(src Object, percent int32) *Message { var carg1 *C.GstObject // in, none, converted, nullable var carg2 C.gint // in, none, casted var cret *C.GstMessage // return, full, converted @@ -51110,6 +52343,34 @@ func (msg *Message) Copy() *Message { return goret } +// GetDetails wraps gst_message_get_details +// +// The function returns the following values: +// +// - goret *Structure (nullable) +// +// Returns the optional details structure of the message. May be NULL if none. +// +// The returned structure must not be freed. +func (message *Message) GetDetails() *Structure { + var carg0 *C.GstMessage // in, none, converted + var cret *C.GstStructure // return, borrow, converted, nullable + + carg0 = (*C.GstMessage)(UnsafeMessageToGlibNone(message)) + + cret = C.gst_message_get_details(carg0) + runtime.KeepAlive(message) + + var goret *Structure + + if cret != nil { + goret = UnsafeStructureFromGlibBorrow(unsafe.Pointer(cret)) + runtime.AddCleanup(goret, func(_ *Message) {}, message) + } + + return goret +} + // GetNumRedirectEntries wraps gst_message_get_num_redirect_entries // // The function returns the following values: @@ -51254,13 +52515,13 @@ func (message *Message) ParseAsyncDone() ClockTime { // // The function returns the following values: // -// - percent int: Return location for the percent. +// - percent int32: Return location for the percent. // // Extracts the buffering percent from the GstMessage. see also // gst_message_new_buffering(). // // MT safe. -func (message *Message) ParseBuffering() int { +func (message *Message) ParseBuffering() int32 { var carg0 *C.GstMessage // in, none, converted var carg1 C.gint // out, full, casted @@ -51269,9 +52530,9 @@ func (message *Message) ParseBuffering() int { C.gst_message_parse_buffering(carg0, &carg1) runtime.KeepAlive(message) - var percent int + var percent int32 - percent = int(carg1) + percent = int32(carg1) return percent } @@ -51281,13 +52542,13 @@ func (message *Message) ParseBuffering() int { // The function returns the following values: // // - mode BufferingMode: a buffering mode, or %NULL -// - avgIn int: the average input rate, or %NULL -// - avgOut int: the average output rate, or %NULL +// - avgIn int32: the average input rate, or %NULL +// - avgOut int32: the average output rate, or %NULL // - bufferingLeft int64: amount of buffering time left in // milliseconds, or %NULL // // Extracts the buffering stats values from @message. -func (message *Message) ParseBufferingStats() (BufferingMode, int, int, int64) { +func (message *Message) ParseBufferingStats() (BufferingMode, int32, int32, int64) { var carg0 *C.GstMessage // in, none, converted var carg1 C.GstBufferingMode // out, full, casted var carg2 C.gint // out, full, casted @@ -51300,13 +52561,13 @@ func (message *Message) ParseBufferingStats() (BufferingMode, int, int, int64) { runtime.KeepAlive(message) var mode BufferingMode - var avgIn int - var avgOut int + var avgIn int32 + var avgOut int32 var bufferingLeft int64 mode = BufferingMode(carg1) - avgIn = int(carg2) - avgOut = int(carg3) + avgIn = int32(carg2) + avgOut = int32(carg3) bufferingLeft = int64(carg4) return mode, avgIn, avgOut, bufferingLeft @@ -51565,6 +52826,32 @@ func (message *Message) ParseErrorDetails() *Structure { return structure } +// ParseErrorWritableDetails wraps gst_message_parse_error_writable_details +// +// The function returns the following values: +// +// - structure *Structure (nullable): A pointer to the returned details +// +// Returns the details structure if present or will create one if not present. +// The returned structure must not be freed. +func (message *Message) ParseErrorWritableDetails() *Structure { + var carg0 *C.GstMessage // in, none, converted + var carg1 *C.GstStructure // out, none, converted, nullable + + carg0 = (*C.GstMessage)(UnsafeMessageToGlibNone(message)) + + C.gst_message_parse_error_writable_details(carg0, &carg1) + runtime.KeepAlive(message) + + var structure *Structure + + if carg1 != nil { + structure = UnsafeStructureFromGlibNone(unsafe.Pointer(carg1)) + } + + return structure +} + // ParseGroupID wraps gst_message_parse_group_id // // The function returns the following values: @@ -51681,6 +52968,32 @@ func (message *Message) ParseInfoDetails() *Structure { return structure } +// ParseInfoWritableDetails wraps gst_message_parse_info_writable_details +// +// The function returns the following values: +// +// - structure *Structure (nullable): A pointer to the returned details +// +// Returns the details structure if present or will create one if not present. +// The returned structure must not be freed. +func (message *Message) ParseInfoWritableDetails() *Structure { + var carg0 *C.GstMessage // in, none, converted + var carg1 *C.GstStructure // out, none, converted, nullable + + carg0 = (*C.GstMessage)(UnsafeMessageToGlibNone(message)) + + C.gst_message_parse_info_writable_details(carg0, &carg1) + runtime.KeepAlive(message) + + var structure *Structure + + if carg1 != nil { + structure = UnsafeStructureFromGlibNone(unsafe.Pointer(carg1)) + } + + return structure +} + // ParseInstantRateRequest wraps gst_message_parse_instant_rate_request // // The function returns the following values: @@ -51865,14 +53178,14 @@ func (message *Message) ParseQosStats() (Format, uint64, uint64) { // the deadline. // - proportion float64: Long term prediction of the ideal rate // relative to normal rate to get optimal quality. -// - quality int: An element dependent integer value that +// - quality int32: An element dependent integer value that // specifies the current quality level of the element. The default // maximum quality is 1000000. // // Extract the QoS values that have been calculated/analysed from the QoS data // // MT safe. -func (message *Message) ParseQosValues() (int64, float64, int) { +func (message *Message) ParseQosValues() (int64, float64, int32) { var carg0 *C.GstMessage // in, none, converted var carg1 C.gint64 // out, full, casted var carg2 C.gdouble // out, full, casted @@ -51885,11 +53198,11 @@ func (message *Message) ParseQosValues() (int64, float64, int) { var jitter int64 var proportion float64 - var quality int + var quality int32 jitter = int64(carg1) proportion = float64(carg2) - quality = int(carg3) + quality = int32(carg3) return jitter, proportion, quality } @@ -52461,17 +53774,43 @@ func (message *Message) ParseWarningDetails() *Structure { return structure } +// ParseWarningWritableDetails wraps gst_message_parse_warning_writable_details +// +// The function returns the following values: +// +// - structure *Structure (nullable): A pointer to the returned details +// +// Returns the details structure if present or will create one if not present. +// The returned structure must not be freed. +func (message *Message) ParseWarningWritableDetails() *Structure { + var carg0 *C.GstMessage // in, none, converted + var carg1 *C.GstStructure // out, none, converted, nullable + + carg0 = (*C.GstMessage)(UnsafeMessageToGlibNone(message)) + + C.gst_message_parse_warning_writable_details(carg0, &carg1) + runtime.KeepAlive(message) + + var structure *Structure + + if carg1 != nil { + structure = UnsafeStructureFromGlibNone(unsafe.Pointer(carg1)) + } + + return structure +} + // SetBufferingStats wraps gst_message_set_buffering_stats // // The function takes the following parameters: // // - mode BufferingMode: a buffering mode -// - avgIn int: the average input rate -// - avgOut int: the average output rate +// - avgIn int32: the average input rate +// - avgOut int32: the average output rate // - bufferingLeft int64: amount of buffering time left in milliseconds // // Configures the buffering stats values in @message. -func (message *Message) SetBufferingStats(mode BufferingMode, avgIn int, avgOut int, bufferingLeft int64) { +func (message *Message) SetBufferingStats(mode BufferingMode, avgIn int32, avgOut int32, bufferingLeft int64) { var carg0 *C.GstMessage // in, none, converted var carg1 C.GstBufferingMode // in, none, casted var carg2 C.gint // in, none, casted @@ -52492,6 +53831,28 @@ func (message *Message) SetBufferingStats(mode BufferingMode, avgIn int, avgOut runtime.KeepAlive(bufferingLeft) } +// SetDetails wraps gst_message_set_details +// +// The function takes the following parameters: +// +// - details *Structure (nullable): A GstStructure with details +// +// Add @details to @message. Will fail if the message already has details set on +// it or if it is not writable. +func (message *Message) SetDetails(details *Structure) { + var carg0 *C.GstMessage // in, none, converted + var carg1 *C.GstStructure // in, full, converted, nullable + + carg0 = (*C.GstMessage)(UnsafeMessageToGlibNone(message)) + if details != nil { + carg1 = (*C.GstStructure)(UnsafeStructureToGlibFull(details)) + } + + C.gst_message_set_details(carg0, carg1) + runtime.KeepAlive(message) + runtime.KeepAlive(details) +} + // SetGroupID wraps gst_message_set_group_id // // The function takes the following parameters: @@ -52563,13 +53924,13 @@ func (message *Message) SetQosStats(format Format, processed uint64, dropped uin // - jitter int64: The difference of the running-time against the deadline. // - proportion float64: Long term prediction of the ideal rate relative to normal rate // to get optimal quality. -// - quality int: An element dependent integer value that specifies the current +// - quality int32: An element dependent integer value that specifies the current // quality level of the element. The default maximum quality is 1000000. // // Set the QoS values that have been calculated/analysed from the QoS data // // MT safe. -func (message *Message) SetQosValues(jitter int64, proportion float64, quality int) { +func (message *Message) SetQosValues(jitter int64, proportion float64, quality int32) { var carg0 *C.GstMessage // in, none, converted var carg1 C.gint64 // in, none, casted var carg2 C.gdouble // in, none, casted @@ -52706,6 +54067,34 @@ func (message *Message) StreamsSelectedGetStream(idx uint) Stream { return goret } +// WritableDetails wraps gst_message_writable_details +// +// The function returns the following values: +// +// - goret *Structure +// +// Returns the details structure of the @message. If not present it will be +// created. Use this function (instead of gst_message_get_details()) if you +// want to write to the @details structure. +// +// The returned structure must not be freed. +func (message *Message) WritableDetails() *Structure { + var carg0 *C.GstMessage // in, none, converted + var cret *C.GstStructure // return, borrow, converted + + carg0 = (*C.GstMessage)(UnsafeMessageToGlibNone(message)) + + cret = C.gst_message_writable_details(carg0) + runtime.KeepAlive(message) + + var goret *Structure + + goret = UnsafeStructureFromGlibBorrow(unsafe.Pointer(cret)) + runtime.AddCleanup(goret, func(_ *Message) {}, message) + + return goret +} + // WritableStructure wraps gst_message_writable_structure // // The function returns the following values: @@ -53025,11 +54414,11 @@ func MetaRegisterCustomSimple(name string) *MetaInfo { // // The function returns the following values: // -// - goret int +// - goret int32 // // Meta sequence number compare function. Can be used as #GCompareFunc // or a #GCompareDataFunc. -func (meta1 *Meta) CompareSeqnum(meta2 *Meta) int { +func (meta1 *Meta) CompareSeqnum(meta2 *Meta) int32 { var carg0 *C.GstMeta // in, none, converted var carg1 *C.GstMeta // in, none, converted var cret C.gint // return, none, casted @@ -53041,9 +54430,9 @@ func (meta1 *Meta) CompareSeqnum(meta2 *Meta) int { runtime.KeepAlive(meta1) runtime.KeepAlive(meta2) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -53335,8 +54724,11 @@ func marshalMiniObject(p unsafe.Pointer) (interface{}, error) { return UnsafeMiniObjectFromGlibBorrow(b), nil } -func (r *MiniObject) InitGoValue(v *gobject.Value) { - v.Init(TypeMiniObject) +func (r *MiniObject) GoValueType() gobject.Type { + return TypeMiniObject +} + +func (r *MiniObject) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -53908,8 +55300,11 @@ func marshalParseContext(p unsafe.Pointer) (interface{}, error) { return UnsafeParseContextFromGlibBorrow(b), nil } -func (r *ParseContext) InitGoValue(v *gobject.Value) { - v.Init(TypeParseContext) +func (r *ParseContext) GoValueType() gobject.Type { + return TypeParseContext +} + +func (r *ParseContext) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -54817,7 +56212,7 @@ func (set *Poll) SetFlushing(flushing bool) { // // The function returns the following values: // -// - goret int +// - goret int32 // // Wait for activity on the file descriptors in @set. This function waits up to // the specified @timeout. A timeout of #GST_CLOCK_TIME_NONE waits forever. @@ -54829,7 +56224,7 @@ func (set *Poll) SetFlushing(flushing bool) { // This is not true for timer #GstPoll objects created with // gst_poll_new_timer(), where it is allowed to have multiple threads waiting // simultaneously. -func (set *Poll) Wait(timeout ClockTime) int { +func (set *Poll) Wait(timeout ClockTime) int32 { var carg0 *C.GstPoll // in, none, converted var carg1 C.GstClockTime // in, none, casted, alias var cret C.gint // return, none, casted @@ -54841,9 +56236,9 @@ func (set *Poll) Wait(timeout ClockTime) int { runtime.KeepAlive(set) runtime.KeepAlive(timeout) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -55093,8 +56488,11 @@ func marshalPromise(p unsafe.Pointer) (interface{}, error) { return UnsafePromiseFromGlibBorrow(b), nil } -func (r *Promise) InitGoValue(v *gobject.Value) { - v.Init(TypePromise) +func (r *Promise) GoValueType() gobject.Type { + return TypePromise +} + +func (r *Promise) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -55464,8 +56862,11 @@ func marshalQuery(p unsafe.Pointer) (interface{}, error) { return UnsafeQueryFromGlibBorrow(b), nil } -func (r *Query) InitGoValue(v *gobject.Value) { - v.Init(TypeQuery) +func (r *Query) GoValueType() gobject.Type { + return TypeQuery +} + +func (r *Query) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -56561,11 +57962,11 @@ func (query *Query) ParseBitrate() uint { // The function returns the following values: // // - busy bool: if buffering is busy, or %NULL -// - percent int: a buffering percent, or %NULL +// - percent int32: a buffering percent, or %NULL // // Get the percentage of buffered data. This is a value between 0 and 100. // The @busy indicator is %TRUE when the buffering is in progress. -func (query *Query) ParseBufferingPercent() (bool, int) { +func (query *Query) ParseBufferingPercent() (bool, int32) { var carg0 *C.GstQuery // in, none, converted var carg1 C.gboolean // out var carg2 C.gint // out, full, casted @@ -56576,12 +57977,12 @@ func (query *Query) ParseBufferingPercent() (bool, int) { runtime.KeepAlive(query) var busy bool - var percent int + var percent int32 if carg1 != 0 { busy = true } - percent = int(carg2) + percent = int32(carg2) return busy, percent } @@ -56630,13 +58031,13 @@ func (query *Query) ParseBufferingRange() (Format, int64, int64, int64) { // The function returns the following values: // // - mode BufferingMode: a buffering mode, or %NULL -// - avgIn int: the average input rate, or %NULL -// - avgOut int: the average output rat, or %NULL +// - avgIn int32: the average input rate, or %NULL +// - avgOut int32: the average output rat, or %NULL // - bufferingLeft int64: amount of buffering time left in // milliseconds, or %NULL // // Extracts the buffering stats values from @query. -func (query *Query) ParseBufferingStats() (BufferingMode, int, int, int64) { +func (query *Query) ParseBufferingStats() (BufferingMode, int32, int32, int64) { var carg0 *C.GstQuery // in, none, converted var carg1 C.GstBufferingMode // out, full, casted var carg2 C.gint // out, full, casted @@ -56649,13 +58050,13 @@ func (query *Query) ParseBufferingStats() (BufferingMode, int, int, int64) { runtime.KeepAlive(query) var mode BufferingMode - var avgIn int - var avgOut int + var avgIn int32 + var avgOut int32 var bufferingLeft int64 mode = BufferingMode(carg1) - avgIn = int(carg2) - avgOut = int(carg3) + avgIn = int32(carg2) + avgOut = int32(carg3) bufferingLeft = int64(carg4) return mode, avgIn, avgOut, bufferingLeft @@ -57148,12 +58549,12 @@ func (query *Query) ParsePosition() (Format, int64) { // The function returns the following values: // // - flags SchedulingFlags: #GstSchedulingFlags -// - minsize int: the suggested minimum size of pull requests -// - maxsize int: the suggested maximum size of pull requests: -// - align int: the suggested alignment of pull requests +// - minsize int32: the suggested minimum size of pull requests +// - maxsize int32: the suggested maximum size of pull requests: +// - align int32: the suggested alignment of pull requests // // Set the scheduling properties. -func (query *Query) ParseScheduling() (SchedulingFlags, int, int, int) { +func (query *Query) ParseScheduling() (SchedulingFlags, int32, int32, int32) { var carg0 *C.GstQuery // in, none, converted var carg1 C.GstSchedulingFlags // out, full, casted var carg2 C.gint // out, full, casted @@ -57166,14 +58567,14 @@ func (query *Query) ParseScheduling() (SchedulingFlags, int, int, int) { runtime.KeepAlive(query) var flags SchedulingFlags - var minsize int - var maxsize int - var align int + var minsize int32 + var maxsize int32 + var align int32 flags = SchedulingFlags(carg1) - minsize = int(carg2) - maxsize = int(carg3) - align = int(carg4) + minsize = int32(carg2) + maxsize = int32(carg3) + align = int32(carg4) return flags, minsize, maxsize, align } @@ -57473,11 +58874,11 @@ func (query *Query) SetBitrate(nominalBitrate uint) { // The function takes the following parameters: // // - busy bool: if buffering is busy -// - percent int: a buffering percent +// - percent int32: a buffering percent // // Set the percentage of buffered data. This is a value between 0 and 100. // The @busy indicator is %TRUE when the buffering is in progress. -func (query *Query) SetBufferingPercent(busy bool, percent int) { +func (query *Query) SetBufferingPercent(busy bool, percent int32) { var carg0 *C.GstQuery // in, none, converted var carg1 C.gboolean // in var carg2 C.gint // in, none, casted @@ -57531,12 +58932,12 @@ func (query *Query) SetBufferingRange(format Format, start int64, stop int64, es // The function takes the following parameters: // // - mode BufferingMode: a buffering mode -// - avgIn int: the average input rate -// - avgOut int: the average output rate +// - avgIn int32: the average input rate +// - avgOut int32: the average output rate // - bufferingLeft int64: amount of buffering time left in milliseconds // // Configures the buffering stats values in @query. -func (query *Query) SetBufferingStats(mode BufferingMode, avgIn int, avgOut int, bufferingLeft int64) { +func (query *Query) SetBufferingStats(mode BufferingMode, avgIn int32, avgOut int32, bufferingLeft int64) { var carg0 *C.GstQuery // in, none, converted var carg1 C.GstBufferingMode // in, none, casted var carg2 C.gint // in, none, casted @@ -57804,12 +59205,12 @@ func (query *Query) SetPosition(format Format, cur int64) { // The function takes the following parameters: // // - flags SchedulingFlags: #GstSchedulingFlags -// - minsize int: the suggested minimum size of pull requests -// - maxsize int: the suggested maximum size of pull requests -// - align int: the suggested alignment of pull requests +// - minsize int32: the suggested minimum size of pull requests +// - maxsize int32: the suggested maximum size of pull requests +// - align int32: the suggested alignment of pull requests // // Set the scheduling properties. -func (query *Query) SetScheduling(flags SchedulingFlags, minsize int, maxsize int, align int) { +func (query *Query) SetScheduling(flags SchedulingFlags, minsize int32, maxsize int32, align int32) { var carg0 *C.GstQuery // in, none, converted var carg1 C.GstSchedulingFlags // in, none, casted var carg2 C.gint // in, none, casted @@ -58177,8 +59578,11 @@ func marshalSample(p unsafe.Pointer) (interface{}, error) { return UnsafeSampleFromGlibBorrow(b), nil } -func (r *Sample) InitGoValue(v *gobject.Value) { - v.Init(TypeSample) +func (r *Sample) GoValueType() gobject.Type { + return TypeSample +} + +func (r *Sample) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -58582,8 +59986,11 @@ func marshalSegment(p unsafe.Pointer) (interface{}, error) { return UnsafeSegmentFromGlibBorrow(b), nil } -func (r *Segment) InitGoValue(v *gobject.Value) { - v.Init(TypeSegment) +func (r *Segment) GoValueType() gobject.Type { + return TypeSegment +} + +func (r *Segment) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -58990,7 +60397,7 @@ func (segment *Segment) PositionFromRunningTime(format Format, runningTime uint6 // The function returns the following values: // // - position uint64: the resulting position in the segment -// - goret int +// - goret int32 // // Translate @running_time to the segment position using the currently configured // segment. Compared to gst_segment_position_from_running_time() this function can @@ -59008,7 +60415,7 @@ func (segment *Segment) PositionFromRunningTime(format Format, runningTime uint6 // When this function returns -1, the returned @position was < 0, and the value // in the position variable should be negated to get the real negative segment // position. -func (segment *Segment) PositionFromRunningTimeFull(format Format, runningTime uint64) (uint64, int) { +func (segment *Segment) PositionFromRunningTimeFull(format Format, runningTime uint64) (uint64, int32) { var carg0 *C.GstSegment // in, none, converted var carg1 C.GstFormat // in, none, casted var carg2 C.guint64 // in, none, casted @@ -59025,10 +60432,10 @@ func (segment *Segment) PositionFromRunningTimeFull(format Format, runningTime u runtime.KeepAlive(runningTime) var position uint64 - var goret int + var goret int32 position = uint64(carg3) - goret = int(cret) + goret = int32(cret) return position, goret } @@ -59078,7 +60485,7 @@ func (segment *Segment) PositionFromStreamTime(format Format, streamTime uint64) // The function returns the following values: // // - position uint64: the resulting position in the segment -// - goret int +// - goret int32 // // Translate @stream_time to the segment position using the currently configured // segment. Compared to gst_segment_position_from_stream_time() this function can @@ -59095,7 +60502,7 @@ func (segment *Segment) PositionFromStreamTime(format Format, streamTime uint64) // // When this function returns -1, the returned @position should be negated // to get the real negative segment position. -func (segment *Segment) PositionFromStreamTimeFull(format Format, streamTime uint64) (uint64, int) { +func (segment *Segment) PositionFromStreamTimeFull(format Format, streamTime uint64) (uint64, int32) { var carg0 *C.GstSegment // in, none, converted var carg1 C.GstFormat // in, none, casted var carg2 C.guint64 // in, none, casted @@ -59112,10 +60519,10 @@ func (segment *Segment) PositionFromStreamTimeFull(format Format, streamTime uin runtime.KeepAlive(streamTime) var position uint64 - var goret int + var goret int32 position = uint64(carg3) - goret = int(cret) + goret = int32(cret) return position, goret } @@ -59246,7 +60653,7 @@ func (segment *Segment) ToRunningTime(format Format, position uint64) uint64 { // The function returns the following values: // // - runningTime uint64: result running-time -// - goret int +// - goret int32 // // Translate @position to the total running time using the currently configured // segment. Compared to gst_segment_to_running_time() this function can return @@ -59263,7 +60670,7 @@ func (segment *Segment) ToRunningTime(format Format, position uint64) uint64 { // // When this function returns -1, the returned @running_time should be negated // to get the real negative running time. -func (segment *Segment) ToRunningTimeFull(format Format, position uint64) (uint64, int) { +func (segment *Segment) ToRunningTimeFull(format Format, position uint64) (uint64, int32) { var carg0 *C.GstSegment // in, none, converted var carg1 C.GstFormat // in, none, casted var carg2 C.guint64 // in, none, casted @@ -59280,10 +60687,10 @@ func (segment *Segment) ToRunningTimeFull(format Format, position uint64) (uint6 runtime.KeepAlive(position) var runningTime uint64 - var goret int + var goret int32 runningTime = uint64(carg3) - goret = int(cret) + goret = int32(cret) return runningTime, goret } @@ -59341,7 +60748,7 @@ func (segment *Segment) ToStreamTime(format Format, position uint64) uint64 { // The function returns the following values: // // - streamTime uint64: result stream-time -// - goret int +// - goret int32 // // Translate @position to the total stream time using the currently configured // segment. Compared to gst_segment_to_stream_time() this function can return @@ -59358,7 +60765,7 @@ func (segment *Segment) ToStreamTime(format Format, position uint64) uint64 { // // When this function returns -1, the returned @stream_time should be negated // to get the real negative stream time. -func (segment *Segment) ToStreamTimeFull(format Format, position uint64) (uint64, int) { +func (segment *Segment) ToStreamTimeFull(format Format, position uint64) (uint64, int32) { var carg0 *C.GstSegment // in, none, converted var carg1 C.GstFormat // in, none, casted var carg2 C.guint64 // in, none, casted @@ -59375,10 +60782,10 @@ func (segment *Segment) ToStreamTimeFull(format Format, position uint64) (uint64 runtime.KeepAlive(position) var streamTime uint64 - var goret int + var goret int32 streamTime = uint64(carg3) - goret = int(cret) + goret = int32(cret) return streamTime, goret } @@ -59444,8 +60851,11 @@ func marshalStaticCaps(p unsafe.Pointer) (interface{}, error) { return UnsafeStaticCapsFromGlibBorrow(b), nil } -func (r *StaticCaps) InitGoValue(v *gobject.Value) { - v.Init(TypeStaticCaps) +func (r *StaticCaps) GoValueType() gobject.Type { + return TypeStaticCaps +} + +func (r *StaticCaps) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -59556,8 +60966,11 @@ func marshalStaticPadTemplate(p unsafe.Pointer) (interface{}, error) { return UnsafeStaticPadTemplateFromGlibBorrow(b), nil } -func (r *StaticPadTemplate) InitGoValue(v *gobject.Value) { - v.Init(TypeStaticPadTemplate) +func (r *StaticPadTemplate) GoValueType() gobject.Type { + return TypeStaticPadTemplate +} + +func (r *StaticPadTemplate) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -59807,14 +61220,17 @@ func (s *StreamCollectionClass) ParentClass() *ObjectClass { // // Some types have special delimiters: // -// - [GstValueArray](GST_TYPE_ARRAY) are inside curly brackets (`{` and `}`). -// For example `a-structure, array={1, 2, 3}` +// - [GstValueArray](GST_TYPE_ARRAY) are inside "less and greater than" (`<` and +// `>`). For example `a-structure, array=<1, 2, 3> // - Ranges are inside brackets (`[` and `]`). For example `a-structure, // range=[1, 6, 2]` 1 being the min value, 6 the maximum and 2 the step. To // specify a #GST_TYPE_INT64_RANGE you need to explicitly specify it like: // `a-structure, a-int64-range=(gint64) [1, 5]` -// - [GstValueList](GST_TYPE_LIST) are inside "less and greater than" (`<` and -// `>`). For example `a-structure, list=<1, 2, 3> +// - [GstValueList](GST_TYPE_LIST) are inside curly brackets (`{` and `}`). +// For example `a-structure, list={1, 2, 3}` +// - [GStrv](G_TYPE_STRV) are inside "less and greater than" (`<` and +// `>`) and each string is double-quoted. +// For example `a-structure, strv=(GStrv)<"foo", "bar">`. Since 1.26.0. // // Structures are delimited either by a null character `\0` or a semicolon `;` // the latter allowing to store multiple structures in the same string (see @@ -59862,8 +61278,11 @@ func marshalStructure(p unsafe.Pointer) (interface{}, error) { return UnsafeStructureFromGlibBorrow(b), nil } -func (r *Structure) InitGoValue(v *gobject.Value) { - v.Init(TypeStructure) +func (r *Structure) GoValueType() gobject.Type { + return TypeStructure +} + +func (r *Structure) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -60037,6 +61456,8 @@ func NewStructureFromString(str string) *Structure { // Creates a new, empty #GstStructure with the given name as a GQuark. // // Free-function: gst_structure_free +// +// Deprecated: (since 1.26.0) Use gst_structure_new_id_str_empty(). func NewStructureIDEmpty(quark glib.Quark) *Structure { var carg1 C.GQuark // in, none, casted, alias var cret *C.GstStructure // return, full, converted @@ -60053,6 +61474,70 @@ func NewStructureIDEmpty(quark glib.Quark) *Structure { return goret } +// NewStructureIDStrEmpty wraps gst_structure_new_id_str_empty +// +// The function takes the following parameters: +// +// - name *IdStr: name of new structure +// +// The function returns the following values: +// +// - goret *Structure +// +// Creates a new, empty #GstStructure with the given name. +// +// Free-function: gst_structure_free +func NewStructureIDStrEmpty(name *IdStr) *Structure { + var carg1 *C.GstIdStr // in, none, converted + var cret *C.GstStructure // return, full, converted + + carg1 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(name)) + + cret = C.gst_structure_new_id_str_empty(carg1) + runtime.KeepAlive(name) + + var goret *Structure + + goret = UnsafeStructureFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// NewStructureStaticStrEmpty wraps gst_structure_new_static_str_empty +// +// The function takes the following parameters: +// +// - name string: name of new structure +// +// The function returns the following values: +// +// - goret *Structure +// +// Creates a new, empty #GstStructure with the given @name. +// +// See gst_structure_set_name() for constraints on the @name parameter. +// +// @name needs to be valid for the remaining lifetime of the process, e.g. has +// to be a static string. +// +// Free-function: gst_structure_free +func NewStructureStaticStrEmpty(name string) *Structure { + var carg1 *C.gchar // in, none, string + var cret *C.GstStructure // return, full, converted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_structure_new_static_str_empty(carg1) + runtime.KeepAlive(name) + + var goret *Structure + + goret = UnsafeStructureFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + // CanIntersect wraps gst_structure_can_intersect // // The function takes the following parameters: @@ -60122,6 +61607,8 @@ func (structure *Structure) Copy() *Structure { // In contrast to gst_structure_map_in_place(), the field is removed from // the structure if %FALSE is returned from the function. // The structure must be mutable. +// +// Deprecated: (since 1.26.0) Use gst_structure_filter_and_map_in_place_id_str(). func (structure *Structure) FilterAndMapInPlace(fn StructureFilterMapFunc) { var carg0 *C.GstStructure // in, none, converted var carg1 C.GstStructureFilterMapFunc // callback, scope: call, closure: carg2 @@ -60137,6 +61624,32 @@ func (structure *Structure) FilterAndMapInPlace(fn StructureFilterMapFunc) { runtime.KeepAlive(fn) } +// FilterAndMapInPlaceIDStr wraps gst_structure_filter_and_map_in_place_id_str +// +// The function takes the following parameters: +// +// - fn StructureFilterMapIDStrFunc: a function to call for each field +// +// Calls the provided function once for each field in the #GstStructure. In +// contrast to gst_structure_foreach_id_str(), the function may modify the fields. +// In contrast to gst_structure_map_in_place_id_str(), the field is removed from +// the structure if %FALSE is returned from the function. +// The structure must be mutable. +func (structure *Structure) FilterAndMapInPlaceIDStr(fn StructureFilterMapIDStrFunc) { + var carg0 *C.GstStructure // in, none, converted + var carg1 C.GstStructureFilterMapIdStrFunc // callback, scope: call, closure: carg2 + var carg2 C.gpointer // implicit + + carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) + carg1 = (*[0]byte)(C._gotk4_gst1_StructureFilterMapIDStrFunc) + carg2 = C.gpointer(userdata.Register(fn)) + defer userdata.Delete(unsafe.Pointer(carg2)) + + C.gst_structure_filter_and_map_in_place_id_str(carg0, carg1, carg2) + runtime.KeepAlive(structure) + runtime.KeepAlive(fn) +} + // Fixate wraps gst_structure_fixate // // Fixate all values in @structure using gst_value_fixate(). @@ -60266,8 +61779,8 @@ func (structure *Structure) FixateFieldNearestDouble(fieldName string, target fl // The function takes the following parameters: // // - fieldName string: a field in @structure -// - targetNumerator int: The numerator of the target value of the fixation -// - targetDenominator int: The denominator of the target value of the fixation +// - targetNumerator int32: The numerator of the target value of the fixation +// - targetDenominator int32: The denominator of the target value of the fixation // // The function returns the following values: // @@ -60276,7 +61789,7 @@ func (structure *Structure) FixateFieldNearestDouble(fieldName string, target fl // Fixates a #GstStructure by changing the given field to the nearest // fraction to @target_numerator/@target_denominator that is a subset // of the existing field. -func (structure *Structure) FixateFieldNearestFraction(fieldName string, targetNumerator int, targetDenominator int) bool { +func (structure *Structure) FixateFieldNearestFraction(fieldName string, targetNumerator int32, targetDenominator int32) bool { var carg0 *C.GstStructure // in, none, converted var carg1 *C.char // in, none, string, casted *C.gchar var carg2 C.gint // in, none, casted @@ -60309,7 +61822,7 @@ func (structure *Structure) FixateFieldNearestFraction(fieldName string, targetN // The function takes the following parameters: // // - fieldName string: a field in @structure -// - target int: the target value of the fixation +// - target int32: the target value of the fixation // // The function returns the following values: // @@ -60317,7 +61830,7 @@ func (structure *Structure) FixateFieldNearestFraction(fieldName string, targetN // // Fixates a #GstStructure by changing the given field to the nearest // integer to @target that is a subset of the existing field. -func (structure *Structure) FixateFieldNearestInt(fieldName string, target int) bool { +func (structure *Structure) FixateFieldNearestInt(fieldName string, target int32) bool { var carg0 *C.GstStructure // in, none, converted var carg1 *C.char // in, none, string, casted *C.gchar var carg2 C.int // in, none, casted, casted C.gint @@ -60394,6 +61907,8 @@ func (structure *Structure) FixateFieldString(fieldName string, target string) b // Calls the provided function once for each field in the #GstStructure. The // function must not modify the fields. Also see gst_structure_map_in_place() // and gst_structure_filter_and_map_in_place(). +// +// Deprecated: (since 1.26.0) Use gst_structure_foreach_id_str(). func (structure *Structure) ForEach(fn StructureForEachFunc) bool { var carg0 *C.GstStructure // in, none, converted var carg1 C.GstStructureForeachFunc // callback, scope: call, closure: carg2 @@ -60418,6 +61933,43 @@ func (structure *Structure) ForEach(fn StructureForEachFunc) bool { return goret } +// ForEachIDStr wraps gst_structure_foreach_id_str +// +// The function takes the following parameters: +// +// - fn StructureForEachIDStrFunc: a function to call for each field +// +// The function returns the following values: +// +// - goret bool +// +// Calls the provided function once for each field in the #GstStructure. The +// function must not modify the fields. Also see gst_structure_map_in_place_id_str() +// and gst_structure_filter_and_map_in_place_id_str(). +func (structure *Structure) ForEachIDStr(fn StructureForEachIDStrFunc) bool { + var carg0 *C.GstStructure // in, none, converted + var carg1 C.GstStructureForeachIdStrFunc // callback, scope: call, closure: carg2 + var carg2 C.gpointer // implicit + var cret C.gboolean // return + + carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) + carg1 = (*[0]byte)(C._gotk4_gst1_StructureForEachIDStrFunc) + carg2 = C.gpointer(userdata.Register(fn)) + defer userdata.Delete(unsafe.Pointer(carg2)) + + cret = C.gst_structure_foreach_id_str(carg0, carg1, carg2) + runtime.KeepAlive(structure) + runtime.KeepAlive(fn) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + // GetBoolean wraps gst_structure_get_boolean // // The function takes the following parameters: @@ -60590,13 +62142,13 @@ func (structure *Structure) GetDouble(fieldname string) (float64, bool) { // // The function returns the following values: // -// - value int: a pointer to an int to set +// - value int32: a pointer to an int to set // - goret bool // // Sets the int pointed to by @value corresponding to the value of the // given field. Caller is responsible for making sure the field exists, // has the correct type and that the enumtype is correct. -func (structure *Structure) GetEnum(fieldname string, enumtype gobject.Type) (int, bool) { +func (structure *Structure) GetEnum(fieldname string, enumtype gobject.Type) (int32, bool) { var carg0 *C.GstStructure // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.GType // in, none, casted, alias @@ -60613,10 +62165,10 @@ func (structure *Structure) GetEnum(fieldname string, enumtype gobject.Type) (in runtime.KeepAlive(fieldname) runtime.KeepAlive(enumtype) - var value int + var value int32 var goret bool - value = int(carg3) + value = int32(carg3) if cret != 0 { goret = true } @@ -60750,14 +62302,14 @@ func (structure *Structure) GetFlagset(fieldname string) (uint, uint, bool) { // // The function returns the following values: // -// - valueNumerator int: a pointer to an int to set -// - valueDenominator int: a pointer to an int to set +// - valueNumerator int32: a pointer to an int to set +// - valueDenominator int32: a pointer to an int to set // - goret bool // // Sets the integers pointed to by @value_numerator and @value_denominator // corresponding to the value of the given field. Caller is responsible // for making sure the field exists and has the correct type. -func (structure *Structure) GetFraction(fieldname string) (int, int, bool) { +func (structure *Structure) GetFraction(fieldname string) (int32, int32, bool) { var carg0 *C.GstStructure // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.gint // out, full, casted @@ -60772,12 +62324,12 @@ func (structure *Structure) GetFraction(fieldname string) (int, int, bool) { runtime.KeepAlive(structure) runtime.KeepAlive(fieldname) - var valueNumerator int - var valueDenominator int + var valueNumerator int32 + var valueDenominator int32 var goret bool - valueNumerator = int(carg2) - valueDenominator = int(carg3) + valueNumerator = int32(carg2) + valueDenominator = int32(carg3) if cret != 0 { goret = true } @@ -60793,13 +62345,13 @@ func (structure *Structure) GetFraction(fieldname string) (int, int, bool) { // // The function returns the following values: // -// - value int: a pointer to an int to set +// - value int32: a pointer to an int to set // - goret bool // // Sets the int pointed to by @value corresponding to the value of the // given field. Caller is responsible for making sure the field exists // and has the correct type. -func (structure *Structure) GetInt(fieldname string) (int, bool) { +func (structure *Structure) GetInt(fieldname string) (int32, bool) { var carg0 *C.GstStructure // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.gint // out, full, casted @@ -60813,10 +62365,10 @@ func (structure *Structure) GetInt(fieldname string) (int, bool) { runtime.KeepAlive(structure) runtime.KeepAlive(fieldname) - var value int + var value int32 var goret bool - value = int(carg2) + value = int32(carg2) if cret != 0 { goret = true } @@ -60893,6 +62445,8 @@ func (structure *Structure) GetName() string { // - goret glib.Quark // // Get the name of @structure as a GQuark. +// +// Deprecated: (since 1.26.0) Use gst_structure_get_name_id_str(). func (structure *Structure) GetNameID() glib.Quark { var carg0 *C.GstStructure // in, none, converted var cret C.GQuark // return, none, casted, alias @@ -60909,6 +62463,29 @@ func (structure *Structure) GetNameID() glib.Quark { return goret } +// GetNameIDStr wraps gst_structure_get_name_id_str +// +// The function returns the following values: +// +// - goret *IdStr +// +// Get the name of @structure as a GstIdStr. +func (structure *Structure) GetNameIDStr() *IdStr { + var carg0 *C.GstStructure // in, none, converted + var cret *C.GstIdStr // return, none, converted + + carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) + + cret = C.gst_structure_get_name_id_str(carg0) + runtime.KeepAlive(structure) + + var goret *IdStr + + goret = UnsafeIdStrFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // GetString wraps gst_structure_get_string // // The function takes the following parameters: @@ -61139,6 +62716,8 @@ func (structure *Structure) HasName(name string) bool { // - goret bool // // Check if @structure contains a field named @field. +// +// Deprecated: (since 1.26.0) Use gst_structure_id_str_has_field(). func (structure *Structure) IDHasField(field glib.Quark) bool { var carg0 *C.GstStructure // in, none, converted var carg1 C.GQuark // in, none, casted, alias @@ -61172,6 +62751,8 @@ func (structure *Structure) IDHasField(field glib.Quark) bool { // - goret bool // // Check if @structure contains a field named @field and with GType @type. +// +// Deprecated: (since 1.26.0) Use gst_structure_id_str_has_field_typed(). func (structure *Structure) IDHasFieldTyped(field glib.Quark, typ gobject.Type) bool { var carg0 *C.GstStructure // in, none, converted var carg1 C.GQuark // in, none, casted, alias @@ -61206,6 +62787,8 @@ func (structure *Structure) IDHasFieldTyped(field glib.Quark, typ gobject.Type) // Sets the field with the given GQuark @field to @value. If the field // does not exist, it is created. If the field exists, the previous // value is replaced and freed. +// +// Deprecated: (since 1.26.0) Use gst_structure_id_str_set_value(). func (structure *Structure) IDSetValue(field glib.Quark, value *gobject.Value) { var carg0 *C.GstStructure // in, none, converted var carg1 C.GQuark // in, none, casted, alias @@ -61221,6 +62804,239 @@ func (structure *Structure) IDSetValue(field glib.Quark, value *gobject.Value) { runtime.KeepAlive(value) } +// IDStrGetFieldType wraps gst_structure_id_str_get_field_type +// +// The function takes the following parameters: +// +// - fieldname *IdStr: the name of the field +// +// The function returns the following values: +// +// - goret gobject.Type +// +// Finds the field with the given name, and returns the type of the +// value it contains. If the field is not found, G_TYPE_INVALID is +// returned. +func (structure *Structure) IDStrGetFieldType(fieldname *IdStr) gobject.Type { + var carg0 *C.GstStructure // in, none, converted + var carg1 *C.GstIdStr // in, none, converted + var cret C.GType // return, none, casted, alias + + carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) + carg1 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(fieldname)) + + cret = C.gst_structure_id_str_get_field_type(carg0, carg1) + runtime.KeepAlive(structure) + runtime.KeepAlive(fieldname) + + var goret gobject.Type + + goret = gobject.Type(cret) + + return goret +} + +// IDStrGetValue wraps gst_structure_id_str_get_value +// +// The function takes the following parameters: +// +// - fieldname *IdStr: the name of the field to get +// +// The function returns the following values: +// +// - goret *gobject.Value (nullable) +// +// Get the value of the field with name @fieldname. +func (structure *Structure) IDStrGetValue(fieldname *IdStr) *gobject.Value { + var carg0 *C.GstStructure // in, none, converted + var carg1 *C.GstIdStr // in, none, converted + var cret *C.GValue // return, none, converted, nullable + + carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) + carg1 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(fieldname)) + + cret = C.gst_structure_id_str_get_value(carg0, carg1) + runtime.KeepAlive(structure) + runtime.KeepAlive(fieldname) + + var goret *gobject.Value + + if cret != nil { + goret = gobject.UnsafeValueFromGlibUseAnyInstead(unsafe.Pointer(cret)) + } + + return goret +} + +// IDStrHasField wraps gst_structure_id_str_has_field +// +// The function takes the following parameters: +// +// - fieldname *IdStr: the name of a field +// +// The function returns the following values: +// +// - goret bool +// +// Check if @structure contains a field named @fieldname. +func (structure *Structure) IDStrHasField(fieldname *IdStr) bool { + var carg0 *C.GstStructure // in, none, converted + var carg1 *C.GstIdStr // in, none, converted + var cret C.gboolean // return + + carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) + carg1 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(fieldname)) + + cret = C.gst_structure_id_str_has_field(carg0, carg1) + runtime.KeepAlive(structure) + runtime.KeepAlive(fieldname) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + +// IDStrHasFieldTyped wraps gst_structure_id_str_has_field_typed +// +// The function takes the following parameters: +// +// - fieldname *IdStr: the name of a field +// - typ gobject.Type: the type of a value +// +// The function returns the following values: +// +// - goret bool +// +// Check if @structure contains a field named @fieldname and with GType @type. +func (structure *Structure) IDStrHasFieldTyped(fieldname *IdStr, typ gobject.Type) bool { + var carg0 *C.GstStructure // in, none, converted + var carg1 *C.GstIdStr // in, none, converted + var carg2 C.GType // in, none, casted, alias + var cret C.gboolean // return + + carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) + carg1 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(fieldname)) + carg2 = C.GType(typ) + + cret = C.gst_structure_id_str_has_field_typed(carg0, carg1, carg2) + runtime.KeepAlive(structure) + runtime.KeepAlive(fieldname) + runtime.KeepAlive(typ) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + +// IDStrNthFieldName wraps gst_structure_id_str_nth_field_name +// +// The function takes the following parameters: +// +// - index uint: the index to get the name of +// +// The function returns the following values: +// +// - goret *IdStr +// +// Get the name (as a GstIdStr) of the given field number, +// counting from 0 onwards. +func (structure *Structure) IDStrNthFieldName(index uint) *IdStr { + var carg0 *C.GstStructure // in, none, converted + var carg1 C.guint // in, none, casted + var cret *C.GstIdStr // return, none, converted + + carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) + carg1 = C.guint(index) + + cret = C.gst_structure_id_str_nth_field_name(carg0, carg1) + runtime.KeepAlive(structure) + runtime.KeepAlive(index) + + var goret *IdStr + + goret = UnsafeIdStrFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + +// IDStrRemoveField wraps gst_structure_id_str_remove_field +// +// The function takes the following parameters: +// +// - fieldname *IdStr: the name of the field to remove +// +// Removes the field with the given name. If the field with the given +// name does not exist, the structure is unchanged. +func (structure *Structure) IDStrRemoveField(fieldname *IdStr) { + var carg0 *C.GstStructure // in, none, converted + var carg1 *C.GstIdStr // in, none, converted + + carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) + carg1 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(fieldname)) + + C.gst_structure_id_str_remove_field(carg0, carg1) + runtime.KeepAlive(structure) + runtime.KeepAlive(fieldname) +} + +// IDStrSetValue wraps gst_structure_id_str_set_value +// +// The function takes the following parameters: +// +// - fieldname *IdStr: the name of the field to set +// - value *gobject.Value: the new value of the field +// +// Sets the field with the given name @field to @value. If the field +// does not exist, it is created. If the field exists, the previous +// value is replaced and freed. +func (structure *Structure) IDStrSetValue(fieldname *IdStr, value *gobject.Value) { + var carg0 *C.GstStructure // in, none, converted + var carg1 *C.GstIdStr // in, none, converted + var carg2 *C.GValue // in, none, converted + + carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) + carg1 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(fieldname)) + carg2 = (*C.GValue)(gobject.UnsafeValueToGlibUseAnyInstead(value)) + + C.gst_structure_id_str_set_value(carg0, carg1, carg2) + runtime.KeepAlive(structure) + runtime.KeepAlive(fieldname) + runtime.KeepAlive(value) +} + +// IDStrTakeValue wraps gst_structure_id_str_take_value +// +// The function takes the following parameters: +// +// - fieldname *IdStr: the name of the field to set +// - value *gobject.Value: the new value of the field +// +// Sets the field with the given GstIdStr @field to @value. If the field +// does not exist, it is created. If the field exists, the previous +// value is replaced and freed. +func (structure *Structure) IDStrTakeValue(fieldname *IdStr, value *gobject.Value) { + var carg0 *C.GstStructure // in, none, converted + var carg1 *C.GstIdStr // in, none, converted + var carg2 *C.GValue // in, full, converted + + carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) + carg1 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(fieldname)) + carg2 = (*C.GValue)(gobject.UnsafeValueToGlibUseAnyInstead(value)) + + C.gst_structure_id_str_take_value(carg0, carg1, carg2) + runtime.KeepAlive(structure) + runtime.KeepAlive(fieldname) + runtime.KeepAlive(value) +} + // Intersect wraps gst_structure_intersect // // The function takes the following parameters: @@ -61332,6 +63148,8 @@ func (subset *Structure) IsSubset(superset *Structure) bool { // Calls the provided function once for each field in the #GstStructure. In // contrast to gst_structure_foreach(), the function may modify but not delete the // fields. The structure must be mutable. +// +// Deprecated: (since 1.26.0) Use gst_structure_map_in_place_id_str(). func (structure *Structure) MapInPlace(fn StructureMapFunc) bool { var carg0 *C.GstStructure // in, none, converted var carg1 C.GstStructureMapFunc // callback, scope: call, closure: carg2 @@ -61356,14 +63174,51 @@ func (structure *Structure) MapInPlace(fn StructureMapFunc) bool { return goret } +// MapInPlaceIDStr wraps gst_structure_map_in_place_id_str +// +// The function takes the following parameters: +// +// - fn StructureMapIDStrFunc: a function to call for each field +// +// The function returns the following values: +// +// - goret bool +// +// Calls the provided function once for each field in the #GstStructure. In +// contrast to gst_structure_foreach_id_str(), the function may modify but not delete the +// fields. The structure must be mutable. +func (structure *Structure) MapInPlaceIDStr(fn StructureMapIDStrFunc) bool { + var carg0 *C.GstStructure // in, none, converted + var carg1 C.GstStructureMapIdStrFunc // callback, scope: call, closure: carg2 + var carg2 C.gpointer // implicit + var cret C.gboolean // return + + carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) + carg1 = (*[0]byte)(C._gotk4_gst1_StructureMapIDStrFunc) + carg2 = C.gpointer(userdata.Register(fn)) + defer userdata.Delete(unsafe.Pointer(carg2)) + + cret = C.gst_structure_map_in_place_id_str(carg0, carg1, carg2) + runtime.KeepAlive(structure) + runtime.KeepAlive(fn) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + // NFields wraps gst_structure_n_fields // // The function returns the following values: // -// - goret int +// - goret int32 // // Get the number of fields in the structure. -func (structure *Structure) NFields() int { +func (structure *Structure) NFields() int32 { var carg0 *C.GstStructure // in, none, converted var cret C.gint // return, none, casted @@ -61372,9 +63227,9 @@ func (structure *Structure) NFields() int { cret = C.gst_structure_n_fields(carg0) runtime.KeepAlive(structure) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -61542,11 +63397,57 @@ func (structure *Structure) SetName(name string) { runtime.KeepAlive(name) } +// SetNameIDStr wraps gst_structure_set_name_id_str +// +// The function takes the following parameters: +// +// - name *IdStr: the new name of the structure +// +// Sets the name of the structure to the given @name. The string +// provided is copied before being used. It must not be empty, start with a +// letter and can be followed by letters, numbers and any of "/-_.:". +func (structure *Structure) SetNameIDStr(name *IdStr) { + var carg0 *C.GstStructure // in, none, converted + var carg1 *C.GstIdStr // in, none, converted + + carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) + carg1 = (*C.GstIdStr)(UnsafeIdStrToGlibNone(name)) + + C.gst_structure_set_name_id_str(carg0, carg1) + runtime.KeepAlive(structure) + runtime.KeepAlive(name) +} + +// SetNameStaticStr wraps gst_structure_set_name_static_str +// +// The function takes the following parameters: +// +// - name string: the new name of the structure +// +// Sets the name of the structure to the given @name. The string +// provided is copied before being used. It must not be empty, start with a +// letter and can be followed by letters, numbers and any of "/-_.:". +// +// @name needs to be valid for the remaining lifetime of the process, e.g. has +// to be a static string. +func (structure *Structure) SetNameStaticStr(name string) { + var carg0 *C.GstStructure // in, none, converted + var carg1 *C.gchar // in, none, string + + carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) + defer C.free(unsafe.Pointer(carg1)) + + C.gst_structure_set_name_static_str(carg0, carg1) + runtime.KeepAlive(structure) + runtime.KeepAlive(name) +} + // SetParentRefcount wraps gst_structure_set_parent_refcount // // The function takes the following parameters: // -// - refcount *int: a pointer to the parent's refcount +// - refcount *int32: a pointer to the parent's refcount // // The function returns the following values: // @@ -61556,7 +63457,7 @@ func (structure *Structure) SetName(name string) { // determine whether a structure is mutable or not. This function should only be // called by code implementing parent objects of #GstStructure, as described in // the MT Refcounting section of the design documents. -func (structure *Structure) SetParentRefcount(refcount *int) bool { +func (structure *Structure) SetParentRefcount(refcount *int32) bool { var carg0 *C.GstStructure // in, none, converted var carg1 *C.gint // in, transfer: none, C Pointers: 1, Name: gint var cret C.gboolean // return @@ -61564,7 +63465,7 @@ func (structure *Structure) SetParentRefcount(refcount *int) bool { carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) _ = refcount _ = carg1 - panic("unimplemented conversion of *int (gint*)") + panic("unimplemented conversion of *int32 (gint*)") cret = C.gst_structure_set_parent_refcount(carg0, carg1) runtime.KeepAlive(structure) @@ -61579,6 +63480,64 @@ func (structure *Structure) SetParentRefcount(refcount *int) bool { return goret } +// SetValueStaticStr wraps gst_structure_set_value_static_str +// +// The function takes the following parameters: +// +// - fieldname string: the name of the field to set +// - value *gobject.Value: the new value of the field +// +// Sets the field with the given name @field to @value. If the field +// does not exist, it is created. If the field exists, the previous +// value is replaced and freed. +// +// @fieldname needs to be valid for the remaining lifetime of the process, e.g. +// has to be a static string. +func (structure *Structure) SetValueStaticStr(fieldname string, value *gobject.Value) { + var carg0 *C.GstStructure // in, none, converted + var carg1 *C.gchar // in, none, string + var carg2 *C.GValue // in, none, converted + + carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(fieldname))) + defer C.free(unsafe.Pointer(carg1)) + carg2 = (*C.GValue)(gobject.UnsafeValueToGlibUseAnyInstead(value)) + + C.gst_structure_set_value_static_str(carg0, carg1, carg2) + runtime.KeepAlive(structure) + runtime.KeepAlive(fieldname) + runtime.KeepAlive(value) +} + +// TakeValueStaticStr wraps gst_structure_take_value_static_str +// +// The function takes the following parameters: +// +// - fieldname string: the name of the field to set +// - value *gobject.Value: the new value of the field +// +// Sets the field with the given name @field to @value. If the field +// does not exist, it is created. If the field exists, the previous +// value is replaced and freed. The function will take ownership of @value. +// +// @fieldname needs to be valid for the remaining lifetime of the process, e.g. +// has to be a static string. +func (structure *Structure) TakeValueStaticStr(fieldname string, value *gobject.Value) { + var carg0 *C.GstStructure // in, none, converted + var carg1 *C.gchar // in, none, string + var carg2 *C.GValue // in, full, converted + + carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(fieldname))) + defer C.free(unsafe.Pointer(carg1)) + carg2 = (*C.GValue)(gobject.UnsafeValueToGlibUseAnyInstead(value)) + + C.gst_structure_take_value_static_str(carg0, carg1, carg2) + runtime.KeepAlive(structure) + runtime.KeepAlive(fieldname) + runtime.KeepAlive(value) +} + // ToString wraps gst_structure_to_string // // The function returns the following values: @@ -61674,8 +63633,11 @@ func marshalTagList(p unsafe.Pointer) (interface{}, error) { return UnsafeTagListFromGlibBorrow(b), nil } -func (r *TagList) InitGoValue(v *gobject.Value) { - v.Init(TypeTagList) +func (r *TagList) GoValueType() gobject.Type { + return TypeTagList +} + +func (r *TagList) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -62245,12 +64207,12 @@ func (list *TagList) GetFloatIndex(tag string, index uint) (float32, bool) { // // The function returns the following values: // -// - value int: location for the result +// - value int32: location for the result // - goret bool // // Copies the contents for the given tag into the value, merging multiple values // into one if multiple values are associated with the tag. -func (list *TagList) GetInt(tag string) (int, bool) { +func (list *TagList) GetInt(tag string) (int32, bool) { var carg0 *C.GstTagList // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.gint // out, full, casted @@ -62264,10 +64226,10 @@ func (list *TagList) GetInt(tag string) (int, bool) { runtime.KeepAlive(list) runtime.KeepAlive(tag) - var value int + var value int32 var goret bool - value = int(carg2) + value = int32(carg2) if cret != 0 { goret = true } @@ -62364,12 +64326,12 @@ func (list *TagList) GetInt64Index(tag string, index uint) (int64, bool) { // // The function returns the following values: // -// - value int: location for the result +// - value int32: location for the result // - goret bool // // Gets the value that is at the given index for the given tag in the given // list. -func (list *TagList) GetIntIndex(tag string, index uint) (int, bool) { +func (list *TagList) GetIntIndex(tag string, index uint) (int32, bool) { var carg0 *C.GstTagList // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.guint // in, none, casted @@ -62386,10 +64348,10 @@ func (list *TagList) GetIntIndex(tag string, index uint) (int, bool) { runtime.KeepAlive(tag) runtime.KeepAlive(index) - var value int + var value int32 var goret bool - value = int(carg3) + value = int32(carg3) if cret != 0 { goret = true } @@ -62925,10 +64887,10 @@ func (list1 *TagList) Merge(list2 *TagList, mode TagMergeMode) *TagList { // // The function returns the following values: // -// - goret int +// - goret int32 // // Get the number of tags in @list. -func (list *TagList) NTags() int { +func (list *TagList) NTags() int32 { var carg0 *C.GstTagList // in, none, converted var cret C.gint // return, none, casted @@ -62937,9 +64899,9 @@ func (list *TagList) NTags() int { cret = C.gst_tag_list_n_tags(carg0) runtime.KeepAlive(list) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -63351,8 +65313,11 @@ func marshalToc(p unsafe.Pointer) (interface{}, error) { return UnsafeTocFromGlibBorrow(b), nil } -func (r *Toc) InitGoValue(v *gobject.Value) { - v.Init(TypeToc) +func (r *Toc) GoValueType() gobject.Type { + return TypeToc +} + +func (r *Toc) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -63635,8 +65600,11 @@ func marshalTocEntry(p unsafe.Pointer) (interface{}, error) { return UnsafeTocEntryFromGlibBorrow(b), nil } -func (r *TocEntry) InitGoValue(v *gobject.Value) { - v.Init(TypeTocEntry) +func (r *TocEntry) GoValueType() gobject.Type { + return TypeTocEntry +} + +func (r *TocEntry) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -63769,7 +65737,7 @@ func (entry *TocEntry) GetEntryType() TocEntryType { // // - loopType TocLoopType: the storage for the loop_type // value, leave %NULL if not need. -// - repeatCount int: the storage for the repeat_count +// - repeatCount int32: the storage for the repeat_count // value, leave %NULL if not need. // - goret bool // @@ -63777,7 +65745,7 @@ func (entry *TocEntry) GetEntryType() TocEntryType { // appropriate storages. Loops are e.g. used by sampled instruments. GStreamer // is not automatically applying the loop. The application can process this // meta data and use it e.g. to send a seek-event to loop a section. -func (entry *TocEntry) GetLoop() (TocLoopType, int, bool) { +func (entry *TocEntry) GetLoop() (TocLoopType, int32, bool) { var carg0 *C.GstTocEntry // in, none, converted var carg1 C.GstTocLoopType // out, full, casted var carg2 C.gint // out, full, casted @@ -63789,11 +65757,11 @@ func (entry *TocEntry) GetLoop() (TocLoopType, int, bool) { runtime.KeepAlive(entry) var loopType TocLoopType - var repeatCount int + var repeatCount int32 var goret bool loopType = TocLoopType(carg1) - repeatCount = int(carg2) + repeatCount = int32(carg2) if cret != 0 { goret = true } @@ -64041,10 +66009,10 @@ func (entry *TocEntry) MergeTags(tags *TagList, mode TagMergeMode) { // The function takes the following parameters: // // - loopType TocLoopType: loop_type value to set. -// - repeatCount int: repeat_count value to set. +// - repeatCount int32: repeat_count value to set. // // Set @loop_type and @repeat_count values for the @entry. -func (entry *TocEntry) SetLoop(loopType TocLoopType, repeatCount int) { +func (entry *TocEntry) SetLoop(loopType TocLoopType, repeatCount int32) { var carg0 *C.GstTocEntry // in, none, converted var carg1 C.GstTocLoopType // in, none, casted var carg2 C.gint // in, none, casted @@ -64204,6 +66172,59 @@ func (t *TracerClass) ParentClass() *ObjectClass { return parent } +// SetUseStructureParams wraps gst_tracer_class_set_use_structure_params +// +// The function takes the following parameters: +// +// - useStructureParams bool: %TRUE to use structure parameters, %FALSE otherwise +// +// Sets whether the tracer should use structure parameters for configuration. +// This function configures how parameters should be passed when instantiating +// the tracer. +// +// This is typically called in the tracer's class initialization function to +// indicate its parameter handling preference. +func (tracerClass *TracerClass) SetUseStructureParams(useStructureParams bool) { + var carg0 *C.GstTracerClass // in, none, converted + var carg1 C.gboolean // in + + carg0 = (*C.GstTracerClass)(UnsafeTracerClassToGlibNone(tracerClass)) + if useStructureParams { + carg1 = C.TRUE + } + + C.gst_tracer_class_set_use_structure_params(carg0, carg1) + runtime.KeepAlive(tracerClass) + runtime.KeepAlive(useStructureParams) +} + +// UsesStructureParams wraps gst_tracer_class_uses_structure_params +// +// The function returns the following values: +// +// - goret bool +// +// If set, the tracer subsystem will consider parameters passed to the +// `GST_TRACERS` environment variable as a #GstStructure and use its +// fields as properties to instanciate the tracer. +func (tracerClass *TracerClass) UsesStructureParams() bool { + var carg0 *C.GstTracerClass // in, none, converted + var cret C.gboolean // return + + carg0 = (*C.GstTracerClass)(UnsafeTracerClassToGlibNone(tracerClass)) + + cret = C.gst_tracer_class_uses_structure_params(carg0) + runtime.KeepAlive(tracerClass) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + // TracerFactoryClass wraps GstTracerFactoryClass // // TracerFactoryClass is the type struct for [TracerFactory] @@ -64300,8 +66321,11 @@ func marshalTypeFind(p unsafe.Pointer) (interface{}, error) { return UnsafeTypeFindFromGlibBorrow(b), nil } -func (r *TypeFind) InitGoValue(v *gobject.Value) { - v.Init(TypeTypeFind) +func (r *TypeFind) GoValueType() gobject.Type { + return TypeTypeFind +} + +func (r *TypeFind) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -64662,8 +66686,11 @@ func marshalUri(p unsafe.Pointer) (interface{}, error) { return UnsafeUriFromGlibBorrow(b), nil } -func (r *Uri) InitGoValue(v *gobject.Value) { - v.Init(TypeUri) +func (r *Uri) GoValueType() gobject.Type { + return TypeUri +} + +func (r *Uri) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } diff --git a/pkg/gst/gst_export.gen.go b/pkg/gst/gst_export.gen.go index 9e028dc..c04f9f5 100644 --- a/pkg/gst/gst_export.gen.go +++ b/pkg/gst/gst_export.gen.go @@ -209,7 +209,7 @@ func _gotk4_gst1_LogFunction(carg1 *C.GstDebugCategory, carg2 C.GstDebugLevel, c var level DebugLevel // in, none, casted var file string // in, none, string var function string // in, none, string - var line int // in, none, casted + var line int32 // in, none, casted var object gobject.Object // in, none, converted var message *DebugMessage // in, none, converted @@ -217,7 +217,7 @@ func _gotk4_gst1_LogFunction(carg1 *C.GstDebugCategory, carg2 C.GstDebugLevel, c level = DebugLevel(carg2) file = C.GoString((*C.char)(unsafe.Pointer(carg3))) function = C.GoString((*C.char)(unsafe.Pointer(carg4))) - line = int(carg5) + line = int32(carg5) object = gobject.UnsafeObjectFromGlibNone(unsafe.Pointer(carg6)) message = UnsafeDebugMessageFromGlibNone(unsafe.Pointer(carg7)) @@ -412,6 +412,33 @@ func _gotk4_gst1_StructureFilterMapFunc(carg1 C.GQuark, carg2 *C.GValue, carg3 C return cret } +//export _gotk4_gst1_StructureFilterMapIDStrFunc +func _gotk4_gst1_StructureFilterMapIDStrFunc(carg1 *C.GstIdStr, carg2 *C.GValue, carg3 C.gpointer) (cret C.gboolean) { + var fn StructureFilterMapIDStrFunc + { + v := userdata.Load(unsafe.Pointer(carg3)) + if v == nil { + panic(`callback not found`) + } + fn = v.(StructureFilterMapIDStrFunc) + } + + var fieldname *IdStr // in, none, converted + var value *gobject.Value // in, none, converted + var goret bool // return + + fieldname = UnsafeIdStrFromGlibNone(unsafe.Pointer(carg1)) + value = gobject.UnsafeValueFromGlibUseAnyInstead(unsafe.Pointer(carg2)) + + goret = fn(fieldname, value) + + if goret { + cret = C.TRUE + } + + return cret +} + //export _gotk4_gst1_StructureForEachFunc func _gotk4_gst1_StructureForEachFunc(carg1 C.GQuark, carg2 *C.GValue, carg3 C.gpointer) (cret C.gboolean) { var fn StructureForEachFunc @@ -439,6 +466,33 @@ func _gotk4_gst1_StructureForEachFunc(carg1 C.GQuark, carg2 *C.GValue, carg3 C.g return cret } +//export _gotk4_gst1_StructureForEachIDStrFunc +func _gotk4_gst1_StructureForEachIDStrFunc(carg1 *C.GstIdStr, carg2 *C.GValue, carg3 C.gpointer) (cret C.gboolean) { + var fn StructureForEachIDStrFunc + { + v := userdata.Load(unsafe.Pointer(carg3)) + if v == nil { + panic(`callback not found`) + } + fn = v.(StructureForEachIDStrFunc) + } + + var fieldname *IdStr // in, none, converted + var value *gobject.Value // in, none, converted + var goret bool // return + + fieldname = UnsafeIdStrFromGlibNone(unsafe.Pointer(carg1)) + value = gobject.UnsafeValueFromGlibUseAnyInstead(unsafe.Pointer(carg2)) + + goret = fn(fieldname, value) + + if goret { + cret = C.TRUE + } + + return cret +} + //export _gotk4_gst1_StructureMapFunc func _gotk4_gst1_StructureMapFunc(carg1 C.GQuark, carg2 *C.GValue, carg3 C.gpointer) (cret C.gboolean) { var fn StructureMapFunc @@ -466,6 +520,33 @@ func _gotk4_gst1_StructureMapFunc(carg1 C.GQuark, carg2 *C.GValue, carg3 C.gpoin return cret } +//export _gotk4_gst1_StructureMapIDStrFunc +func _gotk4_gst1_StructureMapIDStrFunc(carg1 *C.GstIdStr, carg2 *C.GValue, carg3 C.gpointer) (cret C.gboolean) { + var fn StructureMapIDStrFunc + { + v := userdata.Load(unsafe.Pointer(carg3)) + if v == nil { + panic(`callback not found`) + } + fn = v.(StructureMapIDStrFunc) + } + + var fieldname *IdStr // in, none, converted + var value *gobject.Value // in, none, converted + var goret bool // return + + fieldname = UnsafeIdStrFromGlibNone(unsafe.Pointer(carg1)) + value = gobject.UnsafeValueFromGlibUseAnyInstead(unsafe.Pointer(carg2)) + + goret = fn(fieldname, value) + + if goret { + cret = C.TRUE + } + + return cret +} + //export _gotk4_gst1_TagForEachFunc func _gotk4_gst1_TagForEachFunc(carg1 *C.GstTagList, carg2 *C.gchar, carg3 C.gpointer) { var fn TagForEachFunc diff --git a/pkg/gst/message.go b/pkg/gst/message.go index 0ee209e..a8d685b 100644 --- a/pkg/gst/message.go +++ b/pkg/gst/message.go @@ -194,7 +194,8 @@ func (m *Message) String() string { msg += "Lost a clock" case MessageNewClock: - msg += "Got a new clock" + clock := m.ParseNewClock() + msg += fmt.Sprintf("New clock: %s (%s)", clock.GetName(), clock.GoValueType()) case MessageStructureChange: chgType, elem, busy := m.ParseStructureChange() diff --git a/pkg/gstallocators/gstallocators.gen.go b/pkg/gstallocators/gstallocators.gen.go index 09589f9..65c76c9 100644 --- a/pkg/gstallocators/gstallocators.gen.go +++ b/pkg/gstallocators/gstallocators.gen.go @@ -96,10 +96,10 @@ func (f FdMemoryFlags) String() string { // // The function returns the following values: // -// - goret int +// - goret int32 // // Return the file descriptor associated with @mem. -func DmabufMemoryGetFd(mem *gst.Memory) int { +func DmabufMemoryGetFd(mem *gst.Memory) int32 { var carg1 *C.GstMemory // in, none, converted var cret C.gint // return, none, casted @@ -108,9 +108,9 @@ func DmabufMemoryGetFd(mem *gst.Memory) int { cret = C.gst_dmabuf_memory_get_fd(carg1) runtime.KeepAlive(mem) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -178,11 +178,11 @@ func DRMDumbMemoryGetHandle(mem *gst.Memory) uint32 { // // The function returns the following values: // -// - goret int +// - goret int32 // // Get the fd from @mem. Call gst_is_fd_memory() to check if @mem has // an fd. -func FdMemoryGetFd(mem *gst.Memory) int { +func FdMemoryGetFd(mem *gst.Memory) int32 { var carg1 *C.GstMemory // in, none, converted var cret C.gint // return, none, casted @@ -191,9 +191,9 @@ func FdMemoryGetFd(mem *gst.Memory) int { cret = C.gst_fd_memory_get_fd(carg1) runtime.KeepAlive(mem) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -349,6 +349,11 @@ func UnsafePhysMemoryAllocatorFromGlibFull(c unsafe.Pointer) PhysMemoryAllocator return gobject.UnsafeObjectFromGlibFull(c).(PhysMemoryAllocator) } +// UnsafePhysMemoryAllocatorFromGlibBorrow is used to convert raw GstPhysMemoryAllocator pointers to go without touching any references. This is used by the bindings internally. +func UnsafePhysMemoryAllocatorFromGlibBorrow(c unsafe.Pointer) PhysMemoryAllocator { + return gobject.UnsafeObjectFromGlibBorrow(c).(PhysMemoryAllocator) +} + // UnsafePhysMemoryAllocatorToGlibNone is used to convert the instance to it's C value GstPhysMemoryAllocator. This is used by the bindings internally. func UnsafePhysMemoryAllocatorToGlibNone(c PhysMemoryAllocator) unsafe.Pointer { i := c.upcastToGstPhysMemoryAllocator() @@ -440,6 +445,11 @@ func UnsafeDRMDumbAllocatorFromGlibFull(c unsafe.Pointer) DRMDumbAllocator { return gobject.UnsafeObjectFromGlibFull(c).(DRMDumbAllocator) } +// UnsafeDRMDumbAllocatorFromGlibBorrow is used to convert raw GstDRMDumbAllocator pointers to go without touching any references. This is used by the bindings internally. +func UnsafeDRMDumbAllocatorFromGlibBorrow(c unsafe.Pointer) DRMDumbAllocator { + return gobject.UnsafeObjectFromGlibBorrow(c).(DRMDumbAllocator) +} + func (d *DRMDumbAllocatorInstance) upcastToGstDRMDumbAllocator() *DRMDumbAllocatorInstance { return d } @@ -490,7 +500,7 @@ func NewDRMDumbAllocatorWithDevicePath(drmDevicePath string) gst.Allocator { // // The function takes the following parameters: // -// - drmFd int: file descriptor of the DRM device +// - drmFd int32: file descriptor of the DRM device // // The function returns the following values: // @@ -499,7 +509,7 @@ func NewDRMDumbAllocatorWithDevicePath(drmDevicePath string) gst.Allocator { // Creates a new #GstDRMDumbAllocator for the specific file desciptor. This // function can fail if the file descriptor is not a DRM device or if // the DRM device does not support DUMB allocation. -func NewDRMDumbAllocatorWithFd(drmFd int) gst.Allocator { +func NewDRMDumbAllocatorWithFd(drmFd int32) gst.Allocator { var carg1 C.gint // in, none, casted var cret *C.GstAllocator // return, full, converted, nullable @@ -669,6 +679,11 @@ func UnsafeFdAllocatorFromGlibFull(c unsafe.Pointer) FdAllocator { return gobject.UnsafeObjectFromGlibFull(c).(FdAllocator) } +// UnsafeFdAllocatorFromGlibBorrow is used to convert raw GstFdAllocator pointers to go without touching any references. This is used by the bindings internally. +func UnsafeFdAllocatorFromGlibBorrow(c unsafe.Pointer) FdAllocator { + return gobject.UnsafeObjectFromGlibBorrow(c).(FdAllocator) +} + func (f *FdAllocatorInstance) upcastToGstFdAllocator() *FdAllocatorInstance { return f } @@ -707,7 +722,7 @@ func NewFdAllocator() gst.Allocator { // The function takes the following parameters: // // - allocator gst.Allocator: allocator to be used for this memory -// - fd int: file descriptor +// - fd int32: file descriptor // - size uint: memory size // - flags FdMemoryFlags: extra #GstFdMemoryFlags // @@ -716,7 +731,7 @@ func NewFdAllocator() gst.Allocator { // - goret *gst.Memory (nullable) // // Return a %GstMemory that wraps a generic file descriptor. -func FdAllocatorAlloc(allocator gst.Allocator, fd int, size uint, flags FdMemoryFlags) *gst.Memory { +func FdAllocatorAlloc(allocator gst.Allocator, fd int32, size uint, flags FdMemoryFlags) *gst.Memory { var carg1 *C.GstAllocator // in, none, converted var carg2 C.gint // in, none, casted var carg3 C.gsize // in, none, casted @@ -835,6 +850,11 @@ func UnsafeShmAllocatorFromGlibFull(c unsafe.Pointer) ShmAllocator { return gobject.UnsafeObjectFromGlibFull(c).(ShmAllocator) } +// UnsafeShmAllocatorFromGlibBorrow is used to convert raw GstShmAllocator pointers to go without touching any references. This is used by the bindings internally. +func UnsafeShmAllocatorFromGlibBorrow(c unsafe.Pointer) ShmAllocator { + return gobject.UnsafeObjectFromGlibBorrow(c).(ShmAllocator) +} + func (s *ShmAllocatorInstance) upcastToGstShmAllocator() *ShmAllocatorInstance { return s } @@ -964,6 +984,11 @@ func UnsafeDmaBufAllocatorFromGlibFull(c unsafe.Pointer) DmaBufAllocator { return gobject.UnsafeObjectFromGlibFull(c).(DmaBufAllocator) } +// UnsafeDmaBufAllocatorFromGlibBorrow is used to convert raw GstDmaBufAllocator pointers to go without touching any references. This is used by the bindings internally. +func UnsafeDmaBufAllocatorFromGlibBorrow(c unsafe.Pointer) DmaBufAllocator { + return gobject.UnsafeObjectFromGlibBorrow(c).(DmaBufAllocator) +} + func (d *DmaBufAllocatorInstance) upcastToGstDmaBufAllocator() *DmaBufAllocatorInstance { return d } @@ -1002,7 +1027,7 @@ func NewDmaBufAllocator() gst.Allocator { // The function takes the following parameters: // // - allocator gst.Allocator: allocator to be used for this memory -// - fd int: dmabuf file descriptor +// - fd int32: dmabuf file descriptor // - size uint: memory size // // The function returns the following values: @@ -1010,7 +1035,7 @@ func NewDmaBufAllocator() gst.Allocator { // - goret *gst.Memory (nullable) // // Return a %GstMemory that wraps a dmabuf file descriptor. -func DmaBufAllocatorAlloc(allocator gst.Allocator, fd int, size uint) *gst.Memory { +func DmaBufAllocatorAlloc(allocator gst.Allocator, fd int32, size uint) *gst.Memory { var carg1 *C.GstAllocator // in, none, converted var carg2 C.gint // in, none, casted var carg3 C.gsize // in, none, casted @@ -1039,7 +1064,7 @@ func DmaBufAllocatorAlloc(allocator gst.Allocator, fd int, size uint) *gst.Memor // The function takes the following parameters: // // - allocator gst.Allocator: allocator to be used for this memory -// - fd int: dmabuf file descriptor +// - fd int32: dmabuf file descriptor // - size uint: memory size // - flags FdMemoryFlags: extra #GstFdMemoryFlags // @@ -1048,7 +1073,7 @@ func DmaBufAllocatorAlloc(allocator gst.Allocator, fd int, size uint) *gst.Memor // - goret *gst.Memory (nullable) // // Return a %GstMemory that wraps a dmabuf file descriptor. -func DmaBufAllocatorAllocWithFlags(allocator gst.Allocator, fd int, size uint, flags FdMemoryFlags) *gst.Memory { +func DmaBufAllocatorAllocWithFlags(allocator gst.Allocator, fd int32, size uint, flags FdMemoryFlags) *gst.Memory { var carg1 *C.GstAllocator // in, none, converted var carg2 C.gint // in, none, casted var carg3 C.gsize // in, none, casted diff --git a/pkg/gstapp/gstapp.gen.go b/pkg/gstapp/gstapp.gen.go index 0abf92e..c9707ab 100644 --- a/pkg/gstapp/gstapp.gen.go +++ b/pkg/gstapp/gstapp.gen.go @@ -118,8 +118,11 @@ func marshalAppLeakyType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = AppLeakyType(0) -func (e AppLeakyType) InitGoValue(v *gobject.Value) { - v.Init(TypeAppLeakyType) +func (e AppLeakyType) GoValueType() gobject.Type { + return TypeAppLeakyType +} + +func (e AppLeakyType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -161,8 +164,11 @@ func marshalAppStreamType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = AppStreamType(0) -func (e AppStreamType) InitGoValue(v *gobject.Value) { - v.Init(TypeAppStreamType) +func (e AppStreamType) GoValueType() gobject.Type { + return TypeAppStreamType +} + +func (e AppStreamType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -680,6 +686,11 @@ func UnsafeAppSinkFromGlibFull(c unsafe.Pointer) AppSink { return gobject.UnsafeObjectFromGlibFull(c).(AppSink) } +// UnsafeAppSinkFromGlibBorrow is used to convert raw GstAppSink pointers to go without touching any references. This is used by the bindings internally. +func UnsafeAppSinkFromGlibBorrow(c unsafe.Pointer) AppSink { + return gobject.UnsafeObjectFromGlibBorrow(c).(AppSink) +} + func (a *AppSinkInstance) upcastToGstAppSink() *AppSinkInstance { return a } @@ -1525,7 +1536,7 @@ func UnsafeApplyAppSinkOverrides[Instance AppSink](gclass unsafe.Pointer, overri func(carg0 *C.GstAppSink) { var appsink Instance // go GstAppSink subclass - appsink = UnsafeAppSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + appsink = UnsafeAppSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.Eos(appsink) }, @@ -1541,7 +1552,7 @@ func UnsafeApplyAppSinkOverrides[Instance AppSink](gclass unsafe.Pointer, overri var appsink Instance // go GstAppSink subclass var goret gst.FlowReturn // return, none, casted - appsink = UnsafeAppSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + appsink = UnsafeAppSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.NewPreroll(appsink) @@ -1561,7 +1572,7 @@ func UnsafeApplyAppSinkOverrides[Instance AppSink](gclass unsafe.Pointer, overri var appsink Instance // go GstAppSink subclass var goret gst.FlowReturn // return, none, casted - appsink = UnsafeAppSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + appsink = UnsafeAppSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.NewSample(appsink) @@ -1581,7 +1592,7 @@ func UnsafeApplyAppSinkOverrides[Instance AppSink](gclass unsafe.Pointer, overri var appsink Instance // go GstAppSink subclass var goret *gst.Sample // return, full, converted, nullable - appsink = UnsafeAppSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + appsink = UnsafeAppSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.PullPreroll(appsink) @@ -1603,7 +1614,7 @@ func UnsafeApplyAppSinkOverrides[Instance AppSink](gclass unsafe.Pointer, overri var appsink Instance // go GstAppSink subclass var goret *gst.Sample // return, full, converted, nullable - appsink = UnsafeAppSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + appsink = UnsafeAppSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.PullSample(appsink) @@ -1626,7 +1637,7 @@ func UnsafeApplyAppSinkOverrides[Instance AppSink](gclass unsafe.Pointer, overri var timeout gst.ClockTime // in, none, casted, alias var goret *gst.Sample // return, full, converted, nullable - appsink = UnsafeAppSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + appsink = UnsafeAppSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) timeout = gst.ClockTime(carg1) goret = overrides.TryPullPreroll(appsink, timeout) @@ -1650,7 +1661,7 @@ func UnsafeApplyAppSinkOverrides[Instance AppSink](gclass unsafe.Pointer, overri var timeout gst.ClockTime // in, none, casted, alias var goret *gst.Sample // return, full, converted, nullable - appsink = UnsafeAppSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + appsink = UnsafeAppSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) timeout = gst.ClockTime(carg1) goret = overrides.TryPullSample(appsink, timeout) @@ -2147,6 +2158,11 @@ func UnsafeAppSrcFromGlibFull(c unsafe.Pointer) AppSrc { return gobject.UnsafeObjectFromGlibFull(c).(AppSrc) } +// UnsafeAppSrcFromGlibBorrow is used to convert raw GstAppSrc pointers to go without touching any references. This is used by the bindings internally. +func UnsafeAppSrcFromGlibBorrow(c unsafe.Pointer) AppSrc { + return gobject.UnsafeObjectFromGlibBorrow(c).(AppSrc) +} + func (a *AppSrcInstance) upcastToGstAppSrc() *AppSrcInstance { return a } @@ -2984,7 +3000,7 @@ func UnsafeApplyAppSrcOverrides[Instance AppSrc](gclass unsafe.Pointer, override var appsrc Instance // go GstAppSrc subclass var goret gst.FlowReturn // return, none, casted - appsrc = UnsafeAppSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + appsrc = UnsafeAppSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.EndOfStream(appsrc) @@ -3003,7 +3019,7 @@ func UnsafeApplyAppSrcOverrides[Instance AppSrc](gclass unsafe.Pointer, override func(carg0 *C.GstAppSrc) { var appsrc Instance // go GstAppSrc subclass - appsrc = UnsafeAppSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + appsrc = UnsafeAppSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.EnoughData(appsrc) }, @@ -3019,7 +3035,7 @@ func UnsafeApplyAppSrcOverrides[Instance AppSrc](gclass unsafe.Pointer, override var appsrc Instance // go GstAppSrc subclass var length uint // in, none, casted - appsrc = UnsafeAppSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + appsrc = UnsafeAppSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) length = uint(carg1) overrides.NeedData(appsrc, length) @@ -3037,7 +3053,7 @@ func UnsafeApplyAppSrcOverrides[Instance AppSrc](gclass unsafe.Pointer, override var buffer *gst.Buffer // in, full, converted var goret gst.FlowReturn // return, none, casted - appsrc = UnsafeAppSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + appsrc = UnsafeAppSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) buffer = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(carg1)) goret = overrides.PushBuffer(appsrc, buffer) @@ -3059,7 +3075,7 @@ func UnsafeApplyAppSrcOverrides[Instance AppSrc](gclass unsafe.Pointer, override var bufferList *gst.BufferList // in, full, converted var goret gst.FlowReturn // return, none, casted - appsrc = UnsafeAppSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + appsrc = UnsafeAppSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) bufferList = gst.UnsafeBufferListFromGlibFull(unsafe.Pointer(carg1)) goret = overrides.PushBufferList(appsrc, bufferList) @@ -3081,7 +3097,7 @@ func UnsafeApplyAppSrcOverrides[Instance AppSrc](gclass unsafe.Pointer, override var sample *gst.Sample // in, none, converted var goret gst.FlowReturn // return, none, casted - appsrc = UnsafeAppSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + appsrc = UnsafeAppSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) sample = gst.UnsafeSampleFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.PushSample(appsrc, sample) @@ -3103,7 +3119,7 @@ func UnsafeApplyAppSrcOverrides[Instance AppSrc](gclass unsafe.Pointer, override var offset uint64 // in, none, casted var goret bool // return - appsrc = UnsafeAppSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + appsrc = UnsafeAppSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) offset = uint64(carg1) goret = overrides.SeekData(appsrc, offset) diff --git a/pkg/gstaudio/gstaudio.gen.go b/pkg/gstaudio/gstaudio.gen.go index 9cabb2c..532d977 100644 --- a/pkg/gstaudio/gstaudio.gen.go +++ b/pkg/gstaudio/gstaudio.gen.go @@ -407,6 +407,10 @@ const AUDIO_DEF_CHANNELS = 2 // // Standard sampling rate used in consumer audio. const AUDIO_DEF_RATE = 44100 +// AUDIO_FORMAT_LAST wraps GST_AUDIO_FORMAT_LAST +// +// Number of audio formats in #GstAudioFormat. +const AUDIO_FORMAT_LAST = 32 // AUDIO_RESAMPLER_QUALITY_DEFAULT wraps GST_AUDIO_RESAMPLER_QUALITY_DEFAULT const AUDIO_RESAMPLER_QUALITY_DEFAULT = 4 // AUDIO_RESAMPLER_QUALITY_MAX wraps GST_AUDIO_RESAMPLER_QUALITY_MAX @@ -461,8 +465,11 @@ func marshalAudioBaseSinkDiscontReason(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = AudioBaseSinkDiscontReason(0) -func (e AudioBaseSinkDiscontReason) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioBaseSinkDiscontReason) +func (e AudioBaseSinkDiscontReason) GoValueType() gobject.Type { + return TypeAudioBaseSinkDiscontReason +} + +func (e AudioBaseSinkDiscontReason) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -510,8 +517,11 @@ func marshalAudioBaseSinkSlaveMethod(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = AudioBaseSinkSlaveMethod(0) -func (e AudioBaseSinkSlaveMethod) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioBaseSinkSlaveMethod) +func (e AudioBaseSinkSlaveMethod) GoValueType() gobject.Type { + return TypeAudioBaseSinkSlaveMethod +} + +func (e AudioBaseSinkSlaveMethod) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -558,8 +568,11 @@ func marshalAudioBaseSrcSlaveMethod(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = AudioBaseSrcSlaveMethod(0) -func (e AudioBaseSrcSlaveMethod) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioBaseSrcSlaveMethod) +func (e AudioBaseSrcSlaveMethod) GoValueType() gobject.Type { + return TypeAudioBaseSrcSlaveMethod +} + +func (e AudioBaseSrcSlaveMethod) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -596,8 +609,11 @@ func marshalAudioCdSrcMode(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = AudioCdSrcMode(0) -func (e AudioCdSrcMode) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioCdSrcMode) +func (e AudioCdSrcMode) GoValueType() gobject.Type { + return TypeAudioCdSrcMode +} + +func (e AudioCdSrcMode) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -765,6 +781,14 @@ const ( // // Surround right (between rear right and side right) AudioChannelPositionSurroundRight AudioChannelPosition = 27 + // AudioChannelPositionTopSurroundLeft wraps GST_AUDIO_CHANNEL_POSITION_TOP_SURROUND_LEFT + // + // Top surround left (between rear left and side left). + AudioChannelPositionTopSurroundLeft AudioChannelPosition = 28 + // AudioChannelPositionTopSurroundRight wraps GST_AUDIO_CHANNEL_POSITION_TOP_SURROUND_RIGHT + // + // Top surround right (between rear right and side right). + AudioChannelPositionTopSurroundRight AudioChannelPosition = 29 ) func marshalAudioChannelPosition(p unsafe.Pointer) (any, error) { @@ -773,8 +797,11 @@ func marshalAudioChannelPosition(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = AudioChannelPosition(0) -func (e AudioChannelPosition) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioChannelPosition) +func (e AudioChannelPosition) GoValueType() gobject.Type { + return TypeAudioChannelPosition +} + +func (e AudioChannelPosition) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -809,6 +836,8 @@ func (e AudioChannelPosition) String() string { case AudioChannelPositionTopRearRight: return "AudioChannelPositionTopRearRight" case AudioChannelPositionTopSideLeft: return "AudioChannelPositionTopSideLeft" case AudioChannelPositionTopSideRight: return "AudioChannelPositionTopSideRight" + case AudioChannelPositionTopSurroundLeft: return "AudioChannelPositionTopSurroundLeft" + case AudioChannelPositionTopSurroundRight: return "AudioChannelPositionTopSurroundRight" case AudioChannelPositionWideLeft: return "AudioChannelPositionWideLeft" case AudioChannelPositionWideRight: return "AudioChannelPositionWideRight" default: return fmt.Sprintf("AudioChannelPosition(%d)", e) @@ -845,8 +874,11 @@ func marshalAudioDitherMethod(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = AudioDitherMethod(0) -func (e AudioDitherMethod) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioDitherMethod) +func (e AudioDitherMethod) GoValueType() gobject.Type { + return TypeAudioDitherMethod +} + +func (e AudioDitherMethod) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1058,8 +1090,11 @@ func marshalAudioFormat(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = AudioFormat(0) -func (e AudioFormat) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioFormat) +func (e AudioFormat) GoValueType() gobject.Type { + return TypeAudioFormat +} + +func (e AudioFormat) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1106,16 +1141,16 @@ func (e AudioFormat) String() string { // The function takes the following parameters: // // - sign bool: signed or unsigned format -// - endianness int: G_LITTLE_ENDIAN or G_BIG_ENDIAN -// - width int: amount of bits used per sample -// - depth int: amount of used bits in @width +// - endianness int32: G_LITTLE_ENDIAN or G_BIG_ENDIAN +// - width int32: amount of bits used per sample +// - depth int32: amount of used bits in @width // // The function returns the following values: // // - goret AudioFormat // // Construct a #GstAudioFormat with given parameters. -func AudioFormatBuildInteger(sign bool, endianness int, width int, depth int) AudioFormat { +func AudioFormatBuildInteger(sign bool, endianness int32, width int32, depth int32) AudioFormat { var carg1 C.gboolean // in var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted @@ -1201,11 +1236,16 @@ func AudioFormatGetInfo(format AudioFormat) *AudioFormatInfo { // // The function takes the following parameters: // -// - format AudioFormat +// - format AudioFormat: a #GstAudioFormat audio format // // The function returns the following values: // // - goret string +// +// Returns a string containing a descriptive name for the #GstAudioFormat. +// +// Since 1.26 this can also be used with %GST_AUDIO_FORMAT_UNKNOWN, previous +// versions were printing a critical warning and returned %NULL. func AudioFormatToString(format AudioFormat) string { var carg1 C.GstAudioFormat // in, none, casted var cret *C.gchar // return, none, string @@ -1244,8 +1284,11 @@ func marshalAudioLayout(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = AudioLayout(0) -func (e AudioLayout) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioLayout) +func (e AudioLayout) GoValueType() gobject.Type { + return TypeAudioLayout +} + +func (e AudioLayout) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1291,8 +1334,11 @@ func marshalAudioNoiseShapingMethod(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = AudioNoiseShapingMethod(0) -func (e AudioNoiseShapingMethod) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioNoiseShapingMethod) +func (e AudioNoiseShapingMethod) GoValueType() gobject.Type { + return TypeAudioNoiseShapingMethod +} + +func (e AudioNoiseShapingMethod) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1335,8 +1381,11 @@ func marshalAudioResamplerFilterInterpolation(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = AudioResamplerFilterInterpolation(0) -func (e AudioResamplerFilterInterpolation) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioResamplerFilterInterpolation) +func (e AudioResamplerFilterInterpolation) GoValueType() gobject.Type { + return TypeAudioResamplerFilterInterpolation +} + +func (e AudioResamplerFilterInterpolation) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1379,8 +1428,11 @@ func marshalAudioResamplerFilterMode(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = AudioResamplerFilterMode(0) -func (e AudioResamplerFilterMode) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioResamplerFilterMode) +func (e AudioResamplerFilterMode) GoValueType() gobject.Type { + return TypeAudioResamplerFilterMode +} + +func (e AudioResamplerFilterMode) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1429,8 +1481,11 @@ func marshalAudioResamplerMethod(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = AudioResamplerMethod(0) -func (e AudioResamplerMethod) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioResamplerMethod) +func (e AudioResamplerMethod) GoValueType() gobject.Type { + return TypeAudioResamplerMethod +} + +func (e AudioResamplerMethod) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1523,8 +1578,11 @@ func marshalAudioRingBufferFormatType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = AudioRingBufferFormatType(0) -func (e AudioRingBufferFormatType) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioRingBufferFormatType) +func (e AudioRingBufferFormatType) GoValueType() gobject.Type { + return TypeAudioRingBufferFormatType +} + +func (e AudioRingBufferFormatType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1582,8 +1640,11 @@ func marshalAudioRingBufferState(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = AudioRingBufferState(0) -func (e AudioRingBufferState) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioRingBufferState) +func (e AudioRingBufferState) GoValueType() gobject.Type { + return TypeAudioRingBufferState +} + +func (e AudioRingBufferState) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1647,8 +1708,11 @@ func marshalDsdFormat(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = DsdFormat(0) -func (e DsdFormat) InitGoValue(v *gobject.Value) { - v.Init(TypeDsdFormat) +func (e DsdFormat) GoValueType() gobject.Type { + return TypeDsdFormat +} + +func (e DsdFormat) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1818,8 +1882,11 @@ func (a AudioChannelMixerFlags) Has(other AudioChannelMixerFlags) bool { var _ gobject.GoValueInitializer = AudioChannelMixerFlags(0) -func (f AudioChannelMixerFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioChannelMixerFlags) +func (f AudioChannelMixerFlags) GoValueType() gobject.Type { + return TypeAudioChannelMixerFlags +} + +func (f AudioChannelMixerFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -1879,8 +1946,11 @@ func (a AudioConverterFlags) Has(other AudioConverterFlags) bool { var _ gobject.GoValueInitializer = AudioConverterFlags(0) -func (f AudioConverterFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioConverterFlags) +func (f AudioConverterFlags) GoValueType() gobject.Type { + return TypeAudioConverterFlags +} + +func (f AudioConverterFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -1929,8 +1999,11 @@ func (a AudioFlags) Has(other AudioFlags) bool { var _ gobject.GoValueInitializer = AudioFlags(0) -func (f AudioFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioFlags) +func (f AudioFlags) GoValueType() gobject.Type { + return TypeAudioFlags +} + +func (f AudioFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -1988,8 +2061,11 @@ func (a AudioFormatFlags) Has(other AudioFormatFlags) bool { var _ gobject.GoValueInitializer = AudioFormatFlags(0) -func (f AudioFormatFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioFormatFlags) +func (f AudioFormatFlags) GoValueType() gobject.Type { + return TypeAudioFormatFlags +} + +func (f AudioFormatFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -2047,8 +2123,11 @@ func (a AudioPackFlags) Has(other AudioPackFlags) bool { var _ gobject.GoValueInitializer = AudioPackFlags(0) -func (f AudioPackFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioPackFlags) +func (f AudioPackFlags) GoValueType() gobject.Type { + return TypeAudioPackFlags +} + +func (f AudioPackFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -2093,8 +2172,11 @@ func (a AudioQuantizeFlags) Has(other AudioQuantizeFlags) bool { var _ gobject.GoValueInitializer = AudioQuantizeFlags(0) -func (f AudioQuantizeFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioQuantizeFlags) +func (f AudioQuantizeFlags) GoValueType() gobject.Type { + return TypeAudioQuantizeFlags +} + +func (f AudioQuantizeFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -2153,8 +2235,11 @@ func (a AudioResamplerFlags) Has(other AudioResamplerFlags) bool { var _ gobject.GoValueInitializer = AudioResamplerFlags(0) -func (f AudioResamplerFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioResamplerFlags) +func (f AudioResamplerFlags) GoValueType() gobject.Type { + return TypeAudioResamplerFlags +} + +func (f AudioResamplerFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -2223,7 +2308,7 @@ type AudioRingBufferCallback func(rbuf AudioRingBuffer, data []uint8) // // The function takes the following parameters: // -// - channels int: the number of channels +// - channels int32: the number of channels // // The function returns the following values: // @@ -2233,7 +2318,7 @@ type AudioRingBufferCallback func(rbuf AudioRingBuffer, data []uint8) // // This function returns a reasonable fallback channel-mask and should be // called as a last resort when the specific channel map is unknown. -func AudioChannelGetFallbackMask(channels int) uint64 { +func AudioChannelGetFallbackMask(channels int32) uint64 { var carg1 C.gint // in, none, casted var cret C.guint64 // return, none, casted @@ -2514,7 +2599,7 @@ func AudioFormatsRaw() (uint, []AudioFormat) { // // - from []AudioChannelPosition: The channel positions to reorder from. // - to []AudioChannelPosition: The channel positions to reorder to. -// - reorderMap []int: Pointer to the reorder map. +// - reorderMap []int32: Pointer to the reorder map. // // The function returns the following values: // @@ -2528,7 +2613,7 @@ func AudioFormatsRaw() (uint, []AudioFormat) { // // The resulting @reorder_map can be used for reordering by assigning // channel i of the input to channel reorder_map[i] of the output. -func AudioGetChannelReorderMap(from []AudioChannelPosition, to []AudioChannelPosition, reorderMap []int) bool { +func AudioGetChannelReorderMap(from []AudioChannelPosition, to []AudioChannelPosition, reorderMap []int32) bool { var carg1 C.gint // implicit var carg2 *C.GstAudioChannelPosition // in, transfer: none, C Pointers: 1, Name: array[AudioChannelPosition], array (inner: *typesystem.Enum, length-by: carg1) var carg3 *C.GstAudioChannelPosition // in, transfer: none, C Pointers: 1, Name: array[AudioChannelPosition], array (inner: *typesystem.Enum, length-by: carg1) @@ -2546,7 +2631,7 @@ func AudioGetChannelReorderMap(from []AudioChannelPosition, to []AudioChannelPos _ = reorderMap _ = carg4 _ = carg1 - panic("unimplemented conversion of []int (gint*)") + panic("unimplemented conversion of []int32 (gint*)") cret = C.gst_audio_get_channel_reorder_map(carg1, carg2, carg3, carg4) runtime.KeepAlive(from) @@ -2598,7 +2683,7 @@ func AudioIec61937FrameSize(spec *AudioRingBufferSpec) uint { // - dst []uint8: the destination buffer to store the // payloaded contents in. Should not overlap with @src // - spec *AudioRingBufferSpec: the ringbufer spec for @src -// - endianness int: the expected byte order of the payloaded data +// - endianness int32: the expected byte order of the payloaded data // // The function returns the following values: // @@ -2607,7 +2692,7 @@ func AudioIec61937FrameSize(spec *AudioRingBufferSpec) uint { // Payloads @src in the form specified by IEC 61937 for the type from @spec and // stores the result in @dst. @src must contain exactly one frame of data and // the frame is not checked for errors. -func AudioIec61937Payload(src []uint8, dst []uint8, spec *AudioRingBufferSpec, endianness int) bool { +func AudioIec61937Payload(src []uint8, dst []uint8, spec *AudioRingBufferSpec, endianness int32) bool { var carg1 *C.guint8 // in, transfer: none, C Pointers: 1, Name: array[guint8], array (inner: *typesystem.CastablePrimitive, length-by: carg2) var carg2 C.guint // implicit var carg3 *C.guint8 // in, transfer: none, C Pointers: 1, Name: array[guint8], array (inner: *typesystem.CastablePrimitive, length-by: carg4) @@ -2916,7 +3001,7 @@ func BufferAddAudioMeta(buffer *gst.Buffer, info *AudioInfo, samples uint, offse // The function takes the following parameters: // // - buffer *gst.Buffer: a #GstBuffer -// - numChannels int: Number of channels in the DSD data +// - numChannels int32: Number of channels in the DSD data // - numBytesPerChannel uint: Number of bytes per channel // - offsets *uint (nullable): the offsets (in bytes) where each channel plane starts // in the buffer @@ -2946,7 +3031,7 @@ func BufferAddAudioMeta(buffer *gst.Buffer, info *AudioInfo, samples uint, offse // that you must add enough memory on the @buffer before adding this meta. // // This meta is only needed for non-interleaved (= planar) DSD data. -func BufferAddDsdPlaneOffsetMeta(buffer *gst.Buffer, numChannels int, numBytesPerChannel uint, offsets *uint) *DsdPlaneOffsetMeta { +func BufferAddDsdPlaneOffsetMeta(buffer *gst.Buffer, numChannels int32, numBytesPerChannel uint, offsets *uint) *DsdPlaneOffsetMeta { var carg1 *C.GstBuffer // in, none, converted var carg2 C.gint // in, none, casted var carg3 C.gsize // in, none, casted @@ -3054,7 +3139,7 @@ func BufferGetAudioLevelMeta(buffer *gst.Buffer) *AudioLevelMeta { // - inputPlaneOffsets *uint: Plane offsets for non-interleaved input data // - outputPlaneOffsets *uint: Plane offsets for non-interleaved output data // - numDsdBytes uint: How many bytes with DSD data to convert -// - numChannels int: Number of channels (must be at least 1) +// - numChannels int32: Number of channels (must be at least 1) // - reverseByteBits bool: If TRUE, reverse the bits in each DSD byte // // Converts DSD data from one layout and grouping format to another. @@ -3074,7 +3159,7 @@ func BufferGetAudioLevelMeta(buffer *gst.Buffer) *AudioLevelMeta { // exactly one plane per channel) within @input_data and @output_data // respectively. If GST_AUDIO_LAYOUT_INTERLEAVED is used, the plane offsets // are ignored. -func DsdConvert(inputData *uint8, outputData *uint8, inputFormat DsdFormat, outputFormat DsdFormat, inputLayout AudioLayout, outputLayout AudioLayout, inputPlaneOffsets *uint, outputPlaneOffsets *uint, numDsdBytes uint, numChannels int, reverseByteBits bool) { +func DsdConvert(inputData *uint8, outputData *uint8, inputFormat DsdFormat, outputFormat DsdFormat, inputLayout AudioLayout, outputLayout AudioLayout, inputPlaneOffsets *uint, outputPlaneOffsets *uint, numDsdBytes uint, numChannels int32, reverseByteBits bool) { var carg1 *C.guint8 // in, transfer: none, C Pointers: 1, Name: guint8 var carg2 *C.guint8 // in, transfer: none, C Pointers: 1, Name: guint8 var carg3 C.GstDsdFormat // in, none, casted @@ -3226,6 +3311,11 @@ func UnsafeStreamVolumeFromGlibFull(c unsafe.Pointer) StreamVolume { return gobject.UnsafeObjectFromGlibFull(c).(StreamVolume) } +// UnsafeStreamVolumeFromGlibBorrow is used to convert raw GstStreamVolume pointers to go without touching any references. This is used by the bindings internally. +func UnsafeStreamVolumeFromGlibBorrow(c unsafe.Pointer) StreamVolume { + return gobject.UnsafeObjectFromGlibBorrow(c).(StreamVolume) +} + // UnsafeStreamVolumeToGlibNone is used to convert the instance to it's C value GstStreamVolume. This is used by the bindings internally. func UnsafeStreamVolumeToGlibNone(c StreamVolume) unsafe.Pointer { i := c.upcastToGstStreamVolume() @@ -3467,6 +3557,11 @@ func UnsafeAudioAggregatorFromGlibFull(c unsafe.Pointer) AudioAggregator { return gobject.UnsafeObjectFromGlibFull(c).(AudioAggregator) } +// UnsafeAudioAggregatorFromGlibBorrow is used to convert raw GstAudioAggregator pointers to go without touching any references. This is used by the bindings internally. +func UnsafeAudioAggregatorFromGlibBorrow(c unsafe.Pointer) AudioAggregator { + return gobject.UnsafeObjectFromGlibBorrow(c).(AudioAggregator) +} + func (a *AudioAggregatorInstance) upcastToGstAudioAggregator() *AudioAggregatorInstance { return a } @@ -3555,7 +3650,7 @@ func UnsafeApplyAudioAggregatorOverrides[Instance AudioAggregator](gclass unsafe var numFrames uint // in, none, casted var goret bool // return - aagg = UnsafeAudioAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + aagg = UnsafeAudioAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) pad = UnsafeAudioAggregatorPadFromGlibNone(unsafe.Pointer(carg1)) inbuf = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg2)) inOffset = uint(carg3) @@ -3584,7 +3679,7 @@ func UnsafeApplyAudioAggregatorOverrides[Instance AudioAggregator](gclass unsafe var numFrames uint // in, none, casted var goret *gst.Buffer // return, full, converted - aagg = UnsafeAudioAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + aagg = UnsafeAudioAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) numFrames = uint(carg1) goret = overrides.CreateOutputBuffer(aagg, numFrames) @@ -3667,6 +3762,11 @@ func UnsafeAudioAggregatorPadFromGlibFull(c unsafe.Pointer) AudioAggregatorPad { return gobject.UnsafeObjectFromGlibFull(c).(AudioAggregatorPad) } +// UnsafeAudioAggregatorPadFromGlibBorrow is used to convert raw GstAudioAggregatorPad pointers to go without touching any references. This is used by the bindings internally. +func UnsafeAudioAggregatorPadFromGlibBorrow(c unsafe.Pointer) AudioAggregatorPad { + return gobject.UnsafeObjectFromGlibBorrow(c).(AudioAggregatorPad) +} + func (a *AudioAggregatorPadInstance) upcastToGstAudioAggregatorPad() *AudioAggregatorPadInstance { return a } @@ -3721,7 +3821,7 @@ func UnsafeApplyAudioAggregatorPadOverrides[Instance AudioAggregatorPad](gclass var buffer *gst.Buffer // in, none, converted var goret *gst.Buffer // return, full, converted - pad = UnsafeAudioAggregatorPadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pad = UnsafeAudioAggregatorPadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) inInfo = UnsafeAudioInfoFromGlibNone(unsafe.Pointer(carg1)) outInfo = UnsafeAudioInfoFromGlibNone(unsafe.Pointer(carg2)) buffer = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg3)) @@ -3743,7 +3843,7 @@ func UnsafeApplyAudioAggregatorPadOverrides[Instance AudioAggregatorPad](gclass func(carg0 *C.GstAudioAggregatorPad) { var pad Instance // go GstAudioAggregatorPad subclass - pad = UnsafeAudioAggregatorPadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pad = UnsafeAudioAggregatorPadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.UpdateConversionInfo(pad) }, @@ -3941,6 +4041,11 @@ func UnsafeAudioBaseSinkFromGlibFull(c unsafe.Pointer) AudioBaseSink { return gobject.UnsafeObjectFromGlibFull(c).(AudioBaseSink) } +// UnsafeAudioBaseSinkFromGlibBorrow is used to convert raw GstAudioBaseSink pointers to go without touching any references. This is used by the bindings internally. +func UnsafeAudioBaseSinkFromGlibBorrow(c unsafe.Pointer) AudioBaseSink { + return gobject.UnsafeObjectFromGlibBorrow(c).(AudioBaseSink) +} + func (a *AudioBaseSinkInstance) upcastToGstAudioBaseSink() *AudioBaseSinkInstance { return a } @@ -4284,7 +4389,7 @@ func UnsafeApplyAudioBaseSinkOverrides[Instance AudioBaseSink](gclass unsafe.Poi var sink Instance // go GstAudioBaseSink subclass var goret AudioRingBuffer // return, none, converted, nullable - sink = UnsafeAudioBaseSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeAudioBaseSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.CreateRingbuffer(sink) @@ -4307,7 +4412,7 @@ func UnsafeApplyAudioBaseSinkOverrides[Instance AudioBaseSink](gclass unsafe.Poi var buffer *gst.Buffer // in, none, converted var goret *gst.Buffer // return, full, converted - sink = UnsafeAudioBaseSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeAudioBaseSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) buffer = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Payload(sink, buffer) @@ -4440,6 +4545,11 @@ func UnsafeAudioBaseSrcFromGlibFull(c unsafe.Pointer) AudioBaseSrc { return gobject.UnsafeObjectFromGlibFull(c).(AudioBaseSrc) } +// UnsafeAudioBaseSrcFromGlibBorrow is used to convert raw GstAudioBaseSrc pointers to go without touching any references. This is used by the bindings internally. +func UnsafeAudioBaseSrcFromGlibBorrow(c unsafe.Pointer) AudioBaseSrc { + return gobject.UnsafeObjectFromGlibBorrow(c).(AudioBaseSrc) +} + func (a *AudioBaseSrcInstance) upcastToGstAudioBaseSrc() *AudioBaseSrcInstance { return a } @@ -4601,7 +4711,7 @@ func UnsafeApplyAudioBaseSrcOverrides[Instance AudioBaseSrc](gclass unsafe.Point var src Instance // go GstAudioBaseSrc subclass var goret AudioRingBuffer // return, none, converted, nullable - src = UnsafeAudioBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeAudioBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.CreateRingbuffer(src) @@ -4751,6 +4861,11 @@ func UnsafeAudioCdSrcFromGlibFull(c unsafe.Pointer) AudioCdSrc { return gobject.UnsafeObjectFromGlibFull(c).(AudioCdSrc) } +// UnsafeAudioCdSrcFromGlibBorrow is used to convert raw GstAudioCdSrc pointers to go without touching any references. This is used by the bindings internally. +func UnsafeAudioCdSrcFromGlibBorrow(c unsafe.Pointer) AudioCdSrc { + return gobject.UnsafeObjectFromGlibBorrow(c).(AudioCdSrc) +} + func (a *AudioCdSrcInstance) upcastToGstAudioCdSrc() *AudioCdSrcInstance { return a } @@ -4820,12 +4935,12 @@ type AudioCdSrcOverrides[Instance AudioCdSrc] struct { // ReadSector allows you to override the implementation of the virtual method read_sector. // The function takes the following parameters: // - // - sector int + // - sector int32 // // The function returns the following values: // // - goret *gst.Buffer - ReadSector func(Instance, int) *gst.Buffer + ReadSector func(Instance, int32) *gst.Buffer } // UnsafeApplyAudioCdSrcOverrides applies the overrides to init the gclass by setting the trampoline functions. @@ -4843,7 +4958,7 @@ func UnsafeApplyAudioCdSrcOverrides[Instance AudioCdSrc](gclass unsafe.Pointer, func(carg0 *C.GstAudioCdSrc) { var src Instance // go GstAudioCdSrc subclass - src = UnsafeAudioCdSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeAudioCdSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.Close(src) }, @@ -4860,7 +4975,7 @@ func UnsafeApplyAudioCdSrcOverrides[Instance AudioCdSrc](gclass unsafe.Pointer, var device string // in, none, string var goret bool // return - src = UnsafeAudioCdSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeAudioCdSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) device = C.GoString((*C.char)(unsafe.Pointer(carg1))) goret = overrides.Open(src, device) @@ -4881,11 +4996,11 @@ func UnsafeApplyAudioCdSrcOverrides[Instance AudioCdSrc](gclass unsafe.Pointer, "_gotk4_gstaudio1_AudioCdSrc_read_sector", func(carg0 *C.GstAudioCdSrc, carg1 C.gint) (cret *C.GstBuffer) { var src Instance // go GstAudioCdSrc subclass - var sector int // in, none, casted + var sector int32 // in, none, casted var goret *gst.Buffer // return, full, converted - src = UnsafeAudioCdSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) - sector = int(carg1) + src = UnsafeAudioCdSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) + sector = int32(carg1) goret = overrides.ReadSector(src, sector) @@ -5012,6 +5127,11 @@ func UnsafeAudioClockFromGlibFull(c unsafe.Pointer) AudioClock { return gobject.UnsafeObjectFromGlibFull(c).(AudioClock) } +// UnsafeAudioClockFromGlibBorrow is used to convert raw GstAudioClock pointers to go without touching any references. This is used by the bindings internally. +func UnsafeAudioClockFromGlibBorrow(c unsafe.Pointer) AudioClock { + return gobject.UnsafeObjectFromGlibBorrow(c).(AudioClock) +} + func (a *AudioClockInstance) upcastToGstAudioClock() *AudioClockInstance { return a } @@ -5318,7 +5438,7 @@ type AudioDecoder interface { // The function takes the following parameters: // // - buf *gst.Buffer (nullable): decoded data - // - frames int: number of decoded frames represented by decoded data + // - frames int32: number of decoded frames represented by decoded data // // The function returns the following values: // @@ -5334,7 +5454,7 @@ type AudioDecoder interface { // // Note that a frame received in #GstAudioDecoderClass.handle_frame() may be // invalidated by a call to this function. - FinishFrame(*gst.Buffer, int) gst.FlowReturn + FinishFrame(*gst.Buffer, int32) gst.FlowReturn // FinishSubframe wraps gst_audio_decoder_finish_subframe // // The function takes the following parameters: @@ -5383,8 +5503,8 @@ type AudioDecoder interface { // // The function returns the following values: // - // - goret int - GetDelay() int + // - goret int32 + GetDelay() int32 // GetDrainable wraps gst_audio_decoder_get_drainable // // The function returns the following values: @@ -5397,8 +5517,8 @@ type AudioDecoder interface { // // The function returns the following values: // - // - goret int - GetEstimateRate() int + // - goret int32 + GetEstimateRate() int32 // GetLatency wraps gst_audio_decoder_get_latency // // The function returns the following values: @@ -5413,8 +5533,8 @@ type AudioDecoder interface { // // The function returns the following values: // - // - goret int - GetMaxErrors() int + // - goret int32 + GetMaxErrors() int32 // GetMinLatency wraps gst_audio_decoder_get_min_latency // // The function returns the following values: @@ -5452,8 +5572,8 @@ type AudioDecoder interface { // // The function returns the following values: // - // - goret int - GetPlcAware() int + // - goret int32 + GetPlcAware() int32 // GetTolerance wraps gst_audio_decoder_get_tolerance // // The function returns the following values: @@ -5548,13 +5668,13 @@ type AudioDecoder interface { // // The function takes the following parameters: // - // - num int: max tolerated errors + // - num int32: max tolerated errors // // Sets numbers of tolerated decoder errors, where a tolerated one is then only // warned about, but more than tolerated will lead to fatal error. You can set // -1 for never returning fatal errors. Default is set to // GST_AUDIO_DECODER_MAX_ERRORS. - SetMaxErrors(int) + SetMaxErrors(int32) // SetMinLatency wraps gst_audio_decoder_set_min_latency // // The function takes the following parameters: @@ -5677,6 +5797,11 @@ func UnsafeAudioDecoderFromGlibFull(c unsafe.Pointer) AudioDecoder { return gobject.UnsafeObjectFromGlibFull(c).(AudioDecoder) } +// UnsafeAudioDecoderFromGlibBorrow is used to convert raw GstAudioDecoder pointers to go without touching any references. This is used by the bindings internally. +func UnsafeAudioDecoderFromGlibBorrow(c unsafe.Pointer) AudioDecoder { + return gobject.UnsafeObjectFromGlibBorrow(c).(AudioDecoder) +} + func (a *AudioDecoderInstance) upcastToGstAudioDecoder() *AudioDecoderInstance { return a } @@ -5727,7 +5852,7 @@ func (dec *AudioDecoderInstance) AllocateOutputBuffer(size uint) *gst.Buffer { // The function takes the following parameters: // // - buf *gst.Buffer (nullable): decoded data -// - frames int: number of decoded frames represented by decoded data +// - frames int32: number of decoded frames represented by decoded data // // The function returns the following values: // @@ -5743,7 +5868,7 @@ func (dec *AudioDecoderInstance) AllocateOutputBuffer(size uint) *gst.Buffer { // // Note that a frame received in #GstAudioDecoderClass.handle_frame() may be // invalidated by a call to this function. -func (dec *AudioDecoderInstance) FinishFrame(buf *gst.Buffer, frames int) gst.FlowReturn { +func (dec *AudioDecoderInstance) FinishFrame(buf *gst.Buffer, frames int32) gst.FlowReturn { var carg0 *C.GstAudioDecoder // in, none, converted var carg1 *C.GstBuffer // in, full, converted, nullable var carg2 C.gint // in, none, casted @@ -5872,8 +5997,8 @@ func (dec *AudioDecoderInstance) GetAudioInfo() *AudioInfo { // // The function returns the following values: // -// - goret int -func (dec *AudioDecoderInstance) GetDelay() int { +// - goret int32 +func (dec *AudioDecoderInstance) GetDelay() int32 { var carg0 *C.GstAudioDecoder // in, none, converted var cret C.gint // return, none, casted @@ -5882,9 +6007,9 @@ func (dec *AudioDecoderInstance) GetDelay() int { cret = C.gst_audio_decoder_get_delay(carg0) runtime.KeepAlive(dec) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -5918,8 +6043,8 @@ func (dec *AudioDecoderInstance) GetDrainable() bool { // // The function returns the following values: // -// - goret int -func (dec *AudioDecoderInstance) GetEstimateRate() int { +// - goret int32 +func (dec *AudioDecoderInstance) GetEstimateRate() int32 { var carg0 *C.GstAudioDecoder // in, none, converted var cret C.gint // return, none, casted @@ -5928,9 +6053,9 @@ func (dec *AudioDecoderInstance) GetEstimateRate() int { cret = C.gst_audio_decoder_get_estimate_rate(carg0) runtime.KeepAlive(dec) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -5967,8 +6092,8 @@ func (dec *AudioDecoderInstance) GetLatency() (gst.ClockTime, gst.ClockTime) { // // The function returns the following values: // -// - goret int -func (dec *AudioDecoderInstance) GetMaxErrors() int { +// - goret int32 +func (dec *AudioDecoderInstance) GetMaxErrors() int32 { var carg0 *C.GstAudioDecoder // in, none, converted var cret C.gint // return, none, casted @@ -5977,9 +6102,9 @@ func (dec *AudioDecoderInstance) GetMaxErrors() int { cret = C.gst_audio_decoder_get_max_errors(carg0) runtime.KeepAlive(dec) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -6092,8 +6217,8 @@ func (dec *AudioDecoderInstance) GetPlc() bool { // // The function returns the following values: // -// - goret int -func (dec *AudioDecoderInstance) GetPlcAware() int { +// - goret int32 +func (dec *AudioDecoderInstance) GetPlcAware() int32 { var carg0 *C.GstAudioDecoder // in, none, converted var cret C.gint // return, none, casted @@ -6102,9 +6227,9 @@ func (dec *AudioDecoderInstance) GetPlcAware() int { cret = C.gst_audio_decoder_get_plc_aware(carg0) runtime.KeepAlive(dec) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -6329,13 +6454,13 @@ func (dec *AudioDecoderInstance) SetLatency(min gst.ClockTime, max gst.ClockTime // // The function takes the following parameters: // -// - num int: max tolerated errors +// - num int32: max tolerated errors // // Sets numbers of tolerated decoder errors, where a tolerated one is then only // warned about, but more than tolerated will lead to fatal error. You can set // -1 for never returning fatal errors. Default is set to // GST_AUDIO_DECODER_MAX_ERRORS. -func (dec *AudioDecoderInstance) SetMaxErrors(num int) { +func (dec *AudioDecoderInstance) SetMaxErrors(num int32) { var carg0 *C.GstAudioDecoder // in, none, converted var carg1 C.gint // in, none, casted @@ -6615,10 +6740,10 @@ type AudioDecoderOverrides[Instance AudioDecoder] struct { // // The function returns the following values: // - // - offset int - // - length int + // - offset int32 + // - length int32 // - goret gst.FlowReturn - Parse func(Instance, gstbase.Adapter) (int, int, gst.FlowReturn) + Parse func(Instance, gstbase.Adapter) (int32, int32, gst.FlowReturn) // ProposeAllocation allows you to override the implementation of the virtual method propose_allocation. // The function takes the following parameters: // @@ -6712,7 +6837,7 @@ func UnsafeApplyAudioDecoderOverrides[Instance AudioDecoder](gclass unsafe.Point var dec Instance // go GstAudioDecoder subclass var goret bool // return - dec = UnsafeAudioDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + dec = UnsafeAudioDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Close(dec) @@ -6735,7 +6860,7 @@ func UnsafeApplyAudioDecoderOverrides[Instance AudioDecoder](gclass unsafe.Point var query *gst.Query // in, none, converted var goret bool // return - dec = UnsafeAudioDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + dec = UnsafeAudioDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.DecideAllocation(dec, query) @@ -6758,7 +6883,7 @@ func UnsafeApplyAudioDecoderOverrides[Instance AudioDecoder](gclass unsafe.Point var dec Instance // go GstAudioDecoder subclass var hard bool // in - dec = UnsafeAudioDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + dec = UnsafeAudioDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != 0 { hard = true } @@ -6778,7 +6903,7 @@ func UnsafeApplyAudioDecoderOverrides[Instance AudioDecoder](gclass unsafe.Point var filter *gst.Caps // in, none, converted var goret *gst.Caps // return, full, converted - dec = UnsafeAudioDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + dec = UnsafeAudioDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) filter = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Getcaps(dec, filter) @@ -6800,7 +6925,7 @@ func UnsafeApplyAudioDecoderOverrides[Instance AudioDecoder](gclass unsafe.Point var buffer *gst.Buffer // in, none, converted var goret gst.FlowReturn // return, none, casted - dec = UnsafeAudioDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + dec = UnsafeAudioDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) buffer = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.HandleFrame(dec, buffer) @@ -6821,7 +6946,7 @@ func UnsafeApplyAudioDecoderOverrides[Instance AudioDecoder](gclass unsafe.Point var dec Instance // go GstAudioDecoder subclass var goret bool // return - dec = UnsafeAudioDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + dec = UnsafeAudioDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Negotiate(dec) @@ -6843,7 +6968,7 @@ func UnsafeApplyAudioDecoderOverrides[Instance AudioDecoder](gclass unsafe.Point var dec Instance // go GstAudioDecoder subclass var goret bool // return - dec = UnsafeAudioDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + dec = UnsafeAudioDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Open(dec) @@ -6864,11 +6989,11 @@ func UnsafeApplyAudioDecoderOverrides[Instance AudioDecoder](gclass unsafe.Point func(carg0 *C.GstAudioDecoder, carg1 *C.GstAdapter, carg2 *C.gint, carg3 *C.gint) (cret C.GstFlowReturn) { var dec Instance // go GstAudioDecoder subclass var adapter gstbase.Adapter // in, none, converted - var offset int // out, full, casted - var length int // out, full, casted + var offset int32 // out, full, casted + var length int32 // out, full, casted var goret gst.FlowReturn // return, none, casted - dec = UnsafeAudioDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + dec = UnsafeAudioDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) adapter = gstbase.UnsafeAdapterFromGlibNone(unsafe.Pointer(carg1)) offset, length, goret = overrides.Parse(dec, adapter) @@ -6892,7 +7017,7 @@ func UnsafeApplyAudioDecoderOverrides[Instance AudioDecoder](gclass unsafe.Point var query *gst.Query // in, none, converted var goret bool // return - dec = UnsafeAudioDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + dec = UnsafeAudioDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.ProposeAllocation(dec, query) @@ -6916,7 +7041,7 @@ func UnsafeApplyAudioDecoderOverrides[Instance AudioDecoder](gclass unsafe.Point var caps *gst.Caps // in, none, converted var goret bool // return - dec = UnsafeAudioDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + dec = UnsafeAudioDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SetFormat(dec, caps) @@ -6940,7 +7065,7 @@ func UnsafeApplyAudioDecoderOverrides[Instance AudioDecoder](gclass unsafe.Point var event *gst.Event // in, none, converted var goret bool // return - dec = UnsafeAudioDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + dec = UnsafeAudioDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = gst.UnsafeEventFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SinkEvent(dec, event) @@ -6964,7 +7089,7 @@ func UnsafeApplyAudioDecoderOverrides[Instance AudioDecoder](gclass unsafe.Point var query *gst.Query // in, none, converted var goret bool // return - dec = UnsafeAudioDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + dec = UnsafeAudioDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SinkQuery(dec, query) @@ -6988,7 +7113,7 @@ func UnsafeApplyAudioDecoderOverrides[Instance AudioDecoder](gclass unsafe.Point var event *gst.Event // in, none, converted var goret bool // return - dec = UnsafeAudioDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + dec = UnsafeAudioDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = gst.UnsafeEventFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SrcEvent(dec, event) @@ -7012,7 +7137,7 @@ func UnsafeApplyAudioDecoderOverrides[Instance AudioDecoder](gclass unsafe.Point var query *gst.Query // in, none, converted var goret bool // return - dec = UnsafeAudioDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + dec = UnsafeAudioDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SrcQuery(dec, query) @@ -7035,7 +7160,7 @@ func UnsafeApplyAudioDecoderOverrides[Instance AudioDecoder](gclass unsafe.Point var dec Instance // go GstAudioDecoder subclass var goret bool // return - dec = UnsafeAudioDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + dec = UnsafeAudioDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Start(dec) @@ -7057,7 +7182,7 @@ func UnsafeApplyAudioDecoderOverrides[Instance AudioDecoder](gclass unsafe.Point var dec Instance // go GstAudioDecoder subclass var goret bool // return - dec = UnsafeAudioDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + dec = UnsafeAudioDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Stop(dec) @@ -7082,7 +7207,7 @@ func UnsafeApplyAudioDecoderOverrides[Instance AudioDecoder](gclass unsafe.Point var inbuf *gst.Buffer // in, none, converted var goret bool // return - enc = UnsafeAudioDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + enc = UnsafeAudioDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) outbuf = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) meta = gst.UnsafeMetaFromGlibNone(unsafe.Pointer(carg2)) inbuf = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg3)) @@ -7252,7 +7377,7 @@ type AudioEncoder interface { // The function takes the following parameters: // // - buffer *gst.Buffer (nullable): encoded data - // - samples int: number of samples (per channel) represented by encoded data + // - samples int32: number of samples (per channel) represented by encoded data // // The function returns the following values: // @@ -7268,7 +7393,7 @@ type AudioEncoder interface { // // Note that samples received in #GstAudioEncoderClass.handle_frame() // may be invalidated by a call to this function. - FinishFrame(*gst.Buffer, int) gst.FlowReturn + FinishFrame(*gst.Buffer, int32) gst.FlowReturn // GetAllocator wraps gst_audio_encoder_get_allocator // // The function returns the following values: @@ -7301,20 +7426,20 @@ type AudioEncoder interface { // // The function returns the following values: // - // - goret int - GetFrameMax() int + // - goret int32 + GetFrameMax() int32 // GetFrameSamplesMax wraps gst_audio_encoder_get_frame_samples_max // // The function returns the following values: // - // - goret int - GetFrameSamplesMax() int + // - goret int32 + GetFrameSamplesMax() int32 // GetFrameSamplesMin wraps gst_audio_encoder_get_frame_samples_min // // The function returns the following values: // - // - goret int - GetFrameSamplesMin() int + // - goret int32 + GetFrameSamplesMin() int32 // GetHardMin wraps gst_audio_encoder_get_hard_min // // The function returns the following values: @@ -7343,8 +7468,8 @@ type AudioEncoder interface { // // The function returns the following values: // - // - goret int - GetLookahead() int + // - goret int32 + GetLookahead() int32 // GetMarkGranule wraps gst_audio_encoder_get_mark_granule // // The function returns the following values: @@ -7439,19 +7564,19 @@ type AudioEncoder interface { // // The function takes the following parameters: // - // - num int: number of frames + // - num int32: number of frames // // Sets max number of frames accepted at once (assumed minimally 1). // Requires @frame_samples_min and @frame_samples_max to be the equal. // // Note: This value will be reset to 0 every time before // #GstAudioEncoderClass.set_format() is called. - SetFrameMax(int) + SetFrameMax(int32) // SetFrameSamplesMax wraps gst_audio_encoder_set_frame_samples_max // // The function takes the following parameters: // - // - num int: number of samples per frame + // - num int32: number of samples per frame // // Sets number of samples (per channel) subclass needs to be handed, // at most or will be handed all available if 0. @@ -7461,12 +7586,12 @@ type AudioEncoder interface { // // Note: This value will be reset to 0 every time before // #GstAudioEncoderClass.set_format() is called. - SetFrameSamplesMax(int) + SetFrameSamplesMax(int32) // SetFrameSamplesMin wraps gst_audio_encoder_set_frame_samples_min // // The function takes the following parameters: // - // - num int: number of samples per frame + // - num int32: number of samples per frame // // Sets number of samples (per channel) subclass needs to be handed, // at least or will be handed all available if 0. @@ -7476,7 +7601,7 @@ type AudioEncoder interface { // // Note: This value will be reset to 0 every time before // #GstAudioEncoderClass.set_format() is called. - SetFrameSamplesMin(int) + SetFrameSamplesMin(int32) // SetHardMin wraps gst_audio_encoder_set_hard_min // // The function takes the following parameters: @@ -7511,13 +7636,13 @@ type AudioEncoder interface { // // The function takes the following parameters: // - // - num int: lookahead + // - num int32: lookahead // // Sets encoder lookahead (in units of input rate samples) // // Note: This value will be reset to 0 every time before // #GstAudioEncoderClass.set_format() is called. - SetLookahead(int) + SetLookahead(int32) // SetMarkGranule wraps gst_audio_encoder_set_mark_granule // // The function takes the following parameters: @@ -7591,6 +7716,11 @@ func UnsafeAudioEncoderFromGlibFull(c unsafe.Pointer) AudioEncoder { return gobject.UnsafeObjectFromGlibFull(c).(AudioEncoder) } +// UnsafeAudioEncoderFromGlibBorrow is used to convert raw GstAudioEncoder pointers to go without touching any references. This is used by the bindings internally. +func UnsafeAudioEncoderFromGlibBorrow(c unsafe.Pointer) AudioEncoder { + return gobject.UnsafeObjectFromGlibBorrow(c).(AudioEncoder) +} + func (a *AudioEncoderInstance) upcastToGstAudioEncoder() *AudioEncoderInstance { return a } @@ -7641,7 +7771,7 @@ func (enc *AudioEncoderInstance) AllocateOutputBuffer(size uint) *gst.Buffer { // The function takes the following parameters: // // - buffer *gst.Buffer (nullable): encoded data -// - samples int: number of samples (per channel) represented by encoded data +// - samples int32: number of samples (per channel) represented by encoded data // // The function returns the following values: // @@ -7657,7 +7787,7 @@ func (enc *AudioEncoderInstance) AllocateOutputBuffer(size uint) *gst.Buffer { // // Note that samples received in #GstAudioEncoderClass.handle_frame() // may be invalidated by a call to this function. -func (enc *AudioEncoderInstance) FinishFrame(buffer *gst.Buffer, samples int) gst.FlowReturn { +func (enc *AudioEncoderInstance) FinishFrame(buffer *gst.Buffer, samples int32) gst.FlowReturn { var carg0 *C.GstAudioEncoder // in, none, converted var carg1 *C.GstBuffer // in, full, converted, nullable var carg2 C.gint // in, none, casted @@ -7767,8 +7897,8 @@ func (enc *AudioEncoderInstance) GetDrainable() bool { // // The function returns the following values: // -// - goret int -func (enc *AudioEncoderInstance) GetFrameMax() int { +// - goret int32 +func (enc *AudioEncoderInstance) GetFrameMax() int32 { var carg0 *C.GstAudioEncoder // in, none, converted var cret C.gint // return, none, casted @@ -7777,9 +7907,9 @@ func (enc *AudioEncoderInstance) GetFrameMax() int { cret = C.gst_audio_encoder_get_frame_max(carg0) runtime.KeepAlive(enc) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -7788,8 +7918,8 @@ func (enc *AudioEncoderInstance) GetFrameMax() int { // // The function returns the following values: // -// - goret int -func (enc *AudioEncoderInstance) GetFrameSamplesMax() int { +// - goret int32 +func (enc *AudioEncoderInstance) GetFrameSamplesMax() int32 { var carg0 *C.GstAudioEncoder // in, none, converted var cret C.gint // return, none, casted @@ -7798,9 +7928,9 @@ func (enc *AudioEncoderInstance) GetFrameSamplesMax() int { cret = C.gst_audio_encoder_get_frame_samples_max(carg0) runtime.KeepAlive(enc) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -7809,8 +7939,8 @@ func (enc *AudioEncoderInstance) GetFrameSamplesMax() int { // // The function returns the following values: // -// - goret int -func (enc *AudioEncoderInstance) GetFrameSamplesMin() int { +// - goret int32 +func (enc *AudioEncoderInstance) GetFrameSamplesMin() int32 { var carg0 *C.GstAudioEncoder // in, none, converted var cret C.gint // return, none, casted @@ -7819,9 +7949,9 @@ func (enc *AudioEncoderInstance) GetFrameSamplesMin() int { cret = C.gst_audio_encoder_get_frame_samples_min(carg0) runtime.KeepAlive(enc) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -7906,8 +8036,8 @@ func (enc *AudioEncoderInstance) GetLatency() (gst.ClockTime, gst.ClockTime) { // // The function returns the following values: // -// - goret int -func (enc *AudioEncoderInstance) GetLookahead() int { +// - goret int32 +func (enc *AudioEncoderInstance) GetLookahead() int32 { var carg0 *C.GstAudioEncoder // in, none, converted var cret C.gint // return, none, casted @@ -7916,9 +8046,9 @@ func (enc *AudioEncoderInstance) GetLookahead() int { cret = C.gst_audio_encoder_get_lookahead(carg0) runtime.KeepAlive(enc) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -8150,14 +8280,14 @@ func (enc *AudioEncoderInstance) SetDrainable(enabled bool) { // // The function takes the following parameters: // -// - num int: number of frames +// - num int32: number of frames // // Sets max number of frames accepted at once (assumed minimally 1). // Requires @frame_samples_min and @frame_samples_max to be the equal. // // Note: This value will be reset to 0 every time before // #GstAudioEncoderClass.set_format() is called. -func (enc *AudioEncoderInstance) SetFrameMax(num int) { +func (enc *AudioEncoderInstance) SetFrameMax(num int32) { var carg0 *C.GstAudioEncoder // in, none, converted var carg1 C.gint // in, none, casted @@ -8173,7 +8303,7 @@ func (enc *AudioEncoderInstance) SetFrameMax(num int) { // // The function takes the following parameters: // -// - num int: number of samples per frame +// - num int32: number of samples per frame // // Sets number of samples (per channel) subclass needs to be handed, // at most or will be handed all available if 0. @@ -8183,7 +8313,7 @@ func (enc *AudioEncoderInstance) SetFrameMax(num int) { // // Note: This value will be reset to 0 every time before // #GstAudioEncoderClass.set_format() is called. -func (enc *AudioEncoderInstance) SetFrameSamplesMax(num int) { +func (enc *AudioEncoderInstance) SetFrameSamplesMax(num int32) { var carg0 *C.GstAudioEncoder // in, none, converted var carg1 C.gint // in, none, casted @@ -8199,7 +8329,7 @@ func (enc *AudioEncoderInstance) SetFrameSamplesMax(num int) { // // The function takes the following parameters: // -// - num int: number of samples per frame +// - num int32: number of samples per frame // // Sets number of samples (per channel) subclass needs to be handed, // at least or will be handed all available if 0. @@ -8209,7 +8339,7 @@ func (enc *AudioEncoderInstance) SetFrameSamplesMax(num int) { // // Note: This value will be reset to 0 every time before // #GstAudioEncoderClass.set_format() is called. -func (enc *AudioEncoderInstance) SetFrameSamplesMin(num int) { +func (enc *AudioEncoderInstance) SetFrameSamplesMin(num int32) { var carg0 *C.GstAudioEncoder // in, none, converted var carg1 C.gint // in, none, casted @@ -8295,13 +8425,13 @@ func (enc *AudioEncoderInstance) SetLatency(min gst.ClockTime, max gst.ClockTime // // The function takes the following parameters: // -// - num int: lookahead +// - num int32: lookahead // // Sets encoder lookahead (in units of input rate samples) // // Note: This value will be reset to 0 every time before // #GstAudioEncoderClass.set_format() is called. -func (enc *AudioEncoderInstance) SetLookahead(num int) { +func (enc *AudioEncoderInstance) SetLookahead(num int32) { var carg0 *C.GstAudioEncoder // in, none, converted var carg1 C.gint // in, none, casted @@ -8555,7 +8685,7 @@ func UnsafeApplyAudioEncoderOverrides[Instance AudioEncoder](gclass unsafe.Point var enc Instance // go GstAudioEncoder subclass var goret bool // return - enc = UnsafeAudioEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + enc = UnsafeAudioEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Close(enc) @@ -8578,7 +8708,7 @@ func UnsafeApplyAudioEncoderOverrides[Instance AudioEncoder](gclass unsafe.Point var query *gst.Query // in, none, converted var goret bool // return - enc = UnsafeAudioEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + enc = UnsafeAudioEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.DecideAllocation(enc, query) @@ -8600,7 +8730,7 @@ func UnsafeApplyAudioEncoderOverrides[Instance AudioEncoder](gclass unsafe.Point func(carg0 *C.GstAudioEncoder) { var enc Instance // go GstAudioEncoder subclass - enc = UnsafeAudioEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + enc = UnsafeAudioEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.Flush(enc) }, @@ -8617,7 +8747,7 @@ func UnsafeApplyAudioEncoderOverrides[Instance AudioEncoder](gclass unsafe.Point var filter *gst.Caps // in, none, converted var goret *gst.Caps // return, full, converted - enc = UnsafeAudioEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + enc = UnsafeAudioEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) filter = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Getcaps(enc, filter) @@ -8639,7 +8769,7 @@ func UnsafeApplyAudioEncoderOverrides[Instance AudioEncoder](gclass unsafe.Point var buffer *gst.Buffer // in, none, converted var goret gst.FlowReturn // return, none, casted - enc = UnsafeAudioEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + enc = UnsafeAudioEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) buffer = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.HandleFrame(enc, buffer) @@ -8660,7 +8790,7 @@ func UnsafeApplyAudioEncoderOverrides[Instance AudioEncoder](gclass unsafe.Point var enc Instance // go GstAudioEncoder subclass var goret bool // return - enc = UnsafeAudioEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + enc = UnsafeAudioEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Negotiate(enc) @@ -8682,7 +8812,7 @@ func UnsafeApplyAudioEncoderOverrides[Instance AudioEncoder](gclass unsafe.Point var enc Instance // go GstAudioEncoder subclass var goret bool // return - enc = UnsafeAudioEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + enc = UnsafeAudioEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Open(enc) @@ -8705,7 +8835,7 @@ func UnsafeApplyAudioEncoderOverrides[Instance AudioEncoder](gclass unsafe.Point var query *gst.Query // in, none, converted var goret bool // return - enc = UnsafeAudioEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + enc = UnsafeAudioEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.ProposeAllocation(enc, query) @@ -8729,7 +8859,7 @@ func UnsafeApplyAudioEncoderOverrides[Instance AudioEncoder](gclass unsafe.Point var info *AudioInfo // in, none, converted var goret bool // return - enc = UnsafeAudioEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + enc = UnsafeAudioEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) info = UnsafeAudioInfoFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SetFormat(enc, info) @@ -8753,7 +8883,7 @@ func UnsafeApplyAudioEncoderOverrides[Instance AudioEncoder](gclass unsafe.Point var event *gst.Event // in, none, converted var goret bool // return - enc = UnsafeAudioEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + enc = UnsafeAudioEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = gst.UnsafeEventFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SinkEvent(enc, event) @@ -8777,7 +8907,7 @@ func UnsafeApplyAudioEncoderOverrides[Instance AudioEncoder](gclass unsafe.Point var query *gst.Query // in, none, converted var goret bool // return - encoder = UnsafeAudioEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + encoder = UnsafeAudioEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SinkQuery(encoder, query) @@ -8801,7 +8931,7 @@ func UnsafeApplyAudioEncoderOverrides[Instance AudioEncoder](gclass unsafe.Point var event *gst.Event // in, none, converted var goret bool // return - enc = UnsafeAudioEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + enc = UnsafeAudioEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = gst.UnsafeEventFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SrcEvent(enc, event) @@ -8825,7 +8955,7 @@ func UnsafeApplyAudioEncoderOverrides[Instance AudioEncoder](gclass unsafe.Point var query *gst.Query // in, none, converted var goret bool // return - encoder = UnsafeAudioEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + encoder = UnsafeAudioEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SrcQuery(encoder, query) @@ -8848,7 +8978,7 @@ func UnsafeApplyAudioEncoderOverrides[Instance AudioEncoder](gclass unsafe.Point var enc Instance // go GstAudioEncoder subclass var goret bool // return - enc = UnsafeAudioEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + enc = UnsafeAudioEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Start(enc) @@ -8870,7 +9000,7 @@ func UnsafeApplyAudioEncoderOverrides[Instance AudioEncoder](gclass unsafe.Point var enc Instance // go GstAudioEncoder subclass var goret bool // return - enc = UnsafeAudioEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + enc = UnsafeAudioEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Stop(enc) @@ -8895,7 +9025,7 @@ func UnsafeApplyAudioEncoderOverrides[Instance AudioEncoder](gclass unsafe.Point var inbuf *gst.Buffer // in, none, converted var goret bool // return - enc = UnsafeAudioEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + enc = UnsafeAudioEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) outbuf = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) meta = gst.UnsafeMetaFromGlibNone(unsafe.Pointer(carg2)) inbuf = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg3)) @@ -8994,6 +9124,11 @@ func UnsafeAudioFilterFromGlibFull(c unsafe.Pointer) AudioFilter { return gobject.UnsafeObjectFromGlibFull(c).(AudioFilter) } +// UnsafeAudioFilterFromGlibBorrow is used to convert raw GstAudioFilter pointers to go without touching any references. This is used by the bindings internally. +func UnsafeAudioFilterFromGlibBorrow(c unsafe.Pointer) AudioFilter { + return gobject.UnsafeObjectFromGlibBorrow(c).(AudioFilter) +} + func (a *AudioFilterInstance) upcastToGstAudioFilter() *AudioFilterInstance { return a } @@ -9042,7 +9177,7 @@ func UnsafeApplyAudioFilterOverrides[Instance AudioFilter](gclass unsafe.Pointer var info *AudioInfo // in, none, converted var goret bool // return - filter = UnsafeAudioFilterFromGlibNone(unsafe.Pointer(carg0)).(Instance) + filter = UnsafeAudioFilterFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) info = UnsafeAudioInfoFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Setup(filter, info) @@ -9148,13 +9283,13 @@ type AudioRingBuffer interface { // // The function takes the following parameters: // - // - segment int: the segment to clear + // - segment int32: the segment to clear // // Clear the given segment of the buffer with silence samples. // This function is used by subclasses. // // MT safe. - Clear(int) + Clear(int32) // ClearAll wraps gst_audio_ring_buffer_clear_all // // Clear all samples from the ringbuffer. @@ -9211,6 +9346,26 @@ type AudioRingBuffer interface { // // Checks the status of the device associated with the ring buffer. DeviceIsOpen() bool + // GetSegbase wraps gst_audio_ring_buffer_get_segbase + // + // The function returns the following values: + // + // - goret uint64 + // + // Gets the current segment base number of the ringbuffer. + // + // MT safe. + GetSegbase() uint64 + // GetSegdone wraps gst_audio_ring_buffer_get_segdone + // + // The function returns the following values: + // + // - goret uint64 + // + // Gets the current segment number of the ringbuffer. + // + // MT safe. + GetSegdone() uint64 // IsAcquired wraps gst_audio_ring_buffer_is_acquired // // The function returns the following values: @@ -9350,13 +9505,23 @@ type AudioRingBuffer interface { // // MT safe. SetSample(uint64) + // SetSegdone wraps gst_audio_ring_buffer_set_segdone + // + // The function takes the following parameters: + // + // - segdone uint64: the segment number to set + // + // Sets the current segment number of the ringbuffer. + // + // MT safe. + SetSegdone(uint64) // SetTimestamp wraps gst_audio_ring_buffer_set_timestamp // // The function takes the following parameters: // - // - readseg int + // - readseg int32 // - timestamp gst.ClockTime - SetTimestamp(int, gst.ClockTime) + SetTimestamp(int32, gst.ClockTime) // Start wraps gst_audio_ring_buffer_start // // The function returns the following values: @@ -9399,6 +9564,11 @@ func UnsafeAudioRingBufferFromGlibFull(c unsafe.Pointer) AudioRingBuffer { return gobject.UnsafeObjectFromGlibFull(c).(AudioRingBuffer) } +// UnsafeAudioRingBufferFromGlibBorrow is used to convert raw GstAudioRingBuffer pointers to go without touching any references. This is used by the bindings internally. +func UnsafeAudioRingBufferFromGlibBorrow(c unsafe.Pointer) AudioRingBuffer { + return gobject.UnsafeObjectFromGlibBorrow(c).(AudioRingBuffer) +} + func (a *AudioRingBufferInstance) upcastToGstAudioRingBuffer() *AudioRingBufferInstance { return a } @@ -9574,13 +9744,13 @@ func (buf *AudioRingBufferInstance) Advance(advance uint) { // // The function takes the following parameters: // -// - segment int: the segment to clear +// - segment int32: the segment to clear // // Clear the given segment of the buffer with silence samples. // This function is used by subclasses. // // MT safe. -func (buf *AudioRingBufferInstance) Clear(segment int) { +func (buf *AudioRingBufferInstance) Clear(segment int32) { var carg0 *C.GstAudioRingBuffer // in, none, converted var carg1 C.gint // in, none, casted @@ -9734,6 +9904,56 @@ func (buf *AudioRingBufferInstance) DeviceIsOpen() bool { return goret } +// GetSegbase wraps gst_audio_ring_buffer_get_segbase +// +// The function returns the following values: +// +// - goret uint64 +// +// Gets the current segment base number of the ringbuffer. +// +// MT safe. +func (buf *AudioRingBufferInstance) GetSegbase() uint64 { + var carg0 *C.GstAudioRingBuffer // in, none, converted + var cret C.guint64 // return, none, casted + + carg0 = (*C.GstAudioRingBuffer)(UnsafeAudioRingBufferToGlibNone(buf)) + + cret = C.gst_audio_ring_buffer_get_segbase(carg0) + runtime.KeepAlive(buf) + + var goret uint64 + + goret = uint64(cret) + + return goret +} + +// GetSegdone wraps gst_audio_ring_buffer_get_segdone +// +// The function returns the following values: +// +// - goret uint64 +// +// Gets the current segment number of the ringbuffer. +// +// MT safe. +func (buf *AudioRingBufferInstance) GetSegdone() uint64 { + var carg0 *C.GstAudioRingBuffer // in, none, converted + var cret C.guint64 // return, none, casted + + carg0 = (*C.GstAudioRingBuffer)(UnsafeAudioRingBufferToGlibNone(buf)) + + cret = C.gst_audio_ring_buffer_get_segdone(carg0) + runtime.KeepAlive(buf) + + var goret uint64 + + goret = uint64(cret) + + return goret +} + // IsAcquired wraps gst_audio_ring_buffer_is_acquired // // The function returns the following values: @@ -10080,13 +10300,34 @@ func (buf *AudioRingBufferInstance) SetSample(sample uint64) { runtime.KeepAlive(sample) } +// SetSegdone wraps gst_audio_ring_buffer_set_segdone +// +// The function takes the following parameters: +// +// - segdone uint64: the segment number to set +// +// Sets the current segment number of the ringbuffer. +// +// MT safe. +func (buf *AudioRingBufferInstance) SetSegdone(segdone uint64) { + var carg0 *C.GstAudioRingBuffer // in, none, converted + var carg1 C.guint64 // in, none, casted + + carg0 = (*C.GstAudioRingBuffer)(UnsafeAudioRingBufferToGlibNone(buf)) + carg1 = C.guint64(segdone) + + C.gst_audio_ring_buffer_set_segdone(carg0, carg1) + runtime.KeepAlive(buf) + runtime.KeepAlive(segdone) +} + // SetTimestamp wraps gst_audio_ring_buffer_set_timestamp // // The function takes the following parameters: // -// - readseg int +// - readseg int32 // - timestamp gst.ClockTime -func (buf *AudioRingBufferInstance) SetTimestamp(readseg int, timestamp gst.ClockTime) { +func (buf *AudioRingBufferInstance) SetTimestamp(readseg int32, timestamp gst.ClockTime) { var carg0 *C.GstAudioRingBuffer // in, none, converted var carg1 C.gint // in, none, casted var carg2 C.GstClockTime // in, none, casted, alias @@ -10236,7 +10477,7 @@ func UnsafeApplyAudioRingBufferOverrides[Instance AudioRingBuffer](gclass unsafe var spec *AudioRingBufferSpec // in, none, converted var goret bool // return - buf = UnsafeAudioRingBufferFromGlibNone(unsafe.Pointer(carg0)).(Instance) + buf = UnsafeAudioRingBufferFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) spec = UnsafeAudioRingBufferSpecFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Acquire(buf, spec) @@ -10260,7 +10501,7 @@ func UnsafeApplyAudioRingBufferOverrides[Instance AudioRingBuffer](gclass unsafe var active bool // in var goret bool // return - buf = UnsafeAudioRingBufferFromGlibNone(unsafe.Pointer(carg0)).(Instance) + buf = UnsafeAudioRingBufferFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != 0 { active = true } @@ -10284,7 +10525,7 @@ func UnsafeApplyAudioRingBufferOverrides[Instance AudioRingBuffer](gclass unsafe func(carg0 *C.GstAudioRingBuffer) { var buf Instance // go GstAudioRingBuffer subclass - buf = UnsafeAudioRingBufferFromGlibNone(unsafe.Pointer(carg0)).(Instance) + buf = UnsafeAudioRingBufferFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.ClearAll(buf) }, @@ -10300,7 +10541,7 @@ func UnsafeApplyAudioRingBufferOverrides[Instance AudioRingBuffer](gclass unsafe var buf Instance // go GstAudioRingBuffer subclass var goret bool // return - buf = UnsafeAudioRingBufferFromGlibNone(unsafe.Pointer(carg0)).(Instance) + buf = UnsafeAudioRingBufferFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.CloseDevice(buf) @@ -10322,7 +10563,7 @@ func UnsafeApplyAudioRingBufferOverrides[Instance AudioRingBuffer](gclass unsafe var buf Instance // go GstAudioRingBuffer subclass var goret uint // return, none, casted - buf = UnsafeAudioRingBufferFromGlibNone(unsafe.Pointer(carg0)).(Instance) + buf = UnsafeAudioRingBufferFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Delay(buf) @@ -10342,7 +10583,7 @@ func UnsafeApplyAudioRingBufferOverrides[Instance AudioRingBuffer](gclass unsafe var buf Instance // go GstAudioRingBuffer subclass var goret bool // return - buf = UnsafeAudioRingBufferFromGlibNone(unsafe.Pointer(carg0)).(Instance) + buf = UnsafeAudioRingBufferFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.OpenDevice(buf) @@ -10364,7 +10605,7 @@ func UnsafeApplyAudioRingBufferOverrides[Instance AudioRingBuffer](gclass unsafe var buf Instance // go GstAudioRingBuffer subclass var goret bool // return - buf = UnsafeAudioRingBufferFromGlibNone(unsafe.Pointer(carg0)).(Instance) + buf = UnsafeAudioRingBufferFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Pause(buf) @@ -10386,7 +10627,7 @@ func UnsafeApplyAudioRingBufferOverrides[Instance AudioRingBuffer](gclass unsafe var buf Instance // go GstAudioRingBuffer subclass var goret bool // return - buf = UnsafeAudioRingBufferFromGlibNone(unsafe.Pointer(carg0)).(Instance) + buf = UnsafeAudioRingBufferFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Release(buf) @@ -10408,7 +10649,7 @@ func UnsafeApplyAudioRingBufferOverrides[Instance AudioRingBuffer](gclass unsafe var buf Instance // go GstAudioRingBuffer subclass var goret bool // return - buf = UnsafeAudioRingBufferFromGlibNone(unsafe.Pointer(carg0)).(Instance) + buf = UnsafeAudioRingBufferFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Resume(buf) @@ -10430,7 +10671,7 @@ func UnsafeApplyAudioRingBufferOverrides[Instance AudioRingBuffer](gclass unsafe var buf Instance // go GstAudioRingBuffer subclass var goret bool // return - buf = UnsafeAudioRingBufferFromGlibNone(unsafe.Pointer(carg0)).(Instance) + buf = UnsafeAudioRingBufferFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Start(buf) @@ -10452,7 +10693,7 @@ func UnsafeApplyAudioRingBufferOverrides[Instance AudioRingBuffer](gclass unsafe var buf Instance // go GstAudioRingBuffer subclass var goret bool // return - buf = UnsafeAudioRingBufferFromGlibNone(unsafe.Pointer(carg0)).(Instance) + buf = UnsafeAudioRingBufferFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Stop(buf) @@ -10558,6 +10799,11 @@ func UnsafeAudioSinkFromGlibFull(c unsafe.Pointer) AudioSink { return gobject.UnsafeObjectFromGlibFull(c).(AudioSink) } +// UnsafeAudioSinkFromGlibBorrow is used to convert raw GstAudioSink pointers to go without touching any references. This is used by the bindings internally. +func UnsafeAudioSinkFromGlibBorrow(c unsafe.Pointer) AudioSink { + return gobject.UnsafeObjectFromGlibBorrow(c).(AudioSink) +} + func (a *AudioSinkInstance) upcastToGstAudioSink() *AudioSinkInstance { return a } @@ -10633,7 +10879,7 @@ func UnsafeApplyAudioSinkOverrides[Instance AudioSink](gclass unsafe.Pointer, ov var sink Instance // go GstAudioSink subclass var goret bool // return - sink = UnsafeAudioSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeAudioSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Close(sink) @@ -10655,7 +10901,7 @@ func UnsafeApplyAudioSinkOverrides[Instance AudioSink](gclass unsafe.Pointer, ov var sink Instance // go GstAudioSink subclass var goret uint // return, none, casted - sink = UnsafeAudioSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeAudioSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Delay(sink) @@ -10675,7 +10921,7 @@ func UnsafeApplyAudioSinkOverrides[Instance AudioSink](gclass unsafe.Pointer, ov var sink Instance // go GstAudioSink subclass var goret bool // return - sink = UnsafeAudioSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeAudioSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Open(sink) @@ -10696,7 +10942,7 @@ func UnsafeApplyAudioSinkOverrides[Instance AudioSink](gclass unsafe.Pointer, ov func(carg0 *C.GstAudioSink) { var sink Instance // go GstAudioSink subclass - sink = UnsafeAudioSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeAudioSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.Pause(sink) }, @@ -10713,7 +10959,7 @@ func UnsafeApplyAudioSinkOverrides[Instance AudioSink](gclass unsafe.Pointer, ov var spec *AudioRingBufferSpec // in, none, converted var goret bool // return - sink = UnsafeAudioSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeAudioSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) spec = UnsafeAudioRingBufferSpecFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Prepare(sink, spec) @@ -10735,7 +10981,7 @@ func UnsafeApplyAudioSinkOverrides[Instance AudioSink](gclass unsafe.Pointer, ov func(carg0 *C.GstAudioSink) { var sink Instance // go GstAudioSink subclass - sink = UnsafeAudioSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeAudioSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.Reset(sink) }, @@ -10750,7 +10996,7 @@ func UnsafeApplyAudioSinkOverrides[Instance AudioSink](gclass unsafe.Pointer, ov func(carg0 *C.GstAudioSink) { var sink Instance // go GstAudioSink subclass - sink = UnsafeAudioSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeAudioSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.Resume(sink) }, @@ -10765,7 +11011,7 @@ func UnsafeApplyAudioSinkOverrides[Instance AudioSink](gclass unsafe.Pointer, ov func(carg0 *C.GstAudioSink) { var sink Instance // go GstAudioSink subclass - sink = UnsafeAudioSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeAudioSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.Stop(sink) }, @@ -10781,7 +11027,7 @@ func UnsafeApplyAudioSinkOverrides[Instance AudioSink](gclass unsafe.Pointer, ov var sink Instance // go GstAudioSink subclass var goret bool // return - sink = UnsafeAudioSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeAudioSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Unprepare(sink) @@ -10882,6 +11128,11 @@ func UnsafeAudioSrcFromGlibFull(c unsafe.Pointer) AudioSrc { return gobject.UnsafeObjectFromGlibFull(c).(AudioSrc) } +// UnsafeAudioSrcFromGlibBorrow is used to convert raw GstAudioSrc pointers to go without touching any references. This is used by the bindings internally. +func UnsafeAudioSrcFromGlibBorrow(c unsafe.Pointer) AudioSrc { + return gobject.UnsafeObjectFromGlibBorrow(c).(AudioSrc) +} + func (a *AudioSrcInstance) upcastToGstAudioSrc() *AudioSrcInstance { return a } @@ -10951,7 +11202,7 @@ func UnsafeApplyAudioSrcOverrides[Instance AudioSrc](gclass unsafe.Pointer, over var src Instance // go GstAudioSrc subclass var goret bool // return - src = UnsafeAudioSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeAudioSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Close(src) @@ -10973,7 +11224,7 @@ func UnsafeApplyAudioSrcOverrides[Instance AudioSrc](gclass unsafe.Pointer, over var src Instance // go GstAudioSrc subclass var goret uint // return, none, casted - src = UnsafeAudioSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeAudioSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Delay(src) @@ -10993,7 +11244,7 @@ func UnsafeApplyAudioSrcOverrides[Instance AudioSrc](gclass unsafe.Pointer, over var src Instance // go GstAudioSrc subclass var goret bool // return - src = UnsafeAudioSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeAudioSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Open(src) @@ -11016,7 +11267,7 @@ func UnsafeApplyAudioSrcOverrides[Instance AudioSrc](gclass unsafe.Pointer, over var spec *AudioRingBufferSpec // in, none, converted var goret bool // return - src = UnsafeAudioSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeAudioSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) spec = UnsafeAudioRingBufferSpecFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Prepare(src, spec) @@ -11038,7 +11289,7 @@ func UnsafeApplyAudioSrcOverrides[Instance AudioSrc](gclass unsafe.Pointer, over func(carg0 *C.GstAudioSrc) { var src Instance // go GstAudioSrc subclass - src = UnsafeAudioSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeAudioSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.Reset(src) }, @@ -11054,7 +11305,7 @@ func UnsafeApplyAudioSrcOverrides[Instance AudioSrc](gclass unsafe.Pointer, over var src Instance // go GstAudioSrc subclass var goret bool // return - src = UnsafeAudioSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeAudioSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Unprepare(src) @@ -11142,6 +11393,11 @@ func UnsafeAudioAggregatorConvertPadFromGlibFull(c unsafe.Pointer) AudioAggregat return gobject.UnsafeObjectFromGlibFull(c).(AudioAggregatorConvertPad) } +// UnsafeAudioAggregatorConvertPadFromGlibBorrow is used to convert raw GstAudioAggregatorConvertPad pointers to go without touching any references. This is used by the bindings internally. +func UnsafeAudioAggregatorConvertPadFromGlibBorrow(c unsafe.Pointer) AudioAggregatorConvertPad { + return gobject.UnsafeObjectFromGlibBorrow(c).(AudioAggregatorConvertPad) +} + func (a *AudioAggregatorConvertPadInstance) upcastToGstAudioAggregatorConvertPad() *AudioAggregatorConvertPadInstance { return a } @@ -11469,8 +11725,8 @@ func UnsafeAudioBufferToGlibFull(a *AudioBuffer) unsafe.Pointer { // - buffer *gst.Buffer: The buffer to clip. // - segment *gst.Segment: Segment in %GST_FORMAT_TIME or %GST_FORMAT_DEFAULT to which // the buffer should be clipped. -// - rate int: sample rate. -// - bpf int: size of one audio frame in bytes. This is the size of one sample * +// - rate int32: sample rate. +// - bpf int32: size of one audio frame in bytes. This is the size of one sample * // number of channels. // // The function returns the following values: @@ -11481,7 +11737,7 @@ func UnsafeAudioBufferToGlibFull(a *AudioBuffer) unsafe.Pointer { // // After calling this function the caller does not own a reference to // @buffer anymore. -func AudioBufferClip(buffer *gst.Buffer, segment *gst.Segment, rate int, bpf int) *gst.Buffer { +func AudioBufferClip(buffer *gst.Buffer, segment *gst.Segment, rate int32, bpf int32) *gst.Buffer { var carg1 *C.GstBuffer // in, full, converted var carg2 *C.GstSegment // in, none, converted var carg3 C.gint // in, none, casted @@ -11630,7 +11886,7 @@ func AudioBufferReorderChannels(buffer *gst.Buffer, format AudioFormat, from []A // The function takes the following parameters: // // - buffer *gst.Buffer: The buffer to truncate. -// - bpf int: size of one audio frame in bytes. This is the size of one sample * +// - bpf int32: size of one audio frame in bytes. This is the size of one sample * // number of channels. // - trim uint: the number of samples to remove from the beginning of the buffer // - samples uint: the final number of samples that should exist in this buffer or -1 @@ -11653,7 +11909,7 @@ func AudioBufferReorderChannels(buffer *gst.Buffer, format AudioFormat, from []A // // After calling this function the caller does not own a reference to // @buffer anymore. -func AudioBufferTruncate(buffer *gst.Buffer, bpf int, trim uint, samples uint) *gst.Buffer { +func AudioBufferTruncate(buffer *gst.Buffer, bpf int32, trim uint, samples uint) *gst.Buffer { var carg1 *C.GstBuffer // in, full, converted var carg2 C.gint // in, none, casted var carg3 C.gsize // in, none, casted @@ -12050,8 +12306,11 @@ func marshalAudioConverter(p unsafe.Pointer) (interface{}, error) { return UnsafeAudioConverterFromGlibBorrow(b), nil } -func (r *AudioConverter) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioConverter) +func (r *AudioConverter) GoValueType() gobject.Type { + return TypeAudioConverter +} + +func (r *AudioConverter) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -12157,12 +12416,12 @@ func NewAudioConverter(flags AudioConverterFlags, inInfo *AudioInfo, outInfo *Au // // The function returns the following values: // -// - inRate int: result input rate -// - outRate int: result output rate +// - inRate int32: result input rate +// - outRate int32: result output rate // - goret *gst.Structure // // Get the current configuration of @convert. -func (convert *AudioConverter) GetConfig() (int, int, *gst.Structure) { +func (convert *AudioConverter) GetConfig() (int32, int32, *gst.Structure) { var carg0 *C.GstAudioConverter // in, none, converted var carg1 C.gint // out, full, casted var carg2 C.gint // out, full, casted @@ -12173,12 +12432,12 @@ func (convert *AudioConverter) GetConfig() (int, int, *gst.Structure) { cret = C.gst_audio_converter_get_config(carg0, &carg1, &carg2) runtime.KeepAlive(convert) - var inRate int - var outRate int + var inRate int32 + var outRate int32 var goret *gst.Structure - inRate = int(carg1) - outRate = int(carg2) + inRate = int32(carg1) + outRate = int32(carg2) goret = gst.UnsafeStructureFromGlibNone(unsafe.Pointer(cret)) return inRate, outRate, goret @@ -12339,8 +12598,8 @@ func (convert *AudioConverter) SupportsInplace() bool { // // The function takes the following parameters: // -// - inRate int: input rate -// - outRate int: output rate +// - inRate int32: input rate +// - outRate int32: output rate // - config *gst.Structure (nullable): a #GstStructure or %NULL // // The function returns the following values: @@ -12361,7 +12620,7 @@ func (convert *AudioConverter) SupportsInplace() bool { // // Look at the `GST_AUDIO_CONVERTER_OPT_*` fields to check valid configuration // option and values. -func (convert *AudioConverter) UpdateConfig(inRate int, outRate int, config *gst.Structure) bool { +func (convert *AudioConverter) UpdateConfig(inRate int32, outRate int32, config *gst.Structure) bool { var carg0 *C.GstAudioConverter // in, none, converted var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted @@ -12643,8 +12902,11 @@ func marshalAudioFormatInfo(p unsafe.Pointer) (interface{}, error) { return UnsafeAudioFormatInfoFromGlibBorrow(b), nil } -func (r *AudioFormatInfo) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioFormatInfo) +func (r *AudioFormatInfo) GoValueType() gobject.Type { + return TypeAudioFormatInfo +} + +func (r *AudioFormatInfo) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -12721,8 +12983,11 @@ func marshalAudioInfo(p unsafe.Pointer) (interface{}, error) { return UnsafeAudioInfoFromGlibBorrow(b), nil } -func (r *AudioInfo) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioInfo) +func (r *AudioInfo) GoValueType() gobject.Type { + return TypeAudioInfo +} + +func (r *AudioInfo) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -12989,14 +13254,14 @@ func (info *AudioInfo) IsEqual(other *AudioInfo) bool { // The function takes the following parameters: // // - format AudioFormat: the format -// - rate int: the samplerate -// - channels int: the number of channels +// - rate int32: the samplerate +// - channels int32: the number of channels // - position [64]AudioChannelPosition (nullable): the channel positions // // Set the default info for the audio info of @format and @rate and @channels. // // Note: This initializes @info first, no values are preserved. -func (info *AudioInfo) SetFormat(format AudioFormat, rate int, channels int, position [64]AudioChannelPosition) { +func (info *AudioInfo) SetFormat(format AudioFormat, rate int32, channels int32, position [64]AudioChannelPosition) { var carg0 *C.GstAudioInfo // in, none, converted var carg1 C.GstAudioFormat // in, none, casted var carg2 C.gint // in, none, casted @@ -13351,9 +13616,9 @@ func UnsafeAudioResamplerToGlibFull(a *AudioResampler) unsafe.Pointer { // - method AudioResamplerMethod: a #GstAudioResamplerMethod // - flags AudioResamplerFlags: #GstAudioResamplerFlags // - format AudioFormat: the #GstAudioFormat -// - channels int: the number of channels -// - inRate int: input rate -// - outRate int: output rate +// - channels int32: the number of channels +// - inRate int32: input rate +// - outRate int32: output rate // - options *gst.Structure: extra options // // The function returns the following values: @@ -13361,7 +13626,7 @@ func UnsafeAudioResamplerToGlibFull(a *AudioResampler) unsafe.Pointer { // - goret *AudioResampler // // Make a new resampler. -func NewAudioResampler(method AudioResamplerMethod, flags AudioResamplerFlags, format AudioFormat, channels int, inRate int, outRate int, options *gst.Structure) *AudioResampler { +func NewAudioResampler(method AudioResamplerMethod, flags AudioResamplerFlags, format AudioFormat, channels int32, inRate int32, outRate int32, options *gst.Structure) *AudioResampler { var carg1 C.GstAudioResamplerMethod // in, none, casted var carg2 C.GstAudioResamplerFlags // in, none, casted var carg3 C.GstAudioFormat // in, none, casted @@ -13401,13 +13666,13 @@ func NewAudioResampler(method AudioResamplerMethod, flags AudioResamplerFlags, f // // - method AudioResamplerMethod: a #GstAudioResamplerMethod // - quality uint: the quality -// - inRate int: the input rate -// - outRate int: the output rate +// - inRate int32: the input rate +// - outRate int32: the output rate // - options *gst.Structure: a #GstStructure // // Set the parameters for resampling from @in_rate to @out_rate using @method // for @quality in @options. -func AudioResamplerOptionsSetQuality(method AudioResamplerMethod, quality uint, inRate int, outRate int, options *gst.Structure) { +func AudioResamplerOptionsSetQuality(method AudioResamplerMethod, quality uint, inRate int32, outRate int32, options *gst.Structure) { var carg1 C.GstAudioResamplerMethod // in, none, casted var carg2 C.guint // in, none, casted var carg3 C.gint // in, none, casted @@ -13531,8 +13796,8 @@ func (resampler *AudioResampler) Reset() { // // The function takes the following parameters: // -// - inRate int: new input rate -// - outRate int: new output rate +// - inRate int32: new input rate +// - outRate int32: new output rate // - options *gst.Structure: new options or %NULL // // The function returns the following values: @@ -13545,7 +13810,7 @@ func (resampler *AudioResampler) Reset() { // When @in_rate or @out_rate is 0, its value is unchanged. // // When @options is %NULL, the previously configured options are reused. -func (resampler *AudioResampler) Update(inRate int, outRate int, options *gst.Structure) bool { +func (resampler *AudioResampler) Update(inRate int32, outRate int32, options *gst.Structure) bool { var carg0 *C.GstAudioResampler // in, none, converted var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted @@ -13843,8 +14108,11 @@ func marshalAudioStreamAlign(p unsafe.Pointer) (interface{}, error) { return UnsafeAudioStreamAlignFromGlibBorrow(b), nil } -func (r *AudioStreamAlign) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioStreamAlign) +func (r *AudioStreamAlign) GoValueType() gobject.Type { + return TypeAudioStreamAlign +} + +func (r *AudioStreamAlign) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -13903,7 +14171,7 @@ func UnsafeAudioStreamAlignToGlibFull(a *AudioStreamAlign) unsafe.Pointer { // // The function takes the following parameters: // -// - rate int: a sample rate +// - rate int32: a sample rate // - alignmentThreshold gst.ClockTime: a alignment threshold in nanoseconds // - discontWait gst.ClockTime: discont wait in nanoseconds // @@ -13922,7 +14190,7 @@ func UnsafeAudioStreamAlignToGlibFull(a *AudioStreamAlign) unsafe.Pointer { // again until the output buffer is marked as a discontinuity. These can later // be re-configured with gst_audio_stream_align_set_alignment_threshold() and // gst_audio_stream_align_set_discont_wait(). -func NewAudioStreamAlign(rate int, alignmentThreshold gst.ClockTime, discontWait gst.ClockTime) *AudioStreamAlign { +func NewAudioStreamAlign(rate int32, alignmentThreshold gst.ClockTime, discontWait gst.ClockTime) *AudioStreamAlign { var carg1 C.gint // in, none, casted var carg2 C.GstClockTime // in, none, casted, alias var carg3 C.GstClockTime // in, none, casted, alias @@ -14017,10 +14285,10 @@ func (align *AudioStreamAlign) GetDiscontWait() gst.ClockTime { // // The function returns the following values: // -// - goret int +// - goret int32 // // Gets the currently configured sample rate. -func (align *AudioStreamAlign) GetRate() int { +func (align *AudioStreamAlign) GetRate() int32 { var carg0 *C.GstAudioStreamAlign // in, none, converted var cret C.gint // return, none, casted @@ -14029,9 +14297,9 @@ func (align *AudioStreamAlign) GetRate() int { cret = C.gst_audio_stream_align_get_rate(carg0) runtime.KeepAlive(align) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -14207,11 +14475,11 @@ func (align *AudioStreamAlign) SetDiscontWait(discontWait gst.ClockTime) { // // The function takes the following parameters: // -// - rate int: a new sample rate +// - rate int32: a new sample rate // // Sets @rate as new sample rate for the following processing. If the sample // rate differs this implicitly marks the next data as discontinuous. -func (align *AudioStreamAlign) SetRate(rate int) { +func (align *AudioStreamAlign) SetRate(rate int32) { var carg0 *C.GstAudioStreamAlign // in, none, converted var carg1 C.gint // in, none, casted @@ -14292,8 +14560,11 @@ func marshalDsdInfo(p unsafe.Pointer) (interface{}, error) { return UnsafeDsdInfoFromGlibBorrow(b), nil } -func (r *DsdInfo) InitGoValue(v *gobject.Value) { - v.Init(TypeDsdInfo) +func (r *DsdInfo) GoValueType() gobject.Type { + return TypeDsdInfo +} + +func (r *DsdInfo) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -14511,14 +14782,14 @@ func (info *DsdInfo) IsEqual(other *DsdInfo) bool { // The function takes the following parameters: // // - format DsdFormat: the format -// - rate int: the DSD rate -// - channels int: the number of channels +// - rate int32: the DSD rate +// - channels int32: the number of channels // - positions [64]AudioChannelPosition (nullable): the channel positions // // Set the default info for the DSD info of @format and @rate and @channels. // // Note: This initializes @info first, no values are preserved. -func (info *DsdInfo) SetFormat(format DsdFormat, rate int, channels int, positions [64]AudioChannelPosition) { +func (info *DsdInfo) SetFormat(format DsdFormat, rate int32, channels int32, positions [64]AudioChannelPosition) { var carg0 *C.GstDsdInfo // in, none, converted var carg1 C.GstDsdFormat // in, none, casted var carg2 C.gint // in, none, casted diff --git a/pkg/gstbase/gstbase.gen.go b/pkg/gstbase/gstbase.gen.go index 775fdc7..d26e3a1 100644 --- a/pkg/gstbase/gstbase.gen.go +++ b/pkg/gstbase/gstbase.gen.go @@ -484,8 +484,11 @@ func marshalAggregatorStartTimeSelection(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = AggregatorStartTimeSelection(0) -func (e AggregatorStartTimeSelection) InitGoValue(v *gobject.Value) { - v.Init(TypeAggregatorStartTimeSelection) +func (e AggregatorStartTimeSelection) GoValueType() gobject.Type { + return TypeAggregatorStartTimeSelection +} + +func (e AggregatorStartTimeSelection) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -696,7 +699,7 @@ type CollectPadsClipFunction func(pads CollectPads, data *CollectData, inbuffer // CollectPadsCompareFunction wraps GstCollectPadsCompareFunction // // A function for comparing two timestamps of buffers or newsegments collected on one pad. -type CollectPadsCompareFunction func(pads CollectPads, data1 *CollectData, timestamp1 gst.ClockTime, data2 *CollectData, timestamp2 gst.ClockTime) (goret int) +type CollectPadsCompareFunction func(pads CollectPads, data1 *CollectData, timestamp1 gst.ClockTime, data2 *CollectData, timestamp2 gst.ClockTime) (goret int32) // CollectPadsEventFunction wraps GstCollectPadsEventFunction // @@ -1317,6 +1320,10 @@ type Adapter interface { // Gets the maximum amount of bytes available, that is it returns the maximum // value that can be supplied to gst_adapter_map() without that function // returning %NULL. + // + // Calling gst_adapter_map() with the amount of bytes returned by this function + // may require expensive operations (like copying the data into a temporary + // buffer) in some cases. Available() uint // AvailableFast wraps gst_adapter_available_fast // @@ -1324,8 +1331,11 @@ type Adapter interface { // // - goret uint // - // Gets the maximum number of bytes that are immediately available without - // requiring any expensive operations (like copying the data into a + // Gets the maximum number of bytes that can be retrieved in a single map + // operation without merging buffers. + // + // Calling gst_adapter_map() with the amount of bytes returned by this function + // will never require any expensive operations (like copying the data into a // temporary buffer). AvailableFast() uint // Clear wraps gst_adapter_clear @@ -1528,7 +1538,7 @@ type Adapter interface { // // The dts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when // the adapter is first created or when it is cleared. This also means that before - // the first byte with a dts is removed from the adapter, the dts + // the first byte with a dts is added to the adapter, the dts // and distance returned are GST_CLOCK_TIME_NONE and 0 respectively. PrevDts() (uint64, gst.ClockTime) // PrevDtsAtOffset wraps gst_adapter_prev_dts_at_offset @@ -1548,7 +1558,7 @@ type Adapter interface { // // The dts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when // the adapter is first created or when it is cleared. This also means that before - // the first byte with a dts is removed from the adapter, the dts + // the first byte with a dts is added to the adapter, the dts // and distance returned are GST_CLOCK_TIME_NONE and 0 respectively. PrevDtsAtOffset(uint) (uint64, gst.ClockTime) // PrevOffset wraps gst_adapter_prev_offset @@ -1564,7 +1574,7 @@ type Adapter interface { // // The offset is reset to GST_BUFFER_OFFSET_NONE and the distance is set to 0 // when the adapter is first created or when it is cleared. This also means that - // before the first byte with an offset is removed from the adapter, the offset + // before the first byte with an offset is added to the adapter, the offset // and distance returned are GST_BUFFER_OFFSET_NONE and 0 respectively. PrevOffset() (uint64, uint64) // PrevPts wraps gst_adapter_prev_pts @@ -1580,7 +1590,7 @@ type Adapter interface { // // The pts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when // the adapter is first created or when it is cleared. This also means that before - // the first byte with a pts is removed from the adapter, the pts + // the first byte with a pts is added to the adapter, the pts // and distance returned are GST_CLOCK_TIME_NONE and 0 respectively. PrevPts() (uint64, gst.ClockTime) // PrevPtsAtOffset wraps gst_adapter_prev_pts_at_offset @@ -1600,7 +1610,7 @@ type Adapter interface { // // The pts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when // the adapter is first created or when it is cleared. This also means that before - // the first byte with a pts is removed from the adapter, the pts + // the first byte with a pts is added to the adapter, the pts // and distance returned are GST_CLOCK_TIME_NONE and 0 respectively. PrevPtsAtOffset(uint) (uint64, gst.ClockTime) // PtsAtDiscont wraps gst_adapter_pts_at_discont @@ -1747,6 +1757,11 @@ func UnsafeAdapterFromGlibFull(c unsafe.Pointer) Adapter { return gobject.UnsafeObjectFromGlibFull(c).(Adapter) } +// UnsafeAdapterFromGlibBorrow is used to convert raw GstAdapter pointers to go without touching any references. This is used by the bindings internally. +func UnsafeAdapterFromGlibBorrow(c unsafe.Pointer) Adapter { + return gobject.UnsafeObjectFromGlibBorrow(c).(Adapter) +} + func (a *AdapterInstance) upcastToGstAdapter() *AdapterInstance { return a } @@ -1789,6 +1804,10 @@ func NewAdapter() Adapter { // Gets the maximum amount of bytes available, that is it returns the maximum // value that can be supplied to gst_adapter_map() without that function // returning %NULL. +// +// Calling gst_adapter_map() with the amount of bytes returned by this function +// may require expensive operations (like copying the data into a temporary +// buffer) in some cases. func (adapter *AdapterInstance) Available() uint { var carg0 *C.GstAdapter // in, none, converted var cret C.gsize // return, none, casted @@ -1811,8 +1830,11 @@ func (adapter *AdapterInstance) Available() uint { // // - goret uint // -// Gets the maximum number of bytes that are immediately available without -// requiring any expensive operations (like copying the data into a +// Gets the maximum number of bytes that can be retrieved in a single map +// operation without merging buffers. +// +// Calling gst_adapter_map() with the amount of bytes returned by this function +// will never require any expensive operations (like copying the data into a // temporary buffer). func (adapter *AdapterInstance) AvailableFast() uint { var carg0 *C.GstAdapter // in, none, converted @@ -2257,7 +2279,7 @@ func (adapter *AdapterInstance) OffsetAtDiscont() uint64 { // // The dts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when // the adapter is first created or when it is cleared. This also means that before -// the first byte with a dts is removed from the adapter, the dts +// the first byte with a dts is added to the adapter, the dts // and distance returned are GST_CLOCK_TIME_NONE and 0 respectively. func (adapter *AdapterInstance) PrevDts() (uint64, gst.ClockTime) { var carg0 *C.GstAdapter // in, none, converted @@ -2295,7 +2317,7 @@ func (adapter *AdapterInstance) PrevDts() (uint64, gst.ClockTime) { // // The dts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when // the adapter is first created or when it is cleared. This also means that before -// the first byte with a dts is removed from the adapter, the dts +// the first byte with a dts is added to the adapter, the dts // and distance returned are GST_CLOCK_TIME_NONE and 0 respectively. func (adapter *AdapterInstance) PrevDtsAtOffset(offset uint) (uint64, gst.ClockTime) { var carg0 *C.GstAdapter // in, none, converted @@ -2332,7 +2354,7 @@ func (adapter *AdapterInstance) PrevDtsAtOffset(offset uint) (uint64, gst.ClockT // // The offset is reset to GST_BUFFER_OFFSET_NONE and the distance is set to 0 // when the adapter is first created or when it is cleared. This also means that -// before the first byte with an offset is removed from the adapter, the offset +// before the first byte with an offset is added to the adapter, the offset // and distance returned are GST_BUFFER_OFFSET_NONE and 0 respectively. func (adapter *AdapterInstance) PrevOffset() (uint64, uint64) { var carg0 *C.GstAdapter // in, none, converted @@ -2366,7 +2388,7 @@ func (adapter *AdapterInstance) PrevOffset() (uint64, uint64) { // // The pts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when // the adapter is first created or when it is cleared. This also means that before -// the first byte with a pts is removed from the adapter, the pts +// the first byte with a pts is added to the adapter, the pts // and distance returned are GST_CLOCK_TIME_NONE and 0 respectively. func (adapter *AdapterInstance) PrevPts() (uint64, gst.ClockTime) { var carg0 *C.GstAdapter // in, none, converted @@ -2404,7 +2426,7 @@ func (adapter *AdapterInstance) PrevPts() (uint64, gst.ClockTime) { // // The pts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when // the adapter is first created or when it is cleared. This also means that before -// the first byte with a pts is removed from the adapter, the pts +// the first byte with a pts is added to the adapter, the pts // and distance returned are GST_CLOCK_TIME_NONE and 0 respectively. func (adapter *AdapterInstance) PrevPtsAtOffset(offset uint) (uint64, gst.ClockTime) { var carg0 *C.GstAdapter // in, none, converted @@ -2844,6 +2866,23 @@ type Aggregator interface { // a #GstAggregator::samples-selected handler, and can be used to precisely // control aggregating parameters for a given set of input samples. PeekNextSample(AggregatorPad) *gst.Sample + // PushSrcEvent wraps gst_aggregator_push_src_event + // + // The function takes the following parameters: + // + // - event *gst.Event: the #GstEvent to push. + // + // The function returns the following values: + // + // - goret bool + // + // This method will push the provided event downstream. If needed, mandatory + // events such as stream-start, caps, and segment events will be sent before + // pushing the event. + // + // This API does not allow pushing stream-start, caps, segment and EOS events. + // Specific API like gst_aggregator_set_src_caps() should be used for these. + PushSrcEvent(*gst.Event) bool // SelectedSamples wraps gst_aggregator_selected_samples // // The function takes the following parameters: @@ -2966,6 +3005,11 @@ func UnsafeAggregatorFromGlibFull(c unsafe.Pointer) Aggregator { return gobject.UnsafeObjectFromGlibFull(c).(Aggregator) } +// UnsafeAggregatorFromGlibBorrow is used to convert raw GstAggregator pointers to go without touching any references. This is used by the bindings internally. +func UnsafeAggregatorFromGlibBorrow(c unsafe.Pointer) Aggregator { + return gobject.UnsafeObjectFromGlibBorrow(c).(Aggregator) +} + func (a *AggregatorInstance) upcastToGstAggregator() *AggregatorInstance { return a } @@ -3241,6 +3285,43 @@ func (self *AggregatorInstance) PeekNextSample(pad AggregatorPad) *gst.Sample { return goret } +// PushSrcEvent wraps gst_aggregator_push_src_event +// +// The function takes the following parameters: +// +// - event *gst.Event: the #GstEvent to push. +// +// The function returns the following values: +// +// - goret bool +// +// This method will push the provided event downstream. If needed, mandatory +// events such as stream-start, caps, and segment events will be sent before +// pushing the event. +// +// This API does not allow pushing stream-start, caps, segment and EOS events. +// Specific API like gst_aggregator_set_src_caps() should be used for these. +func (aggregator *AggregatorInstance) PushSrcEvent(event *gst.Event) bool { + var carg0 *C.GstAggregator // in, none, converted + var carg1 *C.GstEvent // in, full, converted + var cret C.gboolean // return + + carg0 = (*C.GstAggregator)(UnsafeAggregatorToGlibNone(aggregator)) + carg1 = (*C.GstEvent)(gst.UnsafeEventToGlibFull(event)) + + cret = C.gst_aggregator_push_src_event(carg0, carg1) + runtime.KeepAlive(aggregator) + runtime.KeepAlive(event) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + // SelectedSamples wraps gst_aggregator_selected_samples // // The function takes the following parameters: @@ -3649,7 +3730,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var timeout bool // in var goret gst.FlowReturn // return, none, casted - aggregator = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + aggregator = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != 0 { timeout = true } @@ -3674,7 +3755,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var buf *gst.Buffer // in, none, converted var goret *gst.Buffer // return, full, converted - aggregator = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + aggregator = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) aggregatorPad = UnsafeAggregatorPadFromGlibNone(unsafe.Pointer(carg1)) buf = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg2)) @@ -3697,7 +3778,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var query *gst.Query // in, none, converted var goret bool // return - self = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + self = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.DecideAllocation(self, query) @@ -3721,7 +3802,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var buffer *gst.Buffer // in, full, converted var goret gst.FlowReturn // return, none, casted - aggregator = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + aggregator = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) buffer = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(carg1)) goret = overrides.FinishBuffer(aggregator, buffer) @@ -3743,7 +3824,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var bufferlist *gst.BufferList // in, full, converted var goret gst.FlowReturn // return, none, casted - aggregator = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + aggregator = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) bufferlist = gst.UnsafeBufferListFromGlibFull(unsafe.Pointer(carg1)) goret = overrides.FinishBufferList(aggregator, bufferlist) @@ -3765,7 +3846,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var caps *gst.Caps // in, none, converted var goret *gst.Caps // return, full, converted - self = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + self = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.FixateSrcCaps(self, caps) @@ -3786,7 +3867,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var aggregator Instance // go GstAggregator subclass var goret gst.FlowReturn // return, none, casted - aggregator = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + aggregator = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Flush(aggregator) @@ -3806,7 +3887,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var aggregator Instance // go GstAggregator subclass var goret gst.ClockTime // return, none, casted, alias - aggregator = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + aggregator = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GetNextTime(aggregator) @@ -3826,7 +3907,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var self Instance // go GstAggregator subclass var goret bool // return - self = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + self = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Negotiate(self) @@ -3849,7 +3930,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var caps *gst.Caps // in, none, converted var goret bool // return - self = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + self = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.NegotiatedSrcCaps(self, caps) @@ -3873,7 +3954,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var aggregatorPad AggregatorPad // in, none, converted var goret *gst.Sample // return, full, converted, nullable - aggregator = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + aggregator = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) aggregatorPad = UnsafeAggregatorPadFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.PeekNextSample(aggregator, aggregatorPad) @@ -3899,7 +3980,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var query *gst.Query // in, none, converted var goret bool // return - self = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + self = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) pad = UnsafeAggregatorPadFromGlibNone(unsafe.Pointer(carg1)) decideQuery = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg2)) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg3)) @@ -3926,7 +4007,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var event *gst.Event // in, none, converted var goret bool // return - aggregator = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + aggregator = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) aggregatorPad = UnsafeAggregatorPadFromGlibNone(unsafe.Pointer(carg1)) event = gst.UnsafeEventFromGlibNone(unsafe.Pointer(carg2)) @@ -3952,7 +4033,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var event *gst.Event // in, none, converted var goret gst.FlowReturn // return, none, casted - aggregator = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + aggregator = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) aggregatorPad = UnsafeAggregatorPadFromGlibNone(unsafe.Pointer(carg1)) event = gst.UnsafeEventFromGlibNone(unsafe.Pointer(carg2)) @@ -3976,7 +4057,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var query *gst.Query // in, none, converted var goret bool // return - aggregator = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + aggregator = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) aggregatorPad = UnsafeAggregatorPadFromGlibNone(unsafe.Pointer(carg1)) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg2)) @@ -4002,7 +4083,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var query *gst.Query // in, none, converted var goret bool // return - aggregator = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + aggregator = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) aggregatorPad = UnsafeAggregatorPadFromGlibNone(unsafe.Pointer(carg1)) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg2)) @@ -4028,7 +4109,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var active bool // in var goret bool // return - aggregator = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + aggregator = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) mode = gst.PadMode(carg1) if carg2 != 0 { active = true @@ -4055,7 +4136,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var event *gst.Event // in, none, converted var goret bool // return - aggregator = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + aggregator = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = gst.UnsafeEventFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SrcEvent(aggregator, event) @@ -4079,7 +4160,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var query *gst.Query // in, none, converted var goret bool // return - aggregator = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + aggregator = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SrcQuery(aggregator, query) @@ -4102,7 +4183,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var aggregator Instance // go GstAggregator subclass var goret bool // return - aggregator = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + aggregator = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Start(aggregator) @@ -4124,7 +4205,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var aggregator Instance // go GstAggregator subclass var goret bool // return - aggregator = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + aggregator = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Stop(aggregator) @@ -4148,7 +4229,7 @@ func UnsafeApplyAggregatorOverrides[Instance Aggregator](gclass unsafe.Pointer, var ret *gst.Caps // out, full, converted var goret gst.FlowReturn // return, none, casted - self = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + self = UnsafeAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) ret, goret = overrides.UpdateSrcCaps(self, caps) @@ -4281,6 +4362,11 @@ func UnsafeAggregatorPadFromGlibFull(c unsafe.Pointer) AggregatorPad { return gobject.UnsafeObjectFromGlibFull(c).(AggregatorPad) } +// UnsafeAggregatorPadFromGlibBorrow is used to convert raw GstAggregatorPad pointers to go without touching any references. This is used by the bindings internally. +func UnsafeAggregatorPadFromGlibBorrow(c unsafe.Pointer) AggregatorPad { + return gobject.UnsafeObjectFromGlibBorrow(c).(AggregatorPad) +} + func (a *AggregatorPadInstance) upcastToGstAggregatorPad() *AggregatorPadInstance { return a } @@ -4492,7 +4578,7 @@ func UnsafeApplyAggregatorPadOverrides[Instance AggregatorPad](gclass unsafe.Poi var aggregator Aggregator // in, none, converted var goret gst.FlowReturn // return, none, casted - aggpad = UnsafeAggregatorPadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + aggpad = UnsafeAggregatorPadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) aggregator = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Flush(aggpad, aggregator) @@ -4515,7 +4601,7 @@ func UnsafeApplyAggregatorPadOverrides[Instance AggregatorPad](gclass unsafe.Poi var buffer *gst.Buffer // in, none, converted var goret bool // return - aggpad = UnsafeAggregatorPadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + aggpad = UnsafeAggregatorPadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) aggregator = UnsafeAggregatorFromGlibNone(unsafe.Pointer(carg1)) buffer = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg2)) @@ -4750,7 +4836,7 @@ type BaseParse interface { // The function takes the following parameters: // // - frame *BaseParseFrame: a #GstBaseParseFrame - // - size int: consumed input data represented by frame + // - size int32: consumed input data represented by frame // // The function returns the following values: // @@ -4770,7 +4856,7 @@ type BaseParse interface { // // Note that the latter buffer is invalidated by this call, whereas the // caller retains ownership of @frame. - FinishFrame(*BaseParseFrame, int) gst.FlowReturn + FinishFrame(*BaseParseFrame, int32) gst.FlowReturn // MergeTags wraps gst_base_parse_merge_tags // // The function takes the following parameters: @@ -4822,14 +4908,14 @@ type BaseParse interface { // // - _fmt gst.Format: #GstFormat. // - duration int64: duration value. - // - interval int: how often to update the duration estimate based on bitrate, or 0. + // - interval int32: how often to update the duration estimate based on bitrate, or 0. // // Sets the duration of the currently playing media. Subclass can use this // when it is able to determine duration and/or notices a change in the media // duration. Alternatively, if @interval is non-zero (default), then stream // duration is determined based on estimated bitrate, and updated every @interval // frames. - SetDuration(gst.Format, int64, int) + SetDuration(gst.Format, int64, int32) // SetFrameRate wraps gst_base_parse_set_frame_rate // // The function takes the following parameters: @@ -4969,6 +5055,11 @@ func UnsafeBaseParseFromGlibFull(c unsafe.Pointer) BaseParse { return gobject.UnsafeObjectFromGlibFull(c).(BaseParse) } +// UnsafeBaseParseFromGlibBorrow is used to convert raw GstBaseParse pointers to go without touching any references. This is used by the bindings internally. +func UnsafeBaseParseFromGlibBorrow(c unsafe.Pointer) BaseParse { + return gobject.UnsafeObjectFromGlibBorrow(c).(BaseParse) +} + func (b *BaseParseInstance) upcastToGstBaseParse() *BaseParseInstance { return b } @@ -5097,7 +5188,7 @@ func (parse *BaseParseInstance) Drain() { // The function takes the following parameters: // // - frame *BaseParseFrame: a #GstBaseParseFrame -// - size int: consumed input data represented by frame +// - size int32: consumed input data represented by frame // // The function returns the following values: // @@ -5117,7 +5208,7 @@ func (parse *BaseParseInstance) Drain() { // // Note that the latter buffer is invalidated by this call, whereas the // caller retains ownership of @frame. -func (parse *BaseParseInstance) FinishFrame(frame *BaseParseFrame, size int) gst.FlowReturn { +func (parse *BaseParseInstance) FinishFrame(frame *BaseParseFrame, size int32) gst.FlowReturn { var carg0 *C.GstBaseParse // in, none, converted var carg1 *C.GstBaseParseFrame // in, none, converted var carg2 C.gint // in, none, casted @@ -5235,14 +5326,14 @@ func (parse *BaseParseInstance) SetAverageBitrate(bitrate uint) { // // - _fmt gst.Format: #GstFormat. // - duration int64: duration value. -// - interval int: how often to update the duration estimate based on bitrate, or 0. +// - interval int32: how often to update the duration estimate based on bitrate, or 0. // // Sets the duration of the currently playing media. Subclass can use this // when it is able to determine duration and/or notices a change in the media // duration. Alternatively, if @interval is non-zero (default), then stream // duration is determined based on estimated bitrate, and updated every @interval // frames. -func (parse *BaseParseInstance) SetDuration(_fmt gst.Format, duration int64, interval int) { +func (parse *BaseParseInstance) SetDuration(_fmt gst.Format, duration int64, interval int32) { var carg0 *C.GstBaseParse // in, none, converted var carg1 C.GstFormat // in, none, casted var carg2 C.gint64 // in, none, casted @@ -5535,9 +5626,9 @@ type BaseParseOverrides[Instance BaseParse] struct { // // The function returns the following values: // - // - skipsize int + // - skipsize int32 // - goret gst.FlowReturn - HandleFrame func(Instance, *BaseParseFrame) (int, gst.FlowReturn) + HandleFrame func(Instance, *BaseParseFrame) (int32, gst.FlowReturn) // PrePushFrame allows you to override the implementation of the virtual method pre_push_frame. // The function takes the following parameters: // @@ -5624,7 +5715,7 @@ func UnsafeApplyBaseParseOverrides[Instance BaseParse](gclass unsafe.Pointer, ov var destValue *int64 // in, transfer: none, C Pointers: 1, Name: gint64 var goret bool // return - parse = UnsafeBaseParseFromGlibNone(unsafe.Pointer(carg0)).(Instance) + parse = UnsafeBaseParseFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) srcFormat = gst.Format(carg1) srcValue = int64(carg2) destFormat = gst.Format(carg3) @@ -5653,7 +5744,7 @@ func UnsafeApplyBaseParseOverrides[Instance BaseParse](gclass unsafe.Pointer, ov var buffer *gst.Buffer // in, none, converted var goret gst.FlowReturn // return, none, casted - parse = UnsafeBaseParseFromGlibNone(unsafe.Pointer(carg0)).(Instance) + parse = UnsafeBaseParseFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) buffer = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Detect(parse, buffer) @@ -5675,7 +5766,7 @@ func UnsafeApplyBaseParseOverrides[Instance BaseParse](gclass unsafe.Pointer, ov var filter *gst.Caps // in, none, converted var goret *gst.Caps // return, full, converted - parse = UnsafeBaseParseFromGlibNone(unsafe.Pointer(carg0)).(Instance) + parse = UnsafeBaseParseFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) filter = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.GetSinkCaps(parse, filter) @@ -5695,10 +5786,10 @@ func UnsafeApplyBaseParseOverrides[Instance BaseParse](gclass unsafe.Pointer, ov func(carg0 *C.GstBaseParse, carg1 *C.GstBaseParseFrame, carg2 *C.gint) (cret C.GstFlowReturn) { var parse Instance // go GstBaseParse subclass var frame *BaseParseFrame // in, none, converted - var skipsize int // out, full, casted + var skipsize int32 // out, full, casted var goret gst.FlowReturn // return, none, casted - parse = UnsafeBaseParseFromGlibNone(unsafe.Pointer(carg0)).(Instance) + parse = UnsafeBaseParseFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) frame = UnsafeBaseParseFrameFromGlibNone(unsafe.Pointer(carg1)) skipsize, goret = overrides.HandleFrame(parse, frame) @@ -5721,7 +5812,7 @@ func UnsafeApplyBaseParseOverrides[Instance BaseParse](gclass unsafe.Pointer, ov var frame *BaseParseFrame // in, none, converted var goret gst.FlowReturn // return, none, casted - parse = UnsafeBaseParseFromGlibNone(unsafe.Pointer(carg0)).(Instance) + parse = UnsafeBaseParseFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) frame = UnsafeBaseParseFrameFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.PrePushFrame(parse, frame) @@ -5743,7 +5834,7 @@ func UnsafeApplyBaseParseOverrides[Instance BaseParse](gclass unsafe.Pointer, ov var caps *gst.Caps // in, none, converted var goret bool // return - parse = UnsafeBaseParseFromGlibNone(unsafe.Pointer(carg0)).(Instance) + parse = UnsafeBaseParseFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SetSinkCaps(parse, caps) @@ -5767,7 +5858,7 @@ func UnsafeApplyBaseParseOverrides[Instance BaseParse](gclass unsafe.Pointer, ov var event *gst.Event // in, none, converted var goret bool // return - parse = UnsafeBaseParseFromGlibNone(unsafe.Pointer(carg0)).(Instance) + parse = UnsafeBaseParseFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = gst.UnsafeEventFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SinkEvent(parse, event) @@ -5791,7 +5882,7 @@ func UnsafeApplyBaseParseOverrides[Instance BaseParse](gclass unsafe.Pointer, ov var query *gst.Query // in, none, converted var goret bool // return - parse = UnsafeBaseParseFromGlibNone(unsafe.Pointer(carg0)).(Instance) + parse = UnsafeBaseParseFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SinkQuery(parse, query) @@ -5815,7 +5906,7 @@ func UnsafeApplyBaseParseOverrides[Instance BaseParse](gclass unsafe.Pointer, ov var event *gst.Event // in, none, converted var goret bool // return - parse = UnsafeBaseParseFromGlibNone(unsafe.Pointer(carg0)).(Instance) + parse = UnsafeBaseParseFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = gst.UnsafeEventFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SrcEvent(parse, event) @@ -5839,7 +5930,7 @@ func UnsafeApplyBaseParseOverrides[Instance BaseParse](gclass unsafe.Pointer, ov var query *gst.Query // in, none, converted var goret bool // return - parse = UnsafeBaseParseFromGlibNone(unsafe.Pointer(carg0)).(Instance) + parse = UnsafeBaseParseFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SrcQuery(parse, query) @@ -5862,7 +5953,7 @@ func UnsafeApplyBaseParseOverrides[Instance BaseParse](gclass unsafe.Pointer, ov var parse Instance // go GstBaseParse subclass var goret bool // return - parse = UnsafeBaseParseFromGlibNone(unsafe.Pointer(carg0)).(Instance) + parse = UnsafeBaseParseFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Start(parse) @@ -5884,7 +5975,7 @@ func UnsafeApplyBaseParseOverrides[Instance BaseParse](gclass unsafe.Pointer, ov var parse Instance // go GstBaseParse subclass var goret bool // return - parse = UnsafeBaseParseFromGlibNone(unsafe.Pointer(carg0)).(Instance) + parse = UnsafeBaseParseFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Stop(parse) @@ -6458,6 +6549,11 @@ func UnsafeBaseSinkFromGlibFull(c unsafe.Pointer) BaseSink { return gobject.UnsafeObjectFromGlibFull(c).(BaseSink) } +// UnsafeBaseSinkFromGlibBorrow is used to convert raw GstBaseSink pointers to go without touching any references. This is used by the bindings internally. +func UnsafeBaseSinkFromGlibBorrow(c unsafe.Pointer) BaseSink { + return gobject.UnsafeObjectFromGlibBorrow(c).(BaseSink) +} + func (b *BaseSinkInstance) upcastToGstBaseSink() *BaseSinkInstance { return b } @@ -7510,7 +7606,7 @@ func UnsafeApplyBaseSinkOverrides[Instance BaseSink](gclass unsafe.Pointer, over var active bool // in var goret bool // return - sink = UnsafeBaseSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeBaseSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != 0 { active = true } @@ -7536,7 +7632,7 @@ func UnsafeApplyBaseSinkOverrides[Instance BaseSink](gclass unsafe.Pointer, over var event *gst.Event // in, none, converted var goret bool // return - sink = UnsafeBaseSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeBaseSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = gst.UnsafeEventFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Event(sink, event) @@ -7560,7 +7656,7 @@ func UnsafeApplyBaseSinkOverrides[Instance BaseSink](gclass unsafe.Pointer, over var caps *gst.Caps // in, none, converted var goret *gst.Caps // return, full, converted - sink = UnsafeBaseSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeBaseSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Fixate(sink, caps) @@ -7582,7 +7678,7 @@ func UnsafeApplyBaseSinkOverrides[Instance BaseSink](gclass unsafe.Pointer, over var filter *gst.Caps // in, none, converted, nullable var goret *gst.Caps // return, full, converted - sink = UnsafeBaseSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeBaseSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != nil { filter = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) } @@ -7607,7 +7703,7 @@ func UnsafeApplyBaseSinkOverrides[Instance BaseSink](gclass unsafe.Pointer, over var start gst.ClockTime // out, full, casted, alias var end gst.ClockTime // out, full, casted, alias - sink = UnsafeBaseSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeBaseSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) buffer = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) start, end = overrides.GetTimes(sink, buffer) @@ -7628,7 +7724,7 @@ func UnsafeApplyBaseSinkOverrides[Instance BaseSink](gclass unsafe.Pointer, over var buffer *gst.Buffer // in, none, converted var goret gst.FlowReturn // return, none, casted - sink = UnsafeBaseSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeBaseSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) buffer = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Prepare(sink, buffer) @@ -7650,7 +7746,7 @@ func UnsafeApplyBaseSinkOverrides[Instance BaseSink](gclass unsafe.Pointer, over var bufferList *gst.BufferList // in, none, converted var goret gst.FlowReturn // return, none, casted - sink = UnsafeBaseSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeBaseSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) bufferList = gst.UnsafeBufferListFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.PrepareList(sink, bufferList) @@ -7672,7 +7768,7 @@ func UnsafeApplyBaseSinkOverrides[Instance BaseSink](gclass unsafe.Pointer, over var buffer *gst.Buffer // in, none, converted var goret gst.FlowReturn // return, none, casted - sink = UnsafeBaseSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeBaseSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) buffer = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Preroll(sink, buffer) @@ -7694,7 +7790,7 @@ func UnsafeApplyBaseSinkOverrides[Instance BaseSink](gclass unsafe.Pointer, over var query *gst.Query // in, none, converted var goret bool // return - sink = UnsafeBaseSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeBaseSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.ProposeAllocation(sink, query) @@ -7718,7 +7814,7 @@ func UnsafeApplyBaseSinkOverrides[Instance BaseSink](gclass unsafe.Pointer, over var query *gst.Query // in, none, converted var goret bool // return - sink = UnsafeBaseSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeBaseSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Query(sink, query) @@ -7742,7 +7838,7 @@ func UnsafeApplyBaseSinkOverrides[Instance BaseSink](gclass unsafe.Pointer, over var buffer *gst.Buffer // in, none, converted var goret gst.FlowReturn // return, none, casted - sink = UnsafeBaseSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeBaseSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) buffer = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Render(sink, buffer) @@ -7764,7 +7860,7 @@ func UnsafeApplyBaseSinkOverrides[Instance BaseSink](gclass unsafe.Pointer, over var bufferList *gst.BufferList // in, none, converted var goret gst.FlowReturn // return, none, casted - sink = UnsafeBaseSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeBaseSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) bufferList = gst.UnsafeBufferListFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.RenderList(sink, bufferList) @@ -7786,7 +7882,7 @@ func UnsafeApplyBaseSinkOverrides[Instance BaseSink](gclass unsafe.Pointer, over var caps *gst.Caps // in, none, converted var goret bool // return - sink = UnsafeBaseSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeBaseSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SetCaps(sink, caps) @@ -7809,7 +7905,7 @@ func UnsafeApplyBaseSinkOverrides[Instance BaseSink](gclass unsafe.Pointer, over var sink Instance // go GstBaseSink subclass var goret bool // return - sink = UnsafeBaseSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeBaseSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Start(sink) @@ -7831,7 +7927,7 @@ func UnsafeApplyBaseSinkOverrides[Instance BaseSink](gclass unsafe.Pointer, over var sink Instance // go GstBaseSink subclass var goret bool // return - sink = UnsafeBaseSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeBaseSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Stop(sink) @@ -7853,7 +7949,7 @@ func UnsafeApplyBaseSinkOverrides[Instance BaseSink](gclass unsafe.Pointer, over var sink Instance // go GstBaseSink subclass var goret bool // return - sink = UnsafeBaseSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeBaseSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Unlock(sink) @@ -7875,7 +7971,7 @@ func UnsafeApplyBaseSinkOverrides[Instance BaseSink](gclass unsafe.Pointer, over var sink Instance // go GstBaseSink subclass var goret bool // return - sink = UnsafeBaseSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeBaseSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.UnlockStop(sink) @@ -7898,7 +7994,7 @@ func UnsafeApplyBaseSinkOverrides[Instance BaseSink](gclass unsafe.Pointer, over var event *gst.Event // in, none, converted var goret gst.FlowReturn // return, none, casted - sink = UnsafeBaseSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + sink = UnsafeBaseSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = gst.UnsafeEventFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.WaitEvent(sink, event) @@ -8393,6 +8489,11 @@ func UnsafeBaseSrcFromGlibFull(c unsafe.Pointer) BaseSrc { return gobject.UnsafeObjectFromGlibFull(c).(BaseSrc) } +// UnsafeBaseSrcFromGlibBorrow is used to convert raw GstBaseSrc pointers to go without touching any references. This is used by the bindings internally. +func UnsafeBaseSrcFromGlibBorrow(c unsafe.Pointer) BaseSrc { + return gobject.UnsafeObjectFromGlibBorrow(c).(BaseSrc) +} + func (b *BaseSrcInstance) upcastToGstBaseSrc() *BaseSrcInstance { return b } @@ -9252,7 +9353,7 @@ func UnsafeApplyBaseSrcOverrides[Instance BaseSrc](gclass unsafe.Pointer, overri var buf *gst.Buffer // out, full, converted var goret gst.FlowReturn // return, none, casted - src = UnsafeBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) offset = uint64(carg1) size = uint(carg2) @@ -9276,7 +9377,7 @@ func UnsafeApplyBaseSrcOverrides[Instance BaseSrc](gclass unsafe.Pointer, overri var query *gst.Query // in, none, converted var goret bool // return - src = UnsafeBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.DecideAllocation(src, query) @@ -9300,7 +9401,7 @@ func UnsafeApplyBaseSrcOverrides[Instance BaseSrc](gclass unsafe.Pointer, overri var segment *gst.Segment // in, none, converted var goret bool // return - src = UnsafeBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) segment = gst.UnsafeSegmentFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.DoSeek(src, segment) @@ -9324,7 +9425,7 @@ func UnsafeApplyBaseSrcOverrides[Instance BaseSrc](gclass unsafe.Pointer, overri var event *gst.Event // in, none, converted var goret bool // return - src = UnsafeBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = gst.UnsafeEventFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Event(src, event) @@ -9350,7 +9451,7 @@ func UnsafeApplyBaseSrcOverrides[Instance BaseSrc](gclass unsafe.Pointer, overri var buf *gst.Buffer // in, none, converted var goret gst.FlowReturn // return, none, casted - src = UnsafeBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) offset = uint64(carg1) size = uint(carg2) buf = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg3)) @@ -9374,7 +9475,7 @@ func UnsafeApplyBaseSrcOverrides[Instance BaseSrc](gclass unsafe.Pointer, overri var caps *gst.Caps // in, full, converted var goret *gst.Caps // return, full, converted - src = UnsafeBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) caps = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(carg1)) goret = overrides.Fixate(src, caps) @@ -9396,7 +9497,7 @@ func UnsafeApplyBaseSrcOverrides[Instance BaseSrc](gclass unsafe.Pointer, overri var filter *gst.Caps // in, none, converted, nullable var goret *gst.Caps // return, full, converted - src = UnsafeBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != nil { filter = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) } @@ -9420,7 +9521,7 @@ func UnsafeApplyBaseSrcOverrides[Instance BaseSrc](gclass unsafe.Pointer, overri var size uint64 // out, full, casted var goret bool // return - src = UnsafeBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) size, goret = overrides.GetSize(src) @@ -9445,7 +9546,7 @@ func UnsafeApplyBaseSrcOverrides[Instance BaseSrc](gclass unsafe.Pointer, overri var start gst.ClockTime // out, full, casted, alias var end gst.ClockTime // out, full, casted, alias - src = UnsafeBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) buffer = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) start, end = overrides.GetTimes(src, buffer) @@ -9465,7 +9566,7 @@ func UnsafeApplyBaseSrcOverrides[Instance BaseSrc](gclass unsafe.Pointer, overri var src Instance // go GstBaseSrc subclass var goret bool // return - src = UnsafeBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.IsSeekable(src) @@ -9487,7 +9588,7 @@ func UnsafeApplyBaseSrcOverrides[Instance BaseSrc](gclass unsafe.Pointer, overri var src Instance // go GstBaseSrc subclass var goret bool // return - src = UnsafeBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Negotiate(src) @@ -9511,7 +9612,7 @@ func UnsafeApplyBaseSrcOverrides[Instance BaseSrc](gclass unsafe.Pointer, overri var segment *gst.Segment // in, none, converted var goret bool // return - src = UnsafeBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) seek = gst.UnsafeEventFromGlibNone(unsafe.Pointer(carg1)) segment = gst.UnsafeSegmentFromGlibNone(unsafe.Pointer(carg2)) @@ -9536,7 +9637,7 @@ func UnsafeApplyBaseSrcOverrides[Instance BaseSrc](gclass unsafe.Pointer, overri var query *gst.Query // in, none, converted var goret bool // return - src = UnsafeBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Query(src, query) @@ -9560,7 +9661,7 @@ func UnsafeApplyBaseSrcOverrides[Instance BaseSrc](gclass unsafe.Pointer, overri var caps *gst.Caps // in, none, converted var goret bool // return - src = UnsafeBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SetCaps(src, caps) @@ -9583,7 +9684,7 @@ func UnsafeApplyBaseSrcOverrides[Instance BaseSrc](gclass unsafe.Pointer, overri var src Instance // go GstBaseSrc subclass var goret bool // return - src = UnsafeBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Start(src) @@ -9605,7 +9706,7 @@ func UnsafeApplyBaseSrcOverrides[Instance BaseSrc](gclass unsafe.Pointer, overri var src Instance // go GstBaseSrc subclass var goret bool // return - src = UnsafeBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Stop(src) @@ -9627,7 +9728,7 @@ func UnsafeApplyBaseSrcOverrides[Instance BaseSrc](gclass unsafe.Pointer, overri var src Instance // go GstBaseSrc subclass var goret bool // return - src = UnsafeBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Unlock(src) @@ -9649,7 +9750,7 @@ func UnsafeApplyBaseSrcOverrides[Instance BaseSrc](gclass unsafe.Pointer, overri var src Instance // go GstBaseSrc subclass var goret bool // return - src = UnsafeBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.UnlockStop(src) @@ -10015,6 +10116,11 @@ func UnsafeBaseTransformFromGlibFull(c unsafe.Pointer) BaseTransform { return gobject.UnsafeObjectFromGlibFull(c).(BaseTransform) } +// UnsafeBaseTransformFromGlibBorrow is used to convert raw GstBaseTransform pointers to go without touching any references. This is used by the bindings internally. +func UnsafeBaseTransformFromGlibBorrow(c unsafe.Pointer) BaseTransform { + return gobject.UnsafeObjectFromGlibBorrow(c).(BaseTransform) +} + func (b *BaseTransformInstance) upcastToGstBaseTransform() *BaseTransformInstance { return b } @@ -10664,7 +10770,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var caps *gst.Caps // in, none, converted var goret bool // return - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) direction = gst.PadDirection(carg1) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg2)) @@ -10688,7 +10794,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var trans Instance // go GstBaseTransform subclass var buffer *gst.Buffer // in, none, converted - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) buffer = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) overrides.BeforeTransform(trans, buffer) @@ -10707,7 +10813,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var outbuf *gst.Buffer // in, none, converted var goret bool // return - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) input = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) outbuf = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg2)) @@ -10732,7 +10838,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var query *gst.Query // in, none, converted var goret bool // return - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.DecideAllocation(trans, query) @@ -10758,7 +10864,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var params *gst.Structure // in, none, converted var goret bool // return - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) api = gobject.Type(carg2) params = gst.UnsafeStructureFromGlibNone(unsafe.Pointer(carg3)) @@ -10786,7 +10892,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var othercaps *gst.Caps // in, full, converted var goret *gst.Caps // return, full, converted - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) direction = gst.PadDirection(carg1) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg2)) othercaps = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(carg3)) @@ -10810,7 +10916,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var outbuf *gst.Buffer // out, full, converted var goret gst.FlowReturn // return, none, casted - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) outbuf, goret = overrides.GenerateOutput(trans) @@ -10833,7 +10939,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var size uint // out, full, casted var goret bool // return - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) size, goret = overrides.GetUnitSize(trans, caps) @@ -10859,7 +10965,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var outbuf *gst.Buffer // out, full, converted var goret gst.FlowReturn // return, none, casted - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) input = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) outbuf, goret = overrides.PrepareOutputBuffer(trans, input) @@ -10883,7 +10989,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var query *gst.Query // in, none, converted var goret bool // return - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) decideQuery = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg2)) @@ -10909,7 +11015,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var query *gst.Query // in, none, converted var goret bool // return - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) direction = gst.PadDirection(carg1) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg2)) @@ -10935,7 +11041,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var outcaps *gst.Caps // in, none, converted var goret bool // return - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) incaps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) outcaps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg2)) @@ -10960,7 +11066,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var event *gst.Event // in, full, converted var goret bool // return - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = gst.UnsafeEventFromGlibFull(unsafe.Pointer(carg1)) goret = overrides.SinkEvent(trans, event) @@ -10984,7 +11090,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var event *gst.Event // in, full, converted var goret bool // return - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = gst.UnsafeEventFromGlibFull(unsafe.Pointer(carg1)) goret = overrides.SrcEvent(trans, event) @@ -11007,7 +11113,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var trans Instance // go GstBaseTransform subclass var goret bool // return - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Start(trans) @@ -11029,7 +11135,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var trans Instance // go GstBaseTransform subclass var goret bool // return - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Stop(trans) @@ -11053,7 +11159,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var input *gst.Buffer // in, none, converted var goret gst.FlowReturn // return, none, casted - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != 0 { isDiscont = true } @@ -11079,7 +11185,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var outbuf *gst.Buffer // in, none, converted var goret gst.FlowReturn // return, none, casted - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) inbuf = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) outbuf = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg2)) @@ -11104,7 +11210,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var filter *gst.Caps // in, none, converted var goret *gst.Caps // return, full, converted - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) direction = gst.PadDirection(carg1) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg2)) filter = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg3)) @@ -11128,7 +11234,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var buf *gst.Buffer // in, none, converted var goret gst.FlowReturn // return, none, casted - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) buf = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.TransformIP(trans, buf) @@ -11152,7 +11258,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var inbuf *gst.Buffer // in, none, converted var goret bool // return - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) outbuf = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) meta = gst.UnsafeMetaFromGlibNone(unsafe.Pointer(carg2)) inbuf = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg3)) @@ -11182,7 +11288,7 @@ func UnsafeApplyBaseTransformOverrides[Instance BaseTransform](gclass unsafe.Poi var othersize uint // out, full, casted var goret bool // return - trans = UnsafeBaseTransformFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeBaseTransformFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) direction = gst.PadDirection(carg1) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg2)) size = uint(carg3) @@ -11604,6 +11710,11 @@ func UnsafeCollectPadsFromGlibFull(c unsafe.Pointer) CollectPads { return gobject.UnsafeObjectFromGlibFull(c).(CollectPads) } +// UnsafeCollectPadsFromGlibBorrow is used to convert raw GstCollectPads pointers to go without touching any references. This is used by the bindings internally. +func UnsafeCollectPadsFromGlibBorrow(c unsafe.Pointer) CollectPads { + return gobject.UnsafeObjectFromGlibBorrow(c).(CollectPads) +} + func (c *CollectPadsInstance) upcastToGstCollectPads() *CollectPadsInstance { return c } @@ -12397,6 +12508,11 @@ func UnsafeDataQueueFromGlibFull(c unsafe.Pointer) DataQueue { return gobject.UnsafeObjectFromGlibFull(c).(DataQueue) } +// UnsafeDataQueueFromGlibBorrow is used to convert raw GstDataQueue pointers to go without touching any references. This is used by the bindings internally. +func UnsafeDataQueueFromGlibBorrow(c unsafe.Pointer) DataQueue { + return gobject.UnsafeObjectFromGlibBorrow(c).(DataQueue) +} + func (d *DataQueueInstance) upcastToGstDataQueue() *DataQueueInstance { return d } @@ -12458,7 +12574,7 @@ func UnsafeApplyDataQueueOverrides[Instance DataQueue](gclass unsafe.Pointer, ov func(carg0 *C.GstDataQueue) { var queue Instance // go GstDataQueue subclass - queue = UnsafeDataQueueFromGlibNone(unsafe.Pointer(carg0)).(Instance) + queue = UnsafeDataQueueFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.Empty(queue) }, @@ -12473,7 +12589,7 @@ func UnsafeApplyDataQueueOverrides[Instance DataQueue](gclass unsafe.Pointer, ov func(carg0 *C.GstDataQueue) { var queue Instance // go GstDataQueue subclass - queue = UnsafeDataQueueFromGlibNone(unsafe.Pointer(carg0)).(Instance) + queue = UnsafeDataQueueFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.Full(queue) }, @@ -12569,6 +12685,11 @@ func UnsafePushSrcFromGlibFull(c unsafe.Pointer) PushSrc { return gobject.UnsafeObjectFromGlibFull(c).(PushSrc) } +// UnsafePushSrcFromGlibBorrow is used to convert raw GstPushSrc pointers to go without touching any references. This is used by the bindings internally. +func UnsafePushSrcFromGlibBorrow(c unsafe.Pointer) PushSrc { + return gobject.UnsafeObjectFromGlibBorrow(c).(PushSrc) +} + func (p *PushSrcInstance) upcastToGstPushSrc() *PushSrcInstance { return p } @@ -12623,7 +12744,7 @@ func UnsafeApplyPushSrcOverrides[Instance PushSrc](gclass unsafe.Pointer, overri var buf *gst.Buffer // out, full, converted var goret gst.FlowReturn // return, none, casted - src = UnsafePushSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafePushSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) buf, goret = overrides.Alloc(src) @@ -12645,7 +12766,7 @@ func UnsafeApplyPushSrcOverrides[Instance PushSrc](gclass unsafe.Pointer, overri var buf *gst.Buffer // in, none, converted var goret gst.FlowReturn // return, none, casted - src = UnsafePushSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafePushSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) buf = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Fill(src, buf) @@ -12874,8 +12995,11 @@ func marshalBaseParseFrame(p unsafe.Pointer) (interface{}, error) { return UnsafeBaseParseFrameFromGlibBorrow(b), nil } -func (r *BaseParseFrame) InitGoValue(v *gobject.Value) { - v.Init(TypeBaseParseFrame) +func (r *BaseParseFrame) GoValueType() gobject.Type { + return TypeBaseParseFrame +} + +func (r *BaseParseFrame) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -12936,7 +13060,7 @@ func UnsafeBaseParseFrameToGlibFull(b *BaseParseFrame) unsafe.Pointer { // // - buffer *gst.Buffer: a #GstBuffer // - flags BaseParseFrameFlags: the flags -// - overhead int: number of bytes in this frame which should be counted as +// - overhead int32: number of bytes in this frame which should be counted as // metadata overhead, ie. not used to calculate the average bitrate. // Set to -1 to mark the entire frame as metadata. If in doubt, set to 0. // @@ -12947,7 +13071,7 @@ func UnsafeBaseParseFrameToGlibFull(b *BaseParseFrame) unsafe.Pointer { // Allocates a new #GstBaseParseFrame. This function is mainly for bindings, // elements written in C should usually allocate the frame on the stack and // then use gst_base_parse_frame_init() to initialise it. -func NewBaseParseFrame(buffer *gst.Buffer, flags BaseParseFrameFlags, overhead int) *BaseParseFrame { +func NewBaseParseFrame(buffer *gst.Buffer, flags BaseParseFrameFlags, overhead int32) *BaseParseFrame { var carg1 *C.GstBuffer // in, none, converted var carg2 C.GstBaseParseFrameFlags // in, none, casted var carg3 C.gint // in, none, casted @@ -17298,8 +17422,11 @@ func marshalFlowCombiner(p unsafe.Pointer) (interface{}, error) { return UnsafeFlowCombinerFromGlibBorrow(b), nil } -func (r *FlowCombiner) InitGoValue(v *gobject.Value) { - v.Init(TypeFlowCombiner) +func (r *FlowCombiner) GoValueType() gobject.Type { + return TypeFlowCombiner +} + +func (r *FlowCombiner) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } diff --git a/pkg/gstbase/gstbase_export.gen.go b/pkg/gstbase/gstbase_export.gen.go index fdbf84f..c291340 100644 --- a/pkg/gstbase/gstbase_export.gen.go +++ b/pkg/gstbase/gstbase_export.gen.go @@ -85,7 +85,7 @@ func _gotk4_gstbase1_CollectPadsCompareFunction(carg1 *C.GstCollectPads, carg2 * var timestamp1 gst.ClockTime // in, none, casted, alias var data2 *CollectData // in, none, converted var timestamp2 gst.ClockTime // in, none, casted, alias - var goret int // return, none, casted + var goret int32 // return, none, casted pads = UnsafeCollectPadsFromGlibNone(unsafe.Pointer(carg1)) data1 = UnsafeCollectDataFromGlibNone(unsafe.Pointer(carg2)) diff --git a/pkg/gstcheck/gstcheck.gen.go b/pkg/gstcheck/gstcheck.gen.go index af6673d..ff13756 100644 --- a/pkg/gstcheck/gstcheck.gen.go +++ b/pkg/gstcheck/gstcheck.gen.go @@ -155,32 +155,6 @@ func CheckAbiList(list *CheckABIStruct, haveAbiSizes bool) { runtime.KeepAlive(haveAbiSizes) } -// CheckBufferData wraps gst_check_buffer_data -// -// The function takes the following parameters: -// -// - buffer *gst.Buffer: buffer to compare -// - data unsafe.Pointer (nullable): data to compare to -// - size uint: size of data to compare -// -// Compare the buffer contents with @data and @size. -func CheckBufferData(buffer *gst.Buffer, data unsafe.Pointer, size uint) { - var carg1 *C.GstBuffer // in, none, converted - var carg2 C.gconstpointer // in, none, casted, nullable - var carg3 C.gsize // in, none, casted - - carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) - if data != nil { - carg2 = C.gconstpointer(data) - } - carg3 = C.gsize(size) - - C.gst_check_buffer_data(carg1, carg2, carg3) - runtime.KeepAlive(buffer) - runtime.KeepAlive(data) - runtime.KeepAlive(size) -} - // CheckCapsEqual wraps gst_check_caps_equal // // The function takes the following parameters: @@ -300,8 +274,8 @@ func CheckElementPushBuffer(elementName string, bufferIn *gst.Buffer, capsIn *gs // - message *gst.Message // - typ gst.MessageType // - domain glib.Quark -// - code int -func CheckMessageError(message *gst.Message, typ gst.MessageType, domain glib.Quark, code int) { +// - code int32 +func CheckMessageError(message *gst.Message, typ gst.MessageType, domain glib.Quark, code int32) { var carg1 *C.GstMessage // in, none, converted var carg2 C.GstMessageType // in, none, casted var carg3 C.GQuark // in, none, casted, alias @@ -1177,6 +1151,11 @@ func UnsafeTestClockFromGlibFull(c unsafe.Pointer) TestClock { return gobject.UnsafeObjectFromGlibFull(c).(TestClock) } +// UnsafeTestClockFromGlibBorrow is used to convert raw GstTestClock pointers to go without touching any references. This is used by the bindings internally. +func UnsafeTestClockFromGlibBorrow(c unsafe.Pointer) TestClock { + return gobject.UnsafeObjectFromGlibBorrow(c).(TestClock) +} + func (t *TestClockInstance) upcastToGstTestClock() *TestClockInstance { return t } @@ -3223,7 +3202,7 @@ func (h *Harness) SetUpstreamLatency(latency gst.ClockTime) { // // The function takes the following parameters: // -// - pushes int: a #gint with the number of calls to gst_harness_push_to_sink +// - pushes int32: a #gint with the number of calls to gst_harness_push_to_sink // // The function returns the following values: // @@ -3233,7 +3212,7 @@ func (h *Harness) SetUpstreamLatency(latency gst.ClockTime) { // Will abort the pushing if any one push fails. // // MT safe. -func (h *Harness) SinkPushMany(pushes int) gst.FlowReturn { +func (h *Harness) SinkPushMany(pushes int32) gst.FlowReturn { var carg0 *C.GstHarness // in, none, converted var carg1 C.gint // in, none, casted var cret C.GstFlowReturn // return, none, casted @@ -3256,8 +3235,8 @@ func (h *Harness) SinkPushMany(pushes int) gst.FlowReturn { // // The function takes the following parameters: // -// - cranks int: a #gint with the number of calls to gst_harness_crank_single_clock_wait -// - pushes int: a #gint with the number of calls to gst_harness_push +// - cranks int32: a #gint with the number of calls to gst_harness_crank_single_clock_wait +// - pushes int32: a #gint with the number of calls to gst_harness_push // // The function returns the following values: // @@ -3270,7 +3249,7 @@ func (h *Harness) SinkPushMany(pushes int) gst.FlowReturn { // buffer to push and v.v. // // MT safe. -func (h *Harness) SrcCrankAndPushMany(cranks int, pushes int) gst.FlowReturn { +func (h *Harness) SrcCrankAndPushMany(cranks int32, pushes int32) gst.FlowReturn { var carg0 *C.GstHarness // in, none, converted var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted diff --git a/pkg/gstcontroller/gstcontroller.gen.go b/pkg/gstcontroller/gstcontroller.gen.go index aace77a..2ca4acc 100644 --- a/pkg/gstcontroller/gstcontroller.gen.go +++ b/pkg/gstcontroller/gstcontroller.gen.go @@ -79,8 +79,11 @@ func marshalInterpolationMode(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = InterpolationMode(0) -func (e InterpolationMode) InitGoValue(v *gobject.Value) { - v.Init(TypeInterpolationMode) +func (e InterpolationMode) GoValueType() gobject.Type { + return TypeInterpolationMode +} + +func (e InterpolationMode) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -128,8 +131,11 @@ func marshalLFOWaveform(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = LFOWaveform(0) -func (e LFOWaveform) InitGoValue(v *gobject.Value) { - v.Init(TypeLFOWaveform) +func (e LFOWaveform) GoValueType() gobject.Type { + return TypeLFOWaveform +} + +func (e LFOWaveform) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -204,6 +210,11 @@ func UnsafeARGBControlBindingFromGlibFull(c unsafe.Pointer) ARGBControlBinding { return gobject.UnsafeObjectFromGlibFull(c).(ARGBControlBinding) } +// UnsafeARGBControlBindingFromGlibBorrow is used to convert raw GstARGBControlBinding pointers to go without touching any references. This is used by the bindings internally. +func UnsafeARGBControlBindingFromGlibBorrow(c unsafe.Pointer) ARGBControlBinding { + return gobject.UnsafeObjectFromGlibBorrow(c).(ARGBControlBinding) +} + func (a *ARGBControlBindingInstance) upcastToGstARGBControlBinding() *ARGBControlBindingInstance { return a } @@ -354,6 +365,11 @@ func UnsafeDirectControlBindingFromGlibFull(c unsafe.Pointer) DirectControlBindi return gobject.UnsafeObjectFromGlibFull(c).(DirectControlBinding) } +// UnsafeDirectControlBindingFromGlibBorrow is used to convert raw GstDirectControlBinding pointers to go without touching any references. This is used by the bindings internally. +func UnsafeDirectControlBindingFromGlibBorrow(c unsafe.Pointer) DirectControlBinding { + return gobject.UnsafeObjectFromGlibBorrow(c).(DirectControlBinding) +} + func (d *DirectControlBindingInstance) upcastToGstDirectControlBinding() *DirectControlBindingInstance { return d } @@ -533,6 +549,11 @@ func UnsafeLFOControlSourceFromGlibFull(c unsafe.Pointer) LFOControlSource { return gobject.UnsafeObjectFromGlibFull(c).(LFOControlSource) } +// UnsafeLFOControlSourceFromGlibBorrow is used to convert raw GstLFOControlSource pointers to go without touching any references. This is used by the bindings internally. +func UnsafeLFOControlSourceFromGlibBorrow(c unsafe.Pointer) LFOControlSource { + return gobject.UnsafeObjectFromGlibBorrow(c).(LFOControlSource) +} + func (l *LFOControlSourceInstance) upcastToGstLFOControlSource() *LFOControlSourceInstance { return l } @@ -648,6 +669,11 @@ func UnsafeProxyControlBindingFromGlibFull(c unsafe.Pointer) ProxyControlBinding return gobject.UnsafeObjectFromGlibFull(c).(ProxyControlBinding) } +// UnsafeProxyControlBindingFromGlibBorrow is used to convert raw GstProxyControlBinding pointers to go without touching any references. This is used by the bindings internally. +func UnsafeProxyControlBindingFromGlibBorrow(c unsafe.Pointer) ProxyControlBinding { + return gobject.UnsafeObjectFromGlibBorrow(c).(ProxyControlBinding) +} + func (p *ProxyControlBindingInstance) upcastToGstProxyControlBinding() *ProxyControlBindingInstance { return p } @@ -795,10 +821,10 @@ type TimedValueControlSource interface { // // The function returns the following values: // - // - goret int + // - goret int32 // // Get the number of control points that are set. - GetCount() int + GetCount() int32 // Set wraps gst_timed_value_control_source_set // // The function takes the following parameters: @@ -869,6 +895,11 @@ func UnsafeTimedValueControlSourceFromGlibFull(c unsafe.Pointer) TimedValueContr return gobject.UnsafeObjectFromGlibFull(c).(TimedValueControlSource) } +// UnsafeTimedValueControlSourceFromGlibBorrow is used to convert raw GstTimedValueControlSource pointers to go without touching any references. This is used by the bindings internally. +func UnsafeTimedValueControlSourceFromGlibBorrow(c unsafe.Pointer) TimedValueControlSource { + return gobject.UnsafeObjectFromGlibBorrow(c).(TimedValueControlSource) +} + func (t *TimedValueControlSourceInstance) upcastToGstTimedValueControlSource() *TimedValueControlSourceInstance { return t } @@ -954,10 +985,10 @@ func (self *TimedValueControlSourceInstance) GetAll() []*gst.TimedValue { // // The function returns the following values: // -// - goret int +// - goret int32 // // Get the number of control points that are set. -func (self *TimedValueControlSourceInstance) GetCount() int { +func (self *TimedValueControlSourceInstance) GetCount() int32 { var carg0 *C.GstTimedValueControlSource // in, none, converted var cret C.gint // return, none, casted @@ -966,9 +997,9 @@ func (self *TimedValueControlSourceInstance) GetCount() int { cret = C.gst_timed_value_control_source_get_count(carg0) runtime.KeepAlive(self) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -1166,6 +1197,11 @@ func UnsafeTriggerControlSourceFromGlibFull(c unsafe.Pointer) TriggerControlSour return gobject.UnsafeObjectFromGlibFull(c).(TriggerControlSource) } +// UnsafeTriggerControlSourceFromGlibBorrow is used to convert raw GstTriggerControlSource pointers to go without touching any references. This is used by the bindings internally. +func UnsafeTriggerControlSourceFromGlibBorrow(c unsafe.Pointer) TriggerControlSource { + return gobject.UnsafeObjectFromGlibBorrow(c).(TriggerControlSource) +} + func (t *TriggerControlSourceInstance) upcastToGstTriggerControlSource() *TriggerControlSourceInstance { return t } @@ -1290,6 +1326,11 @@ func UnsafeInterpolationControlSourceFromGlibFull(c unsafe.Pointer) Interpolatio return gobject.UnsafeObjectFromGlibFull(c).(InterpolationControlSource) } +// UnsafeInterpolationControlSourceFromGlibBorrow is used to convert raw GstInterpolationControlSource pointers to go without touching any references. This is used by the bindings internally. +func UnsafeInterpolationControlSourceFromGlibBorrow(c unsafe.Pointer) InterpolationControlSource { + return gobject.UnsafeObjectFromGlibBorrow(c).(InterpolationControlSource) +} + func (i *InterpolationControlSourceInstance) upcastToGstInterpolationControlSource() *InterpolationControlSourceInstance { return i } @@ -1424,8 +1465,11 @@ func marshalControlPoint(p unsafe.Pointer) (interface{}, error) { return UnsafeControlPointFromGlibBorrow(b), nil } -func (r *ControlPoint) InitGoValue(v *gobject.Value) { - v.Init(TypeControlPoint) +func (r *ControlPoint) GoValueType() gobject.Type { + return TypeControlPoint +} + +func (r *ControlPoint) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } diff --git a/pkg/gstgl/gstgl.gen.go b/pkg/gstgl/gstgl.gen.go index 826cd84..5f68692 100644 --- a/pkg/gstgl/gstgl.gen.go +++ b/pkg/gstgl/gstgl.gen.go @@ -196,6 +196,7 @@ var ( TypeGLBaseMemoryTransfer = gobject.Type(C.gst_gl_base_memory_transfer_get_type()) TypeGLConfigSurfaceType = gobject.Type(C.gst_gl_config_surface_type_get_type()) TypeGLDisplayType = gobject.Type(C.gst_gl_display_type_get_type()) + TypeGLDrmFormatFlags = gobject.Type(C.gst_gl_drm_format_flags_get_type()) TypeGLPlatform = gobject.Type(C.gst_gl_platform_get_type()) TypeGLSLProfile = gobject.Type(C.gst_glsl_profile_get_type()) TypeGLBaseFilter = gobject.Type(C.gst_gl_base_filter_get_type()) @@ -249,6 +250,7 @@ func init() { gobject.TypeMarshaler{T: TypeGLBaseMemoryTransfer, F: marshalGLBaseMemoryTransfer}, gobject.TypeMarshaler{T: TypeGLConfigSurfaceType, F: marshalGLConfigSurfaceType}, gobject.TypeMarshaler{T: TypeGLDisplayType, F: marshalGLDisplayType}, + gobject.TypeMarshaler{T: TypeGLDrmFormatFlags, F: marshalGLDRMFormatFlags}, gobject.TypeMarshaler{T: TypeGLPlatform, F: marshalGLPlatform}, gobject.TypeMarshaler{T: TypeGLSLProfile, F: marshalGLSLProfile}, gobject.TypeMarshaler{T: TypeGLBaseFilter, F: marshalGLBaseFilterInstance}, @@ -345,8 +347,11 @@ func marshalGLBaseMemoryError(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = GLBaseMemoryError(0) -func (e GLBaseMemoryError) InitGoValue(v *gobject.Value) { - v.Init(TypeGLBaseMemoryError) +func (e GLBaseMemoryError) GoValueType() gobject.Type { + return TypeGLBaseMemoryError +} + +func (e GLBaseMemoryError) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -400,8 +405,11 @@ func marshalGLConfigCaveat(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = GLConfigCaveat(0) -func (e GLConfigCaveat) InitGoValue(v *gobject.Value) { - v.Init(TypeGLConfigCaveat) +func (e GLConfigCaveat) GoValueType() gobject.Type { + return TypeGLConfigCaveat +} + +func (e GLConfigCaveat) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -479,8 +487,11 @@ func marshalGLContextError(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = GLContextError(0) -func (e GLContextError) InitGoValue(v *gobject.Value) { - v.Init(TypeGLContextError) +func (e GLContextError) GoValueType() gobject.Type { + return TypeGLContextError +} + +func (e GLContextError) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -607,8 +618,11 @@ func marshalGLFormat(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = GLFormat(0) -func (e GLFormat) InitGoValue(v *gobject.Value) { - v.Init(TypeGLFormat) +func (e GLFormat) GoValueType() gobject.Type { + return TypeGLFormat +} + +func (e GLFormat) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -811,8 +825,11 @@ func marshalGLQueryType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = GLQueryType(0) -func (e GLQueryType) InitGoValue(v *gobject.Value) { - v.Init(TypeGLQueryType) +func (e GLQueryType) GoValueType() gobject.Type { + return TypeGLQueryType +} + +func (e GLQueryType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -851,8 +868,11 @@ func marshalGLSLError(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = GLSLError(0) -func (e GLSLError) InitGoValue(v *gobject.Value) { - v.Init(TypeGLSLError) +func (e GLSLError) GoValueType() gobject.Type { + return TypeGLSLError +} + +func (e GLSLError) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -964,8 +984,11 @@ func marshalGLSLVersion(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = GLSLVersion(0) -func (e GLSLVersion) InitGoValue(v *gobject.Value) { - v.Init(TypeGLSLVersion) +func (e GLSLVersion) GoValueType() gobject.Type { + return TypeGLSLVersion +} + +func (e GLSLVersion) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1142,8 +1165,11 @@ func marshalGLStereoDownmix(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = GLStereoDownmix(0) -func (e GLStereoDownmix) InitGoValue(v *gobject.Value) { - v.Init(TypeGLStereoDownmix) +func (e GLStereoDownmix) GoValueType() gobject.Type { + return TypeGLStereoDownmix +} + +func (e GLStereoDownmix) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1192,8 +1218,11 @@ func marshalGLTextureTarget(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = GLTextureTarget(0) -func (e GLTextureTarget) InitGoValue(v *gobject.Value) { - v.Init(TypeGLTextureTarget) +func (e GLTextureTarget) GoValueType() gobject.Type { + return TypeGLTextureTarget +} + +func (e GLTextureTarget) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1369,8 +1398,11 @@ func marshalGLUploadReturn(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = GLUploadReturn(0) -func (e GLUploadReturn) InitGoValue(v *gobject.Value) { - v.Init(TypeGLUploadReturn) +func (e GLUploadReturn) GoValueType() gobject.Type { + return TypeGLUploadReturn +} + +func (e GLUploadReturn) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1409,8 +1441,11 @@ func marshalGLWindowError(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = GLWindowError(0) -func (e GLWindowError) InitGoValue(v *gobject.Value) { - v.Init(TypeGLWindowError) +func (e GLWindowError) GoValueType() gobject.Type { + return TypeGLWindowError +} + +func (e GLWindowError) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1481,8 +1516,11 @@ func (g GLAPI) Has(other GLAPI) bool { var _ gobject.GoValueInitializer = GLAPI(0) -func (f GLAPI) InitGoValue(v *gobject.Value) { - v.Init(TypeGLAPI) +func (f GLAPI) GoValueType() gobject.Type { + return TypeGLAPI +} + +func (f GLAPI) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -1591,8 +1629,11 @@ func (g GLBaseMemoryTransfer) Has(other GLBaseMemoryTransfer) bool { var _ gobject.GoValueInitializer = GLBaseMemoryTransfer(0) -func (f GLBaseMemoryTransfer) InitGoValue(v *gobject.Value) { - v.Init(TypeGLBaseMemoryTransfer) +func (f GLBaseMemoryTransfer) GoValueType() gobject.Type { + return TypeGLBaseMemoryTransfer +} + +func (f GLBaseMemoryTransfer) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -1643,8 +1684,11 @@ func (g GLConfigSurfaceType) Has(other GLConfigSurfaceType) bool { var _ gobject.GoValueInitializer = GLConfigSurfaceType(0) -func (f GLConfigSurfaceType) InitGoValue(v *gobject.Value) { - v.Init(TypeGLConfigSurfaceType) +func (f GLConfigSurfaceType) GoValueType() gobject.Type { + return TypeGLConfigSurfaceType +} + +func (f GLConfigSurfaceType) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -1773,8 +1817,11 @@ func (g GLDisplayType) Has(other GLDisplayType) bool { var _ gobject.GoValueInitializer = GLDisplayType(0) -func (f GLDisplayType) InitGoValue(v *gobject.Value) { - v.Init(TypeGLDisplayType) +func (f GLDisplayType) GoValueType() gobject.Type { + return TypeGLDisplayType +} + +func (f GLDisplayType) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -1832,6 +1879,60 @@ func (f GLDisplayType) String() string { return "GLDisplayType(" + strings.Join(parts, "|") + ")" } +// GLDRMFormatFlags wraps GstGLDrmFormatFlags +type GLDRMFormatFlags C.gint + +const ( + // GLDRMFormatIncludeExternal wraps GST_GL_DRM_FORMAT_INCLUDE_EXTERNAL + // + // include external-only formats + GLDRMFormatIncludeExternal GLDRMFormatFlags = 1 + // GLDRMFormatLinearOnly wraps GST_GL_DRM_FORMAT_LINEAR_ONLY + // + // only include formats with linear modifier + GLDRMFormatLinearOnly GLDRMFormatFlags = 2 + // GLDRMFormatIncludeEmulated wraps GST_GL_DRM_FORMAT_INCLUDE_EMULATED + // + // include emulated formats + GLDRMFormatIncludeEmulated GLDRMFormatFlags = 4 +) + +func marshalGLDRMFormatFlags(p unsafe.Pointer) (any, error) { + return GLDRMFormatFlags(gobject.ValueFromNative(p).Flags()), nil +} +// Has returns true if g contains other +func (g GLDRMFormatFlags) Has(other GLDRMFormatFlags) bool { + return (g & other) == other +} + +var _ gobject.GoValueInitializer = GLDRMFormatFlags(0) + +func (f GLDRMFormatFlags) GoValueType() gobject.Type { + return TypeGLDrmFormatFlags +} + +func (f GLDRMFormatFlags) SetGoValue(v *gobject.Value) { + v.SetFlags(int(f)) +} + +func (f GLDRMFormatFlags) String() string { + if f == 0 { + return "GLDRMFormatFlags(0)" + } + + var parts []string + if (f & GLDRMFormatIncludeExternal) != 0 { + parts = append(parts, "GLDRMFormatIncludeExternal") + } + if (f & GLDRMFormatLinearOnly) != 0 { + parts = append(parts, "GLDRMFormatLinearOnly") + } + if (f & GLDRMFormatIncludeEmulated) != 0 { + parts = append(parts, "GLDRMFormatIncludeEmulated") + } + return "GLDRMFormatFlags(" + strings.Join(parts, "|") + ")" +} + // GLPlatform wraps GstGLPlatform type GLPlatform C.gint @@ -1877,8 +1978,11 @@ func (g GLPlatform) Has(other GLPlatform) bool { var _ gobject.GoValueInitializer = GLPlatform(0) -func (f GLPlatform) InitGoValue(v *gobject.Value) { - v.Init(TypeGLPlatform) +func (f GLPlatform) GoValueType() gobject.Type { + return TypeGLPlatform +} + +func (f GLPlatform) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -2002,8 +2106,11 @@ func (g GLSLProfile) Has(other GLSLProfile) bool { var _ gobject.GoValueInitializer = GLSLProfile(0) -func (f GLSLProfile) InitGoValue(v *gobject.Value) { - v.Init(TypeGLSLProfile) +func (f GLSLProfile) GoValueType() gobject.Type { + return TypeGLSLProfile +} + +func (f GLSLProfile) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -2680,13 +2787,13 @@ func GLValueSetTextureTargetFromMask(value *gobject.Value, targetMask GLTextureT // The function takes the following parameters: // // - glApi GLAPI: the #GstGLAPI -// - maj int: the major GL version -// - min int: the minor GL version +// - maj int32: the major GL version +// - min int32: the minor GL version // // The function returns the following values: // // - goret GLSLVersion -func GLVersionToGlslVersion(glApi GLAPI, maj int, min int) GLSLVersion { +func GLVersionToGlslVersion(glApi GLAPI, maj int32, min int32) GLSLVersion { var carg1 C.GstGLAPI // in, none, casted var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted @@ -2942,6 +3049,11 @@ func UnsafeGLBaseFilterFromGlibFull(c unsafe.Pointer) GLBaseFilter { return gobject.UnsafeObjectFromGlibFull(c).(GLBaseFilter) } +// UnsafeGLBaseFilterFromGlibBorrow is used to convert raw GstGLBaseFilter pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLBaseFilterFromGlibBorrow(c unsafe.Pointer) GLBaseFilter { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLBaseFilter) +} + func (g *GLBaseFilterInstance) upcastToGstGLBaseFilter() *GLBaseFilterInstance { return g } @@ -3045,7 +3157,7 @@ func UnsafeApplyGLBaseFilterOverrides[Instance GLBaseFilter](gclass unsafe.Point var outcaps *gst.Caps // in, none, converted var goret bool // return - filter = UnsafeGLBaseFilterFromGlibNone(unsafe.Pointer(carg0)).(Instance) + filter = UnsafeGLBaseFilterFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) incaps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) outcaps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg2)) @@ -3069,7 +3181,7 @@ func UnsafeApplyGLBaseFilterOverrides[Instance GLBaseFilter](gclass unsafe.Point var filter Instance // go GstGLBaseFilter subclass var goret bool // return - filter = UnsafeGLBaseFilterFromGlibNone(unsafe.Pointer(carg0)).(Instance) + filter = UnsafeGLBaseFilterFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GLStart(filter) @@ -3090,7 +3202,7 @@ func UnsafeApplyGLBaseFilterOverrides[Instance GLBaseFilter](gclass unsafe.Point func(carg0 *C.GstGLBaseFilter) { var filter Instance // go GstGLBaseFilter subclass - filter = UnsafeGLBaseFilterFromGlibNone(unsafe.Pointer(carg0)).(Instance) + filter = UnsafeGLBaseFilterFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.GLStop(filter) }, @@ -3166,6 +3278,11 @@ func UnsafeGLBaseMemoryAllocatorFromGlibFull(c unsafe.Pointer) GLBaseMemoryAlloc return gobject.UnsafeObjectFromGlibFull(c).(GLBaseMemoryAllocator) } +// UnsafeGLBaseMemoryAllocatorFromGlibBorrow is used to convert raw GstGLBaseMemoryAllocator pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLBaseMemoryAllocatorFromGlibBorrow(c unsafe.Pointer) GLBaseMemoryAllocator { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLBaseMemoryAllocator) +} + func (g *GLBaseMemoryAllocatorInstance) upcastToGstGLBaseMemoryAllocator() *GLBaseMemoryAllocatorInstance { return g } @@ -3275,6 +3392,11 @@ func UnsafeGLBaseMixerFromGlibFull(c unsafe.Pointer) GLBaseMixer { return gobject.UnsafeObjectFromGlibFull(c).(GLBaseMixer) } +// UnsafeGLBaseMixerFromGlibBorrow is used to convert raw GstGLBaseMixer pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLBaseMixerFromGlibBorrow(c unsafe.Pointer) GLBaseMixer { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLBaseMixer) +} + func (g *GLBaseMixerInstance) upcastToGstGLBaseMixer() *GLBaseMixerInstance { return g } @@ -3343,7 +3465,7 @@ func UnsafeApplyGLBaseMixerOverrides[Instance GLBaseMixer](gclass unsafe.Pointer var mix Instance // go GstGLBaseMixer subclass var goret bool // return - mix = UnsafeGLBaseMixerFromGlibNone(unsafe.Pointer(carg0)).(Instance) + mix = UnsafeGLBaseMixerFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GLStart(mix) @@ -3364,7 +3486,7 @@ func UnsafeApplyGLBaseMixerOverrides[Instance GLBaseMixer](gclass unsafe.Pointer func(carg0 *C.GstGLBaseMixer) { var mix Instance // go GstGLBaseMixer subclass - mix = UnsafeGLBaseMixerFromGlibNone(unsafe.Pointer(carg0)).(Instance) + mix = UnsafeGLBaseMixerFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.GLStop(mix) }, @@ -3442,6 +3564,11 @@ func UnsafeGLBaseMixerPadFromGlibFull(c unsafe.Pointer) GLBaseMixerPad { return gobject.UnsafeObjectFromGlibFull(c).(GLBaseMixerPad) } +// UnsafeGLBaseMixerPadFromGlibBorrow is used to convert raw GstGLBaseMixerPad pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLBaseMixerPadFromGlibBorrow(c unsafe.Pointer) GLBaseMixerPad { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLBaseMixerPad) +} + func (g *GLBaseMixerPadInstance) upcastToGstGLBaseMixerPad() *GLBaseMixerPadInstance { return g } @@ -3545,6 +3672,11 @@ func UnsafeGLBaseSrcFromGlibFull(c unsafe.Pointer) GLBaseSrc { return gobject.UnsafeObjectFromGlibFull(c).(GLBaseSrc) } +// UnsafeGLBaseSrcFromGlibBorrow is used to convert raw GstGLBaseSrc pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLBaseSrcFromGlibBorrow(c unsafe.Pointer) GLBaseSrc { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLBaseSrc) +} + func (g *GLBaseSrcInstance) upcastToGstGLBaseSrc() *GLBaseSrcInstance { return g } @@ -3600,7 +3732,7 @@ func UnsafeApplyGLBaseSrcOverrides[Instance GLBaseSrc](gclass unsafe.Pointer, ov var mem *GLMemory // in, none, converted var goret bool // return - src = UnsafeGLBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeGLBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) mem = UnsafeGLMemoryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.FillGLMemory(src, mem) @@ -3623,7 +3755,7 @@ func UnsafeApplyGLBaseSrcOverrides[Instance GLBaseSrc](gclass unsafe.Pointer, ov var src Instance // go GstGLBaseSrc subclass var goret bool // return - src = UnsafeGLBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeGLBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GLStart(src) @@ -3644,7 +3776,7 @@ func UnsafeApplyGLBaseSrcOverrides[Instance GLBaseSrc](gclass unsafe.Pointer, ov func(carg0 *C.GstGLBaseSrc) { var src Instance // go GstGLBaseSrc subclass - src = UnsafeGLBaseSrcFromGlibNone(unsafe.Pointer(carg0)).(Instance) + src = UnsafeGLBaseSrcFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.GLStop(src) }, @@ -3722,6 +3854,11 @@ func UnsafeGLBufferAllocatorFromGlibFull(c unsafe.Pointer) GLBufferAllocator { return gobject.UnsafeObjectFromGlibFull(c).(GLBufferAllocator) } +// UnsafeGLBufferAllocatorFromGlibBorrow is used to convert raw GstGLBufferAllocator pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLBufferAllocatorFromGlibBorrow(c unsafe.Pointer) GLBufferAllocator { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLBufferAllocator) +} + func (g *GLBufferAllocatorInstance) upcastToGstGLBufferAllocator() *GLBufferAllocatorInstance { return g } @@ -3837,6 +3974,11 @@ func UnsafeGLBufferPoolFromGlibFull(c unsafe.Pointer) GLBufferPool { return gobject.UnsafeObjectFromGlibFull(c).(GLBufferPool) } +// UnsafeGLBufferPoolFromGlibBorrow is used to convert raw GstGLBufferPool pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLBufferPoolFromGlibBorrow(c unsafe.Pointer) GLBufferPool { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLBufferPool) +} + func (g *GLBufferPoolInstance) upcastToGstGLBufferPool() *GLBufferPoolInstance { return g } @@ -4031,6 +4173,11 @@ func UnsafeGLColorConvertFromGlibFull(c unsafe.Pointer) GLColorConvert { return gobject.UnsafeObjectFromGlibFull(c).(GLColorConvert) } +// UnsafeGLColorConvertFromGlibBorrow is used to convert raw GstGLColorConvert pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLColorConvertFromGlibBorrow(c unsafe.Pointer) GLColorConvert { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLColorConvert) +} + func (g *GLColorConvertInstance) upcastToGstGLColorConvert() *GLColorConvertInstance { return g } @@ -4443,13 +4590,13 @@ type GLContext interface { // The function takes the following parameters: // // - api GLAPI: api type required - // - maj int: major version required - // - min int: minor version required + // - maj int32: major version required + // - min int32: minor version required // // The function returns the following values: // // - goret bool - CheckGLVersion(GLAPI, int, int) bool + CheckGLVersion(GLAPI, int32, int32) bool // ClearFramebuffer wraps gst_gl_context_clear_framebuffer // // Unbind the current framebuffer @@ -4550,23 +4697,23 @@ type GLContext interface { // // The function returns the following values: // - // - major int: return for the major version - // - minor int: return for the minor version + // - major int32: return for the major version + // - minor int32: return for the minor version // // Get the version of the OpenGL platform (GLX, EGL, etc) used. Only valid // after a call to gst_gl_context_create(). - GetGLPlatformVersion() (int, int) + GetGLPlatformVersion() (int32, int32) // GetGLVersion wraps gst_gl_context_get_gl_version // // The function returns the following values: // - // - maj int: resulting major version - // - min int: resulting minor version + // - maj int32: resulting major version + // - min int32: resulting minor version // // Returns the OpenGL version implemented by @context. See // gst_gl_context_get_gl_api() for retrieving the OpenGL api implemented by // @context. - GetGLVersion() (int, int) + GetGLVersion() (int32, int32) // GetWindow wraps gst_gl_context_get_window // // The function returns the following values: @@ -4689,6 +4836,11 @@ func UnsafeGLContextFromGlibFull(c unsafe.Pointer) GLContext { return gobject.UnsafeObjectFromGlibFull(c).(GLContext) } +// UnsafeGLContextFromGlibBorrow is used to convert raw GstGLContext pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLContextFromGlibBorrow(c unsafe.Pointer) GLContext { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLContext) +} + func (g *GLContextInstance) upcastToGstGLContext() *GLContextInstance { return g } @@ -4931,13 +5083,13 @@ func (_context *GLContextInstance) CheckFramebufferStatus(fboTarget uint) bool { // The function takes the following parameters: // // - api GLAPI: api type required -// - maj int: major version required -// - min int: minor version required +// - maj int32: major version required +// - min int32: minor version required // // The function returns the following values: // // - goret bool -func (_context *GLContextInstance) CheckGLVersion(api GLAPI, maj int, min int) bool { +func (_context *GLContextInstance) CheckGLVersion(api GLAPI, maj int32, min int32) bool { var carg0 *C.GstGLContext // in, none, converted var carg1 C.GstGLAPI // in, none, casted var carg2 C.gint // in, none, casted @@ -5199,12 +5351,12 @@ func (_context *GLContextInstance) GetGLPlatform() GLPlatform { // // The function returns the following values: // -// - major int: return for the major version -// - minor int: return for the minor version +// - major int32: return for the major version +// - minor int32: return for the minor version // // Get the version of the OpenGL platform (GLX, EGL, etc) used. Only valid // after a call to gst_gl_context_create(). -func (_context *GLContextInstance) GetGLPlatformVersion() (int, int) { +func (_context *GLContextInstance) GetGLPlatformVersion() (int32, int32) { var carg0 *C.GstGLContext // in, none, converted var carg1 C.gint // out, full, casted var carg2 C.gint // out, full, casted @@ -5214,11 +5366,11 @@ func (_context *GLContextInstance) GetGLPlatformVersion() (int, int) { C.gst_gl_context_get_gl_platform_version(carg0, &carg1, &carg2) runtime.KeepAlive(_context) - var major int - var minor int + var major int32 + var minor int32 - major = int(carg1) - minor = int(carg2) + major = int32(carg1) + minor = int32(carg2) return major, minor } @@ -5227,13 +5379,13 @@ func (_context *GLContextInstance) GetGLPlatformVersion() (int, int) { // // The function returns the following values: // -// - maj int: resulting major version -// - min int: resulting minor version +// - maj int32: resulting major version +// - min int32: resulting minor version // // Returns the OpenGL version implemented by @context. See // gst_gl_context_get_gl_api() for retrieving the OpenGL api implemented by // @context. -func (_context *GLContextInstance) GetGLVersion() (int, int) { +func (_context *GLContextInstance) GetGLVersion() (int32, int32) { var carg0 *C.GstGLContext // in, none, converted var carg1 C.gint // out, full, casted var carg2 C.gint // out, full, casted @@ -5243,11 +5395,11 @@ func (_context *GLContextInstance) GetGLVersion() (int, int) { C.gst_gl_context_get_gl_version(carg0, &carg1, &carg2) runtime.KeepAlive(_context) - var maj int - var min int + var maj int32 + var min int32 - maj = int(carg1) - min = int(carg2) + maj = int32(carg1) + min = int32(carg2) return maj, min } @@ -5573,9 +5725,9 @@ type GLContextOverrides[Instance GLContext] struct { // GetGLPlatformVersion allows you to override the implementation of the virtual method get_gl_platform_version. // The function returns the following values: // - // - major int: return for the major version - // - minor int: return for the minor version - GetGLPlatformVersion func(Instance) (int, int) + // - major int32: return for the major version + // - minor int32: return for the minor version + GetGLPlatformVersion func(Instance) (int32, int32) // RequestConfig allows you to override the implementation of the virtual method request_config. // The function takes the following parameters: // @@ -5607,7 +5759,7 @@ func UnsafeApplyGLContextOverrides[Instance GLContext](gclass unsafe.Pointer, ov var activate bool // in var goret bool // return - _context = UnsafeGLContextFromGlibNone(unsafe.Pointer(carg0)).(Instance) + _context = UnsafeGLContextFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != 0 { activate = true } @@ -5633,7 +5785,7 @@ func UnsafeApplyGLContextOverrides[Instance GLContext](gclass unsafe.Pointer, ov var feature string // in, none, string var goret bool // return - _context = UnsafeGLContextFromGlibNone(unsafe.Pointer(carg0)).(Instance) + _context = UnsafeGLContextFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) feature = C.GoString((*C.char)(unsafe.Pointer(carg1))) goret = overrides.CheckFeature(_context, feature) @@ -5657,7 +5809,7 @@ func UnsafeApplyGLContextOverrides[Instance GLContext](gclass unsafe.Pointer, ov var goret bool // return var _goerr error // out, full, converted - _context = UnsafeGLContextFromGlibNone(unsafe.Pointer(carg0)).(Instance) + _context = UnsafeGLContextFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret, _goerr = overrides.ChooseFormat(_context) @@ -5683,7 +5835,7 @@ func UnsafeApplyGLContextOverrides[Instance GLContext](gclass unsafe.Pointer, ov var goret bool // return var _goerr error // out, full, converted - _context = UnsafeGLContextFromGlibNone(unsafe.Pointer(carg0)).(Instance) + _context = UnsafeGLContextFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) glApi = GLAPI(carg1) otherContext = UnsafeGLContextFromGlibNone(unsafe.Pointer(carg2)) @@ -5707,7 +5859,7 @@ func UnsafeApplyGLContextOverrides[Instance GLContext](gclass unsafe.Pointer, ov func(carg0 *C.GstGLContext) { var _context Instance // go GstGLContext subclass - _context = UnsafeGLContextFromGlibNone(unsafe.Pointer(carg0)).(Instance) + _context = UnsafeGLContextFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.DestroyContext(_context) }, @@ -5723,7 +5875,7 @@ func UnsafeApplyGLContextOverrides[Instance GLContext](gclass unsafe.Pointer, ov var _context Instance // go GstGLContext subclass var goret *gst.Structure // return, full, converted, nullable - _context = UnsafeGLContextFromGlibNone(unsafe.Pointer(carg0)).(Instance) + _context = UnsafeGLContextFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GetConfig(_context) @@ -5745,7 +5897,7 @@ func UnsafeApplyGLContextOverrides[Instance GLContext](gclass unsafe.Pointer, ov var _context Instance // go GstGLContext subclass var goret GLAPI // return, none, casted - _context = UnsafeGLContextFromGlibNone(unsafe.Pointer(carg0)).(Instance) + _context = UnsafeGLContextFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GetGLApi(_context) @@ -5765,7 +5917,7 @@ func UnsafeApplyGLContextOverrides[Instance GLContext](gclass unsafe.Pointer, ov var _context Instance // go GstGLContext subclass var goret GLPlatform // return, none, casted - _context = UnsafeGLContextFromGlibNone(unsafe.Pointer(carg0)).(Instance) + _context = UnsafeGLContextFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GetGLPlatform(_context) @@ -5783,10 +5935,10 @@ func UnsafeApplyGLContextOverrides[Instance GLContext](gclass unsafe.Pointer, ov "_gotk4_gstgl1_GLContext_get_gl_platform_version", func(carg0 *C.GstGLContext, carg1 *C.gint, carg2 *C.gint) { var _context Instance // go GstGLContext subclass - var major int // out, full, casted - var minor int // out, full, casted + var major int32 // out, full, casted + var minor int32 // out, full, casted - _context = UnsafeGLContextFromGlibNone(unsafe.Pointer(carg0)).(Instance) + _context = UnsafeGLContextFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) major, minor = overrides.GetGLPlatformVersion(_context) @@ -5806,7 +5958,7 @@ func UnsafeApplyGLContextOverrides[Instance GLContext](gclass unsafe.Pointer, ov var glConfig *gst.Structure // in, full, converted, nullable var goret bool // return - _context = UnsafeGLContextFromGlibNone(unsafe.Pointer(carg0)).(Instance) + _context = UnsafeGLContextFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != nil { glConfig = gst.UnsafeStructureFromGlibFull(unsafe.Pointer(carg1)) } @@ -5830,7 +5982,7 @@ func UnsafeApplyGLContextOverrides[Instance GLContext](gclass unsafe.Pointer, ov func(carg0 *C.GstGLContext) { var _context Instance // go GstGLContext subclass - _context = UnsafeGLContextFromGlibNone(unsafe.Pointer(carg0)).(Instance) + _context = UnsafeGLContextFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.SwapBuffers(_context) }, @@ -6009,6 +6161,11 @@ func UnsafeGLDisplayFromGlibFull(c unsafe.Pointer) GLDisplay { return gobject.UnsafeObjectFromGlibFull(c).(GLDisplay) } +// UnsafeGLDisplayFromGlibBorrow is used to convert raw GstGLDisplay pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLDisplayFromGlibBorrow(c unsafe.Pointer) GLDisplay { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLDisplay) +} + func (g *GLDisplayInstance) upcastToGstGLDisplay() *GLDisplayInstance { return g } @@ -6343,7 +6500,7 @@ func UnsafeApplyGLDisplayOverrides[Instance GLDisplay](gclass unsafe.Pointer, ov var display Instance // go GstGLDisplay subclass var goret GLWindow // return, full, converted, nullable - display = UnsafeGLDisplayFromGlibNone(unsafe.Pointer(carg0)).(Instance) + display = UnsafeGLDisplayFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.CreateWindow(display) @@ -6477,6 +6634,11 @@ func UnsafeGLFilterFromGlibFull(c unsafe.Pointer) GLFilter { return gobject.UnsafeObjectFromGlibFull(c).(GLFilter) } +// UnsafeGLFilterFromGlibBorrow is used to convert raw GstGLFilter pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLFilterFromGlibBorrow(c unsafe.Pointer) GLFilter { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLFilter) +} + func (g *GLFilterInstance) upcastToGstGLFilter() *GLFilterInstance { return g } @@ -6700,7 +6862,7 @@ func UnsafeApplyGLFilterOverrides[Instance GLFilter](gclass unsafe.Pointer, over var outbuf *gst.Buffer // in, none, converted var goret bool // return - filter = UnsafeGLFilterFromGlibNone(unsafe.Pointer(carg0)).(Instance) + filter = UnsafeGLFilterFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) inbuf = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) outbuf = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg2)) @@ -6726,7 +6888,7 @@ func UnsafeApplyGLFilterOverrides[Instance GLFilter](gclass unsafe.Pointer, over var output *GLMemory // in, none, converted var goret bool // return - filter = UnsafeGLFilterFromGlibNone(unsafe.Pointer(carg0)).(Instance) + filter = UnsafeGLFilterFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) input = UnsafeGLMemoryFromGlibNone(unsafe.Pointer(carg1)) output = UnsafeGLMemoryFromGlibNone(unsafe.Pointer(carg2)) @@ -6750,7 +6912,7 @@ func UnsafeApplyGLFilterOverrides[Instance GLFilter](gclass unsafe.Pointer, over var filter Instance // go GstGLFilter subclass var goret bool // return - filter = UnsafeGLFilterFromGlibNone(unsafe.Pointer(carg0)).(Instance) + filter = UnsafeGLFilterFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.InitFbo(filter) @@ -6774,7 +6936,7 @@ func UnsafeApplyGLFilterOverrides[Instance GLFilter](gclass unsafe.Pointer, over var outcaps *gst.Caps // in, none, converted var goret bool // return - filter = UnsafeGLFilterFromGlibNone(unsafe.Pointer(carg0)).(Instance) + filter = UnsafeGLFilterFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) incaps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) outcaps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg2)) @@ -6801,7 +6963,7 @@ func UnsafeApplyGLFilterOverrides[Instance GLFilter](gclass unsafe.Pointer, over var filterCaps *gst.Caps // in, none, converted var goret *gst.Caps // return, full, converted - filter = UnsafeGLFilterFromGlibNone(unsafe.Pointer(carg0)).(Instance) + filter = UnsafeGLFilterFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) direction = gst.PadDirection(carg1) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg2)) filterCaps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg3)) @@ -6927,6 +7089,11 @@ func UnsafeGLFramebufferFromGlibFull(c unsafe.Pointer) GLFramebuffer { return gobject.UnsafeObjectFromGlibFull(c).(GLFramebuffer) } +// UnsafeGLFramebufferFromGlibBorrow is used to convert raw GstGLFramebuffer pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLFramebufferFromGlibBorrow(c unsafe.Pointer) GLFramebuffer { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLFramebuffer) +} + func (g *GLFramebufferInstance) upcastToGstGLFramebuffer() *GLFramebufferInstance { return g } @@ -7179,6 +7346,11 @@ func UnsafeGLMemoryAllocatorFromGlibFull(c unsafe.Pointer) GLMemoryAllocator { return gobject.UnsafeObjectFromGlibFull(c).(GLMemoryAllocator) } +// UnsafeGLMemoryAllocatorFromGlibBorrow is used to convert raw GstGLMemoryAllocator pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLMemoryAllocatorFromGlibBorrow(c unsafe.Pointer) GLMemoryAllocator { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLMemoryAllocator) +} + func (g *GLMemoryAllocatorInstance) upcastToGstGLMemoryAllocator() *GLMemoryAllocatorInstance { return g } @@ -7304,6 +7476,11 @@ func UnsafeGLMemoryPBOAllocatorFromGlibFull(c unsafe.Pointer) GLMemoryPBOAllocat return gobject.UnsafeObjectFromGlibFull(c).(GLMemoryPBOAllocator) } +// UnsafeGLMemoryPBOAllocatorFromGlibBorrow is used to convert raw GstGLMemoryPBOAllocator pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLMemoryPBOAllocatorFromGlibBorrow(c unsafe.Pointer) GLMemoryPBOAllocator { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLMemoryPBOAllocator) +} + func (g *GLMemoryPBOAllocatorInstance) upcastToGstGLMemoryPBOAllocator() *GLMemoryPBOAllocatorInstance { return g } @@ -7427,6 +7604,11 @@ func UnsafeGLMixerFromGlibFull(c unsafe.Pointer) GLMixer { return gobject.UnsafeObjectFromGlibFull(c).(GLMixer) } +// UnsafeGLMixerFromGlibBorrow is used to convert raw GstGLMixer pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLMixerFromGlibBorrow(c unsafe.Pointer) GLMixer { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLMixer) +} + func (g *GLMixerInstance) upcastToGstGLMixer() *GLMixerInstance { return g } @@ -7539,7 +7721,7 @@ func UnsafeApplyGLMixerOverrides[Instance GLMixer](gclass unsafe.Pointer, overri var outbuf *gst.Buffer // in, none, converted var goret bool // return - mix = UnsafeGLMixerFromGlibNone(unsafe.Pointer(carg0)).(Instance) + mix = UnsafeGLMixerFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) outbuf = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.ProcessBuffers(mix, outbuf) @@ -7563,7 +7745,7 @@ func UnsafeApplyGLMixerOverrides[Instance GLMixer](gclass unsafe.Pointer, overri var outTex *GLMemory // in, none, converted var goret bool // return - mix = UnsafeGLMixerFromGlibNone(unsafe.Pointer(carg0)).(Instance) + mix = UnsafeGLMixerFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) outTex = UnsafeGLMemoryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.ProcessTextures(mix, outTex) @@ -7650,6 +7832,11 @@ func UnsafeGLMixerPadFromGlibFull(c unsafe.Pointer) GLMixerPad { return gobject.UnsafeObjectFromGlibFull(c).(GLMixerPad) } +// UnsafeGLMixerPadFromGlibBorrow is used to convert raw GstGLMixerPad pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLMixerPadFromGlibBorrow(c unsafe.Pointer) GLMixerPad { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLMixerPad) +} + func (g *GLMixerPadInstance) upcastToGstGLMixerPad() *GLMixerPadInstance { return g } @@ -7755,6 +7942,11 @@ func UnsafeGLOverlayCompositorFromGlibFull(c unsafe.Pointer) GLOverlayCompositor return gobject.UnsafeObjectFromGlibFull(c).(GLOverlayCompositor) } +// UnsafeGLOverlayCompositorFromGlibBorrow is used to convert raw GstGLOverlayCompositor pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLOverlayCompositorFromGlibBorrow(c unsafe.Pointer) GLOverlayCompositor { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLOverlayCompositor) +} + func (g *GLOverlayCompositorInstance) upcastToGstGLOverlayCompositor() *GLOverlayCompositorInstance { return g } @@ -7940,6 +8132,11 @@ func UnsafeGLRenderbufferAllocatorFromGlibFull(c unsafe.Pointer) GLRenderbufferA return gobject.UnsafeObjectFromGlibFull(c).(GLRenderbufferAllocator) } +// UnsafeGLRenderbufferAllocatorFromGlibBorrow is used to convert raw GstGLRenderbufferAllocator pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLRenderbufferAllocatorFromGlibBorrow(c unsafe.Pointer) GLRenderbufferAllocator { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLRenderbufferAllocator) +} + func (g *GLRenderbufferAllocatorInstance) upcastToGstGLRenderbufferAllocator() *GLRenderbufferAllocatorInstance { return g } @@ -8080,6 +8277,11 @@ func UnsafeGLSLStageFromGlibFull(c unsafe.Pointer) GLSLStage { return gobject.UnsafeObjectFromGlibFull(c).(GLSLStage) } +// UnsafeGLSLStageFromGlibBorrow is used to convert raw GstGLSLStage pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLSLStageFromGlibBorrow(c unsafe.Pointer) GLSLStage { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLSLStage) +} + func (g *GLSLStageInstance) upcastToGstGLSLStage() *GLSLStageInstance { return g } @@ -8566,14 +8768,14 @@ type GLShader interface { // // The function returns the following values: // - // - goret int - GetAttributeLocation(string) int + // - goret int32 + GetAttributeLocation(string) int32 // GetProgramHandle wraps gst_gl_shader_get_program_handle // // The function returns the following values: // - // - goret int - GetProgramHandle() int + // - goret int32 + GetProgramHandle() int32 // IsLinked wraps gst_gl_shader_is_linked // // The function returns the following values: @@ -8628,19 +8830,19 @@ type GLShader interface { // The function takes the following parameters: // // - name string: name of the uniform - // - value int: value to set + // - value int32: value to set // // Perform `glUniform1i()` for @name on @shader - SetUniform1I(string, int) + SetUniform1I(string, int32) // SetUniform1Iv wraps gst_gl_shader_set_uniform_1iv // // The function takes the following parameters: // // - name string: name of the uniform - // - value []int: values to set + // - value []int32: values to set // // Perform `glUniform1iv()` for @name on @shader - SetUniform1Iv(string, []int) + SetUniform1Iv(string, []int32) // SetUniform2F wraps gst_gl_shader_set_uniform_2f // // The function takes the following parameters: @@ -8665,20 +8867,20 @@ type GLShader interface { // The function takes the following parameters: // // - name string: name of the uniform - // - v0 int: first value to set - // - v1 int: second value to set + // - v0 int32: first value to set + // - v1 int32: second value to set // // Perform `glUniform2i()` for @name on @shader - SetUniform2I(string, int, int) + SetUniform2I(string, int32, int32) // SetUniform2Iv wraps gst_gl_shader_set_uniform_2iv // // The function takes the following parameters: // // - name string: name of the uniform - // - value []int: values to set + // - value []int32: values to set // // Perform `glUniform2iv()` for @name on @shader - SetUniform2Iv(string, []int) + SetUniform2Iv(string, []int32) // SetUniform3F wraps gst_gl_shader_set_uniform_3f // // The function takes the following parameters: @@ -8704,21 +8906,21 @@ type GLShader interface { // The function takes the following parameters: // // - name string: name of the uniform - // - v0 int: first value to set - // - v1 int: second value to set - // - v2 int: third value to set + // - v0 int32: first value to set + // - v1 int32: second value to set + // - v2 int32: third value to set // // Perform `glUniform3i()` for @name on @shader - SetUniform3I(string, int, int, int) + SetUniform3I(string, int32, int32, int32) // SetUniform3Iv wraps gst_gl_shader_set_uniform_3iv // // The function takes the following parameters: // // - name string: name of the uniform - // - value []int: values to set + // - value []int32: values to set // // Perform `glUniform3iv()` for @name on @shader - SetUniform3Iv(string, []int) + SetUniform3Iv(string, []int32) // SetUniform4F wraps gst_gl_shader_set_uniform_4f // // The function takes the following parameters: @@ -8745,121 +8947,121 @@ type GLShader interface { // The function takes the following parameters: // // - name string: name of the uniform - // - v0 int: first value to set - // - v1 int: second value to set - // - v2 int: third value to set - // - v3 int: fourth value to set + // - v0 int32: first value to set + // - v1 int32: second value to set + // - v2 int32: third value to set + // - v3 int32: fourth value to set // // Perform `glUniform4i()` for @name on @shader - SetUniform4I(string, int, int, int, int) + SetUniform4I(string, int32, int32, int32, int32) // SetUniform4Iv wraps gst_gl_shader_set_uniform_4iv // // The function takes the following parameters: // // - name string: name of the uniform - // - value []int: values to set + // - value []int32: values to set // // Perform `glUniform4iv()` for @name on @shader - SetUniform4Iv(string, []int) + SetUniform4Iv(string, []int32) // SetUniformMatrix2Fv wraps gst_gl_shader_set_uniform_matrix_2fv // // The function takes the following parameters: // // - name string: name of the uniform - // - count int: number of 2x2 matrices to set + // - count int32: number of 2x2 matrices to set // - transpose bool: transpose the matrix // - value *float32: matrix to set // // Perform `glUniformMatrix2fv()` for @name on @shader - SetUniformMatrix2Fv(string, int, bool, *float32) + SetUniformMatrix2Fv(string, int32, bool, *float32) // SetUniformMatrix2X3Fv wraps gst_gl_shader_set_uniform_matrix_2x3fv // // The function takes the following parameters: // // - name string: name of the uniform - // - count int: number of 2x3 matrices to set + // - count int32: number of 2x3 matrices to set // - transpose bool: transpose the matrix // - value *float32: values to set // // Perform `glUniformMatrix2x3fv()` for @name on @shader - SetUniformMatrix2X3Fv(string, int, bool, *float32) + SetUniformMatrix2X3Fv(string, int32, bool, *float32) // SetUniformMatrix2X4Fv wraps gst_gl_shader_set_uniform_matrix_2x4fv // // The function takes the following parameters: // // - name string: name of the uniform - // - count int: number of 2x4 matrices to set + // - count int32: number of 2x4 matrices to set // - transpose bool: transpose the matrix // - value *float32: values to set // // Perform `glUniformMatrix2x4fv()` for @name on @shader - SetUniformMatrix2X4Fv(string, int, bool, *float32) + SetUniformMatrix2X4Fv(string, int32, bool, *float32) // SetUniformMatrix3Fv wraps gst_gl_shader_set_uniform_matrix_3fv // // The function takes the following parameters: // // - name string: name of the uniform - // - count int: number of 3x3 matrices to set + // - count int32: number of 3x3 matrices to set // - transpose bool: transpose the matrix // - value *float32: values to set // // Perform `glUniformMatrix3fv()` for @name on @shader - SetUniformMatrix3Fv(string, int, bool, *float32) + SetUniformMatrix3Fv(string, int32, bool, *float32) // SetUniformMatrix3X2Fv wraps gst_gl_shader_set_uniform_matrix_3x2fv // // The function takes the following parameters: // // - name string: name of the uniform - // - count int: number of 3x2 matrices to set + // - count int32: number of 3x2 matrices to set // - transpose bool: transpose the matrix // - value *float32: values to set // // Perform `glUniformMatrix3x2fv()` for @name on @shader - SetUniformMatrix3X2Fv(string, int, bool, *float32) + SetUniformMatrix3X2Fv(string, int32, bool, *float32) // SetUniformMatrix3X4Fv wraps gst_gl_shader_set_uniform_matrix_3x4fv // // The function takes the following parameters: // // - name string: name of the uniform - // - count int: number of 3x4 matrices to set + // - count int32: number of 3x4 matrices to set // - transpose bool: transpose the matrix // - value *float32: values to set // // Perform `glUniformMatrix3x4fv()` for @name on @shader - SetUniformMatrix3X4Fv(string, int, bool, *float32) + SetUniformMatrix3X4Fv(string, int32, bool, *float32) // SetUniformMatrix4Fv wraps gst_gl_shader_set_uniform_matrix_4fv // // The function takes the following parameters: // // - name string: name of the uniform - // - count int: number of 4x4 matrices to set + // - count int32: number of 4x4 matrices to set // - transpose bool: transpose the matrix // - value *float32: values to set // // Perform `glUniformMatrix4fv()` for @name on @shader - SetUniformMatrix4Fv(string, int, bool, *float32) + SetUniformMatrix4Fv(string, int32, bool, *float32) // SetUniformMatrix4X2Fv wraps gst_gl_shader_set_uniform_matrix_4x2fv // // The function takes the following parameters: // // - name string: name of the uniform - // - count int: number of 4x2 matrices to set + // - count int32: number of 4x2 matrices to set // - transpose bool: transpose the matrix // - value *float32: values to set // // Perform `glUniformMatrix4x2fv()` for @name on @shader - SetUniformMatrix4X2Fv(string, int, bool, *float32) + SetUniformMatrix4X2Fv(string, int32, bool, *float32) // SetUniformMatrix4X3Fv wraps gst_gl_shader_set_uniform_matrix_4x3fv // // The function takes the following parameters: // // - name string: name of the uniform - // - count int: number of 4x3 matrices to set + // - count int32: number of 4x3 matrices to set // - transpose bool: transpose the matrix // - value *float32: values to set // // Perform `glUniformMatrix4x3fv()` for @name on @shader - SetUniformMatrix4X3Fv(string, int, bool, *float32) + SetUniformMatrix4X3Fv(string, int32, bool, *float32) // Use wraps gst_gl_shader_use // // Mark's @shader as being used for the next GL draw command. @@ -8892,6 +9094,11 @@ func UnsafeGLShaderFromGlibFull(c unsafe.Pointer) GLShader { return gobject.UnsafeObjectFromGlibFull(c).(GLShader) } +// UnsafeGLShaderFromGlibBorrow is used to convert raw GstGLShader pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLShaderFromGlibBorrow(c unsafe.Pointer) GLShader { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLShader) +} + func (g *GLShaderInstance) upcastToGstGLShader() *GLShaderInstance { return g } @@ -9287,8 +9494,8 @@ func (shader *GLShaderInstance) DetachUnlocked(stage GLSLStage) { // // The function returns the following values: // -// - goret int -func (shader *GLShaderInstance) GetAttributeLocation(name string) int { +// - goret int32 +func (shader *GLShaderInstance) GetAttributeLocation(name string) int32 { var carg0 *C.GstGLShader // in, none, converted var carg1 *C.gchar // in, none, string var cret C.gint // return, none, casted @@ -9301,9 +9508,9 @@ func (shader *GLShaderInstance) GetAttributeLocation(name string) int { runtime.KeepAlive(shader) runtime.KeepAlive(name) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -9312,8 +9519,8 @@ func (shader *GLShaderInstance) GetAttributeLocation(name string) int { // // The function returns the following values: // -// - goret int -func (shader *GLShaderInstance) GetProgramHandle() int { +// - goret int32 +func (shader *GLShaderInstance) GetProgramHandle() int32 { var carg0 *C.GstGLShader // in, none, converted var cret C.int // return, none, casted, casted C.gint @@ -9322,9 +9529,9 @@ func (shader *GLShaderInstance) GetProgramHandle() int { cret = C.gst_gl_shader_get_program_handle(carg0) runtime.KeepAlive(shader) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -9472,10 +9679,10 @@ func (shader *GLShaderInstance) SetUniform1Fv(name string, value []float32) { // The function takes the following parameters: // // - name string: name of the uniform -// - value int: value to set +// - value int32: value to set // // Perform `glUniform1i()` for @name on @shader -func (shader *GLShaderInstance) SetUniform1I(name string, value int) { +func (shader *GLShaderInstance) SetUniform1I(name string, value int32) { var carg0 *C.GstGLShader // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted @@ -9496,10 +9703,10 @@ func (shader *GLShaderInstance) SetUniform1I(name string, value int) { // The function takes the following parameters: // // - name string: name of the uniform -// - value []int: values to set +// - value []int32: values to set // // Perform `glUniform1iv()` for @name on @shader -func (shader *GLShaderInstance) SetUniform1Iv(name string, value []int) { +func (shader *GLShaderInstance) SetUniform1Iv(name string, value []int32) { var carg0 *C.GstGLShader // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.guint // implicit @@ -9511,7 +9718,7 @@ func (shader *GLShaderInstance) SetUniform1Iv(name string, value []int) { _ = value _ = carg3 _ = carg2 - panic("unimplemented conversion of []int (const gint*)") + panic("unimplemented conversion of []int32 (const gint*)") C.gst_gl_shader_set_uniform_1iv(carg0, carg1, carg2, carg3) runtime.KeepAlive(shader) @@ -9580,11 +9787,11 @@ func (shader *GLShaderInstance) SetUniform2Fv(name string, value []float32) { // The function takes the following parameters: // // - name string: name of the uniform -// - v0 int: first value to set -// - v1 int: second value to set +// - v0 int32: first value to set +// - v1 int32: second value to set // // Perform `glUniform2i()` for @name on @shader -func (shader *GLShaderInstance) SetUniform2I(name string, v0 int, v1 int) { +func (shader *GLShaderInstance) SetUniform2I(name string, v0 int32, v1 int32) { var carg0 *C.GstGLShader // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted @@ -9608,10 +9815,10 @@ func (shader *GLShaderInstance) SetUniform2I(name string, v0 int, v1 int) { // The function takes the following parameters: // // - name string: name of the uniform -// - value []int: values to set +// - value []int32: values to set // // Perform `glUniform2iv()` for @name on @shader -func (shader *GLShaderInstance) SetUniform2Iv(name string, value []int) { +func (shader *GLShaderInstance) SetUniform2Iv(name string, value []int32) { var carg0 *C.GstGLShader // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.guint // implicit @@ -9623,7 +9830,7 @@ func (shader *GLShaderInstance) SetUniform2Iv(name string, value []int) { _ = value _ = carg3 _ = carg2 - panic("unimplemented conversion of []int (const gint*)") + panic("unimplemented conversion of []int32 (const gint*)") C.gst_gl_shader_set_uniform_2iv(carg0, carg1, carg2, carg3) runtime.KeepAlive(shader) @@ -9696,12 +9903,12 @@ func (shader *GLShaderInstance) SetUniform3Fv(name string, value []float32) { // The function takes the following parameters: // // - name string: name of the uniform -// - v0 int: first value to set -// - v1 int: second value to set -// - v2 int: third value to set +// - v0 int32: first value to set +// - v1 int32: second value to set +// - v2 int32: third value to set // // Perform `glUniform3i()` for @name on @shader -func (shader *GLShaderInstance) SetUniform3I(name string, v0 int, v1 int, v2 int) { +func (shader *GLShaderInstance) SetUniform3I(name string, v0 int32, v1 int32, v2 int32) { var carg0 *C.GstGLShader // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted @@ -9728,10 +9935,10 @@ func (shader *GLShaderInstance) SetUniform3I(name string, v0 int, v1 int, v2 int // The function takes the following parameters: // // - name string: name of the uniform -// - value []int: values to set +// - value []int32: values to set // // Perform `glUniform3iv()` for @name on @shader -func (shader *GLShaderInstance) SetUniform3Iv(name string, value []int) { +func (shader *GLShaderInstance) SetUniform3Iv(name string, value []int32) { var carg0 *C.GstGLShader // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.guint // implicit @@ -9743,7 +9950,7 @@ func (shader *GLShaderInstance) SetUniform3Iv(name string, value []int) { _ = value _ = carg3 _ = carg2 - panic("unimplemented conversion of []int (const gint*)") + panic("unimplemented conversion of []int32 (const gint*)") C.gst_gl_shader_set_uniform_3iv(carg0, carg1, carg2, carg3) runtime.KeepAlive(shader) @@ -9820,13 +10027,13 @@ func (shader *GLShaderInstance) SetUniform4Fv(name string, value []float32) { // The function takes the following parameters: // // - name string: name of the uniform -// - v0 int: first value to set -// - v1 int: second value to set -// - v2 int: third value to set -// - v3 int: fourth value to set +// - v0 int32: first value to set +// - v1 int32: second value to set +// - v2 int32: third value to set +// - v3 int32: fourth value to set // // Perform `glUniform4i()` for @name on @shader -func (shader *GLShaderInstance) SetUniform4I(name string, v0 int, v1 int, v2 int, v3 int) { +func (shader *GLShaderInstance) SetUniform4I(name string, v0 int32, v1 int32, v2 int32, v3 int32) { var carg0 *C.GstGLShader // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted @@ -9856,10 +10063,10 @@ func (shader *GLShaderInstance) SetUniform4I(name string, v0 int, v1 int, v2 int // The function takes the following parameters: // // - name string: name of the uniform -// - value []int: values to set +// - value []int32: values to set // // Perform `glUniform4iv()` for @name on @shader -func (shader *GLShaderInstance) SetUniform4Iv(name string, value []int) { +func (shader *GLShaderInstance) SetUniform4Iv(name string, value []int32) { var carg0 *C.GstGLShader // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.guint // implicit @@ -9871,7 +10078,7 @@ func (shader *GLShaderInstance) SetUniform4Iv(name string, value []int) { _ = value _ = carg3 _ = carg2 - panic("unimplemented conversion of []int (const gint*)") + panic("unimplemented conversion of []int32 (const gint*)") C.gst_gl_shader_set_uniform_4iv(carg0, carg1, carg2, carg3) runtime.KeepAlive(shader) @@ -9884,12 +10091,12 @@ func (shader *GLShaderInstance) SetUniform4Iv(name string, value []int) { // The function takes the following parameters: // // - name string: name of the uniform -// - count int: number of 2x2 matrices to set +// - count int32: number of 2x2 matrices to set // - transpose bool: transpose the matrix // - value *float32: matrix to set // // Perform `glUniformMatrix2fv()` for @name on @shader -func (shader *GLShaderInstance) SetUniformMatrix2Fv(name string, count int, transpose bool, value *float32) { +func (shader *GLShaderInstance) SetUniformMatrix2Fv(name string, count int32, transpose bool, value *float32) { var carg0 *C.GstGLShader // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted @@ -9920,12 +10127,12 @@ func (shader *GLShaderInstance) SetUniformMatrix2Fv(name string, count int, tran // The function takes the following parameters: // // - name string: name of the uniform -// - count int: number of 2x3 matrices to set +// - count int32: number of 2x3 matrices to set // - transpose bool: transpose the matrix // - value *float32: values to set // // Perform `glUniformMatrix2x3fv()` for @name on @shader -func (shader *GLShaderInstance) SetUniformMatrix2X3Fv(name string, count int, transpose bool, value *float32) { +func (shader *GLShaderInstance) SetUniformMatrix2X3Fv(name string, count int32, transpose bool, value *float32) { var carg0 *C.GstGLShader // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted @@ -9956,12 +10163,12 @@ func (shader *GLShaderInstance) SetUniformMatrix2X3Fv(name string, count int, tr // The function takes the following parameters: // // - name string: name of the uniform -// - count int: number of 2x4 matrices to set +// - count int32: number of 2x4 matrices to set // - transpose bool: transpose the matrix // - value *float32: values to set // // Perform `glUniformMatrix2x4fv()` for @name on @shader -func (shader *GLShaderInstance) SetUniformMatrix2X4Fv(name string, count int, transpose bool, value *float32) { +func (shader *GLShaderInstance) SetUniformMatrix2X4Fv(name string, count int32, transpose bool, value *float32) { var carg0 *C.GstGLShader // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted @@ -9992,12 +10199,12 @@ func (shader *GLShaderInstance) SetUniformMatrix2X4Fv(name string, count int, tr // The function takes the following parameters: // // - name string: name of the uniform -// - count int: number of 3x3 matrices to set +// - count int32: number of 3x3 matrices to set // - transpose bool: transpose the matrix // - value *float32: values to set // // Perform `glUniformMatrix3fv()` for @name on @shader -func (shader *GLShaderInstance) SetUniformMatrix3Fv(name string, count int, transpose bool, value *float32) { +func (shader *GLShaderInstance) SetUniformMatrix3Fv(name string, count int32, transpose bool, value *float32) { var carg0 *C.GstGLShader // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted @@ -10028,12 +10235,12 @@ func (shader *GLShaderInstance) SetUniformMatrix3Fv(name string, count int, tran // The function takes the following parameters: // // - name string: name of the uniform -// - count int: number of 3x2 matrices to set +// - count int32: number of 3x2 matrices to set // - transpose bool: transpose the matrix // - value *float32: values to set // // Perform `glUniformMatrix3x2fv()` for @name on @shader -func (shader *GLShaderInstance) SetUniformMatrix3X2Fv(name string, count int, transpose bool, value *float32) { +func (shader *GLShaderInstance) SetUniformMatrix3X2Fv(name string, count int32, transpose bool, value *float32) { var carg0 *C.GstGLShader // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted @@ -10064,12 +10271,12 @@ func (shader *GLShaderInstance) SetUniformMatrix3X2Fv(name string, count int, tr // The function takes the following parameters: // // - name string: name of the uniform -// - count int: number of 3x4 matrices to set +// - count int32: number of 3x4 matrices to set // - transpose bool: transpose the matrix // - value *float32: values to set // // Perform `glUniformMatrix3x4fv()` for @name on @shader -func (shader *GLShaderInstance) SetUniformMatrix3X4Fv(name string, count int, transpose bool, value *float32) { +func (shader *GLShaderInstance) SetUniformMatrix3X4Fv(name string, count int32, transpose bool, value *float32) { var carg0 *C.GstGLShader // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted @@ -10100,12 +10307,12 @@ func (shader *GLShaderInstance) SetUniformMatrix3X4Fv(name string, count int, tr // The function takes the following parameters: // // - name string: name of the uniform -// - count int: number of 4x4 matrices to set +// - count int32: number of 4x4 matrices to set // - transpose bool: transpose the matrix // - value *float32: values to set // // Perform `glUniformMatrix4fv()` for @name on @shader -func (shader *GLShaderInstance) SetUniformMatrix4Fv(name string, count int, transpose bool, value *float32) { +func (shader *GLShaderInstance) SetUniformMatrix4Fv(name string, count int32, transpose bool, value *float32) { var carg0 *C.GstGLShader // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted @@ -10136,12 +10343,12 @@ func (shader *GLShaderInstance) SetUniformMatrix4Fv(name string, count int, tran // The function takes the following parameters: // // - name string: name of the uniform -// - count int: number of 4x2 matrices to set +// - count int32: number of 4x2 matrices to set // - transpose bool: transpose the matrix // - value *float32: values to set // // Perform `glUniformMatrix4x2fv()` for @name on @shader -func (shader *GLShaderInstance) SetUniformMatrix4X2Fv(name string, count int, transpose bool, value *float32) { +func (shader *GLShaderInstance) SetUniformMatrix4X2Fv(name string, count int32, transpose bool, value *float32) { var carg0 *C.GstGLShader // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted @@ -10172,12 +10379,12 @@ func (shader *GLShaderInstance) SetUniformMatrix4X2Fv(name string, count int, tr // The function takes the following parameters: // // - name string: name of the uniform -// - count int: number of 4x3 matrices to set +// - count int32: number of 4x3 matrices to set // - transpose bool: transpose the matrix // - value *float32: values to set // // Perform `glUniformMatrix4x3fv()` for @name on @shader -func (shader *GLShaderInstance) SetUniformMatrix4X3Fv(name string, count int, transpose bool, value *float32) { +func (shader *GLShaderInstance) SetUniformMatrix4X3Fv(name string, count int32, transpose bool, value *float32) { var carg0 *C.GstGLShader // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted @@ -10376,6 +10583,11 @@ func UnsafeGLUploadFromGlibFull(c unsafe.Pointer) GLUpload { return gobject.UnsafeObjectFromGlibFull(c).(GLUpload) } +// UnsafeGLUploadFromGlibBorrow is used to convert raw GstGLUpload pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLUploadFromGlibBorrow(c unsafe.Pointer) GLUpload { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLUpload) +} + func (g *GLUploadInstance) upcastToGstGLUpload() *GLUploadInstance { return g } @@ -10818,6 +11030,11 @@ func UnsafeGLViewConvertFromGlibFull(c unsafe.Pointer) GLViewConvert { return gobject.UnsafeObjectFromGlibFull(c).(GLViewConvert) } +// UnsafeGLViewConvertFromGlibBorrow is used to convert raw GstGLViewConvert pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLViewConvertFromGlibBorrow(c unsafe.Pointer) GLViewConvert { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLViewConvert) +} + func (g *GLViewConvertInstance) upcastToGstGLViewConvert() *GLViewConvertInstance { return g } @@ -11223,10 +11440,10 @@ type GLWindow interface { // The function takes the following parameters: // // - eventType string - // - button int + // - button int32 // - posx float64 // - posy float64 - SendMouseEvent(string, int, float64, float64) + SendMouseEvent(string, int32, float64, float64) // SendScrollEvent wraps gst_gl_window_send_scroll_event // // The function takes the following parameters: @@ -11243,20 +11460,20 @@ type GLWindow interface { // // The function takes the following parameters: // - // - width int: new preferred width - // - height int: new preferred height + // - width int32: new preferred width + // - height int32: new preferred height // // Set the preferred width and height of the window. Implementations are free // to ignore this information. - SetPreferredSize(int, int) + SetPreferredSize(int32, int32) // SetRenderRectangle wraps gst_gl_window_set_render_rectangle // // The function takes the following parameters: // - // - x int: x position - // - y int: y position - // - width int: width - // - height int: height + // - x int32: x position + // - y int32: y position + // - width int32: width + // - height int32: height // // The function returns the following values: // @@ -11264,7 +11481,7 @@ type GLWindow interface { // // Tell a @window that it should render into a specific region of the window // according to the #GstVideoOverlay interface. - SetRenderRectangle(int, int, int, int) bool + SetRenderRectangle(int32, int32, int32, int32) bool // Show wraps gst_gl_window_show // // Present the window to the screen. @@ -11276,7 +11493,7 @@ type GLWindow interface { // ConnectMouseEvent connects the provided callback to the "mouse-event" signal // // Will be emitted when a mouse event is received by the GstGLwindow. - ConnectMouseEvent(func(GLWindow, string, int, float64, float64)) gobject.SignalHandle + ConnectMouseEvent(func(GLWindow, string, int32, float64, float64)) gobject.SignalHandle // ConnectScrollEvent connects the provided callback to the "scroll-event" signal // // Will be emitted when a mouse scroll event is received by the GstGLwindow. @@ -11314,6 +11531,11 @@ func UnsafeGLWindowFromGlibFull(c unsafe.Pointer) GLWindow { return gobject.UnsafeObjectFromGlibFull(c).(GLWindow) } +// UnsafeGLWindowFromGlibBorrow is used to convert raw GstGLWindow pointers to go without touching any references. This is used by the bindings internally. +func UnsafeGLWindowFromGlibBorrow(c unsafe.Pointer) GLWindow { + return gobject.UnsafeObjectFromGlibBorrow(c).(GLWindow) +} + func (g *GLWindowInstance) upcastToGstGLWindow() *GLWindowInstance { return g } @@ -11573,10 +11795,10 @@ func (window *GLWindowInstance) SendKeyEvent(eventType string, keyStr string) { // The function takes the following parameters: // // - eventType string -// - button int +// - button int32 // - posx float64 // - posy float64 -func (window *GLWindowInstance) SendMouseEvent(eventType string, button int, posx float64, posy float64) { +func (window *GLWindowInstance) SendMouseEvent(eventType string, button int32, posx float64, posy float64) { var carg0 *C.GstGLWindow // in, none, converted var carg1 *C.char // in, none, string, casted *C.gchar var carg2 C.int // in, none, casted, casted C.gint @@ -11634,12 +11856,12 @@ func (window *GLWindowInstance) SendScrollEvent(posx float64, posy float64, delt // // The function takes the following parameters: // -// - width int: new preferred width -// - height int: new preferred height +// - width int32: new preferred width +// - height int32: new preferred height // // Set the preferred width and height of the window. Implementations are free // to ignore this information. -func (window *GLWindowInstance) SetPreferredSize(width int, height int) { +func (window *GLWindowInstance) SetPreferredSize(width int32, height int32) { var carg0 *C.GstGLWindow // in, none, converted var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted @@ -11658,10 +11880,10 @@ func (window *GLWindowInstance) SetPreferredSize(width int, height int) { // // The function takes the following parameters: // -// - x int: x position -// - y int: y position -// - width int: width -// - height int: height +// - x int32: x position +// - y int32: y position +// - width int32: width +// - height int32: height // // The function returns the following values: // @@ -11669,7 +11891,7 @@ func (window *GLWindowInstance) SetPreferredSize(width int, height int) { // // Tell a @window that it should render into a specific region of the window // according to the #GstVideoOverlay interface. -func (window *GLWindowInstance) SetRenderRectangle(x int, y int, width int, height int) bool { +func (window *GLWindowInstance) SetRenderRectangle(x int32, y int32, width int32, height int32) bool { var carg0 *C.GstGLWindow // in, none, converted var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted @@ -11721,7 +11943,7 @@ func (o *GLWindowInstance) ConnectKeyEvent(fn func(GLWindow, string, string)) go // ConnectMouseEvent connects the provided callback to the "mouse-event" signal // // Will be emitted when a mouse event is received by the GstGLwindow. -func (o *GLWindowInstance) ConnectMouseEvent(fn func(GLWindow, string, int, float64, float64)) gobject.SignalHandle { +func (o *GLWindowInstance) ConnectMouseEvent(fn func(GLWindow, string, int32, float64, float64)) gobject.SignalHandle { return o.Connect("mouse-event", fn) } @@ -11782,21 +12004,21 @@ type GLWindowOverrides[Instance GLWindow] struct { // SetPreferredSize allows you to override the implementation of the virtual method set_preferred_size. // The function takes the following parameters: // - // - width int: new preferred width - // - height int: new preferred height - SetPreferredSize func(Instance, int, int) + // - width int32: new preferred width + // - height int32: new preferred height + SetPreferredSize func(Instance, int32, int32) // SetRenderRectangle allows you to override the implementation of the virtual method set_render_rectangle. // The function takes the following parameters: // - // - x int: x position - // - y int: y position - // - width int: width - // - height int: height + // - x int32: x position + // - y int32: y position + // - width int32: width + // - height int32: height // // The function returns the following values: // // - goret bool - SetRenderRectangle func(Instance, int, int, int, int) bool + SetRenderRectangle func(Instance, int32, int32, int32, int32) bool // Show allows you to override the implementation of the virtual method show. Show func(Instance) } @@ -11816,7 +12038,7 @@ func UnsafeApplyGLWindowOverrides[Instance GLWindow](gclass unsafe.Pointer, over func(carg0 *C.GstGLWindow) { var window Instance // go GstGLWindow subclass - window = UnsafeGLWindowFromGlibNone(unsafe.Pointer(carg0)).(Instance) + window = UnsafeGLWindowFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.Close(window) }, @@ -11832,7 +12054,7 @@ func UnsafeApplyGLWindowOverrides[Instance GLWindow](gclass unsafe.Pointer, over var window Instance // go GstGLWindow subclass var goret bool // return - window = UnsafeGLWindowFromGlibNone(unsafe.Pointer(carg0)).(Instance) + window = UnsafeGLWindowFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.ControlsViewport(window) @@ -11853,7 +12075,7 @@ func UnsafeApplyGLWindowOverrides[Instance GLWindow](gclass unsafe.Pointer, over func(carg0 *C.GstGLWindow) { var window Instance // go GstGLWindow subclass - window = UnsafeGLWindowFromGlibNone(unsafe.Pointer(carg0)).(Instance) + window = UnsafeGLWindowFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.Draw(window) }, @@ -11869,7 +12091,7 @@ func UnsafeApplyGLWindowOverrides[Instance GLWindow](gclass unsafe.Pointer, over var window Instance // go GstGLWindow subclass var handleEvents bool // in - window = UnsafeGLWindowFromGlibNone(unsafe.Pointer(carg0)).(Instance) + window = UnsafeGLWindowFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != 0 { handleEvents = true } @@ -11888,7 +12110,7 @@ func UnsafeApplyGLWindowOverrides[Instance GLWindow](gclass unsafe.Pointer, over var window Instance // go GstGLWindow subclass var goret bool // return - window = UnsafeGLWindowFromGlibNone(unsafe.Pointer(carg0)).(Instance) + window = UnsafeGLWindowFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.HasOutputSurface(window) @@ -11911,7 +12133,7 @@ func UnsafeApplyGLWindowOverrides[Instance GLWindow](gclass unsafe.Pointer, over var goret bool // return var _goerr error // out, full, converted - window = UnsafeGLWindowFromGlibNone(unsafe.Pointer(carg0)).(Instance) + window = UnsafeGLWindowFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret, _goerr = overrides.Open(window) @@ -11933,7 +12155,7 @@ func UnsafeApplyGLWindowOverrides[Instance GLWindow](gclass unsafe.Pointer, over func(carg0 *C.GstGLWindow) { var window Instance // go GstGLWindow subclass - window = UnsafeGLWindowFromGlibNone(unsafe.Pointer(carg0)).(Instance) + window = UnsafeGLWindowFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.QueueResize(window) }, @@ -11948,7 +12170,7 @@ func UnsafeApplyGLWindowOverrides[Instance GLWindow](gclass unsafe.Pointer, over func(carg0 *C.GstGLWindow) { var window Instance // go GstGLWindow subclass - window = UnsafeGLWindowFromGlibNone(unsafe.Pointer(carg0)).(Instance) + window = UnsafeGLWindowFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.Quit(window) }, @@ -11963,7 +12185,7 @@ func UnsafeApplyGLWindowOverrides[Instance GLWindow](gclass unsafe.Pointer, over func(carg0 *C.GstGLWindow) { var window Instance // go GstGLWindow subclass - window = UnsafeGLWindowFromGlibNone(unsafe.Pointer(carg0)).(Instance) + window = UnsafeGLWindowFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.Run(window) }, @@ -11977,12 +12199,12 @@ func UnsafeApplyGLWindowOverrides[Instance GLWindow](gclass unsafe.Pointer, over "_gotk4_gstgl1_GLWindow_set_preferred_size", func(carg0 *C.GstGLWindow, carg1 C.gint, carg2 C.gint) { var window Instance // go GstGLWindow subclass - var width int // in, none, casted - var height int // in, none, casted + var width int32 // in, none, casted + var height int32 // in, none, casted - window = UnsafeGLWindowFromGlibNone(unsafe.Pointer(carg0)).(Instance) - width = int(carg1) - height = int(carg2) + window = UnsafeGLWindowFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) + width = int32(carg1) + height = int32(carg2) overrides.SetPreferredSize(window, width, height) }, @@ -11996,17 +12218,17 @@ func UnsafeApplyGLWindowOverrides[Instance GLWindow](gclass unsafe.Pointer, over "_gotk4_gstgl1_GLWindow_set_render_rectangle", func(carg0 *C.GstGLWindow, carg1 C.gint, carg2 C.gint, carg3 C.gint, carg4 C.gint) (cret C.gboolean) { var window Instance // go GstGLWindow subclass - var x int // in, none, casted - var y int // in, none, casted - var width int // in, none, casted - var height int // in, none, casted + var x int32 // in, none, casted + var y int32 // in, none, casted + var width int32 // in, none, casted + var height int32 // in, none, casted var goret bool // return - window = UnsafeGLWindowFromGlibNone(unsafe.Pointer(carg0)).(Instance) - x = int(carg1) - y = int(carg2) - width = int(carg3) - height = int(carg4) + window = UnsafeGLWindowFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) + x = int32(carg1) + y = int32(carg2) + width = int32(carg3) + height = int32(carg4) goret = overrides.SetRenderRectangle(window, x, y, width, height) @@ -12027,7 +12249,7 @@ func UnsafeApplyGLWindowOverrides[Instance GLWindow](gclass unsafe.Pointer, over func(carg0 *C.GstGLWindow) { var window Instance // go GstGLWindow subclass - window = UnsafeGLWindowFromGlibNone(unsafe.Pointer(carg0)).(Instance) + window = UnsafeGLWindowFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.Show(window) }, @@ -12078,8 +12300,11 @@ func marshalGLAllocationParams(p unsafe.Pointer) (interface{}, error) { return UnsafeGLAllocationParamsFromGlibBorrow(b), nil } -func (r *GLAllocationParams) InitGoValue(v *gobject.Value) { - v.Init(TypeGLAllocationParams) +func (r *GLAllocationParams) GoValueType() gobject.Type { + return TypeGLAllocationParams +} + +func (r *GLAllocationParams) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -12379,8 +12604,11 @@ func marshalGLBaseMemory(p unsafe.Pointer) (interface{}, error) { return UnsafeGLBaseMemoryFromGlibBorrow(b), nil } -func (r *GLBaseMemory) InitGoValue(v *gobject.Value) { - v.Init(TypeGLBaseMemory) +func (r *GLBaseMemory) GoValueType() gobject.Type { + return TypeGLBaseMemory +} + +func (r *GLBaseMemory) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -12716,8 +12944,11 @@ func marshalGLBuffer(p unsafe.Pointer) (interface{}, error) { return UnsafeGLBufferFromGlibBorrow(b), nil } -func (r *GLBuffer) InitGoValue(v *gobject.Value) { - v.Init(TypeGLBuffer) +func (r *GLBuffer) GoValueType() gobject.Type { + return TypeGLBuffer +} + +func (r *GLBuffer) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -12798,8 +13029,11 @@ func marshalGLBufferAllocationParams(p unsafe.Pointer) (interface{}, error) { return UnsafeGLBufferAllocationParamsFromGlibBorrow(b), nil } -func (r *GLBufferAllocationParams) InitGoValue(v *gobject.Value) { - v.Init(TypeGLBufferAllocationParams) +func (r *GLBufferAllocationParams) GoValueType() gobject.Type { + return TypeGLBufferAllocationParams +} + +func (r *GLBufferAllocationParams) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -13268,8 +13502,11 @@ func marshalGLMemory(p unsafe.Pointer) (interface{}, error) { return UnsafeGLMemoryFromGlibBorrow(b), nil } -func (r *GLMemory) InitGoValue(v *gobject.Value) { - v.Init(TypeGLMemory) +func (r *GLMemory) GoValueType() gobject.Type { + return TypeGLMemory +} + +func (r *GLMemory) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -13340,8 +13577,8 @@ func GLMemoryInitOnce() { // - texId uint: OpenGL texture id // - target GLTextureTarget: the #GstGLTextureTarget // - texFormat GLFormat: the #GstGLFormat -// - width int: width of @tex_id -// - height int: height of @tex_id +// - width int32: width of @tex_id +// - height int32: height of @tex_id // // The function returns the following values: // @@ -13349,7 +13586,7 @@ func GLMemoryInitOnce() { // // Copies @gl_mem into the texture specified by @tex_id. The format of @tex_id // is specified by @tex_format, @width and @height. -func (glMem *GLMemory) CopyInto(texId uint, target GLTextureTarget, texFormat GLFormat, width int, height int) bool { +func (glMem *GLMemory) CopyInto(texId uint, target GLTextureTarget, texFormat GLFormat, width int32, height int32) bool { var carg0 *C.GstGLMemory // in, none, converted var carg1 C.guint // in, none, casted var carg2 C.GstGLTextureTarget // in, none, casted @@ -13389,8 +13626,8 @@ func (glMem *GLMemory) CopyInto(texId uint, target GLTextureTarget, texFormat GL // - texId uint: the destination texture id // - outTarget GLTextureTarget: the destination #GstGLTextureTarget // - outTexFormat GLFormat: the destination #GstGLFormat -// - outWidth int: the destination width -// - outHeight int: the destination height +// - outWidth int32: the destination width +// - outHeight int32: the destination height // // The function returns the following values: // @@ -13398,7 +13635,7 @@ func (glMem *GLMemory) CopyInto(texId uint, target GLTextureTarget, texFormat GL // // Copies the texture in #GstGLMemory into the texture specified by @tex_id, // @out_target, @out_tex_format, @out_width and @out_height. -func (src *GLMemory) CopyTeximage(texId uint, outTarget GLTextureTarget, outTexFormat GLFormat, outWidth int, outHeight int) bool { +func (src *GLMemory) CopyTeximage(texId uint, outTarget GLTextureTarget, outTexFormat GLFormat, outWidth int32, outHeight int32) bool { var carg0 *C.GstGLMemory // in, none, converted var carg1 C.guint // in, none, casted var carg2 C.GstGLTextureTarget // in, none, casted @@ -13456,8 +13693,8 @@ func (glMem *GLMemory) GetTextureFormat() GLFormat { // // The function returns the following values: // -// - goret int -func (glMem *GLMemory) GetTextureHeight() int { +// - goret int32 +func (glMem *GLMemory) GetTextureHeight() int32 { var carg0 *C.GstGLMemory // in, none, converted var cret C.gint // return, none, casted @@ -13466,9 +13703,9 @@ func (glMem *GLMemory) GetTextureHeight() int { cret = C.gst_gl_memory_get_texture_height(carg0) runtime.KeepAlive(glMem) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -13519,8 +13756,8 @@ func (glMem *GLMemory) GetTextureTarget() GLTextureTarget { // // The function returns the following values: // -// - goret int -func (glMem *GLMemory) GetTextureWidth() int { +// - goret int32 +func (glMem *GLMemory) GetTextureWidth() int32 { var carg0 *C.GstGLMemory // in, none, converted var cret C.gint // return, none, casted @@ -13529,9 +13766,9 @@ func (glMem *GLMemory) GetTextureWidth() int { cret = C.gst_gl_memory_get_texture_width(carg0) runtime.KeepAlive(glMem) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -13596,8 +13833,11 @@ func marshalGLMemoryPBO(p unsafe.Pointer) (interface{}, error) { return UnsafeGLMemoryPBOFromGlibBorrow(b), nil } -func (r *GLMemoryPBO) InitGoValue(v *gobject.Value) { - v.Init(TypeGLMemoryPBO) +func (r *GLMemoryPBO) GoValueType() gobject.Type { + return TypeGLMemoryPBO +} + +func (r *GLMemoryPBO) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -13665,9 +13905,9 @@ func GLMemoryPBOInitOnce() { // - texId uint: the destination texture id // - target GLTextureTarget: the destination #GstGLTextureTarget // - texFormat GLFormat: the destination #GstGLFormat -// - width int: width of @tex_id -// - height int: height of @tex_id -// - stride int: stride of the backing texture data +// - width int32: width of @tex_id +// - height int32: height of @tex_id +// - stride int32: stride of the backing texture data // - respecify bool: whether to copy the data or copy per texel // // The function returns the following values: @@ -13687,7 +13927,7 @@ func GLMemoryPBOInitOnce() { // Otherwise, if @respecify is %FALSE, then the copy is performed per texel // using glCopyTexImage. See the OpenGL specification for details on the // mappings between texture formats. -func (glMem *GLMemoryPBO) CopyIntoTexture(texId uint, target GLTextureTarget, texFormat GLFormat, width int, height int, stride int, respecify bool) bool { +func (glMem *GLMemoryPBO) CopyIntoTexture(texId uint, target GLTextureTarget, texFormat GLFormat, width int32, height int32, stride int32, respecify bool) bool { var carg0 *C.GstGLMemoryPBO // in, none, converted var carg1 C.guint // in, none, casted var carg2 C.GstGLTextureTarget // in, none, casted @@ -14098,8 +14338,11 @@ func marshalGLRenderbuffer(p unsafe.Pointer) (interface{}, error) { return UnsafeGLRenderbufferFromGlibBorrow(b), nil } -func (r *GLRenderbuffer) InitGoValue(v *gobject.Value) { - v.Init(TypeGLRenderbuffer) +func (r *GLRenderbuffer) GoValueType() gobject.Type { + return TypeGLRenderbuffer +} + +func (r *GLRenderbuffer) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -14188,8 +14431,8 @@ func (glMem *GLRenderbuffer) GetFormat() GLFormat { // // The function returns the following values: // -// - goret int -func (glMem *GLRenderbuffer) GetHeight() int { +// - goret int32 +func (glMem *GLRenderbuffer) GetHeight() int32 { var carg0 *C.GstGLRenderbuffer // in, none, converted var cret C.gint // return, none, casted @@ -14198,9 +14441,9 @@ func (glMem *GLRenderbuffer) GetHeight() int { cret = C.gst_gl_renderbuffer_get_height(carg0) runtime.KeepAlive(glMem) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -14230,8 +14473,8 @@ func (glMem *GLRenderbuffer) GetID() uint { // // The function returns the following values: // -// - goret int -func (glMem *GLRenderbuffer) GetWidth() int { +// - goret int32 +func (glMem *GLRenderbuffer) GetWidth() int32 { var carg0 *C.GstGLRenderbuffer // in, none, converted var cret C.gint // return, none, casted @@ -14240,9 +14483,9 @@ func (glMem *GLRenderbuffer) GetWidth() int { cret = C.gst_gl_renderbuffer_get_width(carg0) runtime.KeepAlive(glMem) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -14266,8 +14509,11 @@ func marshalGLRenderbufferAllocationParams(p unsafe.Pointer) (interface{}, error return UnsafeGLRenderbufferAllocationParamsFromGlibBorrow(b), nil } -func (r *GLRenderbufferAllocationParams) InitGoValue(v *gobject.Value) { - v.Init(TypeGLRenderbufferAllocationParams) +func (r *GLRenderbufferAllocationParams) GoValueType() gobject.Type { + return TypeGLRenderbufferAllocationParams +} + +func (r *GLRenderbufferAllocationParams) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -14681,8 +14927,11 @@ func marshalGLVideoAllocationParams(p unsafe.Pointer) (interface{}, error) { return UnsafeGLVideoAllocationParamsFromGlibBorrow(b), nil } -func (r *GLVideoAllocationParams) InitGoValue(v *gobject.Value) { - v.Init(TypeGLVideoAllocationParams) +func (r *GLVideoAllocationParams) GoValueType() gobject.Type { + return TypeGLVideoAllocationParams +} + +func (r *GLVideoAllocationParams) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } diff --git a/pkg/gstmpegts/gstmpegts.gen.go b/pkg/gstmpegts/gstmpegts.gen.go index dbe14d0..70cacee 100644 --- a/pkg/gstmpegts/gstmpegts.gen.go +++ b/pkg/gstmpegts/gstmpegts.gen.go @@ -57,9 +57,11 @@ var ( TypeExtendedEventDescriptor = gobject.Type(C.gst_mpegts_extended_event_descriptor_get_type()) TypeExtendedEventItem = gobject.Type(C.gst_mpegts_extended_event_item_get_type()) TypeISO639LanguageDescriptor = gobject.Type(C.gst_mpegts_iso_639_language_get_type()) + TypeJpegXsDescriptor = gobject.Type(C.gst_mpegts_jpeg_xs_descriptor_get_type()) TypeLogicalChannel = gobject.Type(C.gst_mpegts_logical_channel_get_type()) TypeLogicalChannelDescriptor = gobject.Type(C.gst_mpegts_logical_channel_descriptor_get_type()) TypeMetadataDescriptor = gobject.Type(C.gst_mpegts_metadata_descriptor_get_type()) + TypeMetadataPointerDescriptor = gobject.Type(C.gst_mpegts_metadata_pointer_descriptor_get_type()) TypeNIT = gobject.Type(C.gst_mpegts_nit_get_type()) TypeNITStream = gobject.Type(C.gst_mpegts_nit_stream_get_type()) TypePMT = gobject.Type(C.gst_mpegts_pmt_get_type()) @@ -118,9 +120,11 @@ func init() { gobject.TypeMarshaler{T: TypeExtendedEventDescriptor, F: marshalExtendedEventDescriptor}, gobject.TypeMarshaler{T: TypeExtendedEventItem, F: marshalExtendedEventItem}, gobject.TypeMarshaler{T: TypeISO639LanguageDescriptor, F: marshalISO639LanguageDescriptor}, + gobject.TypeMarshaler{T: TypeJpegXsDescriptor, F: marshalJpegXsDescriptor}, gobject.TypeMarshaler{T: TypeLogicalChannel, F: marshalLogicalChannel}, gobject.TypeMarshaler{T: TypeLogicalChannelDescriptor, F: marshalLogicalChannelDescriptor}, gobject.TypeMarshaler{T: TypeMetadataDescriptor, F: marshalMetadataDescriptor}, + gobject.TypeMarshaler{T: TypeMetadataPointerDescriptor, F: marshalMetadataPointerDescriptor}, gobject.TypeMarshaler{T: TypeNIT, F: marshalNIT}, gobject.TypeMarshaler{T: TypeNITStream, F: marshalNITStream}, gobject.TypeMarshaler{T: TypePMT, F: marshalPMT}, @@ -1139,6 +1143,10 @@ const ( MtsDescStereoscopicProgramInfo DescriptorType = 53 // MtsDescStereoscopicVideoInfo wraps GST_MTS_DESC_STEREOSCOPIC_VIDEO_INFO MtsDescStereoscopicVideoInfo DescriptorType = 54 + // MtsDescExtension wraps GST_MTS_DESC_EXTENSION + // + // Extension Descriptor. + MtsDescExtension DescriptorType = 63 ) @@ -1159,6 +1167,7 @@ func (e DescriptorType) String() string { case MtsDescDsmccNptReference: return "MtsDescDsmccNptReference" case MtsDescDsmccStreamEvent: return "MtsDescDsmccStreamEvent" case MtsDescDsmccStreamMode: return "MtsDescDsmccStreamMode" + case MtsDescExtension: return "MtsDescExtension" case MtsDescExternalESID: return "MtsDescExternalESID" case MtsDescFlexMuxTiming: return "MtsDescFlexMuxTiming" case MtsDescFmc: return "MtsDescFmc" @@ -1202,6 +1211,29 @@ func (e DescriptorType) String() string { } } +// ExtendedDescriptorType wraps GstMpegtsExtendedDescriptorType +// +// The type of an extended descriptor +// +// The values correpond to the registered extended descriptor types from the +// base ISO 13818 / ITU H.222.0 specifications +// +// Consult the specification for more details +type ExtendedDescriptorType C.int + +const ( + // MtsDescExtJxsVideo wraps GST_MTS_DESC_EXT_JXS_VIDEO + MtsDescExtJxsVideo ExtendedDescriptorType = 20 +) + + +func (e ExtendedDescriptorType) String() string { + switch e { + case MtsDescExtJxsVideo: return "MtsDescExtJxsVideo" + default: return fmt.Sprintf("ExtendedDescriptorType(%d)", e) + } +} + // HdmvStreamType wraps GstMpegtsHdmvStreamType // // Type of mpeg-ts streams for Blu-ray formats. To be matched with the @@ -1396,6 +1428,34 @@ func (e ISO639AudioType) String() string { } } +// MetadataApplicationFormat wraps GstMpegtsMetadataApplicationFormat +// +// @GST_MPEGTS_METADATA_APPLICATION_FORMAT_ISAN ISO 15706-1 (ISAN) encoded in its binary form +// @GST_MPEGTS_METADATA_APPLICATION_FORMAT_VSAN ISO 15706-2 (V-ISAN) encoded in its binary form +// @GST_MPEGTS_METADATA_APPLICATION_FORMAT_IDENTIFIER_FIELD Defined by the metadata_application_format_identifier field +// +// metadata_application_format valid values. See ISO/IEC 13818-1:2023(E) Table 2-84. +type MetadataApplicationFormat C.int + +const ( + // MpegtsMetadataApplicationFormatIsan wraps GST_MPEGTS_METADATA_APPLICATION_FORMAT_ISAN + MpegtsMetadataApplicationFormatIsan MetadataApplicationFormat = 16 + // MpegtsMetadataApplicationFormatVsan wraps GST_MPEGTS_METADATA_APPLICATION_FORMAT_VSAN + MpegtsMetadataApplicationFormatVsan MetadataApplicationFormat = 17 + // MpegtsMetadataApplicationFormatIdentifierField wraps GST_MPEGTS_METADATA_APPLICATION_FORMAT_IDENTIFIER_FIELD + MpegtsMetadataApplicationFormatIdentifierField MetadataApplicationFormat = 65535 +) + + +func (e MetadataApplicationFormat) String() string { + switch e { + case MpegtsMetadataApplicationFormatIdentifierField: return "MpegtsMetadataApplicationFormatIdentifierField" + case MpegtsMetadataApplicationFormatIsan: return "MpegtsMetadataApplicationFormatIsan" + case MpegtsMetadataApplicationFormatVsan: return "MpegtsMetadataApplicationFormatVsan" + default: return fmt.Sprintf("MetadataApplicationFormat(%d)", e) + } +} + // MetadataFormat wraps GstMpegtsMetadataFormat // // metadata_descriptor metadata_format valid values. See ISO/IEC 13818-1:2018(E) Table 2-85. @@ -2533,6 +2593,14 @@ const ( // Rec. ITU-T H.265 | ISO/IEC 23008-2 video // stream or an HEVC temporal video sub-bitstream MpegtsStreamTypeVideoHevc StreamType = 36 + // MpegtsStreamTypeVideoJPEGXS wraps GST_MPEGTS_STREAM_TYPE_VIDEO_JPEG_XS + // + // JPEG-XS stream type + MpegtsStreamTypeVideoJPEGXS StreamType = 50 + // MpegtsStreamTypeVideoVvc wraps GST_MPEGTS_STREAM_TYPE_VIDEO_VVC + // + // VVC/H.266 video stream type + MpegtsStreamTypeVideoVvc StreamType = 51 // MpegtsStreamTypeIpmpStream wraps GST_MPEGTS_STREAM_TYPE_IPMP_STREAM // // IPMP stream @@ -2579,12 +2647,14 @@ func (e StreamType) String() string { case MpegtsStreamTypeVideoH264StereoAdditionalView: return "MpegtsStreamTypeVideoH264StereoAdditionalView" case MpegtsStreamTypeVideoH264SvcSubBitstream: return "MpegtsStreamTypeVideoH264SvcSubBitstream" case MpegtsStreamTypeVideoHevc: return "MpegtsStreamTypeVideoHevc" + case MpegtsStreamTypeVideoJPEGXS: return "MpegtsStreamTypeVideoJPEGXS" case MpegtsStreamTypeVideoJp2K: return "MpegtsStreamTypeVideoJp2K" case MpegtsStreamTypeVideoMpeg1: return "MpegtsStreamTypeVideoMpeg1" case MpegtsStreamTypeVideoMpeg2: return "MpegtsStreamTypeVideoMpeg2" case MpegtsStreamTypeVideoMpeg2StereoAdditionalView: return "MpegtsStreamTypeVideoMpeg2StereoAdditionalView" case MpegtsStreamTypeVideoMpeg4: return "MpegtsStreamTypeVideoMpeg4" case MpegtsStreamTypeVideoRvc: return "MpegtsStreamTypeVideoRvc" + case MpegtsStreamTypeVideoVvc: return "MpegtsStreamTypeVideoVvc" default: return fmt.Sprintf("StreamType(%d)", e) } } @@ -2933,12 +3003,12 @@ func EventNewMpegtsSection(section *Section) *gst.Event { // // The function returns the following values: // -// - goret *Section +// - goret *Section (nullable) // // Extracts the #GstMpegtsSection contained in the @event #GstEvent func EventParseMpegtsSection(event *gst.Event) *Section { var carg1 *C.GstEvent // in, none, converted - var cret *C.GstMpegtsSection // return, full, converted + var cret *C.GstMpegtsSection // return, full, converted, nullable carg1 = (*C.GstEvent)(gst.UnsafeEventToGlibNone(event)) @@ -2947,7 +3017,9 @@ func EventParseMpegtsSection(event *gst.Event) *Section { var goret *Section - goret = UnsafeSectionFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeSectionFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -2970,13 +3042,13 @@ func Initialize() { // // The function returns the following values: // -// - goret *gst.Message +// - goret *gst.Message (nullable) // // Creates a new #GstMessage for a @GstMpegtsSection. func MessageNewMpegtsSection(parent gst.Object, section *Section) *gst.Message { var carg1 *C.GstObject // in, none, converted var carg2 *C.GstMpegtsSection // in, none, converted - var cret *C.GstMessage // return, full, converted + var cret *C.GstMessage // return, full, converted, nullable carg1 = (*C.GstObject)(gst.UnsafeObjectToGlibNone(parent)) carg2 = (*C.GstMpegtsSection)(UnsafeSectionToGlibNone(section)) @@ -2987,7 +3059,9 @@ func MessageNewMpegtsSection(parent gst.Object, section *Section) *gst.Message { var goret *gst.Message - goret = gst.UnsafeMessageFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeMessageFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -3000,12 +3074,12 @@ func MessageNewMpegtsSection(parent gst.Object, section *Section) *gst.Message { // // The function returns the following values: // -// - goret *Section +// - goret *Section (nullable) // // Returns the #GstMpegtsSection contained in a message. func MessageParseMpegtsSection(message *gst.Message) *Section { var carg1 *C.GstMessage // in, none, converted - var cret *C.GstMpegtsSection // return, full, converted + var cret *C.GstMpegtsSection // return, full, converted, nullable carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(message)) @@ -3014,7 +3088,9 @@ func MessageParseMpegtsSection(message *gst.Message) *Section { var goret *Section - goret = UnsafeSectionFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeSectionFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -3181,8 +3257,11 @@ func marshalAtscEIT(p unsafe.Pointer) (interface{}, error) { return UnsafeAtscEITFromGlibBorrow(b), nil } -func (r *AtscEIT) InitGoValue(v *gobject.Value) { - v.Init(TypeAtscEIT) +func (r *AtscEIT) GoValueType() gobject.Type { + return TypeAtscEIT +} + +func (r *AtscEIT) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -3256,8 +3335,11 @@ func marshalAtscEITEvent(p unsafe.Pointer) (interface{}, error) { return UnsafeAtscEITEventFromGlibBorrow(b), nil } -func (r *AtscEITEvent) InitGoValue(v *gobject.Value) { - v.Init(TypeAtscEITEvent) +func (r *AtscEITEvent) GoValueType() gobject.Type { + return TypeAtscEITEvent +} + +func (r *AtscEITEvent) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -3331,8 +3413,11 @@ func marshalAtscETT(p unsafe.Pointer) (interface{}, error) { return UnsafeAtscETTFromGlibBorrow(b), nil } -func (r *AtscETT) InitGoValue(v *gobject.Value) { - v.Init(TypeAtscETT) +func (r *AtscETT) GoValueType() gobject.Type { + return TypeAtscETT +} + +func (r *AtscETT) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -3406,8 +3491,11 @@ func marshalAtscMGT(p unsafe.Pointer) (interface{}, error) { return UnsafeAtscMGTFromGlibBorrow(b), nil } -func (r *AtscMGT) InitGoValue(v *gobject.Value) { - v.Init(TypeAtscMGT) +func (r *AtscMGT) GoValueType() gobject.Type { + return TypeAtscMGT +} + +func (r *AtscMGT) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -3498,8 +3586,11 @@ func marshalAtscMGTTable(p unsafe.Pointer) (interface{}, error) { return UnsafeAtscMGTTableFromGlibBorrow(b), nil } -func (r *AtscMGTTable) InitGoValue(v *gobject.Value) { - v.Init(TypeAtscMGTTable) +func (r *AtscMGTTable) GoValueType() gobject.Type { + return TypeAtscMGTTable +} + +func (r *AtscMGTTable) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -3571,8 +3662,11 @@ func marshalAtscMultString(p unsafe.Pointer) (interface{}, error) { return UnsafeAtscMultStringFromGlibBorrow(b), nil } -func (r *AtscMultString) InitGoValue(v *gobject.Value) { - v.Init(TypeAtscMultString) +func (r *AtscMultString) GoValueType() gobject.Type { + return TypeAtscMultString +} + +func (r *AtscMultString) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -3646,8 +3740,11 @@ func marshalAtscRRT(p unsafe.Pointer) (interface{}, error) { return UnsafeAtscRRTFromGlibBorrow(b), nil } -func (r *AtscRRT) InitGoValue(v *gobject.Value) { - v.Init(TypeAtscRRT) +func (r *AtscRRT) GoValueType() gobject.Type { + return TypeAtscRRT +} + +func (r *AtscRRT) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -3736,8 +3833,11 @@ func marshalAtscRRTDimension(p unsafe.Pointer) (interface{}, error) { return UnsafeAtscRRTDimensionFromGlibBorrow(b), nil } -func (r *AtscRRTDimension) InitGoValue(v *gobject.Value) { - v.Init(TypeAtscRRTDimension) +func (r *AtscRRTDimension) GoValueType() gobject.Type { + return TypeAtscRRTDimension +} + +func (r *AtscRRTDimension) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -3826,8 +3926,11 @@ func marshalAtscRRTDimensionValue(p unsafe.Pointer) (interface{}, error) { return UnsafeAtscRRTDimensionValueFromGlibBorrow(b), nil } -func (r *AtscRRTDimensionValue) InitGoValue(v *gobject.Value) { - v.Init(TypeAtscRRTDimensionValue) +func (r *AtscRRTDimensionValue) GoValueType() gobject.Type { + return TypeAtscRRTDimensionValue +} + +func (r *AtscRRTDimensionValue) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -3918,8 +4021,11 @@ func marshalAtscSTT(p unsafe.Pointer) (interface{}, error) { return UnsafeAtscSTTFromGlibBorrow(b), nil } -func (r *AtscSTT) InitGoValue(v *gobject.Value) { - v.Init(TypeAtscSTT) +func (r *AtscSTT) GoValueType() gobject.Type { + return TypeAtscSTT +} + +func (r *AtscSTT) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -4031,8 +4137,11 @@ func marshalAtscStringSegment(p unsafe.Pointer) (interface{}, error) { return UnsafeAtscStringSegmentFromGlibBorrow(b), nil } -func (r *AtscStringSegment) InitGoValue(v *gobject.Value) { - v.Init(TypeAtscStringSegment) +func (r *AtscStringSegment) GoValueType() gobject.Type { + return TypeAtscStringSegment +} + +func (r *AtscStringSegment) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -4168,8 +4277,11 @@ func marshalAtscVCT(p unsafe.Pointer) (interface{}, error) { return UnsafeAtscVCTFromGlibBorrow(b), nil } -func (r *AtscVCT) InitGoValue(v *gobject.Value) { - v.Init(TypeAtscVCT) +func (r *AtscVCT) GoValueType() gobject.Type { + return TypeAtscVCT +} + +func (r *AtscVCT) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -4243,8 +4355,11 @@ func marshalAtscVCTSource(p unsafe.Pointer) (interface{}, error) { return UnsafeAtscVCTSourceFromGlibBorrow(b), nil } -func (r *AtscVCTSource) InitGoValue(v *gobject.Value) { - v.Init(TypeAtscVCTSource) +func (r *AtscVCTSource) GoValueType() gobject.Type { + return TypeAtscVCTSource +} + +func (r *AtscVCTSource) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -4381,8 +4496,11 @@ func marshalBAT(p unsafe.Pointer) (interface{}, error) { return UnsafeBATFromGlibBorrow(b), nil } -func (r *BAT) InitGoValue(v *gobject.Value) { - v.Init(TypeBAT) +func (r *BAT) GoValueType() gobject.Type { + return TypeBAT +} + +func (r *BAT) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -4454,8 +4572,11 @@ func marshalBATStream(p unsafe.Pointer) (interface{}, error) { return UnsafeBATStreamFromGlibBorrow(b), nil } -func (r *BATStream) InitGoValue(v *gobject.Value) { - v.Init(TypeBATStream) +func (r *BATStream) GoValueType() gobject.Type { + return TypeBATStream +} + +func (r *BATStream) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -4529,8 +4650,11 @@ func marshalCableDeliverySystemDescriptor(p unsafe.Pointer) (interface{}, error) return UnsafeCableDeliverySystemDescriptorFromGlibBorrow(b), nil } -func (r *CableDeliverySystemDescriptor) InitGoValue(v *gobject.Value) { - v.Init(TypeCableDeliverySystemDescriptor) +func (r *CableDeliverySystemDescriptor) GoValueType() gobject.Type { + return TypeCableDeliverySystemDescriptor +} + +func (r *CableDeliverySystemDescriptor) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -4602,8 +4726,11 @@ func marshalComponentDescriptor(p unsafe.Pointer) (interface{}, error) { return UnsafeComponentDescriptorFromGlibBorrow(b), nil } -func (r *ComponentDescriptor) InitGoValue(v *gobject.Value) { - v.Init(TypeComponentDescriptor) +func (r *ComponentDescriptor) GoValueType() gobject.Type { + return TypeComponentDescriptor +} + +func (r *ComponentDescriptor) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -4675,8 +4802,11 @@ func marshalContent(p unsafe.Pointer) (interface{}, error) { return UnsafeContentFromGlibBorrow(b), nil } -func (r *Content) InitGoValue(v *gobject.Value) { - v.Init(TypeContent) +func (r *Content) GoValueType() gobject.Type { + return TypeContent +} + +func (r *Content) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -4748,8 +4878,11 @@ func marshalDVBLinkageDescriptor(p unsafe.Pointer) (interface{}, error) { return UnsafeDVBLinkageDescriptorFromGlibBorrow(b), nil } -func (r *DVBLinkageDescriptor) InitGoValue(v *gobject.Value) { - v.Init(TypeDVBLinkageDescriptor) +func (r *DVBLinkageDescriptor) GoValueType() gobject.Type { + return TypeDVBLinkageDescriptor +} + +func (r *DVBLinkageDescriptor) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -4808,10 +4941,10 @@ func UnsafeDVBLinkageDescriptorToGlibFull(d *DVBLinkageDescriptor) unsafe.Pointe // // The function returns the following values: // -// - goret *DVBLinkageEvent +// - goret *DVBLinkageEvent (nullable) func (desc *DVBLinkageDescriptor) GetEvent() *DVBLinkageEvent { var carg0 *C.GstMpegtsDVBLinkageDescriptor // in, none, converted - var cret *C.GstMpegtsDVBLinkageEvent // return, none, converted + var cret *C.GstMpegtsDVBLinkageEvent // return, none, converted, nullable carg0 = (*C.GstMpegtsDVBLinkageDescriptor)(UnsafeDVBLinkageDescriptorToGlibNone(desc)) @@ -4820,7 +4953,9 @@ func (desc *DVBLinkageDescriptor) GetEvent() *DVBLinkageEvent { var goret *DVBLinkageEvent - goret = UnsafeDVBLinkageEventFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDVBLinkageEventFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -4829,10 +4964,10 @@ func (desc *DVBLinkageDescriptor) GetEvent() *DVBLinkageEvent { // // The function returns the following values: // -// - goret *DVBLinkageMobileHandOver +// - goret *DVBLinkageMobileHandOver (nullable) func (desc *DVBLinkageDescriptor) GetMobileHandOver() *DVBLinkageMobileHandOver { var carg0 *C.GstMpegtsDVBLinkageDescriptor // in, none, converted - var cret *C.GstMpegtsDVBLinkageMobileHandOver // return, none, converted + var cret *C.GstMpegtsDVBLinkageMobileHandOver // return, none, converted, nullable carg0 = (*C.GstMpegtsDVBLinkageDescriptor)(UnsafeDVBLinkageDescriptorToGlibNone(desc)) @@ -4841,7 +4976,9 @@ func (desc *DVBLinkageDescriptor) GetMobileHandOver() *DVBLinkageMobileHandOver var goret *DVBLinkageMobileHandOver - goret = UnsafeDVBLinkageMobileHandOverFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDVBLinkageMobileHandOverFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -4863,8 +5000,11 @@ func marshalDVBLinkageEvent(p unsafe.Pointer) (interface{}, error) { return UnsafeDVBLinkageEventFromGlibBorrow(b), nil } -func (r *DVBLinkageEvent) InitGoValue(v *gobject.Value) { - v.Init(TypeDVBLinkageEvent) +func (r *DVBLinkageEvent) GoValueType() gobject.Type { + return TypeDVBLinkageEvent +} + +func (r *DVBLinkageEvent) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -4936,8 +5076,11 @@ func marshalDVBLinkageExtendedEvent(p unsafe.Pointer) (interface{}, error) { return UnsafeDVBLinkageExtendedEventFromGlibBorrow(b), nil } -func (r *DVBLinkageExtendedEvent) InitGoValue(v *gobject.Value) { - v.Init(TypeDVBLinkageExtendedEvent) +func (r *DVBLinkageExtendedEvent) GoValueType() gobject.Type { + return TypeDVBLinkageExtendedEvent +} + +func (r *DVBLinkageExtendedEvent) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -5009,8 +5152,11 @@ func marshalDVBLinkageMobileHandOver(p unsafe.Pointer) (interface{}, error) { return UnsafeDVBLinkageMobileHandOverFromGlibBorrow(b), nil } -func (r *DVBLinkageMobileHandOver) InitGoValue(v *gobject.Value) { - v.Init(TypeDVBLinkageMobileHandOver) +func (r *DVBLinkageMobileHandOver) GoValueType() gobject.Type { + return TypeDVBLinkageMobileHandOver +} + +func (r *DVBLinkageMobileHandOver) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -5082,8 +5228,11 @@ func marshalDVBParentalRatingItem(p unsafe.Pointer) (interface{}, error) { return UnsafeDVBParentalRatingItemFromGlibBorrow(b), nil } -func (r *DVBParentalRatingItem) InitGoValue(v *gobject.Value) { - v.Init(TypeDVBParentalRatingItem) +func (r *DVBParentalRatingItem) GoValueType() gobject.Type { + return TypeDVBParentalRatingItem +} + +func (r *DVBParentalRatingItem) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -5155,8 +5304,11 @@ func marshalDVBServiceListItem(p unsafe.Pointer) (interface{}, error) { return UnsafeDVBServiceListItemFromGlibBorrow(b), nil } -func (r *DVBServiceListItem) InitGoValue(v *gobject.Value) { - v.Init(TypeDVBServiceListItem) +func (r *DVBServiceListItem) GoValueType() gobject.Type { + return TypeDVBServiceListItem +} + +func (r *DVBServiceListItem) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -5228,8 +5380,11 @@ func marshalDataBroadcastDescriptor(p unsafe.Pointer) (interface{}, error) { return UnsafeDataBroadcastDescriptorFromGlibBorrow(b), nil } -func (r *DataBroadcastDescriptor) InitGoValue(v *gobject.Value) { - v.Init(TypeDataBroadcastDescriptor) +func (r *DataBroadcastDescriptor) GoValueType() gobject.Type { + return TypeDataBroadcastDescriptor +} + +func (r *DataBroadcastDescriptor) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -5306,8 +5461,11 @@ func marshalDescriptor(p unsafe.Pointer) (interface{}, error) { return UnsafeDescriptorFromGlibBorrow(b), nil } -func (r *Descriptor) InitGoValue(v *gobject.Value) { - v.Init(TypeDescriptor) +func (r *Descriptor) GoValueType() gobject.Type { + return TypeDescriptor +} + +func (r *Descriptor) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -5371,14 +5529,14 @@ func UnsafeDescriptorToGlibFull(d *Descriptor) unsafe.Pointer { // // The function returns the following values: // -// - goret *Descriptor +// - goret *Descriptor (nullable) // // Creates a #GstMpegtsDescriptor with custom @tag and @data func DescriptorFromCustom(tag uint8, data []uint8) *Descriptor { var carg1 C.guint8 // in, none, casted var carg2 *C.guint8 // in, transfer: none, C Pointers: 1, Name: array[guint8], array (inner: *typesystem.CastablePrimitive, length-by: carg3) var carg3 C.gsize // implicit - var cret *C.GstMpegtsDescriptor // return, full, converted + var cret *C.GstMpegtsDescriptor // return, full, converted, nullable carg1 = C.guint8(tag) _ = data @@ -5392,7 +5550,9 @@ func DescriptorFromCustom(tag uint8, data []uint8) *Descriptor { var goret *Descriptor - goret = UnsafeDescriptorFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDescriptorFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -5444,14 +5604,14 @@ func DescriptorFromCustomWithExtension(tag uint8, tagExtension uint8, data []uin // // The function returns the following values: // -// - goret *Descriptor +// - goret *Descriptor (nullable) // // Creates a #GstMpegtsDescriptor to be a %GST_MTS_DESC_DVB_NETWORK_NAME, // with the network name @name. The data field of the #GstMpegtsDescriptor // will be allocated, and transferred to the caller. func DescriptorFromDvbNetworkName(name string) *Descriptor { var carg1 *C.gchar // in, none, string - var cret *C.GstMpegtsDescriptor // return, full, converted + var cret *C.GstMpegtsDescriptor // return, full, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) defer C.free(unsafe.Pointer(carg1)) @@ -5461,7 +5621,9 @@ func DescriptorFromDvbNetworkName(name string) *Descriptor { var goret *Descriptor - goret = UnsafeDescriptorFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDescriptorFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -5476,7 +5638,7 @@ func DescriptorFromDvbNetworkName(name string) *Descriptor { // // The function returns the following values: // -// - goret *Descriptor +// - goret *Descriptor (nullable) // // Fills a #GstMpegtsDescriptor to be a %GST_MTS_DESC_DVB_SERVICE. // The data field of the #GstMpegtsDescriptor will be allocated, @@ -5485,7 +5647,7 @@ func DescriptorFromDvbService(serviceType DVBServiceType, serviceName string, se var carg1 C.GstMpegtsDVBServiceType // in, none, casted var carg2 *C.gchar // in, none, string, nullable-string var carg3 *C.gchar // in, none, string, nullable-string - var cret *C.GstMpegtsDescriptor // return, full, converted + var cret *C.GstMpegtsDescriptor // return, full, converted, nullable carg1 = C.GstMpegtsDVBServiceType(serviceType) if serviceName != "" { @@ -5504,7 +5666,9 @@ func DescriptorFromDvbService(serviceType DVBServiceType, serviceName string, se var goret *Descriptor - goret = UnsafeDescriptorFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDescriptorFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -5576,6 +5740,83 @@ func DescriptorFromISO639Language(language string) *Descriptor { return goret } +// DescriptorFromJPEGXS wraps gst_mpegts_descriptor_from_jpeg_xs +// +// The function takes the following parameters: +// +// - jpegxs *JpegXsDescriptor: A #GstMpegtsJpegXsDescriptor +// +// The function returns the following values: +// +// - goret *Descriptor +// +// Create a new #GstMpegtsDescriptor based on the information in @jpegxs +func DescriptorFromJPEGXS(jpegxs *JpegXsDescriptor) *Descriptor { + var carg1 *C.GstMpegtsJpegXsDescriptor // in, none, converted + var cret *C.GstMpegtsDescriptor // return, full, converted + + carg1 = (*C.GstMpegtsJpegXsDescriptor)(UnsafeJpegXsDescriptorToGlibNone(jpegxs)) + + cret = C.gst_mpegts_descriptor_from_jpeg_xs(carg1) + runtime.KeepAlive(jpegxs) + + var goret *Descriptor + + goret = UnsafeDescriptorFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// DescriptorFromMetadata wraps gst_mpegts_descriptor_from_metadata +// +// The function takes the following parameters: +// +// - metadataDescriptor *MetadataDescriptor +// +// The function returns the following values: +// +// - goret *Descriptor +func DescriptorFromMetadata(metadataDescriptor *MetadataDescriptor) *Descriptor { + var carg1 *C.GstMpegtsMetadataDescriptor // in, none, converted + var cret *C.GstMpegtsDescriptor // return, full, converted + + carg1 = (*C.GstMpegtsMetadataDescriptor)(UnsafeMetadataDescriptorToGlibNone(metadataDescriptor)) + + cret = C.gst_mpegts_descriptor_from_metadata(carg1) + runtime.KeepAlive(metadataDescriptor) + + var goret *Descriptor + + goret = UnsafeDescriptorFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// DescriptorFromMetadataPointer wraps gst_mpegts_descriptor_from_metadata_pointer +// +// The function takes the following parameters: +// +// - metadataPointerDescriptor *MetadataPointerDescriptor: a #GstMpegtsMetadataPointerDescriptor +// +// The function returns the following values: +// +// - goret *Descriptor +func DescriptorFromMetadataPointer(metadataPointerDescriptor *MetadataPointerDescriptor) *Descriptor { + var carg1 *C.GstMpegtsMetadataPointerDescriptor // in, none, converted + var cret *C.GstMpegtsDescriptor // return, full, converted + + carg1 = (*C.GstMpegtsMetadataPointerDescriptor)(UnsafeMetadataPointerDescriptorToGlibNone(metadataPointerDescriptor)) + + cret = C.gst_mpegts_descriptor_from_metadata_pointer(carg1) + runtime.KeepAlive(metadataPointerDescriptor) + + var goret *Descriptor + + goret = UnsafeDescriptorFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + // DescriptorFromRegistration wraps gst_mpegts_descriptor_from_registration // // The function takes the following parameters: @@ -5640,6 +5881,29 @@ func DescriptorParseAudioPreselectionFree(source *AudioPreselectionDescriptor) { runtime.KeepAlive(source) } +// Copy wraps gst_mpegts_descriptor_copy +// +// The function returns the following values: +// +// - goret *Descriptor +// +// Copy the given descriptor. +func (desc *Descriptor) Copy() *Descriptor { + var carg0 *C.GstMpegtsDescriptor // in, none, converted + var cret *C.GstMpegtsDescriptor // return, full, converted + + carg0 = (*C.GstMpegtsDescriptor)(UnsafeDescriptorToGlibNone(desc)) + + cret = C.gst_mpegts_descriptor_copy(carg0) + runtime.KeepAlive(desc) + + var goret *Descriptor + + goret = UnsafeDescriptorFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + // ParseCableDeliverySystem wraps gst_mpegts_descriptor_parse_cable_delivery_system // // The function returns the following values: @@ -6290,6 +6554,37 @@ func (descriptor *Descriptor) ParseISO639LanguageNb() uint { return goret } +// ParseJPEGXS wraps gst_mpegts_descriptor_parse_jpeg_xs +// +// The function returns the following values: +// +// - res JpegXsDescriptor: A parsed #GstMpegtsJpegXsDescriptor +// - goret bool +// +// Parses the JPEG-XS descriptor information from @descriptor: +func (descriptor *Descriptor) ParseJPEGXS() (JpegXsDescriptor, bool) { + var carg0 *C.GstMpegtsDescriptor // in, none, converted + var carg1 C.GstMpegtsJpegXsDescriptor // out, transfer: none, C Pointers: 0, Name: JpegXsDescriptor, caller-allocates + var cret C.gboolean // return + + carg0 = (*C.GstMpegtsDescriptor)(UnsafeDescriptorToGlibNone(descriptor)) + + cret = C.gst_mpegts_descriptor_parse_jpeg_xs(carg0, &carg1) + runtime.KeepAlive(descriptor) + + var res JpegXsDescriptor + var goret bool + + _ = res + _ = carg1 + panic("unimplemented conversion of JpegXsDescriptor (GstMpegtsJpegXsDescriptor)") + if cret != 0 { + goret = true + } + + return res, goret +} + // ParseLogicalChannel wraps gst_mpegts_descriptor_parse_logical_channel // // The function returns the following values: @@ -6483,8 +6778,11 @@ func marshalDvbMultilingualBouquetNameItem(p unsafe.Pointer) (interface{}, error return UnsafeDvbMultilingualBouquetNameItemFromGlibBorrow(b), nil } -func (r *DvbMultilingualBouquetNameItem) InitGoValue(v *gobject.Value) { - v.Init(TypeDvbMultilingualBouquetNameItem) +func (r *DvbMultilingualBouquetNameItem) GoValueType() gobject.Type { + return TypeDvbMultilingualBouquetNameItem +} + +func (r *DvbMultilingualBouquetNameItem) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -6556,8 +6854,11 @@ func marshalDvbMultilingualComponentItem(p unsafe.Pointer) (interface{}, error) return UnsafeDvbMultilingualComponentItemFromGlibBorrow(b), nil } -func (r *DvbMultilingualComponentItem) InitGoValue(v *gobject.Value) { - v.Init(TypeDvbMultilingualComponentItem) +func (r *DvbMultilingualComponentItem) GoValueType() gobject.Type { + return TypeDvbMultilingualComponentItem +} + +func (r *DvbMultilingualComponentItem) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -6631,8 +6932,11 @@ func marshalDvbMultilingualNetworkNameItem(p unsafe.Pointer) (interface{}, error return UnsafeDvbMultilingualNetworkNameItemFromGlibBorrow(b), nil } -func (r *DvbMultilingualNetworkNameItem) InitGoValue(v *gobject.Value) { - v.Init(TypeDvbMultilingualNetworkNameItem) +func (r *DvbMultilingualNetworkNameItem) GoValueType() gobject.Type { + return TypeDvbMultilingualNetworkNameItem +} + +func (r *DvbMultilingualNetworkNameItem) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -6706,8 +7010,11 @@ func marshalDvbMultilingualServiceNameItem(p unsafe.Pointer) (interface{}, error return UnsafeDvbMultilingualServiceNameItemFromGlibBorrow(b), nil } -func (r *DvbMultilingualServiceNameItem) InitGoValue(v *gobject.Value) { - v.Init(TypeDvbMultilingualServiceNameItem) +func (r *DvbMultilingualServiceNameItem) GoValueType() gobject.Type { + return TypeDvbMultilingualServiceNameItem +} + +func (r *DvbMultilingualServiceNameItem) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -6781,8 +7088,11 @@ func marshalEIT(p unsafe.Pointer) (interface{}, error) { return UnsafeEITFromGlibBorrow(b), nil } -func (r *EIT) InitGoValue(v *gobject.Value) { - v.Init(TypeEIT) +func (r *EIT) GoValueType() gobject.Type { + return TypeEIT +} + +func (r *EIT) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -6856,8 +7166,11 @@ func marshalEITEvent(p unsafe.Pointer) (interface{}, error) { return UnsafeEITEventFromGlibBorrow(b), nil } -func (r *EITEvent) InitGoValue(v *gobject.Value) { - v.Init(TypeEITEvent) +func (r *EITEvent) GoValueType() gobject.Type { + return TypeEITEvent +} + +func (r *EITEvent) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -6931,8 +7244,11 @@ func marshalExtendedEventDescriptor(p unsafe.Pointer) (interface{}, error) { return UnsafeExtendedEventDescriptorFromGlibBorrow(b), nil } -func (r *ExtendedEventDescriptor) InitGoValue(v *gobject.Value) { - v.Init(TypeExtendedEventDescriptor) +func (r *ExtendedEventDescriptor) GoValueType() gobject.Type { + return TypeExtendedEventDescriptor +} + +func (r *ExtendedEventDescriptor) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -7004,8 +7320,11 @@ func marshalExtendedEventItem(p unsafe.Pointer) (interface{}, error) { return UnsafeExtendedEventItemFromGlibBorrow(b), nil } -func (r *ExtendedEventItem) InitGoValue(v *gobject.Value) { - v.Init(TypeExtendedEventItem) +func (r *ExtendedEventItem) GoValueType() gobject.Type { + return TypeExtendedEventItem +} + +func (r *ExtendedEventItem) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -7077,8 +7396,11 @@ func marshalISO639LanguageDescriptor(p unsafe.Pointer) (interface{}, error) { return UnsafeISO639LanguageDescriptorFromGlibBorrow(b), nil } -func (r *ISO639LanguageDescriptor) InitGoValue(v *gobject.Value) { - v.Init(TypeISO639LanguageDescriptor) +func (r *ISO639LanguageDescriptor) GoValueType() gobject.Type { + return TypeISO639LanguageDescriptor +} + +func (r *ISO639LanguageDescriptor) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -7143,6 +7465,84 @@ func (desc *ISO639LanguageDescriptor) DescriptorFree() { runtime.KeepAlive(desc) } +// JpegXsDescriptor wraps GstMpegtsJpegXsDescriptor +// +// JPEG-XS descriptor +type JpegXsDescriptor struct { + *jpegXsDescriptor +} + +// jpegXsDescriptor is the struct that's finalized +type jpegXsDescriptor struct { + native *C.GstMpegtsJpegXsDescriptor +} + +var _ gobject.GoValueInitializer = (*JpegXsDescriptor)(nil) + +func marshalJpegXsDescriptor(p unsafe.Pointer) (interface{}, error) { + b := gobject.ValueFromNative(p).Boxed() + return UnsafeJpegXsDescriptorFromGlibBorrow(b), nil +} + +func (r *JpegXsDescriptor) GoValueType() gobject.Type { + return TypeJpegXsDescriptor +} + +func (r *JpegXsDescriptor) SetGoValue(v *gobject.Value) { + v.SetBoxed(unsafe.Pointer(r.native)) +} + +// UnsafeJpegXsDescriptorFromGlibBorrow is used to convert raw C.GstMpegtsJpegXsDescriptor pointers to go. This is used by the bindings internally. +func UnsafeJpegXsDescriptorFromGlibBorrow(p unsafe.Pointer) *JpegXsDescriptor { + return &JpegXsDescriptor{&jpegXsDescriptor{(*C.GstMpegtsJpegXsDescriptor)(p)}} +} + +// UnsafeJpegXsDescriptorFromGlibNone is used to convert raw C.GstMpegtsJpegXsDescriptor pointers to go without transferring ownership. This is used by the bindings internally. +func UnsafeJpegXsDescriptorFromGlibNone(p unsafe.Pointer) *JpegXsDescriptor { + // FIXME: this has no ref function, what should we do here? + wrapped := UnsafeJpegXsDescriptorFromGlibBorrow(p) + runtime.SetFinalizer( + wrapped.jpegXsDescriptor, + func (intern *jpegXsDescriptor) { + C.free(unsafe.Pointer(intern.native)) + }, + ) + return wrapped +} + +// UnsafeJpegXsDescriptorFromGlibFull is used to convert raw C.GstMpegtsJpegXsDescriptor pointers to go while taking ownership. This is used by the bindings internally. +func UnsafeJpegXsDescriptorFromGlibFull(p unsafe.Pointer) *JpegXsDescriptor { + wrapped := UnsafeJpegXsDescriptorFromGlibBorrow(p) + runtime.SetFinalizer( + wrapped.jpegXsDescriptor, + func (intern *jpegXsDescriptor) { + C.free(unsafe.Pointer(intern.native)) + }, + ) + return wrapped +} + +// UnsafeJpegXsDescriptorFree unrefs/frees the underlying resource. This is used by the bindings internally. +// +// After this is called, no other method on [JpegXsDescriptor] is expected to work anymore. +func UnsafeJpegXsDescriptorFree(j *JpegXsDescriptor) { + C.free(unsafe.Pointer(j.native)) +} + +// UnsafeJpegXsDescriptorToGlibNone returns the underlying C pointer. This is used by the bindings internally. +func UnsafeJpegXsDescriptorToGlibNone(j *JpegXsDescriptor) unsafe.Pointer { + return unsafe.Pointer(j.native) +} + +// UnsafeJpegXsDescriptorToGlibFull returns the underlying C pointer and gives up ownership. +// This is used by the bindings internally. +func UnsafeJpegXsDescriptorToGlibFull(j *JpegXsDescriptor) unsafe.Pointer { + runtime.SetFinalizer(j.jpegXsDescriptor, nil) + _p := unsafe.Pointer(j.native) + j.native = nil // JpegXsDescriptor is invalid from here on + return _p +} + // LogicalChannel wraps GstMpegtsLogicalChannel type LogicalChannel struct { *logicalChannel @@ -7160,8 +7560,11 @@ func marshalLogicalChannel(p unsafe.Pointer) (interface{}, error) { return UnsafeLogicalChannelFromGlibBorrow(b), nil } -func (r *LogicalChannel) InitGoValue(v *gobject.Value) { - v.Init(TypeLogicalChannel) +func (r *LogicalChannel) GoValueType() gobject.Type { + return TypeLogicalChannel +} + +func (r *LogicalChannel) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -7233,8 +7636,11 @@ func marshalLogicalChannelDescriptor(p unsafe.Pointer) (interface{}, error) { return UnsafeLogicalChannelDescriptorFromGlibBorrow(b), nil } -func (r *LogicalChannelDescriptor) InitGoValue(v *gobject.Value) { - v.Init(TypeLogicalChannelDescriptor) +func (r *LogicalChannelDescriptor) GoValueType() gobject.Type { + return TypeLogicalChannelDescriptor +} + +func (r *LogicalChannelDescriptor) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -7313,8 +7719,11 @@ func marshalMetadataDescriptor(p unsafe.Pointer) (interface{}, error) { return UnsafeMetadataDescriptorFromGlibBorrow(b), nil } -func (r *MetadataDescriptor) InitGoValue(v *gobject.Value) { - v.Init(TypeMetadataDescriptor) +func (r *MetadataDescriptor) GoValueType() gobject.Type { + return TypeMetadataDescriptor +} + +func (r *MetadataDescriptor) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -7369,6 +7778,91 @@ func UnsafeMetadataDescriptorToGlibFull(m *MetadataDescriptor) unsafe.Pointer { return _p } +// MetadataPointerDescriptor wraps GstMpegtsMetadataPointerDescriptor +// +// This structure is not complete. The following fields are missing in comparison to the standard (ISO/IEC 13818-1:2023 Section 2.6.58): +// * metadata_locator_record_flag: hardcoded to 0. Indicating no metadata_locator_record present in the descriptor. +// * MPEG_carriage_flags: hardcoded to 0b00, indicating the metadata is carried in the same transport steam. +// * metadata_locator_record_length. +// * transport_stream_location. +// * transport_stream_id. +// +// See also: gst_mpegts_descriptor_from_metadata_pointer +type MetadataPointerDescriptor struct { + *metadataPointerDescriptor +} + +// metadataPointerDescriptor is the struct that's finalized +type metadataPointerDescriptor struct { + native *C.GstMpegtsMetadataPointerDescriptor +} + +var _ gobject.GoValueInitializer = (*MetadataPointerDescriptor)(nil) + +func marshalMetadataPointerDescriptor(p unsafe.Pointer) (interface{}, error) { + b := gobject.ValueFromNative(p).Boxed() + return UnsafeMetadataPointerDescriptorFromGlibBorrow(b), nil +} + +func (r *MetadataPointerDescriptor) GoValueType() gobject.Type { + return TypeMetadataPointerDescriptor +} + +func (r *MetadataPointerDescriptor) SetGoValue(v *gobject.Value) { + v.SetBoxed(unsafe.Pointer(r.native)) +} + +// UnsafeMetadataPointerDescriptorFromGlibBorrow is used to convert raw C.GstMpegtsMetadataPointerDescriptor pointers to go. This is used by the bindings internally. +func UnsafeMetadataPointerDescriptorFromGlibBorrow(p unsafe.Pointer) *MetadataPointerDescriptor { + return &MetadataPointerDescriptor{&metadataPointerDescriptor{(*C.GstMpegtsMetadataPointerDescriptor)(p)}} +} + +// UnsafeMetadataPointerDescriptorFromGlibNone is used to convert raw C.GstMpegtsMetadataPointerDescriptor pointers to go without transferring ownership. This is used by the bindings internally. +func UnsafeMetadataPointerDescriptorFromGlibNone(p unsafe.Pointer) *MetadataPointerDescriptor { + // FIXME: this has no ref function, what should we do here? + wrapped := UnsafeMetadataPointerDescriptorFromGlibBorrow(p) + runtime.SetFinalizer( + wrapped.metadataPointerDescriptor, + func (intern *metadataPointerDescriptor) { + C.free(unsafe.Pointer(intern.native)) + }, + ) + return wrapped +} + +// UnsafeMetadataPointerDescriptorFromGlibFull is used to convert raw C.GstMpegtsMetadataPointerDescriptor pointers to go while taking ownership. This is used by the bindings internally. +func UnsafeMetadataPointerDescriptorFromGlibFull(p unsafe.Pointer) *MetadataPointerDescriptor { + wrapped := UnsafeMetadataPointerDescriptorFromGlibBorrow(p) + runtime.SetFinalizer( + wrapped.metadataPointerDescriptor, + func (intern *metadataPointerDescriptor) { + C.free(unsafe.Pointer(intern.native)) + }, + ) + return wrapped +} + +// UnsafeMetadataPointerDescriptorFree unrefs/frees the underlying resource. This is used by the bindings internally. +// +// After this is called, no other method on [MetadataPointerDescriptor] is expected to work anymore. +func UnsafeMetadataPointerDescriptorFree(m *MetadataPointerDescriptor) { + C.free(unsafe.Pointer(m.native)) +} + +// UnsafeMetadataPointerDescriptorToGlibNone returns the underlying C pointer. This is used by the bindings internally. +func UnsafeMetadataPointerDescriptorToGlibNone(m *MetadataPointerDescriptor) unsafe.Pointer { + return unsafe.Pointer(m.native) +} + +// UnsafeMetadataPointerDescriptorToGlibFull returns the underlying C pointer and gives up ownership. +// This is used by the bindings internally. +func UnsafeMetadataPointerDescriptorToGlibFull(m *MetadataPointerDescriptor) unsafe.Pointer { + runtime.SetFinalizer(m.metadataPointerDescriptor, nil) + _p := unsafe.Pointer(m.native) + m.native = nil // MetadataPointerDescriptor is invalid from here on + return _p +} + // NIT wraps GstMpegtsNIT // // Network Information Table (ISO/IEC 13818-1 / EN 300 468) @@ -7388,8 +7882,11 @@ func marshalNIT(p unsafe.Pointer) (interface{}, error) { return UnsafeNITFromGlibBorrow(b), nil } -func (r *NIT) InitGoValue(v *gobject.Value) { - v.Init(TypeNIT) +func (r *NIT) GoValueType() gobject.Type { + return TypeNIT +} + +func (r *NIT) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -7480,8 +7977,11 @@ func marshalNITStream(p unsafe.Pointer) (interface{}, error) { return UnsafeNITStreamFromGlibBorrow(b), nil } -func (r *NITStream) InitGoValue(v *gobject.Value) { - v.Init(TypeNITStream) +func (r *NITStream) GoValueType() gobject.Type { + return TypeNITStream +} + +func (r *NITStream) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -7664,8 +8164,11 @@ func marshalPMT(p unsafe.Pointer) (interface{}, error) { return UnsafePMTFromGlibBorrow(b), nil } -func (r *PMT) InitGoValue(v *gobject.Value) { - v.Init(TypePMT) +func (r *PMT) GoValueType() gobject.Type { + return TypePMT +} + +func (r *PMT) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -7760,8 +8263,11 @@ func marshalPMTStream(p unsafe.Pointer) (interface{}, error) { return UnsafePMTStreamFromGlibBorrow(b), nil } -func (r *PMTStream) InitGoValue(v *gobject.Value) { - v.Init(TypePMTStream) +func (r *PMTStream) GoValueType() gobject.Type { + return TypePMTStream +} + +func (r *PMTStream) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -7854,8 +8360,11 @@ func marshalPatProgram(p unsafe.Pointer) (interface{}, error) { return UnsafePatProgramFromGlibBorrow(b), nil } -func (r *PatProgram) InitGoValue(v *gobject.Value) { - v.Init(TypePatProgram) +func (r *PatProgram) GoValueType() gobject.Type { + return TypePatProgram +} + +func (r *PatProgram) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -7946,8 +8455,11 @@ func marshalSCTESIT(p unsafe.Pointer) (interface{}, error) { return UnsafeSCTESITFromGlibBorrow(b), nil } -func (r *SCTESIT) InitGoValue(v *gobject.Value) { - v.Init(TypeSCTESIT) +func (r *SCTESIT) GoValueType() gobject.Type { + return TypeSCTESIT +} + +func (r *SCTESIT) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -8040,8 +8552,11 @@ func marshalSCTESpliceComponent(p unsafe.Pointer) (interface{}, error) { return UnsafeSCTESpliceComponentFromGlibBorrow(b), nil } -func (r *SCTESpliceComponent) InitGoValue(v *gobject.Value) { - v.Init(TypeSCTESpliceComponent) +func (r *SCTESpliceComponent) GoValueType() gobject.Type { + return TypeSCTESpliceComponent +} + +func (r *SCTESpliceComponent) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -8140,8 +8655,11 @@ func marshalSCTESpliceEvent(p unsafe.Pointer) (interface{}, error) { return UnsafeSCTESpliceEventFromGlibBorrow(b), nil } -func (r *SCTESpliceEvent) InitGoValue(v *gobject.Value) { - v.Init(TypeSCTESpliceEvent) +func (r *SCTESpliceEvent) GoValueType() gobject.Type { + return TypeSCTESpliceEvent +} + +func (r *SCTESpliceEvent) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -8234,8 +8752,11 @@ func marshalSDT(p unsafe.Pointer) (interface{}, error) { return UnsafeSDTFromGlibBorrow(b), nil } -func (r *SDT) InitGoValue(v *gobject.Value) { - v.Init(TypeSDT) +func (r *SDT) GoValueType() gobject.Type { + return TypeSDT +} + +func (r *SDT) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -8326,8 +8847,11 @@ func marshalSDTService(p unsafe.Pointer) (interface{}, error) { return UnsafeSDTServiceFromGlibBorrow(b), nil } -func (r *SDTService) InitGoValue(v *gobject.Value) { - v.Init(TypeSDTService) +func (r *SDTService) GoValueType() gobject.Type { + return TypeSDTService +} + +func (r *SDTService) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -8420,8 +8944,11 @@ func marshalSIT(p unsafe.Pointer) (interface{}, error) { return UnsafeSITFromGlibBorrow(b), nil } -func (r *SIT) InitGoValue(v *gobject.Value) { - v.Init(TypeSIT) +func (r *SIT) GoValueType() gobject.Type { + return TypeSIT +} + +func (r *SIT) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -8495,8 +9022,11 @@ func marshalSITService(p unsafe.Pointer) (interface{}, error) { return UnsafeSITServiceFromGlibBorrow(b), nil } -func (r *SITService) InitGoValue(v *gobject.Value) { - v.Init(TypeSITService) +func (r *SITService) GoValueType() gobject.Type { + return TypeSITService +} + +func (r *SITService) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -8570,8 +9100,11 @@ func marshalSatelliteDeliverySystemDescriptor(p unsafe.Pointer) (interface{}, er return UnsafeSatelliteDeliverySystemDescriptorFromGlibBorrow(b), nil } -func (r *SatelliteDeliverySystemDescriptor) InitGoValue(v *gobject.Value) { - v.Init(TypeSatelliteDeliverySystemDescriptor) +func (r *SatelliteDeliverySystemDescriptor) GoValueType() gobject.Type { + return TypeSatelliteDeliverySystemDescriptor +} + +func (r *SatelliteDeliverySystemDescriptor) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -8688,8 +9221,11 @@ func marshalSection(p unsafe.Pointer) (interface{}, error) { return UnsafeSectionFromGlibBorrow(b), nil } -func (r *Section) InitGoValue(v *gobject.Value) { - v.Init(TypeSection) +func (r *Section) GoValueType() gobject.Type { + return TypeSection +} + +func (r *Section) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -8795,10 +9331,10 @@ func NewSection(pid uint16, data []uint8) *Section { // // The function returns the following values: // -// - goret *Section +// - goret *Section (nullable) func SectionFromAtscMgt(mgt *AtscMGT) *Section { var carg1 *C.GstMpegtsAtscMGT // in, full, converted - var cret *C.GstMpegtsSection // return, full, converted + var cret *C.GstMpegtsSection // return, full, converted, nullable carg1 = (*C.GstMpegtsAtscMGT)(UnsafeAtscMGTToGlibFull(mgt)) @@ -8807,7 +9343,9 @@ func SectionFromAtscMgt(mgt *AtscMGT) *Section { var goret *Section - goret = UnsafeSectionFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeSectionFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -8870,12 +9408,12 @@ func SectionFromAtscStt(stt *AtscSTT) *Section { // // The function returns the following values: // -// - goret *Section +// - goret *Section (nullable) // // Ownership of @nit is taken. The data in @nit is managed by the #GstMpegtsSection func SectionFromNit(nit *NIT) *Section { var carg1 *C.GstMpegtsNIT // in, full, converted - var cret *C.GstMpegtsSection // return, full, converted + var cret *C.GstMpegtsSection // return, full, converted, nullable carg1 = (*C.GstMpegtsNIT)(UnsafeNITToGlibFull(nit)) @@ -8884,7 +9422,9 @@ func SectionFromNit(nit *NIT) *Section { var goret *Section - goret = UnsafeSectionFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeSectionFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -8898,13 +9438,13 @@ func SectionFromNit(nit *NIT) *Section { // // The function returns the following values: // -// - goret *Section +// - goret *Section (nullable) // // Creates a #GstMpegtsSection from @pmt that is bound to @pid func SectionFromPmt(pmt *PMT, pid uint16) *Section { var carg1 *C.GstMpegtsPMT // in, full, converted var carg2 C.guint16 // in, none, casted - var cret *C.GstMpegtsSection // return, full, converted + var cret *C.GstMpegtsSection // return, full, converted, nullable carg1 = (*C.GstMpegtsPMT)(UnsafePMTToGlibFull(pmt)) carg2 = C.guint16(pid) @@ -8915,7 +9455,9 @@ func SectionFromPmt(pmt *PMT, pid uint16) *Section { var goret *Section - goret = UnsafeSectionFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeSectionFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -8929,13 +9471,13 @@ func SectionFromPmt(pmt *PMT, pid uint16) *Section { // // The function returns the following values: // -// - goret *Section +// - goret *Section (nullable) // // Ownership of @sit is taken. The data in @sit is managed by the #GstMpegtsSection func SectionFromScteSit(sit *SCTESIT, pid uint16) *Section { var carg1 *C.GstMpegtsSCTESIT // in, full, converted var carg2 C.guint16 // in, none, casted - var cret *C.GstMpegtsSection // return, full, converted + var cret *C.GstMpegtsSection // return, full, converted, nullable carg1 = (*C.GstMpegtsSCTESIT)(UnsafeSCTESITToGlibFull(sit)) carg2 = C.guint16(pid) @@ -8946,7 +9488,9 @@ func SectionFromScteSit(sit *SCTESIT, pid uint16) *Section { var goret *Section - goret = UnsafeSectionFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeSectionFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -8959,12 +9503,12 @@ func SectionFromScteSit(sit *SCTESIT, pid uint16) *Section { // // The function returns the following values: // -// - goret *Section +// - goret *Section (nullable) // // Ownership of @sdt is taken. The data in @sdt is managed by the #GstMpegtsSection func SectionFromSdt(sdt *SDT) *Section { var carg1 *C.GstMpegtsSDT // in, full, converted - var cret *C.GstMpegtsSection // return, full, converted + var cret *C.GstMpegtsSection // return, full, converted, nullable carg1 = (*C.GstMpegtsSDT)(UnsafeSDTToGlibFull(sdt)) @@ -8973,7 +9517,9 @@ func SectionFromSdt(sdt *SDT) *Section { var goret *Section - goret = UnsafeSectionFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeSectionFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -8982,12 +9528,12 @@ func SectionFromSdt(sdt *SDT) *Section { // // The function returns the following values: // -// - goret *AtscVCT +// - goret *AtscVCT (nullable) // // Returns the #GstMpegtsAtscVCT contained in the @section func (section *Section) GetAtscCvct() *AtscVCT { var carg0 *C.GstMpegtsSection // in, none, converted - var cret *C.GstMpegtsAtscVCT // return, none, converted + var cret *C.GstMpegtsAtscVCT // return, none, converted, nullable carg0 = (*C.GstMpegtsSection)(UnsafeSectionToGlibNone(section)) @@ -8996,7 +9542,9 @@ func (section *Section) GetAtscCvct() *AtscVCT { var goret *AtscVCT - goret = UnsafeAtscVCTFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeAtscVCTFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -9051,12 +9599,12 @@ func (section *Section) GetAtscEtt() *AtscETT { // // The function returns the following values: // -// - goret *AtscMGT +// - goret *AtscMGT (nullable) // // Returns the #GstMpegtsAtscMGT contained in the @section. func (section *Section) GetAtscMgt() *AtscMGT { var carg0 *C.GstMpegtsSection // in, none, converted - var cret *C.GstMpegtsAtscMGT // return, none, converted + var cret *C.GstMpegtsAtscMGT // return, none, converted, nullable carg0 = (*C.GstMpegtsSection)(UnsafeSectionToGlibNone(section)) @@ -9065,7 +9613,9 @@ func (section *Section) GetAtscMgt() *AtscMGT { var goret *AtscMGT - goret = UnsafeAtscMGTFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeAtscMGTFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -9120,12 +9670,12 @@ func (section *Section) GetAtscStt() *AtscSTT { // // The function returns the following values: // -// - goret *AtscVCT +// - goret *AtscVCT (nullable) // // Returns the #GstMpegtsAtscVCT contained in the @section func (section *Section) GetAtscTvct() *AtscVCT { var carg0 *C.GstMpegtsSection // in, none, converted - var cret *C.GstMpegtsAtscVCT // return, none, converted + var cret *C.GstMpegtsAtscVCT // return, none, converted, nullable carg0 = (*C.GstMpegtsSection)(UnsafeSectionToGlibNone(section)) @@ -9134,7 +9684,9 @@ func (section *Section) GetAtscTvct() *AtscVCT { var goret *AtscVCT - goret = UnsafeAtscVCTFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeAtscVCTFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -9143,12 +9695,12 @@ func (section *Section) GetAtscTvct() *AtscVCT { // // The function returns the following values: // -// - goret *BAT +// - goret *BAT (nullable) // // Returns the #GstMpegtsBAT contained in the @section. func (section *Section) GetBat() *BAT { var carg0 *C.GstMpegtsSection // in, none, converted - var cret *C.GstMpegtsBAT // return, none, converted + var cret *C.GstMpegtsBAT // return, none, converted, nullable carg0 = (*C.GstMpegtsSection)(UnsafeSectionToGlibNone(section)) @@ -9157,7 +9709,9 @@ func (section *Section) GetBat() *BAT { var goret *BAT - goret = UnsafeBATFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeBATFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -9189,12 +9743,12 @@ func (section *Section) GetData() *glib.Bytes { // // The function returns the following values: // -// - goret *EIT +// - goret *EIT (nullable) // // Returns the #GstMpegtsEIT contained in the @section. func (section *Section) GetEit() *EIT { var carg0 *C.GstMpegtsSection // in, none, converted - var cret *C.GstMpegtsEIT // return, none, converted + var cret *C.GstMpegtsEIT // return, none, converted, nullable carg0 = (*C.GstMpegtsSection)(UnsafeSectionToGlibNone(section)) @@ -9203,7 +9757,9 @@ func (section *Section) GetEit() *EIT { var goret *EIT - goret = UnsafeEITFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeEITFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -9212,12 +9768,12 @@ func (section *Section) GetEit() *EIT { // // The function returns the following values: // -// - goret *NIT +// - goret *NIT (nullable) // // Returns the #GstMpegtsNIT contained in the @section. func (section *Section) GetNit() *NIT { var carg0 *C.GstMpegtsSection // in, none, converted - var cret *C.GstMpegtsNIT // return, none, converted + var cret *C.GstMpegtsNIT // return, none, converted, nullable carg0 = (*C.GstMpegtsSection)(UnsafeSectionToGlibNone(section)) @@ -9226,7 +9782,9 @@ func (section *Section) GetNit() *NIT { var goret *NIT - goret = UnsafeNITFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeNITFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -9235,12 +9793,12 @@ func (section *Section) GetNit() *NIT { // // The function returns the following values: // -// - goret *PMT +// - goret *PMT (nullable) // // Parses the Program Map Table contained in the @section. func (section *Section) GetPmt() *PMT { var carg0 *C.GstMpegtsSection // in, none, converted - var cret *C.GstMpegtsPMT // return, none, converted + var cret *C.GstMpegtsPMT // return, none, converted, nullable carg0 = (*C.GstMpegtsSection)(UnsafeSectionToGlibNone(section)) @@ -9249,7 +9807,9 @@ func (section *Section) GetPmt() *PMT { var goret *PMT - goret = UnsafePMTFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePMTFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -9258,12 +9818,12 @@ func (section *Section) GetPmt() *PMT { // // The function returns the following values: // -// - goret *SCTESIT +// - goret *SCTESIT (nullable) // // Returns the #GstMpegtsSCTESIT contained in the @section. func (section *Section) GetScteSit() *SCTESIT { var carg0 *C.GstMpegtsSection // in, none, converted - var cret *C.GstMpegtsSCTESIT // return, none, converted + var cret *C.GstMpegtsSCTESIT // return, none, converted, nullable carg0 = (*C.GstMpegtsSection)(UnsafeSectionToGlibNone(section)) @@ -9272,7 +9832,9 @@ func (section *Section) GetScteSit() *SCTESIT { var goret *SCTESIT - goret = UnsafeSCTESITFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeSCTESITFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -9281,12 +9843,12 @@ func (section *Section) GetScteSit() *SCTESIT { // // The function returns the following values: // -// - goret *SDT +// - goret *SDT (nullable) // // Returns the #GstMpegtsSDT contained in the @section. func (section *Section) GetSdt() *SDT { var carg0 *C.GstMpegtsSection // in, none, converted - var cret *C.GstMpegtsSDT // return, none, converted + var cret *C.GstMpegtsSDT // return, none, converted, nullable carg0 = (*C.GstMpegtsSection)(UnsafeSectionToGlibNone(section)) @@ -9295,7 +9857,9 @@ func (section *Section) GetSdt() *SDT { var goret *SDT - goret = UnsafeSDTFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeSDTFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -9304,12 +9868,12 @@ func (section *Section) GetSdt() *SDT { // // The function returns the following values: // -// - goret *SIT +// - goret *SIT (nullable) // // Returns the #GstMpegtsSIT contained in the @section. func (section *Section) GetSit() *SIT { var carg0 *C.GstMpegtsSection // in, none, converted - var cret *C.GstMpegtsSIT // return, none, converted + var cret *C.GstMpegtsSIT // return, none, converted, nullable carg0 = (*C.GstMpegtsSection)(UnsafeSectionToGlibNone(section)) @@ -9318,7 +9882,9 @@ func (section *Section) GetSit() *SIT { var goret *SIT - goret = UnsafeSITFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeSITFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -9327,12 +9893,12 @@ func (section *Section) GetSit() *SIT { // // The function returns the following values: // -// - goret *gst.DateTime +// - goret *gst.DateTime (nullable) // // Returns the #GstDateTime of the TDT func (section *Section) GetTdt() *gst.DateTime { var carg0 *C.GstMpegtsSection // in, none, converted - var cret *C.GstDateTime // return, full, converted + var cret *C.GstDateTime // return, full, converted, nullable carg0 = (*C.GstMpegtsSection)(UnsafeSectionToGlibNone(section)) @@ -9341,7 +9907,9 @@ func (section *Section) GetTdt() *gst.DateTime { var goret *gst.DateTime - goret = gst.UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -9350,12 +9918,12 @@ func (section *Section) GetTdt() *gst.DateTime { // // The function returns the following values: // -// - goret *TOT +// - goret *TOT (nullable) // // Returns the #GstMpegtsTOT contained in the @section. func (section *Section) GetTot() *TOT { var carg0 *C.GstMpegtsSection // in, none, converted - var cret *C.GstMpegtsTOT // return, none, converted + var cret *C.GstMpegtsTOT // return, none, converted, nullable carg0 = (*C.GstMpegtsSection)(UnsafeSectionToGlibNone(section)) @@ -9364,7 +9932,9 @@ func (section *Section) GetTot() *TOT { var goret *TOT - goret = UnsafeTOTFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeTOTFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -9450,8 +10020,11 @@ func marshalT2DeliverySystemCell(p unsafe.Pointer) (interface{}, error) { return UnsafeT2DeliverySystemCellFromGlibBorrow(b), nil } -func (r *T2DeliverySystemCell) InitGoValue(v *gobject.Value) { - v.Init(TypeT2DeliverySystemCell) +func (r *T2DeliverySystemCell) GoValueType() gobject.Type { + return TypeT2DeliverySystemCell +} + +func (r *T2DeliverySystemCell) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -9523,8 +10096,11 @@ func marshalT2DeliverySystemCellExtension(p unsafe.Pointer) (interface{}, error) return UnsafeT2DeliverySystemCellExtensionFromGlibBorrow(b), nil } -func (r *T2DeliverySystemCellExtension) InitGoValue(v *gobject.Value) { - v.Init(TypeT2DeliverySystemCellExtension) +func (r *T2DeliverySystemCellExtension) GoValueType() gobject.Type { + return TypeT2DeliverySystemCellExtension +} + +func (r *T2DeliverySystemCellExtension) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -9598,8 +10174,11 @@ func marshalT2DeliverySystemDescriptor(p unsafe.Pointer) (interface{}, error) { return UnsafeT2DeliverySystemDescriptorFromGlibBorrow(b), nil } -func (r *T2DeliverySystemDescriptor) InitGoValue(v *gobject.Value) { - v.Init(TypeT2DeliverySystemDescriptor) +func (r *T2DeliverySystemDescriptor) GoValueType() gobject.Type { + return TypeT2DeliverySystemDescriptor +} + +func (r *T2DeliverySystemDescriptor) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -9673,8 +10252,11 @@ func marshalTOT(p unsafe.Pointer) (interface{}, error) { return UnsafeTOTFromGlibBorrow(b), nil } -func (r *TOT) InitGoValue(v *gobject.Value) { - v.Init(TypeTOT) +func (r *TOT) GoValueType() gobject.Type { + return TypeTOT +} + +func (r *TOT) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -9748,8 +10330,11 @@ func marshalTerrestrialDeliverySystemDescriptor(p unsafe.Pointer) (interface{}, return UnsafeTerrestrialDeliverySystemDescriptorFromGlibBorrow(b), nil } -func (r *TerrestrialDeliverySystemDescriptor) InitGoValue(v *gobject.Value) { - v.Init(TypeTerrestrialDeliverySystemDescriptor) +func (r *TerrestrialDeliverySystemDescriptor) GoValueType() gobject.Type { + return TypeTerrestrialDeliverySystemDescriptor +} + +func (r *TerrestrialDeliverySystemDescriptor) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } diff --git a/pkg/gstnet/gstnet.gen.go b/pkg/gstnet/gstnet.gen.go index 4641778..99591a6 100644 --- a/pkg/gstnet/gstnet.gen.go +++ b/pkg/gstnet/gstnet.gen.go @@ -218,14 +218,14 @@ func NetControlMessageMetaApiGetType() gobject.Type { // The function takes the following parameters: // // - socket gio.Socket: Socket to configure -// - qosDscp int: QoS DSCP value +// - qosDscp int32: QoS DSCP value // // The function returns the following values: // // - goret bool // // Configures IP_TOS value of socket, i.e. sets QoS DSCP. -func NetUtilsSetSocketTos(socket gio.Socket, qosDscp int) bool { +func NetUtilsSetSocketTos(socket gio.Socket, qosDscp int32) bool { var carg1 *C.GSocket // in, none, converted var carg2 C.gint // in, none, casted var cret C.gboolean // return @@ -499,6 +499,11 @@ func UnsafeNetClientClockFromGlibFull(c unsafe.Pointer) NetClientClock { return gobject.UnsafeObjectFromGlibFull(c).(NetClientClock) } +// UnsafeNetClientClockFromGlibBorrow is used to convert raw GstNetClientClock pointers to go without touching any references. This is used by the bindings internally. +func UnsafeNetClientClockFromGlibBorrow(c unsafe.Pointer) NetClientClock { + return gobject.UnsafeObjectFromGlibBorrow(c).(NetClientClock) +} + func (n *NetClientClockInstance) upcastToGstNetClientClock() *NetClientClockInstance { return n } @@ -519,7 +524,7 @@ func UnsafeNetClientClockToGlibFull(c NetClientClock) unsafe.Pointer { // // - name string (nullable): a name for the clock // - remoteAddress string: the address or hostname of the remote clock provider -// - remotePort int: the port of the remote clock provider +// - remotePort int32: the port of the remote clock provider // - baseTime gst.ClockTime: initial time of the clock // // The function returns the following values: @@ -529,7 +534,7 @@ func UnsafeNetClientClockToGlibFull(c NetClientClock) unsafe.Pointer { // Create a new #GstNetClientClock that will report the time // provided by the #GstNetTimeProvider on @remote_address and // @remote_port. -func NewNetClientClock(name string, remoteAddress string, remotePort int, baseTime gst.ClockTime) gst.Clock { +func NewNetClientClock(name string, remoteAddress string, remotePort int32, baseTime gst.ClockTime) gst.Clock { var carg1 *C.gchar // in, none, string, nullable-string var carg2 *C.gchar // in, none, string var carg3 C.gint // in, none, casted @@ -652,6 +657,11 @@ func UnsafeNetTimeProviderFromGlibFull(c unsafe.Pointer) NetTimeProvider { return gobject.UnsafeObjectFromGlibFull(c).(NetTimeProvider) } +// UnsafeNetTimeProviderFromGlibBorrow is used to convert raw GstNetTimeProvider pointers to go without touching any references. This is used by the bindings internally. +func UnsafeNetTimeProviderFromGlibBorrow(c unsafe.Pointer) NetTimeProvider { + return gobject.UnsafeObjectFromGlibBorrow(c).(NetTimeProvider) +} + func (n *NetTimeProviderInstance) upcastToGstNetTimeProvider() *NetTimeProviderInstance { return n } @@ -673,14 +683,14 @@ func UnsafeNetTimeProviderToGlibFull(c NetTimeProvider) unsafe.Pointer { // - clock gst.Clock: a #GstClock to export over the network // - address string (nullable): an address to bind on as a dotted quad // (xxx.xxx.xxx.xxx), IPv6 address, or NULL to bind to all addresses -// - port int: a port to bind on, or 0 to let the kernel choose +// - port int32: a port to bind on, or 0 to let the kernel choose // // The function returns the following values: // // - goret NetTimeProvider (nullable) // // Allows network clients to get the current time of @clock. -func NewNetTimeProvider(clock gst.Clock, address string, port int) NetTimeProvider { +func NewNetTimeProvider(clock gst.Clock, address string, port int32) NetTimeProvider { var carg1 *C.GstClock // in, none, converted var carg2 *C.gchar // in, none, string, nullable-string var carg3 C.gint // in, none, casted @@ -791,6 +801,11 @@ func UnsafeNtpClockFromGlibFull(c unsafe.Pointer) NtpClock { return gobject.UnsafeObjectFromGlibFull(c).(NtpClock) } +// UnsafeNtpClockFromGlibBorrow is used to convert raw GstNtpClock pointers to go without touching any references. This is used by the bindings internally. +func UnsafeNtpClockFromGlibBorrow(c unsafe.Pointer) NtpClock { + return gobject.UnsafeObjectFromGlibBorrow(c).(NtpClock) +} + func (n *NtpClockInstance) upcastToGstNtpClock() *NtpClockInstance { return n } @@ -811,7 +826,7 @@ func UnsafeNtpClockToGlibFull(c NtpClock) unsafe.Pointer { // // - name string (nullable): a name for the clock // - remoteAddress string: the address or hostname of the remote clock provider -// - remotePort int: the port of the remote clock provider +// - remotePort int32: the port of the remote clock provider // - baseTime gst.ClockTime: initial time of the clock // // The function returns the following values: @@ -820,7 +835,7 @@ func UnsafeNtpClockToGlibFull(c NtpClock) unsafe.Pointer { // // Create a new #GstNtpClock that will report the time provided by // the NTPv4 server on @remote_address and @remote_port. -func NewNtpClock(name string, remoteAddress string, remotePort int, baseTime gst.ClockTime) gst.Clock { +func NewNtpClock(name string, remoteAddress string, remotePort int32, baseTime gst.ClockTime) gst.Clock { var carg1 *C.gchar // in, none, string, nullable-string var carg2 *C.gchar // in, none, string var carg3 C.gint // in, none, casted @@ -953,6 +968,11 @@ func UnsafePtpClockFromGlibFull(c unsafe.Pointer) PtpClock { return gobject.UnsafeObjectFromGlibFull(c).(PtpClock) } +// UnsafePtpClockFromGlibBorrow is used to convert raw GstPtpClock pointers to go without touching any references. This is used by the bindings internally. +func UnsafePtpClockFromGlibBorrow(c unsafe.Pointer) PtpClock { + return gobject.UnsafeObjectFromGlibBorrow(c).(PtpClock) +} + func (p *PtpClockInstance) upcastToGstPtpClock() *PtpClockInstance { return p } @@ -971,12 +991,12 @@ func UnsafePtpClockToGlibFull(c PtpClock) unsafe.Pointer { // // The function takes the following parameters: // -// - name string: Name of the clock +// - name string (nullable): Name of the clock // - domain uint: PTP domain // // The function returns the following values: // -// - goret gst.Clock +// - goret gst.Clock (nullable) // // Creates a new PTP clock instance that exports the PTP time of the master // clock in @domain. This clock can be slaved to other clocks as needed. @@ -990,12 +1010,14 @@ func UnsafePtpClockToGlibFull(c PtpClock) unsafe.Pointer { // check this with gst_clock_wait_for_sync(), the GstClock::synced signal and // gst_clock_is_synced(). func NewPtpClock(name string, domain uint) gst.Clock { - var carg1 *C.gchar // in, none, string + var carg1 *C.gchar // in, none, string, nullable-string var carg2 C.guint // in, none, casted - var cret *C.GstClock // return, full, converted + var cret *C.GstClock // return, full, converted, nullable - carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) - defer C.free(unsafe.Pointer(carg1)) + if name != "" { + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) + defer C.free(unsafe.Pointer(carg1)) + } carg2 = C.guint(domain) cret = C.gst_ptp_clock_new(carg1, carg2) @@ -1004,7 +1026,9 @@ func NewPtpClock(name string, domain uint) gst.Clock { var goret gst.Clock - goret = gst.UnsafeClockFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeClockFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1273,8 +1297,11 @@ func marshalNetTimePacket(p unsafe.Pointer) (interface{}, error) { return UnsafeNetTimePacketFromGlibBorrow(b), nil } -func (r *NetTimePacket) InitGoValue(v *gobject.Value) { - v.Init(TypeNetTimePacket) +func (r *NetTimePacket) GoValueType() gobject.Type { + return TypeNetTimePacket +} + +func (r *NetTimePacket) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } diff --git a/pkg/gstpbutils/gstpbutils.gen.go b/pkg/gstpbutils/gstpbutils.gen.go index 80eb27a..19be65a 100644 --- a/pkg/gstpbutils/gstpbutils.gen.go +++ b/pkg/gstpbutils/gstpbutils.gen.go @@ -108,11 +108,11 @@ const PLUGINS_BASE_VERSION_MAJOR = 1 // PLUGINS_BASE_VERSION_MICRO wraps GST_PLUGINS_BASE_VERSION_MICRO // // The micro version of GStreamer's gst-plugins-base libraries at compile time. -const PLUGINS_BASE_VERSION_MICRO = 10 +const PLUGINS_BASE_VERSION_MICRO = 0 // PLUGINS_BASE_VERSION_MINOR wraps GST_PLUGINS_BASE_VERSION_MINOR // // The minor version of GStreamer's gst-plugins-base libraries at compile time. -const PLUGINS_BASE_VERSION_MINOR = 24 +const PLUGINS_BASE_VERSION_MINOR = 26 // PLUGINS_BASE_VERSION_NANO wraps GST_PLUGINS_BASE_VERSION_NANO // // The nano version of GStreamer's gst-plugins-base libraries at compile time. @@ -172,8 +172,11 @@ func marshalAudioVisualizerShader(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = AudioVisualizerShader(0) -func (e AudioVisualizerShader) InitGoValue(v *gobject.Value) { - v.Init(TypeAudioVisualizerShader) +func (e AudioVisualizerShader) GoValueType() gobject.Type { + return TypeAudioVisualizerShader +} + +func (e AudioVisualizerShader) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -231,8 +234,11 @@ func marshalDiscovererResult(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = DiscovererResult(0) -func (e DiscovererResult) InitGoValue(v *gobject.Value) { - v.Init(TypeDiscovererResult) +func (e DiscovererResult) GoValueType() gobject.Type { + return TypeDiscovererResult +} + +func (e DiscovererResult) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -324,8 +330,11 @@ func marshalInstallPluginsReturn(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = InstallPluginsReturn(0) -func (e InstallPluginsReturn) InitGoValue(v *gobject.Value) { - v.Init(TypeInstallPluginsReturn) +func (e InstallPluginsReturn) GoValueType() gobject.Type { + return TypeInstallPluginsReturn +} + +func (e InstallPluginsReturn) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -417,8 +426,11 @@ func (d DiscovererSerializeFlags) Has(other DiscovererSerializeFlags) bool { var _ gobject.GoValueInitializer = DiscovererSerializeFlags(0) -func (f DiscovererSerializeFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeDiscovererSerializeFlags) +func (f DiscovererSerializeFlags) GoValueType() gobject.Type { + return TypeDiscovererSerializeFlags +} + +func (f DiscovererSerializeFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -503,8 +515,11 @@ func (p PbUtilsCapsDescriptionFlags) Has(other PbUtilsCapsDescriptionFlags) bool var _ gobject.GoValueInitializer = PbUtilsCapsDescriptionFlags(0) -func (f PbUtilsCapsDescriptionFlags) InitGoValue(v *gobject.Value) { - v.Init(TypePbUtilsCapsDescriptionFlags) +func (f PbUtilsCapsDescriptionFlags) GoValueType() gobject.Type { + return TypePbUtilsCapsDescriptionFlags +} + +func (f PbUtilsCapsDescriptionFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -632,10 +647,10 @@ func CodecUtilsAacGetChannels(audioConfig []uint8) uint { // // The function returns the following values: // -// - goret int +// - goret int32 // // Translates the sample rate to the index corresponding to it in AAC spec. -func CodecUtilsAacGetIndexFromSampleRate(rate uint) int { +func CodecUtilsAacGetIndexFromSampleRate(rate uint) int32 { var carg1 C.guint // in, none, casted var cret C.gint // return, none, casted @@ -644,9 +659,9 @@ func CodecUtilsAacGetIndexFromSampleRate(rate uint) int { cret = C.gst_codec_utils_aac_get_index_from_sample_rate(carg1) runtime.KeepAlive(rate) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -798,6 +813,121 @@ func CodecUtilsAacGetSampleRateFromIndex(srIdx uint) uint { return goret } +// CodecUtilsAv1CreateAv1CFromCaps wraps gst_codec_utils_av1_create_av1c_from_caps +// +// The function takes the following parameters: +// +// - caps *gst.Caps: a video/x-av1 #GstCaps +// +// The function returns the following values: +// +// - goret *gst.Buffer (nullable) +// +// Creates the corresponding AV1 Codec Configuration Record +func CodecUtilsAv1CreateAv1CFromCaps(caps *gst.Caps) *gst.Buffer { + var carg1 *C.GstCaps // in, none, converted + var cret *C.GstBuffer // return, full, converted, nullable + + carg1 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(caps)) + + cret = C.gst_codec_utils_av1_create_av1c_from_caps(carg1) + runtime.KeepAlive(caps) + + var goret *gst.Buffer + + if cret != nil { + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } + + return goret +} + +// CodecUtilsAv1CreateCapsFromAv1C wraps gst_codec_utils_av1_create_caps_from_av1c +// +// The function takes the following parameters: +// +// - av1C *gst.Buffer: a #GstBuffer containing a AV1CodecConfigurationRecord +// +// The function returns the following values: +// +// - goret *gst.Caps (nullable) +// +// Parses the provided @av1c and returns the corresponding caps +func CodecUtilsAv1CreateCapsFromAv1C(av1C *gst.Buffer) *gst.Caps { + var carg1 *C.GstBuffer // in, none, converted + var cret *C.GstCaps // return, full, converted, nullable + + carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(av1C)) + + cret = C.gst_codec_utils_av1_create_caps_from_av1c(carg1) + runtime.KeepAlive(av1C) + + var goret *gst.Caps + + if cret != nil { + goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } + + return goret +} + +// CodecUtilsAv1GetLevel wraps gst_codec_utils_av1_get_level +// +// The function takes the following parameters: +// +// - seqLevelIdx uint8: A seq_level_idx +// +// The function returns the following values: +// +// - goret string (nullable) +// +// Transform a seq_level_idx into the level string +func CodecUtilsAv1GetLevel(seqLevelIdx uint8) string { + var carg1 C.guint8 // in, none, casted + var cret *C.gchar // return, none, string, nullable-string + + carg1 = C.guint8(seqLevelIdx) + + cret = C.gst_codec_utils_av1_get_level(carg1) + runtime.KeepAlive(seqLevelIdx) + + var goret string + + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } + + return goret +} + +// CodecUtilsAv1GetSeqLevelIdx wraps gst_codec_utils_av1_get_seq_level_idx +// +// The function takes the following parameters: +// +// - level string: A level string from caps +// +// The function returns the following values: +// +// - goret uint8 +// +// Transform a level string from the caps into the seq_level_idx +func CodecUtilsAv1GetSeqLevelIdx(level string) uint8 { + var carg1 *C.gchar // in, none, string + var cret C.guint8 // return, none, casted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(level))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_codec_utils_av1_get_seq_level_idx(carg1) + runtime.KeepAlive(level) + + var goret uint8 + + goret = uint8(cret) + + return goret +} + // CodecUtilsCapsFromMIMECodec wraps gst_codec_utils_caps_from_mime_codec // // The function takes the following parameters: @@ -1255,6 +1385,176 @@ func CodecUtilsH265GetTier(profileTierLevel []uint8) string { return goret } +// CodecUtilsH266CapsSetLevelTierAndProfile wraps gst_codec_utils_h266_caps_set_level_tier_and_profile +// +// The function takes the following parameters: +// +// - caps *gst.Caps: the #GstCaps to which the level, tier and profile are to be added +// - decoderConfiguration []uint8: Pointer to the VvcDecoderConfigurationRecord struct as defined in ISO/IEC 14496-15 +// +// The function returns the following values: +// +// - goret bool +// +// Sets the level, tier and profile in @caps if it can be determined from +// @decoder_configuration. See gst_codec_utils_h266_get_level(), +// gst_codec_utils_h266_get_tier() and gst_codec_utils_h266_get_profile() +// for more details on the parameters. +func CodecUtilsH266CapsSetLevelTierAndProfile(caps *gst.Caps, decoderConfiguration []uint8) bool { + var carg1 *C.GstCaps // in, none, converted + var carg2 *C.guint8 // in, transfer: none, C Pointers: 1, Name: array[guint8], array (inner: *typesystem.CastablePrimitive, length-by: carg3) + var carg3 C.guint // implicit + var cret C.gboolean // return + + carg1 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(caps)) + _ = decoderConfiguration + _ = carg2 + _ = carg3 + panic("unimplemented conversion of []uint8 (const guint8*)") + + cret = C.gst_codec_utils_h266_caps_set_level_tier_and_profile(carg1, carg2, carg3) + runtime.KeepAlive(caps) + runtime.KeepAlive(decoderConfiguration) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + +// CodecUtilsH266GetLevel wraps gst_codec_utils_h266_get_level +// +// The function takes the following parameters: +// +// - ptlRecord []uint8: Pointer to the VvcPTLRecord structure as defined in ISO/IEC 14496-15. +// +// The function returns the following values: +// +// - goret string (nullable) +// +// Converts the level indication (general_level_idc) in the stream's +// ptl_record structure into a string. +func CodecUtilsH266GetLevel(ptlRecord []uint8) string { + var carg1 *C.guint8 // in, transfer: none, C Pointers: 1, Name: array[guint8], array (inner: *typesystem.CastablePrimitive, length-by: carg2) + var carg2 C.guint // implicit + var cret *C.gchar // return, none, string, nullable-string + + _ = ptlRecord + _ = carg1 + _ = carg2 + panic("unimplemented conversion of []uint8 (const guint8*)") + + cret = C.gst_codec_utils_h266_get_level(carg1, carg2) + runtime.KeepAlive(ptlRecord) + + var goret string + + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } + + return goret +} + +// CodecUtilsH266GetLevelIdc wraps gst_codec_utils_h266_get_level_idc +// +// The function takes the following parameters: +// +// - level string: A level string from caps +// +// The function returns the following values: +// +// - goret uint8 +// +// Transform a level string from the caps into the level_idc +func CodecUtilsH266GetLevelIdc(level string) uint8 { + var carg1 *C.gchar // in, none, string + var cret C.guint8 // return, none, casted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(level))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_codec_utils_h266_get_level_idc(carg1) + runtime.KeepAlive(level) + + var goret uint8 + + goret = uint8(cret) + + return goret +} + +// CodecUtilsH266GetProfile wraps gst_codec_utils_h266_get_profile +// +// The function takes the following parameters: +// +// - ptlRecord []uint8: Pointer to the VvcPTLRecord structure as defined in ISO/IEC 14496-15. +// +// The function returns the following values: +// +// - goret string (nullable) +// +// Converts the profile indication (general_profile_idc) in the stream's +// ptl_record structure into a string. +func CodecUtilsH266GetProfile(ptlRecord []uint8) string { + var carg1 *C.guint8 // in, transfer: none, C Pointers: 1, Name: array[guint8], array (inner: *typesystem.CastablePrimitive, length-by: carg2) + var carg2 C.guint // implicit + var cret *C.gchar // return, none, string, nullable-string + + _ = ptlRecord + _ = carg1 + _ = carg2 + panic("unimplemented conversion of []uint8 (const guint8*)") + + cret = C.gst_codec_utils_h266_get_profile(carg1, carg2) + runtime.KeepAlive(ptlRecord) + + var goret string + + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } + + return goret +} + +// CodecUtilsH266GetTier wraps gst_codec_utils_h266_get_tier +// +// The function takes the following parameters: +// +// - ptlRecord []uint8: Pointer to the VvcPTLRecord structure as defined in ISO/IEC 14496-15. +// +// The function returns the following values: +// +// - goret string (nullable) +// +// Converts the tier indication (general_tier_flag) in the stream's +// ptl_record structure into a string. +func CodecUtilsH266GetTier(ptlRecord []uint8) string { + var carg1 *C.guint8 // in, transfer: none, C Pointers: 1, Name: array[guint8], array (inner: *typesystem.CastablePrimitive, length-by: carg2) + var carg2 C.guint // implicit + var cret *C.gchar // return, none, string, nullable-string + + _ = ptlRecord + _ = carg1 + _ = carg2 + panic("unimplemented conversion of []uint8 (const guint8*)") + + cret = C.gst_codec_utils_h266_get_tier(carg1, carg2) + runtime.KeepAlive(ptlRecord) + + var goret string + + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } + + return goret +} + // CodecUtilsMpeg4VideoCapsSetLevelAndProfile wraps gst_codec_utils_mpeg4video_caps_set_level_and_profile // // The function takes the following parameters: @@ -1479,7 +1779,8 @@ func EncodingListAvailableCategories() []string { // - details []string: NULL-terminated array // of installer string details (see below) // - ctx *InstallPluginsContext (nullable): a #GstInstallPluginsContext, or NULL -// - fn InstallPluginsResultFunc: the function to call when the installer program returns +// - fn InstallPluginsResultFunc: the function to call when the +// installer program returns // // The function returns the following values: // @@ -1924,6 +2225,56 @@ func MissingPluginMessageGetInstallerDetail(msg *gst.Message) string { return goret } +// MissingPluginMessageGetStreamID wraps gst_missing_plugin_message_get_stream_id +// +// The function takes the following parameters: +// +// - msg *gst.Message: A missing-plugin #GstMessage of type #GST_MESSAGE_ELEMENT +// +// The function returns the following values: +// +// - goret string (nullable) +// +// Get the stream-id of the stream for which an element is missing. +func MissingPluginMessageGetStreamID(msg *gst.Message) string { + var carg1 *C.GstMessage // in, none, converted + var cret *C.gchar // return, none, string, nullable-string + + carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) + + cret = C.gst_missing_plugin_message_get_stream_id(carg1) + runtime.KeepAlive(msg) + + var goret string + + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } + + return goret +} + +// MissingPluginMessageSetStreamID wraps gst_missing_plugin_message_set_stream_id +// +// The function takes the following parameters: +// +// - msg *gst.Message: A missing-plugin #GstMessage of type #GST_MESSAGE_ELEMENT +// - streamId string: The stream id for which an element is missing +// +// Set the stream-id of the stream for which an element is missing. +func MissingPluginMessageSetStreamID(msg *gst.Message, streamId string) { + var carg1 *C.GstMessage // in, none, converted + var carg2 *C.gchar // in, none, string + + carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) + carg2 = (*C.gchar)(unsafe.Pointer(C.CString(streamId))) + defer C.free(unsafe.Pointer(carg2)) + + C.gst_missing_plugin_message_set_stream_id(carg1, carg2) + runtime.KeepAlive(msg) + runtime.KeepAlive(streamId) +} + // NewMissingURISinkInstallerDetail wraps gst_missing_uri_sink_installer_detail_new // // The function takes the following parameters: @@ -2487,6 +2838,11 @@ func UnsafeAudioVisualizerFromGlibFull(c unsafe.Pointer) AudioVisualizer { return gobject.UnsafeObjectFromGlibFull(c).(AudioVisualizer) } +// UnsafeAudioVisualizerFromGlibBorrow is used to convert raw GstAudioVisualizer pointers to go without touching any references. This is used by the bindings internally. +func UnsafeAudioVisualizerFromGlibBorrow(c unsafe.Pointer) AudioVisualizer { + return gobject.UnsafeObjectFromGlibBorrow(c).(AudioVisualizer) +} + func (a *AudioVisualizerInstance) upcastToGstAudioVisualizer() *AudioVisualizerInstance { return a } @@ -2550,7 +2906,7 @@ func UnsafeApplyAudioVisualizerOverrides[Instance AudioVisualizer](gclass unsafe var query *gst.Query // in, none, converted var goret bool // return - scope = UnsafeAudioVisualizerFromGlibNone(unsafe.Pointer(carg0)).(Instance) + scope = UnsafeAudioVisualizerFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.DecideAllocation(scope, query) @@ -2575,7 +2931,7 @@ func UnsafeApplyAudioVisualizerOverrides[Instance AudioVisualizer](gclass unsafe var video *gstvideo.VideoFrame // in, none, converted var goret bool // return - scope = UnsafeAudioVisualizerFromGlibNone(unsafe.Pointer(carg0)).(Instance) + scope = UnsafeAudioVisualizerFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) audio = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) video = gstvideo.UnsafeVideoFrameFromGlibNone(unsafe.Pointer(carg2)) @@ -2599,7 +2955,7 @@ func UnsafeApplyAudioVisualizerOverrides[Instance AudioVisualizer](gclass unsafe var scope Instance // go GstAudioVisualizer subclass var goret bool // return - scope = UnsafeAudioVisualizerFromGlibNone(unsafe.Pointer(carg0)).(Instance) + scope = UnsafeAudioVisualizerFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Setup(scope) @@ -2767,6 +3123,11 @@ func UnsafeDiscovererFromGlibFull(c unsafe.Pointer) Discoverer { return gobject.UnsafeObjectFromGlibFull(c).(Discoverer) } +// UnsafeDiscovererFromGlibBorrow is used to convert raw GstDiscoverer pointers to go without touching any references. This is used by the bindings internally. +func UnsafeDiscovererFromGlibBorrow(c unsafe.Pointer) Discoverer { + return gobject.UnsafeObjectFromGlibBorrow(c).(Discoverer) +} + func (d *DiscovererInstance) upcastToGstDiscoverer() *DiscovererInstance { return d } @@ -3016,7 +3377,7 @@ func UnsafeApplyDiscovererOverrides[Instance Discoverer](gclass unsafe.Pointer, var info DiscovererInfo // in, none, converted var err error // in, none, converted - discoverer = UnsafeDiscovererFromGlibNone(unsafe.Pointer(carg0)).(Instance) + discoverer = UnsafeDiscovererFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) info = UnsafeDiscovererInfoFromGlibNone(unsafe.Pointer(carg1)) err = glib.UnsafeErrorFromGlibNone(unsafe.Pointer(carg2)) @@ -3033,7 +3394,7 @@ func UnsafeApplyDiscovererOverrides[Instance Discoverer](gclass unsafe.Pointer, func(carg0 *C.GstDiscoverer) { var discoverer Instance // go GstDiscoverer subclass - discoverer = UnsafeDiscovererFromGlibNone(unsafe.Pointer(carg0)).(Instance) + discoverer = UnsafeDiscovererFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.Finished(discoverer) }, @@ -3050,7 +3411,7 @@ func UnsafeApplyDiscovererOverrides[Instance Discoverer](gclass unsafe.Pointer, var uri string // in, none, string var goret DiscovererInfo // return, full, converted - dc = UnsafeDiscovererFromGlibNone(unsafe.Pointer(carg0)).(Instance) + dc = UnsafeDiscovererFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) uri = C.GoString((*C.char)(unsafe.Pointer(carg1))) goret = overrides.LoadSerializeInfo(dc, uri) @@ -3071,7 +3432,7 @@ func UnsafeApplyDiscovererOverrides[Instance Discoverer](gclass unsafe.Pointer, var discoverer Instance // go GstDiscoverer subclass var source gst.Element // in, none, converted - discoverer = UnsafeDiscovererFromGlibNone(unsafe.Pointer(carg0)).(Instance) + discoverer = UnsafeDiscovererFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) source = gst.UnsafeElementFromGlibNone(unsafe.Pointer(carg1)) overrides.SourceSetup(discoverer, source) @@ -3087,7 +3448,7 @@ func UnsafeApplyDiscovererOverrides[Instance Discoverer](gclass unsafe.Pointer, func(carg0 *C.GstDiscoverer) { var discoverer Instance // go GstDiscoverer subclass - discoverer = UnsafeDiscovererFromGlibNone(unsafe.Pointer(carg0)).(Instance) + discoverer = UnsafeDiscovererFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.Starting(discoverer) }, @@ -3284,6 +3645,11 @@ func UnsafeDiscovererInfoFromGlibFull(c unsafe.Pointer) DiscovererInfo { return gobject.UnsafeObjectFromGlibFull(c).(DiscovererInfo) } +// UnsafeDiscovererInfoFromGlibBorrow is used to convert raw GstDiscovererInfo pointers to go without touching any references. This is used by the bindings internally. +func UnsafeDiscovererInfoFromGlibBorrow(c unsafe.Pointer) DiscovererInfo { + return gobject.UnsafeObjectFromGlibBorrow(c).(DiscovererInfo) +} + func (d *DiscovererInfoInstance) upcastToGstDiscovererInfo() *DiscovererInfoInstance { return d } @@ -3805,8 +4171,8 @@ type DiscovererStreamInfo interface { // // The function returns the following values: // - // - goret int - GetStreamNumber() int + // - goret int32 + GetStreamNumber() int32 // GetStreamTypeNick wraps gst_discoverer_stream_info_get_stream_type_nick // // The function returns the following values: @@ -3847,6 +4213,11 @@ func UnsafeDiscovererStreamInfoFromGlibFull(c unsafe.Pointer) DiscovererStreamIn return gobject.UnsafeObjectFromGlibFull(c).(DiscovererStreamInfo) } +// UnsafeDiscovererStreamInfoFromGlibBorrow is used to convert raw GstDiscovererStreamInfo pointers to go without touching any references. This is used by the bindings internally. +func UnsafeDiscovererStreamInfoFromGlibBorrow(c unsafe.Pointer) DiscovererStreamInfo { + return gobject.UnsafeObjectFromGlibBorrow(c).(DiscovererStreamInfo) +} + func (d *DiscovererStreamInfoInstance) upcastToGstDiscovererStreamInfo() *DiscovererStreamInfoInstance { return d } @@ -3984,8 +4355,8 @@ func (info *DiscovererStreamInfoInstance) GetStreamID() string { // // The function returns the following values: // -// - goret int -func (info *DiscovererStreamInfoInstance) GetStreamNumber() int { +// - goret int32 +func (info *DiscovererStreamInfoInstance) GetStreamNumber() int32 { var carg0 *C.GstDiscovererStreamInfo // in, none, converted var cret C.gint // return, none, casted @@ -3994,9 +4365,9 @@ func (info *DiscovererStreamInfoInstance) GetStreamNumber() int { cret = C.gst_discoverer_stream_info_get_stream_number(carg0) runtime.KeepAlive(info) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -4114,6 +4485,11 @@ func UnsafeDiscovererSubtitleInfoFromGlibFull(c unsafe.Pointer) DiscovererSubtit return gobject.UnsafeObjectFromGlibFull(c).(DiscovererSubtitleInfo) } +// UnsafeDiscovererSubtitleInfoFromGlibBorrow is used to convert raw GstDiscovererSubtitleInfo pointers to go without touching any references. This is used by the bindings internally. +func UnsafeDiscovererSubtitleInfoFromGlibBorrow(c unsafe.Pointer) DiscovererSubtitleInfo { + return gobject.UnsafeObjectFromGlibBorrow(c).(DiscovererSubtitleInfo) +} + func (d *DiscovererSubtitleInfoInstance) upcastToGstDiscovererSubtitleInfo() *DiscovererSubtitleInfoInstance { return d } @@ -4256,6 +4632,11 @@ func UnsafeDiscovererVideoInfoFromGlibFull(c unsafe.Pointer) DiscovererVideoInfo return gobject.UnsafeObjectFromGlibFull(c).(DiscovererVideoInfo) } +// UnsafeDiscovererVideoInfoFromGlibBorrow is used to convert raw GstDiscovererVideoInfo pointers to go without touching any references. This is used by the bindings internally. +func UnsafeDiscovererVideoInfoFromGlibBorrow(c unsafe.Pointer) DiscovererVideoInfo { + return gobject.UnsafeObjectFromGlibBorrow(c).(DiscovererVideoInfo) +} + func (d *DiscovererVideoInfoInstance) upcastToGstDiscovererVideoInfo() *DiscovererVideoInfoInstance { return d } @@ -4713,17 +5094,36 @@ type EncodingProfile interface { // // - preset string (nullable): the element preset to use // - // Sets the name of the #GstElement that implements the #GstPreset interface - // to use for the profile. + // Sets the name of the preset to be used in the profile. // This is the name that has been set when saving the preset. + // You can list the available presets for a specific element factory + // using `$ gst-inspect-1.0 element-factory-name`, for example for + // `x264enc`: + // + // ``` bash + // $ gst-inspect-1.0 x264enc + // ... + // Presets: + // "Profile Baseline": Baseline Profile + // "Profile High": High Profile + // "Profile Main": Main Profile + // "Profile YouTube": YouTube recommended settings (https://support.google.com/youtube/answer/1722171) + // "Quality High": High quality + // "Quality Low": Low quality + // "Quality Normal": Normal quality + // "Zero Latency" + // ``` + // } SetPreset(string) // SetPresetName wraps gst_encoding_profile_set_preset_name // // The function takes the following parameters: // - // - presetName string (nullable): The name of the preset to use in this @profile. + // - presetName string (nullable): The name of the element factory to use in this @profile. // - // Sets the name of the #GstPreset's factory to be used in the profile. + // Sets the name of the #GstPreset's factory to be used in the profile. This + // is the name of the **element factory** that implements the #GstPreset interface not + // the name of the preset itself (see #gst_encoding_profile_set_preset). SetPresetName(string) // SetRestriction wraps gst_encoding_profile_set_restriction // @@ -4748,6 +5148,15 @@ type EncodingProfile interface { // > *NOTE*: Single segment is not property supported when using // > #encodebin:avoid-reencoding SetSingleSegment(bool) + // ToString wraps gst_encoding_profile_to_string + // + // The function returns the following values: + // + // - goret string + // + // Converts a GstEncodingProfile to a string in the "Encoding Profile + // serialization format". + ToString() string } func unsafeWrapEncodingProfile(base *gobject.ObjectInstance) *EncodingProfileInstance { @@ -4770,6 +5179,11 @@ func UnsafeEncodingProfileFromGlibFull(c unsafe.Pointer) EncodingProfile { return gobject.UnsafeObjectFromGlibFull(c).(EncodingProfile) } +// UnsafeEncodingProfileFromGlibBorrow is used to convert raw GstEncodingProfile pointers to go without touching any references. This is used by the bindings internally. +func UnsafeEncodingProfileFromGlibBorrow(c unsafe.Pointer) EncodingProfile { + return gobject.UnsafeObjectFromGlibBorrow(c).(EncodingProfile) +} + func (e *EncodingProfileInstance) upcastToGstEncodingProfile() *EncodingProfileInstance { return e } @@ -4860,6 +5274,38 @@ func EncodingProfileFromDiscoverer(info DiscovererInfo) EncodingProfile { return goret } +// EncodingProfileFromString wraps gst_encoding_profile_from_string +// +// The function takes the following parameters: +// +// - str string: The string to convert into a GstEncodingProfile. +// +// The function returns the following values: +// +// - goret EncodingProfile (nullable) +// +// Converts a string in the "encoding profile serialization format" into a +// GstEncodingProfile. Refer to the encoding-profile documentation for details +// on the format. +func EncodingProfileFromString(str string) EncodingProfile { + var carg1 *C.gchar // in, none, string + var cret *C.GstEncodingProfile // return, full, converted, nullable + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(str))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_encoding_profile_from_string(carg1) + runtime.KeepAlive(str) + + var goret EncodingProfile + + if cret != nil { + goret = UnsafeEncodingProfileFromGlibFull(unsafe.Pointer(cret)) + } + + return goret +} + // Copy wraps gst_encoding_profile_copy // // The function returns the following values: @@ -5404,9 +5850,26 @@ func (profile *EncodingProfileInstance) SetPresence(presence uint) { // // - preset string (nullable): the element preset to use // -// Sets the name of the #GstElement that implements the #GstPreset interface -// to use for the profile. +// Sets the name of the preset to be used in the profile. // This is the name that has been set when saving the preset. +// You can list the available presets for a specific element factory +// using `$ gst-inspect-1.0 element-factory-name`, for example for +// `x264enc`: +// +// ``` bash +// $ gst-inspect-1.0 x264enc +// ... +// Presets: +// "Profile Baseline": Baseline Profile +// "Profile High": High Profile +// "Profile Main": Main Profile +// "Profile YouTube": YouTube recommended settings (https://support.google.com/youtube/answer/1722171) +// "Quality High": High quality +// "Quality Low": Low quality +// "Quality Normal": Normal quality +// "Zero Latency" +// ``` +// } func (profile *EncodingProfileInstance) SetPreset(preset string) { var carg0 *C.GstEncodingProfile // in, none, converted var carg1 *C.gchar // in, none, string, nullable-string @@ -5426,9 +5889,11 @@ func (profile *EncodingProfileInstance) SetPreset(preset string) { // // The function takes the following parameters: // -// - presetName string (nullable): The name of the preset to use in this @profile. +// - presetName string (nullable): The name of the element factory to use in this @profile. // -// Sets the name of the #GstPreset's factory to be used in the profile. +// Sets the name of the #GstPreset's factory to be used in the profile. This +// is the name of the **element factory** that implements the #GstPreset interface not +// the name of the preset itself (see #gst_encoding_profile_set_preset). func (profile *EncodingProfileInstance) SetPresetName(presetName string) { var carg0 *C.GstEncodingProfile // in, none, converted var carg1 *C.gchar // in, none, string, nullable-string @@ -5493,6 +5958,31 @@ func (profile *EncodingProfileInstance) SetSingleSegment(singleSegment bool) { runtime.KeepAlive(singleSegment) } +// ToString wraps gst_encoding_profile_to_string +// +// The function returns the following values: +// +// - goret string +// +// Converts a GstEncodingProfile to a string in the "Encoding Profile +// serialization format". +func (profile *EncodingProfileInstance) ToString() string { + var carg0 *C.GstEncodingProfile // in, none, converted + var cret *C.gchar // return, full, string + + carg0 = (*C.GstEncodingProfile)(UnsafeEncodingProfileToGlibNone(profile)) + + cret = C.gst_encoding_profile_to_string(carg0) + runtime.KeepAlive(profile) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + + return goret +} + // EncodingTargetInstance is the instance type used by all types extending GstEncodingTarget. It is used internally by the bindings. Users should use the interface [EncodingTarget] instead. type EncodingTargetInstance struct { _ [0]func() // equal guard @@ -5612,6 +6102,11 @@ func UnsafeEncodingTargetFromGlibFull(c unsafe.Pointer) EncodingTarget { return gobject.UnsafeObjectFromGlibFull(c).(EncodingTarget) } +// UnsafeEncodingTargetFromGlibBorrow is used to convert raw GstEncodingTarget pointers to go without touching any references. This is used by the bindings internally. +func UnsafeEncodingTargetFromGlibBorrow(c unsafe.Pointer) EncodingTarget { + return gobject.UnsafeObjectFromGlibBorrow(c).(EncodingTarget) +} + func (e *EncodingTargetInstance) upcastToGstEncodingTarget() *EncodingTargetInstance { return e } @@ -6037,6 +6532,11 @@ func UnsafeEncodingVideoProfileFromGlibFull(c unsafe.Pointer) EncodingVideoProfi return gobject.UnsafeObjectFromGlibFull(c).(EncodingVideoProfile) } +// UnsafeEncodingVideoProfileFromGlibBorrow is used to convert raw GstEncodingVideoProfile pointers to go without touching any references. This is used by the bindings internally. +func UnsafeEncodingVideoProfileFromGlibBorrow(c unsafe.Pointer) EncodingVideoProfile { + return gobject.UnsafeObjectFromGlibBorrow(c).(EncodingVideoProfile) +} + func (e *EncodingVideoProfileInstance) upcastToGstEncodingVideoProfile() *EncodingVideoProfileInstance { return e } @@ -6281,6 +6781,11 @@ func UnsafeDiscovererAudioInfoFromGlibFull(c unsafe.Pointer) DiscovererAudioInfo return gobject.UnsafeObjectFromGlibFull(c).(DiscovererAudioInfo) } +// UnsafeDiscovererAudioInfoFromGlibBorrow is used to convert raw GstDiscovererAudioInfo pointers to go without touching any references. This is used by the bindings internally. +func UnsafeDiscovererAudioInfoFromGlibBorrow(c unsafe.Pointer) DiscovererAudioInfo { + return gobject.UnsafeObjectFromGlibBorrow(c).(DiscovererAudioInfo) +} + func (d *DiscovererAudioInfoInstance) upcastToGstDiscovererAudioInfo() *DiscovererAudioInfoInstance { return d } @@ -6495,6 +7000,11 @@ func UnsafeDiscovererContainerInfoFromGlibFull(c unsafe.Pointer) DiscovererConta return gobject.UnsafeObjectFromGlibFull(c).(DiscovererContainerInfo) } +// UnsafeDiscovererContainerInfoFromGlibBorrow is used to convert raw GstDiscovererContainerInfo pointers to go without touching any references. This is used by the bindings internally. +func UnsafeDiscovererContainerInfoFromGlibBorrow(c unsafe.Pointer) DiscovererContainerInfo { + return gobject.UnsafeObjectFromGlibBorrow(c).(DiscovererContainerInfo) +} + func (d *DiscovererContainerInfoInstance) upcastToGstDiscovererContainerInfo() *DiscovererContainerInfoInstance { return d } @@ -6598,6 +7108,11 @@ func UnsafeEncodingAudioProfileFromGlibFull(c unsafe.Pointer) EncodingAudioProfi return gobject.UnsafeObjectFromGlibFull(c).(EncodingAudioProfile) } +// UnsafeEncodingAudioProfileFromGlibBorrow is used to convert raw GstEncodingAudioProfile pointers to go without touching any references. This is used by the bindings internally. +func UnsafeEncodingAudioProfileFromGlibBorrow(c unsafe.Pointer) EncodingAudioProfile { + return gobject.UnsafeObjectFromGlibBorrow(c).(EncodingAudioProfile) +} + func (e *EncodingAudioProfileInstance) upcastToGstEncodingAudioProfile() *EncodingAudioProfileInstance { return e } @@ -6734,6 +7249,11 @@ func UnsafeEncodingContainerProfileFromGlibFull(c unsafe.Pointer) EncodingContai return gobject.UnsafeObjectFromGlibFull(c).(EncodingContainerProfile) } +// UnsafeEncodingContainerProfileFromGlibBorrow is used to convert raw GstEncodingContainerProfile pointers to go without touching any references. This is used by the bindings internally. +func UnsafeEncodingContainerProfileFromGlibBorrow(c unsafe.Pointer) EncodingContainerProfile { + return gobject.UnsafeObjectFromGlibBorrow(c).(EncodingContainerProfile) +} + func (e *EncodingContainerProfileInstance) upcastToGstEncodingContainerProfile() *EncodingContainerProfileInstance { return e } @@ -7141,8 +7661,11 @@ func marshalInstallPluginsContext(p unsafe.Pointer) (interface{}, error) { return UnsafeInstallPluginsContextFromGlibBorrow(b), nil } -func (r *InstallPluginsContext) InitGoValue(v *gobject.Value) { - v.Init(TypeInstallPluginsContext) +func (r *InstallPluginsContext) GoValueType() gobject.Type { + return TypeInstallPluginsContext +} + +func (r *InstallPluginsContext) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } diff --git a/pkg/gstplay/gstplay.gen.go b/pkg/gstplay/gstplay.gen.go index 7fee5d9..6d99154 100644 --- a/pkg/gstplay/gstplay.gen.go +++ b/pkg/gstplay/gstplay.gen.go @@ -84,8 +84,11 @@ func marshalPlayColorBalanceType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = PlayColorBalanceType(0) -func (e PlayColorBalanceType) InitGoValue(v *gobject.Value) { - v.Init(TypePlayColorBalanceType) +func (e PlayColorBalanceType) GoValueType() gobject.Type { + return TypePlayColorBalanceType +} + +func (e PlayColorBalanceType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -142,8 +145,11 @@ func marshalPlayError(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = PlayError(0) -func (e PlayError) InitGoValue(v *gobject.Value) { - v.Init(TypePlayError) +func (e PlayError) GoValueType() gobject.Type { + return TypePlayError +} + +func (e PlayError) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -262,8 +268,11 @@ func marshalPlayMessage(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = PlayMessage(0) -func (e PlayMessage) InitGoValue(v *gobject.Value) { - v.Init(TypePlayMessage) +func (e PlayMessage) GoValueType() gobject.Type { + return TypePlayMessage +} + +func (e PlayMessage) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -311,6 +320,89 @@ func PlayMessageGetName(messageType PlayMessage) string { return goret } +// PlayMessageGetStreamID wraps gst_play_message_get_stream_id +// +// The function takes the following parameters: +// +// - msg *gst.Message: A #GstMessage +// +// The function returns the following values: +// +// - goret string (nullable) +// +// Reads the stream ID the play message @msg applies to, if any. +func PlayMessageGetStreamID(msg *gst.Message) string { + var carg1 *C.GstMessage // in, none, converted + var cret *C.gchar // return, none, string, nullable-string + + carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) + + cret = C.gst_play_message_get_stream_id(carg1) + runtime.KeepAlive(msg) + + var goret string + + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } + + return goret +} + +// PlayMessageGetURI wraps gst_play_message_get_uri +// +// The function takes the following parameters: +// +// - msg *gst.Message: A #GstMessage +// +// The function returns the following values: +// +// - goret string +// +// Reads the URI the play message @msg applies to. +func PlayMessageGetURI(msg *gst.Message) string { + var carg1 *C.GstMessage // in, none, converted + var cret *C.gchar // return, none, string + + carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) + + cret = C.gst_play_message_get_uri(carg1) + runtime.KeepAlive(msg) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + +// PlayMessageParseBuffering wraps gst_play_message_parse_buffering +// +// The function takes the following parameters: +// +// - msg *gst.Message: A #GstMessage +// +// The function returns the following values: +// +// - percent uint: the resulting buffering percent +// +// Parse the given buffering @msg and extract the corresponding value +func PlayMessageParseBuffering(msg *gst.Message) uint { + var carg1 *C.GstMessage // in, none, converted + var carg2 C.guint // out, full, casted + + carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) + + C.gst_play_message_parse_buffering(carg1, &carg2) + runtime.KeepAlive(msg) + + var percent uint + + percent = uint(carg2) + + return percent +} + // PlayMessageParseBufferingPercent wraps gst_play_message_parse_buffering_percent // // The function takes the following parameters: @@ -322,6 +414,8 @@ func PlayMessageGetName(messageType PlayMessage) string { // - percent uint: the resulting buffering percent // // Parse the given buffering @msg and extract the corresponding value +// +// Deprecated: (since 1.26.0) Use gst_play_message_parse_buffering(). func PlayMessageParseBufferingPercent(msg *gst.Message) uint { var carg1 *C.GstMessage // in, none, converted var carg2 C.guint // out, full, casted @@ -338,6 +432,33 @@ func PlayMessageParseBufferingPercent(msg *gst.Message) uint { return percent } +// PlayMessageParseDurationChanged wraps gst_play_message_parse_duration_changed +// +// The function takes the following parameters: +// +// - msg *gst.Message: A #GstMessage +// +// The function returns the following values: +// +// - duration gst.ClockTime: the resulting duration +// +// Parse the given duration-changed @msg and extract the corresponding #GstClockTime +func PlayMessageParseDurationChanged(msg *gst.Message) gst.ClockTime { + var carg1 *C.GstMessage // in, none, converted + var carg2 C.GstClockTime // out, full, casted, alias + + carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) + + C.gst_play_message_parse_duration_changed(carg1, &carg2) + runtime.KeepAlive(msg) + + var duration gst.ClockTime + + duration = gst.ClockTime(carg2) + + return duration +} + // PlayMessageParseDurationUpdated wraps gst_play_message_parse_duration_updated // // The function takes the following parameters: @@ -349,6 +470,8 @@ func PlayMessageParseBufferingPercent(msg *gst.Message) uint { // - duration gst.ClockTime: the resulting duration // // Parse the given duration-changed @msg and extract the corresponding #GstClockTime +// +// Deprecated: (since 1.26.0) Use gst_play_message_parse_duration_changed(). func PlayMessageParseDurationUpdated(msg *gst.Message) gst.ClockTime { var carg1 *C.GstMessage // in, none, converted var carg2 C.GstClockTime // out, full, casted, alias @@ -376,7 +499,11 @@ func PlayMessageParseDurationUpdated(msg *gst.Message) gst.ClockTime { // - details *gst.Structure (nullable): A #GstStructure containing additional details about the error // - err error: the resulting error // -// Parse the given error @msg and extract the corresponding #GError +// Parse the given error @msg and extract the corresponding #GError. +// +// Since 1.26 the details will always contain the URI this refers to in an +// "uri" field of type string, and (if known) the string "stream-id" it is +// referring to. func PlayMessageParseError(msg *gst.Message) (*gst.Structure, error) { var carg1 *C.GstMessage // in, none, converted var carg3 *C.GstStructure // out, full, converted, nullable @@ -481,6 +608,33 @@ func PlayMessageParsePositionUpdated(msg *gst.Message) gst.ClockTime { return position } +// PlayMessageParseSeekDone wraps gst_play_message_parse_seek_done +// +// The function takes the following parameters: +// +// - msg *gst.Message: A #GstMessage +// +// The function returns the following values: +// +// - position gst.ClockTime: the resulting position +// +// Parse the given seek-done @msg and extract the corresponding #GstClockTime +func PlayMessageParseSeekDone(msg *gst.Message) gst.ClockTime { + var carg1 *C.GstMessage // in, none, converted + var carg2 C.GstClockTime // out, full, casted, alias + + carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) + + C.gst_play_message_parse_seek_done(carg1, &carg2) + runtime.KeepAlive(msg) + + var position gst.ClockTime + + position = gst.ClockTime(carg2) + + return position +} + // PlayMessageParseStateChanged wraps gst_play_message_parse_state_changed // // The function takes the following parameters: @@ -535,6 +689,34 @@ func PlayMessageParseType(msg *gst.Message) PlayMessage { return typ } +// PlayMessageParseURILoaded wraps gst_play_message_parse_uri_loaded +// +// The function takes the following parameters: +// +// - msg *gst.Message: A #GstMessage +// +// The function returns the following values: +// +// - uri string: the resulting URI +// +// Parse the given uri-loaded @msg and extract the corresponding value +func PlayMessageParseURILoaded(msg *gst.Message) string { + var carg1 *C.GstMessage // in, none, converted + var carg2 *C.gchar // out, full, string + + carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) + + C.gst_play_message_parse_uri_loaded(carg1, &carg2) + runtime.KeepAlive(msg) + + var uri string + + uri = C.GoString((*C.char)(unsafe.Pointer(carg2))) + defer C.free(unsafe.Pointer(carg2)) + + return uri +} + // PlayMessageParseVideoDimensionsChanged wraps gst_play_message_parse_video_dimensions_changed // // The function takes the following parameters: @@ -604,7 +786,11 @@ func PlayMessageParseVolumeChanged(msg *gst.Message) float64 { // - details *gst.Structure (nullable): A #GstStructure containing additional details about the warning // - err error: the resulting warning // -// Parse the given warning @msg and extract the corresponding #GError +// Parse the given warning @msg and extract the corresponding #GError. +// +// Since 1.26 the details will always contain the URI this refers to in an +// "uri" field of type string, and (if known) the string "stream-id" it is +// referring to. func PlayMessageParseWarning(msg *gst.Message) (*gst.Structure, error) { var carg1 *C.GstMessage // in, none, converted var carg3 *C.GstStructure // out, full, converted, nullable @@ -693,8 +879,11 @@ func marshalPlayState(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = PlayState(0) -func (e PlayState) InitGoValue(v *gobject.Value) { - v.Init(TypePlayState) +func (e PlayState) GoValueType() gobject.Type { + return TypePlayState +} + +func (e PlayState) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -774,6 +963,11 @@ func UnsafePlayVideoRendererFromGlibFull(c unsafe.Pointer) PlayVideoRenderer { return gobject.UnsafeObjectFromGlibFull(c).(PlayVideoRenderer) } +// UnsafePlayVideoRendererFromGlibBorrow is used to convert raw GstPlayVideoRenderer pointers to go without touching any references. This is used by the bindings internally. +func UnsafePlayVideoRendererFromGlibBorrow(c unsafe.Pointer) PlayVideoRenderer { + return gobject.UnsafeObjectFromGlibBorrow(c).(PlayVideoRenderer) +} + // UnsafePlayVideoRendererToGlibNone is used to convert the instance to it's C value GstPlayVideoRenderer. This is used by the bindings internally. func UnsafePlayVideoRendererToGlibNone(c PlayVideoRenderer) unsafe.Pointer { i := c.upcastToGstPlayVideoRenderer() @@ -1057,12 +1251,15 @@ type Play interface { // // The function takes the following parameters: // - // - streamIndex int: stream index + // - streamIndex int32: stream index // // The function returns the following values: // // - goret bool - SetAudioTrack(int) bool + // + // + // Deprecated: (since 1.26.0) Use gst_play_set_audio_track_id() instead. + SetAudioTrack(int32) bool // SetAudioTrackEnabled wraps gst_play_set_audio_track_enabled // // The function takes the following parameters: @@ -1071,6 +1268,16 @@ type Play interface { // // Enable or disable the current audio track. SetAudioTrackEnabled(bool) + // SetAudioTrackID wraps gst_play_set_audio_track_id + // + // The function takes the following parameters: + // + // - streamId string (nullable): stream id + // + // The function returns the following values: + // + // - goret bool + SetAudioTrackID(string) bool // SetAudioVideoOffset wraps gst_play_set_audio_video_offset // // The function takes the following parameters: @@ -1147,12 +1354,15 @@ type Play interface { // // The function takes the following parameters: // - // - streamIndex int: stream index + // - streamIndex int32: stream index // // The function returns the following values: // // - goret bool - SetSubtitleTrack(int) bool + // + // + // Deprecated: (since 1.26.0) Use gst_play_set_subtitle_track_id() instead. + SetSubtitleTrack(int32) bool // SetSubtitleTrackEnabled wraps gst_play_set_subtitle_track_enabled // // The function takes the following parameters: @@ -1161,6 +1371,16 @@ type Play interface { // // Enable or disable the current subtitle track. SetSubtitleTrackEnabled(bool) + // SetSubtitleTrackID wraps gst_play_set_subtitle_track_id + // + // The function takes the following parameters: + // + // - streamId string (nullable): stream id + // + // The function returns the following values: + // + // - goret bool + SetSubtitleTrackID(string) bool // SetSubtitleURI wraps gst_play_set_subtitle_uri // // The function takes the following parameters: @@ -1179,6 +1399,18 @@ type Play interface { // // Sets subtitle-video-offset property by value of @offset SetSubtitleVideoOffset(int64) + // SetTrackIDs wraps gst_play_set_track_ids + // + // The function takes the following parameters: + // + // - audioStreamId string (nullable): audio stream id + // - videoStreamId string (nullable): video stream id + // - subtitleStreamId string (nullable): subtitle stream id + // + // The function returns the following values: + // + // - goret bool + SetTrackIDs(string, string, string) bool // SetURI wraps gst_play_set_uri // // The function takes the following parameters: @@ -1191,12 +1423,15 @@ type Play interface { // // The function takes the following parameters: // - // - streamIndex int: stream index + // - streamIndex int32: stream index // // The function returns the following values: // // - goret bool - SetVideoTrack(int) bool + // + // + // Deprecated: (since 1.26.0) Use gst_play_set_video_track_id() instead. + SetVideoTrack(int32) bool // SetVideoTrackEnabled wraps gst_play_set_video_track_enabled // // The function takes the following parameters: @@ -1205,6 +1440,16 @@ type Play interface { // // Enable or disable the current video track. SetVideoTrackEnabled(bool) + // SetVideoTrackID wraps gst_play_set_video_track_id + // + // The function takes the following parameters: + // + // - streamId string (nullable): stream id + // + // The function returns the following values: + // + // - goret bool + SetVideoTrackID(string) bool // SetVisualization wraps gst_play_set_visualization // // The function takes the following parameters: @@ -1263,6 +1508,11 @@ func UnsafePlayFromGlibFull(c unsafe.Pointer) Play { return gobject.UnsafeObjectFromGlibFull(c).(Play) } +// UnsafePlayFromGlibBorrow is used to convert raw GstPlay pointers to go without touching any references. This is used by the bindings internally. +func UnsafePlayFromGlibBorrow(c unsafe.Pointer) Play { + return gobject.UnsafeObjectFromGlibBorrow(c).(Play) +} + func (p *PlayInstance) upcastToGstPlay() *PlayInstance { return p } @@ -2253,12 +2503,15 @@ func (play *PlayInstance) Seek(position gst.ClockTime) { // // The function takes the following parameters: // -// - streamIndex int: stream index +// - streamIndex int32: stream index // // The function returns the following values: // // - goret bool -func (play *PlayInstance) SetAudioTrack(streamIndex int) bool { +// +// +// Deprecated: (since 1.26.0) Use gst_play_set_audio_track_id() instead. +func (play *PlayInstance) SetAudioTrack(streamIndex int32) bool { var carg0 *C.GstPlay // in, none, converted var carg1 C.gint // in, none, casted var cret C.gboolean // return @@ -2300,6 +2553,39 @@ func (play *PlayInstance) SetAudioTrackEnabled(enabled bool) { runtime.KeepAlive(enabled) } +// SetAudioTrackID wraps gst_play_set_audio_track_id +// +// The function takes the following parameters: +// +// - streamId string (nullable): stream id +// +// The function returns the following values: +// +// - goret bool +func (play *PlayInstance) SetAudioTrackID(streamId string) bool { + var carg0 *C.GstPlay // in, none, converted + var carg1 *C.gchar // in, none, string, nullable-string + var cret C.gboolean // return + + carg0 = (*C.GstPlay)(UnsafePlayToGlibNone(play)) + if streamId != "" { + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(streamId))) + defer C.free(unsafe.Pointer(carg1)) + } + + cret = C.gst_play_set_audio_track_id(carg0, carg1) + runtime.KeepAlive(play) + runtime.KeepAlive(streamId) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + // SetAudioVideoOffset wraps gst_play_set_audio_video_offset // // The function takes the following parameters: @@ -2467,12 +2753,15 @@ func (play *PlayInstance) SetRate(rate float64) { // // The function takes the following parameters: // -// - streamIndex int: stream index +// - streamIndex int32: stream index // // The function returns the following values: // // - goret bool -func (play *PlayInstance) SetSubtitleTrack(streamIndex int) bool { +// +// +// Deprecated: (since 1.26.0) Use gst_play_set_subtitle_track_id() instead. +func (play *PlayInstance) SetSubtitleTrack(streamIndex int32) bool { var carg0 *C.GstPlay // in, none, converted var carg1 C.gint // in, none, casted var cret C.gboolean // return @@ -2514,6 +2803,39 @@ func (play *PlayInstance) SetSubtitleTrackEnabled(enabled bool) { runtime.KeepAlive(enabled) } +// SetSubtitleTrackID wraps gst_play_set_subtitle_track_id +// +// The function takes the following parameters: +// +// - streamId string (nullable): stream id +// +// The function returns the following values: +// +// - goret bool +func (play *PlayInstance) SetSubtitleTrackID(streamId string) bool { + var carg0 *C.GstPlay // in, none, converted + var carg1 *C.gchar // in, none, string, nullable-string + var cret C.gboolean // return + + carg0 = (*C.GstPlay)(UnsafePlayToGlibNone(play)) + if streamId != "" { + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(streamId))) + defer C.free(unsafe.Pointer(carg1)) + } + + cret = C.gst_play_set_subtitle_track_id(carg0, carg1) + runtime.KeepAlive(play) + runtime.KeepAlive(streamId) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + // SetSubtitleURI wraps gst_play_set_subtitle_uri // // The function takes the following parameters: @@ -2557,6 +2879,53 @@ func (play *PlayInstance) SetSubtitleVideoOffset(offset int64) { runtime.KeepAlive(offset) } +// SetTrackIDs wraps gst_play_set_track_ids +// +// The function takes the following parameters: +// +// - audioStreamId string (nullable): audio stream id +// - videoStreamId string (nullable): video stream id +// - subtitleStreamId string (nullable): subtitle stream id +// +// The function returns the following values: +// +// - goret bool +func (play *PlayInstance) SetTrackIDs(audioStreamId string, videoStreamId string, subtitleStreamId string) bool { + var carg0 *C.GstPlay // in, none, converted + var carg1 *C.gchar // in, none, string, nullable-string + var carg2 *C.gchar // in, none, string, nullable-string + var carg3 *C.gchar // in, none, string, nullable-string + var cret C.gboolean // return + + carg0 = (*C.GstPlay)(UnsafePlayToGlibNone(play)) + if audioStreamId != "" { + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(audioStreamId))) + defer C.free(unsafe.Pointer(carg1)) + } + if videoStreamId != "" { + carg2 = (*C.gchar)(unsafe.Pointer(C.CString(videoStreamId))) + defer C.free(unsafe.Pointer(carg2)) + } + if subtitleStreamId != "" { + carg3 = (*C.gchar)(unsafe.Pointer(C.CString(subtitleStreamId))) + defer C.free(unsafe.Pointer(carg3)) + } + + cret = C.gst_play_set_track_ids(carg0, carg1, carg2, carg3) + runtime.KeepAlive(play) + runtime.KeepAlive(audioStreamId) + runtime.KeepAlive(videoStreamId) + runtime.KeepAlive(subtitleStreamId) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + // SetURI wraps gst_play_set_uri // // The function takes the following parameters: @@ -2583,12 +2952,15 @@ func (play *PlayInstance) SetURI(uri string) { // // The function takes the following parameters: // -// - streamIndex int: stream index +// - streamIndex int32: stream index // // The function returns the following values: // // - goret bool -func (play *PlayInstance) SetVideoTrack(streamIndex int) bool { +// +// +// Deprecated: (since 1.26.0) Use gst_play_set_video_track_id() instead. +func (play *PlayInstance) SetVideoTrack(streamIndex int32) bool { var carg0 *C.GstPlay // in, none, converted var carg1 C.gint // in, none, casted var cret C.gboolean // return @@ -2630,6 +3002,39 @@ func (play *PlayInstance) SetVideoTrackEnabled(enabled bool) { runtime.KeepAlive(enabled) } +// SetVideoTrackID wraps gst_play_set_video_track_id +// +// The function takes the following parameters: +// +// - streamId string (nullable): stream id +// +// The function returns the following values: +// +// - goret bool +func (play *PlayInstance) SetVideoTrackID(streamId string) bool { + var carg0 *C.GstPlay // in, none, converted + var carg1 *C.gchar // in, none, string, nullable-string + var cret C.gboolean // return + + carg0 = (*C.GstPlay)(UnsafePlayToGlibNone(play)) + if streamId != "" { + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(streamId))) + defer C.free(unsafe.Pointer(carg1)) + } + + cret = C.gst_play_set_video_track_id(carg0, carg1) + runtime.KeepAlive(play) + runtime.KeepAlive(streamId) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + // SetVisualization wraps gst_play_set_visualization // // The function takes the following parameters: @@ -2853,6 +3258,11 @@ func UnsafePlayMediaInfoFromGlibFull(c unsafe.Pointer) PlayMediaInfo { return gobject.UnsafeObjectFromGlibFull(c).(PlayMediaInfo) } +// UnsafePlayMediaInfoFromGlibBorrow is used to convert raw GstPlayMediaInfo pointers to go without touching any references. This is used by the bindings internally. +func UnsafePlayMediaInfoFromGlibBorrow(c unsafe.Pointer) PlayMediaInfo { + return gobject.UnsafeObjectFromGlibBorrow(c).(PlayMediaInfo) +} + func (p *PlayMediaInfoInstance) upcastToGstPlayMediaInfo() *PlayMediaInfoInstance { return p } @@ -3266,7 +3676,7 @@ type PlaySignalAdapter interface { // - goret Play GetPlay() Play // ConnectBuffering connects the provided callback to the "buffering" signal - ConnectBuffering(func(PlaySignalAdapter, int)) gobject.SignalHandle + ConnectBuffering(func(PlaySignalAdapter, int32)) gobject.SignalHandle // ConnectDurationChanged connects the provided callback to the "duration-changed" signal ConnectDurationChanged(func(PlaySignalAdapter, uint64)) gobject.SignalHandle // ConnectEndOfStream connects the provided callback to the "end-of-stream" signal @@ -3317,6 +3727,11 @@ func UnsafePlaySignalAdapterFromGlibFull(c unsafe.Pointer) PlaySignalAdapter { return gobject.UnsafeObjectFromGlibFull(c).(PlaySignalAdapter) } +// UnsafePlaySignalAdapterFromGlibBorrow is used to convert raw GstPlaySignalAdapter pointers to go without touching any references. This is used by the bindings internally. +func UnsafePlaySignalAdapterFromGlibBorrow(c unsafe.Pointer) PlaySignalAdapter { + return gobject.UnsafeObjectFromGlibBorrow(c).(PlaySignalAdapter) +} + func (p *PlaySignalAdapterInstance) upcastToGstPlaySignalAdapter() *PlaySignalAdapterInstance { return p } @@ -3445,7 +3860,7 @@ func (adapter *PlaySignalAdapterInstance) GetPlay() Play { } // ConnectBuffering connects the provided callback to the "buffering" signal -func (o *PlaySignalAdapterInstance) ConnectBuffering(fn func(PlaySignalAdapter, int)) gobject.SignalHandle { +func (o *PlaySignalAdapterInstance) ConnectBuffering(fn func(PlaySignalAdapter, int32)) gobject.SignalHandle { return o.Connect("buffering", fn) } @@ -3548,11 +3963,21 @@ type PlayStreamInfo interface { // // The function returns the following values: // - // - goret int + // - goret int32 // // Function to get stream index from #GstPlayStreamInfo instance or -1 if // unknown. - GetIndex() int + // + // Deprecated: (since 1.26.0) Use gst_play_stream_info_get_stream_id(). + GetIndex() int32 + // GetStreamID wraps gst_play_stream_info_get_stream_id + // + // The function returns the following values: + // + // - goret string + // + // A string stream id identifying this #GstPlayStreamInfo. + GetStreamID() string // GetStreamType wraps gst_play_stream_info_get_stream_type // // The function returns the following values: @@ -3590,6 +4015,11 @@ func UnsafePlayStreamInfoFromGlibFull(c unsafe.Pointer) PlayStreamInfo { return gobject.UnsafeObjectFromGlibFull(c).(PlayStreamInfo) } +// UnsafePlayStreamInfoFromGlibBorrow is used to convert raw GstPlayStreamInfo pointers to go without touching any references. This is used by the bindings internally. +func UnsafePlayStreamInfoFromGlibBorrow(c unsafe.Pointer) PlayStreamInfo { + return gobject.UnsafeObjectFromGlibBorrow(c).(PlayStreamInfo) +} + func (p *PlayStreamInfoInstance) upcastToGstPlayStreamInfo() *PlayStreamInfoInstance { return p } @@ -3656,11 +4086,13 @@ func (info *PlayStreamInfoInstance) GetCodec() string { // // The function returns the following values: // -// - goret int +// - goret int32 // // Function to get stream index from #GstPlayStreamInfo instance or -1 if // unknown. -func (info *PlayStreamInfoInstance) GetIndex() int { +// +// Deprecated: (since 1.26.0) Use gst_play_stream_info_get_stream_id(). +func (info *PlayStreamInfoInstance) GetIndex() int32 { var carg0 *C.GstPlayStreamInfo // in, none, converted var cret C.gint // return, none, casted @@ -3669,9 +4101,32 @@ func (info *PlayStreamInfoInstance) GetIndex() int { cret = C.gst_play_stream_info_get_index(carg0) runtime.KeepAlive(info) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) + + return goret +} + +// GetStreamID wraps gst_play_stream_info_get_stream_id +// +// The function returns the following values: +// +// - goret string +// +// A string stream id identifying this #GstPlayStreamInfo. +func (info *PlayStreamInfoInstance) GetStreamID() string { + var carg0 *C.GstPlayStreamInfo // in, none, converted + var cret *C.gchar // return, none, string + + carg0 = (*C.GstPlayStreamInfo)(UnsafePlayStreamInfoToGlibNone(info)) + + cret = C.gst_play_stream_info_get_stream_id(carg0) + runtime.KeepAlive(info) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) return goret } @@ -3768,6 +4223,11 @@ func UnsafePlaySubtitleInfoFromGlibFull(c unsafe.Pointer) PlaySubtitleInfo { return gobject.UnsafeObjectFromGlibFull(c).(PlaySubtitleInfo) } +// UnsafePlaySubtitleInfoFromGlibBorrow is used to convert raw GstPlaySubtitleInfo pointers to go without touching any references. This is used by the bindings internally. +func UnsafePlaySubtitleInfoFromGlibBorrow(c unsafe.Pointer) PlaySubtitleInfo { + return gobject.UnsafeObjectFromGlibBorrow(c).(PlaySubtitleInfo) +} + func (p *PlaySubtitleInfoInstance) upcastToGstPlaySubtitleInfo() *PlaySubtitleInfoInstance { return p } @@ -3824,27 +4284,27 @@ type PlayVideoInfo interface { // // The function returns the following values: // - // - goret int - GetBitrate() int + // - goret int32 + GetBitrate() int32 // GetFramerate wraps gst_play_video_info_get_framerate // // The function returns the following values: // - // - fpsN int: Numerator of frame rate - // - fpsD int: Denominator of frame rate - GetFramerate() (int, int) + // - fpsN int32: Numerator of frame rate + // - fpsD int32: Denominator of frame rate + GetFramerate() (int32, int32) // GetHeight wraps gst_play_video_info_get_height // // The function returns the following values: // - // - goret int - GetHeight() int + // - goret int32 + GetHeight() int32 // GetMaxBitrate wraps gst_play_video_info_get_max_bitrate // // The function returns the following values: // - // - goret int - GetMaxBitrate() int + // - goret int32 + GetMaxBitrate() int32 // GetPixelAspectRatio wraps gst_play_video_info_get_pixel_aspect_ratio // // The function returns the following values: @@ -3858,8 +4318,8 @@ type PlayVideoInfo interface { // // The function returns the following values: // - // - goret int - GetWidth() int + // - goret int32 + GetWidth() int32 } func unsafeWrapPlayVideoInfo(base *gobject.ObjectInstance) *PlayVideoInfoInstance { @@ -3884,6 +4344,11 @@ func UnsafePlayVideoInfoFromGlibFull(c unsafe.Pointer) PlayVideoInfo { return gobject.UnsafeObjectFromGlibFull(c).(PlayVideoInfo) } +// UnsafePlayVideoInfoFromGlibBorrow is used to convert raw GstPlayVideoInfo pointers to go without touching any references. This is used by the bindings internally. +func UnsafePlayVideoInfoFromGlibBorrow(c unsafe.Pointer) PlayVideoInfo { + return gobject.UnsafeObjectFromGlibBorrow(c).(PlayVideoInfo) +} + func (p *PlayVideoInfoInstance) upcastToGstPlayVideoInfo() *PlayVideoInfoInstance { return p } @@ -3902,8 +4367,8 @@ func UnsafePlayVideoInfoToGlibFull(c PlayVideoInfo) unsafe.Pointer { // // The function returns the following values: // -// - goret int -func (info *PlayVideoInfoInstance) GetBitrate() int { +// - goret int32 +func (info *PlayVideoInfoInstance) GetBitrate() int32 { var carg0 *C.GstPlayVideoInfo // in, none, converted var cret C.gint // return, none, casted @@ -3912,9 +4377,9 @@ func (info *PlayVideoInfoInstance) GetBitrate() int { cret = C.gst_play_video_info_get_bitrate(carg0) runtime.KeepAlive(info) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -3923,9 +4388,9 @@ func (info *PlayVideoInfoInstance) GetBitrate() int { // // The function returns the following values: // -// - fpsN int: Numerator of frame rate -// - fpsD int: Denominator of frame rate -func (info *PlayVideoInfoInstance) GetFramerate() (int, int) { +// - fpsN int32: Numerator of frame rate +// - fpsD int32: Denominator of frame rate +func (info *PlayVideoInfoInstance) GetFramerate() (int32, int32) { var carg0 *C.GstPlayVideoInfo // in, none, converted var carg1 C.gint // out, full, casted var carg2 C.gint // out, full, casted @@ -3935,11 +4400,11 @@ func (info *PlayVideoInfoInstance) GetFramerate() (int, int) { C.gst_play_video_info_get_framerate(carg0, &carg1, &carg2) runtime.KeepAlive(info) - var fpsN int - var fpsD int + var fpsN int32 + var fpsD int32 - fpsN = int(carg1) - fpsD = int(carg2) + fpsN = int32(carg1) + fpsD = int32(carg2) return fpsN, fpsD } @@ -3948,8 +4413,8 @@ func (info *PlayVideoInfoInstance) GetFramerate() (int, int) { // // The function returns the following values: // -// - goret int -func (info *PlayVideoInfoInstance) GetHeight() int { +// - goret int32 +func (info *PlayVideoInfoInstance) GetHeight() int32 { var carg0 *C.GstPlayVideoInfo // in, none, converted var cret C.gint // return, none, casted @@ -3958,9 +4423,9 @@ func (info *PlayVideoInfoInstance) GetHeight() int { cret = C.gst_play_video_info_get_height(carg0) runtime.KeepAlive(info) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -3969,8 +4434,8 @@ func (info *PlayVideoInfoInstance) GetHeight() int { // // The function returns the following values: // -// - goret int -func (info *PlayVideoInfoInstance) GetMaxBitrate() int { +// - goret int32 +func (info *PlayVideoInfoInstance) GetMaxBitrate() int32 { var carg0 *C.GstPlayVideoInfo // in, none, converted var cret C.gint // return, none, casted @@ -3979,9 +4444,9 @@ func (info *PlayVideoInfoInstance) GetMaxBitrate() int { cret = C.gst_play_video_info_get_max_bitrate(carg0) runtime.KeepAlive(info) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -4017,8 +4482,8 @@ func (info *PlayVideoInfoInstance) GetPixelAspectRatio() (uint, uint) { // // The function returns the following values: // -// - goret int -func (info *PlayVideoInfoInstance) GetWidth() int { +// - goret int32 +func (info *PlayVideoInfoInstance) GetWidth() int32 { var carg0 *C.GstPlayVideoInfo // in, none, converted var cret C.gint // return, none, casted @@ -4027,9 +4492,9 @@ func (info *PlayVideoInfoInstance) GetWidth() int { cret = C.gst_play_video_info_get_width(carg0) runtime.KeepAlive(info) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -4056,22 +4521,22 @@ type PlayVideoOverlayVideoRenderer interface { // // The function returns the following values: // - // - x int: the horizontal offset of the render area inside the window - // - y int: the vertical offset of the render area inside the window - // - width int: the width of the render area inside the window - // - height int: the height of the render area inside the window + // - x int32: the horizontal offset of the render area inside the window + // - y int32: the vertical offset of the render area inside the window + // - width int32: the width of the render area inside the window + // - height int32: the height of the render area inside the window // // Return the currently configured render rectangle. See gst_play_video_overlay_video_renderer_set_render_rectangle() // for details. - GetRenderRectangle() (int, int, int, int) + GetRenderRectangle() (int32, int32, int32, int32) // SetRenderRectangle wraps gst_play_video_overlay_video_renderer_set_render_rectangle // // The function takes the following parameters: // - // - x int: the horizontal offset of the render area inside the window - // - y int: the vertical offset of the render area inside the window - // - width int: the width of the render area inside the window - // - height int: the height of the render area inside the window + // - x int32: the horizontal offset of the render area inside the window + // - y int32: the vertical offset of the render area inside the window + // - width int32: the width of the render area inside the window + // - height int32: the height of the render area inside the window // // Configure a subregion as a video target within the window set by // gst_play_video_overlay_video_renderer_set_window_handle(). If this is not @@ -4083,7 +4548,7 @@ type PlayVideoOverlayVideoRenderer interface { // // This method is needed for non fullscreen video overlay in UI toolkits that // do not support subwindows. - SetRenderRectangle(int, int, int, int) + SetRenderRectangle(int32, int32, int32, int32) } func unsafeWrapPlayVideoOverlayVideoRenderer(base *gobject.ObjectInstance) *PlayVideoOverlayVideoRendererInstance { @@ -4106,6 +4571,11 @@ func UnsafePlayVideoOverlayVideoRendererFromGlibFull(c unsafe.Pointer) PlayVideo return gobject.UnsafeObjectFromGlibFull(c).(PlayVideoOverlayVideoRenderer) } +// UnsafePlayVideoOverlayVideoRendererFromGlibBorrow is used to convert raw GstPlayVideoOverlayVideoRenderer pointers to go without touching any references. This is used by the bindings internally. +func UnsafePlayVideoOverlayVideoRendererFromGlibBorrow(c unsafe.Pointer) PlayVideoOverlayVideoRenderer { + return gobject.UnsafeObjectFromGlibBorrow(c).(PlayVideoOverlayVideoRenderer) +} + func (p *PlayVideoOverlayVideoRendererInstance) upcastToGstPlayVideoOverlayVideoRenderer() *PlayVideoOverlayVideoRendererInstance { return p } @@ -4137,14 +4607,14 @@ func (self *PlayVideoOverlayVideoRendererInstance) Expose() { // // The function returns the following values: // -// - x int: the horizontal offset of the render area inside the window -// - y int: the vertical offset of the render area inside the window -// - width int: the width of the render area inside the window -// - height int: the height of the render area inside the window +// - x int32: the horizontal offset of the render area inside the window +// - y int32: the vertical offset of the render area inside the window +// - width int32: the width of the render area inside the window +// - height int32: the height of the render area inside the window // // Return the currently configured render rectangle. See gst_play_video_overlay_video_renderer_set_render_rectangle() // for details. -func (self *PlayVideoOverlayVideoRendererInstance) GetRenderRectangle() (int, int, int, int) { +func (self *PlayVideoOverlayVideoRendererInstance) GetRenderRectangle() (int32, int32, int32, int32) { var carg0 *C.GstPlayVideoOverlayVideoRenderer // in, none, converted var carg1 C.gint // out, full, casted var carg2 C.gint // out, full, casted @@ -4156,15 +4626,15 @@ func (self *PlayVideoOverlayVideoRendererInstance) GetRenderRectangle() (int, in C.gst_play_video_overlay_video_renderer_get_render_rectangle(carg0, &carg1, &carg2, &carg3, &carg4) runtime.KeepAlive(self) - var x int - var y int - var width int - var height int + var x int32 + var y int32 + var width int32 + var height int32 - x = int(carg1) - y = int(carg2) - width = int(carg3) - height = int(carg4) + x = int32(carg1) + y = int32(carg2) + width = int32(carg3) + height = int32(carg4) return x, y, width, height } @@ -4173,10 +4643,10 @@ func (self *PlayVideoOverlayVideoRendererInstance) GetRenderRectangle() (int, in // // The function takes the following parameters: // -// - x int: the horizontal offset of the render area inside the window -// - y int: the vertical offset of the render area inside the window -// - width int: the width of the render area inside the window -// - height int: the height of the render area inside the window +// - x int32: the horizontal offset of the render area inside the window +// - y int32: the vertical offset of the render area inside the window +// - width int32: the width of the render area inside the window +// - height int32: the height of the render area inside the window // // Configure a subregion as a video target within the window set by // gst_play_video_overlay_video_renderer_set_window_handle(). If this is not @@ -4188,7 +4658,7 @@ func (self *PlayVideoOverlayVideoRendererInstance) GetRenderRectangle() (int, in // // This method is needed for non fullscreen video overlay in UI toolkits that // do not support subwindows. -func (self *PlayVideoOverlayVideoRendererInstance) SetRenderRectangle(x int, y int, width int, height int) { +func (self *PlayVideoOverlayVideoRendererInstance) SetRenderRectangle(x int32, y int32, width int32, height int32) { var carg0 *C.GstPlayVideoOverlayVideoRenderer // in, none, converted var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted @@ -4228,14 +4698,14 @@ type PlayAudioInfo interface { // // The function returns the following values: // - // - goret int - GetBitrate() int + // - goret int32 + GetBitrate() int32 // GetChannels wraps gst_play_audio_info_get_channels // // The function returns the following values: // - // - goret int - GetChannels() int + // - goret int32 + GetChannels() int32 // GetLanguage wraps gst_play_audio_info_get_language // // The function returns the following values: @@ -4246,14 +4716,14 @@ type PlayAudioInfo interface { // // The function returns the following values: // - // - goret int - GetMaxBitrate() int + // - goret int32 + GetMaxBitrate() int32 // GetSampleRate wraps gst_play_audio_info_get_sample_rate // // The function returns the following values: // - // - goret int - GetSampleRate() int + // - goret int32 + GetSampleRate() int32 } func unsafeWrapPlayAudioInfo(base *gobject.ObjectInstance) *PlayAudioInfoInstance { @@ -4278,6 +4748,11 @@ func UnsafePlayAudioInfoFromGlibFull(c unsafe.Pointer) PlayAudioInfo { return gobject.UnsafeObjectFromGlibFull(c).(PlayAudioInfo) } +// UnsafePlayAudioInfoFromGlibBorrow is used to convert raw GstPlayAudioInfo pointers to go without touching any references. This is used by the bindings internally. +func UnsafePlayAudioInfoFromGlibBorrow(c unsafe.Pointer) PlayAudioInfo { + return gobject.UnsafeObjectFromGlibBorrow(c).(PlayAudioInfo) +} + func (p *PlayAudioInfoInstance) upcastToGstPlayAudioInfo() *PlayAudioInfoInstance { return p } @@ -4296,8 +4771,8 @@ func UnsafePlayAudioInfoToGlibFull(c PlayAudioInfo) unsafe.Pointer { // // The function returns the following values: // -// - goret int -func (info *PlayAudioInfoInstance) GetBitrate() int { +// - goret int32 +func (info *PlayAudioInfoInstance) GetBitrate() int32 { var carg0 *C.GstPlayAudioInfo // in, none, converted var cret C.gint // return, none, casted @@ -4306,9 +4781,9 @@ func (info *PlayAudioInfoInstance) GetBitrate() int { cret = C.gst_play_audio_info_get_bitrate(carg0) runtime.KeepAlive(info) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -4317,8 +4792,8 @@ func (info *PlayAudioInfoInstance) GetBitrate() int { // // The function returns the following values: // -// - goret int -func (info *PlayAudioInfoInstance) GetChannels() int { +// - goret int32 +func (info *PlayAudioInfoInstance) GetChannels() int32 { var carg0 *C.GstPlayAudioInfo // in, none, converted var cret C.gint // return, none, casted @@ -4327,9 +4802,9 @@ func (info *PlayAudioInfoInstance) GetChannels() int { cret = C.gst_play_audio_info_get_channels(carg0) runtime.KeepAlive(info) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -4361,8 +4836,8 @@ func (info *PlayAudioInfoInstance) GetLanguage() string { // // The function returns the following values: // -// - goret int -func (info *PlayAudioInfoInstance) GetMaxBitrate() int { +// - goret int32 +func (info *PlayAudioInfoInstance) GetMaxBitrate() int32 { var carg0 *C.GstPlayAudioInfo // in, none, converted var cret C.gint // return, none, casted @@ -4371,9 +4846,9 @@ func (info *PlayAudioInfoInstance) GetMaxBitrate() int { cret = C.gst_play_audio_info_get_max_bitrate(carg0) runtime.KeepAlive(info) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -4382,8 +4857,8 @@ func (info *PlayAudioInfoInstance) GetMaxBitrate() int { // // The function returns the following values: // -// - goret int -func (info *PlayAudioInfoInstance) GetSampleRate() int { +// - goret int32 +func (info *PlayAudioInfoInstance) GetSampleRate() int32 { var carg0 *C.GstPlayAudioInfo // in, none, converted var cret C.gint // return, none, casted @@ -4392,9 +4867,9 @@ func (info *PlayAudioInfoInstance) GetSampleRate() int { cret = C.gst_play_audio_info_get_sample_rate(carg0) runtime.KeepAlive(info) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -4783,8 +5258,11 @@ func marshalPlayVisualization(p unsafe.Pointer) (interface{}, error) { return UnsafePlayVisualizationFromGlibBorrow(b), nil } -func (r *PlayVisualization) InitGoValue(v *gobject.Value) { - v.Init(TypePlayVisualization) +func (r *PlayVisualization) GoValueType() gobject.Type { + return TypePlayVisualization +} + +func (r *PlayVisualization) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } diff --git a/pkg/gstplayer/gstplayer.gen.go b/pkg/gstplayer/gstplayer.gen.go index 4ee7e4a..ff27783 100644 --- a/pkg/gstplayer/gstplayer.gen.go +++ b/pkg/gstplayer/gstplayer.gen.go @@ -84,8 +84,11 @@ func marshalPlayerColorBalanceType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = PlayerColorBalanceType(0) -func (e PlayerColorBalanceType) InitGoValue(v *gobject.Value) { - v.Init(TypePlayerColorBalanceType) +func (e PlayerColorBalanceType) GoValueType() gobject.Type { + return TypePlayerColorBalanceType +} + +func (e PlayerColorBalanceType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -142,8 +145,11 @@ func marshalPlayerError(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = PlayerError(0) -func (e PlayerError) InitGoValue(v *gobject.Value) { - v.Init(TypePlayerError) +func (e PlayerError) GoValueType() gobject.Type { + return TypePlayerError +} + +func (e PlayerError) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -255,8 +261,11 @@ func marshalPlayerState(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = PlayerState(0) -func (e PlayerState) InitGoValue(v *gobject.Value) { - v.Init(TypePlayerState) +func (e PlayerState) GoValueType() gobject.Type { + return TypePlayerState +} + +func (e PlayerState) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -336,6 +345,11 @@ func UnsafePlayerSignalDispatcherFromGlibFull(c unsafe.Pointer) PlayerSignalDisp return gobject.UnsafeObjectFromGlibFull(c).(PlayerSignalDispatcher) } +// UnsafePlayerSignalDispatcherFromGlibBorrow is used to convert raw GstPlayerSignalDispatcher pointers to go without touching any references. This is used by the bindings internally. +func UnsafePlayerSignalDispatcherFromGlibBorrow(c unsafe.Pointer) PlayerSignalDispatcher { + return gobject.UnsafeObjectFromGlibBorrow(c).(PlayerSignalDispatcher) +} + // UnsafePlayerSignalDispatcherToGlibNone is used to convert the instance to it's C value GstPlayerSignalDispatcher. This is used by the bindings internally. func UnsafePlayerSignalDispatcherToGlibNone(c PlayerSignalDispatcher) unsafe.Pointer { i := c.upcastToGstPlayerSignalDispatcher() @@ -397,6 +411,11 @@ func UnsafePlayerVideoRendererFromGlibFull(c unsafe.Pointer) PlayerVideoRenderer return gobject.UnsafeObjectFromGlibFull(c).(PlayerVideoRenderer) } +// UnsafePlayerVideoRendererFromGlibBorrow is used to convert raw GstPlayerVideoRenderer pointers to go without touching any references. This is used by the bindings internally. +func UnsafePlayerVideoRendererFromGlibBorrow(c unsafe.Pointer) PlayerVideoRenderer { + return gobject.UnsafeObjectFromGlibBorrow(c).(PlayerVideoRenderer) +} + // UnsafePlayerVideoRendererToGlibNone is used to convert the instance to it's C value GstPlayerVideoRenderer. This is used by the bindings internally. func UnsafePlayerVideoRendererToGlibNone(c PlayerVideoRenderer) unsafe.Pointer { i := c.upcastToGstPlayerVideoRenderer() @@ -630,12 +649,12 @@ type Player interface { // // The function takes the following parameters: // - // - streamIndex int: stream index + // - streamIndex int32: stream index // // The function returns the following values: // // - goret bool - SetAudioTrack(int) bool + SetAudioTrack(int32) bool // SetAudioTrackEnabled wraps gst_player_set_audio_track_enabled // // The function takes the following parameters: @@ -720,12 +739,12 @@ type Player interface { // // The function takes the following parameters: // - // - streamIndex int: stream index + // - streamIndex int32: stream index // // The function returns the following values: // // - goret bool - SetSubtitleTrack(int) bool + SetSubtitleTrack(int32) bool // SetSubtitleTrackEnabled wraps gst_player_set_subtitle_track_enabled // // The function takes the following parameters: @@ -764,12 +783,12 @@ type Player interface { // // The function takes the following parameters: // - // - streamIndex int: stream index + // - streamIndex int32: stream index // // The function returns the following values: // // - goret bool - SetVideoTrack(int) bool + SetVideoTrack(int32) bool // SetVideoTrackEnabled wraps gst_player_set_video_track_enabled // // The function takes the following parameters: @@ -815,7 +834,7 @@ type Player interface { // in the stream. Stop() // ConnectBuffering connects the provided callback to the "buffering" signal - ConnectBuffering(func(Player, int)) gobject.SignalHandle + ConnectBuffering(func(Player, int32)) gobject.SignalHandle // ConnectDurationChanged connects the provided callback to the "duration-changed" signal ConnectDurationChanged(func(Player, uint64)) gobject.SignalHandle // ConnectEndOfStream connects the provided callback to the "end-of-stream" signal @@ -835,7 +854,7 @@ type Player interface { // ConnectURILoaded connects the provided callback to the "uri-loaded" signal ConnectURILoaded(func(Player, string)) gobject.SignalHandle // ConnectVideoDimensionsChanged connects the provided callback to the "video-dimensions-changed" signal - ConnectVideoDimensionsChanged(func(Player, int, int)) gobject.SignalHandle + ConnectVideoDimensionsChanged(func(Player, int32, int32)) gobject.SignalHandle // ConnectVolumeChanged connects the provided callback to the "volume-changed" signal ConnectVolumeChanged(func(Player)) gobject.SignalHandle // ConnectWarning connects the provided callback to the "warning" signal @@ -866,6 +885,11 @@ func UnsafePlayerFromGlibFull(c unsafe.Pointer) Player { return gobject.UnsafeObjectFromGlibFull(c).(Player) } +// UnsafePlayerFromGlibBorrow is used to convert raw GstPlayer pointers to go without touching any references. This is used by the bindings internally. +func UnsafePlayerFromGlibBorrow(c unsafe.Pointer) Player { + return gobject.UnsafeObjectFromGlibBorrow(c).(Player) +} + func (p *PlayerInstance) upcastToGstPlayer() *PlayerInstance { return p } @@ -1750,12 +1774,12 @@ func (player *PlayerInstance) Seek(position gst.ClockTime) { // // The function takes the following parameters: // -// - streamIndex int: stream index +// - streamIndex int32: stream index // // The function returns the following values: // // - goret bool -func (player *PlayerInstance) SetAudioTrack(streamIndex int) bool { +func (player *PlayerInstance) SetAudioTrack(streamIndex int32) bool { var carg0 *C.GstPlayer // in, none, converted var carg1 C.gint // in, none, casted var cret C.gboolean // return @@ -1964,12 +1988,12 @@ func (player *PlayerInstance) SetRate(rate float64) { // // The function takes the following parameters: // -// - streamIndex int: stream index +// - streamIndex int32: stream index // // The function returns the following values: // // - goret bool -func (player *PlayerInstance) SetSubtitleTrack(streamIndex int) bool { +func (player *PlayerInstance) SetSubtitleTrack(streamIndex int32) bool { var carg0 *C.GstPlayer // in, none, converted var carg1 C.gint // in, none, casted var cret C.gboolean // return @@ -2080,12 +2104,12 @@ func (player *PlayerInstance) SetURI(uri string) { // // The function takes the following parameters: // -// - streamIndex int: stream index +// - streamIndex int32: stream index // // The function returns the following values: // // - goret bool -func (player *PlayerInstance) SetVideoTrack(streamIndex int) bool { +func (player *PlayerInstance) SetVideoTrack(streamIndex int32) bool { var carg0 *C.GstPlayer // in, none, converted var carg1 C.gint // in, none, casted var cret C.gboolean // return @@ -2219,7 +2243,7 @@ func (player *PlayerInstance) Stop() { } // ConnectBuffering connects the provided callback to the "buffering" signal -func (o *PlayerInstance) ConnectBuffering(fn func(Player, int)) gobject.SignalHandle { +func (o *PlayerInstance) ConnectBuffering(fn func(Player, int32)) gobject.SignalHandle { return o.Connect("buffering", fn) } @@ -2269,7 +2293,7 @@ func (o *PlayerInstance) ConnectURILoaded(fn func(Player, string)) gobject.Signa } // ConnectVideoDimensionsChanged connects the provided callback to the "video-dimensions-changed" signal -func (o *PlayerInstance) ConnectVideoDimensionsChanged(fn func(Player, int, int)) gobject.SignalHandle { +func (o *PlayerInstance) ConnectVideoDimensionsChanged(fn func(Player, int32, int32)) gobject.SignalHandle { return o.Connect("video-dimensions-changed", fn) } @@ -2317,6 +2341,11 @@ func UnsafePlayerGMainContextSignalDispatcherFromGlibFull(c unsafe.Pointer) Play return gobject.UnsafeObjectFromGlibFull(c).(PlayerGMainContextSignalDispatcher) } +// UnsafePlayerGMainContextSignalDispatcherFromGlibBorrow is used to convert raw GstPlayerGMainContextSignalDispatcher pointers to go without touching any references. This is used by the bindings internally. +func UnsafePlayerGMainContextSignalDispatcherFromGlibBorrow(c unsafe.Pointer) PlayerGMainContextSignalDispatcher { + return gobject.UnsafeObjectFromGlibBorrow(c).(PlayerGMainContextSignalDispatcher) +} + func (p *PlayerGMainContextSignalDispatcherInstance) upcastToGstPlayerGMainContextSignalDispatcher() *PlayerGMainContextSignalDispatcherInstance { return p } @@ -2497,6 +2526,11 @@ func UnsafePlayerMediaInfoFromGlibFull(c unsafe.Pointer) PlayerMediaInfo { return gobject.UnsafeObjectFromGlibFull(c).(PlayerMediaInfo) } +// UnsafePlayerMediaInfoFromGlibBorrow is used to convert raw GstPlayerMediaInfo pointers to go without touching any references. This is used by the bindings internally. +func UnsafePlayerMediaInfoFromGlibBorrow(c unsafe.Pointer) PlayerMediaInfo { + return gobject.UnsafeObjectFromGlibBorrow(c).(PlayerMediaInfo) +} + func (p *PlayerMediaInfoInstance) upcastToGstPlayerMediaInfo() *PlayerMediaInfoInstance { return p } @@ -2925,11 +2959,11 @@ type PlayerStreamInfo interface { // // The function returns the following values: // - // - goret int + // - goret int32 // // Function to get stream index from #GstPlayerStreamInfo instance or -1 if // unknown. - GetIndex() int + GetIndex() int32 // GetStreamType wraps gst_player_stream_info_get_stream_type // // The function returns the following values: @@ -2967,6 +3001,11 @@ func UnsafePlayerStreamInfoFromGlibFull(c unsafe.Pointer) PlayerStreamInfo { return gobject.UnsafeObjectFromGlibFull(c).(PlayerStreamInfo) } +// UnsafePlayerStreamInfoFromGlibBorrow is used to convert raw GstPlayerStreamInfo pointers to go without touching any references. This is used by the bindings internally. +func UnsafePlayerStreamInfoFromGlibBorrow(c unsafe.Pointer) PlayerStreamInfo { + return gobject.UnsafeObjectFromGlibBorrow(c).(PlayerStreamInfo) +} + func (p *PlayerStreamInfoInstance) upcastToGstPlayerStreamInfo() *PlayerStreamInfoInstance { return p } @@ -3033,11 +3072,11 @@ func (info *PlayerStreamInfoInstance) GetCodec() string { // // The function returns the following values: // -// - goret int +// - goret int32 // // Function to get stream index from #GstPlayerStreamInfo instance or -1 if // unknown. -func (info *PlayerStreamInfoInstance) GetIndex() int { +func (info *PlayerStreamInfoInstance) GetIndex() int32 { var carg0 *C.GstPlayerStreamInfo // in, none, converted var cret C.gint // return, none, casted @@ -3046,9 +3085,9 @@ func (info *PlayerStreamInfoInstance) GetIndex() int { cret = C.gst_player_stream_info_get_index(carg0) runtime.KeepAlive(info) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -3145,6 +3184,11 @@ func UnsafePlayerSubtitleInfoFromGlibFull(c unsafe.Pointer) PlayerSubtitleInfo { return gobject.UnsafeObjectFromGlibFull(c).(PlayerSubtitleInfo) } +// UnsafePlayerSubtitleInfoFromGlibBorrow is used to convert raw GstPlayerSubtitleInfo pointers to go without touching any references. This is used by the bindings internally. +func UnsafePlayerSubtitleInfoFromGlibBorrow(c unsafe.Pointer) PlayerSubtitleInfo { + return gobject.UnsafeObjectFromGlibBorrow(c).(PlayerSubtitleInfo) +} + func (p *PlayerSubtitleInfoInstance) upcastToGstPlayerSubtitleInfo() *PlayerSubtitleInfoInstance { return p } @@ -3201,27 +3245,27 @@ type PlayerVideoInfo interface { // // The function returns the following values: // - // - goret int - GetBitrate() int + // - goret int32 + GetBitrate() int32 // GetFramerate wraps gst_player_video_info_get_framerate // // The function returns the following values: // - // - fpsN int: Numerator of frame rate - // - fpsD int: Denominator of frame rate - GetFramerate() (int, int) + // - fpsN int32: Numerator of frame rate + // - fpsD int32: Denominator of frame rate + GetFramerate() (int32, int32) // GetHeight wraps gst_player_video_info_get_height // // The function returns the following values: // - // - goret int - GetHeight() int + // - goret int32 + GetHeight() int32 // GetMaxBitrate wraps gst_player_video_info_get_max_bitrate // // The function returns the following values: // - // - goret int - GetMaxBitrate() int + // - goret int32 + GetMaxBitrate() int32 // GetPixelAspectRatio wraps gst_player_video_info_get_pixel_aspect_ratio // // The function returns the following values: @@ -3235,8 +3279,8 @@ type PlayerVideoInfo interface { // // The function returns the following values: // - // - goret int - GetWidth() int + // - goret int32 + GetWidth() int32 } func unsafeWrapPlayerVideoInfo(base *gobject.ObjectInstance) *PlayerVideoInfoInstance { @@ -3261,6 +3305,11 @@ func UnsafePlayerVideoInfoFromGlibFull(c unsafe.Pointer) PlayerVideoInfo { return gobject.UnsafeObjectFromGlibFull(c).(PlayerVideoInfo) } +// UnsafePlayerVideoInfoFromGlibBorrow is used to convert raw GstPlayerVideoInfo pointers to go without touching any references. This is used by the bindings internally. +func UnsafePlayerVideoInfoFromGlibBorrow(c unsafe.Pointer) PlayerVideoInfo { + return gobject.UnsafeObjectFromGlibBorrow(c).(PlayerVideoInfo) +} + func (p *PlayerVideoInfoInstance) upcastToGstPlayerVideoInfo() *PlayerVideoInfoInstance { return p } @@ -3279,8 +3328,8 @@ func UnsafePlayerVideoInfoToGlibFull(c PlayerVideoInfo) unsafe.Pointer { // // The function returns the following values: // -// - goret int -func (info *PlayerVideoInfoInstance) GetBitrate() int { +// - goret int32 +func (info *PlayerVideoInfoInstance) GetBitrate() int32 { var carg0 *C.GstPlayerVideoInfo // in, none, converted var cret C.gint // return, none, casted @@ -3289,9 +3338,9 @@ func (info *PlayerVideoInfoInstance) GetBitrate() int { cret = C.gst_player_video_info_get_bitrate(carg0) runtime.KeepAlive(info) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -3300,9 +3349,9 @@ func (info *PlayerVideoInfoInstance) GetBitrate() int { // // The function returns the following values: // -// - fpsN int: Numerator of frame rate -// - fpsD int: Denominator of frame rate -func (info *PlayerVideoInfoInstance) GetFramerate() (int, int) { +// - fpsN int32: Numerator of frame rate +// - fpsD int32: Denominator of frame rate +func (info *PlayerVideoInfoInstance) GetFramerate() (int32, int32) { var carg0 *C.GstPlayerVideoInfo // in, none, converted var carg1 C.gint // out, full, casted var carg2 C.gint // out, full, casted @@ -3312,11 +3361,11 @@ func (info *PlayerVideoInfoInstance) GetFramerate() (int, int) { C.gst_player_video_info_get_framerate(carg0, &carg1, &carg2) runtime.KeepAlive(info) - var fpsN int - var fpsD int + var fpsN int32 + var fpsD int32 - fpsN = int(carg1) - fpsD = int(carg2) + fpsN = int32(carg1) + fpsD = int32(carg2) return fpsN, fpsD } @@ -3325,8 +3374,8 @@ func (info *PlayerVideoInfoInstance) GetFramerate() (int, int) { // // The function returns the following values: // -// - goret int -func (info *PlayerVideoInfoInstance) GetHeight() int { +// - goret int32 +func (info *PlayerVideoInfoInstance) GetHeight() int32 { var carg0 *C.GstPlayerVideoInfo // in, none, converted var cret C.gint // return, none, casted @@ -3335,9 +3384,9 @@ func (info *PlayerVideoInfoInstance) GetHeight() int { cret = C.gst_player_video_info_get_height(carg0) runtime.KeepAlive(info) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -3346,8 +3395,8 @@ func (info *PlayerVideoInfoInstance) GetHeight() int { // // The function returns the following values: // -// - goret int -func (info *PlayerVideoInfoInstance) GetMaxBitrate() int { +// - goret int32 +func (info *PlayerVideoInfoInstance) GetMaxBitrate() int32 { var carg0 *C.GstPlayerVideoInfo // in, none, converted var cret C.gint // return, none, casted @@ -3356,9 +3405,9 @@ func (info *PlayerVideoInfoInstance) GetMaxBitrate() int { cret = C.gst_player_video_info_get_max_bitrate(carg0) runtime.KeepAlive(info) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -3394,8 +3443,8 @@ func (info *PlayerVideoInfoInstance) GetPixelAspectRatio() (uint, uint) { // // The function returns the following values: // -// - goret int -func (info *PlayerVideoInfoInstance) GetWidth() int { +// - goret int32 +func (info *PlayerVideoInfoInstance) GetWidth() int32 { var carg0 *C.GstPlayerVideoInfo // in, none, converted var cret C.gint // return, none, casted @@ -3404,9 +3453,9 @@ func (info *PlayerVideoInfoInstance) GetWidth() int { cret = C.gst_player_video_info_get_width(carg0) runtime.KeepAlive(info) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -3433,22 +3482,22 @@ type PlayerVideoOverlayVideoRenderer interface { // // The function returns the following values: // - // - x int: the horizontal offset of the render area inside the window - // - y int: the vertical offset of the render area inside the window - // - width int: the width of the render area inside the window - // - height int: the height of the render area inside the window + // - x int32: the horizontal offset of the render area inside the window + // - y int32: the vertical offset of the render area inside the window + // - width int32: the width of the render area inside the window + // - height int32: the height of the render area inside the window // // Return the currently configured render rectangle. See gst_player_video_overlay_video_renderer_set_render_rectangle() // for details. - GetRenderRectangle() (int, int, int, int) + GetRenderRectangle() (int32, int32, int32, int32) // SetRenderRectangle wraps gst_player_video_overlay_video_renderer_set_render_rectangle // // The function takes the following parameters: // - // - x int: the horizontal offset of the render area inside the window - // - y int: the vertical offset of the render area inside the window - // - width int: the width of the render area inside the window - // - height int: the height of the render area inside the window + // - x int32: the horizontal offset of the render area inside the window + // - y int32: the vertical offset of the render area inside the window + // - width int32: the width of the render area inside the window + // - height int32: the height of the render area inside the window // // Configure a subregion as a video target within the window set by // gst_player_video_overlay_video_renderer_set_window_handle(). If this is not @@ -3460,7 +3509,7 @@ type PlayerVideoOverlayVideoRenderer interface { // // This method is needed for non fullscreen video overlay in UI toolkits that // do not support subwindows. - SetRenderRectangle(int, int, int, int) + SetRenderRectangle(int32, int32, int32, int32) } func unsafeWrapPlayerVideoOverlayVideoRenderer(base *gobject.ObjectInstance) *PlayerVideoOverlayVideoRendererInstance { @@ -3483,6 +3532,11 @@ func UnsafePlayerVideoOverlayVideoRendererFromGlibFull(c unsafe.Pointer) PlayerV return gobject.UnsafeObjectFromGlibFull(c).(PlayerVideoOverlayVideoRenderer) } +// UnsafePlayerVideoOverlayVideoRendererFromGlibBorrow is used to convert raw GstPlayerVideoOverlayVideoRenderer pointers to go without touching any references. This is used by the bindings internally. +func UnsafePlayerVideoOverlayVideoRendererFromGlibBorrow(c unsafe.Pointer) PlayerVideoOverlayVideoRenderer { + return gobject.UnsafeObjectFromGlibBorrow(c).(PlayerVideoOverlayVideoRenderer) +} + func (p *PlayerVideoOverlayVideoRendererInstance) upcastToGstPlayerVideoOverlayVideoRenderer() *PlayerVideoOverlayVideoRendererInstance { return p } @@ -3514,14 +3568,14 @@ func (self *PlayerVideoOverlayVideoRendererInstance) Expose() { // // The function returns the following values: // -// - x int: the horizontal offset of the render area inside the window -// - y int: the vertical offset of the render area inside the window -// - width int: the width of the render area inside the window -// - height int: the height of the render area inside the window +// - x int32: the horizontal offset of the render area inside the window +// - y int32: the vertical offset of the render area inside the window +// - width int32: the width of the render area inside the window +// - height int32: the height of the render area inside the window // // Return the currently configured render rectangle. See gst_player_video_overlay_video_renderer_set_render_rectangle() // for details. -func (self *PlayerVideoOverlayVideoRendererInstance) GetRenderRectangle() (int, int, int, int) { +func (self *PlayerVideoOverlayVideoRendererInstance) GetRenderRectangle() (int32, int32, int32, int32) { var carg0 *C.GstPlayerVideoOverlayVideoRenderer // in, none, converted var carg1 C.gint // out, full, casted var carg2 C.gint // out, full, casted @@ -3533,15 +3587,15 @@ func (self *PlayerVideoOverlayVideoRendererInstance) GetRenderRectangle() (int, C.gst_player_video_overlay_video_renderer_get_render_rectangle(carg0, &carg1, &carg2, &carg3, &carg4) runtime.KeepAlive(self) - var x int - var y int - var width int - var height int + var x int32 + var y int32 + var width int32 + var height int32 - x = int(carg1) - y = int(carg2) - width = int(carg3) - height = int(carg4) + x = int32(carg1) + y = int32(carg2) + width = int32(carg3) + height = int32(carg4) return x, y, width, height } @@ -3550,10 +3604,10 @@ func (self *PlayerVideoOverlayVideoRendererInstance) GetRenderRectangle() (int, // // The function takes the following parameters: // -// - x int: the horizontal offset of the render area inside the window -// - y int: the vertical offset of the render area inside the window -// - width int: the width of the render area inside the window -// - height int: the height of the render area inside the window +// - x int32: the horizontal offset of the render area inside the window +// - y int32: the vertical offset of the render area inside the window +// - width int32: the width of the render area inside the window +// - height int32: the height of the render area inside the window // // Configure a subregion as a video target within the window set by // gst_player_video_overlay_video_renderer_set_window_handle(). If this is not @@ -3565,7 +3619,7 @@ func (self *PlayerVideoOverlayVideoRendererInstance) GetRenderRectangle() (int, // // This method is needed for non fullscreen video overlay in UI toolkits that // do not support subwindows. -func (self *PlayerVideoOverlayVideoRendererInstance) SetRenderRectangle(x int, y int, width int, height int) { +func (self *PlayerVideoOverlayVideoRendererInstance) SetRenderRectangle(x int32, y int32, width int32, height int32) { var carg0 *C.GstPlayerVideoOverlayVideoRenderer // in, none, converted var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted @@ -3605,14 +3659,14 @@ type PlayerAudioInfo interface { // // The function returns the following values: // - // - goret int - GetBitrate() int + // - goret int32 + GetBitrate() int32 // GetChannels wraps gst_player_audio_info_get_channels // // The function returns the following values: // - // - goret int - GetChannels() int + // - goret int32 + GetChannels() int32 // GetLanguage wraps gst_player_audio_info_get_language // // The function returns the following values: @@ -3623,14 +3677,14 @@ type PlayerAudioInfo interface { // // The function returns the following values: // - // - goret int - GetMaxBitrate() int + // - goret int32 + GetMaxBitrate() int32 // GetSampleRate wraps gst_player_audio_info_get_sample_rate // // The function returns the following values: // - // - goret int - GetSampleRate() int + // - goret int32 + GetSampleRate() int32 } func unsafeWrapPlayerAudioInfo(base *gobject.ObjectInstance) *PlayerAudioInfoInstance { @@ -3655,6 +3709,11 @@ func UnsafePlayerAudioInfoFromGlibFull(c unsafe.Pointer) PlayerAudioInfo { return gobject.UnsafeObjectFromGlibFull(c).(PlayerAudioInfo) } +// UnsafePlayerAudioInfoFromGlibBorrow is used to convert raw GstPlayerAudioInfo pointers to go without touching any references. This is used by the bindings internally. +func UnsafePlayerAudioInfoFromGlibBorrow(c unsafe.Pointer) PlayerAudioInfo { + return gobject.UnsafeObjectFromGlibBorrow(c).(PlayerAudioInfo) +} + func (p *PlayerAudioInfoInstance) upcastToGstPlayerAudioInfo() *PlayerAudioInfoInstance { return p } @@ -3673,8 +3732,8 @@ func UnsafePlayerAudioInfoToGlibFull(c PlayerAudioInfo) unsafe.Pointer { // // The function returns the following values: // -// - goret int -func (info *PlayerAudioInfoInstance) GetBitrate() int { +// - goret int32 +func (info *PlayerAudioInfoInstance) GetBitrate() int32 { var carg0 *C.GstPlayerAudioInfo // in, none, converted var cret C.gint // return, none, casted @@ -3683,9 +3742,9 @@ func (info *PlayerAudioInfoInstance) GetBitrate() int { cret = C.gst_player_audio_info_get_bitrate(carg0) runtime.KeepAlive(info) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -3694,8 +3753,8 @@ func (info *PlayerAudioInfoInstance) GetBitrate() int { // // The function returns the following values: // -// - goret int -func (info *PlayerAudioInfoInstance) GetChannels() int { +// - goret int32 +func (info *PlayerAudioInfoInstance) GetChannels() int32 { var carg0 *C.GstPlayerAudioInfo // in, none, converted var cret C.gint // return, none, casted @@ -3704,9 +3763,9 @@ func (info *PlayerAudioInfoInstance) GetChannels() int { cret = C.gst_player_audio_info_get_channels(carg0) runtime.KeepAlive(info) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -3738,8 +3797,8 @@ func (info *PlayerAudioInfoInstance) GetLanguage() string { // // The function returns the following values: // -// - goret int -func (info *PlayerAudioInfoInstance) GetMaxBitrate() int { +// - goret int32 +func (info *PlayerAudioInfoInstance) GetMaxBitrate() int32 { var carg0 *C.GstPlayerAudioInfo // in, none, converted var cret C.gint // return, none, casted @@ -3748,9 +3807,9 @@ func (info *PlayerAudioInfoInstance) GetMaxBitrate() int { cret = C.gst_player_audio_info_get_max_bitrate(carg0) runtime.KeepAlive(info) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -3759,8 +3818,8 @@ func (info *PlayerAudioInfoInstance) GetMaxBitrate() int { // // The function returns the following values: // -// - goret int -func (info *PlayerAudioInfoInstance) GetSampleRate() int { +// - goret int32 +func (info *PlayerAudioInfoInstance) GetSampleRate() int32 { var carg0 *C.GstPlayerAudioInfo // in, none, converted var cret C.gint // return, none, casted @@ -3769,9 +3828,9 @@ func (info *PlayerAudioInfoInstance) GetSampleRate() int { cret = C.gst_player_audio_info_get_sample_rate(carg0) runtime.KeepAlive(info) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -4221,8 +4280,11 @@ func marshalPlayerVisualization(p unsafe.Pointer) (interface{}, error) { return UnsafePlayerVisualizationFromGlibBorrow(b), nil } -func (r *PlayerVisualization) InitGoValue(v *gobject.Value) { - v.Init(TypePlayerVisualization) +func (r *PlayerVisualization) GoValueType() gobject.Type { + return TypePlayerVisualization +} + +func (r *PlayerVisualization) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } diff --git a/pkg/gstrtp/gstrtp.gen.go b/pkg/gstrtp/gstrtp.gen.go index 8d895c9..87abb8f 100644 --- a/pkg/gstrtp/gstrtp.gen.go +++ b/pkg/gstrtp/gstrtp.gen.go @@ -162,7 +162,7 @@ const RTCP_VALID_MASK = 57598 // // Valid value for the first two bytes of an RTCP packet after applying // #GST_RTCP_VALID_MASK to them. -const RTCP_VALID_VALUE = 200 +const RTCP_VALID_VALUE = 32968 // RTCP_VERSION wraps GST_RTCP_VERSION // // The supported RTCP version 2. @@ -255,8 +255,11 @@ func marshalRTCPFBType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = RTCPFBType(0) -func (e RTCPFBType) InitGoValue(v *gobject.Value) { - v.Init(TypeRTCPFBType) +func (e RTCPFBType) GoValueType() gobject.Type { + return TypeRTCPFBType +} + +func (e RTCPFBType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -357,8 +360,11 @@ func marshalRTCPSDESType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = RTCPSDESType(0) -func (e RTCPSDESType) InitGoValue(v *gobject.Value) { - v.Init(TypeRTCPSDESType) +func (e RTCPSDESType) GoValueType() gobject.Type { + return TypeRTCPSDESType +} + +func (e RTCPSDESType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -435,8 +441,11 @@ func marshalRTCPType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = RTCPType(0) -func (e RTCPType) InitGoValue(v *gobject.Value) { - v.Init(TypeRTCPType) +func (e RTCPType) GoValueType() gobject.Type { + return TypeRTCPType +} + +func (e RTCPType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -502,8 +511,11 @@ func marshalRTCPXRType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = RTCPXRType(0) -func (e RTCPXRType) InitGoValue(v *gobject.Value) { - v.Init(TypeRTCPXRType) +func (e RTCPXRType) GoValueType() gobject.Type { + return TypeRTCPXRType +} + +func (e RTCPXRType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -650,8 +662,11 @@ func marshalRTPPayload(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = RTPPayload(0) -func (e RTPPayload) InitGoValue(v *gobject.Value) { - v.Init(TypeRTPPayload) +func (e RTPPayload) GoValueType() gobject.Type { + return TypeRTPPayload +} + +func (e RTPPayload) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -721,8 +736,11 @@ func marshalRTPProfile(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = RTPProfile(0) -func (e RTPProfile) InitGoValue(v *gobject.Value) { - v.Init(TypeRTPProfile) +func (e RTPProfile) GoValueType() gobject.Type { + return TypeRTPProfile +} + +func (e RTPProfile) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -775,8 +793,11 @@ func (r RTPBufferFlags) Has(other RTPBufferFlags) bool { var _ gobject.GoValueInitializer = RTPBufferFlags(0) -func (f RTPBufferFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeRTPBufferFlags) +func (f RTPBufferFlags) GoValueType() gobject.Type { + return TypeRTPBufferFlags +} + +func (f RTPBufferFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -826,8 +847,11 @@ func (r RTPBufferMapFlags) Has(other RTPBufferMapFlags) bool { var _ gobject.GoValueInitializer = RTPBufferMapFlags(0) -func (f RTPBufferMapFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeRTPBufferMapFlags) +func (f RTPBufferMapFlags) GoValueType() gobject.Type { + return TypeRTPBufferMapFlags +} + +func (f RTPBufferMapFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -887,8 +911,11 @@ func (r RTPHeaderExtensionDirection) Has(other RTPHeaderExtensionDirection) bool var _ gobject.GoValueInitializer = RTPHeaderExtensionDirection(0) -func (f RTPHeaderExtensionDirection) InitGoValue(v *gobject.Value) { - v.Init(TypeRTPHeaderExtensionDirection) +func (f RTPHeaderExtensionDirection) GoValueType() gobject.Type { + return TypeRTPHeaderExtensionDirection +} + +func (f RTPHeaderExtensionDirection) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -946,8 +973,11 @@ func (r RTPHeaderExtensionFlags) Has(other RTPHeaderExtensionFlags) bool { var _ gobject.GoValueInitializer = RTPHeaderExtensionFlags(0) -func (f RTPHeaderExtensionFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeRTPHeaderExtensionFlags) +func (f RTPHeaderExtensionFlags) GoValueType() gobject.Type { + return TypeRTPHeaderExtensionFlags +} + +func (f RTPHeaderExtensionFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -1404,6 +1434,11 @@ func UnsafeRTPBaseDepayloadFromGlibFull(c unsafe.Pointer) RTPBaseDepayload { return gobject.UnsafeObjectFromGlibFull(c).(RTPBaseDepayload) } +// UnsafeRTPBaseDepayloadFromGlibBorrow is used to convert raw GstRTPBaseDepayload pointers to go without touching any references. This is used by the bindings internally. +func UnsafeRTPBaseDepayloadFromGlibBorrow(c unsafe.Pointer) RTPBaseDepayload { + return gobject.UnsafeObjectFromGlibBorrow(c).(RTPBaseDepayload) +} + func (r *RTPBaseDepayloadInstance) upcastToGstRTPBaseDepayload() *RTPBaseDepayloadInstance { return r } @@ -1750,7 +1785,7 @@ func UnsafeApplyRTPBaseDepayloadOverrides[Instance RTPBaseDepayload](gclass unsa var event *gst.Event // in, none, converted var goret bool // return - filter = UnsafeRTPBaseDepayloadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + filter = UnsafeRTPBaseDepayloadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = gst.UnsafeEventFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.HandleEvent(filter, event) @@ -1774,7 +1809,7 @@ func UnsafeApplyRTPBaseDepayloadOverrides[Instance RTPBaseDepayload](gclass unsa var event *gst.Event // in, none, converted var goret bool // return - filter = UnsafeRTPBaseDepayloadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + filter = UnsafeRTPBaseDepayloadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = gst.UnsafeEventFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.PacketLost(filter, event) @@ -1798,7 +1833,7 @@ func UnsafeApplyRTPBaseDepayloadOverrides[Instance RTPBaseDepayload](gclass unsa var in *gst.Buffer // in, none, converted var goret *gst.Buffer // return, full, converted - base = UnsafeRTPBaseDepayloadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + base = UnsafeRTPBaseDepayloadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) in = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Process(base, in) @@ -1820,7 +1855,7 @@ func UnsafeApplyRTPBaseDepayloadOverrides[Instance RTPBaseDepayload](gclass unsa var rtpBuffer *RTPBuffer // in, none, converted var goret *gst.Buffer // return, full, converted - base = UnsafeRTPBaseDepayloadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + base = UnsafeRTPBaseDepayloadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) rtpBuffer = UnsafeRTPBufferFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.ProcessRtpPacket(base, rtpBuffer) @@ -1842,7 +1877,7 @@ func UnsafeApplyRTPBaseDepayloadOverrides[Instance RTPBaseDepayload](gclass unsa var caps *gst.Caps // in, none, converted var goret bool // return - filter = UnsafeRTPBaseDepayloadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + filter = UnsafeRTPBaseDepayloadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SetCaps(filter, caps) @@ -2058,6 +2093,11 @@ func UnsafeRTPBasePayloadFromGlibFull(c unsafe.Pointer) RTPBasePayload { return gobject.UnsafeObjectFromGlibFull(c).(RTPBasePayload) } +// UnsafeRTPBasePayloadFromGlibBorrow is used to convert raw GstRTPBasePayload pointers to go without touching any references. This is used by the bindings internally. +func UnsafeRTPBasePayloadFromGlibBorrow(c unsafe.Pointer) RTPBasePayload { + return gobject.UnsafeObjectFromGlibBorrow(c).(RTPBasePayload) +} + func (r *RTPBasePayloadInstance) upcastToGstRTPBasePayload() *RTPBasePayloadInstance { return r } @@ -2472,7 +2512,7 @@ func UnsafeApplyRTPBasePayloadOverrides[Instance RTPBasePayload](gclass unsafe.P var filter *gst.Caps // in, none, converted var goret *gst.Caps // return, full, converted - payload = UnsafeRTPBasePayloadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + payload = UnsafeRTPBasePayloadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) pad = gst.UnsafePadFromGlibNone(unsafe.Pointer(carg1)) filter = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg2)) @@ -2495,7 +2535,7 @@ func UnsafeApplyRTPBasePayloadOverrides[Instance RTPBasePayload](gclass unsafe.P var buffer *gst.Buffer // in, none, converted var goret gst.FlowReturn // return, none, casted - payload = UnsafeRTPBasePayloadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + payload = UnsafeRTPBasePayloadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) buffer = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.HandleBuffer(payload, buffer) @@ -2518,7 +2558,7 @@ func UnsafeApplyRTPBasePayloadOverrides[Instance RTPBasePayload](gclass unsafe.P var query *gst.Query // in, none, converted var goret bool // return - payload = UnsafeRTPBasePayloadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + payload = UnsafeRTPBasePayloadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) pad = gst.UnsafePadFromGlibNone(unsafe.Pointer(carg1)) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg2)) @@ -2543,7 +2583,7 @@ func UnsafeApplyRTPBasePayloadOverrides[Instance RTPBasePayload](gclass unsafe.P var caps *gst.Caps // in, none, converted var goret bool // return - payload = UnsafeRTPBasePayloadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + payload = UnsafeRTPBasePayloadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SetCaps(payload, caps) @@ -2567,7 +2607,7 @@ func UnsafeApplyRTPBasePayloadOverrides[Instance RTPBasePayload](gclass unsafe.P var event *gst.Event // in, none, converted var goret bool // return - payload = UnsafeRTPBasePayloadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + payload = UnsafeRTPBasePayloadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = gst.UnsafeEventFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SinkEvent(payload, event) @@ -2591,7 +2631,7 @@ func UnsafeApplyRTPBasePayloadOverrides[Instance RTPBasePayload](gclass unsafe.P var event *gst.Event // in, none, converted var goret bool // return - payload = UnsafeRTPBasePayloadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + payload = UnsafeRTPBasePayloadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = gst.UnsafeEventFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SrcEvent(payload, event) @@ -2875,6 +2915,11 @@ func UnsafeRTPHeaderExtensionFromGlibFull(c unsafe.Pointer) RTPHeaderExtension { return gobject.UnsafeObjectFromGlibFull(c).(RTPHeaderExtension) } +// UnsafeRTPHeaderExtensionFromGlibBorrow is used to convert raw GstRTPHeaderExtension pointers to go without touching any references. This is used by the bindings internally. +func UnsafeRTPHeaderExtensionFromGlibBorrow(c unsafe.Pointer) RTPHeaderExtension { + return gobject.UnsafeObjectFromGlibBorrow(c).(RTPHeaderExtension) +} + func (r *RTPHeaderExtensionInstance) upcastToGstRTPHeaderExtension() *RTPHeaderExtensionInstance { return r } @@ -3531,7 +3576,7 @@ func UnsafeApplyRTPHeaderExtensionOverrides[Instance RTPHeaderExtension](gclass var inputMeta *gst.Buffer // in, none, converted var goret uint // return, none, casted - ext = UnsafeRTPHeaderExtensionFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ext = UnsafeRTPHeaderExtensionFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) inputMeta = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.GetMaxSize(ext, inputMeta) @@ -3552,7 +3597,7 @@ func UnsafeApplyRTPHeaderExtensionOverrides[Instance RTPHeaderExtension](gclass var ext Instance // go GstRTPHeaderExtension subclass var goret RTPHeaderExtensionFlags // return, none, casted - ext = UnsafeRTPHeaderExtensionFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ext = UnsafeRTPHeaderExtensionFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GetSupportedFlags(ext) @@ -3575,7 +3620,7 @@ func UnsafeApplyRTPHeaderExtensionOverrides[Instance RTPHeaderExtension](gclass var buffer *gst.Buffer // in, none, converted var goret bool // return - ext = UnsafeRTPHeaderExtensionFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ext = UnsafeRTPHeaderExtensionFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) readFlags = RTPHeaderExtensionFlags(carg1) _ = data _ = carg2 @@ -3605,7 +3650,7 @@ func UnsafeApplyRTPHeaderExtensionOverrides[Instance RTPHeaderExtension](gclass var attributes string // in, none, string var goret bool // return - ext = UnsafeRTPHeaderExtensionFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ext = UnsafeRTPHeaderExtensionFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) direction = RTPHeaderExtensionDirection(carg1) attributes = C.GoString((*C.char)(unsafe.Pointer(carg2))) @@ -3630,7 +3675,7 @@ func UnsafeApplyRTPHeaderExtensionOverrides[Instance RTPHeaderExtension](gclass var caps *gst.Caps // in, none, converted var goret bool // return - ext = UnsafeRTPHeaderExtensionFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ext = UnsafeRTPHeaderExtensionFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SetCapsFromAttributes(ext, caps) @@ -3654,7 +3699,7 @@ func UnsafeApplyRTPHeaderExtensionOverrides[Instance RTPHeaderExtension](gclass var caps *gst.Caps // in, none, converted var goret bool // return - ext = UnsafeRTPHeaderExtensionFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ext = UnsafeRTPHeaderExtensionFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SetNonRtpSinkCaps(ext, caps) @@ -3678,7 +3723,7 @@ func UnsafeApplyRTPHeaderExtensionOverrides[Instance RTPHeaderExtension](gclass var caps *gst.Caps // in, none, converted var goret bool // return - ext = UnsafeRTPHeaderExtensionFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ext = UnsafeRTPHeaderExtensionFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.UpdateNonRtpSrcCaps(ext, caps) @@ -3705,7 +3750,7 @@ func UnsafeApplyRTPHeaderExtensionOverrides[Instance RTPHeaderExtension](gclass var data []uint8 // in, transfer: none, C Pointers: 1, Name: array[guint8], array (inner: *typesystem.CastablePrimitive, length-by: carg5) var goret int // return, none, casted - ext = UnsafeRTPHeaderExtensionFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ext = UnsafeRTPHeaderExtensionFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) inputMeta = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) writeFlags = RTPHeaderExtensionFlags(carg2) output = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg3)) @@ -3842,11 +3887,11 @@ type RTPBaseAudioPayload interface { // // The function takes the following parameters: // - // - frameDuration int: The duraction of an audio frame in milliseconds. - // - frameSize int: The size of an audio frame in bytes. + // - frameDuration int32: The duraction of an audio frame in milliseconds. + // - frameSize int32: The size of an audio frame in bytes. // // Sets the options for frame based audio codecs. - SetFrameOptions(int, int) + SetFrameOptions(int32, int32) // SetSampleBased wraps gst_rtp_base_audio_payload_set_sample_based // // Tells #GstRTPBaseAudioPayload that the child element is for a sample based @@ -3856,18 +3901,18 @@ type RTPBaseAudioPayload interface { // // The function takes the following parameters: // - // - sampleSize int: Size per sample in bytes. + // - sampleSize int32: Size per sample in bytes. // // Sets the options for sample based audio codecs. - SetSampleOptions(int) + SetSampleOptions(int32) // SetSamplebitsOptions wraps gst_rtp_base_audio_payload_set_samplebits_options // // The function takes the following parameters: // - // - sampleSize int: Size per sample in bits. + // - sampleSize int32: Size per sample in bits. // // Sets the options for sample based audio codecs. - SetSamplebitsOptions(int) + SetSamplebitsOptions(int32) } func unsafeWrapRTPBaseAudioPayload(base *gobject.ObjectInstance) *RTPBaseAudioPayloadInstance { @@ -3898,6 +3943,11 @@ func UnsafeRTPBaseAudioPayloadFromGlibFull(c unsafe.Pointer) RTPBaseAudioPayload return gobject.UnsafeObjectFromGlibFull(c).(RTPBaseAudioPayload) } +// UnsafeRTPBaseAudioPayloadFromGlibBorrow is used to convert raw GstRTPBaseAudioPayload pointers to go without touching any references. This is used by the bindings internally. +func UnsafeRTPBaseAudioPayloadFromGlibBorrow(c unsafe.Pointer) RTPBaseAudioPayload { + return gobject.UnsafeObjectFromGlibBorrow(c).(RTPBaseAudioPayload) +} + func (r *RTPBaseAudioPayloadInstance) upcastToGstRTPBaseAudioPayload() *RTPBaseAudioPayloadInstance { return r } @@ -4031,11 +4081,11 @@ func (rtpbaseaudiopayload *RTPBaseAudioPayloadInstance) SetFrameBased() { // // The function takes the following parameters: // -// - frameDuration int: The duraction of an audio frame in milliseconds. -// - frameSize int: The size of an audio frame in bytes. +// - frameDuration int32: The duraction of an audio frame in milliseconds. +// - frameSize int32: The size of an audio frame in bytes. // // Sets the options for frame based audio codecs. -func (rtpbaseaudiopayload *RTPBaseAudioPayloadInstance) SetFrameOptions(frameDuration int, frameSize int) { +func (rtpbaseaudiopayload *RTPBaseAudioPayloadInstance) SetFrameOptions(frameDuration int32, frameSize int32) { var carg0 *C.GstRTPBaseAudioPayload // in, none, converted var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted @@ -4067,10 +4117,10 @@ func (rtpbaseaudiopayload *RTPBaseAudioPayloadInstance) SetSampleBased() { // // The function takes the following parameters: // -// - sampleSize int: Size per sample in bytes. +// - sampleSize int32: Size per sample in bytes. // // Sets the options for sample based audio codecs. -func (rtpbaseaudiopayload *RTPBaseAudioPayloadInstance) SetSampleOptions(sampleSize int) { +func (rtpbaseaudiopayload *RTPBaseAudioPayloadInstance) SetSampleOptions(sampleSize int32) { var carg0 *C.GstRTPBaseAudioPayload // in, none, converted var carg1 C.gint // in, none, casted @@ -4086,10 +4136,10 @@ func (rtpbaseaudiopayload *RTPBaseAudioPayloadInstance) SetSampleOptions(sampleS // // The function takes the following parameters: // -// - sampleSize int: Size per sample in bits. +// - sampleSize int32: Size per sample in bits. // // Sets the options for sample based audio codecs. -func (rtpbaseaudiopayload *RTPBaseAudioPayloadInstance) SetSamplebitsOptions(sampleSize int) { +func (rtpbaseaudiopayload *RTPBaseAudioPayloadInstance) SetSamplebitsOptions(sampleSize int32) { var carg0 *C.GstRTPBaseAudioPayload // in, none, converted var carg1 C.gint // in, none, casted @@ -7191,11 +7241,11 @@ func RTPBufferCalcPayloadLen(packetLen uint, padLen uint8, csrcCount uint8) uint // // The function returns the following values: // -// - goret int +// - goret int32 // // Compare two sequence numbers, taking care of wraparounds. This function // returns the difference between @seqnum1 and @seqnum2. -func RTPBufferCompareSeqnum(seqnum1 uint16, seqnum2 uint16) int { +func RTPBufferCompareSeqnum(seqnum1 uint16, seqnum2 uint16) int32 { var carg1 C.guint16 // in, none, casted var carg2 C.guint16 // in, none, casted var cret C.gint // return, none, casted @@ -7207,9 +7257,9 @@ func RTPBufferCompareSeqnum(seqnum1 uint16, seqnum2 uint16) int { runtime.KeepAlive(seqnum1) runtime.KeepAlive(seqnum2) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } diff --git a/pkg/gstrtsp/gstrtsp.gen.go b/pkg/gstrtsp/gstrtsp.gen.go index c0f5113..de273a1 100644 --- a/pkg/gstrtsp/gstrtsp.gen.go +++ b/pkg/gstrtsp/gstrtsp.gen.go @@ -140,8 +140,11 @@ func marshalRTSPAuthMethod(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = RTSPAuthMethod(0) -func (e RTSPAuthMethod) InitGoValue(v *gobject.Value) { - v.Init(TypeRTSPAuthMethod) +func (e RTSPAuthMethod) GoValueType() gobject.Type { + return TypeRTSPAuthMethod +} + +func (e RTSPAuthMethod) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -180,8 +183,11 @@ func marshalRTSPFamily(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = RTSPFamily(0) -func (e RTSPFamily) InitGoValue(v *gobject.Value) { - v.Init(TypeRTSPFamily) +func (e RTSPFamily) GoValueType() gobject.Type { + return TypeRTSPFamily +} + +func (e RTSPFamily) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -388,8 +394,11 @@ func marshalRTSPHeaderField(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = RTSPHeaderField(0) -func (e RTSPHeaderField) InitGoValue(v *gobject.Value) { - v.Init(TypeRTSPHeaderField) +func (e RTSPHeaderField) GoValueType() gobject.Type { + return TypeRTSPHeaderField +} + +func (e RTSPHeaderField) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -527,8 +536,11 @@ func marshalRTSPMsgType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = RTSPMsgType(0) -func (e RTSPMsgType) InitGoValue(v *gobject.Value) { - v.Init(TypeRTSPMsgType) +func (e RTSPMsgType) GoValueType() gobject.Type { + return TypeRTSPMsgType +} + +func (e RTSPMsgType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -578,8 +590,11 @@ func marshalRTSPRangeUnit(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = RTSPRangeUnit(0) -func (e RTSPRangeUnit) InitGoValue(v *gobject.Value) { - v.Init(TypeRTSPRangeUnit) +func (e RTSPRangeUnit) GoValueType() gobject.Type { + return TypeRTSPRangeUnit +} + +func (e RTSPRangeUnit) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -684,8 +699,11 @@ func marshalRTSPResult(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = RTSPResult(0) -func (e RTSPResult) InitGoValue(v *gobject.Value) { - v.Init(TypeRTSPResult) +func (e RTSPResult) GoValueType() gobject.Type { + return TypeRTSPResult +} + +func (e RTSPResult) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -752,8 +770,11 @@ func marshalRTSPState(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = RTSPState(0) -func (e RTSPState) InitGoValue(v *gobject.Value) { - v.Init(TypeRTSPState) +func (e RTSPState) GoValueType() gobject.Type { + return TypeRTSPState +} + +func (e RTSPState) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -883,8 +904,11 @@ func marshalRTSPStatusCode(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = RTSPStatusCode(0) -func (e RTSPStatusCode) InitGoValue(v *gobject.Value) { - v.Init(TypeRTSPStatusCode) +func (e RTSPStatusCode) GoValueType() gobject.Type { + return TypeRTSPStatusCode +} + +func (e RTSPStatusCode) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -976,8 +1000,11 @@ func marshalRTSPTimeType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = RTSPTimeType(0) -func (e RTSPTimeType) InitGoValue(v *gobject.Value) { - v.Init(TypeRTSPTimeType) +func (e RTSPTimeType) GoValueType() gobject.Type { + return TypeRTSPTimeType +} + +func (e RTSPTimeType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1022,8 +1049,11 @@ func marshalRTSPVersion(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = RTSPVersion(0) -func (e RTSPVersion) InitGoValue(v *gobject.Value) { - v.Init(TypeRTSPVersion) +func (e RTSPVersion) GoValueType() gobject.Type { + return TypeRTSPVersion +} + +func (e RTSPVersion) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1090,8 +1120,11 @@ func (r RTSPEvent) Has(other RTSPEvent) bool { var _ gobject.GoValueInitializer = RTSPEvent(0) -func (f RTSPEvent) InitGoValue(v *gobject.Value) { - v.Init(TypeRTSPEvent) +func (f RTSPEvent) GoValueType() gobject.Type { + return TypeRTSPEvent +} + +func (f RTSPEvent) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -1152,8 +1185,11 @@ func (r RTSPLowerTrans) Has(other RTSPLowerTrans) bool { var _ gobject.GoValueInitializer = RTSPLowerTrans(0) -func (f RTSPLowerTrans) InitGoValue(v *gobject.Value) { - v.Init(TypeRTSPLowerTrans) +func (f RTSPLowerTrans) GoValueType() gobject.Type { + return TypeRTSPLowerTrans +} + +func (f RTSPLowerTrans) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -1258,8 +1294,11 @@ func (r RTSPMethod) Has(other RTSPMethod) bool { var _ gobject.GoValueInitializer = RTSPMethod(0) -func (f RTSPMethod) InitGoValue(v *gobject.Value) { - v.Init(TypeRTSPMethod) +func (f RTSPMethod) GoValueType() gobject.Type { + return TypeRTSPMethod +} + +func (f RTSPMethod) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -1381,8 +1420,11 @@ func (r RTSPProfile) Has(other RTSPProfile) bool { var _ gobject.GoValueInitializer = RTSPProfile(0) -func (f RTSPProfile) InitGoValue(v *gobject.Value) { - v.Init(TypeRTSPProfile) +func (f RTSPProfile) GoValueType() gobject.Type { + return TypeRTSPProfile +} + +func (f RTSPProfile) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -1440,8 +1482,11 @@ func (r RTSPTransMode) Has(other RTSPTransMode) bool { var _ gobject.GoValueInitializer = RTSPTransMode(0) -func (f RTSPTransMode) InitGoValue(v *gobject.Value) { - v.Init(TypeRTSPTransMode) +func (f RTSPTransMode) GoValueType() gobject.Type { + return TypeRTSPTransMode +} + +func (f RTSPTransMode) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -2097,6 +2142,11 @@ func UnsafeRTSPExtensionFromGlibFull(c unsafe.Pointer) RTSPExtension { return gobject.UnsafeObjectFromGlibFull(c).(RTSPExtension) } +// UnsafeRTSPExtensionFromGlibBorrow is used to convert raw GstRTSPExtension pointers to go without touching any references. This is used by the bindings internally. +func UnsafeRTSPExtensionFromGlibBorrow(c unsafe.Pointer) RTSPExtension { + return gobject.UnsafeObjectFromGlibBorrow(c).(RTSPExtension) +} + // UnsafeRTSPExtensionToGlibNone is used to convert the instance to it's C value GstRTSPExtension. This is used by the bindings internally. func UnsafeRTSPExtensionToGlibNone(c RTSPExtension) unsafe.Pointer { i := c.upcastToGstRTSPExtension() @@ -2487,7 +2537,7 @@ func UnsafeApplyRTSPExtensionOverrides[Instance RTSPExtension](gclass unsafe.Poi var resp *RTSPMessage // in, none, converted var goret RTSPResult // return, none, casted - ext = UnsafeRTSPExtensionFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ext = UnsafeRTSPExtensionFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) req = UnsafeRTSPMessageFromGlibNone(unsafe.Pointer(carg1)) resp = UnsafeRTSPMessageFromGlibNone(unsafe.Pointer(carg2)) @@ -2510,7 +2560,7 @@ func UnsafeApplyRTSPExtensionOverrides[Instance RTSPExtension](gclass unsafe.Poi var req *RTSPMessage // in, none, converted var goret RTSPResult // return, none, casted - ext = UnsafeRTSPExtensionFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ext = UnsafeRTSPExtensionFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) req = UnsafeRTSPMessageFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.BeforeSend(ext, req) @@ -2532,7 +2582,7 @@ func UnsafeApplyRTSPExtensionOverrides[Instance RTSPExtension](gclass unsafe.Poi var caps *gst.Caps // in, none, converted var goret bool // return - ext = UnsafeRTSPExtensionFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ext = UnsafeRTSPExtensionFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.ConfigureStream(ext, caps) @@ -2556,7 +2606,7 @@ func UnsafeApplyRTSPExtensionOverrides[Instance RTSPExtension](gclass unsafe.Poi var resp *RTSPMessage // in, none, converted var goret bool // return - ext = UnsafeRTSPExtensionFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ext = UnsafeRTSPExtensionFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) resp = UnsafeRTSPMessageFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.DetectServer(ext, resp) @@ -2581,7 +2631,7 @@ func UnsafeApplyRTSPExtensionOverrides[Instance RTSPExtension](gclass unsafe.Poi var s *gst.Structure // in, none, converted var goret RTSPResult // return, none, casted - ext = UnsafeRTSPExtensionFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ext = UnsafeRTSPExtensionFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) sdp = gstsdp.UnsafeSDPMessageFromGlibNone(unsafe.Pointer(carg1)) s = gst.UnsafeStructureFromGlibNone(unsafe.Pointer(carg2)) @@ -2604,7 +2654,7 @@ func UnsafeApplyRTSPExtensionOverrides[Instance RTSPExtension](gclass unsafe.Poi var req *RTSPMessage // in, none, converted var goret RTSPResult // return, none, casted - ext = UnsafeRTSPExtensionFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ext = UnsafeRTSPExtensionFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) req = UnsafeRTSPMessageFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.ReceiveRequest(ext, req) @@ -2627,7 +2677,7 @@ func UnsafeApplyRTSPExtensionOverrides[Instance RTSPExtension](gclass unsafe.Poi var resp *RTSPMessage // in, none, converted var goret RTSPResult // return, none, casted - ext = UnsafeRTSPExtensionFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ext = UnsafeRTSPExtensionFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) req = UnsafeRTSPMessageFromGlibNone(unsafe.Pointer(carg1)) resp = UnsafeRTSPMessageFromGlibNone(unsafe.Pointer(carg2)) @@ -2650,7 +2700,7 @@ func UnsafeApplyRTSPExtensionOverrides[Instance RTSPExtension](gclass unsafe.Poi var media *gstsdp.SDPMedia // in, none, converted var goret RTSPResult // return, none, casted - ext = UnsafeRTSPExtensionFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ext = UnsafeRTSPExtensionFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) media = gstsdp.UnsafeSDPMediaFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SetupMedia(ext, media) @@ -2672,7 +2722,7 @@ func UnsafeApplyRTSPExtensionOverrides[Instance RTSPExtension](gclass unsafe.Poi var url *RTSPUrl // in, none, converted var goret RTSPResult // return, none, casted - ext = UnsafeRTSPExtensionFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ext = UnsafeRTSPExtensionFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) url = UnsafeRTSPUrlFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.StreamSelect(ext, url) @@ -2704,8 +2754,11 @@ func marshalRTSPAuthCredential(p unsafe.Pointer) (interface{}, error) { return UnsafeRTSPAuthCredentialFromGlibBorrow(b), nil } -func (r *RTSPAuthCredential) InitGoValue(v *gobject.Value) { - v.Init(TypeRTSPAuthCredential) +func (r *RTSPAuthCredential) GoValueType() gobject.Type { + return TypeRTSPAuthCredential +} + +func (r *RTSPAuthCredential) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -2779,8 +2832,11 @@ func marshalRTSPAuthParam(p unsafe.Pointer) (interface{}, error) { return UnsafeRTSPAuthParamFromGlibBorrow(b), nil } -func (r *RTSPAuthParam) InitGoValue(v *gobject.Value) { - v.Init(TypeRTSPAuthParam) +func (r *RTSPAuthParam) GoValueType() gobject.Type { + return TypeRTSPAuthParam +} + +func (r *RTSPAuthParam) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -4335,8 +4391,11 @@ func marshalRTSPMessage(p unsafe.Pointer) (interface{}, error) { return UnsafeRTSPMessageFromGlibBorrow(b), nil } -func (r *RTSPMessage) InitGoValue(v *gobject.Value) { - v.Init(TypeRTSPMessage) +func (r *RTSPMessage) GoValueType() gobject.Type { + return TypeRTSPMessage +} + +func (r *RTSPMessage) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -4554,7 +4613,7 @@ func (msg *RTSPMessage) GetBodyBuffer() (*gst.Buffer, RTSPResult) { // The function takes the following parameters: // // - field RTSPHeaderField: a #GstRTSPHeaderField -// - indx int: the index of the header +// - indx int32: the index of the header // // The function returns the following values: // @@ -4563,7 +4622,7 @@ func (msg *RTSPMessage) GetBodyBuffer() (*gst.Buffer, RTSPResult) { // // Get the @indx header value with key @field from @msg. The result in @value // stays valid as long as it remains present in @msg. -func (msg *RTSPMessage) GetHeader(field RTSPHeaderField, indx int) (string, RTSPResult) { +func (msg *RTSPMessage) GetHeader(field RTSPHeaderField, indx int32) (string, RTSPResult) { var carg0 *C.GstRTSPMessage // in, none, converted var carg1 C.GstRTSPHeaderField // in, none, casted var carg3 C.gint // in, none, casted @@ -4595,7 +4654,7 @@ func (msg *RTSPMessage) GetHeader(field RTSPHeaderField, indx int) (string, RTSP // The function takes the following parameters: // // - header string: a #GstRTSPHeaderField -// - index int: the index of the header +// - index int32: the index of the header // // The function returns the following values: // @@ -4604,7 +4663,7 @@ func (msg *RTSPMessage) GetHeader(field RTSPHeaderField, indx int) (string, RTSP // // Get the @index header value with key @header from @msg. The result in @value // stays valid as long as it remains present in @msg. -func (msg *RTSPMessage) GetHeaderByName(header string, index int) (string, RTSPResult) { +func (msg *RTSPMessage) GetHeaderByName(header string, index int32) (string, RTSPResult) { var carg0 *C.GstRTSPMessage // in, none, converted var carg1 *C.gchar // in, none, string var carg3 C.gint // in, none, casted @@ -4960,7 +5019,7 @@ func (msg *RTSPMessage) ParseResponse() (RTSPStatusCode, string, RTSPVersion, RT // The function takes the following parameters: // // - field RTSPHeaderField: a #GstRTSPHeaderField -// - indx int: the index of the header +// - indx int32: the index of the header // // The function returns the following values: // @@ -4968,7 +5027,7 @@ func (msg *RTSPMessage) ParseResponse() (RTSPStatusCode, string, RTSPVersion, RT // // Remove the @indx header with key @field from @msg. If @indx equals -1, all // headers will be removed. -func (msg *RTSPMessage) RemoveHeader(field RTSPHeaderField, indx int) RTSPResult { +func (msg *RTSPMessage) RemoveHeader(field RTSPHeaderField, indx int32) RTSPResult { var carg0 *C.GstRTSPMessage // in, none, converted var carg1 C.GstRTSPHeaderField // in, none, casted var carg2 C.gint // in, none, casted @@ -4995,7 +5054,7 @@ func (msg *RTSPMessage) RemoveHeader(field RTSPHeaderField, indx int) RTSPResult // The function takes the following parameters: // // - header string: the header string -// - index int: the index of the header +// - index int32: the index of the header // // The function returns the following values: // @@ -5003,7 +5062,7 @@ func (msg *RTSPMessage) RemoveHeader(field RTSPHeaderField, indx int) RTSPResult // // Remove the @index header with key @header from @msg. If @index equals -1, // all matching headers will be removed. -func (msg *RTSPMessage) RemoveHeaderByName(header string, index int) RTSPResult { +func (msg *RTSPMessage) RemoveHeaderByName(header string, index int32) RTSPResult { var carg0 *C.GstRTSPMessage // in, none, converted var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted @@ -5992,8 +6051,11 @@ func marshalRTSPUrl(p unsafe.Pointer) (interface{}, error) { return UnsafeRTSPUrlFromGlibBorrow(b), nil } -func (r *RTSPUrl) InitGoValue(v *gobject.Value) { - v.Init(TypeRTSPUrl) +func (r *RTSPUrl) GoValueType() gobject.Type { + return TypeRTSPUrl +} + +func (r *RTSPUrl) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } diff --git a/pkg/gstsdp/gstsdp.gen.go b/pkg/gstsdp/gstsdp.gen.go index 24d4f99..d0c3e94 100644 --- a/pkg/gstsdp/gstsdp.gen.go +++ b/pkg/gstsdp/gstsdp.gen.go @@ -806,8 +806,11 @@ func marshalMIKEYMessage(p unsafe.Pointer) (interface{}, error) { return UnsafeMIKEYMessageFromGlibBorrow(b), nil } -func (r *MIKEYMessage) InitGoValue(v *gobject.Value) { - v.Init(TypeMIKEYMessage) +func (r *MIKEYMessage) GoValueType() gobject.Type { + return TypeMIKEYMessage +} + +func (r *MIKEYMessage) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -1328,7 +1331,7 @@ func (msg *MIKEYMessage) GetPayload(idx uint) *MIKEYPayload { // // The function takes the following parameters: // -// - idx int: the index to insert at +// - idx int32: the index to insert at // - _map *MIKEYMapSRTP: the map info // // The function returns the following values: @@ -1338,7 +1341,7 @@ func (msg *MIKEYMessage) GetPayload(idx uint) *MIKEYPayload { // Insert a Crypto Session map for SRTP in @msg at @idx // // When @idx is -1, the policy will be appended. -func (msg *MIKEYMessage) InsertCsSrtp(idx int, _map *MIKEYMapSRTP) bool { +func (msg *MIKEYMessage) InsertCsSrtp(idx int32, _map *MIKEYMapSRTP) bool { var carg0 *C.GstMIKEYMessage // in, none, converted var carg1 C.gint // in, none, casted var carg2 *C.GstMIKEYMapSRTP // in, none, converted @@ -1403,14 +1406,14 @@ func (msg *MIKEYMessage) InsertPayload(idx uint, payload *MIKEYPayload) bool { // // The function takes the following parameters: // -// - idx int: the index to remove +// - idx int32: the index to remove // // The function returns the following values: // // - goret bool // // Remove the SRTP policy at @idx. -func (msg *MIKEYMessage) RemoveCsSrtp(idx int) bool { +func (msg *MIKEYMessage) RemoveCsSrtp(idx int32) bool { var carg0 *C.GstMIKEYMessage // in, none, converted var carg1 C.gint // in, none, casted var cret C.gboolean // return @@ -1467,7 +1470,7 @@ func (msg *MIKEYMessage) RemovePayload(idx uint) bool { // // The function takes the following parameters: // -// - idx int: the index to insert at +// - idx int32: the index to insert at // - _map *MIKEYMapSRTP: the map info // // The function returns the following values: @@ -1475,7 +1478,7 @@ func (msg *MIKEYMessage) RemovePayload(idx uint) bool { // - goret bool // // Replace a Crypto Session map for SRTP in @msg at @idx with @map. -func (msg *MIKEYMessage) ReplaceCsSrtp(idx int, _map *MIKEYMapSRTP) bool { +func (msg *MIKEYMessage) ReplaceCsSrtp(idx int32, _map *MIKEYMapSRTP) bool { var carg0 *C.GstMIKEYMessage // in, none, converted var carg1 C.gint // in, none, casted var carg2 *C.GstMIKEYMapSRTP // in, none, converted @@ -1674,8 +1677,11 @@ func marshalMIKEYPayload(p unsafe.Pointer) (interface{}, error) { return UnsafeMIKEYPayloadFromGlibBorrow(b), nil } -func (r *MIKEYPayload) InitGoValue(v *gobject.Value) { - v.Init(TypeMIKEYPayload) +func (r *MIKEYPayload) GoValueType() gobject.Type { + return TypeMIKEYPayload +} + +func (r *MIKEYPayload) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -3832,7 +3838,7 @@ func (media *SDPMedia) GetBandwidth(idx uint) *SDPBandwidth { // // The function takes the following parameters: // -// - pt int: a payload type +// - pt int32: a payload type // // The function returns the following values: // @@ -3847,7 +3853,7 @@ func (media *SDPMedia) GetBandwidth(idx uint) *SDPBandwidth { // a=fmtp:(payload) (param)[=(value)];... // // Note that the extmap, ssrc and rid attributes are set only by gst_sdp_media_attributes_to_caps(). -func (media *SDPMedia) GetCapsFromMedia(pt int) *gst.Caps { +func (media *SDPMedia) GetCapsFromMedia(pt int32) *gst.Caps { var carg0 *C.GstSDPMedia // in, none, converted var carg1 C.gint // in, none, casted var cret *C.GstCaps // return, full, converted, nullable @@ -4070,7 +4076,7 @@ func (media *SDPMedia) GetProto() string { // // The function takes the following parameters: // -// - idx int: an index +// - idx int32: an index // - attr *SDPAttribute: a #GstSDPAttribute // // The function returns the following values: @@ -4079,7 +4085,7 @@ func (media *SDPMedia) GetProto() string { // // Insert the attribute to @media at @idx. When @idx is -1, // the attribute is appended. -func (media *SDPMedia) InsertAttribute(idx int, attr *SDPAttribute) SDPResult { +func (media *SDPMedia) InsertAttribute(idx int32, attr *SDPAttribute) SDPResult { var carg0 *C.GstSDPMedia // in, none, converted var carg1 C.gint // in, none, casted var carg2 *C.GstSDPAttribute // in, none, converted @@ -4105,7 +4111,7 @@ func (media *SDPMedia) InsertAttribute(idx int, attr *SDPAttribute) SDPResult { // // The function takes the following parameters: // -// - idx int: an index +// - idx int32: an index // - bw *SDPBandwidth: a #GstSDPBandwidth // // The function returns the following values: @@ -4114,7 +4120,7 @@ func (media *SDPMedia) InsertAttribute(idx int, attr *SDPAttribute) SDPResult { // // Insert the bandwidth information to @media at @idx. When @idx is -1, // the bandwidth is appended. -func (media *SDPMedia) InsertBandwidth(idx int, bw *SDPBandwidth) SDPResult { +func (media *SDPMedia) InsertBandwidth(idx int32, bw *SDPBandwidth) SDPResult { var carg0 *C.GstSDPMedia // in, none, converted var carg1 C.gint // in, none, casted var carg2 *C.GstSDPBandwidth // in, none, converted @@ -4140,7 +4146,7 @@ func (media *SDPMedia) InsertBandwidth(idx int, bw *SDPBandwidth) SDPResult { // // The function takes the following parameters: // -// - idx int: an index +// - idx int32: an index // - conn *SDPConnection: a #GstSDPConnection // // The function returns the following values: @@ -4149,7 +4155,7 @@ func (media *SDPMedia) InsertBandwidth(idx int, bw *SDPBandwidth) SDPResult { // // Insert the connection information to @media at @idx. When @idx is -1, // the connection is appended. -func (media *SDPMedia) InsertConnection(idx int, conn *SDPConnection) SDPResult { +func (media *SDPMedia) InsertConnection(idx int32, conn *SDPConnection) SDPResult { var carg0 *C.GstSDPMedia // in, none, converted var carg1 C.gint // in, none, casted var carg2 *C.GstSDPConnection // in, none, converted @@ -4175,7 +4181,7 @@ func (media *SDPMedia) InsertConnection(idx int, conn *SDPConnection) SDPResult // // The function takes the following parameters: // -// - idx int: an index +// - idx int32: an index // - format string: the format // // The function returns the following values: @@ -4184,7 +4190,7 @@ func (media *SDPMedia) InsertConnection(idx int, conn *SDPConnection) SDPResult // // Insert the format information to @media at @idx. When @idx is -1, // the format is appended. -func (media *SDPMedia) InsertFormat(idx int, format string) SDPResult { +func (media *SDPMedia) InsertFormat(idx int32, format string) SDPResult { var carg0 *C.GstSDPMedia // in, none, converted var carg1 C.gint // in, none, casted var carg2 *C.gchar // in, none, string @@ -4700,8 +4706,11 @@ func marshalSDPMessage(p unsafe.Pointer) (interface{}, error) { return UnsafeSDPMessageFromGlibBorrow(b), nil } -func (r *SDPMessage) InitGoValue(v *gobject.Value) { - v.Init(TypeSDPMessage) +func (r *SDPMessage) GoValueType() gobject.Type { + return TypeSDPMessage +} + +func (r *SDPMessage) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -5818,7 +5827,7 @@ func (msg *SDPMessage) GetZone(idx uint) *SDPZone { // // The function takes the following parameters: // -// - idx int: an index +// - idx int32: an index // - attr *SDPAttribute: a #GstSDPAttribute // // The function returns the following values: @@ -5828,7 +5837,7 @@ func (msg *SDPMessage) GetZone(idx uint) *SDPZone { // Insert attribute into the array of attributes in @msg // at index @idx. // When -1 is given as @idx, the attribute is inserted at the end. -func (msg *SDPMessage) InsertAttribute(idx int, attr *SDPAttribute) SDPResult { +func (msg *SDPMessage) InsertAttribute(idx int32, attr *SDPAttribute) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted var carg1 C.gint // in, none, casted var carg2 *C.GstSDPAttribute // in, none, converted @@ -5854,7 +5863,7 @@ func (msg *SDPMessage) InsertAttribute(idx int, attr *SDPAttribute) SDPResult { // // The function takes the following parameters: // -// - idx int: an index +// - idx int32: an index // - bw *SDPBandwidth: the bandwidth // // The function returns the following values: @@ -5864,7 +5873,7 @@ func (msg *SDPMessage) InsertAttribute(idx int, attr *SDPAttribute) SDPResult { // Insert bandwidth parameters into the array of bandwidths in @msg // at index @idx. // When -1 is given as @idx, the bandwidth is inserted at the end. -func (msg *SDPMessage) InsertBandwidth(idx int, bw *SDPBandwidth) SDPResult { +func (msg *SDPMessage) InsertBandwidth(idx int32, bw *SDPBandwidth) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted var carg1 C.gint // in, none, casted var carg2 *C.GstSDPBandwidth // in, none, converted @@ -5890,7 +5899,7 @@ func (msg *SDPMessage) InsertBandwidth(idx int, bw *SDPBandwidth) SDPResult { // // The function takes the following parameters: // -// - idx int: an index +// - idx int32: an index // - email string: an email // // The function returns the following values: @@ -5899,7 +5908,7 @@ func (msg *SDPMessage) InsertBandwidth(idx int, bw *SDPBandwidth) SDPResult { // // Insert @email into the array of emails in @msg at index @idx. // When -1 is given as @idx, the email is inserted at the end. -func (msg *SDPMessage) InsertEmail(idx int, email string) SDPResult { +func (msg *SDPMessage) InsertEmail(idx int32, email string) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted var carg1 C.gint // in, none, casted var carg2 *C.gchar // in, none, string @@ -5926,7 +5935,7 @@ func (msg *SDPMessage) InsertEmail(idx int, email string) SDPResult { // // The function takes the following parameters: // -// - idx int: a phone index +// - idx int32: a phone index // - phone string: a phone // // The function returns the following values: @@ -5935,7 +5944,7 @@ func (msg *SDPMessage) InsertEmail(idx int, email string) SDPResult { // // Insert @phone into the array of phone numbers in @msg at index @idx. // When -1 is given as @idx, the phone is inserted at the end. -func (msg *SDPMessage) InsertPhone(idx int, phone string) SDPResult { +func (msg *SDPMessage) InsertPhone(idx int32, phone string) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted var carg1 C.gint // in, none, casted var carg2 *C.gchar // in, none, string @@ -5962,7 +5971,7 @@ func (msg *SDPMessage) InsertPhone(idx int, phone string) SDPResult { // // The function takes the following parameters: // -// - idx int: an index +// - idx int32: an index // - t *SDPTime: a #GstSDPTime // // The function returns the following values: @@ -5972,7 +5981,7 @@ func (msg *SDPMessage) InsertPhone(idx int, phone string) SDPResult { // Insert time parameters into the array of times in @msg // at index @idx. // When -1 is given as @idx, the times are inserted at the end. -func (msg *SDPMessage) InsertTime(idx int, t *SDPTime) SDPResult { +func (msg *SDPMessage) InsertTime(idx int32, t *SDPTime) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted var carg1 C.gint // in, none, casted var carg2 *C.GstSDPTime // in, none, converted @@ -5998,7 +6007,7 @@ func (msg *SDPMessage) InsertTime(idx int, t *SDPTime) SDPResult { // // The function takes the following parameters: // -// - idx int: an index +// - idx int32: an index // - zone *SDPZone: a #GstSDPZone // // The function returns the following values: @@ -6008,7 +6017,7 @@ func (msg *SDPMessage) InsertTime(idx int, t *SDPTime) SDPResult { // Insert zone parameters into the array of zones in @msg // at index @idx. // When -1 is given as @idx, the zone is inserted at the end. -func (msg *SDPMessage) InsertZone(idx int, zone *SDPZone) SDPResult { +func (msg *SDPMessage) InsertZone(idx int32, zone *SDPZone) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted var carg1 C.gint // in, none, casted var carg2 *C.GstSDPZone // in, none, converted diff --git a/pkg/gsttag/gsttag.gen.go b/pkg/gsttag/gsttag.gen.go index 2d812a6..66a0224 100644 --- a/pkg/gsttag/gsttag.gen.go +++ b/pkg/gsttag/gsttag.gen.go @@ -87,8 +87,11 @@ func marshalTagDemuxResult(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = TagDemuxResult(0) -func (e TagDemuxResult) InitGoValue(v *gobject.Value) { - v.Init(TypeTagDemuxResult) +func (e TagDemuxResult) GoValueType() gobject.Type { + return TypeTagDemuxResult +} + +func (e TagDemuxResult) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -198,8 +201,11 @@ func marshalTagImageType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = TagImageType(0) -func (e TagImageType) InitGoValue(v *gobject.Value) { - v.Init(TypeTagImageType) +func (e TagImageType) GoValueType() gobject.Type { + return TypeTagImageType +} + +func (e TagImageType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -321,8 +327,11 @@ func (t TagLicenseFlags) Has(other TagLicenseFlags) bool { var _ gobject.GoValueInitializer = TagLicenseFlags(0) -func (f TagLicenseFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeTagLicenseFlags) +func (f TagLicenseFlags) GoValueType() gobject.Type { + return TypeTagLicenseFlags +} + +func (f TagLicenseFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -1129,7 +1138,7 @@ func TagListAddID3Image(tagList *gst.TagList, imageData []uint8, id3PictureType // The function takes the following parameters: // // - buffer *gst.Buffer: The exif buffer -// - byteOrder int: byte order of the data +// - byteOrder int32: byte order of the data // - baseOffset uint32: Offset from the tiff header to this buffer // // The function returns the following values: @@ -1140,7 +1149,7 @@ func TagListAddID3Image(tagList *gst.TagList, imageData []uint8, id3PictureType // on a taglist. The base_offset is used to subtract from the offset in // the tag entries and be able to get the offset relative to the buffer // start -func TagListFromExifBuffer(buffer *gst.Buffer, byteOrder int, baseOffset uint32) *gst.TagList { +func TagListFromExifBuffer(buffer *gst.Buffer, byteOrder int32, baseOffset uint32) *gst.TagList { var carg1 *C.GstBuffer // in, none, converted var carg2 C.gint // in, none, casted var carg3 C.guint32 // in, none, casted @@ -1377,7 +1386,7 @@ func TagListNewFromID3V1(data [128]uint8) *gst.TagList { // The function takes the following parameters: // // - taglist *gst.TagList: The taglist -// - byteOrder int: byte order used in writing (G_LITTLE_ENDIAN or G_BIG_ENDIAN) +// - byteOrder int32: byte order used in writing (G_LITTLE_ENDIAN or G_BIG_ENDIAN) // - baseOffset uint32: Offset from the tiff header first byte // // The function returns the following values: @@ -1386,7 +1395,7 @@ func TagListNewFromID3V1(data [128]uint8) *gst.TagList { // // Formats the tags in taglist on exif format. The resulting buffer contains // the tags IFD and is followed by the data pointed by the tag entries. -func TagListToExifBuffer(taglist *gst.TagList, byteOrder int, baseOffset uint32) *gst.Buffer { +func TagListToExifBuffer(taglist *gst.TagList, byteOrder int32, baseOffset uint32) *gst.Buffer { var carg1 *C.GstTagList // in, none, converted var carg2 C.gint // in, none, casted var carg3 C.guint32 // in, none, casted @@ -1845,6 +1854,11 @@ func UnsafeTagXmpWriterFromGlibFull(c unsafe.Pointer) TagXmpWriter { return gobject.UnsafeObjectFromGlibFull(c).(TagXmpWriter) } +// UnsafeTagXmpWriterFromGlibBorrow is used to convert raw GstTagXmpWriter pointers to go without touching any references. This is used by the bindings internally. +func UnsafeTagXmpWriterFromGlibBorrow(c unsafe.Pointer) TagXmpWriter { + return gobject.UnsafeObjectFromGlibBorrow(c).(TagXmpWriter) +} + // UnsafeTagXmpWriterToGlibNone is used to convert the instance to it's C value GstTagXmpWriter. This is used by the bindings internally. func UnsafeTagXmpWriterToGlibNone(c TagXmpWriter) unsafe.Pointer { i := c.upcastToGstTagXmpWriter() @@ -2071,6 +2085,11 @@ func UnsafeTagDemuxFromGlibFull(c unsafe.Pointer) TagDemux { return gobject.UnsafeObjectFromGlibFull(c).(TagDemux) } +// UnsafeTagDemuxFromGlibBorrow is used to convert raw GstTagDemux pointers to go without touching any references. This is used by the bindings internally. +func UnsafeTagDemuxFromGlibBorrow(c unsafe.Pointer) TagDemux { + return gobject.UnsafeObjectFromGlibBorrow(c).(TagDemux) +} + func (t *TagDemuxInstance) upcastToGstTagDemux() *TagDemuxInstance { return t } @@ -2133,7 +2152,7 @@ func UnsafeApplyTagDemuxOverrides[Instance TagDemux](gclass unsafe.Pointer, over var tagSize *uint // in, transfer: none, C Pointers: 1, Name: guint var goret bool // return - demux = UnsafeTagDemuxFromGlibNone(unsafe.Pointer(carg0)).(Instance) + demux = UnsafeTagDemuxFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) buffer = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) if carg2 != 0 { startTag = true @@ -2164,7 +2183,7 @@ func UnsafeApplyTagDemuxOverrides[Instance TagDemux](gclass unsafe.Pointer, over var endTags *gst.TagList // in, none, converted var goret *gst.TagList // return, full, converted - demux = UnsafeTagDemuxFromGlibNone(unsafe.Pointer(carg0)).(Instance) + demux = UnsafeTagDemuxFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) startTags = gst.UnsafeTagListFromGlibNone(unsafe.Pointer(carg1)) endTags = gst.UnsafeTagListFromGlibNone(unsafe.Pointer(carg2)) @@ -2265,6 +2284,11 @@ func UnsafeTagMuxFromGlibFull(c unsafe.Pointer) TagMux { return gobject.UnsafeObjectFromGlibFull(c).(TagMux) } +// UnsafeTagMuxFromGlibBorrow is used to convert raw GstTagMux pointers to go without touching any references. This is used by the bindings internally. +func UnsafeTagMuxFromGlibBorrow(c unsafe.Pointer) TagMux { + return gobject.UnsafeObjectFromGlibBorrow(c).(TagMux) +} + func (t *TagMuxInstance) upcastToGstTagMux() *TagMuxInstance { return t } @@ -2322,7 +2346,7 @@ func UnsafeApplyTagMuxOverrides[Instance TagMux](gclass unsafe.Pointer, override var tagList *gst.TagList // in, none, converted var goret *gst.Buffer // return, full, converted - mux = UnsafeTagMuxFromGlibNone(unsafe.Pointer(carg0)).(Instance) + mux = UnsafeTagMuxFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) tagList = gst.UnsafeTagListFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.RenderEndTag(mux, tagList) @@ -2344,7 +2368,7 @@ func UnsafeApplyTagMuxOverrides[Instance TagMux](gclass unsafe.Pointer, override var tagList *gst.TagList // in, none, converted var goret *gst.Buffer // return, full, converted - mux = UnsafeTagMuxFromGlibNone(unsafe.Pointer(carg0)).(Instance) + mux = UnsafeTagMuxFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) tagList = gst.UnsafeTagListFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.RenderStartTag(mux, tagList) diff --git a/pkg/gstvideo/gstvideo.gen.go b/pkg/gstvideo/gstvideo.gen.go index 6ccabe4..4fe75f9 100644 --- a/pkg/gstvideo/gstvideo.gen.go +++ b/pkg/gstvideo/gstvideo.gen.go @@ -496,6 +496,10 @@ const VIDEO_COMP_Y = 0 // // Default maximum number of errors tolerated before signaling error. const VIDEO_DECODER_MAX_ERRORS = -1 +// VIDEO_FORMAT_LAST wraps GST_VIDEO_FORMAT_LAST +// +// Number of video formats in #GstVideoFormat. +const VIDEO_FORMAT_LAST = 139 // VIDEO_MAX_COMPONENTS wraps GST_VIDEO_MAX_COMPONENTS const VIDEO_MAX_COMPONENTS = 4 // VIDEO_MAX_PLANES wraps GST_VIDEO_MAX_PLANES @@ -534,8 +538,11 @@ func marshalAncillaryMetaField(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = AncillaryMetaField(0) -func (e AncillaryMetaField) InitGoValue(v *gobject.Value) { - v.Init(TypeAncillaryMetaField) +func (e AncillaryMetaField) GoValueType() gobject.Type { + return TypeAncillaryMetaField +} + +func (e AncillaryMetaField) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -575,8 +582,11 @@ func marshalColorBalanceType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = ColorBalanceType(0) -func (e ColorBalanceType) InitGoValue(v *gobject.Value) { - v.Init(TypeColorBalanceType) +func (e ColorBalanceType) GoValueType() gobject.Type { + return TypeColorBalanceType +} + +func (e ColorBalanceType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -687,8 +697,11 @@ func marshalNavigationCommand(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = NavigationCommand(0) -func (e NavigationCommand) InitGoValue(v *gobject.Value) { - v.Init(TypeNavigationCommand) +func (e NavigationCommand) GoValueType() gobject.Type { + return TypeNavigationCommand +} + +func (e NavigationCommand) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -792,6 +805,12 @@ const ( // // An event cancelling all currently active touch points. NavigationEventTouchCancel NavigationEventType = 12 + // NavigationEventMouseDoubleClick wraps GST_NAVIGATION_EVENT_MOUSE_DOUBLE_CLICK + // + // A mouse button double click event. + // Use gst_navigation_event_parse_mouse_button_event() to extract the details + // from the event. + NavigationEventMouseDoubleClick NavigationEventType = 13 ) func marshalNavigationEventType(p unsafe.Pointer) (any, error) { @@ -800,8 +819,11 @@ func marshalNavigationEventType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = NavigationEventType(0) -func (e NavigationEventType) InitGoValue(v *gobject.Value) { - v.Init(TypeNavigationEventType) +func (e NavigationEventType) GoValueType() gobject.Type { + return TypeNavigationEventType +} + +func (e NavigationEventType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -813,6 +835,7 @@ func (e NavigationEventType) String() string { case NavigationEventKeyRelease: return "NavigationEventKeyRelease" case NavigationEventMouseButtonPress: return "NavigationEventMouseButtonPress" case NavigationEventMouseButtonRelease: return "NavigationEventMouseButtonRelease" + case NavigationEventMouseDoubleClick: return "NavigationEventMouseDoubleClick" case NavigationEventMouseMove: return "NavigationEventMouseMove" case NavigationEventMouseScroll: return "NavigationEventMouseScroll" case NavigationEventTouchCancel: return "NavigationEventTouchCancel" @@ -866,8 +889,11 @@ func marshalNavigationMessageType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = NavigationMessageType(0) -func (e NavigationMessageType) InitGoValue(v *gobject.Value) { - v.Init(TypeNavigationMessageType) +func (e NavigationMessageType) GoValueType() gobject.Type { + return TypeNavigationMessageType +} + +func (e NavigationMessageType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -908,8 +934,11 @@ func marshalNavigationQueryType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = NavigationQueryType(0) -func (e NavigationQueryType) InitGoValue(v *gobject.Value) { - v.Init(TypeNavigationQueryType) +func (e NavigationQueryType) GoValueType() gobject.Type { + return TypeNavigationQueryType +} + +func (e NavigationQueryType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -954,8 +983,11 @@ func marshalVideoAFDSpec(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoAFDSpec(0) -func (e VideoAFDSpec) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoAFDSpec) +func (e VideoAFDSpec) GoValueType() gobject.Type { + return TypeVideoAFDSpec +} + +func (e VideoAFDSpec) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1074,8 +1106,11 @@ func marshalVideoAFDValue(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoAFDValue(0) -func (e VideoAFDValue) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoAFDValue) +func (e VideoAFDValue) GoValueType() gobject.Type { + return TypeVideoAFDValue +} + +func (e VideoAFDValue) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1128,8 +1163,11 @@ func marshalVideoAlphaMode(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoAlphaMode(0) -func (e VideoAlphaMode) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoAlphaMode) +func (e VideoAlphaMode) GoValueType() gobject.Type { + return TypeVideoAlphaMode +} + +func (e VideoAlphaMode) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1178,8 +1216,11 @@ func marshalVideoAncillaryDID(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoAncillaryDID(0) -func (e VideoAncillaryDID) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoAncillaryDID) +func (e VideoAncillaryDID) GoValueType() gobject.Type { + return TypeVideoAncillaryDID +} + +func (e VideoAncillaryDID) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1227,8 +1268,11 @@ func marshalVideoAncillaryDID16(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoAncillaryDID16(0) -func (e VideoAncillaryDID16) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoAncillaryDID16) +func (e VideoAncillaryDID16) GoValueType() gobject.Type { + return TypeVideoAncillaryDID16 +} + +func (e VideoAncillaryDID16) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1292,8 +1336,11 @@ func marshalVideoCaptionType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoCaptionType(0) -func (e VideoCaptionType) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoCaptionType) +func (e VideoCaptionType) GoValueType() gobject.Type { + return TypeVideoCaptionType +} + +func (e VideoCaptionType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1387,8 +1434,11 @@ func marshalVideoChromaMethod(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoChromaMethod(0) -func (e VideoChromaMethod) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoChromaMethod) +func (e VideoChromaMethod) GoValueType() gobject.Type { + return TypeVideoChromaMethod +} + +func (e VideoChromaMethod) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1430,8 +1480,11 @@ func marshalVideoChromaMode(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoChromaMode(0) -func (e VideoChromaMode) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoChromaMode) +func (e VideoChromaMode) GoValueType() gobject.Type { + return TypeVideoChromaMode +} + +func (e VideoChromaMode) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1490,8 +1543,11 @@ func marshalVideoColorMatrix(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoColorMatrix(0) -func (e VideoColorMatrix) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoColorMatrix) +func (e VideoColorMatrix) GoValueType() gobject.Type { + return TypeVideoColorMatrix +} + +func (e VideoColorMatrix) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1705,8 +1761,11 @@ func marshalVideoColorPrimaries(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoColorPrimaries(0) -func (e VideoColorPrimaries) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoColorPrimaries) +func (e VideoColorPrimaries) GoValueType() gobject.Type { + return TypeVideoColorPrimaries +} + +func (e VideoColorPrimaries) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1877,8 +1936,11 @@ func marshalVideoColorRange(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoColorRange(0) -func (e VideoColorRange) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoColorRange) +func (e VideoColorRange) GoValueType() gobject.Type { + return TypeVideoColorRange +} + +func (e VideoColorRange) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1925,8 +1987,11 @@ func marshalVideoDitherMethod(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoDitherMethod(0) -func (e VideoDitherMethod) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoDitherMethod) +func (e VideoDitherMethod) GoValueType() gobject.Type { + return TypeVideoDitherMethod +} + +func (e VideoDitherMethod) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1971,8 +2036,11 @@ func marshalVideoFieldOrder(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoFieldOrder(0) -func (e VideoFieldOrder) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoFieldOrder) +func (e VideoFieldOrder) GoValueType() gobject.Type { + return TypeVideoFieldOrder +} + +func (e VideoFieldOrder) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -2603,6 +2671,26 @@ const ( // // packed RGB with alpha, 8 bits per channel VideoFormatRbga VideoFormat = 133 + // VideoFormatY216LE wraps GST_VIDEO_FORMAT_Y216_LE + // + // packed 4:2:2 YUV, 16 bits per channel (Y-U-Y-V) + VideoFormatY216LE VideoFormat = 134 + // VideoFormatY216Be wraps GST_VIDEO_FORMAT_Y216_BE + // + // packed 4:2:2 YUV, 16 bits per channel (Y-U-Y-V) + VideoFormatY216Be VideoFormat = 135 + // VideoFormatY416LE wraps GST_VIDEO_FORMAT_Y416_LE + // + // packed 4:4:4:4 YUV, 16 bits per channel(U-Y-V-A) + VideoFormatY416LE VideoFormat = 136 + // VideoFormatY416Be wraps GST_VIDEO_FORMAT_Y416_BE + // + // packed 4:4:4:4 YUV, 16 bits per channel(U-Y-V-A) + VideoFormatY416Be VideoFormat = 137 + // VideoFormatGray10LE16 wraps GST_VIDEO_FORMAT_GRAY10_LE16 + // + // 10-bit grayscale, packed into 16bit words (6 bits left padding) + VideoFormatGray10LE16 VideoFormat = 138 ) func marshalVideoFormat(p unsafe.Pointer) (any, error) { @@ -2611,8 +2699,11 @@ func marshalVideoFormat(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoFormat(0) -func (e VideoFormat) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoFormat) +func (e VideoFormat) GoValueType() gobject.Type { + return TypeVideoFormat +} + +func (e VideoFormat) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -2672,6 +2763,7 @@ func (e VideoFormat) String() string { case VideoFormatGbra10LE: return "VideoFormatGbra10LE" case VideoFormatGbra12Be: return "VideoFormatGbra12Be" case VideoFormatGbra12LE: return "VideoFormatGbra12LE" + case VideoFormatGray10LE16: return "VideoFormatGray10LE16" case VideoFormatGray10LE32: return "VideoFormatGray10LE32" case VideoFormatGray16Be: return "VideoFormatGray16Be" case VideoFormatGray16LE: return "VideoFormatGray16LE" @@ -2735,9 +2827,13 @@ func (e VideoFormat) String() string { case VideoFormatY210: return "VideoFormatY210" case VideoFormatY212Be: return "VideoFormatY212Be" case VideoFormatY212LE: return "VideoFormatY212LE" + case VideoFormatY216Be: return "VideoFormatY216Be" + case VideoFormatY216LE: return "VideoFormatY216LE" case VideoFormatY410: return "VideoFormatY410" case VideoFormatY412Be: return "VideoFormatY412Be" case VideoFormatY412LE: return "VideoFormatY412LE" + case VideoFormatY416Be: return "VideoFormatY416Be" + case VideoFormatY416LE: return "VideoFormatY416LE" case VideoFormatY41B: return "VideoFormatY41B" case VideoFormatY42B: return "VideoFormatY42B" case VideoFormatY444: return "VideoFormatY444" @@ -2789,10 +2885,10 @@ func VideoFormatFromFourcc(fourcc uint32) VideoFormat { // // The function takes the following parameters: // -// - depth int: the amount of bits used for a pixel -// - bpp int: the amount of bits used to store a pixel. This value is bigger than +// - depth int32: the amount of bits used for a pixel +// - bpp int32: the amount of bits used to store a pixel. This value is bigger than // @depth -// - endianness int: the endianness of the masks, #G_LITTLE_ENDIAN or #G_BIG_ENDIAN +// - endianness int32: the endianness of the masks, #G_LITTLE_ENDIAN or #G_BIG_ENDIAN // - redMask uint: the red mask // - greenMask uint: the green mask // - blueMask uint: the blue mask @@ -2803,7 +2899,7 @@ func VideoFormatFromFourcc(fourcc uint32) VideoFormat { // - goret VideoFormat // // Find the #GstVideoFormat for the given parameters. -func VideoFormatFromMasks(depth int, bpp int, endianness int, redMask uint, greenMask uint, blueMask uint, alphaMask uint) VideoFormat { +func VideoFormatFromMasks(depth int32, bpp int32, endianness int32, redMask uint, greenMask uint, blueMask uint, alphaMask uint) VideoFormat { var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted @@ -2931,8 +3027,10 @@ func VideoFormatToFourcc(format VideoFormat) uint32 { // // - goret string // -// Returns a string containing a descriptive name for -// the #GstVideoFormat if there is one, or NULL otherwise. +// Returns a string containing a descriptive name for the #GstVideoFormat. +// +// Since 1.26 this can also be used with %GST_VIDEO_FORMAT_UNKNOWN, previous +// versions were printing a critical warning and returned %NULL. func VideoFormatToString(format VideoFormat) string { var carg1 C.GstVideoFormat // in, none, casted var cret *C.gchar // return, none, string @@ -2979,8 +3077,11 @@ func marshalVideoGLTextureOrientation(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoGLTextureOrientation(0) -func (e VideoGLTextureOrientation) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoGLTextureOrientation) +func (e VideoGLTextureOrientation) GoValueType() gobject.Type { + return TypeVideoGLTextureOrientation +} + +func (e VideoGLTextureOrientation) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3036,8 +3137,11 @@ func marshalVideoGLTextureType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoGLTextureType(0) -func (e VideoGLTextureType) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoGLTextureType) +func (e VideoGLTextureType) GoValueType() gobject.Type { + return TypeVideoGLTextureType +} + +func (e VideoGLTextureType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3075,8 +3179,11 @@ func marshalVideoGammaMode(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoGammaMode(0) -func (e VideoGammaMode) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoGammaMode) +func (e VideoGammaMode) GoValueType() gobject.Type { + return TypeVideoGammaMode +} + +func (e VideoGammaMode) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3135,8 +3242,11 @@ func marshalVideoInterlaceMode(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoInterlaceMode(0) -func (e VideoInterlaceMode) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoInterlaceMode) +func (e VideoInterlaceMode) GoValueType() gobject.Type { + return TypeVideoInterlaceMode +} + +func (e VideoInterlaceMode) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3238,8 +3348,11 @@ func marshalVideoMatrixMode(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoMatrixMode(0) -func (e VideoMatrixMode) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoMatrixMode) +func (e VideoMatrixMode) GoValueType() gobject.Type { + return TypeVideoMatrixMode +} + +func (e VideoMatrixMode) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3325,8 +3438,11 @@ func marshalVideoMultiviewFramePacking(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoMultiviewFramePacking(0) -func (e VideoMultiviewFramePacking) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoMultiviewFramePacking) +func (e VideoMultiviewFramePacking) GoValueType() gobject.Type { + return TypeVideoMultiviewFramePacking +} + +func (e VideoMultiviewFramePacking) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3434,8 +3550,11 @@ func marshalVideoMultiviewMode(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoMultiviewMode(0) -func (e VideoMultiviewMode) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoMultiviewMode) +func (e VideoMultiviewMode) GoValueType() gobject.Type { + return TypeVideoMultiviewMode +} + +func (e VideoMultiviewMode) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3546,11 +3665,11 @@ const ( VideoOrientationVert VideoOrientationMethod = 5 // VideoOrientationUlLr wraps GST_VIDEO_ORIENTATION_UL_LR // - // Flip across upper left/lower right diagonal + // Rotate counter-clockwise 90 degrees and flip vertically VideoOrientationUlLr VideoOrientationMethod = 6 // VideoOrientationUrLl wraps GST_VIDEO_ORIENTATION_UR_LL // - // Flip across upper right/lower left diagonal + // Rotate clockwise 90 degrees and flip vertically VideoOrientationUrLl VideoOrientationMethod = 7 // VideoOrientationAuto wraps GST_VIDEO_ORIENTATION_AUTO // @@ -3568,8 +3687,11 @@ func marshalVideoOrientationMethod(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoOrientationMethod(0) -func (e VideoOrientationMethod) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoOrientationMethod) +func (e VideoOrientationMethod) GoValueType() gobject.Type { + return TypeVideoOrientationMethod +} + +func (e VideoOrientationMethod) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3616,8 +3738,11 @@ func marshalVideoPrimariesMode(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoPrimariesMode(0) -func (e VideoPrimariesMode) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoPrimariesMode) +func (e VideoPrimariesMode) GoValueType() gobject.Type { + return TypeVideoPrimariesMode +} + +func (e VideoPrimariesMode) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3666,8 +3791,11 @@ func marshalVideoResamplerMethod(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoResamplerMethod(0) -func (e VideoResamplerMethod) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoResamplerMethod) +func (e VideoResamplerMethod) GoValueType() gobject.Type { + return TypeVideoResamplerMethod +} + +func (e VideoResamplerMethod) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3711,8 +3839,11 @@ func marshalVideoTileMode(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoTileMode(0) -func (e VideoTileMode) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoTileMode) +func (e VideoTileMode) GoValueType() gobject.Type { + return TypeVideoTileMode +} + +func (e VideoTileMode) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3745,8 +3876,11 @@ func marshalVideoTileType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoTileType(0) -func (e VideoTileType) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoTileType) +func (e VideoTileType) GoValueType() gobject.Type { + return TypeVideoTileType +} + +func (e VideoTileType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -3855,8 +3989,11 @@ func marshalVideoTransferFunction(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoTransferFunction(0) -func (e VideoTransferFunction) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoTransferFunction) +func (e VideoTransferFunction) GoValueType() gobject.Type { + return TypeVideoTransferFunction +} + +func (e VideoTransferFunction) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -4098,8 +4235,11 @@ func marshalVideoVBIParserResult(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = VideoVBIParserResult(0) -func (e VideoVBIParserResult) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoVBIParserResult) +func (e VideoVBIParserResult) GoValueType() gobject.Type { + return TypeVideoVBIParserResult +} + +func (e VideoVBIParserResult) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -4202,8 +4342,11 @@ func (n NavigationModifierType) Has(other NavigationModifierType) bool { var _ gobject.GoValueInitializer = NavigationModifierType(0) -func (f NavigationModifierType) InitGoValue(v *gobject.Value) { - v.Init(TypeNavigationModifierType) +func (f NavigationModifierType) GoValueType() gobject.Type { + return TypeNavigationModifierType +} + +func (f NavigationModifierType) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -4354,8 +4497,11 @@ func (v VideoBufferFlags) Has(other VideoBufferFlags) bool { var _ gobject.GoValueInitializer = VideoBufferFlags(0) -func (f VideoBufferFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoBufferFlags) +func (f VideoBufferFlags) GoValueType() gobject.Type { + return TypeVideoBufferFlags +} + +func (f VideoBufferFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -4424,8 +4570,11 @@ func (v VideoChromaFlags) Has(other VideoChromaFlags) bool { var _ gobject.GoValueInitializer = VideoChromaFlags(0) -func (f VideoChromaFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoChromaFlags) +func (f VideoChromaFlags) GoValueType() gobject.Type { + return TypeVideoChromaFlags +} + +func (f VideoChromaFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -4468,7 +4617,7 @@ const ( VideoChromaSiteVCosited VideoChromaSite = 4 // VideoChromaSiteAltLine wraps GST_VIDEO_CHROMA_SITE_ALT_LINE // - // choma samples are sited on alternate lines + // chroma samples are sited on alternate lines VideoChromaSiteAltLine VideoChromaSite = 8 // VideoChromaSiteCosited wraps GST_VIDEO_CHROMA_SITE_COSITED // @@ -4498,8 +4647,11 @@ func (v VideoChromaSite) Has(other VideoChromaSite) bool { var _ gobject.GoValueInitializer = VideoChromaSite(0) -func (f VideoChromaSite) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoChromaSite) +func (f VideoChromaSite) GoValueType() gobject.Type { + return TypeVideoChromaSite +} + +func (f VideoChromaSite) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -4635,8 +4787,11 @@ func (v VideoCodecFrameFlags) Has(other VideoCodecFrameFlags) bool { var _ gobject.GoValueInitializer = VideoCodecFrameFlags(0) -func (f VideoCodecFrameFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoCodecFrameFlags) +func (f VideoCodecFrameFlags) GoValueType() gobject.Type { + return TypeVideoCodecFrameFlags +} + +func (f VideoCodecFrameFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -4693,8 +4848,11 @@ func (v VideoDecoderRequestSyncPointFlags) Has(other VideoDecoderRequestSyncPoin var _ gobject.GoValueInitializer = VideoDecoderRequestSyncPointFlags(0) -func (f VideoDecoderRequestSyncPointFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoDecoderRequestSyncPointFlags) +func (f VideoDecoderRequestSyncPointFlags) GoValueType() gobject.Type { + return TypeVideoDecoderRequestSyncPointFlags +} + +func (f VideoDecoderRequestSyncPointFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -4743,8 +4901,11 @@ func (v VideoDitherFlags) Has(other VideoDitherFlags) bool { var _ gobject.GoValueInitializer = VideoDitherFlags(0) -func (f VideoDitherFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoDitherFlags) +func (f VideoDitherFlags) GoValueType() gobject.Type { + return TypeVideoDitherFlags +} + +func (f VideoDitherFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -4798,8 +4959,11 @@ func (v VideoFlags) Has(other VideoFlags) bool { var _ gobject.GoValueInitializer = VideoFlags(0) -func (f VideoFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoFlags) +func (f VideoFlags) GoValueType() gobject.Type { + return TypeVideoFlags +} + +func (f VideoFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -4888,8 +5052,11 @@ func (v VideoFormatFlags) Has(other VideoFormatFlags) bool { var _ gobject.GoValueInitializer = VideoFormatFlags(0) -func (f VideoFormatFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoFormatFlags) +func (f VideoFormatFlags) GoValueType() gobject.Type { + return TypeVideoFormatFlags +} + +func (f VideoFormatFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -4994,8 +5161,11 @@ func (v VideoFrameFlags) Has(other VideoFrameFlags) bool { var _ gobject.GoValueInitializer = VideoFrameFlags(0) -func (f VideoFrameFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoFrameFlags) +func (f VideoFrameFlags) GoValueType() gobject.Type { + return TypeVideoFrameFlags +} + +func (f VideoFrameFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -5064,8 +5234,11 @@ func (v VideoFrameMapFlags) Has(other VideoFrameMapFlags) bool { var _ gobject.GoValueInitializer = VideoFrameMapFlags(0) -func (f VideoFrameMapFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoFrameMapFlags) +func (f VideoFrameMapFlags) GoValueType() gobject.Type { + return TypeVideoFrameMapFlags +} + +func (f VideoFrameMapFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -5152,8 +5325,11 @@ func (v VideoMultiviewFlags) Has(other VideoMultiviewFlags) bool { var _ gobject.GoValueInitializer = VideoMultiviewFlags(0) -func (f VideoMultiviewFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoMultiviewFlags) +func (f VideoMultiviewFlags) GoValueType() gobject.Type { + return TypeVideoMultiviewFlags +} + +func (f VideoMultiviewFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -5220,8 +5396,11 @@ func (v VideoOverlayFormatFlags) Has(other VideoOverlayFormatFlags) bool { var _ gobject.GoValueInitializer = VideoOverlayFormatFlags(0) -func (f VideoOverlayFormatFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoOverlayFormatFlags) +func (f VideoOverlayFormatFlags) GoValueType() gobject.Type { + return TypeVideoOverlayFormatFlags +} + +func (f VideoOverlayFormatFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -5279,8 +5458,11 @@ func (v VideoPackFlags) Has(other VideoPackFlags) bool { var _ gobject.GoValueInitializer = VideoPackFlags(0) -func (f VideoPackFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoPackFlags) +func (f VideoPackFlags) GoValueType() gobject.Type { + return TypeVideoPackFlags +} + +func (f VideoPackFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -5330,8 +5512,11 @@ func (v VideoResamplerFlags) Has(other VideoResamplerFlags) bool { var _ gobject.GoValueInitializer = VideoResamplerFlags(0) -func (f VideoResamplerFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoResamplerFlags) +func (f VideoResamplerFlags) GoValueType() gobject.Type { + return TypeVideoResamplerFlags +} + +func (f VideoResamplerFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -5376,8 +5561,11 @@ func (v VideoScalerFlags) Has(other VideoScalerFlags) bool { var _ gobject.GoValueInitializer = VideoScalerFlags(0) -func (f VideoScalerFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoScalerFlags) +func (f VideoScalerFlags) GoValueType() gobject.Type { + return TypeVideoScalerFlags +} + +func (f VideoScalerFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -5427,8 +5615,11 @@ func (v VideoTimeCodeFlags) Has(other VideoTimeCodeFlags) bool { var _ gobject.GoValueInitializer = VideoTimeCodeFlags(0) -func (f VideoTimeCodeFlags) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoTimeCodeFlags) +func (f VideoTimeCodeFlags) GoValueType() gobject.Type { + return TypeVideoTimeCodeFlags +} + +func (f VideoTimeCodeFlags) SetGoValue(v *gobject.Value) { v.SetFlags(int(f)) } @@ -5748,14 +5939,14 @@ func BufferAddVideoMeta(buffer *gst.Buffer, flags VideoFrameFlags, format VideoF // - height uint: the height // - nPlanes uint: number of planes // - offset [4]uint: offset of each plane -// - stride [4]int: stride of each plane +// - stride [4]int32: stride of each plane // // The function returns the following values: // // - goret *VideoMeta // // Attaches GstVideoMeta metadata to @buffer with the given parameters. -func BufferAddVideoMetaFull(buffer *gst.Buffer, flags VideoFrameFlags, format VideoFormat, width uint, height uint, nPlanes uint, offset [4]uint, stride [4]int) *VideoMeta { +func BufferAddVideoMetaFull(buffer *gst.Buffer, flags VideoFrameFlags, format VideoFormat, width uint, height uint, nPlanes uint, offset [4]uint, stride [4]int32) *VideoMeta { var carg1 *C.GstBuffer // in, none, converted var carg2 C.GstVideoFrameFlags // in, none, casted var carg3 C.GstVideoFormat // in, none, casted @@ -5777,7 +5968,7 @@ func BufferAddVideoMetaFull(buffer *gst.Buffer, flags VideoFrameFlags, format Vi panic("unimplemented conversion of [4]uint (const gsize*)") _ = stride _ = carg8 - panic("unimplemented conversion of [4]int (const gint*)") + panic("unimplemented conversion of [4]int32 (const gint*)") cret = C.gst_buffer_add_video_meta_full(carg1, carg2, carg3, carg4, carg5, carg6, carg7, carg8) runtime.KeepAlive(buffer) @@ -5934,7 +6125,7 @@ func BufferAddVideoRegionOfInterestMetaID(buffer *gst.Buffer, roiType glib.Quark // // - buffer *gst.Buffer: a #GstBuffer // - uuid *uint8: User Data Unregistered UUID -// - data *uint8: SEI User Data Unregistered buffer +// - data *uint8 (nullable): SEI User Data Unregistered buffer // - size uint: size of the data buffer // // The function returns the following values: @@ -5946,7 +6137,7 @@ func BufferAddVideoRegionOfInterestMetaID(buffer *gst.Buffer, roiType glib.Quark func BufferAddVideoSeiUserDataUnregisteredMeta(buffer *gst.Buffer, uuid *uint8, data *uint8, size uint) *VideoSEIUserDataUnregisteredMeta { var carg1 *C.GstBuffer // in, none, converted var carg2 *C.guint8 // in, transfer: none, C Pointers: 1, Name: guint8 - var carg3 *C.guint8 // in, transfer: none, C Pointers: 1, Name: guint8 + var carg3 *C.guint8 // in, transfer: none, C Pointers: 1, Name: guint8, nullable, nullable var carg4 C.gsize // in, none, casted var cret *C.GstVideoSEIUserDataUnregisteredMeta // return, none, converted @@ -5954,9 +6145,11 @@ func BufferAddVideoSeiUserDataUnregisteredMeta(buffer *gst.Buffer, uuid *uint8, _ = uuid _ = carg2 panic("unimplemented conversion of *uint8 (guint8*)") - _ = data - _ = carg3 - panic("unimplemented conversion of *uint8 (guint8*)") + if data != nil { + _ = data + _ = carg3 + panic("unimplemented conversion of *uint8 (guint8*)") + } carg4 = C.gsize(size) cret = C.gst_buffer_add_video_sei_user_data_unregistered_meta(carg1, carg2, carg3, carg4) @@ -6109,7 +6302,7 @@ func BufferGetVideoMeta(buffer *gst.Buffer) *VideoMeta { // The function takes the following parameters: // // - buffer *gst.Buffer: a #GstBuffer -// - id int: a metadata id +// - id int32: a metadata id // // The function returns the following values: // @@ -6119,7 +6312,7 @@ func BufferGetVideoMeta(buffer *gst.Buffer) *VideoMeta { // // Buffers can contain multiple #GstVideoMeta metadata items when dealing with // multiview buffers. -func BufferGetVideoMetaID(buffer *gst.Buffer, id int) *VideoMeta { +func BufferGetVideoMetaID(buffer *gst.Buffer, id int32) *VideoMeta { var carg1 *C.GstBuffer // in, none, converted var carg2 C.gint // in, none, casted var cret *C.GstVideoMeta // return, none, converted, nullable @@ -6145,7 +6338,7 @@ func BufferGetVideoMetaID(buffer *gst.Buffer, id int) *VideoMeta { // The function takes the following parameters: // // - buffer *gst.Buffer: a #GstBuffer -// - id int: a metadata id +// - id int32: a metadata id // // The function returns the following values: // @@ -6155,7 +6348,7 @@ func BufferGetVideoMetaID(buffer *gst.Buffer, id int) *VideoMeta { // // Buffers can contain multiple #GstVideoRegionOfInterestMeta metadata items if // multiple regions of interests are marked on a frame. -func BufferGetVideoRegionOfInterestMetaID(buffer *gst.Buffer, id int) *VideoRegionOfInterestMeta { +func BufferGetVideoRegionOfInterestMetaID(buffer *gst.Buffer, id int32) *VideoRegionOfInterestMeta { var carg1 *C.GstBuffer // in, none, converted var carg2 C.gint // in, none, casted var cret *C.GstVideoRegionOfInterestMeta // return, none, converted, nullable @@ -6318,8 +6511,8 @@ func VideoBarMetaApiGetType() gobject.Type { // // - dest *VideoFrame: The #GstVideoFrame where to blend @src in // - src *VideoFrame: the #GstVideoFrame that we want to blend into -// - x int: The x offset in pixel where the @src image should be blended -// - y int: the y offset in pixel where the @src image should be blended +// - x int32: The x offset in pixel where the @src image should be blended +// - y int32: the y offset in pixel where the @src image should be blended // - globalAlpha float32: the global_alpha each per-pixel alpha value is multiplied // with // @@ -6328,7 +6521,7 @@ func VideoBarMetaApiGetType() gobject.Type { // - goret bool // // Lets you blend the @src image into the @dest image -func VideoBlend(dest *VideoFrame, src *VideoFrame, x int, y int, globalAlpha float32) bool { +func VideoBlend(dest *VideoFrame, src *VideoFrame, x int32, y int32, globalAlpha float32) bool { var carg1 *C.GstVideoFrame // in, none, converted var carg2 *C.GstVideoFrame // in, none, converted var carg3 C.gint // in, none, casted @@ -6364,8 +6557,8 @@ func VideoBlend(dest *VideoFrame, src *VideoFrame, x int, y int, globalAlpha flo // // - src *VideoInfo: the #GstVideoInfo describing the video data in @src_buffer // - srcBuffer *gst.Buffer: the source buffer containing video pixels to scale -// - destHeight int: the height in pixels to scale the video data in @src_buffer to -// - destWidth int: the width in pixels to scale the video data in @src_buffer to +// - destHeight int32: the height in pixels to scale the video data in @src_buffer to +// - destWidth int32: the width in pixels to scale the video data in @src_buffer to // // The function returns the following values: // @@ -6378,7 +6571,7 @@ func VideoBlend(dest *VideoFrame, src *VideoFrame, x int, y int, globalAlpha flo // helper function which is used to scale subtitle overlays, and may be // deprecated in the near future. Use #GstVideoScaler to scale video buffers // instead. -func VideoBlendScaleLinearRGBA(src *VideoInfo, srcBuffer *gst.Buffer, destHeight int, destWidth int) (VideoInfo, *gst.Buffer) { +func VideoBlendScaleLinearRGBA(src *VideoInfo, srcBuffer *gst.Buffer, destHeight int32, destWidth int32) (VideoInfo, *gst.Buffer) { var carg1 *C.GstVideoInfo // in, none, converted var carg2 *C.GstBuffer // in, none, converted var carg3 C.gint // in, none, casted @@ -6773,6 +6966,75 @@ func VideoCropMetaApiGetType() gobject.Type { return goret } +// VideoDmaDRMFormatFromGstFormat wraps gst_video_dma_drm_format_from_gst_format +// +// The function takes the following parameters: +// +// - format VideoFormat: a #GstVideoFormat +// - modifier *uint64 (nullable): return location for the modifier +// +// The function returns the following values: +// +// - goret uint32 +// +// Converting the video format into dma drm fourcc/modifier pair. +// If no matching fourcc found, then DRM_FORMAT_INVALID is returned +// and @modifier will be set to DRM_FORMAT_MOD_INVALID. +func VideoDmaDRMFormatFromGstFormat(format VideoFormat, modifier *uint64) uint32 { + var carg1 C.GstVideoFormat // in, none, casted + var carg2 *C.guint64 // in, transfer: none, C Pointers: 1, Name: guint64, nullable, nullable + var cret C.guint32 // return, none, casted + + carg1 = C.GstVideoFormat(format) + if modifier != nil { + _ = modifier + _ = carg2 + panic("unimplemented conversion of *uint64 (guint64*)") + } + + cret = C.gst_video_dma_drm_format_from_gst_format(carg1, carg2) + runtime.KeepAlive(format) + runtime.KeepAlive(modifier) + + var goret uint32 + + goret = uint32(cret) + + return goret +} + +// VideoDmaDRMFormatToGstFormat wraps gst_video_dma_drm_format_to_gst_format +// +// The function takes the following parameters: +// +// - fourcc uint32: the dma drm fourcc value. +// - modifier uint64: the dma drm modifier. +// +// The function returns the following values: +// +// - goret VideoFormat +// +// Converting a dma drm fourcc and modifier pair into a #GstVideoFormat. If +// no matching video format is found, then GST_VIDEO_FORMAT_UNKNOWN is returned. +func VideoDmaDRMFormatToGstFormat(fourcc uint32, modifier uint64) VideoFormat { + var carg1 C.guint32 // in, none, casted + var carg2 C.guint64 // in, none, casted + var cret C.GstVideoFormat // return, none, casted + + carg1 = C.guint32(fourcc) + carg2 = C.guint64(modifier) + + cret = C.gst_video_dma_drm_format_to_gst_format(carg1, carg2) + runtime.KeepAlive(fourcc) + runtime.KeepAlive(modifier) + + var goret VideoFormat + + goret = VideoFormat(cret) + + return goret +} + // VideoDmaDRMFourccFromFormat wraps gst_video_dma_drm_fourcc_from_format // // The function takes the following parameters: @@ -7285,8 +7547,8 @@ func VideoGLTextureUploadMetaApiGetType() gobject.Type { // // The function returns the following values: // -// - destN int: Numerator of the calculated framerate -// - destD int: Denominator of the calculated framerate +// - destN int32: Numerator of the calculated framerate +// - destD int32: Denominator of the calculated framerate // - goret bool // // Given the nominal duration of one video frame, @@ -7297,7 +7559,7 @@ func VideoGLTextureUploadMetaApiGetType() gobject.Type { // match was found, and return %FALSE. // // It returns %FALSE if a duration of 0 is passed. -func VideoGuessFramerate(duration gst.ClockTime) (int, int, bool) { +func VideoGuessFramerate(duration gst.ClockTime) (int32, int32, bool) { var carg1 C.GstClockTime // in, none, casted, alias var carg2 C.gint // out, full, casted var carg3 C.gint // out, full, casted @@ -7308,12 +7570,12 @@ func VideoGuessFramerate(duration gst.ClockTime) (int, int, bool) { cret = C.gst_video_guess_framerate(carg1, &carg2, &carg3) runtime.KeepAlive(duration) - var destN int - var destD int + var destN int32 + var destD int32 var goret bool - destN = int(carg2) - destD = int(carg3) + destN = int32(carg2) + destD = int32(carg3) if cret != 0 { goret = true } @@ -7325,10 +7587,10 @@ func VideoGuessFramerate(duration gst.ClockTime) (int, int, bool) { // // The function takes the following parameters: // -// - width int: Width of the video frame -// - height int: Height of the video frame -// - parN int: Pixel aspect ratio numerator -// - parD int: Pixel aspect ratio denominator +// - width int32: Width of the video frame +// - height int32: Height of the video frame +// - parN int32: Pixel aspect ratio numerator +// - parD int32: Pixel aspect ratio denominator // // The function returns the following values: // @@ -7337,7 +7599,7 @@ func VideoGuessFramerate(duration gst.ClockTime) (int, int, bool) { // Given a frame's dimensions and pixel aspect ratio, this function will // calculate the frame's aspect ratio and compare it against a set of // common well-known "standard" aspect ratios. -func VideoIsCommonAspectRatio(width int, height int, parN int, parD int) bool { +func VideoIsCommonAspectRatio(width int32, height int32, parN int32, parD int32) bool { var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted @@ -7731,10 +7993,10 @@ func VideoSeiUserDataUnregisteredParsePrecisionTimeStamp(userData *VideoSEIUserD // The function takes the following parameters: // // - mode VideoTileMode: a #GstVideoTileMode -// - x int: x coordinate -// - y int: y coordinate -// - xTiles int: number of horizintal tiles -// - yTiles int: number of vertical tiles +// - x int32: x coordinate +// - y int32: y coordinate +// - xTiles int32: number of horizintal tiles +// - yTiles int32: number of vertical tiles // // The function returns the following values: // @@ -7744,7 +8006,7 @@ func VideoSeiUserDataUnregisteredParsePrecisionTimeStamp(userData *VideoSEIUserD // image of @x_tiles by @y_tiles. // // Use this method when @mode is of type %GST_VIDEO_TILE_TYPE_INDEXED. -func VideoTileGetIndex(mode VideoTileMode, x int, y int, xTiles int, yTiles int) uint { +func VideoTileGetIndex(mode VideoTileMode, x int32, y int32, xTiles int32, yTiles int32) uint { var carg1 C.GstVideoTileMode // in, none, casted var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted @@ -7823,7 +8085,7 @@ type ColorBalance interface { // // The function returns the following values: // - // - goret int + // - goret int32 // // Retrieve the current value of the indicated channel, between min_value // and max_value. @@ -7831,7 +8093,7 @@ type ColorBalance interface { // See Also: The #GstColorBalanceChannel.min_value and // #GstColorBalanceChannel.max_value members of the // #GstColorBalanceChannel object. - GetValue(ColorBalanceChannel) int + GetValue(ColorBalanceChannel) int32 // ListChannels wraps gst_color_balance_list_channels // // The function returns the following values: @@ -7845,7 +8107,7 @@ type ColorBalance interface { // The function takes the following parameters: // // - channel ColorBalanceChannel: A #GstColorBalanceChannel instance - // - value int: The new value for the channel. + // - value int32: The new value for the channel. // // Sets the current value of the channel to the passed value, which must // be between min_value and max_value. @@ -7853,23 +8115,23 @@ type ColorBalance interface { // See Also: The #GstColorBalanceChannel.min_value and // #GstColorBalanceChannel.max_value members of the // #GstColorBalanceChannel object. - SetValue(ColorBalanceChannel, int) + SetValue(ColorBalanceChannel, int32) // ValueChanged wraps gst_color_balance_value_changed // // The function takes the following parameters: // // - channel ColorBalanceChannel: A #GstColorBalanceChannel whose value has changed - // - value int: The new value of the channel + // - value int32: The new value of the channel // // A helper function called by implementations of the GstColorBalance // interface. It fires the #GstColorBalance::value-changed signal on the // instance, and the #GstColorBalanceChannel::value-changed signal on the // channel object. - ValueChanged(ColorBalanceChannel, int) + ValueChanged(ColorBalanceChannel, int32) // ConnectValueChanged connects the provided callback to the "value-changed" signal // // Fired when the value of the indicated channel has changed. - ConnectValueChanged(func(ColorBalance, ColorBalanceChannel, int)) gobject.SignalHandle + ConnectValueChanged(func(ColorBalance, ColorBalanceChannel, int32)) gobject.SignalHandle } var _ ColorBalance = (*ColorBalanceInstance)(nil) @@ -7898,6 +8160,11 @@ func UnsafeColorBalanceFromGlibFull(c unsafe.Pointer) ColorBalance { return gobject.UnsafeObjectFromGlibFull(c).(ColorBalance) } +// UnsafeColorBalanceFromGlibBorrow is used to convert raw GstColorBalance pointers to go without touching any references. This is used by the bindings internally. +func UnsafeColorBalanceFromGlibBorrow(c unsafe.Pointer) ColorBalance { + return gobject.UnsafeObjectFromGlibBorrow(c).(ColorBalance) +} + // UnsafeColorBalanceToGlibNone is used to convert the instance to it's C value GstColorBalance. This is used by the bindings internally. func UnsafeColorBalanceToGlibNone(c ColorBalance) unsafe.Pointer { i := c.upcastToGstColorBalance() @@ -7941,7 +8208,7 @@ func (balance *ColorBalanceInstance) GetBalanceType() ColorBalanceType { // // The function returns the following values: // -// - goret int +// - goret int32 // // Retrieve the current value of the indicated channel, between min_value // and max_value. @@ -7949,7 +8216,7 @@ func (balance *ColorBalanceInstance) GetBalanceType() ColorBalanceType { // See Also: The #GstColorBalanceChannel.min_value and // #GstColorBalanceChannel.max_value members of the // #GstColorBalanceChannel object. -func (balance *ColorBalanceInstance) GetValue(channel ColorBalanceChannel) int { +func (balance *ColorBalanceInstance) GetValue(channel ColorBalanceChannel) int32 { var carg0 *C.GstColorBalance // in, none, converted var carg1 *C.GstColorBalanceChannel // in, none, converted var cret C.gint // return, none, casted @@ -7961,9 +8228,9 @@ func (balance *ColorBalanceInstance) GetValue(channel ColorBalanceChannel) int { runtime.KeepAlive(balance) runtime.KeepAlive(channel) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -8003,7 +8270,7 @@ func (balance *ColorBalanceInstance) ListChannels() []ColorBalanceChannel { // The function takes the following parameters: // // - channel ColorBalanceChannel: A #GstColorBalanceChannel instance -// - value int: The new value for the channel. +// - value int32: The new value for the channel. // // Sets the current value of the channel to the passed value, which must // be between min_value and max_value. @@ -8011,7 +8278,7 @@ func (balance *ColorBalanceInstance) ListChannels() []ColorBalanceChannel { // See Also: The #GstColorBalanceChannel.min_value and // #GstColorBalanceChannel.max_value members of the // #GstColorBalanceChannel object. -func (balance *ColorBalanceInstance) SetValue(channel ColorBalanceChannel, value int) { +func (balance *ColorBalanceInstance) SetValue(channel ColorBalanceChannel, value int32) { var carg0 *C.GstColorBalance // in, none, converted var carg1 *C.GstColorBalanceChannel // in, none, converted var carg2 C.gint // in, none, casted @@ -8031,13 +8298,13 @@ func (balance *ColorBalanceInstance) SetValue(channel ColorBalanceChannel, value // The function takes the following parameters: // // - channel ColorBalanceChannel: A #GstColorBalanceChannel whose value has changed -// - value int: The new value of the channel +// - value int32: The new value of the channel // // A helper function called by implementations of the GstColorBalance // interface. It fires the #GstColorBalance::value-changed signal on the // instance, and the #GstColorBalanceChannel::value-changed signal on the // channel object. -func (balance *ColorBalanceInstance) ValueChanged(channel ColorBalanceChannel, value int) { +func (balance *ColorBalanceInstance) ValueChanged(channel ColorBalanceChannel, value int32) { var carg0 *C.GstColorBalance // in, none, converted var carg1 *C.GstColorBalanceChannel // in, none, converted var carg2 C.gint // in, none, casted @@ -8055,7 +8322,7 @@ func (balance *ColorBalanceInstance) ValueChanged(channel ColorBalanceChannel, v // ConnectValueChanged connects the provided callback to the "value-changed" signal // // Fired when the value of the indicated channel has changed. -func (o *ColorBalanceInstance) ConnectValueChanged(fn func(ColorBalance, ColorBalanceChannel, int)) gobject.SignalHandle { +func (o *ColorBalanceInstance) ConnectValueChanged(fn func(ColorBalance, ColorBalanceChannel, int32)) gobject.SignalHandle { return o.Instance.Connect("value-changed", fn) } @@ -8074,8 +8341,8 @@ type ColorBalanceOverrides[Instance ColorBalance] struct { // // The function returns the following values: // - // - goret int - GetValue func(Instance, ColorBalanceChannel) int + // - goret int32 + GetValue func(Instance, ColorBalanceChannel) int32 // ListChannels allows you to override the implementation of the virtual method list_channels. // The function returns the following values: // @@ -8085,14 +8352,14 @@ type ColorBalanceOverrides[Instance ColorBalance] struct { // The function takes the following parameters: // // - channel ColorBalanceChannel: A #GstColorBalanceChannel instance - // - value int: The new value for the channel. - SetValue func(Instance, ColorBalanceChannel, int) + // - value int32: The new value for the channel. + SetValue func(Instance, ColorBalanceChannel, int32) // ValueChanged allows you to override the implementation of the virtual method value_changed. // The function takes the following parameters: // // - channel ColorBalanceChannel: A #GstColorBalanceChannel whose value has changed - // - value int: The new value of the channel - ValueChanged func(Instance, ColorBalanceChannel, int) + // - value int32: The new value of the channel + ValueChanged func(Instance, ColorBalanceChannel, int32) } // UnsafeApplyColorBalanceOverrides applies the overrides to init the gclass by setting the trampoline functions. @@ -8109,7 +8376,7 @@ func UnsafeApplyColorBalanceOverrides[Instance ColorBalance](gclass unsafe.Point var balance Instance // go GstColorBalance subclass var goret ColorBalanceType // return, none, casted - balance = UnsafeColorBalanceFromGlibNone(unsafe.Pointer(carg0)).(Instance) + balance = UnsafeColorBalanceFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GetBalanceType(balance) @@ -8128,9 +8395,9 @@ func UnsafeApplyColorBalanceOverrides[Instance ColorBalance](gclass unsafe.Point func(carg0 *C.GstColorBalance, carg1 *C.GstColorBalanceChannel) (cret C.gint) { var balance Instance // go GstColorBalance subclass var channel ColorBalanceChannel // in, none, converted - var goret int // return, none, casted + var goret int32 // return, none, casted - balance = UnsafeColorBalanceFromGlibNone(unsafe.Pointer(carg0)).(Instance) + balance = UnsafeColorBalanceFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) channel = UnsafeColorBalanceChannelFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.GetValue(balance, channel) @@ -8151,7 +8418,7 @@ func UnsafeApplyColorBalanceOverrides[Instance ColorBalance](gclass unsafe.Point var balance Instance // go GstColorBalance subclass var goret []ColorBalanceChannel // return, transfer: none, C Pointers: 1, Name: List, scope: - balance = UnsafeColorBalanceFromGlibNone(unsafe.Pointer(carg0)).(Instance) + balance = UnsafeColorBalanceFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.ListChannels(balance) @@ -8172,11 +8439,11 @@ func UnsafeApplyColorBalanceOverrides[Instance ColorBalance](gclass unsafe.Point func(carg0 *C.GstColorBalance, carg1 *C.GstColorBalanceChannel, carg2 C.gint) { var balance Instance // go GstColorBalance subclass var channel ColorBalanceChannel // in, none, converted - var value int // in, none, casted + var value int32 // in, none, casted - balance = UnsafeColorBalanceFromGlibNone(unsafe.Pointer(carg0)).(Instance) + balance = UnsafeColorBalanceFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) channel = UnsafeColorBalanceChannelFromGlibNone(unsafe.Pointer(carg1)) - value = int(carg2) + value = int32(carg2) overrides.SetValue(balance, channel, value) }, @@ -8191,11 +8458,11 @@ func UnsafeApplyColorBalanceOverrides[Instance ColorBalance](gclass unsafe.Point func(carg0 *C.GstColorBalance, carg1 *C.GstColorBalanceChannel, carg2 C.gint) { var balance Instance // go GstColorBalance subclass var channel ColorBalanceChannel // in, none, converted - var value int // in, none, casted + var value int32 // in, none, casted - balance = UnsafeColorBalanceFromGlibNone(unsafe.Pointer(carg0)).(Instance) + balance = UnsafeColorBalanceFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) channel = UnsafeColorBalanceChannelFromGlibNone(unsafe.Pointer(carg1)) - value = int(carg2) + value = int32(carg2) overrides.ValueChanged(balance, channel, value) }, @@ -8275,8 +8542,8 @@ type Navigation interface { // The function takes the following parameters: // // - event string: The type of mouse event, as a text string. Recognised values are - // "mouse-button-press", "mouse-button-release" and "mouse-move". - // - button int: The button number of the button being pressed or released. Pass 0 + // "mouse-button-press", "mouse-button-release", "mouse-move" and "mouse-double-click". + // - button int32: The button number of the button being pressed or released. Pass 0 // for mouse-move events. // - x float64: The x coordinate of the mouse event. // - y float64: The y coordinate of the mouse event. @@ -8285,7 +8552,7 @@ type Navigation interface { // are sent relative to the display space of the related output area. This is // usually the size in pixels of the window associated with the element // implementing the #GstNavigation interface. - SendMouseEvent(string, int, float64, float64) + SendMouseEvent(string, int32, float64, float64) // SendMouseScrollEvent wraps gst_navigation_send_mouse_scroll_event // // The function takes the following parameters: @@ -8328,6 +8595,11 @@ func UnsafeNavigationFromGlibFull(c unsafe.Pointer) Navigation { return gobject.UnsafeObjectFromGlibFull(c).(Navigation) } +// UnsafeNavigationFromGlibBorrow is used to convert raw GstNavigation pointers to go without touching any references. This is used by the bindings internally. +func UnsafeNavigationFromGlibBorrow(c unsafe.Pointer) Navigation { + return gobject.UnsafeObjectFromGlibBorrow(c).(Navigation) +} + // UnsafeNavigationToGlibNone is used to convert the instance to it's C value GstNavigation. This is used by the bindings internally. func UnsafeNavigationToGlibNone(c Navigation) unsafe.Pointer { i := c.upcastToGstNavigation() @@ -8504,7 +8776,7 @@ func NavigationEventNewKeyRelease(key string, state NavigationModifierType) *gst // // The function takes the following parameters: // -// - button int: The number of the pressed mouse button. +// - button int32: The number of the pressed mouse button. // - x float64: The x coordinate of the mouse cursor. // - y float64: The y coordinate of the mouse cursor. // - state NavigationModifierType: a bit-mask representing the state of the modifier keys (e.g. Control, @@ -8515,7 +8787,7 @@ func NavigationEventNewKeyRelease(key string, state NavigationModifierType) *gst // - goret *gst.Event // // Create a new navigation event for the given key mouse button press. -func NavigationEventNewMouseButtonPress(button int, x float64, y float64, state NavigationModifierType) *gst.Event { +func NavigationEventNewMouseButtonPress(button int32, x float64, y float64, state NavigationModifierType) *gst.Event { var carg1 C.gint // in, none, casted var carg2 C.gdouble // in, none, casted var carg3 C.gdouble // in, none, casted @@ -8544,7 +8816,7 @@ func NavigationEventNewMouseButtonPress(button int, x float64, y float64, state // // The function takes the following parameters: // -// - button int: The number of the released mouse button. +// - button int32: The number of the released mouse button. // - x float64: The x coordinate of the mouse cursor. // - y float64: The y coordinate of the mouse cursor. // - state NavigationModifierType: a bit-mask representing the state of the modifier keys (e.g. Control, @@ -8555,7 +8827,7 @@ func NavigationEventNewMouseButtonPress(button int, x float64, y float64, state // - goret *gst.Event // // Create a new navigation event for the given key mouse button release. -func NavigationEventNewMouseButtonRelease(button int, x float64, y float64, state NavigationModifierType) *gst.Event { +func NavigationEventNewMouseButtonRelease(button int32, x float64, y float64, state NavigationModifierType) *gst.Event { var carg1 C.gint // in, none, casted var carg2 C.gdouble // in, none, casted var carg3 C.gdouble // in, none, casted @@ -8580,6 +8852,46 @@ func NavigationEventNewMouseButtonRelease(button int, x float64, y float64, stat return goret } +// NavigationEventNewMouseDoubleClick wraps gst_navigation_event_new_mouse_double_click +// +// The function takes the following parameters: +// +// - button int32: The number of the pressed mouse button. +// - x float64: The x coordinate of the mouse cursor. +// - y float64: The y coordinate of the mouse cursor. +// - state NavigationModifierType: a bit-mask representing the state of the modifier keys (e.g. Control, +// Shift and Alt). +// +// The function returns the following values: +// +// - goret *gst.Event +// +// Create a new navigation event for the given key mouse double click. +func NavigationEventNewMouseDoubleClick(button int32, x float64, y float64, state NavigationModifierType) *gst.Event { + var carg1 C.gint // in, none, casted + var carg2 C.gdouble // in, none, casted + var carg3 C.gdouble // in, none, casted + var carg4 C.GstNavigationModifierType // in, none, casted + var cret *C.GstEvent // return, full, converted + + carg1 = C.gint(button) + carg2 = C.gdouble(x) + carg3 = C.gdouble(y) + carg4 = C.GstNavigationModifierType(state) + + cret = C.gst_navigation_event_new_mouse_double_click(carg1, carg2, carg3, carg4) + runtime.KeepAlive(button) + runtime.KeepAlive(x) + runtime.KeepAlive(y) + runtime.KeepAlive(state) + + var goret *gst.Event + + goret = gst.UnsafeEventFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + // NavigationEventNewMouseMove wraps gst_navigation_event_new_mouse_move // // The function takes the following parameters: @@ -8937,7 +9249,7 @@ func NavigationEventParseKeyEvent(event *gst.Event) (string, bool) { // // The function returns the following values: // -// - button int: Pointer to a gint that will receive the button +// - button int32: Pointer to a gint that will receive the button // number associated with the event. // - x float64: Pointer to a gdouble to receive the x coordinate of the // mouse button event. @@ -8948,7 +9260,7 @@ func NavigationEventParseKeyEvent(event *gst.Event) (string, bool) { // Retrieve the details of either a #GstNavigation mouse button press event or // a mouse button release event. Determine which type the event is using // gst_navigation_event_get_type() to retrieve the #GstNavigationEventType. -func NavigationEventParseMouseButtonEvent(event *gst.Event) (int, float64, float64, bool) { +func NavigationEventParseMouseButtonEvent(event *gst.Event) (int32, float64, float64, bool) { var carg1 *C.GstEvent // in, none, converted var carg2 C.gint // out, full, casted var carg3 C.gdouble // out, full, casted @@ -8960,12 +9272,12 @@ func NavigationEventParseMouseButtonEvent(event *gst.Event) (int, float64, float cret = C.gst_navigation_event_parse_mouse_button_event(carg1, &carg2, &carg3, &carg4) runtime.KeepAlive(event) - var button int + var button int32 var x float64 var y float64 var goret bool - button = int(carg2) + button = int32(carg2) x = float64(carg3) y = float64(carg4) if cret != 0 { @@ -9791,8 +10103,8 @@ func (navigation *NavigationInstance) SendKeyEvent(event string, key string) { // The function takes the following parameters: // // - event string: The type of mouse event, as a text string. Recognised values are -// "mouse-button-press", "mouse-button-release" and "mouse-move". -// - button int: The button number of the button being pressed or released. Pass 0 +// "mouse-button-press", "mouse-button-release", "mouse-move" and "mouse-double-click". +// - button int32: The button number of the button being pressed or released. Pass 0 // for mouse-move events. // - x float64: The x coordinate of the mouse event. // - y float64: The y coordinate of the mouse event. @@ -9801,7 +10113,7 @@ func (navigation *NavigationInstance) SendKeyEvent(event string, key string) { // are sent relative to the display space of the related output area. This is // usually the size in pixels of the window associated with the element // implementing the #GstNavigation interface. -func (navigation *NavigationInstance) SendMouseEvent(event string, button int, x float64, y float64) { +func (navigation *NavigationInstance) SendMouseEvent(event string, button int32, x float64, y float64) { var carg0 *C.GstNavigation // in, none, converted var carg1 *C.char // in, none, string, casted *C.gchar var carg2 C.int // in, none, casted, casted C.gint @@ -9886,7 +10198,7 @@ func UnsafeApplyNavigationOverrides[Instance Navigation](gclass unsafe.Pointer, var navigation Instance // go GstNavigation subclass var structure *gst.Structure // in, none, converted - navigation = UnsafeNavigationFromGlibNone(unsafe.Pointer(carg0)).(Instance) + navigation = UnsafeNavigationFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) structure = gst.UnsafeStructureFromGlibNone(unsafe.Pointer(carg1)) overrides.SendEvent(navigation, structure) @@ -9903,7 +10215,7 @@ func UnsafeApplyNavigationOverrides[Instance Navigation](gclass unsafe.Pointer, var navigation Instance // go GstNavigation subclass var event *gst.Event // in, full, converted - navigation = UnsafeNavigationFromGlibNone(unsafe.Pointer(carg0)).(Instance) + navigation = UnsafeNavigationFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = gst.UnsafeEventFromGlibFull(unsafe.Pointer(carg1)) overrides.SendEventSimple(navigation, event) @@ -9954,6 +10266,11 @@ func UnsafeVideoDirectionFromGlibFull(c unsafe.Pointer) VideoDirection { return gobject.UnsafeObjectFromGlibFull(c).(VideoDirection) } +// UnsafeVideoDirectionFromGlibBorrow is used to convert raw GstVideoDirection pointers to go without touching any references. This is used by the bindings internally. +func UnsafeVideoDirectionFromGlibBorrow(c unsafe.Pointer) VideoDirection { + return gobject.UnsafeObjectFromGlibBorrow(c).(VideoDirection) +} + // UnsafeVideoDirectionToGlibNone is used to convert the instance to it's C value GstVideoDirection. This is used by the bindings internally. func UnsafeVideoDirectionToGlibNone(c VideoDirection) unsafe.Pointer { i := c.upcastToGstVideoDirection() @@ -9995,11 +10312,11 @@ type VideoOrientation interface { // // The function returns the following values: // - // - center int: return location for the result + // - center int32: return location for the result // - goret bool // // Get the horizontal centering offset from the given object. - GetHcenter() (int, bool) + GetHcenter() (int32, bool) // GetHflip wraps gst_video_orientation_get_hflip // // The function returns the following values: @@ -10013,11 +10330,11 @@ type VideoOrientation interface { // // The function returns the following values: // - // - center int: return location for the result + // - center int32: return location for the result // - goret bool // // Get the vertical centering offset from the given object. - GetVcenter() (int, bool) + GetVcenter() (int32, bool) // GetVflip wraps gst_video_orientation_get_vflip // // The function returns the following values: @@ -10031,14 +10348,14 @@ type VideoOrientation interface { // // The function takes the following parameters: // - // - center int: centering offset + // - center int32: centering offset // // The function returns the following values: // // - goret bool // // Set the horizontal centering offset for the given object. - SetHcenter(int) bool + SetHcenter(int32) bool // SetHflip wraps gst_video_orientation_set_hflip // // The function takes the following parameters: @@ -10055,14 +10372,14 @@ type VideoOrientation interface { // // The function takes the following parameters: // - // - center int: centering offset + // - center int32: centering offset // // The function returns the following values: // // - goret bool // // Set the vertical centering offset for the given object. - SetVcenter(int) bool + SetVcenter(int32) bool // SetVflip wraps gst_video_orientation_set_vflip // // The function takes the following parameters: @@ -10103,6 +10420,11 @@ func UnsafeVideoOrientationFromGlibFull(c unsafe.Pointer) VideoOrientation { return gobject.UnsafeObjectFromGlibFull(c).(VideoOrientation) } +// UnsafeVideoOrientationFromGlibBorrow is used to convert raw GstVideoOrientation pointers to go without touching any references. This is used by the bindings internally. +func UnsafeVideoOrientationFromGlibBorrow(c unsafe.Pointer) VideoOrientation { + return gobject.UnsafeObjectFromGlibBorrow(c).(VideoOrientation) +} + // UnsafeVideoOrientationToGlibNone is used to convert the instance to it's C value GstVideoOrientation. This is used by the bindings internally. func UnsafeVideoOrientationToGlibNone(c VideoOrientation) unsafe.Pointer { i := c.upcastToGstVideoOrientation() @@ -10153,11 +10475,11 @@ func VideoOrientationFromTag(taglist *gst.TagList) (VideoOrientationMethod, bool // // The function returns the following values: // -// - center int: return location for the result +// - center int32: return location for the result // - goret bool // // Get the horizontal centering offset from the given object. -func (videoOrientation *VideoOrientationInstance) GetHcenter() (int, bool) { +func (videoOrientation *VideoOrientationInstance) GetHcenter() (int32, bool) { var carg0 *C.GstVideoOrientation // in, none, converted var carg1 C.gint // out, full, casted var cret C.gboolean // return @@ -10167,10 +10489,10 @@ func (videoOrientation *VideoOrientationInstance) GetHcenter() (int, bool) { cret = C.gst_video_orientation_get_hcenter(carg0, &carg1) runtime.KeepAlive(videoOrientation) - var center int + var center int32 var goret bool - center = int(carg1) + center = int32(carg1) if cret != 0 { goret = true } @@ -10213,11 +10535,11 @@ func (videoOrientation *VideoOrientationInstance) GetHflip() (bool, bool) { // // The function returns the following values: // -// - center int: return location for the result +// - center int32: return location for the result // - goret bool // // Get the vertical centering offset from the given object. -func (videoOrientation *VideoOrientationInstance) GetVcenter() (int, bool) { +func (videoOrientation *VideoOrientationInstance) GetVcenter() (int32, bool) { var carg0 *C.GstVideoOrientation // in, none, converted var carg1 C.gint // out, full, casted var cret C.gboolean // return @@ -10227,10 +10549,10 @@ func (videoOrientation *VideoOrientationInstance) GetVcenter() (int, bool) { cret = C.gst_video_orientation_get_vcenter(carg0, &carg1) runtime.KeepAlive(videoOrientation) - var center int + var center int32 var goret bool - center = int(carg1) + center = int32(carg1) if cret != 0 { goret = true } @@ -10273,14 +10595,14 @@ func (videoOrientation *VideoOrientationInstance) GetVflip() (bool, bool) { // // The function takes the following parameters: // -// - center int: centering offset +// - center int32: centering offset // // The function returns the following values: // // - goret bool // // Set the horizontal centering offset for the given object. -func (videoOrientation *VideoOrientationInstance) SetHcenter(center int) bool { +func (videoOrientation *VideoOrientationInstance) SetHcenter(center int32) bool { var carg0 *C.GstVideoOrientation // in, none, converted var carg1 C.gint // in, none, casted var cret C.gboolean // return @@ -10339,14 +10661,14 @@ func (videoOrientation *VideoOrientationInstance) SetHflip(flip bool) bool { // // The function takes the following parameters: // -// - center int: centering offset +// - center int32: centering offset // // The function returns the following values: // // - goret bool // // Set the vertical centering offset for the given object. -func (videoOrientation *VideoOrientationInstance) SetVcenter(center int) bool { +func (videoOrientation *VideoOrientationInstance) SetVcenter(center int32) bool { var carg0 *C.GstVideoOrientation // in, none, converted var carg1 C.gint // in, none, casted var cret C.gboolean // return @@ -10407,9 +10729,9 @@ type VideoOrientationOverrides[Instance VideoOrientation] struct { // GetHcenter allows you to override the implementation of the virtual method get_hcenter. // The function returns the following values: // - // - center int: return location for the result + // - center int32: return location for the result // - goret bool - GetHcenter func(Instance) (int, bool) + GetHcenter func(Instance) (int32, bool) // GetHflip allows you to override the implementation of the virtual method get_hflip. // The function returns the following values: // @@ -10419,9 +10741,9 @@ type VideoOrientationOverrides[Instance VideoOrientation] struct { // GetVcenter allows you to override the implementation of the virtual method get_vcenter. // The function returns the following values: // - // - center int: return location for the result + // - center int32: return location for the result // - goret bool - GetVcenter func(Instance) (int, bool) + GetVcenter func(Instance) (int32, bool) // GetVflip allows you to override the implementation of the virtual method get_vflip. // The function returns the following values: // @@ -10431,12 +10753,12 @@ type VideoOrientationOverrides[Instance VideoOrientation] struct { // SetHcenter allows you to override the implementation of the virtual method set_hcenter. // The function takes the following parameters: // - // - center int: centering offset + // - center int32: centering offset // // The function returns the following values: // // - goret bool - SetHcenter func(Instance, int) bool + SetHcenter func(Instance, int32) bool // SetHflip allows you to override the implementation of the virtual method set_hflip. // The function takes the following parameters: // @@ -10449,12 +10771,12 @@ type VideoOrientationOverrides[Instance VideoOrientation] struct { // SetVcenter allows you to override the implementation of the virtual method set_vcenter. // The function takes the following parameters: // - // - center int: centering offset + // - center int32: centering offset // // The function returns the following values: // // - goret bool - SetVcenter func(Instance, int) bool + SetVcenter func(Instance, int32) bool // SetVflip allows you to override the implementation of the virtual method set_vflip. // The function takes the following parameters: // @@ -10478,10 +10800,10 @@ func UnsafeApplyVideoOrientationOverrides[Instance VideoOrientation](gclass unsa "_gotk4_gstvideo1_VideoOrientation_get_hcenter", func(carg0 *C.GstVideoOrientation, carg1 *C.gint) (cret C.gboolean) { var videoOrientation Instance // go GstVideoOrientation subclass - var center int // out, full, casted + var center int32 // out, full, casted var goret bool // return - videoOrientation = UnsafeVideoOrientationFromGlibNone(unsafe.Pointer(carg0)).(Instance) + videoOrientation = UnsafeVideoOrientationFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) center, goret = overrides.GetHcenter(videoOrientation) @@ -10505,7 +10827,7 @@ func UnsafeApplyVideoOrientationOverrides[Instance VideoOrientation](gclass unsa var flip bool // out var goret bool // return - videoOrientation = UnsafeVideoOrientationFromGlibNone(unsafe.Pointer(carg0)).(Instance) + videoOrientation = UnsafeVideoOrientationFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) flip, goret = overrides.GetHflip(videoOrientation) @@ -10528,10 +10850,10 @@ func UnsafeApplyVideoOrientationOverrides[Instance VideoOrientation](gclass unsa "_gotk4_gstvideo1_VideoOrientation_get_vcenter", func(carg0 *C.GstVideoOrientation, carg1 *C.gint) (cret C.gboolean) { var videoOrientation Instance // go GstVideoOrientation subclass - var center int // out, full, casted + var center int32 // out, full, casted var goret bool // return - videoOrientation = UnsafeVideoOrientationFromGlibNone(unsafe.Pointer(carg0)).(Instance) + videoOrientation = UnsafeVideoOrientationFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) center, goret = overrides.GetVcenter(videoOrientation) @@ -10555,7 +10877,7 @@ func UnsafeApplyVideoOrientationOverrides[Instance VideoOrientation](gclass unsa var flip bool // out var goret bool // return - videoOrientation = UnsafeVideoOrientationFromGlibNone(unsafe.Pointer(carg0)).(Instance) + videoOrientation = UnsafeVideoOrientationFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) flip, goret = overrides.GetVflip(videoOrientation) @@ -10578,11 +10900,11 @@ func UnsafeApplyVideoOrientationOverrides[Instance VideoOrientation](gclass unsa "_gotk4_gstvideo1_VideoOrientation_set_hcenter", func(carg0 *C.GstVideoOrientation, carg1 C.gint) (cret C.gboolean) { var videoOrientation Instance // go GstVideoOrientation subclass - var center int // in, none, casted + var center int32 // in, none, casted var goret bool // return - videoOrientation = UnsafeVideoOrientationFromGlibNone(unsafe.Pointer(carg0)).(Instance) - center = int(carg1) + videoOrientation = UnsafeVideoOrientationFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) + center = int32(carg1) goret = overrides.SetHcenter(videoOrientation, center) @@ -10605,7 +10927,7 @@ func UnsafeApplyVideoOrientationOverrides[Instance VideoOrientation](gclass unsa var flip bool // in var goret bool // return - videoOrientation = UnsafeVideoOrientationFromGlibNone(unsafe.Pointer(carg0)).(Instance) + videoOrientation = UnsafeVideoOrientationFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != 0 { flip = true } @@ -10628,11 +10950,11 @@ func UnsafeApplyVideoOrientationOverrides[Instance VideoOrientation](gclass unsa "_gotk4_gstvideo1_VideoOrientation_set_vcenter", func(carg0 *C.GstVideoOrientation, carg1 C.gint) (cret C.gboolean) { var videoOrientation Instance // go GstVideoOrientation subclass - var center int // in, none, casted + var center int32 // in, none, casted var goret bool // return - videoOrientation = UnsafeVideoOrientationFromGlibNone(unsafe.Pointer(carg0)).(Instance) - center = int(carg1) + videoOrientation = UnsafeVideoOrientationFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) + center = int32(carg1) goret = overrides.SetVcenter(videoOrientation, center) @@ -10655,7 +10977,7 @@ func UnsafeApplyVideoOrientationOverrides[Instance VideoOrientation](gclass unsa var flip bool // in var goret bool // return - videoOrientation = UnsafeVideoOrientationFromGlibNone(unsafe.Pointer(carg0)).(Instance) + videoOrientation = UnsafeVideoOrientationFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != 0 { flip = true } @@ -10973,10 +11295,10 @@ type VideoOverlay interface { // // The function takes the following parameters: // - // - x int: the horizontal offset of the render area inside the window - // - y int: the vertical offset of the render area inside the window - // - width int: the width of the render area inside the window - // - height int: the height of the render area inside the window + // - x int32: the horizontal offset of the render area inside the window + // - y int32: the vertical offset of the render area inside the window + // - width int32: the width of the render area inside the window + // - height int32: the height of the render area inside the window // // The function returns the following values: // @@ -10992,7 +11314,7 @@ type VideoOverlay interface { // // This method is needed for non fullscreen video overlay in UI toolkits that // do not support subwindows. - SetRenderRectangle(int, int, int, int) bool + SetRenderRectangle(int32, int32, int32, int32) bool } var _ VideoOverlay = (*VideoOverlayInstance)(nil) @@ -11021,6 +11343,11 @@ func UnsafeVideoOverlayFromGlibFull(c unsafe.Pointer) VideoOverlay { return gobject.UnsafeObjectFromGlibFull(c).(VideoOverlay) } +// UnsafeVideoOverlayFromGlibBorrow is used to convert raw GstVideoOverlay pointers to go without touching any references. This is used by the bindings internally. +func UnsafeVideoOverlayFromGlibBorrow(c unsafe.Pointer) VideoOverlay { + return gobject.UnsafeObjectFromGlibBorrow(c).(VideoOverlay) +} + // UnsafeVideoOverlayToGlibNone is used to convert the instance to it's C value GstVideoOverlay. This is used by the bindings internally. func UnsafeVideoOverlayToGlibNone(c VideoOverlay) unsafe.Pointer { i := c.upcastToGstVideoOverlay() @@ -11038,7 +11365,7 @@ func UnsafeVideoOverlayToGlibFull(c VideoOverlay) unsafe.Pointer { // The function takes the following parameters: // // - object gobject.Object: The instance on which the property is set -// - lastPropId int: The highest property ID. +// - lastPropId int32: The highest property ID. // - propertyId uint: The property ID // - value *gobject.Value: The #GValue to be set // @@ -11050,7 +11377,7 @@ func UnsafeVideoOverlayToGlibFull(c VideoOverlay) unsafe.Pointer { // interface that want the render rectangle to be controllable using // properties. This helper will parse and set the render rectangle calling // gst_video_overlay_set_render_rectangle(). -func VideoOverlaySetProperty(object gobject.Object, lastPropId int, propertyId uint, value *gobject.Value) bool { +func VideoOverlaySetProperty(object gobject.Object, lastPropId int32, propertyId uint, value *gobject.Value) bool { var carg1 *C.GObject // in, none, converted var carg2 C.gint // in, none, casted var carg3 C.guint // in, none, casted @@ -11136,10 +11463,10 @@ func (overlay *VideoOverlayInstance) PrepareWindowHandle() { // // The function takes the following parameters: // -// - x int: the horizontal offset of the render area inside the window -// - y int: the vertical offset of the render area inside the window -// - width int: the width of the render area inside the window -// - height int: the height of the render area inside the window +// - x int32: the horizontal offset of the render area inside the window +// - y int32: the vertical offset of the render area inside the window +// - width int32: the width of the render area inside the window +// - height int32: the height of the render area inside the window // // The function returns the following values: // @@ -11155,7 +11482,7 @@ func (overlay *VideoOverlayInstance) PrepareWindowHandle() { // // This method is needed for non fullscreen video overlay in UI toolkits that // do not support subwindows. -func (overlay *VideoOverlayInstance) SetRenderRectangle(x int, y int, width int, height int) bool { +func (overlay *VideoOverlayInstance) SetRenderRectangle(x int32, y int32, width int32, height int32) bool { var carg0 *C.GstVideoOverlay // in, none, converted var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted @@ -11198,11 +11525,11 @@ type VideoOverlayOverrides[Instance VideoOverlay] struct { // SetRenderRectangle allows you to override the implementation of the virtual method set_render_rectangle. // The function takes the following parameters: // - // - x int - // - y int - // - width int - // - height int - SetRenderRectangle func(Instance, int, int, int, int) + // - x int32 + // - y int32 + // - width int32 + // - height int32 + SetRenderRectangle func(Instance, int32, int32, int32, int32) } // UnsafeApplyVideoOverlayOverrides applies the overrides to init the gclass by setting the trampoline functions. @@ -11218,7 +11545,7 @@ func UnsafeApplyVideoOverlayOverrides[Instance VideoOverlay](gclass unsafe.Point func(carg0 *C.GstVideoOverlay) { var overlay Instance // go GstVideoOverlay subclass - overlay = UnsafeVideoOverlayFromGlibNone(unsafe.Pointer(carg0)).(Instance) + overlay = UnsafeVideoOverlayFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.Expose(overlay) }, @@ -11234,7 +11561,7 @@ func UnsafeApplyVideoOverlayOverrides[Instance VideoOverlay](gclass unsafe.Point var overlay Instance // go GstVideoOverlay subclass var handleEvents bool // in - overlay = UnsafeVideoOverlayFromGlibNone(unsafe.Pointer(carg0)).(Instance) + overlay = UnsafeVideoOverlayFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != 0 { handleEvents = true } @@ -11251,16 +11578,16 @@ func UnsafeApplyVideoOverlayOverrides[Instance VideoOverlay](gclass unsafe.Point "_gotk4_gstvideo1_VideoOverlay_set_render_rectangle", func(carg0 *C.GstVideoOverlay, carg1 C.gint, carg2 C.gint, carg3 C.gint, carg4 C.gint) { var overlay Instance // go GstVideoOverlay subclass - var x int // in, none, casted - var y int // in, none, casted - var width int // in, none, casted - var height int // in, none, casted + var x int32 // in, none, casted + var y int32 // in, none, casted + var width int32 // in, none, casted + var height int32 // in, none, casted - overlay = UnsafeVideoOverlayFromGlibNone(unsafe.Pointer(carg0)).(Instance) - x = int(carg1) - y = int(carg2) - width = int(carg3) - height = int(carg4) + overlay = UnsafeVideoOverlayFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) + x = int32(carg1) + y = int32(carg2) + width = int32(carg3) + height = int32(carg4) overrides.SetRenderRectangle(overlay, x, y, width, height) }, @@ -11288,7 +11615,7 @@ type ColorBalanceChannel interface { // ConnectValueChanged connects the provided callback to the "value-changed" signal // // Fired when the value of the indicated channel has changed. - ConnectValueChanged(func(ColorBalanceChannel, int)) gobject.SignalHandle + ConnectValueChanged(func(ColorBalanceChannel, int32)) gobject.SignalHandle } func unsafeWrapColorBalanceChannel(base *gobject.ObjectInstance) *ColorBalanceChannelInstance { @@ -11311,6 +11638,11 @@ func UnsafeColorBalanceChannelFromGlibFull(c unsafe.Pointer) ColorBalanceChannel return gobject.UnsafeObjectFromGlibFull(c).(ColorBalanceChannel) } +// UnsafeColorBalanceChannelFromGlibBorrow is used to convert raw GstColorBalanceChannel pointers to go without touching any references. This is used by the bindings internally. +func UnsafeColorBalanceChannelFromGlibBorrow(c unsafe.Pointer) ColorBalanceChannel { + return gobject.UnsafeObjectFromGlibBorrow(c).(ColorBalanceChannel) +} + func (c *ColorBalanceChannelInstance) upcastToGstColorBalanceChannel() *ColorBalanceChannelInstance { return c } @@ -11328,7 +11660,7 @@ func UnsafeColorBalanceChannelToGlibFull(c ColorBalanceChannel) unsafe.Pointer { // ConnectValueChanged connects the provided callback to the "value-changed" signal // // Fired when the value of the indicated channel has changed. -func (o *ColorBalanceChannelInstance) ConnectValueChanged(fn func(ColorBalanceChannel, int)) gobject.SignalHandle { +func (o *ColorBalanceChannelInstance) ConnectValueChanged(fn func(ColorBalanceChannel, int32)) gobject.SignalHandle { return o.Connect("value-changed", fn) } @@ -11341,8 +11673,8 @@ type ColorBalanceChannelOverrides[Instance ColorBalanceChannel] struct { // ValueChanged allows you to override the implementation of the virtual method value_changed. // The function takes the following parameters: // - // - value int - ValueChanged func(Instance, int) + // - value int32 + ValueChanged func(Instance, int32) } // UnsafeApplyColorBalanceChannelOverrides applies the overrides to init the gclass by setting the trampoline functions. @@ -11359,10 +11691,10 @@ func UnsafeApplyColorBalanceChannelOverrides[Instance ColorBalanceChannel](gclas "_gotk4_gstvideo1_ColorBalanceChannel_value_changed", func(carg0 *C.GstColorBalanceChannel, carg1 C.gint) { var channel Instance // go GstColorBalanceChannel subclass - var value int // in, none, casted + var value int32 // in, none, casted - channel = UnsafeColorBalanceChannelFromGlibNone(unsafe.Pointer(carg0)).(Instance) - value = int(carg1) + channel = UnsafeColorBalanceChannelFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) + value = int32(carg1) overrides.ValueChanged(channel, value) }, @@ -11461,6 +11793,11 @@ func UnsafeVideoAggregatorFromGlibFull(c unsafe.Pointer) VideoAggregator { return gobject.UnsafeObjectFromGlibFull(c).(VideoAggregator) } +// UnsafeVideoAggregatorFromGlibBorrow is used to convert raw GstVideoAggregator pointers to go without touching any references. This is used by the bindings internally. +func UnsafeVideoAggregatorFromGlibBorrow(c unsafe.Pointer) VideoAggregator { + return gobject.UnsafeObjectFromGlibBorrow(c).(VideoAggregator) +} + func (v *VideoAggregatorInstance) upcastToGstVideoAggregator() *VideoAggregatorInstance { return v } @@ -11555,7 +11892,7 @@ func UnsafeApplyVideoAggregatorOverrides[Instance VideoAggregator](gclass unsafe var outbuffer *gst.Buffer // in, none, converted var goret gst.FlowReturn // return, none, casted - videoaggregator = UnsafeVideoAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + videoaggregator = UnsafeVideoAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) outbuffer = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.AggregateFrames(videoaggregator, outbuffer) @@ -11578,7 +11915,7 @@ func UnsafeApplyVideoAggregatorOverrides[Instance VideoAggregator](gclass unsafe var bestInfo *VideoInfo // in, none, converted var atLeastOneAlpha bool // out - vagg = UnsafeVideoAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + vagg = UnsafeVideoAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) downstreamCaps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) bestInfo = UnsafeVideoInfoFromGlibNone(unsafe.Pointer(carg2)) @@ -11601,7 +11938,7 @@ func UnsafeApplyVideoAggregatorOverrides[Instance VideoAggregator](gclass unsafe var caps *gst.Caps // in, none, converted var goret *gst.Caps // return, full, converted - videoaggregator = UnsafeVideoAggregatorFromGlibNone(unsafe.Pointer(carg0)).(Instance) + videoaggregator = UnsafeVideoAggregatorFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.UpdateCaps(videoaggregator, caps) @@ -11733,6 +12070,11 @@ func UnsafeVideoAggregatorPadFromGlibFull(c unsafe.Pointer) VideoAggregatorPad { return gobject.UnsafeObjectFromGlibFull(c).(VideoAggregatorPad) } +// UnsafeVideoAggregatorPadFromGlibBorrow is used to convert raw GstVideoAggregatorPad pointers to go without touching any references. This is used by the bindings internally. +func UnsafeVideoAggregatorPadFromGlibBorrow(c unsafe.Pointer) VideoAggregatorPad { + return gobject.UnsafeObjectFromGlibBorrow(c).(VideoAggregatorPad) +} + func (v *VideoAggregatorPadInstance) upcastToGstVideoAggregatorPad() *VideoAggregatorPadInstance { return v } @@ -11914,7 +12256,7 @@ func UnsafeApplyVideoAggregatorPadOverrides[Instance VideoAggregatorPad](gclass var videoaggregator VideoAggregator // in, none, converted var preparedFrame *VideoFrame // in, none, converted - pad = UnsafeVideoAggregatorPadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pad = UnsafeVideoAggregatorPadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) videoaggregator = UnsafeVideoAggregatorFromGlibNone(unsafe.Pointer(carg1)) preparedFrame = UnsafeVideoFrameFromGlibNone(unsafe.Pointer(carg2)) @@ -11935,7 +12277,7 @@ func UnsafeApplyVideoAggregatorPadOverrides[Instance VideoAggregatorPad](gclass var preparedFrame *VideoFrame // in, none, converted var goret bool // return - pad = UnsafeVideoAggregatorPadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pad = UnsafeVideoAggregatorPadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) videoaggregator = UnsafeVideoAggregatorFromGlibNone(unsafe.Pointer(carg1)) buffer = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg2)) preparedFrame = UnsafeVideoFrameFromGlibNone(unsafe.Pointer(carg3)) @@ -11961,7 +12303,7 @@ func UnsafeApplyVideoAggregatorPadOverrides[Instance VideoAggregatorPad](gclass var videoaggregator VideoAggregator // in, none, converted var preparedFrame *VideoFrame // in, none, converted - pad = UnsafeVideoAggregatorPadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pad = UnsafeVideoAggregatorPadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) videoaggregator = UnsafeVideoAggregatorFromGlibNone(unsafe.Pointer(carg1)) preparedFrame = UnsafeVideoFrameFromGlibNone(unsafe.Pointer(carg2)) @@ -11981,7 +12323,7 @@ func UnsafeApplyVideoAggregatorPadOverrides[Instance VideoAggregatorPad](gclass var buffer *gst.Buffer // in, none, converted var preparedFrame *VideoFrame // in, none, converted - pad = UnsafeVideoAggregatorPadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pad = UnsafeVideoAggregatorPadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) videoaggregator = UnsafeVideoAggregatorFromGlibNone(unsafe.Pointer(carg1)) buffer = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg2)) preparedFrame = UnsafeVideoFrameFromGlibNone(unsafe.Pointer(carg3)) @@ -11999,7 +12341,7 @@ func UnsafeApplyVideoAggregatorPadOverrides[Instance VideoAggregatorPad](gclass func(carg0 *C.GstVideoAggregatorPad) { var pad Instance // go GstVideoAggregatorPad subclass - pad = UnsafeVideoAggregatorPadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pad = UnsafeVideoAggregatorPadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) overrides.UpdateConversionInfo(pad) }, @@ -12073,6 +12415,11 @@ func UnsafeVideoBufferPoolFromGlibFull(c unsafe.Pointer) VideoBufferPool { return gobject.UnsafeObjectFromGlibFull(c).(VideoBufferPool) } +// UnsafeVideoBufferPoolFromGlibBorrow is used to convert raw GstVideoBufferPool pointers to go without touching any references. This is used by the bindings internally. +func UnsafeVideoBufferPoolFromGlibBorrow(c unsafe.Pointer) VideoBufferPool { + return gobject.UnsafeObjectFromGlibBorrow(c).(VideoBufferPool) +} + func (v *VideoBufferPoolInstance) upcastToGstVideoBufferPool() *VideoBufferPoolInstance { return v } @@ -12283,10 +12630,10 @@ type VideoDecoder interface { // // The function takes the following parameters: // - // - nBytes int: the number of bytes to add + // - nBytes int32: the number of bytes to add // // Removes next @n_bytes of input data and adds it to currently parsed frame. - AddToFrame(int) + AddToFrame(int32) // AllocateOutputBuffer wraps gst_video_decoder_allocate_output_buffer // // The function returns the following values: @@ -12416,20 +12763,20 @@ type VideoDecoder interface { // // The function returns the following values: // - // - goret int - GetEstimateRate() int + // - goret int32 + GetEstimateRate() int32 // GetFrame wraps gst_video_decoder_get_frame // // The function takes the following parameters: // - // - frameNumber int: system_frame_number of a frame + // - frameNumber int32: system_frame_number of a frame // // The function returns the following values: // // - goret *VideoCodecFrame (nullable) // // Get a pending unfinished #GstVideoCodecFrame - GetFrame(int) *VideoCodecFrame + GetFrame(int32) *VideoCodecFrame // GetFrames wraps gst_video_decoder_get_frames // // The function returns the following values: @@ -12482,8 +12829,8 @@ type VideoDecoder interface { // // The function returns the following values: // - // - goret int - GetMaxErrors() int + // - goret int32 + GetMaxErrors() int32 // GetNeedsFormat wraps gst_video_decoder_get_needs_format // // The function returns the following values: @@ -12712,7 +13059,7 @@ type VideoDecoder interface { // // The function takes the following parameters: // - // - num int: max tolerated errors + // - num int32: max tolerated errors // // Sets numbers of tolerated decoder errors, where a tolerated one is then only // warned about, but more than tolerated will lead to fatal error. You can set @@ -12720,7 +13067,7 @@ type VideoDecoder interface { // GST_VIDEO_DECODER_MAX_ERRORS. // // The '-1' option was added in 1.4 - SetMaxErrors(int) + SetMaxErrors(int32) // SetNeedsFormat wraps gst_video_decoder_set_needs_format // // The function takes the following parameters: @@ -12848,6 +13195,11 @@ func UnsafeVideoDecoderFromGlibFull(c unsafe.Pointer) VideoDecoder { return gobject.UnsafeObjectFromGlibFull(c).(VideoDecoder) } +// UnsafeVideoDecoderFromGlibBorrow is used to convert raw GstVideoDecoder pointers to go without touching any references. This is used by the bindings internally. +func UnsafeVideoDecoderFromGlibBorrow(c unsafe.Pointer) VideoDecoder { + return gobject.UnsafeObjectFromGlibBorrow(c).(VideoDecoder) +} + func (v *VideoDecoderInstance) upcastToGstVideoDecoder() *VideoDecoderInstance { return v } @@ -12866,10 +13218,10 @@ func UnsafeVideoDecoderToGlibFull(c VideoDecoder) unsafe.Pointer { // // The function takes the following parameters: // -// - nBytes int: the number of bytes to add +// - nBytes int32: the number of bytes to add // // Removes next @n_bytes of input data and adds it to currently parsed frame. -func (decoder *VideoDecoderInstance) AddToFrame(nBytes int) { +func (decoder *VideoDecoderInstance) AddToFrame(nBytes int32) { var carg0 *C.GstVideoDecoder // in, none, converted var carg1 C.int // in, none, casted, casted C.gint @@ -13177,8 +13529,8 @@ func (decoder *VideoDecoderInstance) GetBufferPool() gst.BufferPool { // // The function returns the following values: // -// - goret int -func (dec *VideoDecoderInstance) GetEstimateRate() int { +// - goret int32 +func (dec *VideoDecoderInstance) GetEstimateRate() int32 { var carg0 *C.GstVideoDecoder // in, none, converted var cret C.gint // return, none, casted @@ -13187,9 +13539,9 @@ func (dec *VideoDecoderInstance) GetEstimateRate() int { cret = C.gst_video_decoder_get_estimate_rate(carg0) runtime.KeepAlive(dec) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -13198,14 +13550,14 @@ func (dec *VideoDecoderInstance) GetEstimateRate() int { // // The function takes the following parameters: // -// - frameNumber int: system_frame_number of a frame +// - frameNumber int32: system_frame_number of a frame // // The function returns the following values: // // - goret *VideoCodecFrame (nullable) // // Get a pending unfinished #GstVideoCodecFrame -func (decoder *VideoDecoderInstance) GetFrame(frameNumber int) *VideoCodecFrame { +func (decoder *VideoDecoderInstance) GetFrame(frameNumber int32) *VideoCodecFrame { var carg0 *C.GstVideoDecoder // in, none, converted var carg1 C.int // in, none, casted, casted C.gint var cret *C.GstVideoCodecFrame // return, full, converted, nullable @@ -13354,8 +13706,8 @@ func (decoder *VideoDecoderInstance) GetMaxDecodeTime(frame *VideoCodecFrame) gs // // The function returns the following values: // -// - goret int -func (dec *VideoDecoderInstance) GetMaxErrors() int { +// - goret int32 +func (dec *VideoDecoderInstance) GetMaxErrors() int32 { var carg0 *C.GstVideoDecoder // in, none, converted var cret C.gint // return, none, casted @@ -13364,9 +13716,9 @@ func (dec *VideoDecoderInstance) GetMaxErrors() int { cret = C.gst_video_decoder_get_max_errors(carg0) runtime.KeepAlive(dec) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -13926,7 +14278,7 @@ func (decoder *VideoDecoderInstance) SetLatency(minLatency gst.ClockTime, maxLat // // The function takes the following parameters: // -// - num int: max tolerated errors +// - num int32: max tolerated errors // // Sets numbers of tolerated decoder errors, where a tolerated one is then only // warned about, but more than tolerated will lead to fatal error. You can set @@ -13934,7 +14286,7 @@ func (decoder *VideoDecoderInstance) SetLatency(minLatency gst.ClockTime, maxLat // GST_VIDEO_DECODER_MAX_ERRORS. // // The '-1' option was added in 1.4 -func (dec *VideoDecoderInstance) SetMaxErrors(num int) { +func (dec *VideoDecoderInstance) SetMaxErrors(num int32) { var carg0 *C.GstVideoDecoder // in, none, converted var carg1 C.gint // in, none, casted @@ -14326,7 +14678,7 @@ func UnsafeApplyVideoDecoderOverrides[Instance VideoDecoder](gclass unsafe.Point var decoder Instance // go GstVideoDecoder subclass var goret bool // return - decoder = UnsafeVideoDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + decoder = UnsafeVideoDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Close(decoder) @@ -14349,7 +14701,7 @@ func UnsafeApplyVideoDecoderOverrides[Instance VideoDecoder](gclass unsafe.Point var query *gst.Query // in, none, converted var goret bool // return - decoder = UnsafeVideoDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + decoder = UnsafeVideoDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.DecideAllocation(decoder, query) @@ -14372,7 +14724,7 @@ func UnsafeApplyVideoDecoderOverrides[Instance VideoDecoder](gclass unsafe.Point var decoder Instance // go GstVideoDecoder subclass var goret gst.FlowReturn // return, none, casted - decoder = UnsafeVideoDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + decoder = UnsafeVideoDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Drain(decoder) @@ -14392,7 +14744,7 @@ func UnsafeApplyVideoDecoderOverrides[Instance VideoDecoder](gclass unsafe.Point var decoder Instance // go GstVideoDecoder subclass var goret gst.FlowReturn // return, none, casted - decoder = UnsafeVideoDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + decoder = UnsafeVideoDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Finish(decoder) @@ -14412,7 +14764,7 @@ func UnsafeApplyVideoDecoderOverrides[Instance VideoDecoder](gclass unsafe.Point var decoder Instance // go GstVideoDecoder subclass var goret bool // return - decoder = UnsafeVideoDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + decoder = UnsafeVideoDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Flush(decoder) @@ -14435,7 +14787,7 @@ func UnsafeApplyVideoDecoderOverrides[Instance VideoDecoder](gclass unsafe.Point var filter *gst.Caps // in, none, converted var goret *gst.Caps // return, full, converted - decoder = UnsafeVideoDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + decoder = UnsafeVideoDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) filter = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Getcaps(decoder, filter) @@ -14457,7 +14809,7 @@ func UnsafeApplyVideoDecoderOverrides[Instance VideoDecoder](gclass unsafe.Point var frame *VideoCodecFrame // in, full, converted var goret gst.FlowReturn // return, none, casted - decoder = UnsafeVideoDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + decoder = UnsafeVideoDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) frame = UnsafeVideoCodecFrameFromGlibFull(unsafe.Pointer(carg1)) goret = overrides.HandleFrame(decoder, frame) @@ -14480,7 +14832,7 @@ func UnsafeApplyVideoDecoderOverrides[Instance VideoDecoder](gclass unsafe.Point var duration gst.ClockTime // in, none, casted, alias var goret bool // return - decoder = UnsafeVideoDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + decoder = UnsafeVideoDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) timestamp = gst.ClockTime(carg1) duration = gst.ClockTime(carg2) @@ -14504,7 +14856,7 @@ func UnsafeApplyVideoDecoderOverrides[Instance VideoDecoder](gclass unsafe.Point var decoder Instance // go GstVideoDecoder subclass var goret bool // return - decoder = UnsafeVideoDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + decoder = UnsafeVideoDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Negotiate(decoder) @@ -14526,7 +14878,7 @@ func UnsafeApplyVideoDecoderOverrides[Instance VideoDecoder](gclass unsafe.Point var decoder Instance // go GstVideoDecoder subclass var goret bool // return - decoder = UnsafeVideoDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + decoder = UnsafeVideoDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Open(decoder) @@ -14551,7 +14903,7 @@ func UnsafeApplyVideoDecoderOverrides[Instance VideoDecoder](gclass unsafe.Point var atEos bool // in var goret gst.FlowReturn // return, none, casted - decoder = UnsafeVideoDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + decoder = UnsafeVideoDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) frame = UnsafeVideoCodecFrameFromGlibNone(unsafe.Pointer(carg1)) adapter = gstbase.UnsafeAdapterFromGlibNone(unsafe.Pointer(carg2)) if carg3 != 0 { @@ -14577,7 +14929,7 @@ func UnsafeApplyVideoDecoderOverrides[Instance VideoDecoder](gclass unsafe.Point var query *gst.Query // in, none, converted var goret bool // return - decoder = UnsafeVideoDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + decoder = UnsafeVideoDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.ProposeAllocation(decoder, query) @@ -14601,7 +14953,7 @@ func UnsafeApplyVideoDecoderOverrides[Instance VideoDecoder](gclass unsafe.Point var hard bool // in var goret bool // return - decoder = UnsafeVideoDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + decoder = UnsafeVideoDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != 0 { hard = true } @@ -14627,7 +14979,7 @@ func UnsafeApplyVideoDecoderOverrides[Instance VideoDecoder](gclass unsafe.Point var state *VideoCodecState // in, none, converted var goret bool // return - decoder = UnsafeVideoDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + decoder = UnsafeVideoDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) state = UnsafeVideoCodecStateFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SetFormat(decoder, state) @@ -14651,7 +15003,7 @@ func UnsafeApplyVideoDecoderOverrides[Instance VideoDecoder](gclass unsafe.Point var event *gst.Event // in, none, converted var goret bool // return - decoder = UnsafeVideoDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + decoder = UnsafeVideoDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = gst.UnsafeEventFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SinkEvent(decoder, event) @@ -14675,7 +15027,7 @@ func UnsafeApplyVideoDecoderOverrides[Instance VideoDecoder](gclass unsafe.Point var query *gst.Query // in, none, converted var goret bool // return - decoder = UnsafeVideoDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + decoder = UnsafeVideoDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SinkQuery(decoder, query) @@ -14699,7 +15051,7 @@ func UnsafeApplyVideoDecoderOverrides[Instance VideoDecoder](gclass unsafe.Point var event *gst.Event // in, none, converted var goret bool // return - decoder = UnsafeVideoDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + decoder = UnsafeVideoDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = gst.UnsafeEventFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SrcEvent(decoder, event) @@ -14723,7 +15075,7 @@ func UnsafeApplyVideoDecoderOverrides[Instance VideoDecoder](gclass unsafe.Point var query *gst.Query // in, none, converted var goret bool // return - decoder = UnsafeVideoDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + decoder = UnsafeVideoDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SrcQuery(decoder, query) @@ -14746,7 +15098,7 @@ func UnsafeApplyVideoDecoderOverrides[Instance VideoDecoder](gclass unsafe.Point var decoder Instance // go GstVideoDecoder subclass var goret bool // return - decoder = UnsafeVideoDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + decoder = UnsafeVideoDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Start(decoder) @@ -14768,7 +15120,7 @@ func UnsafeApplyVideoDecoderOverrides[Instance VideoDecoder](gclass unsafe.Point var decoder Instance // go GstVideoDecoder subclass var goret bool // return - decoder = UnsafeVideoDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + decoder = UnsafeVideoDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Stop(decoder) @@ -14792,7 +15144,7 @@ func UnsafeApplyVideoDecoderOverrides[Instance VideoDecoder](gclass unsafe.Point var meta *gst.Meta // in, none, converted var goret bool // return - decoder = UnsafeVideoDecoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + decoder = UnsafeVideoDecoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) frame = UnsafeVideoCodecFrameFromGlibNone(unsafe.Pointer(carg1)) meta = gst.UnsafeMetaFromGlibNone(unsafe.Pointer(carg2)) @@ -14940,6 +15292,19 @@ type VideoEncoder interface { // The buffer allocated here is owned by the frame and you should only // keep references to the frame, not the buffer. AllocateOutputFrame(*VideoCodecFrame, uint) gst.FlowReturn + // DropFrame wraps gst_video_encoder_drop_frame + // + // The function takes the following parameters: + // + // - frame *VideoCodecFrame: a #GstVideoCodecFrame + // + // Removes @frame from the list of pending frames, releases it + // and posts a QoS message with the frame's details on the bus. + // Similar to calling gst_video_encoder_finish_frame() without a buffer + // attached to @frame, but this function additionally stores events + // from @frame as pending, to be pushed out alongside the next frame + // submitted via gst_video_encoder_finish_frame(). + DropFrame(*VideoCodecFrame) // FinishFrame wraps gst_video_encoder_finish_frame // // The function takes the following parameters: @@ -14956,6 +15321,10 @@ type VideoEncoder interface { // It is subsequently pushed downstream or provided to @pre_push. // In any case, the frame is considered finished and released. // + // If @frame does not have a buffer attached, it will be dropped, and + // a QoS message will be posted on the bus. Events from @frame will be + // pushed out immediately. + // // After calling this function the output buffer of the frame is to be // considered read-only. This function will also change the metadata // of the buffer. @@ -14998,14 +15367,14 @@ type VideoEncoder interface { // // The function takes the following parameters: // - // - frameNumber int: system_frame_number of a frame + // - frameNumber int32: system_frame_number of a frame // // The function returns the following values: // // - goret *VideoCodecFrame (nullable) // // Get a pending unfinished #GstVideoCodecFrame - GetFrame(int) *VideoCodecFrame + GetFrame(int32) *VideoCodecFrame // GetFrames wraps gst_video_encoder_get_frames // // The function returns the following values: @@ -15120,6 +15489,17 @@ type VideoEncoder interface { // restricted to resolution/format/... combinations supported by downstream // elements (e.g. muxers). ProxyGetcaps(*gst.Caps, *gst.Caps) *gst.Caps + // ReleaseFrame wraps gst_video_encoder_release_frame + // + // The function takes the following parameters: + // + // - frame *VideoCodecFrame: a #GstVideoCodecFrame + // + // Removes @frame from list of pending frames and releases it, similar + // to calling gst_video_encoder_finish_frame() without a buffer attached + // to the frame, but does not post a QoS message or do any additional + // processing. Events from @frame are moved to the pending events list. + ReleaseFrame(*VideoCodecFrame) // SetLatency wraps gst_video_encoder_set_latency // // The function takes the following parameters: @@ -15221,6 +15601,11 @@ func UnsafeVideoEncoderFromGlibFull(c unsafe.Pointer) VideoEncoder { return gobject.UnsafeObjectFromGlibFull(c).(VideoEncoder) } +// UnsafeVideoEncoderFromGlibBorrow is used to convert raw GstVideoEncoder pointers to go without touching any references. This is used by the bindings internally. +func UnsafeVideoEncoderFromGlibBorrow(c unsafe.Pointer) VideoEncoder { + return gobject.UnsafeObjectFromGlibBorrow(c).(VideoEncoder) +} + func (v *VideoEncoderInstance) upcastToGstVideoEncoder() *VideoEncoderInstance { return v } @@ -15305,6 +15690,30 @@ func (encoder *VideoEncoderInstance) AllocateOutputFrame(frame *VideoCodecFrame, return goret } +// DropFrame wraps gst_video_encoder_drop_frame +// +// The function takes the following parameters: +// +// - frame *VideoCodecFrame: a #GstVideoCodecFrame +// +// Removes @frame from the list of pending frames, releases it +// and posts a QoS message with the frame's details on the bus. +// Similar to calling gst_video_encoder_finish_frame() without a buffer +// attached to @frame, but this function additionally stores events +// from @frame as pending, to be pushed out alongside the next frame +// submitted via gst_video_encoder_finish_frame(). +func (encoder *VideoEncoderInstance) DropFrame(frame *VideoCodecFrame) { + var carg0 *C.GstVideoEncoder // in, none, converted + var carg1 *C.GstVideoCodecFrame // in, full, converted + + carg0 = (*C.GstVideoEncoder)(UnsafeVideoEncoderToGlibNone(encoder)) + carg1 = (*C.GstVideoCodecFrame)(UnsafeVideoCodecFrameToGlibFull(frame)) + + C.gst_video_encoder_drop_frame(carg0, carg1) + runtime.KeepAlive(encoder) + runtime.KeepAlive(frame) +} + // FinishFrame wraps gst_video_encoder_finish_frame // // The function takes the following parameters: @@ -15321,6 +15730,10 @@ func (encoder *VideoEncoderInstance) AllocateOutputFrame(frame *VideoCodecFrame, // It is subsequently pushed downstream or provided to @pre_push. // In any case, the frame is considered finished and released. // +// If @frame does not have a buffer attached, it will be dropped, and +// a QoS message will be posted on the bus. Events from @frame will be +// pushed out immediately. +// // After calling this function the output buffer of the frame is to be // considered read-only. This function will also change the metadata // of the buffer. @@ -15421,14 +15834,14 @@ func (encoder *VideoEncoderInstance) GetAllocator() (gst.Allocator, gst.Allocati // // The function takes the following parameters: // -// - frameNumber int: system_frame_number of a frame +// - frameNumber int32: system_frame_number of a frame // // The function returns the following values: // // - goret *VideoCodecFrame (nullable) // // Get a pending unfinished #GstVideoCodecFrame -func (encoder *VideoEncoderInstance) GetFrame(frameNumber int) *VideoCodecFrame { +func (encoder *VideoEncoderInstance) GetFrame(frameNumber int32) *VideoCodecFrame { var carg0 *C.GstVideoEncoder // in, none, converted var carg1 C.int // in, none, casted, casted C.gint var cret *C.GstVideoCodecFrame // return, full, converted, nullable @@ -15745,6 +16158,28 @@ func (enc *VideoEncoderInstance) ProxyGetcaps(caps *gst.Caps, filter *gst.Caps) return goret } +// ReleaseFrame wraps gst_video_encoder_release_frame +// +// The function takes the following parameters: +// +// - frame *VideoCodecFrame: a #GstVideoCodecFrame +// +// Removes @frame from list of pending frames and releases it, similar +// to calling gst_video_encoder_finish_frame() without a buffer attached +// to the frame, but does not post a QoS message or do any additional +// processing. Events from @frame are moved to the pending events list. +func (encoder *VideoEncoderInstance) ReleaseFrame(frame *VideoCodecFrame) { + var carg0 *C.GstVideoEncoder // in, none, converted + var carg1 *C.GstVideoCodecFrame // in, full, converted + + carg0 = (*C.GstVideoEncoder)(UnsafeVideoEncoderToGlibNone(encoder)) + carg1 = (*C.GstVideoCodecFrame)(UnsafeVideoCodecFrameToGlibFull(frame)) + + C.gst_video_encoder_release_frame(carg0, carg1) + runtime.KeepAlive(encoder) + runtime.KeepAlive(frame) +} + // SetLatency wraps gst_video_encoder_set_latency // // The function takes the following parameters: @@ -16057,7 +16492,7 @@ func UnsafeApplyVideoEncoderOverrides[Instance VideoEncoder](gclass unsafe.Point var encoder Instance // go GstVideoEncoder subclass var goret bool // return - encoder = UnsafeVideoEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + encoder = UnsafeVideoEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Close(encoder) @@ -16080,7 +16515,7 @@ func UnsafeApplyVideoEncoderOverrides[Instance VideoEncoder](gclass unsafe.Point var query *gst.Query // in, none, converted var goret bool // return - encoder = UnsafeVideoEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + encoder = UnsafeVideoEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.DecideAllocation(encoder, query) @@ -16103,7 +16538,7 @@ func UnsafeApplyVideoEncoderOverrides[Instance VideoEncoder](gclass unsafe.Point var encoder Instance // go GstVideoEncoder subclass var goret gst.FlowReturn // return, none, casted - encoder = UnsafeVideoEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + encoder = UnsafeVideoEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Finish(encoder) @@ -16123,7 +16558,7 @@ func UnsafeApplyVideoEncoderOverrides[Instance VideoEncoder](gclass unsafe.Point var encoder Instance // go GstVideoEncoder subclass var goret bool // return - encoder = UnsafeVideoEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + encoder = UnsafeVideoEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Flush(encoder) @@ -16146,7 +16581,7 @@ func UnsafeApplyVideoEncoderOverrides[Instance VideoEncoder](gclass unsafe.Point var filter *gst.Caps // in, none, converted var goret *gst.Caps // return, full, converted - enc = UnsafeVideoEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + enc = UnsafeVideoEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) filter = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.Getcaps(enc, filter) @@ -16168,7 +16603,7 @@ func UnsafeApplyVideoEncoderOverrides[Instance VideoEncoder](gclass unsafe.Point var frame *VideoCodecFrame // in, none, converted var goret gst.FlowReturn // return, none, casted - encoder = UnsafeVideoEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + encoder = UnsafeVideoEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) frame = UnsafeVideoCodecFrameFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.HandleFrame(encoder, frame) @@ -16189,7 +16624,7 @@ func UnsafeApplyVideoEncoderOverrides[Instance VideoEncoder](gclass unsafe.Point var encoder Instance // go GstVideoEncoder subclass var goret bool // return - encoder = UnsafeVideoEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + encoder = UnsafeVideoEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Negotiate(encoder) @@ -16211,7 +16646,7 @@ func UnsafeApplyVideoEncoderOverrides[Instance VideoEncoder](gclass unsafe.Point var encoder Instance // go GstVideoEncoder subclass var goret bool // return - encoder = UnsafeVideoEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + encoder = UnsafeVideoEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Open(encoder) @@ -16234,7 +16669,7 @@ func UnsafeApplyVideoEncoderOverrides[Instance VideoEncoder](gclass unsafe.Point var frame *VideoCodecFrame // in, none, converted var goret gst.FlowReturn // return, none, casted - encoder = UnsafeVideoEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + encoder = UnsafeVideoEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) frame = UnsafeVideoCodecFrameFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.PrePush(encoder, frame) @@ -16256,7 +16691,7 @@ func UnsafeApplyVideoEncoderOverrides[Instance VideoEncoder](gclass unsafe.Point var query *gst.Query // in, none, converted var goret bool // return - encoder = UnsafeVideoEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + encoder = UnsafeVideoEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.ProposeAllocation(encoder, query) @@ -16280,7 +16715,7 @@ func UnsafeApplyVideoEncoderOverrides[Instance VideoEncoder](gclass unsafe.Point var hard bool // in var goret bool // return - encoder = UnsafeVideoEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + encoder = UnsafeVideoEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != 0 { hard = true } @@ -16306,7 +16741,7 @@ func UnsafeApplyVideoEncoderOverrides[Instance VideoEncoder](gclass unsafe.Point var state *VideoCodecState // in, none, converted var goret bool // return - encoder = UnsafeVideoEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + encoder = UnsafeVideoEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) state = UnsafeVideoCodecStateFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SetFormat(encoder, state) @@ -16330,7 +16765,7 @@ func UnsafeApplyVideoEncoderOverrides[Instance VideoEncoder](gclass unsafe.Point var event *gst.Event // in, none, converted var goret bool // return - encoder = UnsafeVideoEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + encoder = UnsafeVideoEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = gst.UnsafeEventFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SinkEvent(encoder, event) @@ -16354,7 +16789,7 @@ func UnsafeApplyVideoEncoderOverrides[Instance VideoEncoder](gclass unsafe.Point var query *gst.Query // in, none, converted var goret bool // return - encoder = UnsafeVideoEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + encoder = UnsafeVideoEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SinkQuery(encoder, query) @@ -16378,7 +16813,7 @@ func UnsafeApplyVideoEncoderOverrides[Instance VideoEncoder](gclass unsafe.Point var event *gst.Event // in, none, converted var goret bool // return - encoder = UnsafeVideoEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + encoder = UnsafeVideoEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) event = gst.UnsafeEventFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SrcEvent(encoder, event) @@ -16402,7 +16837,7 @@ func UnsafeApplyVideoEncoderOverrides[Instance VideoEncoder](gclass unsafe.Point var query *gst.Query // in, none, converted var goret bool // return - encoder = UnsafeVideoEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + encoder = UnsafeVideoEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) query = gst.UnsafeQueryFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.SrcQuery(encoder, query) @@ -16425,7 +16860,7 @@ func UnsafeApplyVideoEncoderOverrides[Instance VideoEncoder](gclass unsafe.Point var encoder Instance // go GstVideoEncoder subclass var goret bool // return - encoder = UnsafeVideoEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + encoder = UnsafeVideoEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Start(encoder) @@ -16447,7 +16882,7 @@ func UnsafeApplyVideoEncoderOverrides[Instance VideoEncoder](gclass unsafe.Point var encoder Instance // go GstVideoEncoder subclass var goret bool // return - encoder = UnsafeVideoEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + encoder = UnsafeVideoEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.Stop(encoder) @@ -16471,7 +16906,7 @@ func UnsafeApplyVideoEncoderOverrides[Instance VideoEncoder](gclass unsafe.Point var meta *gst.Meta // in, none, converted var goret bool // return - encoder = UnsafeVideoEncoderFromGlibNone(unsafe.Pointer(carg0)).(Instance) + encoder = UnsafeVideoEncoderFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) frame = UnsafeVideoCodecFrameFromGlibNone(unsafe.Pointer(carg1)) meta = gst.UnsafeMetaFromGlibNone(unsafe.Pointer(carg2)) @@ -16560,6 +16995,11 @@ func UnsafeVideoFilterFromGlibFull(c unsafe.Pointer) VideoFilter { return gobject.UnsafeObjectFromGlibFull(c).(VideoFilter) } +// UnsafeVideoFilterFromGlibBorrow is used to convert raw GstVideoFilter pointers to go without touching any references. This is used by the bindings internally. +func UnsafeVideoFilterFromGlibBorrow(c unsafe.Pointer) VideoFilter { + return gobject.UnsafeObjectFromGlibBorrow(c).(VideoFilter) +} + func (v *VideoFilterInstance) upcastToGstVideoFilter() *VideoFilterInstance { return v } @@ -16633,7 +17073,7 @@ func UnsafeApplyVideoFilterOverrides[Instance VideoFilter](gclass unsafe.Pointer var outInfo *VideoInfo // in, none, converted var goret bool // return - filter = UnsafeVideoFilterFromGlibNone(unsafe.Pointer(carg0)).(Instance) + filter = UnsafeVideoFilterFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) incaps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) inInfo = UnsafeVideoInfoFromGlibNone(unsafe.Pointer(carg2)) outcaps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg3)) @@ -16661,7 +17101,7 @@ func UnsafeApplyVideoFilterOverrides[Instance VideoFilter](gclass unsafe.Pointer var outframe *VideoFrame // in, none, converted var goret gst.FlowReturn // return, none, casted - filter = UnsafeVideoFilterFromGlibNone(unsafe.Pointer(carg0)).(Instance) + filter = UnsafeVideoFilterFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) inframe = UnsafeVideoFrameFromGlibNone(unsafe.Pointer(carg1)) outframe = UnsafeVideoFrameFromGlibNone(unsafe.Pointer(carg2)) @@ -16684,7 +17124,7 @@ func UnsafeApplyVideoFilterOverrides[Instance VideoFilter](gclass unsafe.Pointer var frame *VideoFrame // in, none, converted var goret gst.FlowReturn // return, none, casted - trans = UnsafeVideoFilterFromGlibNone(unsafe.Pointer(carg0)).(Instance) + trans = UnsafeVideoFilterFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) frame = UnsafeVideoFrameFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.TransformFrameIP(trans, frame) @@ -16771,6 +17211,11 @@ func UnsafeVideoSinkFromGlibFull(c unsafe.Pointer) VideoSink { return gobject.UnsafeObjectFromGlibFull(c).(VideoSink) } +// UnsafeVideoSinkFromGlibBorrow is used to convert raw GstVideoSink pointers to go without touching any references. This is used by the bindings internally. +func UnsafeVideoSinkFromGlibBorrow(c unsafe.Pointer) VideoSink { + return gobject.UnsafeObjectFromGlibBorrow(c).(VideoSink) +} + func (v *VideoSinkInstance) upcastToGstVideoSink() *VideoSinkInstance { return v } @@ -16874,7 +17319,7 @@ func UnsafeApplyVideoSinkOverrides[Instance VideoSink](gclass unsafe.Pointer, ov var info *VideoInfo // in, none, converted var goret bool // return - videoSink = UnsafeVideoSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + videoSink = UnsafeVideoSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) caps = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(carg1)) info = UnsafeVideoInfoFromGlibNone(unsafe.Pointer(carg2)) @@ -16899,7 +17344,7 @@ func UnsafeApplyVideoSinkOverrides[Instance VideoSink](gclass unsafe.Pointer, ov var buf *gst.Buffer // in, none, converted var goret gst.FlowReturn // return, none, casted - videoSink = UnsafeVideoSinkFromGlibNone(unsafe.Pointer(carg0)).(Instance) + videoSink = UnsafeVideoSinkFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) buf = gst.UnsafeBufferFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.ShowFrame(videoSink, buf) @@ -16992,6 +17437,11 @@ func UnsafeVideoAggregatorConvertPadFromGlibFull(c unsafe.Pointer) VideoAggregat return gobject.UnsafeObjectFromGlibFull(c).(VideoAggregatorConvertPad) } +// UnsafeVideoAggregatorConvertPadFromGlibBorrow is used to convert raw GstVideoAggregatorConvertPad pointers to go without touching any references. This is used by the bindings internally. +func UnsafeVideoAggregatorConvertPadFromGlibBorrow(c unsafe.Pointer) VideoAggregatorConvertPad { + return gobject.UnsafeObjectFromGlibBorrow(c).(VideoAggregatorConvertPad) +} + func (v *VideoAggregatorConvertPadInstance) upcastToGstVideoAggregatorConvertPad() *VideoAggregatorConvertPadInstance { return v } @@ -17050,7 +17500,7 @@ func UnsafeApplyVideoAggregatorConvertPadOverrides[Instance VideoAggregatorConve var agg VideoAggregator // in, none, converted var conversionInfo *VideoInfo // in, none, converted - pad = UnsafeVideoAggregatorConvertPadFromGlibNone(unsafe.Pointer(carg0)).(Instance) + pad = UnsafeVideoAggregatorConvertPadFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) agg = UnsafeVideoAggregatorFromGlibNone(unsafe.Pointer(carg1)) conversionInfo = UnsafeVideoInfoFromGlibNone(unsafe.Pointer(carg2)) @@ -17136,6 +17586,11 @@ func UnsafeVideoAggregatorParallelConvertPadFromGlibFull(c unsafe.Pointer) Video return gobject.UnsafeObjectFromGlibFull(c).(VideoAggregatorParallelConvertPad) } +// UnsafeVideoAggregatorParallelConvertPadFromGlibBorrow is used to convert raw GstVideoAggregatorParallelConvertPad pointers to go without touching any references. This is used by the bindings internally. +func UnsafeVideoAggregatorParallelConvertPadFromGlibBorrow(c unsafe.Pointer) VideoAggregatorParallelConvertPad { + return gobject.UnsafeObjectFromGlibBorrow(c).(VideoAggregatorParallelConvertPad) +} + func (v *VideoAggregatorParallelConvertPadInstance) upcastToGstVideoAggregatorParallelConvertPad() *VideoAggregatorParallelConvertPadInstance { return v } @@ -18311,8 +18766,11 @@ func marshalVideoCodecFrame(p unsafe.Pointer) (interface{}, error) { return UnsafeVideoCodecFrameFromGlibBorrow(b), nil } -func (r *VideoCodecFrame) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoCodecFrame) +func (r *VideoCodecFrame) GoValueType() gobject.Type { + return TypeVideoCodecFrame +} + +func (r *VideoCodecFrame) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -18401,8 +18859,11 @@ func marshalVideoCodecState(p unsafe.Pointer) (interface{}, error) { return UnsafeVideoCodecStateFromGlibBorrow(b), nil } -func (r *VideoCodecState) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoCodecState) +func (r *VideoCodecState) GoValueType() gobject.Type { + return TypeVideoCodecState +} + +func (r *VideoCodecState) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -19599,12 +20060,12 @@ func UnsafeVideoFormatInfoToGlibFull(v *VideoFormatInfo) unsafe.Pointer { // // The function returns the following values: // -// - components int: array used to store component numbers +// - components int32: array used to store component numbers // // Fill @components with the number of all the components packed in plane @p // for the format @info. A value of -1 in @components indicates that no more // components are packed in the plane. -func (info *VideoFormatInfo) Component(plane uint) int { +func (info *VideoFormatInfo) Component(plane uint) int32 { var carg0 *C.GstVideoFormatInfo // in, none, converted var carg1 C.guint // in, none, casted var carg2 C.gint // out, full, casted @@ -19616,9 +20077,9 @@ func (info *VideoFormatInfo) Component(plane uint) int { runtime.KeepAlive(info) runtime.KeepAlive(plane) - var components int + var components int32 - components = int(carg2) + components = int32(carg2) return components } @@ -19627,16 +20088,16 @@ func (info *VideoFormatInfo) Component(plane uint) int { // // The function takes the following parameters: // -// - plane int: a plane number -// - stride int: The fist plane stride +// - plane int32: a plane number +// - stride int32: The fist plane stride // // The function returns the following values: // -// - goret int +// - goret int32 // // Extrapolate @plane stride from the first stride of an image. This helper is // useful to support legacy API were only one stride is supported. -func (finfo *VideoFormatInfo) ExtrapolateStride(plane int, stride int) int { +func (finfo *VideoFormatInfo) ExtrapolateStride(plane int32, stride int32) int32 { var carg0 *C.GstVideoFormatInfo // in, none, converted var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted @@ -19651,9 +20112,9 @@ func (finfo *VideoFormatInfo) ExtrapolateStride(plane int, stride int) int { runtime.KeepAlive(plane) runtime.KeepAlive(stride) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -19812,7 +20273,7 @@ func VideoFrameMap(info *VideoInfo, buffer *gst.Buffer, flags gst.MapFlags) (Vid // // - info *VideoInfo: a #GstVideoInfo // - buffer *gst.Buffer: the buffer to map -// - id int: the frame id to map +// - id int32: the frame id to map // - flags gst.MapFlags: #GstMapFlags // // The function returns the following values: @@ -19828,7 +20289,7 @@ func VideoFrameMap(info *VideoInfo, buffer *gst.Buffer, flags gst.MapFlags) (Vid // // All video planes of @buffer will be mapped and the pointers will be set in // @frame->data. -func VideoFrameMapID(info *VideoInfo, buffer *gst.Buffer, id int, flags gst.MapFlags) (VideoFrame, bool) { +func VideoFrameMapID(info *VideoInfo, buffer *gst.Buffer, id int32, flags gst.MapFlags) (VideoFrame, bool) { var carg2 *C.GstVideoInfo // in, none, converted var carg3 *C.GstBuffer // in, none, converted var carg4 C.gint // in, none, casted @@ -20087,8 +20548,11 @@ func marshalVideoInfo(p unsafe.Pointer) (interface{}, error) { return UnsafeVideoInfoFromGlibBorrow(b), nil } -func (r *VideoInfo) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoInfo) +func (r *VideoInfo) GoValueType() gobject.Type { + return TypeVideoInfo +} + +func (r *VideoInfo) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -20563,8 +21027,11 @@ func marshalVideoInfoDmaDrm(p unsafe.Pointer) (interface{}, error) { return UnsafeVideoInfoDmaDrmFromGlibBorrow(b), nil } -func (r *VideoInfoDmaDrm) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoInfoDmaDrm) +func (r *VideoInfoDmaDrm) GoValueType() gobject.Type { + return TypeVideoInfoDmaDrm +} + +func (r *VideoInfoDmaDrm) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -21143,8 +21610,12 @@ func UnsafeVideoMasteringDisplayInfoCoordinatesToGlibFull(v *VideoMasteringDispl // - padding-bottom (uint): extra pixels on the bottom // - padding-left (uint): extra pixels on the left side // - padding-right (uint): extra pixels on the right side -// The padding fields have the same semantic as #GstVideoMeta.alignment -// and so represent the paddings requested on produced video buffers. +// - stride-align0 (uint): stride align requirements for plane 0 +// - stride-align1 (uint): stride align requirements for plane 1 +// - stride-align2 (uint): stride align requirements for plane 2 +// - stride-align3 (uint): stride align requirements for plane 3 +// The padding and stride-align fields have the same semantic as #GstVideoMeta.alignment +// and so represent the paddings and stride-align requested on produced video buffers. // // Since 1.24 it can be serialized using gst_meta_serialize() and // gst_meta_deserialize(). @@ -21447,8 +21918,11 @@ func marshalVideoOverlayComposition(p unsafe.Pointer) (interface{}, error) { return UnsafeVideoOverlayCompositionFromGlibBorrow(b), nil } -func (r *VideoOverlayComposition) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoOverlayComposition) +func (r *VideoOverlayComposition) GoValueType() gobject.Type { + return TypeVideoOverlayComposition +} + +func (r *VideoOverlayComposition) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -21893,8 +22367,11 @@ func marshalVideoOverlayRectangle(p unsafe.Pointer) (interface{}, error) { return UnsafeVideoOverlayRectangleFromGlibBorrow(b), nil } -func (r *VideoOverlayRectangle) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoOverlayRectangle) +func (r *VideoOverlayRectangle) GoValueType() gobject.Type { + return TypeVideoOverlayRectangle +} + +func (r *VideoOverlayRectangle) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -21954,9 +22431,9 @@ func UnsafeVideoOverlayRectangleToGlibFull(v *VideoOverlayRectangle) unsafe.Poin // The function takes the following parameters: // // - pixels *gst.Buffer: a #GstBuffer pointing to the pixel memory -// - renderX int: the X co-ordinate on the video where the top-left corner of this +// - renderX int32: the X co-ordinate on the video where the top-left corner of this // overlay rectangle should be rendered to -// - renderY int: the Y co-ordinate on the video where the top-left corner of this +// - renderY int32: the Y co-ordinate on the video where the top-left corner of this // overlay rectangle should be rendered to // - renderWidth uint: the render width of this rectangle on the video // - renderHeight uint: the render height of this rectangle on the video @@ -21977,7 +22454,7 @@ func UnsafeVideoOverlayRectangleToGlibFull(v *VideoOverlayRectangle) unsafe.Poin // non-premultiplied. This is the format that is used by most hardware, // and also many rendering libraries such as Cairo, for example. // The pixel data buffer must have #GstVideoMeta set. -func NewVideoOverlayRectangleRaw(pixels *gst.Buffer, renderX int, renderY int, renderWidth uint, renderHeight uint, flags VideoOverlayFormatFlags) *VideoOverlayRectangle { +func NewVideoOverlayRectangleRaw(pixels *gst.Buffer, renderX int32, renderY int32, renderWidth uint, renderHeight uint, flags VideoOverlayFormatFlags) *VideoOverlayRectangle { var carg1 *C.GstBuffer // in, none, converted var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted @@ -22295,15 +22772,15 @@ func (rectangle *VideoOverlayRectangle) GetPixelsUnscaledRaw(flags VideoOverlayF // // The function returns the following values: // -// - renderX int: address where to store the X render offset -// - renderY int: address where to store the Y render offset +// - renderX int32: address where to store the X render offset +// - renderY int32: address where to store the Y render offset // - renderWidth uint: address where to store the render width // - renderHeight uint: address where to store the render height // - goret bool // // Retrieves the render position and render dimension of the overlay // rectangle on the video. -func (rectangle *VideoOverlayRectangle) GetRenderRectangle() (int, int, uint, uint, bool) { +func (rectangle *VideoOverlayRectangle) GetRenderRectangle() (int32, int32, uint, uint, bool) { var carg0 *C.GstVideoOverlayRectangle // in, none, converted var carg1 C.gint // out, full, casted var carg2 C.gint // out, full, casted @@ -22316,14 +22793,14 @@ func (rectangle *VideoOverlayRectangle) GetRenderRectangle() (int, int, uint, ui cret = C.gst_video_overlay_rectangle_get_render_rectangle(carg0, &carg1, &carg2, &carg3, &carg4) runtime.KeepAlive(rectangle) - var renderX int - var renderY int + var renderX int32 + var renderY int32 var renderWidth uint var renderHeight uint var goret bool - renderX = int(carg1) - renderY = int(carg2) + renderX = int32(carg1) + renderY = int32(carg2) renderWidth = uint(carg3) renderHeight = uint(carg4) if cret != 0 { @@ -22399,8 +22876,8 @@ func (rectangle *VideoOverlayRectangle) SetGlobalAlpha(globalAlpha float32) { // // The function takes the following parameters: // -// - renderX int: render X position of rectangle on video -// - renderY int: render Y position of rectangle on video +// - renderX int32: render X position of rectangle on video +// - renderY int32: render Y position of rectangle on video // - renderWidth uint: render width of rectangle // - renderHeight uint: render height of rectangle // @@ -22413,7 +22890,7 @@ func (rectangle *VideoOverlayRectangle) SetGlobalAlpha(globalAlpha float32) { // make the rectangles inside a #GstVideoOverlayComposition writable using // gst_video_overlay_composition_make_writable() or // gst_video_overlay_composition_copy(). -func (rectangle *VideoOverlayRectangle) SetRenderRectangle(renderX int, renderY int, renderWidth uint, renderHeight uint) { +func (rectangle *VideoOverlayRectangle) SetRenderRectangle(renderX int32, renderY int32, renderWidth uint, renderHeight uint) { var carg0 *C.GstVideoOverlayRectangle // in, none, converted var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted @@ -23439,12 +23916,12 @@ func (tc *VideoTimeCode) Clear() { // // The function returns the following values: // -// - goret int +// - goret int32 // // Compares @tc1 and @tc2. If both have latest daily jam information, it is // taken into account. Otherwise, it is assumed that the daily jam of both // @tc1 and @tc2 was at the same time. Both time codes must be valid. -func (tc1 *VideoTimeCode) Compare(tc2 *VideoTimeCode) int { +func (tc1 *VideoTimeCode) Compare(tc2 *VideoTimeCode) int32 { var carg0 *C.GstVideoTimeCode // in, none, converted var carg1 *C.GstVideoTimeCode // in, none, converted var cret C.gint // return, none, casted @@ -23456,9 +23933,9 @@ func (tc1 *VideoTimeCode) Compare(tc2 *VideoTimeCode) int { runtime.KeepAlive(tc1) runtime.KeepAlive(tc2) - var goret int + var goret int32 - goret = int(cret) + goret = int32(cret) return goret } @@ -23840,8 +24317,11 @@ func marshalVideoTimeCodeInterval(p unsafe.Pointer) (interface{}, error) { return UnsafeVideoTimeCodeIntervalFromGlibBorrow(b), nil } -func (r *VideoTimeCodeInterval) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoTimeCodeInterval) +func (r *VideoTimeCodeInterval) GoValueType() gobject.Type { + return TypeVideoTimeCodeInterval +} + +func (r *VideoTimeCodeInterval) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -24130,8 +24610,11 @@ func marshalVideoVBIEncoder(p unsafe.Pointer) (interface{}, error) { return UnsafeVideoVBIEncoderFromGlibBorrow(b), nil } -func (r *VideoVBIEncoder) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoVBIEncoder) +func (r *VideoVBIEncoder) GoValueType() gobject.Type { + return TypeVideoVBIEncoder +} + +func (r *VideoVBIEncoder) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -24334,8 +24817,11 @@ func marshalVideoVBIParser(p unsafe.Pointer) (interface{}, error) { return UnsafeVideoVBIParserFromGlibBorrow(b), nil } -func (r *VideoVBIParser) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoVBIParser) +func (r *VideoVBIParser) GoValueType() gobject.Type { + return TypeVideoVBIParser +} + +func (r *VideoVBIParser) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } diff --git a/pkg/gstwebrtc/gstwebrtc.gen.go b/pkg/gstwebrtc/gstwebrtc.gen.go index 387eff0..1207022 100644 --- a/pkg/gstwebrtc/gstwebrtc.gen.go +++ b/pkg/gstwebrtc/gstwebrtc.gen.go @@ -213,8 +213,11 @@ func marshalWebRTCBundlePolicy(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = WebRTCBundlePolicy(0) -func (e WebRTCBundlePolicy) InitGoValue(v *gobject.Value) { - v.Init(TypeWebRTCBundlePolicy) +func (e WebRTCBundlePolicy) GoValueType() gobject.Type { + return TypeWebRTCBundlePolicy +} + +func (e WebRTCBundlePolicy) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -256,8 +259,11 @@ func marshalWebRTCDTLSSetup(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = WebRTCDTLSSetup(0) -func (e WebRTCDTLSSetup) InitGoValue(v *gobject.Value) { - v.Init(TypeWebRTCDTLSSetup) +func (e WebRTCDTLSSetup) GoValueType() gobject.Type { + return TypeWebRTCDTLSSetup +} + +func (e WebRTCDTLSSetup) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -303,8 +309,11 @@ func marshalWebRTCDTLSTransportState(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = WebRTCDTLSTransportState(0) -func (e WebRTCDTLSTransportState) InitGoValue(v *gobject.Value) { - v.Init(TypeWebRTCDTLSTransportState) +func (e WebRTCDTLSTransportState) GoValueType() gobject.Type { + return TypeWebRTCDTLSTransportState +} + +func (e WebRTCDTLSTransportState) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -349,8 +358,11 @@ func marshalWebRTCDataChannelState(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = WebRTCDataChannelState(0) -func (e WebRTCDataChannelState) InitGoValue(v *gobject.Value) { - v.Init(TypeWebRTCDataChannelState) +func (e WebRTCDataChannelState) GoValueType() gobject.Type { + return TypeWebRTCDataChannelState +} + +func (e WebRTCDataChannelState) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -422,8 +434,11 @@ func marshalWebRTCError(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = WebRTCError(0) -func (e WebRTCError) InitGoValue(v *gobject.Value) { - v.Init(TypeWebRTCError) +func (e WebRTCError) GoValueType() gobject.Type { + return TypeWebRTCError +} + +func (e WebRTCError) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -481,8 +496,11 @@ func marshalWebRTCFECType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = WebRTCFECType(0) -func (e WebRTCFECType) InitGoValue(v *gobject.Value) { - v.Init(TypeWebRTCFECType) +func (e WebRTCFECType) GoValueType() gobject.Type { + return TypeWebRTCFECType +} + +func (e WebRTCFECType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -514,8 +532,11 @@ func marshalWebRTCICEComponent(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = WebRTCICEComponent(0) -func (e WebRTCICEComponent) InitGoValue(v *gobject.Value) { - v.Init(TypeWebRTCICEComponent) +func (e WebRTCICEComponent) GoValueType() gobject.Type { + return TypeWebRTCICEComponent +} + +func (e WebRTCICEComponent) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -569,8 +590,11 @@ func marshalWebRTCICEConnectionState(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = WebRTCICEConnectionState(0) -func (e WebRTCICEConnectionState) InitGoValue(v *gobject.Value) { - v.Init(TypeWebRTCICEConnectionState) +func (e WebRTCICEConnectionState) GoValueType() gobject.Type { + return TypeWebRTCICEConnectionState +} + +func (e WebRTCICEConnectionState) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -613,8 +637,11 @@ func marshalWebRTCICEGatheringState(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = WebRTCICEGatheringState(0) -func (e WebRTCICEGatheringState) InitGoValue(v *gobject.Value) { - v.Init(TypeWebRTCICEGatheringState) +func (e WebRTCICEGatheringState) GoValueType() gobject.Type { + return TypeWebRTCICEGatheringState +} + +func (e WebRTCICEGatheringState) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -647,8 +674,11 @@ func marshalWebRTCICERole(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = WebRTCICERole(0) -func (e WebRTCICERole) InitGoValue(v *gobject.Value) { - v.Init(TypeWebRTCICERole) +func (e WebRTCICERole) GoValueType() gobject.Type { + return TypeWebRTCICERole +} + +func (e WebRTCICERole) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -683,8 +713,11 @@ func marshalWebRTCICETransportPolicy(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = WebRTCICETransportPolicy(0) -func (e WebRTCICETransportPolicy) InitGoValue(v *gobject.Value) { - v.Init(TypeWebRTCICETransportPolicy) +func (e WebRTCICETransportPolicy) GoValueType() gobject.Type { + return TypeWebRTCICETransportPolicy +} + +func (e WebRTCICETransportPolicy) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -712,7 +745,7 @@ const ( WebrtcKindAudio WebRTCKind = 1 // WebrtcKindVideo wraps GST_WEBRTC_KIND_VIDEO // - // Kind is audio + // Kind is video WebrtcKindVideo WebRTCKind = 2 ) @@ -722,8 +755,11 @@ func marshalWebRTCKind(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = WebRTCKind(0) -func (e WebRTCKind) InitGoValue(v *gobject.Value) { - v.Init(TypeWebRTCKind) +func (e WebRTCKind) GoValueType() gobject.Type { + return TypeWebRTCKind +} + +func (e WebRTCKind) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -774,8 +810,11 @@ func marshalWebRTCPeerConnectionState(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = WebRTCPeerConnectionState(0) -func (e WebRTCPeerConnectionState) InitGoValue(v *gobject.Value) { - v.Init(TypeWebRTCPeerConnectionState) +func (e WebRTCPeerConnectionState) GoValueType() gobject.Type { + return TypeWebRTCPeerConnectionState +} + +func (e WebRTCPeerConnectionState) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -821,8 +860,11 @@ func marshalWebRTCPriorityType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = WebRTCPriorityType(0) -func (e WebRTCPriorityType) InitGoValue(v *gobject.Value) { - v.Init(TypeWebRTCPriorityType) +func (e WebRTCPriorityType) GoValueType() gobject.Type { + return TypeWebRTCPriorityType +} + +func (e WebRTCPriorityType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -868,8 +910,11 @@ func marshalWebRTCRTPTransceiverDirection(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = WebRTCRTPTransceiverDirection(0) -func (e WebRTCRTPTransceiverDirection) InitGoValue(v *gobject.Value) { - v.Init(TypeWebRTCRTPTransceiverDirection) +func (e WebRTCRTPTransceiverDirection) GoValueType() gobject.Type { + return TypeWebRTCRTPTransceiverDirection +} + +func (e WebRTCRTPTransceiverDirection) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -914,8 +959,11 @@ func marshalWebRTCSCTPTransportState(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = WebRTCSCTPTransportState(0) -func (e WebRTCSCTPTransportState) InitGoValue(v *gobject.Value) { - v.Init(TypeWebRTCSCTPTransportState) +func (e WebRTCSCTPTransportState) GoValueType() gobject.Type { + return TypeWebRTCSCTPTransportState +} + +func (e WebRTCSCTPTransportState) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -959,8 +1007,11 @@ func marshalWebRTCSDPType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = WebRTCSDPType(0) -func (e WebRTCSDPType) InitGoValue(v *gobject.Value) { - v.Init(TypeWebRTCSDPType) +func (e WebRTCSDPType) GoValueType() gobject.Type { + return TypeWebRTCSDPType +} + +func (e WebRTCSDPType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1037,8 +1088,11 @@ func marshalWebRTCSignalingState(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = WebRTCSignalingState(0) -func (e WebRTCSignalingState) InitGoValue(v *gobject.Value) { - v.Init(TypeWebRTCSignalingState) +func (e WebRTCSignalingState) GoValueType() gobject.Type { + return TypeWebRTCSignalingState +} + +func (e WebRTCSignalingState) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1124,8 +1178,11 @@ func marshalWebRTCStatsType(p unsafe.Pointer) (any, error) { var _ gobject.GoValueInitializer = WebRTCStatsType(0) -func (e WebRTCStatsType) InitGoValue(v *gobject.Value) { - v.Init(TypeWebRTCStatsType) +func (e WebRTCStatsType) GoValueType() gobject.Type { + return TypeWebRTCStatsType +} + +func (e WebRTCStatsType) SetGoValue(v *gobject.Value) { v.SetEnum(int(e)) } @@ -1192,6 +1249,11 @@ func UnsafeWebRTCDTLSTransportFromGlibFull(c unsafe.Pointer) WebRTCDTLSTransport return gobject.UnsafeObjectFromGlibFull(c).(WebRTCDTLSTransport) } +// UnsafeWebRTCDTLSTransportFromGlibBorrow is used to convert raw GstWebRTCDTLSTransport pointers to go without touching any references. This is used by the bindings internally. +func UnsafeWebRTCDTLSTransportFromGlibBorrow(c unsafe.Pointer) WebRTCDTLSTransport { + return gobject.UnsafeObjectFromGlibBorrow(c).(WebRTCDTLSTransport) +} + func (w *WebRTCDTLSTransportInstance) upcastToGstWebRTCDTLSTransport() *WebRTCDTLSTransportInstance { return w } @@ -1307,6 +1369,11 @@ func UnsafeWebRTCDataChannelFromGlibFull(c unsafe.Pointer) WebRTCDataChannel { return gobject.UnsafeObjectFromGlibFull(c).(WebRTCDataChannel) } +// UnsafeWebRTCDataChannelFromGlibBorrow is used to convert raw GstWebRTCDataChannel pointers to go without touching any references. This is used by the bindings internally. +func UnsafeWebRTCDataChannelFromGlibBorrow(c unsafe.Pointer) WebRTCDataChannel { + return gobject.UnsafeObjectFromGlibBorrow(c).(WebRTCDataChannel) +} + func (w *WebRTCDataChannelInstance) upcastToGstWebRTCDataChannel() *WebRTCDataChannelInstance { return w } @@ -1724,6 +1791,11 @@ func UnsafeWebRTCICEFromGlibFull(c unsafe.Pointer) WebRTCICE { return gobject.UnsafeObjectFromGlibFull(c).(WebRTCICE) } +// UnsafeWebRTCICEFromGlibBorrow is used to convert raw GstWebRTCICE pointers to go without touching any references. This is used by the bindings internally. +func UnsafeWebRTCICEFromGlibBorrow(c unsafe.Pointer) WebRTCICE { + return gobject.UnsafeObjectFromGlibBorrow(c).(WebRTCICE) +} + func (w *WebRTCICEInstance) upcastToGstWebRTCICE() *WebRTCICEInstance { return w } @@ -2472,7 +2544,7 @@ func UnsafeApplyWebRTCICEOverrides[Instance WebRTCICE](gclass unsafe.Pointer, ov var candidate string // in, none, string var promise *gst.Promise // in, none, converted, nullable - ice = UnsafeWebRTCICEFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ice = UnsafeWebRTCICEFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) stream = UnsafeWebRTCICEStreamFromGlibNone(unsafe.Pointer(carg1)) candidate = C.GoString((*C.char)(unsafe.Pointer(carg2))) if carg3 != nil { @@ -2494,7 +2566,7 @@ func UnsafeApplyWebRTCICEOverrides[Instance WebRTCICE](gclass unsafe.Pointer, ov var sessionId uint // in, none, casted var goret WebRTCICEStream // return, full, converted, nullable - ice = UnsafeWebRTCICEFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ice = UnsafeWebRTCICEFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) sessionId = uint(carg1) goret = overrides.AddStream(ice, sessionId) @@ -2518,7 +2590,7 @@ func UnsafeApplyWebRTCICEOverrides[Instance WebRTCICE](gclass unsafe.Pointer, ov var uri string // in, none, string var goret bool // return - ice = UnsafeWebRTCICEFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ice = UnsafeWebRTCICEFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) uri = C.GoString((*C.char)(unsafe.Pointer(carg1))) goret = overrides.AddTurnServer(ice, uri) @@ -2543,7 +2615,7 @@ func UnsafeApplyWebRTCICEOverrides[Instance WebRTCICE](gclass unsafe.Pointer, ov var component WebRTCICEComponent // in, none, casted var goret WebRTCICETransport // return, full, converted, nullable - ice = UnsafeWebRTCICEFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ice = UnsafeWebRTCICEFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) stream = UnsafeWebRTCICEStreamFromGlibNone(unsafe.Pointer(carg1)) component = WebRTCICEComponent(carg2) @@ -2568,7 +2640,7 @@ func UnsafeApplyWebRTCICEOverrides[Instance WebRTCICE](gclass unsafe.Pointer, ov var stream WebRTCICEStream // in, none, converted var goret bool // return - ice = UnsafeWebRTCICEFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ice = UnsafeWebRTCICEFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) stream = UnsafeWebRTCICEStreamFromGlibNone(unsafe.Pointer(carg1)) goret = overrides.GatherCandidates(ice, stream) @@ -2591,7 +2663,7 @@ func UnsafeApplyWebRTCICEOverrides[Instance WebRTCICE](gclass unsafe.Pointer, ov var ice Instance // go GstWebRTCICE subclass var goret string // return, full, string - ice = UnsafeWebRTCICEFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ice = UnsafeWebRTCICEFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GetHTTPProxy(ice) @@ -2611,7 +2683,7 @@ func UnsafeApplyWebRTCICEOverrides[Instance WebRTCICE](gclass unsafe.Pointer, ov var ice Instance // go GstWebRTCICE subclass var goret bool // return - ice = UnsafeWebRTCICEFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ice = UnsafeWebRTCICEFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GetIsController(ice) @@ -2636,7 +2708,7 @@ func UnsafeApplyWebRTCICEOverrides[Instance WebRTCICE](gclass unsafe.Pointer, ov var remoteStats *WebRTCICECandidateStats // out, full, converted var goret bool // return - ice = UnsafeWebRTCICEFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ice = UnsafeWebRTCICEFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) stream = UnsafeWebRTCICEStreamFromGlibNone(unsafe.Pointer(carg1)) localStats, remoteStats, goret = overrides.GetSelectedPair(ice, stream) @@ -2661,7 +2733,7 @@ func UnsafeApplyWebRTCICEOverrides[Instance WebRTCICE](gclass unsafe.Pointer, ov var ice Instance // go GstWebRTCICE subclass var goret string // return, full, string, nullable-string - ice = UnsafeWebRTCICEFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ice = UnsafeWebRTCICEFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GetStunServer(ice) @@ -2683,7 +2755,7 @@ func UnsafeApplyWebRTCICEOverrides[Instance WebRTCICE](gclass unsafe.Pointer, ov var ice Instance // go GstWebRTCICE subclass var goret string // return, full, string, nullable-string - ice = UnsafeWebRTCICEFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ice = UnsafeWebRTCICEFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GetTurnServer(ice) @@ -2705,7 +2777,7 @@ func UnsafeApplyWebRTCICEOverrides[Instance WebRTCICE](gclass unsafe.Pointer, ov var ice Instance // go GstWebRTCICE subclass var forceRelay bool // in - ice = UnsafeWebRTCICEFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ice = UnsafeWebRTCICEFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != 0 { forceRelay = true } @@ -2724,7 +2796,7 @@ func UnsafeApplyWebRTCICEOverrides[Instance WebRTCICE](gclass unsafe.Pointer, ov var ice Instance // go GstWebRTCICE subclass var uri string // in, none, string - ice = UnsafeWebRTCICEFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ice = UnsafeWebRTCICEFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) uri = C.GoString((*C.char)(unsafe.Pointer(carg1))) overrides.SetHTTPProxy(ice, uri) @@ -2741,7 +2813,7 @@ func UnsafeApplyWebRTCICEOverrides[Instance WebRTCICE](gclass unsafe.Pointer, ov var ice Instance // go GstWebRTCICE subclass var controller bool // in - ice = UnsafeWebRTCICEFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ice = UnsafeWebRTCICEFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != 0 { controller = true } @@ -2763,7 +2835,7 @@ func UnsafeApplyWebRTCICEOverrides[Instance WebRTCICE](gclass unsafe.Pointer, ov var pwd string // in, none, string var goret bool // return - ice = UnsafeWebRTCICEFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ice = UnsafeWebRTCICEFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) stream = UnsafeWebRTCICEStreamFromGlibNone(unsafe.Pointer(carg1)) ufrag = C.GoString((*C.char)(unsafe.Pointer(carg2))) pwd = C.GoString((*C.char)(unsafe.Pointer(carg3))) @@ -2788,7 +2860,7 @@ func UnsafeApplyWebRTCICEOverrides[Instance WebRTCICE](gclass unsafe.Pointer, ov var ice Instance // go GstWebRTCICE subclass var fn WebRTCICEOnCandidateFunc // in, transfer: none, C Pointers: 0, Name: WebRTCICEOnCandidateFunc, scope: notified, closure: carg2, destroy: carg3 - ice = UnsafeWebRTCICEFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ice = UnsafeWebRTCICEFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) _ = fn _ = carg1 _ = carg2 @@ -2812,7 +2884,7 @@ func UnsafeApplyWebRTCICEOverrides[Instance WebRTCICE](gclass unsafe.Pointer, ov var pwd string // in, none, string var goret bool // return - ice = UnsafeWebRTCICEFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ice = UnsafeWebRTCICEFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) stream = UnsafeWebRTCICEStreamFromGlibNone(unsafe.Pointer(carg1)) ufrag = C.GoString((*C.char)(unsafe.Pointer(carg2))) pwd = C.GoString((*C.char)(unsafe.Pointer(carg3))) @@ -2837,7 +2909,7 @@ func UnsafeApplyWebRTCICEOverrides[Instance WebRTCICE](gclass unsafe.Pointer, ov var ice Instance // go GstWebRTCICE subclass var uri string // in, none, string, nullable-string - ice = UnsafeWebRTCICEFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ice = UnsafeWebRTCICEFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != nil { uri = C.GoString((*C.char)(unsafe.Pointer(carg1))) } @@ -2857,7 +2929,7 @@ func UnsafeApplyWebRTCICEOverrides[Instance WebRTCICE](gclass unsafe.Pointer, ov var stream WebRTCICEStream // in, none, converted var tos uint // in, none, casted - ice = UnsafeWebRTCICEFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ice = UnsafeWebRTCICEFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) stream = UnsafeWebRTCICEStreamFromGlibNone(unsafe.Pointer(carg1)) tos = uint(carg2) @@ -2875,7 +2947,7 @@ func UnsafeApplyWebRTCICEOverrides[Instance WebRTCICE](gclass unsafe.Pointer, ov var ice Instance // go GstWebRTCICE subclass var uri string // in, none, string, nullable-string - ice = UnsafeWebRTCICEFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ice = UnsafeWebRTCICEFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) if carg1 != nil { uri = C.GoString((*C.char)(unsafe.Pointer(carg1))) } @@ -2967,6 +3039,11 @@ func UnsafeWebRTCICEStreamFromGlibFull(c unsafe.Pointer) WebRTCICEStream { return gobject.UnsafeObjectFromGlibFull(c).(WebRTCICEStream) } +// UnsafeWebRTCICEStreamFromGlibBorrow is used to convert raw GstWebRTCICEStream pointers to go without touching any references. This is used by the bindings internally. +func UnsafeWebRTCICEStreamFromGlibBorrow(c unsafe.Pointer) WebRTCICEStream { + return gobject.UnsafeObjectFromGlibBorrow(c).(WebRTCICEStream) +} + func (w *WebRTCICEStreamInstance) upcastToGstWebRTCICEStream() *WebRTCICEStreamInstance { return w } @@ -3073,7 +3150,7 @@ func UnsafeApplyWebRTCICEStreamOverrides[Instance WebRTCICEStream](gclass unsafe var component WebRTCICEComponent // in, none, casted var goret WebRTCICETransport // return, full, converted, nullable - stream = UnsafeWebRTCICEStreamFromGlibNone(unsafe.Pointer(carg0)).(Instance) + stream = UnsafeWebRTCICEStreamFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) component = WebRTCICEComponent(carg1) goret = overrides.FindTransport(stream, component) @@ -3096,7 +3173,7 @@ func UnsafeApplyWebRTCICEStreamOverrides[Instance WebRTCICEStream](gclass unsafe var ice Instance // go GstWebRTCICEStream subclass var goret bool // return - ice = UnsafeWebRTCICEStreamFromGlibNone(unsafe.Pointer(carg0)).(Instance) + ice = UnsafeWebRTCICEStreamFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GatherCandidates(ice) @@ -3201,6 +3278,11 @@ func UnsafeWebRTCICETransportFromGlibFull(c unsafe.Pointer) WebRTCICETransport { return gobject.UnsafeObjectFromGlibFull(c).(WebRTCICETransport) } +// UnsafeWebRTCICETransportFromGlibBorrow is used to convert raw GstWebRTCICETransport pointers to go without touching any references. This is used by the bindings internally. +func UnsafeWebRTCICETransportFromGlibBorrow(c unsafe.Pointer) WebRTCICETransport { + return gobject.UnsafeObjectFromGlibBorrow(c).(WebRTCICETransport) +} + func (w *WebRTCICETransportInstance) upcastToGstWebRTCICETransport() *WebRTCICETransportInstance { return w } @@ -3324,7 +3406,7 @@ func UnsafeApplyWebRTCICETransportOverrides[Instance WebRTCICETransport](gclass var transport Instance // go GstWebRTCICETransport subclass var goret bool // return - transport = UnsafeWebRTCICETransportFromGlibNone(unsafe.Pointer(carg0)).(Instance) + transport = UnsafeWebRTCICETransportFromGlibBorrow(unsafe.Pointer(carg0)).(Instance) goret = overrides.GatherCandidates(transport) @@ -3406,6 +3488,11 @@ func UnsafeWebRTCRTPReceiverFromGlibFull(c unsafe.Pointer) WebRTCRTPReceiver { return gobject.UnsafeObjectFromGlibFull(c).(WebRTCRTPReceiver) } +// UnsafeWebRTCRTPReceiverFromGlibBorrow is used to convert raw GstWebRTCRTPReceiver pointers to go without touching any references. This is used by the bindings internally. +func UnsafeWebRTCRTPReceiverFromGlibBorrow(c unsafe.Pointer) WebRTCRTPReceiver { + return gobject.UnsafeObjectFromGlibBorrow(c).(WebRTCRTPReceiver) +} + func (w *WebRTCRTPReceiverInstance) upcastToGstWebRTCRTPReceiver() *WebRTCRTPReceiverInstance { return w } @@ -3473,6 +3560,11 @@ func UnsafeWebRTCRTPSenderFromGlibFull(c unsafe.Pointer) WebRTCRTPSender { return gobject.UnsafeObjectFromGlibFull(c).(WebRTCRTPSender) } +// UnsafeWebRTCRTPSenderFromGlibBorrow is used to convert raw GstWebRTCRTPSender pointers to go without touching any references. This is used by the bindings internally. +func UnsafeWebRTCRTPSenderFromGlibBorrow(c unsafe.Pointer) WebRTCRTPSender { + return gobject.UnsafeObjectFromGlibBorrow(c).(WebRTCRTPSender) +} + func (w *WebRTCRTPSenderInstance) upcastToGstWebRTCRTPSender() *WebRTCRTPSenderInstance { return w } @@ -3548,6 +3640,11 @@ func UnsafeWebRTCRTPTransceiverFromGlibFull(c unsafe.Pointer) WebRTCRTPTransceiv return gobject.UnsafeObjectFromGlibFull(c).(WebRTCRTPTransceiver) } +// UnsafeWebRTCRTPTransceiverFromGlibBorrow is used to convert raw GstWebRTCRTPTransceiver pointers to go without touching any references. This is used by the bindings internally. +func UnsafeWebRTCRTPTransceiverFromGlibBorrow(c unsafe.Pointer) WebRTCRTPTransceiver { + return gobject.UnsafeObjectFromGlibBorrow(c).(WebRTCRTPTransceiver) +} + func (w *WebRTCRTPTransceiverInstance) upcastToGstWebRTCRTPTransceiver() *WebRTCRTPTransceiverInstance { return w } @@ -3600,6 +3697,11 @@ func UnsafeWebRTCSCTPTransportFromGlibFull(c unsafe.Pointer) WebRTCSCTPTransport return gobject.UnsafeObjectFromGlibFull(c).(WebRTCSCTPTransport) } +// UnsafeWebRTCSCTPTransportFromGlibBorrow is used to convert raw GstWebRTCSCTPTransport pointers to go without touching any references. This is used by the bindings internally. +func UnsafeWebRTCSCTPTransportFromGlibBorrow(c unsafe.Pointer) WebRTCSCTPTransport { + return gobject.UnsafeObjectFromGlibBorrow(c).(WebRTCSCTPTransport) +} + func (w *WebRTCSCTPTransportInstance) upcastToGstWebRTCSCTPTransport() *WebRTCSCTPTransportInstance { return w } @@ -3707,8 +3809,11 @@ func marshalWebRTCICECandidateStats(p unsafe.Pointer) (interface{}, error) { return UnsafeWebRTCICECandidateStatsFromGlibBorrow(b), nil } -func (r *WebRTCICECandidateStats) InitGoValue(v *gobject.Value) { - v.Init(TypeWebRTCICECandidateStats) +func (r *WebRTCICECandidateStats) GoValueType() gobject.Type { + return TypeWebRTCICECandidateStats +} + +func (r *WebRTCICECandidateStats) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) } @@ -4069,8 +4174,11 @@ func marshalWebRTCSessionDescription(p unsafe.Pointer) (interface{}, error) { return UnsafeWebRTCSessionDescriptionFromGlibBorrow(b), nil } -func (r *WebRTCSessionDescription) InitGoValue(v *gobject.Value) { - v.Init(TypeWebRTCSessionDescription) +func (r *WebRTCSessionDescription) GoValueType() gobject.Type { + return TypeWebRTCSessionDescription +} + +func (r *WebRTCSessionDescription) SetGoValue(v *gobject.Value) { v.SetBoxed(unsafe.Pointer(r.native)) }