Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid GValue when push buffer #32

Open
licfan opened this issue Mar 18, 2022 · 2 comments
Open

invalid GValue when push buffer #32

licfan opened this issue Mar 18, 2022 · 2 comments

Comments

@licfan
Copy link

licfan commented Mar 18, 2022

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 "
@brucekim
Copy link
Collaborator

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

@RSWilli
Copy link

RSWilli commented Aug 24, 2023

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

nielsavonds pushed a commit to nielsavonds/go-gst that referenced this issue Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants