diff --git a/examples/appsrc/main.go b/examples/appsrc/main.go new file mode 100644 index 0000000..fc25ce6 --- /dev/null +++ b/examples/appsrc/main.go @@ -0,0 +1,149 @@ +// This example shows how to use the appsrc element. +package main + +import ( + "context" + "fmt" + "image" + "image/color" + "time" + + "github.com/go-gst/go-gst/pkg/gst" + "github.com/go-gst/go-gst/pkg/gstapp" + "github.com/go-gst/go-gst/pkg/gstvideo" +) + +const width = 320 +const height = 240 + +func createPipeline() (gst.Pipeline, error) { + println("Creating pipeline") + gst.Init() + + // Create a pipeline + pipeline := gst.NewPipeline("").(gst.Pipeline) + + src := gst.ElementFactoryMake("appsrc", "").(gstapp.AppSrc) + conv := gst.ElementFactoryMake("videoconvert", "") + sink := gst.ElementFactoryMake("autovideosink", "") + + // Add the elements to the pipeline and link them + pipeline.AddMany(src, conv, sink) + gst.LinkMany(src, conv, sink) + + // Specify the format we want to provide as application into the pipeline + // by creating a video info with the given format and creating caps from it for the appsrc element. + videoInfo := gstvideo.NewVideoInfo() + + videoInfo.SetFormat(gstvideo.VideoFormatRGBA, width, height) + videoInfo.SetFramerate(2, 1) + + src.SetCaps(videoInfo.ToCaps()) + src.SetObjectProperty("format", gst.FormatTime) + + // Initialize a frame counter + var i int + + // Get all 256 colors in the RGB8P palette. + palette := gstvideo.VideoFormatGetPalette(gstvideo.VideoFormatRGB8P) + + // Since our appsrc element operates in pull mode (it asks us to provide data), + // we add a handler for the need-data callback and provide new data from there. + // In our case, we told gstreamer that we do 2 frames per second. While the + // buffers of all elements of the pipeline are still empty, this will be called + // a couple of times until all of them are filled. After this initial period, + // this handler will be called (on average) twice per second. + src.ConnectNeedData(func(self gstapp.AppSrc, _ uint) { + + // If we've reached the end of the palette, end the stream. + if i == len(palette) { + src.EndOfStream() + return + } + + fmt.Println("Producing frame:", i) + + // Create a buffer that can hold exactly one video RGBA frame. + buffer := gst.NewBufferAllocate(nil, uint(videoInfo.GetSize()), nil) + + // For each frame we produce, we set the timestamp when it should be displayed + // The autovideosink will use this information to display the frame at the right time. + buffer.SetPTS(gst.ClockTime(time.Duration(i) * 500 * time.Millisecond)) + + // Produce an image frame for this iteration. + pixels := produceImageFrame(palette[i]) + + // 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 + // mode of access (read, read/write). + // See: https://gstreamer.freedesktop.org/documentation/plugin-development/advanced/allocation.html + mapped, ok := buffer.Map(gst.MapWrite) + if !ok { + panic("Failed to map buffer") + } + _, err := mapped.Write(pixels) + if err != nil { + println("Failed to write to buffer:", err) + panic("Failed to write to buffer") + } + + mapped.Unmap() + + // Push the buffer onto the pipeline. + self.PushBuffer(buffer) + + i++ + }) + + return pipeline, nil +} + +func produceImageFrame(c color.Color) []uint8 { + upLeft := image.Point{0, 0} + lowRight := image.Point{width, height} + img := image.NewRGBA(image.Rectangle{upLeft, lowRight}) + + for x := 0; x < width; x++ { + for y := 0; y < height; y++ { + img.Set(x, y, c) + } + } + + return img.Pix +} + +func mainLoop(pipeline gst.Pipeline) error { + // Start the pipeline + + pipeline.SetState(gst.StatePlaying) + + for msg := range pipeline.GetBus().Messages(context.Background()) { + switch msg.Type() { + case gst.MessageEos: + return nil + case gst.MessageError: + debug, gerr := msg.ParseError() + if debug != "" { + fmt.Println(gerr.Error(), debug) + } + return gerr + } + } + + return fmt.Errorf("unexpected end of messages without EOS") +} + +func main() { + pipeline, err := createPipeline() + + if err != nil { + fmt.Println("Error creating pipeline:", err) + return + } + + err = mainLoop(pipeline) + + if err != nil { + fmt.Println("Error running pipeline:", err) + } +} diff --git a/examples/custom_events/main.go b/examples/custom_events/main.go index 39354d6..e6640e9 100644 --- a/examples/custom_events/main.go +++ b/examples/custom_events/main.go @@ -4,7 +4,6 @@ package main import ( "context" "fmt" - "runtime" "time" "github.com/go-gst/go-gst/pkg/gst" @@ -88,20 +87,9 @@ func createPipeline() (gst.Pipeline, error) { func runPipeline(pipeline gst.Pipeline) { - go func() { - for msg := range pipeline.GetBus().Messages(context.Background()) { - switch msg.Type() { - case gst.MessageEos: - fmt.Println("Got EOS message") - return - default: - fmt.Println(msg) - } - } - }() - // Start the pipeline pipeline.SetState(gst.StatePlaying) + defer pipeline.SetState(gst.StateNull) go func() { // Loop and on the third iteration send the custom event. @@ -126,14 +114,15 @@ func runPipeline(pipeline gst.Pipeline) { } }() - // When passing an object created by the bindings between scopes, there is a posibility - // the finalizer will leak and destroy your object before you are done with it. One way - // of dealing with this is by taking an additional Ref and disposing of it when you are - // done with the new scope. An alternative is to declare Keep() *after* where you know - // you will be done with the object. This instructs the runtime to defer the finalizer - // until after this point is passed in the code execution. - - runtime.KeepAlive(pipeline) + for msg := range pipeline.GetBus().Messages(context.Background()) { + switch msg.Type() { + case gst.MessageEos: + fmt.Println("Got EOS message") + return + default: + fmt.Println(msg) + } + } } func main() { diff --git a/examples/device_monitor/main.go b/examples/device_monitor/main.go new file mode 100644 index 0000000..33fdbdf --- /dev/null +++ b/examples/device_monitor/main.go @@ -0,0 +1,59 @@ +// This example uses gstreamer's device monitor api. +// +// https://gstreamer.freedesktop.org/documentation/gstreamer/gstdevicemonitor.html +package main + +import ( + "context" + "fmt" + + "github.com/go-gst/go-gst/pkg/gst" +) + +func run() error { + gst.Init() + + fmt.Println("Creating device monitor") + + monitor := gst.NewDeviceMonitor() + fmt.Println("Created device monitor", monitor) + + caps := gst.CapsFromString("video/x-raw") + + monitor.AddFilter("Video/Source", caps) + + fmt.Println("Getting device monitor bus") + bus := monitor.GetBus() + fmt.Println("Got device monitor bus") + + fmt.Println("Starting device monitor") + monitor.Start() + fmt.Println("Started device monitor") + devices := monitor.GetDevices() + fmt.Printf("Got %d devices\n", len(devices)) + for i, v := range devices { + fmt.Printf("Device: %d %s\n", i, v.GetDisplayName()) + } + + for msg := range bus.Messages(context.Background()) { + switch msg.Type() { + case gst.MessageDeviceAdded: + message := msg.ParseDeviceAdded().GetDisplayName() + fmt.Println("Added: ", message) + case gst.MessageDeviceRemoved: + message := msg.ParseDeviceRemoved().GetDisplayName() + fmt.Println("Removed: ", message) + default: + // All messages implement a Stringer. However, this is + // typically an expensive thing to do and should be avoided. + fmt.Println("Type: ", msg.Type()) + fmt.Println("Message: ", msg.String()) + } + } + + return nil +} + +func main() { + run() +} diff --git a/examples/device_provider/main.go b/examples/device_provider/main.go new file mode 100644 index 0000000..904e19c --- /dev/null +++ b/examples/device_provider/main.go @@ -0,0 +1,64 @@ +// This example uses gstreamer's device provider api. +// +// https://gstreamer.freedesktop.org/documentation/gstreamer/gstdeviceprovider.html +package main + +import ( + "context" + "fmt" + "os" + + "github.com/go-gst/go-gst/pkg/gst" +) + +func runPipeline() error { + + gst.Init() + fmt.Println("Running device provider") + + fmt.Println("Creating device monitor") + + provider := gst.DeviceProviderFactoryGetByName("avfdeviceprovider") + fmt.Println("Created device provider") + + if provider == nil { + fmt.Println("No provider found") + os.Exit(2) + } + + fmt.Println("Starting device monitor") + provider.Start() + fmt.Println("Started device monitor") + + fmt.Println("listing devices from provider") + devices := provider.GetDevices() + for i, v := range devices { + fmt.Printf("Device: %d %s\n", i, v.GetDisplayName()) + } + + fmt.Println("Getting device provider bus") + bus := provider.GetBus() + fmt.Println("Got device provider bus") + + for msg := range bus.Messages(context.Background()) { + switch msg.Type() { + case gst.MessageDeviceAdded: + message := msg.ParseDeviceAdded().GetDisplayName() + fmt.Println("Added: ", message) + case gst.MessageDeviceRemoved: + message := msg.ParseDeviceRemoved().GetDisplayName() + fmt.Println("Removed: ", message) + default: + // All messages implement a Stringer. However, this is + // typically an expensive thing to do and should be avoided. + fmt.Println("Type: ", msg.Type()) + fmt.Println("Message: ", msg.String()) + } + } + + return nil +} + +func main() { + runPipeline() +} diff --git a/examples/gif-encoder/main.go b/examples/gif-encoder/main.go new file mode 100644 index 0000000..23f2759 --- /dev/null +++ b/examples/gif-encoder/main.go @@ -0,0 +1,238 @@ +// This example demonstrates using gstreamer to convert a video stream into image frames +// and then encoding those frames to a gif. +package main + +import ( + "context" + "flag" + "fmt" + "image" + "image/gif" + "image/jpeg" + "os" + "path" + "strings" + "time" + + "github.com/go-gst/go-gst/pkg/gst" + "github.com/go-gst/go-gst/pkg/gstapp" + "github.com/go-gst/go-gst/pkg/gstvideo" +) + +var srcFile string +var outFile string + +const width = 320 +const height = 240 + +func encodeGif() error { + gst.Init() + + // Initialize an empty buffer for the encoded gif images. + outGif := &gif.GIF{ + Image: make([]*image.Paletted, 0), + Delay: make([]int, 0), + } + + // Create a new pipeline instance + pipeline := gst.NewPipeline("").(gst.Pipeline) + + filesrc := gst.ElementFactoryMake("filesrc", "") + decodebin := gst.ElementFactoryMake("decodebin", "") + + // Add the elements to the pipeline. + pipeline.AddMany(filesrc, decodebin) + + // Set the location of the source file the filesrc element and link it to the + // decodebin. + filesrc.SetObjectProperty("location", srcFile) + gst.LinkMany(filesrc, decodebin) + + // Conncet to decodebin's pad-added signal to build the rest of the pipeline + // dynamically. For more information on why this is needed, see the decodebin + // example. + decodebin.ConnectPadAdded(func(self gst.Element, srcPad gst.Pad) { + // Build out the rest of the elements for the pipeline pipeline. + + queue := gst.ElementFactoryMake("queue", "") + videoconvert := gst.ElementFactoryMake("videoconvert", "") + videoscale := gst.ElementFactoryMake("videoscale", "") + videorate := gst.ElementFactoryMake("videorate", "") + jpegenc := gst.ElementFactoryMake("jpegenc", "") + + // Add the elements to the pipeline and sync their state with the pipeline + pipeline.AddMany(queue, videoconvert, videoscale, videorate, jpegenc) + + queue.SyncStateWithParent() + videoconvert.SyncStateWithParent() + videoscale.SyncStateWithParent() + videorate.SyncStateWithParent() + jpegenc.SyncStateWithParent() + + // Start linking elements + + queue.Link(videoconvert) + + // We need to tell the pipeline the output format we want. Here we are going to request + // RGBx color with predefined boundaries and 5 frames per second. + videoInfo := gstvideo.NewVideoInfo() + videoInfo.SetFormat(gstvideo.VideoFormatRgbx, width, height) + videoInfo.SetFramerate(5, 1) + + // videoconvert.LinkFiltered(videoscale, videoInfo.ToCaps()) + gst.LinkMany(videoconvert, videoscale, videorate) + + videorate.LinkFiltered(jpegenc, videoInfo.ToCaps()) + + // Create an app sink that we are going to use to pull images from the pipeline + // one at a time. (An error can happen here too, but for the sake of brevity...) + appSink := gst.ElementFactoryMake("appsink", "").(gstapp.AppSink) + pipeline.Add(appSink) + jpegenc.Link(appSink) + appSink.SyncStateWithParent() + appSink.SetWaitOnEos(false) + + // We can query the decodebin for the duration of the video it received. We can then + // use this value to calculate the total number of frames we expect to produce. + query := gst.NewQueryDuration(gst.FormatTime) + if ok := self.Query(query); !ok { + self.MessageError(0, int(gst.LibraryErrorFailed), "Failed to query video duration from decodebin", "") + return + } + + // Fetch the result from the query. + _, duration := query.ParseDuration() + + // This value is in nanoseconds. Since we told the videorate element to produce 5 frames + // per second, we know the total frames will be (duration / 1e+9) * 5. + totalFrames := int((time.Duration(duration) * time.Nanosecond).Seconds()) * 5 + + // Getting data out of the sink is done by setting callbacks. Each new sample + // will be a new jpeg image from the pipeline. + var frameNum int + + appSink.ConnectEos(func(self gstapp.AppSink) { + fmt.Println("\nWriting the results of the gif to", outFile) + file, err := os.Create(outFile) + if err != nil { + fmt.Println("Could not create output file:", err) + return + } + defer file.Close() + if err := gif.EncodeAll(file, outGif); err != nil { + fmt.Println("Could not encode images to gif format!", err) + } + // Signal the pipeline that we've completed EOS. + // (this should not be required, need to investigate) + pipeline.GetBus().Post(gst.NewMessageEos(appSink)) + }) + + appSink.ConnectNewSample(func(sink gstapp.AppSink) gst.FlowReturn { + // Increment the frame number counter + frameNum++ + + if frameNum > totalFrames { + // If we've reached the total number of frames we are expecting. We can + // signal the main loop to quit. + // This needs to be done from a goroutine to not block the app sink + // callback. + return gst.FlowEos + } + + // Pull the sample from the sink + sample := sink.PullSample() + if sample == nil { + return gst.FlowOK + } + + fmt.Printf("\033[2K\r") + fmt.Printf("Processing image frame %d/%d", frameNum, totalFrames) + + // Retrieve the buffer from the sample. + buffer := sample.GetBuffer() + + mapped, ok := buffer.Map(gst.MapRead) + if !ok { + panic("Failed to map buffer") + } + + // mapped buffers implement io.Reader + img, err := jpeg.Decode(mapped) + if err != nil { + self.MessageError(gst.LibraryErrorQuark(), int(gst.LibraryErrorFailed), "Error decoding jpeg frame", err.Error()) + return gst.FlowError + } + + // Create a new paletted image with the same bounds as the pulled one + frame := image.NewPaletted(img.Bounds(), gstvideo.VideoFormatGetPalette(gstvideo.VideoFormatRGB8P)) + + // Iterate the bounds of the image and set the pixels in their correct place. + for x := 1; x <= img.Bounds().Dx(); x++ { + for y := 1; y <= img.Bounds().Dy(); y++ { + frame.Set(x, y, img.At(x, y)) + } + } + + // Append the image data to the gif + outGif.Image = append(outGif.Image, frame) + outGif.Delay = append(outGif.Delay, 0) + return gst.FlowOK + }) + + // Link the src pad to the queue + srcPad.Link(queue.GetStaticPad("sink")) + }) + + fmt.Println("Encoding video to gif") + + // Now that the pipeline is all set up we can start it. + pipeline.SetState(gst.StatePlaying) + + for msg := range pipeline.GetBus().Messages(context.Background()) { + switch msg.Type() { + case gst.MessageEos: + return nil + case gst.MessageError: + debug, gerr := msg.ParseError() + fmt.Println("ERROR:", gerr.Error()) + if debug != "" { + fmt.Println("DEBUG") + fmt.Println(debug) + } + + return gerr + } + } + + return fmt.Errorf("unexpected end of messages without EOS") +} + +func main() { + // Add flag arguments + flag.StringVar(&srcFile, "i", "", "The video to encode to gif. This argument is required.") + flag.StringVar(&outFile, "o", "", "The file to output the gif to. By default a file is created in this directory with the same name as the input.") + + // Parse the command line + flag.Parse() + + // Make sure the user provided a source file + if srcFile == "" { + flag.Usage() + fmt.Println("The input file cannot be empty!") + os.Exit(1) + } + + // If the user did not provide a destination file, generate one. + if outFile == "" { + base := path.Base(srcFile) + spl := strings.Split(base, ".") + if len(spl) < 3 { + outFile = spl[0] + } else { + outFile = strings.Join(spl[:len(spl)-2], ".") + } + outFile = outFile + ".gif" + } + + encodeGif() +} diff --git a/generator.go b/generator.go index 7123a45..df9740f 100644 --- a/generator.go +++ b/generator.go @@ -95,6 +95,14 @@ var Data = genmain.Overlay( // Collides with method of the same name types.TypeRenamer("GstVideo-1.VideoChromaResample", "VideoChromaResampler"), + + types.PreprocessorFunc(func(r gir.Repositories) { + t := r.FindFullType("GstVideo-1.VideoTimeCode").Type.(*gir.Record) + + // FIXME: the get_type function requires gst_init(), thus crashes if called + // during init + t.GLibGetType = "" + }), }, Config: typesystem.Config{ Namespaces: map[string]typesystem.NamespaceConfig{ @@ -163,6 +171,8 @@ var Data = genmain.Overlay( // must be implemented manually typesystem.IgnoreMatching("VideoCodecFrame.set_user_data"), typesystem.IgnoreMatching("VideoCodecFrame.get_user_data"), + // returns a gconstpointer to an array, manually implemented instead + typesystem.IgnoreMatching("VideoFormat.get_palette"), }, }, "GstPbutils-1": { diff --git a/pkg/gst/buffer.go b/pkg/gst/buffer.go new file mode 100644 index 0000000..0a7cf39 --- /dev/null +++ b/pkg/gst/buffer.go @@ -0,0 +1,129 @@ +package gst + +import ( + "runtime" +) + +// #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 +} + +// PTS returns the presentation timestamp of the buffer. +// It can be GST_CLOCK_TIME_NONE when the PTS is not known or relevant. +func (buffer *Buffer) PTS() ClockTime { + return ClockTime(buffer.buffer.native.pts) +} + +// SetPTS sets the presentation timestamp of the buffer. +// Use GST_CLOCK_TIME_NONE if the PTS is not known or relevant. +func (buffer *Buffer) SetPTS(pts ClockTime) { + buffer.buffer.native.pts = C.GstClockTime(pts) +} + +// DTS returns the decoding timestamp of the buffer. +// It can be GST_CLOCK_TIME_NONE when the DTS is not known or relevant. +func (buffer *Buffer) DTS() ClockTime { + return ClockTime(buffer.buffer.native.dts) +} + +// SetDTS sets the decoding timestamp of the buffer. +// Use GST_CLOCK_TIME_NONE if the DTS is not known or relevant. +func (buffer *Buffer) SetDTS(dts ClockTime) { + buffer.buffer.native.dts = C.GstClockTime(dts) +} + +// Duration returns the duration in time of the buffer data. +// It can be GST_CLOCK_TIME_NONE when the duration is not known or relevant. +func (buffer *Buffer) Duration() ClockTime { + return ClockTime(buffer.buffer.native.duration) +} + +// SetDuration sets the duration in time of the buffer data. +// Use GST_CLOCK_TIME_NONE if the duration is not known or relevant. +func (buffer *Buffer) SetDuration(duration ClockTime) { + buffer.buffer.native.duration = C.GstClockTime(duration) +} + +// Offset returns the media-specific offset for the buffer data. +// For video frames, this is the frame number of this buffer. +// For audio samples, this is the offset of the first sample in this buffer. +// For file data or compressed data, this is the byte offset of the first byte in this buffer. +func (buffer *Buffer) Offset() uint64 { + return uint64(buffer.buffer.native.offset) +} + +// SetOffset sets the media-specific offset for the buffer data. +// For video frames, this is the frame number of this buffer. +// For audio samples, this is the offset of the first sample in this buffer. +// For file data or compressed data, this is the byte offset of the first byte in this buffer. +func (buffer *Buffer) SetOffset(offset uint64) { + buffer.buffer.native.offset = C.guint64(offset) +} + +// OffsetEnd returns the last offset contained in this buffer. +// It has the same format as Offset. +func (buffer *Buffer) OffsetEnd() uint64 { + return uint64(buffer.buffer.native.offset_end) +} + +// SetOffsetEnd sets the last offset contained in this buffer. +// It has the same format as Offset. +func (buffer *Buffer) SetOffsetEnd(offsetEnd uint64) { + buffer.buffer.native.offset_end = C.guint64(offsetEnd) +} diff --git a/pkg/gst/element_manual.go b/pkg/gst/element_manual.go index 22244b5..083094d 100644 --- a/pkg/gst/element_manual.go +++ b/pkg/gst/element_manual.go @@ -1,7 +1,18 @@ package gst +import ( + "path" + "runtime" + + "github.com/diamondburned/gotk4/pkg/glib/v2" +) + type ElementExtManual interface { + // BlockSetState is a convenience wrapper around calling SetState and State to wait for async state changes. See [Element.State] for more info. BlockSetState(state State, timeout ClockTime) StateChangeReturn + + // MessageError is a convenience wrapper for posting an error message from inside an element. See [Element.MessageFull] for more info. + MessageError(domain glib.Quark, code int, text, debug string) } // BlockSetState is a convenience wrapper around calling SetState and State to wait for async state changes. See State for more info. @@ -15,6 +26,12 @@ func (el *ElementInstance) BlockSetState(state State, timeout ClockTime) StateCh return ret } +// MessageError is a convenience wrapper for posting an error message from inside an element. See [Element.MessageFull] for more info. +func (e *ElementInstance) MessageError(domain glib.Quark, code int, text, debug string) { + function, file, line, _ := runtime.Caller(1) + e.MessageFull(MessageError, domain, code, text, debug, path.Base(file), runtime.FuncForPC(function).Name(), line) +} + func LinkMany(elements ...Element) bool { if len(elements) < 2 { return false diff --git a/pkg/gst/gst.gen.go b/pkg/gst/gst.gen.go index 5869c43..373c39a 100644 --- a/pkg/gst/gst.gen.go +++ b/pkg/gst/gst.gen.go @@ -886,6 +886,22 @@ func (e CoreError) String() string { } } +// CoreErrorQuark wraps gst_core_error_quark +// The function returns the following values: +// +// - goret glib.Quark +func CoreErrorQuark() glib.Quark { + var cret C.GQuark // return, none, casted, alias + + cret = C.gst_core_error_quark() + + var goret glib.Quark + + goret = glib.Quark(cret) + + return goret +} + // DebugColorMode wraps GstDebugColorMode type DebugColorMode C.int @@ -1028,6 +1044,33 @@ func (e DebugLevel) String() string { } } +// DebugLevelGetName wraps gst_debug_level_get_name +// +// The function takes the following parameters: +// +// - level DebugLevel: the level to get the name for +// +// The function returns the following values: +// +// - goret string +// +// Get the string representation of a debugging level +func DebugLevelGetName(level DebugLevel) string { + var carg1 C.GstDebugLevel // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstDebugLevel(level) + + cret = C.gst_debug_level_get_name(carg1) + runtime.KeepAlive(level) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + // EventType wraps GstEventType // // #GstEventType lists the standard event types that can be sent in a pipeline. @@ -1247,6 +1290,116 @@ func (e EventType) String() string { } } +// EventTypeGetFlags wraps gst_event_type_get_flags +// +// The function takes the following parameters: +// +// - typ EventType: a #GstEventType +// +// The function returns the following values: +// +// - goret EventTypeFlags +// +// Gets the #GstEventTypeFlags associated with @type. +func EventTypeGetFlags(typ EventType) EventTypeFlags { + var carg1 C.GstEventType // in, none, casted + var cret C.GstEventTypeFlags // return, none, casted + + carg1 = C.GstEventType(typ) + + cret = C.gst_event_type_get_flags(carg1) + runtime.KeepAlive(typ) + + var goret EventTypeFlags + + goret = EventTypeFlags(cret) + + return goret +} + +// EventTypeGetName wraps gst_event_type_get_name +// +// The function takes the following parameters: +// +// - typ EventType: the event type +// +// The function returns the following values: +// +// - goret string +// +// Get a printable name for the given event type. Do not modify or free. +func EventTypeGetName(typ EventType) string { + var carg1 C.GstEventType // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstEventType(typ) + + cret = C.gst_event_type_get_name(carg1) + runtime.KeepAlive(typ) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + +// EventTypeToQuark wraps gst_event_type_to_quark +// +// The function takes the following parameters: +// +// - typ EventType: the event type +// +// The function returns the following values: +// +// - goret glib.Quark +// +// Get the unique quark for the given event type. +func EventTypeToQuark(typ EventType) glib.Quark { + var carg1 C.GstEventType // in, none, casted + var cret C.GQuark // return, none, casted, alias + + carg1 = C.GstEventType(typ) + + cret = C.gst_event_type_to_quark(carg1) + runtime.KeepAlive(typ) + + var goret glib.Quark + + goret = glib.Quark(cret) + + return goret +} + +// EventTypeToStickyOrdering wraps gst_event_type_to_sticky_ordering +// +// The function takes the following parameters: +// +// - typ EventType: a #GstEventType +// +// The function returns the following values: +// +// - goret uint +// +// Converts the #GstEventType to an unsigned integer that +// represents the ordering of sticky events when re-sending them. +// A lower value represents a higher-priority event. +func EventTypeToStickyOrdering(typ EventType) uint { + var carg1 C.GstEventType // in, none, casted + var cret C.guint // return, none, casted + + carg1 = C.GstEventType(typ) + + cret = C.gst_event_type_to_sticky_ordering(carg1) + runtime.KeepAlive(typ) + + var goret uint + + goret = uint(cret) + + return goret +} + // FlowReturn wraps GstFlowReturn // // The result of passing data to a pad. @@ -1409,6 +1562,172 @@ func (e Format) String() string { } } +// FormatGetByNick wraps gst_format_get_by_nick +// +// The function takes the following parameters: +// +// - nick string: The nick of the format +// +// The function returns the following values: +// +// - goret Format +// +// Return the format registered with the given nick. +func FormatGetByNick(nick string) Format { + var carg1 *C.gchar // in, none, string + var cret C.GstFormat // return, none, casted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(nick))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_format_get_by_nick(carg1) + runtime.KeepAlive(nick) + + var goret Format + + goret = Format(cret) + + return goret +} + +// FormatGetDetails wraps gst_format_get_details +// +// The function takes the following parameters: +// +// - format Format: The format to get details of +// +// The function returns the following values: +// +// - goret *FormatDefinition (nullable) +// +// Get details about the given format. +func FormatGetDetails(format Format) *FormatDefinition { + var carg1 C.GstFormat // in, none, casted + var cret *C.GstFormatDefinition // return, none, converted, nullable + + carg1 = C.GstFormat(format) + + cret = C.gst_format_get_details(carg1) + runtime.KeepAlive(format) + + var goret *FormatDefinition + + if cret != nil { + goret = UnsafeFormatDefinitionFromGlibNone(unsafe.Pointer(cret)) + } + + return goret +} + +// FormatGetName wraps gst_format_get_name +// +// The function takes the following parameters: +// +// - format Format: a #GstFormat +// +// The function returns the following values: +// +// - goret string (nullable) +// +// Get a printable name for the given format. Do not modify or free. +func FormatGetName(format Format) string { + var carg1 C.GstFormat // in, none, casted + var cret *C.gchar // return, none, string, nullable-string + + carg1 = C.GstFormat(format) + + cret = C.gst_format_get_name(carg1) + runtime.KeepAlive(format) + + var goret string + + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } + + return goret +} + +// FormatIterateDefinitions wraps gst_format_iterate_definitions +// The function returns the following values: +// +// - goret *Iterator +// +// Iterate all the registered formats. The format definition is read +// only. +func FormatIterateDefinitions() *Iterator { + var cret *C.GstIterator // return, full, converted + + cret = C.gst_format_iterate_definitions() + + var goret *Iterator + + goret = UnsafeIteratorFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + +// FormatRegister wraps gst_format_register +// +// The function takes the following parameters: +// +// - nick string: The nick of the new format +// - description string: The description of the new format +// +// The function returns the following values: +// +// - goret Format +// +// Create a new GstFormat based on the nick or return an +// already registered format with that nick. +func FormatRegister(nick string, description string) Format { + var carg1 *C.gchar // in, none, string + var carg2 *C.gchar // in, none, string + var cret C.GstFormat // return, none, casted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(nick))) + defer C.free(unsafe.Pointer(carg1)) + carg2 = (*C.gchar)(unsafe.Pointer(C.CString(description))) + defer C.free(unsafe.Pointer(carg2)) + + cret = C.gst_format_register(carg1, carg2) + runtime.KeepAlive(nick) + runtime.KeepAlive(description) + + var goret Format + + goret = Format(cret) + + return goret +} + +// FormatToQuark wraps gst_format_to_quark +// +// The function takes the following parameters: +// +// - format Format: a #GstFormat +// +// The function returns the following values: +// +// - goret glib.Quark +// +// Get the unique quark for the given format. +func FormatToQuark(format Format) glib.Quark { + var carg1 C.GstFormat // in, none, casted + var cret C.GQuark // return, none, casted, alias + + carg1 = C.GstFormat(format) + + cret = C.gst_format_to_quark(carg1) + runtime.KeepAlive(format) + + var goret glib.Quark + + goret = glib.Quark(cret) + + return goret +} + // IteratorItem wraps GstIteratorItem // // The result of a #GstIteratorItemFunction. @@ -1557,6 +1876,22 @@ func (e LibraryError) String() string { } } +// LibraryErrorQuark wraps gst_library_error_quark +// The function returns the following values: +// +// - goret glib.Quark +func LibraryErrorQuark() glib.Quark { + var cret C.GQuark // return, none, casted, alias + + cret = C.gst_library_error_quark() + + var goret glib.Quark + + goret = glib.Quark(cret) + + return goret +} + // PadDirection wraps GstPadDirection // // The direction of a pad. @@ -1699,6 +2034,33 @@ func (e PadMode) String() string { } } +// PadModeGetName wraps gst_pad_mode_get_name +// +// The function takes the following parameters: +// +// - mode PadMode: the pad mode +// +// The function returns the following values: +// +// - goret string +// +// Return the name of a pad mode, for use in debug messages mostly. +func PadModeGetName(mode PadMode) string { + var carg1 C.GstPadMode // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstPadMode(mode) + + cret = C.gst_pad_mode_get_name(carg1) + runtime.KeepAlive(mode) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + // PadPresence wraps GstPadPresence // // Indicates when this pad will become available. @@ -1874,6 +2236,24 @@ func (e ParseError) String() string { } } +// ParseErrorQuark wraps gst_parse_error_quark +// The function returns the following values: +// +// - goret glib.Quark +// +// Get the error quark used by the parsing subsystem. +func ParseErrorQuark() glib.Quark { + var cret C.GQuark // return, none, casted, alias + + cret = C.gst_parse_error_quark() + + var goret glib.Quark + + goret = glib.Quark(cret) + + return goret +} + // PluginError wraps GstPluginError // // The plugin loading errors @@ -1914,6 +2294,24 @@ func (e PluginError) String() string { } } +// PluginErrorQuark wraps gst_plugin_error_quark +// The function returns the following values: +// +// - goret glib.Quark +// +// Get the error quark. +func PluginErrorQuark() glib.Quark { + var cret C.GQuark // return, none, casted, alias + + cret = C.gst_plugin_error_quark() + + var goret glib.Quark + + goret = glib.Quark(cret) + + return goret +} + // ProgressType wraps GstProgressType // // The type of a %GST_MESSAGE_PROGRESS. The progress messages inform the @@ -2192,6 +2590,87 @@ func (e QueryType) String() string { } } +// QueryTypeGetFlags wraps gst_query_type_get_flags +// +// The function takes the following parameters: +// +// - typ QueryType: a #GstQueryType +// +// The function returns the following values: +// +// - goret QueryTypeFlags +// +// Gets the #GstQueryTypeFlags associated with @type. +func QueryTypeGetFlags(typ QueryType) QueryTypeFlags { + var carg1 C.GstQueryType // in, none, casted + var cret C.GstQueryTypeFlags // return, none, casted + + carg1 = C.GstQueryType(typ) + + cret = C.gst_query_type_get_flags(carg1) + runtime.KeepAlive(typ) + + var goret QueryTypeFlags + + goret = QueryTypeFlags(cret) + + return goret +} + +// QueryTypeGetName wraps gst_query_type_get_name +// +// The function takes the following parameters: +// +// - typ QueryType: the query type +// +// The function returns the following values: +// +// - goret string +// +// Get a printable name for the given query type. Do not modify or free. +func QueryTypeGetName(typ QueryType) string { + var carg1 C.GstQueryType // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstQueryType(typ) + + cret = C.gst_query_type_get_name(carg1) + runtime.KeepAlive(typ) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + +// QueryTypeToQuark wraps gst_query_type_to_quark +// +// The function takes the following parameters: +// +// - typ QueryType: the query type +// +// The function returns the following values: +// +// - goret glib.Quark +// +// Get the unique quark for the given query type. +func QueryTypeToQuark(typ QueryType) glib.Quark { + var carg1 C.GstQueryType // in, none, casted + var cret C.GQuark // return, none, casted, alias + + carg1 = C.GstQueryType(typ) + + cret = C.gst_query_type_to_quark(carg1) + runtime.KeepAlive(typ) + + var goret glib.Quark + + goret = glib.Quark(cret) + + return goret +} + // Rank wraps GstRank // // Element priority ranks. Defines the order in which the autoplugger (or @@ -2355,6 +2834,22 @@ func (e ResourceError) String() string { } } +// ResourceErrorQuark wraps gst_resource_error_quark +// The function returns the following values: +// +// - goret glib.Quark +func ResourceErrorQuark() glib.Quark { + var cret C.GQuark // return, none, casted, alias + + cret = C.gst_resource_error_quark() + + var goret glib.Quark + + goret = glib.Quark(cret) + + return goret +} + // SearchMode wraps GstSearchMode // // The different search modes. @@ -2619,6 +3114,33 @@ func (e StateChange) String() string { } } +// StateChangeGetName wraps gst_state_change_get_name +// +// The function takes the following parameters: +// +// - transition StateChange: a #GstStateChange to get the name of. +// +// The function returns the following values: +// +// - goret string +// +// Gets a string representing the given state transition. +func StateChangeGetName(transition StateChange) string { + var carg1 C.GstStateChange // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstStateChange(transition) + + cret = C.gst_state_change_get_name(carg1) + runtime.KeepAlive(transition) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + // StateChangeReturn wraps GstStateChangeReturn // // The possible return values from a state change function such as @@ -2773,6 +3295,22 @@ func (e StreamError) String() string { } } +// StreamErrorQuark wraps gst_stream_error_quark +// The function returns the following values: +// +// - goret glib.Quark +func StreamErrorQuark() glib.Quark { + var cret C.GQuark // return, none, casted, alias + + cret = C.gst_stream_error_quark() + + var goret glib.Quark + + goret = glib.Quark(cret) + + return goret +} + // StreamStatusType wraps GstStreamStatusType // // The type of a %GST_MESSAGE_STREAM_STATUS. The stream status messages inform the @@ -3137,6 +3675,33 @@ func (e TocEntryType) String() string { } } +// TocEntryTypeGetNick wraps gst_toc_entry_type_get_nick +// +// The function takes the following parameters: +// +// - typ TocEntryType: a #GstTocEntryType. +// +// The function returns the following values: +// +// - goret string +// +// Converts @type to a string representation. +func TocEntryTypeGetNick(typ TocEntryType) string { + var carg1 C.GstTocEntryType // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstTocEntryType(typ) + + cret = C.gst_toc_entry_type_get_nick(carg1) + runtime.KeepAlive(typ) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + // TocLoopType wraps GstTocLoopType // // How a #GstTocEntry should be repeated. By default, entries are played a @@ -3376,6 +3941,22 @@ func (e URIError) String() string { } } +// URIErrorQuark wraps gst_uri_error_quark +// The function returns the following values: +// +// - goret glib.Quark +func URIErrorQuark() glib.Quark { + var cret C.GQuark // return, none, casted, alias + + cret = C.gst_uri_error_quark() + + var goret glib.Quark + + goret = glib.Quark(cret) + + return goret +} + // URIType wraps GstURIType // // The different types of URI direction. @@ -5039,6 +5620,60 @@ func (f MessageType) String() string { return "MessageType(" + strings.Join(parts, "|") + ")" } +// MessageTypeGetName wraps gst_message_type_get_name +// +// The function takes the following parameters: +// +// - typ MessageType: the message type +// +// The function returns the following values: +// +// - goret string +// +// Get a printable name for the given message type. Do not modify or free. +func MessageTypeGetName(typ MessageType) string { + var carg1 C.GstMessageType // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstMessageType(typ) + + cret = C.gst_message_type_get_name(carg1) + runtime.KeepAlive(typ) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + +// MessageTypeToQuark wraps gst_message_type_to_quark +// +// The function takes the following parameters: +// +// - typ MessageType: the message type +// +// The function returns the following values: +// +// - goret glib.Quark +// +// Get the unique quark for the given message type. +func MessageTypeToQuark(typ MessageType) glib.Quark { + var carg1 C.GstMessageType // in, none, casted + var cret C.GQuark // return, none, casted, alias + + carg1 = C.GstMessageType(typ) + + cret = C.gst_message_type_to_quark(carg1) + runtime.KeepAlive(typ) + + var goret glib.Quark + + goret = glib.Quark(cret) + + return goret +} + // MetaFlags wraps GstMetaFlags // // Extra metadata flags. @@ -6618,6 +7253,33 @@ func (f StreamType) String() string { return "StreamType(" + strings.Join(parts, "|") + ")" } +// StreamTypeGetName wraps gst_stream_type_get_name +// +// The function takes the following parameters: +// +// - stype StreamType: a #GstStreamType +// +// The function returns the following values: +// +// - goret string +// +// Get a descriptive string for a given #GstStreamType +func StreamTypeGetName(stype StreamType) string { + var carg1 C.GstStreamType // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstStreamType(stype) + + cret = C.gst_stream_type_get_name(carg1) + runtime.KeepAlive(stype) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + // TracerValueFlags wraps GstTracerValueFlags // // Flag that describe the value. These flags help applications processing the @@ -7134,10 +7796,10 @@ func DebugGetDefaultThreshold() DebugLevel { // // The function returns the following values: // -// - goret string +// - goret string (nullable) func DebugGetStackTrace(flags StackTraceFlags) string { var carg1 C.GstStackTraceFlags // in, none, casted - var cret *C.gchar // return, full, string + var cret *C.gchar // return, full, string, nullable-string carg1 = C.GstStackTraceFlags(flags) @@ -7146,8 +7808,10 @@ func DebugGetStackTrace(flags StackTraceFlags) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -7642,7 +8306,7 @@ func ErrorGetMessage(domain glib.Quark, code int) string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // - _goerr error (nullable): an error // // Similar to g_filename_to_uri(), but attempts to handle relative file paths @@ -7653,7 +8317,7 @@ 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 - var cret *C.gchar // return, full, string + var cret *C.gchar // return, full, string, nullable-string var _cerr *C.GError // out, full, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(filename))) @@ -7665,8 +8329,10 @@ func FilenameToURI(filename string) (string, error) { var goret string var _goerr error - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } if _cerr != nil { _goerr = glib.UnsafeErrorFromGlibFull(unsafe.Pointer(_cerr)) } @@ -7766,7 +8432,7 @@ func FormatsContains(formats []Format, format Format) bool { // GetMainExecutablePath wraps gst_get_main_executable_path // The function returns the following values: // -// - goret string +// - goret string (nullable) // // This helper is mostly helpful for plugins that need to // inspect the folder of the main executable to determine @@ -7776,13 +8442,15 @@ 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 + var cret *C.gchar // return, none, string, nullable-string cret = C.gst_get_main_executable_path() var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -8065,13 +8733,13 @@ func ParseLaunchFull(pipelineDescription string, _context *ParseContext, flags P // // The function returns the following values: // -// - goret []string +// - goret []string (nullable) // // Iterates the supplied list of UUIDs and checks the GstRegistry for // all the decryptors supporting one of the supplied UUIDs. func ProtectionFilterSystemsByAvailableDecryptors(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, transfer: full, C Pointers: 2, Name: array[utf8], scope: , array (inner: *typesystem.StringPrimitive, zero-terminated) + var cret **C.gchar // return, transfer: full, C Pointers: 2, Name: array[utf8], scope: , nullable, array (inner: *typesystem.StringPrimitive, zero-terminated) _ = systemIdentifiers _ = carg1 @@ -8115,14 +8783,14 @@ func ProtectionMetaApiGetType() gobject.Type { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Iterates the supplied list of UUIDs and checks the GstRegistry for // an element that supports one of the supplied UUIDs. If more than one // 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 + var cret *C.gchar // return, none, string, nullable-string _ = systemIdentifiers _ = carg1 @@ -8133,7 +8801,9 @@ func ProtectionSelectSystem(systemIdentifiers []string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -9947,12 +10617,12 @@ func ValueGetFractionNumerator(value *gobject.Value) int { // // The function returns the following values: // -// - goret *gobject.Value +// - goret *gobject.Value (nullable) // // Gets the maximum of the range specified by @value. func ValueGetFractionRangeMax(value *gobject.Value) *gobject.Value { var carg1 *C.GValue // in, none, converted - var cret *C.GValue // return, none, converted + var cret *C.GValue // return, none, converted, nullable carg1 = (*C.GValue)(gobject.UnsafeValueToGlibUseAnyInstead(value)) @@ -9961,7 +10631,9 @@ func ValueGetFractionRangeMax(value *gobject.Value) *gobject.Value { var goret *gobject.Value - goret = gobject.UnsafeValueFromGlibUseAnyInstead(unsafe.Pointer(cret)) + if cret != nil { + goret = gobject.UnsafeValueFromGlibUseAnyInstead(unsafe.Pointer(cret)) + } return goret } @@ -9974,12 +10646,12 @@ func ValueGetFractionRangeMax(value *gobject.Value) *gobject.Value { // // The function returns the following values: // -// - goret *gobject.Value +// - goret *gobject.Value (nullable) // // Gets the minimum of the range specified by @value. func ValueGetFractionRangeMin(value *gobject.Value) *gobject.Value { var carg1 *C.GValue // in, none, converted - var cret *C.GValue // return, none, converted + var cret *C.GValue // return, none, converted, nullable carg1 = (*C.GValue)(gobject.UnsafeValueToGlibUseAnyInstead(value)) @@ -9988,7 +10660,9 @@ func ValueGetFractionRangeMin(value *gobject.Value) *gobject.Value { var goret *gobject.Value - goret = gobject.UnsafeValueFromGlibUseAnyInstead(unsafe.Pointer(cret)) + if cret != nil { + goret = gobject.UnsafeValueFromGlibUseAnyInstead(unsafe.Pointer(cret)) + } return goret } @@ -10347,7 +11021,7 @@ func ValueRegister(table *ValueTable) { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // tries to transform the given @value into a string representation that allows // getting back this string later on using gst_value_deserialize(). @@ -10355,7 +11029,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 + var cret *C.gchar // return, full, string, nullable-string carg1 = (*C.GValue)(gobject.UnsafeValueToGlibUseAnyInstead(value)) @@ -10364,8 +11038,10 @@ func ValueSerialize(value *gobject.Value) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -10873,7 +11549,7 @@ type ChildProxy interface { // // The function returns the following values: // - // - goret gobject.Object + // - goret gobject.Object (nullable) // // Fetches a child by its number. GetChildByIndex(uint) gobject.Object @@ -10885,7 +11561,7 @@ type ChildProxy interface { // // The function returns the following values: // - // - goret gobject.Object + // - goret gobject.Object (nullable) // // Looks up a child element by the given name. // @@ -10901,7 +11577,7 @@ type ChildProxy interface { // // The function returns the following values: // - // - goret gobject.Object + // - goret gobject.Object (nullable) // // Looks up a child element by the given full-path name. // @@ -11023,13 +11699,13 @@ func (parent *ChildProxyInstance) ChildRemoved(child gobject.Object, name string // // The function returns the following values: // -// - goret gobject.Object +// - goret gobject.Object (nullable) // // Fetches a child by its number. func (parent *ChildProxyInstance) GetChildByIndex(index uint) gobject.Object { var carg0 *C.GstChildProxy // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.GObject // return, full, converted + var cret *C.GObject // return, full, converted, nullable carg0 = (*C.GstChildProxy)(UnsafeChildProxyToGlibNone(parent)) carg1 = C.guint(index) @@ -11040,7 +11716,9 @@ func (parent *ChildProxyInstance) GetChildByIndex(index uint) gobject.Object { var goret gobject.Object - goret = gobject.UnsafeObjectFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gobject.UnsafeObjectFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -11053,7 +11731,7 @@ func (parent *ChildProxyInstance) GetChildByIndex(index uint) gobject.Object { // // The function returns the following values: // -// - goret gobject.Object +// - goret gobject.Object (nullable) // // Looks up a child element by the given name. // @@ -11063,7 +11741,7 @@ func (parent *ChildProxyInstance) GetChildByIndex(index uint) gobject.Object { func (parent *ChildProxyInstance) GetChildByName(name string) gobject.Object { var carg0 *C.GstChildProxy // in, none, converted var carg1 *C.gchar // in, none, string - var cret *C.GObject // return, full, converted + var cret *C.GObject // return, full, converted, nullable carg0 = (*C.GstChildProxy)(UnsafeChildProxyToGlibNone(parent)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -11075,7 +11753,9 @@ func (parent *ChildProxyInstance) GetChildByName(name string) gobject.Object { var goret gobject.Object - goret = gobject.UnsafeObjectFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gobject.UnsafeObjectFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -11088,7 +11768,7 @@ func (parent *ChildProxyInstance) GetChildByName(name string) gobject.Object { // // The function returns the following values: // -// - goret gobject.Object +// - goret gobject.Object (nullable) // // Looks up a child element by the given full-path name. // @@ -11101,7 +11781,7 @@ func (parent *ChildProxyInstance) GetChildByName(name string) gobject.Object { func (childProxy *ChildProxyInstance) GetChildByNameRecurse(name string) gobject.Object { var carg0 *C.GstChildProxy // in, none, converted var carg1 *C.gchar // in, none, string - var cret *C.GObject // return, full, converted + var cret *C.GObject // return, full, converted, nullable carg0 = (*C.GstChildProxy)(UnsafeChildProxyToGlibNone(childProxy)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -11113,7 +11793,9 @@ func (childProxy *ChildProxyInstance) GetChildByNameRecurse(name string) gobject var goret gobject.Object - goret = gobject.UnsafeObjectFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gobject.UnsafeObjectFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -11334,18 +12016,20 @@ func UnsafePresetToGlibFull(c Preset) unsafe.Pointer { // PresetGetAppDir wraps gst_preset_get_app_dir // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Gets the directory for application specific presets if set by the // application. func PresetGetAppDir() string { - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable cret = C.gst_preset_get_app_dir() var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -11708,7 +12392,7 @@ type URIHandler interface { // GetProtocols wraps gst_uri_handler_get_protocols // The function returns the following values: // - // - goret []string + // - goret []string (nullable) // // Gets the list of protocols supported by @handler. This list may not be // modified. @@ -11716,7 +12400,7 @@ type URIHandler interface { // GetURI wraps gst_uri_handler_get_uri // The function returns the following values: // - // - goret string + // - goret string (nullable) // // Gets the currently handled URI. GetURI() string @@ -11783,13 +12467,13 @@ func UnsafeURIHandlerToGlibFull(c URIHandler) unsafe.Pointer { // GetProtocols wraps gst_uri_handler_get_protocols // The function returns the following values: // -// - goret []string +// - goret []string (nullable) // // Gets the list of protocols supported by @handler. This list may not be // modified. func (handler *URIHandlerInstance) GetProtocols() []string { var carg0 *C.GstURIHandler // in, none, converted - var cret **C.gchar // return, transfer: none, C Pointers: 2, Name: array[utf8], scope: , array (inner: *typesystem.StringPrimitive, zero-terminated) + var cret **C.gchar // return, transfer: none, C Pointers: 2, Name: array[utf8], scope: , nullable, array (inner: *typesystem.StringPrimitive, zero-terminated) carg0 = (*C.GstURIHandler)(UnsafeURIHandlerToGlibNone(handler)) @@ -11808,12 +12492,12 @@ func (handler *URIHandlerInstance) GetProtocols() []string { // GetURI wraps gst_uri_handler_get_uri // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Gets the currently handled URI. func (handler *URIHandlerInstance) GetURI() string { var carg0 *C.GstURIHandler // in, none, converted - var cret *C.gchar // return, full, string + var cret *C.gchar // return, full, string, nullable-string carg0 = (*C.GstURIHandler)(UnsafeURIHandlerToGlibNone(handler)) @@ -11822,8 +12506,10 @@ func (handler *URIHandlerInstance) GetURI() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -11946,7 +12632,7 @@ type TagSetter interface { // GetTagList wraps gst_tag_setter_get_tag_list // The function returns the following values: // - // - goret *TagList + // - goret *TagList (nullable) // // Returns the current list of tags the setter uses. The list should not be // modified or freed. @@ -12028,7 +12714,7 @@ func UnsafeTagSetterToGlibFull(c TagSetter) unsafe.Pointer { // GetTagList wraps gst_tag_setter_get_tag_list // The function returns the following values: // -// - goret *TagList +// - goret *TagList (nullable) // // Returns the current list of tags the setter uses. The list should not be // modified or freed. @@ -12036,7 +12722,7 @@ func UnsafeTagSetterToGlibFull(c TagSetter) unsafe.Pointer { // This function is not thread-safe. func (setter *TagSetterInstance) GetTagList() *TagList { var carg0 *C.GstTagSetter // in, none, converted - var cret *C.GstTagList // return, none, converted + var cret *C.GstTagList // return, none, converted, nullable carg0 = (*C.GstTagSetter)(UnsafeTagSetterToGlibNone(setter)) @@ -12045,7 +12731,9 @@ func (setter *TagSetterInstance) GetTagList() *TagList { var goret *TagList - goret = UnsafeTagListFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeTagListFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -12160,7 +12848,7 @@ type TocSetter interface { // GetToc wraps gst_toc_setter_get_toc // The function returns the following values: // - // - goret *Toc + // - goret *Toc (nullable) // // Return current TOC the setter uses. The TOC should not be // modified without making it writable first. @@ -12222,13 +12910,13 @@ func UnsafeTocSetterToGlibFull(c TocSetter) unsafe.Pointer { // GetToc wraps gst_toc_setter_get_toc // The function returns the following values: // -// - goret *Toc +// - goret *Toc (nullable) // // Return current TOC the setter uses. The TOC should not be // modified without making it writable first. func (setter *TocSetterInstance) GetToc() *Toc { var carg0 *C.GstTocSetter // in, none, converted - var cret *C.GstToc // return, full, converted + var cret *C.GstToc // return, full, converted, nullable carg0 = (*C.GstTocSetter)(UnsafeTocSetterToGlibNone(setter)) @@ -12237,7 +12925,9 @@ func (setter *TocSetterInstance) GetToc() *Toc { var goret *Toc - goret = UnsafeTocFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeTocFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -12377,7 +13067,7 @@ type Object interface { // // The function returns the following values: // - // - goret ControlBinding + // - goret ControlBinding (nullable) // // Gets the corresponding #GstControlBinding for the property. This should be // unreferenced again after use. @@ -12401,7 +13091,7 @@ type Object interface { // GetName wraps gst_object_get_name // The function returns the following values: // - // - goret string + // - goret string (nullable) // // Returns a copy of the name of @object. // Caller should g_free() the return value after usage. @@ -12413,7 +13103,7 @@ type Object interface { // GetParent wraps gst_object_get_parent // The function returns the following values: // - // - goret Object + // - goret Object (nullable) // // Returns the parent of @object. This function increases the refcount // of the parent object so you should gst_object_unref() it after usage. @@ -12697,14 +13387,14 @@ func (source *ObjectInstance) DefaultError(debug string, err error) { // // The function returns the following values: // -// - goret ControlBinding +// - goret ControlBinding (nullable) // // Gets the corresponding #GstControlBinding for the property. This should be // 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 - var cret *C.GstControlBinding // return, full, converted + var cret *C.GstControlBinding // return, full, converted, nullable carg0 = (*C.GstObject)(UnsafeObjectToGlibNone(object)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(propertyName))) @@ -12716,7 +13406,9 @@ func (object *ObjectInstance) CurrentControlBinding(propertyName string) Control var goret ControlBinding - goret = UnsafeControlBindingFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeControlBindingFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -12755,7 +13447,7 @@ func (object *ObjectInstance) GetControlRate() ClockTime { // GetName wraps gst_object_get_name // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Returns a copy of the name of @object. // Caller should g_free() the return value after usage. @@ -12765,7 +13457,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 + var cret *C.gchar // return, full, string, nullable-string carg0 = (*C.GstObject)(UnsafeObjectToGlibNone(object)) @@ -12774,8 +13466,10 @@ func (object *ObjectInstance) GetName() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -12783,13 +13477,13 @@ func (object *ObjectInstance) GetName() string { // GetParent wraps gst_object_get_parent // The function returns the following values: // -// - goret Object +// - goret Object (nullable) // // Returns the parent of @object. This function increases the refcount // of the parent object so you should gst_object_unref() it after usage. func (object *ObjectInstance) GetParent() Object { var carg0 *C.GstObject // in, none, converted - var cret *C.GstObject // return, full, converted + var cret *C.GstObject // return, full, converted, nullable carg0 = (*C.GstObject)(UnsafeObjectToGlibNone(object)) @@ -12798,7 +13492,9 @@ func (object *ObjectInstance) GetParent() Object { var goret Object - goret = UnsafeObjectFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeObjectFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -13465,7 +14161,7 @@ type Pad interface { // GetAllowedCaps wraps gst_pad_get_allowed_caps // The function returns the following values: // - // - goret *Caps + // - goret *Caps (nullable) // // Gets the capabilities of the allowed media types that can flow through // @pad and its peer. @@ -13477,7 +14173,7 @@ type Pad interface { // GetCurrentCaps wraps gst_pad_get_current_caps // The function returns the following values: // - // - goret *Caps + // - goret *Caps (nullable) // // Gets the capabilities currently configured on @pad with the last // #GST_EVENT_CAPS event. @@ -13509,7 +14205,7 @@ type Pad interface { // GetPadTemplate wraps gst_pad_get_pad_template // The function returns the following values: // - // - goret PadTemplate + // - goret PadTemplate (nullable) // // Gets the template for @pad. GetPadTemplate() PadTemplate @@ -13523,7 +14219,7 @@ type Pad interface { // GetParentElement wraps gst_pad_get_parent_element // The function returns the following values: // - // - goret Element + // - goret Element (nullable) // // Gets the parent of @pad, cast to a #GstElement. If a @pad has no parent or // its parent is not an element, return %NULL. @@ -13531,7 +14227,7 @@ type Pad interface { // GetPeer wraps gst_pad_get_peer // The function returns the following values: // - // - goret Pad + // - goret Pad (nullable) // // Gets the peer of @pad. This function refs the peer pad so // you need to unref it after use. @@ -13579,7 +14275,7 @@ type Pad interface { // GetSingleInternalLink wraps gst_pad_get_single_internal_link // The function returns the following values: // - // - goret Pad + // - goret Pad (nullable) // // If there is a single internal link of the given pad, this function will // return it. Otherwise, it will return NULL. @@ -13593,7 +14289,7 @@ type Pad interface { // // The function returns the following values: // - // - goret *Event + // - goret *Event (nullable) // // Returns a new reference of the sticky event of type @event_type // from the event. @@ -13601,7 +14297,7 @@ type Pad interface { // GetStream wraps gst_pad_get_stream // The function returns the following values: // - // - goret Stream + // - goret Stream (nullable) // // Returns the current #GstStream for the @pad, or %NULL if none has been // set yet, i.e. the pad has not received a stream-start event yet. @@ -13612,7 +14308,7 @@ type Pad interface { // GetStreamID wraps gst_pad_get_stream_id // The function returns the following values: // - // - goret string + // - goret string (nullable) // // Returns the current stream-id for the @pad, or %NULL if none has been // set yet, i.e. the pad has not received a stream-start event yet. @@ -13672,7 +14368,7 @@ type Pad interface { // IterateInternalLinks wraps gst_pad_iterate_internal_links // The function returns the following values: // - // - goret *Iterator + // - goret *Iterator (nullable) // // Gets an iterator for the pads to which the given pad is linked to inside // of the parent element. @@ -13690,7 +14386,7 @@ type Pad interface { // // The function returns the following values: // - // - goret *Iterator + // - goret *Iterator (nullable) // // Iterate the list of pads to which the given pad is linked to inside of // the parent element. @@ -14837,7 +15533,7 @@ func (pad *PadInstance) Forward(forward PadForwardFunction) bool { // GetAllowedCaps wraps gst_pad_get_allowed_caps // The function returns the following values: // -// - goret *Caps +// - goret *Caps (nullable) // // Gets the capabilities of the allowed media types that can flow through // @pad and its peer. @@ -14847,7 +15543,7 @@ func (pad *PadInstance) Forward(forward PadForwardFunction) bool { // on the resulting caps. func (pad *PadInstance) GetAllowedCaps() *Caps { var carg0 *C.GstPad // in, none, converted - var cret *C.GstCaps // return, full, converted + var cret *C.GstCaps // return, full, converted, nullable carg0 = (*C.GstPad)(UnsafePadToGlibNone(pad)) @@ -14856,7 +15552,9 @@ func (pad *PadInstance) GetAllowedCaps() *Caps { var goret *Caps - goret = UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -14864,13 +15562,13 @@ func (pad *PadInstance) GetAllowedCaps() *Caps { // GetCurrentCaps wraps gst_pad_get_current_caps // The function returns the following values: // -// - goret *Caps +// - goret *Caps (nullable) // // Gets the capabilities currently configured on @pad with the last // #GST_EVENT_CAPS event. func (pad *PadInstance) GetCurrentCaps() *Caps { var carg0 *C.GstPad // in, none, converted - var cret *C.GstCaps // return, full, converted + var cret *C.GstCaps // return, full, converted, nullable carg0 = (*C.GstPad)(UnsafePadToGlibNone(pad)) @@ -14879,7 +15577,9 @@ func (pad *PadInstance) GetCurrentCaps() *Caps { var goret *Caps - goret = UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -14956,12 +15656,12 @@ func (pad *PadInstance) GetOffset() int64 { // GetPadTemplate wraps gst_pad_get_pad_template // The function returns the following values: // -// - goret PadTemplate +// - goret PadTemplate (nullable) // // Gets the template for @pad. func (pad *PadInstance) GetPadTemplate() PadTemplate { var carg0 *C.GstPad // in, none, converted - var cret *C.GstPadTemplate // return, full, converted + var cret *C.GstPadTemplate // return, full, converted, nullable carg0 = (*C.GstPad)(UnsafePadToGlibNone(pad)) @@ -14970,7 +15670,9 @@ func (pad *PadInstance) GetPadTemplate() PadTemplate { var goret PadTemplate - goret = UnsafePadTemplateFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePadTemplateFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -15000,13 +15702,13 @@ func (pad *PadInstance) GetPadTemplateCaps() *Caps { // GetParentElement wraps gst_pad_get_parent_element // The function returns the following values: // -// - goret Element +// - goret Element (nullable) // // Gets the parent of @pad, cast to a #GstElement. If a @pad has no parent or // its parent is not an element, return %NULL. func (pad *PadInstance) GetParentElement() Element { var carg0 *C.GstPad // in, none, converted - var cret *C.GstElement // return, full, converted + var cret *C.GstElement // return, full, converted, nullable carg0 = (*C.GstPad)(UnsafePadToGlibNone(pad)) @@ -15015,7 +15717,9 @@ func (pad *PadInstance) GetParentElement() Element { var goret Element - goret = UnsafeElementFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeElementFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -15023,13 +15727,13 @@ func (pad *PadInstance) GetParentElement() Element { // GetPeer wraps gst_pad_get_peer // The function returns the following values: // -// - goret Pad +// - goret Pad (nullable) // // Gets the peer of @pad. This function refs the peer pad so // you need to unref it after use. func (pad *PadInstance) GetPeer() Pad { var carg0 *C.GstPad // in, none, converted - var cret *C.GstPad // return, full, converted + var cret *C.GstPad // return, full, converted, nullable carg0 = (*C.GstPad)(UnsafePadToGlibNone(pad)) @@ -15038,7 +15742,9 @@ func (pad *PadInstance) GetPeer() Pad { var goret Pad - goret = UnsafePadFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePadFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -15110,13 +15816,13 @@ func (pad *PadInstance) GetRange(offset uint64, size uint) (*Buffer, FlowReturn) // GetSingleInternalLink wraps gst_pad_get_single_internal_link // The function returns the following values: // -// - goret Pad +// - goret Pad (nullable) // // If there is a single internal link of the given pad, this function will // return it. Otherwise, it will return NULL. func (pad *PadInstance) GetSingleInternalLink() Pad { var carg0 *C.GstPad // in, none, converted - var cret *C.GstPad // return, full, converted + var cret *C.GstPad // return, full, converted, nullable carg0 = (*C.GstPad)(UnsafePadToGlibNone(pad)) @@ -15125,7 +15831,9 @@ func (pad *PadInstance) GetSingleInternalLink() Pad { var goret Pad - goret = UnsafePadFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePadFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -15139,7 +15847,7 @@ func (pad *PadInstance) GetSingleInternalLink() Pad { // // The function returns the following values: // -// - goret *Event +// - goret *Event (nullable) // // Returns a new reference of the sticky event of type @event_type // from the event. @@ -15147,7 +15855,7 @@ func (pad *PadInstance) GetStickyEvent(eventType EventType, idx uint) *Event { var carg0 *C.GstPad // in, none, converted var carg1 C.GstEventType // in, none, casted var carg2 C.guint // in, none, casted - var cret *C.GstEvent // return, full, converted + var cret *C.GstEvent // return, full, converted, nullable carg0 = (*C.GstPad)(UnsafePadToGlibNone(pad)) carg1 = C.GstEventType(eventType) @@ -15160,7 +15868,9 @@ func (pad *PadInstance) GetStickyEvent(eventType EventType, idx uint) *Event { var goret *Event - goret = UnsafeEventFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeEventFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -15168,7 +15878,7 @@ func (pad *PadInstance) GetStickyEvent(eventType EventType, idx uint) *Event { // GetStream wraps gst_pad_get_stream // The function returns the following values: // -// - goret Stream +// - goret Stream (nullable) // // Returns the current #GstStream for the @pad, or %NULL if none has been // set yet, i.e. the pad has not received a stream-start event yet. @@ -15177,7 +15887,7 @@ func (pad *PadInstance) GetStickyEvent(eventType EventType, idx uint) *Event { // gst_event_parse_stream(). func (pad *PadInstance) GetStream() Stream { var carg0 *C.GstPad // in, none, converted - var cret *C.GstStream // return, full, converted + var cret *C.GstStream // return, full, converted, nullable carg0 = (*C.GstPad)(UnsafePadToGlibNone(pad)) @@ -15186,7 +15896,9 @@ func (pad *PadInstance) GetStream() Stream { var goret Stream - goret = UnsafeStreamFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeStreamFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -15194,7 +15906,7 @@ func (pad *PadInstance) GetStream() Stream { // GetStreamID wraps gst_pad_get_stream_id // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Returns the current stream-id for the @pad, or %NULL if none has been // set yet, i.e. the pad has not received a stream-start event yet. @@ -15206,7 +15918,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 + var cret *C.gchar // return, full, string, nullable-string carg0 = (*C.GstPad)(UnsafePadToGlibNone(pad)) @@ -15215,8 +15927,10 @@ func (pad *PadInstance) GetStreamID() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -15370,7 +16084,7 @@ func (pad *PadInstance) IsLinked() bool { // IterateInternalLinks wraps gst_pad_iterate_internal_links // The function returns the following values: // -// - goret *Iterator +// - goret *Iterator (nullable) // // Gets an iterator for the pads to which the given pad is linked to inside // of the parent element. @@ -15381,7 +16095,7 @@ func (pad *PadInstance) IsLinked() bool { // Free-function: gst_iterator_free func (pad *PadInstance) IterateInternalLinks() *Iterator { var carg0 *C.GstPad // in, none, converted - var cret *C.GstIterator // return, full, converted + var cret *C.GstIterator // return, full, converted, nullable carg0 = (*C.GstPad)(UnsafePadToGlibNone(pad)) @@ -15390,7 +16104,9 @@ func (pad *PadInstance) IterateInternalLinks() *Iterator { var goret *Iterator - goret = UnsafeIteratorFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeIteratorFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -15403,7 +16119,7 @@ func (pad *PadInstance) IterateInternalLinks() *Iterator { // // The function returns the following values: // -// - goret *Iterator +// - goret *Iterator (nullable) // // Iterate the list of pads to which the given pad is linked to inside of // the parent element. @@ -15414,7 +16130,7 @@ func (pad *PadInstance) IterateInternalLinks() *Iterator { func (pad *PadInstance) IterateInternalLinksDefault(parent Object) *Iterator { var carg0 *C.GstPad // in, none, converted var carg1 *C.GstObject // in, none, converted, nullable - var cret *C.GstIterator // return, full, converted + var cret *C.GstIterator // return, full, converted, nullable carg0 = (*C.GstPad)(UnsafePadToGlibNone(pad)) if parent != nil { @@ -15427,7 +16143,9 @@ func (pad *PadInstance) IterateInternalLinksDefault(parent Object) *Iterator { var goret *Iterator - goret = UnsafeIteratorFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeIteratorFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -16873,7 +17591,7 @@ func UnsafePadTemplateToGlibFull(c PadTemplate) unsafe.Pointer { // // The function returns the following values: // -// - goret PadTemplate +// - goret PadTemplate (nullable) // // Creates a new pad template with a name according to the given template // and with the given arguments. @@ -16882,7 +17600,7 @@ func NewPadTemplate(nameTemplate string, direction PadDirection, presence PadPre var carg2 C.GstPadDirection // in, none, casted var carg3 C.GstPadPresence // in, none, casted var carg4 *C.GstCaps // in, none, converted - var cret *C.GstPadTemplate // return, none, converted + var cret *C.GstPadTemplate // return, none, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(nameTemplate))) defer C.free(unsafe.Pointer(carg1)) @@ -16898,7 +17616,9 @@ func NewPadTemplate(nameTemplate string, direction PadDirection, presence PadPre var goret PadTemplate - goret = UnsafePadTemplateFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePadTemplateFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -16912,13 +17632,13 @@ func NewPadTemplate(nameTemplate string, direction PadDirection, presence PadPre // // The function returns the following values: // -// - goret PadTemplate +// - goret PadTemplate (nullable) // // Converts a #GstStaticPadTemplate into a #GstPadTemplate with a type. func NewPadTemplateFromStaticPadTemplateWithGType(padTemplate *StaticPadTemplate, padType gobject.Type) PadTemplate { var carg1 *C.GstStaticPadTemplate // in, none, converted var carg2 C.GType // in, none, casted, alias - var cret *C.GstPadTemplate // return, none, converted + var cret *C.GstPadTemplate // return, none, converted, nullable carg1 = (*C.GstStaticPadTemplate)(UnsafeStaticPadTemplateToGlibNone(padTemplate)) carg2 = C.GType(padType) @@ -16929,7 +17649,9 @@ func NewPadTemplateFromStaticPadTemplateWithGType(padTemplate *StaticPadTemplate var goret PadTemplate - goret = UnsafePadTemplateFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePadTemplateFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -16946,7 +17668,7 @@ func NewPadTemplateFromStaticPadTemplateWithGType(padTemplate *StaticPadTemplate // // The function returns the following values: // -// - goret PadTemplate +// - goret PadTemplate (nullable) // // Creates a new pad template with a name according to the given template // and with the given arguments. @@ -16956,7 +17678,7 @@ func NewPadTemplateWithGType(nameTemplate string, direction PadDirection, presen var carg3 C.GstPadPresence // in, none, casted var carg4 *C.GstCaps // in, none, converted var carg5 C.GType // in, none, casted, alias - var cret *C.GstPadTemplate // return, none, converted + var cret *C.GstPadTemplate // return, none, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(nameTemplate))) defer C.free(unsafe.Pointer(carg1)) @@ -16974,7 +17696,9 @@ func NewPadTemplateWithGType(nameTemplate string, direction PadDirection, presen var goret PadTemplate - goret = UnsafePadTemplateFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePadTemplateFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -17180,7 +17904,7 @@ type Plugin interface { // GetCacheData wraps gst_plugin_get_cache_data // The function returns the following values: // - // - goret *Structure + // - goret *Structure (nullable) // // Gets the plugin specific data cache. If it is %NULL there is no cached data // stored. This is the case when the registry is getting rebuilt. @@ -17195,7 +17919,7 @@ type Plugin interface { // GetFilename wraps gst_plugin_get_filename // The function returns the following values: // - // - goret string + // - goret string (nullable) // // get the filename of the plugin GetFilename() string @@ -17230,7 +17954,7 @@ type Plugin interface { // GetReleaseDateString wraps gst_plugin_get_release_date_string // The function returns the following values: // - // - goret string + // - goret string (nullable) // // Get the release date (and possibly time) in form of a string, if available. // @@ -17251,17 +17975,17 @@ type Plugin interface { // GetStatusErrors wraps gst_plugin_get_status_errors // The function returns the following values: // - // - goret []string + // - goret []string (nullable) GetStatusErrors() []string // GetStatusInfos wraps gst_plugin_get_status_infos // The function returns the following values: // - // - goret []string + // - goret []string (nullable) GetStatusInfos() []string // GetStatusWarnings wraps gst_plugin_get_status_warnings // The function returns the following values: // - // - goret []string + // - goret []string (nullable) GetStatusWarnings() []string // GetVersion wraps gst_plugin_get_version // The function returns the following values: @@ -17280,7 +18004,7 @@ type Plugin interface { // Load wraps gst_plugin_load // The function returns the following values: // - // - goret Plugin + // - goret Plugin (nullable) // // Loads @plugin. Note that the *return value* is the loaded plugin; @plugin is // untouched. The normal use pattern of this function goes like this: @@ -17352,12 +18076,12 @@ func UnsafePluginToGlibFull(c Plugin) unsafe.Pointer { // // The function returns the following values: // -// - goret Plugin +// - goret Plugin (nullable) // // Load the named plugin. Refs the plugin. func PluginLoadByName(name string) Plugin { var carg1 *C.gchar // in, none, string - var cret *C.GstPlugin // return, full, converted + var cret *C.GstPlugin // return, full, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) defer C.free(unsafe.Pointer(carg1)) @@ -17367,7 +18091,9 @@ func PluginLoadByName(name string) Plugin { var goret Plugin - goret = UnsafePluginFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePluginFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -17662,13 +18388,13 @@ func (plugin *PluginInstance) AddStatusWarning(message string) { // GetCacheData wraps gst_plugin_get_cache_data // The function returns the following values: // -// - goret *Structure +// - goret *Structure (nullable) // // Gets the plugin specific data cache. If it is %NULL there is no cached data // stored. This is the case when the registry is getting rebuilt. func (plugin *PluginInstance) GetCacheData() *Structure { var carg0 *C.GstPlugin // in, none, converted - var cret *C.GstStructure // return, none, converted + var cret *C.GstStructure // return, none, converted, nullable carg0 = (*C.GstPlugin)(UnsafePluginToGlibNone(plugin)) @@ -17677,7 +18403,9 @@ func (plugin *PluginInstance) GetCacheData() *Structure { var goret *Structure - goret = UnsafeStructureFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeStructureFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -17707,12 +18435,12 @@ func (plugin *PluginInstance) GetDescription() string { // GetFilename wraps gst_plugin_get_filename // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 + var cret *C.gchar // return, none, string, nullable carg0 = (*C.GstPlugin)(UnsafePluginToGlibNone(plugin)) @@ -17721,7 +18449,9 @@ func (plugin *PluginInstance) GetFilename() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -17817,7 +18547,7 @@ func (plugin *PluginInstance) GetPackage() string { // GetReleaseDateString wraps gst_plugin_get_release_date_string // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Get the release date (and possibly time) in form of a string, if available. // @@ -17829,7 +18559,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 + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstPlugin)(UnsafePluginToGlibNone(plugin)) @@ -17838,7 +18568,9 @@ func (plugin *PluginInstance) GetReleaseDateString() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -17868,10 +18600,10 @@ func (plugin *PluginInstance) GetSource() string { // GetStatusErrors wraps gst_plugin_get_status_errors // The function returns the following values: // -// - goret []string +// - goret []string (nullable) func (plugin *PluginInstance) GetStatusErrors() []string { var carg0 *C.GstPlugin // in, none, converted - var cret **C.gchar // return, transfer: full, C Pointers: 2, Name: array[utf8], scope: , array (inner: *typesystem.StringPrimitive, zero-terminated) + var cret **C.gchar // return, transfer: full, C Pointers: 2, Name: array[utf8], scope: , nullable, array (inner: *typesystem.StringPrimitive, zero-terminated) carg0 = (*C.GstPlugin)(UnsafePluginToGlibNone(plugin)) @@ -17890,10 +18622,10 @@ func (plugin *PluginInstance) GetStatusErrors() []string { // GetStatusInfos wraps gst_plugin_get_status_infos // The function returns the following values: // -// - goret []string +// - goret []string (nullable) func (plugin *PluginInstance) GetStatusInfos() []string { var carg0 *C.GstPlugin // in, none, converted - var cret **C.gchar // return, transfer: full, C Pointers: 2, Name: array[utf8], scope: , array (inner: *typesystem.StringPrimitive, zero-terminated) + var cret **C.gchar // return, transfer: full, C Pointers: 2, Name: array[utf8], scope: , nullable, array (inner: *typesystem.StringPrimitive, zero-terminated) carg0 = (*C.GstPlugin)(UnsafePluginToGlibNone(plugin)) @@ -17912,10 +18644,10 @@ func (plugin *PluginInstance) GetStatusInfos() []string { // GetStatusWarnings wraps gst_plugin_get_status_warnings // The function returns the following values: // -// - goret []string +// - goret []string (nullable) func (plugin *PluginInstance) GetStatusWarnings() []string { var carg0 *C.GstPlugin // in, none, converted - var cret **C.gchar // return, transfer: full, C Pointers: 2, Name: array[utf8], scope: , array (inner: *typesystem.StringPrimitive, zero-terminated) + var cret **C.gchar // return, transfer: full, C Pointers: 2, Name: array[utf8], scope: , nullable, array (inner: *typesystem.StringPrimitive, zero-terminated) carg0 = (*C.GstPlugin)(UnsafePluginToGlibNone(plugin)) @@ -17980,7 +18712,7 @@ func (plugin *PluginInstance) IsLoaded() bool { // Load wraps gst_plugin_load // The function returns the following values: // -// - goret Plugin +// - goret Plugin (nullable) // // Loads @plugin. Note that the *return value* is the loaded plugin; @plugin is // untouched. The normal use pattern of this function goes like this: @@ -17994,7 +18726,7 @@ func (plugin *PluginInstance) IsLoaded() bool { // ]| func (plugin *PluginInstance) Load() Plugin { var carg0 *C.GstPlugin // in, none, converted - var cret *C.GstPlugin // return, full, converted + var cret *C.GstPlugin // return, full, converted, nullable carg0 = (*C.GstPlugin)(UnsafePluginToGlibNone(plugin)) @@ -18003,7 +18735,9 @@ func (plugin *PluginInstance) Load() Plugin { var goret Plugin - goret = UnsafePluginFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePluginFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -18068,14 +18802,14 @@ type PluginFeature interface { // GetPlugin wraps gst_plugin_feature_get_plugin // The function returns the following values: // - // - goret Plugin + // - goret Plugin (nullable) // // Get the plugin that provides this feature. GetPlugin() Plugin // GetPluginName wraps gst_plugin_feature_get_plugin_name // The function returns the following values: // - // - goret string + // - goret string (nullable) // // Get the name of the plugin that provides this feature. GetPluginName() string @@ -18089,7 +18823,7 @@ type PluginFeature interface { // Load wraps gst_plugin_feature_load // The function returns the following values: // - // - goret PluginFeature + // - goret PluginFeature (nullable) // // Loads the plugin containing @feature if it's not already loaded. @feature is // unaffected; use the return value instead. @@ -18238,12 +18972,12 @@ func (feature *PluginFeatureInstance) CheckVersion(minMajor uint, minMinor uint, // GetPlugin wraps gst_plugin_feature_get_plugin // The function returns the following values: // -// - goret Plugin +// - goret Plugin (nullable) // // Get the plugin that provides this feature. func (feature *PluginFeatureInstance) GetPlugin() Plugin { var carg0 *C.GstPluginFeature // in, none, converted - var cret *C.GstPlugin // return, full, converted + var cret *C.GstPlugin // return, full, converted, nullable carg0 = (*C.GstPluginFeature)(UnsafePluginFeatureToGlibNone(feature)) @@ -18252,7 +18986,9 @@ func (feature *PluginFeatureInstance) GetPlugin() Plugin { var goret Plugin - goret = UnsafePluginFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePluginFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -18260,12 +18996,12 @@ func (feature *PluginFeatureInstance) GetPlugin() Plugin { // GetPluginName wraps gst_plugin_feature_get_plugin_name // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstPluginFeature)(UnsafePluginFeatureToGlibNone(feature)) @@ -18274,7 +19010,9 @@ func (feature *PluginFeatureInstance) GetPluginName() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -18304,7 +19042,7 @@ func (feature *PluginFeatureInstance) GetRank() uint { // Load wraps gst_plugin_feature_load // The function returns the following values: // -// - goret PluginFeature +// - goret PluginFeature (nullable) // // Loads the plugin containing @feature if it's not already loaded. @feature is // unaffected; use the return value instead. @@ -18320,7 +19058,7 @@ func (feature *PluginFeatureInstance) GetRank() uint { // ]| func (feature *PluginFeatureInstance) Load() PluginFeature { var carg0 *C.GstPluginFeature // in, none, converted - var cret *C.GstPluginFeature // return, full, converted + var cret *C.GstPluginFeature // return, full, converted, nullable carg0 = (*C.GstPluginFeature)(UnsafePluginFeatureToGlibNone(feature)) @@ -18329,7 +19067,9 @@ func (feature *PluginFeatureInstance) Load() PluginFeature { var goret PluginFeature - goret = UnsafePluginFeatureFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePluginFeatureFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -18370,7 +19110,7 @@ type ProxyPad interface { // GetInternal wraps gst_proxy_pad_get_internal // The function returns the following values: // - // - goret ProxyPad + // - goret ProxyPad (nullable) // // Get the internal pad of @pad. Unref target pad after usage. // @@ -18548,13 +19288,13 @@ func ProxyPadGetrangeDefault(pad Pad, parent Object, offset uint64, size uint) ( // // The function returns the following values: // -// - goret *Iterator +// - goret *Iterator (nullable) // // Invoke the default iterate internal links function of the proxy pad. func ProxyPadIterateInternalLinksDefault(pad Pad, parent Object) *Iterator { var carg1 *C.GstPad // in, none, converted var carg2 *C.GstObject // in, none, converted, nullable - var cret *C.GstIterator // return, full, converted + var cret *C.GstIterator // return, full, converted, nullable carg1 = (*C.GstPad)(UnsafePadToGlibNone(pad)) if parent != nil { @@ -18567,7 +19307,9 @@ func ProxyPadIterateInternalLinksDefault(pad Pad, parent Object) *Iterator { var goret *Iterator - goret = UnsafeIteratorFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeIteratorFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -18575,7 +19317,7 @@ func ProxyPadIterateInternalLinksDefault(pad Pad, parent Object) *Iterator { // GetInternal wraps gst_proxy_pad_get_internal // The function returns the following values: // -// - goret ProxyPad +// - goret ProxyPad (nullable) // // Get the internal pad of @pad. Unref target pad after usage. // @@ -18583,7 +19325,7 @@ func ProxyPadIterateInternalLinksDefault(pad Pad, parent Object) *Iterator { // pad of opposite direction, which is used to link to the target. func (pad *ProxyPadInstance) GetInternal() ProxyPad { var carg0 *C.GstProxyPad // in, none, converted - var cret *C.GstProxyPad // return, full, converted + var cret *C.GstProxyPad // return, full, converted, nullable carg0 = (*C.GstProxyPad)(UnsafeProxyPadToGlibNone(pad)) @@ -18592,7 +19334,9 @@ func (pad *ProxyPadInstance) GetInternal() ProxyPad { var goret ProxyPad - goret = UnsafeProxyPadFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeProxyPadFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -18741,7 +19485,7 @@ type Registry interface { // // The function returns the following values: // - // - goret PluginFeature + // - goret PluginFeature (nullable) // // Find the pluginfeature with the given name and type in the registry. FindFeature(string, gobject.Type) PluginFeature @@ -18753,7 +19497,7 @@ type Registry interface { // // The function returns the following values: // - // - goret Plugin + // - goret Plugin (nullable) // // Find the plugin with the given name in the registry. // The plugin will be reffed; caller is responsible for unreffing. @@ -18806,7 +19550,7 @@ type Registry interface { // // The function returns the following values: // - // - goret Plugin + // - goret Plugin (nullable) // // Look up a plugin in the given registry with the given filename. // If found, plugin is reffed. @@ -18819,7 +19563,7 @@ type Registry interface { // // The function returns the following values: // - // - goret PluginFeature + // - goret PluginFeature (nullable) // // Find a #GstPluginFeature with @name in @registry. LookupFeature(string) PluginFeature @@ -19163,14 +19907,14 @@ func (registry *RegistryInstance) FeatureFilter(filter PluginFeatureFilter, firs // // The function returns the following values: // -// - goret PluginFeature +// - goret PluginFeature (nullable) // // 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 var carg2 C.GType // in, none, casted, alias - var cret *C.GstPluginFeature // return, full, converted + var cret *C.GstPluginFeature // return, full, converted, nullable carg0 = (*C.GstRegistry)(UnsafeRegistryToGlibNone(registry)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -19184,7 +19928,9 @@ func (registry *RegistryInstance) FindFeature(name string, typ gobject.Type) Plu var goret PluginFeature - goret = UnsafePluginFeatureFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePluginFeatureFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -19197,14 +19943,14 @@ func (registry *RegistryInstance) FindFeature(name string, typ gobject.Type) Plu // // The function returns the following values: // -// - goret Plugin +// - goret Plugin (nullable) // // Find the plugin with the given name in the registry. // 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 - var cret *C.GstPlugin // return, full, converted + var cret *C.GstPlugin // return, full, converted, nullable carg0 = (*C.GstRegistry)(UnsafeRegistryToGlibNone(registry)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -19216,7 +19962,9 @@ func (registry *RegistryInstance) FindPlugin(name string) Plugin { var goret Plugin - goret = UnsafePluginFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePluginFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -19357,14 +20105,14 @@ func (registry *RegistryInstance) GetPluginList() []Plugin { // // The function returns the following values: // -// - goret Plugin +// - goret Plugin (nullable) // // Look up a plugin in the given registry with the given filename. // If found, plugin is reffed. func (registry *RegistryInstance) Lookup(filename string) Plugin { var carg0 *C.GstRegistry // in, none, converted var carg1 *C.char // in, none, string, casted *C.gchar - var cret *C.GstPlugin // return, full, converted + var cret *C.GstPlugin // return, full, converted, nullable carg0 = (*C.GstRegistry)(UnsafeRegistryToGlibNone(registry)) carg1 = (*C.char)(unsafe.Pointer(C.CString(filename))) @@ -19376,7 +20124,9 @@ func (registry *RegistryInstance) Lookup(filename string) Plugin { var goret Plugin - goret = UnsafePluginFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePluginFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -19389,13 +20139,13 @@ func (registry *RegistryInstance) Lookup(filename string) Plugin { // // The function returns the following values: // -// - goret PluginFeature +// - goret PluginFeature (nullable) // // Find a #GstPluginFeature with @name in @registry. func (registry *RegistryInstance) LookupFeature(name string) PluginFeature { var carg0 *C.GstRegistry // in, none, converted var carg1 *C.char // in, none, string, casted *C.gchar - var cret *C.GstPluginFeature // return, full, converted + var cret *C.GstPluginFeature // return, full, converted, nullable carg0 = (*C.GstRegistry)(UnsafeRegistryToGlibNone(registry)) carg1 = (*C.char)(unsafe.Pointer(C.CString(name))) @@ -19407,7 +20157,9 @@ func (registry *RegistryInstance) LookupFeature(name string) PluginFeature { var goret PluginFeature - goret = UnsafePluginFeatureFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePluginFeatureFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -19581,7 +20333,7 @@ type Stream interface { // GetCaps wraps gst_stream_get_caps // The function returns the following values: // - // - goret *Caps + // - goret *Caps (nullable) // // Retrieve the caps for @stream, if any GetCaps() *Caps @@ -19595,7 +20347,7 @@ type Stream interface { // GetStreamID wraps gst_stream_get_stream_id // The function returns the following values: // - // - goret string + // - goret string (nullable) // // Returns the stream ID of @stream. GetStreamID() string @@ -19609,7 +20361,7 @@ type Stream interface { // GetTags wraps gst_stream_get_tags // The function returns the following values: // - // - goret *TagList + // - goret *TagList (nullable) // // Retrieve the tags for @stream, if any GetTags() *TagList @@ -19734,12 +20486,12 @@ func NewStream(streamId string, caps *Caps, typ StreamType, flags StreamFlags) S // GetCaps wraps gst_stream_get_caps // The function returns the following values: // -// - goret *Caps +// - goret *Caps (nullable) // // Retrieve the caps for @stream, if any func (stream *StreamInstance) GetCaps() *Caps { var carg0 *C.GstStream // in, none, converted - var cret *C.GstCaps // return, full, converted + var cret *C.GstCaps // return, full, converted, nullable carg0 = (*C.GstStream)(UnsafeStreamToGlibNone(stream)) @@ -19748,7 +20500,9 @@ func (stream *StreamInstance) GetCaps() *Caps { var goret *Caps - goret = UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -19778,12 +20532,12 @@ func (stream *StreamInstance) GetStreamFlags() StreamFlags { // GetStreamID wraps gst_stream_get_stream_id // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstStream)(UnsafeStreamToGlibNone(stream)) @@ -19792,7 +20546,9 @@ func (stream *StreamInstance) GetStreamID() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -19822,12 +20578,12 @@ func (stream *StreamInstance) GetStreamType() StreamType { // GetTags wraps gst_stream_get_tags // The function returns the following values: // -// - goret *TagList +// - goret *TagList (nullable) // // Retrieve the tags for @stream, if any func (stream *StreamInstance) GetTags() *TagList { var carg0 *C.GstStream // in, none, converted - var cret *C.GstTagList // return, full, converted + var cret *C.GstTagList // return, full, converted, nullable carg0 = (*C.GstStream)(UnsafeStreamToGlibNone(stream)) @@ -19836,7 +20592,9 @@ func (stream *StreamInstance) GetTags() *TagList { var goret *TagList - goret = UnsafeTagListFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeTagListFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -19978,7 +20736,7 @@ type StreamCollection interface { // // The function returns the following values: // - // - goret Stream + // - goret Stream (nullable) // // Retrieve the #GstStream with index @index from the collection. // @@ -19987,7 +20745,7 @@ type StreamCollection interface { // GetUpstreamID wraps gst_stream_collection_get_upstream_id // The function returns the following values: // - // - goret string + // - goret string (nullable) // // Returns the upstream id of the @collection. GetUpstreamID() string @@ -20123,7 +20881,7 @@ func (collection *StreamCollectionInstance) GetSize() uint { // // The function returns the following values: // -// - goret Stream +// - goret Stream (nullable) // // Retrieve the #GstStream with index @index from the collection. // @@ -20131,7 +20889,7 @@ func (collection *StreamCollectionInstance) GetSize() uint { func (collection *StreamCollectionInstance) GetStream(index uint) Stream { var carg0 *C.GstStreamCollection // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.GstStream // return, none, converted + var cret *C.GstStream // return, none, converted, nullable carg0 = (*C.GstStreamCollection)(UnsafeStreamCollectionToGlibNone(collection)) carg1 = C.guint(index) @@ -20142,7 +20900,9 @@ func (collection *StreamCollectionInstance) GetStream(index uint) Stream { var goret Stream - goret = UnsafeStreamFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeStreamFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -20150,12 +20910,12 @@ func (collection *StreamCollectionInstance) GetStream(index uint) Stream { // GetUpstreamID wraps gst_stream_collection_get_upstream_id // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstStreamCollection)(UnsafeStreamCollectionToGlibNone(collection)) @@ -20164,7 +20924,9 @@ func (collection *StreamCollectionInstance) GetUpstreamID() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -21135,14 +21897,14 @@ type TypeFindFactory interface { // GetCaps wraps gst_type_find_factory_get_caps // The function returns the following values: // - // - goret *Caps + // - goret *Caps (nullable) // // Gets the #GstCaps associated with a typefind factory. GetCaps() *Caps // GetExtensions wraps gst_type_find_factory_get_extensions // The function returns the following values: // - // - goret []string + // - goret []string (nullable) // // Gets the extensions associated with a #GstTypeFindFactory. The returned // array should not be changed. If you need to change stuff in it, you should @@ -21254,12 +22016,12 @@ func (factory *TypeFindFactoryInstance) CallFunction(find *TypeFind) { // GetCaps wraps gst_type_find_factory_get_caps // The function returns the following values: // -// - goret *Caps +// - goret *Caps (nullable) // // Gets the #GstCaps associated with a typefind factory. func (factory *TypeFindFactoryInstance) GetCaps() *Caps { var carg0 *C.GstTypeFindFactory // in, none, converted - var cret *C.GstCaps // return, none, converted + var cret *C.GstCaps // return, none, converted, nullable carg0 = (*C.GstTypeFindFactory)(UnsafeTypeFindFactoryToGlibNone(factory)) @@ -21268,7 +22030,9 @@ func (factory *TypeFindFactoryInstance) GetCaps() *Caps { var goret *Caps - goret = UnsafeCapsFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeCapsFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -21276,7 +22040,7 @@ func (factory *TypeFindFactoryInstance) GetCaps() *Caps { // GetExtensions wraps gst_type_find_factory_get_extensions // The function returns the following values: // -// - goret []string +// - goret []string (nullable) // // Gets the extensions associated with a #GstTypeFindFactory. The returned // array should not be changed. If you need to change stuff in it, you should @@ -21284,7 +22048,7 @@ func (factory *TypeFindFactoryInstance) GetCaps() *Caps { // a 0-length list. func (factory *TypeFindFactoryInstance) GetExtensions() []string { var carg0 *C.GstTypeFindFactory // in, none, converted - var cret **C.gchar // return, transfer: none, C Pointers: 2, Name: array[utf8], scope: , array (inner: *typesystem.StringPrimitive, zero-terminated) + var cret **C.gchar // return, transfer: none, C Pointers: 2, Name: array[utf8], scope: , nullable, array (inner: *typesystem.StringPrimitive, zero-terminated) carg0 = (*C.GstTypeFindFactory)(UnsafeTypeFindFactoryToGlibNone(factory)) @@ -21360,7 +22124,7 @@ type Allocator interface { // // The function returns the following values: // - // - goret *Memory + // - goret *Memory (nullable) // // Use @allocator to allocate a new memory block with memory that is at least // @size big. @@ -21438,13 +22202,13 @@ func UnsafeAllocatorToGlibFull(c Allocator) unsafe.Pointer { // // The function returns the following values: // -// - goret Allocator +// - goret Allocator (nullable) // // Find a previously registered allocator with @name. When @name is %NULL, the // default allocator will be returned. func AllocatorFind(name string) Allocator { var carg1 *C.gchar // in, none, string, nullable-string - var cret *C.GstAllocator // return, full, converted + var cret *C.GstAllocator // return, full, converted, nullable if name != "" { carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -21456,7 +22220,9 @@ func AllocatorFind(name string) Allocator { var goret Allocator - goret = UnsafeAllocatorFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeAllocatorFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -21491,7 +22257,7 @@ func AllocatorRegister(name string, allocator Allocator) { // // The function returns the following values: // -// - goret *Memory +// - goret *Memory (nullable) // // Use @allocator to allocate a new memory block with memory that is at least // @size big. @@ -21512,7 +22278,7 @@ func (allocator *AllocatorInstance) Alloc(size uint, params *AllocationParams) * var carg0 *C.GstAllocator // in, none, converted var carg1 C.gsize // in, none, casted var carg2 *C.GstAllocationParams // in, none, converted, nullable - var cret *C.GstMemory // return, full, converted + var cret *C.GstMemory // return, full, converted, nullable carg0 = (*C.GstAllocator)(UnsafeAllocatorToGlibNone(allocator)) carg1 = C.gsize(size) @@ -21527,7 +22293,9 @@ func (allocator *AllocatorInstance) Alloc(size uint, params *AllocationParams) * var goret *Memory - goret = UnsafeMemoryFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeMemoryFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -21866,14 +22634,14 @@ func BufferPoolConfigGetAllocator(config *Structure) (Allocator, AllocationParam // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Parses an available @config and gets the option at @index of the options API // array. 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 + var cret *C.gchar // return, none, string, nullable-string carg1 = (*C.GstStructure)(UnsafeStructureToGlibNone(config)) carg2 = C.guint(index) @@ -21884,7 +22652,9 @@ func BufferPoolConfigGetOption(config *Structure, index uint) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -22536,7 +23306,7 @@ type Bus interface { // CreateWatch wraps gst_bus_create_watch // The function returns the following values: // - // - goret *glib.Source + // - goret *glib.Source (nullable) // // Create watch for this bus. The #GSource will be dispatched whenever // a message is on the bus. After the GSource is dispatched, the @@ -22600,7 +23370,7 @@ type Bus interface { // Peek wraps gst_bus_peek // The function returns the following values: // - // - goret *Message + // - goret *Message (nullable) // // Peeks the message on the top of the bus' queue. The message will remain // on the bus' message queue. @@ -22616,7 +23386,7 @@ type Bus interface { // // The function returns the following values: // - // - goret *Message + // - goret *Message (nullable) // // Polls the bus for messages. Will block while waiting for messages to come. // You can specify a maximum time to poll with the @timeout parameter. If @@ -22655,7 +23425,7 @@ type Bus interface { // Pop wraps gst_bus_pop // The function returns the following values: // - // - goret *Message + // - goret *Message (nullable) // // Gets a message from the bus. Pop() *Message @@ -22667,7 +23437,7 @@ type Bus interface { // // The function returns the following values: // - // - goret *Message + // - goret *Message (nullable) // // Gets a message matching @type from the bus. Will discard all messages on // the bus that do not match @type and that have been posted before the first @@ -22733,7 +23503,7 @@ type Bus interface { // // The function returns the following values: // - // - goret *Message + // - goret *Message (nullable) // // Gets a message from the bus, waiting up to the specified timeout. // @@ -22750,7 +23520,7 @@ type Bus interface { // // The function returns the following values: // - // - goret *Message + // - goret *Message (nullable) // // Gets a message from the bus whose type matches the message type mask @types, // waiting up to the specified timeout (and discarding any messages that do not @@ -22949,7 +23719,7 @@ func (bus *BusInstance) AddWatchFull(priority int, fn BusFunc) uint { // CreateWatch wraps gst_bus_create_watch // The function returns the following values: // -// - goret *glib.Source +// - goret *glib.Source (nullable) // // Create watch for this bus. The #GSource will be dispatched whenever // a message is on the bus. After the GSource is dispatched, the @@ -22959,7 +23729,7 @@ func (bus *BusInstance) AddWatchFull(priority int, fn BusFunc) uint { // any signal watch added with #gst_bus_add_signal_watch. func (bus *BusInstance) CreateWatch() *glib.Source { var carg0 *C.GstBus // in, none, converted - var cret *C.GSource // return, full, converted + var cret *C.GSource // return, full, converted, nullable carg0 = (*C.GstBus)(UnsafeBusToGlibNone(bus)) @@ -22968,7 +23738,9 @@ func (bus *BusInstance) CreateWatch() *glib.Source { var goret *glib.Source - goret = glib.UnsafeSourceFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = glib.UnsafeSourceFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -23078,13 +23850,13 @@ func (bus *BusInstance) HavePending() bool { // Peek wraps gst_bus_peek // The function returns the following values: // -// - goret *Message +// - goret *Message (nullable) // // Peeks the message on the top of the bus' queue. The message will remain // on the bus' message queue. func (bus *BusInstance) Peek() *Message { var carg0 *C.GstBus // in, none, converted - var cret *C.GstMessage // return, full, converted + var cret *C.GstMessage // return, full, converted, nullable carg0 = (*C.GstBus)(UnsafeBusToGlibNone(bus)) @@ -23093,7 +23865,9 @@ func (bus *BusInstance) Peek() *Message { var goret *Message - goret = UnsafeMessageFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeMessageFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -23109,7 +23883,7 @@ func (bus *BusInstance) Peek() *Message { // // The function returns the following values: // -// - goret *Message +// - goret *Message (nullable) // // Polls the bus for messages. Will block while waiting for messages to come. // You can specify a maximum time to poll with the @timeout parameter. If @@ -23148,7 +23922,7 @@ func (bus *BusInstance) Poll(events MessageType, timeout ClockTime) *Message { var carg0 *C.GstBus // in, none, converted var carg1 C.GstMessageType // in, none, casted var carg2 C.GstClockTime // in, none, casted, alias - var cret *C.GstMessage // return, full, converted + var cret *C.GstMessage // return, full, converted, nullable carg0 = (*C.GstBus)(UnsafeBusToGlibNone(bus)) carg1 = C.GstMessageType(events) @@ -23161,7 +23935,9 @@ func (bus *BusInstance) Poll(events MessageType, timeout ClockTime) *Message { var goret *Message - goret = UnsafeMessageFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeMessageFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -23169,12 +23945,12 @@ func (bus *BusInstance) Poll(events MessageType, timeout ClockTime) *Message { // Pop wraps gst_bus_pop // The function returns the following values: // -// - goret *Message +// - goret *Message (nullable) // // Gets a message from the bus. func (bus *BusInstance) Pop() *Message { var carg0 *C.GstBus // in, none, converted - var cret *C.GstMessage // return, full, converted + var cret *C.GstMessage // return, full, converted, nullable carg0 = (*C.GstBus)(UnsafeBusToGlibNone(bus)) @@ -23183,7 +23959,9 @@ func (bus *BusInstance) Pop() *Message { var goret *Message - goret = UnsafeMessageFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeMessageFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -23196,7 +23974,7 @@ func (bus *BusInstance) Pop() *Message { // // The function returns the following values: // -// - goret *Message +// - goret *Message (nullable) // // Gets a message matching @type from the bus. Will discard all messages on // the bus that do not match @type and that have been posted before the first @@ -23206,7 +23984,7 @@ func (bus *BusInstance) Pop() *Message { func (bus *BusInstance) PopFiltered(types MessageType) *Message { var carg0 *C.GstBus // in, none, converted var carg1 C.GstMessageType // in, none, casted - var cret *C.GstMessage // return, full, converted + var cret *C.GstMessage // return, full, converted, nullable carg0 = (*C.GstBus)(UnsafeBusToGlibNone(bus)) carg1 = C.GstMessageType(types) @@ -23217,7 +23995,9 @@ func (bus *BusInstance) PopFiltered(types MessageType) *Message { var goret *Message - goret = UnsafeMessageFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeMessageFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -23355,7 +24135,7 @@ func (bus *BusInstance) SetSyncHandler(fn BusSyncHandler) { // // The function returns the following values: // -// - goret *Message +// - goret *Message (nullable) // // Gets a message from the bus, waiting up to the specified timeout. // @@ -23365,7 +24145,7 @@ func (bus *BusInstance) SetSyncHandler(fn BusSyncHandler) { func (bus *BusInstance) TimedPop(timeout ClockTime) *Message { var carg0 *C.GstBus // in, none, converted var carg1 C.GstClockTime // in, none, casted, alias - var cret *C.GstMessage // return, full, converted + var cret *C.GstMessage // return, full, converted, nullable carg0 = (*C.GstBus)(UnsafeBusToGlibNone(bus)) carg1 = C.GstClockTime(timeout) @@ -23376,7 +24156,9 @@ func (bus *BusInstance) TimedPop(timeout ClockTime) *Message { var goret *Message - goret = UnsafeMessageFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeMessageFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -23390,7 +24172,7 @@ func (bus *BusInstance) TimedPop(timeout ClockTime) *Message { // // The function returns the following values: // -// - goret *Message +// - goret *Message (nullable) // // Gets a message from the bus whose type matches the message type mask @types, // waiting up to the specified timeout (and discarding any messages that do not @@ -23403,7 +24185,7 @@ func (bus *BusInstance) TimedPopFiltered(timeout ClockTime, types MessageType) * var carg0 *C.GstBus // in, none, converted var carg1 C.GstClockTime // in, none, casted, alias var carg2 C.GstMessageType // in, none, casted - var cret *C.GstMessage // return, full, converted + var cret *C.GstMessage // return, full, converted, nullable carg0 = (*C.GstBus)(UnsafeBusToGlibNone(bus)) carg1 = C.GstClockTime(timeout) @@ -23416,7 +24198,9 @@ func (bus *BusInstance) TimedPopFiltered(timeout ClockTime, types MessageType) * var goret *Message - goret = UnsafeMessageFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeMessageFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -23636,7 +24420,7 @@ type Clock interface { // GetMaster wraps gst_clock_get_master // The function returns the following values: // - // - goret Clock + // - goret Clock (nullable) // // Gets the master clock that @clock is slaved to or %NULL when the clock is // not slaved to any master clock. @@ -23971,12 +24755,12 @@ func ClockIDCompareFunc(id1 unsafe.Pointer, id2 unsafe.Pointer) int { // // The function returns the following values: // -// - goret Clock +// - goret Clock (nullable) // // This function returns the underlying clock. func ClockIDGetClock(id ClockID) Clock { var carg1 C.GstClockID // in, none, casted, alias - var cret *C.GstClock // return, full, converted + var cret *C.GstClock // return, full, converted, nullable carg1 = C.GstClockID(id) @@ -23985,7 +24769,9 @@ func ClockIDGetClock(id ClockID) Clock { var goret Clock - goret = UnsafeClockFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeClockFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -24464,13 +25250,13 @@ func (clock *ClockInstance) GetInternalTime() ClockTime { // GetMaster wraps gst_clock_get_master // The function returns the following values: // -// - goret Clock +// - goret Clock (nullable) // // Gets the master clock that @clock is slaved to or %NULL when the clock is // not slaved to any master clock. func (clock *ClockInstance) GetMaster() Clock { var carg0 *C.GstClock // in, none, converted - var cret *C.GstClock // return, full, converted + var cret *C.GstClock // return, full, converted, nullable carg0 = (*C.GstClock)(UnsafeClockToGlibNone(clock)) @@ -24479,7 +25265,9 @@ func (clock *ClockInstance) GetMaster() Clock { var goret Clock - goret = UnsafeClockFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeClockFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -25423,7 +26211,7 @@ type Device interface { // // The function returns the following values: // - // - goret Element + // - goret Element (nullable) // // Creates the element with all of the required parameters set to use // this device. @@ -25431,7 +26219,7 @@ type Device interface { // GetCaps wraps gst_device_get_caps // The function returns the following values: // - // - goret *Caps + // - goret *Caps (nullable) // // Getter for the #GstCaps that this device supports. GetCaps() *Caps @@ -25454,7 +26242,7 @@ type Device interface { // GetProperties wraps gst_device_get_properties // The function returns the following values: // - // - goret *Structure + // - goret *Structure (nullable) // // Gets the extra properties of a device. GetProperties() *Structure @@ -25552,14 +26340,14 @@ func UnsafeDeviceToGlibFull(c Device) unsafe.Pointer { // // The function returns the following values: // -// - goret Element +// - goret Element (nullable) // // Creates the element with all of the required parameters set to use // this device. func (device *DeviceInstance) CreateElement(name string) Element { var carg0 *C.GstDevice // in, none, converted var carg1 *C.gchar // in, none, string, nullable-string - var cret *C.GstElement // return, none, converted + var cret *C.GstElement // return, none, converted, nullable carg0 = (*C.GstDevice)(UnsafeDeviceToGlibNone(device)) if name != "" { @@ -25573,7 +26361,9 @@ func (device *DeviceInstance) CreateElement(name string) Element { var goret Element - goret = UnsafeElementFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeElementFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -25581,12 +26371,12 @@ func (device *DeviceInstance) CreateElement(name string) Element { // GetCaps wraps gst_device_get_caps // The function returns the following values: // -// - goret *Caps +// - goret *Caps (nullable) // // Getter for the #GstCaps that this device supports. func (device *DeviceInstance) GetCaps() *Caps { var carg0 *C.GstDevice // in, none, converted - var cret *C.GstCaps // return, full, converted + var cret *C.GstCaps // return, full, converted, nullable carg0 = (*C.GstDevice)(UnsafeDeviceToGlibNone(device)) @@ -25595,7 +26385,9 @@ func (device *DeviceInstance) GetCaps() *Caps { var goret *Caps - goret = UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -25651,12 +26443,12 @@ func (device *DeviceInstance) GetDisplayName() string { // GetProperties wraps gst_device_get_properties // The function returns the following values: // -// - goret *Structure +// - goret *Structure (nullable) // // Gets the extra properties of a device. func (device *DeviceInstance) GetProperties() *Structure { var carg0 *C.GstDevice // in, none, converted - var cret *C.GstStructure // return, full, converted + var cret *C.GstStructure // return, full, converted, nullable carg0 = (*C.GstDevice)(UnsafeDeviceToGlibNone(device)) @@ -25665,7 +26457,9 @@ func (device *DeviceInstance) GetProperties() *Structure { var goret *Structure - goret = UnsafeStructureFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeStructureFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -25888,7 +26682,7 @@ type DeviceMonitor interface { // GetDevices wraps gst_device_monitor_get_devices // The function returns the following values: // - // - goret []Device + // - goret []Device (nullable) // // Gets a list of devices from all of the relevant monitors. This may actually // probe the hardware if the monitor is not currently started. @@ -26077,7 +26871,7 @@ func (monitor *DeviceMonitorInstance) GetBus() Bus { // GetDevices wraps gst_device_monitor_get_devices // The function returns the following values: // -// - goret []Device +// - goret []Device (nullable) // // Gets a list of devices from all of the relevant monitors. This may actually // probe the hardware if the monitor is not currently started. @@ -26335,7 +27129,7 @@ type DeviceProvider interface { // GetFactory wraps gst_device_provider_get_factory // The function returns the following values: // - // - goret DeviceProviderFactory + // - goret DeviceProviderFactory (nullable) // // Retrieves the factory that was used to create this device provider. GetFactory() DeviceProviderFactory @@ -26659,12 +27453,12 @@ func (provider *DeviceProviderInstance) GetDevices() []Device { // GetFactory wraps gst_device_provider_get_factory // The function returns the following values: // -// - goret DeviceProviderFactory +// - goret DeviceProviderFactory (nullable) // // Retrieves the factory that was used to create this device provider. func (provider *DeviceProviderInstance) GetFactory() DeviceProviderFactory { var carg0 *C.GstDeviceProvider // in, none, converted - var cret *C.GstDeviceProviderFactory // return, none, converted + var cret *C.GstDeviceProviderFactory // return, none, converted, nullable carg0 = (*C.GstDeviceProvider)(UnsafeDeviceProviderToGlibNone(provider)) @@ -26673,7 +27467,9 @@ func (provider *DeviceProviderInstance) GetFactory() DeviceProviderFactory { var goret DeviceProviderFactory - goret = UnsafeDeviceProviderFactoryFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDeviceProviderFactoryFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -26889,7 +27685,7 @@ type DeviceProviderFactory interface { // Get wraps gst_device_provider_factory_get // The function returns the following values: // - // - goret DeviceProvider + // - goret DeviceProvider (nullable) // // Returns the device provider of the type defined by the given device // providerfactory. @@ -26911,14 +27707,14 @@ type DeviceProviderFactory interface { // // The function returns the following values: // - // - goret string + // - goret string (nullable) // // Get the metadata on @factory with @key. GetMetadata(string) string // GetMetadataKeys wraps gst_device_provider_factory_get_metadata_keys // The function returns the following values: // - // - goret []string + // - goret []string (nullable) // // Get the available keys for the metadata on @factory. GetMetadataKeys() []string @@ -26998,13 +27794,13 @@ func UnsafeDeviceProviderFactoryToGlibFull(c DeviceProviderFactory) unsafe.Point // // The function returns the following values: // -// - goret DeviceProviderFactory +// - goret DeviceProviderFactory (nullable) // // 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 - var cret *C.GstDeviceProviderFactory // return, full, converted + var cret *C.GstDeviceProviderFactory // return, full, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) defer C.free(unsafe.Pointer(carg1)) @@ -27014,7 +27810,9 @@ func DeviceProviderFactoryFind(name string) DeviceProviderFactory { var goret DeviceProviderFactory - goret = UnsafeDeviceProviderFactoryFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDeviceProviderFactoryFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -27027,13 +27825,13 @@ func DeviceProviderFactoryFind(name string) DeviceProviderFactory { // // The function returns the following values: // -// - goret DeviceProvider +// - goret DeviceProvider (nullable) // // 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 - var cret *C.GstDeviceProvider // return, full, converted + var cret *C.GstDeviceProvider // return, full, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(factoryname))) defer C.free(unsafe.Pointer(carg1)) @@ -27043,7 +27841,9 @@ func DeviceProviderFactoryGetByName(factoryname string) DeviceProvider { var goret DeviceProvider - goret = UnsafeDeviceProviderFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDeviceProviderFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -27086,13 +27886,13 @@ func DeviceProviderFactoryListGetDeviceProviders(minrank Rank) []DeviceProviderF // Get wraps gst_device_provider_factory_get // The function returns the following values: // -// - goret DeviceProvider +// - goret DeviceProvider (nullable) // // Returns the device provider of the type defined by the given device // providerfactory. func (factory *DeviceProviderFactoryInstance) Get() DeviceProvider { var carg0 *C.GstDeviceProviderFactory // in, none, converted - var cret *C.GstDeviceProvider // return, full, converted + var cret *C.GstDeviceProvider // return, full, converted, nullable carg0 = (*C.GstDeviceProviderFactory)(UnsafeDeviceProviderFactoryToGlibNone(factory)) @@ -27101,7 +27901,9 @@ func (factory *DeviceProviderFactoryInstance) Get() DeviceProvider { var goret DeviceProvider - goret = UnsafeDeviceProviderFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDeviceProviderFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -27138,13 +27940,13 @@ func (factory *DeviceProviderFactoryInstance) GetDeviceProviderType() gobject.Ty // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstDeviceProviderFactory)(UnsafeDeviceProviderFactoryToGlibNone(factory)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -27156,7 +27958,9 @@ func (factory *DeviceProviderFactoryInstance) GetMetadata(key string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -27164,12 +27968,12 @@ func (factory *DeviceProviderFactoryInstance) GetMetadata(key string) string { // GetMetadataKeys wraps gst_device_provider_factory_get_metadata_keys // The function returns the following values: // -// - goret []string +// - goret []string (nullable) // // Get the available keys for the metadata on @factory. func (factory *DeviceProviderFactoryInstance) GetMetadataKeys() []string { var carg0 *C.GstDeviceProviderFactory // in, none, converted - var cret **C.gchar // return, transfer: full, C Pointers: 2, Name: array[utf8], scope: , array (inner: *typesystem.StringPrimitive, zero-terminated) + var cret **C.gchar // return, transfer: full, C Pointers: 2, Name: array[utf8], scope: , nullable, array (inner: *typesystem.StringPrimitive, zero-terminated) carg0 = (*C.GstDeviceProviderFactory)(UnsafeDeviceProviderFactoryToGlibNone(factory)) @@ -27624,7 +28428,7 @@ type Element interface { // GetBus wraps gst_element_get_bus // The function returns the following values: // - // - goret Bus + // - goret Bus (nullable) // // Returns the bus of the element. Note that only a #GstPipeline will provide a // bus for the application. @@ -27632,7 +28436,7 @@ type Element interface { // GetClock wraps gst_element_get_clock // The function returns the following values: // - // - goret Clock + // - goret Clock (nullable) // // Gets the currently configured clock of the element. This is the clock as was // last set with gst_element_set_clock(). @@ -27649,7 +28453,7 @@ type Element interface { // // The function returns the following values: // - // - goret Pad + // - goret Pad (nullable) // // Looks for an unlinked pad to which the given pad can link. It is not // guaranteed that linking the pads will work, though it should work in most @@ -27668,7 +28472,7 @@ type Element interface { // // The function returns the following values: // - // - goret PadTemplate + // - goret PadTemplate (nullable) // // Retrieves a pad template from @element that is compatible with @compattempl. // Pads from compatible templates can be linked together. @@ -27681,7 +28485,7 @@ type Element interface { // // The function returns the following values: // - // - goret *Context + // - goret *Context (nullable) // // Gets the context with @context_type set on the element or NULL. // @@ -27695,7 +28499,7 @@ type Element interface { // // The function returns the following values: // - // - goret *Context + // - goret *Context (nullable) // // Gets the context with @context_type set on the element or NULL. GetContextUnlocked(string) *Context @@ -27728,7 +28532,7 @@ type Element interface { // GetFactory wraps gst_element_get_factory // The function returns the following values: // - // - goret ElementFactory + // - goret ElementFactory (nullable) // // Retrieves the factory that was used to create this element. GetFactory() ElementFactory @@ -27752,7 +28556,7 @@ type Element interface { // // The function returns the following values: // - // - goret PadTemplate + // - goret PadTemplate (nullable) // // Retrieves a padtemplate from @element with the given name. GetPadTemplate(string) PadTemplate @@ -27772,7 +28576,7 @@ type Element interface { // // The function returns the following values: // - // - goret Pad + // - goret Pad (nullable) // // The name of this function is confusing to people learning GStreamer. // gst_element_request_pad_simple() aims at making it more explicit it is @@ -27838,7 +28642,7 @@ type Element interface { // // The function returns the following values: // - // - goret Pad + // - goret Pad (nullable) // // Retrieves a pad from @element by name. This version only retrieves // already-existing (i.e. 'static') pads. @@ -28089,7 +28893,7 @@ type Element interface { // ProvidedClock wraps gst_element_provide_clock // The function returns the following values: // - // - goret Clock + // - goret Clock (nullable) // // Get the clock provided by the given element. // > An element is only required to provide a clock in the PAUSED @@ -28230,7 +29034,7 @@ type Element interface { // // The function returns the following values: // - // - goret Pad + // - goret Pad (nullable) // // Retrieves a request pad from the element according to the provided template. // Pad templates can be looked up using @@ -28246,7 +29050,7 @@ type Element interface { // // The function returns the following values: // - // - goret Pad + // - goret Pad (nullable) // // Retrieves a pad from the element by name (e.g. "src_\%d"). This version only // retrieves request pads. The pad should be released with @@ -29154,13 +29958,13 @@ func (element *ElementInstance) GetBaseTime() ClockTime { // GetBus wraps gst_element_get_bus // The function returns the following values: // -// - goret Bus +// - goret Bus (nullable) // // Returns the bus of the element. Note that only a #GstPipeline will provide a // bus for the application. func (element *ElementInstance) GetBus() Bus { var carg0 *C.GstElement // in, none, converted - var cret *C.GstBus // return, full, converted + var cret *C.GstBus // return, full, converted, nullable carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) @@ -29169,7 +29973,9 @@ func (element *ElementInstance) GetBus() Bus { var goret Bus - goret = UnsafeBusFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeBusFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -29177,7 +29983,7 @@ func (element *ElementInstance) GetBus() Bus { // GetClock wraps gst_element_get_clock // The function returns the following values: // -// - goret Clock +// - goret Clock (nullable) // // Gets the currently configured clock of the element. This is the clock as was // last set with gst_element_set_clock(). @@ -29186,7 +29992,7 @@ func (element *ElementInstance) GetBus() Bus { // pipeline is in the PLAYING state. func (element *ElementInstance) GetClock() Clock { var carg0 *C.GstElement // in, none, converted - var cret *C.GstClock // return, full, converted + var cret *C.GstClock // return, full, converted, nullable carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) @@ -29195,7 +30001,9 @@ func (element *ElementInstance) GetClock() Clock { var goret Clock - goret = UnsafeClockFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeClockFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -29209,7 +30017,7 @@ func (element *ElementInstance) GetClock() Clock { // // The function returns the following values: // -// - goret Pad +// - goret Pad (nullable) // // Looks for an unlinked pad to which the given pad can link. It is not // guaranteed that linking the pads will work, though it should work in most @@ -29222,7 +30030,7 @@ func (element *ElementInstance) GetCompatiblePad(pad Pad, caps *Caps) Pad { var carg0 *C.GstElement // in, none, converted var carg1 *C.GstPad // in, none, converted var carg2 *C.GstCaps // in, none, converted, nullable - var cret *C.GstPad // return, full, converted + var cret *C.GstPad // return, full, converted, nullable carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) carg1 = (*C.GstPad)(UnsafePadToGlibNone(pad)) @@ -29237,7 +30045,9 @@ func (element *ElementInstance) GetCompatiblePad(pad Pad, caps *Caps) Pad { var goret Pad - goret = UnsafePadFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePadFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -29251,14 +30061,14 @@ func (element *ElementInstance) GetCompatiblePad(pad Pad, caps *Caps) Pad { // // The function returns the following values: // -// - goret PadTemplate +// - goret PadTemplate (nullable) // // Retrieves a pad template from @element that is compatible with @compattempl. // Pads from compatible templates can be linked together. func (element *ElementInstance) GetCompatiblePadTemplate(compattempl PadTemplate) PadTemplate { var carg0 *C.GstElement // in, none, converted var carg1 *C.GstPadTemplate // in, none, converted - var cret *C.GstPadTemplate // return, none, converted + var cret *C.GstPadTemplate // return, none, converted, nullable carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) carg1 = (*C.GstPadTemplate)(UnsafePadTemplateToGlibNone(compattempl)) @@ -29269,7 +30079,9 @@ func (element *ElementInstance) GetCompatiblePadTemplate(compattempl PadTemplate var goret PadTemplate - goret = UnsafePadTemplateFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePadTemplateFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -29282,7 +30094,7 @@ func (element *ElementInstance) GetCompatiblePadTemplate(compattempl PadTemplate // // The function returns the following values: // -// - goret *Context +// - goret *Context (nullable) // // Gets the context with @context_type set on the element or NULL. // @@ -29290,7 +30102,7 @@ func (element *ElementInstance) GetCompatiblePadTemplate(compattempl PadTemplate func (element *ElementInstance) GetContext(contextType string) *Context { var carg0 *C.GstElement // in, none, converted var carg1 *C.gchar // in, none, string - var cret *C.GstContext // return, full, converted + var cret *C.GstContext // return, full, converted, nullable carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(contextType))) @@ -29302,7 +30114,9 @@ func (element *ElementInstance) GetContext(contextType string) *Context { var goret *Context - goret = UnsafeContextFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeContextFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -29315,13 +30129,13 @@ func (element *ElementInstance) GetContext(contextType string) *Context { // // The function returns the following values: // -// - goret *Context +// - goret *Context (nullable) // // 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 - var cret *C.GstContext // return, full, converted + var cret *C.GstContext // return, full, converted, nullable carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(contextType))) @@ -29333,7 +30147,9 @@ func (element *ElementInstance) GetContextUnlocked(contextType string) *Context var goret *Context - goret = UnsafeContextFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeContextFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -29419,12 +30235,12 @@ func (element *ElementInstance) GetCurrentRunningTime() ClockTime { // GetFactory wraps gst_element_get_factory // The function returns the following values: // -// - goret ElementFactory +// - goret ElementFactory (nullable) // // Retrieves the factory that was used to create this element. func (element *ElementInstance) GetFactory() ElementFactory { var carg0 *C.GstElement // in, none, converted - var cret *C.GstElementFactory // return, none, converted + var cret *C.GstElementFactory // return, none, converted, nullable carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) @@ -29433,7 +30249,9 @@ func (element *ElementInstance) GetFactory() ElementFactory { var goret ElementFactory - goret = UnsafeElementFactoryFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeElementFactoryFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -29477,13 +30295,13 @@ func (element *ElementInstance) GetMetadata(key string) string { // // The function returns the following values: // -// - goret PadTemplate +// - goret PadTemplate (nullable) // // 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 - var cret *C.GstPadTemplate // return, none, converted + var cret *C.GstPadTemplate // return, none, converted, nullable carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -29495,7 +30313,9 @@ func (element *ElementInstance) GetPadTemplate(name string) PadTemplate { var goret PadTemplate - goret = UnsafePadTemplateFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePadTemplateFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -29538,7 +30358,7 @@ func (element *ElementInstance) GetPadTemplateList() []PadTemplate { // // The function returns the following values: // -// - goret Pad +// - goret Pad (nullable) // // The name of this function is confusing to people learning GStreamer. // gst_element_request_pad_simple() aims at making it more explicit it is @@ -29549,7 +30369,7 @@ func (element *ElementInstance) GetPadTemplateList() []PadTemplate { func (element *ElementInstance) GetRequestPad(name string) Pad { var carg0 *C.GstElement // in, none, converted var carg1 *C.gchar // in, none, string - var cret *C.GstPad // return, full, converted + var cret *C.GstPad // return, full, converted, nullable carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -29561,7 +30381,9 @@ func (element *ElementInstance) GetRequestPad(name string) Pad { var goret Pad - goret = UnsafePadFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePadFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -29662,14 +30484,14 @@ func (element *ElementInstance) GetState(timeout ClockTime) (State, State, State // // The function returns the following values: // -// - goret Pad +// - goret Pad (nullable) // // Retrieves a pad from @element by name. This version only retrieves // 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 - var cret *C.GstPad // return, full, converted + var cret *C.GstPad // return, full, converted, nullable carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -29681,7 +30503,9 @@ func (element *ElementInstance) GetStaticPad(name string) Pad { var goret Pad - goret = UnsafePadFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePadFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -30258,14 +31082,14 @@ func (element *ElementInstance) PostMessage(message *Message) bool { // ProvidedClock wraps gst_element_provide_clock // The function returns the following values: // -// - goret Clock +// - goret Clock (nullable) // // Get the clock provided by the given element. // > An element is only required to provide a clock in the PAUSED // > state. Some elements can provide a clock in other states. func (element *ElementInstance) ProvidedClock() Clock { var carg0 *C.GstElement // in, none, converted - var cret *C.GstClock // return, full, converted + var cret *C.GstClock // return, full, converted, nullable carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) @@ -30274,7 +31098,9 @@ func (element *ElementInstance) ProvidedClock() Clock { var goret Clock - goret = UnsafeClockFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeClockFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -30551,7 +31377,7 @@ func (element *ElementInstance) RemovePropertyNotifyWatch(watchId uint32) { // // The function returns the following values: // -// - goret Pad +// - goret Pad (nullable) // // Retrieves a request pad from the element according to the provided template. // Pad templates can be looked up using @@ -30563,7 +31389,7 @@ func (element *ElementInstance) RequestPad(templ PadTemplate, name string, caps var carg1 *C.GstPadTemplate // in, none, converted var carg2 *C.gchar // in, none, string, nullable-string var carg3 *C.GstCaps // in, none, converted, nullable - var cret *C.GstPad // return, full, converted + var cret *C.GstPad // return, full, converted, nullable carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) carg1 = (*C.GstPadTemplate)(UnsafePadTemplateToGlibNone(templ)) @@ -30583,7 +31409,9 @@ func (element *ElementInstance) RequestPad(templ PadTemplate, name string, caps var goret Pad - goret = UnsafePadFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePadFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -30596,7 +31424,7 @@ func (element *ElementInstance) RequestPad(templ PadTemplate, name string, caps // // The function returns the following values: // -// - goret Pad +// - goret Pad (nullable) // // Retrieves a pad from the element by name (e.g. "src_\%d"). This version only // retrieves request pads. The pad should be released with @@ -30613,7 +31441,7 @@ func (element *ElementInstance) RequestPad(templ PadTemplate, name string, caps func (element *ElementInstance) RequestPadSimple(name string) Pad { var carg0 *C.GstElement // in, none, converted var carg1 *C.gchar // in, none, string - var cret *C.GstPad // return, full, converted + var cret *C.GstPad // return, full, converted, nullable carg0 = (*C.GstElement)(UnsafeElementToGlibNone(element)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -30625,7 +31453,9 @@ func (element *ElementInstance) RequestPadSimple(name string) Pad { var goret Pad - goret = UnsafePadFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePadFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -31200,7 +32030,7 @@ type ElementFactory interface { // // The function returns the following values: // - // - goret Element + // - goret Element (nullable) // // Create a new element of the type defined by the given elementfactory. // It will be given the name supplied, since all elements require a name as @@ -31215,7 +32045,7 @@ type ElementFactory interface { // // The function returns the following values: // - // - goret Element + // - goret Element (nullable) // // Create a new element of the type defined by the given elementfactory. // The supplied list of properties, will be passed at object construction. @@ -31237,14 +32067,14 @@ type ElementFactory interface { // // The function returns the following values: // - // - goret string + // - goret string (nullable) // // Get the metadata on @factory with @key. GetMetadata(string) string // GetMetadataKeys wraps gst_element_factory_get_metadata_keys // The function returns the following values: // - // - goret []string + // - goret []string (nullable) // // Get the available keys for the metadata on @factory. GetMetadataKeys() []string @@ -31361,13 +32191,13 @@ func UnsafeElementFactoryToGlibFull(c ElementFactory) unsafe.Pointer { // // The function returns the following values: // -// - goret ElementFactory +// - goret ElementFactory (nullable) // // 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 - var cret *C.GstElementFactory // return, full, converted + var cret *C.GstElementFactory // return, full, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) defer C.free(unsafe.Pointer(carg1)) @@ -31377,7 +32207,9 @@ func ElementFactoryFind(name string) ElementFactory { var goret ElementFactory - goret = UnsafeElementFactoryFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeElementFactoryFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -31432,7 +32264,7 @@ func ElementFactoryListGetElements(typ ElementFactoryListType, minrank Rank) []E // // The function returns the following values: // -// - goret Element +// - goret Element (nullable) // // Create a new element of the type defined by the given element factory. // If name is %NULL, then the element will receive a guaranteed unique name, @@ -31441,7 +32273,7 @@ func ElementFactoryListGetElements(typ ElementFactoryListType, minrank Rank) []E func ElementFactoryMake(factoryname string, name string) Element { var carg1 *C.gchar // in, none, string var carg2 *C.gchar // in, none, string, nullable-string - var cret *C.GstElement // return, none, converted + var cret *C.GstElement // return, none, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(factoryname))) defer C.free(unsafe.Pointer(carg1)) @@ -31456,7 +32288,9 @@ func ElementFactoryMake(factoryname string, name string) Element { var goret Element - goret = UnsafeElementFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeElementFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -31598,7 +32432,7 @@ func (factory *ElementFactoryInstance) CanSrcAnyCaps(caps *Caps) bool { // // The function returns the following values: // -// - goret Element +// - goret Element (nullable) // // Create a new element of the type defined by the given elementfactory. // It will be given the name supplied, since all elements require a name as @@ -31606,7 +32440,7 @@ func (factory *ElementFactoryInstance) CanSrcAnyCaps(caps *Caps) bool { func (factory *ElementFactoryInstance) Create(name string) Element { var carg0 *C.GstElementFactory // in, none, converted var carg1 *C.gchar // in, none, string, nullable-string - var cret *C.GstElement // return, none, converted + var cret *C.GstElement // return, none, converted, nullable carg0 = (*C.GstElementFactory)(UnsafeElementFactoryToGlibNone(factory)) if name != "" { @@ -31620,7 +32454,9 @@ func (factory *ElementFactoryInstance) Create(name string) Element { var goret Element - goret = UnsafeElementFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeElementFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -31634,7 +32470,7 @@ func (factory *ElementFactoryInstance) Create(name string) Element { // // The function returns the following values: // -// - goret Element +// - goret Element (nullable) // // Create a new element of the type defined by the given elementfactory. // The supplied list of properties, will be passed at object construction. @@ -31643,7 +32479,7 @@ func (factory *ElementFactoryInstance) CreateWithProperties(names []string, valu var carg1 C.guint // implicit var carg2 **C.gchar // in, transfer: none, C Pointers: 2, Name: array[utf8], nullable, array (inner: *typesystem.StringPrimitive, length-by: carg1) var carg3 *C.GValue // in, transfer: none, C Pointers: 1, Name: array[Value], nullable, array (inner: *typesystem.Record, length-by: carg1) - var cret *C.GstElement // return, none, converted + var cret *C.GstElement // return, none, converted, nullable carg0 = (*C.GstElementFactory)(UnsafeElementFactoryToGlibNone(factory)) _ = names @@ -31662,7 +32498,9 @@ func (factory *ElementFactoryInstance) CreateWithProperties(names []string, valu var goret Element - goret = UnsafeElementFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeElementFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -31699,13 +32537,13 @@ func (factory *ElementFactoryInstance) GetElementType() gobject.Type { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstElementFactory)(UnsafeElementFactoryToGlibNone(factory)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -31717,7 +32555,9 @@ func (factory *ElementFactoryInstance) GetMetadata(key string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -31725,12 +32565,12 @@ func (factory *ElementFactoryInstance) GetMetadata(key string) string { // GetMetadataKeys wraps gst_element_factory_get_metadata_keys // The function returns the following values: // -// - goret []string +// - goret []string (nullable) // // Get the available keys for the metadata on @factory. func (factory *ElementFactoryInstance) GetMetadataKeys() []string { var carg0 *C.GstElementFactory // in, none, converted - var cret **C.gchar // return, transfer: full, C Pointers: 2, Name: array[utf8], scope: , array (inner: *typesystem.StringPrimitive, zero-terminated) + var cret **C.gchar // return, transfer: full, C Pointers: 2, Name: array[utf8], scope: , nullable, array (inner: *typesystem.StringPrimitive, zero-terminated) carg0 = (*C.GstElementFactory)(UnsafeElementFactoryToGlibNone(factory)) @@ -31981,7 +32821,7 @@ type GhostPad interface { // GetTarget wraps gst_ghost_pad_get_target // The function returns the following values: // - // - goret Pad + // - goret Pad (nullable) // // Get the target pad of @gpad. Unref target pad after usage. GetTarget() Pad @@ -32052,7 +32892,7 @@ func UnsafeGhostPadToGlibFull(c GhostPad) unsafe.Pointer { // // The function returns the following values: // -// - goret Pad +// - goret Pad (nullable) // // Create a new ghostpad with @target as the target. The direction will be taken // from the target pad. @target must be unlinked. @@ -32061,7 +32901,7 @@ func UnsafeGhostPadToGlibFull(c GhostPad) unsafe.Pointer { func NewGhostPad(name string, target Pad) Pad { var carg1 *C.gchar // in, none, string, nullable-string var carg2 *C.GstPad // in, none, converted - var cret *C.GstPad // return, none, converted + var cret *C.GstPad // return, none, converted, nullable if name != "" { carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -32075,7 +32915,9 @@ func NewGhostPad(name string, target Pad) Pad { var goret Pad - goret = UnsafePadFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePadFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -32090,7 +32932,7 @@ func NewGhostPad(name string, target Pad) Pad { // // The function returns the following values: // -// - goret Pad +// - goret Pad (nullable) // // Create a new ghostpad with @target as the target. The direction will be taken // from the target pad. The template used on the ghostpad will be @template. @@ -32100,7 +32942,7 @@ func NewGhostPadFromTemplate(name string, target Pad, templ PadTemplate) Pad { var carg1 *C.gchar // in, none, string, nullable-string var carg2 *C.GstPad // in, none, converted var carg3 *C.GstPadTemplate // in, none, converted - var cret *C.GstPad // return, none, converted + var cret *C.GstPad // return, none, converted, nullable if name != "" { carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -32116,7 +32958,9 @@ func NewGhostPadFromTemplate(name string, target Pad, templ PadTemplate) Pad { var goret Pad - goret = UnsafePadFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePadFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -32130,7 +32974,7 @@ func NewGhostPadFromTemplate(name string, target Pad, templ PadTemplate) Pad { // // The function returns the following values: // -// - goret Pad +// - goret Pad (nullable) // // Create a new ghostpad without a target with the given direction. // A target can be set on the ghostpad later with the @@ -32140,7 +32984,7 @@ func NewGhostPadFromTemplate(name string, target Pad, templ PadTemplate) Pad { func NewGhostPadNoTarget(name string, dir PadDirection) Pad { var carg1 *C.gchar // in, none, string, nullable-string var carg2 C.GstPadDirection // in, none, casted - var cret *C.GstPad // return, none, converted + var cret *C.GstPad // return, none, converted, nullable if name != "" { carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -32154,7 +32998,9 @@ func NewGhostPadNoTarget(name string, dir PadDirection) Pad { var goret Pad - goret = UnsafePadFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePadFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -32168,14 +33014,14 @@ func NewGhostPadNoTarget(name string, dir PadDirection) Pad { // // The function returns the following values: // -// - goret Pad +// - goret Pad (nullable) // // Create a new ghostpad based on @templ, without setting a target. The // direction will be taken from the @templ. func NewGhostPadNoTargetFromTemplate(name string, templ PadTemplate) Pad { var carg1 *C.gchar // in, none, string, nullable-string var carg2 *C.GstPadTemplate // in, none, converted - var cret *C.GstPad // return, none, converted + var cret *C.GstPad // return, none, converted, nullable if name != "" { carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -32189,7 +33035,9 @@ func NewGhostPadNoTargetFromTemplate(name string, templ PadTemplate) Pad { var goret Pad - goret = UnsafePadFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePadFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -32320,12 +33168,12 @@ func (gpad *GhostPadInstance) Construct() bool { // GetTarget wraps gst_ghost_pad_get_target // The function returns the following values: // -// - goret Pad +// - goret Pad (nullable) // // Get the target pad of @gpad. Unref target pad after usage. func (gpad *GhostPadInstance) GetTarget() Pad { var carg0 *C.GstGhostPad // in, none, converted - var cret *C.GstPad // return, full, converted + var cret *C.GstPad // return, full, converted, nullable carg0 = (*C.GstGhostPad)(UnsafeGhostPadToGlibNone(gpad)) @@ -32334,7 +33182,9 @@ func (gpad *GhostPadInstance) GetTarget() Pad { var goret Pad - goret = UnsafePadFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePadFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -32776,7 +33626,7 @@ type Bin interface { // // The function returns the following values: // - // - goret Pad + // - goret Pad (nullable) // // Recursively looks for elements with an unlinked pad of the given // direction within the specified bin and returns an unlinked pad @@ -32792,7 +33642,7 @@ type Bin interface { // // The function returns the following values: // - // - goret Element + // - goret Element (nullable) // // Looks for an element inside the bin that implements the given // interface. If such an element is found, it returns the element. @@ -32808,7 +33658,7 @@ type Bin interface { // // The function returns the following values: // - // - goret Element + // - goret Element (nullable) // // Gets the element with the given name from a bin. This // function recurses into child bins. @@ -32821,7 +33671,7 @@ type Bin interface { // // The function returns the following values: // - // - goret Element + // - goret Element (nullable) // // Gets the element with the given name from this bin. If the // element is not found, a recursion is performed on the parent bin. @@ -32839,7 +33689,7 @@ type Bin interface { // // The function returns the following values: // - // - goret *Iterator + // - goret *Iterator (nullable) // // Looks for all elements inside the bin with the given element factory name. // The function recurses inside child bins. The iterator will yield a series of @@ -32853,7 +33703,7 @@ type Bin interface { // // The function returns the following values: // - // - goret *Iterator + // - goret *Iterator (nullable) // // Looks for all elements inside the bin that implements the given // interface. You can safely cast all returned elements to the given interface. @@ -32863,14 +33713,14 @@ type Bin interface { // IterateElements wraps gst_bin_iterate_elements // The function returns the following values: // - // - goret *Iterator + // - goret *Iterator (nullable) // // Gets an iterator for the elements in this bin. IterateElements() *Iterator // IterateRecurse wraps gst_bin_iterate_recurse // The function returns the following values: // - // - goret *Iterator + // - goret *Iterator (nullable) // // Gets an iterator for the elements in this bin. // This iterator recurses into GstBin children. @@ -32878,7 +33728,7 @@ type Bin interface { // IterateSinks wraps gst_bin_iterate_sinks // The function returns the following values: // - // - goret *Iterator + // - goret *Iterator (nullable) // // Gets an iterator for all elements in the bin that have the // #GST_ELEMENT_FLAG_SINK flag set. @@ -32886,7 +33736,7 @@ type Bin interface { // IterateSorted wraps gst_bin_iterate_sorted // The function returns the following values: // - // - goret *Iterator + // - goret *Iterator (nullable) // // Gets an iterator for the elements in this bin in topologically // sorted order. This means that the elements are returned from @@ -32898,7 +33748,7 @@ type Bin interface { // IterateSources wraps gst_bin_iterate_sources // The function returns the following values: // - // - goret *Iterator + // - goret *Iterator (nullable) // // Gets an iterator for all elements in the bin that have the // #GST_ELEMENT_FLAG_SOURCE flag set. @@ -33111,7 +33961,7 @@ func (bin *BinInstance) Add(element Element) bool { // // The function returns the following values: // -// - goret Pad +// - goret Pad (nullable) // // Recursively looks for elements with an unlinked pad of the given // direction within the specified bin and returns an unlinked pad @@ -33121,7 +33971,7 @@ func (bin *BinInstance) Add(element Element) bool { func (bin *BinInstance) FindUnlinkedPad(direction PadDirection) Pad { var carg0 *C.GstBin // in, none, converted var carg1 C.GstPadDirection // in, none, casted - var cret *C.GstPad // return, full, converted + var cret *C.GstPad // return, full, converted, nullable carg0 = (*C.GstBin)(UnsafeBinToGlibNone(bin)) carg1 = C.GstPadDirection(direction) @@ -33132,7 +33982,9 @@ func (bin *BinInstance) FindUnlinkedPad(direction PadDirection) Pad { var goret Pad - goret = UnsafePadFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePadFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -33145,7 +33997,7 @@ func (bin *BinInstance) FindUnlinkedPad(direction PadDirection) Pad { // // The function returns the following values: // -// - goret Element +// - goret Element (nullable) // // Looks for an element inside the bin that implements the given // interface. If such an element is found, it returns the element. @@ -33155,7 +34007,7 @@ func (bin *BinInstance) FindUnlinkedPad(direction PadDirection) Pad { func (bin *BinInstance) GetByInterface(iface gobject.Type) Element { var carg0 *C.GstBin // in, none, converted var carg1 C.GType // in, none, casted, alias - var cret *C.GstElement // return, full, converted + var cret *C.GstElement // return, full, converted, nullable carg0 = (*C.GstBin)(UnsafeBinToGlibNone(bin)) carg1 = C.GType(iface) @@ -33166,7 +34018,9 @@ func (bin *BinInstance) GetByInterface(iface gobject.Type) Element { var goret Element - goret = UnsafeElementFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeElementFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -33179,14 +34033,14 @@ func (bin *BinInstance) GetByInterface(iface gobject.Type) Element { // // The function returns the following values: // -// - goret Element +// - goret Element (nullable) // // Gets the element with the given name from a bin. This // 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 - var cret *C.GstElement // return, full, converted + var cret *C.GstElement // return, full, converted, nullable carg0 = (*C.GstBin)(UnsafeBinToGlibNone(bin)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -33198,7 +34052,9 @@ func (bin *BinInstance) GetByName(name string) Element { var goret Element - goret = UnsafeElementFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeElementFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -33211,14 +34067,14 @@ func (bin *BinInstance) GetByName(name string) Element { // // The function returns the following values: // -// - goret Element +// - goret Element (nullable) // // Gets the element with the given name from this bin. If the // 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 - var cret *C.GstElement // return, full, converted + var cret *C.GstElement // return, full, converted, nullable carg0 = (*C.GstBin)(UnsafeBinToGlibNone(bin)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -33230,7 +34086,9 @@ func (bin *BinInstance) GetByNameRecurseUp(name string) Element { var goret Element - goret = UnsafeElementFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeElementFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -33263,7 +34121,7 @@ func (bin *BinInstance) GetSuppressedFlags() ElementFlags { // // The function returns the following values: // -// - goret *Iterator +// - goret *Iterator (nullable) // // Looks for all elements inside the bin with the given element factory name. // The function recurses inside child bins. The iterator will yield a series of @@ -33271,7 +34129,7 @@ func (bin *BinInstance) GetSuppressedFlags() ElementFlags { func (bin *BinInstance) IterateAllByElementFactoryName(factoryName string) *Iterator { var carg0 *C.GstBin // in, none, converted var carg1 *C.gchar // in, none, string - var cret *C.GstIterator // return, full, converted + var cret *C.GstIterator // return, full, converted, nullable carg0 = (*C.GstBin)(UnsafeBinToGlibNone(bin)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(factoryName))) @@ -33283,7 +34141,9 @@ func (bin *BinInstance) IterateAllByElementFactoryName(factoryName string) *Iter var goret *Iterator - goret = UnsafeIteratorFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeIteratorFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -33296,7 +34156,7 @@ func (bin *BinInstance) IterateAllByElementFactoryName(factoryName string) *Iter // // The function returns the following values: // -// - goret *Iterator +// - goret *Iterator (nullable) // // Looks for all elements inside the bin that implements the given // interface. You can safely cast all returned elements to the given interface. @@ -33305,7 +34165,7 @@ func (bin *BinInstance) IterateAllByElementFactoryName(factoryName string) *Iter func (bin *BinInstance) IterateAllByInterface(iface gobject.Type) *Iterator { var carg0 *C.GstBin // in, none, converted var carg1 C.GType // in, none, casted, alias - var cret *C.GstIterator // return, full, converted + var cret *C.GstIterator // return, full, converted, nullable carg0 = (*C.GstBin)(UnsafeBinToGlibNone(bin)) carg1 = C.GType(iface) @@ -33316,7 +34176,9 @@ func (bin *BinInstance) IterateAllByInterface(iface gobject.Type) *Iterator { var goret *Iterator - goret = UnsafeIteratorFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeIteratorFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -33324,12 +34186,12 @@ func (bin *BinInstance) IterateAllByInterface(iface gobject.Type) *Iterator { // IterateElements wraps gst_bin_iterate_elements // The function returns the following values: // -// - goret *Iterator +// - goret *Iterator (nullable) // // Gets an iterator for the elements in this bin. func (bin *BinInstance) IterateElements() *Iterator { var carg0 *C.GstBin // in, none, converted - var cret *C.GstIterator // return, full, converted + var cret *C.GstIterator // return, full, converted, nullable carg0 = (*C.GstBin)(UnsafeBinToGlibNone(bin)) @@ -33338,7 +34200,9 @@ func (bin *BinInstance) IterateElements() *Iterator { var goret *Iterator - goret = UnsafeIteratorFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeIteratorFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -33346,13 +34210,13 @@ func (bin *BinInstance) IterateElements() *Iterator { // IterateRecurse wraps gst_bin_iterate_recurse // The function returns the following values: // -// - goret *Iterator +// - goret *Iterator (nullable) // // Gets an iterator for the elements in this bin. // This iterator recurses into GstBin children. func (bin *BinInstance) IterateRecurse() *Iterator { var carg0 *C.GstBin // in, none, converted - var cret *C.GstIterator // return, full, converted + var cret *C.GstIterator // return, full, converted, nullable carg0 = (*C.GstBin)(UnsafeBinToGlibNone(bin)) @@ -33361,7 +34225,9 @@ func (bin *BinInstance) IterateRecurse() *Iterator { var goret *Iterator - goret = UnsafeIteratorFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeIteratorFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -33369,13 +34235,13 @@ func (bin *BinInstance) IterateRecurse() *Iterator { // IterateSinks wraps gst_bin_iterate_sinks // The function returns the following values: // -// - goret *Iterator +// - goret *Iterator (nullable) // // Gets an iterator for all elements in the bin that have the // #GST_ELEMENT_FLAG_SINK flag set. func (bin *BinInstance) IterateSinks() *Iterator { var carg0 *C.GstBin // in, none, converted - var cret *C.GstIterator // return, full, converted + var cret *C.GstIterator // return, full, converted, nullable carg0 = (*C.GstBin)(UnsafeBinToGlibNone(bin)) @@ -33384,7 +34250,9 @@ func (bin *BinInstance) IterateSinks() *Iterator { var goret *Iterator - goret = UnsafeIteratorFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeIteratorFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -33392,7 +34260,7 @@ func (bin *BinInstance) IterateSinks() *Iterator { // IterateSorted wraps gst_bin_iterate_sorted // The function returns the following values: // -// - goret *Iterator +// - goret *Iterator (nullable) // // Gets an iterator for the elements in this bin in topologically // sorted order. This means that the elements are returned from @@ -33402,7 +34270,7 @@ func (bin *BinInstance) IterateSinks() *Iterator { // of the bin elements and for clock selection. func (bin *BinInstance) IterateSorted() *Iterator { var carg0 *C.GstBin // in, none, converted - var cret *C.GstIterator // return, full, converted + var cret *C.GstIterator // return, full, converted, nullable carg0 = (*C.GstBin)(UnsafeBinToGlibNone(bin)) @@ -33411,7 +34279,9 @@ func (bin *BinInstance) IterateSorted() *Iterator { var goret *Iterator - goret = UnsafeIteratorFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeIteratorFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -33419,13 +34289,13 @@ func (bin *BinInstance) IterateSorted() *Iterator { // IterateSources wraps gst_bin_iterate_sources // The function returns the following values: // -// - goret *Iterator +// - goret *Iterator (nullable) // // Gets an iterator for all elements in the bin that have the // #GST_ELEMENT_FLAG_SOURCE flag set. func (bin *BinInstance) IterateSources() *Iterator { var carg0 *C.GstBin // in, none, converted - var cret *C.GstIterator // return, full, converted + var cret *C.GstIterator // return, full, converted, nullable carg0 = (*C.GstBin)(UnsafeBinToGlibNone(bin)) @@ -33434,7 +34304,9 @@ func (bin *BinInstance) IterateSources() *Iterator { var goret *Iterator - goret = UnsafeIteratorFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeIteratorFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -34271,12 +35143,12 @@ func NewAllocationParams() *AllocationParams { // Copy wraps gst_allocation_params_copy // The function returns the following values: // -// - goret *AllocationParams +// - goret *AllocationParams (nullable) // // Create a copy of @params. func (params *AllocationParams) Copy() *AllocationParams { var carg0 *C.GstAllocationParams // in, none, converted - var cret *C.GstAllocationParams // return, full, converted + var cret *C.GstAllocationParams // return, full, converted, nullable carg0 = (*C.GstAllocationParams)(UnsafeAllocationParamsToGlibNone(params)) @@ -34285,7 +35157,9 @@ func (params *AllocationParams) Copy() *AllocationParams { var goret *AllocationParams - goret = UnsafeAllocationParamsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeAllocationParamsFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -34759,7 +35633,7 @@ func NewBuffer() *Buffer { // // The function returns the following values: // -// - goret *Buffer +// - goret *Buffer (nullable) // // Tries to create a newly allocated buffer with data of the given size and // extra parameters from @allocator. If the requested amount of memory can't be @@ -34772,7 +35646,7 @@ func NewBufferAllocate(allocator Allocator, size uint, params *AllocationParams) var carg1 *C.GstAllocator // in, none, converted, nullable var carg2 C.gsize // in, none, casted var carg3 *C.GstAllocationParams // in, none, converted, nullable - var cret *C.GstBuffer // return, full, converted + var cret *C.GstBuffer // return, full, converted, nullable if allocator != nil { carg1 = (*C.GstAllocator)(UnsafeAllocatorToGlibNone(allocator)) @@ -34789,7 +35663,9 @@ func NewBufferAllocate(allocator Allocator, size uint, params *AllocationParams) var goret *Buffer - goret = UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -34852,14 +35728,14 @@ func BufferGetMaxMemory() uint { // // The function returns the following values: // -// - goret *CustomMeta +// - goret *CustomMeta (nullable) // // Creates and adds a #GstCustomMeta for the desired @name. @name must have // 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 - var cret *C.GstCustomMeta // return, none, converted + var cret *C.GstCustomMeta // return, none, converted, nullable carg0 = (*C.GstBuffer)(UnsafeBufferToGlibNone(buffer)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -34871,7 +35747,9 @@ func (buffer *Buffer) AddCustomMeta(name string) *CustomMeta { var goret *CustomMeta - goret = UnsafeCustomMetaFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeCustomMetaFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -34884,14 +35762,14 @@ func (buffer *Buffer) AddCustomMeta(name string) *CustomMeta { // // The function returns the following values: // -// - goret *ParentBufferMeta +// - goret *ParentBufferMeta (nullable) // // Adds a #GstParentBufferMeta to @buffer that holds a reference on // @ref until the buffer is freed. func (buffer *Buffer) AddParentBufferMeta(ref *Buffer) *ParentBufferMeta { var carg0 *C.GstBuffer // in, none, converted var carg1 *C.GstBuffer // in, none, converted - var cret *C.GstParentBufferMeta // return, none, converted + var cret *C.GstParentBufferMeta // return, none, converted, nullable carg0 = (*C.GstBuffer)(UnsafeBufferToGlibNone(buffer)) carg1 = (*C.GstBuffer)(UnsafeBufferToGlibNone(ref)) @@ -34902,7 +35780,9 @@ func (buffer *Buffer) AddParentBufferMeta(ref *Buffer) *ParentBufferMeta { var goret *ParentBufferMeta - goret = UnsafeParentBufferMetaFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeParentBufferMetaFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -34949,7 +35829,7 @@ func (buffer *Buffer) AddProtectionMeta(info *Structure) *ProtectionMeta { // // The function returns the following values: // -// - goret *ReferenceTimestampMeta +// - goret *ReferenceTimestampMeta (nullable) // // Adds a #GstReferenceTimestampMeta to @buffer that holds a @timestamp and // optionally @duration based on a specific timestamp @reference. See the @@ -34959,7 +35839,7 @@ func (buffer *Buffer) AddReferenceTimestampMeta(reference *Caps, timestamp Clock var carg1 *C.GstCaps // in, none, converted var carg2 C.GstClockTime // in, none, casted, alias var carg3 C.GstClockTime // in, none, casted, alias - var cret *C.GstReferenceTimestampMeta // return, none, converted + var cret *C.GstReferenceTimestampMeta // return, none, converted, nullable carg0 = (*C.GstBuffer)(UnsafeBufferToGlibNone(buffer)) carg1 = (*C.GstCaps)(UnsafeCapsToGlibNone(reference)) @@ -34974,7 +35854,9 @@ func (buffer *Buffer) AddReferenceTimestampMeta(reference *Caps, timestamp Clock var goret *ReferenceTimestampMeta - goret = UnsafeReferenceTimestampMetaFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeReferenceTimestampMetaFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -35076,13 +35958,13 @@ func (buf1 *Buffer) AppendRegion(buf2 *Buffer, offset int, size int) *Buffer { // CopyDeep wraps gst_buffer_copy_deep // The function returns the following values: // -// - goret *Buffer +// - goret *Buffer (nullable) // // Creates a copy of the given buffer. This will make a newly allocated // copy of the data the source buffer contains. func (buf *Buffer) CopyDeep() *Buffer { var carg0 *C.GstBuffer // in, none, converted - var cret *C.GstBuffer // return, full, converted + var cret *C.GstBuffer // return, full, converted, nullable carg0 = (*C.GstBuffer)(UnsafeBufferToGlibNone(buf)) @@ -35091,7 +35973,9 @@ func (buf *Buffer) CopyDeep() *Buffer { var goret *Buffer - goret = UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -35157,7 +36041,7 @@ func (dest *Buffer) CopyInto(src *Buffer, flags BufferCopyFlagsType, offset uint // // The function returns the following values: // -// - goret *Buffer +// - goret *Buffer (nullable) // // Creates a sub-buffer from @parent at @offset and @size. // This sub-buffer uses the actual memory space of the parent buffer. @@ -35172,7 +36056,7 @@ func (parent *Buffer) CopyRegion(flags BufferCopyFlagsType, offset uint, size ui var carg1 C.GstBufferCopyFlags // in, none, casted var carg2 C.gsize // in, none, casted var carg3 C.gsize // in, none, casted - var cret *C.GstBuffer // return, full, converted + var cret *C.GstBuffer // return, full, converted, nullable carg0 = (*C.GstBuffer)(UnsafeBufferToGlibNone(parent)) carg1 = C.GstBufferCopyFlags(flags) @@ -35187,7 +36071,9 @@ func (parent *Buffer) CopyRegion(flags BufferCopyFlagsType, offset uint, size ui var goret *Buffer - goret = UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -35291,13 +36177,13 @@ func (buffer *Buffer) ForEachMeta(fn BufferForEachMetaFunc) bool { // GetAllMemory wraps gst_buffer_get_all_memory // The function returns the following values: // -// - goret *Memory +// - goret *Memory (nullable) // // Gets all the memory blocks in @buffer. The memory blocks will be merged // into one large #GstMemory. func (buffer *Buffer) GetAllMemory() *Memory { var carg0 *C.GstBuffer // in, none, converted - var cret *C.GstMemory // return, full, converted + var cret *C.GstMemory // return, full, converted, nullable carg0 = (*C.GstBuffer)(UnsafeBufferToGlibNone(buffer)) @@ -35306,7 +36192,9 @@ func (buffer *Buffer) GetAllMemory() *Memory { var goret *Memory - goret = UnsafeMemoryFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeMemoryFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -35319,13 +36207,13 @@ func (buffer *Buffer) GetAllMemory() *Memory { // // The function returns the following values: // -// - goret *CustomMeta +// - goret *CustomMeta (nullable) // // 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 - var cret *C.GstCustomMeta // return, none, converted + var cret *C.GstCustomMeta // return, none, converted, nullable carg0 = (*C.GstBuffer)(UnsafeBufferToGlibNone(buffer)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -35337,7 +36225,9 @@ func (buffer *Buffer) GetCustomMeta(name string) *CustomMeta { var goret *CustomMeta - goret = UnsafeCustomMetaFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeCustomMetaFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -35372,13 +36262,13 @@ func (buffer *Buffer) GetFlags() BufferFlags { // // The function returns the following values: // -// - goret *Memory +// - goret *Memory (nullable) // // Gets the memory block at index @idx in @buffer. func (buffer *Buffer) GetMemory(idx uint) *Memory { var carg0 *C.GstBuffer // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.GstMemory // return, full, converted + var cret *C.GstMemory // return, full, converted, nullable carg0 = (*C.GstBuffer)(UnsafeBufferToGlibNone(buffer)) carg1 = C.guint(idx) @@ -35389,7 +36279,9 @@ func (buffer *Buffer) GetMemory(idx uint) *Memory { var goret *Memory - goret = UnsafeMemoryFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeMemoryFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -35403,7 +36295,7 @@ func (buffer *Buffer) GetMemory(idx uint) *Memory { // // The function returns the following values: // -// - goret *Memory +// - goret *Memory (nullable) // // Gets @length memory blocks in @buffer starting at @idx. The memory blocks will // be merged into one large #GstMemory. @@ -35413,7 +36305,7 @@ func (buffer *Buffer) GetMemoryRange(idx uint, length int) *Memory { var carg0 *C.GstBuffer // in, none, converted var carg1 C.guint // in, none, casted var carg2 C.gint // in, none, casted - var cret *C.GstMemory // return, full, converted + var cret *C.GstMemory // return, full, converted, nullable carg0 = (*C.GstBuffer)(UnsafeBufferToGlibNone(buffer)) carg1 = C.guint(idx) @@ -35426,7 +36318,9 @@ func (buffer *Buffer) GetMemoryRange(idx uint, length int) *Memory { var goret *Memory - goret = UnsafeMemoryFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeMemoryFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -35439,7 +36333,7 @@ func (buffer *Buffer) GetMemoryRange(idx uint, length int) *Memory { // // The function returns the following values: // -// - goret *Meta +// - goret *Meta (nullable) // // Gets the metadata for @api on buffer. When there is no such metadata, %NULL is // returned. If multiple metadata with the given @api are attached to this @@ -35449,7 +36343,7 @@ func (buffer *Buffer) GetMemoryRange(idx uint, length int) *Memory { func (buffer *Buffer) GetMeta(api gobject.Type) *Meta { var carg0 *C.GstBuffer // in, none, converted var carg1 C.GType // in, none, casted, alias - var cret *C.GstMeta // return, none, converted + var cret *C.GstMeta // return, none, converted, nullable carg0 = (*C.GstBuffer)(UnsafeBufferToGlibNone(buffer)) carg1 = C.GType(api) @@ -35460,7 +36354,9 @@ func (buffer *Buffer) GetMeta(api gobject.Type) *Meta { var goret *Meta - goret = UnsafeMetaFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeMetaFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -35501,7 +36397,7 @@ func (buffer *Buffer) GetNMeta(apiType gobject.Type) uint { // // The function returns the following values: // -// - goret *ReferenceTimestampMeta +// - goret *ReferenceTimestampMeta (nullable) // // Finds the first #GstReferenceTimestampMeta on @buffer that conforms to // @reference. Conformance is tested by checking if the meta's reference is a @@ -35511,7 +36407,7 @@ func (buffer *Buffer) GetNMeta(apiType gobject.Type) uint { func (buffer *Buffer) GetReferenceTimestampMeta(reference *Caps) *ReferenceTimestampMeta { var carg0 *C.GstBuffer // in, none, converted var carg1 *C.GstCaps // in, none, converted, nullable - var cret *C.GstReferenceTimestampMeta // return, none, converted + var cret *C.GstReferenceTimestampMeta // return, none, converted, nullable carg0 = (*C.GstBuffer)(UnsafeBufferToGlibNone(buffer)) if reference != nil { @@ -35524,7 +36420,9 @@ func (buffer *Buffer) GetReferenceTimestampMeta(reference *Caps) *ReferenceTimes var goret *ReferenceTimestampMeta - goret = UnsafeReferenceTimestampMetaFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeReferenceTimestampMetaFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -35833,7 +36731,7 @@ func (buffer *Buffer) NMemory() uint { // // The function returns the following values: // -// - goret *Memory +// - goret *Memory (nullable) // // Gets the memory block at @idx in @buffer. The memory block stays valid until // the memory block in @buffer is removed, replaced or merged, typically with @@ -35841,7 +36739,7 @@ func (buffer *Buffer) NMemory() uint { func (buffer *Buffer) PeekMemory(idx uint) *Memory { var carg0 *C.GstBuffer // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.GstMemory // return, borrow, converted + var cret *C.GstMemory // return, borrow, converted, nullable carg0 = (*C.GstBuffer)(UnsafeBufferToGlibNone(buffer)) carg1 = C.guint(idx) @@ -35852,8 +36750,10 @@ func (buffer *Buffer) PeekMemory(idx uint) *Memory { var goret *Memory - goret = UnsafeMemoryFromGlibBorrow(unsafe.Pointer(cret)) - runtime.AddCleanup(goret, func(_ *Buffer) {}, buffer) + if cret != nil { + goret = UnsafeMemoryFromGlibBorrow(unsafe.Pointer(cret)) + runtime.AddCleanup(goret, func(_ *Buffer) {}, buffer) + } return goret } @@ -36414,7 +37314,7 @@ func (list *BufferList) ForEach(fn BufferListFunc) bool { // // The function returns the following values: // -// - goret *Buffer +// - goret *Buffer (nullable) // // Gets the buffer at @idx. // @@ -36423,7 +37323,7 @@ func (list *BufferList) ForEach(fn BufferListFunc) bool { func (list *BufferList) Get(idx uint) *Buffer { var carg0 *C.GstBufferList // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.GstBuffer // return, borrow, converted + var cret *C.GstBuffer // return, borrow, converted, nullable carg0 = (*C.GstBufferList)(UnsafeBufferListToGlibNone(list)) carg1 = C.guint(idx) @@ -36434,8 +37334,10 @@ func (list *BufferList) Get(idx uint) *Buffer { var goret *Buffer - goret = UnsafeBufferFromGlibBorrow(unsafe.Pointer(cret)) - runtime.AddCleanup(goret, func(_ *BufferList) {}, list) + if cret != nil { + goret = UnsafeBufferFromGlibBorrow(unsafe.Pointer(cret)) + runtime.AddCleanup(goret, func(_ *BufferList) {}, list) + } return goret } @@ -36448,7 +37350,7 @@ func (list *BufferList) Get(idx uint) *Buffer { // // The function returns the following values: // -// - goret *Buffer +// - goret *Buffer (nullable) // // Gets the buffer at @idx, ensuring it is a writable buffer. // @@ -36457,7 +37359,7 @@ func (list *BufferList) Get(idx uint) *Buffer { func (list *BufferList) GetWritable(idx uint) *Buffer { var carg0 *C.GstBufferList // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.GstBuffer // return, borrow, converted + var cret *C.GstBuffer // return, borrow, converted, nullable carg0 = (*C.GstBufferList)(UnsafeBufferListToGlibNone(list)) carg1 = C.guint(idx) @@ -36468,8 +37370,10 @@ func (list *BufferList) GetWritable(idx uint) *Buffer { var goret *Buffer - goret = UnsafeBufferFromGlibBorrow(unsafe.Pointer(cret)) - runtime.AddCleanup(goret, func(_ *BufferList) {}, list) + if cret != nil { + goret = UnsafeBufferFromGlibBorrow(unsafe.Pointer(cret)) + runtime.AddCleanup(goret, func(_ *BufferList) {}, list) + } return goret } @@ -36989,7 +37893,7 @@ func NewCapsEmptySimple(mediaType string) *Caps { // // The function returns the following values: // -// - goret *Caps +// - goret *Caps (nullable) // // Converts @caps from a string representation. // @@ -36997,7 +37901,7 @@ func NewCapsEmptySimple(mediaType string) *Caps { // 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 + var cret *C.GstCaps // return, full, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(str))) defer C.free(unsafe.Pointer(carg1)) @@ -37007,7 +37911,9 @@ func CapsFromString(str string) *Caps { var goret *Caps - goret = UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -37275,7 +38181,7 @@ func (caps *Caps) ForEach(fn CapsForEachFunc) bool { // // The function returns the following values: // -// - goret *CapsFeatures +// - goret *CapsFeatures (nullable) // // Finds the features in @caps at @index, and returns it. // @@ -37290,7 +38196,7 @@ func (caps *Caps) ForEach(fn CapsForEachFunc) bool { func (caps *Caps) GetFeatures(index uint) *CapsFeatures { var carg0 *C.GstCaps // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.GstCapsFeatures // return, none, converted + var cret *C.GstCapsFeatures // return, none, converted, nullable carg0 = (*C.GstCaps)(UnsafeCapsToGlibNone(caps)) carg1 = C.guint(index) @@ -37301,7 +38207,9 @@ func (caps *Caps) GetFeatures(index uint) *CapsFeatures { var goret *CapsFeatures - goret = UnsafeCapsFeaturesFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeCapsFeaturesFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -38078,14 +38986,14 @@ func (caps *Caps) Simplify() *Caps { // // The function returns the following values: // -// - goret *Structure +// - goret *Structure (nullable) // // Retrieves the structure with the given index from the list of structures // contained in @caps. The caller becomes the owner of the returned structure. func (caps *Caps) StealStructure(index uint) *Structure { var carg0 *C.GstCaps // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.GstStructure // return, full, converted + var cret *C.GstStructure // return, full, converted, nullable carg0 = (*C.GstCaps)(UnsafeCapsToGlibNone(caps)) carg1 = C.guint(index) @@ -38096,7 +39004,9 @@ func (caps *Caps) StealStructure(index uint) *Structure { var goret *Structure - goret = UnsafeStructureFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeStructureFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -38364,12 +39274,12 @@ func NewCapsFeaturesSingle(feature string) *CapsFeatures { // // The function returns the following values: // -// - goret *CapsFeatures +// - goret *CapsFeatures (nullable) // // 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 + var cret *C.GstCapsFeatures // return, full, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(features))) defer C.free(unsafe.Pointer(carg1)) @@ -38379,7 +39289,9 @@ func CapsFeaturesFromString(features string) *CapsFeatures { var goret *CapsFeatures - goret = UnsafeCapsFeaturesFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeCapsFeaturesFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -38518,13 +39430,13 @@ func (features *CapsFeatures) Copy() *CapsFeatures { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Returns the @i-th feature of @features. 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 + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstCapsFeatures)(UnsafeCapsFeaturesToGlibNone(features)) carg1 = C.guint(i) @@ -38535,7 +39447,9 @@ func (features *CapsFeatures) GetNth(i uint) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -39553,7 +40467,7 @@ func UnsafeDateTimeToGlibFull(d *DateTime) unsafe.Pointer { // // The function returns the following values: // -// - goret *DateTime +// - goret *DateTime (nullable) // // Creates a new #GstDateTime using the date and times in the gregorian calendar // in the supplied timezone. @@ -39577,7 +40491,7 @@ func NewDateTime(tzoffset float32, year int, month int, day int, hour int, minut var carg5 C.gint // in, none, casted var carg6 C.gint // in, none, casted var carg7 C.gdouble // in, none, casted - var cret *C.GstDateTime // return, full, converted + var cret *C.GstDateTime // return, full, converted, nullable carg1 = C.gfloat(tzoffset) carg2 = C.gint(year) @@ -39598,7 +40512,9 @@ func NewDateTime(tzoffset float32, year int, month int, day int, hour int, minut var goret *DateTime - goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -39611,12 +40527,12 @@ func NewDateTime(tzoffset float32, year int, month int, day int, hour int, minut // // The function returns the following values: // -// - goret *DateTime +// - goret *DateTime (nullable) // // Creates a new #GstDateTime from a #GDateTime object. func NewDateTimeFromGDateTime(dt *glib.DateTime) *DateTime { var carg1 *C.GDateTime // in, full, converted, nullable - var cret *C.GstDateTime // return, full, converted + var cret *C.GstDateTime // return, full, converted, nullable if dt != nil { carg1 = (*C.GDateTime)(glib.UnsafeDateTimeToGlibFull(dt)) @@ -39627,7 +40543,9 @@ func NewDateTimeFromGDateTime(dt *glib.DateTime) *DateTime { var goret *DateTime - goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -39640,7 +40558,7 @@ func NewDateTimeFromGDateTime(dt *glib.DateTime) *DateTime { // // The function returns the following values: // -// - goret *DateTime +// - goret *DateTime (nullable) // // Tries to parse common variants of ISO-8601 datetime strings into a // #GstDateTime. Possible input formats are (for example): @@ -39652,7 +40570,7 @@ func NewDateTimeFromGDateTime(dt *glib.DateTime) *DateTime { // provided (if any), otherwise UTC. func NewDateTimeFromISO8601String(str string) *DateTime { var carg1 *C.gchar // in, none, string - var cret *C.GstDateTime // return, full, converted + var cret *C.GstDateTime // return, full, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(str))) defer C.free(unsafe.Pointer(carg1)) @@ -39662,7 +40580,9 @@ func NewDateTimeFromISO8601String(str string) *DateTime { var goret *DateTime - goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -39675,13 +40595,13 @@ func NewDateTimeFromISO8601String(str string) *DateTime { // // The function returns the following values: // -// - goret *DateTime +// - goret *DateTime (nullable) // // Creates a new #GstDateTime using the time since Jan 1, 1970 specified by // @secs. The #GstDateTime is in the local timezone. func NewDateTimeFromUnixEpochLocalTime(secs int64) *DateTime { var carg1 C.gint64 // in, none, casted - var cret *C.GstDateTime // return, full, converted + var cret *C.GstDateTime // return, full, converted, nullable carg1 = C.gint64(secs) @@ -39690,7 +40610,9 @@ func NewDateTimeFromUnixEpochLocalTime(secs int64) *DateTime { var goret *DateTime - goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -39703,13 +40625,13 @@ func NewDateTimeFromUnixEpochLocalTime(secs int64) *DateTime { // // The function returns the following values: // -// - goret *DateTime +// - goret *DateTime (nullable) // // Creates a new #GstDateTime using the time since Jan 1, 1970 specified by // @usecs. The #GstDateTime is in the local timezone. func NewDateTimeFromUnixEpochLocalTimeUsecs(usecs int64) *DateTime { var carg1 C.gint64 // in, none, casted - var cret *C.GstDateTime // return, full, converted + var cret *C.GstDateTime // return, full, converted, nullable carg1 = C.gint64(usecs) @@ -39718,7 +40640,9 @@ func NewDateTimeFromUnixEpochLocalTimeUsecs(usecs int64) *DateTime { var goret *DateTime - goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -39731,13 +40655,13 @@ func NewDateTimeFromUnixEpochLocalTimeUsecs(usecs int64) *DateTime { // // The function returns the following values: // -// - goret *DateTime +// - goret *DateTime (nullable) // // Creates a new #GstDateTime using the time since Jan 1, 1970 specified by // @secs. The #GstDateTime is in the UTC timezone. func NewDateTimeFromUnixEpochUTC(secs int64) *DateTime { var carg1 C.gint64 // in, none, casted - var cret *C.GstDateTime // return, full, converted + var cret *C.GstDateTime // return, full, converted, nullable carg1 = C.gint64(secs) @@ -39746,7 +40670,9 @@ func NewDateTimeFromUnixEpochUTC(secs int64) *DateTime { var goret *DateTime - goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -39759,13 +40685,13 @@ func NewDateTimeFromUnixEpochUTC(secs int64) *DateTime { // // The function returns the following values: // -// - goret *DateTime +// - goret *DateTime (nullable) // // Creates a new #GstDateTime using the time since Jan 1, 1970 specified by // @usecs. The #GstDateTime is in UTC. func NewDateTimeFromUnixEpochUTCUsecs(usecs int64) *DateTime { var carg1 C.gint64 // in, none, casted - var cret *C.GstDateTime // return, full, converted + var cret *C.GstDateTime // return, full, converted, nullable carg1 = C.gint64(usecs) @@ -39774,7 +40700,9 @@ func NewDateTimeFromUnixEpochUTCUsecs(usecs int64) *DateTime { var goret *DateTime - goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -39792,7 +40720,7 @@ func NewDateTimeFromUnixEpochUTCUsecs(usecs int64) *DateTime { // // The function returns the following values: // -// - goret *DateTime +// - goret *DateTime (nullable) // // Creates a new #GstDateTime using the date and times in the gregorian calendar // in the local timezone. @@ -39816,7 +40744,7 @@ func NewDateTimeLocalTime(year int, month int, day int, hour int, minute int, se var carg4 C.gint // in, none, casted var carg5 C.gint // in, none, casted var carg6 C.gdouble // in, none, casted - var cret *C.GstDateTime // return, full, converted + var cret *C.GstDateTime // return, full, converted, nullable carg1 = C.gint(year) carg2 = C.gint(month) @@ -39835,7 +40763,9 @@ func NewDateTimeLocalTime(year int, month int, day int, hour int, minute int, se var goret *DateTime - goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -39843,17 +40773,19 @@ func NewDateTimeLocalTime(year int, month int, day int, hour int, minute int, se // NewDateTimeNowLocalTime wraps gst_date_time_new_now_local_time // The function returns the following values: // -// - goret *DateTime +// - goret *DateTime (nullable) // // Creates a new #GstDateTime representing the current date and time. func NewDateTimeNowLocalTime() *DateTime { - var cret *C.GstDateTime // return, full, converted + var cret *C.GstDateTime // return, full, converted, nullable cret = C.gst_date_time_new_now_local_time() var goret *DateTime - goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -39861,18 +40793,20 @@ func NewDateTimeNowLocalTime() *DateTime { // NewDateTimeNowUTC wraps gst_date_time_new_now_utc // The function returns the following values: // -// - goret *DateTime +// - goret *DateTime (nullable) // // Creates a new #GstDateTime that represents the current instant at Universal // coordinated time. func NewDateTimeNowUTC() *DateTime { - var cret *C.GstDateTime // return, full, converted + var cret *C.GstDateTime // return, full, converted, nullable cret = C.gst_date_time_new_now_utc() var goret *DateTime - goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -39885,7 +40819,7 @@ func NewDateTimeNowUTC() *DateTime { // // The function returns the following values: // -// - goret *DateTime +// - goret *DateTime (nullable) // // Creates a new #GstDateTime using the date and times in the gregorian calendar // in the local timezone. @@ -39893,7 +40827,7 @@ func NewDateTimeNowUTC() *DateTime { // @year should be from 1 to 9999. func NewDateTimeY(year int) *DateTime { var carg1 C.gint // in, none, casted - var cret *C.GstDateTime // return, full, converted + var cret *C.GstDateTime // return, full, converted, nullable carg1 = C.gint(year) @@ -39902,7 +40836,9 @@ func NewDateTimeY(year int) *DateTime { var goret *DateTime - goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -39916,7 +40852,7 @@ func NewDateTimeY(year int) *DateTime { // // The function returns the following values: // -// - goret *DateTime +// - goret *DateTime (nullable) // // Creates a new #GstDateTime using the date and times in the gregorian calendar // in the local timezone. @@ -39928,7 +40864,7 @@ func NewDateTimeY(year int) *DateTime { func NewDateTimeYM(year int, month int) *DateTime { var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted - var cret *C.GstDateTime // return, full, converted + var cret *C.GstDateTime // return, full, converted, nullable carg1 = C.gint(year) carg2 = C.gint(month) @@ -39939,7 +40875,9 @@ func NewDateTimeYM(year int, month int) *DateTime { var goret *DateTime - goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -39954,7 +40892,7 @@ func NewDateTimeYM(year int, month int) *DateTime { // // The function returns the following values: // -// - goret *DateTime +// - goret *DateTime (nullable) // // Creates a new #GstDateTime using the date and times in the gregorian calendar // in the local timezone. @@ -39970,7 +40908,7 @@ func NewDateTimeYmd(year int, month int, day int) *DateTime { var carg1 C.gint // in, none, casted var carg2 C.gint // in, none, casted var carg3 C.gint // in, none, casted - var cret *C.GstDateTime // return, full, converted + var cret *C.GstDateTime // return, full, converted, nullable carg1 = C.gint(year) carg2 = C.gint(month) @@ -39983,7 +40921,9 @@ func NewDateTimeYmd(year int, month int, day int) *DateTime { var goret *DateTime - goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -40285,12 +41225,12 @@ func (datetime *DateTime) HasYear() bool { // ToGDateTime wraps gst_date_time_to_g_date_time // The function returns the following values: // -// - goret *glib.DateTime +// - goret *glib.DateTime (nullable) // // Creates a new #GDateTime from a fully defined #GstDateTime object. func (datetime *DateTime) ToGDateTime() *glib.DateTime { var carg0 *C.GstDateTime // in, none, converted - var cret *C.GDateTime // return, full, converted + var cret *C.GDateTime // return, full, converted, nullable carg0 = (*C.GstDateTime)(UnsafeDateTimeToGlibNone(datetime)) @@ -40299,7 +41239,9 @@ func (datetime *DateTime) ToGDateTime() *glib.DateTime { var goret *glib.DateTime - goret = glib.UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = glib.UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -40307,14 +41249,14 @@ func (datetime *DateTime) ToGDateTime() *glib.DateTime { // ToISO8601String wraps gst_date_time_to_iso8601_string // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Create a minimal string compatible with ISO-8601. Possible output formats // are (for example): `2012`, `2012-06`, `2012-06-23`, `2012-06-23T23:30Z`, // `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 + var cret *C.gchar // return, full, string, nullable-string carg0 = (*C.GstDateTime)(UnsafeDateTimeToGlibNone(datetime)) @@ -40323,8 +41265,10 @@ func (datetime *DateTime) ToISO8601String() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -40584,13 +41528,13 @@ func UnsafeDebugMessageToGlibFull(d *DebugMessage) unsafe.Pointer { // Get wraps gst_debug_message_get // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Gets the string representation of a #GstDebugMessage. This function is used // 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 + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstDebugMessage)(UnsafeDebugMessageToGlibNone(message)) @@ -40599,7 +41543,9 @@ func (message *DebugMessage) Get() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -40607,13 +41553,13 @@ func (message *DebugMessage) Get() string { // GetID wraps gst_debug_message_get_id // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Get the id of the object that emitted this message. This function is used in // debug handlers. Can be empty. func (message *DebugMessage) GetID() string { var carg0 *C.GstDebugMessage // in, none, converted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstDebugMessage)(UnsafeDebugMessageToGlibNone(message)) @@ -40622,7 +41568,9 @@ func (message *DebugMessage) GetID() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -40875,13 +41823,13 @@ func (klass *DeviceProviderClass) AddStaticMetadata(key string, value string) { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstDeviceProviderClass)(UnsafeDeviceProviderClassToGlibNone(klass)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -40893,7 +41841,9 @@ func (klass *DeviceProviderClass) GetMetadata(key string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -41334,7 +42284,7 @@ func (klass *ElementClass) GetMetadata(key string) string { // // The function returns the following values: // -// - goret PadTemplate +// - goret PadTemplate (nullable) // // Retrieves a padtemplate from @element_class with the given name. // > If you use this function in the GInstanceInitFunc of an object class @@ -41343,7 +42293,7 @@ func (klass *ElementClass) GetMetadata(key string) string { func (elementClass *ElementClass) GetPadTemplate(name string) PadTemplate { var carg0 *C.GstElementClass // in, none, converted var carg1 *C.gchar // in, none, string - var cret *C.GstPadTemplate // return, none, converted + var cret *C.GstPadTemplate // return, none, converted, nullable carg0 = (*C.GstElementClass)(UnsafeElementClassToGlibNone(elementClass)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -41355,7 +42305,9 @@ func (elementClass *ElementClass) GetPadTemplate(name string) PadTemplate { var goret PadTemplate - goret = UnsafePadTemplateFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePadTemplateFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -42784,12 +43736,12 @@ func (event *Event) GetSeqnum() uint32 { // GetStructure wraps gst_event_get_structure // The function returns the following values: // -// - goret *Structure +// - goret *Structure (nullable) // // Access the structure of the event. func (event *Event) GetStructure() *Structure { var carg0 *C.GstEvent // in, none, converted - var cret *C.GstStructure // return, none, converted + var cret *C.GstStructure // return, none, converted, nullable carg0 = (*C.GstEvent)(UnsafeEventToGlibNone(event)) @@ -42798,7 +43750,9 @@ func (event *Event) GetStructure() *Structure { var goret *Structure - goret = UnsafeStructureFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeStructureFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -44268,7 +45222,7 @@ func UnsafeMemoryToGlibFull(m *Memory) unsafe.Pointer { // // The function returns the following values: // -// - goret *Memory +// - goret *Memory (nullable) // // Return a copy of @size bytes from @mem starting from @offset. This copy is // guaranteed to be writable. @size can be set to -1 to return a copy @@ -44277,7 +45231,7 @@ func (mem *Memory) Copy(offset int, size int) *Memory { var carg0 *C.GstMemory // in, none, converted var carg1 C.gssize // in, none, casted var carg2 C.gssize // in, none, casted - var cret *C.GstMemory // return, full, converted + var cret *C.GstMemory // return, full, converted, nullable carg0 = (*C.GstMemory)(UnsafeMemoryToGlibNone(mem)) carg1 = C.gssize(offset) @@ -44290,7 +45244,9 @@ func (mem *Memory) Copy(offset int, size int) *Memory { var goret *Memory - goret = UnsafeMemoryFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeMemoryFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -46371,12 +47327,12 @@ func (message *Message) GetSeqnum() uint32 { // GetStructure wraps gst_message_get_structure // The function returns the following values: // -// - goret *Structure +// - goret *Structure (nullable) // // Access the structure of the message. func (message *Message) GetStructure() *Structure { var carg0 *C.GstMessage // in, none, converted - var cret *C.GstStructure // return, borrow, converted + var cret *C.GstStructure // return, borrow, converted, nullable carg0 = (*C.GstMessage)(UnsafeMessageToGlibNone(message)) @@ -46385,8 +47341,10 @@ func (message *Message) GetStructure() *Structure { var goret *Structure - goret = UnsafeStructureFromGlibBorrow(unsafe.Pointer(cret)) - runtime.AddCleanup(goret, func(_ *Message) {}, message) + if cret != nil { + goret = UnsafeStructureFromGlibBorrow(unsafe.Pointer(cret)) + runtime.AddCleanup(goret, func(_ *Message) {}, message) + } return goret } @@ -47845,13 +48803,13 @@ func (message *Message) StreamsSelectedGetSize() uint { // // The function returns the following values: // -// - goret Stream +// - goret Stream (nullable) // // Retrieves the #GstStream with index @index from the @message. func (message *Message) StreamsSelectedGetStream(idx uint) Stream { var carg0 *C.GstMessage // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.GstStream // return, full, converted + var cret *C.GstStream // return, full, converted, nullable carg0 = (*C.GstMessage)(UnsafeMessageToGlibNone(message)) carg1 = C.guint(idx) @@ -47862,7 +48820,9 @@ func (message *Message) StreamsSelectedGetStream(idx uint) Stream { var goret Stream - goret = UnsafeStreamFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeStreamFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -48076,7 +49036,7 @@ func MetaApiTypeRegister(api string, tags []string) gobject.Type { // The function returns the following values: // // - consumed uint32: total size used by this meta, could be less than @size -// - goret *Meta +// - goret *Meta (nullable) // // Recreate a #GstMeta from serialized data returned by // gst_meta_serialize() and add it to @buffer. @@ -48092,7 +49052,7 @@ func MetaDeserialize(buffer *Buffer, data *uint8, size uint) (uint32, *Meta) { 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 + var cret *C.GstMeta // return, none, converted, nullable carg1 = (*C.GstBuffer)(UnsafeBufferToGlibNone(buffer)) _ = data @@ -48109,7 +49069,9 @@ func MetaDeserialize(buffer *Buffer, data *uint8, size uint) (uint32, *Meta) { var goret *Meta consumed = uint32(carg4) - goret = UnsafeMetaFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeMetaFromGlibNone(unsafe.Pointer(cret)) + } return consumed, goret } @@ -48122,13 +49084,13 @@ func MetaDeserialize(buffer *Buffer, data *uint8, size uint) (uint32, *Meta) { // // The function returns the following values: // -// - goret *MetaInfo +// - goret *MetaInfo (nullable) // // 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 + var cret *C.GstMetaInfo // return, none, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(impl))) defer C.free(unsafe.Pointer(carg1)) @@ -48138,7 +49100,9 @@ func MetaGetInfo(impl string) *MetaInfo { var goret *MetaInfo - goret = UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeMetaInfoFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -48864,10 +49828,10 @@ func UnsafePadProbeInfoToGlibFull(p *PadProbeInfo) unsafe.Pointer { // GetBuffer wraps gst_pad_probe_info_get_buffer // The function returns the following values: // -// - goret *Buffer +// - goret *Buffer (nullable) func (info *PadProbeInfo) GetBuffer() *Buffer { var carg0 *C.GstPadProbeInfo // in, none, converted - var cret *C.GstBuffer // return, none, converted + var cret *C.GstBuffer // return, none, converted, nullable carg0 = (*C.GstPadProbeInfo)(UnsafePadProbeInfoToGlibNone(info)) @@ -48876,7 +49840,9 @@ func (info *PadProbeInfo) GetBuffer() *Buffer { var goret *Buffer - goret = UnsafeBufferFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeBufferFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -48884,10 +49850,10 @@ func (info *PadProbeInfo) GetBuffer() *Buffer { // GetBufferList wraps gst_pad_probe_info_get_buffer_list // The function returns the following values: // -// - goret *BufferList +// - goret *BufferList (nullable) func (info *PadProbeInfo) GetBufferList() *BufferList { var carg0 *C.GstPadProbeInfo // in, none, converted - var cret *C.GstBufferList // return, none, converted + var cret *C.GstBufferList // return, none, converted, nullable carg0 = (*C.GstPadProbeInfo)(UnsafePadProbeInfoToGlibNone(info)) @@ -48896,7 +49862,9 @@ func (info *PadProbeInfo) GetBufferList() *BufferList { var goret *BufferList - goret = UnsafeBufferListFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeBufferListFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -48904,10 +49872,10 @@ func (info *PadProbeInfo) GetBufferList() *BufferList { // GetEvent wraps gst_pad_probe_info_get_event // The function returns the following values: // -// - goret *Event +// - goret *Event (nullable) func (info *PadProbeInfo) GetEvent() *Event { var carg0 *C.GstPadProbeInfo // in, none, converted - var cret *C.GstEvent // return, none, converted + var cret *C.GstEvent // return, none, converted, nullable carg0 = (*C.GstPadProbeInfo)(UnsafePadProbeInfoToGlibNone(info)) @@ -48916,7 +49884,9 @@ func (info *PadProbeInfo) GetEvent() *Event { var goret *Event - goret = UnsafeEventFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeEventFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -48924,10 +49894,10 @@ func (info *PadProbeInfo) GetEvent() *Event { // GetQuery wraps gst_pad_probe_info_get_query // The function returns the following values: // -// - goret *Query +// - goret *Query (nullable) func (info *PadProbeInfo) GetQuery() *Query { var carg0 *C.GstPadProbeInfo // in, none, converted - var cret *C.GstQuery // return, none, converted + var cret *C.GstQuery // return, none, converted, nullable carg0 = (*C.GstPadProbeInfo)(UnsafePadProbeInfoToGlibNone(info)) @@ -48936,7 +49906,9 @@ func (info *PadProbeInfo) GetQuery() *Query { var goret *Query - goret = UnsafeQueryFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeQueryFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -49290,20 +50262,22 @@ func UnsafeParseContextToGlibFull(p *ParseContext) unsafe.Pointer { // NewParseContext wraps gst_parse_context_new // The function returns the following values: // -// - goret *ParseContext +// - goret *ParseContext (nullable) // // Allocates a parse context for use with gst_parse_launch_full() or // gst_parse_launchv_full(). // // Free-function: gst_parse_context_free func NewParseContext() *ParseContext { - var cret *C.GstParseContext // return, full, converted + var cret *C.GstParseContext // return, full, converted, nullable cret = C.gst_parse_context_new() var goret *ParseContext - goret = UnsafeParseContextFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeParseContextFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -49311,12 +50285,12 @@ func NewParseContext() *ParseContext { // Copy wraps gst_parse_context_copy // The function returns the following values: // -// - goret *ParseContext +// - goret *ParseContext (nullable) // // Copies the @context. func (_context *ParseContext) Copy() *ParseContext { var carg0 *C.GstParseContext // in, none, converted - var cret *C.GstParseContext // return, full, converted + var cret *C.GstParseContext // return, full, converted, nullable carg0 = (*C.GstParseContext)(UnsafeParseContextToGlibNone(_context)) @@ -49325,7 +50299,9 @@ func (_context *ParseContext) Copy() *ParseContext { var goret *ParseContext - goret = UnsafeParseContextFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeParseContextFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -49333,14 +50309,14 @@ func (_context *ParseContext) Copy() *ParseContext { // GetMissingElements wraps gst_parse_context_get_missing_elements // The function returns the following values: // -// - goret []string +// - goret []string (nullable) // // Retrieve missing elements from a previous run of gst_parse_launch_full() // or gst_parse_launchv_full(). Will only return results if an error code // of %GST_PARSE_ERROR_NO_SUCH_ELEMENT was returned. func (_context *ParseContext) GetMissingElements() []string { var carg0 *C.GstParseContext // in, none, converted - var cret **C.gchar // return, transfer: full, C Pointers: 2, Name: array[utf8], scope: , array (inner: *typesystem.StringPrimitive, zero-terminated) + var cret **C.gchar // return, transfer: full, C Pointers: 2, Name: array[utf8], scope: , nullable, array (inner: *typesystem.StringPrimitive, zero-terminated) carg0 = (*C.GstParseContext)(UnsafeParseContextToGlibNone(_context)) @@ -50590,13 +51566,13 @@ func (promise *Promise) Expire() { // GetReply wraps gst_promise_get_reply // The function returns the following values: // -// - goret *Structure +// - goret *Structure (nullable) // // Retrieve the reply set on @promise. @promise must be in // %GST_PROMISE_RESULT_REPLIED and the returned structure is owned by @promise func (promise *Promise) GetReply() *Structure { var carg0 *C.GstPromise // in, none, converted - var cret *C.GstStructure // return, none, converted + var cret *C.GstStructure // return, none, converted, nullable carg0 = (*C.GstPromise)(UnsafePromiseToGlibNone(promise)) @@ -50605,7 +51581,9 @@ func (promise *Promise) GetReply() *Structure { var goret *Structure - goret = UnsafeStructureFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeStructureFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -51727,12 +52705,12 @@ func (query *Query) GetNSchedulingModes() uint { // GetStructure wraps gst_query_get_structure // The function returns the following values: // -// - goret *Structure +// - goret *Structure (nullable) // // Get the structure of a query. func (query *Query) GetStructure() *Structure { var carg0 *C.GstQuery // in, none, converted - var cret *C.GstStructure // return, borrow, converted + var cret *C.GstStructure // return, borrow, converted, nullable carg0 = (*C.GstQuery)(UnsafeQueryToGlibNone(query)) @@ -51741,8 +52719,10 @@ func (query *Query) GetStructure() *Structure { var goret *Structure - goret = UnsafeStructureFromGlibBorrow(unsafe.Pointer(cret)) - runtime.AddCleanup(goret, func(_ *Query) {}, query) + if cret != nil { + goret = UnsafeStructureFromGlibBorrow(unsafe.Pointer(cret)) + runtime.AddCleanup(goret, func(_ *Query) {}, query) + } return goret } @@ -53654,12 +54634,12 @@ func NewSample(buffer *Buffer, caps *Caps, segment *Segment, info *Structure) *S // GetBuffer wraps gst_sample_get_buffer // The function returns the following values: // -// - goret *Buffer +// - goret *Buffer (nullable) // // Get the buffer associated with @sample func (sample *Sample) GetBuffer() *Buffer { var carg0 *C.GstSample // in, none, converted - var cret *C.GstBuffer // return, borrow, converted + var cret *C.GstBuffer // return, borrow, converted, nullable carg0 = (*C.GstSample)(UnsafeSampleToGlibNone(sample)) @@ -53668,8 +54648,10 @@ func (sample *Sample) GetBuffer() *Buffer { var goret *Buffer - goret = UnsafeBufferFromGlibBorrow(unsafe.Pointer(cret)) - runtime.AddCleanup(goret, func(_ *Sample) {}, sample) + if cret != nil { + goret = UnsafeBufferFromGlibBorrow(unsafe.Pointer(cret)) + runtime.AddCleanup(goret, func(_ *Sample) {}, sample) + } return goret } @@ -53677,12 +54659,12 @@ func (sample *Sample) GetBuffer() *Buffer { // GetBufferList wraps gst_sample_get_buffer_list // The function returns the following values: // -// - goret *BufferList +// - goret *BufferList (nullable) // // Get the buffer list associated with @sample func (sample *Sample) GetBufferList() *BufferList { var carg0 *C.GstSample // in, none, converted - var cret *C.GstBufferList // return, borrow, converted + var cret *C.GstBufferList // return, borrow, converted, nullable carg0 = (*C.GstSample)(UnsafeSampleToGlibNone(sample)) @@ -53691,8 +54673,10 @@ func (sample *Sample) GetBufferList() *BufferList { var goret *BufferList - goret = UnsafeBufferListFromGlibBorrow(unsafe.Pointer(cret)) - runtime.AddCleanup(goret, func(_ *Sample) {}, sample) + if cret != nil { + goret = UnsafeBufferListFromGlibBorrow(unsafe.Pointer(cret)) + runtime.AddCleanup(goret, func(_ *Sample) {}, sample) + } return goret } @@ -53700,12 +54684,12 @@ func (sample *Sample) GetBufferList() *BufferList { // GetCaps wraps gst_sample_get_caps // The function returns the following values: // -// - goret *Caps +// - goret *Caps (nullable) // // Get the caps associated with @sample func (sample *Sample) GetCaps() *Caps { var carg0 *C.GstSample // in, none, converted - var cret *C.GstCaps // return, borrow, converted + var cret *C.GstCaps // return, borrow, converted, nullable carg0 = (*C.GstSample)(UnsafeSampleToGlibNone(sample)) @@ -53714,8 +54698,10 @@ func (sample *Sample) GetCaps() *Caps { var goret *Caps - goret = UnsafeCapsFromGlibBorrow(unsafe.Pointer(cret)) - runtime.AddCleanup(goret, func(_ *Sample) {}, sample) + if cret != nil { + goret = UnsafeCapsFromGlibBorrow(unsafe.Pointer(cret)) + runtime.AddCleanup(goret, func(_ *Sample) {}, sample) + } return goret } @@ -53723,12 +54709,12 @@ func (sample *Sample) GetCaps() *Caps { // GetInfo wraps gst_sample_get_info // The function returns the following values: // -// - goret *Structure +// - goret *Structure (nullable) // // Get extra information associated with @sample. func (sample *Sample) GetInfo() *Structure { var carg0 *C.GstSample // in, none, converted - var cret *C.GstStructure // return, borrow, converted + var cret *C.GstStructure // return, borrow, converted, nullable carg0 = (*C.GstSample)(UnsafeSampleToGlibNone(sample)) @@ -53737,8 +54723,10 @@ func (sample *Sample) GetInfo() *Structure { var goret *Structure - goret = UnsafeStructureFromGlibBorrow(unsafe.Pointer(cret)) - runtime.AddCleanup(goret, func(_ *Sample) {}, sample) + if cret != nil { + goret = UnsafeStructureFromGlibBorrow(unsafe.Pointer(cret)) + runtime.AddCleanup(goret, func(_ *Sample) {}, sample) + } return goret } @@ -54889,12 +55877,12 @@ func (staticCaps *StaticCaps) Cleanup() { // Get wraps gst_static_caps_get // The function returns the following values: // -// - goret *Caps +// - goret *Caps (nullable) // // Converts a #GstStaticCaps to a #GstCaps. func (staticCaps *StaticCaps) Get() *Caps { var carg0 *C.GstStaticCaps // in, none, converted - var cret *C.GstCaps // return, full, converted + var cret *C.GstCaps // return, full, converted, nullable carg0 = (*C.GstStaticCaps)(UnsafeStaticCapsToGlibNone(staticCaps)) @@ -54903,7 +55891,9 @@ func (staticCaps *StaticCaps) Get() *Caps { var goret *Caps - goret = UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -54985,12 +55975,12 @@ func UnsafeStaticPadTemplateToGlibFull(s *StaticPadTemplate) unsafe.Pointer { // Get wraps gst_static_pad_template_get // The function returns the following values: // -// - goret PadTemplate +// - goret PadTemplate (nullable) // // Converts a #GstStaticPadTemplate into a #GstPadTemplate. func (padTemplate *StaticPadTemplate) Get() PadTemplate { var carg0 *C.GstStaticPadTemplate // in, none, converted - var cret *C.GstPadTemplate // return, none, converted + var cret *C.GstPadTemplate // return, none, converted, nullable carg0 = (*C.GstStaticPadTemplate)(UnsafeStaticPadTemplateToGlibNone(padTemplate)) @@ -54999,7 +55989,9 @@ func (padTemplate *StaticPadTemplate) Get() PadTemplate { var goret PadTemplate - goret = UnsafePadTemplateFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePadTemplateFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -55335,7 +56327,7 @@ func UnsafeStructureToGlibFull(s *Structure) unsafe.Pointer { // // The function returns the following values: // -// - goret *Structure +// - goret *Structure (nullable) // // Creates a #GstStructure from a string representation. // If end is not %NULL, a pointer to the place inside the given string @@ -55345,7 +56337,7 @@ func UnsafeStructureToGlibFull(s *Structure) unsafe.Pointer { func StructureFromString(str string) *Structure { var carg1 *C.gchar // in, none, string var carg2 *C.gchar // skipped - var cret *C.GstStructure // return, full, converted + var cret *C.GstStructure // return, full, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(str))) defer C.free(unsafe.Pointer(carg1)) @@ -55355,7 +56347,9 @@ func StructureFromString(str string) *Structure { var goret *Structure - goret = UnsafeStructureFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeStructureFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -55400,7 +56394,7 @@ func NewStructureEmpty(name string) *Structure { // // The function returns the following values: // -// - goret *Structure +// - goret *Structure (nullable) // // Creates a #GstStructure from a string representation. // If end is not %NULL, a pointer to the place inside the given string @@ -55414,7 +56408,7 @@ func NewStructureEmpty(name string) *Structure { // Free-function: gst_structure_free func NewStructureFromString(str string) *Structure { var carg1 *C.gchar // in, none, string - var cret *C.GstStructure // return, full, converted + var cret *C.GstStructure // return, full, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(str))) defer C.free(unsafe.Pointer(carg1)) @@ -55424,7 +56418,9 @@ func NewStructureFromString(str string) *Structure { var goret *Structure - goret = UnsafeStructureFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeStructureFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -56319,7 +57315,7 @@ func (structure *Structure) GetNameID() glib.Quark { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Finds the field corresponding to @fieldname, and returns the string // contained in the field's value. Caller is responsible for making @@ -56330,7 +57326,7 @@ func (structure *Structure) GetNameID() glib.Quark { func (structure *Structure) GetString(fieldname string) string { var carg0 *C.GstStructure // in, none, converted var carg1 *C.gchar // in, none, string - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(fieldname))) @@ -56342,7 +57338,9 @@ func (structure *Structure) GetString(fieldname string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -56629,13 +57627,13 @@ func (structure *Structure) IDSetValue(field glib.Quark, value *gobject.Value) { // // The function returns the following values: // -// - goret *Structure +// - goret *Structure (nullable) // // Intersects @struct1 and @struct2 and returns the intersection. func (struct1 *Structure) Intersect(struct2 *Structure) *Structure { var carg0 *C.GstStructure // in, none, converted var carg1 *C.GstStructure // in, none, converted - var cret *C.GstStructure // return, full, converted + var cret *C.GstStructure // return, full, converted, nullable carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(struct1)) carg1 = (*C.GstStructure)(UnsafeStructureToGlibNone(struct2)) @@ -56646,7 +57644,9 @@ func (struct1 *Structure) Intersect(struct2 *Structure) *Structure { var goret *Structure - goret = UnsafeStructureFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeStructureFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -56891,14 +57891,14 @@ func (structure *Structure) Serialize(flags SerializeFlags) string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Alias for gst_structure_serialize() but with nullable annotation because it // can return %NULL when %GST_SERIALIZE_FLAG_STRICT flag is set. 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 + var cret *C.gchar // return, full, string, nullable-string carg0 = (*C.GstStructure)(UnsafeStructureToGlibNone(structure)) carg1 = C.GstSerializeFlags(flags) @@ -56909,8 +57909,10 @@ func (structure *Structure) SerializeFull(flags SerializeFlags) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -57173,12 +58175,12 @@ func NewTagListEmpty() *TagList { // // The function returns the following values: // -// - goret *TagList +// - goret *TagList (nullable) // // Deserializes a tag list. func NewTagListFromString(str string) *TagList { var carg1 *C.gchar // in, none, string - var cret *C.GstTagList // return, full, converted + var cret *C.GstTagList // return, full, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(str))) defer C.free(unsafe.Pointer(carg1)) @@ -57188,7 +58190,9 @@ func NewTagListFromString(str string) *TagList { var goret *TagList - goret = UnsafeTagListFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeTagListFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -58298,7 +59302,7 @@ func (list1 *TagList) IsEqual(list2 *TagList) bool { // // The function returns the following values: // -// - goret *TagList +// - goret *TagList (nullable) // // Merges the two given lists into a new list. If one of the lists is %NULL, a // copy of the other is returned. If both lists are %NULL, %NULL is returned. @@ -58308,7 +59312,7 @@ func (list1 *TagList) Merge(list2 *TagList, mode TagMergeMode) *TagList { var carg0 *C.GstTagList // in, none, converted var carg1 *C.GstTagList // in, none, converted, nullable var carg2 C.GstTagMergeMode // in, none, casted - var cret *C.GstTagList // return, full, converted + var cret *C.GstTagList // return, full, converted, nullable carg0 = (*C.GstTagList)(UnsafeTagListToGlibNone(list1)) if list2 != nil { @@ -58323,7 +59327,9 @@ func (list1 *TagList) Merge(list2 *TagList, mode TagMergeMode) *TagList { var goret *TagList - goret = UnsafeTagListFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeTagListFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -58917,13 +59923,13 @@ func (toc *Toc) Dump() { // // The function returns the following values: // -// - goret *TocEntry +// - goret *TocEntry (nullable) // // 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 - var cret *C.GstTocEntry // return, none, converted + var cret *C.GstTocEntry // return, none, converted, nullable carg0 = (*C.GstToc)(UnsafeTocToGlibNone(toc)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uid))) @@ -58935,7 +59941,9 @@ func (toc *Toc) FindEntry(uid string) *TocEntry { var goret *TocEntry - goret = UnsafeTocEntryFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeTocEntryFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -58992,12 +60000,12 @@ func (toc *Toc) GetScope() TocScope { // GetTags wraps gst_toc_get_tags // The function returns the following values: // -// - goret *TagList +// - goret *TagList (nullable) // // Gets the tags for @toc. func (toc *Toc) GetTags() *TagList { var carg0 *C.GstToc // in, none, converted - var cret *C.GstTagList // return, none, converted + var cret *C.GstTagList // return, none, converted, nullable carg0 = (*C.GstToc)(UnsafeTocToGlibNone(toc)) @@ -59006,7 +60014,9 @@ func (toc *Toc) GetTags() *TagList { var goret *TagList - goret = UnsafeTagListFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeTagListFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -59240,12 +60250,12 @@ func (entry *TocEntry) GetLoop() (TocLoopType, int, bool) { // GetParent wraps gst_toc_entry_get_parent // The function returns the following values: // -// - goret *TocEntry +// - goret *TocEntry (nullable) // // Gets the parent #GstTocEntry of @entry. func (entry *TocEntry) GetParent() *TocEntry { var carg0 *C.GstTocEntry // in, none, converted - var cret *C.GstTocEntry // return, none, converted + var cret *C.GstTocEntry // return, none, converted, nullable carg0 = (*C.GstTocEntry)(UnsafeTocEntryToGlibNone(entry)) @@ -59254,7 +60264,9 @@ func (entry *TocEntry) GetParent() *TocEntry { var goret *TocEntry - goret = UnsafeTocEntryFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeTocEntryFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -59326,12 +60338,12 @@ func (entry *TocEntry) GetSubEntries() []*TocEntry { // GetTags wraps gst_toc_entry_get_tags // The function returns the following values: // -// - goret *TagList +// - goret *TagList (nullable) // // Gets the tags for @entry. func (entry *TocEntry) GetTags() *TagList { var carg0 *C.GstTocEntry // in, none, converted - var cret *C.GstTagList // return, none, converted + var cret *C.GstTagList // return, none, converted, nullable carg0 = (*C.GstTocEntry)(UnsafeTocEntryToGlibNone(entry)) @@ -59340,7 +60352,9 @@ func (entry *TocEntry) GetTags() *TagList { var goret *TagList - goret = UnsafeTagListFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeTagListFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -59348,12 +60362,12 @@ func (entry *TocEntry) GetTags() *TagList { // GetToc wraps gst_toc_entry_get_toc // The function returns the following values: // -// - goret *Toc +// - goret *Toc (nullable) // // Gets the parent #GstToc of @entry. func (entry *TocEntry) GetToc() *Toc { var carg0 *C.GstTocEntry // in, none, converted - var cret *C.GstToc // return, none, converted + var cret *C.GstToc // return, none, converted, nullable carg0 = (*C.GstTocEntry)(UnsafeTocEntryToGlibNone(entry)) @@ -59362,7 +60376,9 @@ func (entry *TocEntry) GetToc() *Toc { var goret *Toc - goret = UnsafeTocFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeTocFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -59938,7 +60954,7 @@ func (find *TypeFind) GetLength() uint64 { // // The function returns the following values: // -// - goret *uint8 +// - goret *uint8 (nullable) // // Returns the @size bytes of the stream to identify beginning at offset. If // offset is a positive number, the offset is relative to the beginning of the @@ -59949,7 +60965,7 @@ func (find *TypeFind) Peek(offset int64, size uint) *uint8 { var carg0 *C.GstTypeFind // in, none, converted var carg1 C.gint64 // in, none, casted var carg2 C.guint // in, none, casted - var cret *C.guint8 // return, transfer: none, C Pointers: 1, Name: guint8, scope: + var cret *C.guint8 // return, transfer: none, C Pointers: 1, Name: guint8, scope: , nullable, nullable carg0 = (*C.GstTypeFind)(UnsafeTypeFindToGlibNone(find)) carg1 = C.gint64(offset) @@ -59962,9 +60978,11 @@ func (find *TypeFind) Peek(offset int64, size uint) *uint8 { var goret *uint8 - _ = goret - _ = cret - panic("unimplemented conversion of *uint8 (guint8*)") + if cret != nil { + _ = goret + _ = cret + panic("unimplemented conversion of *uint8 (guint8*)") + } return goret } @@ -60341,13 +61359,13 @@ func UriConstruct(protocol string, location string) string { // // The function returns the following values: // -// - goret *Uri +// - goret *Uri (nullable) // // 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 + var cret *C.GstUri // return, full, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri))) defer C.free(unsafe.Pointer(carg1)) @@ -60357,7 +61375,9 @@ func UriFromString(uri string) *Uri { var goret *Uri - goret = UnsafeUriFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeUriFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -60370,7 +61390,7 @@ func UriFromString(uri string) *Uri { // // The function returns the following values: // -// - goret *Uri +// - goret *Uri (nullable) // // 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 @@ -60387,7 +61407,7 @@ func UriFromString(uri string) *Uri { // 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 + var cret *C.GstUri // return, full, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri))) defer C.free(unsafe.Pointer(carg1)) @@ -60397,7 +61417,9 @@ func UriFromStringEscaped(uri string) *Uri { var goret *Uri - goret = UnsafeUriFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeUriFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -60410,7 +61432,7 @@ func UriFromStringEscaped(uri string) *Uri { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 @@ -60420,7 +61442,7 @@ func UriFromStringEscaped(uri string) *Uri { // Free-function: g_free func UriGetLocation(uri string) string { var carg1 *C.gchar // in, none, string - var cret *C.gchar // return, full, string + var cret *C.gchar // return, full, string, nullable-string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri))) defer C.free(unsafe.Pointer(carg1)) @@ -60430,8 +61452,10 @@ func UriGetLocation(uri string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -60444,13 +61468,13 @@ func UriGetLocation(uri string) string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 + var cret *C.gchar // return, full, string, nullable-string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri))) defer C.free(unsafe.Pointer(carg1)) @@ -60460,8 +61484,10 @@ func UriGetProtocol(uri string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -60541,14 +61567,14 @@ func UriIsValid(uri string) bool { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 + var cret *C.gchar // return, full, string, nullable-string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(baseUri))) defer C.free(unsafe.Pointer(carg1)) @@ -60561,8 +61587,10 @@ func UriJoinStrings(baseUri string, refUri string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -60747,13 +61775,13 @@ func (first *Uri) Equal(second *Uri) bool { // // The function returns the following values: // -// - goret *Uri +// - goret *Uri (nullable) // // 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 - var cret *C.GstUri // return, full, converted + var cret *C.GstUri // return, full, converted, nullable carg0 = (*C.GstUri)(UnsafeUriToGlibNone(base)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri))) @@ -60765,7 +61793,9 @@ func (base *Uri) FromStringWithBase(uri string) *Uri { var goret *Uri - goret = UnsafeUriFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeUriFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -60773,13 +61803,13 @@ func (base *Uri) FromStringWithBase(uri string) *Uri { // GetFragment wraps gst_uri_get_fragment // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Get the fragment name from the URI or %NULL if it doesn't exist. // 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 + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) @@ -60788,7 +61818,9 @@ func (uri *Uri) GetFragment() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -60796,13 +61828,13 @@ func (uri *Uri) GetFragment() string { // GetHost wraps gst_uri_get_host // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Get the host name from the URI or %NULL if it doesn't exist. // 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 + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) @@ -60811,7 +61843,9 @@ func (uri *Uri) GetHost() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -60819,12 +61853,12 @@ func (uri *Uri) GetHost() string { // GetPath wraps gst_uri_get_path // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 + var cret *C.gchar // return, full, string, nullable-string carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) @@ -60833,8 +61867,10 @@ func (uri *Uri) GetPath() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -60872,12 +61908,12 @@ func (uri *Uri) GetPathSegments() []string { // GetPathString wraps gst_uri_get_path_string // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 + var cret *C.gchar // return, full, string, nullable-string carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) @@ -60886,8 +61922,10 @@ func (uri *Uri) GetPathString() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -60947,12 +61985,12 @@ func (uri *Uri) GetQueryKeys() []string { // GetQueryString wraps gst_uri_get_query_string // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 + var cret *C.gchar // return, full, string, nullable-string carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) @@ -60961,8 +61999,10 @@ func (uri *Uri) GetQueryString() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -60975,7 +62015,7 @@ func (uri *Uri) GetQueryString() string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Get the value associated with the @query_key key. Will return %NULL if the // key has no value or if the key does not exist in the URI query table. Because @@ -60985,7 +62025,7 @@ func (uri *Uri) GetQueryString() string { func (uri *Uri) GetQueryValue(queryKey string) string { var carg0 *C.GstUri // in, none, converted var carg1 *C.gchar // in, none, string - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(queryKey))) @@ -60997,7 +62037,9 @@ func (uri *Uri) GetQueryValue(queryKey string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -61005,13 +62047,13 @@ func (uri *Uri) GetQueryValue(queryKey string) string { // GetScheme wraps gst_uri_get_scheme // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Get the scheme name from the URI or %NULL if it doesn't exist. // 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 + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) @@ -61020,7 +62062,9 @@ func (uri *Uri) GetScheme() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -61028,13 +62072,13 @@ func (uri *Uri) GetScheme() string { // GetUserinfo wraps gst_uri_get_userinfo // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Get the userinfo (usually in the form "username:password") from the URI // 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 + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstUri)(UnsafeUriToGlibNone(uri)) @@ -61043,7 +62087,9 @@ func (uri *Uri) GetUserinfo() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -61112,7 +62158,7 @@ func (uri *Uri) IsWritable() bool { // // The function returns the following values: // -// - goret *Uri +// - goret *Uri (nullable) // // Join a reference URI onto a base URI using the method from RFC 3986. // If either URI is %NULL then the other URI will be returned with the ref count @@ -61120,7 +62166,7 @@ func (uri *Uri) IsWritable() bool { func (baseUri *Uri) Join(refUri *Uri) *Uri { var carg0 *C.GstUri // in, none, converted var carg1 *C.GstUri // in, none, converted, nullable - var cret *C.GstUri // return, full, converted + var cret *C.GstUri // return, full, converted, nullable carg0 = (*C.GstUri)(UnsafeUriToGlibNone(baseUri)) if refUri != nil { @@ -61133,7 +62179,9 @@ func (baseUri *Uri) Join(refUri *Uri) *Uri { var goret *Uri - goret = UnsafeUriFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeUriFromGlibFull(unsafe.Pointer(cret)) + } return goret } diff --git a/pkg/gst/mapinfo.go b/pkg/gst/mapinfo.go index 2c8c397..ed5686b 100644 --- a/pkg/gst/mapinfo.go +++ b/pkg/gst/mapinfo.go @@ -14,61 +14,6 @@ import ( // #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. // @@ -82,6 +27,11 @@ type MapInfo struct { readOffset int64 } +// clearAutoCleanup clears the finalizer to prevent automatic unmapping +func (m *MapInfo) clearAutoCleanup() { + runtime.SetFinalizer(m.mapInfo, nil) +} + func (m *MapInfo) autoCleanup() { runtime.SetFinalizer( m.mapInfo, @@ -196,11 +146,18 @@ func (info *mapInfo) unmap() { } } +// Reset resets the read/write offsets to 0. +func (info *MapInfo) Reset() { + info.readOffset = 0 + info.writeOffset = 0 +} + // Unmap Releases the memory previously mapped. +// The MapInfo is invalid after this call. func (info *MapInfo) Unmap() { + info.clearAutoCleanup() info.mapInfo.unmap() info.mapInfo = nil - runtime.SetFinalizer(info, nil) } // Length returns the length of the mapped memory. @@ -218,9 +175,6 @@ func (info *MapInfo) Data() []byte { if info.mapInfo == nil { return nil } - if !info.Flags().Has(MapRead) { - return nil - } return unsafe.Slice((*byte)(info.mapInfo.native.data), info.mapInfo.native.size) } diff --git a/pkg/gstallocators/gstallocators.gen.go b/pkg/gstallocators/gstallocators.gen.go index 150344c..0d07f5f 100644 --- a/pkg/gstallocators/gstallocators.gen.go +++ b/pkg/gstallocators/gstallocators.gen.go @@ -451,14 +451,14 @@ func UnsafeDRMDumbAllocatorToGlibFull(c DRMDumbAllocator) unsafe.Pointer { // // The function returns the following values: // -// - goret gst.Allocator +// - goret gst.Allocator (nullable) // // Creates a new #GstDRMDumbAllocator for the specific device path. This // 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 - var cret *C.GstAllocator // return, full, converted + var cret *C.GstAllocator // return, full, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(drmDevicePath))) defer C.free(unsafe.Pointer(carg1)) @@ -468,7 +468,9 @@ func NewDRMDumbAllocatorWithDevicePath(drmDevicePath string) gst.Allocator { var goret gst.Allocator - goret = gst.UnsafeAllocatorFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeAllocatorFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -481,14 +483,14 @@ func NewDRMDumbAllocatorWithDevicePath(drmDevicePath string) gst.Allocator { // // The function returns the following values: // -// - goret gst.Allocator +// - goret gst.Allocator (nullable) // // Creates a new #GstDRMDumbAllocator for the specific file desciptor. This // function can fail if the file descriptor is not a DRM device or if // the DRM device does not support DUMB allocation. func NewDRMDumbAllocatorWithFd(drmFd int) gst.Allocator { var carg1 C.gint // in, none, casted - var cret *C.GstAllocator // return, full, converted + var cret *C.GstAllocator // return, full, converted, nullable carg1 = C.gint(drmFd) @@ -497,7 +499,9 @@ func NewDRMDumbAllocatorWithFd(drmFd int) gst.Allocator { var goret gst.Allocator - goret = gst.UnsafeAllocatorFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeAllocatorFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -656,7 +660,7 @@ func NewFdAllocator() gst.Allocator { // // The function returns the following values: // -// - goret *gst.Memory +// - goret *gst.Memory (nullable) // // Return a %GstMemory that wraps a generic file descriptor. func FdAllocatorAlloc(allocator gst.Allocator, fd int, size uint, flags FdMemoryFlags) *gst.Memory { @@ -664,7 +668,7 @@ func FdAllocatorAlloc(allocator gst.Allocator, fd int, size uint, flags FdMemory var carg2 C.gint // in, none, casted var carg3 C.gsize // in, none, casted var carg4 C.GstFdMemoryFlags // in, none, casted - var cret *C.GstMemory // return, full, converted + var cret *C.GstMemory // return, full, converted, nullable carg1 = (*C.GstAllocator)(gst.UnsafeAllocatorToGlibNone(allocator)) carg2 = C.gint(fd) @@ -679,7 +683,9 @@ func FdAllocatorAlloc(allocator gst.Allocator, fd int, size uint, flags FdMemory var goret *gst.Memory - goret = gst.UnsafeMemoryFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeMemoryFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -753,18 +759,20 @@ func UnsafeShmAllocatorToGlibFull(c ShmAllocator) unsafe.Pointer { // ShmAllocatorGet wraps gst_shm_allocator_get // The function returns the following values: // -// - goret gst.Allocator +// - goret gst.Allocator (nullable) // // Get the #GstShmAllocator singleton previously registered with // gst_shm_allocator_init_once(). func ShmAllocatorGet() gst.Allocator { - var cret *C.GstAllocator // return, full, converted + var cret *C.GstAllocator // return, full, converted, nullable cret = C.gst_shm_allocator_get() var goret gst.Allocator - goret = gst.UnsafeAllocatorFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeAllocatorFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -864,14 +872,14 @@ func NewDmaBufAllocator() gst.Allocator { // // The function returns the following values: // -// - goret *gst.Memory +// - goret *gst.Memory (nullable) // // Return a %GstMemory that wraps a dmabuf file descriptor. func DmaBufAllocatorAlloc(allocator gst.Allocator, fd int, size uint) *gst.Memory { var carg1 *C.GstAllocator // in, none, converted var carg2 C.gint // in, none, casted var carg3 C.gsize // in, none, casted - var cret *C.GstMemory // return, full, converted + var cret *C.GstMemory // return, full, converted, nullable carg1 = (*C.GstAllocator)(gst.UnsafeAllocatorToGlibNone(allocator)) carg2 = C.gint(fd) @@ -884,7 +892,9 @@ func DmaBufAllocatorAlloc(allocator gst.Allocator, fd int, size uint) *gst.Memor var goret *gst.Memory - goret = gst.UnsafeMemoryFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeMemoryFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -900,7 +910,7 @@ func DmaBufAllocatorAlloc(allocator gst.Allocator, fd int, size uint) *gst.Memor // // The function returns the following values: // -// - goret *gst.Memory +// - goret *gst.Memory (nullable) // // Return a %GstMemory that wraps a dmabuf file descriptor. func DmaBufAllocatorAllocWithFlags(allocator gst.Allocator, fd int, size uint, flags FdMemoryFlags) *gst.Memory { @@ -908,7 +918,7 @@ func DmaBufAllocatorAllocWithFlags(allocator gst.Allocator, fd int, size uint, f var carg2 C.gint // in, none, casted var carg3 C.gsize // in, none, casted var carg4 C.GstFdMemoryFlags // in, none, casted - var cret *C.GstMemory // return, full, converted + var cret *C.GstMemory // return, full, converted, nullable carg1 = (*C.GstAllocator)(gst.UnsafeAllocatorToGlibNone(allocator)) carg2 = C.gint(fd) @@ -923,7 +933,9 @@ func DmaBufAllocatorAllocWithFlags(allocator gst.Allocator, fd int, size uint, f var goret *gst.Memory - goret = gst.UnsafeMemoryFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeMemoryFromGlibFull(unsafe.Pointer(cret)) + } return goret } diff --git a/pkg/gstapp/gstapp.gen.go b/pkg/gstapp/gstapp.gen.go index c4ca338..278f0aa 100644 --- a/pkg/gstapp/gstapp.gen.go +++ b/pkg/gstapp/gstapp.gen.go @@ -181,7 +181,7 @@ type AppSink interface { // GetCaps wraps gst_app_sink_get_caps // The function returns the following values: // - // - goret *gst.Caps + // - goret *gst.Caps (nullable) // // Get the configured caps on @appsink. GetCaps() *gst.Caps @@ -243,7 +243,7 @@ type AppSink interface { // PullPreroll wraps gst_app_sink_pull_preroll // The function returns the following values: // - // - goret *gst.Sample + // - goret *gst.Sample (nullable) // // Get the last preroll sample in @appsink. This was the sample that caused the // appsink to preroll in the PAUSED state. @@ -267,7 +267,7 @@ type AppSink interface { // PullSample wraps gst_app_sink_pull_sample // The function returns the following values: // - // - goret *gst.Sample + // - goret *gst.Sample (nullable) // // This function blocks until a sample or EOS becomes available or the appsink // element is set to the READY/NULL state. @@ -371,7 +371,7 @@ type AppSink interface { // // The function returns the following values: // - // - goret *gst.Sample + // - goret *gst.Sample (nullable) // // Get the last preroll sample in @appsink. This was the sample that caused the // appsink to preroll in the PAUSED state. @@ -401,7 +401,7 @@ type AppSink interface { // // The function returns the following values: // - // - goret *gst.Sample + // - goret *gst.Sample (nullable) // // This function blocks until a sample or EOS becomes available or the appsink // element is set to the READY/NULL state or the timeout expires. @@ -653,12 +653,12 @@ func (appsink *AppSinkInstance) GetBufferListSupport() bool { // GetCaps wraps gst_app_sink_get_caps // The function returns the following values: // -// - goret *gst.Caps +// - goret *gst.Caps (nullable) // // Get the configured caps on @appsink. func (appsink *AppSinkInstance) GetCaps() *gst.Caps { var carg0 *C.GstAppSink // in, none, converted - var cret *C.GstCaps // return, full, converted + var cret *C.GstCaps // return, full, converted, nullable carg0 = (*C.GstAppSink)(UnsafeAppSinkToGlibNone(appsink)) @@ -667,7 +667,9 @@ func (appsink *AppSinkInstance) GetCaps() *gst.Caps { var goret *gst.Caps - goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -843,7 +845,7 @@ func (appsink *AppSinkInstance) IsEos() bool { // PullPreroll wraps gst_app_sink_pull_preroll // The function returns the following values: // -// - goret *gst.Sample +// - goret *gst.Sample (nullable) // // Get the last preroll sample in @appsink. This was the sample that caused the // appsink to preroll in the PAUSED state. @@ -865,7 +867,7 @@ func (appsink *AppSinkInstance) IsEos() bool { // element is set to the READY/NULL state. func (appsink *AppSinkInstance) PullPreroll() *gst.Sample { var carg0 *C.GstAppSink // in, none, converted - var cret *C.GstSample // return, full, converted + var cret *C.GstSample // return, full, converted, nullable carg0 = (*C.GstAppSink)(UnsafeAppSinkToGlibNone(appsink)) @@ -874,7 +876,9 @@ func (appsink *AppSinkInstance) PullPreroll() *gst.Sample { var goret *gst.Sample - goret = gst.UnsafeSampleFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeSampleFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -882,7 +886,7 @@ func (appsink *AppSinkInstance) PullPreroll() *gst.Sample { // PullSample wraps gst_app_sink_pull_sample // The function returns the following values: // -// - goret *gst.Sample +// - goret *gst.Sample (nullable) // // This function blocks until a sample or EOS becomes available or the appsink // element is set to the READY/NULL state. @@ -897,7 +901,7 @@ func (appsink *AppSinkInstance) PullPreroll() *gst.Sample { // %NULL. Use gst_app_sink_is_eos () to check for the EOS condition. func (appsink *AppSinkInstance) PullSample() *gst.Sample { var carg0 *C.GstAppSink // in, none, converted - var cret *C.GstSample // return, full, converted + var cret *C.GstSample // return, full, converted, nullable carg0 = (*C.GstAppSink)(UnsafeAppSinkToGlibNone(appsink)) @@ -906,7 +910,9 @@ func (appsink *AppSinkInstance) PullSample() *gst.Sample { var goret *gst.Sample - goret = gst.UnsafeSampleFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeSampleFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1099,7 +1105,7 @@ func (appsink *AppSinkInstance) SetWaitOnEos(wait bool) { // // The function returns the following values: // -// - goret *gst.Sample +// - goret *gst.Sample (nullable) // // Get the last preroll sample in @appsink. This was the sample that caused the // appsink to preroll in the PAUSED state. @@ -1123,7 +1129,7 @@ func (appsink *AppSinkInstance) SetWaitOnEos(wait bool) { func (appsink *AppSinkInstance) TryPullPreroll(timeout gst.ClockTime) *gst.Sample { var carg0 *C.GstAppSink // in, none, converted var carg1 C.GstClockTime // in, none, casted, alias - var cret *C.GstSample // return, full, converted + var cret *C.GstSample // return, full, converted, nullable carg0 = (*C.GstAppSink)(UnsafeAppSinkToGlibNone(appsink)) carg1 = C.GstClockTime(timeout) @@ -1134,7 +1140,9 @@ func (appsink *AppSinkInstance) TryPullPreroll(timeout gst.ClockTime) *gst.Sampl var goret *gst.Sample - goret = gst.UnsafeSampleFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeSampleFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1147,7 +1155,7 @@ func (appsink *AppSinkInstance) TryPullPreroll(timeout gst.ClockTime) *gst.Sampl // // The function returns the following values: // -// - goret *gst.Sample +// - goret *gst.Sample (nullable) // // This function blocks until a sample or EOS becomes available or the appsink // element is set to the READY/NULL state or the timeout expires. @@ -1164,7 +1172,7 @@ func (appsink *AppSinkInstance) TryPullPreroll(timeout gst.ClockTime) *gst.Sampl func (appsink *AppSinkInstance) TryPullSample(timeout gst.ClockTime) *gst.Sample { var carg0 *C.GstAppSink // in, none, converted var carg1 C.GstClockTime // in, none, casted, alias - var cret *C.GstSample // return, full, converted + var cret *C.GstSample // return, full, converted, nullable carg0 = (*C.GstAppSink)(UnsafeAppSinkToGlibNone(appsink)) carg1 = C.GstClockTime(timeout) @@ -1175,7 +1183,9 @@ func (appsink *AppSinkInstance) TryPullSample(timeout gst.ClockTime) *gst.Sample var goret *gst.Sample - goret = gst.UnsafeSampleFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeSampleFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1456,7 +1466,7 @@ type AppSrc interface { // GetCaps wraps gst_app_src_get_caps // The function returns the following values: // - // - goret *gst.Caps + // - goret *gst.Caps (nullable) // // Get the configured caps on @appsrc. GetCaps() *gst.Caps @@ -1845,12 +1855,12 @@ func (appsrc *AppSrcInstance) EndOfStream() gst.FlowReturn { // GetCaps wraps gst_app_src_get_caps // The function returns the following values: // -// - goret *gst.Caps +// - goret *gst.Caps (nullable) // // Get the configured caps on @appsrc. func (appsrc *AppSrcInstance) GetCaps() *gst.Caps { var carg0 *C.GstAppSrc // in, none, converted - var cret *C.GstCaps // return, full, converted + var cret *C.GstCaps // return, full, converted, nullable carg0 = (*C.GstAppSrc)(UnsafeAppSrcToGlibNone(appsrc)) @@ -1859,7 +1869,9 @@ func (appsrc *AppSrcInstance) GetCaps() *gst.Caps { var goret *gst.Caps - goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return goret } diff --git a/pkg/gstaudio/gstaudio.gen.go b/pkg/gstaudio/gstaudio.gen.go index a7ada5a..218de72 100644 --- a/pkg/gstaudio/gstaudio.gen.go +++ b/pkg/gstaudio/gstaudio.gen.go @@ -820,6 +820,127 @@ func (e AudioFormat) String() string { } } +// AudioFormatBuildInteger wraps gst_audio_format_build_integer +// +// The function takes the following parameters: +// +// - sign bool: signed or unsigned format +// - endianness int: G_LITTLE_ENDIAN or G_BIG_ENDIAN +// - width int: amount of bits used per sample +// - depth int: amount of used bits in @width +// +// The function returns the following values: +// +// - goret AudioFormat +// +// Construct a #GstAudioFormat with given parameters. +func AudioFormatBuildInteger(sign bool, endianness int, width int, depth int) AudioFormat { + var carg1 C.gboolean // in + var carg2 C.gint // in, none, casted + var carg3 C.gint // in, none, casted + var carg4 C.gint // in, none, casted + var cret C.GstAudioFormat // return, none, casted + + if sign { + carg1 = C.TRUE + } + carg2 = C.gint(endianness) + carg3 = C.gint(width) + carg4 = C.gint(depth) + + cret = C.gst_audio_format_build_integer(carg1, carg2, carg3, carg4) + runtime.KeepAlive(sign) + runtime.KeepAlive(endianness) + runtime.KeepAlive(width) + runtime.KeepAlive(depth) + + var goret AudioFormat + + goret = AudioFormat(cret) + + return goret +} + +// AudioFormatFromString wraps gst_audio_format_from_string +// +// The function takes the following parameters: +// +// - format string: a format string +// +// The function returns the following values: +// +// - goret AudioFormat +// +// Convert the @format string to its #GstAudioFormat. +func AudioFormatFromString(format string) AudioFormat { + var carg1 *C.gchar // in, none, string + var cret C.GstAudioFormat // return, none, casted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(format))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_audio_format_from_string(carg1) + runtime.KeepAlive(format) + + var goret AudioFormat + + goret = AudioFormat(cret) + + return goret +} + +// AudioFormatGetInfo wraps gst_audio_format_get_info +// +// The function takes the following parameters: +// +// - format AudioFormat: a #GstAudioFormat +// +// The function returns the following values: +// +// - goret *AudioFormatInfo +// +// Get the #GstAudioFormatInfo for @format +func AudioFormatGetInfo(format AudioFormat) *AudioFormatInfo { + var carg1 C.GstAudioFormat // in, none, casted + var cret *C.GstAudioFormatInfo // return, none, converted + + carg1 = C.GstAudioFormat(format) + + cret = C.gst_audio_format_get_info(carg1) + runtime.KeepAlive(format) + + var goret *AudioFormatInfo + + goret = UnsafeAudioFormatInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + +// AudioFormatToString wraps gst_audio_format_to_string +// +// The function takes the following parameters: +// +// - format AudioFormat +// +// The function returns the following values: +// +// - goret string +func AudioFormatToString(format AudioFormat) string { + var carg1 C.GstAudioFormat // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstAudioFormat(format) + + cret = C.gst_audio_format_to_string(carg1) + runtime.KeepAlive(format) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + // AudioLayout wraps GstAudioLayout // // Layout of the audio samples for the different channels. @@ -1263,6 +1384,87 @@ func (e DsdFormat) String() string { } } +// DsdFormatFromString wraps gst_dsd_format_from_string +// +// The function takes the following parameters: +// +// - str string: a DSD format string +// +// The function returns the following values: +// +// - goret DsdFormat +// +// Convert the DSD format string @str to its #GstDsdFormat. +func DsdFormatFromString(str string) DsdFormat { + var carg1 *C.gchar // in, none, string + var cret C.GstDsdFormat // return, none, casted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(str))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_dsd_format_from_string(carg1) + runtime.KeepAlive(str) + + var goret DsdFormat + + goret = DsdFormat(cret) + + return goret +} + +// DsdFormatGetWidth wraps gst_dsd_format_get_width +// +// The function takes the following parameters: +// +// - format DsdFormat: a #GstDsdFormat +// +// The function returns the following values: +// +// - goret uint +func DsdFormatGetWidth(format DsdFormat) uint { + var carg1 C.GstDsdFormat // in, none, casted + var cret C.guint // return, none, casted + + carg1 = C.GstDsdFormat(format) + + cret = C.gst_dsd_format_get_width(carg1) + runtime.KeepAlive(format) + + var goret uint + + goret = uint(cret) + + return goret +} + +// DsdFormatToString wraps gst_dsd_format_to_string +// +// The function takes the following parameters: +// +// - format DsdFormat: a #GstDsdFormat +// +// The function returns the following values: +// +// - goret string +// +// Returns a string containing a descriptive name for +// the #GstDsdFormat if there is one, or NULL otherwise. +func DsdFormatToString(format DsdFormat) string { + var carg1 C.GstDsdFormat // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstDsdFormat(format) + + cret = C.gst_dsd_format_to_string(carg1) + runtime.KeepAlive(format) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + // StreamVolumeFormat wraps GstStreamVolumeFormat // // Different representations of a stream volume. gst_stream_volume_convert_volume() @@ -2332,14 +2534,14 @@ func BufferAddAudioDownmixMeta(buffer *gst.Buffer, fromPosition []AudioChannelPo // // The function returns the following values: // -// - goret *AudioLevelMeta +// - goret *AudioLevelMeta (nullable) // // Attaches audio level information to @buffer. (RFC 6464) func BufferAddAudioLevelMeta(buffer *gst.Buffer, level uint8, voiceActivity bool) *AudioLevelMeta { var carg1 *C.GstBuffer // in, none, converted var carg2 C.guint8 // in, none, casted var carg3 C.gboolean // in - var cret *C.GstAudioLevelMeta // return, none, converted + var cret *C.GstAudioLevelMeta // return, none, converted, nullable carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) carg2 = C.guint8(level) @@ -2354,7 +2556,9 @@ func BufferAddAudioLevelMeta(buffer *gst.Buffer, level uint8, voiceActivity bool var goret *AudioLevelMeta - goret = UnsafeAudioLevelMetaFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeAudioLevelMetaFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -2530,12 +2734,12 @@ func BufferGetAudioDownmixMetaForChannels(buffer *gst.Buffer, toPosition []Audio // // The function returns the following values: // -// - goret *AudioLevelMeta +// - goret *AudioLevelMeta (nullable) // // Find the #GstAudioLevelMeta on @buffer. func BufferGetAudioLevelMeta(buffer *gst.Buffer) *AudioLevelMeta { var carg1 *C.GstBuffer // in, none, converted - var cret *C.GstAudioLevelMeta // return, none, converted + var cret *C.GstAudioLevelMeta // return, none, converted, nullable carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) @@ -2544,7 +2748,9 @@ func BufferGetAudioLevelMeta(buffer *gst.Buffer) *AudioLevelMeta { var goret *AudioLevelMeta - goret = UnsafeAudioLevelMetaFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeAudioLevelMetaFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -3075,7 +3281,7 @@ type AudioBaseSink interface { // CreateRingbuffer wraps gst_audio_base_sink_create_ringbuffer // The function returns the following values: // - // - goret AudioRingBuffer + // - goret AudioRingBuffer (nullable) // // Create and return the #GstAudioRingBuffer for @sink. This function will // call the ::create_ringbuffer vmethod and will set @sink as the parent of @@ -3230,14 +3436,14 @@ func UnsafeAudioBaseSinkToGlibFull(c AudioBaseSink) unsafe.Pointer { // CreateRingbuffer wraps gst_audio_base_sink_create_ringbuffer // The function returns the following values: // -// - goret AudioRingBuffer +// - goret AudioRingBuffer (nullable) // // Create and return the #GstAudioRingBuffer for @sink. This function will // call the ::create_ringbuffer vmethod and will set @sink as the parent of // the returned buffer (see gst_object_set_parent()). func (sink *AudioBaseSinkInstance) CreateRingbuffer() AudioRingBuffer { var carg0 *C.GstAudioBaseSink // in, none, converted - var cret *C.GstAudioRingBuffer // return, none, converted + var cret *C.GstAudioRingBuffer // return, none, converted, nullable carg0 = (*C.GstAudioBaseSink)(UnsafeAudioBaseSinkToGlibNone(sink)) @@ -3246,7 +3452,9 @@ func (sink *AudioBaseSinkInstance) CreateRingbuffer() AudioRingBuffer { var goret AudioRingBuffer - goret = UnsafeAudioRingBufferFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeAudioRingBufferFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -3530,7 +3738,7 @@ type AudioBaseSrc interface { // CreateRingbuffer wraps gst_audio_base_src_create_ringbuffer // The function returns the following values: // - // - goret AudioRingBuffer + // - goret AudioRingBuffer (nullable) // // Create and return the #GstAudioRingBuffer for @src. This function will call // the ::create_ringbuffer vmethod and will set @src as the parent of the @@ -3618,14 +3826,14 @@ func UnsafeAudioBaseSrcToGlibFull(c AudioBaseSrc) unsafe.Pointer { // CreateRingbuffer wraps gst_audio_base_src_create_ringbuffer // The function returns the following values: // -// - goret AudioRingBuffer +// - goret AudioRingBuffer (nullable) // // Create and return the #GstAudioRingBuffer for @src. This function will call // the ::create_ringbuffer vmethod and will set @src as the parent of the // returned buffer (see gst_object_set_parent()). func (src *AudioBaseSrcInstance) CreateRingbuffer() AudioRingBuffer { var carg0 *C.GstAudioBaseSrc // in, none, converted - var cret *C.GstAudioRingBuffer // return, none, converted + var cret *C.GstAudioRingBuffer // return, none, converted, nullable carg0 = (*C.GstAudioBaseSrc)(UnsafeAudioBaseSrcToGlibNone(src)) @@ -3634,7 +3842,9 @@ func (src *AudioBaseSrcInstance) CreateRingbuffer() AudioRingBuffer { var goret AudioRingBuffer - goret = UnsafeAudioRingBufferFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeAudioRingBufferFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -8427,7 +8637,7 @@ func UnsafeAudioBufferToGlibFull(a *AudioBuffer) unsafe.Pointer { // // The function returns the following values: // -// - goret *gst.Buffer +// - goret *gst.Buffer (nullable) // // Clip the buffer to the given %GstSegment. // @@ -8438,7 +8648,7 @@ func AudioBufferClip(buffer *gst.Buffer, segment *gst.Segment, rate int, bpf int 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 + var cret *C.GstBuffer // return, full, converted, nullable carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibFull(buffer)) carg2 = (*C.GstSegment)(gst.UnsafeSegmentToGlibNone(segment)) @@ -8453,7 +8663,9 @@ func AudioBufferClip(buffer *gst.Buffer, segment *gst.Segment, rate int, bpf int var goret *gst.Buffer - goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -9105,7 +9317,7 @@ func UnsafeAudioConverterToGlibFull(a *AudioConverter) unsafe.Pointer { // // The function returns the following values: // -// - goret *AudioConverter +// - goret *AudioConverter (nullable) // // Create a new #GstAudioConverter that is able to convert between @in and @out // audio formats. @@ -9117,7 +9329,7 @@ func NewAudioConverter(flags AudioConverterFlags, inInfo *AudioInfo, outInfo *Au var carg2 *C.GstAudioInfo // in, none, converted var carg3 *C.GstAudioInfo // in, none, converted var carg4 *C.GstStructure // in, full, converted, nullable - var cret *C.GstAudioConverter // return, full, converted + var cret *C.GstAudioConverter // return, full, converted, nullable carg1 = C.GstAudioConverterFlags(flags) carg2 = (*C.GstAudioInfo)(UnsafeAudioInfoToGlibNone(inInfo)) @@ -9134,7 +9346,9 @@ func NewAudioConverter(flags AudioConverterFlags, inInfo *AudioInfo, outInfo *Au var goret *AudioConverter - goret = UnsafeAudioConverterFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeAudioConverterFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -9848,12 +10062,12 @@ func NewAudioInfo() *AudioInfo { // // The function returns the following values: // -// - goret *AudioInfo +// - goret *AudioInfo (nullable) // // Parse @caps to generate a #GstAudioInfo. func NewAudioInfoFromCaps(caps *gst.Caps) *AudioInfo { var carg1 *C.GstCaps // in, none, converted - var cret *C.GstAudioInfo // return, full, converted + var cret *C.GstAudioInfo // return, full, converted, nullable carg1 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(caps)) @@ -9862,7 +10076,9 @@ func NewAudioInfoFromCaps(caps *gst.Caps) *AudioInfo { var goret *AudioInfo - goret = UnsafeAudioInfoFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeAudioInfoFromGlibFull(unsafe.Pointer(cret)) + } return goret } diff --git a/pkg/gstbase/gstbase.gen.go b/pkg/gstbase/gstbase.gen.go index 21aef60..af3c623 100644 --- a/pkg/gstbase/gstbase.gen.go +++ b/pkg/gstbase/gstbase.gen.go @@ -344,7 +344,7 @@ type CollectPadsQueryFunction func(pads CollectPads, pad *CollectData, query *gs // // The function returns the following values: // -// - goret *gst.Caps +// - goret *gst.Caps (nullable) // // Tries to find what type of data is flowing from the given source #GstPad. // @@ -352,7 +352,7 @@ type CollectPadsQueryFunction func(pads CollectPads, pad *CollectData, query *gs func TypeFindHelper(src gst.Pad, size uint64) *gst.Caps { var carg1 *C.GstPad // in, none, converted var carg2 C.guint64 // in, none, casted - var cret *C.GstCaps // return, full, converted + var cret *C.GstCaps // return, full, converted, nullable carg1 = (*C.GstPad)(gst.UnsafePadToGlibNone(src)) carg2 = C.guint64(size) @@ -363,7 +363,9 @@ func TypeFindHelper(src gst.Pad, size uint64) *gst.Caps { var goret *gst.Caps - goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -379,7 +381,7 @@ func TypeFindHelper(src gst.Pad, size uint64) *gst.Caps { // // - prob gst.TypeFindProbability: location to store the probability of the found // caps, or %NULL -// - goret *gst.Caps +// - goret *gst.Caps (nullable) // // Tries to find what type of data is contained in the given #GstBuffer, the // assumption being that the buffer represents the beginning of the stream or @@ -397,7 +399,7 @@ func TypeFindHelperForBuffer(obj gst.Object, buf *gst.Buffer) (gst.TypeFindProba var carg1 *C.GstObject // in, none, converted, nullable var carg2 *C.GstBuffer // in, none, converted var carg3 C.GstTypeFindProbability // out, full, casted - var cret *C.GstCaps // return, full, converted + var cret *C.GstCaps // return, full, converted, nullable if obj != nil { carg1 = (*C.GstObject)(gst.UnsafeObjectToGlibNone(obj)) @@ -412,7 +414,9 @@ func TypeFindHelperForBuffer(obj gst.Object, buf *gst.Buffer) (gst.TypeFindProba var goret *gst.Caps prob = gst.TypeFindProbability(carg3) - goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return prob, goret } @@ -429,7 +433,7 @@ func TypeFindHelperForBuffer(obj gst.Object, buf *gst.Buffer) (gst.TypeFindProba // // - prob gst.TypeFindProbability: location to store the probability of the found // caps, or %NULL -// - goret *gst.Caps +// - goret *gst.Caps (nullable) // // Tries to find if type of media contained in the given #GstBuffer, matches // @caps specified, assumption being that the buffer represents the beginning @@ -449,7 +453,7 @@ func TypeFindHelperForBufferWithCaps(obj gst.Object, buf *gst.Buffer, caps *gst. var carg2 *C.GstBuffer // in, none, converted var carg3 *C.GstCaps // in, none, converted var carg4 C.GstTypeFindProbability // out, full, casted - var cret *C.GstCaps // return, full, converted + var cret *C.GstCaps // return, full, converted, nullable if obj != nil { carg1 = (*C.GstObject)(gst.UnsafeObjectToGlibNone(obj)) @@ -466,7 +470,9 @@ func TypeFindHelperForBufferWithCaps(obj gst.Object, buf *gst.Buffer, caps *gst. var goret *gst.Caps prob = gst.TypeFindProbability(carg4) - goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return prob, goret } @@ -483,7 +489,7 @@ func TypeFindHelperForBufferWithCaps(obj gst.Object, buf *gst.Buffer, caps *gst. // // - prob gst.TypeFindProbability: location to store the probability of the found // caps, or %NULL -// - goret *gst.Caps +// - goret *gst.Caps (nullable) // // Tries to find what type of data is contained in the given #GstBuffer, the // assumption being that the buffer represents the beginning of the stream or @@ -506,7 +512,7 @@ func TypeFindHelperForBufferWithExtension(obj gst.Object, buf *gst.Buffer, exten var carg2 *C.GstBuffer // in, none, converted var carg3 *C.gchar // in, none, string, nullable-string var carg4 C.GstTypeFindProbability // out, full, casted - var cret *C.GstCaps // return, full, converted + var cret *C.GstCaps // return, full, converted, nullable if obj != nil { carg1 = (*C.GstObject)(gst.UnsafeObjectToGlibNone(obj)) @@ -526,7 +532,9 @@ func TypeFindHelperForBufferWithExtension(obj gst.Object, buf *gst.Buffer, exten var goret *gst.Caps prob = gst.TypeFindProbability(carg4) - goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return prob, goret } @@ -542,7 +550,7 @@ func TypeFindHelperForBufferWithExtension(obj gst.Object, buf *gst.Buffer, exten // // - prob gst.TypeFindProbability: location to store the probability of the found // caps, or %NULL -// - goret *gst.Caps +// - goret *gst.Caps (nullable) // // Tries to find what type of data is contained in the given @data, the // assumption being that the data represents the beginning of the stream or @@ -561,7 +569,7 @@ func TypeFindHelperForData(obj gst.Object, data []uint8) (gst.TypeFindProbabilit 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 carg4 C.GstTypeFindProbability // out, full, casted - var cret *C.GstCaps // return, full, converted + var cret *C.GstCaps // return, full, converted, nullable if obj != nil { carg1 = (*C.GstObject)(gst.UnsafeObjectToGlibNone(obj)) @@ -579,7 +587,9 @@ func TypeFindHelperForData(obj gst.Object, data []uint8) (gst.TypeFindProbabilit var goret *gst.Caps prob = gst.TypeFindProbability(carg4) - goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return prob, goret } @@ -596,7 +606,7 @@ func TypeFindHelperForData(obj gst.Object, data []uint8) (gst.TypeFindProbabilit // // - prob gst.TypeFindProbability: location to store the probability of the found // caps, or %NULL -// - goret *gst.Caps +// - goret *gst.Caps (nullable) // // Tries to find if type of media contained in the given @data, matches the // @caps specified, assumption being that the data represents the beginning @@ -613,7 +623,7 @@ func TypeFindHelperForDataWithCaps(obj gst.Object, data []uint8, caps *gst.Caps) var carg3 C.gsize // implicit var carg4 *C.GstCaps // in, none, converted var carg5 C.GstTypeFindProbability // out, full, casted - var cret *C.GstCaps // return, full, converted + var cret *C.GstCaps // return, full, converted, nullable if obj != nil { carg1 = (*C.GstObject)(gst.UnsafeObjectToGlibNone(obj)) @@ -633,7 +643,9 @@ func TypeFindHelperForDataWithCaps(obj gst.Object, data []uint8, caps *gst.Caps) var goret *gst.Caps prob = gst.TypeFindProbability(carg5) - goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return prob, goret } @@ -650,7 +662,7 @@ func TypeFindHelperForDataWithCaps(obj gst.Object, data []uint8, caps *gst.Caps) // // - prob gst.TypeFindProbability: location to store the probability of the found // caps, or %NULL -// - goret *gst.Caps +// - goret *gst.Caps (nullable) // // Tries to find what type of data is contained in the given @data, the // assumption being that the data represents the beginning of the stream or @@ -674,7 +686,7 @@ func TypeFindHelperForDataWithExtension(obj gst.Object, data []uint8, extension var carg3 C.gsize // implicit var carg4 *C.gchar // in, none, string, nullable-string var carg5 C.GstTypeFindProbability // out, full, casted - var cret *C.GstCaps // return, full, converted + var cret *C.GstCaps // return, full, converted, nullable if obj != nil { carg1 = (*C.GstObject)(gst.UnsafeObjectToGlibNone(obj)) @@ -697,7 +709,9 @@ func TypeFindHelperForDataWithExtension(obj gst.Object, data []uint8, extension var goret *gst.Caps prob = gst.TypeFindProbability(carg5) - goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return prob, goret } @@ -711,7 +725,7 @@ func TypeFindHelperForDataWithExtension(obj gst.Object, data []uint8, extension // // The function returns the following values: // -// - goret *gst.Caps +// - goret *gst.Caps (nullable) // // Tries to find the best #GstCaps associated with @extension. // @@ -723,7 +737,7 @@ func TypeFindHelperForDataWithExtension(obj gst.Object, data []uint8, extension func TypeFindHelperForExtension(obj gst.Object, extension string) *gst.Caps { var carg1 *C.GstObject // in, none, converted, nullable var carg2 *C.gchar // in, none, string - var cret *C.GstCaps // return, full, converted + var cret *C.GstCaps // return, full, converted, nullable if obj != nil { carg1 = (*C.GstObject)(gst.UnsafeObjectToGlibNone(obj)) @@ -737,7 +751,9 @@ func TypeFindHelperForExtension(obj gst.Object, extension string) *gst.Caps { var goret *gst.Caps - goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -751,7 +767,7 @@ func TypeFindHelperForExtension(obj gst.Object, extension string) *gst.Caps { // // The function returns the following values: // -// - goret []gst.TypeFindFactory +// - goret []gst.TypeFindFactory (nullable) // // Tries to find the best #GstTypeFindFactory associated with @caps. // @@ -976,7 +992,7 @@ type Adapter interface { // // The function returns the following values: // - // - goret *gst.Buffer + // - goret *gst.Buffer (nullable) // // Returns a #GstBuffer containing the first @nbytes of the @adapter, but // does not flush them from the adapter. See gst_adapter_take_buffer() @@ -995,7 +1011,7 @@ type Adapter interface { // // The function returns the following values: // - // - goret *gst.Buffer + // - goret *gst.Buffer (nullable) // // Returns a #GstBuffer containing the first @nbytes of the @adapter, but // does not flush them from the adapter. See gst_adapter_take_buffer_fast() @@ -1014,7 +1030,7 @@ type Adapter interface { // // The function returns the following values: // - // - goret *gst.BufferList + // - goret *gst.BufferList (nullable) // // Returns a #GstBufferList of buffers containing the first @nbytes bytes of // the @adapter but does not flush them from the adapter. See @@ -1031,7 +1047,7 @@ type Adapter interface { // // The function returns the following values: // - // - goret []*gst.Buffer + // - goret []*gst.Buffer (nullable) // // Returns a #GList of buffers containing the first @nbytes bytes of the // @adapter, but does not flush them from the adapter. See @@ -1211,7 +1227,7 @@ type Adapter interface { // // The function returns the following values: // - // - goret *gst.Buffer + // - goret *gst.Buffer (nullable) // // Returns a #GstBuffer containing the first @nbytes bytes of the // @adapter. The returned bytes will be flushed from the adapter. @@ -1241,7 +1257,7 @@ type Adapter interface { // // The function returns the following values: // - // - goret *gst.Buffer + // - goret *gst.Buffer (nullable) // // Returns a #GstBuffer containing the first @nbytes of the @adapter. // The returned bytes will be flushed from the adapter. This function @@ -1275,7 +1291,7 @@ type Adapter interface { // // The function returns the following values: // - // - goret *gst.BufferList + // - goret *gst.BufferList (nullable) // // Returns a #GstBufferList of buffers containing the first @nbytes bytes of // the @adapter. The returned bytes will be flushed from the adapter. @@ -1293,7 +1309,7 @@ type Adapter interface { // // The function returns the following values: // - // - goret []*gst.Buffer + // - goret []*gst.Buffer (nullable) // // Returns a #GList of buffers containing the first @nbytes bytes of the // @adapter. The returned bytes will be flushed from the adapter. @@ -1538,7 +1554,7 @@ func (adapter *AdapterInstance) Flush(flush uint) { // // The function returns the following values: // -// - goret *gst.Buffer +// - goret *gst.Buffer (nullable) // // Returns a #GstBuffer containing the first @nbytes of the @adapter, but // does not flush them from the adapter. See gst_adapter_take_buffer() @@ -1551,7 +1567,7 @@ func (adapter *AdapterInstance) Flush(flush uint) { func (adapter *AdapterInstance) GetBuffer(nbytes uint) *gst.Buffer { var carg0 *C.GstAdapter // in, none, converted var carg1 C.gsize // in, none, casted - var cret *C.GstBuffer // return, full, converted + var cret *C.GstBuffer // return, full, converted, nullable carg0 = (*C.GstAdapter)(UnsafeAdapterToGlibNone(adapter)) carg1 = C.gsize(nbytes) @@ -1562,7 +1578,9 @@ func (adapter *AdapterInstance) GetBuffer(nbytes uint) *gst.Buffer { var goret *gst.Buffer - goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1575,7 +1593,7 @@ func (adapter *AdapterInstance) GetBuffer(nbytes uint) *gst.Buffer { // // The function returns the following values: // -// - goret *gst.Buffer +// - goret *gst.Buffer (nullable) // // Returns a #GstBuffer containing the first @nbytes of the @adapter, but // does not flush them from the adapter. See gst_adapter_take_buffer_fast() @@ -1588,7 +1606,7 @@ func (adapter *AdapterInstance) GetBuffer(nbytes uint) *gst.Buffer { func (adapter *AdapterInstance) GetBufferFast(nbytes uint) *gst.Buffer { var carg0 *C.GstAdapter // in, none, converted var carg1 C.gsize // in, none, casted - var cret *C.GstBuffer // return, full, converted + var cret *C.GstBuffer // return, full, converted, nullable carg0 = (*C.GstAdapter)(UnsafeAdapterToGlibNone(adapter)) carg1 = C.gsize(nbytes) @@ -1599,7 +1617,9 @@ func (adapter *AdapterInstance) GetBufferFast(nbytes uint) *gst.Buffer { var goret *gst.Buffer - goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1612,7 +1632,7 @@ func (adapter *AdapterInstance) GetBufferFast(nbytes uint) *gst.Buffer { // // The function returns the following values: // -// - goret *gst.BufferList +// - goret *gst.BufferList (nullable) // // Returns a #GstBufferList of buffers containing the first @nbytes bytes of // the @adapter but does not flush them from the adapter. See @@ -1623,7 +1643,7 @@ func (adapter *AdapterInstance) GetBufferFast(nbytes uint) *gst.Buffer { func (adapter *AdapterInstance) GetBufferList(nbytes uint) *gst.BufferList { var carg0 *C.GstAdapter // in, none, converted var carg1 C.gsize // in, none, casted - var cret *C.GstBufferList // return, full, converted + var cret *C.GstBufferList // return, full, converted, nullable carg0 = (*C.GstAdapter)(UnsafeAdapterToGlibNone(adapter)) carg1 = C.gsize(nbytes) @@ -1634,7 +1654,9 @@ func (adapter *AdapterInstance) GetBufferList(nbytes uint) *gst.BufferList { var goret *gst.BufferList - goret = gst.UnsafeBufferListFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferListFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1647,7 +1669,7 @@ func (adapter *AdapterInstance) GetBufferList(nbytes uint) *gst.BufferList { // // The function returns the following values: // -// - goret []*gst.Buffer +// - goret []*gst.Buffer (nullable) // // Returns a #GList of buffers containing the first @nbytes bytes of the // @adapter, but does not flush them from the adapter. See @@ -2046,7 +2068,7 @@ func (adapter *AdapterInstance) Push(buf *gst.Buffer) { // // The function returns the following values: // -// - goret *gst.Buffer +// - goret *gst.Buffer (nullable) // // Returns a #GstBuffer containing the first @nbytes bytes of the // @adapter. The returned bytes will be flushed from the adapter. @@ -2070,7 +2092,7 @@ func (adapter *AdapterInstance) Push(buf *gst.Buffer) { func (adapter *AdapterInstance) TakeBuffer(nbytes uint) *gst.Buffer { var carg0 *C.GstAdapter // in, none, converted var carg1 C.gsize // in, none, casted - var cret *C.GstBuffer // return, full, converted + var cret *C.GstBuffer // return, full, converted, nullable carg0 = (*C.GstAdapter)(UnsafeAdapterToGlibNone(adapter)) carg1 = C.gsize(nbytes) @@ -2081,7 +2103,9 @@ func (adapter *AdapterInstance) TakeBuffer(nbytes uint) *gst.Buffer { var goret *gst.Buffer - goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -2094,7 +2118,7 @@ func (adapter *AdapterInstance) TakeBuffer(nbytes uint) *gst.Buffer { // // The function returns the following values: // -// - goret *gst.Buffer +// - goret *gst.Buffer (nullable) // // Returns a #GstBuffer containing the first @nbytes of the @adapter. // The returned bytes will be flushed from the adapter. This function @@ -2122,7 +2146,7 @@ func (adapter *AdapterInstance) TakeBuffer(nbytes uint) *gst.Buffer { func (adapter *AdapterInstance) TakeBufferFast(nbytes uint) *gst.Buffer { var carg0 *C.GstAdapter // in, none, converted var carg1 C.gsize // in, none, casted - var cret *C.GstBuffer // return, full, converted + var cret *C.GstBuffer // return, full, converted, nullable carg0 = (*C.GstAdapter)(UnsafeAdapterToGlibNone(adapter)) carg1 = C.gsize(nbytes) @@ -2133,7 +2157,9 @@ func (adapter *AdapterInstance) TakeBufferFast(nbytes uint) *gst.Buffer { var goret *gst.Buffer - goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -2146,7 +2172,7 @@ func (adapter *AdapterInstance) TakeBufferFast(nbytes uint) *gst.Buffer { // // The function returns the following values: // -// - goret *gst.BufferList +// - goret *gst.BufferList (nullable) // // Returns a #GstBufferList of buffers containing the first @nbytes bytes of // the @adapter. The returned bytes will be flushed from the adapter. @@ -2158,7 +2184,7 @@ func (adapter *AdapterInstance) TakeBufferFast(nbytes uint) *gst.Buffer { func (adapter *AdapterInstance) TakeBufferList(nbytes uint) *gst.BufferList { var carg0 *C.GstAdapter // in, none, converted var carg1 C.gsize // in, none, casted - var cret *C.GstBufferList // return, full, converted + var cret *C.GstBufferList // return, full, converted, nullable carg0 = (*C.GstAdapter)(UnsafeAdapterToGlibNone(adapter)) carg1 = C.gsize(nbytes) @@ -2169,7 +2195,9 @@ func (adapter *AdapterInstance) TakeBufferList(nbytes uint) *gst.BufferList { var goret *gst.BufferList - goret = gst.UnsafeBufferListFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferListFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -2182,7 +2210,7 @@ func (adapter *AdapterInstance) TakeBufferList(nbytes uint) *gst.BufferList { // // The function returns the following values: // -// - goret []*gst.Buffer +// - goret []*gst.Buffer (nullable) // // Returns a #GList of buffers containing the first @nbytes bytes of the // @adapter. The returned bytes will be flushed from the adapter. @@ -2348,7 +2376,7 @@ type Aggregator interface { // GetBufferPool wraps gst_aggregator_get_buffer_pool // The function returns the following values: // - // - goret gst.BufferPool + // - goret gst.BufferPool (nullable) GetBufferPool() gst.BufferPool // GetForceLive wraps gst_aggregator_get_force_live // The function returns the following values: @@ -2391,7 +2419,7 @@ type Aggregator interface { // // The function returns the following values: // - // - goret *gst.Sample + // - goret *gst.Sample (nullable) // // Use this function to determine what input buffers will be aggregated // to produce the next output buffer. This should only be called from @@ -2635,10 +2663,10 @@ func (self *AggregatorInstance) GetAllocator() (gst.Allocator, gst.AllocationPar // GetBufferPool wraps gst_aggregator_get_buffer_pool // The function returns the following values: // -// - goret gst.BufferPool +// - goret gst.BufferPool (nullable) func (self *AggregatorInstance) GetBufferPool() gst.BufferPool { var carg0 *C.GstAggregator // in, none, converted - var cret *C.GstBufferPool // return, full, converted + var cret *C.GstBufferPool // return, full, converted, nullable carg0 = (*C.GstAggregator)(UnsafeAggregatorToGlibNone(self)) @@ -2647,7 +2675,9 @@ func (self *AggregatorInstance) GetBufferPool() gst.BufferPool { var goret gst.BufferPool - goret = gst.UnsafeBufferPoolFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferPoolFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -2759,7 +2789,7 @@ func (self *AggregatorInstance) Negotiate() bool { // // The function returns the following values: // -// - goret *gst.Sample +// - goret *gst.Sample (nullable) // // Use this function to determine what input buffers will be aggregated // to produce the next output buffer. This should only be called from @@ -2768,7 +2798,7 @@ func (self *AggregatorInstance) Negotiate() bool { func (self *AggregatorInstance) PeekNextSample(pad AggregatorPad) *gst.Sample { var carg0 *C.GstAggregator // in, none, converted var carg1 *C.GstAggregatorPad // in, none, converted - var cret *C.GstSample // return, full, converted + var cret *C.GstSample // return, full, converted, nullable carg0 = (*C.GstAggregator)(UnsafeAggregatorToGlibNone(self)) carg1 = (*C.GstAggregatorPad)(UnsafeAggregatorPadToGlibNone(pad)) @@ -2779,7 +2809,9 @@ func (self *AggregatorInstance) PeekNextSample(pad AggregatorPad) *gst.Sample { var goret *gst.Sample - goret = gst.UnsafeSampleFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeSampleFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -3026,12 +3058,12 @@ type AggregatorPad interface { // PeekBuffer wraps gst_aggregator_pad_peek_buffer // The function returns the following values: // - // - goret *gst.Buffer + // - goret *gst.Buffer (nullable) PeekBuffer() *gst.Buffer // PopBuffer wraps gst_aggregator_pad_pop_buffer // The function returns the following values: // - // - goret *gst.Buffer + // - goret *gst.Buffer (nullable) // // Steal the ref to the buffer currently queued in @pad. PopBuffer() *gst.Buffer @@ -3178,10 +3210,10 @@ func (pad *AggregatorPadInstance) IsInactive() bool { // PeekBuffer wraps gst_aggregator_pad_peek_buffer // The function returns the following values: // -// - goret *gst.Buffer +// - goret *gst.Buffer (nullable) func (pad *AggregatorPadInstance) PeekBuffer() *gst.Buffer { var carg0 *C.GstAggregatorPad // in, none, converted - var cret *C.GstBuffer // return, full, converted + var cret *C.GstBuffer // return, full, converted, nullable carg0 = (*C.GstAggregatorPad)(UnsafeAggregatorPadToGlibNone(pad)) @@ -3190,7 +3222,9 @@ func (pad *AggregatorPadInstance) PeekBuffer() *gst.Buffer { var goret *gst.Buffer - goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -3198,12 +3232,12 @@ func (pad *AggregatorPadInstance) PeekBuffer() *gst.Buffer { // PopBuffer wraps gst_aggregator_pad_pop_buffer // The function returns the following values: // -// - goret *gst.Buffer +// - goret *gst.Buffer (nullable) // // Steal the ref to the buffer currently queued in @pad. func (pad *AggregatorPadInstance) PopBuffer() *gst.Buffer { var carg0 *C.GstAggregatorPad // in, none, converted - var cret *C.GstBuffer // return, full, converted + var cret *C.GstBuffer // return, full, converted, nullable carg0 = (*C.GstAggregatorPad)(UnsafeAggregatorPadToGlibNone(pad)) @@ -3212,7 +3246,9 @@ func (pad *AggregatorPadInstance) PopBuffer() *gst.Buffer { var goret *gst.Buffer - goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -4319,7 +4355,7 @@ type BaseSink interface { // GetLastSample wraps gst_base_sink_get_last_sample // The function returns the following values: // - // - goret *gst.Sample + // - goret *gst.Sample (nullable) // // Get the last sample that arrived in the sink and was used for preroll or for // rendering. This property can be used to generate thumbnails. @@ -4773,7 +4809,7 @@ func (sink *BaseSinkInstance) GetDropOutOfSegment() bool { // GetLastSample wraps gst_base_sink_get_last_sample // The function returns the following values: // -// - goret *gst.Sample +// - goret *gst.Sample (nullable) // // Get the last sample that arrived in the sink and was used for preroll or for // rendering. This property can be used to generate thumbnails. @@ -4783,7 +4819,7 @@ func (sink *BaseSinkInstance) GetDropOutOfSegment() bool { // Free-function: gst_sample_unref func (sink *BaseSinkInstance) GetLastSample() *gst.Sample { var carg0 *C.GstBaseSink // in, none, converted - var cret *C.GstSample // return, full, converted + var cret *C.GstSample // return, full, converted, nullable carg0 = (*C.GstBaseSink)(UnsafeBaseSinkToGlibNone(sink)) @@ -4792,7 +4828,9 @@ func (sink *BaseSinkInstance) GetLastSample() *gst.Sample { var goret *gst.Sample - goret = gst.UnsafeSampleFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeSampleFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -5682,7 +5720,7 @@ type BaseSrc interface { // GetBufferPool wraps gst_base_src_get_buffer_pool // The function returns the following values: // - // - goret gst.BufferPool + // - goret gst.BufferPool (nullable) GetBufferPool() gst.BufferPool // GetDoTimestamp wraps gst_base_src_get_do_timestamp // The function returns the following values: @@ -6053,10 +6091,10 @@ func (src *BaseSrcInstance) GetBlocksize() uint { // GetBufferPool wraps gst_base_src_get_buffer_pool // The function returns the following values: // -// - goret gst.BufferPool +// - goret gst.BufferPool (nullable) func (src *BaseSrcInstance) GetBufferPool() gst.BufferPool { var carg0 *C.GstBaseSrc // in, none, converted - var cret *C.GstBufferPool // return, full, converted + var cret *C.GstBufferPool // return, full, converted, nullable carg0 = (*C.GstBaseSrc)(UnsafeBaseSrcToGlibNone(src)) @@ -6065,7 +6103,9 @@ func (src *BaseSrcInstance) GetBufferPool() gst.BufferPool { var goret gst.BufferPool - goret = gst.UnsafeBufferPoolFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferPoolFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -6792,7 +6832,7 @@ type BaseTransform interface { // GetBufferPool wraps gst_base_transform_get_buffer_pool // The function returns the following values: // - // - goret gst.BufferPool + // - goret gst.BufferPool (nullable) GetBufferPool() gst.BufferPool // IsInPlace wraps gst_base_transform_is_in_place // The function returns the following values: @@ -7030,10 +7070,10 @@ func (trans *BaseTransformInstance) GetAllocator() (gst.Allocator, gst.Allocatio // GetBufferPool wraps gst_base_transform_get_buffer_pool // The function returns the following values: // -// - goret gst.BufferPool +// - goret gst.BufferPool (nullable) func (trans *BaseTransformInstance) GetBufferPool() gst.BufferPool { var carg0 *C.GstBaseTransform // in, none, converted - var cret *C.GstBufferPool // return, full, converted + var cret *C.GstBufferPool // return, full, converted, nullable carg0 = (*C.GstBaseTransform)(UnsafeBaseTransformToGlibNone(trans)) @@ -7042,7 +7082,9 @@ func (trans *BaseTransformInstance) GetBufferPool() gst.BufferPool { var goret gst.BufferPool - goret = gst.UnsafeBufferPoolFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferPoolFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -7496,7 +7538,7 @@ type CollectPads interface { // // The function returns the following values: // - // - goret *gst.Buffer + // - goret *gst.Buffer (nullable) // // Peek at the buffer currently queued in @data. This function // should be called with the @pads STREAM_LOCK held, such as in the callback @@ -7512,7 +7554,7 @@ type CollectPads interface { // // The function returns the following values: // - // - goret *gst.Buffer + // - goret *gst.Buffer (nullable) // // Pop the buffer currently queued in @data. This function // should be called with the @pads STREAM_LOCK held, such as in the callback @@ -7545,7 +7587,7 @@ type CollectPads interface { // // The function returns the following values: // - // - goret *gst.Buffer + // - goret *gst.Buffer (nullable) // // Get a subbuffer of @size bytes from the given pad @data. // @@ -7730,7 +7772,7 @@ type CollectPads interface { // // The function returns the following values: // - // - goret *gst.Buffer + // - goret *gst.Buffer (nullable) // // Get a subbuffer of @size bytes from the given pad @data. Flushes the amount // of read bytes. @@ -7920,7 +7962,7 @@ func (pads *CollectPadsInstance) Flush(data *CollectData, size uint) uint { // // The function returns the following values: // -// - goret *gst.Buffer +// - goret *gst.Buffer (nullable) // // Peek at the buffer currently queued in @data. This function // should be called with the @pads STREAM_LOCK held, such as in the callback @@ -7930,7 +7972,7 @@ func (pads *CollectPadsInstance) Flush(data *CollectData, size uint) uint { func (pads *CollectPadsInstance) Peek(data *CollectData) *gst.Buffer { var carg0 *C.GstCollectPads // in, none, converted var carg1 *C.GstCollectData // in, none, converted - var cret *C.GstBuffer // return, full, converted + var cret *C.GstBuffer // return, full, converted, nullable carg0 = (*C.GstCollectPads)(UnsafeCollectPadsToGlibNone(pads)) carg1 = (*C.GstCollectData)(UnsafeCollectDataToGlibNone(data)) @@ -7941,7 +7983,9 @@ func (pads *CollectPadsInstance) Peek(data *CollectData) *gst.Buffer { var goret *gst.Buffer - goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -7954,7 +7998,7 @@ func (pads *CollectPadsInstance) Peek(data *CollectData) *gst.Buffer { // // The function returns the following values: // -// - goret *gst.Buffer +// - goret *gst.Buffer (nullable) // // Pop the buffer currently queued in @data. This function // should be called with the @pads STREAM_LOCK held, such as in the callback @@ -7964,7 +8008,7 @@ func (pads *CollectPadsInstance) Peek(data *CollectData) *gst.Buffer { func (pads *CollectPadsInstance) Pop(data *CollectData) *gst.Buffer { var carg0 *C.GstCollectPads // in, none, converted var carg1 *C.GstCollectData // in, none, converted - var cret *C.GstBuffer // return, full, converted + var cret *C.GstBuffer // return, full, converted, nullable carg0 = (*C.GstCollectPads)(UnsafeCollectPadsToGlibNone(pads)) carg1 = (*C.GstCollectData)(UnsafeCollectDataToGlibNone(data)) @@ -7975,7 +8019,9 @@ func (pads *CollectPadsInstance) Pop(data *CollectData) *gst.Buffer { var goret *gst.Buffer - goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -8033,7 +8079,7 @@ func (pads *CollectPadsInstance) QueryDefault(data *CollectData, query *gst.Quer // // The function returns the following values: // -// - goret *gst.Buffer +// - goret *gst.Buffer (nullable) // // Get a subbuffer of @size bytes from the given pad @data. // @@ -8045,7 +8091,7 @@ func (pads *CollectPadsInstance) ReadBuffer(data *CollectData, size uint) *gst.B var carg0 *C.GstCollectPads // in, none, converted var carg1 *C.GstCollectData // in, none, converted var carg2 C.guint // in, none, casted - var cret *C.GstBuffer // return, full, converted + var cret *C.GstBuffer // return, full, converted, nullable carg0 = (*C.GstCollectPads)(UnsafeCollectPadsToGlibNone(pads)) carg1 = (*C.GstCollectData)(UnsafeCollectDataToGlibNone(data)) @@ -8058,7 +8104,9 @@ func (pads *CollectPadsInstance) ReadBuffer(data *CollectData, size uint) *gst.B var goret *gst.Buffer - goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -8425,7 +8473,7 @@ func (pads *CollectPadsInstance) Stop() { // // The function returns the following values: // -// - goret *gst.Buffer +// - goret *gst.Buffer (nullable) // // Get a subbuffer of @size bytes from the given pad @data. Flushes the amount // of read bytes. @@ -8438,7 +8486,7 @@ func (pads *CollectPadsInstance) TakeBuffer(data *CollectData, size uint) *gst.B var carg0 *C.GstCollectPads // in, none, converted var carg1 *C.GstCollectData // in, none, converted var carg2 C.guint // in, none, casted - var cret *C.GstBuffer // return, full, converted + var cret *C.GstBuffer // return, full, converted, nullable carg0 = (*C.GstCollectPads)(UnsafeCollectPadsToGlibNone(pads)) carg1 = (*C.GstCollectData)(UnsafeCollectDataToGlibNone(data)) @@ -8451,7 +8499,9 @@ func (pads *CollectPadsInstance) TakeBuffer(data *CollectData, size uint) *gst.B var goret *gst.Buffer - goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } return goret } diff --git a/pkg/gstcheck/gstcheck.gen.go b/pkg/gstcheck/gstcheck.gen.go index f7b9e02..272ff15 100644 --- a/pkg/gstcheck/gstcheck.gen.go +++ b/pkg/gstcheck/gstcheck.gen.go @@ -1102,7 +1102,7 @@ type TestClock interface { // ProcessNextClockID wraps gst_test_clock_process_next_clock_id // The function returns the following values: // - // - goret gst.ClockID + // - goret gst.ClockID (nullable) // // MT safe. ProcessNextClockID() gst.ClockID @@ -1440,12 +1440,12 @@ func (testClock *TestClockInstance) ProcessID(pendingId gst.ClockID) bool { // ProcessNextClockID wraps gst_test_clock_process_next_clock_id // The function returns the following values: // -// - goret gst.ClockID +// - goret gst.ClockID (nullable) // // MT safe. func (testClock *TestClockInstance) ProcessNextClockID() gst.ClockID { var carg0 *C.GstTestClock // in, none, converted - var cret C.GstClockID // return, full, casted, alias + var cret C.GstClockID // return, full, casted, alias, nullable carg0 = (*C.GstTestClock)(UnsafeTestClockToGlibNone(testClock)) @@ -1454,7 +1454,9 @@ func (testClock *TestClockInstance) ProcessNextClockID() gst.ClockID { var goret gst.ClockID - goret = gst.ClockID(cret) + if cret != nil { + goret = gst.ClockID(cret) + } return goret } @@ -2358,7 +2360,7 @@ func (h *Harness) EventsReceived() uint { // // The function returns the following values: // -// - goret gst.Element +// - goret gst.Element (nullable) // // Most useful in conjunction with gst_harness_new_parse, this will scan the // #GstElements inside the #GstHarness, and check if any of them matches @@ -2369,7 +2371,7 @@ func (h *Harness) EventsReceived() uint { func (h *Harness) FindElement(elementName string) gst.Element { var carg0 *C.GstHarness // in, none, converted var carg1 *C.gchar // in, none, string - var cret *C.GstElement // return, full, converted + var cret *C.GstElement // return, full, converted, nullable carg0 = (*C.GstHarness)(UnsafeHarnessToGlibNone(h)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(elementName))) @@ -2381,7 +2383,9 @@ func (h *Harness) FindElement(elementName string) gst.Element { var goret gst.Element - goret = gst.UnsafeElementFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeElementFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -2448,7 +2452,7 @@ func (h *Harness) GetLastPushedTimestamp() gst.ClockTime { // GetTestclock wraps gst_harness_get_testclock // The function returns the following values: // -// - goret TestClock +// - goret TestClock (nullable) // // Get the #GstTestClock. Useful if specific operations on the testclock is // needed. @@ -2456,7 +2460,7 @@ func (h *Harness) GetLastPushedTimestamp() gst.ClockTime { // MT safe. func (h *Harness) GetTestclock() TestClock { var carg0 *C.GstHarness // in, none, converted - var cret *C.GstTestClock // return, full, converted + var cret *C.GstTestClock // return, full, converted, nullable carg0 = (*C.GstHarness)(UnsafeHarnessToGlibNone(h)) @@ -2465,7 +2469,9 @@ func (h *Harness) GetTestclock() TestClock { var goret TestClock - goret = UnsafeTestClockFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeTestClockFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -2493,7 +2499,7 @@ func (h *Harness) Play() { // Pull wraps gst_harness_pull // The function returns the following values: // -// - goret *gst.Buffer +// - goret *gst.Buffer (nullable) // // Pulls a #GstBuffer from the #GAsyncQueue on the #GstHarness sinkpad. The pull // will timeout in 60 seconds. This is the standard way of getting a buffer @@ -2502,7 +2508,7 @@ func (h *Harness) Play() { // MT safe. func (h *Harness) Pull() *gst.Buffer { var carg0 *C.GstHarness // in, none, converted - var cret *C.GstBuffer // return, full, converted + var cret *C.GstBuffer // return, full, converted, nullable carg0 = (*C.GstHarness)(UnsafeHarnessToGlibNone(h)) @@ -2511,7 +2517,9 @@ func (h *Harness) Pull() *gst.Buffer { var goret *gst.Buffer - goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -2519,7 +2527,7 @@ func (h *Harness) Pull() *gst.Buffer { // PullEvent wraps gst_harness_pull_event // The function returns the following values: // -// - goret *gst.Event +// - goret *gst.Event (nullable) // // Pulls an #GstEvent from the #GAsyncQueue on the #GstHarness sinkpad. // Timeouts after 60 seconds similar to gst_harness_pull. @@ -2527,7 +2535,7 @@ func (h *Harness) Pull() *gst.Buffer { // MT safe. func (h *Harness) PullEvent() *gst.Event { var carg0 *C.GstHarness // in, none, converted - var cret *C.GstEvent // return, full, converted + var cret *C.GstEvent // return, full, converted, nullable carg0 = (*C.GstHarness)(UnsafeHarnessToGlibNone(h)) @@ -2536,7 +2544,9 @@ func (h *Harness) PullEvent() *gst.Event { var goret *gst.Event - goret = gst.UnsafeEventFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeEventFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -2577,7 +2587,7 @@ func (h *Harness) PullUntilEos() (*gst.Buffer, bool) { // PullUpstreamEvent wraps gst_harness_pull_upstream_event // The function returns the following values: // -// - goret *gst.Event +// - goret *gst.Event (nullable) // // Pulls an #GstEvent from the #GAsyncQueue on the #GstHarness srcpad. // Timeouts after 60 seconds similar to gst_harness_pull. @@ -2585,7 +2595,7 @@ func (h *Harness) PullUntilEos() (*gst.Buffer, bool) { // MT safe. func (h *Harness) PullUpstreamEvent() *gst.Event { var carg0 *C.GstHarness // in, none, converted - var cret *C.GstEvent // return, full, converted + var cret *C.GstEvent // return, full, converted, nullable carg0 = (*C.GstHarness)(UnsafeHarnessToGlibNone(h)) @@ -2594,7 +2604,9 @@ func (h *Harness) PullUpstreamEvent() *gst.Event { var goret *gst.Event - goret = gst.UnsafeEventFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeEventFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -2640,7 +2652,7 @@ func (h *Harness) Push(buffer *gst.Buffer) gst.FlowReturn { // // The function returns the following values: // -// - goret *gst.Buffer +// - goret *gst.Buffer (nullable) // // Basically a gst_harness_push and a gst_harness_pull in one line. Reflects // the fact that you often want to do exactly this in your test: Push one buffer @@ -2650,7 +2662,7 @@ func (h *Harness) Push(buffer *gst.Buffer) gst.FlowReturn { func (h *Harness) PushAndPull(buffer *gst.Buffer) *gst.Buffer { var carg0 *C.GstHarness // in, none, converted var carg1 *C.GstBuffer // in, full, converted - var cret *C.GstBuffer // return, full, converted + var cret *C.GstBuffer // return, full, converted, nullable carg0 = (*C.GstHarness)(UnsafeHarnessToGlibNone(h)) carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibFull(buffer)) @@ -2661,7 +2673,9 @@ func (h *Harness) PushAndPull(buffer *gst.Buffer) *gst.Buffer { var goret *gst.Buffer - goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -3297,7 +3311,7 @@ func (h *Harness) Teardown() { // TryPull wraps gst_harness_try_pull // The function returns the following values: // -// - goret *gst.Buffer +// - goret *gst.Buffer (nullable) // // Pulls a #GstBuffer from the #GAsyncQueue on the #GstHarness sinkpad. Unlike // gst_harness_pull this will not wait for any buffers if not any are present, @@ -3306,7 +3320,7 @@ func (h *Harness) Teardown() { // MT safe. func (h *Harness) TryPull() *gst.Buffer { var carg0 *C.GstHarness // in, none, converted - var cret *C.GstBuffer // return, full, converted + var cret *C.GstBuffer // return, full, converted, nullable carg0 = (*C.GstHarness)(UnsafeHarnessToGlibNone(h)) @@ -3315,7 +3329,9 @@ func (h *Harness) TryPull() *gst.Buffer { var goret *gst.Buffer - goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -3323,7 +3339,7 @@ func (h *Harness) TryPull() *gst.Buffer { // TryPullEvent wraps gst_harness_try_pull_event // The function returns the following values: // -// - goret *gst.Event +// - goret *gst.Event (nullable) // // Pulls an #GstEvent from the #GAsyncQueue on the #GstHarness sinkpad. // See gst_harness_try_pull for details. @@ -3331,7 +3347,7 @@ func (h *Harness) TryPull() *gst.Buffer { // MT safe. func (h *Harness) TryPullEvent() *gst.Event { var carg0 *C.GstHarness // in, none, converted - var cret *C.GstEvent // return, full, converted + var cret *C.GstEvent // return, full, converted, nullable carg0 = (*C.GstHarness)(UnsafeHarnessToGlibNone(h)) @@ -3340,7 +3356,9 @@ func (h *Harness) TryPullEvent() *gst.Event { var goret *gst.Event - goret = gst.UnsafeEventFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeEventFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -3348,7 +3366,7 @@ func (h *Harness) TryPullEvent() *gst.Event { // TryPullUpstreamEvent wraps gst_harness_try_pull_upstream_event // The function returns the following values: // -// - goret *gst.Event +// - goret *gst.Event (nullable) // // Pulls an #GstEvent from the #GAsyncQueue on the #GstHarness srcpad. // See gst_harness_try_pull for details. @@ -3356,7 +3374,7 @@ func (h *Harness) TryPullEvent() *gst.Event { // MT safe. func (h *Harness) TryPullUpstreamEvent() *gst.Event { var carg0 *C.GstHarness // in, none, converted - var cret *C.GstEvent // return, full, converted + var cret *C.GstEvent // return, full, converted, nullable carg0 = (*C.GstHarness)(UnsafeHarnessToGlibNone(h)) @@ -3365,7 +3383,9 @@ func (h *Harness) TryPullUpstreamEvent() *gst.Event { var goret *gst.Event - goret = gst.UnsafeEventFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeEventFromGlibFull(unsafe.Pointer(cret)) + } return goret } diff --git a/pkg/gstcontroller/gstcontroller.gen.go b/pkg/gstcontroller/gstcontroller.gen.go index 072b4c4..73dc0ea 100644 --- a/pkg/gstcontroller/gstcontroller.gen.go +++ b/pkg/gstcontroller/gstcontroller.gen.go @@ -613,7 +613,7 @@ type TimedValueControlSource interface { // // The function returns the following values: // - // - goret *glib.SequenceIter + // - goret *glib.SequenceIter (nullable) // // Find last value before given timestamp in control point list. // If all values in the control point list come after the given @@ -728,7 +728,7 @@ func UnsafeTimedValueControlSourceToGlibFull(c TimedValueControlSource) unsafe.P // // The function returns the following values: // -// - goret *glib.SequenceIter +// - goret *glib.SequenceIter (nullable) // // Find last value before given timestamp in control point list. // If all values in the control point list come after the given @@ -738,7 +738,7 @@ func UnsafeTimedValueControlSourceToGlibFull(c TimedValueControlSource) unsafe.P func (self *TimedValueControlSourceInstance) FindControlPointIter(timestamp gst.ClockTime) *glib.SequenceIter { var carg0 *C.GstTimedValueControlSource // in, none, converted var carg1 C.GstClockTime // in, none, casted, alias - var cret *C.GSequenceIter // return, none, converted + var cret *C.GSequenceIter // return, none, converted, nullable carg0 = (*C.GstTimedValueControlSource)(UnsafeTimedValueControlSourceToGlibNone(self)) carg1 = C.GstClockTime(timestamp) @@ -749,7 +749,9 @@ func (self *TimedValueControlSourceInstance) FindControlPointIter(timestamp gst. var goret *glib.SequenceIter - goret = glib.UnsafeSequenceIterFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = glib.UnsafeSequenceIterFromGlibNone(unsafe.Pointer(cret)) + } return goret } diff --git a/pkg/gstgl/gstgl.gen.go b/pkg/gstgl/gstgl.gen.go index aafa877..721b993 100644 --- a/pkg/gstgl/gstgl.gen.go +++ b/pkg/gstgl/gstgl.gen.go @@ -202,6 +202,22 @@ func (e GLBaseMemoryError) String() string { } } +// GLBaseMemoryErrorQuark wraps gst_gl_base_memory_error_quark +// The function returns the following values: +// +// - goret glib.Quark +func GLBaseMemoryErrorQuark() glib.Quark { + var cret C.GQuark // return, none, casted, alias + + cret = C.gst_gl_base_memory_error_quark() + + var goret glib.Quark + + goret = glib.Quark(cret) + + return goret +} + // GLConfigCaveat wraps GstGLConfigCaveat type GLConfigCaveat C.int @@ -240,6 +256,33 @@ func (e GLConfigCaveat) String() string { } } +// GLConfigCaveatToString wraps gst_gl_config_caveat_to_string +// +// The function takes the following parameters: +// +// - caveat GLConfigCaveat: the #GstGLConfigCaveat +// +// The function returns the following values: +// +// - goret string (nullable) +func GLConfigCaveatToString(caveat GLConfigCaveat) string { + var carg1 C.GstGLConfigCaveat // in, none, casted + var cret *C.gchar // return, none, string, nullable-string + + carg1 = C.GstGLConfigCaveat(caveat) + + cret = C.gst_gl_config_caveat_to_string(carg1) + runtime.KeepAlive(caveat) + + var goret string + + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } + + return goret +} + // GLContextError wraps GstGLContextError // // OpenGL context errors. @@ -295,6 +338,22 @@ func (e GLContextError) String() string { } } +// GLContextErrorQuark wraps gst_gl_context_error_quark +// The function returns the following values: +// +// - goret glib.Quark +func GLContextErrorQuark() glib.Quark { + var cret C.GQuark // return, none, casted, alias + + cret = C.gst_gl_context_error_quark() + + var goret glib.Quark + + goret = glib.Quark(cret) + + return goret +} + // GLFormat wraps GstGLFormat type GLFormat C.int @@ -419,6 +478,156 @@ func (e GLFormat) String() string { } } +// GLFormatFromVideoInfo wraps gst_gl_format_from_video_info +// +// The function takes the following parameters: +// +// - _context GLContext: a #GstGLContext +// - vinfo *gstvideo.VideoInfo: a #GstVideoInfo +// - plane uint: the plane number in @vinfo +// +// The function returns the following values: +// +// - goret GLFormat +func GLFormatFromVideoInfo(_context GLContext, vinfo *gstvideo.VideoInfo, plane uint) GLFormat { + var carg1 *C.GstGLContext // in, none, converted + var carg2 *C.GstVideoInfo // in, none, converted + var carg3 C.guint // in, none, casted + var cret C.GstGLFormat // return, none, casted + + carg1 = (*C.GstGLContext)(UnsafeGLContextToGlibNone(_context)) + carg2 = (*C.GstVideoInfo)(gstvideo.UnsafeVideoInfoToGlibNone(vinfo)) + carg3 = C.guint(plane) + + cret = C.gst_gl_format_from_video_info(carg1, carg2, carg3) + runtime.KeepAlive(_context) + runtime.KeepAlive(vinfo) + runtime.KeepAlive(plane) + + var goret GLFormat + + goret = GLFormat(cret) + + return goret +} + +// GLFormatIsSupported wraps gst_gl_format_is_supported +// +// The function takes the following parameters: +// +// - _context GLContext: a #GstGLContext +// - format GLFormat: the #GstGLFormat to check is supported by @context +// +// The function returns the following values: +// +// - goret bool +func GLFormatIsSupported(_context GLContext, format GLFormat) bool { + var carg1 *C.GstGLContext // in, none, converted + var carg2 C.GstGLFormat // in, none, casted + var cret C.gboolean // return + + carg1 = (*C.GstGLContext)(UnsafeGLContextToGlibNone(_context)) + carg2 = C.GstGLFormat(format) + + cret = C.gst_gl_format_is_supported(carg1, carg2) + runtime.KeepAlive(_context) + runtime.KeepAlive(format) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + +// GLFormatNComponents wraps gst_gl_format_n_components +// +// The function takes the following parameters: +// +// - glFormat GLFormat: the #GstGLFormat +// +// The function returns the following values: +// +// - goret uint +func GLFormatNComponents(glFormat GLFormat) uint { + var carg1 C.GstGLFormat // in, none, casted + var cret C.guint // return, none, casted + + carg1 = C.GstGLFormat(glFormat) + + cret = C.gst_gl_format_n_components(carg1) + runtime.KeepAlive(glFormat) + + var goret uint + + goret = uint(cret) + + return goret +} + +// GLFormatTypeFromSizedGLFormat wraps gst_gl_format_type_from_sized_gl_format +// +// The function takes the following parameters: +// +// - format GLFormat: the sized internal #GstGLFormat +// +// The function returns the following values: +// +// - unsizedFormat GLFormat: location for the resulting unsized #GstGLFormat +// - glType uint: location for the resulting GL type +// +// Get the unsized format and type from @format for usage in glReadPixels, +// glTex{Sub}Image*, glTexImage* and similar functions. +func GLFormatTypeFromSizedGLFormat(format GLFormat) (GLFormat, uint) { + var carg1 C.GstGLFormat // in, none, casted + var carg2 C.GstGLFormat // out, full, casted + var carg3 C.guint // out, full, casted + + carg1 = C.GstGLFormat(format) + + C.gst_gl_format_type_from_sized_gl_format(carg1, &carg2, &carg3) + runtime.KeepAlive(format) + + var unsizedFormat GLFormat + var glType uint + + unsizedFormat = GLFormat(carg2) + glType = uint(carg3) + + return unsizedFormat, glType +} + +// GLFormatTypeNBytes wraps gst_gl_format_type_n_bytes +// +// The function takes the following parameters: +// +// - format uint: the OpenGL format, `GL_RGBA`, `GL_LUMINANCE`, etc +// - typ uint: the OpenGL type, `GL_UNSIGNED_BYTE`, `GL_FLOAT`, etc +// +// The function returns the following values: +// +// - goret uint +func GLFormatTypeNBytes(format uint, typ uint) uint { + var carg1 C.guint // in, none, casted + var carg2 C.guint // in, none, casted + var cret C.guint // return, none, casted + + carg1 = C.guint(format) + carg2 = C.guint(typ) + + cret = C.gst_gl_format_type_n_bytes(carg1, carg2) + runtime.KeepAlive(format) + runtime.KeepAlive(typ) + + var goret uint + + goret = uint(cret) + + return goret +} + // GLQueryType wraps GstGLQueryType type GLQueryType C.int @@ -497,6 +706,22 @@ func (e GLSLError) String() string { } } +// GLSLErrorQuark wraps gst_glsl_error_quark +// The function returns the following values: +// +// - goret glib.Quark +func GLSLErrorQuark() glib.Quark { + var cret C.GQuark // return, none, casted, alias + + cret = C.gst_glsl_error_quark() + + var goret glib.Quark + + goret = glib.Quark(cret) + + return goret +} + // GLSLVersion wraps GstGLSLVersion // // GLSL version list @@ -607,6 +832,130 @@ func (e GLSLVersion) String() string { } } +// GLSLVersionFromString wraps gst_glsl_version_from_string +// +// The function takes the following parameters: +// +// - str string: a GLSL version string +// +// The function returns the following values: +// +// - goret GLSLVersion +func GLSLVersionFromString(str string) GLSLVersion { + var carg1 *C.gchar // in, none, string + var cret C.GstGLSLVersion // return, none, casted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(str))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_glsl_version_from_string(carg1) + runtime.KeepAlive(str) + + var goret GLSLVersion + + goret = GLSLVersion(cret) + + return goret +} + +// GLSLVersionProfileFromString wraps gst_glsl_version_profile_from_string +// +// The function takes the following parameters: +// +// - str string: a valid GLSL `#version` string +// +// The function returns the following values: +// +// - versionRet GLSLVersion: resulting #GstGLSLVersion +// - profileRet GLSLProfile: resulting #GstGLSLVersion +// - goret bool +// +// Note: this function expects either a `#version` GLSL preprocesser directive +// or a valid GLSL version and/or profile. +func GLSLVersionProfileFromString(str string) (GLSLVersion, GLSLProfile, bool) { + 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 + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(str))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_glsl_version_profile_from_string(carg1, &carg2, &carg3) + runtime.KeepAlive(str) + + var versionRet GLSLVersion + var profileRet GLSLProfile + var goret bool + + versionRet = GLSLVersion(carg2) + profileRet = GLSLProfile(carg3) + if cret != 0 { + goret = true + } + + return versionRet, profileRet, goret +} + +// GLSLVersionProfileToString wraps gst_glsl_version_profile_to_string +// +// The function takes the following parameters: +// +// - version GLSLVersion: a #GstGLSLVersion +// - profile GLSLProfile: a #GstGLSLVersion +// +// The function returns the following values: +// +// - goret string (nullable) +func GLSLVersionProfileToString(version GLSLVersion, profile GLSLProfile) string { + var carg1 C.GstGLSLVersion // in, none, casted + var carg2 C.GstGLSLProfile // in, none, casted + var cret *C.gchar // return, full, string, nullable-string + + carg1 = C.GstGLSLVersion(version) + carg2 = C.GstGLSLProfile(profile) + + cret = C.gst_glsl_version_profile_to_string(carg1, carg2) + runtime.KeepAlive(version) + runtime.KeepAlive(profile) + + var goret string + + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } + + return goret +} + +// GLSLVersionToString wraps gst_glsl_version_to_string +// +// The function takes the following parameters: +// +// - version GLSLVersion: a #GstGLSLVersion +// +// The function returns the following values: +// +// - goret string (nullable) +func GLSLVersionToString(version GLSLVersion) string { + var carg1 C.GstGLSLVersion // in, none, casted + var cret *C.gchar // return, none, string, nullable-string + + carg1 = C.GstGLSLVersion(version) + + cret = C.gst_glsl_version_to_string(carg1) + runtime.KeepAlive(version) + + var goret string + + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } + + return goret +} + // GLStereoDownmix wraps GstGLStereoDownmix // // Output anaglyph type to generate when downmixing to mono @@ -698,6 +1047,136 @@ func (e GLTextureTarget) String() string { } } +// GLTextureTargetFromGL wraps gst_gl_texture_target_from_gl +// +// The function takes the following parameters: +// +// - target uint: an OpenGL texture binding target +// +// The function returns the following values: +// +// - goret GLTextureTarget +func GLTextureTargetFromGL(target uint) GLTextureTarget { + var carg1 C.guint // in, none, casted + var cret C.GstGLTextureTarget // return, none, casted + + carg1 = C.guint(target) + + cret = C.gst_gl_texture_target_from_gl(carg1) + runtime.KeepAlive(target) + + var goret GLTextureTarget + + goret = GLTextureTarget(cret) + + return goret +} + +// GLTextureTargetFromString wraps gst_gl_texture_target_from_string +// +// The function takes the following parameters: +// +// - str string: a string equivalent to one of the GST_GL_TEXTURE_TARGET_*_STR values +// +// The function returns the following values: +// +// - goret GLTextureTarget +func GLTextureTargetFromString(str string) GLTextureTarget { + var carg1 *C.gchar // in, none, string + var cret C.GstGLTextureTarget // return, none, casted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(str))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_gl_texture_target_from_string(carg1) + runtime.KeepAlive(str) + + var goret GLTextureTarget + + goret = GLTextureTarget(cret) + + return goret +} + +// GLTextureTargetToBufferPoolOption wraps gst_gl_texture_target_to_buffer_pool_option +// +// The function takes the following parameters: +// +// - target GLTextureTarget: a #GstGLTextureTarget +// +// The function returns the following values: +// +// - goret string (nullable) +func GLTextureTargetToBufferPoolOption(target GLTextureTarget) string { + var carg1 C.GstGLTextureTarget // in, none, casted + var cret *C.gchar // return, none, string, nullable-string + + carg1 = C.GstGLTextureTarget(target) + + cret = C.gst_gl_texture_target_to_buffer_pool_option(carg1) + runtime.KeepAlive(target) + + var goret string + + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } + + return goret +} + +// GLTextureTargetToGL wraps gst_gl_texture_target_to_gl +// +// The function takes the following parameters: +// +// - target GLTextureTarget: a #GstGLTextureTarget +// +// The function returns the following values: +// +// - goret uint +func GLTextureTargetToGL(target GLTextureTarget) uint { + var carg1 C.GstGLTextureTarget // in, none, casted + var cret C.guint // return, none, casted + + carg1 = C.GstGLTextureTarget(target) + + cret = C.gst_gl_texture_target_to_gl(carg1) + runtime.KeepAlive(target) + + var goret uint + + goret = uint(cret) + + return goret +} + +// GLTextureTargetToString wraps gst_gl_texture_target_to_string +// +// The function takes the following parameters: +// +// - target GLTextureTarget: a #GstGLTextureTarget +// +// The function returns the following values: +// +// - goret string (nullable) +func GLTextureTargetToString(target GLTextureTarget) string { + var carg1 C.GstGLTextureTarget // in, none, casted + var cret *C.gchar // return, none, string, nullable-string + + carg1 = C.GstGLTextureTarget(target) + + cret = C.gst_gl_texture_target_to_string(carg1) + runtime.KeepAlive(target) + + var goret string + + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } + + return goret +} + // GLUploadReturn wraps GstGLUploadReturn type GLUploadReturn C.int @@ -784,6 +1263,22 @@ func (e GLWindowError) String() string { } } +// GLWindowErrorQuark wraps gst_gl_window_error_quark +// The function returns the following values: +// +// - goret glib.Quark +func GLWindowErrorQuark() glib.Quark { + var cret C.GQuark // return, none, casted, alias + + cret = C.gst_gl_window_error_quark() + + var goret glib.Quark + + goret = glib.Quark(cret) + + return goret +} + // GLAPI wraps GstGLAPI type GLAPI C.gint @@ -857,6 +1352,58 @@ func (f GLAPI) String() string { return "GLAPI(" + strings.Join(parts, "|") + ")" } +// GLAPIFromString wraps gst_gl_api_from_string +// +// The function takes the following parameters: +// +// - apiS string: a space separated string of OpenGL apis +// +// The function returns the following values: +// +// - goret GLAPI +func GLAPIFromString(apiS string) GLAPI { + var carg1 *C.gchar // in, none, string + var cret C.GstGLAPI // return, none, casted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(apiS))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_gl_api_from_string(carg1) + runtime.KeepAlive(apiS) + + var goret GLAPI + + goret = GLAPI(cret) + + return goret +} + +// GLAPIToString wraps gst_gl_api_to_string +// +// The function takes the following parameters: +// +// - api GLAPI: a #GstGLAPI to stringify +// +// The function returns the following values: +// +// - goret string +func GLAPIToString(api GLAPI) string { + var carg1 C.GstGLAPI // in, none, casted + var cret *C.gchar // return, full, string + + carg1 = C.GstGLAPI(api) + + cret = C.gst_gl_api_to_string(carg1) + runtime.KeepAlive(api) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + + return goret +} + // GLBaseMemoryTransfer wraps GstGLBaseMemoryTransfer type GLBaseMemoryTransfer C.gint @@ -961,6 +1508,33 @@ func (f GLConfigSurfaceType) String() string { return "GLConfigSurfaceType(" + strings.Join(parts, "|") + ")" } +// GLConfigSurfaceTypeToString wraps gst_gl_config_surface_type_to_string +// +// The function takes the following parameters: +// +// - surfaceType GLConfigSurfaceType: the #GstGLConfigSurfaceType +// +// The function returns the following values: +// +// - goret string (nullable) +func GLConfigSurfaceTypeToString(surfaceType GLConfigSurfaceType) string { + var carg1 C.GstGLConfigSurfaceType // in, none, casted + var cret *C.gchar // return, none, string, nullable-string + + carg1 = C.GstGLConfigSurfaceType(surfaceType) + + cret = C.gst_gl_config_surface_type_to_string(carg1) + runtime.KeepAlive(surfaceType) + + var goret string + + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } + + return goret +} + // GLDisplayType wraps GstGLDisplayType type GLDisplayType C.gint @@ -1177,6 +1751,58 @@ func (f GLPlatform) String() string { return "GLPlatform(" + strings.Join(parts, "|") + ")" } +// GLPlatformFromString wraps gst_gl_platform_from_string +// +// The function takes the following parameters: +// +// - platformS string: a space separated string of OpenGL platformss +// +// The function returns the following values: +// +// - goret GLPlatform +func GLPlatformFromString(platformS string) GLPlatform { + var carg1 *C.gchar // in, none, string + var cret C.GstGLPlatform // return, none, casted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(platformS))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_gl_platform_from_string(carg1) + runtime.KeepAlive(platformS) + + var goret GLPlatform + + goret = GLPlatform(cret) + + return goret +} + +// GLPlatformToString wraps gst_gl_platform_to_string +// +// The function takes the following parameters: +// +// - platform GLPlatform: a #GstGLPlatform to stringify +// +// The function returns the following values: +// +// - goret string +func GLPlatformToString(platform GLPlatform) string { + var carg1 C.GstGLPlatform // in, none, casted + var cret *C.gchar // return, full, string + + carg1 = C.GstGLPlatform(platform) + + cret = C.gst_gl_platform_to_string(carg1) + runtime.KeepAlive(platform) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + + return goret +} + // GLSLProfile wraps GstGLSLProfile // // GLSL profiles @@ -1244,6 +1870,59 @@ func (f GLSLProfile) String() string { return "GLSLProfile(" + strings.Join(parts, "|") + ")" } +// GLSLProfileFromString wraps gst_glsl_profile_from_string +// +// The function takes the following parameters: +// +// - str string: a GLSL version string +// +// The function returns the following values: +// +// - goret GLSLProfile +func GLSLProfileFromString(str string) GLSLProfile { + var carg1 *C.gchar // in, none, string + var cret C.GstGLSLProfile // return, none, casted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(str))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_glsl_profile_from_string(carg1) + runtime.KeepAlive(str) + + var goret GLSLProfile + + goret = GLSLProfile(cret) + + return goret +} + +// GLSLProfileToString wraps gst_glsl_profile_to_string +// +// The function takes the following parameters: +// +// - profile GLSLProfile: a #GstGLSLProfile +// +// The function returns the following values: +// +// - goret string (nullable) +func GLSLProfileToString(profile GLSLProfile) string { + var carg1 C.GstGLSLProfile // in, none, casted + var cret *C.gchar // return, none, string, nullable-string + + carg1 = C.GstGLSLProfile(profile) + + cret = C.gst_glsl_profile_to_string(carg1) + runtime.KeepAlive(profile) + + var goret string + + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } + + return goret +} + // GLAsyncDebugLogGetMessage wraps GstGLAsyncDebugLogGetMessage type GLAsyncDebugLogGetMessage func() (goret string) @@ -1287,10 +1966,10 @@ func BufferAddGLSyncMeta(_context GLContext, buffer *gst.Buffer) *GLSyncMeta { // // The function returns the following values: // -// - goret *GLAllocationParams +// - goret *GLAllocationParams (nullable) func BufferPoolConfigGetGLAllocationParams(config *gst.Structure) *GLAllocationParams { var carg1 *C.GstStructure // in, none, converted - var cret *C.GstGLAllocationParams // return, full, converted + var cret *C.GstGLAllocationParams // return, full, converted, nullable carg1 = (*C.GstStructure)(gst.UnsafeStructureToGlibNone(config)) @@ -1299,7 +1978,9 @@ func BufferPoolConfigGetGLAllocationParams(config *gst.Structure) *GLAllocationP var goret *GLAllocationParams - goret = UnsafeGLAllocationParamsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeGLAllocationParamsFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -2064,7 +2745,7 @@ type GLBaseFilter interface { // GetGLContext wraps gst_gl_base_filter_get_gl_context // The function returns the following values: // - // - goret GLContext + // - goret GLContext (nullable) GetGLContext() GLContext } @@ -2135,10 +2816,10 @@ func (filter *GLBaseFilterInstance) FindGLContext() bool { // GetGLContext wraps gst_gl_base_filter_get_gl_context // The function returns the following values: // -// - goret GLContext +// - goret GLContext (nullable) func (filter *GLBaseFilterInstance) GetGLContext() GLContext { var carg0 *C.GstGLBaseFilter // in, none, converted - var cret *C.GstGLContext // return, full, converted + var cret *C.GstGLContext // return, full, converted, nullable carg0 = (*C.GstGLBaseFilter)(UnsafeGLBaseFilterToGlibNone(filter)) @@ -2147,7 +2828,9 @@ func (filter *GLBaseFilterInstance) GetGLContext() GLContext { var goret GLContext - goret = UnsafeGLContextFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeGLContextFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -2228,7 +2911,7 @@ type GLBaseMixer interface { // GetGLContext wraps gst_gl_base_mixer_get_gl_context // The function returns the following values: // - // - goret GLContext + // - goret GLContext (nullable) GetGLContext() GLContext } @@ -2279,10 +2962,10 @@ func UnsafeGLBaseMixerToGlibFull(c GLBaseMixer) unsafe.Pointer { // GetGLContext wraps gst_gl_base_mixer_get_gl_context // The function returns the following values: // -// - goret GLContext +// - goret GLContext (nullable) func (mix *GLBaseMixerInstance) GetGLContext() GLContext { var carg0 *C.GstGLBaseMixer // in, none, converted - var cret *C.GstGLContext // return, full, converted + var cret *C.GstGLContext // return, full, converted, nullable carg0 = (*C.GstGLBaseMixer)(UnsafeGLBaseMixerToGlibNone(mix)) @@ -2291,7 +2974,9 @@ func (mix *GLBaseMixerInstance) GetGLContext() GLContext { var goret GLContext - goret = UnsafeGLContextFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeGLContextFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -2500,7 +3185,7 @@ type GLBufferPool interface { // GetGLAllocationParams wraps gst_gl_buffer_pool_get_gl_allocation_params // The function returns the following values: // - // - goret *GLAllocationParams + // - goret *GLAllocationParams (nullable) // // The returned #GstGLAllocationParams will by %NULL before the first successful // call to gst_buffer_pool_set_config(). Subsequent successful calls to @@ -2577,7 +3262,7 @@ func NewGLBufferPool(_context GLContext) gst.BufferPool { // GetGLAllocationParams wraps gst_gl_buffer_pool_get_gl_allocation_params // The function returns the following values: // -// - goret *GLAllocationParams +// - goret *GLAllocationParams (nullable) // // The returned #GstGLAllocationParams will by %NULL before the first successful // call to gst_buffer_pool_set_config(). Subsequent successful calls to @@ -2585,7 +3270,7 @@ func NewGLBufferPool(_context GLContext) gst.BufferPool { // #GstGLAllocationParams which may or may not contain the same information. func (pool *GLBufferPoolInstance) GetGLAllocationParams() *GLAllocationParams { var carg0 *C.GstGLBufferPool // in, none, converted - var cret *C.GstGLAllocationParams // return, full, converted + var cret *C.GstGLAllocationParams // return, full, converted, nullable carg0 = (*C.GstGLBufferPool)(UnsafeGLBufferPoolToGlibNone(pool)) @@ -2594,7 +3279,9 @@ func (pool *GLBufferPoolInstance) GetGLAllocationParams() *GLAllocationParams { var goret *GLAllocationParams - goret = UnsafeGLAllocationParamsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeGLAllocationParamsFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -2642,7 +3329,7 @@ type GLColorConvert interface { // // The function returns the following values: // - // - goret *gst.Buffer + // - goret *gst.Buffer (nullable) // // Converts the data contained by @inbuf using the formats specified by the // #GstCaps passed to gst_gl_color_convert_set_caps() @@ -2903,14 +3590,14 @@ func (convert *GLColorConvertInstance) DecideAllocation(query *gst.Query) bool { // // The function returns the following values: // -// - goret *gst.Buffer +// - goret *gst.Buffer (nullable) // // Converts the data contained by @inbuf using the formats specified by the // #GstCaps passed to gst_gl_color_convert_set_caps() func (convert *GLColorConvertInstance) Perform(inbuf *gst.Buffer) *gst.Buffer { var carg0 *C.GstGLColorConvert // in, none, converted var carg1 *C.GstBuffer // in, none, converted - var cret *C.GstBuffer // return, full, converted + var cret *C.GstBuffer // return, full, converted, nullable carg0 = (*C.GstGLColorConvert)(UnsafeGLColorConvertToGlibNone(convert)) carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(inbuf)) @@ -2921,7 +3608,9 @@ func (convert *GLColorConvertInstance) Perform(inbuf *gst.Buffer) *gst.Buffer { var goret *gst.Buffer - goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -3124,7 +3813,7 @@ type GLContext interface { // GetConfig wraps gst_gl_context_get_config // The function returns the following values: // - // - goret *gst.Structure + // - goret *gst.Structure (nullable) // // Retrieve the OpenGL configuration for this context. The context must // have been successfully created for this function to return a valid value. @@ -3176,7 +3865,7 @@ type GLContext interface { // GetWindow wraps gst_gl_context_get_window // The function returns the following values: // - // - goret GLWindow + // - goret GLWindow (nullable) GetWindow() GLWindow // IsShared wraps gst_gl_context_is_shared // The function returns the following values: @@ -3337,17 +4026,19 @@ func NewGLContext(display GLDisplay) GLContext { // GLContextGetCurrent wraps gst_gl_context_get_current // The function returns the following values: // -// - goret GLContext +// - goret GLContext (nullable) // // See also gst_gl_context_activate(). func GLContextGetCurrent() GLContext { - var cret *C.GstGLContext // return, none, converted + var cret *C.GstGLContext // return, none, converted, nullable cret = C.gst_gl_context_get_current() var goret GLContext - goret = UnsafeGLContextFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeGLContextFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -3699,7 +4390,7 @@ func (_context *GLContextInstance) FillInfo() (bool, error) { // GetConfig wraps gst_gl_context_get_config // The function returns the following values: // -// - goret *gst.Structure +// - goret *gst.Structure (nullable) // // Retrieve the OpenGL configuration for this context. The context must // have been successfully created for this function to return a valid value. @@ -3708,7 +4399,7 @@ func (_context *GLContextInstance) FillInfo() (bool, error) { // return %NULL when not supported. func (_context *GLContextInstance) GetConfig() *gst.Structure { var carg0 *C.GstGLContext // in, none, converted - var cret *C.GstStructure // return, full, converted + var cret *C.GstStructure // return, full, converted, nullable carg0 = (*C.GstGLContext)(UnsafeGLContextToGlibNone(_context)) @@ -3717,7 +4408,9 @@ func (_context *GLContextInstance) GetConfig() *gst.Structure { var goret *gst.Structure - goret = gst.UnsafeStructureFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeStructureFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -3847,10 +4540,10 @@ func (_context *GLContextInstance) GetGLVersion() (int, int) { // GetWindow wraps gst_gl_context_get_window // The function returns the following values: // -// - goret GLWindow +// - goret GLWindow (nullable) func (_context *GLContextInstance) GetWindow() GLWindow { var carg0 *C.GstGLContext // in, none, converted - var cret *C.GstGLWindow // return, full, converted + var cret *C.GstGLWindow // return, full, converted, nullable carg0 = (*C.GstGLContext)(UnsafeGLContextToGlibNone(_context)) @@ -3859,7 +4552,9 @@ func (_context *GLContextInstance) GetWindow() GLWindow { var goret GLWindow - goret = UnsafeGLWindowFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeGLWindowFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -4161,7 +4856,7 @@ type GLDisplay interface { // CreateWindow wraps gst_gl_display_create_window // The function returns the following values: // - // - goret GLWindow + // - goret GLWindow (nullable) CreateWindow() GLWindow // FilterGLApi wraps gst_gl_display_filter_gl_api // @@ -4279,7 +4974,7 @@ func NewGLDisplay() GLDisplay { // // The function returns the following values: // -// - goret GLDisplay +// - goret GLDisplay (nullable) // // Will always return a #GstGLDisplay of a single type. This differs from // gst_gl_display_new() and the seemingly equivalent call @@ -4287,7 +4982,7 @@ func NewGLDisplay() GLDisplay { // may return NULL. func NewGLDisplayWithType(typ GLDisplayType) GLDisplay { var carg1 C.GstGLDisplayType // in, none, casted - var cret *C.GstGLDisplay // return, full, converted + var cret *C.GstGLDisplay // return, full, converted, nullable carg1 = C.GstGLDisplayType(typ) @@ -4296,7 +4991,9 @@ func NewGLDisplayWithType(typ GLDisplayType) GLDisplay { var goret GLDisplay - goret = UnsafeGLDisplayFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeGLDisplayFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -4378,10 +5075,10 @@ func (display *GLDisplayInstance) CreateContext(otherContext GLContext) (GLConte // CreateWindow wraps gst_gl_display_create_window // The function returns the following values: // -// - goret GLWindow +// - goret GLWindow (nullable) func (display *GLDisplayInstance) CreateWindow() GLWindow { var carg0 *C.GstGLDisplay // in, none, converted - var cret *C.GstGLWindow // return, full, converted + var cret *C.GstGLWindow // return, full, converted, nullable carg0 = (*C.GstGLDisplay)(UnsafeGLDisplayToGlibNone(display)) @@ -4390,7 +5087,9 @@ func (display *GLDisplayInstance) CreateWindow() GLWindow { var goret GLWindow - goret = UnsafeGLWindowFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeGLWindowFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -8179,7 +8878,7 @@ type GLViewConvert interface { // // The function returns the following values: // - // - goret *gst.Buffer + // - goret *gst.Buffer (nullable) // // Converts the data contained by @inbuf using the formats specified by the // #GstCaps passed to gst_gl_view_convert_set_caps() @@ -8365,14 +9064,14 @@ func (viewconvert *GLViewConvertInstance) GetOutput() (*gst.Buffer, gst.FlowRetu // // The function returns the following values: // -// - goret *gst.Buffer +// - goret *gst.Buffer (nullable) // // Converts the data contained by @inbuf using the formats specified by the // #GstCaps passed to gst_gl_view_convert_set_caps() func (viewconvert *GLViewConvertInstance) Perform(inbuf *gst.Buffer) *gst.Buffer { var carg0 *C.GstGLViewConvert // in, none, converted var carg1 *C.GstBuffer // in, none, converted - var cret *C.GstBuffer // return, full, converted + var cret *C.GstBuffer // return, full, converted, nullable carg0 = (*C.GstGLViewConvert)(UnsafeGLViewConvertToGlibNone(viewconvert)) carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(inbuf)) @@ -8383,7 +9082,9 @@ func (viewconvert *GLViewConvertInstance) Perform(inbuf *gst.Buffer) *gst.Buffer var goret *gst.Buffer - goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -9532,11 +10233,11 @@ func UnsafeGLBaseMemoryToGlibFull(g *GLBaseMemory) unsafe.Pointer { // // The function returns the following values: // -// - goret *GLBaseMemory +// - goret *GLBaseMemory (nullable) 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 + var cret *C.GstGLBaseMemory // return, full, converted, nullable carg1 = (*C.GstGLBaseMemoryAllocator)(UnsafeGLBaseMemoryAllocatorToGlibNone(allocator)) carg2 = (*C.GstGLAllocationParams)(UnsafeGLAllocationParamsToGlibNone(params)) @@ -9547,7 +10248,9 @@ func GLBaseMemoryAlloc(allocator GLBaseMemoryAllocator, params *GLAllocationPara var goret *GLBaseMemory - goret = UnsafeGLBaseMemoryFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeGLBaseMemoryFromGlibFull(unsafe.Pointer(cret)) + } return goret } diff --git a/pkg/gstnet/gstnet.gen.go b/pkg/gstnet/gstnet.gen.go index ed68ae2..e1579a7 100644 --- a/pkg/gstnet/gstnet.gen.go +++ b/pkg/gstnet/gstnet.gen.go @@ -158,12 +158,12 @@ func BufferAddNetControlMessageMeta(buffer *gst.Buffer, message gio.SocketContro // // The function returns the following values: // -// - goret *NetAddressMeta +// - goret *NetAddressMeta (nullable) // // Find the #GstNetAddressMeta on @buffer. func BufferGetNetAddressMeta(buffer *gst.Buffer) *NetAddressMeta { var carg1 *C.GstBuffer // in, none, converted - var cret *C.GstNetAddressMeta // return, none, converted + var cret *C.GstNetAddressMeta // return, none, converted, nullable carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) @@ -172,7 +172,9 @@ func BufferGetNetAddressMeta(buffer *gst.Buffer) *NetAddressMeta { var goret *NetAddressMeta - goret = UnsafeNetAddressMetaFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeNetAddressMetaFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -631,14 +633,14 @@ func UnsafeNetTimeProviderToGlibFull(c NetTimeProvider) unsafe.Pointer { // // The function returns the following values: // -// - goret NetTimeProvider +// - goret NetTimeProvider (nullable) // // Allows network clients to get the current time of @clock. func NewNetTimeProvider(clock gst.Clock, address string, port int) NetTimeProvider { var carg1 *C.GstClock // in, none, converted var carg2 *C.gchar // in, none, string, nullable-string var carg3 C.gint // in, none, casted - var cret *C.GstNetTimeProvider // return, full, converted + var cret *C.GstNetTimeProvider // return, full, converted, nullable carg1 = (*C.GstClock)(gst.UnsafeClockToGlibNone(clock)) if address != "" { @@ -654,7 +656,9 @@ func NewNetTimeProvider(clock gst.Clock, address string, port int) NetTimeProvid var goret NetTimeProvider - goret = UnsafeNetTimeProviderFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeNetTimeProviderFromGlibFull(unsafe.Pointer(cret)) + } return goret } diff --git a/pkg/gstpbutils/gstpbutils.gen.go b/pkg/gstpbutils/gstpbutils.gen.go index daaef6c..9aa54a4 100644 --- a/pkg/gstpbutils/gstpbutils.gen.go +++ b/pkg/gstpbutils/gstpbutils.gen.go @@ -312,6 +312,36 @@ func (e InstallPluginsReturn) String() string { } } +// InstallPluginsReturnGetName wraps gst_install_plugins_return_get_name +// +// The function takes the following parameters: +// +// - ret InstallPluginsReturn: the return status code +// +// The function returns the following values: +// +// - goret string +// +// Convenience function to return the descriptive string associated +// with a status code. This function returns English strings and +// should not be used for user messages. It is here only to assist +// in debugging. +func InstallPluginsReturnGetName(ret InstallPluginsReturn) string { + var carg1 C.GstInstallPluginsReturn // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstInstallPluginsReturn(ret) + + cret = C.gst_install_plugins_return_get_name(carg1) + runtime.KeepAlive(ret) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + // DiscovererSerializeFlags wraps GstDiscovererSerializeFlags // // You can use these flags to control what is serialized by @@ -597,7 +627,7 @@ func CodecUtilsAacGetIndexFromSampleRate(rate uint) int { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Determines the level of a stream as defined in ISO/IEC 14496-3. For AAC LC // streams, the constraints from the AAC audio profile are applied. For AAC @@ -615,7 +645,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 + var cret *C.gchar // return, none, string, nullable-string _ = audioConfig _ = carg1 @@ -627,7 +657,9 @@ func CodecUtilsAacGetLevel(audioConfig []uint8) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -642,7 +674,7 @@ func CodecUtilsAacGetLevel(audioConfig []uint8) string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Returns the profile of the given AAC stream as a string. The profile is // normally determined using the AudioObjectType field which is in the first @@ -650,7 +682,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 + var cret *C.gchar // return, none, string, nullable-string _ = audioConfig _ = carg1 @@ -662,7 +694,9 @@ func CodecUtilsAacGetProfile(audioConfig []uint8) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -738,7 +772,7 @@ func CodecUtilsAacGetSampleRateFromIndex(srIdx uint) uint { // // The function returns the following values: // -// - goret *gst.Caps +// - goret *gst.Caps (nullable) // // Converts a RFC 6381 compatible codec string to #GstCaps. More than one codec // string can be present (separated by `,`). @@ -746,7 +780,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 - var cret *C.GstCaps // return, full, converted + var cret *C.GstCaps // return, full, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(codecsField))) defer C.free(unsafe.Pointer(carg1)) @@ -756,7 +790,9 @@ func CodecUtilsCapsFromMIMECodec(codecsField string) *gst.Caps { var goret *gst.Caps - goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -769,7 +805,7 @@ func CodecUtilsCapsFromMIMECodec(codecsField string) *gst.Caps { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Converts @caps to a RFC 6381 compatible codec string if possible. // @@ -779,7 +815,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 + var cret *C.gchar // return, full, string, nullable-string carg1 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(caps)) @@ -788,8 +824,10 @@ func CodecUtilsCapsGetMIMECodec(caps *gst.Caps) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -841,7 +879,7 @@ func CodecUtilsH264CapsSetLevelAndProfile(caps *gst.Caps, sps []uint8) bool { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Converts the level indication (level_idc) in the stream's // sequence parameter set into a string. The SPS is expected to have the @@ -849,7 +887,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 + var cret *C.gchar // return, none, string, nullable-string _ = sps _ = carg1 @@ -861,7 +899,9 @@ func CodecUtilsH264GetLevel(sps []uint8) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -902,7 +942,7 @@ func CodecUtilsH264GetLevelIdc(level string) uint8 { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Converts the profile indication (profile_idc) in the stream's // sequence parameter set into a string. The SPS is expected to have the @@ -921,7 +961,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 + var cret *C.gchar // return, none, string, nullable-string _ = sps _ = carg1 @@ -933,7 +973,9 @@ func CodecUtilsH264GetProfile(sps []uint8) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -1039,7 +1081,7 @@ func CodecUtilsH265CapsSetLevelTierAndProfile(caps *gst.Caps, profileTierLevel [ // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Converts the level indication (general_level_idc) in the stream's // profile_tier_level structure into a string. The profiel_tier_level is @@ -1047,7 +1089,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 + var cret *C.gchar // return, none, string, nullable-string _ = profileTierLevel _ = carg1 @@ -1059,7 +1101,9 @@ func CodecUtilsH265GetLevel(profileTierLevel []uint8) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -1101,7 +1145,7 @@ func CodecUtilsH265GetLevelIdc(level string) uint8 { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Converts the profile indication (general_profile_idc) in the stream's // profile_level_tier structure into a string. The profile_tier_level is @@ -1122,7 +1166,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 + var cret *C.gchar // return, none, string, nullable-string _ = profileTierLevel _ = carg1 @@ -1134,7 +1178,9 @@ func CodecUtilsH265GetProfile(profileTierLevel []uint8) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -1148,7 +1194,7 @@ func CodecUtilsH265GetProfile(profileTierLevel []uint8) string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Converts the tier indication (general_tier_flag) in the stream's // profile_tier_level structure into a string. The profile_tier_level @@ -1156,7 +1202,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 + var cret *C.gchar // return, none, string, nullable-string _ = profileTierLevel _ = carg1 @@ -1168,7 +1214,9 @@ func CodecUtilsH265GetTier(profileTierLevel []uint8) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -1223,7 +1271,7 @@ func CodecUtilsMpeg4VideoCapsSetLevelAndProfile(caps *gst.Caps, visObjSeq []uint // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Converts the level indication in the stream's visual object sequence into // a string. @vis_obj_seq is expected to be the data following the visual @@ -1232,7 +1280,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 + var cret *C.gchar // return, none, string, nullable-string _ = visObjSeq _ = carg1 @@ -1244,7 +1292,9 @@ func CodecUtilsMpeg4VideoGetLevel(visObjSeq []uint8) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -1258,7 +1308,7 @@ func CodecUtilsMpeg4VideoGetLevel(visObjSeq []uint8) string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Converts the profile indication in the stream's visual object sequence into // a string. @vis_obj_seq is expected to be the data following the visual @@ -1267,7 +1317,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 + var cret *C.gchar // return, none, string, nullable-string _ = visObjSeq _ = carg1 @@ -1279,7 +1329,9 @@ func CodecUtilsMpeg4VideoGetProfile(visObjSeq []uint8) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -1293,14 +1345,14 @@ func CodecUtilsMpeg4VideoGetProfile(visObjSeq []uint8) string { // // The function returns the following values: // -// - goret *gst.Caps +// - goret *gst.Caps (nullable) // // Creates Opus caps from the given OpusHead @header and comment header // @comments. func CodecUtilsOpusCreateCapsFromHeader(header *gst.Buffer, comments *gst.Buffer) *gst.Caps { var carg1 *C.GstBuffer // in, none, converted var carg2 *C.GstBuffer // in, none, converted, nullable - var cret *C.GstCaps // return, full, converted + var cret *C.GstCaps // return, full, converted, nullable carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(header)) if comments != nil { @@ -1313,7 +1365,9 @@ func CodecUtilsOpusCreateCapsFromHeader(header *gst.Buffer, comments *gst.Buffer var goret *gst.Caps - goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1806,7 +1860,7 @@ func MissingPluginMessageGetDescription(msg *gst.Message) string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Returns an opaque string containing all the details about the missing // element to be passed to an external installer called via @@ -1816,7 +1870,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 + var cret *C.gchar // return, full, string, nullable-string carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) @@ -1825,8 +1879,10 @@ func MissingPluginMessageGetInstallerDetail(msg *gst.Message) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -2053,7 +2109,7 @@ func PbUtilsGetCapsDescriptionFlags(caps *gst.Caps) PbUtilsCapsDescriptionFlags // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Returns a localised (as far as this is possible) string describing the // media format specified in @caps, for use in error dialogs or other messages @@ -2063,7 +2119,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 + var cret *C.gchar // return, full, string, nullable-string carg1 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(caps)) @@ -2072,8 +2128,10 @@ func PbUtilsGetCodecDescription(caps *gst.Caps) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -2186,12 +2244,12 @@ func PbUtilsGetEncoderDescription(caps *gst.Caps) string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 + var cret *C.gchar // return, full, string, nullable-string carg1 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(caps)) @@ -2200,8 +2258,10 @@ func PbUtilsGetFileExtensionFromCaps(caps *gst.Caps) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -2772,7 +2832,7 @@ type DiscovererInfo interface { // GetMisc wraps gst_discoverer_info_get_misc // The function returns the following values: // - // - goret *gst.Structure + // - goret *gst.Structure (nullable) // // // Deprecated: This functions is deprecated since version 1.4, use @@ -2798,7 +2858,7 @@ type DiscovererInfo interface { // GetStreamInfo wraps gst_discoverer_info_get_stream_info // The function returns the following values: // - // - goret DiscovererStreamInfo + // - goret DiscovererStreamInfo (nullable) GetStreamInfo() DiscovererStreamInfo // GetStreamList wraps gst_discoverer_info_get_stream_list // The function returns the following values: @@ -2828,7 +2888,7 @@ type DiscovererInfo interface { // GetTags wraps gst_discoverer_info_get_tags // The function returns the following values: // - // - goret *gst.TagList + // - goret *gst.TagList (nullable) // // // Deprecated: (since 1.20.0) Use gst_discoverer_{container,stream}_info_get_tags() instead. @@ -2836,7 +2896,7 @@ type DiscovererInfo interface { // GetToc wraps gst_discoverer_info_get_toc // The function returns the following values: // - // - goret *gst.Toc + // - goret *gst.Toc (nullable) GetToc() *gst.Toc // GetURI wraps gst_discoverer_info_get_uri // The function returns the following values: @@ -3009,14 +3069,14 @@ func (info *DiscovererInfoInstance) GetLive() bool { // GetMisc wraps gst_discoverer_info_get_misc // The function returns the following values: // -// - goret *gst.Structure +// - goret *gst.Structure (nullable) // // // Deprecated: This functions is deprecated since version 1.4, use // #gst_discoverer_info_get_missing_elements_installer_details func (info *DiscovererInfoInstance) GetMisc() *gst.Structure { var carg0 *C.GstDiscovererInfo // in, none, converted - var cret *C.GstStructure // return, none, converted + var cret *C.GstStructure // return, none, converted, nullable carg0 = (*C.GstDiscovererInfo)(UnsafeDiscovererInfoToGlibNone(info)) @@ -3025,7 +3085,9 @@ func (info *DiscovererInfoInstance) GetMisc() *gst.Structure { var goret *gst.Structure - goret = gst.UnsafeStructureFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeStructureFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -3099,10 +3161,10 @@ func (info *DiscovererInfoInstance) GetSeekable() bool { // GetStreamInfo wraps gst_discoverer_info_get_stream_info // The function returns the following values: // -// - goret DiscovererStreamInfo +// - goret DiscovererStreamInfo (nullable) func (info *DiscovererInfoInstance) GetStreamInfo() DiscovererStreamInfo { var carg0 *C.GstDiscovererInfo // in, none, converted - var cret *C.GstDiscovererStreamInfo // return, full, converted + var cret *C.GstDiscovererStreamInfo // return, full, converted, nullable carg0 = (*C.GstDiscovererInfo)(UnsafeDiscovererInfoToGlibNone(info)) @@ -3111,7 +3173,9 @@ func (info *DiscovererInfoInstance) GetStreamInfo() DiscovererStreamInfo { var goret DiscovererStreamInfo - goret = UnsafeDiscovererStreamInfoFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDiscovererStreamInfoFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -3213,13 +3277,13 @@ func (info *DiscovererInfoInstance) GetSubtitleStreams() []DiscovererSubtitleInf // GetTags wraps gst_discoverer_info_get_tags // The function returns the following values: // -// - goret *gst.TagList +// - goret *gst.TagList (nullable) // // // Deprecated: (since 1.20.0) Use gst_discoverer_{container,stream}_info_get_tags() instead. func (info *DiscovererInfoInstance) GetTags() *gst.TagList { var carg0 *C.GstDiscovererInfo // in, none, converted - var cret *C.GstTagList // return, none, converted + var cret *C.GstTagList // return, none, converted, nullable carg0 = (*C.GstDiscovererInfo)(UnsafeDiscovererInfoToGlibNone(info)) @@ -3228,7 +3292,9 @@ func (info *DiscovererInfoInstance) GetTags() *gst.TagList { var goret *gst.TagList - goret = gst.UnsafeTagListFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeTagListFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -3236,10 +3302,10 @@ func (info *DiscovererInfoInstance) GetTags() *gst.TagList { // GetToc wraps gst_discoverer_info_get_toc // The function returns the following values: // -// - goret *gst.Toc +// - goret *gst.Toc (nullable) func (info *DiscovererInfoInstance) GetToc() *gst.Toc { var carg0 *C.GstDiscovererInfo // in, none, converted - var cret *C.GstToc // return, none, converted + var cret *C.GstToc // return, none, converted, nullable carg0 = (*C.GstDiscovererInfo)(UnsafeDiscovererInfoToGlibNone(info)) @@ -3248,7 +3314,9 @@ func (info *DiscovererInfoInstance) GetToc() *gst.Toc { var goret *gst.Toc - goret = gst.UnsafeTocFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeTocFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -3334,12 +3402,12 @@ type DiscovererStreamInfo interface { // GetCaps wraps gst_discoverer_stream_info_get_caps // The function returns the following values: // - // - goret *gst.Caps + // - goret *gst.Caps (nullable) GetCaps() *gst.Caps // GetMisc wraps gst_discoverer_stream_info_get_misc // The function returns the following values: // - // - goret *gst.Structure + // - goret *gst.Structure (nullable) // // // Deprecated: This functions is deprecated since version 1.4, use @@ -3348,17 +3416,17 @@ type DiscovererStreamInfo interface { // GetNext wraps gst_discoverer_stream_info_get_next // The function returns the following values: // - // - goret DiscovererStreamInfo + // - goret DiscovererStreamInfo (nullable) GetNext() DiscovererStreamInfo // GetPrevious wraps gst_discoverer_stream_info_get_previous // The function returns the following values: // - // - goret DiscovererStreamInfo + // - goret DiscovererStreamInfo (nullable) GetPrevious() DiscovererStreamInfo // GetStreamID wraps gst_discoverer_stream_info_get_stream_id // The function returns the following values: // - // - goret string + // - goret string (nullable) GetStreamID() string // GetStreamNumber wraps gst_discoverer_stream_info_get_stream_number // The function returns the following values: @@ -3373,12 +3441,12 @@ type DiscovererStreamInfo interface { // GetTags wraps gst_discoverer_stream_info_get_tags // The function returns the following values: // - // - goret *gst.TagList + // - goret *gst.TagList (nullable) GetTags() *gst.TagList // GetToc wraps gst_discoverer_stream_info_get_toc // The function returns the following values: // - // - goret *gst.Toc + // - goret *gst.Toc (nullable) GetToc() *gst.Toc } @@ -3419,10 +3487,10 @@ func UnsafeDiscovererStreamInfoToGlibFull(c DiscovererStreamInfo) unsafe.Pointer // GetCaps wraps gst_discoverer_stream_info_get_caps // The function returns the following values: // -// - goret *gst.Caps +// - goret *gst.Caps (nullable) func (info *DiscovererStreamInfoInstance) GetCaps() *gst.Caps { var carg0 *C.GstDiscovererStreamInfo // in, none, converted - var cret *C.GstCaps // return, full, converted + var cret *C.GstCaps // return, full, converted, nullable carg0 = (*C.GstDiscovererStreamInfo)(UnsafeDiscovererStreamInfoToGlibNone(info)) @@ -3431,7 +3499,9 @@ func (info *DiscovererStreamInfoInstance) GetCaps() *gst.Caps { var goret *gst.Caps - goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -3439,14 +3509,14 @@ func (info *DiscovererStreamInfoInstance) GetCaps() *gst.Caps { // GetMisc wraps gst_discoverer_stream_info_get_misc // The function returns the following values: // -// - goret *gst.Structure +// - goret *gst.Structure (nullable) // // // Deprecated: This functions is deprecated since version 1.4, use // #gst_discoverer_info_get_missing_elements_installer_details func (info *DiscovererStreamInfoInstance) GetMisc() *gst.Structure { var carg0 *C.GstDiscovererStreamInfo // in, none, converted - var cret *C.GstStructure // return, none, converted + var cret *C.GstStructure // return, none, converted, nullable carg0 = (*C.GstDiscovererStreamInfo)(UnsafeDiscovererStreamInfoToGlibNone(info)) @@ -3455,7 +3525,9 @@ func (info *DiscovererStreamInfoInstance) GetMisc() *gst.Structure { var goret *gst.Structure - goret = gst.UnsafeStructureFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeStructureFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -3463,10 +3535,10 @@ func (info *DiscovererStreamInfoInstance) GetMisc() *gst.Structure { // GetNext wraps gst_discoverer_stream_info_get_next // The function returns the following values: // -// - goret DiscovererStreamInfo +// - goret DiscovererStreamInfo (nullable) func (info *DiscovererStreamInfoInstance) GetNext() DiscovererStreamInfo { var carg0 *C.GstDiscovererStreamInfo // in, none, converted - var cret *C.GstDiscovererStreamInfo // return, full, converted + var cret *C.GstDiscovererStreamInfo // return, full, converted, nullable carg0 = (*C.GstDiscovererStreamInfo)(UnsafeDiscovererStreamInfoToGlibNone(info)) @@ -3475,7 +3547,9 @@ func (info *DiscovererStreamInfoInstance) GetNext() DiscovererStreamInfo { var goret DiscovererStreamInfo - goret = UnsafeDiscovererStreamInfoFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDiscovererStreamInfoFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -3483,10 +3557,10 @@ func (info *DiscovererStreamInfoInstance) GetNext() DiscovererStreamInfo { // GetPrevious wraps gst_discoverer_stream_info_get_previous // The function returns the following values: // -// - goret DiscovererStreamInfo +// - goret DiscovererStreamInfo (nullable) func (info *DiscovererStreamInfoInstance) GetPrevious() DiscovererStreamInfo { var carg0 *C.GstDiscovererStreamInfo // in, none, converted - var cret *C.GstDiscovererStreamInfo // return, full, converted + var cret *C.GstDiscovererStreamInfo // return, full, converted, nullable carg0 = (*C.GstDiscovererStreamInfo)(UnsafeDiscovererStreamInfoToGlibNone(info)) @@ -3495,7 +3569,9 @@ func (info *DiscovererStreamInfoInstance) GetPrevious() DiscovererStreamInfo { var goret DiscovererStreamInfo - goret = UnsafeDiscovererStreamInfoFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeDiscovererStreamInfoFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -3503,10 +3579,10 @@ func (info *DiscovererStreamInfoInstance) GetPrevious() DiscovererStreamInfo { // GetStreamID wraps gst_discoverer_stream_info_get_stream_id // The function returns the following values: // -// - goret string +// - goret string (nullable) func (info *DiscovererStreamInfoInstance) GetStreamID() string { var carg0 *C.GstDiscovererStreamInfo // in, none, converted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstDiscovererStreamInfo)(UnsafeDiscovererStreamInfoToGlibNone(info)) @@ -3515,7 +3591,9 @@ func (info *DiscovererStreamInfoInstance) GetStreamID() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -3563,10 +3641,10 @@ func (info *DiscovererStreamInfoInstance) GetStreamTypeNick() string { // GetTags wraps gst_discoverer_stream_info_get_tags // The function returns the following values: // -// - goret *gst.TagList +// - goret *gst.TagList (nullable) func (info *DiscovererStreamInfoInstance) GetTags() *gst.TagList { var carg0 *C.GstDiscovererStreamInfo // in, none, converted - var cret *C.GstTagList // return, none, converted + var cret *C.GstTagList // return, none, converted, nullable carg0 = (*C.GstDiscovererStreamInfo)(UnsafeDiscovererStreamInfoToGlibNone(info)) @@ -3575,7 +3653,9 @@ func (info *DiscovererStreamInfoInstance) GetTags() *gst.TagList { var goret *gst.TagList - goret = gst.UnsafeTagListFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeTagListFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -3583,10 +3663,10 @@ func (info *DiscovererStreamInfoInstance) GetTags() *gst.TagList { // GetToc wraps gst_discoverer_stream_info_get_toc // The function returns the following values: // -// - goret *gst.Toc +// - goret *gst.Toc (nullable) func (info *DiscovererStreamInfoInstance) GetToc() *gst.Toc { var carg0 *C.GstDiscovererStreamInfo // in, none, converted - var cret *C.GstToc // return, none, converted + var cret *C.GstToc // return, none, converted, nullable carg0 = (*C.GstDiscovererStreamInfo)(UnsafeDiscovererStreamInfoToGlibNone(info)) @@ -3595,7 +3675,9 @@ func (info *DiscovererStreamInfoInstance) GetToc() *gst.Toc { var goret *gst.Toc - goret = gst.UnsafeTocFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeTocFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -3619,7 +3701,7 @@ type DiscovererSubtitleInfo interface { // GetLanguage wraps gst_discoverer_subtitle_info_get_language // The function returns the following values: // - // - goret string + // - goret string (nullable) GetLanguage() string } @@ -3662,10 +3744,10 @@ func UnsafeDiscovererSubtitleInfoToGlibFull(c DiscovererSubtitleInfo) unsafe.Poi // GetLanguage wraps gst_discoverer_subtitle_info_get_language // The function returns the following values: // -// - goret string +// - goret string (nullable) func (info *DiscovererSubtitleInfoInstance) GetLanguage() string { var carg0 *C.GstDiscovererSubtitleInfo // in, none, converted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstDiscovererSubtitleInfo)(UnsafeDiscovererSubtitleInfoToGlibNone(info)) @@ -3674,7 +3756,9 @@ func (info *DiscovererSubtitleInfoInstance) GetLanguage() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -4045,17 +4129,17 @@ type EncodingProfile interface { // GetDescription wraps gst_encoding_profile_get_description // The function returns the following values: // - // - goret string + // - goret string (nullable) GetDescription() string // GetElementProperties wraps gst_encoding_profile_get_element_properties // The function returns the following values: // - // - goret *gst.Structure + // - goret *gst.Structure (nullable) GetElementProperties() *gst.Structure // GetFileExtension wraps gst_encoding_profile_get_file_extension // The function returns the following values: // - // - goret string + // - goret string (nullable) GetFileExtension() string // GetFormat wraps gst_encoding_profile_get_format // The function returns the following values: @@ -4072,7 +4156,7 @@ type EncodingProfile interface { // GetName wraps gst_encoding_profile_get_name // The function returns the following values: // - // - goret string + // - goret string (nullable) GetName() string // GetPresence wraps gst_encoding_profile_get_presence // The function returns the following values: @@ -4082,17 +4166,17 @@ type EncodingProfile interface { // GetPreset wraps gst_encoding_profile_get_preset // The function returns the following values: // - // - goret string + // - goret string (nullable) GetPreset() string // GetPresetName wraps gst_encoding_profile_get_preset_name // The function returns the following values: // - // - goret string + // - goret string (nullable) GetPresetName() string // GetRestriction wraps gst_encoding_profile_get_restriction // The function returns the following values: // - // - goret *gst.Caps + // - goret *gst.Caps (nullable) GetRestriction() *gst.Caps // GetSingleSegment wraps gst_encoding_profile_get_single_segment // The function returns the following values: @@ -4286,14 +4370,14 @@ func UnsafeEncodingProfileToGlibFull(c EncodingProfile) unsafe.Pointer { // // The function returns the following values: // -// - goret EncodingProfile +// - goret EncodingProfile (nullable) // // 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 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 + var cret *C.GstEncodingProfile // return, full, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(targetname))) defer C.free(unsafe.Pointer(carg1)) @@ -4313,7 +4397,9 @@ func EncodingProfileFind(targetname string, profilename string, category string) var goret EncodingProfile - goret = UnsafeEncodingProfileFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeEncodingProfileFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -4326,14 +4412,14 @@ func EncodingProfileFind(targetname string, profilename string, category string) // // The function returns the following values: // -// - goret EncodingProfile +// - goret EncodingProfile (nullable) // // Creates a #GstEncodingProfile matching the formats from the given // #GstDiscovererInfo. Streams other than audio or video (eg, // subtitles), are currently ignored. func EncodingProfileFromDiscoverer(info DiscovererInfo) EncodingProfile { var carg1 *C.GstDiscovererInfo // in, none, converted - var cret *C.GstEncodingProfile // return, full, converted + var cret *C.GstEncodingProfile // return, full, converted, nullable carg1 = (*C.GstDiscovererInfo)(UnsafeDiscovererInfoToGlibNone(info)) @@ -4342,7 +4428,9 @@ func EncodingProfileFromDiscoverer(info DiscovererInfo) EncodingProfile { var goret EncodingProfile - goret = UnsafeEncodingProfileFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeEncodingProfileFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -4397,10 +4485,10 @@ func (profile *EncodingProfileInstance) GetAllowDynamicOutput() bool { // GetDescription wraps gst_encoding_profile_get_description // The function returns the following values: // -// - goret string +// - goret string (nullable) func (profile *EncodingProfileInstance) GetDescription() string { var carg0 *C.GstEncodingProfile // in, none, converted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstEncodingProfile)(UnsafeEncodingProfileToGlibNone(profile)) @@ -4409,7 +4497,9 @@ func (profile *EncodingProfileInstance) GetDescription() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -4417,10 +4507,10 @@ func (profile *EncodingProfileInstance) GetDescription() string { // GetElementProperties wraps gst_encoding_profile_get_element_properties // The function returns the following values: // -// - goret *gst.Structure +// - goret *gst.Structure (nullable) func (self *EncodingProfileInstance) GetElementProperties() *gst.Structure { var carg0 *C.GstEncodingProfile // in, none, converted - var cret *C.GstStructure // return, full, converted + var cret *C.GstStructure // return, full, converted, nullable carg0 = (*C.GstEncodingProfile)(UnsafeEncodingProfileToGlibNone(self)) @@ -4429,7 +4519,9 @@ func (self *EncodingProfileInstance) GetElementProperties() *gst.Structure { var goret *gst.Structure - goret = gst.UnsafeStructureFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeStructureFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -4437,10 +4529,10 @@ func (self *EncodingProfileInstance) GetElementProperties() *gst.Structure { // GetFileExtension wraps gst_encoding_profile_get_file_extension // The function returns the following values: // -// - goret string +// - goret string (nullable) func (profile *EncodingProfileInstance) GetFileExtension() string { var carg0 *C.GstEncodingProfile // in, none, converted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstEncodingProfile)(UnsafeEncodingProfileToGlibNone(profile)) @@ -4449,7 +4541,9 @@ func (profile *EncodingProfileInstance) GetFileExtension() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -4499,10 +4593,10 @@ func (profile *EncodingProfileInstance) GetInputCaps() *gst.Caps { // GetName wraps gst_encoding_profile_get_name // The function returns the following values: // -// - goret string +// - goret string (nullable) func (profile *EncodingProfileInstance) GetName() string { var carg0 *C.GstEncodingProfile // in, none, converted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstEncodingProfile)(UnsafeEncodingProfileToGlibNone(profile)) @@ -4511,7 +4605,9 @@ func (profile *EncodingProfileInstance) GetName() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -4539,10 +4635,10 @@ func (profile *EncodingProfileInstance) GetPresence() uint { // GetPreset wraps gst_encoding_profile_get_preset // The function returns the following values: // -// - goret string +// - goret string (nullable) func (profile *EncodingProfileInstance) GetPreset() string { var carg0 *C.GstEncodingProfile // in, none, converted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstEncodingProfile)(UnsafeEncodingProfileToGlibNone(profile)) @@ -4551,7 +4647,9 @@ func (profile *EncodingProfileInstance) GetPreset() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -4559,10 +4657,10 @@ func (profile *EncodingProfileInstance) GetPreset() string { // GetPresetName wraps gst_encoding_profile_get_preset_name // The function returns the following values: // -// - goret string +// - goret string (nullable) func (profile *EncodingProfileInstance) GetPresetName() string { var carg0 *C.GstEncodingProfile // in, none, converted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstEncodingProfile)(UnsafeEncodingProfileToGlibNone(profile)) @@ -4571,7 +4669,9 @@ func (profile *EncodingProfileInstance) GetPresetName() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -4579,10 +4679,10 @@ func (profile *EncodingProfileInstance) GetPresetName() string { // GetRestriction wraps gst_encoding_profile_get_restriction // The function returns the following values: // -// - goret *gst.Caps +// - goret *gst.Caps (nullable) func (profile *EncodingProfileInstance) GetRestriction() *gst.Caps { var carg0 *C.GstEncodingProfile // in, none, converted - var cret *C.GstCaps // return, full, converted + var cret *C.GstCaps // return, full, converted, nullable carg0 = (*C.GstEncodingProfile)(UnsafeEncodingProfileToGlibNone(profile)) @@ -4591,7 +4691,9 @@ func (profile *EncodingProfileInstance) GetRestriction() *gst.Caps { var goret *gst.Caps - goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -5004,7 +5106,7 @@ type EncodingTarget interface { // GetPath wraps gst_encoding_target_get_path // The function returns the following values: // - // - goret string + // - goret string (nullable) GetPath() string // GetProfile wraps gst_encoding_target_get_profile // @@ -5014,7 +5116,7 @@ type EncodingTarget interface { // // The function returns the following values: // - // - goret EncodingProfile + // - goret EncodingProfile (nullable) GetProfile(string) EncodingProfile // GetProfiles wraps gst_encoding_target_get_profiles // The function returns the following values: @@ -5260,10 +5362,10 @@ func (target *EncodingTargetInstance) GetName() string { // GetPath wraps gst_encoding_target_get_path // The function returns the following values: // -// - goret string +// - goret string (nullable) func (target *EncodingTargetInstance) GetPath() string { var carg0 *C.GstEncodingTarget // in, none, converted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable carg0 = (*C.GstEncodingTarget)(UnsafeEncodingTargetToGlibNone(target)) @@ -5272,7 +5374,9 @@ func (target *EncodingTargetInstance) GetPath() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -5285,11 +5389,11 @@ func (target *EncodingTargetInstance) GetPath() string { // // The function returns the following values: // -// - goret EncodingProfile +// - goret EncodingProfile (nullable) func (target *EncodingTargetInstance) GetProfile(name string) EncodingProfile { var carg0 *C.GstEncodingTarget // in, none, converted var carg1 *C.gchar // in, none, string - var cret *C.GstEncodingProfile // return, full, converted + var cret *C.GstEncodingProfile // return, full, converted, nullable carg0 = (*C.GstEncodingTarget)(UnsafeEncodingTargetToGlibNone(target)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -5301,7 +5405,9 @@ func (target *EncodingTargetInstance) GetProfile(name string) EncodingProfile { var goret EncodingProfile - goret = UnsafeEncodingProfileFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeEncodingProfileFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -5676,7 +5782,7 @@ type DiscovererAudioInfo interface { // GetLanguage wraps gst_discoverer_audio_info_get_language // The function returns the following values: // - // - goret string + // - goret string (nullable) GetLanguage() string // GetMaxBitrate wraps gst_discoverer_audio_info_get_max_bitrate // The function returns the following values: @@ -5809,10 +5915,10 @@ func (info *DiscovererAudioInfoInstance) GetDepth() uint { // GetLanguage wraps gst_discoverer_audio_info_get_language // The function returns the following values: // -// - goret string +// - goret string (nullable) func (info *DiscovererAudioInfoInstance) GetLanguage() string { var carg0 *C.GstDiscovererAudioInfo // in, none, converted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstDiscovererAudioInfo)(UnsafeDiscovererAudioInfoToGlibNone(info)) @@ -5821,7 +5927,9 @@ func (info *DiscovererAudioInfoInstance) GetLanguage() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -5889,7 +5997,7 @@ type DiscovererContainerInfo interface { // GetTags wraps gst_discoverer_container_info_get_tags // The function returns the following values: // - // - goret *gst.TagList + // - goret *gst.TagList (nullable) GetTags() *gst.TagList } @@ -5959,10 +6067,10 @@ func (info *DiscovererContainerInfoInstance) GetStreams() []DiscovererStreamInfo // GetTags wraps gst_discoverer_container_info_get_tags // The function returns the following values: // -// - goret *gst.TagList +// - goret *gst.TagList (nullable) func (info *DiscovererContainerInfoInstance) GetTags() *gst.TagList { var carg0 *C.GstDiscovererContainerInfo // in, none, converted - var cret *C.GstTagList // return, none, converted + var cret *C.GstTagList // return, none, converted, nullable carg0 = (*C.GstDiscovererContainerInfo)(UnsafeDiscovererContainerInfoToGlibNone(info)) @@ -5971,7 +6079,9 @@ func (info *DiscovererContainerInfoInstance) GetTags() *gst.TagList { var goret *gst.TagList - goret = gst.UnsafeTagListFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeTagListFromGlibNone(unsafe.Pointer(cret)) + } return goret } diff --git a/pkg/gstplay/gstplay.gen.go b/pkg/gstplay/gstplay.gen.go index 9e3549d..0c2a9b0 100644 --- a/pkg/gstplay/gstplay.gen.go +++ b/pkg/gstplay/gstplay.gen.go @@ -99,6 +99,33 @@ func (e PlayColorBalanceType) String() string { } } +// PlayColorBalanceTypeGetName wraps gst_play_color_balance_type_get_name +// +// The function takes the following parameters: +// +// - typ PlayColorBalanceType: a #GstPlayColorBalanceType +// +// The function returns the following values: +// +// - goret string +// +// Gets a string representing the given color balance type. +func PlayColorBalanceTypeGetName(typ PlayColorBalanceType) string { + var carg1 C.GstPlayColorBalanceType // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstPlayColorBalanceType(typ) + + cret = C.gst_play_color_balance_type_get_name(carg1) + runtime.KeepAlive(typ) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + // PlayError wraps GstPlayError type PlayError C.int @@ -127,6 +154,49 @@ func (e PlayError) String() string { } } +// PlayErrorGetName wraps gst_play_error_get_name +// +// The function takes the following parameters: +// +// - err PlayError: a #GstPlayError +// +// The function returns the following values: +// +// - goret string +// +// Gets a string representing the given error. +func PlayErrorGetName(err PlayError) string { + var carg1 C.GstPlayError // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstPlayError(err) + + cret = C.gst_play_error_get_name(carg1) + runtime.KeepAlive(err) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + +// PlayErrorQuark wraps gst_play_error_quark +// The function returns the following values: +// +// - goret glib.Quark +func PlayErrorQuark() glib.Quark { + var cret C.GQuark // return, none, casted, alias + + cret = C.gst_play_error_quark() + + var goret glib.Quark + + goret = glib.Quark(cret) + + return goret +} + // PlayMessage wraps GstPlayMessage type PlayMessage C.int @@ -215,6 +285,346 @@ func (e PlayMessage) String() string { } } +// PlayMessageGetName wraps gst_play_message_get_name +// +// The function takes the following parameters: +// +// - messageType PlayMessage: a #GstPlayMessage +// +// The function returns the following values: +// +// - goret string +func PlayMessageGetName(messageType PlayMessage) string { + var carg1 C.GstPlayMessage // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstPlayMessage(messageType) + + cret = C.gst_play_message_get_name(carg1) + runtime.KeepAlive(messageType) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + +// PlayMessageParseBufferingPercent wraps gst_play_message_parse_buffering_percent +// +// The function takes the following parameters: +// +// - msg *gst.Message: A #GstMessage +// +// The function returns the following values: +// +// - percent uint: the resulting buffering percent +// +// Parse the given buffering @msg and extract the corresponding value +func PlayMessageParseBufferingPercent(msg *gst.Message) uint { + var carg1 *C.GstMessage // in, none, converted + var carg2 C.guint // out, full, casted + + carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) + + C.gst_play_message_parse_buffering_percent(carg1, &carg2) + runtime.KeepAlive(msg) + + var percent uint + + percent = uint(carg2) + + return percent +} + +// PlayMessageParseDurationUpdated wraps gst_play_message_parse_duration_updated +// +// The function takes the following parameters: +// +// - msg *gst.Message: A #GstMessage +// +// The function returns the following values: +// +// - duration gst.ClockTime: the resulting duration +// +// Parse the given duration-changed @msg and extract the corresponding #GstClockTime +func PlayMessageParseDurationUpdated(msg *gst.Message) gst.ClockTime { + var carg1 *C.GstMessage // in, none, converted + var carg2 C.GstClockTime // out, full, casted, alias + + carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) + + C.gst_play_message_parse_duration_updated(carg1, &carg2) + runtime.KeepAlive(msg) + + var duration gst.ClockTime + + duration = gst.ClockTime(carg2) + + return duration +} + +// PlayMessageParseError wraps gst_play_message_parse_error +// +// The function takes the following parameters: +// +// - msg *gst.Message: A #GstMessage +// +// The function returns the following values: +// +// - details *gst.Structure (nullable): A #GstStructure containing additional details about the error +// - err error: the resulting error +// +// Parse the given error @msg and extract the corresponding #GError +func PlayMessageParseError(msg *gst.Message) (*gst.Structure, error) { + var carg1 *C.GstMessage // in, none, converted + var carg3 *C.GstStructure // out, full, converted, nullable + var carg2 *C.GError // out, full, converted + + carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) + + C.gst_play_message_parse_error(carg1, &carg2, &carg3) + runtime.KeepAlive(msg) + + var details *gst.Structure + var err error + + if carg3 != nil { + details = gst.UnsafeStructureFromGlibFull(unsafe.Pointer(carg3)) + } + err = glib.UnsafeErrorFromGlibFull(unsafe.Pointer(carg2)) + + return details, err +} + +// PlayMessageParseMediaInfoUpdated wraps gst_play_message_parse_media_info_updated +// +// The function takes the following parameters: +// +// - msg *gst.Message: A #GstMessage +// +// The function returns the following values: +// +// - info PlayMediaInfo: the resulting media info +// +// Parse the given media-info-updated @msg and extract the corresponding media information +func PlayMessageParseMediaInfoUpdated(msg *gst.Message) PlayMediaInfo { + var carg1 *C.GstMessage // in, none, converted + var carg2 *C.GstPlayMediaInfo // out, full, converted + + carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) + + C.gst_play_message_parse_media_info_updated(carg1, &carg2) + runtime.KeepAlive(msg) + + var info PlayMediaInfo + + info = UnsafePlayMediaInfoFromGlibFull(unsafe.Pointer(carg2)) + + return info +} + +// PlayMessageParseMutedChanged wraps gst_play_message_parse_muted_changed +// +// The function takes the following parameters: +// +// - msg *gst.Message: A #GstMessage +// +// The function returns the following values: +// +// - muted bool: the resulting audio muted state +// +// Parse the given mute-changed @msg and extract the corresponding audio muted state +func PlayMessageParseMutedChanged(msg *gst.Message) bool { + var carg1 *C.GstMessage // in, none, converted + var carg2 C.gboolean // out + + carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) + + C.gst_play_message_parse_muted_changed(carg1, &carg2) + runtime.KeepAlive(msg) + + var muted bool + + if carg2 != 0 { + muted = true + } + + return muted +} + +// PlayMessageParsePositionUpdated wraps gst_play_message_parse_position_updated +// +// The function takes the following parameters: +// +// - msg *gst.Message: A #GstMessage +// +// The function returns the following values: +// +// - position gst.ClockTime: the resulting position +// +// Parse the given position-updated @msg and extract the corresponding #GstClockTime +func PlayMessageParsePositionUpdated(msg *gst.Message) gst.ClockTime { + var carg1 *C.GstMessage // in, none, converted + var carg2 C.GstClockTime // out, full, casted, alias + + carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) + + C.gst_play_message_parse_position_updated(carg1, &carg2) + runtime.KeepAlive(msg) + + var position gst.ClockTime + + position = gst.ClockTime(carg2) + + return position +} + +// PlayMessageParseStateChanged wraps gst_play_message_parse_state_changed +// +// The function takes the following parameters: +// +// - msg *gst.Message: A #GstMessage +// +// The function returns the following values: +// +// - state PlayState: the resulting play state +// +// Parse the given state-changed @msg and extract the corresponding #GstPlayState +func PlayMessageParseStateChanged(msg *gst.Message) PlayState { + var carg1 *C.GstMessage // in, none, converted + var carg2 C.GstPlayState // out, full, casted + + carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) + + C.gst_play_message_parse_state_changed(carg1, &carg2) + runtime.KeepAlive(msg) + + var state PlayState + + state = PlayState(carg2) + + return state +} + +// PlayMessageParseType wraps gst_play_message_parse_type +// +// The function takes the following parameters: +// +// - msg *gst.Message: A #GstMessage +// +// The function returns the following values: +// +// - typ PlayMessage: the resulting message type +// +// Parse the given @msg and extract its #GstPlayMessage type. +func PlayMessageParseType(msg *gst.Message) PlayMessage { + var carg1 *C.GstMessage // in, none, converted + var carg2 C.GstPlayMessage // out, full, casted + + carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) + + C.gst_play_message_parse_type(carg1, &carg2) + runtime.KeepAlive(msg) + + var typ PlayMessage + + typ = PlayMessage(carg2) + + return typ +} + +// PlayMessageParseVideoDimensionsChanged wraps gst_play_message_parse_video_dimensions_changed +// +// The function takes the following parameters: +// +// - msg *gst.Message: A #GstMessage +// +// The function returns the following values: +// +// - width uint: the resulting video width +// - height uint: the resulting video height +// +// Parse the given video-dimensions-changed @msg and extract the corresponding video dimensions +func PlayMessageParseVideoDimensionsChanged(msg *gst.Message) (uint, uint) { + var carg1 *C.GstMessage // in, none, converted + var carg2 C.guint // out, full, casted + var carg3 C.guint // out, full, casted + + carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) + + C.gst_play_message_parse_video_dimensions_changed(carg1, &carg2, &carg3) + runtime.KeepAlive(msg) + + var width uint + var height uint + + width = uint(carg2) + height = uint(carg3) + + return width, height +} + +// PlayMessageParseVolumeChanged wraps gst_play_message_parse_volume_changed +// +// The function takes the following parameters: +// +// - msg *gst.Message: A #GstMessage +// +// The function returns the following values: +// +// - volume float64: the resulting audio volume +// +// Parse the given volume-changed @msg and extract the corresponding audio volume +func PlayMessageParseVolumeChanged(msg *gst.Message) float64 { + var carg1 *C.GstMessage // in, none, converted + var carg2 C.gdouble // out, full, casted + + carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) + + C.gst_play_message_parse_volume_changed(carg1, &carg2) + runtime.KeepAlive(msg) + + var volume float64 + + volume = float64(carg2) + + return volume +} + +// PlayMessageParseWarning wraps gst_play_message_parse_warning +// +// The function takes the following parameters: +// +// - msg *gst.Message: A #GstMessage +// +// The function returns the following values: +// +// - details *gst.Structure (nullable): A #GstStructure containing additional details about the warning +// - err error: the resulting warning +// +// Parse the given warning @msg and extract the corresponding #GError +func PlayMessageParseWarning(msg *gst.Message) (*gst.Structure, error) { + var carg1 *C.GstMessage // in, none, converted + var carg3 *C.GstStructure // out, full, converted, nullable + var carg2 *C.GError // out, full, converted + + carg1 = (*C.GstMessage)(gst.UnsafeMessageToGlibNone(msg)) + + C.gst_play_message_parse_warning(carg1, &carg2, &carg3) + runtime.KeepAlive(msg) + + var details *gst.Structure + var err error + + if carg3 != nil { + details = gst.UnsafeStructureFromGlibFull(unsafe.Pointer(carg3)) + } + err = glib.UnsafeErrorFromGlibFull(unsafe.Pointer(carg2)) + + return details, err +} + // PlaySnapshotFormat wraps GstPlaySnapshotFormat type PlaySnapshotFormat C.int @@ -297,6 +707,33 @@ func (e PlayState) String() string { } } +// PlayStateGetName wraps gst_play_state_get_name +// +// The function takes the following parameters: +// +// - state PlayState: a #GstPlayState +// +// The function returns the following values: +// +// - goret string +// +// Gets a string representing the given state. +func PlayStateGetName(state PlayState) string { + var carg1 C.GstPlayState // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstPlayState(state) + + cret = C.gst_play_state_get_name(carg1) + runtime.KeepAlive(state) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + // PlayVideoRendererInstance is the instance type used by all types implementing GstPlayVideoRenderer. It is used internally by the bindings. Users should use the interface [PlayVideoRenderer] instead. type PlayVideoRendererInstance struct { _ [0]func() // equal guard @@ -426,28 +863,28 @@ type Play interface { // GetCurrentAudioTrack wraps gst_play_get_current_audio_track // The function returns the following values: // - // - goret PlayAudioInfo + // - goret PlayAudioInfo (nullable) // // A Function to get current audio #GstPlayAudioInfo instance. GetCurrentAudioTrack() PlayAudioInfo // GetCurrentSubtitleTrack wraps gst_play_get_current_subtitle_track // The function returns the following values: // - // - goret PlaySubtitleInfo + // - goret PlaySubtitleInfo (nullable) // // A Function to get current subtitle #GstPlaySubtitleInfo instance. GetCurrentSubtitleTrack() PlaySubtitleInfo // GetCurrentVideoTrack wraps gst_play_get_current_video_track // The function returns the following values: // - // - goret PlayVideoInfo + // - goret PlayVideoInfo (nullable) // // A Function to get current video #GstPlayVideoInfo instance. GetCurrentVideoTrack() PlayVideoInfo // GetCurrentVisualization wraps gst_play_get_current_visualization // The function returns the following values: // - // - goret string + // - goret string (nullable) GetCurrentVisualization() string // GetDuration wraps gst_play_get_duration // The function returns the following values: @@ -459,7 +896,7 @@ type Play interface { // GetMediaInfo wraps gst_play_get_media_info // The function returns the following values: // - // - goret PlayMediaInfo + // - goret PlayMediaInfo (nullable) // // A Function to get the current media info #GstPlayMediaInfo instance. GetMediaInfo() PlayMediaInfo @@ -518,7 +955,7 @@ type Play interface { // GetSubtitleURI wraps gst_play_get_subtitle_uri // The function returns the following values: // - // - goret string + // - goret string (nullable) // // Current subtitle URI GetSubtitleURI() string @@ -532,7 +969,7 @@ type Play interface { // GetURI wraps gst_play_get_uri // The function returns the following values: // - // - goret string + // - goret string (nullable) // // Gets the URI of the currently-playing stream. GetURI() string @@ -545,7 +982,7 @@ type Play interface { // // The function returns the following values: // - // - goret *gst.Sample + // - goret *gst.Sample (nullable) // // Get a snapshot of the currently selected video stream, if any. The format can be // selected with @format and optional configuration is possible with @config. @@ -932,13 +1369,13 @@ func PlayConfigGetSeekAccurate(config *gst.Structure) bool { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Return the user agent which has been configured using // 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 + var cret *C.gchar // return, full, string, nullable-string carg1 = (*C.GstStructure)(gst.UnsafeStructureToGlibNone(config)) @@ -947,8 +1384,10 @@ func PlayConfigGetUserAgent(config *gst.Structure) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -1257,12 +1696,12 @@ func (play *PlayInstance) GetConfig() *gst.Structure { // GetCurrentAudioTrack wraps gst_play_get_current_audio_track // The function returns the following values: // -// - goret PlayAudioInfo +// - goret PlayAudioInfo (nullable) // // A Function to get current audio #GstPlayAudioInfo instance. func (play *PlayInstance) GetCurrentAudioTrack() PlayAudioInfo { var carg0 *C.GstPlay // in, none, converted - var cret *C.GstPlayAudioInfo // return, full, converted + var cret *C.GstPlayAudioInfo // return, full, converted, nullable carg0 = (*C.GstPlay)(UnsafePlayToGlibNone(play)) @@ -1271,7 +1710,9 @@ func (play *PlayInstance) GetCurrentAudioTrack() PlayAudioInfo { var goret PlayAudioInfo - goret = UnsafePlayAudioInfoFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePlayAudioInfoFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1279,12 +1720,12 @@ func (play *PlayInstance) GetCurrentAudioTrack() PlayAudioInfo { // GetCurrentSubtitleTrack wraps gst_play_get_current_subtitle_track // The function returns the following values: // -// - goret PlaySubtitleInfo +// - goret PlaySubtitleInfo (nullable) // // A Function to get current subtitle #GstPlaySubtitleInfo instance. func (play *PlayInstance) GetCurrentSubtitleTrack() PlaySubtitleInfo { var carg0 *C.GstPlay // in, none, converted - var cret *C.GstPlaySubtitleInfo // return, full, converted + var cret *C.GstPlaySubtitleInfo // return, full, converted, nullable carg0 = (*C.GstPlay)(UnsafePlayToGlibNone(play)) @@ -1293,7 +1734,9 @@ func (play *PlayInstance) GetCurrentSubtitleTrack() PlaySubtitleInfo { var goret PlaySubtitleInfo - goret = UnsafePlaySubtitleInfoFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePlaySubtitleInfoFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1301,12 +1744,12 @@ func (play *PlayInstance) GetCurrentSubtitleTrack() PlaySubtitleInfo { // GetCurrentVideoTrack wraps gst_play_get_current_video_track // The function returns the following values: // -// - goret PlayVideoInfo +// - goret PlayVideoInfo (nullable) // // A Function to get current video #GstPlayVideoInfo instance. func (play *PlayInstance) GetCurrentVideoTrack() PlayVideoInfo { var carg0 *C.GstPlay // in, none, converted - var cret *C.GstPlayVideoInfo // return, full, converted + var cret *C.GstPlayVideoInfo // return, full, converted, nullable carg0 = (*C.GstPlay)(UnsafePlayToGlibNone(play)) @@ -1315,7 +1758,9 @@ func (play *PlayInstance) GetCurrentVideoTrack() PlayVideoInfo { var goret PlayVideoInfo - goret = UnsafePlayVideoInfoFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePlayVideoInfoFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1323,10 +1768,10 @@ func (play *PlayInstance) GetCurrentVideoTrack() PlayVideoInfo { // GetCurrentVisualization wraps gst_play_get_current_visualization // The function returns the following values: // -// - goret string +// - goret string (nullable) func (play *PlayInstance) GetCurrentVisualization() string { var carg0 *C.GstPlay // in, none, converted - var cret *C.gchar // return, full, string + var cret *C.gchar // return, full, string, nullable-string carg0 = (*C.GstPlay)(UnsafePlayToGlibNone(play)) @@ -1335,8 +1780,10 @@ func (play *PlayInstance) GetCurrentVisualization() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -1366,12 +1813,12 @@ func (play *PlayInstance) GetDuration() gst.ClockTime { // GetMediaInfo wraps gst_play_get_media_info // The function returns the following values: // -// - goret PlayMediaInfo +// - goret PlayMediaInfo (nullable) // // A Function to get the current media info #GstPlayMediaInfo instance. func (play *PlayInstance) GetMediaInfo() PlayMediaInfo { var carg0 *C.GstPlay // in, none, converted - var cret *C.GstPlayMediaInfo // return, full, converted + var cret *C.GstPlayMediaInfo // return, full, converted, nullable carg0 = (*C.GstPlay)(UnsafePlayToGlibNone(play)) @@ -1380,7 +1827,9 @@ func (play *PlayInstance) GetMediaInfo() PlayMediaInfo { var goret PlayMediaInfo - goret = UnsafePlayMediaInfoFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePlayMediaInfoFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1547,12 +1996,12 @@ func (play *PlayInstance) GetRate() float64 { // GetSubtitleURI wraps gst_play_get_subtitle_uri // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Current subtitle URI func (play *PlayInstance) GetSubtitleURI() string { var carg0 *C.GstPlay // in, none, converted - var cret *C.gchar // return, full, string + var cret *C.gchar // return, full, string, nullable-string carg0 = (*C.GstPlay)(UnsafePlayToGlibNone(play)) @@ -1561,8 +2010,10 @@ func (play *PlayInstance) GetSubtitleURI() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -1592,12 +2043,12 @@ func (play *PlayInstance) GetSubtitleVideoOffset() int64 { // GetURI wraps gst_play_get_uri // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 + var cret *C.gchar // return, full, string, nullable-string carg0 = (*C.GstPlay)(UnsafePlayToGlibNone(play)) @@ -1606,8 +2057,10 @@ func (play *PlayInstance) GetURI() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -1621,7 +2074,7 @@ func (play *PlayInstance) GetURI() string { // // The function returns the following values: // -// - goret *gst.Sample +// - goret *gst.Sample (nullable) // // Get a snapshot of the currently selected video stream, if any. The format can be // selected with @format and optional configuration is possible with @config. @@ -1633,7 +2086,7 @@ func (play *PlayInstance) GetVideoSnapshot(format PlaySnapshotFormat, config *gs var carg0 *C.GstPlay // in, none, converted var carg1 C.GstPlaySnapshotFormat // in, none, casted var carg2 *C.GstStructure // in, none, converted, nullable - var cret *C.GstSample // return, full, converted + var cret *C.GstSample // return, full, converted, nullable carg0 = (*C.GstPlay)(UnsafePlayToGlibNone(play)) carg1 = C.GstPlaySnapshotFormat(format) @@ -1648,7 +2101,9 @@ func (play *PlayInstance) GetVideoSnapshot(format PlaySnapshotFormat, config *gs var goret *gst.Sample - goret = gst.UnsafeSampleFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeSampleFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -2234,7 +2689,7 @@ type PlayMediaInfo interface { // GetContainerFormat wraps gst_play_media_info_get_container_format // The function returns the following values: // - // - goret string + // - goret string (nullable) GetContainerFormat() string // GetDuration wraps gst_play_media_info_get_duration // The function returns the following values: @@ -2244,7 +2699,7 @@ type PlayMediaInfo interface { // GetImageSample wraps gst_play_media_info_get_image_sample // The function returns the following values: // - // - goret *gst.Sample + // - goret *gst.Sample (nullable) // // Function to get the image (or preview-image) stored in taglist. // Application can use `gst_sample_*_()` API's to get caps, buffer etc. @@ -2282,12 +2737,12 @@ type PlayMediaInfo interface { // GetTags wraps gst_play_media_info_get_tags // The function returns the following values: // - // - goret *gst.TagList + // - goret *gst.TagList (nullable) GetTags() *gst.TagList // GetTitle wraps gst_play_media_info_get_title // The function returns the following values: // - // - goret string + // - goret string (nullable) GetTitle() string // GetURI wraps gst_play_media_info_get_uri // The function returns the following values: @@ -2375,10 +2830,10 @@ func (info *PlayMediaInfoInstance) GetAudioStreams() []PlayAudioInfo { // GetContainerFormat wraps gst_play_media_info_get_container_format // The function returns the following values: // -// - goret string +// - goret string (nullable) func (info *PlayMediaInfoInstance) GetContainerFormat() string { var carg0 *C.GstPlayMediaInfo // in, none, converted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstPlayMediaInfo)(UnsafePlayMediaInfoToGlibNone(info)) @@ -2387,7 +2842,9 @@ func (info *PlayMediaInfoInstance) GetContainerFormat() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -2415,13 +2872,13 @@ func (info *PlayMediaInfoInstance) GetDuration() gst.ClockTime { // GetImageSample wraps gst_play_media_info_get_image_sample // The function returns the following values: // -// - goret *gst.Sample +// - goret *gst.Sample (nullable) // // Function to get the image (or preview-image) stored in taglist. // Application can use `gst_sample_*_()` API's to get caps, buffer etc. func (info *PlayMediaInfoInstance) GetImageSample() *gst.Sample { var carg0 *C.GstPlayMediaInfo // in, none, converted - var cret *C.GstSample // return, none, converted + var cret *C.GstSample // return, none, converted, nullable carg0 = (*C.GstPlayMediaInfo)(UnsafePlayMediaInfoToGlibNone(info)) @@ -2430,7 +2887,9 @@ func (info *PlayMediaInfoInstance) GetImageSample() *gst.Sample { var goret *gst.Sample - goret = gst.UnsafeSampleFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeSampleFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -2572,10 +3031,10 @@ func (info *PlayMediaInfoInstance) GetSubtitleStreams() []PlaySubtitleInfo { // GetTags wraps gst_play_media_info_get_tags // The function returns the following values: // -// - goret *gst.TagList +// - goret *gst.TagList (nullable) func (info *PlayMediaInfoInstance) GetTags() *gst.TagList { var carg0 *C.GstPlayMediaInfo // in, none, converted - var cret *C.GstTagList // return, none, converted + var cret *C.GstTagList // return, none, converted, nullable carg0 = (*C.GstPlayMediaInfo)(UnsafePlayMediaInfoToGlibNone(info)) @@ -2584,7 +3043,9 @@ func (info *PlayMediaInfoInstance) GetTags() *gst.TagList { var goret *gst.TagList - goret = gst.UnsafeTagListFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeTagListFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -2592,10 +3053,10 @@ func (info *PlayMediaInfoInstance) GetTags() *gst.TagList { // GetTitle wraps gst_play_media_info_get_title // The function returns the following values: // -// - goret string +// - goret string (nullable) func (info *PlayMediaInfoInstance) GetTitle() string { var carg0 *C.GstPlayMediaInfo // in, none, converted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstPlayMediaInfo)(UnsafePlayMediaInfoToGlibNone(info)) @@ -2604,7 +3065,9 @@ func (info *PlayMediaInfoInstance) GetTitle() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -2972,12 +3435,12 @@ type PlayStreamInfo interface { // GetCaps wraps gst_play_stream_info_get_caps // The function returns the following values: // - // - goret *gst.Caps + // - goret *gst.Caps (nullable) GetCaps() *gst.Caps // GetCodec wraps gst_play_stream_info_get_codec // The function returns the following values: // - // - goret string + // - goret string (nullable) // // A string describing codec used in #GstPlayStreamInfo. GetCodec() string @@ -3000,7 +3463,7 @@ type PlayStreamInfo interface { // GetTags wraps gst_play_stream_info_get_tags // The function returns the following values: // - // - goret *gst.TagList + // - goret *gst.TagList (nullable) GetTags() *gst.TagList } @@ -3041,10 +3504,10 @@ func UnsafePlayStreamInfoToGlibFull(c PlayStreamInfo) unsafe.Pointer { // GetCaps wraps gst_play_stream_info_get_caps // The function returns the following values: // -// - goret *gst.Caps +// - goret *gst.Caps (nullable) func (info *PlayStreamInfoInstance) GetCaps() *gst.Caps { var carg0 *C.GstPlayStreamInfo // in, none, converted - var cret *C.GstCaps // return, none, converted + var cret *C.GstCaps // return, none, converted, nullable carg0 = (*C.GstPlayStreamInfo)(UnsafePlayStreamInfoToGlibNone(info)) @@ -3053,7 +3516,9 @@ func (info *PlayStreamInfoInstance) GetCaps() *gst.Caps { var goret *gst.Caps - goret = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -3061,12 +3526,12 @@ func (info *PlayStreamInfoInstance) GetCaps() *gst.Caps { // GetCodec wraps gst_play_stream_info_get_codec // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstPlayStreamInfo)(UnsafePlayStreamInfoToGlibNone(info)) @@ -3075,7 +3540,9 @@ func (info *PlayStreamInfoInstance) GetCodec() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -3129,10 +3596,10 @@ func (info *PlayStreamInfoInstance) GetStreamType() string { // GetTags wraps gst_play_stream_info_get_tags // The function returns the following values: // -// - goret *gst.TagList +// - goret *gst.TagList (nullable) func (info *PlayStreamInfoInstance) GetTags() *gst.TagList { var carg0 *C.GstPlayStreamInfo // in, none, converted - var cret *C.GstTagList // return, none, converted + var cret *C.GstTagList // return, none, converted, nullable carg0 = (*C.GstPlayStreamInfo)(UnsafePlayStreamInfoToGlibNone(info)) @@ -3141,7 +3608,9 @@ func (info *PlayStreamInfoInstance) GetTags() *gst.TagList { var goret *gst.TagList - goret = gst.UnsafeTagListFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeTagListFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -3164,7 +3633,7 @@ type PlaySubtitleInfo interface { // GetLanguage wraps gst_play_subtitle_info_get_language // The function returns the following values: // - // - goret string + // - goret string (nullable) GetLanguage() string } @@ -3207,10 +3676,10 @@ func UnsafePlaySubtitleInfoToGlibFull(c PlaySubtitleInfo) unsafe.Pointer { // GetLanguage wraps gst_play_subtitle_info_get_language // The function returns the following values: // -// - goret string +// - goret string (nullable) func (info *PlaySubtitleInfoInstance) GetLanguage() string { var carg0 *C.GstPlaySubtitleInfo // in, none, converted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstPlaySubtitleInfo)(UnsafePlaySubtitleInfoToGlibNone(info)) @@ -3219,7 +3688,9 @@ func (info *PlaySubtitleInfoInstance) GetLanguage() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -3642,7 +4113,7 @@ type PlayAudioInfo interface { // GetLanguage wraps gst_play_audio_info_get_language // The function returns the following values: // - // - goret string + // - goret string (nullable) GetLanguage() string // GetMaxBitrate wraps gst_play_audio_info_get_max_bitrate // The function returns the following values: @@ -3735,10 +4206,10 @@ func (info *PlayAudioInfoInstance) GetChannels() int { // GetLanguage wraps gst_play_audio_info_get_language // The function returns the following values: // -// - goret string +// - goret string (nullable) func (info *PlayAudioInfoInstance) GetLanguage() string { var carg0 *C.GstPlayAudioInfo // in, none, converted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstPlayAudioInfo)(UnsafePlayAudioInfoToGlibNone(info)) @@ -3747,7 +4218,9 @@ func (info *PlayAudioInfoInstance) GetLanguage() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } diff --git a/pkg/gstplayer/gstplayer.gen.go b/pkg/gstplayer/gstplayer.gen.go index 85afd65..9816d68 100644 --- a/pkg/gstplayer/gstplayer.gen.go +++ b/pkg/gstplayer/gstplayer.gen.go @@ -99,6 +99,33 @@ func (e PlayerColorBalanceType) String() string { } } +// PlayerColorBalanceTypeGetName wraps gst_player_color_balance_type_get_name +// +// The function takes the following parameters: +// +// - typ PlayerColorBalanceType: a #GstPlayerColorBalanceType +// +// The function returns the following values: +// +// - goret string +// +// Gets a string representing the given color balance type. +func PlayerColorBalanceTypeGetName(typ PlayerColorBalanceType) string { + var carg1 C.GstPlayerColorBalanceType // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstPlayerColorBalanceType(typ) + + cret = C.gst_player_color_balance_type_get_name(carg1) + runtime.KeepAlive(typ) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + // PlayerError wraps GstPlayerError type PlayerError C.int @@ -127,6 +154,49 @@ func (e PlayerError) String() string { } } +// PlayerErrorGetName wraps gst_player_error_get_name +// +// The function takes the following parameters: +// +// - err PlayerError: a #GstPlayerError +// +// The function returns the following values: +// +// - goret string +// +// Gets a string representing the given error. +func PlayerErrorGetName(err PlayerError) string { + var carg1 C.GstPlayerError // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstPlayerError(err) + + cret = C.gst_player_error_get_name(carg1) + runtime.KeepAlive(err) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + +// PlayerErrorQuark wraps gst_player_error_quark +// The function returns the following values: +// +// - goret glib.Quark +func PlayerErrorQuark() glib.Quark { + var cret C.GQuark // return, none, casted, alias + + cret = C.gst_player_error_quark() + + var goret glib.Quark + + goret = glib.Quark(cret) + + return goret +} + // PlayerSnapshotFormat wraps GstPlayerSnapshotFormat type PlayerSnapshotFormat C.int @@ -199,6 +269,33 @@ func (e PlayerState) String() string { } } +// PlayerStateGetName wraps gst_player_state_get_name +// +// The function takes the following parameters: +// +// - state PlayerState: a #GstPlayerState +// +// The function returns the following values: +// +// - goret string +// +// Gets a string representing the given state. +func PlayerStateGetName(state PlayerState) string { + var carg1 C.GstPlayerState // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstPlayerState(state) + + cret = C.gst_player_state_get_name(carg1) + runtime.KeepAlive(state) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + // PlayerSignalDispatcherInstance is the instance type used by all types implementing GstPlayerSignalDispatcher. It is used internally by the bindings. Users should use the interface [PlayerSignalDispatcher] instead. type PlayerSignalDispatcherInstance struct { _ [0]func() // equal guard @@ -348,28 +445,28 @@ type Player interface { // GetCurrentAudioTrack wraps gst_player_get_current_audio_track // The function returns the following values: // - // - goret PlayerAudioInfo + // - goret PlayerAudioInfo (nullable) // // A Function to get current audio #GstPlayerAudioInfo instance. GetCurrentAudioTrack() PlayerAudioInfo // GetCurrentSubtitleTrack wraps gst_player_get_current_subtitle_track // The function returns the following values: // - // - goret PlayerSubtitleInfo + // - goret PlayerSubtitleInfo (nullable) // // A Function to get current subtitle #GstPlayerSubtitleInfo instance. GetCurrentSubtitleTrack() PlayerSubtitleInfo // GetCurrentVideoTrack wraps gst_player_get_current_video_track // The function returns the following values: // - // - goret PlayerVideoInfo + // - goret PlayerVideoInfo (nullable) // // A Function to get current video #GstPlayerVideoInfo instance. GetCurrentVideoTrack() PlayerVideoInfo // GetCurrentVisualization wraps gst_player_get_current_visualization // The function returns the following values: // - // - goret string + // - goret string (nullable) GetCurrentVisualization() string // GetDuration wraps gst_player_get_duration // The function returns the following values: @@ -381,7 +478,7 @@ type Player interface { // GetMediaInfo wraps gst_player_get_media_info // The function returns the following values: // - // - goret PlayerMediaInfo + // - goret PlayerMediaInfo (nullable) // // A Function to get the current media info #GstPlayerMediaInfo instance. GetMediaInfo() PlayerMediaInfo @@ -422,7 +519,7 @@ type Player interface { // GetSubtitleURI wraps gst_player_get_subtitle_uri // The function returns the following values: // - // - goret string + // - goret string (nullable) // // current subtitle URI GetSubtitleURI() string @@ -436,7 +533,7 @@ type Player interface { // GetURI wraps gst_player_get_uri // The function returns the following values: // - // - goret string + // - goret string (nullable) // // Gets the URI of the currently-playing stream. GetURI() string @@ -449,7 +546,7 @@ type Player interface { // // The function returns the following values: // - // - goret *gst.Sample + // - goret *gst.Sample (nullable) // // Get a snapshot of the currently selected video stream, if any. The format can be // selected with @format and optional configuration is possible with @config @@ -847,13 +944,13 @@ func PlayerConfigGetSeekAccurate(config *gst.Structure) bool { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Return the user agent which has been configured using // 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 + var cret *C.gchar // return, full, string, nullable-string carg1 = (*C.GstStructure)(gst.UnsafeStructureToGlibNone(config)) @@ -862,8 +959,10 @@ func PlayerConfigGetUserAgent(config *gst.Structure) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -1119,12 +1218,12 @@ func (player *PlayerInstance) GetConfig() *gst.Structure { // GetCurrentAudioTrack wraps gst_player_get_current_audio_track // The function returns the following values: // -// - goret PlayerAudioInfo +// - goret PlayerAudioInfo (nullable) // // A Function to get current audio #GstPlayerAudioInfo instance. func (player *PlayerInstance) GetCurrentAudioTrack() PlayerAudioInfo { var carg0 *C.GstPlayer // in, none, converted - var cret *C.GstPlayerAudioInfo // return, full, converted + var cret *C.GstPlayerAudioInfo // return, full, converted, nullable carg0 = (*C.GstPlayer)(UnsafePlayerToGlibNone(player)) @@ -1133,7 +1232,9 @@ func (player *PlayerInstance) GetCurrentAudioTrack() PlayerAudioInfo { var goret PlayerAudioInfo - goret = UnsafePlayerAudioInfoFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePlayerAudioInfoFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1141,12 +1242,12 @@ func (player *PlayerInstance) GetCurrentAudioTrack() PlayerAudioInfo { // GetCurrentSubtitleTrack wraps gst_player_get_current_subtitle_track // The function returns the following values: // -// - goret PlayerSubtitleInfo +// - goret PlayerSubtitleInfo (nullable) // // A Function to get current subtitle #GstPlayerSubtitleInfo instance. func (player *PlayerInstance) GetCurrentSubtitleTrack() PlayerSubtitleInfo { var carg0 *C.GstPlayer // in, none, converted - var cret *C.GstPlayerSubtitleInfo // return, full, converted + var cret *C.GstPlayerSubtitleInfo // return, full, converted, nullable carg0 = (*C.GstPlayer)(UnsafePlayerToGlibNone(player)) @@ -1155,7 +1256,9 @@ func (player *PlayerInstance) GetCurrentSubtitleTrack() PlayerSubtitleInfo { var goret PlayerSubtitleInfo - goret = UnsafePlayerSubtitleInfoFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePlayerSubtitleInfoFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1163,12 +1266,12 @@ func (player *PlayerInstance) GetCurrentSubtitleTrack() PlayerSubtitleInfo { // GetCurrentVideoTrack wraps gst_player_get_current_video_track // The function returns the following values: // -// - goret PlayerVideoInfo +// - goret PlayerVideoInfo (nullable) // // A Function to get current video #GstPlayerVideoInfo instance. func (player *PlayerInstance) GetCurrentVideoTrack() PlayerVideoInfo { var carg0 *C.GstPlayer // in, none, converted - var cret *C.GstPlayerVideoInfo // return, full, converted + var cret *C.GstPlayerVideoInfo // return, full, converted, nullable carg0 = (*C.GstPlayer)(UnsafePlayerToGlibNone(player)) @@ -1177,7 +1280,9 @@ func (player *PlayerInstance) GetCurrentVideoTrack() PlayerVideoInfo { var goret PlayerVideoInfo - goret = UnsafePlayerVideoInfoFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePlayerVideoInfoFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1185,10 +1290,10 @@ func (player *PlayerInstance) GetCurrentVideoTrack() PlayerVideoInfo { // GetCurrentVisualization wraps gst_player_get_current_visualization // The function returns the following values: // -// - goret string +// - goret string (nullable) func (player *PlayerInstance) GetCurrentVisualization() string { var carg0 *C.GstPlayer // in, none, converted - var cret *C.gchar // return, full, string + var cret *C.gchar // return, full, string, nullable-string carg0 = (*C.GstPlayer)(UnsafePlayerToGlibNone(player)) @@ -1197,8 +1302,10 @@ func (player *PlayerInstance) GetCurrentVisualization() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -1228,12 +1335,12 @@ func (player *PlayerInstance) GetDuration() gst.ClockTime { // GetMediaInfo wraps gst_player_get_media_info // The function returns the following values: // -// - goret PlayerMediaInfo +// - goret PlayerMediaInfo (nullable) // // A Function to get the current media info #GstPlayerMediaInfo instance. func (player *PlayerInstance) GetMediaInfo() PlayerMediaInfo { var carg0 *C.GstPlayer // in, none, converted - var cret *C.GstPlayerMediaInfo // return, full, converted + var cret *C.GstPlayerMediaInfo // return, full, converted, nullable carg0 = (*C.GstPlayer)(UnsafePlayerToGlibNone(player)) @@ -1242,7 +1349,9 @@ func (player *PlayerInstance) GetMediaInfo() PlayerMediaInfo { var goret PlayerMediaInfo - goret = UnsafePlayerMediaInfoFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafePlayerMediaInfoFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1376,12 +1485,12 @@ func (player *PlayerInstance) GetRate() float64 { // GetSubtitleURI wraps gst_player_get_subtitle_uri // The function returns the following values: // -// - goret string +// - goret string (nullable) // // current subtitle URI func (player *PlayerInstance) GetSubtitleURI() string { var carg0 *C.GstPlayer // in, none, converted - var cret *C.gchar // return, full, string + var cret *C.gchar // return, full, string, nullable-string carg0 = (*C.GstPlayer)(UnsafePlayerToGlibNone(player)) @@ -1390,8 +1499,10 @@ func (player *PlayerInstance) GetSubtitleURI() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -1421,12 +1532,12 @@ func (player *PlayerInstance) GetSubtitleVideoOffset() int64 { // GetURI wraps gst_player_get_uri // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 + var cret *C.gchar // return, full, string, nullable-string carg0 = (*C.GstPlayer)(UnsafePlayerToGlibNone(player)) @@ -1435,8 +1546,10 @@ func (player *PlayerInstance) GetURI() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -1450,7 +1563,7 @@ func (player *PlayerInstance) GetURI() string { // // The function returns the following values: // -// - goret *gst.Sample +// - goret *gst.Sample (nullable) // // Get a snapshot of the currently selected video stream, if any. The format can be // selected with @format and optional configuration is possible with @config @@ -1462,7 +1575,7 @@ func (player *PlayerInstance) GetVideoSnapshot(format PlayerSnapshotFormat, conf var carg0 *C.GstPlayer // in, none, converted var carg1 C.GstPlayerSnapshotFormat // in, none, casted var carg2 *C.GstStructure // in, none, converted, nullable - var cret *C.GstSample // return, full, converted + var cret *C.GstSample // return, full, converted, nullable carg0 = (*C.GstPlayer)(UnsafePlayerToGlibNone(player)) carg1 = C.GstPlayerSnapshotFormat(format) @@ -1477,7 +1590,9 @@ func (player *PlayerInstance) GetVideoSnapshot(format PlayerSnapshotFormat, conf var goret *gst.Sample - goret = gst.UnsafeSampleFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeSampleFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -2197,7 +2312,7 @@ type PlayerMediaInfo interface { // GetContainerFormat wraps gst_player_media_info_get_container_format // The function returns the following values: // - // - goret string + // - goret string (nullable) GetContainerFormat() string // GetDuration wraps gst_player_media_info_get_duration // The function returns the following values: @@ -2207,7 +2322,7 @@ type PlayerMediaInfo interface { // GetImageSample wraps gst_player_media_info_get_image_sample // The function returns the following values: // - // - goret *gst.Sample + // - goret *gst.Sample (nullable) // // Function to get the image (or preview-image) stored in taglist. // Application can use `gst_sample_*_()` API's to get caps, buffer etc. @@ -2245,12 +2360,12 @@ type PlayerMediaInfo interface { // GetTags wraps gst_player_media_info_get_tags // The function returns the following values: // - // - goret *gst.TagList + // - goret *gst.TagList (nullable) GetTags() *gst.TagList // GetTitle wraps gst_player_media_info_get_title // The function returns the following values: // - // - goret string + // - goret string (nullable) GetTitle() string // GetURI wraps gst_player_media_info_get_uri // The function returns the following values: @@ -2338,10 +2453,10 @@ func (info *PlayerMediaInfoInstance) GetAudioStreams() []PlayerAudioInfo { // GetContainerFormat wraps gst_player_media_info_get_container_format // The function returns the following values: // -// - goret string +// - goret string (nullable) func (info *PlayerMediaInfoInstance) GetContainerFormat() string { var carg0 *C.GstPlayerMediaInfo // in, none, converted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstPlayerMediaInfo)(UnsafePlayerMediaInfoToGlibNone(info)) @@ -2350,7 +2465,9 @@ func (info *PlayerMediaInfoInstance) GetContainerFormat() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -2378,13 +2495,13 @@ func (info *PlayerMediaInfoInstance) GetDuration() gst.ClockTime { // GetImageSample wraps gst_player_media_info_get_image_sample // The function returns the following values: // -// - goret *gst.Sample +// - goret *gst.Sample (nullable) // // Function to get the image (or preview-image) stored in taglist. // Application can use `gst_sample_*_()` API's to get caps, buffer etc. func (info *PlayerMediaInfoInstance) GetImageSample() *gst.Sample { var carg0 *C.GstPlayerMediaInfo // in, none, converted - var cret *C.GstSample // return, none, converted + var cret *C.GstSample // return, none, converted, nullable carg0 = (*C.GstPlayerMediaInfo)(UnsafePlayerMediaInfoToGlibNone(info)) @@ -2393,7 +2510,9 @@ func (info *PlayerMediaInfoInstance) GetImageSample() *gst.Sample { var goret *gst.Sample - goret = gst.UnsafeSampleFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeSampleFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -2535,10 +2654,10 @@ func (info *PlayerMediaInfoInstance) GetSubtitleStreams() []PlayerSubtitleInfo { // GetTags wraps gst_player_media_info_get_tags // The function returns the following values: // -// - goret *gst.TagList +// - goret *gst.TagList (nullable) func (info *PlayerMediaInfoInstance) GetTags() *gst.TagList { var carg0 *C.GstPlayerMediaInfo // in, none, converted - var cret *C.GstTagList // return, none, converted + var cret *C.GstTagList // return, none, converted, nullable carg0 = (*C.GstPlayerMediaInfo)(UnsafePlayerMediaInfoToGlibNone(info)) @@ -2547,7 +2666,9 @@ func (info *PlayerMediaInfoInstance) GetTags() *gst.TagList { var goret *gst.TagList - goret = gst.UnsafeTagListFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeTagListFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -2555,10 +2676,10 @@ func (info *PlayerMediaInfoInstance) GetTags() *gst.TagList { // GetTitle wraps gst_player_media_info_get_title // The function returns the following values: // -// - goret string +// - goret string (nullable) func (info *PlayerMediaInfoInstance) GetTitle() string { var carg0 *C.GstPlayerMediaInfo // in, none, converted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstPlayerMediaInfo)(UnsafePlayerMediaInfoToGlibNone(info)) @@ -2567,7 +2688,9 @@ func (info *PlayerMediaInfoInstance) GetTitle() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -2683,12 +2806,12 @@ type PlayerStreamInfo interface { // GetCaps wraps gst_player_stream_info_get_caps // The function returns the following values: // - // - goret *gst.Caps + // - goret *gst.Caps (nullable) GetCaps() *gst.Caps // GetCodec wraps gst_player_stream_info_get_codec // The function returns the following values: // - // - goret string + // - goret string (nullable) // // A string describing codec used in #GstPlayerStreamInfo. GetCodec() string @@ -2711,7 +2834,7 @@ type PlayerStreamInfo interface { // GetTags wraps gst_player_stream_info_get_tags // The function returns the following values: // - // - goret *gst.TagList + // - goret *gst.TagList (nullable) GetTags() *gst.TagList } @@ -2752,10 +2875,10 @@ func UnsafePlayerStreamInfoToGlibFull(c PlayerStreamInfo) unsafe.Pointer { // GetCaps wraps gst_player_stream_info_get_caps // The function returns the following values: // -// - goret *gst.Caps +// - goret *gst.Caps (nullable) func (info *PlayerStreamInfoInstance) GetCaps() *gst.Caps { var carg0 *C.GstPlayerStreamInfo // in, none, converted - var cret *C.GstCaps // return, none, converted + var cret *C.GstCaps // return, none, converted, nullable carg0 = (*C.GstPlayerStreamInfo)(UnsafePlayerStreamInfoToGlibNone(info)) @@ -2764,7 +2887,9 @@ func (info *PlayerStreamInfoInstance) GetCaps() *gst.Caps { var goret *gst.Caps - goret = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeCapsFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -2772,12 +2897,12 @@ func (info *PlayerStreamInfoInstance) GetCaps() *gst.Caps { // GetCodec wraps gst_player_stream_info_get_codec // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstPlayerStreamInfo)(UnsafePlayerStreamInfoToGlibNone(info)) @@ -2786,7 +2911,9 @@ func (info *PlayerStreamInfoInstance) GetCodec() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -2840,10 +2967,10 @@ func (info *PlayerStreamInfoInstance) GetStreamType() string { // GetTags wraps gst_player_stream_info_get_tags // The function returns the following values: // -// - goret *gst.TagList +// - goret *gst.TagList (nullable) func (info *PlayerStreamInfoInstance) GetTags() *gst.TagList { var carg0 *C.GstPlayerStreamInfo // in, none, converted - var cret *C.GstTagList // return, none, converted + var cret *C.GstTagList // return, none, converted, nullable carg0 = (*C.GstPlayerStreamInfo)(UnsafePlayerStreamInfoToGlibNone(info)) @@ -2852,7 +2979,9 @@ func (info *PlayerStreamInfoInstance) GetTags() *gst.TagList { var goret *gst.TagList - goret = gst.UnsafeTagListFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeTagListFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -2875,7 +3004,7 @@ type PlayerSubtitleInfo interface { // GetLanguage wraps gst_player_subtitle_info_get_language // The function returns the following values: // - // - goret string + // - goret string (nullable) GetLanguage() string } @@ -2918,10 +3047,10 @@ func UnsafePlayerSubtitleInfoToGlibFull(c PlayerSubtitleInfo) unsafe.Pointer { // GetLanguage wraps gst_player_subtitle_info_get_language // The function returns the following values: // -// - goret string +// - goret string (nullable) func (info *PlayerSubtitleInfoInstance) GetLanguage() string { var carg0 *C.GstPlayerSubtitleInfo // in, none, converted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstPlayerSubtitleInfo)(UnsafePlayerSubtitleInfoToGlibNone(info)) @@ -2930,7 +3059,9 @@ func (info *PlayerSubtitleInfoInstance) GetLanguage() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -3353,7 +3484,7 @@ type PlayerAudioInfo interface { // GetLanguage wraps gst_player_audio_info_get_language // The function returns the following values: // - // - goret string + // - goret string (nullable) GetLanguage() string // GetMaxBitrate wraps gst_player_audio_info_get_max_bitrate // The function returns the following values: @@ -3446,10 +3577,10 @@ func (info *PlayerAudioInfoInstance) GetChannels() int { // GetLanguage wraps gst_player_audio_info_get_language // The function returns the following values: // -// - goret string +// - goret string (nullable) func (info *PlayerAudioInfoInstance) GetLanguage() string { var carg0 *C.GstPlayerAudioInfo // in, none, converted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstPlayerAudioInfo)(UnsafePlayerAudioInfoToGlibNone(info)) @@ -3458,7 +3589,9 @@ func (info *PlayerAudioInfoInstance) GetLanguage() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } diff --git a/pkg/gstrtp/gstrtp.gen.go b/pkg/gstrtp/gstrtp.gen.go index 7c47c1e..0553c76 100644 --- a/pkg/gstrtp/gstrtp.gen.go +++ b/pkg/gstrtp/gstrtp.gen.go @@ -940,12 +940,12 @@ func BufferAddRtpSourceMeta(buffer *gst.Buffer, ssrc *uint32, csrc []uint32) *RT // // The function returns the following values: // -// - goret *RTPSourceMeta +// - goret *RTPSourceMeta (nullable) // // Find the #GstRTPSourceMeta on @buffer. func BufferGetRtpSourceMeta(buffer *gst.Buffer) *RTPSourceMeta { var carg1 *C.GstBuffer // in, none, converted - var cret *C.GstRTPSourceMeta // return, none, converted + var cret *C.GstRTPSourceMeta // return, none, converted, nullable carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) @@ -954,7 +954,9 @@ func BufferGetRtpSourceMeta(buffer *gst.Buffer) *RTPSourceMeta { var goret *RTPSourceMeta - goret = UnsafeRTPSourceMetaFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeRTPSourceMetaFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -2151,7 +2153,7 @@ type RTPHeaderExtension interface { // GetURI wraps gst_rtp_header_extension_get_uri // The function returns the following values: // - // - goret string + // - goret string (nullable) GetURI() string // Read wraps gst_rtp_header_extension_read // @@ -2353,10 +2355,10 @@ func UnsafeRTPHeaderExtensionToGlibFull(c RTPHeaderExtension) unsafe.Pointer { // // The function returns the following values: // -// - goret RTPHeaderExtension +// - goret RTPHeaderExtension (nullable) func RTPHeaderExtensionCreateFromURI(uri string) RTPHeaderExtension { var carg1 *C.gchar // in, none, string - var cret *C.GstRTPHeaderExtension // return, full, converted + var cret *C.GstRTPHeaderExtension // return, full, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri))) defer C.free(unsafe.Pointer(carg1)) @@ -2366,7 +2368,9 @@ func RTPHeaderExtensionCreateFromURI(uri string) RTPHeaderExtension { var goret RTPHeaderExtension - goret = UnsafeRTPHeaderExtensionFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeRTPHeaderExtensionFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -2492,10 +2496,10 @@ func (ext *RTPHeaderExtensionInstance) GetSupportedFlags() RTPHeaderExtensionFla // GetURI wraps gst_rtp_header_extension_get_uri // The function returns the following values: // -// - goret string +// - goret string (nullable) func (ext *RTPHeaderExtensionInstance) GetURI() string { var carg0 *C.GstRTPHeaderExtension // in, none, converted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstRTPHeaderExtension)(UnsafeRTPHeaderExtensionToGlibNone(ext)) @@ -2504,7 +2508,9 @@ func (ext *RTPHeaderExtensionInstance) GetURI() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -4079,12 +4085,12 @@ func (packet *RTCPPacket) ByeGetNthSsrc(nth uint) uint32 { // ByeGetReason wraps gst_rtcp_packet_bye_get_reason // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Get the reason in @packet. func (packet *RTCPPacket) ByeGetReason() string { var carg0 *C.GstRTCPPacket // in, none, converted - var cret *C.gchar // return, full, string + var cret *C.gchar // return, full, string, nullable-string carg0 = (*C.GstRTCPPacket)(UnsafeRTCPPacketToGlibNone(packet)) @@ -4093,8 +4099,10 @@ func (packet *RTCPPacket) ByeGetReason() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -6544,7 +6552,7 @@ func (rtp *RTPBuffer) GetExtension() bool { // The function returns the following values: // // - bits uint16: location for header bits -// - goret *glib.Bytes +// - goret *glib.Bytes (nullable) // // Similar to gst_rtp_buffer_get_extension_data, but more suitable for language // bindings usage. @bits will contain the extension 16 bits of custom data and @@ -6557,7 +6565,7 @@ func (rtp *RTPBuffer) GetExtension() bool { func (rtp *RTPBuffer) GetExtensionBytes() (uint16, *glib.Bytes) { var carg0 *C.GstRTPBuffer // in, none, converted var carg1 C.guint16 // out, full, casted - var cret *C.GBytes // return, full, converted + var cret *C.GBytes // return, full, converted, nullable carg0 = (*C.GstRTPBuffer)(UnsafeRTPBufferToGlibNone(rtp)) @@ -6568,7 +6576,9 @@ func (rtp *RTPBuffer) GetExtensionBytes() (uint16, *glib.Bytes) { var goret *glib.Bytes bits = uint16(carg1) - goret = glib.UnsafeBytesFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = glib.UnsafeBytesFromGlibFull(unsafe.Pointer(cret)) + } return bits, goret } @@ -6693,14 +6703,14 @@ func (rtp *RTPBuffer) GetPayloadBuffer() *gst.Buffer { // GetPayloadBytes wraps gst_rtp_buffer_get_payload_bytes // The function returns the following values: // -// - goret *glib.Bytes +// - goret *glib.Bytes (nullable) // // Similar to gst_rtp_buffer_get_payload, but more suitable for language // bindings usage. The return value is a pointer to a #GBytes structure // containing the payload data in @rtp. func (rtp *RTPBuffer) GetPayloadBytes() *glib.Bytes { var carg0 *C.GstRTPBuffer // in, none, converted - var cret *C.GBytes // return, full, converted + var cret *C.GBytes // return, full, converted, nullable carg0 = (*C.GstRTPBuffer)(UnsafeRTPBufferToGlibNone(rtp)) @@ -6709,7 +6719,9 @@ func (rtp *RTPBuffer) GetPayloadBytes() *glib.Bytes { var goret *glib.Bytes - goret = glib.UnsafeBytesFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = glib.UnsafeBytesFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -7328,7 +7340,7 @@ func UnsafeRTPPayloadInfoToGlibFull(r *RTPPayloadInfo) unsafe.Pointer { // // The function returns the following values: // -// - goret *RTPPayloadInfo +// - goret *RTPPayloadInfo (nullable) // // Get the #GstRTPPayloadInfo for @media and @encoding_name. This function is // mostly used to get the default clock-rate and bandwidth for dynamic payload @@ -7338,7 +7350,7 @@ func UnsafeRTPPayloadInfoToGlibFull(r *RTPPayloadInfo) unsafe.Pointer { 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 + var cret *C.GstRTPPayloadInfo // return, none, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(media))) defer C.free(unsafe.Pointer(carg1)) @@ -7351,7 +7363,9 @@ func RTPPayloadInfoForName(media string, encodingName string) *RTPPayloadInfo { var goret *RTPPayloadInfo - goret = UnsafeRTPPayloadInfoFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeRTPPayloadInfoFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -7364,14 +7378,14 @@ func RTPPayloadInfoForName(media string, encodingName string) *RTPPayloadInfo { // // The function returns the following values: // -// - goret *RTPPayloadInfo +// - goret *RTPPayloadInfo (nullable) // // 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 + var cret *C.GstRTPPayloadInfo // return, none, converted, nullable carg1 = C.guint8(payloadType) @@ -7380,7 +7394,9 @@ func RTPPayloadInfoForPt(payloadType uint8) *RTPPayloadInfo { var goret *RTPPayloadInfo - goret = UnsafeRTPPayloadInfoFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeRTPPayloadInfoFromGlibNone(unsafe.Pointer(cret)) + } return goret } diff --git a/pkg/gstrtsp/gstrtsp.gen.go b/pkg/gstrtsp/gstrtsp.gen.go index 960f0fe..063ea51 100644 --- a/pkg/gstrtsp/gstrtsp.gen.go +++ b/pkg/gstrtsp/gstrtsp.gen.go @@ -1000,6 +1000,33 @@ func (e RTSPVersion) String() string { } } +// RTSPVersionAsText wraps gst_rtsp_version_as_text +// +// The function takes the following parameters: +// +// - version RTSPVersion: a #GstRTSPVersion +// +// The function returns the following values: +// +// - goret string +// +// Convert @version to a string. +func RTSPVersionAsText(version RTSPVersion) string { + var carg1 C.GstRTSPVersion // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstRTSPVersion(version) + + cret = C.gst_rtsp_version_as_text(carg1) + runtime.KeepAlive(version) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + // RTSPEvent wraps GstRTSPEvent // // The possible events for the connection. @@ -1250,6 +1277,35 @@ func (f RTSPMethod) String() string { return "RTSPMethod(" + strings.Join(parts, "|") + ")" } +// RTSPMethodAsText wraps gst_rtsp_method_as_text +// +// The function takes the following parameters: +// +// - method RTSPMethod: a #GstRTSPMethod +// +// The function returns the following values: +// +// - goret string (nullable) +// +// Convert @method to a string. +func RTSPMethodAsText(method RTSPMethod) string { + var carg1 C.GstRTSPMethod // in, none, casted + var cret *C.gchar // return, none, string, nullable-string + + carg1 = C.GstRTSPMethod(method) + + cret = C.gst_rtsp_method_as_text(carg1) + runtime.KeepAlive(method) + + var goret string + + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } + + return goret +} + // RTSPProfile wraps GstRTSPProfile // // The transfer profile to use. @@ -1443,7 +1499,7 @@ func RtspFindMethod(method string) RTSPMethod { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Calculates the digest auth response from the values given by the server and // the username and password. See RFC2069 for details. @@ -1457,7 +1513,7 @@ func RtspGenerateDigestAuthResponse(algorithm string, method string, realm strin 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 + var cret *C.gchar // return, full, string, nullable-string if algorithm != "" { carg1 = (*C.gchar)(unsafe.Pointer(C.CString(algorithm))) @@ -1487,8 +1543,10 @@ func RtspGenerateDigestAuthResponse(algorithm string, method string, realm strin var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -1505,7 +1563,7 @@ func RtspGenerateDigestAuthResponse(algorithm string, method string, realm strin // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Calculates the digest auth response from the values given by the server and // the md5sum. See RFC2069 for details. @@ -1520,7 +1578,7 @@ func RtspGenerateDigestAuthResponseFromMD5(algorithm string, method string, md5 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 + var cret *C.gchar // return, full, string, nullable-string if algorithm != "" { carg1 = (*C.gchar)(unsafe.Pointer(C.CString(algorithm))) @@ -1544,8 +1602,10 @@ func RtspGenerateDigestAuthResponseFromMD5(algorithm string, method string, md5 var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -1587,12 +1647,12 @@ func RtspHeaderAllowMultiple(field RTSPHeaderField) bool { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Convert @field to a string. func RtspHeaderAsText(field RTSPHeaderField) string { var carg1 C.GstRTSPHeaderField // in, none, casted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg1 = C.GstRTSPHeaderField(field) @@ -1601,7 +1661,9 @@ func RtspHeaderAsText(field RTSPHeaderField) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -2897,12 +2959,12 @@ func (conn *RTSPConnection) GetIP() string { // GetReadSocket wraps gst_rtsp_connection_get_read_socket // The function returns the following values: // -// - goret gio.Socket +// - goret gio.Socket (nullable) // // Get the file descriptor for reading. func (conn *RTSPConnection) GetReadSocket() gio.Socket { var carg0 *C.GstRTSPConnection // in, none, converted - var cret *C.GSocket // return, none, converted + var cret *C.GSocket // return, none, converted, nullable carg0 = (*C.GstRTSPConnection)(UnsafeRTSPConnectionToGlibNone(conn)) @@ -2911,7 +2973,9 @@ func (conn *RTSPConnection) GetReadSocket() gio.Socket { var goret gio.Socket - goret = gio.UnsafeSocketFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = gio.UnsafeSocketFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -2976,14 +3040,14 @@ func (conn *RTSPConnection) GetTLS() (gio.TlsConnection, error) { // GetTLSDatabase wraps gst_rtsp_connection_get_tls_database // The function returns the following values: // -// - goret gio.TlsDatabase +// - goret gio.TlsDatabase (nullable) // // Gets the anchor certificate authorities database that will be used // after a server certificate can't be verified with the default // certificate database. func (conn *RTSPConnection) GetTLSDatabase() gio.TlsDatabase { var carg0 *C.GstRTSPConnection // in, none, converted - var cret *C.GTlsDatabase // return, full, converted + var cret *C.GTlsDatabase // return, full, converted, nullable carg0 = (*C.GstRTSPConnection)(UnsafeRTSPConnectionToGlibNone(conn)) @@ -2992,7 +3056,9 @@ func (conn *RTSPConnection) GetTLSDatabase() gio.TlsDatabase { var goret gio.TlsDatabase - goret = gio.UnsafeTlsDatabaseFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gio.UnsafeTlsDatabaseFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -3000,14 +3066,14 @@ func (conn *RTSPConnection) GetTLSDatabase() gio.TlsDatabase { // GetTLSInteraction wraps gst_rtsp_connection_get_tls_interaction // The function returns the following values: // -// - goret gio.TlsInteraction +// - goret gio.TlsInteraction (nullable) // // Gets a #GTlsInteraction object to be used when the connection or certificate // database need to interact with the user. This will be used to prompt the // user for passwords where necessary. func (conn *RTSPConnection) GetTLSInteraction() gio.TlsInteraction { var carg0 *C.GstRTSPConnection // in, none, converted - var cret *C.GTlsInteraction // return, full, converted + var cret *C.GTlsInteraction // return, full, converted, nullable carg0 = (*C.GstRTSPConnection)(UnsafeRTSPConnectionToGlibNone(conn)) @@ -3016,7 +3082,9 @@ func (conn *RTSPConnection) GetTLSInteraction() gio.TlsInteraction { var goret gio.TlsInteraction - goret = gio.UnsafeTlsInteractionFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gio.UnsafeTlsInteractionFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -3056,12 +3124,12 @@ func (conn *RTSPConnection) GetTLSValidationFlags() gio.TLSCertificateFlags { // GetTunnelid wraps gst_rtsp_connection_get_tunnelid // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstRTSPConnection)(UnsafeRTSPConnectionToGlibNone(conn)) @@ -3070,7 +3138,9 @@ func (conn *RTSPConnection) GetTunnelid() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -3100,12 +3170,12 @@ func (conn *RTSPConnection) GetURL() *RTSPUrl { // GetWriteSocket wraps gst_rtsp_connection_get_write_socket // The function returns the following values: // -// - goret gio.Socket +// - goret gio.Socket (nullable) // // Get the file descriptor for writing. func (conn *RTSPConnection) GetWriteSocket() gio.Socket { var carg0 *C.GstRTSPConnection // in, none, converted - var cret *C.GSocket // return, none, converted + var cret *C.GSocket // return, none, converted, nullable carg0 = (*C.GstRTSPConnection)(UnsafeRTSPConnectionToGlibNone(conn)) @@ -3114,7 +3184,9 @@ func (conn *RTSPConnection) GetWriteSocket() gio.Socket { var goret gio.Socket - goret = gio.UnsafeSocketFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = gio.UnsafeSocketFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -5468,13 +5540,13 @@ func RTSPTransportParse(str string) (RTSPTransport, RTSPResult) { // AsText wraps gst_rtsp_transport_as_text // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Convert @transport into a string that can be used to signal the transport in // an RTSP SETUP response. func (transport *RTSPTransport) AsText() string { var carg0 *C.GstRTSPTransport // in, none, converted - var cret *C.gchar // return, full, string + var cret *C.gchar // return, full, string, nullable-string carg0 = (*C.GstRTSPTransport)(UnsafeRTSPTransportToGlibNone(transport)) @@ -5483,8 +5555,10 @@ func (transport *RTSPTransport) AsText() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } diff --git a/pkg/gstsdp/gstsdp.gen.go b/pkg/gstsdp/gstsdp.gen.go index 0b0b16d..fd8d7d0 100644 --- a/pkg/gstsdp/gstsdp.gen.go +++ b/pkg/gstsdp/gstsdp.gen.go @@ -921,7 +921,7 @@ func NewMIKEYMessageFromBytes(bytes *glib.Bytes, info *MIKEYDecryptInfo) (*MIKEY // // The function returns the following values: // -// - goret *MIKEYMessage +// - goret *MIKEYMessage (nullable) // // Makes mikey message including: // - Security Policy Payload @@ -929,7 +929,7 @@ func NewMIKEYMessageFromBytes(bytes *glib.Bytes, info *MIKEYDecryptInfo) (*MIKEY // - Key Data Sub-Payload func NewMIKEYMessageFromCaps(caps *gst.Caps) *MIKEYMessage { var carg1 *C.GstCaps // in, none, converted - var cret *C.GstMIKEYMessage // return, full, converted + var cret *C.GstMIKEYMessage // return, full, converted, nullable carg1 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(caps)) @@ -938,7 +938,9 @@ func NewMIKEYMessageFromCaps(caps *gst.Caps) *MIKEYMessage { var goret *MIKEYMessage - goret = UnsafeMIKEYMessageFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeMIKEYMessageFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1178,14 +1180,14 @@ func (msg *MIKEYMessage) Base64Encode() string { // // The function returns the following values: // -// - goret *MIKEYPayload +// - goret *MIKEYPayload (nullable) // // Find the @nth occurrence of the payload with @type in @msg. func (msg *MIKEYMessage) FindPayload(typ MIKEYPayloadType, nth uint) *MIKEYPayload { var carg0 *C.GstMIKEYMessage // in, none, converted var carg1 C.GstMIKEYPayloadType // in, none, casted var carg2 C.guint // in, none, casted - var cret *C.GstMIKEYPayload // return, none, converted + var cret *C.GstMIKEYPayload // return, none, converted, nullable carg0 = (*C.GstMIKEYMessage)(UnsafeMIKEYMessageToGlibNone(msg)) carg1 = C.GstMIKEYPayloadType(typ) @@ -1198,7 +1200,9 @@ func (msg *MIKEYMessage) FindPayload(typ MIKEYPayloadType, nth uint) *MIKEYPaylo var goret *MIKEYPayload - goret = UnsafeMIKEYPayloadFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeMIKEYPayloadFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -1211,13 +1215,13 @@ func (msg *MIKEYMessage) FindPayload(typ MIKEYPayloadType, nth uint) *MIKEYPaylo // // The function returns the following values: // -// - goret *MIKEYMapSRTP +// - goret *MIKEYMapSRTP (nullable) // // Get the policy information of @msg at @idx. func (msg *MIKEYMessage) GetCsSrtp(idx uint) *MIKEYMapSRTP { var carg0 *C.GstMIKEYMessage // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.GstMIKEYMapSRTP // return, none, converted + var cret *C.GstMIKEYMapSRTP // return, none, converted, nullable carg0 = (*C.GstMIKEYMessage)(UnsafeMIKEYMessageToGlibNone(msg)) carg1 = C.guint(idx) @@ -1228,7 +1232,9 @@ func (msg *MIKEYMessage) GetCsSrtp(idx uint) *MIKEYMapSRTP { var goret *MIKEYMapSRTP - goret = UnsafeMIKEYMapSRTPFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeMIKEYMapSRTPFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -1285,13 +1291,13 @@ func (msg *MIKEYMessage) GetNPayloads() uint { // // The function returns the following values: // -// - goret *MIKEYPayload +// - goret *MIKEYPayload (nullable) // // Get the #GstMIKEYPayload at @idx in @msg func (msg *MIKEYMessage) GetPayload(idx uint) *MIKEYPayload { var carg0 *C.GstMIKEYMessage // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.GstMIKEYPayload // return, none, converted + var cret *C.GstMIKEYPayload // return, none, converted, nullable carg0 = (*C.GstMIKEYMessage)(UnsafeMIKEYMessageToGlibNone(msg)) carg1 = C.guint(idx) @@ -1302,7 +1308,9 @@ func (msg *MIKEYMessage) GetPayload(idx uint) *MIKEYPayload { var goret *MIKEYPayload - goret = UnsafeMIKEYPayloadFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeMIKEYPayloadFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -1720,12 +1728,12 @@ func UnsafeMIKEYPayloadToGlibFull(m *MIKEYPayload) unsafe.Pointer { // // The function returns the following values: // -// - goret *MIKEYPayload +// - goret *MIKEYPayload (nullable) // // Make a new #GstMIKEYPayload with @type. func NewMIKEYPayload(typ MIKEYPayloadType) *MIKEYPayload { var carg1 C.GstMIKEYPayloadType // in, none, casted - var cret *C.GstMIKEYPayload // return, full, converted + var cret *C.GstMIKEYPayload // return, full, converted, nullable carg1 = C.GstMIKEYPayloadType(typ) @@ -1734,7 +1742,9 @@ func NewMIKEYPayload(typ MIKEYPayloadType) *MIKEYPayload { var goret *MIKEYPayload - goret = UnsafeMIKEYPayloadFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeMIKEYPayloadFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1802,14 +1812,14 @@ func (payload *MIKEYPayload) KemacGetNSub() uint { // // The function returns the following values: // -// - goret *MIKEYPayload +// - goret *MIKEYPayload (nullable) // // Get the sub payload of @payload at @idx. @payload should be of type // %GST_MIKEY_PT_KEMAC. func (payload *MIKEYPayload) KemacGetSub(idx uint) *MIKEYPayload { var carg0 *C.GstMIKEYPayload // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.GstMIKEYPayload // return, none, converted + var cret *C.GstMIKEYPayload // return, none, converted, nullable carg0 = (*C.GstMIKEYPayload)(UnsafeMIKEYPayloadToGlibNone(payload)) carg1 = C.guint(idx) @@ -1820,7 +1830,9 @@ func (payload *MIKEYPayload) KemacGetSub(idx uint) *MIKEYPayload { var goret *MIKEYPayload - goret = UnsafeMIKEYPayloadFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeMIKEYPayloadFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -2201,14 +2213,14 @@ func (payload *MIKEYPayload) SpGetNParams() uint { // // The function returns the following values: // -// - goret *MIKEYPayloadSPParam +// - goret *MIKEYPayloadSPParam (nullable) // // Get the Security Policy parameter in a %GST_MIKEY_PT_SP @payload // at @idx. func (payload *MIKEYPayload) SpGetParam(idx uint) *MIKEYPayloadSPParam { var carg0 *C.GstMIKEYPayload // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.GstMIKEYPayloadSPParam // return, none, converted + var cret *C.GstMIKEYPayloadSPParam // return, none, converted, nullable carg0 = (*C.GstMIKEYPayload)(UnsafeMIKEYPayloadToGlibNone(payload)) carg1 = C.guint(idx) @@ -2219,7 +2231,9 @@ func (payload *MIKEYPayload) SpGetParam(idx uint) *MIKEYPayloadSPParam { var goret *MIKEYPayloadSPParam - goret = UnsafeMIKEYPayloadSPParamFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeMIKEYPayloadSPParamFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -3687,13 +3701,13 @@ func (media *SDPMedia) GetAttribute(idx uint) *SDPAttribute { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstSDPMedia)(UnsafeSDPMediaToGlibNone(media)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -3705,7 +3719,9 @@ func (media *SDPMedia) GetAttributeVal(key string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -3719,14 +3735,14 @@ func (media *SDPMedia) GetAttributeVal(key string) string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 var carg2 C.guint // in, none, casted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstSDPMedia)(UnsafeSDPMediaToGlibNone(media)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -3740,7 +3756,9 @@ func (media *SDPMedia) GetAttributeValN(key string, nth uint) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -3783,7 +3801,7 @@ func (media *SDPMedia) GetBandwidth(idx uint) *SDPBandwidth { // // The function returns the following values: // -// - goret *gst.Caps +// - goret *gst.Caps (nullable) // // Mapping of caps from SDP fields: // @@ -3797,7 +3815,7 @@ func (media *SDPMedia) GetBandwidth(idx uint) *SDPBandwidth { func (media *SDPMedia) GetCapsFromMedia(pt int) *gst.Caps { var carg0 *C.GstSDPMedia // in, none, converted var carg1 C.gint // in, none, casted - var cret *C.GstCaps // return, full, converted + var cret *C.GstCaps // return, full, converted, nullable carg0 = (*C.GstSDPMedia)(UnsafeSDPMediaToGlibNone(media)) carg1 = C.gint(pt) @@ -3808,7 +3826,9 @@ func (media *SDPMedia) GetCapsFromMedia(pt int) *gst.Caps { var goret *gst.Caps - goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -5339,13 +5359,13 @@ func (msg *SDPMessage) GetAttribute(idx uint) *SDPAttribute { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -5357,7 +5377,9 @@ func (msg *SDPMessage) GetAttributeVal(key string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -5371,14 +5393,14 @@ func (msg *SDPMessage) GetAttributeVal(key string) string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 var carg2 C.guint // in, none, casted - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg0 = (*C.GstSDPMessage)(UnsafeSDPMessageToGlibNone(msg)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(key))) @@ -5392,7 +5414,9 @@ func (msg *SDPMessage) GetAttributeValN(key string, nth uint) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } diff --git a/pkg/gsttag/gsttag.gen.go b/pkg/gsttag/gsttag.gen.go index 66fc258..ce223f0 100644 --- a/pkg/gsttag/gsttag.gen.go +++ b/pkg/gsttag/gsttag.gen.go @@ -405,7 +405,7 @@ func TagCheckLanguageCode(langCode string) bool { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Convenience function to read a string with unknown character encoding. If // the string is already in UTF-8 encoding, it will be returned right away. @@ -419,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 + var cret *C.gchar // return, full, string, nullable-string _ = data _ = carg1 @@ -435,8 +435,10 @@ func TagFreeformStringToUTF8(data string, envVars []string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -449,12 +451,12 @@ func TagFreeformStringToUTF8(data string, envVars []string) string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Looks up the GStreamer tag for a ID3v2 tag. func TagFromID3Tag(id3Tag string) string { var carg1 *C.gchar // in, none, string - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(id3Tag))) defer C.free(unsafe.Pointer(carg1)) @@ -464,7 +466,9 @@ func TagFromID3Tag(id3Tag string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -478,14 +482,14 @@ func TagFromID3Tag(id3Tag string) string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 var carg2 *C.gchar // in, none, string - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(typ))) defer C.free(unsafe.Pointer(carg1)) @@ -498,7 +502,9 @@ func TagFromID3UserTag(typ string, id3UserTag string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -511,12 +517,12 @@ func TagFromID3UserTag(typ string, id3UserTag string) string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Looks up the GStreamer tag for a vorbiscomment tag. func TagFromVorbisTag(vorbisTag string) string { var carg1 *C.gchar // in, none, string - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(vorbisTag))) defer C.free(unsafe.Pointer(carg1)) @@ -526,7 +532,9 @@ func TagFromVorbisTag(vorbisTag string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -567,7 +575,7 @@ func TagGetID3V2TagSize(buffer *gst.Buffer) uint { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Returns two-letter ISO-639-1 language code given a three-letter ISO-639-2 // language code or two-letter ISO-639-1 language code (both are accepted for @@ -576,7 +584,7 @@ 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 - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(langCode))) defer C.free(unsafe.Pointer(carg1)) @@ -586,7 +594,9 @@ func TagGetLanguageCodeISO6391(langCode string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -599,7 +609,7 @@ func TagGetLanguageCodeISO6391(langCode string) string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Returns three-letter ISO-639-2 "bibliographic" language code given a // two-letter ISO-639-1 language code or a three-letter ISO-639-2 language @@ -612,7 +622,7 @@ 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 - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(langCode))) defer C.free(unsafe.Pointer(carg1)) @@ -622,7 +632,9 @@ func TagGetLanguageCodeISO6392B(langCode string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -635,7 +647,7 @@ func TagGetLanguageCodeISO6392B(langCode string) string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Returns three-letter ISO-639-2 "terminological" language code given a // two-letter ISO-639-1 language code or a three-letter ISO-639-2 language @@ -648,7 +660,7 @@ 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 - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(langCode))) defer C.free(unsafe.Pointer(carg1)) @@ -658,7 +670,9 @@ func TagGetLanguageCodeISO6392T(langCode string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -694,7 +708,7 @@ func TagGetLanguageCodes() []string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Returns the name of the language given an ISO-639 language code as // found in a GST_TAG_LANGUAGE_CODE tag. The name will be translated @@ -704,7 +718,7 @@ 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 - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(languageCode))) defer C.free(unsafe.Pointer(carg1)) @@ -714,7 +728,9 @@ func TagGetLanguageName(languageCode string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -728,13 +744,13 @@ func TagGetLanguageName(languageCode string) string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(licenseRef))) defer C.free(unsafe.Pointer(carg1)) @@ -744,7 +760,9 @@ func TagGetLicenseDescription(licenseRef string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -788,7 +806,7 @@ func TagGetLicenseFlags(licenseRef string) TagLicenseFlags { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Get the jurisdiction code of a license. This is usually a two-letter // ISO 3166-1 alpha-2 code, but there is also the special case of Scotland, @@ -799,7 +817,7 @@ func TagGetLicenseFlags(licenseRef string) TagLicenseFlags { // pt, scotland, se, si, tw, uk, us, za. func TagGetLicenseJurisdiction(licenseRef string) string { var carg1 *C.gchar // in, none, string - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(licenseRef))) defer C.free(unsafe.Pointer(carg1)) @@ -809,7 +827,9 @@ func TagGetLicenseJurisdiction(licenseRef string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -823,13 +843,13 @@ func TagGetLicenseJurisdiction(licenseRef string) string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(licenseRef))) defer C.free(unsafe.Pointer(carg1)) @@ -839,7 +859,9 @@ func TagGetLicenseNick(licenseRef string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -853,13 +875,13 @@ func TagGetLicenseNick(licenseRef string) string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(licenseRef))) defer C.free(unsafe.Pointer(carg1)) @@ -869,7 +891,9 @@ func TagGetLicenseTitle(licenseRef string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -883,12 +907,12 @@ func TagGetLicenseTitle(licenseRef string) string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Get the version of a license. func TagGetLicenseVersion(licenseRef string) string { var carg1 *C.gchar // in, none, string - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(licenseRef))) defer C.free(unsafe.Pointer(carg1)) @@ -898,7 +922,9 @@ func TagGetLicenseVersion(licenseRef string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -953,12 +979,12 @@ func TagID3GenreCount() uint { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 + var cret *C.gchar // return, none, string, nullable-string carg1 = C.guint(id) @@ -967,7 +993,9 @@ func TagID3GenreGet(id uint) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -983,7 +1011,7 @@ func TagID3GenreGet(id uint) string { // // The function returns the following values: // -// - goret *gst.Sample +// - goret *gst.Sample (nullable) // // Helper function for tag-reading plugins to create a #GstSample suitable to // add to a #GstTagList as an image tag (such as #GST_TAG_IMAGE or @@ -1011,7 +1039,7 @@ func TagImageDataToImageSample(imageData []uint8, imageType TagImageType) *gst.S 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.GstTagImageType // in, none, casted - var cret *C.GstSample // return, full, converted + var cret *C.GstSample // return, full, converted, nullable _ = imageData _ = carg1 @@ -1025,7 +1053,9 @@ func TagImageDataToImageSample(imageData []uint8, imageType TagImageType) *gst.S var goret *gst.Sample - goret = gst.UnsafeSampleFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeSampleFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1147,13 +1177,13 @@ func TagListFromExifBufferWithTIFFHeader(buffer *gst.Buffer) *gst.TagList { // // The function returns the following values: // -// - goret *gst.TagList +// - goret *gst.TagList (nullable) // // Creates a new tag list that contains the information parsed out of a // ID3 tag. func TagListFromID3V2Tag(buffer *gst.Buffer) *gst.TagList { var carg1 *C.GstBuffer // in, none, converted - var cret *C.GstTagList // return, full, converted + var cret *C.GstTagList // return, full, converted, nullable carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) @@ -1162,7 +1192,9 @@ func TagListFromID3V2Tag(buffer *gst.Buffer) *gst.TagList { var goret *gst.TagList - goret = gst.UnsafeTagListFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeTagListFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1178,7 +1210,7 @@ func TagListFromID3V2Tag(buffer *gst.Buffer) *gst.TagList { // // - vendorString string: pointer to a string that should take the // vendor string of this vorbis comment or NULL if you don't need it. -// - goret *gst.TagList +// - goret *gst.TagList (nullable) // // Creates a new tag list that contains the information parsed out of a // vorbiscomment packet. @@ -1188,7 +1220,7 @@ func TagListFromVorbiscomment(data []uint8, idData []uint8) (string, *gst.TagLis 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 - var cret *C.GstTagList // return, full, converted + var cret *C.GstTagList // return, full, converted, nullable _ = data _ = carg1 @@ -1208,7 +1240,9 @@ func TagListFromVorbiscomment(data []uint8, idData []uint8) (string, *gst.TagLis vendorString = C.GoString((*C.char)(unsafe.Pointer(carg5))) defer C.free(unsafe.Pointer(carg5)) - goret = gst.UnsafeTagListFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeTagListFromGlibFull(unsafe.Pointer(cret)) + } return vendorString, goret } @@ -1224,7 +1258,7 @@ func TagListFromVorbiscomment(data []uint8, idData []uint8) (string, *gst.TagLis // // - vendorString string: pointer to a string that should take the // vendor string of this vorbis comment or NULL if you don't need it. -// - goret *gst.TagList +// - goret *gst.TagList (nullable) // // Creates a new tag list that contains the information parsed out of a // vorbiscomment packet. @@ -1233,7 +1267,7 @@ func TagListFromVorbiscommentBuffer(buffer *gst.Buffer, idData []uint8) (string, 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 - var cret *C.GstTagList // return, full, converted + var cret *C.GstTagList // return, full, converted, nullable carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) _ = idData @@ -1250,7 +1284,9 @@ func TagListFromVorbiscommentBuffer(buffer *gst.Buffer, idData []uint8) (string, vendorString = C.GoString((*C.char)(unsafe.Pointer(carg4))) defer C.free(unsafe.Pointer(carg4)) - goret = gst.UnsafeTagListFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeTagListFromGlibFull(unsafe.Pointer(cret)) + } return vendorString, goret } @@ -1263,12 +1299,12 @@ func TagListFromVorbiscommentBuffer(buffer *gst.Buffer, idData []uint8) (string, // // The function returns the following values: // -// - goret *gst.TagList +// - goret *gst.TagList (nullable) // // Parse a xmp packet into a taglist. func TagListFromXmpBuffer(buffer *gst.Buffer) *gst.TagList { var carg1 *C.GstBuffer // in, none, converted - var cret *C.GstTagList // return, full, converted + var cret *C.GstTagList // return, full, converted, nullable carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) @@ -1277,7 +1313,9 @@ func TagListFromXmpBuffer(buffer *gst.Buffer) *gst.TagList { var goret *gst.TagList - goret = gst.UnsafeTagListFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeTagListFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1290,13 +1328,13 @@ func TagListFromXmpBuffer(buffer *gst.Buffer) *gst.TagList { // // The function returns the following values: // -// - goret *gst.TagList +// - goret *gst.TagList (nullable) // // Parses the data containing an ID3v1 tag and returns a #GstTagList from the // parsed data. func TagListNewFromID3V1(data [128]uint8) *gst.TagList { var carg1 *C.guint8 // in, transfer: none, C Pointers: 1, Name: array[guint8], array (inner: *typesystem.CastablePrimitive, fixed-size: 128) - var cret *C.GstTagList // return, full, converted + var cret *C.GstTagList // return, full, converted, nullable _ = data _ = carg1 @@ -1307,7 +1345,9 @@ func TagListNewFromID3V1(data [128]uint8) *gst.TagList { var goret *gst.TagList - goret = gst.UnsafeTagListFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeTagListFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1429,7 +1469,7 @@ func TagListToVorbiscommentBuffer(list *gst.TagList, idData []uint8, vendorStrin // // The function returns the following values: // -// - goret *gst.Buffer +// - goret *gst.Buffer (nullable) // // Formats a taglist as a xmp packet using only the selected // schemas. An empty list (%NULL) means that all schemas should @@ -1438,7 +1478,7 @@ func TagListToXmpBuffer(list *gst.TagList, readOnly bool, schemas []string) *gst var carg1 *C.GstTagList // in, none, converted var carg2 C.gboolean // in var carg3 **C.gchar // in, transfer: none, C Pointers: 2, Name: array[utf8], array (inner: *typesystem.StringPrimitive, zero-terminated) - var cret *C.GstBuffer // return, full, converted + var cret *C.GstBuffer // return, full, converted, nullable carg1 = (*C.GstTagList)(gst.UnsafeTagListToGlibNone(list)) if readOnly { @@ -1455,7 +1495,9 @@ func TagListToXmpBuffer(list *gst.TagList, readOnly bool, schemas []string) *gst var goret *gst.Buffer - goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1541,12 +1583,12 @@ func TagRegisterMusicbrainzTags() { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Looks up the ID3v2 tag for a GStreamer tag. func TagToID3Tag(gstTag string) string { var carg1 *C.gchar // in, none, string - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(gstTag))) defer C.free(unsafe.Pointer(carg1)) @@ -1556,7 +1598,9 @@ func TagToID3Tag(gstTag string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } @@ -1610,12 +1654,12 @@ func TagToVorbisComments(list *gst.TagList, tag string) []string { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Looks up the vorbiscomment tag for a GStreamer tag. func TagToVorbisTag(gstTag string) string { var carg1 *C.gchar // in, none, string - var cret *C.gchar // return, none, string + var cret *C.gchar // return, none, string, nullable-string carg1 = (*C.gchar)(unsafe.Pointer(C.CString(gstTag))) defer C.free(unsafe.Pointer(carg1)) @@ -1625,7 +1669,9 @@ func TagToVorbisTag(gstTag string) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } return goret } diff --git a/pkg/gstvideo/gstvideo.gen.go b/pkg/gstvideo/gstvideo.gen.go index 1da0d16..1953e5c 100644 --- a/pkg/gstvideo/gstvideo.gen.go +++ b/pkg/gstvideo/gstvideo.gen.go @@ -96,7 +96,6 @@ var ( TypeVideoInfoDmaDrm = gobject.Type(C.gst_video_info_dma_drm_get_type()) TypeVideoOverlayComposition = gobject.Type(C.gst_video_overlay_composition_get_type()) TypeVideoOverlayRectangle = gobject.Type(C.gst_video_overlay_rectangle_get_type()) - TypeVideoTimeCode = gobject.Type(C.gst_video_time_code_get_type()) TypeVideoTimeCodeInterval = gobject.Type(C.gst_video_time_code_interval_get_type()) TypeVideoVBIEncoder = gobject.Type(C.gst_video_vbi_encoder_get_type()) TypeVideoVBIParser = gobject.Type(C.gst_video_vbi_parser_get_type()) @@ -176,7 +175,6 @@ func init() { gobject.TypeMarshaler{T: TypeVideoInfoDmaDrm, F: marshalVideoInfoDmaDrm}, gobject.TypeMarshaler{T: TypeVideoOverlayComposition, F: marshalVideoOverlayComposition}, gobject.TypeMarshaler{T: TypeVideoOverlayRectangle, F: marshalVideoOverlayRectangle}, - gobject.TypeMarshaler{T: TypeVideoTimeCode, F: marshalVideoTimeCode}, gobject.TypeMarshaler{T: TypeVideoTimeCodeInterval, F: marshalVideoTimeCodeInterval}, gobject.TypeMarshaler{T: TypeVideoVBIEncoder, F: marshalVideoVBIEncoder}, gobject.TypeMarshaler{T: TypeVideoVBIParser, F: marshalVideoVBIParser}, @@ -1017,6 +1015,61 @@ func (e VideoCaptionType) String() string { } } +// VideoCaptionTypeFromCaps wraps gst_video_caption_type_from_caps +// +// The function takes the following parameters: +// +// - caps *gst.Caps: Fixed #GstCaps to parse +// +// The function returns the following values: +// +// - goret VideoCaptionType +// +// Parses fixed Closed Caption #GstCaps and returns the corresponding caption +// type, or %GST_VIDEO_CAPTION_TYPE_UNKNOWN. +func VideoCaptionTypeFromCaps(caps *gst.Caps) VideoCaptionType { + var carg1 *C.GstCaps // in, none, converted + var cret C.GstVideoCaptionType // return, none, casted + + carg1 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(caps)) + + cret = C.gst_video_caption_type_from_caps(carg1) + runtime.KeepAlive(caps) + + var goret VideoCaptionType + + goret = VideoCaptionType(cret) + + return goret +} + +// VideoCaptionTypeToCaps wraps gst_video_caption_type_to_caps +// +// The function takes the following parameters: +// +// - typ VideoCaptionType: #GstVideoCaptionType +// +// The function returns the following values: +// +// - goret *gst.Caps +// +// Creates new caps corresponding to @type. +func VideoCaptionTypeToCaps(typ VideoCaptionType) *gst.Caps { + var carg1 C.GstVideoCaptionType // in, none, casted + var cret *C.GstCaps // return, full, converted + + carg1 = C.GstVideoCaptionType(typ) + + cret = C.gst_video_caption_type_to_caps(carg1) + runtime.KeepAlive(typ) + + var goret *gst.Caps + + goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + + return goret +} + // VideoChromaMethod wraps GstVideoChromaMethod // // Different subsampling and upsampling methods @@ -1162,6 +1215,127 @@ func (e VideoColorMatrix) String() string { } } +// VideoColorMatrixFromISO wraps gst_video_color_matrix_from_iso +// +// The function takes the following parameters: +// +// - value uint: a ITU-T H.273 matrix coefficients value +// +// The function returns the following values: +// +// - goret VideoColorMatrix +// +// Converts the @value to the #GstVideoColorMatrix +// The matrix coefficients (MatrixCoefficients) value is +// defined by "ISO/IEC 23001-8 Section 7.3 Table 4" +// and "ITU-T H.273 Table 4". +// "H.264 Table E-5" and "H.265 Table E.5" share the identical values. +func VideoColorMatrixFromISO(value uint) VideoColorMatrix { + var carg1 C.guint // in, none, casted + var cret C.GstVideoColorMatrix // return, none, casted + + carg1 = C.guint(value) + + cret = C.gst_video_color_matrix_from_iso(carg1) + runtime.KeepAlive(value) + + var goret VideoColorMatrix + + goret = VideoColorMatrix(cret) + + return goret +} + +// VideoColorMatrixGetKrKb wraps gst_video_color_matrix_get_Kr_Kb +// +// The function takes the following parameters: +// +// - matrix VideoColorMatrix: a #GstVideoColorMatrix +// +// The function returns the following values: +// +// - Kr float64: result red channel coefficient +// - Kb float64: result blue channel coefficient +// - goret bool +// +// Get the coefficients used to convert between Y'PbPr and R'G'B' using @matrix. +// +// When: +// +// |[ +// 0.0 <= [Y',R',G',B'] <= 1.0) +// (-0.5 <= [Pb,Pr] <= 0.5) +// ]| +// +// the general conversion is given by: +// +// |[ +// Y' = Kr*R' + (1-Kr-Kb)*G' + Kb*B' +// Pb = (B'-Y')/(2*(1-Kb)) +// Pr = (R'-Y')/(2*(1-Kr)) +// ]| +// +// and the other way around: +// +// |[ +// R' = Y' + Cr*2*(1-Kr) +// G' = Y' - Cb*2*(1-Kb)*Kb/(1-Kr-Kb) - Cr*2*(1-Kr)*Kr/(1-Kr-Kb) +// B' = Y' + Cb*2*(1-Kb) +// ]| +func VideoColorMatrixGetKrKb(matrix VideoColorMatrix) (float64, float64, bool) { + var carg1 C.GstVideoColorMatrix // in, none, casted + var carg2 C.gdouble // out, full, casted + var carg3 C.gdouble // out, full, casted + var cret C.gboolean // return + + carg1 = C.GstVideoColorMatrix(matrix) + + cret = C.gst_video_color_matrix_get_Kr_Kb(carg1, &carg2, &carg3) + runtime.KeepAlive(matrix) + + var Kr float64 + var Kb float64 + var goret bool + + Kr = float64(carg2) + Kb = float64(carg3) + if cret != 0 { + goret = true + } + + return Kr, Kb, goret +} + +// VideoColorMatrixToISO wraps gst_video_color_matrix_to_iso +// +// The function takes the following parameters: +// +// - matrix VideoColorMatrix: a #GstVideoColorMatrix +// +// The function returns the following values: +// +// - goret uint +// +// Converts #GstVideoColorMatrix to the "matrix coefficients" +// (MatrixCoefficients) value defined by "ISO/IEC 23001-8 Section 7.3 Table 4" +// and "ITU-T H.273 Table 4". +// "H.264 Table E-5" and "H.265 Table E.5" share the identical values. +func VideoColorMatrixToISO(matrix VideoColorMatrix) uint { + var carg1 C.GstVideoColorMatrix // in, none, casted + var cret C.guint // return, none, casted + + carg1 = C.GstVideoColorMatrix(matrix) + + cret = C.gst_video_color_matrix_to_iso(carg1) + runtime.KeepAlive(matrix) + + var goret uint + + goret = uint(cret) + + return goret +} + // VideoColorPrimaries wraps GstVideoColorPrimaries // // The color primaries define the how to transform linear RGB values to and from @@ -1262,6 +1436,126 @@ func (e VideoColorPrimaries) String() string { } } +// VideoColorPrimariesFromISO wraps gst_video_color_primaries_from_iso +// +// The function takes the following parameters: +// +// - value uint: a ITU-T H.273 colour primaries value +// +// The function returns the following values: +// +// - goret VideoColorPrimaries +// +// Converts the @value to the #GstVideoColorPrimaries +// The colour primaries (ColourPrimaries) value is +// defined by "ISO/IEC 23001-8 Section 7.1 Table 2" and "ITU-T H.273 Table 2". +// "H.264 Table E-3" and "H.265 Table E.3" share the identical values. +func VideoColorPrimariesFromISO(value uint) VideoColorPrimaries { + var carg1 C.guint // in, none, casted + var cret C.GstVideoColorPrimaries // return, none, casted + + carg1 = C.guint(value) + + cret = C.gst_video_color_primaries_from_iso(carg1) + runtime.KeepAlive(value) + + var goret VideoColorPrimaries + + goret = VideoColorPrimaries(cret) + + return goret +} + +// VideoColorPrimariesGetInfo wraps gst_video_color_primaries_get_info +// +// The function takes the following parameters: +// +// - primaries VideoColorPrimaries: a #GstVideoColorPrimaries +// +// The function returns the following values: +// +// - goret *VideoColorPrimariesInfo +// +// Get information about the chromaticity coordinates of @primaries. +func VideoColorPrimariesGetInfo(primaries VideoColorPrimaries) *VideoColorPrimariesInfo { + var carg1 C.GstVideoColorPrimaries // in, none, casted + var cret *C.GstVideoColorPrimariesInfo // return, none, converted + + carg1 = C.GstVideoColorPrimaries(primaries) + + cret = C.gst_video_color_primaries_get_info(carg1) + runtime.KeepAlive(primaries) + + var goret *VideoColorPrimariesInfo + + goret = UnsafeVideoColorPrimariesInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + +// VideoColorPrimariesIsEquivalent wraps gst_video_color_primaries_is_equivalent +// +// The function takes the following parameters: +// +// - primaries VideoColorPrimaries: a #GstVideoColorPrimaries +// - other VideoColorPrimaries: another #GstVideoColorPrimaries +// +// The function returns the following values: +// +// - goret bool +// +// Checks whether @primaries and @other are functionally equivalent +func VideoColorPrimariesIsEquivalent(primaries VideoColorPrimaries, other VideoColorPrimaries) bool { + var carg1 C.GstVideoColorPrimaries // in, none, casted + var carg2 C.GstVideoColorPrimaries // in, none, casted + var cret C.gboolean // return + + carg1 = C.GstVideoColorPrimaries(primaries) + carg2 = C.GstVideoColorPrimaries(other) + + cret = C.gst_video_color_primaries_is_equivalent(carg1, carg2) + runtime.KeepAlive(primaries) + runtime.KeepAlive(other) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + +// VideoColorPrimariesToISO wraps gst_video_color_primaries_to_iso +// +// The function takes the following parameters: +// +// - primaries VideoColorPrimaries: a #GstVideoColorPrimaries +// +// The function returns the following values: +// +// - goret uint +// +// Converts #GstVideoColorPrimaries to the "colour primaries" (ColourPrimaries) +// value defined by "ISO/IEC 23001-8 Section 7.1 Table 2" +// and "ITU-T H.273 Table 2". +// "H.264 Table E-3" and "H.265 Table E.3" share the identical values. +func VideoColorPrimariesToISO(primaries VideoColorPrimaries) uint { + var carg1 C.GstVideoColorPrimaries // in, none, casted + var cret C.guint // return, none, casted + + carg1 = C.GstVideoColorPrimaries(primaries) + + cret = C.gst_video_color_primaries_to_iso(carg1) + runtime.KeepAlive(primaries) + + var goret uint + + goret = uint(cret) + + return goret +} + // VideoColorRange wraps GstVideoColorRange // // Possible color range values. These constants are defined for 8 bit color @@ -1398,6 +1692,61 @@ func (e VideoFieldOrder) String() string { } } +// VideoFieldOrderFromString wraps gst_video_field_order_from_string +// +// The function takes the following parameters: +// +// - order string: a field order +// +// The function returns the following values: +// +// - goret VideoFieldOrder +// +// Convert @order to a #GstVideoFieldOrder +func VideoFieldOrderFromString(order string) VideoFieldOrder { + var carg1 *C.gchar // in, none, string + var cret C.GstVideoFieldOrder // return, none, casted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(order))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_video_field_order_from_string(carg1) + runtime.KeepAlive(order) + + var goret VideoFieldOrder + + goret = VideoFieldOrder(cret) + + return goret +} + +// VideoFieldOrderToString wraps gst_video_field_order_to_string +// +// The function takes the following parameters: +// +// - order VideoFieldOrder: a #GstVideoFieldOrder +// +// The function returns the following values: +// +// - goret string +// +// Convert @order to its string representation. +func VideoFieldOrderToString(order VideoFieldOrder) string { + var carg1 C.GstVideoFieldOrder // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstVideoFieldOrder(order) + + cret = C.gst_video_field_order_to_string(carg1) + runtime.KeepAlive(order) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + // VideoFormat wraps GstVideoFormat // // Enum value describing the most common video formats. @@ -2114,6 +2463,199 @@ func (e VideoFormat) String() string { } } +// VideoFormatFromFourcc wraps gst_video_format_from_fourcc +// +// The function takes the following parameters: +// +// - fourcc uint32: a FOURCC value representing raw YUV video +// +// The function returns the following values: +// +// - goret VideoFormat +// +// Converts a FOURCC value into the corresponding #GstVideoFormat. +// If the FOURCC cannot be represented by #GstVideoFormat, +// #GST_VIDEO_FORMAT_UNKNOWN is returned. +func VideoFormatFromFourcc(fourcc uint32) VideoFormat { + var carg1 C.guint32 // in, none, casted + var cret C.GstVideoFormat // return, none, casted + + carg1 = C.guint32(fourcc) + + cret = C.gst_video_format_from_fourcc(carg1) + runtime.KeepAlive(fourcc) + + var goret VideoFormat + + goret = VideoFormat(cret) + + return goret +} + +// VideoFormatFromMasks wraps gst_video_format_from_masks +// +// The function takes the following parameters: +// +// - depth int: the amount of bits used for a pixel +// - bpp int: the amount of bits used to store a pixel. This value is bigger than +// @depth +// - endianness int: the endianness of the masks, #G_LITTLE_ENDIAN or #G_BIG_ENDIAN +// - redMask uint: the red mask +// - greenMask uint: the green mask +// - blueMask uint: the blue mask +// - alphaMask uint: the alpha mask, or 0 if no alpha mask +// +// The function returns the following values: +// +// - goret VideoFormat +// +// Find the #GstVideoFormat for the given parameters. +func VideoFormatFromMasks(depth int, bpp int, endianness int, redMask uint, greenMask uint, blueMask uint, alphaMask uint) VideoFormat { + var carg1 C.gint // in, none, casted + var carg2 C.gint // in, none, casted + var carg3 C.gint // in, none, casted + var carg4 C.guint // in, none, casted + var carg5 C.guint // in, none, casted + var carg6 C.guint // in, none, casted + var carg7 C.guint // in, none, casted + var cret C.GstVideoFormat // return, none, casted + + carg1 = C.gint(depth) + carg2 = C.gint(bpp) + carg3 = C.gint(endianness) + carg4 = C.guint(redMask) + carg5 = C.guint(greenMask) + carg6 = C.guint(blueMask) + carg7 = C.guint(alphaMask) + + cret = C.gst_video_format_from_masks(carg1, carg2, carg3, carg4, carg5, carg6, carg7) + runtime.KeepAlive(depth) + runtime.KeepAlive(bpp) + runtime.KeepAlive(endianness) + runtime.KeepAlive(redMask) + runtime.KeepAlive(greenMask) + runtime.KeepAlive(blueMask) + runtime.KeepAlive(alphaMask) + + var goret VideoFormat + + goret = VideoFormat(cret) + + return goret +} + +// VideoFormatFromString wraps gst_video_format_from_string +// +// The function takes the following parameters: +// +// - format string: a format string +// +// The function returns the following values: +// +// - goret VideoFormat +// +// Convert the @format string to its #GstVideoFormat. +func VideoFormatFromString(format string) VideoFormat { + var carg1 *C.gchar // in, none, string + var cret C.GstVideoFormat // return, none, casted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(format))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_video_format_from_string(carg1) + runtime.KeepAlive(format) + + var goret VideoFormat + + goret = VideoFormat(cret) + + return goret +} + +// VideoFormatGetInfo wraps gst_video_format_get_info +// +// The function takes the following parameters: +// +// - format VideoFormat: a #GstVideoFormat +// +// The function returns the following values: +// +// - goret *VideoFormatInfo +// +// Get the #GstVideoFormatInfo for @format +func VideoFormatGetInfo(format VideoFormat) *VideoFormatInfo { + var carg1 C.GstVideoFormat // in, none, casted + var cret *C.GstVideoFormatInfo // return, none, converted + + carg1 = C.GstVideoFormat(format) + + cret = C.gst_video_format_get_info(carg1) + runtime.KeepAlive(format) + + var goret *VideoFormatInfo + + goret = UnsafeVideoFormatInfoFromGlibNone(unsafe.Pointer(cret)) + + return goret +} + +// VideoFormatToFourcc wraps gst_video_format_to_fourcc +// +// The function takes the following parameters: +// +// - format VideoFormat: a #GstVideoFormat video format +// +// The function returns the following values: +// +// - goret uint32 +// +// Converts a #GstVideoFormat value into the corresponding FOURCC. Only +// a few YUV formats have corresponding FOURCC values. If @format has +// no corresponding FOURCC value, 0 is returned. +func VideoFormatToFourcc(format VideoFormat) uint32 { + var carg1 C.GstVideoFormat // in, none, casted + var cret C.guint32 // return, none, casted + + carg1 = C.GstVideoFormat(format) + + cret = C.gst_video_format_to_fourcc(carg1) + runtime.KeepAlive(format) + + var goret uint32 + + goret = uint32(cret) + + return goret +} + +// VideoFormatToString wraps gst_video_format_to_string +// +// The function takes the following parameters: +// +// - format VideoFormat: a #GstVideoFormat video format +// +// The function returns the following values: +// +// - goret string +// +// Returns a string containing a descriptive name for +// the #GstVideoFormat if there is one, or NULL otherwise. +func VideoFormatToString(format VideoFormat) string { + var carg1 C.GstVideoFormat // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstVideoFormat(format) + + cret = C.gst_video_format_to_string(carg1) + runtime.KeepAlive(format) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + // VideoGLTextureOrientation wraps GstVideoGLTextureOrientation // // The orientation of the GL texture. @@ -2316,6 +2858,61 @@ func (e VideoInterlaceMode) String() string { } } +// VideoInterlaceModeFromString wraps gst_video_interlace_mode_from_string +// +// The function takes the following parameters: +// +// - mode string: a mode +// +// The function returns the following values: +// +// - goret VideoInterlaceMode +// +// Convert @mode to a #GstVideoInterlaceMode +func VideoInterlaceModeFromString(mode string) VideoInterlaceMode { + var carg1 *C.gchar // in, none, string + var cret C.GstVideoInterlaceMode // return, none, casted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(mode))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_video_interlace_mode_from_string(carg1) + runtime.KeepAlive(mode) + + var goret VideoInterlaceMode + + goret = VideoInterlaceMode(cret) + + return goret +} + +// VideoInterlaceModeToString wraps gst_video_interlace_mode_to_string +// +// The function takes the following parameters: +// +// - mode VideoInterlaceMode: a #GstVideoInterlaceMode +// +// The function returns the following values: +// +// - goret string +// +// Convert @mode to its string representation. +func VideoInterlaceModeToString(mode VideoInterlaceMode) string { + var carg1 C.GstVideoInterlaceMode // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstVideoInterlaceMode(mode) + + cret = C.gst_video_interlace_mode_to_string(carg1) + runtime.KeepAlive(mode) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + // VideoMatrixMode wraps GstVideoMatrixMode // // Different color matrix conversion modes @@ -2568,6 +3165,62 @@ func (e VideoMultiviewMode) String() string { } } +// VideoMultiviewModeFromCapsString wraps gst_video_multiview_mode_from_caps_string +// +// The function takes the following parameters: +// +// - capsMviewMode string: multiview-mode field string from caps +// +// The function returns the following values: +// +// - goret VideoMultiviewMode +func VideoMultiviewModeFromCapsString(capsMviewMode string) VideoMultiviewMode { + var carg1 *C.gchar // in, none, string + var cret C.GstVideoMultiviewMode // return, none, casted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(capsMviewMode))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_video_multiview_mode_from_caps_string(carg1) + runtime.KeepAlive(capsMviewMode) + + var goret VideoMultiviewMode + + goret = VideoMultiviewMode(cret) + + return goret +} + +// VideoMultiviewModeToCapsString wraps gst_video_multiview_mode_to_caps_string +// +// The function takes the following parameters: +// +// - mviewMode VideoMultiviewMode: A #GstVideoMultiviewMode value +// +// The function returns the following values: +// +// - goret string (nullable) +// +// Given a #GstVideoMultiviewMode returns the multiview-mode caps string +// for insertion into a caps structure +func VideoMultiviewModeToCapsString(mviewMode VideoMultiviewMode) string { + var carg1 C.GstVideoMultiviewMode // in, none, casted + var cret *C.gchar // return, none, string, nullable-string + + carg1 = C.GstVideoMultiviewMode(mviewMode) + + cret = C.gst_video_multiview_mode_to_caps_string(carg1) + runtime.KeepAlive(mviewMode) + + var goret string + + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + } + + return goret +} + // VideoOrientationMethod wraps GstVideoOrientationMethod // // The different video orientation methods. @@ -2937,6 +3590,195 @@ func (e VideoTransferFunction) String() string { } } +// VideoTransferFunctionDecode wraps gst_video_transfer_function_decode +// +// The function takes the following parameters: +// +// - fn VideoTransferFunction: a #GstVideoTransferFunction +// - val float64: a value +// +// The function returns the following values: +// +// - goret float64 +// +// Convert @val to its gamma decoded value. This is the inverse operation of +// gst_video_color_transfer_encode(). +// +// For a non-linear value L' in the range [0..1], conversion to the linear +// L is in general performed with a power function like: +// +// |[ +// L = L' ^ gamma +// ]| +// +// Depending on @func, different formulas might be applied. Some formulas +// encode a linear segment in the lower range. +func VideoTransferFunctionDecode(fn VideoTransferFunction, val float64) float64 { + var carg1 C.GstVideoTransferFunction // in, none, casted + var carg2 C.gdouble // in, none, casted + var cret C.gdouble // return, none, casted + + carg1 = C.GstVideoTransferFunction(fn) + carg2 = C.gdouble(val) + + cret = C.gst_video_transfer_function_decode(carg1, carg2) + runtime.KeepAlive(fn) + runtime.KeepAlive(val) + + var goret float64 + + goret = float64(cret) + + return goret +} + +// VideoTransferFunctionEncode wraps gst_video_transfer_function_encode +// +// The function takes the following parameters: +// +// - fn VideoTransferFunction: a #GstVideoTransferFunction +// - val float64: a value +// +// The function returns the following values: +// +// - goret float64 +// +// Convert @val to its gamma encoded value. +// +// For a linear value L in the range [0..1], conversion to the non-linear +// (gamma encoded) L' is in general performed with a power function like: +// +// |[ +// L' = L ^ (1 / gamma) +// ]| +// +// Depending on @func, different formulas might be applied. Some formulas +// encode a linear segment in the lower range. +func VideoTransferFunctionEncode(fn VideoTransferFunction, val float64) float64 { + var carg1 C.GstVideoTransferFunction // in, none, casted + var carg2 C.gdouble // in, none, casted + var cret C.gdouble // return, none, casted + + carg1 = C.GstVideoTransferFunction(fn) + carg2 = C.gdouble(val) + + cret = C.gst_video_transfer_function_encode(carg1, carg2) + runtime.KeepAlive(fn) + runtime.KeepAlive(val) + + var goret float64 + + goret = float64(cret) + + return goret +} + +// VideoTransferFunctionFromISO wraps gst_video_transfer_function_from_iso +// +// The function takes the following parameters: +// +// - value uint: a ITU-T H.273 transfer characteristics value +// +// The function returns the following values: +// +// - goret VideoTransferFunction +// +// Converts the @value to the #GstVideoTransferFunction +// The transfer characteristics (TransferCharacteristics) value is +// defined by "ISO/IEC 23001-8 Section 7.2 Table 3" +// and "ITU-T H.273 Table 3". +// "H.264 Table E-4" and "H.265 Table E.4" share the identical values. +func VideoTransferFunctionFromISO(value uint) VideoTransferFunction { + var carg1 C.guint // in, none, casted + var cret C.GstVideoTransferFunction // return, none, casted + + carg1 = C.guint(value) + + cret = C.gst_video_transfer_function_from_iso(carg1) + runtime.KeepAlive(value) + + var goret VideoTransferFunction + + goret = VideoTransferFunction(cret) + + return goret +} + +// VideoTransferFunctionIsEquivalent wraps gst_video_transfer_function_is_equivalent +// +// The function takes the following parameters: +// +// - fromFunc VideoTransferFunction: #GstVideoTransferFunction to convert from +// - fromBpp uint: bits per pixel to convert from +// - toFunc VideoTransferFunction: #GstVideoTransferFunction to convert into +// - toBpp uint: bits per pixel to convert into +// +// The function returns the following values: +// +// - goret bool +// +// Returns whether @from_func and @to_func are equivalent. There are cases +// (e.g. BT601, BT709, and BT2020_10) where several functions are functionally +// identical. In these cases, when doing conversion, we should consider them +// as equivalent. Also, BT2020_12 is the same as the aforementioned three for +// less than 12 bits per pixel. +func VideoTransferFunctionIsEquivalent(fromFunc VideoTransferFunction, fromBpp uint, toFunc VideoTransferFunction, toBpp uint) bool { + var carg1 C.GstVideoTransferFunction // in, none, casted + var carg2 C.guint // in, none, casted + var carg3 C.GstVideoTransferFunction // in, none, casted + var carg4 C.guint // in, none, casted + var cret C.gboolean // return + + carg1 = C.GstVideoTransferFunction(fromFunc) + carg2 = C.guint(fromBpp) + carg3 = C.GstVideoTransferFunction(toFunc) + carg4 = C.guint(toBpp) + + cret = C.gst_video_transfer_function_is_equivalent(carg1, carg2, carg3, carg4) + runtime.KeepAlive(fromFunc) + runtime.KeepAlive(fromBpp) + runtime.KeepAlive(toFunc) + runtime.KeepAlive(toBpp) + + var goret bool + + if cret != 0 { + goret = true + } + + return goret +} + +// VideoTransferFunctionToISO wraps gst_video_transfer_function_to_iso +// +// The function takes the following parameters: +// +// - fn VideoTransferFunction: a #GstVideoTransferFunction +// +// The function returns the following values: +// +// - goret uint +// +// Converts #GstVideoTransferFunction to the "transfer characteristics" +// (TransferCharacteristics) value defined by "ISO/IEC 23001-8 Section 7.2 Table 3" +// and "ITU-T H.273 Table 3". +// "H.264 Table E-4" and "H.265 Table E.4" share the identical values. +func VideoTransferFunctionToISO(fn VideoTransferFunction) uint { + var carg1 C.GstVideoTransferFunction // in, none, casted + var cret C.guint // return, none, casted + + carg1 = C.GstVideoTransferFunction(fn) + + cret = C.gst_video_transfer_function_to_iso(carg1) + runtime.KeepAlive(fn) + + var goret uint + + goret = uint(cret) + + return goret +} + // VideoVBIParserResult wraps GstVideoVBIParserResult // // Return values for #GstVideoVBIParser @@ -3404,6 +4246,64 @@ func (f VideoChromaSite) String() string { return "VideoChromaSite(" + strings.Join(parts, "|") + ")" } +// VideoChromaSiteFromString wraps gst_video_chroma_site_from_string +// +// The function takes the following parameters: +// +// - s string: a chromasite string +// +// The function returns the following values: +// +// - goret VideoChromaSite +// +// Convert @s to a #GstVideoChromaSite +func VideoChromaSiteFromString(s string) VideoChromaSite { + var carg1 *C.gchar // in, none, string + var cret C.GstVideoChromaSite // return, none, casted + + carg1 = (*C.gchar)(unsafe.Pointer(C.CString(s))) + defer C.free(unsafe.Pointer(carg1)) + + cret = C.gst_video_chroma_site_from_string(carg1) + runtime.KeepAlive(s) + + var goret VideoChromaSite + + goret = VideoChromaSite(cret) + + return goret +} + +// VideoChromaSiteToString wraps gst_video_chroma_site_to_string +// +// The function takes the following parameters: +// +// - site VideoChromaSite: a #GstVideoChromaSite +// +// The function returns the following values: +// +// - goret string (nullable) +// +// Converts @site to its string representation. +func VideoChromaSiteToString(site VideoChromaSite) string { + var carg1 C.GstVideoChromaSite // in, none, casted + var cret *C.gchar // return, full, string, nullable-string + + carg1 = C.GstVideoChromaSite(site) + + cret = C.gst_video_chroma_site_to_string(carg1) + runtime.KeepAlive(site) + + var goret string + + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } + + return goret +} + // VideoCodecFrameFlags wraps GstVideoCodecFrameFlags // // Flags for #GstVideoCodecFrame @@ -4787,14 +5687,14 @@ func BufferAddVideoSeiUserDataUnregisteredMeta(buffer *gst.Buffer, uuid *uint8, // // The function returns the following values: // -// - goret *VideoTimeCodeMeta +// - goret *VideoTimeCodeMeta (nullable) // // Attaches #GstVideoTimeCodeMeta metadata to @buffer with the given // parameters. func BufferAddVideoTimeCodeMeta(buffer *gst.Buffer, tc *VideoTimeCode) *VideoTimeCodeMeta { var carg1 *C.GstBuffer // in, none, converted var carg2 *C.GstVideoTimeCode // in, none, converted - var cret *C.GstVideoTimeCodeMeta // return, none, converted + var cret *C.GstVideoTimeCodeMeta // return, none, converted, nullable carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) carg2 = (*C.GstVideoTimeCode)(UnsafeVideoTimeCodeToGlibNone(tc)) @@ -4805,7 +5705,9 @@ func BufferAddVideoTimeCodeMeta(buffer *gst.Buffer, tc *VideoTimeCode) *VideoTim var goret *VideoTimeCodeMeta - goret = UnsafeVideoTimeCodeMetaFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoTimeCodeMetaFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -4827,7 +5729,7 @@ func BufferAddVideoTimeCodeMeta(buffer *gst.Buffer, tc *VideoTimeCode) *VideoTim // // The function returns the following values: // -// - goret *VideoTimeCodeMeta +// - goret *VideoTimeCodeMeta (nullable) // // Attaches #GstVideoTimeCodeMeta metadata to @buffer with the given // parameters. @@ -4842,7 +5744,7 @@ func BufferAddVideoTimeCodeMetaFull(buffer *gst.Buffer, fpsN uint, fpsD uint, la var carg8 C.guint // in, none, casted var carg9 C.guint // in, none, casted var carg10 C.guint // in, none, casted - var cret *C.GstVideoTimeCodeMeta // return, none, converted + var cret *C.GstVideoTimeCodeMeta // return, none, converted, nullable carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) carg2 = C.guint(fpsN) @@ -4869,7 +5771,9 @@ func BufferAddVideoTimeCodeMetaFull(buffer *gst.Buffer, fpsN uint, fpsD uint, la var goret *VideoTimeCodeMeta - goret = UnsafeVideoTimeCodeMetaFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoTimeCodeMetaFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -4882,7 +5786,7 @@ func BufferAddVideoTimeCodeMetaFull(buffer *gst.Buffer, fpsN uint, fpsD uint, la // // The function returns the following values: // -// - goret *VideoMeta +// - goret *VideoMeta (nullable) // // Find the #GstVideoMeta on @buffer with the lowest @id. // @@ -4890,7 +5794,7 @@ func BufferAddVideoTimeCodeMetaFull(buffer *gst.Buffer, fpsN uint, fpsD uint, la // multiview buffers. func BufferGetVideoMeta(buffer *gst.Buffer) *VideoMeta { var carg1 *C.GstBuffer // in, none, converted - var cret *C.GstVideoMeta // return, none, converted + var cret *C.GstVideoMeta // return, none, converted, nullable carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) @@ -4899,7 +5803,9 @@ func BufferGetVideoMeta(buffer *gst.Buffer) *VideoMeta { var goret *VideoMeta - goret = UnsafeVideoMetaFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoMetaFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -4913,7 +5819,7 @@ func BufferGetVideoMeta(buffer *gst.Buffer) *VideoMeta { // // The function returns the following values: // -// - goret *VideoMeta +// - goret *VideoMeta (nullable) // // Find the #GstVideoMeta on @buffer with the given @id. // @@ -4922,7 +5828,7 @@ func BufferGetVideoMeta(buffer *gst.Buffer) *VideoMeta { func BufferGetVideoMetaID(buffer *gst.Buffer, id int) *VideoMeta { var carg1 *C.GstBuffer // in, none, converted var carg2 C.gint // in, none, casted - var cret *C.GstVideoMeta // return, none, converted + var cret *C.GstVideoMeta // return, none, converted, nullable carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) carg2 = C.gint(id) @@ -4933,7 +5839,9 @@ func BufferGetVideoMetaID(buffer *gst.Buffer, id int) *VideoMeta { var goret *VideoMeta - goret = UnsafeVideoMetaFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoMetaFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -4947,7 +5855,7 @@ func BufferGetVideoMetaID(buffer *gst.Buffer, id int) *VideoMeta { // // The function returns the following values: // -// - goret *VideoRegionOfInterestMeta +// - goret *VideoRegionOfInterestMeta (nullable) // // Find the #GstVideoRegionOfInterestMeta on @buffer with the given @id. // @@ -4956,7 +5864,7 @@ func BufferGetVideoMetaID(buffer *gst.Buffer, id int) *VideoMeta { func BufferGetVideoRegionOfInterestMetaID(buffer *gst.Buffer, id int) *VideoRegionOfInterestMeta { var carg1 *C.GstBuffer // in, none, converted var carg2 C.gint // in, none, casted - var cret *C.GstVideoRegionOfInterestMeta // return, none, converted + var cret *C.GstVideoRegionOfInterestMeta // return, none, converted, nullable carg1 = (*C.GstBuffer)(gst.UnsafeBufferToGlibNone(buffer)) carg2 = C.gint(id) @@ -4967,7 +5875,9 @@ func BufferGetVideoRegionOfInterestMetaID(buffer *gst.Buffer, id int) *VideoRegi var goret *VideoRegionOfInterestMeta - goret = UnsafeVideoRegionOfInterestMetaFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoRegionOfInterestMetaFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -5466,7 +6376,7 @@ func VideoColorTransferEncode(fn VideoTransferFunction, val float64) float64 { // // The function returns the following values: // -// - goret *gst.Sample +// - goret *gst.Sample (nullable) // - _goerr error (nullable): an error // // Converts a raw video buffer into the specified output caps. @@ -5478,7 +6388,7 @@ func VideoConvertSample(sample *gst.Sample, toCaps *gst.Caps, timeout gst.ClockT var carg1 *C.GstSample // in, none, converted var carg2 *C.GstCaps // in, none, converted var carg3 C.GstClockTime // in, none, casted, alias - var cret *C.GstSample // return, full, converted + var cret *C.GstSample // return, full, converted, nullable var _cerr *C.GError // out, full, converted, nullable carg1 = (*C.GstSample)(gst.UnsafeSampleToGlibNone(sample)) @@ -5493,7 +6403,9 @@ func VideoConvertSample(sample *gst.Sample, toCaps *gst.Caps, timeout gst.ClockT var goret *gst.Sample var _goerr error - goret = gst.UnsafeSampleFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeSampleFromGlibFull(unsafe.Pointer(cret)) + } if _cerr != nil { _goerr = glib.UnsafeErrorFromGlibFull(unsafe.Pointer(_cerr)) } @@ -5661,14 +6573,14 @@ func VideoDmaDRMFourccToFormat(fourcc uint32) VideoFormat { // // The function returns the following values: // -// - goret string +// - goret string (nullable) // // Returns a string containing drm kind format, such as // NV12:0x0100000000000002, or NULL otherwise. 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 + var cret *C.gchar // return, full, string, nullable-string carg1 = C.guint32(fourcc) carg2 = C.guint64(modifier) @@ -5679,8 +6591,10 @@ func VideoDmaDRMFourccToString(fourcc uint32, modifier uint64) string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -10057,7 +10971,7 @@ type VideoDecoder interface { // AllocateOutputBuffer wraps gst_video_decoder_allocate_output_buffer // The function returns the following values: // - // - goret *gst.Buffer + // - goret *gst.Buffer (nullable) // // Helper function that allocates a buffer to hold a video frame for @decoder's // current #GstVideoCodecState. @@ -10174,7 +11088,7 @@ type VideoDecoder interface { // GetBufferPool wraps gst_video_decoder_get_buffer_pool // The function returns the following values: // - // - goret gst.BufferPool + // - goret gst.BufferPool (nullable) GetBufferPool() gst.BufferPool // GetEstimateRate wraps gst_video_decoder_get_estimate_rate // The function returns the following values: @@ -10189,7 +11103,7 @@ type VideoDecoder interface { // // The function returns the following values: // - // - goret *VideoCodecFrame + // - goret *VideoCodecFrame (nullable) // // Get a pending unfinished #GstVideoCodecFrame GetFrame(int) *VideoCodecFrame @@ -10262,14 +11176,14 @@ type VideoDecoder interface { // GetOldestFrame wraps gst_video_decoder_get_oldest_frame // The function returns the following values: // - // - goret *VideoCodecFrame + // - goret *VideoCodecFrame (nullable) // // Get the oldest pending unfinished #GstVideoCodecFrame GetOldestFrame() *VideoCodecFrame // GetOutputState wraps gst_video_decoder_get_output_state // The function returns the following values: // - // - goret *VideoCodecState + // - goret *VideoCodecState (nullable) // // Get the #GstVideoCodecState currently describing the output stream. GetOutputState() *VideoCodecState @@ -10441,7 +11355,7 @@ type VideoDecoder interface { // // The function returns the following values: // - // - goret *VideoCodecState + // - goret *VideoCodecState (nullable) // // Same as #gst_video_decoder_set_output_state() but also allows you to also set // the interlacing mode. @@ -10509,7 +11423,7 @@ type VideoDecoder interface { // // The function returns the following values: // - // - goret *VideoCodecState + // - goret *VideoCodecState (nullable) // // Creates a new #GstVideoCodecState with the specified @fmt, @width and @height // as the output state for the decoder. @@ -10634,7 +11548,7 @@ func (decoder *VideoDecoderInstance) AddToFrame(nBytes int) { // AllocateOutputBuffer wraps gst_video_decoder_allocate_output_buffer // The function returns the following values: // -// - goret *gst.Buffer +// - goret *gst.Buffer (nullable) // // Helper function that allocates a buffer to hold a video frame for @decoder's // current #GstVideoCodecState. @@ -10643,7 +11557,7 @@ func (decoder *VideoDecoderInstance) AddToFrame(nBytes int) { // function, if possible at all. func (decoder *VideoDecoderInstance) AllocateOutputBuffer() *gst.Buffer { var carg0 *C.GstVideoDecoder // in, none, converted - var cret *C.GstBuffer // return, full, converted + var cret *C.GstBuffer // return, full, converted, nullable carg0 = (*C.GstVideoDecoder)(UnsafeVideoDecoderToGlibNone(decoder)) @@ -10652,7 +11566,9 @@ func (decoder *VideoDecoderInstance) AllocateOutputBuffer() *gst.Buffer { var goret *gst.Buffer - goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -10899,10 +11815,10 @@ func (decoder *VideoDecoderInstance) GetAllocator() (gst.Allocator, gst.Allocati // GetBufferPool wraps gst_video_decoder_get_buffer_pool // The function returns the following values: // -// - goret gst.BufferPool +// - goret gst.BufferPool (nullable) func (decoder *VideoDecoderInstance) GetBufferPool() gst.BufferPool { var carg0 *C.GstVideoDecoder // in, none, converted - var cret *C.GstBufferPool // return, full, converted + var cret *C.GstBufferPool // return, full, converted, nullable carg0 = (*C.GstVideoDecoder)(UnsafeVideoDecoderToGlibNone(decoder)) @@ -10911,7 +11827,9 @@ func (decoder *VideoDecoderInstance) GetBufferPool() gst.BufferPool { var goret gst.BufferPool - goret = gst.UnsafeBufferPoolFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeBufferPoolFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -10944,13 +11862,13 @@ func (dec *VideoDecoderInstance) GetEstimateRate() int { // // The function returns the following values: // -// - goret *VideoCodecFrame +// - goret *VideoCodecFrame (nullable) // // Get a pending unfinished #GstVideoCodecFrame func (decoder *VideoDecoderInstance) GetFrame(frameNumber int) *VideoCodecFrame { var carg0 *C.GstVideoDecoder // in, none, converted var carg1 C.int // in, none, casted, casted C.gint - var cret *C.GstVideoCodecFrame // return, full, converted + var cret *C.GstVideoCodecFrame // return, full, converted, nullable carg0 = (*C.GstVideoDecoder)(UnsafeVideoDecoderToGlibNone(decoder)) carg1 = C.int(frameNumber) @@ -10961,7 +11879,9 @@ func (decoder *VideoDecoderInstance) GetFrame(frameNumber int) *VideoCodecFrame var goret *VideoCodecFrame - goret = UnsafeVideoCodecFrameFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoCodecFrameFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -11160,12 +12080,12 @@ func (dec *VideoDecoderInstance) GetNeedsSyncPoint() bool { // GetOldestFrame wraps gst_video_decoder_get_oldest_frame // The function returns the following values: // -// - goret *VideoCodecFrame +// - goret *VideoCodecFrame (nullable) // // Get the oldest pending unfinished #GstVideoCodecFrame func (decoder *VideoDecoderInstance) GetOldestFrame() *VideoCodecFrame { var carg0 *C.GstVideoDecoder // in, none, converted - var cret *C.GstVideoCodecFrame // return, full, converted + var cret *C.GstVideoCodecFrame // return, full, converted, nullable carg0 = (*C.GstVideoDecoder)(UnsafeVideoDecoderToGlibNone(decoder)) @@ -11174,7 +12094,9 @@ func (decoder *VideoDecoderInstance) GetOldestFrame() *VideoCodecFrame { var goret *VideoCodecFrame - goret = UnsafeVideoCodecFrameFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoCodecFrameFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -11182,12 +12104,12 @@ func (decoder *VideoDecoderInstance) GetOldestFrame() *VideoCodecFrame { // GetOutputState wraps gst_video_decoder_get_output_state // The function returns the following values: // -// - goret *VideoCodecState +// - goret *VideoCodecState (nullable) // // Get the #GstVideoCodecState currently describing the output stream. func (decoder *VideoDecoderInstance) GetOutputState() *VideoCodecState { var carg0 *C.GstVideoDecoder // in, none, converted - var cret *C.GstVideoCodecState // return, full, converted + var cret *C.GstVideoCodecState // return, full, converted, nullable carg0 = (*C.GstVideoDecoder)(UnsafeVideoDecoderToGlibNone(decoder)) @@ -11196,7 +12118,9 @@ func (decoder *VideoDecoderInstance) GetOutputState() *VideoCodecState { var goret *VideoCodecState - goret = UnsafeVideoCodecStateFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoCodecStateFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -11580,7 +12504,7 @@ func (dec *VideoDecoderInstance) SetEstimateRate(enabled bool) { // // The function returns the following values: // -// - goret *VideoCodecState +// - goret *VideoCodecState (nullable) // // Same as #gst_video_decoder_set_output_state() but also allows you to also set // the interlacing mode. @@ -11591,7 +12515,7 @@ func (decoder *VideoDecoderInstance) SetInterlacedOutputState(_fmt VideoFormat, var carg3 C.guint // in, none, casted var carg4 C.guint // in, none, casted var carg5 *C.GstVideoCodecState // in, none, converted, nullable - var cret *C.GstVideoCodecState // return, full, converted + var cret *C.GstVideoCodecState // return, full, converted, nullable carg0 = (*C.GstVideoDecoder)(UnsafeVideoDecoderToGlibNone(decoder)) carg1 = C.GstVideoFormat(_fmt) @@ -11612,7 +12536,9 @@ func (decoder *VideoDecoderInstance) SetInterlacedOutputState(_fmt VideoFormat, var goret *VideoCodecState - goret = UnsafeVideoCodecStateFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoCodecStateFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -11731,7 +12657,7 @@ func (dec *VideoDecoderInstance) SetNeedsSyncPoint(enabled bool) { // // The function returns the following values: // -// - goret *VideoCodecState +// - goret *VideoCodecState (nullable) // // Creates a new #GstVideoCodecState with the specified @fmt, @width and @height // as the output state for the decoder. @@ -11753,7 +12679,7 @@ func (decoder *VideoDecoderInstance) SetOutputState(_fmt VideoFormat, width uint var carg2 C.guint // in, none, casted var carg3 C.guint // in, none, casted var carg4 *C.GstVideoCodecState // in, none, converted, nullable - var cret *C.GstVideoCodecState // return, full, converted + var cret *C.GstVideoCodecState // return, full, converted, nullable carg0 = (*C.GstVideoDecoder)(UnsafeVideoDecoderToGlibNone(decoder)) carg1 = C.GstVideoFormat(_fmt) @@ -11772,7 +12698,9 @@ func (decoder *VideoDecoderInstance) SetOutputState(_fmt VideoFormat, width uint var goret *VideoCodecState - goret = UnsafeVideoCodecStateFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoCodecStateFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -12027,7 +12955,7 @@ type VideoEncoder interface { // // The function returns the following values: // - // - goret *VideoCodecFrame + // - goret *VideoCodecFrame (nullable) // // Get a pending unfinished #GstVideoCodecFrame GetFrame(int) *VideoCodecFrame @@ -12078,14 +13006,14 @@ type VideoEncoder interface { // GetOldestFrame wraps gst_video_encoder_get_oldest_frame // The function returns the following values: // - // - goret *VideoCodecFrame + // - goret *VideoCodecFrame (nullable) // // Get the oldest unfinished pending #GstVideoCodecFrame GetOldestFrame() *VideoCodecFrame // GetOutputState wraps gst_video_encoder_get_output_state // The function returns the following values: // - // - goret *VideoCodecState + // - goret *VideoCodecState (nullable) // // Get the current #GstVideoCodecState GetOutputState() *VideoCodecState @@ -12179,7 +13107,7 @@ type VideoEncoder interface { // // The function returns the following values: // - // - goret *VideoCodecState + // - goret *VideoCodecState (nullable) // // Creates a new #GstVideoCodecState with the specified caps as the output state // for the encoder. @@ -12442,13 +13370,13 @@ func (encoder *VideoEncoderInstance) GetAllocator() (gst.Allocator, gst.Allocati // // The function returns the following values: // -// - goret *VideoCodecFrame +// - goret *VideoCodecFrame (nullable) // // Get a pending unfinished #GstVideoCodecFrame func (encoder *VideoEncoderInstance) GetFrame(frameNumber int) *VideoCodecFrame { var carg0 *C.GstVideoEncoder // in, none, converted var carg1 C.int // in, none, casted, casted C.gint - var cret *C.GstVideoCodecFrame // return, full, converted + var cret *C.GstVideoCodecFrame // return, full, converted, nullable carg0 = (*C.GstVideoEncoder)(UnsafeVideoEncoderToGlibNone(encoder)) carg1 = C.int(frameNumber) @@ -12459,7 +13387,9 @@ func (encoder *VideoEncoderInstance) GetFrame(frameNumber int) *VideoCodecFrame var goret *VideoCodecFrame - goret = UnsafeVideoCodecFrameFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoCodecFrameFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -12584,12 +13514,12 @@ func (encoder *VideoEncoderInstance) GetMinForceKeyUnitInterval() gst.ClockTime // GetOldestFrame wraps gst_video_encoder_get_oldest_frame // The function returns the following values: // -// - goret *VideoCodecFrame +// - goret *VideoCodecFrame (nullable) // // Get the oldest unfinished pending #GstVideoCodecFrame func (encoder *VideoEncoderInstance) GetOldestFrame() *VideoCodecFrame { var carg0 *C.GstVideoEncoder // in, none, converted - var cret *C.GstVideoCodecFrame // return, full, converted + var cret *C.GstVideoCodecFrame // return, full, converted, nullable carg0 = (*C.GstVideoEncoder)(UnsafeVideoEncoderToGlibNone(encoder)) @@ -12598,7 +13528,9 @@ func (encoder *VideoEncoderInstance) GetOldestFrame() *VideoCodecFrame { var goret *VideoCodecFrame - goret = UnsafeVideoCodecFrameFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoCodecFrameFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -12606,12 +13538,12 @@ func (encoder *VideoEncoderInstance) GetOldestFrame() *VideoCodecFrame { // GetOutputState wraps gst_video_encoder_get_output_state // The function returns the following values: // -// - goret *VideoCodecState +// - goret *VideoCodecState (nullable) // // Get the current #GstVideoCodecState func (encoder *VideoEncoderInstance) GetOutputState() *VideoCodecState { var carg0 *C.GstVideoEncoder // in, none, converted - var cret *C.GstVideoCodecState // return, full, converted + var cret *C.GstVideoCodecState // return, full, converted, nullable carg0 = (*C.GstVideoEncoder)(UnsafeVideoEncoderToGlibNone(encoder)) @@ -12620,7 +13552,9 @@ func (encoder *VideoEncoderInstance) GetOutputState() *VideoCodecState { var goret *VideoCodecState - goret = UnsafeVideoCodecStateFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoCodecStateFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -12826,7 +13760,7 @@ func (encoder *VideoEncoderInstance) SetMinPts(minPts gst.ClockTime) { // // The function returns the following values: // -// - goret *VideoCodecState +// - goret *VideoCodecState (nullable) // // Creates a new #GstVideoCodecState with the specified caps as the output state // for the encoder. @@ -12850,7 +13784,7 @@ func (encoder *VideoEncoderInstance) SetOutputState(caps *gst.Caps, reference *V var carg0 *C.GstVideoEncoder // in, none, converted var carg1 *C.GstCaps // in, full, converted var carg2 *C.GstVideoCodecState // in, none, converted, nullable - var cret *C.GstVideoCodecState // return, full, converted + var cret *C.GstVideoCodecState // return, full, converted, nullable carg0 = (*C.GstVideoEncoder)(UnsafeVideoEncoderToGlibNone(encoder)) carg1 = (*C.GstCaps)(gst.UnsafeCapsToGlibFull(caps)) @@ -12865,7 +13799,9 @@ func (encoder *VideoEncoderInstance) SetOutputState(caps *gst.Caps, reference *V var goret *VideoCodecState - goret = UnsafeVideoCodecStateFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoCodecStateFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -14859,12 +15795,12 @@ func (cinfo *VideoColorimetry) Matches(color string) bool { // ToString wraps gst_video_colorimetry_to_string // The function returns the following values: // -// - goret string +// - goret string (nullable) // // 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 + var cret *C.gchar // return, full, string, nullable-string carg0 = (*C.GstVideoColorimetry)(UnsafeVideoColorimetryToGlibNone(cinfo)) @@ -14873,8 +15809,10 @@ func (cinfo *VideoColorimetry) ToString() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -16342,12 +17280,12 @@ func NewVideoInfo() *VideoInfo { // // The function returns the following values: // -// - goret *VideoInfo +// - goret *VideoInfo (nullable) // // Parse @caps to generate a #GstVideoInfo. func NewVideoInfoFromCaps(caps *gst.Caps) *VideoInfo { var carg1 *C.GstCaps // in, none, converted - var cret *C.GstVideoInfo // return, full, converted + var cret *C.GstVideoInfo // return, full, converted, nullable carg1 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(caps)) @@ -16356,7 +17294,9 @@ func NewVideoInfoFromCaps(caps *gst.Caps) *VideoInfo { var goret *VideoInfo - goret = UnsafeVideoInfoFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoInfoFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -16811,14 +17751,14 @@ func NewVideoInfoDmaDrm() *VideoInfoDmaDrm { // // The function returns the following values: // -// - goret *VideoInfoDmaDrm +// - goret *VideoInfoDmaDrm (nullable) // // Parse @caps to generate a #GstVideoInfoDmaDrm. 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 NewVideoInfoDmaDrmFromCaps(caps *gst.Caps) *VideoInfoDmaDrm { var carg1 *C.GstCaps // in, none, converted - var cret *C.GstVideoInfoDmaDrm // return, full, converted + var cret *C.GstVideoInfoDmaDrm // return, full, converted, nullable carg1 = (*C.GstCaps)(gst.UnsafeCapsToGlibNone(caps)) @@ -16827,7 +17767,9 @@ func NewVideoInfoDmaDrmFromCaps(caps *gst.Caps) *VideoInfoDmaDrm { var goret *VideoInfoDmaDrm - goret = UnsafeVideoInfoDmaDrmFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoInfoDmaDrmFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -16932,7 +17874,7 @@ func VideoInfoDmaDrmInit() VideoInfoDmaDrm { // ToCaps wraps gst_video_info_dma_drm_to_caps // The function returns the following values: // -// - goret *gst.Caps +// - goret *gst.Caps (nullable) // // Convert the values of @drm_info into a #GstCaps. Please note that the // @caps returned will be a dma drm caps which sets format field to DMA_DRM, @@ -16940,7 +17882,7 @@ func VideoInfoDmaDrmInit() VideoInfoDmaDrm { // composed of a drm fourcc and a modifier, such as NV12:0x0100000000000002. func (drmInfo *VideoInfoDmaDrm) ToCaps() *gst.Caps { var carg0 *C.GstVideoInfoDmaDrm // in, none, converted - var cret *C.GstCaps // return, full, converted + var cret *C.GstCaps // return, full, converted, nullable carg0 = (*C.GstVideoInfoDmaDrm)(UnsafeVideoInfoDmaDrmToGlibNone(drmInfo)) @@ -16949,7 +17891,9 @@ func (drmInfo *VideoInfoDmaDrm) ToCaps() *gst.Caps { var goret *gst.Caps - goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeCapsFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -17777,13 +18721,13 @@ func (comp *VideoOverlayComposition) Copy() *VideoOverlayComposition { // // The function returns the following values: // -// - goret *VideoOverlayRectangle +// - goret *VideoOverlayRectangle (nullable) // // Returns the @n-th #GstVideoOverlayRectangle contained in @comp. func (comp *VideoOverlayComposition) GetRectangle(n uint) *VideoOverlayRectangle { var carg0 *C.GstVideoOverlayComposition // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.GstVideoOverlayRectangle // return, none, converted + var cret *C.GstVideoOverlayRectangle // return, none, converted, nullable carg0 = (*C.GstVideoOverlayComposition)(UnsafeVideoOverlayCompositionToGlibNone(comp)) carg1 = C.guint(n) @@ -17794,7 +18738,9 @@ func (comp *VideoOverlayComposition) GetRectangle(n uint) *VideoOverlayRectangle var goret *VideoOverlayRectangle - goret = UnsafeVideoOverlayRectangleFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoOverlayRectangleFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -18742,14 +19688,14 @@ func (meta *VideoRegionOfInterestMeta) AddParam(s *gst.Structure) { // // The function returns the following values: // -// - goret *gst.Structure +// - goret *gst.Structure (nullable) // // Retrieve the parameter for @meta having @name as structure name, // 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 - var cret *C.GstStructure // return, none, converted + var cret *C.GstStructure // return, none, converted, nullable carg0 = (*C.GstVideoRegionOfInterestMeta)(UnsafeVideoRegionOfInterestMetaToGlibNone(meta)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(name))) @@ -18761,7 +19707,9 @@ func (meta *VideoRegionOfInterestMeta) GetParam(name string) *gst.Structure { var goret *gst.Structure - goret = gst.UnsafeStructureFromGlibNone(unsafe.Pointer(cret)) + if cret != nil { + goret = gst.UnsafeStructureFromGlibNone(unsafe.Pointer(cret)) + } return goret } @@ -19251,18 +20199,6 @@ type videoTimeCode struct { native *C.GstVideoTimeCode } -var _ gobject.GoValueInitializer = (*VideoTimeCode)(nil) - -func marshalVideoTimeCode(p unsafe.Pointer) (interface{}, error) { - b := gobject.ValueFromNative(p).Boxed() - return UnsafeVideoTimeCodeFromGlibBorrow(b), nil -} - -func (r *VideoTimeCode) InitGoValue(v *gobject.Value) { - v.Init(TypeVideoTimeCode) - v.SetBoxed(unsafe.Pointer(r.native)) -} - // UnsafeVideoTimeCodeFromGlibBorrow is used to convert raw C.GstVideoTimeCode pointers to go. This is used by the bindings internally. func UnsafeVideoTimeCodeFromGlibBorrow(p unsafe.Pointer) *VideoTimeCode { return &VideoTimeCode{&videoTimeCode{(*C.GstVideoTimeCode)(p)}} @@ -19449,7 +20385,7 @@ func NewVideoTimeCodeFromDateTime(fpsN uint, fpsD uint, dt *glib.DateTime, flags // // The function returns the following values: // -// - goret *VideoTimeCode +// - goret *VideoTimeCode (nullable) // // The resulting config->latest_daily_jam is set to // midnight, and timecode is set to the given time. @@ -19459,7 +20395,7 @@ func NewVideoTimeCodeFromDateTimeFull(fpsN uint, fpsD uint, dt *glib.DateTime, f var carg3 *C.GDateTime // in, none, converted var carg4 C.GstVideoTimeCodeFlags // in, none, casted var carg5 C.guint // in, none, casted - var cret *C.GstVideoTimeCode // return, full, converted + var cret *C.GstVideoTimeCode // return, full, converted, nullable carg1 = C.guint(fpsN) carg2 = C.guint(fpsD) @@ -19476,7 +20412,9 @@ func NewVideoTimeCodeFromDateTimeFull(fpsN uint, fpsD uint, dt *glib.DateTime, f var goret *VideoTimeCode - goret = UnsafeVideoTimeCodeFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoTimeCodeFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -19489,10 +20427,10 @@ func NewVideoTimeCodeFromDateTimeFull(fpsN uint, fpsD uint, dt *glib.DateTime, f // // The function returns the following values: // -// - goret *VideoTimeCode +// - goret *VideoTimeCode (nullable) func NewVideoTimeCodeFromString(tcStr string) *VideoTimeCode { var carg1 *C.gchar // in, none, string - var cret *C.GstVideoTimeCode // return, full, converted + var cret *C.GstVideoTimeCode // return, full, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(tcStr))) defer C.free(unsafe.Pointer(carg1)) @@ -19502,7 +20440,9 @@ func NewVideoTimeCodeFromString(tcStr string) *VideoTimeCode { var goret *VideoTimeCode - goret = UnsafeVideoTimeCodeFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoTimeCodeFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -19538,7 +20478,7 @@ func (tc *VideoTimeCode) AddFrames(frames int64) { // // The function returns the following values: // -// - goret *VideoTimeCode +// - goret *VideoTimeCode (nullable) // // This makes a component-wise addition of @tc_inter to @tc. For example, // adding ("01:02:03:04", "00:01:00:00") will return "01:03:03:04". @@ -19550,7 +20490,7 @@ func (tc *VideoTimeCode) AddFrames(frames int64) { func (tc *VideoTimeCode) AddInterval(tcInter *VideoTimeCodeInterval) *VideoTimeCode { var carg0 *C.GstVideoTimeCode // in, none, converted var carg1 *C.GstVideoTimeCodeInterval // in, none, converted - var cret *C.GstVideoTimeCode // return, full, converted + var cret *C.GstVideoTimeCode // return, full, converted, nullable carg0 = (*C.GstVideoTimeCode)(UnsafeVideoTimeCodeToGlibNone(tc)) carg1 = (*C.GstVideoTimeCodeInterval)(UnsafeVideoTimeCodeIntervalToGlibNone(tcInter)) @@ -19561,7 +20501,9 @@ func (tc *VideoTimeCode) AddInterval(tcInter *VideoTimeCodeInterval) *VideoTimeC var goret *VideoTimeCode - goret = UnsafeVideoTimeCodeFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoTimeCodeFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -19854,12 +20796,12 @@ func (tc *VideoTimeCode) NsecSinceDailyJam() uint64 { // ToDateTime wraps gst_video_time_code_to_date_time // The function returns the following values: // -// - goret *glib.DateTime +// - goret *glib.DateTime (nullable) // // The @tc.config->latest_daily_jam is required to be non-NULL. func (tc *VideoTimeCode) ToDateTime() *glib.DateTime { var carg0 *C.GstVideoTimeCode // in, none, converted - var cret *C.GDateTime // return, full, converted + var cret *C.GDateTime // return, full, converted, nullable carg0 = (*C.GstVideoTimeCode)(UnsafeVideoTimeCodeToGlibNone(tc)) @@ -19868,7 +20810,9 @@ func (tc *VideoTimeCode) ToDateTime() *glib.DateTime { var goret *glib.DateTime - goret = glib.UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = glib.UnsafeDateTimeFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -20079,12 +21023,12 @@ func NewVideoTimeCodeInterval(hours uint, minutes uint, seconds uint, frames uin // // The function returns the following values: // -// - goret *VideoTimeCodeInterval +// - goret *VideoTimeCodeInterval (nullable) // // @tc_inter_str must only have ":" as separators. func NewVideoTimeCodeIntervalFromString(tcInterStr string) *VideoTimeCodeInterval { var carg1 *C.gchar // in, none, string - var cret *C.GstVideoTimeCodeInterval // return, full, converted + var cret *C.GstVideoTimeCodeInterval // return, full, converted, nullable carg1 = (*C.gchar)(unsafe.Pointer(C.CString(tcInterStr))) defer C.free(unsafe.Pointer(carg1)) @@ -20094,7 +21038,9 @@ func NewVideoTimeCodeIntervalFromString(tcInterStr string) *VideoTimeCodeInterva var goret *VideoTimeCodeInterval - goret = UnsafeVideoTimeCodeIntervalFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoTimeCodeIntervalFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -20327,13 +21273,13 @@ func UnsafeVideoVBIEncoderToGlibFull(v *VideoVBIEncoder) unsafe.Pointer { // // The function returns the following values: // -// - goret *VideoVBIEncoder +// - goret *VideoVBIEncoder (nullable) // // Create a new #GstVideoVBIEncoder for the specified @format and @pixel_width. func NewVideoVBIEncoder(format VideoFormat, pixelWidth uint32) *VideoVBIEncoder { var carg1 C.GstVideoFormat // in, none, casted var carg2 C.guint32 // in, none, casted - var cret *C.GstVideoVBIEncoder // return, full, converted + var cret *C.GstVideoVBIEncoder // return, full, converted, nullable carg1 = C.GstVideoFormat(format) carg2 = C.guint32(pixelWidth) @@ -20344,7 +21290,9 @@ func NewVideoVBIEncoder(format VideoFormat, pixelWidth uint32) *VideoVBIEncoder var goret *VideoVBIEncoder - goret = UnsafeVideoVBIEncoderFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoVBIEncoderFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -20527,13 +21475,13 @@ func UnsafeVideoVBIParserToGlibFull(v *VideoVBIParser) unsafe.Pointer { // // The function returns the following values: // -// - goret *VideoVBIParser +// - goret *VideoVBIParser (nullable) // // Create a new #GstVideoVBIParser for the specified @format and @pixel_width. func NewVideoVBIParser(format VideoFormat, pixelWidth uint32) *VideoVBIParser { var carg1 C.GstVideoFormat // in, none, casted var carg2 C.guint32 // in, none, casted - var cret *C.GstVideoVBIParser // return, full, converted + var cret *C.GstVideoVBIParser // return, full, converted, nullable carg1 = C.GstVideoFormat(format) carg2 = C.guint32(pixelWidth) @@ -20544,7 +21492,9 @@ func NewVideoVBIParser(format VideoFormat, pixelWidth uint32) *VideoVBIParser { var goret *VideoVBIParser - goret = UnsafeVideoVBIParserFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeVideoVBIParserFromGlibFull(unsafe.Pointer(cret)) + } return goret } diff --git a/pkg/gstvideo/video_format.go b/pkg/gstvideo/video_format.go new file mode 100644 index 0000000..2601c15 --- /dev/null +++ b/pkg/gstvideo/video_format.go @@ -0,0 +1,45 @@ +package gstvideo + +import ( + "image/color" + "unsafe" +) + +// #cgo pkg-config: gstreamer-video-1.0 +// #cgo CFLAGS: -Wno-deprecated-declarations +// #include +import "C" + +// VideoFormatGetPalette wraps gst_video_format_get_palette +// +// Get the default palette of @format. This the palette used in the pack +// function for paletted formats. +func VideoFormatGetPalette(format VideoFormat) []color.Color { + var size C.gsize + ptr := C.gst_video_format_get_palette(C.GstVideoFormat(format), &size) + + paletteBytes := unsafe.Slice((*byte)(ptr), size) + + // Convert the byte slice to a slice of color.Color + return bytesToColorPalette(paletteBytes) +} + +// bytesToColorPalette converts a byte slice into a slice of color.Color. +// Each color is represented by 4 bytes (RGBA). +func bytesToColorPalette(paletteBytes []byte) []color.Color { + const bytesPerColor = 4 + numColors := len(paletteBytes) / bytesPerColor + palette := make([]color.Color, numColors) + + for i := 0; i < numColors; i++ { + offset := i * bytesPerColor + palette[i] = color.RGBA{ + R: paletteBytes[offset], + G: paletteBytes[offset+1], + B: paletteBytes[offset+2], + A: paletteBytes[offset+3], + } + } + + return palette +} diff --git a/pkg/gstvideo/video_info.go b/pkg/gstvideo/video_info.go new file mode 100644 index 0000000..3d5082c --- /dev/null +++ b/pkg/gstvideo/video_info.go @@ -0,0 +1,19 @@ +package gstvideo + +// #cgo pkg-config: gstreamer-video-1.0 +// #cgo CFLAGS: -Wno-deprecated-declarations +// #include +import "C" + +// SetFramerate sets the framerate of the video info as a fraction of +// denom/num in frames per second. +func (info *VideoInfo) SetFramerate(denom, num int) { + info.videoInfo.native.fps_d = C.gint(denom) + info.videoInfo.native.fps_n = C.gint(num) +} + +// SetFramerate sets the framerate of the video info as a fraction of +// denom/num in frames per second. +func (info *VideoInfo) GetSize() int { + return int(info.videoInfo.native.size) +} diff --git a/pkg/gstwebrtc/gstwebrtc.gen.go b/pkg/gstwebrtc/gstwebrtc.gen.go index 1cd5cd3..7d9d452 100644 --- a/pkg/gstwebrtc/gstwebrtc.gen.go +++ b/pkg/gstwebrtc/gstwebrtc.gen.go @@ -355,6 +355,22 @@ func (e WebRTCError) String() string { } } +// WebRTCErrorQuark wraps gst_webrtc_error_quark +// The function returns the following values: +// +// - goret glib.Quark +func WebRTCErrorQuark() glib.Quark { + var cret C.GQuark // return, none, casted, alias + + cret = C.gst_webrtc_error_quark() + + var goret glib.Quark + + goret = glib.Quark(cret) + + return goret +} + // WebRTCFECType wraps GstWebRTCFECType type WebRTCFECType C.int @@ -868,6 +884,31 @@ func (e WebRTCSDPType) String() string { } } +// WebRTCSDPTypeToString wraps gst_webrtc_sdp_type_to_string +// +// The function takes the following parameters: +// +// - typ WebRTCSDPType: a #GstWebRTCSDPType +// +// The function returns the following values: +// +// - goret string +func WebRTCSDPTypeToString(typ WebRTCSDPType) string { + var carg1 C.GstWebRTCSDPType // in, none, casted + var cret *C.gchar // return, none, string + + carg1 = C.GstWebRTCSDPType(typ) + + cret = C.gst_webrtc_sdp_type_to_string(carg1) + runtime.KeepAlive(typ) + + var goret string + + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + + return goret +} + // WebRTCSignalingState wraps GstWebRTCSignalingState // // See <http://w3c.github.io/webrtc-pc/#dom-rtcsignalingstate> @@ -1393,7 +1434,7 @@ type WebRTCICE interface { // // The function returns the following values: // - // - goret WebRTCICEStream + // - goret WebRTCICEStream (nullable) AddStream(uint) WebRTCICEStream // AddTurnServer wraps gst_webrtc_ice_add_turn_server // @@ -1414,7 +1455,7 @@ type WebRTCICE interface { // // The function returns the following values: // - // - goret WebRTCICETransport + // - goret WebRTCICETransport (nullable) FindTransport(WebRTCICEStream, WebRTCICEComponent) WebRTCICETransport // GatherCandidates wraps gst_webrtc_ice_gather_candidates // @@ -1471,12 +1512,12 @@ type WebRTCICE interface { // GetStunServer wraps gst_webrtc_ice_get_stun_server // The function returns the following values: // - // - goret string + // - goret string (nullable) GetStunServer() string // GetTurnServer wraps gst_webrtc_ice_get_turn_server // The function returns the following values: // - // - goret string + // - goret string (nullable) GetTurnServer() string // SetForceRelay wraps gst_webrtc_ice_set_force_relay // @@ -1630,11 +1671,11 @@ func (ice *WebRTCICEInstance) AddCandidate(stream WebRTCICEStream, candidate str // // The function returns the following values: // -// - goret WebRTCICEStream +// - goret WebRTCICEStream (nullable) func (ice *WebRTCICEInstance) AddStream(sessionId uint) WebRTCICEStream { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 C.guint // in, none, casted - var cret *C.GstWebRTCICEStream // return, full, converted + var cret *C.GstWebRTCICEStream // return, full, converted, nullable carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) carg1 = C.guint(sessionId) @@ -1645,7 +1686,9 @@ func (ice *WebRTCICEInstance) AddStream(sessionId uint) WebRTCICEStream { var goret WebRTCICEStream - goret = UnsafeWebRTCICEStreamFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeWebRTCICEStreamFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1690,12 +1733,12 @@ func (ice *WebRTCICEInstance) AddTurnServer(uri string) bool { // // The function returns the following values: // -// - goret WebRTCICETransport +// - goret WebRTCICETransport (nullable) func (ice *WebRTCICEInstance) FindTransport(stream WebRTCICEStream, component WebRTCICEComponent) WebRTCICETransport { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 *C.GstWebRTCICEStream // in, none, converted var carg2 C.GstWebRTCICEComponent // in, none, casted - var cret *C.GstWebRTCICETransport // return, full, converted + var cret *C.GstWebRTCICETransport // return, full, converted, nullable carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) carg1 = (*C.GstWebRTCICEStream)(UnsafeWebRTCICEStreamToGlibNone(stream)) @@ -1708,7 +1751,9 @@ func (ice *WebRTCICEInstance) FindTransport(stream WebRTCICEStream, component We var goret WebRTCICETransport - goret = UnsafeWebRTCICETransportFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeWebRTCICETransportFromGlibFull(unsafe.Pointer(cret)) + } return goret } @@ -1887,10 +1932,10 @@ func (ice *WebRTCICEInstance) GetSelectedPair(stream WebRTCICEStream) (*WebRTCIC // GetStunServer wraps gst_webrtc_ice_get_stun_server // The function returns the following values: // -// - goret string +// - goret string (nullable) func (ice *WebRTCICEInstance) GetStunServer() string { var carg0 *C.GstWebRTCICE // in, none, converted - var cret *C.gchar // return, full, string + var cret *C.gchar // return, full, string, nullable-string carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) @@ -1899,8 +1944,10 @@ func (ice *WebRTCICEInstance) GetStunServer() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -1908,10 +1955,10 @@ func (ice *WebRTCICEInstance) GetStunServer() string { // GetTurnServer wraps gst_webrtc_ice_get_turn_server // The function returns the following values: // -// - goret string +// - goret string (nullable) func (ice *WebRTCICEInstance) GetTurnServer() string { var carg0 *C.GstWebRTCICE // in, none, converted - var cret *C.gchar // return, full, string + var cret *C.gchar // return, full, string, nullable-string carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) @@ -1920,8 +1967,10 @@ func (ice *WebRTCICEInstance) GetTurnServer() string { var goret string - goret = C.GoString((*C.char)(unsafe.Pointer(cret))) - defer C.free(unsafe.Pointer(cret)) + if cret != nil { + goret = C.GoString((*C.char)(unsafe.Pointer(cret))) + defer C.free(unsafe.Pointer(cret)) + } return goret } @@ -2176,7 +2225,7 @@ type WebRTCICEStream interface { // // The function returns the following values: // - // - goret WebRTCICETransport + // - goret WebRTCICETransport (nullable) FindTransport(WebRTCICEComponent) WebRTCICETransport // GatherCandidates wraps gst_webrtc_ice_stream_gather_candidates // The function returns the following values: @@ -2231,11 +2280,11 @@ func UnsafeWebRTCICEStreamToGlibFull(c WebRTCICEStream) unsafe.Pointer { // // The function returns the following values: // -// - goret WebRTCICETransport +// - goret WebRTCICETransport (nullable) func (stream *WebRTCICEStreamInstance) FindTransport(component WebRTCICEComponent) WebRTCICETransport { var carg0 *C.GstWebRTCICEStream // in, none, converted var carg1 C.GstWebRTCICEComponent // in, none, casted - var cret *C.GstWebRTCICETransport // return, full, converted + var cret *C.GstWebRTCICETransport // return, full, converted, nullable carg0 = (*C.GstWebRTCICEStream)(UnsafeWebRTCICEStreamToGlibNone(stream)) carg1 = C.GstWebRTCICEComponent(component) @@ -2246,7 +2295,9 @@ func (stream *WebRTCICEStreamInstance) FindTransport(component WebRTCICEComponen var goret WebRTCICETransport - goret = UnsafeWebRTCICETransportFromGlibFull(unsafe.Pointer(cret)) + if cret != nil { + goret = UnsafeWebRTCICETransportFromGlibFull(unsafe.Pointer(cret)) + } return goret }