gst/__init__.py: Add gst.Fourcc.__eq__ and gst.Fourcc.__ne__.

Original commit message from CVS:
* gst/__init__.py:
Add gst.Fourcc.__eq__ and gst.Fourcc.__ne__.
This commit is contained in:
Alessandro Decina 2008-12-09 14:30:43 +00:00
parent e29018175a
commit fcf0d4fa2c
2 changed files with 15 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2008-12-09 Alessandro Decina <alessandro.decina@collabora.co.uk>
* gst/__init__.py:
Add gst.Fourcc.__eq__ and gst.Fourcc.__ne__.
2008-12-09 Edward Hervey <edward.hervey@collabora.co.uk>
* gst/Makefile.am:

View file

@ -45,8 +45,18 @@ class Fourcc(Value):
def __init__(self, string):
Value.__init__(self, 'fourcc')
self.fourcc = string
def __repr__(self):
return '<gst.Fourcc %s>' % self.fourcc
def __eq__(self, other):
if isinstance(other, Fourcc):
return self.fourcc == other.fourcc
return False
def __ne__(self, other):
return not self.__eq__(other)
class IntRange(Value):
def __init__(self, low, high):