From 9016097d36acd20c4e28bf161b91883a34e7b6ae Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 13 Mar 2016 18:23:36 +0100 Subject: [PATCH] added == operator to compare with GeneralMediaFormat --- mediaformat.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mediaformat.h b/mediaformat.h index 2aae79d..823d063 100644 --- a/mediaformat.h +++ b/mediaformat.h @@ -258,6 +258,7 @@ public: const char *extensionName() const; operator bool() const; MediaFormat &operator+=(const MediaFormat &other); + bool operator==(GeneralMediaFormat general) const; GeneralMediaFormat general; unsigned char sub; @@ -290,6 +291,14 @@ inline MediaFormat &MediaFormat::operator+=(const MediaFormat &other) return *this; } +/*! + * \brief Returns whether the media format is the specified general media format. + */ +inline bool MediaFormat::operator==(GeneralMediaFormat general) const +{ + return this->general == general; +} + /*! * \brief Returns whether the media format is known. */