mirror of
https://github.com/go-gst/go-gst.git
synced 2025-10-27 01:40:51 +08:00
do not mention Unref() in the docs where not applicable
This commit is contained in:
@@ -85,7 +85,7 @@ func (g *GstBaseSink) GetDropOutOfSegment() bool {
|
||||
// GetLastSample gets the last sample that arrived in the sink and was used for preroll or for rendering.
|
||||
// This property can be used to generate thumbnails.
|
||||
//
|
||||
// The GstCaps on the sample can be used to determine the type of the buffer. Unref after usage. Sample will
|
||||
// The GstCaps on the sample can be used to determine the type of the buffer. Sample will
|
||||
// be nil if no buffer has arrived yet.
|
||||
func (g *GstBaseSink) GetLastSample() *gst.Sample {
|
||||
sample := C.gst_base_sink_get_last_sample(g.Instance())
|
||||
|
||||
@@ -32,7 +32,7 @@ func (g *GstBaseSrc) Instance() *C.GstBaseSrc {
|
||||
return C.toGstBaseSrc(g.Unsafe())
|
||||
}
|
||||
|
||||
// GetAllocator retrieves the memory allocator used by this base src. Unref after usage.
|
||||
// GetAllocator retrieves the memory allocator used by this base src.
|
||||
func (g *GstBaseSrc) GetAllocator() (*gst.Allocator, *gst.AllocationParams) {
|
||||
var allocParams C.GstAllocationParams
|
||||
var allocator *C.GstAllocator
|
||||
@@ -46,7 +46,7 @@ func (g *GstBaseSrc) GetAllocator() (*gst.Allocator, *gst.AllocationParams) {
|
||||
// GetBlocksize returns the number of bytes that the source will push out with each buffer.
|
||||
func (g *GstBaseSrc) GetBlocksize() uint { return uint(C.gst_base_src_get_blocksize(g.Instance())) }
|
||||
|
||||
// GetBufferPool returns the BufferPool used by this source. Unref after usage.
|
||||
// GetBufferPool returns the BufferPool used by this source.
|
||||
func (g *GstBaseSrc) GetBufferPool() *gst.BufferPool {
|
||||
pool := C.gst_base_src_get_buffer_pool(g.Instance())
|
||||
if pool == nil {
|
||||
|
||||
@@ -52,7 +52,7 @@ func (g *GstBaseTransform) Instance() *C.GstBaseTransform {
|
||||
return C.toGstBaseTransform(g.Unsafe())
|
||||
}
|
||||
|
||||
// GetAllocator retrieves the memory allocator used by this base transform. Unref after usage.
|
||||
// GetAllocator retrieves the memory allocator used by this base transform.
|
||||
func (g *GstBaseTransform) GetAllocator() (*gst.Allocator, *gst.AllocationParams) {
|
||||
var allocParams C.GstAllocationParams
|
||||
var allocator *C.GstAllocator
|
||||
@@ -63,7 +63,7 @@ func (g *GstBaseTransform) GetAllocator() (*gst.Allocator, *gst.AllocationParams
|
||||
return gst.FromGstAllocatorUnsafeFull(unsafe.Pointer(allocator)), gst.FromGstAllocationParamsUnsafe(unsafe.Pointer(&allocParams))
|
||||
}
|
||||
|
||||
// GetBufferPool returns the BufferPool used by this transform. Unref after usage.
|
||||
// GetBufferPool returns the BufferPool used by this transform.
|
||||
func (g *GstBaseTransform) GetBufferPool() *gst.BufferPool {
|
||||
pool := C.gst_base_transform_get_buffer_pool(g.Instance())
|
||||
if pool == nil {
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
)
|
||||
|
||||
// TypeFindHelper tries to find what type of data is flowing from the given source GstPad.
|
||||
// Returns nil if no Caps matches the data stream. Unref after usage.
|
||||
// Returns nil if no Caps matches the data stream.
|
||||
func TypeFindHelper(pad *gst.Pad, size uint64) *gst.Caps {
|
||||
caps := C.gst_type_find_helper((*C.GstPad)(unsafe.Pointer(pad.Instance())), C.guint64(size))
|
||||
if caps == nil {
|
||||
@@ -32,8 +32,7 @@ func TypeFindHelper(pad *gst.Pad, size uint64) *gst.Caps {
|
||||
// the caps with the highest probability will be returned, or nil if the content of the buffer could
|
||||
// not be identified.
|
||||
//
|
||||
// Object can either be nil or the object doing the typefinding (used for logging). Caps should be unrefed
|
||||
// after usage.
|
||||
// Object can either be nil or the object doing the typefinding (used for logging).
|
||||
func TypeFindHelperForBuffer(obj *gst.Object, buffer *gst.Buffer) (*gst.Caps, gst.TypeFindProbability) {
|
||||
var prob C.GstTypeFindProbability
|
||||
var cobj *C.GstObject
|
||||
@@ -57,8 +56,6 @@ func TypeFindHelperForBuffer(obj *gst.Object, buffer *gst.Buffer) (*gst.Caps, gs
|
||||
//
|
||||
// When extension is not empty, this function will first try the typefind functions for the given extension,
|
||||
// which might speed up the typefinding in many cases.
|
||||
//
|
||||
// Unref caps after usage.
|
||||
func TypeFindHelperForBufferWithExtension(obj *gst.Object, buffer *gst.Buffer, extension string) (*gst.Caps, gst.TypeFindProbability) {
|
||||
var prob C.GstTypeFindProbability
|
||||
var cobj *C.GstObject
|
||||
@@ -87,8 +84,7 @@ func TypeFindHelperForBufferWithExtension(obj *gst.Object, buffer *gst.Buffer, e
|
||||
// the caps with the highest probability will be returned, or nil if the content of the buffer could
|
||||
// not be identified.
|
||||
//
|
||||
// Object can either be nil or the object doing the typefinding (used for logging). Caps should be unrefed
|
||||
// after usage.
|
||||
// Object can either be nil or the object doing the typefinding (used for logging).
|
||||
func TypeFindHelperForData(obj *gst.Object, data []byte) (*gst.Caps, gst.TypeFindProbability) {
|
||||
var prob C.GstTypeFindProbability
|
||||
var cobj *C.GstObject
|
||||
@@ -113,7 +109,7 @@ func TypeFindHelperForData(obj *gst.Object, data []byte) (*gst.Caps, gst.TypeFin
|
||||
// When extension is not empty, this function will first try the typefind functions for the given extension,
|
||||
// which might speed up the typefinding in many cases.
|
||||
//
|
||||
// Object can either be nil or the object doing the typefinding (used for logging). Unref caps after usage.
|
||||
// Object can either be nil or the object doing the typefinding (used for logging).
|
||||
func TypeFindHelperForDataWithExtension(obj *gst.Object, data []byte, extension string) (*gst.Caps, gst.TypeFindProbability) {
|
||||
var prob C.GstTypeFindProbability
|
||||
var cobj *C.GstObject
|
||||
@@ -138,7 +134,7 @@ func TypeFindHelperForDataWithExtension(obj *gst.Object, data []byte, extension
|
||||
// All available typefinders will be checked against the extension in order of rank. The caps of the first typefinder
|
||||
// that can handle extension will be returned.
|
||||
//
|
||||
// Object can either be nil or the object doing the typefinding (used for logging). Unref caps after usage.
|
||||
// Object can either be nil or the object doing the typefinding (used for logging).
|
||||
func TypeFindHelperForExtension(obj *gst.Object, extension string) *gst.Caps {
|
||||
var cobj *C.GstObject
|
||||
if obj != nil {
|
||||
|
||||
Reference in New Issue
Block a user