mirror of
https://github.com/go-gst/go-gst.git
synced 2025-10-05 07:56:51 +08:00
do not mention Unref() in the docs where not applicable
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user