Commit fcf0d4fa authored by Alessandro Decina's avatar Alessandro Decina

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__.
parent e2901817
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:
......
......@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment