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 720694 - cannot call Gst.ElementFactory.get_static_pad_templates
cannot call Gst.ElementFactory.get_static_pad_templates
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings: GTK+ GStreamer WebKitGTK+
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2013-12-18 20:00 UTC by cyqzz
Modified: 2014-02-03 22:17 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description cyqzz 2013-12-18 20:00:47 UTC
When I try to use get_static_pad_templates I get this error:

gstreamer-1.0.vapi:948.28-948.48: error: `Gst.StaticPadTemplate' is not a supported generic type argument, use `?' to box value types
		public unowned GLib.List<Gst.StaticPadTemplate> get_static_pad_templates ();

When I add the '?' to the return type it works correctly.
Comment 1 Luca Bruno 2014-01-07 09:29:57 UTC
This is the correct behavior, valac gave you an error and you had to fix it, it's not a bug. Please reopen if needed.
Comment 2 cyqzz 2014-02-02 20:48:49 UTC
I meant that the vapi file is incorrect. That's why I filed this against the "bindings" component.
Comment 3 Luca Bruno 2014-02-02 21:20:46 UTC
Can you please then explain why is it wrong?
Comment 4 Luca Bruno 2014-02-02 21:21:23 UTC
Ops sorry, now I realized StaticPadTemplate wasn't your generic.
Comment 5 Luca Bruno 2014-02-02 21:23:27 UTC
Given that's transfer none in the annotations, it should be something like unowned GLib.List<unowned Gst.StaticPadTemplate?>. Can you confirm if it works for you? I mean, if it's usable and if you don't experience any crash.
Comment 6 cyqzz 2014-02-03 20:04:53 UTC
Yes, that works fine.
Thanks.
Comment 7 Luca Bruno 2014-02-03 22:17:56 UTC
commit 871cf22610d7869afa90c64a014da9bcebcd620f
Author: Luca Bruno <lucabru@src.gnome.org>
Date:   Mon Feb 3 23:16:32 2014 +0100

    gstreamer-1.0: Fix ElementFactory.get_static_pad_templates return type
    
    Fixes bug 720694

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.