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

Additional Callbacks #5

Open
tomberek opened this issue Mar 27, 2020 · 5 comments · May be fixed by #6
Open

Additional Callbacks #5

tomberek opened this issue Mar 27, 2020 · 5 comments · May be fixed by #6

Comments

@tomberek
Copy link

I was going to give this library a try and implement this in Go:
http://blog.nirbheek.in/2018/02/gstreamer-webrtc.html

But quickly ran into the limited callback functions and private callbackID on Element. I'm experimenting with adding things like SetOnNegotiationNeededCallback and SetOnICECandidateCallback, or something a little more general allowing arbitrary callbacks, but I thought I'd register this issue to see if adding something like this upstream would be possible.

@notedit
Copy link
Owner

notedit commented Mar 27, 2020

there is a on-padadded callback.

gst/element.go

Line 270 in e023dcb

func (e *Element) SetPadAddedCallback(callback PadAddedCallback) {

you can try something similar.

@notedit
Copy link
Owner

notedit commented Mar 27, 2020

something a little more general allowing arbitrary callbacks is a better choice i think.

@tomberek
Copy link
Author

Yes, I was going to implement the same thing just with a different string, but I cannot access the callbackStore or private fields like Element.callbackID.

btw: i'm also taking a look at media-server-go, trying to see where i can integrate easier.

@notedit
Copy link
Owner

notedit commented Mar 27, 2020

Thanks, if you can make a pr.

@tomberek
Copy link
Author

Arbitrary callbacks signals and sending go functions through for gstreamer to call is proving challenging. Was trying to use this as a reference: https://eli.thegreenplace.net/2019/passing-callbacks-and-pointers-to-cgo/

@tomberek tomberek linked a pull request Mar 29, 2020 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants