go-gst
go-gst copied to clipboard
invalid GValue when push buffer
if err := sp.pipLine.SetState(gst.StatePlaying); err != nil {
zlog.Errorf(sp.Ctx, "set state playing error: %s", err.Error())
}
buf := gst.NewBufferWithSize(0)
if _, err := sp.appSrc.Emit("push-buffer", buf); err != nil {
zlog.Errorf(sp.Ctx, "push buffer error:%s", err.Error())
}
buf := gst.NewBufferWithSize(int64(len(data)))
buf.FillBytes(0, data)
if _, err := sp.appSrc.Emit("push-buffer", buf); err != nil {
zlog.Infof(sp.Ctx, "push-buffer err %s", err.Error())
}
log: "push buffer error invalid GValue "
Hi, You may need to initialize buffer with proper size, not zero. // Note that when size == 0, the buffer will not have memory associated with it.
And, try with appSrc.PushBuffer()
for push buffer
@licfan move this issue to https://github.com/go-gst/go-gst (where future development of the bindings will take place) if you think it is necessary.