Files
go-gst/gst/app/wrappers.go
2025-09-16 22:36:07 +02:00

36 lines
1.1 KiB
Go

package app
// #include <gst/gst.h>
import "C"
import (
"github.com/go-gst/go-gst/gst"
"github.com/go-gst/go-gst/gst/base"
)
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func wrapAppSink(elem *gst.Element) *Sink {
return &Sink{GstBaseSink: &base.GstBaseSink{Element: elem}}
}
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func wrapAppSrc(elem *gst.Element) *Source {
return &Source{GstBaseSrc: &base.GstBaseSrc{Element: elem}}
}
// gobool provides an easy type conversion between C.gboolean and a go bool.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func gobool(b C.gboolean) bool { return int(b) > 0 }
// gboolean converts a go bool to a C.gboolean.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func gboolean(b bool) C.gboolean {
if b {
return C.gboolean(1)
}
return C.gboolean(0)
}