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 313138 - Need to update constructors to use properties
Need to update constructors to use properties
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-python
git master
Other All
: Normal enhancement
: 0.10.5
Assigned To: GStreamer Maintainers
Johan (not receiving bugmail) Dahlin
Depends on:
Blocks: 329075
 
 
Reported: 2005-08-10 17:07 UTC by Gustavo Carneiro
Modified: 2006-07-02 15:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
upgrade advice (1.19 KB, text/plain)
2005-08-10 17:27 UTC, Gustavo Carneiro
Details

Description Gustavo Carneiro 2005-08-10 17:07:04 UTC
See
http://live.gnome.org/PyGTK_2fWhatsNew28#head-e93053687b057666c18d5db81686c4da30039bd5

Here's how to fix gst.Bin, for example:

Index: gst/gst.defs
===================================================================
RCS file: /cvs/gstreamer/gst-python/gst/gst.defs,v
retrieving revision 1.25.2.5
diff -u -p -d -r1.25.2.5 gst.defs
--- gst/gst.defs        3 Aug 2005 13:12:38 -0000       1.25.2.5
+++ gst/gst.defs        10 Aug 2005 17:00:27 -0000
@@ -70,8 +70,8 @@
   (c-name "gst_bin_new")
   (is-constructor-of "GstBin")
   (return-type "GstElement*")
-  (parameters
-    '("const-gchar*" "name" (null-ok) (default "NULL"))
+  (properties
+    '("name" (optional))
   )
 )
Comment 1 Gustavo Carneiro 2005-08-10 17:27:27 UTC
Created attachment 50530 [details]
upgrade advice

I have a script, check-oldstyle-constructors.py, that tries to give advice on
how to change the defs.  Here's the output, it may be useful.  Unfortunately,
some objects are not bindings-friendly and do not offer enough properties to
allow migration.. that's life :(
Comment 2 Edward Hervey 2005-11-24 12:27:56 UTC
We discussed about this on IRC. There are three differents things happening why
we can't, or don't need, to use this behaviour:

_ Elements (GstBin, GstPipeline, GstQueue, ...) : Thoses are constructed with
gst_element_factory_make() and don't work the same way as Standard GObject
_ Objects where we already wrap the constructor
_ Objects that don't take properties

I'm therefore closing this bug.
Comment 3 Edward Hervey 2006-04-07 17:22:06 UTC
Re-opening since we need this to solve the issues we're having in #329075
Comment 4 Edward Hervey 2006-07-02 15:43:20 UTC
Conversion to new codegenerator is now in CVS.

Closing again.