go-gst icon indicating copy to clipboard operation
go-gst copied to clipboard

invalid GValue when push buffer

Open licfan opened this issue 2 years ago • 2 comments

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 "

    

licfan avatar Mar 18 '22 10:03 licfan

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

brucekim avatar Mar 24 '22 01:03 brucekim

@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.

RSWilli avatar Aug 24 '23 20:08 RSWilli