[gst-devel] gst-python gst.TagList and gst.Date equality

Edward Hervey bilboed at gmail.com
Wed Apr 14 09:53:23 CEST 2010


HI,


On Tue, 2010-04-13 at 23:08 +0200, Thomas Vander Stichele wrote:
> Currently, two gst.Date instances for the exact same date are not equal.
> Hence, two gst.TagList instances which are exactly the same but have a
> gst.Date are not equal either.
> 
> I think this is a bug - but does anyone know a good reason why it
> isn't ?

  Those types are GBoxed, and the wrapping doesn't allow advanced
equality checks (basically GBoxed only allows you to register 'copy' adn
'free' methods for those cheap objects). You would have the same problem
as the C level (i.e. you'd need to compare the contents to see if
they're equal).

  fwiw, this will also apply for the other 'boxed' classes in
gst-python: GstPlugin, GstStructure, GstTagList, GError, GstData,
GstSegment.

  Patches welcome to fix that, it would be very nice indeed. It looks
like that could be done by overriding the tp_compare or tp_richcompare
slots in the override files.

    Edward

> 
> Thomas
> 






More information about the gstreamer-devel mailing list