major rework of reference handling

This commit is contained in:
Avi Zimmerman
2021-01-19 00:18:30 +02:00
parent 63a53be42a
commit 1f7d60b390
79 changed files with 1239 additions and 800 deletions

View File

@@ -10,13 +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.
// FromGstSegmentUnsafe wraps the GstSegment pointer.
func FromGstSegmentUnsafe(segment unsafe.Pointer) *Segment {
return wrapSegment((*C.GstSegment)(segment))
}
// NewSegment allocates and initializes a new Segment.
// NewSegment allocates and initializes a new Segment. Free when you are finished.
func NewSegment() *Segment {
return wrapSegment(C.gst_segment_new())
}