gst-python gst.TagList and gst.Date equality

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

gst-python gst.TagList and gst.Date equality

Thomas Vander Stichele
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 ?

Thomas

--
Ik voel me zo door jou verlaten
als een zoebox zonder platen
--
Flumotion - the only way to stream!
http://www.flumotion.net/



------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gst-python gst.TagList and gst.Date equality

Edward Hervey
Administrator
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
>



------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gst-python gst.TagList and gst.Date equality

Edward Hervey
Administrator
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
> >
>
>



------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel