diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gst/__init__.py | 10 |
2 files changed, 15 insertions, 0 deletions
@@ -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: diff --git a/gst/__init__.py b/gst/__init__.py index 42f164f..03ffc25 100644 --- a/gst/__init__.py +++ b/gst/__init__.py @@ -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): |