Good afternoon,
I'm trying to connect to the notify::current-level-buffers
signal of the gstreamer 1.0 queue. Unfortunately, the callback parameter needs to be of type GParam
, which is not a type recognized by Type.Match in object.go#L247. (Type.Match() source)
The following is a super simplified version of what I'm trying to do. Any thoughts on either what I'm doing wrong or how to extend this package to handle the signal?
package main
import (
"fmt"
"github.com/ziutek/gst"
)
func main() {
pl := gst.NewPipeline("pipeline")
el := gst.ElementFactoryMake("queue", "queue")
pl.Add(el)
queue := pl.GetByName("queue")
queue.ConnectNoi("notify::current-level-buffers", cbNotifyBuffers, nil)
}
func cbNotifyBuffers(bufferLevel interface{}) {
fmt.Println(bufferLevel)
}
Running I get the following panic:
panic: Callback #0 param. type interface {} doesn't match signal spec GParam
(Obviously the callback shouldn't be an interface{}
, but I don't think there is currently a type which would satisfy Type.Match()
)
Thank you for your help, and for the glib and gst packages!