add push src and flow combiner

This commit is contained in:
Avi Zimmerman
2021-01-09 08:53:34 +02:00
parent c838f1486a
commit 9dc10b2bb8
12 changed files with 616 additions and 50 deletions

30
gst/base/gst_push_src.go Normal file
View File

@@ -0,0 +1,30 @@
package base
/*
#include "gst.go.h"
*/
import "C"
import (
"unsafe"
"github.com/tinyzimmer/go-gst/gst"
)
// GstPushSrc represents a GstBaseSrc.
type GstPushSrc struct{ *GstBaseSrc }
// ToGstPushSrc returns a GstPushSrc object for the given object.
func ToGstPushSrc(obj *gst.Object) *GstPushSrc {
return &GstPushSrc{&GstBaseSrc{&gst.Element{Object: obj}}}
}
// wrapGstPushSrc wraps the given unsafe.Pointer in a GstPushSrc instance.
func wrapGstPushSrc(obj *C.GstPushSrc) *GstPushSrc {
return &GstPushSrc{&GstBaseSrc{gst.FromGstElementUnsafe(unsafe.Pointer(obj))}}
}
// Instance returns the underlying C GstBaseSrc instance
func (g *GstPushSrc) Instance() *C.GstPushSrc {
return C.toGstPushSrc(g.Unsafe())
}