added == operator to compare with GeneralMediaFormat

This commit is contained in:
Martchus 2016-03-13 18:23:36 +01:00
parent 56d13d326d
commit 9016097d36
1 changed files with 9 additions and 0 deletions

View File

@ -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.
*/