do not mention Unref() in the docs where not applicable

This commit is contained in:
RSWilli
2024-06-24 10:58:08 +02:00
parent 0f5ee09329
commit 0f1a6e152f
24 changed files with 46 additions and 88 deletions

View File

@@ -126,16 +126,11 @@ func NewBufferFromReader(rdr io.Reader) (*Buffer, error) {
//
// The prefix/padding must be filled with 0 if flags contains MemoryFlagZeroPrefixed and MemoryFlagZeroPadded respectively.
//
// // Example
// // Example
//
// buf := gst.NewBufferFull(0, []byte("hello-world"), 1024, 0, 1024, func() {
// fmt.Println("buffer was destroyed")
// })
// if buf != nil {
// buf.Unref()
// }
//
// // > buffer was destroyed
// buf := gst.NewBufferFull(0, []byte("hello-world"), 1024, 0, 1024, func() {
// fmt.Println("buffer was destroyed")
// })
func NewBufferFull(flags MemoryFlags, data []byte, maxSize, offset, size int64, notifyFunc func()) *Buffer {
var notifyData unsafe.Pointer
var gnotifyFunc C.GDestroyNotify
@@ -244,8 +239,6 @@ func (b *Buffer) OffsetEnd() int64 { return int64(b.Instance().offset_end) }
// buf := gst.NewEmptyBuffer()
// buf.AddMeta(metaInfo, "hello world")
//
// buf.Unref()
//
// // > Buffer initialized with params: hello world
// // > Buffer was destroyed
func (b *Buffer) AddMeta(info *MetaInfo, params interface{}) *Meta {