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

Edward Hervey bilboed at gmail.com
Wed Apr 14 09:54:47 CEST 2010


On Wed, 2010-04-14 at 09:53 +0200, Edward Hervey wrote:
> 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.

  Forgot to mention that if you want it to go in upcoming gst-python,
hurry up because I'm about to do some pre-releases of it.

> 
>     Edward
> 
> > 
> > Thomas
> > 
> 
> 






More information about the gstreamer-devel mailing list