mirror of
https://github.com/go-gst/go-gst.git
synced 2025-10-06 08:27:03 +08:00
major rework of reference handling
This commit is contained in:
@@ -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())
|
||||
}
|
||||
|
Reference in New Issue
Block a user