diff --git a/.gitignore b/.gitignore index 0b9b195..947bfb0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ __debug* gotk4 gstreamer +*.log + # Binaries for programs and plugins *.exe *.exe~ diff --git a/buildAll.sh b/buildAll.sh index 0ec70b5..2b8e51a 100755 --- a/buildAll.sh +++ b/buildAll.sh @@ -2,8 +2,14 @@ # this script builds all go packages in the current directory -packages=$(go list ./...) +packages=$(go list ./pkg/...) for package in $packages; do echo "building $package" go build -o /dev/null "$package" || exit 1 done + +examples=$(go list ./examples/...) +for ex in $examples; do + echo "building example $ex" + go build -o /dev/null "$ex" || exit 1 +done diff --git a/examples/decodebin/main.go b/examples/decodebin/main.go index 0637238..6786651 100644 --- a/examples/decodebin/main.go +++ b/examples/decodebin/main.go @@ -85,7 +85,7 @@ func buildPipeline() (gst.Pipeline, error) { err := errors.New("could not detect media stream type") // We can send errors directly to the pipeline bus if they occur. // These will be handled downstream. - msg := gst.NewMessageError(decodebin, fmt.Sprintf("Received caps: %s", caps.String()), err) + msg := gst.NewMessageError(decodebin, fmt.Sprintf("Received caps: %s", caps.ToString()), err) pipeline.GetBus().Post(msg) return } diff --git a/examples/discoverer/main.go b/examples/discoverer/main.go index 008ee49..57c4690 100644 --- a/examples/discoverer/main.go +++ b/examples/discoverer/main.go @@ -45,23 +45,23 @@ func main() { printDiscovererInfo(info) } -func printDiscovererInfo(info *gstpbutils.DiscovererInfo) { - fmt.Println("URI:", info.URI()) - fmt.Println("Duration:", info.Duration()) +func printDiscovererInfo(info gstpbutils.DiscovererInfo) { + fmt.Println("URI:", info.GetURI()) + fmt.Println("Duration:", info.GetDuration()) printTags(info) - printStreamInfo(info.StreamInfo()) + printStreamInfo(info.GetStreamInfo()) - children := info.StreamList() + children := info.GetStreamList() fmt.Println("Children streams:") for _, child := range children { printStreamInfo(child) } } -func printTags(info *gstpbutils.DiscovererInfo) { +func printTags(info gstpbutils.DiscovererInfo) { fmt.Println("Tags:") - tags := info.Tags() + tags := info.GetTags() if tags != nil { fmt.Println(" ", tags) return @@ -69,13 +69,13 @@ func printTags(info *gstpbutils.DiscovererInfo) { fmt.Println(" no tags") } -func printStreamInfo(info *gstpbutils.DiscovererStreamInfo) { +func printStreamInfo(info gstpbutils.DiscovererStreamInfo) { if info == nil { return } fmt.Println("Stream: ") - fmt.Println(" Stream id:", info.StreamID()) - if caps := info.Caps(); caps != nil { + fmt.Println(" Stream id:", info.GetStreamID()) + if caps := info.GetCaps(); caps != nil { fmt.Println(" Format:", caps) } } diff --git a/examples/events/main.go b/examples/events/main.go index cd8c742..694111a 100644 --- a/examples/events/main.go +++ b/examples/events/main.go @@ -21,18 +21,16 @@ package main import ( + "context" "fmt" "time" - "github.com/diamondburned/gotk4/pkg/glib/v2" "github.com/go-gst/go-gst/pkg/gst" ) func main() { gst.Init() - mainLoop := glib.NewMainLoop(glib.MainContextDefault(), false) - // Build a pipeline with fake audio data going to a fakesink res, err := gst.ParseLaunch("audiotestsrc ! fakesink") if err != nil { @@ -40,34 +38,16 @@ func main() { return } - pipeline := res.(*gst.Pipeline) + pipeline := res.(gst.Pipeline) // Retrieve the message bus for the pipeline - bus := pipeline.Bus() + bus := pipeline.GetBus() // Start the pipeline pipeline.SetState(gst.StatePlaying) - // This sets the bus's signal handler (don't be mislead by the "add", there can only be one). - // Every message from the bus is passed through this function. Its return value determines - // whether the handler wants to be called again. - bus.AddWatch(0, func(_ *gst.Bus, msg *gst.Message) bool { - - switch msg.Type() { - case gst.MessageEos: - fmt.Println("Received EOS") - // An EndOfStream event was sent to the pipeline, so we tell our main loop - // to stop execution here. - mainLoop.Quit() - case gst.MessageError: - err, debug := msg.ParseError() - fmt.Println("ERROR:", err) - fmt.Println("DEBUG:", debug) - mainLoop.Quit() - } - - return true - }) + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() // Kick off a goroutine that after 5 seconds will send an eos event to the pipeline. go func() { @@ -89,7 +69,20 @@ func main() { } }() - mainLoop.Run() + for msg := range bus.Messages(ctx) { + switch msg.Type() { + case gst.MessageEos: + fmt.Println("Received EOS") + // An EndOfStream event was sent to the pipeline, so we tell our main loop + // to stop execution here. + cancel() + case gst.MessageError: + err, debug := msg.ParseError() + fmt.Println("ERROR:", err) + fmt.Println("DEBUG:", debug) + cancel() + } + } return } diff --git a/examples/feature-rank/main.go b/examples/feature-rank/main.go index c236c6c..a8b4878 100644 --- a/examples/feature-rank/main.go +++ b/examples/feature-rank/main.go @@ -14,18 +14,10 @@ func main() { higherThanHighRank := uint(258) - pluginf := registry.LookupFeature("vtdec_hw") - - if pluginf == nil { - fmt.Printf("codec vtdec_hw not found") - - return - } - - plugin := gst.BasePluginFeature(pluginf) + plugin := registry.LookupFeature("vtdec_hw") plugin.SetRank(higherThanHighRank) - rank := plugin.Rank() + rank := plugin.GetRank() fmt.Println("vtdec_hw rank is:", rank) } diff --git a/examples/launch/main.go b/examples/launch/main.go index d9dc90a..912a30a 100644 --- a/examples/launch/main.go +++ b/examples/launch/main.go @@ -4,20 +4,18 @@ package main import ( + "context" "fmt" "os" "strings" "time" - "github.com/diamondburned/gotk4/pkg/glib/v2" "github.com/go-gst/go-gst/pkg/gst" ) func main() { gst.Init() - mainLoop := glib.NewMainLoop(glib.MainContextDefault(), false) - // Let GStreamer create a pipeline from the parsed launch syntax on the cli. res, err := gst.ParseLaunch(strings.Join(os.Args[1:], " ")) if err != nil { @@ -25,78 +23,79 @@ func main() { return } - pipeline := res.(*gst.Pipeline) + pipeline := res.(gst.Pipeline) - // Add a message handler to the pipeline bus, printing interesting information to the console. - pipeline.Bus().AddWatch(0, func(_ *gst.Bus, msg *gst.Message) bool { - switch msg.Type() { - case gst.MessageEos: // When end-of-stream is received stop the main loop - pipeline.BlockSetState(gst.StateNull, gst.ClockTime(time.Second)) + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() - mainLoop.Quit() - case gst.MessageError: // Error messages are always fatal - err, debug := msg.ParseError() - fmt.Println("ERROR:", err.Error()) - if debug != "" { - fmt.Println("DEBUG:", debug) + go func() { + for msg := range pipeline.GetBus().Messages(ctx) { + switch msg.Type() { + case gst.MessageEos: // When end-of-stream is received stop the main loop + fmt.Println("End-of-stream received") + cancel() + case gst.MessageError: // Error messages are always fatal + debug, err := msg.ParseError() + fmt.Println("ERROR:", err.Error()) + if debug != "" { + fmt.Println("DEBUG:", debug) + } + cancel() + + case gst.MessageAny: + case gst.MessageApplication: + case gst.MessageAsyncDone: + case gst.MessageAsyncStart: + case gst.MessageBuffering: + case gst.MessageClockLost: + case gst.MessageClockProvide: + case gst.MessageDeviceAdded: + case gst.MessageDeviceChanged: + case gst.MessageDeviceRemoved: + case gst.MessageDurationChanged: + case gst.MessageElement: + case gst.MessageExtended: + case gst.MessageHaveContext: + case gst.MessageInfo: + case gst.MessageInstantRateRequest: + case gst.MessageLatency: + case gst.MessageNeedContext: + case gst.MessageNewClock: + case gst.MessageProgress: + case gst.MessagePropertyNotify: + case gst.MessageQos: + case gst.MessageRedirect: + case gst.MessageRequestState: + case gst.MessageResetTime: + case gst.MessageSegmentDone: + case gst.MessageSegmentStart: + case gst.MessageStateChanged: + old, state, pending := msg.ParseStateChanged() + + fmt.Printf("State changed: %s => %s (%s)\n", old, state, pending) + case gst.MessageStateDirty: + case gst.MessageStepDone: + case gst.MessageStepStart: + case gst.MessageStreamCollection: + case gst.MessageStreamStart: + case gst.MessageStreamStatus: + case gst.MessageStreamsSelected: + case gst.MessageStructureChange: + case gst.MessageTag: + case gst.MessageToc: + case gst.MessageUnknown: + case gst.MessageWarning: + default: + panic("unexpected gst.MessageType") } - mainLoop.Quit() - - case gst.MessageAny: - case gst.MessageApplication: - case gst.MessageAsyncDone: - case gst.MessageAsyncStart: - case gst.MessageBuffering: - case gst.MessageClockLost: - case gst.MessageClockProvide: - case gst.MessageDeviceAdded: - case gst.MessageDeviceChanged: - case gst.MessageDeviceRemoved: - case gst.MessageDurationChanged: - case gst.MessageElement: - case gst.MessageExtended: - case gst.MessageHaveContext: - case gst.MessageInfo: - case gst.MessageInstantRateRequest: - case gst.MessageLatency: - case gst.MessageNeedContext: - case gst.MessageNewClock: - case gst.MessageProgress: - case gst.MessagePropertyNotify: - case gst.MessageQos: - case gst.MessageRedirect: - case gst.MessageRequestState: - case gst.MessageResetTime: - case gst.MessageSegmentDone: - case gst.MessageSegmentStart: - case gst.MessageStateChanged: - old, state, pending := msg.ParseStateChanged() - - fmt.Printf("State changed: %s => %s (%s)\n", old, state, pending) - case gst.MessageStateDirty: - case gst.MessageStepDone: - case gst.MessageStepStart: - case gst.MessageStreamCollection: - case gst.MessageStreamStart: - case gst.MessageStreamStatus: - case gst.MessageStreamsSelected: - case gst.MessageStructureChange: - case gst.MessageTag: - case gst.MessageToc: - case gst.MessageUnknown: - case gst.MessageWarning: - default: - panic("unexpected gst.MessageType") } - return true - }) + }() // Start the pipeline pipeline.SetState(gst.StatePlaying) - // Block on the main loop - - mainLoop.Run() + <-ctx.Done() + pipeline.BlockSetState(gst.StateNull, gst.ClockTime(time.Second)) return } diff --git a/examples/pad-probes/main.go b/examples/pad-probes/main.go index 50d6ce3..1b8de83 100644 --- a/examples/pad-probes/main.go +++ b/examples/pad-probes/main.go @@ -12,6 +12,7 @@ package main import ( "errors" "fmt" + "math" "github.com/go-gst/go-gst/pkg/gst" ) @@ -30,21 +31,21 @@ func main() { panic("could not create pipeline") } - pipeline := ret.(*gst.Pipeline) + pipeline := ret.(gst.Pipeline) // Get the audiotestsrc element from the pipeline that GStreamer // created for us while parsing the launch syntax above. - src := pipeline.ByName("src").(*gst.Element) + src := pipeline.GetByName("src") // Get the audiotestsrc's src-pad. - srcPad := src.StaticPad("src") + srcPad := src.GetStaticPad("src") // Add a probe handler on the audiotestsrc's src-pad. // This handler gets called for every buffer that passes the pad we probe. - srcPad.AddProbe(gst.PadProbeTypeBuffer, func(self *gst.Pad, info *gst.PadProbeInfo) gst.PadProbeReturn { + srcPad.AddProbe(gst.PadProbeTypeBuffer, func(self gst.Pad, info *gst.PadProbeInfo) gst.PadProbeReturn { // Interpret the data sent over the pad as a buffer. We know to expect this because of // the probe mask defined above. - buffer := info.Buffer() + buffer := info.GetBuffer() // At this point, buffer is only a reference to an existing memory region somewhere. // When we want to access its content, we have to map it while requesting the required @@ -59,25 +60,23 @@ func main() { panic("could not map buffer") } - defer buffer.Unmap(mapInfo) - - // TODO: make mapInfo data accessible + defer mapInfo.Unmap() // We know what format the data in the memory region has, since we requested // it by setting the fakesink's caps. So what we do here is interpret the - // // memory region we mapped as an array of signed 16 bit integers. - // samples := mapInfo - // if len(samples) == 0 { - // return gst.PadProbeOK - // } + // memory region we mapped as an array of signed 16 bit integers. + samples := mapInfo.Data() + if len(samples) == 0 { + return gst.PadProbeOK + } - // // For each buffer (= chunk of samples) calculate the root mean square. - // var square float64 - // for _, i := range samples { - // square += float64(i * i) - // } - // rms := math.Sqrt(square / float64(len(samples))) - // fmt.Println("rms:", rms) + // For each buffer (= chunk of samples) calculate the root mean square. + var square float64 + for _, i := range samples { + square += float64(i * i) + } + rms := math.Sqrt(square / float64(len(samples))) + fmt.Println("rms:", rms) return gst.PadProbeOK }) @@ -87,7 +86,7 @@ func main() { // Block on messages coming in from the bus instead of using the main loop for { - msg := pipeline.Bus().TimedPop(gst.ClockTimeNone) + msg := pipeline.GetBus().TimedPop(gst.ClockTimeNone) if msg == nil { break } @@ -104,7 +103,7 @@ func handleMessage(msg *gst.Message) error { case gst.MessageEos: return errors.New("end-of-stream") case gst.MessageError: - err, _ := msg.ParseError() + _, err := msg.ParseError() return err } return nil diff --git a/examples/playbin/main.go b/examples/playbin/main.go index 88980f6..83b77d3 100644 --- a/examples/playbin/main.go +++ b/examples/playbin/main.go @@ -12,60 +12,57 @@ package main import ( + "context" "errors" "fmt" "os" - "github.com/diamondburned/gotk4/pkg/glib/v2" "github.com/go-gst/go-gst/pkg/gst" ) func playbin() error { gst.Init() - mainLoop := glib.NewMainLoop(glib.MainContextDefault(), false) - if len(os.Args) < 2 { return errors.New("usage: playbin ") } - gst.Init() - // Create a new playbin and set the URI on it ret := gst.ElementFactoryMake("playbin", "") if ret != nil { return fmt.Errorf("could not create playbin") } - playbin := ret.(*gst.Pipeline) + playbin := ret.(gst.Pipeline) playbin.SetObjectProperty("uri", os.Args[1]) // The playbin element itself is a pipeline, so it can be used as one, despite being // created from an element factory. - bus := playbin.Bus() + bus := playbin.GetBus() playbin.SetState(gst.StatePlaying) - bus.AddWatch(0, func(bus *gst.Bus, msg *gst.Message) bool { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + for msg := range bus.Messages(ctx) { switch msg.Type() { case gst.MessageEos: - mainLoop.Quit() - return false + return nil case gst.MessageError: - err, debug := msg.ParseError() + debug, err := msg.ParseError() fmt.Println("ERROR:", err.Error()) if debug != "" { fmt.Println("DEBUG") fmt.Println(debug) } - mainLoop.Quit() - return false + return nil // Watch state change events case gst.MessageStateChanged: if _, newState, _ := msg.ParseStateChanged(); newState == gst.StatePlaying { // Generate a dot graph of the pipeline to GST_DEBUG_DUMP_DOT_DIR if defined - gst.DebugBinToDotFile(&playbin.Bin, gst.DebugGraphShowAll, "PLAYING") + playbin.DebugBinToDotFile(gst.DebugGraphShowAll, "PLAYING") } // Tag messages contain changes to tags on the stream. This can include metadata about @@ -73,20 +70,18 @@ func playbin() error { case gst.MessageTag: tags := msg.ParseTag() fmt.Println("Tags:") - if artist, ok := tags.String(gst.TAG_ARTIST); ok { + if artist, ok := tags.GetString(gst.TAG_ARTIST); ok { fmt.Println(" Artist:", artist) } - if album, ok := tags.String(gst.TAG_ALBUM); ok { + if album, ok := tags.GetString(gst.TAG_ALBUM); ok { fmt.Println(" Album:", album) } - if title, ok := tags.String(gst.TAG_TITLE); ok { + if title, ok := tags.GetString(gst.TAG_TITLE); ok { fmt.Println(" Title:", title) } } - return true - }) - - mainLoop.Run() + return nil + } return nil } diff --git a/examples/plugins/basetransform/internal/customtransform/register.go b/examples/plugins/basetransform/internal/customtransform/register.go index 8a15bf4..3072ad6 100644 --- a/examples/plugins/basetransform/internal/customtransform/register.go +++ b/examples/plugins/basetransform/internal/customtransform/register.go @@ -1,51 +1,46 @@ package customtransform -import ( - "github.com/diamondburned/gotk4/pkg/core/glib" - "github.com/go-gst/go-gst/pkg/gst" - "github.com/go-gst/go-gst/pkg/gstbase" -) - // Register needs to be called after gst.Init() to make the gocustombin available in the standard // gst element registry. After this call the element can be used like any other gstreamer element func Register() bool { - registered := glib.RegisterSubclassWithConstructor[*customBaseTransform]( - func() *customBaseTransform { - return &customBaseTransform{} - }, - glib.WithOverrides[*customBaseTransform, gstbase.BaseTransformOverrides](func(b *customBaseTransform) gstbase.BaseTransformOverrides { - return gstbase.BaseTransformOverrides{} - }), - glib.WithClassInit[*gstbase.BaseTransformClass](func(class *gstbase.BaseTransformClass) { - class.ParentClass().SetStaticMetadata( - "custom base transform", - "Transform/demo", - "custom base transform", - "Wilhelm Bartel ", - ) + panic("Register is not implemented yet") + // registered := glib.RegisterSubclassWithConstructor[*customBaseTransform]( + // func() *customBaseTransform { + // return &customBaseTransform{} + // }, + // glib.WithOverrides[*customBaseTransform, gstbase.BaseTransformOverrides](func(b *customBaseTransform) gstbase.BaseTransformOverrides { + // return gstbase.BaseTransformOverrides{} + // }), + // glib.WithClassInit[*gstbase.BaseTransformClass](func(class *gstbase.BaseTransformClass) { + // class.ParentClass().SetStaticMetadata( + // "custom base transform", + // "Transform/demo", + // "custom base transform", + // "Wilhelm Bartel ", + // ) - class.ParentClass().AddPadTemplate(gst.NewPadTemplate( - "src", - gst.PadSrc, - gst.PadAlways, - gst.CapsFromString("audio/x-raw,channels=2,rate=48000"), - )) - class.ParentClass().AddPadTemplate(gst.NewPadTemplate( - "sink", - gst.PadSink, - gst.PadAlways, - gst.CapsFromString("audio/x-raw,channels=2,rate=48000"), - )) - }), - ) + // class.ParentClass().AddPadTemplate(gst.NewPadTemplate( + // "src", + // gst.PadSrc, + // gst.PadAlways, + // gst.CapsFromString("audio/x-raw,channels=2,rate=48000"), + // )) + // class.ParentClass().AddPadTemplate(gst.NewPadTemplate( + // "sink", + // gst.PadSink, + // gst.PadAlways, + // gst.CapsFromString("audio/x-raw,channels=2,rate=48000"), + // )) + // }), + // ) - return gst.ElementRegister( - // no plugin: - nil, - // The name of the element - "gocustomtransform", - // The rank of the element - uint(gst.RankNone), - registered.Type(), - ) + // return gst.ElementRegister( + // // no plugin: + // nil, + // // The name of the element + // "gocustomtransform", + // // The rank of the element + // uint(gst.RankNone), + // registered.Type(), + // ) } diff --git a/examples/plugins/basetransform/main.go b/examples/plugins/basetransform/main.go index 0cc0703..4ee7220 100644 --- a/examples/plugins/basetransform/main.go +++ b/examples/plugins/basetransform/main.go @@ -25,7 +25,7 @@ func run(ctx context.Context) error { return err } - pipeline := ret.(*gst.Pipeline) + pipeline := ret.(gst.Pipeline) pipeline.SetState(gst.StatePlaying) diff --git a/examples/plugins/registered_elements/internal/custombin/element.go b/examples/plugins/registered_elements/internal/custombin/element.go index 6d5e24d..166eef0 100644 --- a/examples/plugins/registered_elements/internal/custombin/element.go +++ b/examples/plugins/registered_elements/internal/custombin/element.go @@ -8,9 +8,9 @@ import ( type customBin struct { gst.Bin // parent object must be first embedded field - source1 gst.Elementer - source2 gst.Elementer - mixer gst.Elementer + source1 gst.Element + source2 gst.Element + mixer gst.Element } // init should initialize the element. Keep in mind that the properties are not yet present. When this is called. @@ -31,12 +31,12 @@ func (bin *customBin) init() { bin.mixer, ) - srcpad := bin.mixer.StaticPad("src") + srcpad := bin.mixer.GetStaticPad("src") - ghostpad := gst.NewGhostPadFromTemplate("src", srcpad, bin.PadTemplate("src")) + ghostpad := gst.NewGhostPadFromTemplate("src", srcpad, bin.GetPadTemplate("src")) bin.source1.Link(bin.mixer) bin.source2.Link(bin.mixer) - bin.AddPad(&ghostpad.Pad) + bin.AddPad(ghostpad) } diff --git a/examples/plugins/registered_elements/internal/custombin/register.go b/examples/plugins/registered_elements/internal/custombin/register.go index 81ec66c..154761c 100644 --- a/examples/plugins/registered_elements/internal/custombin/register.go +++ b/examples/plugins/registered_elements/internal/custombin/register.go @@ -1,45 +1,41 @@ package custombin -import ( - "github.com/diamondburned/gotk4/pkg/core/glib" - "github.com/go-gst/go-gst/pkg/gst" -) - // Register needs to be called after gst.Init() to make the gocustombin available in the standard // gst element registry. After this call the element can be used like any other gstreamer element func Register() bool { - registered := glib.RegisterSubclassWithConstructor[*customBin]( - func() *customBin { - return &customBin{} - }, - glib.WithOverrides[*customBin, gst.BinOverrides](func(b *customBin) gst.BinOverrides { - return gst.BinOverrides{} - }), - glib.WithClassInit[*gst.BinClass](func(bc *gst.BinClass) { - bc.ParentClass().SetStaticMetadata( - "custom test source", - "Src/Test", - "Demo source bin with volume", - "Wilhelm Bartel ", - ) + panic("Register is not implemented yet") + // registered := glib.RegisterSubclassWithConstructor[*customBin]( + // func() *customBin { + // return &customBin{} + // }, + // glib.WithOverrides[*customBin, gst.BinOverrides](func(b *customBin) gst.BinOverrides { + // return gst.BinOverrides{} + // }), + // glib.WithClassInit[*gst.BinClass](func(bc *gst.BinClass) { + // bc.ParentClass().SetStaticMetadata( + // "custom test source", + // "Src/Test", + // "Demo source bin with volume", + // "Wilhelm Bartel ", + // ) - bc.ParentClass().AddPadTemplate(gst.NewPadTemplate( - "src", - gst.PadSrc, - gst.PadAlways, - gst.CapsFromString("audio/x-raw,channels=2,rate=48000"), - )) - }), - ) + // bc.ParentClass().AddPadTemplate(gst.NewPadTemplate( + // "src", + // gst.PadSrc, + // gst.PadAlways, + // gst.CapsFromString("audio/x-raw,channels=2,rate=48000"), + // )) + // }), + // ) - return gst.ElementRegister( - // no plugin: - nil, - // The name of the element - "gocustombin", - // The rank of the element - uint(gst.RankNone), - // The GoElement implementation for the element - registered.Type(), - ) + // return gst.ElementRegister( + // // no plugin: + // nil, + // // The name of the element + // "gocustombin", + // // The rank of the element + // uint(gst.RankNone), + // // The GoElement implementation for the element + // registered.Type(), + // ) } diff --git a/examples/plugins/registered_elements/internal/customsrc/element.go b/examples/plugins/registered_elements/internal/customsrc/element.go index 26abda0..038a004 100644 --- a/examples/plugins/registered_elements/internal/customsrc/element.go +++ b/examples/plugins/registered_elements/internal/customsrc/element.go @@ -15,8 +15,8 @@ const samplerate = 48000 type customSrc struct { gst.Bin // parent must be embedded as the first field - source gst.Elementer - volume gst.Elementer + source gst.Element + volume gst.Element Duration time.Duration `glib:"duration"` } @@ -31,16 +31,16 @@ func (bin *customSrc) init() { bin.volume, ) - srcpad := bin.volume.StaticPad("src") + srcpad := bin.volume.GetStaticPad("src") - ghostpad := gst.NewGhostPadFromTemplate("src", srcpad, bin.PadTemplate("src")) + ghostpad := gst.NewGhostPadFromTemplate("src", srcpad, bin.GetPadTemplate("src")) gst.LinkMany( bin.source, bin.volume, ) - bin.AddPad(&ghostpad.Pad) + bin.AddPad(ghostpad) bin.updateSource() } diff --git a/examples/plugins/registered_elements/internal/customsrc/register.go b/examples/plugins/registered_elements/internal/customsrc/register.go index aecc939..a3325a3 100644 --- a/examples/plugins/registered_elements/internal/customsrc/register.go +++ b/examples/plugins/registered_elements/internal/customsrc/register.go @@ -1,44 +1,40 @@ package customsrc -import ( - "github.com/diamondburned/gotk4/pkg/core/glib" - "github.com/go-gst/go-gst/pkg/gst" -) - // Register needs to be called after gst.Init() to make the gocustomsrc available in the standard // gst element registry. After this call the element can be used like any other gstreamer element func Register() bool { - registered := glib.RegisterSubclassWithConstructor[*customSrc]( - func() *customSrc { - return &customSrc{} - }, - glib.WithOverrides[*customSrc, gst.BinOverrides](func(b *customSrc) gst.BinOverrides { - return gst.BinOverrides{} - }), - glib.WithClassInit[*gst.BinClass](func(bc *gst.BinClass) { - bc.ParentClass().SetStaticMetadata( - "custom test source", - "Src/Test", - "Demo source bin with volume", - "Wilhelm Bartel ", - ) + panic("Register is not implemented yet") + // registered := glib.RegisterSubclassWithConstructor[*customSrc]( + // func() *customSrc { + // return &customSrc{} + // }, + // glib.WithOverrides[*customSrc, gst.BinOverrides](func(b *customSrc) gst.BinOverrides { + // return gst.BinOverrides{} + // }), + // glib.WithClassInit[*gst.BinClass](func(bc *gst.BinClass) { + // bc.ParentClass().SetStaticMetadata( + // "custom test source", + // "Src/Test", + // "Demo source bin with volume", + // "Wilhelm Bartel ", + // ) - bc.ParentClass().AddPadTemplate(gst.NewPadTemplate( - "src", - gst.PadSrc, - gst.PadAlways, - gst.CapsFromString("audio/x-raw,channels=2,rate=48000"), - )) - }), - ) + // bc.ParentClass().AddPadTemplate(gst.NewPadTemplate( + // "src", + // gst.PadSrc, + // gst.PadAlways, + // gst.CapsFromString("audio/x-raw,channels=2,rate=48000"), + // )) + // }), + // ) - return gst.ElementRegister( - // no plugin: - nil, - // The name of the element - "gocustomsrc", - // The rank of the element - uint(gst.RankNone), - registered.Type(), - ) + // return gst.ElementRegister( + // // no plugin: + // nil, + // // The name of the element + // "gocustomsrc", + // // The rank of the element + // uint(gst.RankNone), + // registered.Type(), + // ) } diff --git a/examples/plugins/registered_elements/main.go b/examples/plugins/registered_elements/main.go index ea766b2..c474b9e 100644 --- a/examples/plugins/registered_elements/main.go +++ b/examples/plugins/registered_elements/main.go @@ -8,7 +8,6 @@ import ( "path/filepath" "time" - "github.com/diamondburned/gotk4/pkg/glib/v2" "github.com/go-gst/go-gst/examples/plugins/registered_elements/internal/custombin" "github.com/go-gst/go-gst/examples/plugins/registered_elements/internal/customsrc" "github.com/go-gst/go-gst/pkg/gst" @@ -37,54 +36,50 @@ func run(ctx context.Context) error { return err } - pipeline := ret.(*gst.Pipeline) + pipeline := ret.(gst.Pipeline) pipeline.UseClock(systemclock) - bus := pipeline.Bus() - - mainloop := glib.NewMainLoop(glib.MainContextDefault(), false) + bus := pipeline.GetBus() pipeline.SetState(gst.StatePlaying) - bus.AddWatch(0, func(bus *gst.Bus, msg *gst.Message) bool { - switch msg.Type() { - case gst.MessageStateChanged: - old, new, _ := msg.ParseStateChanged() - dot := gst.DebugBinToDotData(&pipeline.Bin, gst.DebugGraphShowVerbose) + go func() { + for msg := range bus.Messages(ctx) { + switch msg.Type() { + case gst.MessageStateChanged: + old, new, _ := msg.ParseStateChanged() + dot := pipeline.DebugBinToDotData(gst.DebugGraphShowVerbose) - f, err := os.OpenFile(filepath.Join(wd, fmt.Sprintf("pipeline-%s-to-%s.dot", old, new)), os.O_TRUNC|os.O_CREATE|os.O_RDWR, 0600) + f, err := os.OpenFile(filepath.Join(wd, fmt.Sprintf("pipeline-%s-to-%s.dot", old, new)), os.O_TRUNC|os.O_CREATE|os.O_RDWR, 0600) - if err != nil { + if err != nil { + cancel() + return + } + + defer f.Close() + + _, err = f.Write([]byte(dot)) + + if err != nil { + fmt.Println(err) + cancel() + return + } + + case gst.MessageEos: + fmt.Println("reached EOS") cancel() - return false + return } - defer f.Close() - - _, err = f.Write([]byte(dot)) - - if err != nil { - fmt.Println(err) - cancel() - return false - } - - case gst.MessageEos: - fmt.Println("reached EOS") - cancel() - return false + return } - - return true - }) - - go mainloop.Run() + }() <-ctx.Done() - mainloop.Quit() - pipeline.BlockSetState(gst.StateNull, gst.ClockTime(time.Second)) gst.Deinit() diff --git a/examples/queries/main.go b/examples/queries/main.go index 8cc5a34..6309834 100644 --- a/examples/queries/main.go +++ b/examples/queries/main.go @@ -15,12 +15,12 @@ package main import ( + "context" "fmt" "os" "strings" "time" - "github.com/diamondburned/gotk4/pkg/glib/v2" "github.com/go-gst/go-gst/pkg/gst" ) @@ -33,8 +33,6 @@ func queries() error { gst.Init() - mainLoop := glib.NewMainLoop(glib.MainContextDefault(), false) - // Let GStreamer create a pipeline from the parsed launch syntax on the cli. pipelineStr := strings.Join(os.Args[1:], " ") ret, err := gst.ParseLaunch(pipelineStr) @@ -42,10 +40,10 @@ func queries() error { return err } - pipeline := ret.(gst.Binner) + pipeline := ret.(gst.Pipeline) // Get a reference to the pipeline bus - bus := pipeline.Bus() + bus := pipeline.GetBus() // Start the pipeline pipeline.SetState(gst.StatePlaying) @@ -80,24 +78,22 @@ func queries() error { } }() - bus.AddWatch(0, func(bus *gst.Bus, msg *gst.Message) bool { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + for msg := range bus.Messages(ctx) { switch msg.Type() { case gst.MessageEos: - mainLoop.Quit() + return nil case gst.MessageError: - gstErr, debug := msg.ParseError() - fmt.Printf("Error from %s: %s\n", msg.Src(), gstErr.Error()) + debug, gstErr := msg.ParseError() + fmt.Printf("Error from %s: %s\n", msg.Source().GetName(), gstErr.Error()) if debug != "" { fmt.Println("go-gst-debug:", debug) } - mainLoop.Quit() + return nil } - return true - }) - - mainLoop.Run() - - bus.RemoveWatch() + } return nil } diff --git a/examples/requestpad/main.go b/examples/requestpad/main.go index 756a104..aad155b 100644 --- a/examples/requestpad/main.go +++ b/examples/requestpad/main.go @@ -1,6 +1,7 @@ package main import ( + "context" "errors" "fmt" "os" @@ -10,7 +11,7 @@ import ( ) type workflow struct { - *gst.Pipeline + gst.Pipeline } func (w *workflow) newSrc() { @@ -27,26 +28,26 @@ func (w *workflow) newSrc() { src.Link(caps) // Get a sink pad on compositor - mixer := w.ByName("mixer") + mixer := w.GetByName("mixer") pad := mixer.GetRequestPad("sink_%u") pad.SetObjectProperty("xpos", 640) pad.SetObjectProperty("ypos", 0) - caps.StaticPad("src").Link(pad) + caps.GetStaticPad("src").Link(pad) caps.SyncStateWithParent() src.SyncStateWithParent() } func (w *workflow) delSrc() { - mixer := w.ByName("mixer") + mixer := w.GetByName("mixer") - src := w.ByName("src2") + src := w.GetByName("src2") - caps := w.ByName("caps2") + caps := w.GetByName("caps2") - pad := mixer.StaticPad("sink_1") + pad := mixer.GetStaticPad("sink_1") if pad == nil { fmt.Printf("pad is null\n") return @@ -60,7 +61,7 @@ func (w *workflow) delSrc() { mixer.ReleaseRequestPad(pad) } -func createPipeline() (*gst.Pipeline, error) { +func createPipeline() (gst.Pipeline, error) { gst.Init() ret, err := gst.ParseLaunch("videotestsrc ! video/x-raw , capsfilter caps=width=640,height=360 name=caps1 ! compositor name=mixer ! autovideosink") @@ -70,7 +71,7 @@ func createPipeline() (*gst.Pipeline, error) { var w workflow - w.Pipeline = ret.(*gst.Pipeline) + w.Pipeline = ret.(gst.Pipeline) go func() { time.Sleep(time.Second) @@ -83,12 +84,12 @@ func createPipeline() (*gst.Pipeline, error) { return w.Pipeline, nil } -func runPipeline(loop *glib.MainLoop, pipeline *gst.Pipeline) error { +func runPipeline(pipeline gst.Pipeline) error { // Start the pipeline pipeline.SetState(gst.StatePlaying) // Add a message watch to the bus to quit on any error - pipeline.Bus().AddWatch(0, func(bus *gst.Bus, msg *gst.Message) bool { + for msg := range pipeline.GetBus().Messages(context.Background()) { var err error // If the stream has ended or any element posts an error to the @@ -99,7 +100,7 @@ func runPipeline(loop *glib.MainLoop, pipeline *gst.Pipeline) error { case gst.MessageError: // The parsed error implements the error interface, but also // contains additional debug information. - gerr, debug := msg.ParseError() + debug, gerr := msg.ParseError() fmt.Println("go-gst-debug:", debug) err = gerr } @@ -107,24 +108,18 @@ func runPipeline(loop *glib.MainLoop, pipeline *gst.Pipeline) error { // If either condition triggered an error, log and quit if err != nil { fmt.Println("ERROR:", err.Error()) - loop.Quit() - return false + return err } + } - return true - }) - - // Block on the main loop - return loop.RunError() + panic("unreachable") } func main() { - loop := glib.NewMainLoop(glib.MainContextDefault(), false) - pipeline, err := createPipeline() if err != nil { os.Exit(2) } - runPipeline(loop, pipeline) + runPipeline(pipeline) } diff --git a/examples/signals/main.go b/examples/signals/main.go deleted file mode 100644 index ab6a370..0000000 --- a/examples/signals/main.go +++ /dev/null @@ -1,51 +0,0 @@ -package main - -import ( - "log" - "log/slog" - "runtime" - "time" - - "github.com/go-gst/go-gst/pkg/gst" -) - -func mkObject() { - el := gst.ElementFactoryMake("decodebin", "").(*gst.Bin) - - h := el.ConnectPadAdded(func(newPad *gst.Pad) { - el.SetName("foobar") - // log.Println("handler") - }) - - runtime.AddCleanup(el, func(_ struct{}) { - log.Println("garbage collected element") - }, struct{}{}) - - // runtime.AddCleanup(pipeline, func(el *gst.Bin) { - // el.HandlerDisconnect(h) - // }, el) - - _ = h - - return -} - -func main() { - gst.Init() - - slog.SetLogLoggerLevel(slog.LevelDebug) - - log.Println("go:") - for range 5 { - log.Println("loop") - mkObject() - - runtime.GC() - runtime.GC() - runtime.GC() - } - - runtime.GC() - time.Sleep(2 * time.Second) - runtime.GC() -} diff --git a/examples/tagsetter/main.go b/examples/tagsetter/main.go index 92950d8..b89759e 100644 --- a/examples/tagsetter/main.go +++ b/examples/tagsetter/main.go @@ -24,7 +24,6 @@ package main import ( "fmt" - coreglib "github.com/diamondburned/gotk4/pkg/core/glib" "github.com/go-gst/go-gst/pkg/gst" ) @@ -38,15 +37,15 @@ func tagsetter() error { return err } - pipeline := ret.(*gst.Pipeline) + pipeline := ret.(gst.Pipeline) // Query the pipeline for elements implementing the GstTagsetter interface. // In our case, this will return the flacenc element. - element := pipeline.ByInterface(gst.GTypeTagSetter) + element := pipeline.GetByInterface(gst.TypeTagSetter) // We actually just retrieved a *gst.Element with the above call. We can retrieve // the underying TagSetter interface like this. - tagsetter := element.(*gst.TagSetter) + tagsetter := element.(gst.TagSetter) // Tell the element implementing the GstTagsetter interface how to handle already existing // metadata. @@ -56,14 +55,14 @@ func tagsetter() error { // // The first parameter gst.TagMergeAppend tells the tagsetter to append this title // if there already is one. - tagsetter.AddTagValue(gst.TagMergeAppend, gst.TAG_TITLE, coreglib.NewValue("Special randomized white-noise")) + tagsetter.AddTagValue(gst.TagMergeAppend, gst.TAG_TITLE, "Special randomized white-noise") pipeline.SetState(gst.StatePlaying) var cont bool var pipelineErr error for { - msg := pipeline.Bus().TimedPop(gst.ClockTimeNone) + msg := pipeline.GetBus().TimedPop(gst.ClockTimeNone) if msg == nil { break } @@ -83,7 +82,7 @@ func handleMessage(msg *gst.Message) (bool, error) { case gst.MessageEos: return false, nil case gst.MessageError: - err, _ := msg.ParseError() + _, err := msg.ParseError() return false, err } return true, nil diff --git a/examples/toc/main.go b/examples/toc/main.go index 4330b14..c83ac85 100644 --- a/examples/toc/main.go +++ b/examples/toc/main.go @@ -27,7 +27,7 @@ func tagsetter() error { return errors.New("usage: toc ") } - pipeline := gst.NewPipeline("") + pipeline := gst.NewPipeline("").(gst.Pipeline) src := gst.ElementFactoryMake("filesrc", "") @@ -40,7 +40,7 @@ func tagsetter() error { // Connect to decodebin's pad-added signal, that is emitted whenever it found another stream // from the input file and found a way to decode it to its raw format. - decodebin.ConnectPadAdded(func(srcPad *gst.Pad) { + decodebin.ConnectPadAdded(func(self gst.Element, srcPad gst.Pad) { // In this example, we are only interested about parsing the ToC, so // we simply pipe every encountered stream into a fakesink, essentially @@ -53,7 +53,7 @@ func tagsetter() error { queue.SyncStateWithParent() fakesink.SyncStateWithParent() - sinkPad := queue.StaticPad("sink") + sinkPad := queue.GetStaticPad("sink") if sinkPad == nil { fmt.Println("Could not get static pad from sink") return @@ -73,7 +73,7 @@ func tagsetter() error { // timed_pop on the bus with the desired timeout for when to stop waiting for new messages. // (-1 = Wait forever) for { - msg := pipeline.Bus().TimedPop(gst.ClockTimeNone) + msg := pipeline.GetBus().TimedPop(gst.ClockTimeNone) switch msg.Type() { // When we use this method of popping from the bus (instead of a Watch), we own a @@ -85,7 +85,7 @@ func tagsetter() error { case gst.MessageEos: // Errors from any elements case gst.MessageError: - gerr, debug := msg.ParseError() + debug, gerr := msg.ParseError() if debug != "" { fmt.Println("go-gst-debug:", debug) } @@ -96,9 +96,9 @@ func tagsetter() error { case gst.MessageToc: // Parse the toc from the message toc, updated := msg.ParseToc() - fmt.Printf("Received toc: %s - updated %v\n", toc.Scope().String(), updated) + fmt.Printf("Received toc: %s - updated %v\n", toc.GetScope().String(), updated) // Get a list of tags that are ToC specific. - if tags := toc.Tags(); tags != nil { + if tags := toc.GetTags(); tags != nil { fmt.Println("- tags:", tags) } // ToCs do not have a fixed structure. Depending on the format that @@ -108,33 +108,33 @@ func tagsetter() error { // interpreting the ToC manually. // In this example, we simply want to print the ToC structure, so // we iterate everything and don't try to interpret anything. - for _, entry := range toc.Entries() { + for _, entry := range toc.GetEntries() { // Every entry in a ToC has its own type. One type could for // example be Chapter. - fmt.Printf("\t%s - %s\n", entry.EntryType().String(), entry.Uid()) + fmt.Printf("\t%s - %s\n", entry.GetEntryType().String(), entry.GetUid()) // Every ToC entry can have a set of timestamps (start, stop). - if start, stop, ok := entry.StartStopTimes(); ok { + if start, stop, ok := entry.GetStartStopTimes(); ok { startDur := time.Duration(start) * time.Nanosecond stopDur := time.Duration(stop) * time.Nanosecond fmt.Printf("\t- start: %s, stop: %s\n", startDur, stopDur) } // Every ToC entry can have tags to it. - if tags := entry.Tags(); tags != nil { + if tags := entry.GetTags(); tags != nil { fmt.Println("\t- tags:", tags) } // Every ToC entry can have a set of child entries. // With this structure, you can create trees of arbitrary depth. - for _, subEntry := range entry.SubEntries() { - fmt.Printf("\n\t\t%s - %s\n", subEntry.EntryType().String(), subEntry.Uid()) - if start, stop, ok := entry.StartStopTimes(); ok { + for _, subEntry := range entry.GetSubEntries() { + fmt.Printf("\n\t\t%s - %s\n", subEntry.GetEntryType().String(), subEntry.GetUid()) + if start, stop, ok := entry.GetStartStopTimes(); ok { startDur := time.Duration(start) * time.Nanosecond stopDur := time.Duration(stop) * time.Nanosecond fmt.Printf("\t\t- start: %s, stop: %s\n", startDur, stopDur) } - if tags := entry.Tags(); tags != nil { + if tags := entry.GetTags(); tags != nil { fmt.Println("\t\t- tags:", tags) } } diff --git a/generator.go b/generator.go index 69a2545..7123a45 100644 --- a/generator.go +++ b/generator.go @@ -142,6 +142,20 @@ var Data = genmain.Overlay( // gobject.NewValue handles this already. typesystem.IgnoreMatching("util_set_value_from_string"), + + // Buffer mapping is manually implemented: + typesystem.IgnoreMatching("Buffer.map"), + typesystem.IgnoreMatching("Buffer.unmap"), + typesystem.IgnoreMatching("MapInfo"), + + // Requires a gvalue arg, manually implemented: + typesystem.IgnoreMatching("TagSetter.add_tag_value"), + }, + }, + "GstBase-1": { + IgnoredDefinitions: []typesystem.IgnoreFunc{ + // has unexported free function that crashes the linker when compiling the examples: + typesystem.IgnoreMatching("TypeFindData"), }, }, "GstVideo-1": { @@ -171,6 +185,7 @@ var Data = genmain.Overlay( typesystem.MarkAsManuallyExtended("Gst-1", "Bin"), typesystem.MarkAsManuallyExtended("Gst-1", "Bus"), typesystem.MarkAsManuallyExtended("Gst-1", "ChildProxy"), + typesystem.MarkAsManuallyExtended("Gst-1", "TagSetter"), func(r *typesystem.Registry) error { // this is needed to fix gstreamer <= 1.24.10. Remove once upgraded in the flake webrtc := r.FindNamespaceByName("GstWebRTC-1") diff --git a/pkg/gst/element_manual.go b/pkg/gst/element_manual.go index 3924899..22244b5 100644 --- a/pkg/gst/element_manual.go +++ b/pkg/gst/element_manual.go @@ -14,3 +14,17 @@ func (el *ElementInstance) BlockSetState(state State, timeout ClockTime) StateCh return ret } + +func LinkMany(elements ...Element) bool { + if len(elements) < 2 { + return false + } + + for i := 0; i < len(elements)-1; i++ { + if !elements[i].Link(elements[i+1]) { + return false + } + } + + return true +} diff --git a/pkg/gst/gst.gen.go b/pkg/gst/gst.gen.go index 1f7f94e..5869c43 100644 --- a/pkg/gst/gst.gen.go +++ b/pkg/gst/gst.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for Gst-1. DO NOT EDIT. package gst @@ -28,6 +28,8 @@ import ( // extern gboolean _gotk4_gst1_ElementForEachPadFunc(GstElement*, GstPad*, gpointer); // extern gboolean _gotk4_gst1_IteratorFoldFunction(GValue*, GValue*, gpointer); // extern gboolean _gotk4_gst1_PadForwardFunction(GstPad*, gpointer); +// extern gboolean _gotk4_gst1_PluginFeatureFilter(GstPluginFeature*, gpointer); +// 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_StructureForEachFunc(GQuark, GValue*, gpointer); @@ -38,6 +40,7 @@ import ( // extern void _gotk4_gst1_PromiseChangeFunc(GstPromise*, gpointer); // extern void _gotk4_gst1_TagForEachFunc(GstTagList*, gchar*, gpointer); // extern void _gotk4_gst1_TaskFunction(gpointer); +// extern void _gotk4_gst1_TypeFindFunction(GstTypeFind*, gpointer); // extern void destroyUserdata(gpointer); import "C" @@ -6924,7 +6927,7 @@ func DebugAddRingBufferLogger(maxSizePerThread uint, threadTimeout uint) { func DebugBinToDotData(bin Bin, details DebugGraphDetails) string { var carg1 *C.GstBin // in, none, converted var carg2 C.GstDebugGraphDetails // in, none, casted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = (*C.GstBin)(UnsafeBinToGlibNone(bin)) carg2 = C.GstDebugGraphDetails(details) @@ -6959,7 +6962,7 @@ func DebugBinToDotData(bin Bin, details DebugGraphDetails) string { func DebugBinToDotFile(bin Bin, details DebugGraphDetails, fileName string) { var carg1 *C.GstBin // in, none, converted var carg2 C.GstDebugGraphDetails // in, none, casted - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string carg1 = (*C.GstBin)(UnsafeBinToGlibNone(bin)) carg2 = C.GstDebugGraphDetails(details) @@ -6985,7 +6988,7 @@ func DebugBinToDotFile(bin Bin, details DebugGraphDetails, fileName string) { func DebugBinToDotFileWithTs(bin Bin, details DebugGraphDetails, fileName string) { var carg1 *C.GstBin // in, none, converted var carg2 C.GstDebugGraphDetails // in, none, casted - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string carg1 = (*C.GstBin)(UnsafeBinToGlibNone(bin)) carg2 = C.GstDebugGraphDetails(details) @@ -7013,7 +7016,7 @@ func DebugBinToDotFileWithTs(bin Bin, details DebugGraphDetails, fileName string // You need to free the string after use. func DebugConstructTermColor(colorinfo uint) string { var carg1 C.guint // in, none, casted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = C.guint(colorinfo) @@ -7059,6 +7062,33 @@ func DebugConstructWinColor(colorinfo uint) int { return goret } +// DebugGetAllCategories wraps gst_debug_get_all_categories +// The function returns the following values: +// +// - goret []*DebugCategory +// +// Returns a snapshot of a all categories that are currently in use . This list +// may change anytime. +// The caller has to free the list after use. +func DebugGetAllCategories() []*DebugCategory { + var cret *C.GSList // container, transfer: container + + cret = C.gst_debug_get_all_categories() + + var goret []*DebugCategory + + goret = glib.UnsafeSListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) *DebugCategory { + var dst *DebugCategory // converted + dst = UnsafeDebugCategoryFromGlibNone(v) + return dst + }, + ) + + return goret +} + // DebugGetColorMode wraps gst_debug_get_color_mode // The function returns the following values: // @@ -7107,7 +7137,7 @@ func DebugGetDefaultThreshold() DebugLevel { // - goret string func DebugGetStackTrace(flags StackTraceFlags) string { var carg1 C.GstStackTraceFlags // in, none, casted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = C.GstStackTraceFlags(flags) @@ -7187,12 +7217,12 @@ func DebugIsColored() bool { func DebugLogGetLine(category *DebugCategory, level DebugLevel, file string, function string, line int, 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, casted *C.gchar - var carg4 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string + var carg4 *C.gchar // in, none, string var carg5 C.gint // in, none, casted var carg6 *C.GObject // in, none, converted, nullable var carg7 *C.GstDebugMessage // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = (*C.GstDebugCategory)(UnsafeDebugCategoryToGlibNone(category)) carg2 = C.GstDebugLevel(level) @@ -7240,11 +7270,11 @@ func DebugLogGetLine(category *DebugCategory, level DebugLevel, file string, fun func DebugLogIDLiteral(category *DebugCategory, level DebugLevel, file string, function string, line int, 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, casted *C.gchar - var carg4 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string + var carg4 *C.gchar // in, none, string var carg5 C.gint // in, none, casted var carg6 *C.gchar // in, none, string, nullable-string - var carg7 *C.gchar // in, none, string, casted *C.gchar + var carg7 *C.gchar // in, none, string carg1 = (*C.GstDebugCategory)(UnsafeDebugCategoryToGlibNone(category)) carg2 = C.GstDebugLevel(level) @@ -7287,11 +7317,11 @@ func DebugLogIDLiteral(category *DebugCategory, level DebugLevel, file string, f func DebugLogLiteral(category *DebugCategory, level DebugLevel, file string, function string, line int, 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, casted *C.gchar - var carg4 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string + var carg4 *C.gchar // in, none, string var carg5 C.gint // in, none, casted var carg6 *C.GObject // in, none, converted, nullable - var carg7 *C.gchar // in, none, string, casted *C.gchar + var carg7 *C.gchar // in, none, string carg1 = (*C.GstDebugCategory)(UnsafeDebugCategoryToGlibNone(category)) carg2 = C.GstDebugLevel(level) @@ -7406,7 +7436,7 @@ func DebugSetColorMode(mode DebugColorMode) { // // This function may be called before gst_init(). func DebugSetColorModeFromString(mode string) { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(mode))) defer C.free(unsafe.Pointer(carg1)) @@ -7466,7 +7496,7 @@ func DebugSetDefaultThreshold(level DebugLevel) { // Sets all categories which match the given glob style pattern to the given // level. func DebugSetThresholdForName(name string, level DebugLevel) { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.GstDebugLevel // in, none, casted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -7493,7 +7523,7 @@ func DebugSetThresholdForName(name string, level DebugLevel) { // the order matters when you use wild cards, e.g. `foosrc:6,*src:3,*:2` sets // everything to log level 2. func DebugSetThresholdFromString(list string, reset bool) { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gboolean // in carg1 = (*C.gchar)(unsafe.Pointer(C.CString(list))) @@ -7515,7 +7545,7 @@ func DebugSetThresholdFromString(list string, reset bool) { // // Resets all categories with the given name back to the default level. func DebugUnsetThresholdForName(name string) { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) defer C.free(unsafe.Pointer(carg1)) @@ -7587,7 +7617,7 @@ func DynamicTypeRegister(plugin Plugin, typ gobject.Type) bool { func ErrorGetMessage(domain glib.Quark, code int) string { var carg1 C.GQuark // in, none, casted, alias var carg2 C.gint // in, none, casted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = C.GQuark(domain) carg2 = C.gint(code) @@ -7622,8 +7652,8 @@ func ErrorGetMessage(domain glib.Quark, code int) string { // // On Windows @filename should be in UTF-8 encoding. func FilenameToURI(filename string) (string, error) { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, full, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, full, string var _cerr *C.GError // out, full, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(filename))) @@ -7657,7 +7687,7 @@ func FilenameToURI(filename string) (string, error) { // Gets a string representing the given flow return. func FlowGetName(ret FlowReturn) string { var carg1 C.GstFlowReturn // in, none, casted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg1 = C.GstFlowReturn(ret) @@ -7746,7 +7776,7 @@ func FormatsContains(formats []Format, format Format) bool { // external process, the returned path will be the same as from the // parent process. func GetMainExecutablePath() string { - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string cret = C.gst_get_main_executable_path() @@ -7848,7 +7878,7 @@ func ParentBufferMetaApiGetType() gobject.Type { // and want them all ghosted, you will have to create the ghost pads // yourself). func ParseBinFromDescription(binDescription string, ghostUnlinkedPads bool) (Bin, error) { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gboolean // in var cret *C.GstElement // return, none, converted, casted *C.GstBin var _cerr *C.GError // out, full, converted, nullable @@ -7900,7 +7930,7 @@ func ParseBinFromDescription(binDescription string, ghostUnlinkedPads bool) (Bin // and want them all ghosted, you will have to create the ghost pads // yourself). func ParseBinFromDescriptionFull(binDescription string, ghostUnlinkedPads bool, _context *ParseContext, flags ParseFlags) (Element, error) { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gboolean // in var carg3 *C.GstParseContext // in, none, converted, nullable var carg4 C.GstParseFlags // in, none, casted @@ -7953,7 +7983,7 @@ func ParseBinFromDescriptionFull(binDescription string, ghostUnlinkedPads bool, // To create a sub-pipeline (bin) for embedding into an existing pipeline // use gst_parse_bin_from_description(). func ParseLaunch(pipelineDescription string) (Element, error) { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstElement // return, none, converted var _cerr *C.GError // out, full, converted, nullable @@ -7996,7 +8026,7 @@ func ParseLaunch(pipelineDescription string) (Element, error) { // To create a sub-pipeline (bin) for embedding into an existing pipeline // use gst_parse_bin_from_description_full(). func ParseLaunchFull(pipelineDescription string, _context *ParseContext, flags ParseFlags) (Element, error) { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 *C.GstParseContext // in, none, converted, nullable var carg3 C.GstParseFlags // in, none, casted var cret *C.GstElement // return, none, converted @@ -8092,7 +8122,7 @@ func ProtectionMetaApiGetType() gobject.Type { // element matches, the system ID of the highest ranked element is selected. func ProtectionSelectSystem(systemIdentifiers []string) string { var carg1 **C.gchar // in, transfer: none, C Pointers: 2, Name: array[utf8], array (inner: *typesystem.StringPrimitive, zero-terminated) - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string _ = systemIdentifiers _ = carg1 @@ -8181,7 +8211,7 @@ func SegtrapSetEnabled(enabled bool) { // // Checks if the given type is already registered. func TagExists(tag string) bool { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg1 = (*C.gchar)(unsafe.Pointer(C.CString(tag))) @@ -8212,8 +8242,8 @@ func TagExists(tag string) bool { // Returns the human-readable description of this tag, You must not change or // free this string. func TagGetDescription(tag string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(tag))) defer C.free(unsafe.Pointer(carg1)) @@ -8240,7 +8270,7 @@ func TagGetDescription(tag string) string { // // Gets the flag of @tag. func TagGetFlag(tag string) TagFlag { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.GstTagFlag // return, none, casted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(tag))) @@ -8269,8 +8299,8 @@ func TagGetFlag(tag string) TagFlag { // Returns the human-readable name of this tag, You must not change or free // this string. func TagGetNick(tag string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(tag))) defer C.free(unsafe.Pointer(carg1)) @@ -8297,7 +8327,7 @@ func TagGetNick(tag string) string { // // Gets the #GType used for this tag. func TagGetType(tag string) gobject.Type { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.GType // return, none, casted, alias carg1 = (*C.gchar)(unsafe.Pointer(C.CString(tag))) @@ -8326,7 +8356,7 @@ func TagGetType(tag string) gobject.Type { // Checks if the given tag is fixed. A fixed tag can only contain one value. // Unfixed tags can contain lists of values. func TagIsFixed(tag string) bool { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg1 = (*C.gchar)(unsafe.Pointer(C.CString(tag))) @@ -8405,6 +8435,32 @@ func TagMergeUseFirst(src *gobject.Value) gobject.Value { return dest } +// TracingGetActiveTracers wraps gst_tracing_get_active_tracers +// The function returns the following values: +// +// - goret []Tracer +// +// Get a list of all active tracer objects owned by the tracing framework for +// the entirety of the run-time of the process or till gst_deinit() is called. +func TracingGetActiveTracers() []Tracer { + var cret *C.GList // container, transfer: full + + cret = C.gst_tracing_get_active_tracers() + + var goret []Tracer + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) Tracer { + var dst Tracer // converted + dst = UnsafeTracerFromGlibFull(v) + return dst + }, + ) + + return goret +} + // TypeIsPluginApi wraps gst_type_is_plugin_api // // The function takes the following parameters: @@ -8611,8 +8667,8 @@ func UtilDumpMem(mem []byte) { // // Compares the given filenames using natural ordering. func UtilFilenameCompare(a string, b string) int { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string var cret C.gint // return, none, casted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(a))) @@ -9031,8 +9087,8 @@ func UtilSeqnumNext() uint32 { // @name or when @value cannot be converted to the type of the property. func UtilSetObjectArg(object gobject.Object, name string, value string) { var carg1 *C.GObject // in, none, converted - var carg2 *C.gchar // in, none, string, casted *C.gchar - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string + var carg3 *C.gchar // in, none, string carg1 = (*C.GObject)(gobject.UnsafeObjectToGlibNone(object)) carg2 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -9504,7 +9560,7 @@ func ValueCompare(value1 *gobject.Value, value2 *gobject.Value) int { // Tries to deserialize a string into the type specified by the given GValue. // If the operation succeeds, %TRUE is returned, %FALSE otherwise. func ValueDeserialize(src string) (gobject.Value, bool) { - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var carg1 C.GValue // out, transfer: none, C Pointers: 0, Name: Value, caller-allocates var cret C.gboolean // return @@ -10299,7 +10355,7 @@ func ValueRegister(table *ValueTable) { // Free-function: g_free func ValueSerialize(value *gobject.Value) string { var carg1 *C.GValue // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = (*C.GValue)(gobject.UnsafeValueToGlibUseAnyInstead(value)) @@ -10752,7 +10808,7 @@ func Version() (uint, uint, uint, uint) { // This function returns a string that is useful for describing this version // of GStreamer to the outside world: user agent strings, logging, ... func VersionString() string { - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string cret = C.gst_version_string() @@ -10922,7 +10978,7 @@ func UnsafeChildProxyToGlibFull(c ChildProxy) unsafe.Pointer { func (parent *ChildProxyInstance) ChildAdded(child gobject.Object, name string) { var carg0 *C.GstChildProxy // in, none, converted var carg1 *C.GObject // in, none, converted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string carg0 = (*C.GstChildProxy)(UnsafeChildProxyToGlibNone(parent)) carg1 = (*C.GObject)(gobject.UnsafeObjectToGlibNone(child)) @@ -10946,7 +11002,7 @@ func (parent *ChildProxyInstance) ChildAdded(child gobject.Object, name string) func (parent *ChildProxyInstance) ChildRemoved(child gobject.Object, name string) { var carg0 *C.GstChildProxy // in, none, converted var carg1 *C.GObject // in, none, converted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string carg0 = (*C.GstChildProxy)(UnsafeChildProxyToGlibNone(parent)) carg1 = (*C.GObject)(gobject.UnsafeObjectToGlibNone(child)) @@ -11006,7 +11062,7 @@ func (parent *ChildProxyInstance) GetChildByIndex(index uint) gobject.Object { // #GObjects, this methods needs to be overridden. func (parent *ChildProxyInstance) GetChildByName(name string) gobject.Object { var carg0 *C.GstChildProxy // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GObject // return, full, converted carg0 = (*C.GstChildProxy)(UnsafeChildProxyToGlibNone(parent)) @@ -11044,7 +11100,7 @@ func (parent *ChildProxyInstance) GetChildByName(name string) gobject.Object { // element names only and should not contain any property names. func (childProxy *ChildProxyInstance) GetChildByNameRecurse(name string) gobject.Object { var carg0 *C.GstChildProxy // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GObject // return, full, converted carg0 = (*C.GstChildProxy)(UnsafeChildProxyToGlibNone(childProxy)) @@ -11283,7 +11339,7 @@ func UnsafePresetToGlibFull(c Preset) unsafe.Pointer { // Gets the directory for application specific presets if set by the // application. func PresetGetAppDir() string { - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string cret = C.gst_preset_get_app_dir() @@ -11308,7 +11364,7 @@ func PresetGetAppDir() string { // looking for presets. Any presets in the application dir will shadow the // system presets. func PresetSetAppDir(appDir string) bool { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg1 = (*C.gchar)(unsafe.Pointer(C.CString(appDir))) @@ -11339,7 +11395,7 @@ func PresetSetAppDir(appDir string) bool { // Delete the given preset. func (preset *PresetInstance) DeletePreset(name string) bool { var carg0 *C.GstPreset // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstPreset)(UnsafePresetToGlibNone(preset)) @@ -11375,9 +11431,9 @@ func (preset *PresetInstance) DeletePreset(name string) bool { // something like e.g. "comment". Returned values need to be released when done. func (preset *PresetInstance) GetMeta(name string, tag string) (string, bool) { var carg0 *C.GstPreset // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar - var carg3 *C.gchar // out, full, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string + var carg3 *C.gchar // out, full, string var cret C.gboolean // return carg0 = (*C.GstPreset)(UnsafePresetToGlibNone(preset)) @@ -11488,7 +11544,7 @@ func (preset *PresetInstance) IsEditable() bool { // Load the given preset. func (preset *PresetInstance) LoadPreset(name string) bool { var carg0 *C.GstPreset // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstPreset)(UnsafePresetToGlibNone(preset)) @@ -11523,8 +11579,8 @@ func (preset *PresetInstance) LoadPreset(name string) bool { // overwritten. func (preset *PresetInstance) RenamePreset(oldName string, newName string) bool { var carg0 *C.GstPreset // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstPreset)(UnsafePresetToGlibNone(preset)) @@ -11561,7 +11617,7 @@ func (preset *PresetInstance) RenamePreset(oldName string, newName string) bool // is already a preset by this @name it will be overwritten. func (preset *PresetInstance) SavePreset(name string) bool { var carg0 *C.GstPreset // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstPreset)(UnsafePresetToGlibNone(preset)) @@ -11598,8 +11654,8 @@ func (preset *PresetInstance) SavePreset(name string) bool { // @value will unset an existing value. func (preset *PresetInstance) SetMeta(name string, tag string, value string) bool { var carg0 *C.GstPreset // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string var carg3 *C.gchar // in, none, string, nullable-string var cret C.gboolean // return @@ -11757,7 +11813,7 @@ func (handler *URIHandlerInstance) GetProtocols() []string { // Gets the currently handled URI. func (handler *URIHandlerInstance) GetURI() string { var carg0 *C.GstURIHandler // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstURIHandler)(UnsafeURIHandlerToGlibNone(handler)) @@ -11808,7 +11864,7 @@ func (handler *URIHandlerInstance) GetURIType() URIType { // Tries to set the URI of the given handler. func (handler *URIHandlerInstance) SetURI(uri string) (bool, error) { var carg0 *C.GstURIHandler // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return var _cerr *C.GError // out, full, converted, nullable @@ -11884,18 +11940,9 @@ var _ TagSetter = (*TagSetterInstance)(nil) // GST_LOG_OBJECT (tagsetter, "final tags: %" GST_PTR_FORMAT, result); // ]| type TagSetter interface { + TagSetterExtManual // handwritten functions upcastToGstTagSetter() *TagSetterInstance - // AddTagValue wraps gst_tag_setter_add_tag_value - // - // The function takes the following parameters: - // - // - mode TagMergeMode: the mode to use - // - tag string: tag to set - // - value *gobject.Value: GValue to set for the tag - // - // Adds the given tag / GValue pair on the setter using the given merge mode. - AddTagValue(TagMergeMode, string, *gobject.Value) // GetTagList wraps gst_tag_setter_get_tag_list // The function returns the following values: // @@ -11978,34 +12025,6 @@ func UnsafeTagSetterToGlibFull(c TagSetter) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(&i.Instance) } -// AddTagValue wraps gst_tag_setter_add_tag_value -// -// The function takes the following parameters: -// -// - mode TagMergeMode: the mode to use -// - tag string: tag to set -// - value *gobject.Value: GValue to set for the tag -// -// Adds the given tag / GValue pair on the setter using the given merge mode. -func (setter *TagSetterInstance) AddTagValue(mode TagMergeMode, tag string, value *gobject.Value) { - var carg0 *C.GstTagSetter // in, none, converted - var carg1 C.GstTagMergeMode // in, none, casted - var carg2 *C.gchar // in, none, string, casted *C.gchar - var carg3 *C.GValue // in, none, converted - - carg0 = (*C.GstTagSetter)(UnsafeTagSetterToGlibNone(setter)) - carg1 = C.GstTagMergeMode(mode) - carg2 = (*C.gchar)(unsafe.Pointer(C.CString(tag))) - defer C.free(unsafe.Pointer(carg2)) - carg3 = (*C.GValue)(gobject.UnsafeValueToGlibUseAnyInstead(value)) - - C.gst_tag_setter_add_tag_value(carg0, carg1, carg2, carg3) - runtime.KeepAlive(setter) - runtime.KeepAlive(mode) - runtime.KeepAlive(tag) - runtime.KeepAlive(value) -} - // GetTagList wraps gst_tag_setter_get_tag_list // The function returns the following values: // @@ -12684,7 +12703,7 @@ func (source *ObjectInstance) DefaultError(debug string, err error) { // unreferenced again after use. func (object *ObjectInstance) CurrentControlBinding(propertyName string) ControlBinding { var carg0 *C.GstObject // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstControlBinding // return, full, converted carg0 = (*C.GstObject)(UnsafeObjectToGlibNone(object)) @@ -12746,7 +12765,7 @@ func (object *ObjectInstance) GetControlRate() ClockTime { // Free-function: g_free func (object *ObjectInstance) GetName() string { var carg0 *C.GstObject // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstObject)(UnsafeObjectToGlibNone(object)) @@ -12795,7 +12814,7 @@ func (object *ObjectInstance) GetParent() Object { // Free-function: g_free func (object *ObjectInstance) GetPathString() string { var carg0 *C.GstObject // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstObject)(UnsafeObjectToGlibNone(object)) @@ -12983,7 +13002,7 @@ func (object *ObjectInstance) RemoveControlBinding(binding ControlBinding) bool // property. func (object *ObjectInstance) SetControlBindingDisabled(propertyName string, disabled bool) { var carg0 *C.GstObject // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gboolean // in carg0 = (*C.GstObject)(UnsafeObjectToGlibNone(object)) @@ -14359,7 +14378,7 @@ func NewPad(name string, direction PadDirection) Pad { // This function makes a copy of the name so you can safely free the name. func NewPadFromStaticTemplate(templ *StaticPadTemplate, name string) Pad { var carg1 *C.GstStaticPadTemplate // in, none, converted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var cret *C.GstPad // return, none, converted carg1 = (*C.GstStaticPadTemplate)(UnsafeStaticPadTemplateToGlibNone(templ)) @@ -14427,7 +14446,7 @@ func NewPadFromTemplate(templ PadTemplate, name string) Pad { // Gets a string representing the given pad-link return. func PadLinkGetName(ret PadLinkReturn) string { var carg1 C.GstPadLinkReturn // in, none, casted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg1 = C.GstPadLinkReturn(ret) @@ -14710,7 +14729,7 @@ func (pad *PadInstance) CreateStreamID(parent Element, streamId string) string { var carg0 *C.GstPad // in, none, converted var carg1 *C.GstElement // in, none, converted var carg2 *C.gchar // in, none, string, nullable-string - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstPad)(UnsafePadToGlibNone(pad)) carg1 = (*C.GstElement)(UnsafeElementToGlibNone(parent)) @@ -15187,7 +15206,7 @@ func (pad *PadInstance) GetStream() Stream { // contents should not be interpreted. func (pad *PadInstance) GetStreamID() string { var carg0 *C.GstPad // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstPad)(UnsafePadToGlibNone(pad)) @@ -16859,7 +16878,7 @@ func UnsafePadTemplateToGlibFull(c PadTemplate) unsafe.Pointer { // Creates a new pad template with a name according to the given template // and with the given arguments. func NewPadTemplate(nameTemplate string, direction PadDirection, presence PadPresence, caps *Caps) PadTemplate { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.GstPadDirection // in, none, casted var carg3 C.GstPadPresence // in, none, casted var carg4 *C.GstCaps // in, none, converted @@ -16932,7 +16951,7 @@ func NewPadTemplateFromStaticPadTemplateWithGType(padTemplate *StaticPadTemplate // Creates a new pad template with a name according to the given template // and with the given arguments. func NewPadTemplateWithGType(nameTemplate string, direction PadDirection, presence PadPresence, caps *Caps, padType gobject.Type) PadTemplate { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.GstPadDirection // in, none, casted var carg3 C.GstPadPresence // in, none, casted var carg4 *C.GstCaps // in, none, converted @@ -17337,7 +17356,7 @@ func UnsafePluginToGlibFull(c Plugin) unsafe.Pointer { // // Load the named plugin. Refs the plugin. func PluginLoadByName(name string) Plugin { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstPlugin // return, full, converted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -17366,7 +17385,7 @@ func PluginLoadByName(name string) Plugin { // // Loads the given plugin and refs it. Caller needs to unref after use. func PluginLoadFile(filename string) (Plugin, error) { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstPlugin // return, full, converted var _cerr *C.GError // out, full, converted, nullable @@ -17423,14 +17442,14 @@ func PluginLoadFile(filename string) (Plugin, error) { func PluginRegisterStaticFull(majorVersion int, minorVersion int, 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, casted *C.gchar - var carg4 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string + var carg4 *C.gchar // in, none, string var carg5 C.GstPluginInitFullFunc // callback, scope: call, closure: carg11 - var carg6 *C.gchar // in, none, string, casted *C.gchar - var carg7 *C.gchar // in, none, string, casted *C.gchar - var carg8 *C.gchar // in, none, string, casted *C.gchar - var carg9 *C.gchar // in, none, string, casted *C.gchar - var carg10 *C.gchar // in, none, string, casted *C.gchar + var carg6 *C.gchar // in, none, string + var carg7 *C.gchar // in, none, string + var carg8 *C.gchar // in, none, string + var carg9 *C.gchar // in, none, string + var carg10 *C.gchar // in, none, string var carg11 C.gpointer // implicit var cret C.gboolean // return @@ -17593,7 +17612,7 @@ func (plugin *PluginInstance) AddDependencySimple(envVars string, paths string, // - message string: the status error message func (plugin *PluginInstance) AddStatusError(message string) { var carg0 *C.GstPlugin // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstPlugin)(UnsafePluginToGlibNone(plugin)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(message))) @@ -17611,7 +17630,7 @@ func (plugin *PluginInstance) AddStatusError(message string) { // - message string: the status info message func (plugin *PluginInstance) AddStatusInfo(message string) { var carg0 *C.GstPlugin // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstPlugin)(UnsafePluginToGlibNone(plugin)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(message))) @@ -17629,7 +17648,7 @@ func (plugin *PluginInstance) AddStatusInfo(message string) { // - message string: the status warning message func (plugin *PluginInstance) AddStatusWarning(message string) { var carg0 *C.GstPlugin // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstPlugin)(UnsafePluginToGlibNone(plugin)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(message))) @@ -17671,7 +17690,7 @@ func (plugin *PluginInstance) GetCacheData() *Structure { // Get the long descriptive name of the plugin func (plugin *PluginInstance) GetDescription() string { var carg0 *C.GstPlugin // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlugin)(UnsafePluginToGlibNone(plugin)) @@ -17693,7 +17712,7 @@ func (plugin *PluginInstance) GetDescription() string { // get the filename of the plugin func (plugin *PluginInstance) GetFilename() string { var carg0 *C.GstPlugin // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlugin)(UnsafePluginToGlibNone(plugin)) @@ -17715,7 +17734,7 @@ func (plugin *PluginInstance) GetFilename() string { // get the license of the plugin func (plugin *PluginInstance) GetLicense() string { var carg0 *C.GstPlugin // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlugin)(UnsafePluginToGlibNone(plugin)) @@ -17737,7 +17756,7 @@ func (plugin *PluginInstance) GetLicense() string { // Get the short name of the plugin func (plugin *PluginInstance) GetName() string { var carg0 *C.GstPlugin // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlugin)(UnsafePluginToGlibNone(plugin)) @@ -17759,7 +17778,7 @@ func (plugin *PluginInstance) GetName() string { // get the URL where the plugin comes from func (plugin *PluginInstance) GetOrigin() string { var carg0 *C.GstPlugin // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlugin)(UnsafePluginToGlibNone(plugin)) @@ -17781,7 +17800,7 @@ func (plugin *PluginInstance) GetOrigin() string { // get the package the plugin belongs to. func (plugin *PluginInstance) GetPackage() string { var carg0 *C.GstPlugin // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlugin)(UnsafePluginToGlibNone(plugin)) @@ -17810,7 +17829,7 @@ func (plugin *PluginInstance) GetPackage() string { // There may be plugins that do not have a valid release date set on them. func (plugin *PluginInstance) GetReleaseDateString() string { var carg0 *C.GstPlugin // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlugin)(UnsafePluginToGlibNone(plugin)) @@ -17832,7 +17851,7 @@ func (plugin *PluginInstance) GetReleaseDateString() string { // get the source module the plugin belongs to. func (plugin *PluginInstance) GetSource() string { var carg0 *C.GstPlugin // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlugin)(UnsafePluginToGlibNone(plugin)) @@ -17920,7 +17939,7 @@ func (plugin *PluginInstance) GetStatusWarnings() []string { // get the version of the plugin func (plugin *PluginInstance) GetVersion() string { var carg0 *C.GstPlugin // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlugin)(UnsafePluginToGlibNone(plugin)) @@ -18246,7 +18265,7 @@ func (feature *PluginFeatureInstance) GetPlugin() Plugin { // Get the name of the plugin that provides this feature. func (feature *PluginFeatureInstance) GetPluginName() string { var carg0 *C.GstPluginFeature // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPluginFeature)(UnsafePluginFeatureToGlibNone(feature)) @@ -18697,6 +18716,22 @@ type Registry interface { // @registry and whether its version is at least the // version required. CheckFeatureVersion(string, uint, uint, uint) bool + // FeatureFilter wraps gst_registry_feature_filter + // + // The function takes the following parameters: + // + // - filter PluginFeatureFilter: the filter to use + // - first bool: only return first match + // + // The function returns the following values: + // + // - goret []PluginFeature + // + // Runs a filter against all features of the plugins in the registry + // and returns a GList with the results. + // If the first flag is set, only the first match is + // returned (as a list with a single object). + FeatureFilter(PluginFeatureFilter, bool) []PluginFeature // FindFeature wraps gst_registry_find_feature // // The function takes the following parameters: @@ -18723,6 +18758,30 @@ type Registry interface { // Find the plugin with the given name in the registry. // The plugin will be reffed; caller is responsible for unreffing. FindPlugin(string) Plugin + // GetFeatureList wraps gst_registry_get_feature_list + // + // The function takes the following parameters: + // + // - typ gobject.Type: a #GType. + // + // The function returns the following values: + // + // - goret []PluginFeature + // + // Retrieves a #GList of #GstPluginFeature of @type. + GetFeatureList(gobject.Type) []PluginFeature + // GetFeatureListByPlugin wraps gst_registry_get_feature_list_by_plugin + // + // The function takes the following parameters: + // + // - name string: a plugin name. + // + // The function returns the following values: + // + // - goret []PluginFeature + // + // Retrieves a #GList of features of the plugin with name @name. + GetFeatureListByPlugin(string) []PluginFeature // GetFeatureListCookie wraps gst_registry_get_feature_list_cookie // The function returns the following values: // @@ -18731,6 +18790,14 @@ type Registry interface { // Returns the registry's feature list cookie. This changes // every time a feature is added or removed from the registry. GetFeatureListCookie() uint32 + // GetPluginList wraps gst_registry_get_plugin_list + // The function returns the following values: + // + // - goret []Plugin + // + // Get a copy of all plugins registered in the given registry. The refcount + // of each element in the list in incremented. + GetPluginList() []Plugin // Lookup wraps gst_registry_lookup // // The function takes the following parameters: @@ -18756,6 +18823,23 @@ type Registry interface { // // Find a #GstPluginFeature with @name in @registry. LookupFeature(string) PluginFeature + // PluginFilter wraps gst_registry_plugin_filter + // + // The function takes the following parameters: + // + // - filter PluginFilter: the filter to use + // - first bool: only return first match + // + // The function returns the following values: + // + // - goret []Plugin + // + // Runs a filter against all plugins in the registry and returns a #GList with + // the results. If the first flag is set, only the first match is + // returned (as a list with a single object). + // Every plugin is reffed; use gst_plugin_list_free() after use, which + // will unref again. + PluginFilter(PluginFilter, bool) []Plugin // RemoveFeature wraps gst_registry_remove_feature // // The function takes the following parameters: @@ -18992,7 +19076,7 @@ func (registry *RegistryInstance) AddPlugin(plugin Plugin) bool { // version required. func (registry *RegistryInstance) CheckFeatureVersion(featureName string, minMajor uint, minMinor uint, minMicro uint) bool { var carg0 *C.GstRegistry // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // in, none, casted var carg3 C.guint // in, none, casted var carg4 C.guint // in, none, casted @@ -19021,6 +19105,55 @@ func (registry *RegistryInstance) CheckFeatureVersion(featureName string, minMaj return goret } +// FeatureFilter wraps gst_registry_feature_filter +// +// The function takes the following parameters: +// +// - filter PluginFeatureFilter: the filter to use +// - first bool: only return first match +// +// The function returns the following values: +// +// - goret []PluginFeature +// +// Runs a filter against all features of the plugins in the registry +// and returns a GList with the results. +// If the first flag is set, only the first match is +// returned (as a list with a single object). +func (registry *RegistryInstance) FeatureFilter(filter PluginFeatureFilter, first bool) []PluginFeature { + var carg0 *C.GstRegistry // in, none, converted + var carg1 C.GstPluginFeatureFilter // callback, scope: call, closure: carg3 + var carg2 C.gboolean // in + var carg3 C.gpointer // implicit + var cret *C.GList // container, transfer: full + + carg0 = (*C.GstRegistry)(UnsafeRegistryToGlibNone(registry)) + carg1 = (*[0]byte)(C._gotk4_gst1_PluginFeatureFilter) + carg3 = C.gpointer(userdata.Register(filter)) + defer userdata.Delete(unsafe.Pointer(carg3)) + if first { + carg2 = C.TRUE + } + + cret = C.gst_registry_feature_filter(carg0, carg1, carg2, carg3) + runtime.KeepAlive(registry) + runtime.KeepAlive(filter) + runtime.KeepAlive(first) + + var goret []PluginFeature + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) PluginFeature { + var dst PluginFeature // converted + dst = UnsafePluginFeatureFromGlibFull(v) + return dst + }, + ) + + return goret +} + // FindFeature wraps gst_registry_find_feature // // The function takes the following parameters: @@ -19035,7 +19168,7 @@ func (registry *RegistryInstance) CheckFeatureVersion(featureName string, minMaj // Find the pluginfeature with the given name and type in the registry. func (registry *RegistryInstance) FindFeature(name string, typ gobject.Type) PluginFeature { var carg0 *C.GstRegistry // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.GType // in, none, casted, alias var cret *C.GstPluginFeature // return, full, converted @@ -19070,7 +19203,7 @@ func (registry *RegistryInstance) FindFeature(name string, typ gobject.Type) Plu // The plugin will be reffed; caller is responsible for unreffing. func (registry *RegistryInstance) FindPlugin(name string) Plugin { var carg0 *C.GstRegistry // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstPlugin // return, full, converted carg0 = (*C.GstRegistry)(UnsafeRegistryToGlibNone(registry)) @@ -19088,6 +19221,81 @@ func (registry *RegistryInstance) FindPlugin(name string) Plugin { return goret } +// GetFeatureList wraps gst_registry_get_feature_list +// +// The function takes the following parameters: +// +// - typ gobject.Type: a #GType. +// +// The function returns the following values: +// +// - goret []PluginFeature +// +// Retrieves a #GList of #GstPluginFeature of @type. +func (registry *RegistryInstance) GetFeatureList(typ gobject.Type) []PluginFeature { + var carg0 *C.GstRegistry // in, none, converted + var carg1 C.GType // in, none, casted, alias + var cret *C.GList // container, transfer: full + + carg0 = (*C.GstRegistry)(UnsafeRegistryToGlibNone(registry)) + carg1 = C.GType(typ) + + cret = C.gst_registry_get_feature_list(carg0, carg1) + runtime.KeepAlive(registry) + runtime.KeepAlive(typ) + + var goret []PluginFeature + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) PluginFeature { + var dst PluginFeature // converted + dst = UnsafePluginFeatureFromGlibFull(v) + return dst + }, + ) + + return goret +} + +// GetFeatureListByPlugin wraps gst_registry_get_feature_list_by_plugin +// +// The function takes the following parameters: +// +// - name string: a plugin name. +// +// The function returns the following values: +// +// - goret []PluginFeature +// +// Retrieves a #GList of features of the plugin with name @name. +func (registry *RegistryInstance) GetFeatureListByPlugin(name string) []PluginFeature { + var carg0 *C.GstRegistry // in, none, converted + var carg1 *C.gchar // in, none, string + var cret *C.GList // container, transfer: full + + carg0 = (*C.GstRegistry)(UnsafeRegistryToGlibNone(registry)) + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_registry_get_feature_list_by_plugin(carg0, carg1) + runtime.KeepAlive(registry) + runtime.KeepAlive(name) + + var goret []PluginFeature + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) PluginFeature { + var dst PluginFeature // converted + dst = UnsafePluginFeatureFromGlibFull(v) + return dst + }, + ) + + return goret +} + // GetFeatureListCookie wraps gst_registry_get_feature_list_cookie // The function returns the following values: // @@ -19111,6 +19319,36 @@ func (registry *RegistryInstance) GetFeatureListCookie() uint32 { return goret } +// GetPluginList wraps gst_registry_get_plugin_list +// The function returns the following values: +// +// - goret []Plugin +// +// Get a copy of all plugins registered in the given registry. The refcount +// of each element in the list in incremented. +func (registry *RegistryInstance) GetPluginList() []Plugin { + var carg0 *C.GstRegistry // in, none, converted + var cret *C.GList // container, transfer: full + + carg0 = (*C.GstRegistry)(UnsafeRegistryToGlibNone(registry)) + + cret = C.gst_registry_get_plugin_list(carg0) + runtime.KeepAlive(registry) + + var goret []Plugin + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) Plugin { + var dst Plugin // converted + dst = UnsafePluginFromGlibFull(v) + return dst + }, + ) + + return goret +} + // Lookup wraps gst_registry_lookup // // The function takes the following parameters: @@ -19174,6 +19412,56 @@ func (registry *RegistryInstance) LookupFeature(name string) PluginFeature { return goret } +// PluginFilter wraps gst_registry_plugin_filter +// +// The function takes the following parameters: +// +// - filter PluginFilter: the filter to use +// - first bool: only return first match +// +// The function returns the following values: +// +// - goret []Plugin +// +// Runs a filter against all plugins in the registry and returns a #GList with +// the results. If the first flag is set, only the first match is +// returned (as a list with a single object). +// Every plugin is reffed; use gst_plugin_list_free() after use, which +// will unref again. +func (registry *RegistryInstance) PluginFilter(filter PluginFilter, first bool) []Plugin { + var carg0 *C.GstRegistry // in, none, converted + var carg1 C.GstPluginFilter // callback, scope: call, closure: carg3 + var carg2 C.gboolean // in + var carg3 C.gpointer // implicit + var cret *C.GList // container, transfer: full + + carg0 = (*C.GstRegistry)(UnsafeRegistryToGlibNone(registry)) + carg1 = (*[0]byte)(C._gotk4_gst1_PluginFilter) + carg3 = C.gpointer(userdata.Register(filter)) + defer userdata.Delete(unsafe.Pointer(carg3)) + if first { + carg2 = C.TRUE + } + + cret = C.gst_registry_plugin_filter(carg0, carg1, carg2, carg3) + runtime.KeepAlive(registry) + runtime.KeepAlive(filter) + runtime.KeepAlive(first) + + var goret []Plugin + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) Plugin { + var dst Plugin // converted + dst = UnsafePluginFromGlibFull(v) + return dst + }, + ) + + return goret +} + // RemoveFeature wraps gst_registry_remove_feature // // The function takes the following parameters: @@ -19230,7 +19518,7 @@ func (registry *RegistryInstance) RemovePlugin(plugin Plugin) { // path is specific to the registry. func (registry *RegistryInstance) ScanPath(path string) bool { var carg0 *C.GstRegistry // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstRegistry)(UnsafeRegistryToGlibNone(registry)) @@ -19495,7 +19783,7 @@ func (stream *StreamInstance) GetStreamFlags() StreamFlags { // Returns the stream ID of @stream. func (stream *StreamInstance) GetStreamID() string { var carg0 *C.GstStream // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstStream)(UnsafeStreamToGlibNone(stream)) @@ -19867,7 +20155,7 @@ func (collection *StreamCollectionInstance) GetStream(index uint) Stream { // Returns the upstream id of the @collection. func (collection *StreamCollectionInstance) GetUpstreamID() string { var carg0 *C.GstStreamCollection // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstStreamCollection)(UnsafeStreamCollectionToGlibNone(collection)) @@ -20571,7 +20859,7 @@ func UnsafeTracerToGlibFull(c Tracer) unsafe.Pointer { // @type and add the factory to @plugin. func TracerRegister(plugin Plugin, name string, typ gobject.Type) bool { var carg1 *C.GstPlugin // in, none, converted, nullable - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var carg3 C.GType // in, none, casted, alias var cret C.gboolean // return @@ -20663,6 +20951,36 @@ func UnsafeTracerFactoryToGlibFull(c TracerFactory) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } +// TracerFactoryGetList wraps gst_tracer_factory_get_list +// The function returns the following values: +// +// - goret []TracerFactory +// +// Gets the list of all registered tracer factories. You must free the +// list using gst_plugin_feature_list_free(). +// +// The returned factories are sorted by factory name. +// +// Free-function: gst_plugin_feature_list_free +func TracerFactoryGetList() []TracerFactory { + var cret *C.GList // container, transfer: full + + cret = C.gst_tracer_factory_get_list() + + var goret []TracerFactory + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) TracerFactory { + var dst TracerFactory // converted + dst = UnsafeTracerFactoryFromGlibFull(v) + return dst + }, + ) + + return goret +} + // GetTracerType wraps gst_tracer_factory_get_tracer_type // The function returns the following values: // @@ -20882,6 +21200,37 @@ func UnsafeTypeFindFactoryToGlibFull(c TypeFindFactory) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } +// TypeFindFactoryGetList wraps gst_type_find_factory_get_list +// The function returns the following values: +// +// - goret []TypeFindFactory +// +// Gets the list of all registered typefind factories. You must free the +// list using gst_plugin_feature_list_free(). +// +// The returned factories are sorted by highest rank first, and then by +// factory name. +// +// Free-function: gst_plugin_feature_list_free +func TypeFindFactoryGetList() []TypeFindFactory { + var cret *C.GList // container, transfer: full + + cret = C.gst_type_find_factory_get_list() + + var goret []TypeFindFactory + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) TypeFindFactory { + var dst TypeFindFactory // converted + dst = UnsafeTypeFindFactoryFromGlibFull(v) + return dst + }, + ) + + return goret +} + // CallFunction wraps gst_type_find_factory_call_function // // The function takes the following parameters: @@ -21121,7 +21470,7 @@ func AllocatorFind(name string) Allocator { // // Registers the memory @allocator with @name. func AllocatorRegister(name string, allocator Allocator) { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 *C.GstAllocator // in, full, converted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -21456,7 +21805,7 @@ func NewBufferPool() BufferPool { // The options supported by @pool can be retrieved with gst_buffer_pool_get_options(). func BufferPoolConfigAddOption(config *Structure, option string) { var carg1 *C.GstStructure // in, none, converted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string carg1 = (*C.GstStructure)(UnsafeStructureToGlibNone(config)) carg2 = (*C.gchar)(unsafe.Pointer(C.CString(option))) @@ -21524,7 +21873,7 @@ func BufferPoolConfigGetAllocator(config *Structure) (Allocator, AllocationParam func BufferPoolConfigGetOption(config *Structure, index uint) string { var carg1 *C.GstStructure // in, none, converted var carg2 C.guint // in, none, casted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg1 = (*C.GstStructure)(UnsafeStructureToGlibNone(config)) carg2 = C.guint(index) @@ -21601,7 +21950,7 @@ func BufferPoolConfigGetParams(config *Structure) (*Caps, uint, uint, uint, bool // Checks if @config contains @option. func BufferPoolConfigHasOption(config *Structure, option string) bool { var carg1 *C.GstStructure // in, none, converted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var cret C.gboolean // return carg1 = (*C.GstStructure)(UnsafeStructureToGlibNone(config)) @@ -21881,7 +22230,7 @@ func (pool *BufferPoolInstance) GetOptions() []string { // Checks if the bufferpool supports @option. func (pool *BufferPoolInstance) HasOption(option string) bool { var carg0 *C.GstBufferPool // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstBufferPool)(UnsafeBufferPoolToGlibNone(pool)) @@ -25261,7 +25610,7 @@ func (device *DeviceInstance) GetCaps() *Caps { // classes of the #GstDeviceProvider that produced this device. func (device *DeviceInstance) GetDeviceClass() string { var carg0 *C.GstDevice // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstDevice)(UnsafeDeviceToGlibNone(device)) @@ -25284,7 +25633,7 @@ func (device *DeviceInstance) GetDeviceClass() string { // Gets the user-friendly name of the device. func (device *DeviceInstance) GetDisplayName() string { var carg0 *C.GstDevice // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstDevice)(UnsafeDeviceToGlibNone(device)) @@ -25335,7 +25684,7 @@ func (device *DeviceInstance) GetProperties() *Structure { // Check if @device matches all of the given classes func (device *DeviceInstance) HasClasses(classes string) bool { var carg0 *C.GstDevice // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstDevice)(UnsafeDeviceToGlibNone(device)) @@ -25536,6 +25885,14 @@ type DeviceMonitor interface { // // Gets the #GstBus of this #GstDeviceMonitor GetBus() Bus + // GetDevices wraps gst_device_monitor_get_devices + // The function returns the following values: + // + // - goret []Device + // + // Gets a list of devices from all of the relevant monitors. This may actually + // probe the hardware if the monitor is not currently started. + GetDevices() []Device // GetProviders wraps gst_device_monitor_get_providers // The function returns the following values: // @@ -25717,6 +26074,36 @@ func (monitor *DeviceMonitorInstance) GetBus() Bus { return goret } +// GetDevices wraps gst_device_monitor_get_devices +// The function returns the following values: +// +// - goret []Device +// +// Gets a list of devices from all of the relevant monitors. This may actually +// probe the hardware if the monitor is not currently started. +func (monitor *DeviceMonitorInstance) GetDevices() []Device { + var carg0 *C.GstDeviceMonitor // in, none, converted + var cret *C.GList // container, transfer: full + + carg0 = (*C.GstDeviceMonitor)(UnsafeDeviceMonitorToGlibNone(monitor)) + + cret = C.gst_device_monitor_get_devices(carg0) + runtime.KeepAlive(monitor) + + var goret []Device + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) Device { + var dst Device // converted + dst = UnsafeDeviceFromGlibFull(v) + return dst + }, + ) + + return goret +} + // GetProviders wraps gst_device_monitor_get_providers // The function returns the following values: // @@ -25934,6 +26321,17 @@ type DeviceProvider interface { // // Gets the #GstBus of this #GstDeviceProvider GetBus() Bus + // GetDevices wraps gst_device_provider_get_devices + // The function returns the following values: + // + // - goret []Device + // + // Gets a list of devices that this provider understands. This may actually + // probe the hardware if the provider is not currently started. + // + // If the provider has been started, this will returned the same #GstDevice + // objedcts that have been returned by the #GST_MESSAGE_DEVICE_ADDED messages. + GetDevices() []Device // GetFactory wraps gst_device_provider_get_factory // The function returns the following values: // @@ -26079,7 +26477,7 @@ func UnsafeDeviceProviderToGlibFull(c DeviceProvider) unsafe.Pointer { // @type and add the factory to @plugin. func DeviceProviderRegister(plugin Plugin, name string, rank uint, typ gobject.Type) bool { var carg1 *C.GstPlugin // in, none, converted, nullable - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var carg3 C.guint // in, none, casted var carg4 C.GType // in, none, casted, alias var cret C.gboolean // return @@ -26225,6 +26623,39 @@ func (provider *DeviceProviderInstance) GetBus() Bus { return goret } +// GetDevices wraps gst_device_provider_get_devices +// The function returns the following values: +// +// - goret []Device +// +// Gets a list of devices that this provider understands. This may actually +// probe the hardware if the provider is not currently started. +// +// If the provider has been started, this will returned the same #GstDevice +// objedcts that have been returned by the #GST_MESSAGE_DEVICE_ADDED messages. +func (provider *DeviceProviderInstance) GetDevices() []Device { + var carg0 *C.GstDeviceProvider // in, none, converted + var cret *C.GList // container, transfer: full + + carg0 = (*C.GstDeviceProvider)(UnsafeDeviceProviderToGlibNone(provider)) + + cret = C.gst_device_provider_get_devices(carg0) + runtime.KeepAlive(provider) + + var goret []Device + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) Device { + var dst Device // converted + dst = UnsafeDeviceFromGlibFull(v) + return dst + }, + ) + + return goret +} + // GetFactory wraps gst_device_provider_get_factory // The function returns the following values: // @@ -26285,8 +26716,8 @@ func (provider *DeviceProviderInstance) GetHiddenProviders() []string { // Get metadata with @key in @provider. func (provider *DeviceProviderInstance) GetMetadata(key string) string { var carg0 *C.GstDeviceProvider // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg0 = (*C.GstDeviceProvider)(UnsafeDeviceProviderToGlibNone(provider)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -26316,7 +26747,7 @@ func (provider *DeviceProviderInstance) GetMetadata(key string) string { // device provider with @name to avoid duplicate devices. func (provider *DeviceProviderInstance) HideProvider(name string) { var carg0 *C.GstDeviceProvider // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstDeviceProvider)(UnsafeDeviceProviderToGlibNone(provider)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -26414,7 +26845,7 @@ func (provider *DeviceProviderInstance) Stop() { // all devices again. func (provider *DeviceProviderInstance) UnhideProvider(name string) { var carg0 *C.GstDeviceProvider // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstDeviceProvider)(UnsafeDeviceProviderToGlibNone(provider)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -26572,7 +27003,7 @@ func UnsafeDeviceProviderFactoryToGlibFull(c DeviceProviderFactory) unsafe.Point // Search for an device provider factory of the given name. Refs the returned // device provider factory; caller is responsible for unreffing. func DeviceProviderFactoryFind(name string) DeviceProviderFactory { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstDeviceProviderFactory // return, full, converted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -26601,7 +27032,7 @@ func DeviceProviderFactoryFind(name string) DeviceProviderFactory { // Returns the device provider of the type defined by the given device // provider factory. func DeviceProviderFactoryGetByName(factoryname string) DeviceProvider { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstDeviceProvider // return, full, converted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(factoryname))) @@ -26617,6 +27048,41 @@ func DeviceProviderFactoryGetByName(factoryname string) DeviceProvider { return goret } +// DeviceProviderFactoryListGetDeviceProviders wraps gst_device_provider_factory_list_get_device_providers +// +// The function takes the following parameters: +// +// - minrank Rank: Minimum rank +// +// The function returns the following values: +// +// - goret []DeviceProviderFactory +// +// Get a list of factories with a rank greater or equal to @minrank. +// The list of factories is returned by decreasing rank. +func DeviceProviderFactoryListGetDeviceProviders(minrank Rank) []DeviceProviderFactory { + var carg1 C.GstRank // in, none, casted + var cret *C.GList // container, transfer: full + + carg1 = C.GstRank(minrank) + + cret = C.gst_device_provider_factory_list_get_device_providers(carg1) + runtime.KeepAlive(minrank) + + var goret []DeviceProviderFactory + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) DeviceProviderFactory { + var dst DeviceProviderFactory // converted + dst = UnsafeDeviceProviderFactoryFromGlibFull(v) + return dst + }, + ) + + return goret +} + // Get wraps gst_device_provider_factory_get // The function returns the following values: // @@ -26677,8 +27143,8 @@ func (factory *DeviceProviderFactoryInstance) GetDeviceProviderType() gobject.Ty // Get the metadata on @factory with @key. func (factory *DeviceProviderFactoryInstance) GetMetadata(key string) string { var carg0 *C.GstDeviceProviderFactory // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg0 = (*C.GstDeviceProviderFactory)(UnsafeDeviceProviderFactoryToGlibNone(factory)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -26874,7 +27340,7 @@ func UnsafeDynamicTypeFactoryToGlibFull(c DynamicTypeFactory) unsafe.Pointer { // // - goret gobject.Type func DynamicTypeFactoryLoad(factoryname string) gobject.Type { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.GType // return, none, casted, alias carg1 = (*C.gchar)(unsafe.Pointer(C.CString(factoryname))) @@ -27233,6 +27699,15 @@ type Element interface { // // Gets the context with @context_type set on the element or NULL. GetContextUnlocked(string) *Context + // GetContexts wraps gst_element_get_contexts + // The function returns the following values: + // + // - goret []*Context + // + // Gets the contexts set on the element. + // + // MT safe. + GetContexts() []*Context // GetCurrentClockTime wraps gst_element_get_current_clock_time // The function returns the following values: // @@ -27281,6 +27756,14 @@ type Element interface { // // Retrieves a padtemplate from @element with the given name. GetPadTemplate(string) PadTemplate + // GetPadTemplateList wraps gst_element_get_pad_template_list + // The function returns the following values: + // + // - goret []PadTemplate + // + // Retrieves a list of the pad templates associated with @element. The + // list must not be modified by the calling code. + GetPadTemplateList() []PadTemplate // GetRequestPad wraps gst_element_get_request_pad // // The function takes the following parameters: @@ -28063,7 +28546,7 @@ func UnsafeElementToGlibFull(c Element) unsafe.Pointer { // Creates an element for handling the given URI. func ElementMakeFromURI(typ URIType, uri string, elementname string) (Element, error) { var carg1 C.GstURIType // in, none, casted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var carg3 *C.gchar // in, none, string, nullable-string var cret *C.GstElement // return, none, converted var _cerr *C.GError // out, full, converted, nullable @@ -28110,7 +28593,7 @@ func ElementMakeFromURI(typ URIType, uri string, elementname string) (Element, e // @type and add the factory to @plugin. func ElementRegister(plugin Plugin, name string, rank uint, typ gobject.Type) bool { var carg1 *C.GstPlugin // in, none, converted, nullable - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var carg3 C.guint // in, none, casted var carg4 C.GType // in, none, casted, alias var cret C.gboolean // return @@ -28151,7 +28634,7 @@ func ElementRegister(plugin Plugin, name string, rank uint, typ gobject.Type) bo // Gets a string representing the given state change result. func ElementStateChangeReturnGetName(stateRet StateChangeReturn) string { var carg1 C.GstStateChangeReturn // in, none, casted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg1 = C.GstStateChangeReturn(stateRet) @@ -28178,7 +28661,7 @@ func ElementStateChangeReturnGetName(stateRet StateChangeReturn) string { // Gets a string representing the given state. func ElementStateGetName(state State) string { var carg1 C.GstState // in, none, casted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg1 = C.GstState(state) @@ -28504,8 +28987,8 @@ func (element *ElementInstance) CreateAllPads() { // by using the format \%03u instead of \%u. func (element *ElementInstance) DecorateStreamID(streamId string) string { var carg0 *C.GstElement // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, full, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, full, string carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(streamId))) @@ -28806,7 +29289,7 @@ func (element *ElementInstance) GetCompatiblePadTemplate(compattempl PadTemplate // MT safe. func (element *ElementInstance) GetContext(contextType string) *Context { var carg0 *C.GstElement // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstContext // return, full, converted carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) @@ -28837,7 +29320,7 @@ func (element *ElementInstance) GetContext(contextType string) *Context { // Gets the context with @context_type set on the element or NULL. func (element *ElementInstance) GetContextUnlocked(contextType string) *Context { var carg0 *C.GstElement // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstContext // return, full, converted carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) @@ -28855,6 +29338,37 @@ func (element *ElementInstance) GetContextUnlocked(contextType string) *Context return goret } +// GetContexts wraps gst_element_get_contexts +// The function returns the following values: +// +// - goret []*Context +// +// Gets the contexts set on the element. +// +// MT safe. +func (element *ElementInstance) GetContexts() []*Context { + var carg0 *C.GstElement // in, none, converted + var cret *C.GList // container, transfer: full + + carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) + + cret = C.gst_element_get_contexts(carg0) + runtime.KeepAlive(element) + + var goret []*Context + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) *Context { + var dst *Context // converted + dst = UnsafeContextFromGlibFull(v) + return dst + }, + ) + + return goret +} + // GetCurrentClockTime wraps gst_element_get_current_clock_time // The function returns the following values: // @@ -28937,8 +29451,8 @@ func (element *ElementInstance) GetFactory() ElementFactory { // Get metadata with @key in @klass. func (element *ElementInstance) GetMetadata(key string) string { var carg0 *C.GstElement // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -28968,7 +29482,7 @@ func (element *ElementInstance) GetMetadata(key string) string { // Retrieves a padtemplate from @element with the given name. func (element *ElementInstance) GetPadTemplate(name string) PadTemplate { var carg0 *C.GstElement // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstPadTemplate // return, none, converted carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) @@ -28986,6 +29500,36 @@ func (element *ElementInstance) GetPadTemplate(name string) PadTemplate { return goret } +// GetPadTemplateList wraps gst_element_get_pad_template_list +// The function returns the following values: +// +// - goret []PadTemplate +// +// Retrieves a list of the pad templates associated with @element. The +// list must not be modified by the calling code. +func (element *ElementInstance) GetPadTemplateList() []PadTemplate { + var carg0 *C.GstElement // in, none, converted + var cret *C.GList // container, transfer: none + + carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) + + cret = C.gst_element_get_pad_template_list(carg0) + runtime.KeepAlive(element) + + var goret []PadTemplate + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) PadTemplate { + var dst PadTemplate // converted + dst = UnsafePadTemplateFromGlibNone(v) + return dst + }, + ) + + return goret +} + // GetRequestPad wraps gst_element_get_request_pad // // The function takes the following parameters: @@ -29004,7 +29548,7 @@ func (element *ElementInstance) GetPadTemplate(name string) PadTemplate { // provides the exact same functionality. func (element *ElementInstance) GetRequestPad(name string) Pad { var carg0 *C.GstElement // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstPad // return, full, converted carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) @@ -29124,7 +29668,7 @@ func (element *ElementInstance) GetState(timeout ClockTime) (State, State, State // already-existing (i.e. 'static') pads. func (element *ElementInstance) GetStaticPad(name string) Pad { var carg0 *C.GstElement // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstPad // return, full, converted carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) @@ -29561,8 +30105,8 @@ func (element *ElementInstance) MessageFull(typ MessageType, domain glib.Quark, var carg3 C.gint // in, none, casted var carg4 *C.gchar // in, full, string, nullable-string var carg5 *C.gchar // in, full, string, nullable-string - var carg6 *C.gchar // in, none, string, casted *C.gchar - var carg7 *C.gchar // in, none, string, casted *C.gchar + var carg6 *C.gchar // in, none, string + var carg7 *C.gchar // in, none, string var carg8 C.gint // in, none, casted carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) @@ -29622,8 +30166,8 @@ func (element *ElementInstance) MessageFullWithDetails(typ MessageType, domain g var carg3 C.gint // in, none, casted var carg4 *C.gchar // in, full, string, nullable-string var carg5 *C.gchar // in, full, string, nullable-string - var carg6 *C.gchar // in, none, string, casted *C.gchar - var carg7 *C.gchar // in, none, string, casted *C.gchar + var carg6 *C.gchar // in, none, string + var carg7 *C.gchar // in, none, string var carg8 C.gint // in, none, casted var carg9 *C.GstStructure // in, full, converted @@ -30068,7 +30612,7 @@ func (element *ElementInstance) RequestPad(templ PadTemplate, name string, caps // functionality. func (element *ElementInstance) RequestPadSimple(name string) Pad { var carg0 *C.GstElement // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstPad // return, full, converted carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) @@ -30518,9 +31062,9 @@ func (src *ElementInstance) Unlink(dest Element) { // This is a convenience function for gst_pad_unlink(). func (src *ElementInstance) UnlinkPads(srcpadname string, dest Element, destpadname string) { var carg0 *C.GstElement // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 *C.GstElement // in, none, converted - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string carg0 = (*C.GstElement)(UnsafeElementToGlibNone(src)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(srcpadname))) @@ -30719,6 +31263,13 @@ type ElementFactory interface { // Queries whether registered element managed by @factory needs to // be excluded from documentation system or not. GetSkipDocumentation() bool + // GetStaticPadTemplates wraps gst_element_factory_get_static_pad_templates + // The function returns the following values: + // + // - goret []*StaticPadTemplate + // + // Gets the #GList of #GstStaticPadTemplate for this factory. + GetStaticPadTemplates() []*StaticPadTemplate // GetURIProtocols wraps gst_element_factory_get_uri_protocols // The function returns the following values: // @@ -30815,7 +31366,7 @@ func UnsafeElementFactoryToGlibFull(c ElementFactory) unsafe.Pointer { // Search for an element factory of the given name. Refs the returned // element factory; caller is responsible for unreffing. func ElementFactoryFind(name string) ElementFactory { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstElementFactory // return, full, converted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -30831,6 +31382,46 @@ func ElementFactoryFind(name string) ElementFactory { return goret } +// ElementFactoryListGetElements wraps gst_element_factory_list_get_elements +// +// The function takes the following parameters: +// +// - typ ElementFactoryListType: a #GstElementFactoryListType +// - minrank Rank: Minimum rank +// +// The function returns the following values: +// +// - goret []ElementFactory +// +// Get a list of factories that match the given @type. Only elements +// with a rank greater or equal to @minrank will be returned. +// The list of factories is returned by decreasing rank. +func ElementFactoryListGetElements(typ ElementFactoryListType, minrank Rank) []ElementFactory { + var carg1 C.GstElementFactoryListType // in, none, casted, alias + var carg2 C.GstRank // in, none, casted + var cret *C.GList // container, transfer: full + + carg1 = C.GstElementFactoryListType(typ) + carg2 = C.GstRank(minrank) + + cret = C.gst_element_factory_list_get_elements(carg1, carg2) + runtime.KeepAlive(typ) + runtime.KeepAlive(minrank) + + var goret []ElementFactory + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) ElementFactory { + var dst ElementFactory // converted + dst = UnsafeElementFactoryFromGlibFull(v) + return dst + }, + ) + + return goret +} + // ElementFactoryMake wraps gst_element_factory_make // // The function takes the following parameters: @@ -30848,7 +31439,7 @@ func ElementFactoryFind(name string) ElementFactory { // consisting of the element factory name and a number. // If name is given, it will be given the name supplied. func ElementFactoryMake(factoryname string, name string) Element { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 *C.gchar // in, none, string, nullable-string var cret *C.GstElement // return, none, converted @@ -31113,8 +31704,8 @@ func (factory *ElementFactoryInstance) GetElementType() gobject.Type { // Get the metadata on @factory with @key. func (factory *ElementFactoryInstance) GetMetadata(key string) string { var carg0 *C.GstElementFactory // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg0 = (*C.GstElementFactory)(UnsafeElementFactoryToGlibNone(factory)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -31202,6 +31793,35 @@ func (factory *ElementFactoryInstance) GetSkipDocumentation() bool { return goret } +// GetStaticPadTemplates wraps gst_element_factory_get_static_pad_templates +// The function returns the following values: +// +// - goret []*StaticPadTemplate +// +// Gets the #GList of #GstStaticPadTemplate for this factory. +func (factory *ElementFactoryInstance) GetStaticPadTemplates() []*StaticPadTemplate { + var carg0 *C.GstElementFactory // in, none, converted + var cret *C.GList // container, transfer: none + + carg0 = (*C.GstElementFactory)(UnsafeElementFactoryToGlibNone(factory)) + + cret = C.gst_element_factory_get_static_pad_templates(carg0) + runtime.KeepAlive(factory) + + var goret []*StaticPadTemplate + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) *StaticPadTemplate { + var dst *StaticPadTemplate // converted + dst = UnsafeStaticPadTemplateFromGlibNone(v) + return dst + }, + ) + + return goret +} + // GetURIProtocols wraps gst_element_factory_get_uri_protocols // The function returns the following values: // @@ -31264,7 +31884,7 @@ func (factory *ElementFactoryInstance) GetURIType() URIType { // Check if @factory implements the interface with name @interfacename. func (factory *ElementFactoryInstance) HasInterface(interfacename string) bool { var carg0 *C.GstElementFactory // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstElementFactory)(UnsafeElementFactoryToGlibNone(factory)) @@ -32565,7 +33185,7 @@ func (bin *BinInstance) GetByInterface(iface gobject.Type) Element { // function recurses into child bins. func (bin *BinInstance) GetByName(name string) Element { var carg0 *C.GstBin // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstElement // return, full, converted carg0 = (*C.GstBin)(UnsafeBinToGlibNone(bin)) @@ -32597,7 +33217,7 @@ func (bin *BinInstance) GetByName(name string) Element { // element is not found, a recursion is performed on the parent bin. func (bin *BinInstance) GetByNameRecurseUp(name string) Element { var carg0 *C.GstBin // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstElement // return, full, converted carg0 = (*C.GstBin)(UnsafeBinToGlibNone(bin)) @@ -32650,7 +33270,7 @@ func (bin *BinInstance) GetSuppressedFlags() ElementFlags { // #GstElement. func (bin *BinInstance) IterateAllByElementFactoryName(factoryName string) *Iterator { var carg0 *C.GstBin // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstIterator // return, full, converted carg0 = (*C.GstBin)(UnsafeBinToGlibNone(bin)) @@ -34202,6 +34822,28 @@ func NewBufferWrappedBytes(bytes *glib.Bytes) *Buffer { return goret } +// BufferGetMaxMemory wraps gst_buffer_get_max_memory +// The function returns the following values: +// +// - goret uint +// +// Gets the maximum amount of memory blocks that a buffer can hold. This is a +// compile time constant that can be queried with the function. +// +// When more memory blocks are added, existing memory blocks will be merged +// together to make room for the new block. +func BufferGetMaxMemory() uint { + var cret C.guint // return, none, casted + + cret = C.gst_buffer_get_max_memory() + + var goret uint + + goret = uint(cret) + + return goret +} + // AddCustomMeta wraps gst_buffer_add_custom_meta // // The function takes the following parameters: @@ -34216,7 +34858,7 @@ func NewBufferWrappedBytes(bytes *glib.Bytes) *Buffer { // been successfully registered with gst_meta_register_custom(). func (buffer *Buffer) AddCustomMeta(name string) *CustomMeta { var carg0 *C.GstBuffer // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstCustomMeta // return, none, converted carg0 = (*C.GstBuffer)(UnsafeBufferToGlibNone(buffer)) @@ -34682,7 +35324,7 @@ func (buffer *Buffer) GetAllMemory() *Memory { // Finds the first #GstCustomMeta on @buffer for the desired @name. func (buffer *Buffer) GetCustomMeta(name string) *CustomMeta { var carg0 *C.GstBuffer // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstCustomMeta // return, none, converted carg0 = (*C.GstBuffer)(UnsafeBufferToGlibNone(buffer)) @@ -35122,113 +35764,6 @@ func (buffer *Buffer) IsMemoryRangeWritable(idx uint, length int) bool { return goret } -// Map wraps gst_buffer_map -// -// The function takes the following parameters: -// -// - flags MapFlags: flags for the mapping -// -// The function returns the following values: -// -// - info MapInfo: info about the mapping -// - goret bool -// -// Fills @info with the #GstMapInfo of all merged memory blocks in @buffer. -// -// @flags describe the desired access of the memory. When @flags is -// #GST_MAP_WRITE, @buffer should be writable (as returned from -// gst_buffer_is_writable()). -// -// When @buffer is writable but the memory isn't, a writable copy will -// automatically be created and returned. The readonly copy of the -// buffer memory will then also be replaced with this writable copy. -// -// The memory in @info should be unmapped with gst_buffer_unmap() after -// usage. -func (buffer *Buffer) Map(flags MapFlags) (MapInfo, bool) { - var carg0 *C.GstBuffer // in, none, converted - var carg2 C.GstMapFlags // in, none, casted - var carg1 C.GstMapInfo // out, transfer: none, C Pointers: 0, Name: MapInfo, caller-allocates - var cret C.gboolean // return - - carg0 = (*C.GstBuffer)(UnsafeBufferToGlibNone(buffer)) - carg2 = C.GstMapFlags(flags) - - cret = C.gst_buffer_map(carg0, &carg1, carg2) - runtime.KeepAlive(buffer) - runtime.KeepAlive(flags) - - var info MapInfo - var goret bool - - _ = info - _ = carg1 - panic("unimplemented conversion of MapInfo (GstMapInfo)") - if cret != 0 { - goret = true - } - - return info, goret -} - -// MapRange wraps gst_buffer_map_range -// -// The function takes the following parameters: -// -// - idx uint: an index -// - length int: a length -// - flags MapFlags: flags for the mapping -// -// The function returns the following values: -// -// - info MapInfo: info about the mapping -// - goret bool -// -// Fills @info with the #GstMapInfo of @length merged memory blocks -// starting at @idx in @buffer. When @length is -1, all memory blocks starting -// from @idx are merged and mapped. -// -// @flags describe the desired access of the memory. When @flags is -// #GST_MAP_WRITE, @buffer should be writable (as returned from -// gst_buffer_is_writable()). -// -// When @buffer is writable but the memory isn't, a writable copy will -// automatically be created and returned. The readonly copy of the buffer memory -// will then also be replaced with this writable copy. -// -// The memory in @info should be unmapped with gst_buffer_unmap() after usage. -func (buffer *Buffer) MapRange(idx uint, length int, flags MapFlags) (MapInfo, bool) { - var carg0 *C.GstBuffer // in, none, converted - var carg1 C.guint // in, none, casted - var carg2 C.gint // in, none, casted - var carg4 C.GstMapFlags // in, none, casted - var carg3 C.GstMapInfo // out, transfer: none, C Pointers: 0, Name: MapInfo, caller-allocates - var cret C.gboolean // return - - carg0 = (*C.GstBuffer)(UnsafeBufferToGlibNone(buffer)) - carg1 = C.guint(idx) - carg2 = C.gint(length) - carg4 = C.GstMapFlags(flags) - - cret = C.gst_buffer_map_range(carg0, carg1, carg2, &carg3, carg4) - runtime.KeepAlive(buffer) - runtime.KeepAlive(idx) - runtime.KeepAlive(length) - runtime.KeepAlive(flags) - - var info MapInfo - var goret bool - - _ = info - _ = carg3 - panic("unimplemented conversion of MapInfo (GstMapInfo)") - if cret != 0 { - goret = true - } - - return info, goret -} - // Memset wraps gst_buffer_memset // // The function takes the following parameters: @@ -35627,25 +36162,6 @@ func (buffer *Buffer) SetSize(size int) { runtime.KeepAlive(size) } -// Unmap wraps gst_buffer_unmap -// -// The function takes the following parameters: -// -// - info *MapInfo: a #GstMapInfo -// -// Releases the memory previously mapped with gst_buffer_map(). -func (buffer *Buffer) Unmap(info *MapInfo) { - var carg0 *C.GstBuffer // in, none, converted - var carg1 *C.GstMapInfo // in, none, converted - - carg0 = (*C.GstBuffer)(UnsafeBufferToGlibNone(buffer)) - carg1 = (*C.GstMapInfo)(UnsafeMapInfoToGlibNone(info)) - - C.gst_buffer_unmap(carg0, carg1) - runtime.KeepAlive(buffer) - runtime.KeepAlive(info) -} - // UnsetFlags wraps gst_buffer_unset_flags // // The function takes the following parameters: @@ -36465,6 +36981,37 @@ func NewCapsEmptySimple(mediaType string) *Caps { return goret } +// CapsFromString wraps gst_caps_from_string +// +// The function takes the following parameters: +// +// - str string: a string to convert to #GstCaps +// +// The function returns the following values: +// +// - goret *Caps +// +// Converts @caps from a string representation. +// +// The implementation of serialization up to 1.20 would lead to unexpected results +// when there were nested #GstCaps / #GstStructure deeper than one level. +func CapsFromString(str string) *Caps { + var carg1 *C.gchar // in, none, string + var cret *C.GstCaps // return, full, converted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(str))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_caps_from_string(carg1) + runtime.KeepAlive(str) + + var goret *Caps + + goret = UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + // Append wraps gst_caps_append // // The function takes the following parameters: @@ -37403,7 +37950,7 @@ func (caps *Caps) RemoveStructure(idx uint) { func (caps *Caps) Serialize(flags SerializeFlags) string { var carg0 *C.GstCaps // in, none, converted var carg1 C.GstSerializeFlags // in, none, casted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstCaps)(UnsafeCapsToGlibNone(caps)) carg1 = C.GstSerializeFlags(flags) @@ -37606,7 +38153,7 @@ func (minuend *Caps) Subtract(subtrahend *Caps) *Caps { // when there were nested #GstCaps / #GstStructure deeper than one level. func (caps *Caps) ToString() string { var carg0 *C.GstCaps // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstCaps)(UnsafeCapsToGlibNone(caps)) @@ -37793,7 +38340,7 @@ func NewCapsFeaturesEmpty() *CapsFeatures { // // Creates a new #GstCapsFeatures with a single feature. func NewCapsFeaturesSingle(feature string) *CapsFeatures { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstCapsFeatures // return, full, converted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(feature))) @@ -37809,6 +38356,34 @@ func NewCapsFeaturesSingle(feature string) *CapsFeatures { return goret } +// CapsFeaturesFromString wraps gst_caps_features_from_string +// +// The function takes the following parameters: +// +// - features string: a string representation of a #GstCapsFeatures. +// +// The function returns the following values: +// +// - goret *CapsFeatures +// +// Creates a #GstCapsFeatures from a string representation. +func CapsFeaturesFromString(features string) *CapsFeatures { + var carg1 *C.gchar // in, none, string + var cret *C.GstCapsFeatures // return, full, converted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(features))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_caps_features_from_string(carg1) + runtime.KeepAlive(features) + + var goret *CapsFeatures + + goret = UnsafeCapsFeaturesFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + // Add wraps gst_caps_features_add // // The function takes the following parameters: @@ -37818,7 +38393,7 @@ func NewCapsFeaturesSingle(feature string) *CapsFeatures { // Adds @feature to @features. func (features *CapsFeatures) Add(feature string) { var carg0 *C.GstCapsFeatures // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstCapsFeatures)(UnsafeCapsFeaturesToGlibNone(features)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(feature))) @@ -37861,7 +38436,7 @@ func (features *CapsFeatures) AddID(feature glib.Quark) { // Checks if @features contains @feature. func (features *CapsFeatures) Contains(feature string) bool { var carg0 *C.GstCapsFeatures // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstCapsFeatures)(UnsafeCapsFeaturesToGlibNone(features)) @@ -37949,7 +38524,7 @@ func (features *CapsFeatures) Copy() *CapsFeatures { func (features *CapsFeatures) GetNth(i uint) string { var carg0 *C.GstCapsFeatures // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstCapsFeatures)(UnsafeCapsFeaturesToGlibNone(features)) carg1 = C.guint(i) @@ -38082,7 +38657,7 @@ func (features1 *CapsFeatures) IsEqual(features2 *CapsFeatures) bool { // Removes @feature from @features. func (features *CapsFeatures) Remove(feature string) { var carg0 *C.GstCapsFeatures // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstCapsFeatures)(UnsafeCapsFeaturesToGlibNone(features)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(feature))) @@ -38165,7 +38740,7 @@ func (features *CapsFeatures) SetParentRefcount(refcount *int) bool { // This prints the features in human readable form. func (features *CapsFeatures) ToString() string { var carg0 *C.GstCapsFeatures // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstCapsFeatures)(UnsafeCapsFeaturesToGlibNone(features)) @@ -38485,7 +39060,7 @@ func UnsafeContextToGlibFull(c *Context) unsafe.Pointer { // // Creates a new context. func NewContext(contextType string, persistent bool) *Context { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gboolean // in var cret *C.GstContext // return, full, converted @@ -38514,7 +39089,7 @@ func NewContext(contextType string, persistent bool) *Context { // Gets the type of @context. func (_context *Context) GetContextType() string { var carg0 *C.GstContext // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstContext)(UnsafeContextToGlibNone(_context)) @@ -38563,7 +39138,7 @@ func (_context *Context) GetStructure() *Structure { // Checks if @context has @context_type. func (_context *Context) HasContextType(contextType string) bool { var carg0 *C.GstContext // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstContext)(UnsafeContextToGlibNone(_context)) @@ -38856,7 +39431,7 @@ func (meta *CustomMeta) GetStructure() *Structure { // Checks whether the name of the custom meta is @name func (meta *CustomMeta) HasName(name string) bool { var carg0 *C.GstCustomMeta // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstCustomMeta)(UnsafeCustomMetaToGlibNone(meta)) @@ -39076,7 +39651,7 @@ func NewDateTimeFromGDateTime(dt *glib.DateTime) *DateTime { // If no date is provided, it is assumed to be "today" in the timezone // provided (if any), otherwise UTC. func NewDateTimeFromISO8601String(str string) *DateTime { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstDateTime // return, full, converted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(str))) @@ -39739,7 +40314,7 @@ func (datetime *DateTime) ToGDateTime() *glib.DateTime { // `2012-06-23T23:30+0100`, `2012-06-23T23:30:59Z`, `2012-06-23T23:30:59+0100` func (datetime *DateTime) ToISO8601String() string { var carg0 *C.GstDateTime // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstDateTime)(UnsafeDateTimeToGlibNone(datetime)) @@ -39848,7 +40423,7 @@ func (category *DebugCategory) GetColor() uint { // Returns the description of a debug category. func (category *DebugCategory) GetDescription() string { var carg0 *C.GstDebugCategory // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstDebugCategory)(UnsafeDebugCategoryToGlibNone(category)) @@ -39870,7 +40445,7 @@ func (category *DebugCategory) GetDescription() string { // Returns the name of a debug category. func (category *DebugCategory) GetName() string { var carg0 *C.GstDebugCategory // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstDebugCategory)(UnsafeDebugCategoryToGlibNone(category)) @@ -40015,7 +40590,7 @@ func UnsafeDebugMessageToGlibFull(d *DebugMessage) unsafe.Pointer { // in debug handlers to extract the message. func (message *DebugMessage) Get() string { var carg0 *C.GstDebugMessage // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstDebugMessage)(UnsafeDebugMessageToGlibNone(message)) @@ -40038,7 +40613,7 @@ func (message *DebugMessage) Get() string { // debug handlers. Can be empty. func (message *DebugMessage) GetID() string { var carg0 *C.GstDebugMessage // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstDebugMessage)(UnsafeDebugMessageToGlibNone(message)) @@ -40248,8 +40823,8 @@ func UnsafeDeviceProviderClassToGlibFull(d *DeviceProviderClass) unsafe.Pointer // Set @key with @value as metadata in @klass. func (klass *DeviceProviderClass) AddMetadata(key string, value string) { var carg0 *C.GstDeviceProviderClass // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string carg0 = (*C.GstDeviceProviderClass)(UnsafeDeviceProviderClassToGlibNone(klass)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -40278,8 +40853,8 @@ func (klass *DeviceProviderClass) AddMetadata(key string, value string) { // dynamically loaded plugins.) func (klass *DeviceProviderClass) AddStaticMetadata(key string, value string) { var carg0 *C.GstDeviceProviderClass // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, full, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, full, string carg0 = (*C.GstDeviceProviderClass)(UnsafeDeviceProviderClassToGlibNone(klass)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -40305,8 +40880,8 @@ func (klass *DeviceProviderClass) AddStaticMetadata(key string, value string) { // Get metadata with @key in @klass. func (klass *DeviceProviderClass) GetMetadata(key string) string { var carg0 *C.GstDeviceProviderClass // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg0 = (*C.GstDeviceProviderClass)(UnsafeDeviceProviderClassToGlibNone(klass)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -40342,10 +40917,10 @@ func (klass *DeviceProviderClass) GetMetadata(key string) string { // > This function is for use in _class_init functions only. func (klass *DeviceProviderClass) SetMetadata(longname string, classification string, description string, author string) { var carg0 *C.GstDeviceProviderClass // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar - var carg3 *C.gchar // in, none, string, casted *C.gchar - var carg4 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string + var carg3 *C.gchar // in, none, string + var carg4 *C.gchar // in, none, string carg0 = (*C.GstDeviceProviderClass)(UnsafeDeviceProviderClassToGlibNone(klass)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(longname))) @@ -40389,10 +40964,10 @@ func (klass *DeviceProviderClass) SetMetadata(longname string, classification st // loaded, so this function can be used even from dynamically loaded plugins.) func (klass *DeviceProviderClass) SetStaticMetadata(longname string, classification string, description string, author string) { var carg0 *C.GstDeviceProviderClass // in, none, converted - var carg1 *C.gchar // in, full, string, casted *C.gchar - var carg2 *C.gchar // in, full, string, casted *C.gchar - var carg3 *C.gchar // in, full, string, casted *C.gchar - var carg4 *C.gchar // in, full, string, casted *C.gchar + var carg1 *C.gchar // in, full, string + var carg2 *C.gchar // in, full, string + var carg3 *C.gchar // in, full, string + var carg4 *C.gchar // in, full, string carg0 = (*C.GstDeviceProviderClass)(UnsafeDeviceProviderClassToGlibNone(klass)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(longname))) @@ -40603,8 +41178,8 @@ func UnsafeElementClassToGlibFull(e *ElementClass) unsafe.Pointer { // Set @key with @value as metadata in @klass. func (klass *ElementClass) AddMetadata(key string, value string) { var carg0 *C.GstElementClass // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string carg0 = (*C.GstElementClass)(UnsafeElementClassToGlibNone(klass)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -40657,8 +41232,8 @@ func (klass *ElementClass) AddPadTemplate(templ PadTemplate) { // dynamically loaded plugins.) func (klass *ElementClass) AddStaticMetadata(key string, value string) { var carg0 *C.GstElementClass // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string carg0 = (*C.GstElementClass)(UnsafeElementClassToGlibNone(klass)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -40733,8 +41308,8 @@ func (klass *ElementClass) AddStaticPadTemplateWithGType(staticTempl *StaticPadT // Get metadata with @key in @klass. func (klass *ElementClass) GetMetadata(key string) string { var carg0 *C.GstElementClass // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg0 = (*C.GstElementClass)(UnsafeElementClassToGlibNone(klass)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -40767,7 +41342,7 @@ func (klass *ElementClass) GetMetadata(key string) string { // > GInstanceInitFunc here. func (elementClass *ElementClass) GetPadTemplate(name string) PadTemplate { var carg0 *C.GstElementClass // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstPadTemplate // return, none, converted carg0 = (*C.GstElementClass)(UnsafeElementClassToGlibNone(elementClass)) @@ -40785,6 +41360,39 @@ func (elementClass *ElementClass) GetPadTemplate(name string) PadTemplate { return goret } +// GetPadTemplateList wraps gst_element_class_get_pad_template_list +// The function returns the following values: +// +// - goret []PadTemplate +// +// Retrieves a list of the pad templates associated with @element_class. The +// list must not be modified by the calling code. +// > If you use this function in the GInstanceInitFunc of an object class +// > that has subclasses, make sure to pass the g_class parameter of the +// > GInstanceInitFunc here. +func (elementClass *ElementClass) GetPadTemplateList() []PadTemplate { + var carg0 *C.GstElementClass // in, none, converted + var cret *C.GList // container, transfer: none + + carg0 = (*C.GstElementClass)(UnsafeElementClassToGlibNone(elementClass)) + + cret = C.gst_element_class_get_pad_template_list(carg0) + runtime.KeepAlive(elementClass) + + var goret []PadTemplate + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) PadTemplate { + var dst PadTemplate // converted + dst = UnsafePadTemplateFromGlibNone(v) + return dst + }, + ) + + return goret +} + // SetMetadata wraps gst_element_class_set_metadata // // The function takes the following parameters: @@ -40802,10 +41410,10 @@ func (elementClass *ElementClass) GetPadTemplate(name string) PadTemplate { // > This function is for use in _class_init functions only. func (klass *ElementClass) SetMetadata(longname string, classification string, description string, author string) { var carg0 *C.GstElementClass // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar - var carg3 *C.gchar // in, none, string, casted *C.gchar - var carg4 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string + var carg3 *C.gchar // in, none, string + var carg4 *C.gchar // in, none, string carg0 = (*C.GstElementClass)(UnsafeElementClassToGlibNone(klass)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(longname))) @@ -40848,10 +41456,10 @@ func (klass *ElementClass) SetMetadata(longname string, classification string, d // loaded, so this function can be used even from dynamically loaded plugins.) func (klass *ElementClass) SetStaticMetadata(longname string, classification string, description string, author string) { var carg0 *C.GstElementClass // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar - var carg3 *C.gchar // in, none, string, casted *C.gchar - var carg4 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string + var carg3 *C.gchar // in, none, string + var carg4 *C.gchar // in, none, string carg0 = (*C.GstElementClass)(UnsafeElementClassToGlibNone(klass)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(longname))) @@ -41486,9 +42094,9 @@ func NewEventNavigation(structure *Structure) *Event { // event of a particular @origin and @system_id will // be stuck to the output pad of the sending element. func NewEventProtection(systemId string, data *Buffer, origin string) *Event { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 *C.GstBuffer // in, none, converted - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string var cret *C.GstEvent // return, full, converted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(systemId))) @@ -41797,7 +42405,7 @@ func NewEventSegmentDone(format Format, position int64) *Event { // // @name is used to store multiple sticky events on one pad. func NewEventSinkMessage(name string, msg *Message) *Event { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 *C.GstMessage // in, none, converted var cret *C.GstEvent // return, full, converted @@ -41976,7 +42584,7 @@ func NewEventStreamGroupDone(groupId uint) *Event { // and it might be used to order streams (besides any information conveyed by // stream flags). func NewEventStreamStart(streamId string) *Event { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstEvent // return, full, converted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(streamId))) @@ -42074,7 +42682,7 @@ func NewEventToc(toc *Toc, updated bool) *Event { // TOC select event is to start playback based on the TOC's entry with the // given @uid. func NewEventTocSelect(uid string) *Event { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstEvent // return, full, converted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uid))) @@ -42209,7 +42817,7 @@ func (event *Event) GetStructure() *Structure { // check the name of a custom event. func (event *Event) HasName(name string) bool { var carg0 *C.GstEvent // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstEvent)(UnsafeEventToGlibNone(event)) @@ -42521,9 +43129,9 @@ func (event *Event) ParseLatency() ClockTime { // @origin and @data are valid until @event is released. func (event *Event) ParseProtection() (string, *Buffer, string) { var carg0 *C.GstEvent // in, none, converted - var carg1 *C.gchar // out, none, string, casted *C.gchar + var carg1 *C.gchar // out, none, string var carg2 *C.GstBuffer // out, none, converted - var carg3 *C.gchar // out, none, string, casted *C.gchar + var carg3 *C.gchar // out, none, string carg0 = (*C.GstEvent)(UnsafeEventToGlibNone(event)) @@ -42860,7 +43468,7 @@ func (event *Event) ParseStreamGroupDone() uint { // modify it or store it for later use. func (event *Event) ParseStreamStart() string { var carg0 *C.GstEvent // in, none, converted - var carg1 *C.gchar // out, none, string, casted *C.gchar + var carg1 *C.gchar // out, none, string carg0 = (*C.GstEvent)(UnsafeEventToGlibNone(event)) @@ -42935,7 +43543,7 @@ func (event *Event) ParseToc() (*Toc, bool) { // Parse a TOC select @event and store the results in the given @uid location. func (event *Event) ParseTocSelect() string { var carg0 *C.GstEvent // in, none, converted - var carg1 *C.gchar // out, full, string, casted *C.gchar + var carg1 *C.gchar // out, full, string carg0 = (*C.GstEvent)(UnsafeEventToGlibNone(event)) @@ -43542,73 +44150,6 @@ func (it *Iterator) Resync() { runtime.KeepAlive(it) } -// MapInfo wraps GstMapInfo -// -// A structure containing the result of a map operation such as -// gst_memory_map(). It contains the data and size. -// -// #GstMapInfo cannot be used with g_auto() because it is ambiguous whether it -// needs to be unmapped using gst_buffer_unmap() or gst_memory_unmap(). Instead, -// #GstBufferMapInfo and #GstMemoryMapInfo can be used in that case. -type MapInfo struct { - *mapInfo -} - -// mapInfo is the struct that's finalized -type mapInfo struct { - native *C.GstMapInfo -} - -// UnsafeMapInfoFromGlibBorrow is used to convert raw C.GstMapInfo pointers to go. This is used by the bindings internally. -func UnsafeMapInfoFromGlibBorrow(p unsafe.Pointer) *MapInfo { - return &MapInfo{&mapInfo{(*C.GstMapInfo)(p)}} -} - -// UnsafeMapInfoFromGlibNone is used to convert raw C.GstMapInfo pointers to go while taking a reference. This is used by the bindings internally. -func UnsafeMapInfoFromGlibNone(p unsafe.Pointer) *MapInfo { - // FIXME: this has no ref function, what should we do here? - wrapped := UnsafeMapInfoFromGlibBorrow(p) - runtime.SetFinalizer( - wrapped.mapInfo, - func (intern *mapInfo) { - C.free(unsafe.Pointer(intern.native)) - }, - ) - return wrapped -} - -// UnsafeMapInfoFromGlibFull is used to convert raw C.GstMapInfo pointers to go while taking a reference. This is used by the bindings internally. -func UnsafeMapInfoFromGlibFull(p unsafe.Pointer) *MapInfo { - wrapped := UnsafeMapInfoFromGlibBorrow(p) - runtime.SetFinalizer( - wrapped.mapInfo, - func (intern *mapInfo) { - C.free(unsafe.Pointer(intern.native)) - }, - ) - return wrapped -} - -// UnsafeMapInfoFree unrefs/frees the underlying resource. This is used by the bindings internally. -// -// After this is called, no other method on [MapInfo] is expected to work anymore. -func UnsafeMapInfoFree(m *MapInfo) { - C.free(unsafe.Pointer(m.native)) -} - -// UnsafeMapInfoToGlibNone returns the underlying C pointer. This is used by the bindings internally. -func UnsafeMapInfoToGlibNone(m *MapInfo) unsafe.Pointer { - return unsafe.Pointer(m.native) -} - -// UnsafeMapInfoToGlibFull returns the underlying C pointer and gives up ownership. -// This is used by the bindings internally. -func UnsafeMapInfoToGlibFull(m *MapInfo) unsafe.Pointer { - runtime.SetFinalizer(m.mapInfo, nil) - _p := unsafe.Pointer(m.native) - m.native = nil // MapInfo is invalid from here on - return _p -} // Memory wraps GstMemory // // GstMemory is a lightweight refcounted object that wraps a region of memory. @@ -43838,7 +44379,7 @@ func (mem1 *Memory) IsSpan(mem2 *Memory) (uint, bool) { // Check if @mem if allocated with an allocator for @mem_type. func (mem *Memory) IsType(memType string) bool { var carg0 *C.GstMemory // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstMemory)(UnsafeMemoryToGlibNone(mem)) @@ -43858,96 +44399,6 @@ func (mem *Memory) IsType(memType string) bool { return goret } -// MakeMapped wraps gst_memory_make_mapped -// -// The function takes the following parameters: -// -// - flags MapFlags: mapping flags -// -// The function returns the following values: -// -// - info MapInfo: pointer for info -// - goret *Memory -// -// Create a #GstMemory object that is mapped with @flags. If @mem is mappable -// with @flags, this function returns the mapped @mem directly. Otherwise a -// mapped copy of @mem is returned. -// -// This function takes ownership of old @mem and returns a reference to a new -// #GstMemory. -func (mem *Memory) MakeMapped(flags MapFlags) (MapInfo, *Memory) { - var carg0 *C.GstMemory // in, none, converted - var carg2 C.GstMapFlags // in, none, casted - var carg1 C.GstMapInfo // out, transfer: none, C Pointers: 0, Name: MapInfo, caller-allocates - var cret *C.GstMemory // return, full, converted - - carg0 = (*C.GstMemory)(UnsafeMemoryToGlibNone(mem)) - carg2 = C.GstMapFlags(flags) - - cret = C.gst_memory_make_mapped(carg0, &carg1, carg2) - runtime.KeepAlive(mem) - runtime.KeepAlive(flags) - - var info MapInfo - var goret *Memory - - _ = info - _ = carg1 - panic("unimplemented conversion of MapInfo (GstMapInfo)") - goret = UnsafeMemoryFromGlibFull(unsafe.Pointer(cret)) - - return info, goret -} - -// Map wraps gst_memory_map -// -// The function takes the following parameters: -// -// - flags MapFlags: mapping flags -// -// The function returns the following values: -// -// - info MapInfo: pointer for info -// - goret bool -// -// Fill @info with the pointer and sizes of the memory in @mem that can be -// accessed according to @flags. -// -// This function can return %FALSE for various reasons: -// - the memory backed by @mem is not accessible with the given @flags. -// - the memory was already mapped with a different mapping. -// -// @info and its contents remain valid for as long as @mem is valid and -// until gst_memory_unmap() is called. -// -// For each gst_memory_map() call, a corresponding gst_memory_unmap() call -// should be done. -func (mem *Memory) Map(flags MapFlags) (MapInfo, bool) { - var carg0 *C.GstMemory // in, none, converted - var carg2 C.GstMapFlags // in, none, casted - var carg1 C.GstMapInfo // out, transfer: none, C Pointers: 0, Name: MapInfo, caller-allocates - var cret C.gboolean // return - - carg0 = (*C.GstMemory)(UnsafeMemoryToGlibNone(mem)) - carg2 = C.GstMapFlags(flags) - - cret = C.gst_memory_map(carg0, &carg1, carg2) - runtime.KeepAlive(mem) - runtime.KeepAlive(flags) - - var info MapInfo - var goret bool - - _ = info - _ = carg1 - panic("unimplemented conversion of MapInfo (GstMapInfo)") - if cret != 0 { - goret = true - } - - return info, goret -} - // Resize wraps gst_memory_resize // // The function takes the following parameters: @@ -44012,25 +44463,6 @@ func (mem *Memory) Share(offset int, size int) *Memory { return goret } -// Unmap wraps gst_memory_unmap -// -// The function takes the following parameters: -// -// - info *MapInfo: a #GstMapInfo -// -// Release the memory obtained with gst_memory_map() -func (mem *Memory) Unmap(info *MapInfo) { - var carg0 *C.GstMemory // in, none, converted - var carg1 *C.GstMapInfo // in, none, converted - - carg0 = (*C.GstMemory)(UnsafeMemoryToGlibNone(mem)) - carg1 = (*C.GstMapInfo)(UnsafeMapInfoToGlibNone(info)) - - C.gst_memory_unmap(carg0, carg1) - runtime.KeepAlive(mem) - runtime.KeepAlive(info) -} - // Message wraps GstMessage // // Messages are implemented as a subclass of #GstMiniObject with a generic @@ -44616,7 +45048,7 @@ func NewMessageEos(src Object) *Message { // receiving this message should stop the pipeline. func NewMessageError(src Object, debug string, err error) *Message { var carg1 *C.GstObject // in, none, converted, nullable - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string var carg2 *C.GError // in, none, converted var cret *C.GstMessage // return, full, converted @@ -44658,7 +45090,7 @@ func NewMessageError(src Object, debug string, err error) *Message { // receiving this message should stop the pipeline. func NewMessageErrorWithDetails(src Object, debug string, details *Structure, err error) *Message { var carg1 *C.GstObject // in, none, converted, nullable - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string var carg4 *C.GstStructure // in, full, converted, nullable var carg2 *C.GError // in, none, converted var cret *C.GstMessage // return, full, converted @@ -44735,7 +45167,7 @@ func NewMessageHaveContext(src Object, _context *Context) *Message { // @debug. func NewMessageInfo(src Object, debug string, err error) *Message { var carg1 *C.GstObject // in, none, converted, nullable - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string var carg2 *C.GError // in, none, converted var cret *C.GstMessage // return, full, converted @@ -44775,7 +45207,7 @@ func NewMessageInfo(src Object, debug string, err error) *Message { // @debug. func NewMessageInfoWithDetails(src Object, debug string, details *Structure, err error) *Message { var carg1 *C.GstObject // in, none, converted, nullable - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string var carg4 *C.GstStructure // in, full, converted, nullable var carg2 *C.GError // in, none, converted var cret *C.GstMessage // return, full, converted @@ -44885,7 +45317,7 @@ func NewMessageLatency(src Object) *Message { // This message is posted when an element needs a specific #GstContext. func NewMessageNeedContext(src Object, contextType string) *Message { var carg1 *C.GstObject // in, none, converted, nullable - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var cret *C.GstMessage // return, full, converted if src != nil { @@ -44960,8 +45392,8 @@ func NewMessageNewClock(src Object, clock Clock) *Message { func NewMessageProgress(src Object, typ ProgressType, code string, text string) *Message { var carg1 *C.GstObject // in, none, converted, nullable var carg2 C.GstProgressType // in, none, casted - var carg3 *C.gchar // in, none, string, casted *C.gchar - var carg4 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string + var carg4 *C.gchar // in, none, string var cret *C.GstMessage // return, full, converted if src != nil { @@ -45089,7 +45521,7 @@ func NewMessageQos(src Object, live bool, runningTime uint64, streamTime uint64, // list and structure are transferred to the message. func NewMessageRedirect(src Object, location string, tagList *TagList, entryStruct *Structure) *Message { var carg1 *C.GstObject // in, none, converted, nullable - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var carg3 *C.GstTagList // in, full, converted, nullable var carg4 *C.GstStructure // in, full, converted, nullable var cret *C.GstMessage // return, full, converted @@ -45758,7 +46190,7 @@ func NewMessageToc(src Object, toc *Toc, updated bool) *Message { // @debug. func NewMessageWarning(src Object, debug string, err error) *Message { var carg1 *C.GstObject // in, none, converted, nullable - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string var carg2 *C.GError // in, none, converted var cret *C.GstMessage // return, full, converted @@ -45798,7 +46230,7 @@ func NewMessageWarning(src Object, debug string, err error) *Message { // @debug. func NewMessageWarningWithDetails(src Object, debug string, details *Structure, err error) *Message { var carg1 *C.GstObject // in, none, converted, nullable - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string var carg4 *C.GstStructure // in, full, converted, nullable var carg2 *C.GError // in, none, converted var cret *C.GstMessage // return, full, converted @@ -45840,7 +46272,7 @@ func NewMessageWarningWithDetails(src Object, debug string, details *Structure, // list and structure are transferred to the message. func (message *Message) AddRedirectEntry(location string, tagList *TagList, entryStruct *Structure) { var carg0 *C.GstMessage // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 *C.GstTagList // in, full, converted, nullable var carg3 *C.GstStructure // in, full, converted, nullable @@ -45973,7 +46405,7 @@ func (message *Message) GetStructure() *Structure { // check the name of a custom message. func (message *Message) HasName(name string) bool { var carg0 *C.GstMessage // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstMessage)(UnsafeMessageToGlibNone(message)) @@ -46143,7 +46575,7 @@ func (message *Message) ParseClockProvide() (Clock, bool) { // Parse a context type from an existing GST_MESSAGE_NEED_CONTEXT message. func (message *Message) ParseContextType() (string, bool) { var carg0 *C.GstMessage // in, none, converted - var carg1 *C.gchar // out, none, string, casted *C.gchar + var carg1 *C.gchar // out, none, string var cret C.gboolean // return carg0 = (*C.GstMessage)(UnsafeMessageToGlibNone(message)) @@ -46277,7 +46709,7 @@ func (message *Message) ParseDeviceRemoved() Device { // MT safe. func (message *Message) ParseError() (string, error) { var carg0 *C.GstMessage // in, none, converted - var carg2 *C.gchar // out, full, string, casted *C.gchar, nullable + var carg2 *C.gchar // out, full, string, nullable-string var carg1 *C.GError // out, full, converted carg0 = (*C.GstMessage)(UnsafeMessageToGlibNone(message)) @@ -46389,7 +46821,7 @@ func (message *Message) ParseHaveContext() *Context { // MT safe. func (message *Message) ParseInfo() (string, error) { var carg0 *C.GstMessage // in, none, converted - var carg2 *C.gchar // out, full, string, casted *C.gchar, nullable + var carg2 *C.gchar // out, full, string, nullable-string var carg1 *C.GError // out, full, converted carg0 = (*C.GstMessage)(UnsafeMessageToGlibNone(message)) @@ -46493,8 +46925,8 @@ func (message *Message) ParseNewClock() Clock { func (message *Message) ParseProgress() (ProgressType, string, string) { var carg0 *C.GstMessage // in, none, converted var carg1 C.GstProgressType // out, full, casted - var carg2 *C.gchar // out, full, string, casted *C.gchar - var carg3 *C.gchar // out, full, string, casted *C.gchar + var carg2 *C.gchar // out, full, string + var carg3 *C.gchar // out, full, string carg0 = (*C.GstMessage)(UnsafeMessageToGlibNone(message)) @@ -46662,7 +47094,7 @@ func (message *Message) ParseQosValues() (int64, float64, int) { func (message *Message) ParseRedirectEntry(entryIndex uint) (string, *TagList, *Structure) { var carg0 *C.GstMessage // in, none, converted var carg1 C.gsize // in, none, casted - var carg2 *C.gchar // out, none, string, casted *C.gchar + var carg2 *C.gchar // out, none, string var carg3 *C.GstTagList // out, none, converted, nullable var carg4 *C.GstStructure // out, none, converted, nullable @@ -47148,7 +47580,7 @@ func (message *Message) ParseToc() (*Toc, bool) { // MT safe. func (message *Message) ParseWarning() (string, error) { var carg0 *C.GstMessage // in, none, converted - var carg2 *C.gchar // out, full, string, casted *C.gchar, nullable + var carg2 *C.gchar // out, full, string, nullable-string var carg1 *C.GError // out, full, converted carg0 = (*C.GstMessage)(UnsafeMessageToGlibNone(message)) @@ -47538,6 +47970,208 @@ func UnsafeMetaToGlibFull(m *Meta) unsafe.Pointer { m.native = nil // Meta is invalid from here on return _p } +// MetaApiTypeGetTags wraps gst_meta_api_type_get_tags +// +// The function takes the following parameters: +// +// - api gobject.Type: an API +// +// The function returns the following values: +// +// - goret []string +func MetaApiTypeGetTags(api gobject.Type) []string { + var carg1 C.GType // in, none, casted, alias + var cret **C.gchar // return, transfer: none, C Pointers: 2, Name: array[utf8], scope: , array (inner: *typesystem.StringPrimitive, zero-terminated) + + carg1 = C.GType(api) + + cret = C.gst_meta_api_type_get_tags(carg1) + runtime.KeepAlive(api) + + var goret []string + + _ = goret + _ = cret + panic("unimplemented conversion of []string (const gchar* const*)") + + return goret +} + +// MetaApiTypeHasTag wraps gst_meta_api_type_has_tag +// +// The function takes the following parameters: +// +// - api gobject.Type: an API +// - tag glib.Quark: the tag to check +// +// The function returns the following values: +// +// - goret bool +// +// Check if @api was registered with @tag. +func MetaApiTypeHasTag(api gobject.Type, tag glib.Quark) bool { + var carg1 C.GType // in, none, casted, alias + var carg2 C.GQuark // in, none, casted, alias + var cret C.gboolean // return + + carg1 = C.GType(api) + carg2 = C.GQuark(tag) + + cret = C.gst_meta_api_type_has_tag(carg1, carg2) + runtime.KeepAlive(api) + runtime.KeepAlive(tag) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + +// MetaApiTypeRegister wraps gst_meta_api_type_register +// +// The function takes the following parameters: +// +// - api string: an API to register +// - tags []string: tags for @api +// +// The function returns the following values: +// +// - goret gobject.Type +// +// Register and return a GType for the @api and associate it with +// @tags. +func MetaApiTypeRegister(api string, tags []string) gobject.Type { + var carg1 *C.gchar // in, none, string + var carg2 **C.gchar // in, transfer: none, C Pointers: 2, Name: array[utf8], array (inner: *typesystem.StringPrimitive, zero-terminated) + var cret C.GType // return, none, casted, alias + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(api))) + defer C.free(unsafe.Pointer(carg1)) + _ = tags + _ = carg2 + panic("unimplemented conversion of []string (const gchar**)") + + cret = C.gst_meta_api_type_register(carg1, carg2) + runtime.KeepAlive(api) + runtime.KeepAlive(tags) + + var goret gobject.Type + + goret = gobject.Type(cret) + + return goret +} + +// MetaDeserialize wraps gst_meta_deserialize +// +// The function takes the following parameters: +// +// - buffer *Buffer: a #GstBuffer +// - data *uint8: serialization data obtained from gst_meta_serialize() +// - size uint: size of @data +// +// The function returns the following values: +// +// - consumed uint32: total size used by this meta, could be less than @size +// - goret *Meta +// +// Recreate a #GstMeta from serialized data returned by +// gst_meta_serialize() and add it to @buffer. +// +// Note that the meta must have been previously registered by calling one of +// `gst_*_meta_get_info ()` functions. +// +// @consumed is set to the number of bytes that can be skipped from @data to +// find the next meta serialization, if any. In case of parsing error that does +// not allow to determine that size, @consumed is set to 0. +func MetaDeserialize(buffer *Buffer, data *uint8, size uint) (uint32, *Meta) { + var carg1 *C.GstBuffer // in, none, converted + var carg2 *C.guint8 // in, transfer: none, C Pointers: 1, Name: guint8 + var carg3 C.gsize // in, none, casted + var carg4 C.guint32 // out, full, casted + var cret *C.GstMeta // return, none, converted + + carg1 = (*C.GstBuffer)(UnsafeBufferToGlibNone(buffer)) + _ = data + _ = carg2 + panic("unimplemented conversion of *uint8 (guint8*)") + carg3 = C.gsize(size) + + cret = C.gst_meta_deserialize(carg1, carg2, carg3, &carg4) + runtime.KeepAlive(buffer) + runtime.KeepAlive(data) + runtime.KeepAlive(size) + + var consumed uint32 + var goret *Meta + + consumed = uint32(carg4) + goret = UnsafeMetaFromGlibNone(unsafe.Pointer(cret)) + + return consumed, goret +} + +// MetaGetInfo wraps gst_meta_get_info +// +// The function takes the following parameters: +// +// - impl string: the name +// +// The function returns the following values: +// +// - goret *MetaInfo +// +// Lookup a previously registered meta info structure by its implementation name +// @impl. +func MetaGetInfo(impl string) *MetaInfo { + var carg1 *C.gchar // in, none, string + var cret *C.GstMetaInfo // return, none, converted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(impl))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_meta_get_info(carg1) + runtime.KeepAlive(impl) + + var goret *MetaInfo + + goret = UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + +// MetaRegisterCustomSimple wraps gst_meta_register_custom_simple +// +// The function takes the following parameters: +// +// - name string: the name of the #GstMeta implementation +// +// The function returns the following values: +// +// - goret *MetaInfo +// +// Simplified version of gst_meta_register_custom(), with no tags and no +// transform function. +func MetaRegisterCustomSimple(name string) *MetaInfo { + var carg1 *C.gchar // in, none, string + var cret *C.GstMetaInfo // return, none, converted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_meta_register_custom_simple(carg1) + runtime.KeepAlive(name) + + var goret *MetaInfo + + goret = UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // CompareSeqnum wraps gst_meta_compare_seqnum // // The function takes the following parameters: @@ -48561,6 +49195,24 @@ func UnsafeParentBufferMetaToGlibFull(p *ParentBufferMeta) unsafe.Pointer { p.native = nil // ParentBufferMeta is invalid from here on return _p } +// ParentBufferMetaGetInfo wraps gst_parent_buffer_meta_get_info +// The function returns the following values: +// +// - goret *MetaInfo +// +// Gets the global #GstMetaInfo describing the #GstParentBufferMeta meta. +func ParentBufferMetaGetInfo() *MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_parent_buffer_meta_get_info() + + var goret *MetaInfo + + goret = UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // ParseContext wraps GstParseContext // // Opaque structure. @@ -50085,6 +50737,22 @@ func UnsafeProtectionMetaToGlibFull(p *ProtectionMeta) unsafe.Pointer { p.native = nil // ProtectionMeta is invalid from here on return _p } +// ProtectionMetaGetInfo wraps gst_protection_meta_get_info +// The function returns the following values: +// +// - goret *MetaInfo +func ProtectionMetaGetInfo() *MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_protection_meta_get_info() + + var goret *MetaInfo + + goret = UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // ProxyPadClass wraps GstProxyPadClass type ProxyPadClass struct { *proxyPadClass @@ -50417,7 +51085,7 @@ func NewQueryCaps(filter *Caps) *Query { // // Free-function: gst_query_unref() func NewQueryContext(contextType string) *Query { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstQuery // return, full, converted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(contextType))) @@ -51442,7 +52110,7 @@ func (query *Query) ParseContext() *Context { // Parse a context type from an existing GST_QUERY_CONTEXT query. func (query *Query) ParseContextType() (string, bool) { var carg0 *C.GstQuery // in, none, converted - var carg1 *C.gchar // out, none, string, casted *C.gchar + var carg1 *C.gchar // out, none, string var cret C.gboolean // return carg0 = (*C.GstQuery)(UnsafeQueryToGlibNone(query)) @@ -51979,7 +52647,7 @@ func (query *Query) ParseSelectable() bool { // Free the string with g_free() after usage. func (query *Query) ParseURI() string { var carg0 *C.GstQuery // in, none, converted - var carg1 *C.gchar // out, full, string, casted *C.gchar, nullable + var carg1 *C.gchar // out, full, string, nullable-string carg0 = (*C.GstQuery)(UnsafeQueryToGlibNone(query)) @@ -52007,7 +52675,7 @@ func (query *Query) ParseURI() string { // Free the string with g_free() after usage. func (query *Query) ParseURIRedirection() string { var carg0 *C.GstQuery // in, none, converted - var carg1 *C.gchar // out, full, string, casted *C.gchar, nullable + var carg1 *C.gchar // out, full, string, nullable-string carg0 = (*C.GstQuery)(UnsafeQueryToGlibNone(query)) @@ -52781,6 +53449,24 @@ func UnsafeReferenceTimestampMetaToGlibFull(r *ReferenceTimestampMeta) unsafe.Po r.native = nil // ReferenceTimestampMeta is invalid from here on return _p } +// ReferenceTimestampMetaGetInfo wraps gst_reference_timestamp_meta_get_info +// The function returns the following values: +// +// - goret *MetaInfo +// +// Gets the global #GstMetaInfo describing the #GstReferenceTimestampMeta meta. +func ReferenceTimestampMetaGetInfo() *MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_reference_timestamp_meta_get_info() + + var goret *MetaInfo + + goret = UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // RegistryClass wraps GstRegistryClass type RegistryClass struct { *registryClass @@ -54657,7 +55343,7 @@ func UnsafeStructureToGlibFull(s *Structure) unsafe.Pointer { // // Free-function: gst_structure_free func StructureFromString(str string) *Structure { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 *C.gchar // skipped var cret *C.GstStructure // return, full, converted @@ -54690,7 +55376,7 @@ func StructureFromString(str string) *Structure { // // Free-function: gst_structure_free func NewStructureEmpty(name string) *Structure { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstStructure // return, full, converted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -54727,7 +55413,7 @@ func NewStructureEmpty(name string) *Structure { // // Free-function: gst_structure_free func NewStructureFromString(str string) *Structure { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstStructure // return, full, converted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(str))) @@ -55076,7 +55762,7 @@ func (structure *Structure) FixateFieldNearestInt(fieldName string, target int) func (structure *Structure) FixateFieldString(fieldName string, target string) bool { var carg0 *C.GstStructure // in, none, converted var carg1 *C.char // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) @@ -55152,7 +55838,7 @@ func (structure *Structure) ForEach(fn StructureForEachFunc) bool { // and has the correct type. func (structure *Structure) GetBoolean(fieldname string) (bool, bool) { var carg0 *C.GstStructure // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gboolean // out var cret C.gboolean // return @@ -55193,7 +55879,7 @@ func (structure *Structure) GetBoolean(fieldname string) (bool, bool) { // and has the correct type. func (structure *Structure) GetClockTime(fieldname string) (ClockTime, bool) { var carg0 *C.GstStructure // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.GstClockTime // out, full, casted, alias var cret C.gboolean // return @@ -55237,7 +55923,7 @@ func (structure *Structure) GetClockTime(fieldname string) (ClockTime, bool) { // which doesn't return a copy of the string). func (structure *Structure) GetDateTime(fieldname string) (*DateTime, bool) { var carg0 *C.GstStructure // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 *C.GstDateTime // out, full, converted var cret C.gboolean // return @@ -55276,7 +55962,7 @@ func (structure *Structure) GetDateTime(fieldname string) (*DateTime, bool) { // and has the correct type. func (structure *Structure) GetDouble(fieldname string) (float64, bool) { var carg0 *C.GstStructure // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gdouble // out, full, casted var cret C.gboolean // return @@ -55316,7 +56002,7 @@ func (structure *Structure) GetDouble(fieldname string) (float64, bool) { // has the correct type and that the enumtype is correct. func (structure *Structure) GetEnum(fieldname string, enumtype gobject.Type) (int, bool) { var carg0 *C.GstStructure // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.GType // in, none, casted, alias var carg3 C.gint // out, full, casted var cret C.gboolean // return @@ -55357,7 +56043,7 @@ func (structure *Structure) GetEnum(fieldname string, enumtype gobject.Type) (in // returned. func (structure *Structure) GetFieldType(fieldname string) gobject.Type { var carg0 *C.GstStructure // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.GType // return, none, casted, alias carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) @@ -55392,7 +56078,7 @@ func (structure *Structure) GetFieldType(fieldname string) gobject.Type { // has the correct type and that the flagstype is correct. func (structure *Structure) GetFlags(fieldname string, flagsType gobject.Type) (uint, bool) { var carg0 *C.GstStructure // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.GType // in, none, casted, alias var carg3 C.guint // out, full, casted var cret C.gboolean // return @@ -55434,7 +56120,7 @@ func (structure *Structure) GetFlags(fieldname string, flagsType gobject.Type) ( // provided pointers. func (structure *Structure) GetFlagset(fieldname string) (uint, uint, bool) { var carg0 *C.GstStructure // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // out, full, casted var carg3 C.guint // out, full, casted var cret C.gboolean // return @@ -55477,7 +56163,7 @@ func (structure *Structure) GetFlagset(fieldname string) (uint, uint, bool) { // for making sure the field exists and has the correct type. func (structure *Structure) GetFraction(fieldname string) (int, int, bool) { var carg0 *C.GstStructure // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gint // out, full, casted var carg3 C.gint // out, full, casted var cret C.gboolean // return @@ -55519,7 +56205,7 @@ func (structure *Structure) GetFraction(fieldname string) (int, int, bool) { // and has the correct type. func (structure *Structure) GetInt(fieldname string) (int, bool) { var carg0 *C.GstStructure // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gint // out, full, casted var cret C.gboolean // return @@ -55558,7 +56244,7 @@ func (structure *Structure) GetInt(fieldname string) (int, bool) { // and has the correct type. func (structure *Structure) GetInt64(fieldname string) (int64, bool) { var carg0 *C.GstStructure // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gint64 // out, full, casted var cret C.gboolean // return @@ -55589,7 +56275,7 @@ func (structure *Structure) GetInt64(fieldname string) (int64, bool) { // Get the name of @structure as a string. func (structure *Structure) GetName() string { var carg0 *C.GstStructure // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) @@ -55643,8 +56329,8 @@ func (structure *Structure) GetNameID() glib.Quark { // call to a gst_structure_*() function with the given structure. func (structure *Structure) GetString(fieldname string) string { var carg0 *C.GstStructure // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(fieldname))) @@ -55677,7 +56363,7 @@ func (structure *Structure) GetString(fieldname string) string { // and has the correct type. func (structure *Structure) GetUint(fieldname string) (uint, bool) { var carg0 *C.GstStructure // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // out, full, casted var cret C.gboolean // return @@ -55716,7 +56402,7 @@ func (structure *Structure) GetUint(fieldname string) (uint, bool) { // and has the correct type. func (structure *Structure) GetUint64(fieldname string) (uint64, bool) { var carg0 *C.GstStructure // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint64 // out, full, casted var cret C.gboolean // return @@ -55752,7 +56438,7 @@ func (structure *Structure) GetUint64(fieldname string) (uint64, bool) { // Check if @structure contains a field named @fieldname. func (structure *Structure) HasField(fieldname string) bool { var carg0 *C.GstStructure // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) @@ -55786,7 +56472,7 @@ func (structure *Structure) HasField(fieldname string) bool { // Check if @structure contains a field named @fieldname and with GType @type. func (structure *Structure) HasFieldTyped(fieldname string, typ gobject.Type) bool { var carg0 *C.GstStructure // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.GType // in, none, casted, alias var cret C.gboolean // return @@ -55822,7 +56508,7 @@ func (structure *Structure) HasFieldTyped(fieldname string, typ gobject.Type) bo // Checks if the structure has the given name func (structure *Structure) HasName(name string) bool { var carg0 *C.GstStructure // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) @@ -56104,7 +56790,7 @@ func (structure *Structure) NFields() int { func (structure *Structure) NthFieldName(index uint) string { var carg0 *C.GstStructure // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) carg1 = C.guint(index) @@ -56142,7 +56828,7 @@ func (structure *Structure) RemoveAllFields() { // name does not exist, the structure is unchanged. func (structure *Structure) RemoveField(fieldname string) { var carg0 *C.GstStructure // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(fieldname))) @@ -56180,7 +56866,7 @@ func (structure *Structure) RemoveField(fieldname string) { func (structure *Structure) Serialize(flags SerializeFlags) string { var carg0 *C.GstStructure // in, none, converted var carg1 C.GstSerializeFlags // in, none, casted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) carg1 = C.GstSerializeFlags(flags) @@ -56212,7 +56898,7 @@ func (structure *Structure) Serialize(flags SerializeFlags) string { func (structure *Structure) SerializeFull(flags SerializeFlags) string { var carg0 *C.GstStructure // in, none, converted var carg1 C.GstSerializeFlags // in, none, casted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) carg1 = C.GstSerializeFlags(flags) @@ -56240,7 +56926,7 @@ func (structure *Structure) SerializeFull(flags SerializeFlags) string { // letter and can be followed by letters, numbers and any of "/-_.:". func (structure *Structure) SetName(name string) { var carg0 *C.GstStructure // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -56307,7 +56993,7 @@ func (structure *Structure) SetParentRefcount(refcount *int) bool { // Free-function: g_free func (structure *Structure) ToString() string { var carg0 *C.GstStructure // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) @@ -56491,7 +57177,7 @@ func NewTagListEmpty() *TagList { // // Deserializes a tag list. func NewTagListFromString(str string) *TagList { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstTagList // return, full, converted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(str))) @@ -56507,6 +57193,49 @@ func NewTagListFromString(str string) *TagList { return goret } +// TagListCopyValue wraps gst_tag_list_copy_value +// +// The function takes the following parameters: +// +// - list *TagList: list to get the tag from +// - tag string: tag to read out +// +// The function returns the following values: +// +// - dest gobject.Value: uninitialized #GValue to copy into +// - 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. +// You must g_value_unset() the value after use. +func TagListCopyValue(list *TagList, tag string) (gobject.Value, bool) { + var carg2 *C.GstTagList // in, none, converted + var carg3 *C.gchar // in, none, string + var carg1 C.GValue // out, transfer: none, C Pointers: 0, Name: Value, caller-allocates + var cret C.gboolean // return + + carg2 = (*C.GstTagList)(UnsafeTagListToGlibNone(list)) + carg3 = (*C.gchar)(unsafe.Pointer(C.CString(tag))) + defer C.free(unsafe.Pointer(carg3)) + + cret = C.gst_tag_list_copy_value(&carg1, carg2, carg3) + runtime.KeepAlive(list) + runtime.KeepAlive(tag) + + var dest gobject.Value + var goret bool + + _ = dest + _ = carg1 + panic("unimplemented conversion of gobject.Value (GValue)") + if cret != 0 { + goret = true + } + + return dest, goret +} + // AddValue wraps gst_tag_list_add_value // // The function takes the following parameters: @@ -56519,7 +57248,7 @@ func NewTagListFromString(str string) *TagList { func (list *TagList) AddValue(mode TagMergeMode, tag string, value *gobject.Value) { var carg0 *C.GstTagList // in, none, converted var carg1 C.GstTagMergeMode // in, none, casted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var carg3 *C.GValue // in, none, converted carg0 = (*C.GstTagList)(UnsafeTagListToGlibNone(list)) @@ -56603,7 +57332,7 @@ func (list *TagList) ForEach(fn TagForEachFunc) { // into one if multiple values are associated with the tag. func (list *TagList) GetBoolean(tag string) (bool, bool) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gboolean // out var cret C.gboolean // return @@ -56644,7 +57373,7 @@ func (list *TagList) GetBoolean(tag string) (bool, bool) { // list. func (list *TagList) GetBooleanIndex(tag string, index uint) (bool, bool) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // in, none, casted var carg3 C.gboolean // out var cret C.gboolean // return @@ -56691,7 +57420,7 @@ func (list *TagList) GetBooleanIndex(tag string, index uint) (bool, bool) { // Free-function: gst_date_time_unref func (list *TagList) GetDateTime(tag string) (*DateTime, bool) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 *C.GstDateTime // out, full, converted var cret C.gboolean // return @@ -56733,7 +57462,7 @@ func (list *TagList) GetDateTime(tag string) (*DateTime, bool) { // Free-function: gst_date_time_unref func (list *TagList) GetDateTimeIndex(tag string, index uint) (*DateTime, bool) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // in, none, casted var carg3 *C.GstDateTime // out, full, converted var cret C.gboolean // return @@ -56774,7 +57503,7 @@ func (list *TagList) GetDateTimeIndex(tag string, index uint) (*DateTime, bool) // into one if multiple values are associated with the tag. func (list *TagList) GetDouble(tag string) (float64, bool) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gdouble // out, full, casted var cret C.gboolean // return @@ -56813,7 +57542,7 @@ func (list *TagList) GetDouble(tag string) (float64, bool) { // list. func (list *TagList) GetDoubleIndex(tag string, index uint) (float64, bool) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // in, none, casted var carg3 C.gdouble // out, full, casted var cret C.gboolean // return @@ -56854,7 +57583,7 @@ func (list *TagList) GetDoubleIndex(tag string, index uint) (float64, bool) { // into one if multiple values are associated with the tag. func (list *TagList) GetFloat(tag string) (float32, bool) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gfloat // out, full, casted var cret C.gboolean // return @@ -56893,7 +57622,7 @@ func (list *TagList) GetFloat(tag string) (float32, bool) { // list. func (list *TagList) GetFloatIndex(tag string, index uint) (float32, bool) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // in, none, casted var carg3 C.gfloat // out, full, casted var cret C.gboolean // return @@ -56934,7 +57663,7 @@ func (list *TagList) GetFloatIndex(tag string, index uint) (float32, bool) { // into one if multiple values are associated with the tag. func (list *TagList) GetInt(tag string) (int, bool) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gint // out, full, casted var cret C.gboolean // return @@ -56972,7 +57701,7 @@ func (list *TagList) GetInt(tag string) (int, bool) { // into one if multiple values are associated with the tag. func (list *TagList) GetInt64(tag string) (int64, bool) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gint64 // out, full, casted var cret C.gboolean // return @@ -57011,7 +57740,7 @@ func (list *TagList) GetInt64(tag string) (int64, bool) { // list. func (list *TagList) GetInt64Index(tag string, index uint) (int64, bool) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // in, none, casted var carg3 C.gint64 // out, full, casted var cret C.gboolean // return @@ -57053,7 +57782,7 @@ func (list *TagList) GetInt64Index(tag string, index uint) (int64, bool) { // list. func (list *TagList) GetIntIndex(tag string, index uint) (int, bool) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // in, none, casted var carg3 C.gint // out, full, casted var cret C.gboolean // return @@ -57100,7 +57829,7 @@ func (list *TagList) GetIntIndex(tag string, index uint) (int, bool) { // Free-function: gst_sample_unref func (list *TagList) GetSample(tag string) (*Sample, bool) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 *C.GstSample // out, full, converted var cret C.gboolean // return @@ -57145,7 +57874,7 @@ func (list *TagList) GetSample(tag string) (*Sample, bool) { // Free-function: gst_sample_unref func (list *TagList) GetSampleIndex(tag string, index uint) (*Sample, bool) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // in, none, casted var carg3 *C.GstSample // out, full, converted var cret C.gboolean // return @@ -57217,8 +57946,8 @@ func (list *TagList) GetScope() TagScope { // Free-function: g_free func (list *TagList) GetString(tag string) (string, bool) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // out, full, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // out, full, string var cret C.gboolean // return carg0 = (*C.GstTagList)(UnsafeTagListToGlibNone(list)) @@ -57263,9 +57992,9 @@ func (list *TagList) GetString(tag string) (string, bool) { // Free-function: g_free func (list *TagList) GetStringIndex(tag string, index uint) (string, bool) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // in, none, casted - var carg3 *C.gchar // out, full, string, casted *C.gchar + var carg3 *C.gchar // out, full, string var cret C.gboolean // return carg0 = (*C.GstTagList)(UnsafeTagListToGlibNone(list)) @@ -57303,7 +58032,7 @@ func (list *TagList) GetStringIndex(tag string, index uint) (string, bool) { // Checks how many value are stored in this tag list for the given tag. func (list *TagList) GetTagSize(tag string) uint { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.guint // return, none, casted carg0 = (*C.GstTagList)(UnsafeTagListToGlibNone(list)) @@ -57336,7 +58065,7 @@ func (list *TagList) GetTagSize(tag string) uint { // into one if multiple values are associated with the tag. func (list *TagList) GetUint(tag string) (uint, bool) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // out, full, casted var cret C.gboolean // return @@ -57374,7 +58103,7 @@ func (list *TagList) GetUint(tag string) (uint, bool) { // into one if multiple values are associated with the tag. func (list *TagList) GetUint64(tag string) (uint64, bool) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint64 // out, full, casted var cret C.gboolean // return @@ -57413,7 +58142,7 @@ func (list *TagList) GetUint64(tag string) (uint64, bool) { // list. func (list *TagList) GetUint64Index(tag string, index uint) (uint64, bool) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // in, none, casted var carg3 C.guint64 // out, full, casted var cret C.gboolean // return @@ -57455,7 +58184,7 @@ func (list *TagList) GetUint64Index(tag string, index uint) (uint64, bool) { // list. func (list *TagList) GetUintIndex(tag string, index uint) (uint, bool) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // in, none, casted var carg3 C.guint // out, full, casted var cret C.gboolean // return @@ -57635,7 +58364,7 @@ func (list *TagList) NTags() int { func (list *TagList) NthTagName(index uint) string { var carg0 *C.GstTagList // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstTagList)(UnsafeTagListToGlibNone(list)) carg1 = C.guint(index) @@ -57671,9 +58400,9 @@ func (list *TagList) NthTagName(index uint) string { // be non-%NULL and non-empty. func (list *TagList) PeekStringIndex(tag string, index uint) (string, bool) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // in, none, casted - var carg3 *C.gchar // out, none, string, casted *C.gchar + var carg3 *C.gchar // out, none, string var cret C.gboolean // return carg0 = (*C.GstTagList)(UnsafeTagListToGlibNone(list)) @@ -57706,7 +58435,7 @@ func (list *TagList) PeekStringIndex(tag string, index uint) (string, bool) { // Removes the given tag from the taglist. func (list *TagList) RemoveTag(tag string) { var carg0 *C.GstTagList // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstTagList)(UnsafeTagListToGlibNone(list)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(tag))) @@ -57745,7 +58474,7 @@ func (list *TagList) SetScope(scope TagScope) { // Serializes a tag list to a string. func (list *TagList) ToString() string { var carg0 *C.GstTagList // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstTagList)(UnsafeTagListToGlibNone(list)) @@ -58193,7 +58922,7 @@ func (toc *Toc) Dump() { // Find #GstTocEntry with given @uid in the @toc. func (toc *Toc) FindEntry(uid string) *TocEntry { var carg0 *C.GstToc // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstTocEntry // return, none, converted carg0 = (*C.GstToc)(UnsafeTocToGlibNone(toc)) @@ -58211,6 +58940,35 @@ func (toc *Toc) FindEntry(uid string) *TocEntry { return goret } +// GetEntries wraps gst_toc_get_entries +// The function returns the following values: +// +// - goret []*TocEntry +// +// Gets the list of #GstTocEntry of @toc. +func (toc *Toc) GetEntries() []*TocEntry { + var carg0 *C.GstToc // in, none, converted + var cret *C.GList // container, transfer: none + + carg0 = (*C.GstToc)(UnsafeTocToGlibNone(toc)) + + cret = C.gst_toc_get_entries(carg0) + runtime.KeepAlive(toc) + + var goret []*TocEntry + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) *TocEntry { + var dst *TocEntry // converted + dst = UnsafeTocEntryFromGlibNone(v) + return dst + }, + ) + + return goret +} + // GetScope wraps gst_toc_get_scope // The function returns the following values: // @@ -58385,7 +59143,7 @@ func UnsafeTocEntryToGlibFull(t *TocEntry) unsafe.Pointer { // Create new #GstTocEntry structure. func NewTocEntry(typ TocEntryType, uid string) *TocEntry { var carg1 C.GstTocEntryType // in, none, casted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var cret *C.GstTocEntry // return, full, converted carg1 = C.GstTocEntryType(typ) @@ -58536,6 +59294,35 @@ func (entry *TocEntry) GetStartStopTimes() (int64, int64, bool) { return start, stop, goret } +// GetSubEntries wraps gst_toc_entry_get_sub_entries +// The function returns the following values: +// +// - goret []*TocEntry +// +// Gets the sub-entries of @entry. +func (entry *TocEntry) GetSubEntries() []*TocEntry { + var carg0 *C.GstTocEntry // in, none, converted + var cret *C.GList // container, transfer: none + + carg0 = (*C.GstTocEntry)(UnsafeTocEntryToGlibNone(entry)) + + cret = C.gst_toc_entry_get_sub_entries(carg0) + runtime.KeepAlive(entry) + + var goret []*TocEntry + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) *TocEntry { + var dst *TocEntry // converted + dst = UnsafeTocEntryFromGlibNone(v) + return dst + }, + ) + + return goret +} + // GetTags wraps gst_toc_entry_get_tags // The function returns the following values: // @@ -58588,7 +59375,7 @@ func (entry *TocEntry) GetToc() *Toc { // Gets the UID of @entry. func (entry *TocEntry) GetUid() string { var carg0 *C.GstTocEntry // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstTocEntry)(UnsafeTocEntryToGlibNone(entry)) @@ -59055,6 +59842,71 @@ func UnsafeTypeFindToGlibFull(t *TypeFind) unsafe.Pointer { t.native = nil // TypeFind is invalid from here on return _p } +// TypeFindRegister wraps gst_type_find_register +// +// The function takes the following parameters: +// +// - plugin Plugin (nullable): A #GstPlugin, or %NULL for a static typefind function +// - name string: The name for registering +// - rank uint: The rank (or importance) of this typefind function +// - fn TypeFindFunction: The #GstTypeFindFunction to use +// - extensions string (nullable): Optional comma-separated list of extensions +// that could belong to this type +// - possibleCaps *Caps (nullable): Optionally the caps that could be returned when typefinding +// succeeds +// +// The function returns the following values: +// +// - goret bool +// +// Registers a new typefind function to be used for typefinding. After +// registering this function will be available for typefinding. +// This function is typically called during an element's plugin initialization. +func TypeFindRegister(plugin Plugin, name string, rank uint, fn TypeFindFunction, extensions string, possibleCaps *Caps) bool { + var carg1 *C.GstPlugin // in, none, converted, nullable + var carg2 *C.gchar // in, none, string + var carg3 C.guint // in, none, casted + var carg4 C.GstTypeFindFunction // callback, scope: notified, closure: carg7, destroy: carg8 + var carg5 *C.gchar // in, none, string, nullable-string + var carg6 *C.GstCaps // in, none, converted, nullable + var carg7 C.gpointer // implicit + var carg8 C.GDestroyNotify // implicit + var cret C.gboolean // return + + if plugin != nil { + carg1 = (*C.GstPlugin)(UnsafePluginToGlibNone(plugin)) + } + carg2 = (*C.gchar)(unsafe.Pointer(C.CString(name))) + defer C.free(unsafe.Pointer(carg2)) + carg3 = C.guint(rank) + carg4 = (*[0]byte)(C._gotk4_gst1_TypeFindFunction) + carg7 = C.gpointer(userdata.Register(fn)) + carg8 = (C.GDestroyNotify)((*[0]byte)(C.destroyUserdata)) + if extensions != "" { + carg5 = (*C.gchar)(unsafe.Pointer(C.CString(extensions))) + defer C.free(unsafe.Pointer(carg5)) + } + if possibleCaps != nil { + carg6 = (*C.GstCaps)(UnsafeCapsToGlibNone(possibleCaps)) + } + + cret = C.gst_type_find_register(carg1, carg2, carg3, carg4, carg5, carg6, carg7, carg8) + runtime.KeepAlive(plugin) + runtime.KeepAlive(name) + runtime.KeepAlive(rank) + runtime.KeepAlive(fn) + runtime.KeepAlive(extensions) + runtime.KeepAlive(possibleCaps) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + // GetLength wraps gst_type_find_get_length // The function returns the following values: // @@ -59443,6 +60295,346 @@ func NewUri(scheme string, userinfo string, host string, port uint, path string, return goret } +// UriConstruct wraps gst_uri_construct +// +// The function takes the following parameters: +// +// - protocol string: Protocol for URI +// - location string: Location for URI +// +// The function returns the following values: +// +// - goret string +// +// Constructs a URI for a given valid protocol and location. +// +// Free-function: g_free +// +// Deprecated: Use GstURI instead. +func UriConstruct(protocol string, location string) string { + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string + var cret *C.gchar // return, full, string + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(protocol))) + defer C.free(unsafe.Pointer(carg1)) + carg2 = (*C.gchar)(unsafe.Pointer(C.CString(location))) + defer C.free(unsafe.Pointer(carg2)) + + cret = C.gst_uri_construct(carg1, carg2) + runtime.KeepAlive(protocol) + runtime.KeepAlive(location) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + + return goret +} + +// UriFromString wraps gst_uri_from_string +// +// The function takes the following parameters: +// +// - uri string: The URI string to parse. +// +// The function returns the following values: +// +// - goret *Uri +// +// Parses a URI string into a new #GstUri object. Will return NULL if the URI +// cannot be parsed. +func UriFromString(uri string) *Uri { + var carg1 *C.gchar // in, none, string + var cret *C.GstUri // return, full, converted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_uri_from_string(carg1) + runtime.KeepAlive(uri) + + var goret *Uri + + goret = UnsafeUriFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// UriFromStringEscaped wraps gst_uri_from_string_escaped +// +// The function takes the following parameters: +// +// - uri string: The URI string to parse. +// +// The function returns the following values: +// +// - goret *Uri +// +// Parses a URI string into a new #GstUri object. Will return NULL if the URI +// cannot be parsed. This is identical to gst_uri_from_string() except that +// the userinfo and fragment components of the URI will not be unescaped while +// parsing. +// +// Use this when you need to extract a username and password from the userinfo +// such as https://user:password@example.com since either may contain +// a URI-escaped ':' character. gst_uri_from_string() will unescape the entire +// userinfo component, which will make it impossible to know which ':' +// delineates the username and password. +// +// The same applies to the fragment component of the URI, such as +// https://example.com/path#fragment which may contain a URI-escaped '#'. +func UriFromStringEscaped(uri string) *Uri { + var carg1 *C.gchar // in, none, string + var cret *C.GstUri // return, full, converted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_uri_from_string_escaped(carg1) + runtime.KeepAlive(uri) + + var goret *Uri + + goret = UnsafeUriFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// UriGetLocation wraps gst_uri_get_location +// +// The function takes the following parameters: +// +// - uri string: A URI string +// +// The function returns the following values: +// +// - goret string +// +// Extracts the location out of a given valid URI, ie. the protocol and "://" +// are stripped from the URI, which means that the location returned includes +// the hostname if one is specified. The returned string must be freed using +// g_free(). +// +// Free-function: g_free +func UriGetLocation(uri string) string { + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, full, string + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_uri_get_location(carg1) + runtime.KeepAlive(uri) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + + return goret +} + +// UriGetProtocol wraps gst_uri_get_protocol +// +// The function takes the following parameters: +// +// - uri string: A URI string +// +// The function returns the following values: +// +// - goret string +// +// Extracts the protocol out of a given valid URI. The returned string must be +// freed using g_free(). +func UriGetProtocol(uri string) string { + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, full, string + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_uri_get_protocol(carg1) + runtime.KeepAlive(uri) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + + return goret +} + +// UriHasProtocol wraps gst_uri_has_protocol +// +// The function takes the following parameters: +// +// - uri string: a URI string +// - protocol string: a protocol string (e.g. "http") +// +// The function returns the following values: +// +// - goret bool +// +// Checks if the protocol of a given valid URI matches @protocol. +func UriHasProtocol(uri string, protocol string) bool { + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string + var cret C.gboolean // return + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri))) + defer C.free(unsafe.Pointer(carg1)) + carg2 = (*C.gchar)(unsafe.Pointer(C.CString(protocol))) + defer C.free(unsafe.Pointer(carg2)) + + cret = C.gst_uri_has_protocol(carg1, carg2) + runtime.KeepAlive(uri) + runtime.KeepAlive(protocol) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + +// UriIsValid wraps gst_uri_is_valid +// +// The function takes the following parameters: +// +// - uri string: A URI string +// +// The function returns the following values: +// +// - goret bool +// +// Tests if the given string is a valid URI identifier. URIs start with a valid +// scheme followed by ":" and maybe a string identifying the location. +func UriIsValid(uri string) bool { + var carg1 *C.gchar // in, none, string + var cret C.gboolean // return + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_uri_is_valid(carg1) + runtime.KeepAlive(uri) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + +// UriJoinStrings wraps gst_uri_join_strings +// +// The function takes the following parameters: +// +// - baseUri string: The percent-encoded base URI. +// - refUri string: The percent-encoded reference URI to join to the @base_uri. +// +// The function returns the following values: +// +// - goret string +// +// This is a convenience function to join two URI strings and return the result. +// The returned string should be g_free()'d after use. +func UriJoinStrings(baseUri string, refUri string) string { + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string + var cret *C.gchar // return, full, string + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(baseUri))) + defer C.free(unsafe.Pointer(carg1)) + carg2 = (*C.gchar)(unsafe.Pointer(C.CString(refUri))) + defer C.free(unsafe.Pointer(carg2)) + + cret = C.gst_uri_join_strings(carg1, carg2) + runtime.KeepAlive(baseUri) + runtime.KeepAlive(refUri) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + + return goret +} + +// UriProtocolIsSupported wraps gst_uri_protocol_is_supported +// +// The function takes the following parameters: +// +// - typ URIType: Whether to check for a source or a sink +// - protocol string: Protocol that should be checked for (e.g. "http" or "smb") +// +// The function returns the following values: +// +// - goret bool +// +// Checks if an element exists that supports the given URI protocol. Note +// that a positive return value does not imply that a subsequent call to +// gst_element_make_from_uri() is guaranteed to work. +func UriProtocolIsSupported(typ URIType, protocol string) bool { + var carg1 C.GstURIType // in, none, casted + var carg2 *C.gchar // in, none, string + var cret C.gboolean // return + + carg1 = C.GstURIType(typ) + carg2 = (*C.gchar)(unsafe.Pointer(C.CString(protocol))) + defer C.free(unsafe.Pointer(carg2)) + + cret = C.gst_uri_protocol_is_supported(carg1, carg2) + runtime.KeepAlive(typ) + runtime.KeepAlive(protocol) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + +// UriProtocolIsValid wraps gst_uri_protocol_is_valid +// +// The function takes the following parameters: +// +// - protocol string: A string +// +// The function returns the following values: +// +// - goret bool +// +// Tests if the given string is a valid protocol identifier. Protocols +// must consist of alphanumeric characters, '+', '-' and '.' and must +// start with a alphabetic character. See RFC 3986 Section 3.1. +func UriProtocolIsValid(protocol string) bool { + var carg1 *C.gchar // in, none, string + var cret C.gboolean // return + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(protocol))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_uri_protocol_is_valid(carg1) + runtime.KeepAlive(protocol) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + // AppendPath wraps gst_uri_append_path // // The function takes the following parameters: @@ -59560,7 +60752,7 @@ func (first *Uri) Equal(second *Uri) bool { // Like gst_uri_from_string() but also joins with a base URI. func (base *Uri) FromStringWithBase(uri string) *Uri { var carg0 *C.GstUri // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstUri // return, full, converted carg0 = (*C.GstUri)(UnsafeUriToGlibNone(base)) @@ -59587,7 +60779,7 @@ func (base *Uri) FromStringWithBase(uri string) *Uri { // If @uri is %NULL then returns %NULL. func (uri *Uri) GetFragment() string { var carg0 *C.GstUri // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) @@ -59610,7 +60802,7 @@ func (uri *Uri) GetFragment() string { // If @uri is %NULL then returns %NULL. func (uri *Uri) GetHost() string { var carg0 *C.GstUri // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) @@ -59632,7 +60824,7 @@ func (uri *Uri) GetHost() string { // Extract the path string from the URI object. func (uri *Uri) GetPath() string { var carg0 *C.GstUri // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) @@ -59647,6 +60839,36 @@ func (uri *Uri) GetPath() string { return goret } +// GetPathSegments wraps gst_uri_get_path_segments +// The function returns the following values: +// +// - goret []string +// +// Get a list of path segments from the URI. +func (uri *Uri) GetPathSegments() []string { + var carg0 *C.GstUri // in, none, converted + var cret *C.GList // container, transfer: full + + carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) + + cret = C.gst_uri_get_path_segments(carg0) + runtime.KeepAlive(uri) + + var goret []string + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) string { + var dst string // string + dst = C.GoString((*C.char)(v)) + defer C.free(v) + return dst + }, + ) + + return goret +} + // GetPathString wraps gst_uri_get_path_string // The function returns the following values: // @@ -59655,7 +60877,7 @@ func (uri *Uri) GetPath() string { // Extract the path string from the URI object as a percent encoded URI path. func (uri *Uri) GetPathString() string { var carg0 *C.GstUri // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) @@ -59693,6 +60915,35 @@ func (uri *Uri) GetPort() uint { return goret } +// GetQueryKeys wraps gst_uri_get_query_keys +// The function returns the following values: +// +// - goret []string +// +// Get a list of the query keys from the URI. +func (uri *Uri) GetQueryKeys() []string { + var carg0 *C.GstUri // in, none, converted + var cret *C.GList // container, transfer: container + + carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) + + cret = C.gst_uri_get_query_keys(carg0) + runtime.KeepAlive(uri) + + var goret []string + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) string { + var dst string // string + dst = C.GoString((*C.char)(v)) + return dst + }, + ) + + return goret +} + // GetQueryString wraps gst_uri_get_query_string // The function returns the following values: // @@ -59701,7 +60952,7 @@ func (uri *Uri) GetPort() uint { // Get a percent encoded URI query string from the @uri. func (uri *Uri) GetQueryString() string { var carg0 *C.GstUri // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) @@ -59733,8 +60984,8 @@ func (uri *Uri) GetQueryString() string { // query. func (uri *Uri) GetQueryValue(queryKey string) string { var carg0 *C.GstUri // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(queryKey))) @@ -59760,7 +61011,7 @@ func (uri *Uri) GetQueryValue(queryKey string) string { // If @uri is %NULL then returns %NULL. func (uri *Uri) GetScheme() string { var carg0 *C.GstUri // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) @@ -59783,7 +61034,7 @@ func (uri *Uri) GetScheme() string { // or %NULL if it doesn't exist. If @uri is %NULL then returns %NULL. func (uri *Uri) GetUserinfo() string { var carg0 *C.GstUri // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) @@ -60031,7 +61282,7 @@ func (uri *Uri) Normalize() bool { // Check if there is a query table entry for the @query_key key. func (uri *Uri) QueryHasKey(queryKey string) bool { var carg0 *C.GstUri // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) @@ -60064,7 +61315,7 @@ func (uri *Uri) QueryHasKey(queryKey string) bool { // Remove an entry from the query table by key. func (uri *Uri) RemoveQueryKey(queryKey string) bool { var carg0 *C.GstUri // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) @@ -60133,7 +61384,7 @@ func (uri *Uri) SetFragment(fragment string) bool { // Set or unset the host for the URI. func (uri *Uri) SetHost(host string) bool { var carg0 *C.GstUri // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) @@ -60203,7 +61454,7 @@ func (uri *Uri) SetPath(path string) bool { // Sets or unsets the path in the URI. func (uri *Uri) SetPathString(path string) bool { var carg0 *C.GstUri // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) @@ -60307,7 +61558,7 @@ func (uri *Uri) SetQueryString(query string) bool { // the query string. func (uri *Uri) SetQueryValue(queryKey string, queryValue string) bool { var carg0 *C.GstUri // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 *C.gchar // in, none, string, nullable-string var cret C.gboolean // return @@ -60346,7 +61597,7 @@ func (uri *Uri) SetQueryValue(queryKey string, queryValue string) bool { // Set or unset the scheme for the URI. func (uri *Uri) SetScheme(scheme string) bool { var carg0 *C.GstUri // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) @@ -60379,7 +61630,7 @@ func (uri *Uri) SetScheme(scheme string) bool { // Set or unset the user information for the URI. func (uri *Uri) SetUserinfo(userinfo string) bool { var carg0 *C.GstUri // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) @@ -60411,7 +61662,7 @@ func (uri *Uri) SetUserinfo(userinfo string) bool { // The string is put together as described in RFC 3986. func (uri *Uri) ToString() string { var carg0 *C.GstUri // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) diff --git a/pkg/gst/gst_export.gen.go b/pkg/gst/gst_export.gen.go index 583ee95..61e73f2 100644 --- a/pkg/gst/gst_export.gen.go +++ b/pkg/gst/gst_export.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for Gst-1. DO NOT EDIT. package gst @@ -206,8 +206,8 @@ func _gotk4_gst1_LogFunction(carg1 *C.GstDebugCategory, carg2 C.GstDebugLevel, c var category *DebugCategory // in, none, converted var level DebugLevel // in, none, casted - var file string // in, none, string, casted *C.gchar - var function string // in, none, string, casted *C.gchar + var file string // in, none, string + var function string // in, none, string var line int // in, none, casted var object gobject.Object // in, none, converted var message *DebugMessage // in, none, converted @@ -477,7 +477,7 @@ func _gotk4_gst1_TagForEachFunc(carg1 *C.GstTagList, carg2 *C.gchar, carg3 C.gpo } var list *TagList // in, none, converted - var tag string // in, none, string, casted *C.gchar + var tag string // in, none, string list = UnsafeTagListFromGlibNone(unsafe.Pointer(carg1)) tag = C.GoString((*C.char)(unsafe.Pointer(carg2))) diff --git a/pkg/gst/mapinfo.go b/pkg/gst/mapinfo.go new file mode 100644 index 0000000..f6532a3 --- /dev/null +++ b/pkg/gst/mapinfo.go @@ -0,0 +1,217 @@ +package gst + +import ( + "fmt" + "io" + "runtime" + "unsafe" +) + +// #cgo pkg-config: gstreamer-1.0 +// #cgo CFLAGS: -Wno-deprecated-declarations +// #include +import "C" + +// Map wraps gst_buffer_map +// +// The function takes the following parameters: +// +// - flags MapFlags: flags for the mapping +// +// The function returns the following values: +// +// - info MapInfo: info about the mapping +// - goret bool +// +// Fills @info with the #GstMapInfo of all merged memory blocks in @buffer. +// +// @flags describe the desired access of the memory. When @flags is +// #GST_MAP_WRITE, @buffer should be writable (as returned from +// gst_buffer_is_writable()). +// +// When @buffer is writable but the memory isn't, a writable copy will +// automatically be created and returned. The readonly copy of the +// buffer memory will then also be replaced with this writable copy. +// +// The memory in @info should be unmapped with gst_buffer_unmap() after +// usage. +func (buffer *Buffer) Map(flags MapFlags) (*MapInfo, bool) { + var carg0 *C.GstBuffer // in, none, converted + var carg2 C.GstMapFlags // in, none, casted + var carg1 C.GstMapInfo // out, transfer: none, C Pointers: 0, Name: MapInfo, caller-allocates + var cret C.gboolean // return + + carg0 = (*C.GstBuffer)(UnsafeBufferToGlibNone(buffer)) + carg2 = C.GstMapFlags(flags) + + cret = C.gst_buffer_map(carg0, &carg1, carg2) + runtime.KeepAlive(buffer) + runtime.KeepAlive(flags) + + var info *MapInfo + var goret bool + + info = &MapInfo{ + mapInfo: &mapInfo{ + native: &carg1, + buffer: buffer, + }, + } + + info.autoCleanup() + + if cret != 0 { + goret = true + } + + return info, goret +} + +// MapInfo is a wrapper around the C struct GstMapInfo +// and implements the io.ReaderAt, io.WriterAt, io.Reader, and io.WriteCloser interfaces. +// +// See https://gstreamer.freedesktop.org/documentation/plugin-development/advanced/allocation.html for why this is needed. +// +// There are no unsafe transfer functions for this type. It needs to be freed differently depending how it was created. +type MapInfo struct { + *mapInfo + + writeOffset int64 + readOffset int64 +} + +func (m *MapInfo) autoCleanup() { + runtime.SetFinalizer( + m.mapInfo, + func(intern *mapInfo) { + fmt.Println("automatically unmapping MapInfo, you should call Unmap()/Close() instead at an appropriate time") + intern.unmap() + }, + ) +} + +// mapInfo is the struct that is finalized +type mapInfo struct { + buffer *Buffer + + native *C.GstMapInfo +} + +var _ io.WriteCloser = (*MapInfo)(nil) +var _ io.Reader = (*MapInfo)(nil) +var _ io.WriterAt = (*MapInfo)(nil) +var _ io.ReaderAt = (*MapInfo)(nil) + +var ErrMapInfoNotReadable = fmt.Errorf("MapInfo is not readable") +var ErrMapInfoNotWritable = fmt.Errorf("MapInfo is not writable") +var ErrMapInfoInvalidOffset = fmt.Errorf("MapInfo invalid offset") +var ErrMapInfoInvalid = fmt.Errorf("MapInfo is invalid") + +// ReadAt implements io.ReaderAt. +func (m *MapInfo) ReadAt(p []byte, off int64) (n int, err error) { + // check for valid MapInfo + if m.mapInfo == nil { + return 0, ErrMapInfoInvalid + } + // check for read access + if !m.Flags().Has(MapRead) { + return 0, ErrMapInfoNotReadable + } + + if off < 0 { + return 0, ErrMapInfoInvalidOffset + } + // check for EOF + if off >= int64(m.Length()) { + return 0, io.EOF + } + + data := m.Data() + + n = copy(p, data[off:]) + if n == 0 { + return 0, io.EOF + } + + return n, nil +} + +// WriteAt implements io.WriterAt. +func (m *MapInfo) WriteAt(p []byte, off int64) (n int, err error) { + // check for valid MapInfo + if m.mapInfo == nil { + return 0, ErrMapInfoInvalid + } + // check for write access + if !m.Flags().Has(MapWrite) { + return 0, ErrMapInfoNotWritable + } + + if off < 0 { + return 0, ErrMapInfoInvalidOffset + } + // check for EOF + if off >= int64(m.Length()) { + return 0, ErrMapInfoInvalidOffset + } + + data := m.Data() + + n = copy(data[off:], p) + + return n, nil +} + +// Read implements io.Reader. +func (m *MapInfo) Read(p []byte) (n int, err error) { + off := m.readOffset + n, err = m.ReadAt(p, off) + m.readOffset += int64(n) + return n, err +} + +// Close implements io.WriteCloser. It calls Unmap() to release the memory. +func (m *MapInfo) Close() error { + m.Unmap() + return nil +} + +// Write implements io.WriteCloser. +func (m *MapInfo) Write(p []byte) (n int, err error) { + off := m.writeOffset + n, err = m.WriteAt(p, off) + m.writeOffset += int64(n) + return n, err +} + +// unmap is the private unmap function used by the finalizer as well as the manual close/unmap +func (info *mapInfo) unmap() { + // this needs a different function to unmap depending on memory/buffer unmap + if info.buffer != nil { + C.gst_buffer_unmap((*C.GstBuffer)(UnsafeBufferToGlibNone(info.buffer)), info.native) + } else { + panic("unmap called on an invalid MapInfo") + } +} + +// Unmap Releases the memory previously mapped. +func (info *MapInfo) Unmap() { + info.mapInfo.unmap() + info.mapInfo = nil + runtime.SetFinalizer(info, nil) +} + +// Length returns the length of the mapped memory. +func (info *MapInfo) Length() int { + return int(info.mapInfo.native.size) +} + +// Length returns the length of the mapped memory. +func (info *MapInfo) Data() []byte { + return unsafe.Slice((*byte)(info.mapInfo.native.data), info.mapInfo.native.size) +} + +// Flags returns the flags of the mapped memory. +func (info *MapInfo) Flags() MapFlags { + return MapFlags(info.mapInfo.native.flags) +} diff --git a/pkg/gst/tag.go b/pkg/gst/tag.go new file mode 100644 index 0000000..57fd91f --- /dev/null +++ b/pkg/gst/tag.go @@ -0,0 +1,410 @@ +package gst + +// TAG_ALBUM (GST_TAG_ALBUM): album containing this data (string) +// +// The album name as it should be displayed, e.g. 'The Jazz Guitar'. +const TAG_ALBUM = "album" + +// TAG_ALBUM_ARTIST (GST_TAG_ALBUM_ARTIST): artist of the entire album, as it +// should be displayed. +const TAG_ALBUM_ARTIST = "album-artist" + +// TAG_ALBUM_ARTIST_SORTNAME (GST_TAG_ALBUM_ARTIST_SORTNAME): artist of the +// entire album, as it should be sorted. +const TAG_ALBUM_ARTIST_SORTNAME = "album-artist-sortname" + +// TAG_ALBUM_GAIN (GST_TAG_ALBUM_GAIN): album gain in db (double). +const TAG_ALBUM_GAIN = "replaygain-album-gain" + +// TAG_ALBUM_PEAK (GST_TAG_ALBUM_PEAK): peak of the album (double). +const TAG_ALBUM_PEAK = "replaygain-album-peak" + +// TAG_ALBUM_SORTNAME (GST_TAG_ALBUM_SORTNAME): album containing this data, +// as used for sorting (string) +// +// The album name as it should be sorted, e.g. 'Jazz Guitar, The'. +const TAG_ALBUM_SORTNAME = "album-sortname" + +// TAG_ALBUM_VOLUME_COUNT (GST_TAG_ALBUM_VOLUME_COUNT): count of discs inside +// collection this disc belongs to (unsigned integer). +const TAG_ALBUM_VOLUME_COUNT = "album-disc-count" + +// TAG_ALBUM_VOLUME_NUMBER (GST_TAG_ALBUM_VOLUME_NUMBER): disc number inside a +// collection (unsigned integer). +const TAG_ALBUM_VOLUME_NUMBER = "album-disc-number" + +// TAG_APPLICATION_DATA (GST_TAG_APPLICATION_DATA): arbitrary application data +// (sample) +// +// Some formats allow applications to add their own arbitrary data into files. +// This data is application dependent. +const TAG_APPLICATION_DATA = "application-data" + +// TAG_APPLICATION_NAME (GST_TAG_APPLICATION_NAME): name of the application used +// to create the media (string). +const TAG_APPLICATION_NAME = "application-name" + +// TAG_ARTIST (GST_TAG_ARTIST): person(s) responsible for the recording (string) +// +// The artist name as it should be displayed, e.g. 'Jimi Hendrix' or 'The Guitar +// Heroes'. +const TAG_ARTIST = "artist" + +// TAG_ARTIST_SORTNAME (GST_TAG_ARTIST_SORTNAME): person(s) responsible for the +// recording, as used for sorting (string) +// +// The artist name as it should be sorted, e.g. 'Hendrix, Jimi' or 'Guitar +// Heroes, The'. +const TAG_ARTIST_SORTNAME = "artist-sortname" + +// TAG_ATTACHMENT (GST_TAG_ATTACHMENT): generic file attachment (sample) (sample +// taglist should specify the content type and if possible set "filename" to the +// file name of the attachment). +const TAG_ATTACHMENT = "attachment" + +// TAG_AUDIO_CODEC (GST_TAG_AUDIO_CODEC): codec the audio data is stored in +// (string). +const TAG_AUDIO_CODEC = "audio-codec" + +// TAG_BEATS_PER_MINUTE (GST_TAG_BEATS_PER_MINUTE): number of beats per minute +// in audio (double). +const TAG_BEATS_PER_MINUTE = "beats-per-minute" + +// TAG_BITRATE (GST_TAG_BITRATE): exact or average bitrate in bits/s (unsigned +// integer). +const TAG_BITRATE = "bitrate" + +// TAG_CODEC (GST_TAG_CODEC): codec the data is stored in (string). +const TAG_CODEC = "codec" + +// TAG_COMMENT (GST_TAG_COMMENT): free text commenting the data (string). +const TAG_COMMENT = "comment" + +// TAG_COMPOSER (GST_TAG_COMPOSER): person(s) who composed the recording +// (string). +const TAG_COMPOSER = "composer" + +// TAG_COMPOSER_SORTNAME (GST_TAG_COMPOSER_SORTNAME) composer's name, used for +// sorting (string). +const TAG_COMPOSER_SORTNAME = "composer-sortname" + +// TAG_CONDUCTOR (GST_TAG_CONDUCTOR): conductor/performer refinement (string). +const TAG_CONDUCTOR = "conductor" + +// TAG_CONTACT (GST_TAG_CONTACT): contact information (string). +const TAG_CONTACT = "contact" + +// TAG_CONTAINER_FORMAT (GST_TAG_CONTAINER_FORMAT): container format the data is +// stored in (string). +const TAG_CONTAINER_FORMAT = "container-format" + +// TAG_CONTAINER_SPECIFIC_TRACK_ID (GST_TAG_CONTAINER_SPECIFIC_TRACK_ID): +// unique identifier for the audio, video or text track this tag is associated +// with. The mappings for several container formats are defined in the +// [Sourcing In-band Media Resource Tracks from Media Containers into HTML +// specification](https://dev.w3.org/html5/html-sourcing-inband-tracks/). +const TAG_CONTAINER_SPECIFIC_TRACK_ID = "container-specific-track-id" + +// TAG_COPYRIGHT (GST_TAG_COPYRIGHT): copyright notice of the data (string). +const TAG_COPYRIGHT = "copyright" + +// TAG_COPYRIGHT_URI (GST_TAG_COPYRIGHT_URI): URI to location where copyright +// details can be found (string). +const TAG_COPYRIGHT_URI = "copyright-uri" + +// TAG_DATE (GST_TAG_DATE): date the data was created (#GDate structure). +const TAG_DATE = "date" + +// TAG_DATE_TIME (GST_TAG_DATE_TIME): date and time the data was created +// (DateTime structure). +const TAG_DATE_TIME = "datetime" + +// TAG_DESCRIPTION (GST_TAG_DESCRIPTION): short text describing the content of +// the data (string). +const TAG_DESCRIPTION = "description" + +// TAG_DEVICE_MANUFACTURER (GST_TAG_DEVICE_MANUFACTURER): manufacturer of the +// device used to create the media (string). +const TAG_DEVICE_MANUFACTURER = "device-manufacturer" + +// TAG_DEVICE_MODEL (GST_TAG_DEVICE_MODEL): model of the device used to create +// the media (string). +const TAG_DEVICE_MODEL = "device-model" + +// TAG_DURATION (GST_TAG_DURATION): length in GStreamer time units (nanoseconds) +// (unsigned 64-bit integer). +const TAG_DURATION = "duration" + +// TAG_ENCODED_BY (GST_TAG_ENCODED_BY): name of the person or organisation +// that encoded the file. May contain a copyright message if the person or +// organisation also holds the copyright (string) +// +// Note: do not use this field to describe the encoding application. Use +// T_TAG_APPLICATION_NAME or T_TAG_COMMENT for that. +const TAG_ENCODED_BY = "encoded-by" + +// TAG_ENCODER (GST_TAG_ENCODER): encoder used to encode this stream (string). +const TAG_ENCODER = "encoder" + +// TAG_ENCODER_VERSION (GST_TAG_ENCODER_VERSION): version of the encoder used to +// encode this stream (unsigned integer). +const TAG_ENCODER_VERSION = "encoder-version" + +// TAG_EXTENDED_COMMENT (GST_TAG_EXTENDED_COMMENT): key/value text commenting +// the data (string) +// +// Must be in the form of 'key=comment' or 'key[lc]=comment' where 'lc' is an +// ISO-639 language code. +// +// This tag is used for unknown Vorbis comment tags, unknown APE tags and +// certain ID3v2 comment fields. +const TAG_EXTENDED_COMMENT = "extended-comment" + +// TAG_GENRE (GST_TAG_GENRE): genre this data belongs to (string). +const TAG_GENRE = "genre" + +// TAG_GEO_LOCATION_CAPTURE_DIRECTION (GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION) +// indicates the direction the device is pointing to when capturing a media. +// It is represented as degrees in floating point representation, 0 means the +// geographic north, and increases clockwise (double from 0 to 360) +// +// See also T_TAG_GEO_LOCATION_MOVEMENT_DIRECTION. +const TAG_GEO_LOCATION_CAPTURE_DIRECTION = "geo-location-capture-direction" + +// TAG_GEO_LOCATION_CITY (GST_TAG_GEO_LOCATION_CITY): city (english name) where +// the media has been produced (string). +const TAG_GEO_LOCATION_CITY = "geo-location-city" + +// TAG_GEO_LOCATION_COUNTRY (GST_TAG_GEO_LOCATION_COUNTRY): country (english +// name) where the media has been produced (string). +const TAG_GEO_LOCATION_COUNTRY = "geo-location-country" + +// TAG_GEO_LOCATION_ELEVATION (GST_TAG_GEO_LOCATION_ELEVATION): geo elevation +// of where the media has been recorded or produced in meters according to WGS84 +// (zero is average sea level) (double). +const TAG_GEO_LOCATION_ELEVATION = "geo-location-elevation" + +// TAG_GEO_LOCATION_HORIZONTAL_ERROR (GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR) +// represents the expected error on the horizontal positioning in meters +// (double). +const TAG_GEO_LOCATION_HORIZONTAL_ERROR = "geo-location-horizontal-error" + +// TAG_GEO_LOCATION_LATITUDE (GST_TAG_GEO_LOCATION_LATITUDE): geo latitude +// location of where the media has been recorded or produced in degrees +// according to WGS84 (zero at the equator, negative values for southern +// latitudes) (double). +const TAG_GEO_LOCATION_LATITUDE = "geo-location-latitude" + +// TAG_GEO_LOCATION_LONGITUDE (GST_TAG_GEO_LOCATION_LONGITUDE): geo longitude +// location of where the media has been recorded or produced in degrees +// according to WGS84 (zero at the prime meridian in Greenwich/UK, negative +// values for western longitudes). (double). +const TAG_GEO_LOCATION_LONGITUDE = "geo-location-longitude" + +// TAG_GEO_LOCATION_MOVEMENT_DIRECTION (GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION) +// indicates the movement direction of the device performing the capture of +// a media. It is represented as degrees in floating point representation, +// 0 means the geographic north, and increases clockwise (double from 0 to 360) +// +// See also T_TAG_GEO_LOCATION_CAPTURE_DIRECTION. +const TAG_GEO_LOCATION_MOVEMENT_DIRECTION = "geo-location-movement-direction" + +// TAG_GEO_LOCATION_MOVEMENT_SPEED (GST_TAG_GEO_LOCATION_MOVEMENT_SPEED): speed +// of the capturing device when performing the capture. Represented in m/s. +// (double) +// +// See also T_TAG_GEO_LOCATION_MOVEMENT_DIRECTION. +const TAG_GEO_LOCATION_MOVEMENT_SPEED = "geo-location-movement-speed" + +// TAG_GEO_LOCATION_NAME (GST_TAG_GEO_LOCATION_NAME): human readable descriptive +// location of where the media has been recorded or produced. (string). +const TAG_GEO_LOCATION_NAME = "geo-location-name" + +// TAG_GEO_LOCATION_SUBLOCATION (GST_TAG_GEO_LOCATION_SUBLOCATION): location +// 'smaller' than GST_TAG_GEO_LOCATION_CITY that specifies better where the +// media has been produced. (e.g. the neighborhood) (string). +// +// This tag has been added as this is how it is handled/named in XMP's +// Iptc4xmpcore schema. +const TAG_GEO_LOCATION_SUBLOCATION = "geo-location-sublocation" + +// TAG_GROUPING (GST_TAG_GROUPING) groups together media that are related +// and spans multiple tracks. An example are multiple pieces of a concerto. +// (string). +const TAG_GROUPING = "grouping" + +// TAG_HOMEPAGE (GST_TAG_HOMEPAGE): homepage for this media (i.e. artist or +// movie homepage) (string). +const TAG_HOMEPAGE = "homepage" + +// TAG_IMAGE (GST_TAG_IMAGE): image (sample) (sample taglist should specify the +// content type and preferably also set "image-type" field as GstTagImageType). +const TAG_IMAGE = "image" + +// TAG_IMAGE_ORIENTATION (GST_TAG_IMAGE_ORIENTATION) represents the +// 'Orientation' tag from EXIF. Defines how the image should be rotated and +// mirrored for display. (string) +// +// This tag has a predefined set of allowed values: "rotate-0" "rotate-90" +// "rotate-180" "rotate-270" "flip-rotate-0" "flip-rotate-90" "flip-rotate-180" +// "flip-rotate-270" +// +// The naming is adopted according to a possible transformation to perform on +// the image to fix its orientation, obviously equivalent operations will yield +// the same result. +// +// Rotations indicated by the values are in clockwise direction and 'flip' means +// an horizontal mirroring. +const TAG_IMAGE_ORIENTATION = "image-orientation" + +// TAG_INTERPRETED_BY (GST_TAG_INTERPRETED_BY): information about the people +// behind a remix and similar interpretations of another existing piece +// (string). +const TAG_INTERPRETED_BY = "interpreted-by" + +// TAG_ISRC (GST_TAG_ISRC): international Standard Recording Code - see +// http://www.ifpi.org/isrc/ (string). +const TAG_ISRC = "isrc" + +// TAG_KEYWORDS (GST_TAG_KEYWORDS): comma separated keywords describing the +// content (string). +const TAG_KEYWORDS = "keywords" + +// TAG_LANGUAGE_CODE (GST_TAG_LANGUAGE_CODE): ISO-639-2 or ISO-639-1 code for +// the language the content is in (string) +// +// There is utility API in libgsttag in gst-plugins-base to obtain a translated +// language name from the language code: gst_tag_get_language_name(). +const TAG_LANGUAGE_CODE = "language-code" + +// TAG_LANGUAGE_NAME (GST_TAG_LANGUAGE_NAME): name of the language the content +// is in (string) +// +// Free-form name of the language the content is in, if a language code is +// not available. This tag should not be set in addition to a language code. +// It is undefined what language or locale the language name is in. +const TAG_LANGUAGE_NAME = "language-name" + +// TAG_LICENSE (GST_TAG_LICENSE): license of data (string). +const TAG_LICENSE = "license" + +// TAG_LICENSE_URI (GST_TAG_LICENSE_URI): URI to location where license details +// can be found (string). +const TAG_LICENSE_URI = "license-uri" + +// TAG_LOCATION (GST_TAG_LOCATION): origin of media as a URI (location, where +// the original of the file or stream is hosted) (string). +const TAG_LOCATION = "location" + +// TAG_LYRICS (GST_TAG_LYRICS) lyrics of the media (string). +const TAG_LYRICS = "lyrics" + +// TAG_MAXIMUM_BITRATE (GST_TAG_MAXIMUM_BITRATE): maximum bitrate in bits/s +// (unsigned integer). +const TAG_MAXIMUM_BITRATE = "maximum-bitrate" + +// TAG_MIDI_BASE_NOTE (GST_TAG_MIDI_BASE_NOTE): Midi note number +// (http://en.wikipedia.org/wiki/Note#Note_designation_in_accordance_with_octave_name) +// of the audio track. This is useful for sample instruments and in particular +// for multi-samples. +const TAG_MIDI_BASE_NOTE = "midi-base-note" + +// TAG_MINIMUM_BITRATE (GST_TAG_MINIMUM_BITRATE): minimum bitrate in bits/s +// (unsigned integer). +const TAG_MINIMUM_BITRATE = "minimum-bitrate" + +// TAG_NOMINAL_BITRATE (GST_TAG_NOMINAL_BITRATE): nominal bitrate in bits/s +// (unsigned integer). The actual bitrate might be different from this target +// bitrate. +const TAG_NOMINAL_BITRATE = "nominal-bitrate" + +// TAG_ORGANIZATION (GST_TAG_ORGANIZATION): organization (string). +const TAG_ORGANIZATION = "organization" + +// TAG_PERFORMER (GST_TAG_PERFORMER): person(s) performing (string). +const TAG_PERFORMER = "performer" + +// TAG_PREVIEW_IMAGE (GST_TAG_PREVIEW_IMAGE): image that is meant for preview +// purposes, e.g. small icon-sized version (sample) (sample taglist should +// specify the content type). +const TAG_PREVIEW_IMAGE = "preview-image" + +// TAG_PRIVATE_DATA (GST_TAG_PRIVATE_DATA): any private data that may be +// contained in tags (sample). +// +// It is represented by Sample in which Buffer contains the binary data and the +// sample's info Structure may contain any extra information that identifies the +// origin or meaning of the data. +// +// Private frames in ID3v2 tags ('PRIV' frames) will be represented using +// this tag, in which case the GstStructure will be named "ID3PrivateFrame" +// and contain a field named "owner" of type string which contains the +// owner-identification string from the tag. +const TAG_PRIVATE_DATA = "private-data" + +// TAG_PUBLISHER (GST_TAG_PUBLISHER): name of the label or publisher (string). +const TAG_PUBLISHER = "publisher" + +// TAG_REFERENCE_LEVEL (GST_TAG_REFERENCE_LEVEL): reference level of track and +// album gain values (double). +const TAG_REFERENCE_LEVEL = "replaygain-reference-level" + +// TAG_SERIAL (GST_TAG_SERIAL): serial number of track (unsigned integer). +const TAG_SERIAL = "serial" + +// TAG_SHOW_EPISODE_NUMBER (GST_TAG_SHOW_EPISODE_NUMBER): number of the episode +// within a season/show (unsigned integer). +const TAG_SHOW_EPISODE_NUMBER = "show-episode-number" + +// TAG_SHOW_NAME (GST_TAG_SHOW_NAME): name of the show, used for displaying +// (string). +const TAG_SHOW_NAME = "show-name" + +// TAG_SHOW_SEASON_NUMBER (GST_TAG_SHOW_SEASON_NUMBER): number of the season of +// a show/series (unsigned integer). +const TAG_SHOW_SEASON_NUMBER = "show-season-number" + +// TAG_SHOW_SORTNAME (GST_TAG_SHOW_SORTNAME): name of the show, used for sorting +// (string). +const TAG_SHOW_SORTNAME = "show-sortname" + +// TAG_SUBTITLE_CODEC (GST_TAG_SUBTITLE_CODEC): codec/format the subtitle data +// is stored in (string). +const TAG_SUBTITLE_CODEC = "subtitle-codec" + +// TAG_TITLE (GST_TAG_TITLE): commonly used title (string) +// +// The title as it should be displayed, e.g. 'The Doll House'. +const TAG_TITLE = "title" + +// TAG_TITLE_SORTNAME (GST_TAG_TITLE_SORTNAME): commonly used title, as used for +// sorting (string) +// +// The title as it should be sorted, e.g. 'Doll House, The'. +const TAG_TITLE_SORTNAME = "title-sortname" + +// TAG_TRACK_COUNT (GST_TAG_TRACK_COUNT): count of tracks inside collection this +// track belongs to (unsigned integer). +const TAG_TRACK_COUNT = "track-count" + +// TAG_TRACK_GAIN (GST_TAG_TRACK_GAIN): track gain in db (double). +const TAG_TRACK_GAIN = "replaygain-track-gain" + +// TAG_TRACK_NUMBER (GST_TAG_TRACK_NUMBER): track number inside a collection +// (unsigned integer). +const TAG_TRACK_NUMBER = "track-number" + +// TAG_TRACK_PEAK (GST_TAG_TRACK_PEAK): peak of the track (double). +const TAG_TRACK_PEAK = "replaygain-track-peak" + +// TAG_USER_RATING (GST_TAG_USER_RATING): rating attributed by a person (likely +// the application user). The higher the value, the more the user likes this +// media (unsigned int from 0 to 100). +const TAG_USER_RATING = "user-rating" + +// TAG_VERSION (GST_TAG_VERSION): version of this data (string). +const TAG_VERSION = "version" + +// TAG_VIDEO_CODEC (GST_TAG_VIDEO_CODEC): codec the video data is stored in +// (string). +const TAG_VIDEO_CODEC = "video-codec" diff --git a/pkg/gst/tagsetter_manual.go b/pkg/gst/tagsetter_manual.go new file mode 100644 index 0000000..d55d8a8 --- /dev/null +++ b/pkg/gst/tagsetter_manual.go @@ -0,0 +1,54 @@ +package gst + +import ( + "runtime" + "unsafe" + + "github.com/diamondburned/gotk4/pkg/gobject/v2" +) + +// #cgo pkg-config: gstreamer-1.0 +// #cgo CFLAGS: -Wno-deprecated-declarations +// #include +import "C" + +type TagSetterExtManual interface { + // AddTagValue wraps gst_tag_setter_add_tag_value + // + // The function takes the following parameters: + // + // - mode TagMergeMode: the mode to use + // - tag string: tag to set + // - value any: GValue to set for the tag + // + // Adds the given tag / GValue pair on the setter using the given merge mode. + AddTagValue(mode TagMergeMode, tag string, value any) +} + +// AddTagValue wraps gst_tag_setter_add_tag_value +// +// The function takes the following parameters: +// +// - mode TagMergeMode: the mode to use +// - tag string: tag to set +// - value any: GValue to set for the tag +// +// Adds the given tag / GValue pair on the setter using the given merge mode. +func (setter *TagSetterInstance) AddTagValue(mode TagMergeMode, tag string, value any) { + var carg0 *C.GstTagSetter // in, none, converted + var carg1 C.GstTagMergeMode // in, none, casted + var carg2 *C.gchar // in, none, string + var carg3 *C.GValue // in, none, converted + + carg0 = (*C.GstTagSetter)(UnsafeTagSetterToGlibNone(setter)) + carg1 = C.GstTagMergeMode(mode) + carg2 = (*C.gchar)(unsafe.Pointer(C.CString(tag))) + defer C.free(unsafe.Pointer(carg2)) + carg3 = (*C.GValue)(gobject.UnsafeValueToGlibNone(gobject.NewValue(value))) + + C.gst_tag_setter_add_tag_value(carg0, carg1, carg2, carg3) + runtime.KeepAlive(setter) + runtime.KeepAlive(mode) + runtime.KeepAlive(tag) + runtime.KeepAlive(value) +} diff --git a/pkg/gstallocators/gstallocators.gen.go b/pkg/gstallocators/gstallocators.gen.go index a09b5f5..150344c 100644 --- a/pkg/gstallocators/gstallocators.gen.go +++ b/pkg/gstallocators/gstallocators.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstAllocators-1. DO NOT EDIT. package gstallocators @@ -457,7 +457,7 @@ func UnsafeDRMDumbAllocatorToGlibFull(c DRMDumbAllocator) unsafe.Pointer { // function can fail if the path does not exist, is not a DRM device or if // the DRM device doesnot support DUMB allocation. func NewDRMDumbAllocatorWithDevicePath(drmDevicePath string) gst.Allocator { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstAllocator // return, full, converted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(drmDevicePath))) diff --git a/pkg/gstapp/gstapp.gen.go b/pkg/gstapp/gstapp.gen.go index 11da39d..c4ca338 100644 --- a/pkg/gstapp/gstapp.gen.go +++ b/pkg/gstapp/gstapp.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstApp-1. DO NOT EDIT. package gstapp diff --git a/pkg/gstaudio/gstaudio.gen.go b/pkg/gstaudio/gstaudio.gen.go index 6f74e3d..a7ada5a 100644 --- a/pkg/gstaudio/gstaudio.gen.go +++ b/pkg/gstaudio/gstaudio.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstAudio-1. DO NOT EDIT. package gstaudio @@ -1871,7 +1871,7 @@ func AudioChannelPositionsToMask(position []AudioChannelPosition, forceOrder boo func AudioChannelPositionsToString(position []AudioChannelPosition) string { var carg1 *C.GstAudioChannelPosition // in, transfer: none, C Pointers: 1, Name: array[AudioChannelPosition], array (inner: *typesystem.Enum, length-by: carg2) var carg2 C.gint // implicit - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string _ = position _ = carg1 @@ -4004,7 +4004,7 @@ func UnsafeAudioClockToGlibFull(c AudioClock) unsafe.Pointer { // calculated it will call @func with @user_data. When @func returns // #GST_CLOCK_TIME_NONE, the clock will return the last reported time. func NewAudioClock(name string, fn AudioClockGetTimeFunc) gst.Clock { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.GstAudioClockGetTimeFunc // callback, scope: notified, closure: carg3, destroy: carg4 var carg3 C.gpointer // implicit var carg4 C.GDestroyNotify // implicit @@ -8414,6 +8414,220 @@ func UnsafeAudioBufferToGlibFull(a *AudioBuffer) unsafe.Pointer { a.native = nil // AudioBuffer is invalid from here on return _p } +// AudioBufferClip wraps gst_audio_buffer_clip +// +// The function takes the following parameters: +// +// - 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 * +// number of channels. +// +// The function returns the following values: +// +// - goret *gst.Buffer +// +// Clip the buffer to the given %GstSegment. +// +// 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 { + var carg1 *C.GstBuffer // in, full, converted + var carg2 *C.GstSegment // in, none, converted + var carg3 C.gint // in, none, casted + var carg4 C.gint // in, none, casted + var cret *C.GstBuffer // return, full, converted + + carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibFull(buffer)) + carg2 = (*C.GstSegment)(gst.UnsafeSegmentToGlibNone(segment)) + carg3 = C.gint(rate) + carg4 = C.gint(bpf) + + cret = C.gst_audio_buffer_clip(carg1, carg2, carg3, carg4) + runtime.KeepAlive(buffer) + runtime.KeepAlive(segment) + runtime.KeepAlive(rate) + runtime.KeepAlive(bpf) + + var goret *gst.Buffer + + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// AudioBufferMap wraps gst_audio_buffer_map +// +// The function takes the following parameters: +// +// - info *AudioInfo: the audio properties of the buffer +// - gstbuffer *gst.Buffer: the #GstBuffer to be mapped +// - flags gst.MapFlags: the access mode for the memory +// +// The function returns the following values: +// +// - buffer AudioBuffer: pointer to a #GstAudioBuffer +// - goret bool +// +// Maps an audio @gstbuffer so that it can be read or written and stores the +// result of the map operation in @buffer. +// +// This is especially useful when the @gstbuffer is in non-interleaved (planar) +// layout, in which case this function will use the information in the +// @gstbuffer's attached #GstAudioMeta in order to map each channel in a +// separate "plane" in #GstAudioBuffer. If a #GstAudioMeta is not attached +// on the @gstbuffer, then it must be in interleaved layout. +// +// If a #GstAudioMeta is attached, then the #GstAudioInfo on the meta is checked +// against @info. Normally, they should be equal, but in case they are not, +// a g_critical will be printed and the #GstAudioInfo from the meta will be +// used. +// +// In non-interleaved buffers, it is possible to have each channel on a separate +// #GstMemory. In this case, each memory will be mapped separately to avoid +// copying their contents in a larger memory area. Do note though that it is +// not supported to have a single channel spanning over two or more different +// #GstMemory objects. Although the map operation will likely succeed in this +// case, it will be highly sub-optimal and it is recommended to merge all the +// memories in the buffer before calling this function. +// +// Note: The actual #GstBuffer is not ref'ed, but it is required to stay valid +// as long as it's mapped. +func AudioBufferMap(info *AudioInfo, gstbuffer *gst.Buffer, flags gst.MapFlags) (AudioBuffer, bool) { + var carg2 *C.GstAudioInfo // in, none, converted + var carg3 *C.GstBuffer // in, none, converted + var carg4 C.GstMapFlags // in, none, casted + var carg1 C.GstAudioBuffer // out, transfer: none, C Pointers: 0, Name: AudioBuffer, caller-allocates + var cret C.gboolean // return + + carg2 = (*C.GstAudioInfo)(UnsafeAudioInfoToGlibNone(info)) + carg3 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(gstbuffer)) + carg4 = C.GstMapFlags(flags) + + cret = C.gst_audio_buffer_map(&carg1, carg2, carg3, carg4) + runtime.KeepAlive(info) + runtime.KeepAlive(gstbuffer) + runtime.KeepAlive(flags) + + var buffer AudioBuffer + var goret bool + + _ = buffer + _ = carg1 + panic("unimplemented conversion of AudioBuffer (GstAudioBuffer)") + if cret != 0 { + goret = true + } + + return buffer, goret +} + +// AudioBufferReorderChannels wraps gst_audio_buffer_reorder_channels +// +// The function takes the following parameters: +// +// - buffer *gst.Buffer: The buffer to reorder. +// - format AudioFormat: The %GstAudioFormat of the buffer. +// - from []AudioChannelPosition: The channel positions in the buffer. +// - to []AudioChannelPosition: The channel positions to convert to. +// +// The function returns the following values: +// +// - goret bool +// +// Reorders @buffer from the channel positions @from to the channel +// positions @to. @from and @to must contain the same number of +// positions and the same positions, only in a different order. +// @buffer must be writable. +func AudioBufferReorderChannels(buffer *gst.Buffer, format AudioFormat, from []AudioChannelPosition, to []AudioChannelPosition) bool { + var carg1 *C.GstBuffer // in, none, converted + var carg2 C.GstAudioFormat // in, none, casted + var carg3 C.gint // implicit + var carg4 *C.GstAudioChannelPosition // in, transfer: none, C Pointers: 1, Name: array[AudioChannelPosition], array (inner: *typesystem.Enum, length-by: carg3) + var carg5 *C.GstAudioChannelPosition // in, transfer: none, C Pointers: 1, Name: array[AudioChannelPosition], array (inner: *typesystem.Enum, length-by: carg3) + var cret C.gboolean // return + + carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) + carg2 = C.GstAudioFormat(format) + _ = from + _ = carg4 + _ = carg3 + panic("unimplemented conversion of []AudioChannelPosition (const GstAudioChannelPosition*)") + _ = to + _ = carg5 + _ = carg3 + panic("unimplemented conversion of []AudioChannelPosition (const GstAudioChannelPosition*)") + + cret = C.gst_audio_buffer_reorder_channels(carg1, carg2, carg3, carg4, carg5) + runtime.KeepAlive(buffer) + runtime.KeepAlive(format) + runtime.KeepAlive(from) + runtime.KeepAlive(to) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + +// AudioBufferTruncate wraps gst_audio_buffer_truncate +// +// 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 * +// 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 +// to use all the remaining samples if you are only removing samples from the +// beginning. +// +// The function returns the following values: +// +// - goret *gst.Buffer +// +// Truncate the buffer to finally have @samples number of samples, removing +// the necessary amount of samples from the end and @trim number of samples +// from the beginning. +// +// This function does not know the audio rate, therefore the caller is +// responsible for re-setting the correct timestamp and duration to the +// buffer. However, timestamp will be preserved if trim == 0, and duration +// will also be preserved if there is no trimming to be done. Offset and +// offset end will be preserved / updated. +// +// 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 { + var carg1 *C.GstBuffer // in, full, converted + var carg2 C.gint // in, none, casted + var carg3 C.gsize // in, none, casted + var carg4 C.gsize // in, none, casted + var cret *C.GstBuffer // return, full, converted + + carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibFull(buffer)) + carg2 = C.gint(bpf) + carg3 = C.gsize(trim) + carg4 = C.gsize(samples) + + cret = C.gst_audio_buffer_truncate(carg1, carg2, carg3, carg4) + runtime.KeepAlive(buffer) + runtime.KeepAlive(bpf) + runtime.KeepAlive(trim) + runtime.KeepAlive(samples) + + var goret *gst.Buffer + + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + // Unmap wraps gst_audio_buffer_unmap // // Unmaps an audio buffer that was previously mapped with @@ -8723,6 +8937,22 @@ func UnsafeAudioClippingMetaToGlibFull(a *AudioClippingMeta) unsafe.Pointer { a.native = nil // AudioClippingMeta is invalid from here on return _p } +// AudioClippingMetaGetInfo wraps gst_audio_clipping_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +func AudioClippingMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_audio_clipping_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // AudioClockClass wraps GstAudioClockClass type AudioClockClass struct { *audioClockClass @@ -9275,6 +9505,22 @@ func UnsafeAudioDownmixMetaToGlibFull(a *AudioDownmixMeta) unsafe.Pointer { a.native = nil // AudioDownmixMeta is invalid from here on return _p } +// AudioDownmixMetaGetInfo wraps gst_audio_downmix_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +func AudioDownmixMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_audio_downmix_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // AudioEncoderClass wraps GstAudioEncoderClass // // Subclasses can override any of the available virtual methods or not, as @@ -9621,6 +9867,61 @@ func NewAudioInfoFromCaps(caps *gst.Caps) *AudioInfo { return goret } +// AudioInfoFromCaps wraps gst_audio_info_from_caps +// +// The function takes the following parameters: +// +// - caps *gst.Caps: a #GstCaps +// +// The function returns the following values: +// +// - info AudioInfo: a #GstAudioInfo +// - goret bool +// +// Parse @caps and update @info. +func AudioInfoFromCaps(caps *gst.Caps) (AudioInfo, bool) { + var carg2 *C.GstCaps // in, none, converted + var carg1 C.GstAudioInfo // out, transfer: none, C Pointers: 0, Name: AudioInfo, caller-allocates + var cret C.gboolean // return + + carg2 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(caps)) + + cret = C.gst_audio_info_from_caps(&carg1, carg2) + runtime.KeepAlive(caps) + + var info AudioInfo + var goret bool + + _ = info + _ = carg1 + panic("unimplemented conversion of AudioInfo (GstAudioInfo)") + if cret != 0 { + goret = true + } + + return info, goret +} + +// AudioInfoInit wraps gst_audio_info_init +// The function returns the following values: +// +// - info AudioInfo: a #GstAudioInfo +// +// Initialize @info with default values. +func AudioInfoInit() AudioInfo { + var carg1 C.GstAudioInfo // out, transfer: none, C Pointers: 0, Name: AudioInfo, caller-allocates + + C.gst_audio_info_init(&carg1) + + var info AudioInfo + + _ = info + _ = carg1 + panic("unimplemented conversion of AudioInfo (GstAudioInfo)") + + return info +} + // Convert wraps gst_audio_info_convert // // The function takes the following parameters: @@ -9841,6 +10142,24 @@ func UnsafeAudioLevelMetaToGlibFull(a *AudioLevelMeta) unsafe.Pointer { a.native = nil // AudioLevelMeta is invalid from here on return _p } +// AudioLevelMetaGetInfo wraps gst_audio_level_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +// +// Return the #GstMetaInfo associated with #GstAudioLevelMeta. +func AudioLevelMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_audio_level_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // AudioMeta wraps GstAudioMeta // // #GstAudioDownmixMeta defines an audio downmix matrix to be send along with @@ -9905,6 +10224,22 @@ func UnsafeAudioMetaToGlibFull(a *AudioMeta) unsafe.Pointer { a.native = nil // AudioMeta is invalid from here on return _p } +// AudioMetaGetInfo wraps gst_audio_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +func AudioMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_audio_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // AudioQuantize wraps GstAudioQuantize type AudioQuantize struct { *audioQuantize @@ -10041,6 +10376,90 @@ func UnsafeAudioResamplerToGlibFull(a *AudioResampler) unsafe.Pointer { a.native = nil // AudioResampler is invalid from here on return _p } +// NewAudioResampler wraps gst_audio_resampler_new +// +// The function takes the following parameters: +// +// - 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 +// - options *gst.Structure: extra options +// +// The function returns the following values: +// +// - goret *AudioResampler +// +// Make a new resampler. +func NewAudioResampler(method AudioResamplerMethod, flags AudioResamplerFlags, format AudioFormat, channels int, inRate int, outRate int, 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 + var carg4 C.gint // in, none, casted + var carg5 C.gint // in, none, casted + var carg6 C.gint // in, none, casted + var carg7 *C.GstStructure // in, none, converted + var cret *C.GstAudioResampler // return, full, converted + + carg1 = C.GstAudioResamplerMethod(method) + carg2 = C.GstAudioResamplerFlags(flags) + carg3 = C.GstAudioFormat(format) + carg4 = C.gint(channels) + carg5 = C.gint(inRate) + carg6 = C.gint(outRate) + carg7 = (*C.GstStructure)(gst.UnsafeStructureToGlibNone(options)) + + cret = C.gst_audio_resampler_new(carg1, carg2, carg3, carg4, carg5, carg6, carg7) + runtime.KeepAlive(method) + runtime.KeepAlive(flags) + runtime.KeepAlive(format) + runtime.KeepAlive(channels) + runtime.KeepAlive(inRate) + runtime.KeepAlive(outRate) + runtime.KeepAlive(options) + + var goret *AudioResampler + + goret = UnsafeAudioResamplerFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// AudioResamplerOptionsSetQuality wraps gst_audio_resampler_options_set_quality +// +// The function takes the following parameters: +// +// - method AudioResamplerMethod: a #GstAudioResamplerMethod +// - quality uint: the quality +// - inRate int: the input rate +// - outRate int: 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) { + var carg1 C.GstAudioResamplerMethod // in, none, casted + var carg2 C.guint // in, none, casted + var carg3 C.gint // in, none, casted + var carg4 C.gint // in, none, casted + var carg5 *C.GstStructure // in, none, converted + + carg1 = C.GstAudioResamplerMethod(method) + carg2 = C.guint(quality) + carg3 = C.gint(inRate) + carg4 = C.gint(outRate) + carg5 = (*C.GstStructure)(gst.UnsafeStructureToGlibNone(options)) + + C.gst_audio_resampler_options_set_quality(carg1, carg2, carg3, carg4, carg5) + runtime.KeepAlive(method) + runtime.KeepAlive(quality) + runtime.KeepAlive(inRate) + runtime.KeepAlive(outRate) + runtime.KeepAlive(options) +} + // GetInFrames wraps gst_audio_resampler_get_in_frames // // The function takes the following parameters: @@ -11062,6 +11481,61 @@ func NewDsdInfoFromCaps(caps *gst.Caps) *DsdInfo { return goret } +// DsdInfoFromCaps wraps gst_dsd_info_from_caps +// +// The function takes the following parameters: +// +// - caps *gst.Caps: a #GstCaps +// +// The function returns the following values: +// +// - info DsdInfo: a #GstDsdInfo +// - goret bool +// +// Parse @caps and update @info. +func DsdInfoFromCaps(caps *gst.Caps) (DsdInfo, bool) { + var carg2 *C.GstCaps // in, none, converted + var carg1 C.GstDsdInfo // out, transfer: none, C Pointers: 0, Name: DsdInfo, caller-allocates + var cret C.gboolean // return + + carg2 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(caps)) + + cret = C.gst_dsd_info_from_caps(&carg1, carg2) + runtime.KeepAlive(caps) + + var info DsdInfo + var goret bool + + _ = info + _ = carg1 + panic("unimplemented conversion of DsdInfo (GstDsdInfo)") + if cret != 0 { + goret = true + } + + return info, goret +} + +// DsdInfoInit wraps gst_dsd_info_init +// The function returns the following values: +// +// - info DsdInfo: a #GstDsdInfo +// +// Initialize @info with default values. +func DsdInfoInit() DsdInfo { + var carg1 C.GstDsdInfo // out, transfer: none, C Pointers: 0, Name: DsdInfo, caller-allocates + + C.gst_dsd_info_init(&carg1) + + var info DsdInfo + + _ = info + _ = carg1 + panic("unimplemented conversion of DsdInfo (GstDsdInfo)") + + return info +} + // Copy wraps gst_dsd_info_copy // The function returns the following values: // @@ -11253,6 +11727,22 @@ func UnsafeDsdPlaneOffsetMetaToGlibFull(d *DsdPlaneOffsetMeta) unsafe.Pointer { d.native = nil // DsdPlaneOffsetMeta is invalid from here on return _p } +// DsdPlaneOffsetMetaGetInfo wraps gst_dsd_plane_offset_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +func DsdPlaneOffsetMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_dsd_plane_offset_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // StreamVolumeInterface wraps GstStreamVolumeInterface type StreamVolumeInterface struct { *streamVolumeInterface diff --git a/pkg/gstaudio/gstaudio_export.gen.go b/pkg/gstaudio/gstaudio_export.gen.go index 7455503..8475105 100644 --- a/pkg/gstaudio/gstaudio_export.gen.go +++ b/pkg/gstaudio/gstaudio_export.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstAudio-1. DO NOT EDIT. package gstaudio diff --git a/pkg/gstbase/gstbase.gen.go b/pkg/gstbase/gstbase.gen.go index 99743d4..21aef60 100644 --- a/pkg/gstbase/gstbase.gen.go +++ b/pkg/gstbase/gstbase.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstBase-1. DO NOT EDIT. package gstbase @@ -722,7 +722,7 @@ func TypeFindHelperForDataWithExtension(obj gst.Object, data []uint8, extension // Free-function: gst_caps_unref func TypeFindHelperForExtension(obj gst.Object, extension string) *gst.Caps { var carg1 *C.GstObject // in, none, converted, nullable - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var cret *C.GstCaps // return, full, converted if obj != nil { @@ -742,6 +742,50 @@ func TypeFindHelperForExtension(obj gst.Object, extension string) *gst.Caps { return goret } +// TypeFindListFactoriesForCaps wraps gst_type_find_list_factories_for_caps +// +// The function takes the following parameters: +// +// - obj gst.Object (nullable): object doing the typefinding, or %NULL (used for logging) +// - caps *gst.Caps: caps of the media +// +// The function returns the following values: +// +// - goret []gst.TypeFindFactory +// +// Tries to find the best #GstTypeFindFactory associated with @caps. +// +// The typefinder that can handle @caps will be returned. +// +// Free-function: g_list_free +func TypeFindListFactoriesForCaps(obj gst.Object, caps *gst.Caps) []gst.TypeFindFactory { + var carg1 *C.GstObject // in, none, converted, nullable + var carg2 *C.GstCaps // in, none, converted + var cret *C.GList // container, transfer: full + + if obj != nil { + carg1 = (*C.GstObject)(gst.UnsafeObjectToGlibNone(obj)) + } + carg2 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(caps)) + + cret = C.gst_type_find_list_factories_for_caps(carg1, carg2) + runtime.KeepAlive(obj) + runtime.KeepAlive(caps) + + var goret []gst.TypeFindFactory + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) gst.TypeFindFactory { + var dst gst.TypeFindFactory // converted + dst = gst.UnsafeTypeFindFactoryFromGlibFull(v) + return dst + }, + ) + + return goret +} + // AdapterInstance is the instance type used by all types extending GstAdapter. It is used internally by the bindings. Users should use the interface [Adapter] instead. type AdapterInstance struct { _ [0]func() // equal guard @@ -979,6 +1023,23 @@ type Adapter interface { // Caller owns the returned list. Call gst_buffer_list_unref() to free // the list after usage. GetBufferList(uint) *gst.BufferList + // GetList wraps gst_adapter_get_list + // + // The function takes the following parameters: + // + // - nbytes uint: the number of bytes to get + // + // The function returns the following values: + // + // - goret []*gst.Buffer + // + // Returns a #GList of buffers containing the first @nbytes bytes of the + // @adapter, but does not flush them from the adapter. See + // gst_adapter_take_list() for details. + // + // Caller owns returned list and contained buffers. gst_buffer_unref() each + // buffer in the list before freeing the list after usage. + GetList(uint) []*gst.Buffer // MaskedScanUint32 wraps gst_adapter_masked_scan_uint32 // // The function takes the following parameters: @@ -1224,6 +1285,24 @@ type Adapter interface { // Caller owns the returned list. Call gst_buffer_list_unref() to free // the list after usage. TakeBufferList(uint) *gst.BufferList + // TakeList wraps gst_adapter_take_list + // + // The function takes the following parameters: + // + // - nbytes uint: the number of bytes to take + // + // The function returns the following values: + // + // - goret []*gst.Buffer + // + // Returns a #GList of buffers containing the first @nbytes bytes of the + // @adapter. The returned bytes will be flushed from the adapter. + // When the caller can deal with individual buffers, this function is more + // performant because no memory should be copied. + // + // Caller owns returned list and contained buffers. gst_buffer_unref() each + // buffer in the list before freeing the list after usage. + TakeList(uint) []*gst.Buffer // Unmap wraps gst_adapter_unmap // // Releases the memory obtained with the last gst_adapter_map(). @@ -1560,6 +1639,48 @@ func (adapter *AdapterInstance) GetBufferList(nbytes uint) *gst.BufferList { return goret } +// GetList wraps gst_adapter_get_list +// +// The function takes the following parameters: +// +// - nbytes uint: the number of bytes to get +// +// The function returns the following values: +// +// - goret []*gst.Buffer +// +// Returns a #GList of buffers containing the first @nbytes bytes of the +// @adapter, but does not flush them from the adapter. See +// gst_adapter_take_list() for details. +// +// Caller owns returned list and contained buffers. gst_buffer_unref() each +// buffer in the list before freeing the list after usage. +func (adapter *AdapterInstance) GetList(nbytes uint) []*gst.Buffer { + var carg0 *C.GstAdapter // in, none, converted + var carg1 C.gsize // in, none, casted + var cret *C.GList // container, transfer: full + + carg0 = (*C.GstAdapter)(UnsafeAdapterToGlibNone(adapter)) + carg1 = C.gsize(nbytes) + + cret = C.gst_adapter_get_list(carg0, carg1) + runtime.KeepAlive(adapter) + runtime.KeepAlive(nbytes) + + var goret []*gst.Buffer + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) *gst.Buffer { + var dst *gst.Buffer // converted + dst = gst.UnsafeBufferFromGlibFull(v) + return dst + }, + ) + + return goret +} + // MaskedScanUint32 wraps gst_adapter_masked_scan_uint32 // // The function takes the following parameters: @@ -2053,6 +2174,49 @@ func (adapter *AdapterInstance) TakeBufferList(nbytes uint) *gst.BufferList { return goret } +// TakeList wraps gst_adapter_take_list +// +// The function takes the following parameters: +// +// - nbytes uint: the number of bytes to take +// +// The function returns the following values: +// +// - goret []*gst.Buffer +// +// Returns a #GList of buffers containing the first @nbytes bytes of the +// @adapter. The returned bytes will be flushed from the adapter. +// When the caller can deal with individual buffers, this function is more +// performant because no memory should be copied. +// +// Caller owns returned list and contained buffers. gst_buffer_unref() each +// buffer in the list before freeing the list after usage. +func (adapter *AdapterInstance) TakeList(nbytes uint) []*gst.Buffer { + var carg0 *C.GstAdapter // in, none, converted + var carg1 C.gsize // in, none, casted + var cret *C.GList // container, transfer: full + + carg0 = (*C.GstAdapter)(UnsafeAdapterToGlibNone(adapter)) + carg1 = C.gsize(nbytes) + + cret = C.gst_adapter_take_list(carg0, carg1) + runtime.KeepAlive(adapter) + runtime.KeepAlive(nbytes) + + var goret []*gst.Buffer + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) *gst.Buffer { + var dst *gst.Buffer // converted + dst = gst.UnsafeBufferFromGlibFull(v) + return dst + }, + ) + + return goret +} + // Unmap wraps gst_adapter_unmap // // Releases the memory obtained with the last gst_adapter_map(). @@ -12617,7 +12781,7 @@ func (writer *ByteWriter) PutStringUTF32(data []uint32) bool { // Writes a NUL-terminated UTF8 string to @writer (including the terminator). func (writer *ByteWriter) PutStringUTF8(data string) bool { var carg0 *C.GstByteWriter // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstByteWriter)(UnsafeByteWriterToGlibNone(writer)) @@ -13474,65 +13638,3 @@ func UnsafePushSrcClassToGlibFull(p *PushSrcClass) unsafe.Pointer { p.native = nil // PushSrcClass is invalid from here on return _p } -// TypeFindData wraps GstTypeFindData -// -// The opaque #GstTypeFindData structure. -type TypeFindData struct { - *typeFindData -} - -// typeFindData is the struct that's finalized -type typeFindData struct { - native *C.GstTypeFindData -} - -// UnsafeTypeFindDataFromGlibBorrow is used to convert raw C.GstTypeFindData pointers to go. This is used by the bindings internally. -func UnsafeTypeFindDataFromGlibBorrow(p unsafe.Pointer) *TypeFindData { - return &TypeFindData{&typeFindData{(*C.GstTypeFindData)(p)}} -} - -// UnsafeTypeFindDataFromGlibNone is used to convert raw C.GstTypeFindData pointers to go while taking a reference. This is used by the bindings internally. -func UnsafeTypeFindDataFromGlibNone(p unsafe.Pointer) *TypeFindData { - // FIXME: this has no ref function, what should we do here? - wrapped := UnsafeTypeFindDataFromGlibBorrow(p) - runtime.SetFinalizer( - wrapped.typeFindData, - func (intern *typeFindData) { - C.gst_type_find_data_free(intern.native) - }, - ) - return wrapped -} - -// UnsafeTypeFindDataFromGlibFull is used to convert raw C.GstTypeFindData pointers to go while taking a reference. This is used by the bindings internally. -func UnsafeTypeFindDataFromGlibFull(p unsafe.Pointer) *TypeFindData { - wrapped := UnsafeTypeFindDataFromGlibBorrow(p) - runtime.SetFinalizer( - wrapped.typeFindData, - func (intern *typeFindData) { - C.gst_type_find_data_free(intern.native) - }, - ) - return wrapped -} - -// UnsafeTypeFindDataFree unrefs/frees the underlying resource. This is used by the bindings internally. -// -// After this is called, no other method on [TypeFindData] is expected to work anymore. -func UnsafeTypeFindDataFree(t *TypeFindData) { - C.gst_type_find_data_free(t.native) -} - -// UnsafeTypeFindDataToGlibNone returns the underlying C pointer. This is used by the bindings internally. -func UnsafeTypeFindDataToGlibNone(t *TypeFindData) unsafe.Pointer { - return unsafe.Pointer(t.native) -} - -// UnsafeTypeFindDataToGlibFull returns the underlying C pointer and gives up ownership. -// This is used by the bindings internally. -func UnsafeTypeFindDataToGlibFull(t *TypeFindData) unsafe.Pointer { - runtime.SetFinalizer(t.typeFindData, nil) - _p := unsafe.Pointer(t.native) - t.native = nil // TypeFindData is invalid from here on - return _p -} diff --git a/pkg/gstbase/gstbase_export.gen.go b/pkg/gstbase/gstbase_export.gen.go index de3990b..830dab4 100644 --- a/pkg/gstbase/gstbase_export.gen.go +++ b/pkg/gstbase/gstbase_export.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstBase-1. DO NOT EDIT. package gstbase diff --git a/pkg/gstcheck/gstcheck.gen.go b/pkg/gstcheck/gstcheck.gen.go index a361ee4..f7b9e02 100644 --- a/pkg/gstcheck/gstcheck.gen.go +++ b/pkg/gstcheck/gstcheck.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstCheck-1. DO NOT EDIT. package gstcheck @@ -272,7 +272,7 @@ func CheckDropBuffers() { // and this will be compared with @buffer_out. We only check the caps // and the data of the buffers. This function unrefs the buffers. func CheckElementPushBuffer(elementName string, bufferIn *gst.Buffer, capsIn *gst.Caps, bufferOut *gst.Buffer, capsOut *gst.Caps) { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 *C.GstBuffer // in, none, converted var carg3 *C.GstCaps // in, none, converted var carg4 *C.GstBuffer // in, none, converted @@ -293,27 +293,6 @@ func CheckElementPushBuffer(elementName string, bufferIn *gst.Buffer, capsIn *gs runtime.KeepAlive(capsOut) } -// CheckInit wraps gst_check_init -// -// The function takes the following parameters: -// -// - argc *int -// - argv string -func CheckInit(argc *int, argv string) { - var carg1 *C.int // in, transfer: none, C Pointers: 1, Name: gint, casted *C.gint - var carg2 ***C.char // in, none, string, casted *C.gchar - - _ = argc - _ = carg1 - panic("unimplemented conversion of *int (int*)") - carg2 = (***C.char)(unsafe.Pointer(C.CString(argv))) - defer C.free(unsafe.Pointer(carg2)) - - C.gst_check_init(carg1, carg2) - runtime.KeepAlive(argc) - runtime.KeepAlive(argv) -} - // CheckMessageError wraps gst_check_message_error // // The function takes the following parameters: @@ -370,7 +349,7 @@ func CheckRemoveLogFilter(filter *CheckLogFilter) { // // setup an element for a filter test with mysrcpad and mysinkpad func CheckSetupElement(factory string) gst.Element { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstElement // return, full, converted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(factory))) @@ -437,7 +416,7 @@ func CheckSetupEventsWithStreamID(srcpad gst.Pad, element gst.Element, caps *gst var carg2 *C.GstElement // in, none, converted var carg3 *C.GstCaps // in, none, converted, nullable var carg4 C.GstFormat // in, none, casted - var carg5 *C.gchar // in, none, string, casted *C.gchar + var carg5 *C.gchar // in, none, string carg1 = (*C.GstPad)(gst.UnsafePadToGlibNone(srcpad)) carg2 = (*C.GstElement)(gst.UnsafeElementToGlibNone(element)) @@ -505,7 +484,7 @@ func CheckSetupSinkPad(element gst.Element, tmpl *gst.StaticPadTemplate) gst.Pad func CheckSetupSinkPadByName(element gst.Element, tmpl *gst.StaticPadTemplate, name string) gst.Pad { var carg1 *C.GstElement // in, none, converted var carg2 *C.GstStaticPadTemplate // in, none, converted - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string var cret *C.GstPad // return, full, converted carg1 = (*C.GstElement)(gst.UnsafeElementToGlibNone(element)) @@ -539,7 +518,7 @@ func CheckSetupSinkPadByName(element gst.Element, tmpl *gst.StaticPadTemplate, n func CheckSetupSinkPadByNameFromTemplate(element gst.Element, tmpl gst.PadTemplate, name string) gst.Pad { var carg1 *C.GstElement // in, none, converted var carg2 *C.GstPadTemplate // in, none, converted - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string var cret *C.GstPad // return, full, converted carg1 = (*C.GstElement)(gst.UnsafeElementToGlibNone(element)) @@ -667,7 +646,7 @@ func CheckSetupSrcPad(element gst.Element, tmpl *gst.StaticPadTemplate) gst.Pad func CheckSetupSrcPadByName(element gst.Element, tmpl *gst.StaticPadTemplate, name string) gst.Pad { var carg1 *C.GstElement // in, none, converted var carg2 *C.GstStaticPadTemplate // in, none, converted - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string var cret *C.GstPad // return, full, converted carg1 = (*C.GstElement)(gst.UnsafeElementToGlibNone(element)) @@ -701,7 +680,7 @@ func CheckSetupSrcPadByName(element gst.Element, tmpl *gst.StaticPadTemplate, na func CheckSetupSrcPadByNameFromTemplate(element gst.Element, tmpl gst.PadTemplate, name string) gst.Pad { var carg1 *C.GstElement // in, none, converted var carg2 *C.GstPadTemplate // in, none, converted - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string var cret *C.GstPad // return, full, converted carg1 = (*C.GstElement)(gst.UnsafeElementToGlibNone(element)) @@ -772,7 +751,7 @@ func CheckTeardownElement(element gst.Element) { // - name string func CheckTeardownPadByName(element gst.Element, name string) { var carg1 *C.GstElement // in, none, converted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string carg1 = (*C.GstElement)(gst.UnsafeElementToGlibNone(element)) carg2 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -1828,6 +1807,35 @@ func UnsafeHarnessToGlibFull(h *Harness) unsafe.Pointer { h.native = nil // Harness is invalid from here on return _p } +// HarnessStressThreadStop wraps gst_harness_stress_thread_stop +// +// The function takes the following parameters: +// +// - t *HarnessThread: a #GstHarnessThread +// +// The function returns the following values: +// +// - goret uint +// +// Stop the running #GstHarnessThread +// +// MT safe. +func HarnessStressThreadStop(t *HarnessThread) uint { + var carg1 *C.GstHarnessThread // in, none, converted + var cret C.guint // return, none, casted + + carg1 = (*C.GstHarnessThread)(UnsafeHarnessThreadToGlibNone(t)) + + cret = C.gst_harness_stress_thread_stop(carg1) + runtime.KeepAlive(t) + + var goret uint + + goret = uint(cret) + + return goret +} + // AddElementSinkPad wraps gst_harness_add_element_sink_pad // // The function takes the following parameters: @@ -1888,8 +1896,8 @@ func (h *Harness) AddElementSrcPad(srcpad gst.Pad) { // MT safe. func (h *Harness) AddProbe(elementName string, padName string, mask gst.PadProbeType, callback gst.PadProbeCallback) { var carg0 *C.GstHarness // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string var carg3 C.GstPadProbeType // in, none, casted var carg4 C.GstPadProbeCallback // callback, scope: notified, closure: carg5, destroy: carg6 var carg5 C.gpointer // implicit @@ -1953,7 +1961,7 @@ func (h *Harness) AddProposeAllocationMeta(api gobject.Type, params *gst.Structu // MT safe. func (h *Harness) AddSink(sinkElementName string) { var carg0 *C.GstHarness // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstHarness)(UnsafeHarnessToGlibNone(h)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(sinkElementName))) @@ -2004,7 +2012,7 @@ func (h *Harness) AddSinkHarness(sinkHarness *Harness) { // MT safe. func (h *Harness) AddSinkParse(launchline string) { var carg0 *C.GstHarness // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstHarness)(UnsafeHarnessToGlibNone(h)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(launchline))) @@ -2029,7 +2037,7 @@ func (h *Harness) AddSinkParse(launchline string) { // MT safe. func (h *Harness) AddSrc(srcElementName string, hasClockWait bool) { var carg0 *C.GstHarness // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gboolean // in carg0 = (*C.GstHarness)(UnsafeHarnessToGlibNone(h)) @@ -2098,7 +2106,7 @@ func (h *Harness) AddSrcHarness(srcHarness *Harness, hasClockWait bool) { // MT safe. func (h *Harness) AddSrcParse(launchline string, hasClockWait bool) { var carg0 *C.GstHarness // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gboolean // in carg0 = (*C.GstHarness)(UnsafeHarnessToGlibNone(h)) @@ -2281,7 +2289,7 @@ func (h *Harness) CreateBuffer(size uint) *gst.Buffer { // MT safe. func (h *Harness) DumpToFile(filename string) { var carg0 *C.GstHarness // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstHarness)(UnsafeHarnessToGlibNone(h)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(filename))) @@ -2360,7 +2368,7 @@ func (h *Harness) EventsReceived() uint { // MT safe. func (h *Harness) FindElement(elementName string) gst.Element { var carg0 *C.GstHarness // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstElement // return, full, converted carg0 = (*C.GstHarness)(UnsafeHarnessToGlibNone(h)) @@ -2859,8 +2867,8 @@ func (h *Harness) SetCaps(in *gst.Caps, out *gst.Caps) { // MT safe. func (h *Harness) SetCapsStr(in string, out string) { var carg0 *C.GstHarness // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string carg0 = (*C.GstHarness)(UnsafeHarnessToGlibNone(h)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(in))) @@ -3017,7 +3025,7 @@ func (h *Harness) SetSinkCaps(caps *gst.Caps) { // MT safe. func (h *Harness) SetSinkCapsStr(str string) { var carg0 *C.GstHarness // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstHarness)(UnsafeHarnessToGlibNone(h)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(str))) @@ -3062,7 +3070,7 @@ func (h *Harness) SetSrcCaps(caps *gst.Caps) { // MT safe. func (h *Harness) SetSrcCapsStr(str string) { var carg0 *C.GstHarness // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstHarness)(UnsafeHarnessToGlibNone(h)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(str))) diff --git a/pkg/gstcheck/gstcheck_export.gen.go b/pkg/gstcheck/gstcheck_export.gen.go index db289ef..5889b1c 100644 --- a/pkg/gstcheck/gstcheck_export.gen.go +++ b/pkg/gstcheck/gstcheck_export.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstCheck-1. DO NOT EDIT. package gstcheck @@ -23,9 +23,9 @@ func _gotk4_gstcheck1_CheckLogFilterFunc(carg1 *C.gchar, carg2 C.GLogLevelFlags, fn = v.(CheckLogFilterFunc) } - var logDomain string // in, none, string, casted *C.gchar + var logDomain string // in, none, string var logLevel glib.LogLevelFlags // in, none, casted - var message string // in, none, string, casted *C.gchar + var message string // in, none, string var goret bool // return logDomain = C.GoString((*C.char)(unsafe.Pointer(carg1))) diff --git a/pkg/gstcontroller/gstcontroller.gen.go b/pkg/gstcontroller/gstcontroller.gen.go index 152e145..072b4c4 100644 --- a/pkg/gstcontroller/gstcontroller.gen.go +++ b/pkg/gstcontroller/gstcontroller.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstController-1. DO NOT EDIT. package gstcontroller @@ -237,7 +237,7 @@ func UnsafeARGBControlBindingToGlibFull(c ARGBControlBinding) unsafe.Pointer { // #GObject property. func NewARGBControlBinding(object gst.Object, propertyName string, csA gst.ControlSource, csR gst.ControlSource, csG gst.ControlSource, csB gst.ControlSource) gst.ControlBinding { var carg1 *C.GstObject // in, none, converted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var carg3 *C.GstControlSource // in, none, converted var carg4 *C.GstControlSource // in, none, converted var carg5 *C.GstControlSource // in, none, converted @@ -345,7 +345,7 @@ func UnsafeDirectControlBindingToGlibFull(c DirectControlBinding) unsafe.Pointer // the full target property range, and clip all values outside this range. func NewDirectControlBinding(object gst.Object, propertyName string, cs gst.ControlSource) gst.ControlBinding { var carg1 *C.GstObject // in, none, converted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var carg3 *C.GstControlSource // in, none, converted var cret *C.GstControlBinding // return, none, converted @@ -383,7 +383,7 @@ func NewDirectControlBinding(object gst.Object, propertyName string, cs gst.Cont // target property range without any transformations. func NewDirectControlBindingAbsolute(object gst.Object, propertyName string, cs gst.ControlSource) gst.ControlBinding { var carg1 *C.GstObject // in, none, converted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var carg3 *C.GstControlSource // in, none, converted var cret *C.GstControlBinding // return, none, converted @@ -560,9 +560,9 @@ func UnsafeProxyControlBindingToGlibFull(c ProxyControlBinding) unsafe.Pointer { // @ref_property_name on @ref_object. func NewProxyControlBinding(object gst.Object, propertyName string, refObject gst.Object, refPropertyName string) gst.ControlBinding { var carg1 *C.GstObject // in, none, converted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var carg3 *C.GstObject // in, none, converted - var carg4 *C.gchar // in, none, string, casted *C.gchar + var carg4 *C.gchar // in, none, string var cret *C.GstControlBinding // return, none, converted carg1 = (*C.GstObject)(gst.UnsafeObjectToGlibNone(object)) @@ -621,6 +621,14 @@ type TimedValueControlSource interface { // // For use in control source implementations. FindControlPointIter(gst.ClockTime) *glib.SequenceIter + // GetAll wraps gst_timed_value_control_source_get_all + // The function returns the following values: + // + // - goret []*gst.TimedValue + // + // Returns a read-only copy of the list of #GstTimedValue for the given property. + // Free the list after done with it. + GetAll() []*gst.TimedValue // GetCount wraps gst_timed_value_control_source_get_count // The function returns the following values: // @@ -746,6 +754,36 @@ func (self *TimedValueControlSourceInstance) FindControlPointIter(timestamp gst. return goret } +// GetAll wraps gst_timed_value_control_source_get_all +// The function returns the following values: +// +// - goret []*gst.TimedValue +// +// Returns a read-only copy of the list of #GstTimedValue for the given property. +// Free the list after done with it. +func (self *TimedValueControlSourceInstance) GetAll() []*gst.TimedValue { + var carg0 *C.GstTimedValueControlSource // in, none, converted + var cret *C.GList // container, transfer: container + + carg0 = (*C.GstTimedValueControlSource)(UnsafeTimedValueControlSourceToGlibNone(self)) + + cret = C.gst_timed_value_control_source_get_all(carg0) + runtime.KeepAlive(self) + + var goret []*gst.TimedValue + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) *gst.TimedValue { + var dst *gst.TimedValue // converted + dst = gst.UnsafeTimedValueFromGlibNone(v) + return dst + }, + ) + + return goret +} + // GetCount wraps gst_timed_value_control_source_get_count // The function returns the following values: // diff --git a/pkg/gstgl/gstgl.gen.go b/pkg/gstgl/gstgl.gen.go index ad9ec2b..aafa877 100644 --- a/pkg/gstgl/gstgl.gen.go +++ b/pkg/gstgl/gstgl.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstGL-1. DO NOT EDIT. package gstgl @@ -1450,7 +1450,7 @@ func ContextSetGLDisplay(_context *gst.Context, display GLDisplay) { // - goret bool func GLCheckExtension(name string, ext string) bool { var carg1 *C.char // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var cret C.gboolean // return carg1 = (*C.char)(unsafe.Pointer(C.CString(name))) @@ -1879,7 +1879,7 @@ func GLVersionToGlslVersion(glApi GLAPI, maj int, min int) GLSLVersion { // Note: this function first searches the first 1 kilobytes for a `#version` // preprocessor directive and then executes gst_glsl_version_profile_from_string(). func GlslStringGetVersionProfile(s string) (GLSLVersion, GLSLProfile, bool) { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.GstGLSLVersion // out, full, casted var carg3 C.GstGLSLProfile // out, full, casted var cret C.gboolean // return @@ -2775,7 +2775,7 @@ func GLColorConvertFixateCaps(_context GLContext, direction gst.PadDirection, ca // - goret string func GLColorConvertSwizzleShaderString(_context GLContext) string { var carg1 *C.GstGLContext // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = (*C.GstGLContext)(UnsafeGLContextToGlibNone(_context)) @@ -2848,7 +2848,7 @@ func GLColorConvertTransformCaps(_context GLContext, direction gst.PadDirection, // specific coefficients and offset used for the conversion. func GLColorConvertYuvToRGBShaderString(_context GLContext) string { var carg1 *C.GstGLContext // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = (*C.GstGLContext)(UnsafeGLContextToGlibNone(_context)) @@ -3474,7 +3474,7 @@ func (_context *GLContextInstance) CanShare(otherContext GLContext) bool { // case. func (_context *GLContextInstance) CheckFeature(feature string) bool { var carg0 *C.GstGLContext // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstGLContext)(UnsafeGLContextToGlibNone(_context)) @@ -5771,7 +5771,7 @@ func NewGLSLStageWithString(_context GLContext, typ uint, version GLSLVersion, p var carg2 C.guint // in, none, casted var carg3 C.GstGLSLVersion // in, none, casted var carg4 C.GstGLSLProfile // in, none, casted - var carg5 *C.gchar // in, none, string, casted *C.gchar + var carg5 *C.gchar // in, none, string var cret *C.GstGLSLStage // return, none, converted carg1 = (*C.GstGLContext)(UnsafeGLContextToGlibNone(_context)) @@ -6513,7 +6513,7 @@ func GLShaderStringFragmentExternalOesGetDefault(_context GLContext, version GLS var carg1 *C.GstGLContext // in, none, converted var carg2 C.GstGLSLVersion // in, none, casted var carg3 C.GstGLSLProfile // in, none, casted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = (*C.GstGLContext)(UnsafeGLContextToGlibNone(_context)) carg2 = C.GstGLSLVersion(version) @@ -6547,7 +6547,7 @@ func GLShaderStringFragmentGetDefault(_context GLContext, version GLSLVersion, p var carg1 *C.GstGLContext // in, none, converted var carg2 C.GstGLSLVersion // in, none, casted var carg3 C.GstGLSLProfile // in, none, casted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = (*C.GstGLContext)(UnsafeGLContextToGlibNone(_context)) carg2 = C.GstGLSLVersion(version) @@ -6589,7 +6589,7 @@ func GLShaderStringGetHighestPrecision(_context GLContext, version GLSLVersion, var carg1 *C.GstGLContext // in, none, converted var carg2 C.GstGLSLVersion // in, none, casted var carg3 C.GstGLSLProfile // in, none, casted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg1 = (*C.GstGLContext)(UnsafeGLContextToGlibNone(_context)) carg2 = C.GstGLSLVersion(version) @@ -6689,7 +6689,7 @@ func (shader *GLShaderInstance) AttachUnlocked(stage GLSLStage) bool { func (shader *GLShaderInstance) BindAttributeLocation(index uint, name string) { var carg0 *C.GstGLShader // in, none, converted var carg1 C.guint // in, none, casted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string carg0 = (*C.GstGLShader)(UnsafeGLShaderToGlibNone(shader)) carg1 = C.guint(index) @@ -6714,7 +6714,7 @@ func (shader *GLShaderInstance) BindAttributeLocation(index uint, name string) { func (shader *GLShaderInstance) BindFragDataLocation(index uint, name string) { var carg0 *C.GstGLShader // in, none, converted var carg1 C.guint // in, none, casted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string carg0 = (*C.GstGLShader)(UnsafeGLShaderToGlibNone(shader)) carg1 = C.guint(index) @@ -6822,7 +6822,7 @@ func (shader *GLShaderInstance) DetachUnlocked(stage GLSLStage) { // - goret int func (shader *GLShaderInstance) GetAttributeLocation(name string) int { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gint // return, none, casted carg0 = (*C.GstGLShader)(UnsafeGLShaderToGlibNone(shader)) @@ -6954,7 +6954,7 @@ func (shader *GLShaderInstance) ReleaseUnlocked() { // Perform `glUniform1f()` for @name on @shader func (shader *GLShaderInstance) SetUniform1F(name string, value float32) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gfloat // in, none, casted carg0 = (*C.GstGLShader)(UnsafeGLShaderToGlibNone(shader)) @@ -6978,7 +6978,7 @@ func (shader *GLShaderInstance) SetUniform1F(name string, value float32) { // Perform `glUniform1fv()` for @name on @shader func (shader *GLShaderInstance) SetUniform1Fv(name string, value []float32) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // implicit var carg3 *C.gfloat // in, transfer: none, C Pointers: 1, Name: array[gfloat], array (inner: *typesystem.CastablePrimitive, length-by: carg2) @@ -7006,7 +7006,7 @@ func (shader *GLShaderInstance) SetUniform1Fv(name string, value []float32) { // Perform `glUniform1i()` for @name on @shader func (shader *GLShaderInstance) SetUniform1I(name string, value int) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted carg0 = (*C.GstGLShader)(UnsafeGLShaderToGlibNone(shader)) @@ -7030,7 +7030,7 @@ func (shader *GLShaderInstance) SetUniform1I(name string, value int) { // Perform `glUniform1iv()` for @name on @shader func (shader *GLShaderInstance) SetUniform1Iv(name string, value []int) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // implicit var carg3 *C.gint // in, transfer: none, C Pointers: 1, Name: array[gint], array (inner: *typesystem.CastablePrimitive, length-by: carg2) @@ -7059,7 +7059,7 @@ func (shader *GLShaderInstance) SetUniform1Iv(name string, value []int) { // Perform `glUniform2f()` for @name on @shader func (shader *GLShaderInstance) SetUniform2F(name string, v0 float32, v1 float32) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gfloat // in, none, casted var carg3 C.gfloat // in, none, casted @@ -7086,7 +7086,7 @@ func (shader *GLShaderInstance) SetUniform2F(name string, v0 float32, v1 float32 // Perform `glUniform2fv()` for @name on @shader func (shader *GLShaderInstance) SetUniform2Fv(name string, value []float32) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // implicit var carg3 *C.gfloat // in, transfer: none, C Pointers: 1, Name: array[gfloat], array (inner: *typesystem.CastablePrimitive, length-by: carg2) @@ -7115,7 +7115,7 @@ func (shader *GLShaderInstance) SetUniform2Fv(name string, value []float32) { // Perform `glUniform2i()` for @name on @shader func (shader *GLShaderInstance) SetUniform2I(name string, v0 int, v1 int) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted @@ -7142,7 +7142,7 @@ func (shader *GLShaderInstance) SetUniform2I(name string, v0 int, v1 int) { // Perform `glUniform2iv()` for @name on @shader func (shader *GLShaderInstance) SetUniform2Iv(name string, value []int) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // implicit var carg3 *C.gint // in, transfer: none, C Pointers: 1, Name: array[gint], array (inner: *typesystem.CastablePrimitive, length-by: carg2) @@ -7172,7 +7172,7 @@ func (shader *GLShaderInstance) SetUniform2Iv(name string, value []int) { // Perform `glUniform3f()` for @name on @shader func (shader *GLShaderInstance) SetUniform3F(name string, v0 float32, v1 float32, v2 float32) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gfloat // in, none, casted var carg3 C.gfloat // in, none, casted var carg4 C.gfloat // in, none, casted @@ -7202,7 +7202,7 @@ func (shader *GLShaderInstance) SetUniform3F(name string, v0 float32, v1 float32 // Perform `glUniform3fv()` for @name on @shader func (shader *GLShaderInstance) SetUniform3Fv(name string, value []float32) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // implicit var carg3 *C.gfloat // in, transfer: none, C Pointers: 1, Name: array[gfloat], array (inner: *typesystem.CastablePrimitive, length-by: carg2) @@ -7232,7 +7232,7 @@ func (shader *GLShaderInstance) SetUniform3Fv(name string, value []float32) { // Perform `glUniform3i()` for @name on @shader func (shader *GLShaderInstance) SetUniform3I(name string, v0 int, v1 int, v2 int) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted var carg4 C.gint // in, none, casted @@ -7262,7 +7262,7 @@ func (shader *GLShaderInstance) SetUniform3I(name string, v0 int, v1 int, v2 int // Perform `glUniform3iv()` for @name on @shader func (shader *GLShaderInstance) SetUniform3Iv(name string, value []int) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // implicit var carg3 *C.gint // in, transfer: none, C Pointers: 1, Name: array[gint], array (inner: *typesystem.CastablePrimitive, length-by: carg2) @@ -7293,7 +7293,7 @@ func (shader *GLShaderInstance) SetUniform3Iv(name string, value []int) { // Perform `glUniform4f()` for @name on @shader func (shader *GLShaderInstance) SetUniform4F(name string, v0 float32, v1 float32, v2 float32, v3 float32) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gfloat // in, none, casted var carg3 C.gfloat // in, none, casted var carg4 C.gfloat // in, none, casted @@ -7326,7 +7326,7 @@ func (shader *GLShaderInstance) SetUniform4F(name string, v0 float32, v1 float32 // Perform `glUniform4fv()` for @name on @shader func (shader *GLShaderInstance) SetUniform4Fv(name string, value []float32) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // implicit var carg3 *C.gfloat // in, transfer: none, C Pointers: 1, Name: array[gfloat], array (inner: *typesystem.CastablePrimitive, length-by: carg2) @@ -7357,7 +7357,7 @@ func (shader *GLShaderInstance) SetUniform4Fv(name string, value []float32) { // Perform `glUniform4i()` for @name on @shader func (shader *GLShaderInstance) SetUniform4I(name string, v0 int, v1 int, v2 int, v3 int) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted var carg4 C.gint // in, none, casted @@ -7390,7 +7390,7 @@ func (shader *GLShaderInstance) SetUniform4I(name string, v0 int, v1 int, v2 int // Perform `glUniform4iv()` for @name on @shader func (shader *GLShaderInstance) SetUniform4Iv(name string, value []int) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // implicit var carg3 *C.gint // in, transfer: none, C Pointers: 1, Name: array[gint], array (inner: *typesystem.CastablePrimitive, length-by: carg2) @@ -7420,7 +7420,7 @@ func (shader *GLShaderInstance) SetUniform4Iv(name string, value []int) { // Perform `glUniformMatrix2fv()` for @name on @shader func (shader *GLShaderInstance) SetUniformMatrix2Fv(name string, count int, transpose bool, value *float32) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted var carg3 C.gboolean // in var carg4 *C.gfloat // in, transfer: none, C Pointers: 1, Name: gfloat @@ -7456,7 +7456,7 @@ func (shader *GLShaderInstance) SetUniformMatrix2Fv(name string, count int, tran // Perform `glUniformMatrix2x3fv()` for @name on @shader func (shader *GLShaderInstance) SetUniformMatrix2X3Fv(name string, count int, transpose bool, value *float32) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted var carg3 C.gboolean // in var carg4 *C.gfloat // in, transfer: none, C Pointers: 1, Name: gfloat @@ -7492,7 +7492,7 @@ func (shader *GLShaderInstance) SetUniformMatrix2X3Fv(name string, count int, tr // Perform `glUniformMatrix2x4fv()` for @name on @shader func (shader *GLShaderInstance) SetUniformMatrix2X4Fv(name string, count int, transpose bool, value *float32) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted var carg3 C.gboolean // in var carg4 *C.gfloat // in, transfer: none, C Pointers: 1, Name: gfloat @@ -7528,7 +7528,7 @@ func (shader *GLShaderInstance) SetUniformMatrix2X4Fv(name string, count int, tr // Perform `glUniformMatrix3fv()` for @name on @shader func (shader *GLShaderInstance) SetUniformMatrix3Fv(name string, count int, transpose bool, value *float32) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted var carg3 C.gboolean // in var carg4 *C.gfloat // in, transfer: none, C Pointers: 1, Name: gfloat @@ -7564,7 +7564,7 @@ func (shader *GLShaderInstance) SetUniformMatrix3Fv(name string, count int, tran // Perform `glUniformMatrix3x2fv()` for @name on @shader func (shader *GLShaderInstance) SetUniformMatrix3X2Fv(name string, count int, transpose bool, value *float32) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted var carg3 C.gboolean // in var carg4 *C.gfloat // in, transfer: none, C Pointers: 1, Name: gfloat @@ -7600,7 +7600,7 @@ func (shader *GLShaderInstance) SetUniformMatrix3X2Fv(name string, count int, tr // Perform `glUniformMatrix3x4fv()` for @name on @shader func (shader *GLShaderInstance) SetUniformMatrix3X4Fv(name string, count int, transpose bool, value *float32) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted var carg3 C.gboolean // in var carg4 *C.gfloat // in, transfer: none, C Pointers: 1, Name: gfloat @@ -7636,7 +7636,7 @@ func (shader *GLShaderInstance) SetUniformMatrix3X4Fv(name string, count int, tr // Perform `glUniformMatrix4fv()` for @name on @shader func (shader *GLShaderInstance) SetUniformMatrix4Fv(name string, count int, transpose bool, value *float32) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted var carg3 C.gboolean // in var carg4 *C.gfloat // in, transfer: none, C Pointers: 1, Name: gfloat @@ -7672,7 +7672,7 @@ func (shader *GLShaderInstance) SetUniformMatrix4Fv(name string, count int, tran // Perform `glUniformMatrix4x2fv()` for @name on @shader func (shader *GLShaderInstance) SetUniformMatrix4X2Fv(name string, count int, transpose bool, value *float32) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted var carg3 C.gboolean // in var carg4 *C.gfloat // in, transfer: none, C Pointers: 1, Name: gfloat @@ -7708,7 +7708,7 @@ func (shader *GLShaderInstance) SetUniformMatrix4X2Fv(name string, count int, tr // Perform `glUniformMatrix4x3fv()` for @name on @shader func (shader *GLShaderInstance) SetUniformMatrix4X3Fv(name string, count int, transpose bool, value *float32) { var carg0 *C.GstGLShader // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted var carg3 C.gboolean // in var carg4 *C.gfloat // in, transfer: none, C Pointers: 1, Name: gfloat @@ -9523,6 +9523,44 @@ func UnsafeGLBaseMemoryToGlibFull(g *GLBaseMemory) unsafe.Pointer { g.native = nil // GLBaseMemory is invalid from here on return _p } +// GLBaseMemoryAlloc wraps gst_gl_base_memory_alloc +// +// The function takes the following parameters: +// +// - allocator GLBaseMemoryAllocator: a #GstGLBaseMemoryAllocator +// - params *GLAllocationParams: the #GstGLAllocationParams to allocate the memory with +// +// The function returns the following values: +// +// - goret *GLBaseMemory +func GLBaseMemoryAlloc(allocator GLBaseMemoryAllocator, params *GLAllocationParams) *GLBaseMemory { + var carg1 *C.GstGLBaseMemoryAllocator // in, none, converted + var carg2 *C.GstGLAllocationParams // in, none, converted + var cret *C.GstGLBaseMemory // return, full, converted + + carg1 = (*C.GstGLBaseMemoryAllocator)(UnsafeGLBaseMemoryAllocatorToGlibNone(allocator)) + carg2 = (*C.GstGLAllocationParams)(UnsafeGLAllocationParamsToGlibNone(params)) + + cret = C.gst_gl_base_memory_alloc(carg1, carg2) + runtime.KeepAlive(allocator) + runtime.KeepAlive(params) + + var goret *GLBaseMemory + + goret = UnsafeGLBaseMemoryFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// GLBaseMemoryInitOnce wraps gst_gl_base_memory_init_once +// +// Initializes the GL Base Memory allocator. It is safe to call this function +// multiple times. This must be called before any other GstGLBaseMemory operation. +func GLBaseMemoryInitOnce() { + + C.gst_gl_base_memory_init_once() +} + // AllocData wraps gst_gl_base_memory_alloc_data // The function returns the following values: // @@ -9906,6 +9944,15 @@ func UnsafeGLBufferToGlibFull(g *GLBuffer) unsafe.Pointer { g.native = nil // GLBuffer is invalid from here on return _p } +// GLBufferInitOnce wraps gst_gl_buffer_init_once +// +// Initializes the GL Buffer allocator. It is safe to call this function +// multiple times. This must be called before any other #GstGLBuffer operation. +func GLBufferInitOnce() { + + C.gst_gl_buffer_init_once() +} + // GLBufferAllocationParams wraps GstGLBufferAllocationParams type GLBufferAllocationParams struct { *glBufferAllocationParams @@ -10600,6 +10647,15 @@ func UnsafeGLMemoryToGlibFull(g *GLMemory) unsafe.Pointer { g.native = nil // GLMemory is invalid from here on return _p } +// GLMemoryInitOnce wraps gst_gl_memory_init_once +// +// Initializes the GL Base Texture allocator. It is safe to call this function +// multiple times. This must be called before any other GstGLMemory operation. +func GLMemoryInitOnce() { + + C.gst_gl_memory_init_once() +} + // CopyInto wraps gst_gl_memory_copy_into // // The function takes the following parameters: @@ -10935,6 +10991,12 @@ func UnsafeGLMemoryPBOToGlibFull(g *GLMemoryPBO) unsafe.Pointer { g.native = nil // GLMemoryPBO is invalid from here on return _p } +// GLMemoryPBOInitOnce wraps gst_gl_memory_pbo_init_once +func GLMemoryPBOInitOnce() { + + C.gst_gl_memory_pbo_init_once() +} + // CopyIntoTexture wraps gst_gl_memory_pbo_copy_into_texture // // The function takes the following parameters: @@ -11516,6 +11578,15 @@ func UnsafeGLRenderbufferToGlibFull(g *GLRenderbuffer) unsafe.Pointer { g.native = nil // GLRenderbuffer is invalid from here on return _p } +// GLRenderbufferInitOnce wraps gst_gl_renderbuffer_init_once +// +// Initializes the GL Base Texture allocator. It is safe to call this function +// multiple times. This must be called before any other GstGLRenderbuffer operation. +func GLRenderbufferInitOnce() { + + C.gst_gl_renderbuffer_init_once() +} + // GetFormat wraps gst_gl_renderbuffer_get_format // The function returns the following values: // @@ -11960,6 +12031,22 @@ func UnsafeGLSyncMetaToGlibFull(g *GLSyncMeta) unsafe.Pointer { g.native = nil // GLSyncMeta is invalid from here on return _p } +// GLSyncMetaGetInfo wraps gst_gl_sync_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +func GLSyncMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_gl_sync_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // SetSyncPoint wraps gst_gl_sync_meta_set_sync_point // // The function takes the following parameters: diff --git a/pkg/gstgl/gstgl_export.gen.go b/pkg/gstgl/gstgl_export.gen.go index dff9063..4391c59 100644 --- a/pkg/gstgl/gstgl_export.gen.go +++ b/pkg/gstgl/gstgl_export.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstGL-1. DO NOT EDIT. package gstgl @@ -22,7 +22,7 @@ func _gotk4_gstgl1_GLAsyncDebugLogGetMessage(carg1 C.gpointer) (cret *C.gchar) { fn = v.(GLAsyncDebugLogGetMessage) } - var goret string // return, full, string, casted *C.gchar + var goret string // return, full, string goret = fn() diff --git a/pkg/gstmpegts/gstmpegts.gen.go b/pkg/gstmpegts/gstmpegts.gen.go index 4b23f46..c776741 100644 --- a/pkg/gstmpegts/gstmpegts.gen.go +++ b/pkg/gstmpegts/gstmpegts.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstMpegts-1. DO NOT EDIT. package gstmpegts @@ -4074,7 +4074,7 @@ func UnsafeAtscStringSegmentToGlibFull(a *AtscStringSegment) unsafe.Pointer { // - goret string func (seg *AtscStringSegment) GetString() string { var carg0 *C.GstMpegtsAtscStringSegment // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstMpegtsAtscStringSegment)(UnsafeAtscStringSegmentToGlibNone(seg)) @@ -4101,7 +4101,7 @@ func (seg *AtscStringSegment) GetString() string { // - goret bool func (seg *AtscStringSegment) SetString(str string, compressionType uint8, mode uint8) bool { var carg0 *C.GstMpegtsAtscStringSegment // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint8 // in, none, casted var carg3 C.guint8 // in, none, casted var cret C.gboolean // return @@ -5324,6 +5324,284 @@ func UnsafeDescriptorToGlibFull(d *Descriptor) unsafe.Pointer { d.native = nil // Descriptor is invalid from here on return _p } +// DescriptorFromCustom wraps gst_mpegts_descriptor_from_custom +// +// The function takes the following parameters: +// +// - tag uint8: descriptor tag +// - data []uint8: descriptor data (after tag and length field) +// +// The function returns the following values: +// +// - goret *Descriptor +// +// 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 + + carg1 = C.guint8(tag) + _ = data + _ = carg2 + _ = carg3 + panic("unimplemented conversion of []uint8 (const guint8*)") + + cret = C.gst_mpegts_descriptor_from_custom(carg1, carg2, carg3) + runtime.KeepAlive(tag) + runtime.KeepAlive(data) + + var goret *Descriptor + + goret = UnsafeDescriptorFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// DescriptorFromCustomWithExtension wraps gst_mpegts_descriptor_from_custom_with_extension +// +// The function takes the following parameters: +// +// - tag uint8: descriptor tag +// - tagExtension uint8: descriptor tag extension +// - data []uint8: descriptor data (after tag and length field) +// +// The function returns the following values: +// +// - goret *Descriptor +// +// Creates a #GstMpegtsDescriptor with custom @tag, @tag_extension and @data +func DescriptorFromCustomWithExtension(tag uint8, tagExtension uint8, data []uint8) *Descriptor { + var carg1 C.guint8 // in, none, casted + var carg2 C.guint8 // in, none, casted + var carg3 *C.guint8 // in, transfer: none, C Pointers: 1, Name: array[guint8], array (inner: *typesystem.CastablePrimitive, length-by: carg4) + var carg4 C.gsize // implicit + var cret *C.GstMpegtsDescriptor // return, full, converted + + carg1 = C.guint8(tag) + carg2 = C.guint8(tagExtension) + _ = data + _ = carg3 + _ = carg4 + panic("unimplemented conversion of []uint8 (const guint8*)") + + cret = C.gst_mpegts_descriptor_from_custom_with_extension(carg1, carg2, carg3, carg4) + runtime.KeepAlive(tag) + runtime.KeepAlive(tagExtension) + runtime.KeepAlive(data) + + var goret *Descriptor + + goret = UnsafeDescriptorFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// DescriptorFromDvbNetworkName wraps gst_mpegts_descriptor_from_dvb_network_name +// +// The function takes the following parameters: +// +// - name string: the network name to set +// +// The function returns the following values: +// +// - goret *Descriptor +// +// 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 + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_mpegts_descriptor_from_dvb_network_name(carg1) + runtime.KeepAlive(name) + + var goret *Descriptor + + goret = UnsafeDescriptorFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// DescriptorFromDvbService wraps gst_mpegts_descriptor_from_dvb_service +// +// The function takes the following parameters: +// +// - serviceType DVBServiceType: Service type defined as a #GstMpegtsDVBServiceType +// - serviceName string (nullable): Name of the service +// - serviceProvider string (nullable): Name of the service provider +// +// The function returns the following values: +// +// - goret *Descriptor +// +// Fills a #GstMpegtsDescriptor to be a %GST_MTS_DESC_DVB_SERVICE. +// The data field of the #GstMpegtsDescriptor will be allocated, +// and transferred to the caller. +func DescriptorFromDvbService(serviceType DVBServiceType, serviceName string, serviceProvider string) *Descriptor { + 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 + + carg1 = C.GstMpegtsDVBServiceType(serviceType) + if serviceName != "" { + carg2 = (*C.gchar)(unsafe.Pointer(C.CString(serviceName))) + defer C.free(unsafe.Pointer(carg2)) + } + if serviceProvider != "" { + carg3 = (*C.gchar)(unsafe.Pointer(C.CString(serviceProvider))) + defer C.free(unsafe.Pointer(carg3)) + } + + cret = C.gst_mpegts_descriptor_from_dvb_service(carg1, carg2, carg3) + runtime.KeepAlive(serviceType) + runtime.KeepAlive(serviceName) + runtime.KeepAlive(serviceProvider) + + var goret *Descriptor + + goret = UnsafeDescriptorFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// DescriptorFromDvbSubtitling wraps gst_mpegts_descriptor_from_dvb_subtitling +// +// The function takes the following parameters: +// +// - lang string: a string containing the ISO639 language +// - typ uint8: subtitling type +// - composition uint16: composition page id +// - ancillary uint16: ancillary page id +// +// The function returns the following values: +// +// - goret *Descriptor +func DescriptorFromDvbSubtitling(lang string, typ uint8, composition uint16, ancillary uint16) *Descriptor { + var carg1 *C.gchar // in, none, string + var carg2 C.guint8 // in, none, casted + var carg3 C.guint16 // in, none, casted + var carg4 C.guint16 // in, none, casted + var cret *C.GstMpegtsDescriptor // return, full, converted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(lang))) + defer C.free(unsafe.Pointer(carg1)) + carg2 = C.guint8(typ) + carg3 = C.guint16(composition) + carg4 = C.guint16(ancillary) + + cret = C.gst_mpegts_descriptor_from_dvb_subtitling(carg1, carg2, carg3, carg4) + runtime.KeepAlive(lang) + runtime.KeepAlive(typ) + runtime.KeepAlive(composition) + runtime.KeepAlive(ancillary) + + var goret *Descriptor + + goret = UnsafeDescriptorFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// DescriptorFromISO639Language wraps gst_mpegts_descriptor_from_iso_639_language +// +// The function takes the following parameters: +// +// - language string: ISO-639-2 language 3-char code +// +// The function returns the following values: +// +// - goret *Descriptor +// +// Creates a %GST_MTS_DESC_ISO_639_LANGUAGE #GstMpegtsDescriptor with +// a single language +func DescriptorFromISO639Language(language string) *Descriptor { + var carg1 *C.gchar // in, none, string + var cret *C.GstMpegtsDescriptor // return, full, converted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(language))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_mpegts_descriptor_from_iso_639_language(carg1) + runtime.KeepAlive(language) + + var goret *Descriptor + + goret = UnsafeDescriptorFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// DescriptorFromRegistration wraps gst_mpegts_descriptor_from_registration +// +// The function takes the following parameters: +// +// - formatIdentifier string: a 4 character format identifier string +// - additionalInfo []uint8 (nullable): pointer to optional additional info +// +// The function returns the following values: +// +// - goret *Descriptor +// +// Creates a %GST_MTS_DESC_REGISTRATION #GstMpegtsDescriptor +func DescriptorFromRegistration(formatIdentifier string, additionalInfo []uint8) *Descriptor { + var carg1 *C.gchar // in, none, string + var carg2 *C.guint8 // in, transfer: none, C Pointers: 1, Name: array[guint8], nullable, array (inner: *typesystem.CastablePrimitive, length-by: carg3) + var carg3 C.gsize // implicit + var cret *C.GstMpegtsDescriptor // return, full, converted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(formatIdentifier))) + defer C.free(unsafe.Pointer(carg1)) + _ = additionalInfo + _ = carg2 + _ = carg3 + panic("unimplemented conversion of []uint8 (guint8*)") + + cret = C.gst_mpegts_descriptor_from_registration(carg1, carg2, carg3) + runtime.KeepAlive(formatIdentifier) + runtime.KeepAlive(additionalInfo) + + var goret *Descriptor + + goret = UnsafeDescriptorFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// DescriptorParseAudioPreselectionDump wraps gst_mpegts_descriptor_parse_audio_preselection_dump +// +// The function takes the following parameters: +// +// - source *AudioPreselectionDescriptor +func DescriptorParseAudioPreselectionDump(source *AudioPreselectionDescriptor) { + var carg1 *C.GstMpegtsAudioPreselectionDescriptor // in, none, converted + + carg1 = (*C.GstMpegtsAudioPreselectionDescriptor)(UnsafeAudioPreselectionDescriptorToGlibNone(source)) + + C.gst_mpegts_descriptor_parse_audio_preselection_dump(carg1) + runtime.KeepAlive(source) +} + +// DescriptorParseAudioPreselectionFree wraps gst_mpegts_descriptor_parse_audio_preselection_free +// +// The function takes the following parameters: +// +// - source *AudioPreselectionDescriptor +func DescriptorParseAudioPreselectionFree(source *AudioPreselectionDescriptor) { + var carg1 *C.GstMpegtsAudioPreselectionDescriptor // in, none, converted + + carg1 = (*C.GstMpegtsAudioPreselectionDescriptor)(UnsafeAudioPreselectionDescriptorToGlibNone(source)) + + C.gst_mpegts_descriptor_parse_audio_preselection_free(carg1) + runtime.KeepAlive(source) +} + // ParseCableDeliverySystem wraps gst_mpegts_descriptor_parse_cable_delivery_system // The function returns the following values: // @@ -5363,7 +5641,7 @@ func (descriptor *Descriptor) ParseCableDeliverySystem() (CableDeliverySystemDes // Extracts the bouquet name from @descriptor. func (descriptor *Descriptor) ParseDvbBouquetName() (string, bool) { var carg0 *C.GstMpegtsDescriptor // in, none, converted - var carg1 *C.gchar // out, full, string, casted *C.gchar + var carg1 *C.gchar // out, full, string var cret C.gboolean // return carg0 = (*C.GstMpegtsDescriptor)(UnsafeDescriptorToGlibNone(descriptor)) @@ -5504,7 +5782,7 @@ func (descriptor *Descriptor) ParseDvbLinkage() (*DVBLinkageDescriptor, bool) { // Parses out the dvb network name from the @descriptor: func (descriptor *Descriptor) ParseDvbNetworkName() (string, bool) { var carg0 *C.GstMpegtsDescriptor // in, none, converted - var carg1 *C.gchar // out, full, string, casted *C.gchar + var carg1 *C.gchar // out, full, string var cret C.gboolean // return carg0 = (*C.GstMpegtsDescriptor)(UnsafeDescriptorToGlibNone(descriptor)) @@ -5568,8 +5846,8 @@ func (descriptor *Descriptor) ParseDvbScrambling() (DVBScramblingModeType, bool) func (descriptor *Descriptor) ParseDvbService() (DVBServiceType, string, string, bool) { var carg0 *C.GstMpegtsDescriptor // in, none, converted var carg1 C.GstMpegtsDVBServiceType // out, full, casted - var carg2 *C.gchar // out, full, string, casted *C.gchar - var carg3 *C.gchar // out, full, string, casted *C.gchar + var carg2 *C.gchar // out, full, string + var carg3 *C.gchar // out, full, string var cret C.gboolean // return carg0 = (*C.GstMpegtsDescriptor)(UnsafeDescriptorToGlibNone(descriptor)) @@ -5605,9 +5883,9 @@ func (descriptor *Descriptor) ParseDvbService() (DVBServiceType, string, string, // Extracts the DVB short event information from @descriptor. func (descriptor *Descriptor) ParseDvbShortEvent() (string, string, string, bool) { var carg0 *C.GstMpegtsDescriptor // in, none, converted - var carg1 *C.gchar // out, full, string, casted *C.gchar - var carg2 *C.gchar // out, full, string, casted *C.gchar - var carg3 *C.gchar // out, full, string, casted *C.gchar + var carg1 *C.gchar // out, full, string + var carg2 *C.gchar // out, full, string + var carg3 *C.gchar // out, full, string var cret C.gboolean // return carg0 = (*C.GstMpegtsDescriptor)(UnsafeDescriptorToGlibNone(descriptor)) @@ -5712,7 +5990,7 @@ func (descriptor *Descriptor) ParseDvbStuffing() (*uint8, bool) { func (descriptor *Descriptor) ParseDvbSubtitlingIdx(idx uint) (string, uint8, uint16, uint16, bool) { var carg0 *C.GstMpegtsDescriptor // in, none, converted var carg1 C.guint // in, none, casted - var carg2 *C.gchar // out, full, string, casted *C.gchar + var carg2 *C.gchar // out, full, string var carg3 C.guint8 // out, none, casted var carg4 C.guint16 // out, none, casted var carg5 C.guint16 // out, none, casted @@ -5809,7 +6087,7 @@ func (descriptor *Descriptor) ParseDvbT2DeliverySystem() (*T2DeliverySystemDescr func (descriptor *Descriptor) ParseDvbTeletextIdx(idx uint) (string, DVBTeletextType, uint8, uint8, bool) { var carg0 *C.GstMpegtsDescriptor // in, none, converted var carg1 C.guint // in, none, casted - var carg2 *C.gchar // out, full, string, casted *C.gchar + var carg2 *C.gchar // out, full, string var carg3 C.GstMpegtsDVBTeletextType // out, full, casted var carg4 C.guint8 // out, full, casted var carg5 C.guint8 // out, full, casted @@ -5912,7 +6190,7 @@ func (descriptor *Descriptor) ParseISO639Language() (*ISO639LanguageDescriptor, func (descriptor *Descriptor) ParseISO639LanguageIdx(idx uint) (string, ISO639AudioType, bool) { var carg0 *C.GstMpegtsDescriptor // in, none, converted var carg1 C.guint // in, none, casted - var carg2 *C.gchar // out, full, string, casted *C.gchar + var carg2 *C.gchar // out, full, string var carg3 C.GstMpegtsIso639AudioType // out, none, casted var cret C.gboolean // return @@ -7268,6 +7546,24 @@ func UnsafePESMetadataMetaToGlibFull(p *PESMetadataMeta) unsafe.Pointer { p.native = nil // PESMetadataMeta is invalid from here on return _p } +// PESMetadataMetaGetInfo wraps gst_mpegts_pes_metadata_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +// +// Gets the global #GstMetaInfo describing the #GstMpegtsPESMetadataMeta meta. +func PESMetadataMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_mpegts_pes_metadata_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // PMT wraps GstMpegtsPMT // // Program Map Table (ISO/IEC 13818-1). Provides the mappings between program @@ -8395,6 +8691,197 @@ func NewSection(pid uint16, data []uint8) *Section { return goret } +// SectionFromAtscMgt wraps gst_mpegts_section_from_atsc_mgt +// +// The function takes the following parameters: +// +// - mgt *AtscMGT: a #GstMpegtsAtscMGT to create the #GstMpegtsSection from +// +// The function returns the following values: +// +// - goret *Section +func SectionFromAtscMgt(mgt *AtscMGT) *Section { + var carg1 *C.GstMpegtsAtscMGT // in, full, converted + var cret *C.GstMpegtsSection // return, full, converted + + carg1 = (*C.GstMpegtsAtscMGT)(UnsafeAtscMGTToGlibFull(mgt)) + + cret = C.gst_mpegts_section_from_atsc_mgt(carg1) + runtime.KeepAlive(mgt) + + var goret *Section + + goret = UnsafeSectionFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// SectionFromAtscRrt wraps gst_mpegts_section_from_atsc_rrt +// +// The function takes the following parameters: +// +// - rrt *AtscRRT +// +// The function returns the following values: +// +// - goret *Section +func SectionFromAtscRrt(rrt *AtscRRT) *Section { + var carg1 *C.GstMpegtsAtscRRT // in, none, converted + var cret *C.GstMpegtsSection // return, full, converted + + carg1 = (*C.GstMpegtsAtscRRT)(UnsafeAtscRRTToGlibNone(rrt)) + + cret = C.gst_mpegts_section_from_atsc_rrt(carg1) + runtime.KeepAlive(rrt) + + var goret *Section + + goret = UnsafeSectionFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// SectionFromAtscStt wraps gst_mpegts_section_from_atsc_stt +// +// The function takes the following parameters: +// +// - stt *AtscSTT +// +// The function returns the following values: +// +// - goret *Section +func SectionFromAtscStt(stt *AtscSTT) *Section { + var carg1 *C.GstMpegtsAtscSTT // in, none, converted + var cret *C.GstMpegtsSection // return, full, converted + + carg1 = (*C.GstMpegtsAtscSTT)(UnsafeAtscSTTToGlibNone(stt)) + + cret = C.gst_mpegts_section_from_atsc_stt(carg1) + runtime.KeepAlive(stt) + + var goret *Section + + goret = UnsafeSectionFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// SectionFromNit wraps gst_mpegts_section_from_nit +// +// The function takes the following parameters: +// +// - nit *NIT: a #GstMpegtsNIT to create the #GstMpegtsSection from +// +// The function returns the following values: +// +// - goret *Section +// +// 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 + + carg1 = (*C.GstMpegtsNIT)(UnsafeNITToGlibFull(nit)) + + cret = C.gst_mpegts_section_from_nit(carg1) + runtime.KeepAlive(nit) + + var goret *Section + + goret = UnsafeSectionFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// SectionFromPmt wraps gst_mpegts_section_from_pmt +// +// The function takes the following parameters: +// +// - pmt *PMT: a #GstMpegtsPMT to create a #GstMpegtsSection from +// - pid uint16: The PID that the #GstMpegtsPMT belongs to +// +// The function returns the following values: +// +// - goret *Section +// +// 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 + + carg1 = (*C.GstMpegtsPMT)(UnsafePMTToGlibFull(pmt)) + carg2 = C.guint16(pid) + + cret = C.gst_mpegts_section_from_pmt(carg1, carg2) + runtime.KeepAlive(pmt) + runtime.KeepAlive(pid) + + var goret *Section + + goret = UnsafeSectionFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// SectionFromScteSit wraps gst_mpegts_section_from_scte_sit +// +// The function takes the following parameters: +// +// - sit *SCTESIT: a #GstMpegtsSCTESIT to create the #GstMpegtsSection from +// - pid uint16 +// +// The function returns the following values: +// +// - goret *Section +// +// 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 + + carg1 = (*C.GstMpegtsSCTESIT)(UnsafeSCTESITToGlibFull(sit)) + carg2 = C.guint16(pid) + + cret = C.gst_mpegts_section_from_scte_sit(carg1, carg2) + runtime.KeepAlive(sit) + runtime.KeepAlive(pid) + + var goret *Section + + goret = UnsafeSectionFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// SectionFromSdt wraps gst_mpegts_section_from_sdt +// +// The function takes the following parameters: +// +// - sdt *SDT: a #GstMpegtsSDT to create the #GstMpegtsSection from +// +// The function returns the following values: +// +// - goret *Section +// +// 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 + + carg1 = (*C.GstMpegtsSDT)(UnsafeSDTToGlibFull(sdt)) + + cret = C.gst_mpegts_section_from_sdt(carg1) + runtime.KeepAlive(sdt) + + var goret *Section + + goret = UnsafeSectionFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + // GetAtscCvct wraps gst_mpegts_section_get_atsc_cvct // The function returns the following values: // diff --git a/pkg/gstnet/gstnet.gen.go b/pkg/gstnet/gstnet.gen.go index bb97c2e..ed68ae2 100644 --- a/pkg/gstnet/gstnet.gen.go +++ b/pkg/gstnet/gstnet.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstNet-1. DO NOT EDIT. package gstnet @@ -525,7 +525,7 @@ func UnsafeNetClientClockToGlibFull(c NetClientClock) unsafe.Pointer { // @remote_port. func NewNetClientClock(name string, remoteAddress string, remotePort int, baseTime gst.ClockTime) gst.Clock { var carg1 *C.gchar // in, none, string, nullable-string - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var carg3 C.gint // in, none, casted var carg4 C.GstClockTime // in, none, casted, alias var cret *C.GstClock // return, full, converted @@ -734,7 +734,7 @@ func UnsafeNtpClockToGlibFull(c NtpClock) unsafe.Pointer { // the NTPv4 server on @remote_address and @remote_port. func NewNtpClock(name string, remoteAddress string, remotePort int, baseTime gst.ClockTime) gst.Clock { var carg1 *C.gchar // in, none, string, nullable-string - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var carg3 C.gint // in, none, casted var carg4 C.GstClockTime // in, none, casted, alias var cret *C.GstClock // return, full, converted @@ -862,7 +862,7 @@ 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, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // in, none, casted var cret *C.GstClock // return, full, converted @@ -945,6 +945,22 @@ func UnsafeNetAddressMetaToGlibFull(n *NetAddressMeta) unsafe.Pointer { n.native = nil // NetAddressMeta is invalid from here on return _p } +// NetAddressMetaGetInfo wraps gst_net_address_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +func NetAddressMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_net_address_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // NetClientClockClass wraps GstNetClientClockClass type NetClientClockClass struct { *netClientClockClass @@ -1071,6 +1087,22 @@ func UnsafeNetControlMessageMetaToGlibFull(n *NetControlMessageMeta) unsafe.Poin n.native = nil // NetControlMessageMeta is invalid from here on return _p } +// NetControlMessageMetaGetInfo wraps gst_net_control_message_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +func NetControlMessageMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_net_control_message_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // NetTimePacket wraps GstNetTimePacket // // Various functions for receiving, sending an serializing #GstNetTimePacket @@ -1182,6 +1214,44 @@ func NewNetTimePacket(buffer [16]uint8) *NetTimePacket { return goret } +// NetTimePacketReceive wraps gst_net_time_packet_receive +// +// The function takes the following parameters: +// +// - socket gio.Socket: socket to receive the time packet on +// +// The function returns the following values: +// +// - srcAddress gio.SocketAddress: address of variable to return sender address +// - goret *NetTimePacket +// - _goerr error (nullable): an error +// +// Receives a #GstNetTimePacket over a socket. Handles interrupted system +// calls, but otherwise returns NULL on error. +func NetTimePacketReceive(socket gio.Socket) (gio.SocketAddress, *NetTimePacket, error) { + var carg1 *C.GSocket // in, none, converted + var carg2 *C.GSocketAddress // out, full, converted + var cret *C.GstNetTimePacket // return, full, converted + var _cerr *C.GError // out, full, converted, nullable + + carg1 = (*C.GSocket)(gio.UnsafeSocketToGlibNone(socket)) + + cret = C.gst_net_time_packet_receive(carg1, &carg2, &_cerr) + runtime.KeepAlive(socket) + + var srcAddress gio.SocketAddress + var goret *NetTimePacket + var _goerr error + + srcAddress = gio.UnsafeSocketAddressFromGlibFull(unsafe.Pointer(carg2)) + goret = UnsafeNetTimePacketFromGlibFull(unsafe.Pointer(cret)) + if _cerr != nil { + _goerr = glib.UnsafeErrorFromGlibFull(unsafe.Pointer(_cerr)) + } + + return srcAddress, goret, _goerr +} + // Copy wraps gst_net_time_packet_copy // The function returns the following values: // diff --git a/pkg/gstnet/gstnet_export.gen.go b/pkg/gstnet/gstnet_export.gen.go index 569d548..8d6a6f8 100644 --- a/pkg/gstnet/gstnet_export.gen.go +++ b/pkg/gstnet/gstnet_export.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstNet-1. DO NOT EDIT. package gstnet diff --git a/pkg/gstpbutils/gstpbutils.gen.go b/pkg/gstpbutils/gstpbutils.gen.go index a89fb13..daaef6c 100644 --- a/pkg/gstpbutils/gstpbutils.gen.go +++ b/pkg/gstpbutils/gstpbutils.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstPbutils-1. DO NOT EDIT. package gstpbutils @@ -615,7 +615,7 @@ func CodecUtilsAacGetIndexFromSampleRate(rate uint) int { func CodecUtilsAacGetLevel(audioConfig []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, casted *C.gchar + var cret *C.gchar // return, none, string _ = audioConfig _ = carg1 @@ -650,7 +650,7 @@ func CodecUtilsAacGetLevel(audioConfig []uint8) string { func CodecUtilsAacGetProfile(audioConfig []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, casted *C.gchar + var cret *C.gchar // return, none, string _ = audioConfig _ = carg1 @@ -745,7 +745,7 @@ func CodecUtilsAacGetSampleRateFromIndex(srIdx uint) uint { // // Registered codecs can be found at http://mp4ra.org/#/codecs func CodecUtilsCapsFromMIMECodec(codecsField string) *gst.Caps { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstCaps // return, full, converted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(codecsField))) @@ -779,7 +779,7 @@ func CodecUtilsCapsFromMIMECodec(codecsField string) *gst.Caps { // Registered codecs can be found at http://mp4ra.org/#/codecs func CodecUtilsCapsGetMIMECodec(caps *gst.Caps) string { var carg1 *C.GstCaps // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(caps)) @@ -849,7 +849,7 @@ func CodecUtilsH264CapsSetLevelAndProfile(caps *gst.Caps, sps []uint8) bool { func CodecUtilsH264GetLevel(sps []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, casted *C.gchar + var cret *C.gchar // return, none, string _ = sps _ = carg1 @@ -878,7 +878,7 @@ func CodecUtilsH264GetLevel(sps []uint8) string { // // Transform a level string from the caps into the level_idc func CodecUtilsH264GetLevelIdc(level string) uint8 { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.guint8 // return, none, casted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(level))) @@ -921,7 +921,7 @@ func CodecUtilsH264GetLevelIdc(level string) uint8 { func CodecUtilsH264GetProfile(sps []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, casted *C.gchar + var cret *C.gchar // return, none, string _ = sps _ = carg1 @@ -1047,7 +1047,7 @@ func CodecUtilsH265CapsSetLevelTierAndProfile(caps *gst.Caps, profileTierLevel [ func CodecUtilsH265GetLevel(profileTierLevel []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, casted *C.gchar + var cret *C.gchar // return, none, string _ = profileTierLevel _ = carg1 @@ -1076,7 +1076,7 @@ func CodecUtilsH265GetLevel(profileTierLevel []uint8) string { // // Transform a level string from the caps into the level_idc func CodecUtilsH265GetLevelIdc(level string) uint8 { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.guint8 // return, none, casted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(level))) @@ -1122,7 +1122,7 @@ func CodecUtilsH265GetLevelIdc(level string) uint8 { func CodecUtilsH265GetProfile(profileTierLevel []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, casted *C.gchar + var cret *C.gchar // return, none, string _ = profileTierLevel _ = carg1 @@ -1156,7 +1156,7 @@ func CodecUtilsH265GetProfile(profileTierLevel []uint8) string { func CodecUtilsH265GetTier(profileTierLevel []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, casted *C.gchar + var cret *C.gchar // return, none, string _ = profileTierLevel _ = carg1 @@ -1232,7 +1232,7 @@ func CodecUtilsMpeg4VideoCapsSetLevelAndProfile(caps *gst.Caps, visObjSeq []uint func CodecUtilsMpeg4VideoGetLevel(visObjSeq []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, casted *C.gchar + var cret *C.gchar // return, none, string _ = visObjSeq _ = carg1 @@ -1267,7 +1267,7 @@ func CodecUtilsMpeg4VideoGetLevel(visObjSeq []uint8) string { func CodecUtilsMpeg4VideoGetProfile(visObjSeq []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, casted *C.gchar + var cret *C.gchar // return, none, string _ = visObjSeq _ = carg1 @@ -1318,6 +1318,71 @@ func CodecUtilsOpusCreateCapsFromHeader(header *gst.Buffer, comments *gst.Buffer return goret } +// EncodingListAllTargets wraps gst_encoding_list_all_targets +// +// The function takes the following parameters: +// +// - categoryname string (nullable): The category, for ex: #GST_ENCODING_CATEGORY_DEVICE. +// Can be %NULL. +// +// The function returns the following values: +// +// - goret []EncodingTarget +// +// List all available #GstEncodingTarget for the specified category, or all categories +// if @categoryname is %NULL. +func EncodingListAllTargets(categoryname string) []EncodingTarget { + var carg1 *C.gchar // in, none, string, nullable-string + var cret *C.GList // container, transfer: full + + if categoryname != "" { + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(categoryname))) + defer C.free(unsafe.Pointer(carg1)) + } + + cret = C.gst_encoding_list_all_targets(carg1) + runtime.KeepAlive(categoryname) + + var goret []EncodingTarget + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) EncodingTarget { + var dst EncodingTarget // converted + dst = UnsafeEncodingTargetFromGlibFull(v) + return dst + }, + ) + + return goret +} + +// EncodingListAvailableCategories wraps gst_encoding_list_available_categories +// The function returns the following values: +// +// - goret []string +// +// Lists all #GstEncodingTarget categories present on disk. +func EncodingListAvailableCategories() []string { + var cret *C.GList // container, transfer: full + + cret = C.gst_encoding_list_available_categories() + + var goret []string + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) string { + var dst string // string + dst = C.GoString((*C.char)(v)) + defer C.free(v) + return dst + }, + ) + + return goret +} + // InstallPluginsAsync wraps gst_install_plugins_async // // The function takes the following parameters: @@ -1511,7 +1576,7 @@ func IsMissingPluginMessage(msg *gst.Message) bool { // missing. func NewMissingDecoderInstallerDetail(decodeCaps *gst.Caps) string { var carg1 *C.GstCaps // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(decodeCaps)) @@ -1579,8 +1644,8 @@ func NewMissingDecoderMessage(element gst.Element, decodeCaps *gst.Caps) *gst.Me // the case where the application knows exactly what kind of plugin it is // missing. func NewMissingElementInstallerDetail(factoryName string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, full, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, full, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(factoryName))) defer C.free(unsafe.Pointer(carg1)) @@ -1613,7 +1678,7 @@ func NewMissingElementInstallerDetail(factoryName string) string { // use in plugins. func NewMissingElementMessage(element gst.Element, factoryName string) *gst.Message { var carg1 *C.GstElement // in, none, converted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var cret *C.GstMessage // return, full, converted carg1 = (*C.GstElement)(gst.UnsafeElementToGlibNone(element)) @@ -1651,7 +1716,7 @@ func NewMissingElementMessage(element gst.Element, factoryName string) *gst.Mess // missing. func NewMissingEncoderInstallerDetail(encodeCaps *gst.Caps) string { var carg1 *C.GstCaps // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(encodeCaps)) @@ -1718,7 +1783,7 @@ func NewMissingEncoderMessage(element gst.Element, encodeCaps *gst.Caps) *gst.Me // message func MissingPluginMessageGetDescription(msg *gst.Message) string { var carg1 *C.GstMessage // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) @@ -1751,7 +1816,7 @@ func MissingPluginMessageGetDescription(msg *gst.Message) string { // installation mechanisms using one of the two above-mentioned functions. func MissingPluginMessageGetInstallerDetail(msg *gst.Message) string { var carg1 *C.GstMessage // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) @@ -1786,8 +1851,8 @@ func MissingPluginMessageGetInstallerDetail(msg *gst.Message) string { // the case where the application knows exactly what kind of plugin it is // missing. func NewMissingURISinkInstallerDetail(protocol string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, full, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, full, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(protocol))) defer C.free(unsafe.Pointer(carg1)) @@ -1820,7 +1885,7 @@ func NewMissingURISinkInstallerDetail(protocol string) string { // function is mainly for use in plugins. func NewMissingURISinkMessage(element gst.Element, protocol string) *gst.Message { var carg1 *C.GstElement // in, none, converted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var cret *C.GstMessage // return, full, converted carg1 = (*C.GstElement)(gst.UnsafeElementToGlibNone(element)) @@ -1858,8 +1923,8 @@ func NewMissingURISinkMessage(element gst.Element, protocol string) *gst.Message // the case where the application knows exactly what kind of plugin it is // missing. func NewMissingURISourceInstallerDetail(protocol string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, full, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, full, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(protocol))) defer C.free(unsafe.Pointer(carg1)) @@ -1892,7 +1957,7 @@ func NewMissingURISourceInstallerDetail(protocol string) string { // function is mainly for use in plugins. func NewMissingURISourceMessage(element gst.Element, protocol string) *gst.Message { var carg1 *C.GstElement // in, none, converted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var cret *C.GstMessage // return, full, converted carg1 = (*C.GstElement)(gst.UnsafeElementToGlibNone(element)) @@ -1998,7 +2063,7 @@ func PbUtilsGetCapsDescriptionFlags(caps *gst.Caps) PbUtilsCapsDescriptionFlags // gst_pb_utils_add_codec_description_to_tag_list(). func PbUtilsGetCodecDescription(caps *gst.Caps) string { var carg1 *C.GstCaps // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(caps)) @@ -2031,7 +2096,7 @@ func PbUtilsGetCodecDescription(caps *gst.Caps) string { // a missing feature from a missing-plugin message. func PbUtilsGetDecoderDescription(caps *gst.Caps) string { var carg1 *C.GstCaps // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(caps)) @@ -2063,8 +2128,8 @@ func PbUtilsGetDecoderDescription(caps *gst.Caps) string { // use gst_missing_plugin_message_get_description() to get a description of // a missing feature from a missing-plugin message. func PbUtilsGetElementDescription(factoryName string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, full, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, full, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(factoryName))) defer C.free(unsafe.Pointer(carg1)) @@ -2098,7 +2163,7 @@ func PbUtilsGetElementDescription(factoryName string) string { // a missing feature from a missing-plugin message. func PbUtilsGetEncoderDescription(caps *gst.Caps) string { var carg1 *C.GstCaps // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(caps)) @@ -2126,7 +2191,7 @@ func PbUtilsGetEncoderDescription(caps *gst.Caps) string { // Returns a possible file extension for the given caps, if known. func PbUtilsGetFileExtensionFromCaps(caps *gst.Caps) string { var carg1 *C.GstCaps // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(caps)) @@ -2159,8 +2224,8 @@ func PbUtilsGetFileExtensionFromCaps(caps *gst.Caps) string { // use gst_missing_plugin_message_get_description() to get a description of // a missing feature from a missing-plugin message. func PbUtilsGetSinkDescription(protocol string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, full, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, full, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(protocol))) defer C.free(unsafe.Pointer(carg1)) @@ -2194,8 +2259,8 @@ func PbUtilsGetSinkDescription(protocol string) string { // use gst_missing_plugin_message_get_description() to get a description of // a missing feature from a missing-plugin message. func PbUtilsGetSourceDescription(protocol string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, full, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, full, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(protocol))) defer C.free(unsafe.Pointer(carg1)) @@ -2263,7 +2328,7 @@ func PluginsBaseVersion() (uint, uint, uint, uint) { // of GStreamer's gst-plugins-base libraries to the outside world: user agent // strings, logging, about dialogs ... func PluginsBaseVersionString() string { - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string cret = C.gst_plugins_base_version_string() @@ -2530,7 +2595,7 @@ func NewDiscoverer(timeout gst.ClockTime) (Discoverer, error) { // afterwards. func (discoverer *DiscovererInstance) DiscoverURI(uri string) (DiscovererInfo, error) { var carg0 *C.GstDiscoverer // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstDiscovererInfo // return, full, converted var _cerr *C.GError // out, full, converted, nullable @@ -2571,7 +2636,7 @@ func (discoverer *DiscovererInstance) DiscoverURI(uri string) (DiscovererInfo, e // afterwards. func (discoverer *DiscovererInstance) DiscoverURIAsync(uri string) bool { var carg0 *C.GstDiscoverer // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstDiscoverer)(UnsafeDiscovererToGlibNone(discoverer)) @@ -2680,6 +2745,20 @@ type DiscovererInfo interface { // // - goret DiscovererInfo Copy() DiscovererInfo + // GetAudioStreams wraps gst_discoverer_info_get_audio_streams + // The function returns the following values: + // + // - goret []DiscovererAudioInfo + // + // Finds all the #GstDiscovererAudioInfo contained in @info + GetAudioStreams() []DiscovererAudioInfo + // GetContainerStreams wraps gst_discoverer_info_get_container_streams + // The function returns the following values: + // + // - goret []DiscovererContainerInfo + // + // Finds all the #GstDiscovererContainerInfo contained in @info + GetContainerStreams() []DiscovererContainerInfo // GetDuration wraps gst_discoverer_info_get_duration // The function returns the following values: // @@ -2721,6 +2800,31 @@ type DiscovererInfo interface { // // - goret DiscovererStreamInfo GetStreamInfo() DiscovererStreamInfo + // GetStreamList wraps gst_discoverer_info_get_stream_list + // The function returns the following values: + // + // - goret []DiscovererStreamInfo + GetStreamList() []DiscovererStreamInfo + // GetStreams wraps gst_discoverer_info_get_streams + // + // The function takes the following parameters: + // + // - streamtype gobject.Type: a #GType derived from #GstDiscovererStreamInfo + // + // The function returns the following values: + // + // - goret []DiscovererStreamInfo + // + // Finds the #GstDiscovererStreamInfo contained in @info that match the + // given @streamtype. + GetStreams(gobject.Type) []DiscovererStreamInfo + // GetSubtitleStreams wraps gst_discoverer_info_get_subtitle_streams + // The function returns the following values: + // + // - goret []DiscovererSubtitleInfo + // + // Finds all the #GstDiscovererSubtitleInfo contained in @info + GetSubtitleStreams() []DiscovererSubtitleInfo // GetTags wraps gst_discoverer_info_get_tags // The function returns the following values: // @@ -2739,6 +2843,13 @@ type DiscovererInfo interface { // // - goret string GetURI() string + // GetVideoStreams wraps gst_discoverer_info_get_video_streams + // The function returns the following values: + // + // - goret []DiscovererVideoInfo + // + // Finds all the #GstDiscovererVideoInfo contained in @info + GetVideoStreams() []DiscovererVideoInfo } func unsafeWrapDiscovererInfo(base *gobject.ObjectInstance) *DiscovererInfoInstance { @@ -2795,6 +2906,64 @@ func (ptr *DiscovererInfoInstance) Copy() DiscovererInfo { return goret } +// GetAudioStreams wraps gst_discoverer_info_get_audio_streams +// The function returns the following values: +// +// - goret []DiscovererAudioInfo +// +// Finds all the #GstDiscovererAudioInfo contained in @info +func (info *DiscovererInfoInstance) GetAudioStreams() []DiscovererAudioInfo { + var carg0 *C.GstDiscovererInfo // in, none, converted + var cret *C.GList // container, transfer: full + + carg0 = (*C.GstDiscovererInfo)(UnsafeDiscovererInfoToGlibNone(info)) + + cret = C.gst_discoverer_info_get_audio_streams(carg0) + runtime.KeepAlive(info) + + var goret []DiscovererAudioInfo + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) DiscovererAudioInfo { + var dst DiscovererAudioInfo // converted + dst = UnsafeDiscovererAudioInfoFromGlibFull(v) + return dst + }, + ) + + return goret +} + +// GetContainerStreams wraps gst_discoverer_info_get_container_streams +// The function returns the following values: +// +// - goret []DiscovererContainerInfo +// +// Finds all the #GstDiscovererContainerInfo contained in @info +func (info *DiscovererInfoInstance) GetContainerStreams() []DiscovererContainerInfo { + var carg0 *C.GstDiscovererInfo // in, none, converted + var cret *C.GList // container, transfer: full + + carg0 = (*C.GstDiscovererInfo)(UnsafeDiscovererInfoToGlibNone(info)) + + cret = C.gst_discoverer_info_get_container_streams(carg0) + runtime.KeepAlive(info) + + var goret []DiscovererContainerInfo + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) DiscovererContainerInfo { + var dst DiscovererContainerInfo // converted + dst = UnsafeDiscovererContainerInfoFromGlibFull(v) + return dst + }, + ) + + return goret +} + // GetDuration wraps gst_discoverer_info_get_duration // The function returns the following values: // @@ -2947,6 +3116,100 @@ func (info *DiscovererInfoInstance) GetStreamInfo() DiscovererStreamInfo { return goret } +// GetStreamList wraps gst_discoverer_info_get_stream_list +// The function returns the following values: +// +// - goret []DiscovererStreamInfo +func (info *DiscovererInfoInstance) GetStreamList() []DiscovererStreamInfo { + var carg0 *C.GstDiscovererInfo // in, none, converted + var cret *C.GList // container, transfer: full + + carg0 = (*C.GstDiscovererInfo)(UnsafeDiscovererInfoToGlibNone(info)) + + cret = C.gst_discoverer_info_get_stream_list(carg0) + runtime.KeepAlive(info) + + var goret []DiscovererStreamInfo + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) DiscovererStreamInfo { + var dst DiscovererStreamInfo // converted + dst = UnsafeDiscovererStreamInfoFromGlibFull(v) + return dst + }, + ) + + return goret +} + +// GetStreams wraps gst_discoverer_info_get_streams +// +// The function takes the following parameters: +// +// - streamtype gobject.Type: a #GType derived from #GstDiscovererStreamInfo +// +// The function returns the following values: +// +// - goret []DiscovererStreamInfo +// +// Finds the #GstDiscovererStreamInfo contained in @info that match the +// given @streamtype. +func (info *DiscovererInfoInstance) GetStreams(streamtype gobject.Type) []DiscovererStreamInfo { + var carg0 *C.GstDiscovererInfo // in, none, converted + var carg1 C.GType // in, none, casted, alias + var cret *C.GList // container, transfer: full + + carg0 = (*C.GstDiscovererInfo)(UnsafeDiscovererInfoToGlibNone(info)) + carg1 = C.GType(streamtype) + + cret = C.gst_discoverer_info_get_streams(carg0, carg1) + runtime.KeepAlive(info) + runtime.KeepAlive(streamtype) + + var goret []DiscovererStreamInfo + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) DiscovererStreamInfo { + var dst DiscovererStreamInfo // converted + dst = UnsafeDiscovererStreamInfoFromGlibFull(v) + return dst + }, + ) + + return goret +} + +// GetSubtitleStreams wraps gst_discoverer_info_get_subtitle_streams +// The function returns the following values: +// +// - goret []DiscovererSubtitleInfo +// +// Finds all the #GstDiscovererSubtitleInfo contained in @info +func (info *DiscovererInfoInstance) GetSubtitleStreams() []DiscovererSubtitleInfo { + var carg0 *C.GstDiscovererInfo // in, none, converted + var cret *C.GList // container, transfer: full + + carg0 = (*C.GstDiscovererInfo)(UnsafeDiscovererInfoToGlibNone(info)) + + cret = C.gst_discoverer_info_get_subtitle_streams(carg0) + runtime.KeepAlive(info) + + var goret []DiscovererSubtitleInfo + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) DiscovererSubtitleInfo { + var dst DiscovererSubtitleInfo // converted + dst = UnsafeDiscovererSubtitleInfoFromGlibFull(v) + return dst + }, + ) + + return goret +} + // GetTags wraps gst_discoverer_info_get_tags // The function returns the following values: // @@ -2996,7 +3259,7 @@ func (info *DiscovererInfoInstance) GetToc() *gst.Toc { // - goret string func (info *DiscovererInfoInstance) GetURI() string { var carg0 *C.GstDiscovererInfo // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstDiscovererInfo)(UnsafeDiscovererInfoToGlibNone(info)) @@ -3010,6 +3273,35 @@ func (info *DiscovererInfoInstance) GetURI() string { return goret } +// GetVideoStreams wraps gst_discoverer_info_get_video_streams +// The function returns the following values: +// +// - goret []DiscovererVideoInfo +// +// Finds all the #GstDiscovererVideoInfo contained in @info +func (info *DiscovererInfoInstance) GetVideoStreams() []DiscovererVideoInfo { + var carg0 *C.GstDiscovererInfo // in, none, converted + var cret *C.GList // container, transfer: full + + carg0 = (*C.GstDiscovererInfo)(UnsafeDiscovererInfoToGlibNone(info)) + + cret = C.gst_discoverer_info_get_video_streams(carg0) + runtime.KeepAlive(info) + + var goret []DiscovererVideoInfo + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) DiscovererVideoInfo { + var dst DiscovererVideoInfo // converted + dst = UnsafeDiscovererVideoInfoFromGlibFull(v) + return dst + }, + ) + + return goret +} + // DiscovererStreamInfoInstance is the instance type used by all types extending GstDiscovererStreamInfo. It is used internally by the bindings. Users should use the interface [DiscovererStreamInfo] instead. type DiscovererStreamInfoInstance struct { _ [0]func() // equal guard @@ -3214,7 +3506,7 @@ func (info *DiscovererStreamInfoInstance) GetPrevious() DiscovererStreamInfo { // - goret string func (info *DiscovererStreamInfoInstance) GetStreamID() string { var carg0 *C.GstDiscovererStreamInfo // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstDiscovererStreamInfo)(UnsafeDiscovererStreamInfoToGlibNone(info)) @@ -3254,7 +3546,7 @@ func (info *DiscovererStreamInfoInstance) GetStreamNumber() int { // - goret string func (info *DiscovererStreamInfoInstance) GetStreamTypeNick() string { var carg0 *C.GstDiscovererStreamInfo // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstDiscovererStreamInfo)(UnsafeDiscovererStreamInfoToGlibNone(info)) @@ -3373,7 +3665,7 @@ func UnsafeDiscovererSubtitleInfoToGlibFull(c DiscovererSubtitleInfo) unsafe.Poi // - goret string func (info *DiscovererSubtitleInfoInstance) GetLanguage() string { var carg0 *C.GstDiscovererSubtitleInfo // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstDiscovererSubtitleInfo)(UnsafeDiscovererSubtitleInfoToGlibNone(info)) @@ -3998,7 +4290,7 @@ func UnsafeEncodingProfileToGlibFull(c EncodingProfile) unsafe.Pointer { // // Find the #GstEncodingProfile with the specified name and category. func EncodingProfileFind(targetname string, profilename string, category string) EncodingProfile { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 *C.gchar // in, none, string, nullable-string var carg3 *C.gchar // in, none, string, nullable-string var cret *C.GstEncodingProfile // return, full, converted @@ -4108,7 +4400,7 @@ func (profile *EncodingProfileInstance) GetAllowDynamicOutput() bool { // - goret string func (profile *EncodingProfileInstance) GetDescription() string { var carg0 *C.GstEncodingProfile // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstEncodingProfile)(UnsafeEncodingProfileToGlibNone(profile)) @@ -4148,7 +4440,7 @@ func (self *EncodingProfileInstance) GetElementProperties() *gst.Structure { // - goret string func (profile *EncodingProfileInstance) GetFileExtension() string { var carg0 *C.GstEncodingProfile // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstEncodingProfile)(UnsafeEncodingProfileToGlibNone(profile)) @@ -4210,7 +4502,7 @@ func (profile *EncodingProfileInstance) GetInputCaps() *gst.Caps { // - goret string func (profile *EncodingProfileInstance) GetName() string { var carg0 *C.GstEncodingProfile // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstEncodingProfile)(UnsafeEncodingProfileToGlibNone(profile)) @@ -4250,7 +4542,7 @@ func (profile *EncodingProfileInstance) GetPresence() uint { // - goret string func (profile *EncodingProfileInstance) GetPreset() string { var carg0 *C.GstEncodingProfile // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstEncodingProfile)(UnsafeEncodingProfileToGlibNone(profile)) @@ -4270,7 +4562,7 @@ func (profile *EncodingProfileInstance) GetPreset() string { // - goret string func (profile *EncodingProfileInstance) GetPresetName() string { var carg0 *C.GstEncodingProfile // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstEncodingProfile)(UnsafeEncodingProfileToGlibNone(profile)) @@ -4332,7 +4624,7 @@ func (profile *EncodingProfileInstance) GetSingleSegment() bool { // - goret string func (profile *EncodingProfileInstance) GetTypeNick() string { var carg0 *C.GstEncodingProfile // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstEncodingProfile)(UnsafeEncodingProfileToGlibNone(profile)) @@ -4724,6 +5016,11 @@ type EncodingTarget interface { // // - goret EncodingProfile GetProfile(string) EncodingProfile + // GetProfiles wraps gst_encoding_target_get_profiles + // The function returns the following values: + // + // - goret []EncodingProfile + GetProfiles() []EncodingProfile // Save wraps gst_encoding_target_save // The function returns the following values: // @@ -4802,7 +5099,7 @@ func UnsafeEncodingTargetToGlibFull(c EncodingTarget) unsafe.Pointer { // If the category name is specified only targets from that category will be // searched for. func EncodingTargetLoad(name string, category string) (EncodingTarget, error) { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 *C.gchar // in, none, string, nullable-string var cret *C.GstEncodingTarget // return, full, converted var _cerr *C.GError // out, full, converted, nullable @@ -4842,7 +5139,7 @@ func EncodingTargetLoad(name string, category string) (EncodingTarget, error) { // // Opens the provided file and returns the contained #GstEncodingTarget. func EncodingTargetLoadFromFile(filepath string) (EncodingTarget, error) { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstEncodingTarget // return, full, converted var _cerr *C.GError // out, full, converted, nullable @@ -4906,7 +5203,7 @@ func (target *EncodingTargetInstance) AddProfile(profile EncodingProfile) bool { // - goret string func (target *EncodingTargetInstance) GetCategory() string { var carg0 *C.GstEncodingTarget // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstEncodingTarget)(UnsafeEncodingTargetToGlibNone(target)) @@ -4926,7 +5223,7 @@ func (target *EncodingTargetInstance) GetCategory() string { // - goret string func (target *EncodingTargetInstance) GetDescription() string { var carg0 *C.GstEncodingTarget // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstEncodingTarget)(UnsafeEncodingTargetToGlibNone(target)) @@ -4946,7 +5243,7 @@ func (target *EncodingTargetInstance) GetDescription() string { // - goret string func (target *EncodingTargetInstance) GetName() string { var carg0 *C.GstEncodingTarget // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstEncodingTarget)(UnsafeEncodingTargetToGlibNone(target)) @@ -4966,7 +5263,7 @@ func (target *EncodingTargetInstance) GetName() string { // - goret string func (target *EncodingTargetInstance) GetPath() string { var carg0 *C.GstEncodingTarget // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstEncodingTarget)(UnsafeEncodingTargetToGlibNone(target)) @@ -4991,7 +5288,7 @@ func (target *EncodingTargetInstance) GetPath() string { // - goret EncodingProfile func (target *EncodingTargetInstance) GetProfile(name string) EncodingProfile { var carg0 *C.GstEncodingTarget // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstEncodingProfile // return, full, converted carg0 = (*C.GstEncodingTarget)(UnsafeEncodingTargetToGlibNone(target)) @@ -5009,6 +5306,33 @@ func (target *EncodingTargetInstance) GetProfile(name string) EncodingProfile { return goret } +// GetProfiles wraps gst_encoding_target_get_profiles +// The function returns the following values: +// +// - goret []EncodingProfile +func (target *EncodingTargetInstance) GetProfiles() []EncodingProfile { + var carg0 *C.GstEncodingTarget // in, none, converted + var cret *C.GList // container, transfer: none + + carg0 = (*C.GstEncodingTarget)(UnsafeEncodingTargetToGlibNone(target)) + + cret = C.gst_encoding_target_get_profiles(carg0) + runtime.KeepAlive(target) + + var goret []EncodingProfile + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) EncodingProfile { + var dst EncodingProfile // converted + dst = UnsafeEncodingProfileFromGlibNone(v) + return dst + }, + ) + + return goret +} + // Save wraps gst_encoding_target_save // The function returns the following values: // @@ -5053,7 +5377,7 @@ func (target *EncodingTargetInstance) Save() (bool, error) { // Saves the @target to the provided file location. func (target *EncodingTargetInstance) SaveToFile(filepath string) (bool, error) { var carg0 *C.GstEncodingTarget // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return var _cerr *C.GError // out, full, converted, nullable @@ -5488,7 +5812,7 @@ func (info *DiscovererAudioInfoInstance) GetDepth() uint { // - goret string func (info *DiscovererAudioInfoInstance) GetLanguage() string { var carg0 *C.GstDiscovererAudioInfo // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstDiscovererAudioInfo)(UnsafeDiscovererAudioInfoToGlibNone(info)) @@ -5557,6 +5881,11 @@ type DiscovererContainerInfo interface { DiscovererStreamInfo upcastToGstDiscovererContainerInfo() *DiscovererContainerInfoInstance + // GetStreams wraps gst_discoverer_container_info_get_streams + // The function returns the following values: + // + // - goret []DiscovererStreamInfo + GetStreams() []DiscovererStreamInfo // GetTags wraps gst_discoverer_container_info_get_tags // The function returns the following values: // @@ -5600,6 +5929,33 @@ func UnsafeDiscovererContainerInfoToGlibFull(c DiscovererContainerInfo) unsafe.P return gobject.UnsafeObjectToGlibFull(c) } +// GetStreams wraps gst_discoverer_container_info_get_streams +// The function returns the following values: +// +// - goret []DiscovererStreamInfo +func (info *DiscovererContainerInfoInstance) GetStreams() []DiscovererStreamInfo { + var carg0 *C.GstDiscovererContainerInfo // in, none, converted + var cret *C.GList // container, transfer: full + + carg0 = (*C.GstDiscovererContainerInfo)(UnsafeDiscovererContainerInfoToGlibNone(info)) + + cret = C.gst_discoverer_container_info_get_streams(carg0) + runtime.KeepAlive(info) + + var goret []DiscovererStreamInfo + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) DiscovererStreamInfo { + var dst DiscovererStreamInfo // converted + dst = UnsafeDiscovererStreamInfoFromGlibFull(v) + return dst + }, + ) + + return goret +} + // GetTags wraps gst_discoverer_container_info_get_tags // The function returns the following values: // @@ -5764,6 +6120,11 @@ type EncodingContainerProfile interface { // Checks if @container contains a #GstEncodingProfile identical to // @profile. ContainsProfile(EncodingProfile) bool + // GetProfiles wraps gst_encoding_container_profile_get_profiles + // The function returns the following values: + // + // - goret []EncodingProfile + GetProfiles() []EncodingProfile } func unsafeWrapEncodingContainerProfile(base *gobject.ObjectInstance) *EncodingContainerProfileInstance { @@ -5919,6 +6280,33 @@ func (container *EncodingContainerProfileInstance) ContainsProfile(profile Encod return goret } +// GetProfiles wraps gst_encoding_container_profile_get_profiles +// The function returns the following values: +// +// - goret []EncodingProfile +func (profile *EncodingContainerProfileInstance) GetProfiles() []EncodingProfile { + var carg0 *C.GstEncodingContainerProfile // in, none, converted + var cret *C.GList // container, transfer: none + + carg0 = (*C.GstEncodingContainerProfile)(UnsafeEncodingContainerProfileToGlibNone(profile)) + + cret = C.gst_encoding_container_profile_get_profiles(carg0) + runtime.KeepAlive(profile) + + var goret []EncodingProfile + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) EncodingProfile { + var dst EncodingProfile // converted + dst = UnsafeEncodingProfileFromGlibNone(v) + return dst + }, + ) + + return goret +} + // AudioVisualizerClass wraps GstAudioVisualizerClass type AudioVisualizerClass struct { *audioVisualizerClass @@ -6435,7 +6823,7 @@ func (ctx *InstallPluginsContext) SetConfirmSearch(confirmSearch bool) { // --desktop-id= command line option. func (ctx *InstallPluginsContext) SetDesktopID(desktopId string) { var carg0 *C.GstInstallPluginsContext // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstInstallPluginsContext)(UnsafeInstallPluginsContextToGlibNone(ctx)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(desktopId))) @@ -6472,7 +6860,7 @@ func (ctx *InstallPluginsContext) SetDesktopID(desktopId string) { // ]| func (ctx *InstallPluginsContext) SetStartupNotificationID(startupId string) { var carg0 *C.GstInstallPluginsContext // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstInstallPluginsContext)(UnsafeInstallPluginsContextToGlibNone(ctx)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(startupId))) diff --git a/pkg/gstpbutils/gstpbutils_export.gen.go b/pkg/gstpbutils/gstpbutils_export.gen.go index ba1deda..a9b2333 100644 --- a/pkg/gstpbutils/gstpbutils_export.gen.go +++ b/pkg/gstpbutils/gstpbutils_export.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstPbutils-1. DO NOT EDIT. package gstpbutils diff --git a/pkg/gstplay/gstplay.gen.go b/pkg/gstplay/gstplay.gen.go index 8934953..9e3549d 100644 --- a/pkg/gstplay/gstplay.gen.go +++ b/pkg/gstplay/gstplay.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstPlay-1. DO NOT EDIT. package gstplay @@ -938,7 +938,7 @@ func PlayConfigGetSeekAccurate(config *gst.Structure) bool { // gst_play_config_set_user_agent() if any. func PlayConfigGetUserAgent(config *gst.Structure) string { var carg1 *C.GstStructure // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = (*C.GstStructure)(gst.UnsafeStructureToGlibNone(config)) @@ -1055,6 +1055,102 @@ func PlayConfigSetUserAgent(config *gst.Structure, agent string) { runtime.KeepAlive(agent) } +// PlayGetAudioStreams wraps gst_play_get_audio_streams +// +// The function takes the following parameters: +// +// - info PlayMediaInfo: a #GstPlayMediaInfo +// +// The function returns the following values: +// +// - goret []PlayAudioInfo +func PlayGetAudioStreams(info PlayMediaInfo) []PlayAudioInfo { + var carg1 *C.GstPlayMediaInfo // in, none, converted + var cret *C.GList // container, transfer: none + + carg1 = (*C.GstPlayMediaInfo)(UnsafePlayMediaInfoToGlibNone(info)) + + cret = C.gst_play_get_audio_streams(carg1) + runtime.KeepAlive(info) + + var goret []PlayAudioInfo + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) PlayAudioInfo { + var dst PlayAudioInfo // converted + dst = UnsafePlayAudioInfoFromGlibNone(v) + return dst + }, + ) + + return goret +} + +// PlayGetSubtitleStreams wraps gst_play_get_subtitle_streams +// +// The function takes the following parameters: +// +// - info PlayMediaInfo: a #GstPlayMediaInfo +// +// The function returns the following values: +// +// - goret []PlaySubtitleInfo +func PlayGetSubtitleStreams(info PlayMediaInfo) []PlaySubtitleInfo { + var carg1 *C.GstPlayMediaInfo // in, none, converted + var cret *C.GList // container, transfer: none + + carg1 = (*C.GstPlayMediaInfo)(UnsafePlayMediaInfoToGlibNone(info)) + + cret = C.gst_play_get_subtitle_streams(carg1) + runtime.KeepAlive(info) + + var goret []PlaySubtitleInfo + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) PlaySubtitleInfo { + var dst PlaySubtitleInfo // converted + dst = UnsafePlaySubtitleInfoFromGlibNone(v) + return dst + }, + ) + + return goret +} + +// PlayGetVideoStreams wraps gst_play_get_video_streams +// +// The function takes the following parameters: +// +// - info PlayMediaInfo: a #GstPlayMediaInfo +// +// The function returns the following values: +// +// - goret []PlayVideoInfo +func PlayGetVideoStreams(info PlayMediaInfo) []PlayVideoInfo { + var carg1 *C.GstPlayMediaInfo // in, none, converted + var cret *C.GList // container, transfer: none + + carg1 = (*C.GstPlayMediaInfo)(UnsafePlayMediaInfoToGlibNone(info)) + + cret = C.gst_play_get_video_streams(carg1) + runtime.KeepAlive(info) + + var goret []PlayVideoInfo + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) PlayVideoInfo { + var dst PlayVideoInfo // converted + dst = UnsafePlayVideoInfoFromGlibNone(v) + return dst + }, + ) + + return goret +} + // PlayIsPlayMessage wraps gst_play_is_play_message // // The function takes the following parameters: @@ -1230,7 +1326,7 @@ func (play *PlayInstance) GetCurrentVideoTrack() PlayVideoInfo { // - goret string func (play *PlayInstance) GetCurrentVisualization() string { var carg0 *C.GstPlay // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstPlay)(UnsafePlayToGlibNone(play)) @@ -1456,7 +1552,7 @@ func (play *PlayInstance) GetRate() float64 { // Current subtitle URI func (play *PlayInstance) GetSubtitleURI() string { var carg0 *C.GstPlay // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstPlay)(UnsafePlayToGlibNone(play)) @@ -1501,7 +1597,7 @@ func (play *PlayInstance) GetSubtitleVideoOffset() int64 { // Gets the URI of the currently-playing stream. func (play *PlayInstance) GetURI() string { var carg0 *C.GstPlay // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstPlay)(UnsafePlayToGlibNone(play)) @@ -2130,6 +2226,11 @@ type PlayMediaInfo interface { gobject.Object upcastToGstPlayMediaInfo() *PlayMediaInfoInstance + // GetAudioStreams wraps gst_play_media_info_get_audio_streams + // The function returns the following values: + // + // - goret []PlayAudioInfo + GetAudioStreams() []PlayAudioInfo // GetContainerFormat wraps gst_play_media_info_get_container_format // The function returns the following values: // @@ -2168,6 +2269,16 @@ type PlayMediaInfo interface { // // - goret uint GetNumberOfVideoStreams() uint + // GetStreamList wraps gst_play_media_info_get_stream_list + // The function returns the following values: + // + // - goret []PlayStreamInfo + GetStreamList() []PlayStreamInfo + // GetSubtitleStreams wraps gst_play_media_info_get_subtitle_streams + // The function returns the following values: + // + // - goret []PlaySubtitleInfo + GetSubtitleStreams() []PlaySubtitleInfo // GetTags wraps gst_play_media_info_get_tags // The function returns the following values: // @@ -2183,6 +2294,11 @@ type PlayMediaInfo interface { // // - goret string GetURI() string + // GetVideoStreams wraps gst_play_media_info_get_video_streams + // The function returns the following values: + // + // - goret []PlayVideoInfo + GetVideoStreams() []PlayVideoInfo // IsLive wraps gst_play_media_info_is_live // The function returns the following values: // @@ -2229,13 +2345,40 @@ func UnsafePlayMediaInfoToGlibFull(c PlayMediaInfo) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } +// GetAudioStreams wraps gst_play_media_info_get_audio_streams +// The function returns the following values: +// +// - goret []PlayAudioInfo +func (info *PlayMediaInfoInstance) GetAudioStreams() []PlayAudioInfo { + var carg0 *C.GstPlayMediaInfo // in, none, converted + var cret *C.GList // container, transfer: none + + carg0 = (*C.GstPlayMediaInfo)(UnsafePlayMediaInfoToGlibNone(info)) + + cret = C.gst_play_media_info_get_audio_streams(carg0) + runtime.KeepAlive(info) + + var goret []PlayAudioInfo + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) PlayAudioInfo { + var dst PlayAudioInfo // converted + dst = UnsafePlayAudioInfoFromGlibNone(v) + return dst + }, + ) + + return goret +} + // GetContainerFormat wraps gst_play_media_info_get_container_format // The function returns the following values: // // - goret string func (info *PlayMediaInfoInstance) GetContainerFormat() string { var carg0 *C.GstPlayMediaInfo // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlayMediaInfo)(UnsafePlayMediaInfoToGlibNone(info)) @@ -2372,6 +2515,60 @@ func (info *PlayMediaInfoInstance) GetNumberOfVideoStreams() uint { return goret } +// GetStreamList wraps gst_play_media_info_get_stream_list +// The function returns the following values: +// +// - goret []PlayStreamInfo +func (info *PlayMediaInfoInstance) GetStreamList() []PlayStreamInfo { + var carg0 *C.GstPlayMediaInfo // in, none, converted + var cret *C.GList // container, transfer: none + + carg0 = (*C.GstPlayMediaInfo)(UnsafePlayMediaInfoToGlibNone(info)) + + cret = C.gst_play_media_info_get_stream_list(carg0) + runtime.KeepAlive(info) + + var goret []PlayStreamInfo + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) PlayStreamInfo { + var dst PlayStreamInfo // converted + dst = UnsafePlayStreamInfoFromGlibNone(v) + return dst + }, + ) + + return goret +} + +// GetSubtitleStreams wraps gst_play_media_info_get_subtitle_streams +// The function returns the following values: +// +// - goret []PlaySubtitleInfo +func (info *PlayMediaInfoInstance) GetSubtitleStreams() []PlaySubtitleInfo { + var carg0 *C.GstPlayMediaInfo // in, none, converted + var cret *C.GList // container, transfer: none + + carg0 = (*C.GstPlayMediaInfo)(UnsafePlayMediaInfoToGlibNone(info)) + + cret = C.gst_play_media_info_get_subtitle_streams(carg0) + runtime.KeepAlive(info) + + var goret []PlaySubtitleInfo + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) PlaySubtitleInfo { + var dst PlaySubtitleInfo // converted + dst = UnsafePlaySubtitleInfoFromGlibNone(v) + return dst + }, + ) + + return goret +} + // GetTags wraps gst_play_media_info_get_tags // The function returns the following values: // @@ -2398,7 +2595,7 @@ func (info *PlayMediaInfoInstance) GetTags() *gst.TagList { // - goret string func (info *PlayMediaInfoInstance) GetTitle() string { var carg0 *C.GstPlayMediaInfo // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlayMediaInfo)(UnsafePlayMediaInfoToGlibNone(info)) @@ -2418,7 +2615,7 @@ func (info *PlayMediaInfoInstance) GetTitle() string { // - goret string func (info *PlayMediaInfoInstance) GetURI() string { var carg0 *C.GstPlayMediaInfo // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlayMediaInfo)(UnsafePlayMediaInfoToGlibNone(info)) @@ -2432,6 +2629,33 @@ func (info *PlayMediaInfoInstance) GetURI() string { return goret } +// GetVideoStreams wraps gst_play_media_info_get_video_streams +// The function returns the following values: +// +// - goret []PlayVideoInfo +func (info *PlayMediaInfoInstance) GetVideoStreams() []PlayVideoInfo { + var carg0 *C.GstPlayMediaInfo // in, none, converted + var cret *C.GList // container, transfer: none + + carg0 = (*C.GstPlayMediaInfo)(UnsafePlayMediaInfoToGlibNone(info)) + + cret = C.gst_play_media_info_get_video_streams(carg0) + runtime.KeepAlive(info) + + var goret []PlayVideoInfo + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) PlayVideoInfo { + var dst PlayVideoInfo // converted + dst = UnsafePlayVideoInfoFromGlibNone(v) + return dst + }, + ) + + return goret +} + // IsLive wraps gst_play_media_info_is_live // The function returns the following values: // @@ -2842,7 +3066,7 @@ func (info *PlayStreamInfoInstance) GetCaps() *gst.Caps { // A string describing codec used in #GstPlayStreamInfo. func (info *PlayStreamInfoInstance) GetCodec() string { var carg0 *C.GstPlayStreamInfo // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlayStreamInfo)(UnsafePlayStreamInfoToGlibNone(info)) @@ -2888,7 +3112,7 @@ func (info *PlayStreamInfoInstance) GetIndex() int { // of the given @info (ex: "audio", "video", "subtitle") func (info *PlayStreamInfoInstance) GetStreamType() string { var carg0 *C.GstPlayStreamInfo // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlayStreamInfo)(UnsafePlayStreamInfoToGlibNone(info)) @@ -2986,7 +3210,7 @@ func UnsafePlaySubtitleInfoToGlibFull(c PlaySubtitleInfo) unsafe.Pointer { // - goret string func (info *PlaySubtitleInfoInstance) GetLanguage() string { var carg0 *C.GstPlaySubtitleInfo // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlaySubtitleInfo)(UnsafePlaySubtitleInfoToGlibNone(info)) @@ -3514,7 +3738,7 @@ func (info *PlayAudioInfoInstance) GetChannels() int { // - goret string func (info *PlayAudioInfoInstance) GetLanguage() string { var carg0 *C.GstPlayAudioInfo // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlayAudioInfo)(UnsafePlayAudioInfoToGlibNone(info)) diff --git a/pkg/gstplayer/gstplayer.gen.go b/pkg/gstplayer/gstplayer.gen.go index 3f0920c..85afd65 100644 --- a/pkg/gstplayer/gstplayer.gen.go +++ b/pkg/gstplayer/gstplayer.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstPlayer-1. DO NOT EDIT. package gstplayer @@ -853,7 +853,7 @@ func PlayerConfigGetSeekAccurate(config *gst.Structure) bool { // gst_player_config_set_user_agent() if any. func PlayerConfigGetUserAgent(config *gst.Structure) string { var carg1 *C.GstStructure // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = (*C.GstStructure)(gst.UnsafeStructureToGlibNone(config)) @@ -944,6 +944,102 @@ func PlayerConfigSetUserAgent(config *gst.Structure, agent string) { runtime.KeepAlive(agent) } +// PlayerGetAudioStreams wraps gst_player_get_audio_streams +// +// The function takes the following parameters: +// +// - info PlayerMediaInfo: a #GstPlayerMediaInfo +// +// The function returns the following values: +// +// - goret []PlayerAudioInfo +func PlayerGetAudioStreams(info PlayerMediaInfo) []PlayerAudioInfo { + var carg1 *C.GstPlayerMediaInfo // in, none, converted + var cret *C.GList // container, transfer: none + + carg1 = (*C.GstPlayerMediaInfo)(UnsafePlayerMediaInfoToGlibNone(info)) + + cret = C.gst_player_get_audio_streams(carg1) + runtime.KeepAlive(info) + + var goret []PlayerAudioInfo + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) PlayerAudioInfo { + var dst PlayerAudioInfo // converted + dst = UnsafePlayerAudioInfoFromGlibNone(v) + return dst + }, + ) + + return goret +} + +// PlayerGetSubtitleStreams wraps gst_player_get_subtitle_streams +// +// The function takes the following parameters: +// +// - info PlayerMediaInfo: a #GstPlayerMediaInfo +// +// The function returns the following values: +// +// - goret []PlayerSubtitleInfo +func PlayerGetSubtitleStreams(info PlayerMediaInfo) []PlayerSubtitleInfo { + var carg1 *C.GstPlayerMediaInfo // in, none, converted + var cret *C.GList // container, transfer: none + + carg1 = (*C.GstPlayerMediaInfo)(UnsafePlayerMediaInfoToGlibNone(info)) + + cret = C.gst_player_get_subtitle_streams(carg1) + runtime.KeepAlive(info) + + var goret []PlayerSubtitleInfo + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) PlayerSubtitleInfo { + var dst PlayerSubtitleInfo // converted + dst = UnsafePlayerSubtitleInfoFromGlibNone(v) + return dst + }, + ) + + return goret +} + +// PlayerGetVideoStreams wraps gst_player_get_video_streams +// +// The function takes the following parameters: +// +// - info PlayerMediaInfo: a #GstPlayerMediaInfo +// +// The function returns the following values: +// +// - goret []PlayerVideoInfo +func PlayerGetVideoStreams(info PlayerMediaInfo) []PlayerVideoInfo { + var carg1 *C.GstPlayerMediaInfo // in, none, converted + var cret *C.GList // container, transfer: none + + carg1 = (*C.GstPlayerMediaInfo)(UnsafePlayerMediaInfoToGlibNone(info)) + + cret = C.gst_player_get_video_streams(carg1) + runtime.KeepAlive(info) + + var goret []PlayerVideoInfo + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) PlayerVideoInfo { + var dst PlayerVideoInfo // converted + dst = UnsafePlayerVideoInfoFromGlibNone(v) + return dst + }, + ) + + return goret +} + // GetAudioVideoOffset wraps gst_player_get_audio_video_offset // The function returns the following values: // @@ -1092,7 +1188,7 @@ func (player *PlayerInstance) GetCurrentVideoTrack() PlayerVideoInfo { // - goret string func (player *PlayerInstance) GetCurrentVisualization() string { var carg0 *C.GstPlayer // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstPlayer)(UnsafePlayerToGlibNone(player)) @@ -1285,7 +1381,7 @@ func (player *PlayerInstance) GetRate() float64 { // current subtitle URI func (player *PlayerInstance) GetSubtitleURI() string { var carg0 *C.GstPlayer // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstPlayer)(UnsafePlayerToGlibNone(player)) @@ -1330,7 +1426,7 @@ func (player *PlayerInstance) GetSubtitleVideoOffset() int64 { // Gets the URI of the currently-playing stream. func (player *PlayerInstance) GetURI() string { var carg0 *C.GstPlayer // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstPlayer)(UnsafePlayerToGlibNone(player)) @@ -2093,6 +2189,11 @@ type PlayerMediaInfo interface { gobject.Object upcastToGstPlayerMediaInfo() *PlayerMediaInfoInstance + // GetAudioStreams wraps gst_player_media_info_get_audio_streams + // The function returns the following values: + // + // - goret []PlayerAudioInfo + GetAudioStreams() []PlayerAudioInfo // GetContainerFormat wraps gst_player_media_info_get_container_format // The function returns the following values: // @@ -2131,6 +2232,16 @@ type PlayerMediaInfo interface { // // - goret uint GetNumberOfVideoStreams() uint + // GetStreamList wraps gst_player_media_info_get_stream_list + // The function returns the following values: + // + // - goret []PlayerStreamInfo + GetStreamList() []PlayerStreamInfo + // GetSubtitleStreams wraps gst_player_media_info_get_subtitle_streams + // The function returns the following values: + // + // - goret []PlayerSubtitleInfo + GetSubtitleStreams() []PlayerSubtitleInfo // GetTags wraps gst_player_media_info_get_tags // The function returns the following values: // @@ -2146,6 +2257,11 @@ type PlayerMediaInfo interface { // // - goret string GetURI() string + // GetVideoStreams wraps gst_player_media_info_get_video_streams + // The function returns the following values: + // + // - goret []PlayerVideoInfo + GetVideoStreams() []PlayerVideoInfo // IsLive wraps gst_player_media_info_is_live // The function returns the following values: // @@ -2192,13 +2308,40 @@ func UnsafePlayerMediaInfoToGlibFull(c PlayerMediaInfo) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } +// GetAudioStreams wraps gst_player_media_info_get_audio_streams +// The function returns the following values: +// +// - goret []PlayerAudioInfo +func (info *PlayerMediaInfoInstance) GetAudioStreams() []PlayerAudioInfo { + var carg0 *C.GstPlayerMediaInfo // in, none, converted + var cret *C.GList // container, transfer: none + + carg0 = (*C.GstPlayerMediaInfo)(UnsafePlayerMediaInfoToGlibNone(info)) + + cret = C.gst_player_media_info_get_audio_streams(carg0) + runtime.KeepAlive(info) + + var goret []PlayerAudioInfo + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) PlayerAudioInfo { + var dst PlayerAudioInfo // converted + dst = UnsafePlayerAudioInfoFromGlibNone(v) + return dst + }, + ) + + return goret +} + // GetContainerFormat wraps gst_player_media_info_get_container_format // The function returns the following values: // // - goret string func (info *PlayerMediaInfoInstance) GetContainerFormat() string { var carg0 *C.GstPlayerMediaInfo // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlayerMediaInfo)(UnsafePlayerMediaInfoToGlibNone(info)) @@ -2335,6 +2478,60 @@ func (info *PlayerMediaInfoInstance) GetNumberOfVideoStreams() uint { return goret } +// GetStreamList wraps gst_player_media_info_get_stream_list +// The function returns the following values: +// +// - goret []PlayerStreamInfo +func (info *PlayerMediaInfoInstance) GetStreamList() []PlayerStreamInfo { + var carg0 *C.GstPlayerMediaInfo // in, none, converted + var cret *C.GList // container, transfer: none + + carg0 = (*C.GstPlayerMediaInfo)(UnsafePlayerMediaInfoToGlibNone(info)) + + cret = C.gst_player_media_info_get_stream_list(carg0) + runtime.KeepAlive(info) + + var goret []PlayerStreamInfo + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) PlayerStreamInfo { + var dst PlayerStreamInfo // converted + dst = UnsafePlayerStreamInfoFromGlibNone(v) + return dst + }, + ) + + return goret +} + +// GetSubtitleStreams wraps gst_player_media_info_get_subtitle_streams +// The function returns the following values: +// +// - goret []PlayerSubtitleInfo +func (info *PlayerMediaInfoInstance) GetSubtitleStreams() []PlayerSubtitleInfo { + var carg0 *C.GstPlayerMediaInfo // in, none, converted + var cret *C.GList // container, transfer: none + + carg0 = (*C.GstPlayerMediaInfo)(UnsafePlayerMediaInfoToGlibNone(info)) + + cret = C.gst_player_media_info_get_subtitle_streams(carg0) + runtime.KeepAlive(info) + + var goret []PlayerSubtitleInfo + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) PlayerSubtitleInfo { + var dst PlayerSubtitleInfo // converted + dst = UnsafePlayerSubtitleInfoFromGlibNone(v) + return dst + }, + ) + + return goret +} + // GetTags wraps gst_player_media_info_get_tags // The function returns the following values: // @@ -2361,7 +2558,7 @@ func (info *PlayerMediaInfoInstance) GetTags() *gst.TagList { // - goret string func (info *PlayerMediaInfoInstance) GetTitle() string { var carg0 *C.GstPlayerMediaInfo // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlayerMediaInfo)(UnsafePlayerMediaInfoToGlibNone(info)) @@ -2381,7 +2578,7 @@ func (info *PlayerMediaInfoInstance) GetTitle() string { // - goret string func (info *PlayerMediaInfoInstance) GetURI() string { var carg0 *C.GstPlayerMediaInfo // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlayerMediaInfo)(UnsafePlayerMediaInfoToGlibNone(info)) @@ -2395,6 +2592,33 @@ func (info *PlayerMediaInfoInstance) GetURI() string { return goret } +// GetVideoStreams wraps gst_player_media_info_get_video_streams +// The function returns the following values: +// +// - goret []PlayerVideoInfo +func (info *PlayerMediaInfoInstance) GetVideoStreams() []PlayerVideoInfo { + var carg0 *C.GstPlayerMediaInfo // in, none, converted + var cret *C.GList // container, transfer: none + + carg0 = (*C.GstPlayerMediaInfo)(UnsafePlayerMediaInfoToGlibNone(info)) + + cret = C.gst_player_media_info_get_video_streams(carg0) + runtime.KeepAlive(info) + + var goret []PlayerVideoInfo + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) PlayerVideoInfo { + var dst PlayerVideoInfo // converted + dst = UnsafePlayerVideoInfoFromGlibNone(v) + return dst + }, + ) + + return goret +} + // IsLive wraps gst_player_media_info_is_live // The function returns the following values: // @@ -2553,7 +2777,7 @@ func (info *PlayerStreamInfoInstance) GetCaps() *gst.Caps { // A string describing codec used in #GstPlayerStreamInfo. func (info *PlayerStreamInfoInstance) GetCodec() string { var carg0 *C.GstPlayerStreamInfo // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlayerStreamInfo)(UnsafePlayerStreamInfoToGlibNone(info)) @@ -2599,7 +2823,7 @@ func (info *PlayerStreamInfoInstance) GetIndex() int { // of the given @info (ex: "audio", "video", "subtitle") func (info *PlayerStreamInfoInstance) GetStreamType() string { var carg0 *C.GstPlayerStreamInfo // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlayerStreamInfo)(UnsafePlayerStreamInfoToGlibNone(info)) @@ -2697,7 +2921,7 @@ func UnsafePlayerSubtitleInfoToGlibFull(c PlayerSubtitleInfo) unsafe.Pointer { // - goret string func (info *PlayerSubtitleInfoInstance) GetLanguage() string { var carg0 *C.GstPlayerSubtitleInfo // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlayerSubtitleInfo)(UnsafePlayerSubtitleInfoToGlibNone(info)) @@ -3225,7 +3449,7 @@ func (info *PlayerAudioInfoInstance) GetChannels() int { // - goret string func (info *PlayerAudioInfoInstance) GetLanguage() string { var carg0 *C.GstPlayerAudioInfo // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstPlayerAudioInfo)(UnsafePlayerAudioInfoToGlibNone(info)) diff --git a/pkg/gstrtp/gstrtp.gen.go b/pkg/gstrtp/gstrtp.gen.go index 70f663c..7c47c1e 100644 --- a/pkg/gstrtp/gstrtp.gen.go +++ b/pkg/gstrtp/gstrtp.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstRtp-1. DO NOT EDIT. package gstrtp @@ -1002,7 +1002,7 @@ func RtcpNtpToUnix(ntptime uint64) uint64 { // Convert @name into a @GstRTCPSDESType. @name is typically a key in a // #GstStructure containing SDES items. func RtcpSdesNameToType(name string) RTCPSDESType { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.GstRTCPSDESType // return, none, casted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -1032,7 +1032,7 @@ func RtcpSdesNameToType(name string) RTCPSDESType { // key in a #GstStructure containing SDES items. func RtcpSdesTypeToName(typ RTCPSDESType) string { var carg1 C.GstRTCPSDESType // in, none, casted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg1 = C.GstRTCPSDESType(typ) @@ -1077,6 +1077,33 @@ func RtcpUnixToNtp(unixtime uint64) uint64 { return goret } +// RtpGetHeaderExtensionList wraps gst_rtp_get_header_extension_list +// The function returns the following values: +// +// - goret []gst.ElementFactory +// +// Retrieve all the factories of the currently registered RTP header +// extensions. Call gst_element_factory_create() with each factory to create +// the associated #GstRTPHeaderExtension. +func RtpGetHeaderExtensionList() []gst.ElementFactory { + var cret *C.GList // container, transfer: full + + cret = C.gst_rtp_get_header_extension_list() + + var goret []gst.ElementFactory + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) gst.ElementFactory { + var dst gst.ElementFactory // converted + dst = gst.UnsafeElementFactoryFromGlibFull(v) + return dst + }, + ) + + return goret +} + // RtpSourceMetaApiGetType wraps gst_rtp_source_meta_api_get_type // The function returns the following values: // @@ -1968,9 +1995,9 @@ func (payload *RTPBasePayloadInstance) PushList(list *gst.BufferList) gst.FlowRe // gst_rtp_base_payload_push() or gst_rtp_base_payload_set_outcaps(). func (payload *RTPBasePayloadInstance) SetOptions(media string, dynamic bool, encodingName string, clockRate uint32) { var carg0 *C.GstRTPBasePayload // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gboolean // in - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string var carg4 C.guint32 // in, none, casted carg0 = (*C.GstRTPBasePayload)(UnsafeRTPBasePayloadToGlibNone(payload)) @@ -2328,7 +2355,7 @@ func UnsafeRTPHeaderExtensionToGlibFull(c RTPHeaderExtension) unsafe.Pointer { // // - goret RTPHeaderExtension func RTPHeaderExtensionCreateFromURI(uri string) RTPHeaderExtension { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstRTPHeaderExtension // return, full, converted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri))) @@ -2427,7 +2454,7 @@ func (ext *RTPHeaderExtensionInstance) GetMaxSize(inputMeta *gst.Buffer) uint { // - goret string func (ext *RTPHeaderExtensionInstance) GetSdpCapsFieldName() string { var carg0 *C.GstRTPHeaderExtension // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstRTPHeaderExtension)(UnsafeRTPHeaderExtensionToGlibNone(ext)) @@ -2468,7 +2495,7 @@ func (ext *RTPHeaderExtensionInstance) GetSupportedFlags() RTPHeaderExtensionFla // - goret string func (ext *RTPHeaderExtensionInstance) GetURI() string { var carg0 *C.GstRTPHeaderExtension // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstRTPHeaderExtension)(UnsafeRTPHeaderExtensionToGlibNone(ext)) @@ -2619,7 +2646,7 @@ func (ext *RTPHeaderExtensionInstance) SetCapsFromAttributes(caps *gst.Caps) boo func (ext *RTPHeaderExtensionInstance) SetCapsFromAttributesHelper(caps *gst.Caps, attributes string) bool { var carg0 *C.GstRTPHeaderExtension // in, none, converted var carg1 *C.GstCaps // in, none, converted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstRTPHeaderExtension)(UnsafeRTPHeaderExtensionToGlibNone(ext)) @@ -3269,6 +3296,207 @@ func UnsafeRTCPBufferToGlibFull(r *RTCPBuffer) unsafe.Pointer { r.native = nil // RTCPBuffer is invalid from here on return _p } +// RTCPBufferMap wraps gst_rtcp_buffer_map +// +// The function takes the following parameters: +// +// - buffer *gst.Buffer: a buffer with an RTCP packet +// - flags gst.MapFlags: flags for the mapping +// - rtcp *RTCPBuffer: resulting #GstRTCPBuffer +// +// The function returns the following values: +// +// - goret bool +// +// Open @buffer for reading or writing, depending on @flags. The resulting RTCP +// buffer state is stored in @rtcp. +func RTCPBufferMap(buffer *gst.Buffer, flags gst.MapFlags, rtcp *RTCPBuffer) bool { + var carg1 *C.GstBuffer // in, none, converted + var carg2 C.GstMapFlags // in, none, casted + var carg3 *C.GstRTCPBuffer // in, none, converted + var cret C.gboolean // return + + carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) + carg2 = C.GstMapFlags(flags) + carg3 = (*C.GstRTCPBuffer)(UnsafeRTCPBufferToGlibNone(rtcp)) + + cret = C.gst_rtcp_buffer_map(carg1, carg2, carg3) + runtime.KeepAlive(buffer) + runtime.KeepAlive(flags) + runtime.KeepAlive(rtcp) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + +// NewRTCPBuffer wraps gst_rtcp_buffer_new +// +// The function takes the following parameters: +// +// - mtu uint: the maximum mtu size. +// +// The function returns the following values: +// +// - goret *gst.Buffer +// +// Create a new buffer for constructing RTCP packets. The packet will have a +// maximum size of @mtu. +func NewRTCPBuffer(mtu uint) *gst.Buffer { + var carg1 C.guint // in, none, casted + var cret *C.GstBuffer // return, full, converted + + carg1 = C.guint(mtu) + + cret = C.gst_rtcp_buffer_new(carg1) + runtime.KeepAlive(mtu) + + var goret *gst.Buffer + + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// RTCPBufferValidate wraps gst_rtcp_buffer_validate +// +// The function takes the following parameters: +// +// - buffer *gst.Buffer: the buffer to validate +// +// The function returns the following values: +// +// - goret bool +// +// Check if the data pointed to by @buffer is a valid RTCP packet using +// gst_rtcp_buffer_validate_data(). +func RTCPBufferValidate(buffer *gst.Buffer) bool { + var carg1 *C.GstBuffer // in, none, converted + var cret C.gboolean // return + + carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) + + cret = C.gst_rtcp_buffer_validate(carg1) + runtime.KeepAlive(buffer) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + +// RTCPBufferValidateData wraps gst_rtcp_buffer_validate_data +// +// The function takes the following parameters: +// +// - data []uint8: the data to validate +// +// The function returns the following values: +// +// - goret bool +// +// Check if the @data and @size point to the data of a valid compound, +// non-reduced size RTCP packet. +// Use this function to validate a packet before using the other functions in +// this module. +func RTCPBufferValidateData(data []uint8) 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 cret C.gboolean // return + + _ = data + _ = carg1 + _ = carg2 + panic("unimplemented conversion of []uint8 (guint8*)") + + cret = C.gst_rtcp_buffer_validate_data(carg1, carg2) + runtime.KeepAlive(data) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + +// RTCPBufferValidateDataReduced wraps gst_rtcp_buffer_validate_data_reduced +// +// The function takes the following parameters: +// +// - data []uint8: the data to validate +// +// The function returns the following values: +// +// - goret bool +// +// Check if the @data and @size point to the data of a valid RTCP packet. +// Use this function to validate a packet before using the other functions in +// this module. +// +// This function is updated to support reduced size rtcp packets according to +// RFC 5506 and will validate full compound RTCP packets as well as reduced +// size RTCP packets. +func RTCPBufferValidateDataReduced(data []uint8) 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 cret C.gboolean // return + + _ = data + _ = carg1 + _ = carg2 + panic("unimplemented conversion of []uint8 (guint8*)") + + cret = C.gst_rtcp_buffer_validate_data_reduced(carg1, carg2) + runtime.KeepAlive(data) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + +// RTCPBufferValidateReduced wraps gst_rtcp_buffer_validate_reduced +// +// The function takes the following parameters: +// +// - buffer *gst.Buffer: the buffer to validate +// +// The function returns the following values: +// +// - goret bool +// +// Check if the data pointed to by @buffer is a valid RTCP packet using +// gst_rtcp_buffer_validate_reduced(). +func RTCPBufferValidateReduced(buffer *gst.Buffer) bool { + var carg1 *C.GstBuffer // in, none, converted + var cret C.gboolean // return + + carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) + + cret = C.gst_rtcp_buffer_validate_reduced(carg1) + runtime.KeepAlive(buffer) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + // AddPacket wraps gst_rtcp_buffer_add_packet // // The function takes the following parameters: @@ -3601,7 +3829,7 @@ func (packet *RTCPPacket) AppGetDataLength() uint16 { // Get the name field of the APP @packet. func (packet *RTCPPacket) AppGetName() string { var carg0 *C.GstRTCPPacket // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstRTCPPacket)(UnsafeRTCPPacketToGlibNone(packet)) @@ -3701,7 +3929,7 @@ func (packet *RTCPPacket) AppSetDataLength(wordlen uint16) bool { // Set the name field of the APP @packet. func (packet *RTCPPacket) AppSetName(name string) { var carg0 *C.GstRTCPPacket // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstRTCPPacket)(UnsafeRTCPPacketToGlibNone(packet)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -3856,7 +4084,7 @@ func (packet *RTCPPacket) ByeGetNthSsrc(nth uint) uint32 { // Get the reason in @packet. func (packet *RTCPPacket) ByeGetReason() string { var carg0 *C.GstRTCPPacket // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstRTCPPacket)(UnsafeRTCPPacketToGlibNone(packet)) @@ -3928,7 +4156,7 @@ func (packet *RTCPPacket) ByeGetSsrcCount() uint { // Set the reason string to @reason in @packet. func (packet *RTCPPacket) ByeSetReason(reason string) bool { var carg0 *C.GstRTCPPacket // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstRTCPPacket)(UnsafeRTCPPacketToGlibNone(packet)) @@ -5931,6 +6159,311 @@ func UnsafeRTPBufferToGlibFull(r *RTPBuffer) unsafe.Pointer { r.native = nil // RTPBuffer is invalid from here on return _p } +// RTPBufferAllocateData wraps gst_rtp_buffer_allocate_data +// +// The function takes the following parameters: +// +// - buffer *gst.Buffer: a #GstBuffer +// - payloadLen uint: the length of the payload +// - padLen uint8: the amount of padding +// - csrcCount uint8: the number of CSRC entries +// +// Allocate enough data in @buffer to hold an RTP packet with @csrc_count CSRCs, +// a payload length of @payload_len and padding of @pad_len. +// @buffer must be writable and all previous memory in @buffer will be freed. +// If @pad_len is >0, the padding bit will be set. All other RTP header fields +// will be set to 0/FALSE. +func RTPBufferAllocateData(buffer *gst.Buffer, payloadLen uint, padLen uint8, csrcCount uint8) { + var carg1 *C.GstBuffer // in, none, converted + var carg2 C.guint // in, none, casted + var carg3 C.guint8 // in, none, casted + var carg4 C.guint8 // in, none, casted + + carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) + carg2 = C.guint(payloadLen) + carg3 = C.guint8(padLen) + carg4 = C.guint8(csrcCount) + + C.gst_rtp_buffer_allocate_data(carg1, carg2, carg3, carg4) + runtime.KeepAlive(buffer) + runtime.KeepAlive(payloadLen) + runtime.KeepAlive(padLen) + runtime.KeepAlive(csrcCount) +} + +// RTPBufferCalcHeaderLen wraps gst_rtp_buffer_calc_header_len +// +// The function takes the following parameters: +// +// - csrcCount uint8: the number of CSRC entries +// +// The function returns the following values: +// +// - goret uint +// +// Calculate the header length of an RTP packet with @csrc_count CSRC entries. +// An RTP packet can have at most 15 CSRC entries. +func RTPBufferCalcHeaderLen(csrcCount uint8) uint { + var carg1 C.guint8 // in, none, casted + var cret C.guint // return, none, casted + + carg1 = C.guint8(csrcCount) + + cret = C.gst_rtp_buffer_calc_header_len(carg1) + runtime.KeepAlive(csrcCount) + + var goret uint + + goret = uint(cret) + + return goret +} + +// RTPBufferCalcPacketLen wraps gst_rtp_buffer_calc_packet_len +// +// The function takes the following parameters: +// +// - payloadLen uint: the length of the payload +// - padLen uint8: the amount of padding +// - csrcCount uint8: the number of CSRC entries +// +// The function returns the following values: +// +// - goret uint +// +// Calculate the total length of an RTP packet with a payload size of @payload_len, +// a padding of @pad_len and a @csrc_count CSRC entries. +func RTPBufferCalcPacketLen(payloadLen uint, padLen uint8, csrcCount uint8) uint { + var carg1 C.guint // in, none, casted + var carg2 C.guint8 // in, none, casted + var carg3 C.guint8 // in, none, casted + var cret C.guint // return, none, casted + + carg1 = C.guint(payloadLen) + carg2 = C.guint8(padLen) + carg3 = C.guint8(csrcCount) + + cret = C.gst_rtp_buffer_calc_packet_len(carg1, carg2, carg3) + runtime.KeepAlive(payloadLen) + runtime.KeepAlive(padLen) + runtime.KeepAlive(csrcCount) + + var goret uint + + goret = uint(cret) + + return goret +} + +// RTPBufferCalcPayloadLen wraps gst_rtp_buffer_calc_payload_len +// +// The function takes the following parameters: +// +// - packetLen uint: the length of the total RTP packet +// - padLen uint8: the amount of padding +// - csrcCount uint8: the number of CSRC entries +// +// The function returns the following values: +// +// - goret uint +// +// Calculate the length of the payload of an RTP packet with size @packet_len, +// a padding of @pad_len and a @csrc_count CSRC entries. +func RTPBufferCalcPayloadLen(packetLen uint, padLen uint8, csrcCount uint8) uint { + var carg1 C.guint // in, none, casted + var carg2 C.guint8 // in, none, casted + var carg3 C.guint8 // in, none, casted + var cret C.guint // return, none, casted + + carg1 = C.guint(packetLen) + carg2 = C.guint8(padLen) + carg3 = C.guint8(csrcCount) + + cret = C.gst_rtp_buffer_calc_payload_len(carg1, carg2, carg3) + runtime.KeepAlive(packetLen) + runtime.KeepAlive(padLen) + runtime.KeepAlive(csrcCount) + + var goret uint + + goret = uint(cret) + + return goret +} + +// RTPBufferCompareSeqnum wraps gst_rtp_buffer_compare_seqnum +// +// The function takes the following parameters: +// +// - seqnum1 uint16: a sequence number +// - seqnum2 uint16: a sequence number +// +// The function returns the following values: +// +// - goret int +// +// Compare two sequence numbers, taking care of wraparounds. This function +// returns the difference between @seqnum1 and @seqnum2. +func RTPBufferCompareSeqnum(seqnum1 uint16, seqnum2 uint16) int { + var carg1 C.guint16 // in, none, casted + var carg2 C.guint16 // in, none, casted + var cret C.gint // return, none, casted + + carg1 = C.guint16(seqnum1) + carg2 = C.guint16(seqnum2) + + cret = C.gst_rtp_buffer_compare_seqnum(carg1, carg2) + runtime.KeepAlive(seqnum1) + runtime.KeepAlive(seqnum2) + + var goret int + + goret = int(cret) + + return goret +} + +// RTPBufferDefaultClockRate wraps gst_rtp_buffer_default_clock_rate +// +// The function takes the following parameters: +// +// - payloadType uint8: the static payload type +// +// The function returns the following values: +// +// - goret uint32 +// +// Get the default clock-rate for the static payload type @payload_type. +func RTPBufferDefaultClockRate(payloadType uint8) uint32 { + var carg1 C.guint8 // in, none, casted + var cret C.guint32 // return, none, casted + + carg1 = C.guint8(payloadType) + + cret = C.gst_rtp_buffer_default_clock_rate(carg1) + runtime.KeepAlive(payloadType) + + var goret uint32 + + goret = uint32(cret) + + return goret +} + +// RTPBufferMap wraps gst_rtp_buffer_map +// +// The function takes the following parameters: +// +// - buffer *gst.Buffer: a #GstBuffer +// - flags gst.MapFlags: #GstMapFlags +// +// The function returns the following values: +// +// - rtp RTPBuffer: a #GstRTPBuffer +// - goret bool +// +// Map the contents of @buffer into @rtp. +func RTPBufferMap(buffer *gst.Buffer, flags gst.MapFlags) (RTPBuffer, bool) { + var carg1 *C.GstBuffer // in, none, converted + var carg2 C.GstMapFlags // in, none, casted + var carg3 C.GstRTPBuffer // out, transfer: none, C Pointers: 0, Name: RTPBuffer, caller-allocates + var cret C.gboolean // return + + carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) + carg2 = C.GstMapFlags(flags) + + cret = C.gst_rtp_buffer_map(carg1, carg2, &carg3) + runtime.KeepAlive(buffer) + runtime.KeepAlive(flags) + + var rtp RTPBuffer + var goret bool + + _ = rtp + _ = carg3 + panic("unimplemented conversion of RTPBuffer (GstRTPBuffer)") + if cret != 0 { + goret = true + } + + return rtp, goret +} + +// NewRTPBufferAllocate wraps gst_rtp_buffer_new_allocate +// +// The function takes the following parameters: +// +// - payloadLen uint: the length of the payload +// - padLen uint8: the amount of padding +// - csrcCount uint8: the number of CSRC entries +// +// The function returns the following values: +// +// - goret *gst.Buffer +// +// Allocate a new #GstBuffer with enough data to hold an RTP packet with +// @csrc_count CSRCs, a payload length of @payload_len and padding of @pad_len. +// All other RTP header fields will be set to 0/FALSE. +func NewRTPBufferAllocate(payloadLen uint, padLen uint8, csrcCount uint8) *gst.Buffer { + var carg1 C.guint // in, none, casted + var carg2 C.guint8 // in, none, casted + var carg3 C.guint8 // in, none, casted + var cret *C.GstBuffer // return, full, converted + + carg1 = C.guint(payloadLen) + carg2 = C.guint8(padLen) + carg3 = C.guint8(csrcCount) + + cret = C.gst_rtp_buffer_new_allocate(carg1, carg2, carg3) + runtime.KeepAlive(payloadLen) + runtime.KeepAlive(padLen) + runtime.KeepAlive(csrcCount) + + var goret *gst.Buffer + + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// NewRTPBufferAllocateLen wraps gst_rtp_buffer_new_allocate_len +// +// The function takes the following parameters: +// +// - packetLen uint: the total length of the packet +// - padLen uint8: the amount of padding +// - csrcCount uint8: the number of CSRC entries +// +// The function returns the following values: +// +// - goret *gst.Buffer +// +// Create a new #GstBuffer that can hold an RTP packet that is exactly +// @packet_len long. The length of the payload depends on @pad_len and +// @csrc_count and can be calculated with gst_rtp_buffer_calc_payload_len(). +// All RTP header fields will be set to 0/FALSE. +func NewRTPBufferAllocateLen(packetLen uint, padLen uint8, csrcCount uint8) *gst.Buffer { + var carg1 C.guint // in, none, casted + var carg2 C.guint8 // in, none, casted + var carg3 C.guint8 // in, none, casted + var cret *C.GstBuffer // return, full, converted + + carg1 = C.guint(packetLen) + carg2 = C.guint8(padLen) + carg3 = C.guint8(csrcCount) + + cret = C.gst_rtp_buffer_new_allocate_len(carg1, carg2, carg3) + runtime.KeepAlive(packetLen) + runtime.KeepAlive(padLen) + runtime.KeepAlive(csrcCount) + + var goret *gst.Buffer + + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + // GetCsrc wraps gst_rtp_buffer_get_csrc // // The function takes the following parameters: @@ -6713,7 +7246,7 @@ func UnsafeRTPHeaderExtensionClassToGlibFull(r *RTPHeaderExtensionClass) unsafe. // Set the URI for this RTP header extension implementation. func (klass *RTPHeaderExtensionClass) SetURI(uri string) { var carg0 *C.GstRTPHeaderExtensionClass // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstRTPHeaderExtensionClass)(UnsafeRTPHeaderExtensionClassToGlibNone(klass)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri))) @@ -6786,6 +7319,72 @@ func UnsafeRTPPayloadInfoToGlibFull(r *RTPPayloadInfo) unsafe.Pointer { r.native = nil // RTPPayloadInfo is invalid from here on return _p } +// RTPPayloadInfoForName wraps gst_rtp_payload_info_for_name +// +// The function takes the following parameters: +// +// - media string: the media to find +// - encodingName string: the encoding name to find +// +// The function returns the following values: +// +// - goret *RTPPayloadInfo +// +// Get the #GstRTPPayloadInfo for @media and @encoding_name. This function is +// mostly used to get the default clock-rate and bandwidth for dynamic payload +// types specified with @media and @encoding name. +// +// The search for @encoding_name will be performed in a case insensitive way. +func RTPPayloadInfoForName(media string, encodingName string) *RTPPayloadInfo { + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string + var cret *C.GstRTPPayloadInfo // return, none, converted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(media))) + defer C.free(unsafe.Pointer(carg1)) + carg2 = (*C.gchar)(unsafe.Pointer(C.CString(encodingName))) + defer C.free(unsafe.Pointer(carg2)) + + cret = C.gst_rtp_payload_info_for_name(carg1, carg2) + runtime.KeepAlive(media) + runtime.KeepAlive(encodingName) + + var goret *RTPPayloadInfo + + goret = UnsafeRTPPayloadInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + +// RTPPayloadInfoForPt wraps gst_rtp_payload_info_for_pt +// +// The function takes the following parameters: +// +// - payloadType uint8: the payload_type to find +// +// The function returns the following values: +// +// - goret *RTPPayloadInfo +// +// Get the #GstRTPPayloadInfo for @payload_type. This function is +// mostly used to get the default clock-rate and bandwidth for static payload +// types specified with @payload_type. +func RTPPayloadInfoForPt(payloadType uint8) *RTPPayloadInfo { + var carg1 C.guint8 // in, none, casted + var cret *C.GstRTPPayloadInfo // return, none, converted + + carg1 = C.guint8(payloadType) + + cret = C.gst_rtp_payload_info_for_pt(carg1) + runtime.KeepAlive(payloadType) + + var goret *RTPPayloadInfo + + goret = UnsafeRTPPayloadInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // RTPSourceMeta wraps GstRTPSourceMeta // // Meta describing the source(s) of the buffer. @@ -6848,6 +7447,22 @@ func UnsafeRTPSourceMetaToGlibFull(r *RTPSourceMeta) unsafe.Pointer { r.native = nil // RTPSourceMeta is invalid from here on return _p } +// RTPSourceMetaGetInfo wraps gst_rtp_source_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +func RTPSourceMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_rtp_source_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // AppendCsrc wraps gst_rtp_source_meta_append_csrc // // The function takes the following parameters: diff --git a/pkg/gstrtsp/gstrtsp.gen.go b/pkg/gstrtsp/gstrtsp.gen.go index 5fabb68..960f0fe 100644 --- a/pkg/gstrtsp/gstrtsp.gen.go +++ b/pkg/gstrtsp/gstrtsp.gen.go @@ -1,8 +1,9 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstRtsp-1. DO NOT EDIT. package gstrtsp import ( + "context" "fmt" "runtime" "strings" @@ -1384,7 +1385,7 @@ type RTSPConnectionAcceptCertificateFunc func(conn gio.TlsConnection, peerCert g // // Convert @header to a #GstRTSPHeaderField. func RtspFindHeaderField(header string) RTSPHeaderField { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.GstRTSPHeaderField // return, none, casted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(header))) @@ -1412,7 +1413,7 @@ func RtspFindHeaderField(header string) RTSPHeaderField { // // Convert @method to a #GstRTSPMethod. func RtspFindMethod(method string) RTSPMethod { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.GstRTSPMethod // return, none, casted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(method))) @@ -1450,13 +1451,13 @@ func RtspFindMethod(method string) RTSPMethod { // Currently only supported algorithm "md5". func RtspGenerateDigestAuthResponse(algorithm string, method string, realm string, username string, password string, uri string, nonce string) string { var carg1 *C.gchar // in, none, string, nullable-string - var carg2 *C.gchar // in, none, string, casted *C.gchar - var carg3 *C.gchar // in, none, string, casted *C.gchar - var carg4 *C.gchar // in, none, string, casted *C.gchar - var carg5 *C.gchar // in, none, string, casted *C.gchar - var carg6 *C.gchar // in, none, string, casted *C.gchar - var carg7 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, full, string, casted *C.gchar + var carg2 *C.gchar // in, none, string + var carg3 *C.gchar // in, none, string + var carg4 *C.gchar // in, none, string + var carg5 *C.gchar // in, none, string + var carg6 *C.gchar // in, none, string + var carg7 *C.gchar // in, none, string + var cret *C.gchar // return, full, string if algorithm != "" { carg1 = (*C.gchar)(unsafe.Pointer(C.CString(algorithm))) @@ -1515,11 +1516,11 @@ func RtspGenerateDigestAuthResponse(algorithm string, method string, realm strin // Currently only supported algorithm "md5". func RtspGenerateDigestAuthResponseFromMD5(algorithm string, method string, md5 string, uri string, nonce string) string { var carg1 *C.gchar // in, none, string, nullable-string - var carg2 *C.gchar // in, none, string, casted *C.gchar - var carg3 *C.gchar // in, none, string, casted *C.gchar - var carg4 *C.gchar // in, none, string, casted *C.gchar - var carg5 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, full, string, casted *C.gchar + var carg2 *C.gchar // in, none, string + var carg3 *C.gchar // in, none, string + var carg4 *C.gchar // in, none, string + var carg5 *C.gchar // in, none, string + var cret *C.gchar // return, full, string if algorithm != "" { carg1 = (*C.gchar)(unsafe.Pointer(C.CString(algorithm))) @@ -1591,7 +1592,7 @@ func RtspHeaderAllowMultiple(field RTSPHeaderField) bool { // Convert @field to a string. func RtspHeaderAsText(field RTSPHeaderField) string { var carg1 C.GstRTSPHeaderField // in, none, casted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg1 = C.GstRTSPHeaderField(field) @@ -1675,7 +1676,7 @@ func RtspMessageNewData(channel uint8) (*RTSPMessage, RTSPResult) { // request message in @msg. Free with gst_rtsp_message_free(). func RtspMessageNewRequest(method RTSPMethod, uri string) (*RTSPMessage, RTSPResult) { var carg2 C.GstRTSPMethod // in, none, casted - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string var carg1 *C.GstRTSPMessage // out, full, converted var cret C.GstRTSPResult // return, none, casted @@ -1759,7 +1760,7 @@ func RtspMessageNewResponse(code RTSPStatusCode, reason string, request *RTSPMes // Convert @options to a string. func RtspOptionsAsText(options RTSPMethod) string { var carg1 C.GstRTSPMethod // in, none, casted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = C.GstRTSPMethod(options) @@ -1787,7 +1788,7 @@ func RtspOptionsAsText(options RTSPMethod) string { // Convert the comma separated list @options to a #GstRTSPMethod bitwise or // of methods. This functions is the reverse of gst_rtsp_options_as_text(). func RtspOptionsFromText(options string) RTSPMethod { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.GstRTSPMethod // return, none, casted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(options))) @@ -1816,7 +1817,7 @@ func RtspOptionsFromText(options string) RTSPMethod { // Convert @code to a string. func RtspStatusAsText(code RTSPStatusCode) string { var carg1 C.GstRTSPStatusCode // in, none, casted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg1 = C.GstRTSPStatusCode(code) @@ -1843,7 +1844,7 @@ func RtspStatusAsText(code RTSPStatusCode) string { // Convert @result in a human readable string. func RtspStrresult(result RTSPResult) string { var carg1 C.GstRTSPResult // in, none, casted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = C.GstRTSPResult(result) @@ -1914,17 +1915,6 @@ type RTSPExtension interface { // // - goret bool DetectServer(*RTSPMessage) bool - // GetTransports wraps gst_rtsp_extension_get_transports - // - // The function takes the following parameters: - // - // - protocols RTSPLowerTrans - // - transport string - // - // The function returns the following values: - // - // - goret RTSPResult - GetTransports(RTSPLowerTrans, string) RTSPResult // ParseSdp wraps gst_rtsp_extension_parse_sdp // // The function takes the following parameters: @@ -2139,39 +2129,6 @@ func (ext *RTSPExtensionInstance) DetectServer(resp *RTSPMessage) bool { return goret } -// GetTransports wraps gst_rtsp_extension_get_transports -// -// The function takes the following parameters: -// -// - protocols RTSPLowerTrans -// - transport string -// -// The function returns the following values: -// -// - goret RTSPResult -func (ext *RTSPExtensionInstance) GetTransports(protocols RTSPLowerTrans, transport string) RTSPResult { - var carg0 *C.GstRTSPExtension // in, none, converted - var carg1 C.GstRTSPLowerTrans // in, none, casted - var carg2 **C.gchar // in, none, string, casted *C.gchar - var cret C.GstRTSPResult // return, none, casted - - carg0 = (*C.GstRTSPExtension)(UnsafeRTSPExtensionToGlibNone(ext)) - carg1 = C.GstRTSPLowerTrans(protocols) - carg2 = (**C.gchar)(unsafe.Pointer(C.CString(transport))) - defer C.free(unsafe.Pointer(carg2)) - - cret = C.gst_rtsp_extension_get_transports(carg0, carg1, carg2) - runtime.KeepAlive(ext) - runtime.KeepAlive(protocols) - runtime.KeepAlive(transport) - - var goret RTSPResult - - goret = RTSPResult(cret) - - return goret -} - // ParseSdp wraps gst_rtsp_extension_parse_sdp // // The function takes the following parameters: @@ -2555,6 +2512,130 @@ func UnsafeRTSPConnectionToGlibFull(r *RTSPConnection) unsafe.Pointer { r.native = nil // RTSPConnection is invalid from here on return _p } +// RTSPConnectionAccept wraps gst_rtsp_connection_accept +// +// The function takes the following parameters: +// +// - cancellable context.Context (nullable): a #GCancellable to cancel the operation +// - socket gio.Socket: a socket +// +// The function returns the following values: +// +// - conn *RTSPConnection (nullable): storage for a #GstRTSPConnection +// - goret RTSPResult +// +// Accept a new connection on @socket and create a new #GstRTSPConnection for +// handling communication on new socket. +func RTSPConnectionAccept(cancellable context.Context, socket gio.Socket) (*RTSPConnection, RTSPResult) { + var carg3 *C.GCancellable // in, none, converted, nullable + var carg1 *C.GSocket // in, none, converted + var carg2 *C.GstRTSPConnection // out, full, converted, nullable + var cret C.GstRTSPResult // return, none, casted + + if cancellable != nil { + carg3 = (*C.GCancellable)(gio.UnsafeGCancellableToGlibNone(cancellable)) + } + carg1 = (*C.GSocket)(gio.UnsafeSocketToGlibNone(socket)) + + cret = C.gst_rtsp_connection_accept(carg1, &carg2, carg3) + runtime.KeepAlive(cancellable) + runtime.KeepAlive(socket) + + var conn *RTSPConnection + var goret RTSPResult + + if carg2 != nil { + conn = UnsafeRTSPConnectionFromGlibFull(unsafe.Pointer(carg2)) + } + goret = RTSPResult(cret) + + return conn, goret +} + +// RTSPConnectionCreate wraps gst_rtsp_connection_create +// +// The function takes the following parameters: +// +// - url *RTSPUrl: a #GstRTSPUrl +// +// The function returns the following values: +// +// - conn *RTSPConnection: storage for a #GstRTSPConnection +// - goret RTSPResult +// +// Create a newly allocated #GstRTSPConnection from @url and store it in @conn. +// The connection will not yet attempt to connect to @url, use +// gst_rtsp_connection_connect(). +// +// A copy of @url will be made. +func RTSPConnectionCreate(url *RTSPUrl) (*RTSPConnection, RTSPResult) { + var carg1 *C.GstRTSPUrl // in, none, converted + var carg2 *C.GstRTSPConnection // out, full, converted + var cret C.GstRTSPResult // return, none, casted + + carg1 = (*C.GstRTSPUrl)(UnsafeRTSPUrlToGlibNone(url)) + + cret = C.gst_rtsp_connection_create(carg1, &carg2) + runtime.KeepAlive(url) + + var conn *RTSPConnection + var goret RTSPResult + + conn = UnsafeRTSPConnectionFromGlibFull(unsafe.Pointer(carg2)) + goret = RTSPResult(cret) + + return conn, goret +} + +// RTSPConnectionCreateFromSocket wraps gst_rtsp_connection_create_from_socket +// +// The function takes the following parameters: +// +// - socket gio.Socket: a #GSocket +// - ip string: the IP address of the other end +// - port uint16: the port used by the other end +// - initialBuffer string: data already read from @fd +// +// The function returns the following values: +// +// - conn *RTSPConnection (nullable): storage for a #GstRTSPConnection +// - goret RTSPResult +// +// Create a new #GstRTSPConnection for handling communication on the existing +// socket @socket. The @initial_buffer contains zero terminated data already +// read from @socket which should be used before starting to read new data. +func RTSPConnectionCreateFromSocket(socket gio.Socket, ip string, port uint16, initialBuffer string) (*RTSPConnection, RTSPResult) { + var carg1 *C.GSocket // in, none, converted + var carg2 *C.gchar // in, none, string + var carg3 C.guint16 // in, none, casted + var carg4 *C.gchar // in, none, string + var carg5 *C.GstRTSPConnection // out, full, converted, nullable + var cret C.GstRTSPResult // return, none, casted + + carg1 = (*C.GSocket)(gio.UnsafeSocketToGlibNone(socket)) + carg2 = (*C.gchar)(unsafe.Pointer(C.CString(ip))) + defer C.free(unsafe.Pointer(carg2)) + carg3 = C.guint16(port) + carg4 = (*C.gchar)(unsafe.Pointer(C.CString(initialBuffer))) + defer C.free(unsafe.Pointer(carg4)) + + cret = C.gst_rtsp_connection_create_from_socket(carg1, carg2, carg3, carg4, &carg5) + runtime.KeepAlive(socket) + runtime.KeepAlive(ip) + runtime.KeepAlive(port) + runtime.KeepAlive(initialBuffer) + + var conn *RTSPConnection + var goret RTSPResult + + if carg5 != nil { + conn = UnsafeRTSPConnectionFromGlibFull(unsafe.Pointer(carg5)) + } + goret = RTSPResult(cret) + + return conn, goret +} + // AddExtraHTTPRequestHeader wraps gst_rtsp_connection_add_extra_http_request_header // // The function takes the following parameters: @@ -2568,8 +2649,8 @@ func UnsafeRTSPConnectionToGlibFull(r *RTSPConnection) unsafe.Pointer { // Only applicable in HTTP tunnel mode. func (conn *RTSPConnection) AddExtraHTTPRequestHeader(key string, value string) { var carg0 *C.GstRTSPConnection // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string carg0 = (*C.GstRTSPConnection)(UnsafeRTSPConnectionToGlibNone(conn)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -2799,7 +2880,7 @@ func (conn *RTSPConnection) GetIgnoreXServerReply() bool { // Retrieve the IP address of the other end of @conn. func (conn *RTSPConnection) GetIP() string { var carg0 *C.GstRTSPConnection // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstRTSPConnection)(UnsafeRTSPConnectionToGlibNone(conn)) @@ -2980,7 +3061,7 @@ func (conn *RTSPConnection) GetTLSValidationFlags() gio.TLSCertificateFlags { // Get the tunnel session id the connection. func (conn *RTSPConnection) GetTunnelid() string { var carg0 *C.GstRTSPConnection // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstRTSPConnection)(UnsafeRTSPConnectionToGlibNone(conn)) @@ -3358,8 +3439,8 @@ func (conn *RTSPConnection) SetAcceptCertificateFunc(fn RTSPConnectionAcceptCert func (conn *RTSPConnection) SetAuth(method RTSPAuthMethod, user string, pass string) RTSPResult { var carg0 *C.GstRTSPConnection // in, none, converted var carg1 C.GstRTSPAuthMethod // in, none, casted - var carg2 *C.gchar // in, none, string, casted *C.gchar - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string + var carg3 *C.gchar // in, none, string var cret C.GstRTSPResult // return, none, casted carg0 = (*C.GstRTSPConnection)(UnsafeRTSPConnectionToGlibNone(conn)) @@ -3396,8 +3477,8 @@ func (conn *RTSPConnection) SetAuth(method RTSPAuthMethod, user string, pass str // nonce, opaque, stale, algorithm, qop as per RFC2617. func (conn *RTSPConnection) SetAuthParam(param string, value string) { var carg0 *C.GstRTSPConnection // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string carg0 = (*C.GstRTSPConnection)(UnsafeRTSPConnectionToGlibNone(conn)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(param))) @@ -3487,7 +3568,7 @@ func (conn *RTSPConnection) SetIgnoreXServerReply(ignore bool) { // Set the IP address of the server. func (conn *RTSPConnection) SetIP(ip string) { var carg0 *C.GstRTSPConnection // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstRTSPConnection)(UnsafeRTSPConnectionToGlibNone(conn)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(ip))) @@ -3512,7 +3593,7 @@ func (conn *RTSPConnection) SetIP(ip string) { // Set the proxy host and port. func (conn *RTSPConnection) SetProxy(host string, port uint) RTSPResult { var carg0 *C.GstRTSPConnection // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // in, none, casted var cret C.GstRTSPResult // return, none, casted @@ -3891,7 +3972,7 @@ func UnsafeRTSPMessageToGlibFull(r *RTSPMessage) unsafe.Pointer { func (msg *RTSPMessage) AddHeader(field RTSPHeaderField, value string) RTSPResult { var carg0 *C.GstRTSPMessage // in, none, converted var carg1 C.GstRTSPHeaderField // in, none, casted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var cret C.GstRTSPResult // return, none, casted carg0 = (*C.GstRTSPMessage)(UnsafeRTSPMessageToGlibNone(msg)) @@ -3926,8 +4007,8 @@ func (msg *RTSPMessage) AddHeader(field RTSPHeaderField, value string) RTSPResul // of @value. func (msg *RTSPMessage) AddHeaderByName(header string, value string) RTSPResult { var carg0 *C.GstRTSPMessage // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string var cret C.GstRTSPResult // return, none, casted carg0 = (*C.GstRTSPMessage)(UnsafeRTSPMessageToGlibNone(msg)) @@ -4048,7 +4129,7 @@ func (msg *RTSPMessage) GetHeader(field RTSPHeaderField, indx int) (string, RTSP var carg0 *C.GstRTSPMessage // in, none, converted var carg1 C.GstRTSPHeaderField // in, none, casted var carg3 C.gint // in, none, casted - var carg2 *C.gchar // out, none, string, casted *C.gchar, nullable + var carg2 *C.gchar // out, none, string, nullable-string var cret C.GstRTSPResult // return, none, casted carg0 = (*C.GstRTSPMessage)(UnsafeRTSPMessageToGlibNone(msg)) @@ -4087,9 +4168,9 @@ func (msg *RTSPMessage) GetHeader(field RTSPHeaderField, indx int) (string, RTSP // stays valid as long as it remains present in @msg. func (msg *RTSPMessage) GetHeaderByName(header string, index int) (string, RTSPResult) { var carg0 *C.GstRTSPMessage // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg3 C.gint // in, none, casted - var carg2 *C.gchar // out, none, string, casted *C.gchar, nullable + var carg2 *C.gchar // out, none, string, nullable-string var cret C.GstRTSPResult // return, none, casted carg0 = (*C.GstRTSPMessage)(UnsafeRTSPMessageToGlibNone(msg)) @@ -4228,7 +4309,7 @@ func (msg *RTSPMessage) InitData(channel uint8) RTSPResult { func (msg *RTSPMessage) InitRequest(method RTSPMethod, uri string) RTSPResult { var carg0 *C.GstRTSPMessage // in, none, converted var carg1 C.GstRTSPMethod // in, none, casted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var cret C.GstRTSPResult // return, none, casted carg0 = (*C.GstRTSPMessage)(UnsafeRTSPMessageToGlibNone(msg)) @@ -4370,7 +4451,7 @@ func (msg *RTSPMessage) ParseData() (uint8, RTSPResult) { func (msg *RTSPMessage) ParseRequest() (RTSPMethod, string, RTSPVersion, RTSPResult) { var carg0 *C.GstRTSPMessage // in, none, converted var carg1 C.GstRTSPMethod // out, full, casted - var carg2 *C.gchar // out, none, string, casted *C.gchar + var carg2 *C.gchar // out, none, string var carg3 C.GstRTSPVersion // out, none, casted var cret C.GstRTSPResult // return, none, casted @@ -4408,7 +4489,7 @@ func (msg *RTSPMessage) ParseRequest() (RTSPMethod, string, RTSPVersion, RTSPRes func (msg *RTSPMessage) ParseResponse() (RTSPStatusCode, string, RTSPVersion, RTSPResult) { var carg0 *C.GstRTSPMessage // in, none, converted var carg1 C.GstRTSPStatusCode // out, full, casted - var carg2 *C.gchar // out, none, string, casted *C.gchar + var carg2 *C.gchar // out, none, string var carg3 C.GstRTSPVersion // out, none, casted var cret C.GstRTSPResult // return, none, casted @@ -4480,7 +4561,7 @@ func (msg *RTSPMessage) RemoveHeader(field RTSPHeaderField, indx int) RTSPResult // all matching headers will be removed. func (msg *RTSPMessage) RemoveHeaderByName(header string, index int) RTSPResult { var carg0 *C.GstRTSPMessage // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.gint // in, none, casted var cret C.GstRTSPResult // return, none, casted @@ -4680,7 +4761,7 @@ func (msg *RTSPMessage) TakeBodyBuffer(buffer *gst.Buffer) RTSPResult { func (msg *RTSPMessage) TakeHeader(field RTSPHeaderField, value string) RTSPResult { var carg0 *C.GstRTSPMessage // in, none, converted var carg1 C.GstRTSPHeaderField // in, none, casted - var carg2 *C.gchar // in, full, string, casted *C.gchar + var carg2 *C.gchar // in, full, string var cret C.GstRTSPResult // return, none, casted carg0 = (*C.GstRTSPMessage)(UnsafeRTSPMessageToGlibNone(msg)) @@ -4714,8 +4795,8 @@ func (msg *RTSPMessage) TakeHeader(field RTSPHeaderField, value string) RTSPResu // ownership of @value, but not of @header. func (msg *RTSPMessage) TakeHeaderByName(header string, value string) RTSPResult { var carg0 *C.GstRTSPMessage // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, full, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, full, string var cret C.GstRTSPResult // return, none, casted carg0 = (*C.GstRTSPMessage)(UnsafeRTSPMessageToGlibNone(msg)) @@ -4822,6 +4903,160 @@ func UnsafeRTSPRangeToGlibFull(r *RTSPRange) unsafe.Pointer { r.native = nil // RTSPRange is invalid from here on return _p } +// RTSPRangeConvertUnits wraps gst_rtsp_range_convert_units +// +// The function takes the following parameters: +// +// - _range *RTSPTimeRange: a #GstRTSPTimeRange +// - unit RTSPRangeUnit: the unit to convert the range into +// +// The function returns the following values: +// +// - goret bool +// +// Converts the range in-place between different types of units. +// Ranges containing the special value #GST_RTSP_TIME_NOW can not be +// converted as these are only valid for #GST_RTSP_RANGE_NPT. +func RTSPRangeConvertUnits(_range *RTSPTimeRange, unit RTSPRangeUnit) bool { + var carg1 *C.GstRTSPTimeRange // in, none, converted + var carg2 C.GstRTSPRangeUnit // in, none, casted + var cret C.gboolean // return + + carg1 = (*C.GstRTSPTimeRange)(UnsafeRTSPTimeRangeToGlibNone(_range)) + carg2 = C.GstRTSPRangeUnit(unit) + + cret = C.gst_rtsp_range_convert_units(carg1, carg2) + runtime.KeepAlive(_range) + runtime.KeepAlive(unit) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + +// RTSPRangeFree wraps gst_rtsp_range_free +// +// The function takes the following parameters: +// +// - _range *RTSPTimeRange: a #GstRTSPTimeRange +// +// Free the memory allocated by @range. +func RTSPRangeFree(_range *RTSPTimeRange) { + var carg1 *C.GstRTSPTimeRange // in, none, converted + + carg1 = (*C.GstRTSPTimeRange)(UnsafeRTSPTimeRangeToGlibNone(_range)) + + C.gst_rtsp_range_free(carg1) + runtime.KeepAlive(_range) +} + +// RTSPRangeGetTimes wraps gst_rtsp_range_get_times +// +// The function takes the following parameters: +// +// - _range *RTSPTimeRange: a #GstRTSPTimeRange +// +// The function returns the following values: +// +// - min gst.ClockTime: result minimum #GstClockTime +// - max gst.ClockTime: result maximum #GstClockTime +// - goret bool +// +// Retrieve the minimum and maximum values from @range converted to +// #GstClockTime in @min and @max. +// +// A value of %GST_CLOCK_TIME_NONE will be used to signal #GST_RTSP_TIME_NOW +// and #GST_RTSP_TIME_END for @min and @max respectively. +// +// UTC times will be converted to nanoseconds since 1900. +func RTSPRangeGetTimes(_range *RTSPTimeRange) (gst.ClockTime, gst.ClockTime, bool) { + var carg1 *C.GstRTSPTimeRange // in, none, converted + var carg2 C.GstClockTime // out, full, casted, alias + var carg3 C.GstClockTime // out, full, casted, alias + var cret C.gboolean // return + + carg1 = (*C.GstRTSPTimeRange)(UnsafeRTSPTimeRangeToGlibNone(_range)) + + cret = C.gst_rtsp_range_get_times(carg1, &carg2, &carg3) + runtime.KeepAlive(_range) + + var min gst.ClockTime + var max gst.ClockTime + var goret bool + + min = gst.ClockTime(carg2) + max = gst.ClockTime(carg3) + if cret != 0 { + goret = true + } + + return min, max, goret +} + +// RTSPRangeParse wraps gst_rtsp_range_parse +// +// The function takes the following parameters: +// +// - rangestr string: a range string to parse +// +// The function returns the following values: +// +// - _range *RTSPTimeRange: location to hold the #GstRTSPTimeRange result +// - goret RTSPResult +// +// Parse @rangestr to a #GstRTSPTimeRange. +func RTSPRangeParse(rangestr string) (*RTSPTimeRange, RTSPResult) { + var carg1 *C.gchar // in, none, string + var carg2 *C.GstRTSPTimeRange // out, full, converted + var cret C.GstRTSPResult // return, none, casted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(rangestr))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_rtsp_range_parse(carg1, &carg2) + runtime.KeepAlive(rangestr) + + var _range *RTSPTimeRange + var goret RTSPResult + + _range = UnsafeRTSPTimeRangeFromGlibFull(unsafe.Pointer(carg2)) + goret = RTSPResult(cret) + + return _range, goret +} + +// RTSPRangeToString wraps gst_rtsp_range_to_string +// +// The function takes the following parameters: +// +// - _range *RTSPTimeRange: a #GstRTSPTimeRange +// +// The function returns the following values: +// +// - goret string +// +// Convert @range into a string representation. +func RTSPRangeToString(_range *RTSPTimeRange) string { + var carg1 *C.GstRTSPTimeRange // in, none, converted + var cret *C.gchar // return, full, string + + carg1 = (*C.GstRTSPTimeRange)(UnsafeRTSPTimeRangeToGlibNone(_range)) + + cret = C.gst_rtsp_range_to_string(carg1) + runtime.KeepAlive(_range) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + + return goret +} + // RTSPTime wraps GstRTSPTime // // A time indication. @@ -5070,6 +5305,166 @@ func UnsafeRTSPTransportToGlibFull(r *RTSPTransport) unsafe.Pointer { r.native = nil // RTSPTransport is invalid from here on return _p } +// RTSPTransportGetManager wraps gst_rtsp_transport_get_manager +// +// The function takes the following parameters: +// +// - trans RTSPTransMode: a #GstRTSPTransMode +// - option uint: option index. +// +// The function returns the following values: +// +// - manager string (nullable): location to hold the result +// - goret RTSPResult +// +// Get the #GstElement that can handle the buffers transported over @trans. +// +// It is possible that there are several managers available, use @option to +// selected one. +// +// @manager will contain an element name or %NULL when no manager is +// needed/available for @trans. +func RTSPTransportGetManager(trans RTSPTransMode, option uint) (string, RTSPResult) { + var carg1 C.GstRTSPTransMode // in, none, casted + var carg3 C.guint // in, none, casted + var carg2 *C.gchar // out, none, string, nullable-string + var cret C.GstRTSPResult // return, none, casted + + carg1 = C.GstRTSPTransMode(trans) + carg3 = C.guint(option) + + cret = C.gst_rtsp_transport_get_manager(carg1, &carg2, carg3) + runtime.KeepAlive(trans) + runtime.KeepAlive(option) + + var manager string + var goret RTSPResult + + if carg2 != nil { + manager = C.GoString((*C.char)(unsafe.Pointer(carg2))) + } + goret = RTSPResult(cret) + + return manager, goret +} + +// RTSPTransportGetMIME wraps gst_rtsp_transport_get_mime +// +// The function takes the following parameters: +// +// - trans RTSPTransMode: a #GstRTSPTransMode +// +// The function returns the following values: +// +// - mime string: location to hold the result +// - goret RTSPResult +// +// Get the mime type of the transport mode @trans. This mime type is typically +// used to generate #GstCaps events. +// +// Deprecated: This functions only deals with the GstRTSPTransMode and only +// returns the mime type for #GST_RTSP_PROFILE_AVP. Use +// gst_rtsp_transport_get_media_type() instead. +func RTSPTransportGetMIME(trans RTSPTransMode) (string, RTSPResult) { + var carg1 C.GstRTSPTransMode // in, none, casted + var carg2 *C.gchar // out, none, string + var cret C.GstRTSPResult // return, none, casted + + carg1 = C.GstRTSPTransMode(trans) + + cret = C.gst_rtsp_transport_get_mime(carg1, &carg2) + runtime.KeepAlive(trans) + + var mime string + var goret RTSPResult + + mime = C.GoString((*C.char)(unsafe.Pointer(carg2))) + goret = RTSPResult(cret) + + return mime, goret +} + +// RTSPTransportInit wraps gst_rtsp_transport_init +// The function returns the following values: +// +// - transport RTSPTransport: a #GstRTSPTransport +// - goret RTSPResult +// +// Initialize @transport so that it can be used. +func RTSPTransportInit() (RTSPTransport, RTSPResult) { + var carg1 C.GstRTSPTransport // out, transfer: none, C Pointers: 0, Name: RTSPTransport, caller-allocates + var cret C.GstRTSPResult // return, none, casted + + cret = C.gst_rtsp_transport_init(&carg1) + + var transport RTSPTransport + var goret RTSPResult + + _ = transport + _ = carg1 + panic("unimplemented conversion of RTSPTransport (GstRTSPTransport)") + goret = RTSPResult(cret) + + return transport, goret +} + +// NewRTSPTransport wraps gst_rtsp_transport_new +// The function returns the following values: +// +// - transport *RTSPTransport: location to hold the new #GstRTSPTransport +// - goret RTSPResult +// +// Allocate a new initialized #GstRTSPTransport. Use gst_rtsp_transport_free() +// after usage. +func NewRTSPTransport() (*RTSPTransport, RTSPResult) { + var carg1 *C.GstRTSPTransport // out, full, converted + var cret C.GstRTSPResult // return, none, casted + + cret = C.gst_rtsp_transport_new(&carg1) + + var transport *RTSPTransport + var goret RTSPResult + + transport = UnsafeRTSPTransportFromGlibFull(unsafe.Pointer(carg1)) + goret = RTSPResult(cret) + + return transport, goret +} + +// RTSPTransportParse wraps gst_rtsp_transport_parse +// +// The function takes the following parameters: +// +// - str string: a transport string +// +// The function returns the following values: +// +// - transport RTSPTransport: a #GstRTSPTransport +// - goret RTSPResult +// +// Parse the RTSP transport string @str into @transport. +func RTSPTransportParse(str string) (RTSPTransport, RTSPResult) { + var carg1 *C.gchar // in, none, string + var carg2 C.GstRTSPTransport // out, transfer: none, C Pointers: 0, Name: RTSPTransport, caller-allocates + var cret C.GstRTSPResult // return, none, casted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(str))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_rtsp_transport_parse(carg1, &carg2) + runtime.KeepAlive(str) + + var transport RTSPTransport + var goret RTSPResult + + _ = transport + _ = carg2 + panic("unimplemented conversion of RTSPTransport (GstRTSPTransport)") + goret = RTSPResult(cret) + + return transport, goret +} + // AsText wraps gst_rtsp_transport_as_text // The function returns the following values: // @@ -5079,7 +5474,7 @@ func UnsafeRTSPTransportToGlibFull(r *RTSPTransport) unsafe.Pointer { // an RTSP SETUP response. func (transport *RTSPTransport) AsText() string { var carg0 *C.GstRTSPTransport // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstRTSPTransport)(UnsafeRTSPTransportToGlibNone(transport)) @@ -5104,7 +5499,7 @@ func (transport *RTSPTransport) AsText() string { // used to generate #GstCaps events. func (transport *RTSPTransport) GetMediaType() (string, RTSPResult) { var carg0 *C.GstRTSPTransport // in, none, converted - var carg1 *C.gchar // out, none, string, casted *C.gchar + var carg1 *C.gchar // out, none, string var cret C.GstRTSPResult // return, none, casted carg0 = (*C.GstRTSPTransport)(UnsafeRTSPTransportToGlibNone(transport)) @@ -5195,6 +5590,41 @@ func UnsafeRTSPUrlToGlibFull(r *RTSPUrl) unsafe.Pointer { r.native = nil // RTSPUrl is invalid from here on return _p } +// RTSPUrlParse wraps gst_rtsp_url_parse +// +// The function takes the following parameters: +// +// - urlstr string: the url string to parse +// +// The function returns the following values: +// +// - url *RTSPUrl (nullable): location to hold the result. +// - goret RTSPResult +// +// Parse the RTSP @urlstr into a newly allocated #GstRTSPUrl. Free after usage +// with gst_rtsp_url_free(). +func RTSPUrlParse(urlstr string) (*RTSPUrl, RTSPResult) { + var carg1 *C.gchar // in, none, string + var carg2 *C.GstRTSPUrl // out, full, converted, nullable + var cret C.GstRTSPResult // return, none, casted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(urlstr))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_rtsp_url_parse(carg1, &carg2) + runtime.KeepAlive(urlstr) + + var url *RTSPUrl + var goret RTSPResult + + if carg2 != nil { + url = UnsafeRTSPUrlFromGlibFull(unsafe.Pointer(carg2)) + } + goret = RTSPResult(cret) + + return url, goret +} + // Copy wraps gst_rtsp_url_copy // The function returns the following values: // @@ -5285,7 +5715,7 @@ func (url *RTSPUrl) GetPort() (uint16, RTSPResult) { // Get a newly allocated string describing the request URI for @url. func (url *RTSPUrl) GetRequestURI() string { var carg0 *C.GstRTSPUrl // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstRTSPUrl)(UnsafeRTSPUrlToGlibNone(url)) @@ -5314,8 +5744,8 @@ func (url *RTSPUrl) GetRequestURI() string { // combined with the control path for @control_path func (url *RTSPUrl) GetRequestURIWithControl(controlPath string) string { var carg0 *C.GstRTSPUrl // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, full, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, full, string carg0 = (*C.GstRTSPUrl)(UnsafeRTSPUrlToGlibNone(url)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(controlPath))) diff --git a/pkg/gstrtsp/gstrtsp_export.gen.go b/pkg/gstrtsp/gstrtsp_export.gen.go index b7d8703..894e70f 100644 --- a/pkg/gstrtsp/gstrtsp_export.gen.go +++ b/pkg/gstrtsp/gstrtsp_export.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstRtsp-1. DO NOT EDIT. package gstrtsp diff --git a/pkg/gstsdp/gstsdp.gen.go b/pkg/gstsdp/gstsdp.gen.go index faa338f..0b0b16d 100644 --- a/pkg/gstsdp/gstsdp.gen.go +++ b/pkg/gstsdp/gstsdp.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstSdp-1. DO NOT EDIT. package gstsdp @@ -542,9 +542,9 @@ func (e SDPResult) String() string { // // Check if the given @addr is a multicast address. func SdpAddressIsMulticast(nettype string, addrtype string, addr string) bool { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string + var carg3 *C.gchar // in, none, string var cret C.gboolean // return carg1 = (*C.gchar)(unsafe.Pointer(C.CString(nettype))) @@ -581,9 +581,9 @@ func SdpAddressIsMulticast(nettype string, addrtype string, addr string) bool { // // Makes key management data func SdpMakeKeymgmt(uri string, base64 string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, full, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string + var cret *C.gchar // return, full, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri))) defer C.free(unsafe.Pointer(carg1)) @@ -1154,7 +1154,7 @@ func (msg *MIKEYMessage) AddTNowNtpUTC() bool { // - goret string func (msg *MIKEYMessage) Base64Encode() string { var carg0 *C.GstMIKEYMessage // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstMIKEYMessage)(UnsafeMIKEYMessageToGlibNone(msg)) @@ -2830,7 +2830,7 @@ func (attr *SDPAttribute) Clear() SDPResult { // Set the attribute with @key and @value. func (attr *SDPAttribute) Set(key string, value string) SDPResult { var carg0 *C.GstSDPAttribute // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 *C.gchar // in, none, string, nullable-string var cret C.GstSDPResult // return, none, casted @@ -2953,7 +2953,7 @@ func (bw *SDPBandwidth) Clear() SDPResult { // Set bandwidth information in @bw. func (bw *SDPBandwidth) Set(bwtype string, bandwidth uint) SDPResult { var carg0 *C.GstSDPBandwidth // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // in, none, casted var cret C.GstSDPResult // return, none, casted @@ -3076,9 +3076,9 @@ func (conn *SDPConnection) Clear() SDPResult { // Set the connection with the given parameters. func (conn *SDPConnection) Set(nettype string, addrtype string, address string, ttl uint, addrNumber uint) SDPResult { var carg0 *C.GstSDPConnection // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string + var carg3 *C.gchar // in, none, string var carg4 C.guint // in, none, casted var carg5 C.guint // in, none, casted var cret C.GstSDPResult // return, none, casted @@ -3233,6 +3233,100 @@ func UnsafeSDPMediaToGlibFull(s *SDPMedia) unsafe.Pointer { s.native = nil // SDPMedia is invalid from here on return _p } +// SDPMediaInit wraps gst_sdp_media_init +// The function returns the following values: +// +// - media SDPMedia: a #GstSDPMedia +// - goret SDPResult +// +// Initialize @media so that its contents are as if it was freshly allocated +// with gst_sdp_media_new(). This function is mostly used to initialize a media +// allocated on the stack. gst_sdp_media_uninit() undoes this operation. +// +// When this function is invoked on newly allocated data (with malloc or on the +// stack), its contents should be set to 0 before calling this function. +func SDPMediaInit() (SDPMedia, SDPResult) { + var carg1 C.GstSDPMedia // out, transfer: none, C Pointers: 0, Name: SDPMedia, caller-allocates + var cret C.GstSDPResult // return, none, casted + + cret = C.gst_sdp_media_init(&carg1) + + var media SDPMedia + var goret SDPResult + + _ = media + _ = carg1 + panic("unimplemented conversion of SDPMedia (GstSDPMedia)") + goret = SDPResult(cret) + + return media, goret +} + +// NewSDPMedia wraps gst_sdp_media_new +// The function returns the following values: +// +// - media *SDPMedia: pointer to new #GstSDPMedia +// - goret SDPResult +// +// Allocate a new GstSDPMedia and store the result in @media. +func NewSDPMedia() (*SDPMedia, SDPResult) { + var carg1 *C.GstSDPMedia // out, full, converted + var cret C.GstSDPResult // return, none, casted + + cret = C.gst_sdp_media_new(&carg1) + + var media *SDPMedia + var goret SDPResult + + media = UnsafeSDPMediaFromGlibFull(unsafe.Pointer(carg1)) + goret = SDPResult(cret) + + return media, goret +} + +// SDPMediaSetMediaFromCaps wraps gst_sdp_media_set_media_from_caps +// +// The function takes the following parameters: +// +// - caps *gst.Caps: a #GstCaps +// +// The function returns the following values: +// +// - media SDPMedia: a #GstSDPMedia +// - goret SDPResult +// +// Mapping of caps to SDP fields: +// +// a=rtpmap:(payload) (encoding_name) or (clock_rate)[or (encoding_params)] +// +// a=framesize:(payload) (width)-(height) +// +// a=fmtp:(payload) (param)[=(value)];... +// +// a=rtcp-fb:(payload) (param1) [param2]... +// +// a=extmap:(id)[/direction] (extensionname) (extensionattributes) +func SDPMediaSetMediaFromCaps(caps *gst.Caps) (SDPMedia, SDPResult) { + var carg1 *C.GstCaps // in, none, converted + var carg2 C.GstSDPMedia // out, transfer: none, C Pointers: 0, Name: SDPMedia, caller-allocates + var cret C.GstSDPResult // return, none, casted + + carg1 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(caps)) + + cret = C.gst_sdp_media_set_media_from_caps(carg1, &carg2) + runtime.KeepAlive(caps) + + var media SDPMedia + var goret SDPResult + + _ = media + _ = carg2 + panic("unimplemented conversion of SDPMedia (GstSDPMedia)") + goret = SDPResult(cret) + + return media, goret +} + // AddAttribute wraps gst_sdp_media_add_attribute // // The function takes the following parameters: @@ -3247,7 +3341,7 @@ func UnsafeSDPMediaToGlibFull(s *SDPMedia) unsafe.Pointer { // Add the attribute with @key and @value to @media. func (media *SDPMedia) AddAttribute(key string, value string) SDPResult { var carg0 *C.GstSDPMedia // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 *C.gchar // in, none, string, nullable-string var cret C.GstSDPResult // return, none, casted @@ -3285,7 +3379,7 @@ func (media *SDPMedia) AddAttribute(key string, value string) SDPResult { // Add the bandwidth information with @bwtype and @bandwidth to @media. func (media *SDPMedia) AddBandwidth(bwtype string, bandwidth uint) SDPResult { var carg0 *C.GstSDPMedia // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // in, none, casted var cret C.GstSDPResult // return, none, casted @@ -3324,9 +3418,9 @@ func (media *SDPMedia) AddBandwidth(bwtype string, bandwidth uint) SDPResult { // Add the given connection parameters to @media. func (media *SDPMedia) AddConnection(nettype string, addrtype string, address string, ttl uint, addrNumber uint) SDPResult { var carg0 *C.GstSDPMedia // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string + var carg3 *C.gchar // in, none, string var carg4 C.guint // in, none, casted var carg5 C.guint // in, none, casted var cret C.GstSDPResult // return, none, casted @@ -3369,7 +3463,7 @@ func (media *SDPMedia) AddConnection(nettype string, addrtype string, address st // Add the format information to @media. func (media *SDPMedia) AddFormat(format string) SDPResult { var carg0 *C.GstSDPMedia // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.GstSDPResult // return, none, casted carg0 = (*C.GstSDPMedia)(UnsafeSDPMediaToGlibNone(media)) @@ -3395,7 +3489,7 @@ func (media *SDPMedia) AddFormat(format string) SDPResult { // Convert the contents of @media to a text string. func (media *SDPMedia) AsText() string { var carg0 *C.GstSDPMedia // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstSDPMedia)(UnsafeSDPMediaToGlibNone(media)) @@ -3598,8 +3692,8 @@ func (media *SDPMedia) GetAttribute(idx uint) *SDPAttribute { // Get the first attribute value for @key in @media. func (media *SDPMedia) GetAttributeVal(key string) string { var carg0 *C.GstSDPMedia // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg0 = (*C.GstSDPMedia)(UnsafeSDPMediaToGlibNone(media)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -3630,9 +3724,9 @@ func (media *SDPMedia) GetAttributeVal(key string) string { // Get the @nth attribute value for @key in @media. func (media *SDPMedia) GetAttributeValN(key string, nth uint) string { var carg0 *C.GstSDPMedia // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // in, none, casted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstSDPMedia)(UnsafeSDPMediaToGlibNone(media)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -3763,7 +3857,7 @@ func (media *SDPMedia) GetConnection(idx uint) *SDPConnection { func (media *SDPMedia) GetFormat(idx uint) string { var carg0 *C.GstSDPMedia // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstSDPMedia)(UnsafeSDPMediaToGlibNone(media)) carg1 = C.guint(idx) @@ -3787,7 +3881,7 @@ func (media *SDPMedia) GetFormat(idx uint) string { // Get the information of @media func (media *SDPMedia) GetInformation() string { var carg0 *C.GstSDPMedia // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstSDPMedia)(UnsafeSDPMediaToGlibNone(media)) @@ -3831,7 +3925,7 @@ func (media *SDPMedia) GetKey() *SDPKey { // Get the media description of @media. func (media *SDPMedia) GetMedia() string { var carg0 *C.GstSDPMedia // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstSDPMedia)(UnsafeSDPMediaToGlibNone(media)) @@ -3897,7 +3991,7 @@ func (media *SDPMedia) GetPort() uint { // Get the transport protocol of @media func (media *SDPMedia) GetProto() string { var carg0 *C.GstSDPMedia // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstSDPMedia)(UnsafeSDPMediaToGlibNone(media)) @@ -4032,7 +4126,7 @@ func (media *SDPMedia) InsertConnection(idx int, conn *SDPConnection) SDPResult func (media *SDPMedia) InsertFormat(idx int, format string) SDPResult { var carg0 *C.GstSDPMedia // in, none, converted var carg1 C.gint // in, none, casted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var cret C.GstSDPResult // return, none, casted carg0 = (*C.GstSDPMedia)(UnsafeSDPMediaToGlibNone(media)) @@ -4316,7 +4410,7 @@ func (media *SDPMedia) ReplaceConnection(idx uint, conn *SDPConnection) SDPResul func (media *SDPMedia) ReplaceFormat(idx uint, format string) SDPResult { var carg0 *C.GstSDPMedia // in, none, converted var carg1 C.guint // in, none, casted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var cret C.GstSDPResult // return, none, casted carg0 = (*C.GstSDPMedia)(UnsafeSDPMediaToGlibNone(media)) @@ -4349,7 +4443,7 @@ func (media *SDPMedia) ReplaceFormat(idx uint, format string) SDPResult { // Set the media information of @media to @information. func (media *SDPMedia) SetInformation(information string) SDPResult { var carg0 *C.GstSDPMedia // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.GstSDPResult // return, none, casted carg0 = (*C.GstSDPMedia)(UnsafeSDPMediaToGlibNone(media)) @@ -4381,8 +4475,8 @@ func (media *SDPMedia) SetInformation(information string) SDPResult { // Adds the encryption information to @media. func (media *SDPMedia) SetKey(typ string, data string) SDPResult { var carg0 *C.GstSDPMedia // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string var cret C.GstSDPResult // return, none, casted carg0 = (*C.GstSDPMedia)(UnsafeSDPMediaToGlibNone(media)) @@ -4416,7 +4510,7 @@ func (media *SDPMedia) SetKey(typ string, data string) SDPResult { // Set the media description of @media to @med. func (media *SDPMedia) SetMedia(med string) SDPResult { var carg0 *C.GstSDPMedia // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.GstSDPResult // return, none, casted carg0 = (*C.GstSDPMedia)(UnsafeSDPMediaToGlibNone(media)) @@ -4481,7 +4575,7 @@ func (media *SDPMedia) SetPortInfo(port uint, numPorts uint) SDPResult { // Set the media transport protocol of @media to @proto. func (media *SDPMedia) SetProto(proto string) SDPResult { var carg0 *C.GstSDPMedia // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.GstSDPResult // return, none, casted carg0 = (*C.GstSDPMedia)(UnsafeSDPMediaToGlibNone(media)) @@ -4598,6 +4692,202 @@ func UnsafeSDPMessageToGlibFull(s *SDPMessage) unsafe.Pointer { s.native = nil // SDPMessage is invalid from here on return _p } +// SDPMessageAsURI wraps gst_sdp_message_as_uri +// +// The function takes the following parameters: +// +// - scheme string: the uri scheme +// - msg *SDPMessage: the #GstSDPMessage +// +// The function returns the following values: +// +// - goret string +// +// Creates a uri from @msg with the given @scheme. The uri has the format: +// +// \@scheme:///[#type=value *[&type=value]] +// +// Where each value is url encoded. +func SDPMessageAsURI(scheme string, msg *SDPMessage) string { + var carg1 *C.gchar // in, none, string + var carg2 *C.GstSDPMessage // in, none, converted + var cret *C.gchar // return, full, string + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(scheme))) + defer C.free(unsafe.Pointer(carg1)) + carg2 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) + + cret = C.gst_sdp_message_as_uri(carg1, carg2) + runtime.KeepAlive(scheme) + runtime.KeepAlive(msg) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + + return goret +} + +// SDPMessageInit wraps gst_sdp_message_init +// The function returns the following values: +// +// - msg SDPMessage: a #GstSDPMessage +// - goret SDPResult +// +// Initialize @msg so that its contents are as if it was freshly allocated +// with gst_sdp_message_new(). This function is mostly used to initialize a message +// allocated on the stack. gst_sdp_message_uninit() undoes this operation. +// +// When this function is invoked on newly allocated data (with malloc or on the +// stack), its contents should be set to 0 before calling this function. +func SDPMessageInit() (SDPMessage, SDPResult) { + var carg1 C.GstSDPMessage // out, transfer: none, C Pointers: 0, Name: SDPMessage, caller-allocates + var cret C.GstSDPResult // return, none, casted + + cret = C.gst_sdp_message_init(&carg1) + + var msg SDPMessage + var goret SDPResult + + _ = msg + _ = carg1 + panic("unimplemented conversion of SDPMessage (GstSDPMessage)") + goret = SDPResult(cret) + + return msg, goret +} + +// NewSDPMessage wraps gst_sdp_message_new +// The function returns the following values: +// +// - msg *SDPMessage: pointer to new #GstSDPMessage +// - goret SDPResult +// +// Allocate a new GstSDPMessage and store the result in @msg. +func NewSDPMessage() (*SDPMessage, SDPResult) { + var carg1 *C.GstSDPMessage // out, full, converted + var cret C.GstSDPResult // return, none, casted + + cret = C.gst_sdp_message_new(&carg1) + + var msg *SDPMessage + var goret SDPResult + + msg = UnsafeSDPMessageFromGlibFull(unsafe.Pointer(carg1)) + goret = SDPResult(cret) + + return msg, goret +} + +// NewSDPMessageFromText wraps gst_sdp_message_new_from_text +// +// The function takes the following parameters: +// +// - text string: A dynamically allocated string representing the SDP description +// +// The function returns the following values: +// +// - msg *SDPMessage: pointer to new #GstSDPMessage +// - goret SDPResult +// +// Parse @text and create a new SDPMessage from these. +func NewSDPMessageFromText(text string) (*SDPMessage, SDPResult) { + var carg1 *C.gchar // in, none, string + var carg2 *C.GstSDPMessage // out, full, converted + var cret C.GstSDPResult // return, none, casted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(text))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_sdp_message_new_from_text(carg1, &carg2) + runtime.KeepAlive(text) + + var msg *SDPMessage + var goret SDPResult + + msg = UnsafeSDPMessageFromGlibFull(unsafe.Pointer(carg2)) + goret = SDPResult(cret) + + return msg, goret +} + +// SDPMessageParseBuffer wraps gst_sdp_message_parse_buffer +// +// The function takes the following parameters: +// +// - data []uint8: the start of the buffer +// - msg *SDPMessage: the result #GstSDPMessage +// +// The function returns the following values: +// +// - goret SDPResult +// +// Parse the contents of @size bytes pointed to by @data and store the result in +// @msg. +func SDPMessageParseBuffer(data []uint8, msg *SDPMessage) SDPResult { + 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.GstSDPMessage // in, none, converted + var cret C.GstSDPResult // return, none, casted + + _ = data + _ = carg1 + _ = carg2 + panic("unimplemented conversion of []uint8 (const guint8*)") + carg3 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) + + cret = C.gst_sdp_message_parse_buffer(carg1, carg2, carg3) + runtime.KeepAlive(data) + runtime.KeepAlive(msg) + + var goret SDPResult + + goret = SDPResult(cret) + + return goret +} + +// SDPMessageParseURI wraps gst_sdp_message_parse_uri +// +// The function takes the following parameters: +// +// - uri string: the start of the uri +// - msg *SDPMessage: the result #GstSDPMessage +// +// The function returns the following values: +// +// - goret SDPResult +// +// Parse the null-terminated @uri and store the result in @msg. +// +// The uri should be of the form: +// +// scheme://[address[:ttl=ttl][:noa=noa]]/[sessionname] +// [#type=value *[&type=value]] +// +// where value is url encoded. This looslely resembles +// http://tools.ietf.org/html/draft-fujikawa-sdp-url-01 +func SDPMessageParseURI(uri string, msg *SDPMessage) SDPResult { + var carg1 *C.gchar // in, none, string + var carg2 *C.GstSDPMessage // in, none, converted + var cret C.GstSDPResult // return, none, casted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri))) + defer C.free(unsafe.Pointer(carg1)) + carg2 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) + + cret = C.gst_sdp_message_parse_uri(carg1, carg2) + runtime.KeepAlive(uri) + runtime.KeepAlive(msg) + + var goret SDPResult + + goret = SDPResult(cret) + + return goret +} + // AddAttribute wraps gst_sdp_message_add_attribute // // The function takes the following parameters: @@ -4612,7 +4902,7 @@ func UnsafeSDPMessageToGlibFull(s *SDPMessage) unsafe.Pointer { // Add the attribute with @key and @value to @msg. func (msg *SDPMessage) AddAttribute(key string, value string) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 *C.gchar // in, none, string, nullable-string var cret C.GstSDPResult // return, none, casted @@ -4650,7 +4940,7 @@ func (msg *SDPMessage) AddAttribute(key string, value string) SDPResult { // Add the specified bandwidth information to @msg. func (msg *SDPMessage) AddBandwidth(bwtype string, bandwidth uint) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // in, none, casted var cret C.GstSDPResult // return, none, casted @@ -4684,7 +4974,7 @@ func (msg *SDPMessage) AddBandwidth(bwtype string, bandwidth uint) SDPResult { // Add @email to the list of emails in @msg. func (msg *SDPMessage) AddEmail(email string) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.GstSDPResult // return, none, casted carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) @@ -4747,7 +5037,7 @@ func (msg *SDPMessage) AddMedia(media *SDPMedia) SDPResult { // Add @phone to the list of phones in @msg. func (msg *SDPMessage) AddPhone(phone string) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.GstSDPResult // return, none, casted carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) @@ -4780,8 +5070,8 @@ func (msg *SDPMessage) AddPhone(phone string) SDPResult { // Add time information @start and @stop to @msg. func (msg *SDPMessage) AddTime(start string, stop string, repeat []string) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string var carg3 **C.gchar // in, transfer: none, C Pointers: 2, Name: array[utf8], array (inner: *typesystem.StringPrimitive, zero-terminated) var cret C.GstSDPResult // return, none, casted @@ -4821,8 +5111,8 @@ func (msg *SDPMessage) AddTime(start string, stop string, repeat []string) SDPRe // Add time zone information to @msg. func (msg *SDPMessage) AddZone(adjTime string, typedTime string) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string var cret C.GstSDPResult // return, none, casted carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) @@ -4851,7 +5141,7 @@ func (msg *SDPMessage) AddZone(adjTime string, typedTime string) SDPResult { // Convert the contents of @msg to a text string. func (msg *SDPMessage) AsText() string { var carg0 *C.GstSDPMessage // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) @@ -5054,8 +5344,8 @@ func (msg *SDPMessage) GetAttribute(idx uint) *SDPAttribute { // Get the first attribute with key @key in @msg. func (msg *SDPMessage) GetAttributeVal(key string) string { var carg0 *C.GstSDPMessage // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -5086,9 +5376,9 @@ func (msg *SDPMessage) GetAttributeVal(key string) string { // Get the @nth attribute with key @key in @msg. func (msg *SDPMessage) GetAttributeValN(key string, nth uint) string { var carg0 *C.GstSDPMessage // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint // in, none, casted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -5173,7 +5463,7 @@ func (msg *SDPMessage) GetConnection() *SDPConnection { func (msg *SDPMessage) GetEmail(idx uint) string { var carg0 *C.GstSDPMessage // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) carg1 = C.guint(idx) @@ -5197,7 +5487,7 @@ func (msg *SDPMessage) GetEmail(idx uint) string { // Get the information in @msg. func (msg *SDPMessage) GetInformation() string { var carg0 *C.GstSDPMessage // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) @@ -5299,7 +5589,7 @@ func (msg *SDPMessage) GetOrigin() *SDPOrigin { func (msg *SDPMessage) GetPhone(idx uint) string { var carg0 *C.GstSDPMessage // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) carg1 = C.guint(idx) @@ -5323,7 +5613,7 @@ func (msg *SDPMessage) GetPhone(idx uint) string { // Get the session name in @msg. func (msg *SDPMessage) GetSessionName() string { var carg0 *C.GstSDPMessage // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) @@ -5375,7 +5665,7 @@ func (msg *SDPMessage) GetTime(idx uint) *SDPTime { // Get the URI in @msg. func (msg *SDPMessage) GetURI() string { var carg0 *C.GstSDPMessage // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) @@ -5397,7 +5687,7 @@ func (msg *SDPMessage) GetURI() string { // Get the version in @msg. func (msg *SDPMessage) GetVersion() string { var carg0 *C.GstSDPMessage // in, none, converted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) @@ -5529,7 +5819,7 @@ func (msg *SDPMessage) InsertBandwidth(idx int, bw *SDPBandwidth) SDPResult { func (msg *SDPMessage) InsertEmail(idx int, email string) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted var carg1 C.gint // in, none, casted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var cret C.GstSDPResult // return, none, casted carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) @@ -5565,7 +5855,7 @@ func (msg *SDPMessage) InsertEmail(idx int, email string) SDPResult { func (msg *SDPMessage) InsertPhone(idx int, phone string) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted var carg1 C.gint // in, none, casted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var cret C.GstSDPResult // return, none, casted carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) @@ -6021,7 +6311,7 @@ func (msg *SDPMessage) ReplaceBandwidth(idx uint, bw *SDPBandwidth) SDPResult { func (msg *SDPMessage) ReplaceEmail(idx uint, email string) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted var carg1 C.guint // in, none, casted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var cret C.GstSDPResult // return, none, casted carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) @@ -6056,7 +6346,7 @@ func (msg *SDPMessage) ReplaceEmail(idx uint, email string) SDPResult { func (msg *SDPMessage) ReplacePhone(idx uint, phone string) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted var carg1 C.guint // in, none, casted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var cret C.GstSDPResult // return, none, casted carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) @@ -6162,9 +6452,9 @@ func (msg *SDPMessage) ReplaceZone(idx uint, zone *SDPZone) SDPResult { // Configure the SDP connection in @msg with the given parameters. func (msg *SDPMessage) SetConnection(nettype string, addrtype string, address string, ttl uint, addrNumber uint) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string + var carg3 *C.gchar // in, none, string var carg4 C.guint // in, none, casted var carg5 C.guint // in, none, casted var cret C.GstSDPResult // return, none, casted @@ -6207,7 +6497,7 @@ func (msg *SDPMessage) SetConnection(nettype string, addrtype string, address st // Set the information in @msg. func (msg *SDPMessage) SetInformation(information string) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.GstSDPResult // return, none, casted carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) @@ -6239,8 +6529,8 @@ func (msg *SDPMessage) SetInformation(information string) SDPResult { // Adds the encryption information to @msg. func (msg *SDPMessage) SetKey(typ string, data string) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string var cret C.GstSDPResult // return, none, casted carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) @@ -6279,12 +6569,12 @@ func (msg *SDPMessage) SetKey(typ string, data string) SDPResult { // Configure the SDP origin in @msg with the given parameters. func (msg *SDPMessage) SetOrigin(username string, sessId string, sessVersion string, nettype string, addrtype string, addr string) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar - var carg3 *C.gchar // in, none, string, casted *C.gchar - var carg4 *C.gchar // in, none, string, casted *C.gchar - var carg5 *C.gchar // in, none, string, casted *C.gchar - var carg6 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string + var carg3 *C.gchar // in, none, string + var carg4 *C.gchar // in, none, string + var carg5 *C.gchar // in, none, string + var carg6 *C.gchar // in, none, string var cret C.GstSDPResult // return, none, casted carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) @@ -6330,7 +6620,7 @@ func (msg *SDPMessage) SetOrigin(username string, sessId string, sessVersion str // Set the session name in @msg. func (msg *SDPMessage) SetSessionName(sessionName string) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.GstSDPResult // return, none, casted carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) @@ -6361,7 +6651,7 @@ func (msg *SDPMessage) SetSessionName(sessionName string) SDPResult { // Set the URI in @msg. func (msg *SDPMessage) SetURI(uri string) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.GstSDPResult // return, none, casted carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) @@ -6392,7 +6682,7 @@ func (msg *SDPMessage) SetURI(uri string) SDPResult { // Set the version in @msg. func (msg *SDPMessage) SetVersion(version string) SDPResult { var carg0 *C.GstSDPMessage // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.GstSDPResult // return, none, casted carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) @@ -6642,8 +6932,8 @@ func (t *SDPTime) Clear() SDPResult { // Set time information @start, @stop and @repeat in @t. func (t *SDPTime) Set(start string, stop string, repeat []string) SDPResult { var carg0 *C.GstSDPTime // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string var carg3 **C.gchar // in, transfer: none, C Pointers: 2, Name: array[utf8], array (inner: *typesystem.StringPrimitive, zero-terminated) var cret C.GstSDPResult // return, none, casted @@ -6769,8 +7059,8 @@ func (zone *SDPZone) Clear() SDPResult { // Set zone information in @zone. func (zone *SDPZone) Set(adjTime string, typedTime string) SDPResult { var carg0 *C.GstSDPZone // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string var cret C.GstSDPResult // return, none, casted carg0 = (*C.GstSDPZone)(UnsafeSDPZoneToGlibNone(zone)) diff --git a/pkg/gsttag/gsttag.gen.go b/pkg/gsttag/gsttag.gen.go index 3220a07..66fc258 100644 --- a/pkg/gsttag/gsttag.gen.go +++ b/pkg/gsttag/gsttag.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstTag-1. DO NOT EDIT. package gsttag @@ -8,6 +8,7 @@ import ( "strings" "unsafe" + "github.com/diamondburned/gotk4/pkg/glib/v2" "github.com/diamondburned/gotk4/pkg/gobject/v2" "github.com/go-gst/go-gst/pkg/gst" ) @@ -376,7 +377,7 @@ func (f TagLicenseFlags) String() string { // tag) or a free-form language name descriptor (which should be put into a // #GST_TAG_LANGUAGE_NAME tag instead). func TagCheckLanguageCode(langCode string) bool { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg1 = (*C.gchar)(unsafe.Pointer(C.CString(langCode))) @@ -418,7 +419,7 @@ func TagFreeformStringToUTF8(data string, envVars []string) string { var carg1 *C.gchar // in, transfer: none, C Pointers: 1, Name: array[unknown], array (inner: , length-by: carg2) var carg2 C.gint // implicit var carg3 **C.gchar // in, transfer: none, C Pointers: 2, Name: array[utf8], array (inner: *typesystem.StringPrimitive, zero-terminated) - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string _ = data _ = carg1 @@ -452,8 +453,8 @@ func TagFreeformStringToUTF8(data string, envVars []string) string { // // Looks up the GStreamer tag for a ID3v2 tag. func TagFromID3Tag(id3Tag string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(id3Tag))) defer C.free(unsafe.Pointer(carg1)) @@ -482,9 +483,9 @@ func TagFromID3Tag(id3Tag string) string { // Looks up the GStreamer tag for an ID3v2 user tag (e.g. description in // TXXX frame or owner in UFID frame). func TagFromID3UserTag(typ string, id3UserTag string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var carg2 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(typ))) defer C.free(unsafe.Pointer(carg1)) @@ -514,8 +515,8 @@ func TagFromID3UserTag(typ string, id3UserTag string) string { // // Looks up the GStreamer tag for a vorbiscomment tag. func TagFromVorbisTag(vorbisTag string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(vorbisTag))) defer C.free(unsafe.Pointer(carg1)) @@ -574,8 +575,8 @@ func TagGetID3V2TagSize(buffer *gst.Buffer) uint { // // Language codes are case-sensitive and expected to be lower case. func TagGetLanguageCodeISO6391(langCode string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(langCode))) defer C.free(unsafe.Pointer(carg1)) @@ -610,8 +611,8 @@ func TagGetLanguageCodeISO6391(langCode string) string { // // Language codes are case-sensitive and expected to be lower case. func TagGetLanguageCodeISO6392B(langCode string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(langCode))) defer C.free(unsafe.Pointer(carg1)) @@ -646,8 +647,8 @@ func TagGetLanguageCodeISO6392B(langCode string) string { // // Language codes are case-sensitive and expected to be lower case. func TagGetLanguageCodeISO6392T(langCode string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(langCode))) defer C.free(unsafe.Pointer(carg1)) @@ -702,8 +703,8 @@ func TagGetLanguageCodes() []string { // // Language codes are case-sensitive and expected to be lower case. func TagGetLanguageName(languageCode string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(languageCode))) defer C.free(unsafe.Pointer(carg1)) @@ -732,8 +733,8 @@ func TagGetLanguageName(languageCode string) string { // Get the description of a license, which is a translated description // of the license's main features. func TagGetLicenseDescription(licenseRef string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(licenseRef))) defer C.free(unsafe.Pointer(carg1)) @@ -762,7 +763,7 @@ func TagGetLicenseDescription(licenseRef string) string { // Get the flags of a license, which describe most of the features of // a license in their most general form. func TagGetLicenseFlags(licenseRef string) TagLicenseFlags { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.GstTagLicenseFlags // return, none, casted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(licenseRef))) @@ -797,8 +798,8 @@ func TagGetLicenseFlags(licenseRef string) TagLicenseFlags { // dk, es, fi, fr, hr, hu, il, in, it, jp, kr, mk, mt, mx, my, nl, pe, pl, // pt, scotland, se, si, tw, uk, us, za. func TagGetLicenseJurisdiction(licenseRef string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(licenseRef))) defer C.free(unsafe.Pointer(carg1)) @@ -827,8 +828,8 @@ func TagGetLicenseJurisdiction(licenseRef string) string { // Get the nick name of a license, which is a short (untranslated) string // such as e.g. "CC BY-NC-ND 2.0 UK". func TagGetLicenseNick(licenseRef string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(licenseRef))) defer C.free(unsafe.Pointer(carg1)) @@ -857,8 +858,8 @@ func TagGetLicenseNick(licenseRef string) string { // Get the title of a license, which is a short translated description // of the license's features (generally not very pretty though). func TagGetLicenseTitle(licenseRef string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(licenseRef))) defer C.free(unsafe.Pointer(carg1)) @@ -886,8 +887,8 @@ func TagGetLicenseTitle(licenseRef string) string { // // Get the version of a license. func TagGetLicenseVersion(licenseRef string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(licenseRef))) defer C.free(unsafe.Pointer(carg1)) @@ -957,7 +958,7 @@ func TagID3GenreCount() uint { // Gets the ID3v1 genre name for a given ID. func TagID3GenreGet(id uint) string { var carg1 C.guint // in, none, casted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg1 = C.guint(id) @@ -1186,7 +1187,7 @@ func TagListFromVorbiscomment(data []uint8, idData []uint8) (string, *gst.TagLis var carg2 C.gsize // implicit var carg3 *C.guint8 // in, transfer: none, C Pointers: 1, Name: array[guint8], array (inner: *typesystem.CastablePrimitive, length-by: carg4) var carg4 C.guint // implicit - var carg5 *C.gchar // out, full, string, casted *C.gchar + var carg5 *C.gchar // out, full, string var cret *C.GstTagList // return, full, converted _ = data @@ -1231,7 +1232,7 @@ func TagListFromVorbiscommentBuffer(buffer *gst.Buffer, idData []uint8) (string, var carg1 *C.GstBuffer // 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 carg4 *C.gchar // out, full, string, casted *C.gchar + var carg4 *C.gchar // out, full, string var cret *C.GstTagList // return, full, converted carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) @@ -1483,11 +1484,11 @@ func TagListToXmpBuffer(list *gst.TagList, readOnly bool, schemas []string) *gst // may also be set to NULL by this function if there is no key or no language // code in the extended comment string. func TagParseExtendedComment(extComment string, failIfNoKey bool) (string, string, string, bool) { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg5 C.gboolean // in - var carg2 *C.gchar // out, full, string, casted *C.gchar, nullable - var carg3 *C.gchar // out, full, string, casted *C.gchar, nullable - var carg4 *C.gchar // out, full, string, casted *C.gchar + var carg2 *C.gchar // out, full, string, nullable-string + var carg3 *C.gchar // out, full, string, nullable-string + var carg4 *C.gchar // out, full, string var cret C.gboolean // return carg1 = (*C.gchar)(unsafe.Pointer(C.CString(extComment))) @@ -1544,8 +1545,8 @@ func TagRegisterMusicbrainzTags() { // // Looks up the ID3v2 tag for a GStreamer tag. func TagToID3Tag(gstTag string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(gstTag))) defer C.free(unsafe.Pointer(carg1)) @@ -1560,6 +1561,47 @@ func TagToID3Tag(gstTag string) string { return goret } +// TagToVorbisComments wraps gst_tag_to_vorbis_comments +// +// The function takes the following parameters: +// +// - list *gst.TagList: a #GstTagList +// - tag string: a GStreamer tag identifier, such as #GST_TAG_ARTIST +// +// The function returns the following values: +// +// - goret []string +// +// Creates a new tag list that contains the information parsed out of a +// vorbiscomment packet. +func TagToVorbisComments(list *gst.TagList, tag string) []string { + var carg1 *C.GstTagList // in, none, converted + var carg2 *C.gchar // in, none, string + var cret *C.GList // container, transfer: full + + carg1 = (*C.GstTagList)(gst.UnsafeTagListToGlibNone(list)) + carg2 = (*C.gchar)(unsafe.Pointer(C.CString(tag))) + defer C.free(unsafe.Pointer(carg2)) + + cret = C.gst_tag_to_vorbis_comments(carg1, carg2) + runtime.KeepAlive(list) + runtime.KeepAlive(tag) + + var goret []string + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) string { + var dst string // string + dst = C.GoString((*C.char)(v)) + defer C.free(v) + return dst + }, + ) + + return goret +} + // TagToVorbisTag wraps gst_tag_to_vorbis_tag // // The function takes the following parameters: @@ -1572,8 +1614,8 @@ func TagToID3Tag(gstTag string) string { // // Looks up the vorbiscomment tag for a GStreamer tag. func TagToVorbisTag(gstTag string) string { - var carg1 *C.gchar // in, none, string, casted *C.gchar - var cret *C.gchar // return, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string + var cret *C.gchar // return, none, string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(gstTag))) defer C.free(unsafe.Pointer(carg1)) @@ -1624,8 +1666,8 @@ func TagXmpListSchemas() []string { // of a #GST_TAG_EXTENDED_COMMENT. func VorbisTagAdd(list *gst.TagList, tag string, value string) { var carg1 *C.GstTagList // in, none, converted - var carg2 *C.gchar // in, none, string, casted *C.gchar - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string + var carg3 *C.gchar // in, none, string carg1 = (*C.GstTagList)(gst.UnsafeTagListToGlibNone(list)) carg2 = (*C.gchar)(unsafe.Pointer(C.CString(tag))) @@ -1770,7 +1812,7 @@ func (config *TagXmpWriterInstance) AddAllSchemas() { // Adds @schema to the list schemas func (config *TagXmpWriterInstance) AddSchema(schema string) { var carg0 *C.GstTagXmpWriter // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstTagXmpWriter)(UnsafeTagXmpWriterToGlibNone(config)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(schema))) @@ -1794,7 +1836,7 @@ func (config *TagXmpWriterInstance) AddSchema(schema string) { // Checks if @schema is going to be used func (config *TagXmpWriterInstance) HasSchema(schema string) bool { var carg0 *C.GstTagXmpWriter // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstTagXmpWriter)(UnsafeTagXmpWriterToGlibNone(config)) @@ -1837,7 +1879,7 @@ func (config *TagXmpWriterInstance) RemoveAllSchemas() { // the schema wasn't in the list func (config *TagXmpWriterInstance) RemoveSchema(schema string) { var carg0 *C.GstTagXmpWriter // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstTagXmpWriter)(UnsafeTagXmpWriterToGlibNone(config)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(schema))) diff --git a/pkg/gstvideo/gstvideo.gen.go b/pkg/gstvideo/gstvideo.gen.go index d979632..1da0d16 100644 --- a/pkg/gstvideo/gstvideo.gen.go +++ b/pkg/gstvideo/gstvideo.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstVideo-1. DO NOT EDIT. package gstvideo @@ -4656,7 +4656,7 @@ func BufferAddVideoOverlayCompositionMeta(buf *gst.Buffer, comp *VideoOverlayCom // parameters. func BufferAddVideoRegionOfInterestMeta(buffer *gst.Buffer, roiType string, x uint, y uint, w uint, h uint) *VideoRegionOfInterestMeta { var carg1 *C.GstBuffer // in, none, converted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var carg3 C.guint // in, none, casted var carg4 C.guint // in, none, casted var carg5 C.guint // in, none, casted @@ -5331,7 +5331,7 @@ func VideoCenterRect(src *VideoRectangle, dst *VideoRectangle, scaling bool) Vid // // Deprecated: (since 1.20.0) Use gst_video_chroma_site_from_string() instead. func VideoChromaFromString(s string) VideoChromaSite { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.GstVideoChromaSite // return, none, casted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(s))) @@ -5362,7 +5362,7 @@ func VideoChromaFromString(s string) VideoChromaSite { // Deprecated: (since 1.20.0) Use gst_video_chroma_site_to_string() instead. func VideoChromaToString(site VideoChromaSite) string { var carg1 C.GstVideoChromaSite // in, none, casted - var cret *C.gchar // return, none, string, casted *C.gchar + var cret *C.gchar // return, none, string carg1 = C.GstVideoChromaSite(site) @@ -5605,7 +5605,7 @@ func VideoDmaDRMFourccFromFormat(format VideoFormat) uint32 { // also parsed if we want. Please note that the @format_str should follow the // fourcc:modifier kind style, such as NV12:0x0100000000000002 func VideoDmaDRMFourccFromString(formatStr string) (uint64, uint32) { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.guint64 // out, full, casted var cret C.guint32 // return, none, casted @@ -5668,7 +5668,7 @@ func VideoDmaDRMFourccToFormat(fourcc uint32) VideoFormat { func VideoDmaDRMFourccToString(fourcc uint32, modifier uint64) string { var carg1 C.guint32 // in, none, casted var carg2 C.guint64 // in, none, casted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg1 = C.guint32(fourcc) carg2 = C.guint64(modifier) @@ -6604,6 +6604,13 @@ type ColorBalance interface { // #GstColorBalanceChannel.max_value members of the // #GstColorBalanceChannel object. GetValue(ColorBalanceChannel) int + // ListChannels wraps gst_color_balance_list_channels + // The function returns the following values: + // + // - goret []ColorBalanceChannel + // + // Retrieve a list of the available channels. + ListChannels() []ColorBalanceChannel // SetValue wraps gst_color_balance_set_value // // The function takes the following parameters: @@ -6731,6 +6738,35 @@ func (balance *ColorBalanceInstance) GetValue(channel ColorBalanceChannel) int { return goret } +// ListChannels wraps gst_color_balance_list_channels +// The function returns the following values: +// +// - goret []ColorBalanceChannel +// +// Retrieve a list of the available channels. +func (balance *ColorBalanceInstance) ListChannels() []ColorBalanceChannel { + var carg0 *C.GstColorBalance // in, none, converted + var cret *C.GList // container, transfer: none + + carg0 = (*C.GstColorBalance)(UnsafeColorBalanceToGlibNone(balance)) + + cret = C.gst_color_balance_list_channels(carg0) + runtime.KeepAlive(balance) + + var goret []ColorBalanceChannel + + goret = glib.UnsafeListFromGlibNone( + unsafe.Pointer(cret), + func(v unsafe.Pointer) ColorBalanceChannel { + var dst ColorBalanceChannel // converted + dst = UnsafeColorBalanceChannelFromGlibNone(v) + return dst + }, + ) + + return goret +} + // SetValue wraps gst_color_balance_set_value // // The function takes the following parameters: @@ -7036,7 +7072,7 @@ func NavigationEventNewCommand(command NavigationCommand) *gst.Event { // // Create a new navigation event for the given key press. func NavigationEventNewKeyPress(key string, state NavigationModifierType) *gst.Event { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.GstNavigationModifierType // in, none, casted var cret *C.GstEvent // return, full, converted @@ -7069,7 +7105,7 @@ func NavigationEventNewKeyPress(key string, state NavigationModifierType) *gst.E // // Create a new navigation event for the given key release. func NavigationEventNewKeyRelease(key string, state NavigationModifierType) *gst.Event { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var carg2 C.GstNavigationModifierType // in, none, casted var cret *C.GstEvent // return, full, converted @@ -7498,7 +7534,7 @@ func NavigationEventParseCommand(event *gst.Event) (NavigationCommand, bool) { // present on all other related events func NavigationEventParseKeyEvent(event *gst.Event) (string, bool) { var carg1 *C.GstEvent // in, none, converted - var carg2 *C.gchar // out, none, string, casted *C.gchar + var carg2 *C.gchar // out, none, string var cret C.gboolean // return carg1 = (*C.GstEvent)(gst.UnsafeEventToGlibNone(event)) @@ -10157,6 +10193,13 @@ type VideoDecoder interface { // // Get a pending unfinished #GstVideoCodecFrame GetFrame(int) *VideoCodecFrame + // GetFrames wraps gst_video_decoder_get_frames + // The function returns the following values: + // + // - goret []*VideoCodecFrame + // + // Get all pending unfinished #GstVideoCodecFrame + GetFrames() []*VideoCodecFrame // GetInputSubframeIndex wraps gst_video_decoder_get_input_subframe_index // // The function takes the following parameters: @@ -10923,6 +10966,35 @@ func (decoder *VideoDecoderInstance) GetFrame(frameNumber int) *VideoCodecFrame return goret } +// GetFrames wraps gst_video_decoder_get_frames +// The function returns the following values: +// +// - goret []*VideoCodecFrame +// +// Get all pending unfinished #GstVideoCodecFrame +func (decoder *VideoDecoderInstance) GetFrames() []*VideoCodecFrame { + var carg0 *C.GstVideoDecoder // in, none, converted + var cret *C.GList // container, transfer: full + + carg0 = (*C.GstVideoDecoder)(UnsafeVideoDecoderToGlibNone(decoder)) + + cret = C.gst_video_decoder_get_frames(carg0) + runtime.KeepAlive(decoder) + + var goret []*VideoCodecFrame + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) *VideoCodecFrame { + var dst *VideoCodecFrame // converted + dst = UnsafeVideoCodecFrameFromGlibFull(v) + return dst + }, + ) + + return goret +} + // GetInputSubframeIndex wraps gst_video_decoder_get_input_subframe_index // // The function takes the following parameters: @@ -11959,6 +12031,13 @@ type VideoEncoder interface { // // Get a pending unfinished #GstVideoCodecFrame GetFrame(int) *VideoCodecFrame + // GetFrames wraps gst_video_encoder_get_frames + // The function returns the following values: + // + // - goret []*VideoCodecFrame + // + // Get all pending unfinished #GstVideoCodecFrame + GetFrames() []*VideoCodecFrame // GetLatency wraps gst_video_encoder_get_latency // The function returns the following values: // @@ -12385,6 +12464,35 @@ func (encoder *VideoEncoderInstance) GetFrame(frameNumber int) *VideoCodecFrame return goret } +// GetFrames wraps gst_video_encoder_get_frames +// The function returns the following values: +// +// - goret []*VideoCodecFrame +// +// Get all pending unfinished #GstVideoCodecFrame +func (encoder *VideoEncoderInstance) GetFrames() []*VideoCodecFrame { + var carg0 *C.GstVideoEncoder // in, none, converted + var cret *C.GList // container, transfer: full + + carg0 = (*C.GstVideoEncoder)(UnsafeVideoEncoderToGlibNone(encoder)) + + cret = C.gst_video_encoder_get_frames(carg0) + runtime.KeepAlive(encoder) + + var goret []*VideoCodecFrame + + goret = glib.UnsafeListFromGlibFull( + unsafe.Pointer(cret), + func(v unsafe.Pointer) *VideoCodecFrame { + var dst *VideoCodecFrame // converted + dst = UnsafeVideoCodecFrameFromGlibFull(v) + return dst + }, + ) + + return goret +} + // GetLatency wraps gst_video_encoder_get_latency // The function returns the following values: // @@ -13158,6 +13266,22 @@ func UnsafeAncillaryMetaToGlibFull(a *AncillaryMeta) unsafe.Pointer { a.native = nil // AncillaryMeta is invalid from here on return _p } +// AncillaryMetaGetInfo wraps gst_ancillary_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +func AncillaryMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_ancillary_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // ColorBalanceChannelClass wraps GstColorBalanceChannelClass // // Color-balance channel class. @@ -13419,6 +13543,22 @@ func UnsafeVideoAFDMetaToGlibFull(v *VideoAFDMeta) unsafe.Pointer { v.native = nil // VideoAFDMeta is invalid from here on return _p } +// VideoAFDMetaGetInfo wraps gst_video_afd_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +func VideoAFDMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_video_afd_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // VideoAffineTransformationMeta wraps GstVideoAffineTransformationMeta // // Extra buffer metadata for performing an affine transformation using a 4x4 @@ -13490,6 +13630,22 @@ func UnsafeVideoAffineTransformationMetaToGlibFull(v *VideoAffineTransformationM v.native = nil // VideoAffineTransformationMeta is invalid from here on return _p } +// VideoAffineTransformationMetaGetInfo wraps gst_video_affine_transformation_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +func VideoAffineTransformationMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_video_affine_transformation_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // ApplyMatrix wraps gst_video_affine_transformation_meta_apply_matrix // // The function takes the following parameters: @@ -13966,6 +14122,22 @@ func UnsafeVideoBarMetaToGlibFull(v *VideoBarMeta) unsafe.Pointer { v.native = nil // VideoBarMeta is invalid from here on return _p } +// VideoBarMetaGetInfo wraps gst_video_bar_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +func VideoBarMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_video_bar_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // VideoBufferPoolClass wraps GstVideoBufferPoolClass type VideoBufferPoolClass struct { *videoBufferPoolClass @@ -14088,6 +14260,22 @@ func UnsafeVideoCaptionMetaToGlibFull(v *VideoCaptionMeta) unsafe.Pointer { v.native = nil // VideoCaptionMeta is invalid from here on return _p } +// VideoCaptionMetaGetInfo wraps gst_video_caption_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +func VideoCaptionMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_video_caption_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // VideoChromaResampler wraps GstVideoChromaResample type VideoChromaResampler struct { *videoChromaResampler @@ -14215,6 +14403,22 @@ func UnsafeVideoCodecAlphaMetaToGlibFull(v *VideoCodecAlphaMeta) unsafe.Pointer v.native = nil // VideoCodecAlphaMeta is invalid from here on return _p } +// VideoCodecAlphaMetaGetInfo wraps gst_video_codec_alpha_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +func VideoCodecAlphaMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_video_codec_alpha_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // VideoCodecFrame wraps GstVideoCodecFrame // // A #GstVideoCodecFrame represents a video frame both in raw and @@ -14526,7 +14730,7 @@ func UnsafeVideoColorimetryToGlibFull(v *VideoColorimetry) unsafe.Pointer { // values. func (cinfo *VideoColorimetry) FromString(color string) bool { var carg0 *C.GstVideoColorimetry // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstVideoColorimetry)(UnsafeVideoColorimetryToGlibNone(cinfo)) @@ -14632,7 +14836,7 @@ func (cinfo *VideoColorimetry) IsEquivalent(bitdepth uint, other *VideoColorimet // string @color. func (cinfo *VideoColorimetry) Matches(color string) bool { var carg0 *C.GstVideoColorimetry // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstVideoColorimetry)(UnsafeVideoColorimetryToGlibNone(cinfo)) @@ -14660,7 +14864,7 @@ func (cinfo *VideoColorimetry) Matches(color string) bool { // Make a string representation of @cinfo. func (cinfo *VideoColorimetry) ToString() string { var carg0 *C.GstVideoColorimetry // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstVideoColorimetry)(UnsafeVideoColorimetryToGlibNone(cinfo)) @@ -14815,7 +15019,7 @@ func (linfo *VideoContentLightLevel) FromCaps(caps *gst.Caps) bool { // with the parsed values. func (linfo *VideoContentLightLevel) FromString(level string) bool { var carg0 *C.GstVideoContentLightLevel // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstVideoContentLightLevel)(UnsafeVideoContentLightLevelToGlibNone(linfo)) @@ -14887,7 +15091,7 @@ func (linfo *VideoContentLightLevel) IsEqual(other *VideoContentLightLevel) bool // Convert @linfo to its string representation. func (linfo *VideoContentLightLevel) ToString() string { var carg0 *C.GstVideoContentLightLevel // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstVideoContentLightLevel)(UnsafeVideoContentLightLevelToGlibNone(linfo)) @@ -15169,6 +15373,22 @@ func UnsafeVideoCropMetaToGlibFull(v *VideoCropMeta) unsafe.Pointer { v.native = nil // VideoCropMeta is invalid from here on return _p } +// VideoCropMetaGetInfo wraps gst_video_crop_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +func VideoCropMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_video_crop_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // VideoDecoderClass wraps GstVideoDecoderClass // // Subclasses can override any of the available virtual methods or not, as @@ -15676,6 +15896,145 @@ func UnsafeVideoFrameToGlibFull(v *VideoFrame) unsafe.Pointer { v.native = nil // VideoFrame is invalid from here on return _p } +// VideoFrameMap wraps gst_video_frame_map +// +// The function takes the following parameters: +// +// - info *VideoInfo: a #GstVideoInfo +// - buffer *gst.Buffer: the buffer to map +// - flags gst.MapFlags: #GstMapFlags +// +// The function returns the following values: +// +// - frame VideoFrame: pointer to #GstVideoFrame +// - goret bool +// +// Use @info and @buffer to fill in the values of @frame. @frame is usually +// allocated on the stack, and you will pass the address to the #GstVideoFrame +// structure allocated on the stack; gst_video_frame_map() will then fill in +// the structures with the various video-specific information you need to access +// the pixels of the video buffer. You can then use accessor macros such as +// GST_VIDEO_FRAME_COMP_DATA(), GST_VIDEO_FRAME_PLANE_DATA(), +// GST_VIDEO_FRAME_COMP_STRIDE(), GST_VIDEO_FRAME_PLANE_STRIDE() etc. +// to get to the pixels. +// +// |[<!-- language="C" --> +// GstVideoFrame vframe; +// ... +// // set RGB pixels to black one at a time +// if (gst_video_frame_map (&vframe, video_info, video_buffer, GST_MAP_WRITE)) { +// guint8 *pixels = GST_VIDEO_FRAME_PLANE_DATA (vframe, 0); +// guint stride = GST_VIDEO_FRAME_PLANE_STRIDE (vframe, 0); +// guint pixel_stride = GST_VIDEO_FRAME_COMP_PSTRIDE (vframe, 0); +// +// for (h = 0; h < height; ++h) { +// for (w = 0; w < width; ++w) { +// guint8 *pixel = pixels + h * stride + w * pixel_stride; +// +// memset (pixel, 0, pixel_stride); +// } +// } +// +// gst_video_frame_unmap (&vframe); +// } +// ... +// ]| +// +// All video planes of @buffer will be mapped and the pointers will be set in +// @frame->data. +// +// The purpose of this function is to make it easy for you to get to the video +// pixels in a generic way, without you having to worry too much about details +// such as whether the video data is allocated in one contiguous memory chunk +// or multiple memory chunks (e.g. one for each plane); or if custom strides +// and custom plane offsets are used or not (as signalled by GstVideoMeta on +// each buffer). This function will just fill the #GstVideoFrame structure +// with the right values and if you use the accessor macros everything will +// just work and you can access the data easily. It also maps the underlying +// memory chunks for you. +func VideoFrameMap(info *VideoInfo, buffer *gst.Buffer, flags gst.MapFlags) (VideoFrame, bool) { + var carg2 *C.GstVideoInfo // in, none, converted + var carg3 *C.GstBuffer // in, none, converted + var carg4 C.GstMapFlags // in, none, casted + var carg1 C.GstVideoFrame // out, transfer: none, C Pointers: 0, Name: VideoFrame, caller-allocates + var cret C.gboolean // return + + carg2 = (*C.GstVideoInfo)(UnsafeVideoInfoToGlibNone(info)) + carg3 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) + carg4 = C.GstMapFlags(flags) + + cret = C.gst_video_frame_map(&carg1, carg2, carg3, carg4) + runtime.KeepAlive(info) + runtime.KeepAlive(buffer) + runtime.KeepAlive(flags) + + var frame VideoFrame + var goret bool + + _ = frame + _ = carg1 + panic("unimplemented conversion of VideoFrame (GstVideoFrame)") + if cret != 0 { + goret = true + } + + return frame, goret +} + +// VideoFrameMapID wraps gst_video_frame_map_id +// +// The function takes the following parameters: +// +// - info *VideoInfo: a #GstVideoInfo +// - buffer *gst.Buffer: the buffer to map +// - id int: the frame id to map +// - flags gst.MapFlags: #GstMapFlags +// +// The function returns the following values: +// +// - frame VideoFrame: pointer to #GstVideoFrame +// - goret bool +// +// Use @info and @buffer to fill in the values of @frame with the video frame +// information of frame @id. +// +// When @id is -1, the default frame is mapped. When @id != -1, this function +// will return %FALSE when there is no GstVideoMeta with that id. +// +// 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) { + var carg2 *C.GstVideoInfo // in, none, converted + var carg3 *C.GstBuffer // in, none, converted + var carg4 C.gint // in, none, casted + var carg5 C.GstMapFlags // in, none, casted + var carg1 C.GstVideoFrame // out, transfer: none, C Pointers: 0, Name: VideoFrame, caller-allocates + var cret C.gboolean // return + + carg2 = (*C.GstVideoInfo)(UnsafeVideoInfoToGlibNone(info)) + carg3 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) + carg4 = C.gint(id) + carg5 = C.GstMapFlags(flags) + + cret = C.gst_video_frame_map_id(&carg1, carg2, carg3, carg4, carg5) + runtime.KeepAlive(info) + runtime.KeepAlive(buffer) + runtime.KeepAlive(id) + runtime.KeepAlive(flags) + + var frame VideoFrame + var goret bool + + _ = frame + _ = carg1 + panic("unimplemented conversion of VideoFrame (GstVideoFrame)") + if cret != 0 { + goret = true + } + + return frame, goret +} + // Copy wraps gst_video_frame_copy // // The function takes the following parameters: @@ -15827,6 +16186,22 @@ func UnsafeVideoGLTextureUploadMetaToGlibFull(v *VideoGLTextureUploadMeta) unsaf v.native = nil // VideoGLTextureUploadMeta is invalid from here on return _p } +// VideoGLTextureUploadMetaGetInfo wraps gst_video_gl_texture_upload_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +func VideoGLTextureUploadMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_video_gl_texture_upload_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // Upload wraps gst_video_gl_texture_upload_meta_upload // // The function takes the following parameters: @@ -15986,6 +16361,61 @@ func NewVideoInfoFromCaps(caps *gst.Caps) *VideoInfo { return goret } +// VideoInfoFromCaps wraps gst_video_info_from_caps +// +// The function takes the following parameters: +// +// - caps *gst.Caps: a #GstCaps +// +// The function returns the following values: +// +// - info VideoInfo: #GstVideoInfo +// - goret bool +// +// Parse @caps and update @info. +func VideoInfoFromCaps(caps *gst.Caps) (VideoInfo, bool) { + var carg2 *C.GstCaps // in, none, converted + var carg1 C.GstVideoInfo // out, transfer: none, C Pointers: 0, Name: VideoInfo, caller-allocates + var cret C.gboolean // return + + carg2 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(caps)) + + cret = C.gst_video_info_from_caps(&carg1, carg2) + runtime.KeepAlive(caps) + + var info VideoInfo + var goret bool + + _ = info + _ = carg1 + panic("unimplemented conversion of VideoInfo (GstVideoInfo)") + if cret != 0 { + goret = true + } + + return info, goret +} + +// VideoInfoInit wraps gst_video_info_init +// The function returns the following values: +// +// - info VideoInfo: a #GstVideoInfo +// +// Initialize @info with default values. +func VideoInfoInit() VideoInfo { + var carg1 C.GstVideoInfo // out, transfer: none, C Pointers: 0, Name: VideoInfo, caller-allocates + + C.gst_video_info_init(&carg1) + + var info VideoInfo + + _ = info + _ = carg1 + panic("unimplemented conversion of VideoInfo (GstVideoInfo)") + + return info +} + // Align wraps gst_video_info_align // // The function takes the following parameters: @@ -16402,6 +16832,103 @@ func NewVideoInfoDmaDrmFromCaps(caps *gst.Caps) *VideoInfoDmaDrm { return goret } +// VideoInfoDmaDrmFromCaps wraps gst_video_info_dma_drm_from_caps +// +// The function takes the following parameters: +// +// - caps *gst.Caps: a #GstCaps +// +// The function returns the following values: +// +// - drmInfo VideoInfoDmaDrm: #GstVideoInfoDmaDrm +// - goret bool +// +// Parse @caps and update @info. Please note that the @caps should be +// a dma drm caps. The gst_video_is_dma_drm_caps() can be used to verify +// it before calling this function. +func VideoInfoDmaDrmFromCaps(caps *gst.Caps) (VideoInfoDmaDrm, bool) { + var carg2 *C.GstCaps // in, none, converted + var carg1 C.GstVideoInfoDmaDrm // out, transfer: none, C Pointers: 0, Name: VideoInfoDmaDrm, caller-allocates + var cret C.gboolean // return + + carg2 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(caps)) + + cret = C.gst_video_info_dma_drm_from_caps(&carg1, carg2) + runtime.KeepAlive(caps) + + var drmInfo VideoInfoDmaDrm + var goret bool + + _ = drmInfo + _ = carg1 + panic("unimplemented conversion of VideoInfoDmaDrm (GstVideoInfoDmaDrm)") + if cret != 0 { + goret = true + } + + return drmInfo, goret +} + +// VideoInfoDmaDrmFromVideoInfo wraps gst_video_info_dma_drm_from_video_info +// +// The function takes the following parameters: +// +// - info *VideoInfo: a #GstVideoInfo +// - modifier uint64: the associated modifier value. +// +// The function returns the following values: +// +// - drmInfo VideoInfoDmaDrm: #GstVideoInfoDmaDrm +// - goret bool +// +// Fills @drm_info if @info's format has a valid drm format and @modifier is also +// valid +func VideoInfoDmaDrmFromVideoInfo(info *VideoInfo, modifier uint64) (VideoInfoDmaDrm, bool) { + var carg2 *C.GstVideoInfo // in, none, converted + var carg3 C.guint64 // in, none, casted + var carg1 C.GstVideoInfoDmaDrm // out, transfer: none, C Pointers: 0, Name: VideoInfoDmaDrm, caller-allocates + var cret C.gboolean // return + + carg2 = (*C.GstVideoInfo)(UnsafeVideoInfoToGlibNone(info)) + carg3 = C.guint64(modifier) + + cret = C.gst_video_info_dma_drm_from_video_info(&carg1, carg2, carg3) + runtime.KeepAlive(info) + runtime.KeepAlive(modifier) + + var drmInfo VideoInfoDmaDrm + var goret bool + + _ = drmInfo + _ = carg1 + panic("unimplemented conversion of VideoInfoDmaDrm (GstVideoInfoDmaDrm)") + if cret != 0 { + goret = true + } + + return drmInfo, goret +} + +// VideoInfoDmaDrmInit wraps gst_video_info_dma_drm_init +// The function returns the following values: +// +// - drmInfo VideoInfoDmaDrm: a #GstVideoInfoDmaDrm +// +// Initialize @drm_info with default values. +func VideoInfoDmaDrmInit() VideoInfoDmaDrm { + var carg1 C.GstVideoInfoDmaDrm // out, transfer: none, C Pointers: 0, Name: VideoInfoDmaDrm, caller-allocates + + C.gst_video_info_dma_drm_init(&carg1) + + var drmInfo VideoInfoDmaDrm + + _ = drmInfo + _ = carg1 + panic("unimplemented conversion of VideoInfoDmaDrm (GstVideoInfoDmaDrm)") + + return drmInfo +} + // ToCaps wraps gst_video_info_dma_drm_to_caps // The function returns the following values: // @@ -16524,6 +17051,42 @@ func UnsafeVideoMasteringDisplayInfoToGlibFull(v *VideoMasteringDisplayInfo) uns v.native = nil // VideoMasteringDisplayInfo is invalid from here on return _p } +// VideoMasteringDisplayInfoFromString wraps gst_video_mastering_display_info_from_string +// +// The function takes the following parameters: +// +// - mastering string: a #GstStructure representing #GstVideoMasteringDisplayInfo +// +// The function returns the following values: +// +// - minfo VideoMasteringDisplayInfo: a #GstVideoMasteringDisplayInfo +// - goret bool +// +// Extract #GstVideoMasteringDisplayInfo from @mastering +func VideoMasteringDisplayInfoFromString(mastering string) (VideoMasteringDisplayInfo, bool) { + var carg2 *C.gchar // in, none, string + var carg1 C.GstVideoMasteringDisplayInfo // out, transfer: none, C Pointers: 0, Name: VideoMasteringDisplayInfo, caller-allocates + var cret C.gboolean // return + + carg2 = (*C.gchar)(unsafe.Pointer(C.CString(mastering))) + defer C.free(unsafe.Pointer(carg2)) + + cret = C.gst_video_mastering_display_info_from_string(&carg1, carg2) + runtime.KeepAlive(mastering) + + var minfo VideoMasteringDisplayInfo + var goret bool + + _ = minfo + _ = carg1 + panic("unimplemented conversion of VideoMasteringDisplayInfo (GstVideoMasteringDisplayInfo)") + if cret != 0 { + goret = true + } + + return minfo, goret +} + // AddToCaps wraps gst_video_mastering_display_info_add_to_caps // // The function takes the following parameters: @@ -16640,7 +17203,7 @@ func (minfo *VideoMasteringDisplayInfo) IsEqual(other *VideoMasteringDisplayInfo // Convert @minfo to its string representation func (minfo *VideoMasteringDisplayInfo) ToString() string { var carg0 *C.GstVideoMasteringDisplayInfo // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstVideoMasteringDisplayInfo)(UnsafeVideoMasteringDisplayInfoToGlibNone(minfo)) @@ -16798,6 +17361,22 @@ func UnsafeVideoMetaToGlibFull(v *VideoMeta) unsafe.Pointer { v.native = nil // VideoMeta is invalid from here on return _p } +// VideoMetaGetInfo wraps gst_video_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +func VideoMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_video_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // SetAlignment wraps gst_video_meta_set_alignment // // The function takes the following parameters: @@ -16834,42 +17413,6 @@ func (meta *VideoMeta) SetAlignment(alignment VideoAlignment) bool { return goret } -// Unmap wraps gst_video_meta_unmap -// -// The function takes the following parameters: -// -// - plane uint: a plane -// - info *gst.MapInfo: a #GstMapInfo -// -// The function returns the following values: -// -// - goret bool -// -// Unmap a previously mapped plane with gst_video_meta_map(). -func (meta *VideoMeta) Unmap(plane uint, info *gst.MapInfo) bool { - var carg0 *C.GstVideoMeta // in, none, converted - var carg1 C.guint // in, none, casted - var carg2 *C.GstMapInfo // in, none, converted - var cret C.gboolean // return - - carg0 = (*C.GstVideoMeta)(UnsafeVideoMetaToGlibNone(meta)) - carg1 = C.guint(plane) - carg2 = (*C.GstMapInfo)(gst.UnsafeMapInfoToGlibNone(info)) - - cret = C.gst_video_meta_unmap(carg0, carg1, carg2) - runtime.KeepAlive(meta) - runtime.KeepAlive(plane) - runtime.KeepAlive(info) - - var goret bool - - if cret != 0 { - goret = true - } - - return goret -} - // VideoMetaTransform wraps GstVideoMetaTransform // // Extra data passed to a video transform #GstMetaTransformFunction such as: @@ -16933,6 +17476,24 @@ func UnsafeVideoMetaTransformToGlibFull(v *VideoMetaTransform) unsafe.Pointer { v.native = nil // VideoMetaTransform is invalid from here on return _p } +// VideoMetaTransformScaleGetQuark wraps gst_video_meta_transform_scale_get_quark +// The function returns the following values: +// +// - goret glib.Quark +// +// Get the #GQuark for the "gst-video-scale" metadata transform operation. +func VideoMetaTransformScaleGetQuark() glib.Quark { + var cret C.GQuark // return, none, casted, alias + + cret = C.gst_video_meta_transform_scale_get_quark() + + var goret glib.Quark + + goret = glib.Quark(cret) + + return goret +} + // VideoOrientationInterface wraps GstVideoOrientationInterface // // #GstVideoOrientationInterface interface. @@ -17373,6 +17934,22 @@ func UnsafeVideoOverlayCompositionMetaToGlibFull(v *VideoOverlayCompositionMeta) v.native = nil // VideoOverlayCompositionMeta is invalid from here on return _p } +// VideoOverlayCompositionMetaGetInfo wraps gst_video_overlay_composition_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +func VideoOverlayCompositionMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_video_overlay_composition_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // VideoOverlayInterface wraps GstVideoOverlayInterface // // #GstVideoOverlay interface @@ -18114,6 +18691,22 @@ func UnsafeVideoRegionOfInterestMetaToGlibFull(v *VideoRegionOfInterestMeta) uns v.native = nil // VideoRegionOfInterestMeta is invalid from here on return _p } +// VideoRegionOfInterestMetaGetInfo wraps gst_video_region_of_interest_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +func VideoRegionOfInterestMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_video_region_of_interest_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // AddParam wraps gst_video_region_of_interest_meta_add_param // // The function takes the following parameters: @@ -18155,7 +18748,7 @@ func (meta *VideoRegionOfInterestMeta) AddParam(s *gst.Structure) { // or %NULL if there is none. func (meta *VideoRegionOfInterestMeta) GetParam(name string) *gst.Structure { var carg0 *C.GstVideoRegionOfInterestMeta // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstStructure // return, none, converted carg0 = (*C.GstVideoRegionOfInterestMeta)(UnsafeVideoRegionOfInterestMetaToGlibNone(meta)) @@ -18368,6 +18961,22 @@ func UnsafeVideoSEIUserDataUnregisteredMetaToGlibFull(v *VideoSEIUserDataUnregis v.native = nil // VideoSEIUserDataUnregisteredMeta is invalid from here on return _p } +// VideoSEIUserDataUnregisteredMetaGetInfo wraps gst_video_sei_user_data_unregistered_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +func VideoSEIUserDataUnregisteredMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_video_sei_user_data_unregistered_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // VideoScaler wraps GstVideoScaler // // #GstVideoScaler is a utility object for rescaling and resampling @@ -18882,7 +19491,7 @@ func NewVideoTimeCodeFromDateTimeFull(fpsN uint, fpsD uint, dt *glib.DateTime, f // // - goret *VideoTimeCode func NewVideoTimeCodeFromString(tcStr string) *VideoTimeCode { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstVideoTimeCode // return, full, converted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(tcStr))) @@ -19270,7 +19879,7 @@ func (tc *VideoTimeCode) ToDateTime() *glib.DateTime { // - goret string func (tc *VideoTimeCode) ToString() string { var carg0 *C.GstVideoTimeCode // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstVideoTimeCode)(UnsafeVideoTimeCodeToGlibNone(tc)) @@ -19474,7 +20083,7 @@ func NewVideoTimeCodeInterval(hours uint, minutes uint, seconds uint, frames uin // // @tc_inter_str must only have ":" as separators. func NewVideoTimeCodeIntervalFromString(tcInterStr string) *VideoTimeCodeInterval { - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret *C.GstVideoTimeCodeInterval // return, full, converted carg1 = (*C.gchar)(unsafe.Pointer(C.CString(tcInterStr))) @@ -19618,6 +20227,22 @@ func UnsafeVideoTimeCodeMetaToGlibFull(v *VideoTimeCodeMeta) unsafe.Pointer { v.native = nil // VideoTimeCodeMeta is invalid from here on return _p } +// VideoTimeCodeMetaGetInfo wraps gst_video_time_code_meta_get_info +// The function returns the following values: +// +// - goret *gst.MetaInfo +func VideoTimeCodeMetaGetInfo() *gst.MetaInfo { + var cret *C.GstMetaInfo // return, none, converted + + cret = C.gst_video_time_code_meta_get_info() + + var goret *gst.MetaInfo + + goret = gst.UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + // VideoVBIEncoder wraps GstVideoVBIEncoder // // An encoder for writing ancillary data to the diff --git a/pkg/gstvideo/gstvideo_export.gen.go b/pkg/gstvideo/gstvideo_export.gen.go index 10c8df6..6e9375b 100644 --- a/pkg/gstvideo/gstvideo_export.gen.go +++ b/pkg/gstvideo/gstvideo_export.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstVideo-1. DO NOT EDIT. package gstvideo diff --git a/pkg/gstwebrtc/gstwebrtc.gen.go b/pkg/gstwebrtc/gstwebrtc.gen.go index 5e9b457..1cd5cd3 100644 --- a/pkg/gstwebrtc/gstwebrtc.gen.go +++ b/pkg/gstwebrtc/gstwebrtc.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstWebRTC-1. DO NOT EDIT. package gstwebrtc @@ -1604,7 +1604,7 @@ func UnsafeWebRTCICEToGlibFull(c WebRTCICE) unsafe.Pointer { func (ice *WebRTCICEInstance) AddCandidate(stream WebRTCICEStream, candidate string, promise *gst.Promise) { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 *C.GstWebRTCICEStream // in, none, converted - var carg2 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string var carg3 *C.GstPromise // in, none, converted, nullable carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) @@ -1661,7 +1661,7 @@ func (ice *WebRTCICEInstance) AddStream(sessionId uint) WebRTCICEStream { // - goret bool func (ice *WebRTCICEInstance) AddTurnServer(uri string) bool { var carg0 *C.GstWebRTCICE // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) @@ -1749,7 +1749,7 @@ func (ice *WebRTCICEInstance) GatherCandidates(stream WebRTCICEStream) bool { // - goret string func (ice *WebRTCICEInstance) GetHTTPProxy() string { var carg0 *C.GstWebRTCICE // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) @@ -1890,7 +1890,7 @@ func (ice *WebRTCICEInstance) GetSelectedPair(stream WebRTCICEStream) (*WebRTCIC // - goret string func (ice *WebRTCICEInstance) GetStunServer() string { var carg0 *C.GstWebRTCICE // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) @@ -1911,7 +1911,7 @@ func (ice *WebRTCICEInstance) GetStunServer() string { // - goret string func (ice *WebRTCICEInstance) GetTurnServer() string { var carg0 *C.GstWebRTCICE // in, none, converted - var cret *C.gchar // return, full, string, casted *C.gchar + var cret *C.gchar // return, full, string carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) @@ -1955,7 +1955,7 @@ func (ice *WebRTCICEInstance) SetForceRelay(forceRelay bool) { // Set HTTP Proxy to be used when connecting to TURN server. func (ice *WebRTCICEInstance) SetHTTPProxy(uri string) { var carg0 *C.GstWebRTCICE // in, none, converted - var carg1 *C.gchar // in, none, string, casted *C.gchar + var carg1 *C.gchar // in, none, string carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri))) @@ -1999,8 +1999,8 @@ func (ice *WebRTCICEInstance) SetIsController(controller bool) { func (ice *WebRTCICEInstance) SetLocalCredentials(stream WebRTCICEStream, ufrag string, pwd string) bool { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 *C.GstWebRTCICEStream // in, none, converted - var carg2 *C.gchar // in, none, string, casted *C.gchar - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string + var carg3 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) @@ -2060,8 +2060,8 @@ func (ice *WebRTCICEInstance) SetOnIceCandidate(fn WebRTCICEOnCandidateFunc) { func (ice *WebRTCICEInstance) SetRemoteCredentials(stream WebRTCICEStream, ufrag string, pwd string) bool { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 *C.GstWebRTCICEStream // in, none, converted - var carg2 *C.gchar // in, none, string, casted *C.gchar - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg2 *C.gchar // in, none, string + var carg3 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) @@ -2397,7 +2397,7 @@ func (ice *WebRTCICETransportInstance) NewCandidate(streamId uint, component Web var carg0 *C.GstWebRTCICETransport // in, none, converted var carg1 C.guint // in, none, casted var carg2 C.GstWebRTCICEComponent // in, none, casted - var carg3 *C.gchar // in, none, string, casted *C.gchar + var carg3 *C.gchar // in, none, string carg0 = (*C.GstWebRTCICETransport)(UnsafeWebRTCICETransportToGlibNone(ice)) carg1 = C.guint(streamId) diff --git a/pkg/gstwebrtc/gstwebrtc_export.gen.go b/pkg/gstwebrtc/gstwebrtc_export.gen.go index fe55beb..6c223b6 100644 --- a/pkg/gstwebrtc/gstwebrtc_export.gen.go +++ b/pkg/gstwebrtc/gstwebrtc_export.gen.go @@ -1,4 +1,4 @@ -// Code generated by girgen. DO NOT EDIT. +// Code generated by girgen for GstWebRTC-1. DO NOT EDIT. package gstwebrtc @@ -25,7 +25,7 @@ func _gotk4_gstwebrtc1_WebRTCICEOnCandidateFunc(carg1 *C.GstWebRTCICE, carg2 C.g var ice WebRTCICE // in, none, converted var streamId uint // in, none, casted - var candidate string // in, none, string, casted *C.gchar + var candidate string // in, none, string ice = UnsafeWebRTCICEFromGlibNone(unsafe.Pointer(carg1)) streamId = uint(carg2)