[gstreamer-bugs] [Bug 530417] Add a nicer constructor for GstElements

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Tue Jun 17 13:15:19 PDT 2008


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=530417

  GStreamer | gst-python | Ver: HEAD CVS




------- Comment #8 from Johan Dahlin  2008-06-17 20:15 UTC -------
Sorry, I was on vacation.

I was pretty sure that the gst.Element subclass code path was tested through a
unittest. That needs to be added, to avoid breaking this again.

Now, one way of solving it is to do something like:

  def __call__(cls, *args, **kwargs):
      if cls == gst.Element:
         # new fancy constructor path
         return

      # just instantiate the object, so g_object_new() works

Fun fun fun!


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=530417.




More information about the Gstreamer-bugs mailing list