After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 794298 - Cannot inspect GStreamer static pad templates in GJS
Cannot inspect GStreamer static pad templates in GJS
Status: RESOLVED OBSOLETE
Product: gjs
Classification: Bindings
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2018-03-13 16:29 UTC by Davi
Modified: 2020-04-22 17:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Davi 2018-03-13 16:29:46 UTC
I'm trying to sketch a pipeline editor using GJS, but I'm hitting what seems to be a binding issue. I've isolated a simple test below:


const Lang = imports.lang;
const Gst = imports.gi.Gst;

Gst.init(null);
let registry = Gst.Registry.get();
let elementFeatureList = registry.get_feature_list(Gst.ElementFactory);
elementFeatureList.forEach(Lang.bind(this, function(factory) {
            let padTemplates = factory.get_static_pad_templates();
        }));


This is giving the following error:

Gjs-WARNING **: JS ERROR: Error: Can't create a Javascript object for StaticPadTemplate; no way to copy


Am I missing something? Thanks for your efforts!
Comment 1 Edward Hervey 2018-05-05 14:42:30 UTC
The StaticPadTemplate are usable from python, the decoration seems correct in the documentation. Closing.

Can you refile against gjs ?
Comment 2 Sebastian Dröge (slomo) 2018-05-05 15:49:56 UTC
Let's just move it to gjs then :)

The error makes sense though, static pad templates are by design not copyable. They just exist globally forever, but G-I can't express that.
Comment 3 Philip Chimento 2019-03-12 06:15:26 UTC
Can you move this to https://gitlab.gnome.org/GNOME/gjs, please? I only came across it by chance.
Comment 4 André Klapper 2020-04-22 17:42:31 UTC
Closing per last comment.