You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So for some reason null in JS is not translated to NULL in C.
What's the correct way to set a parameter when the C documentation of the gtk method requires NULL?
Minimal example:
constgi=require('node-gtk');constGst=gi.require('Gst','1.0');constGObject=gi.require('GObject');constGstWebRTC=gi.require('GstWebRTC');gi.startLoop();Gst.init();constp=Gst.parseLaunch('fakesrc ! webrtcbin name=webrtc');constw=p.getByName('webrtc');w.emit('get-stats',null,Gst.Promise.newWithChangeFunc((promise)=>console.log('got stats',promise)));// Uncaught TypeError: Cannot convert value "null" to type GstPad
I've been trying to find the typing annotations for that function but couldn't find them, Gst is a particular module.
I'm not sure if the annotations are wrong or if we should be allowing null in general for pointer types, but if it's the later then we'll need to update the conversion functions to accept null pointers:
I've found in various situations the need to pass
NULL
as a parameter but wasn't able to create it, e.g., to call https://gstreamer.freedesktop.org/documentation/webrtc/index.html?gi-language=javascript#webrtcbin::get-stats with a NULL pad. I've triednull
but get:If I try
new Gst.Pad(null)
instead I get:So for some reason
null
in JS is not translated toNULL
in C.What's the correct way to set a parameter when the C documentation of the gtk method requires
NULL
?Minimal example:
(Move here from #11 (comment).)
The text was updated successfully, but these errors were encountered: