mirror of
https://github.com/go-gst/go-gst.git
synced 2025-10-17 21:41:13 +08:00
Merge plugin experimentation branch - GstBaseSrcs can now be implemented via the bindings but with very limited functionality still
This commit is contained in:
@@ -2,6 +2,7 @@ package gst
|
||||
|
||||
// #include "gst.go.h"
|
||||
import "C"
|
||||
import "unsafe"
|
||||
|
||||
// Segment is a go wrapper around a GstSegment.
|
||||
// See: https://gstreamer.freedesktop.org/documentation/gstreamer/gstsegment.html?gi-language=c#GstSegment
|
||||
@@ -9,6 +10,12 @@ type Segment struct {
|
||||
ptr *C.GstSegment
|
||||
}
|
||||
|
||||
// FromGstSegmentUnsafe wraps the given C GstSegment in the go type. It is meant for internal usage
|
||||
// and exported for visibilty to other packages.
|
||||
func FromGstSegmentUnsafe(segment unsafe.Pointer) *Segment {
|
||||
return wrapSegment((*C.GstSegment)(segment))
|
||||
}
|
||||
|
||||
// NewSegment allocates and initializes a new Segment.
|
||||
func NewSegment() *Segment {
|
||||
return wrapSegment(C.gst_segment_new())
|
||||
|
Reference in New Issue
Block a user