mirror of
https://github.com/go-gst/go-gst.git
synced 2025-11-03 00:14:02 +08:00
add push src and flow combiner
This commit is contained in:
30
gst/base/gst_push_src.go
Normal file
30
gst/base/gst_push_src.go
Normal 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())
|
||||
}
|
||||
Reference in New Issue
Block a user