21#include <QtCore/QDebug>
30 inline Fourcc() { value.as_integer = 0; }
32 inline Fourcc (
char first,
char second,
char third,
char fourth)
34 value.as_integer = first | second << 8 | third << 16 | fourth << 24;
37 inline Fourcc(
const char str[4])
39 value.as_integer = str[0] | str[1] << 8 | str[2] << 16 | str[3] << 24;
42 inline Fourcc(quint32 fourcc)
44 value.as_integer = fourcc;
48#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
76 inline Fraction(
int numerator,
int denominator)
77 : numerator(numerator), denominator(denominator) {}
79 inline bool operator==(
const Fraction & other)
const
80 {
return numerator == other.numerator && denominator == other.denominator; }
81 inline bool operator!=(
const Fraction & other)
const
82 {
return !operator==(other); }
88 inline QDebug operator<<(QDebug debug,
const Fraction &f)
90 return (debug.nospace() << f.numerator <<
"/" << f.denominator).maybeSpace();
101 template <
typename T>
105 : start(T()), end(T()) {}
106 inline Range(
const T & start,
const T & end)
107 : start(start), end(end) {}
Wrappers for GStreamer classes.
Private::Range< double > DoubleRange
Helper structure for accessing double ranges.
Private::Range< Fraction > FractionRange
Helper structure for accessing fraction ranges.
Private::Range< qint64 > Int64Range
Helper structure for accessing qint64 ranges.
Private::Range< int > IntRange
Helper structure for accessing int ranges.
Helper structure for accessing Fourcc values.
Helper structure for accessing Fraction values.
Common template for IntRange, Int64Range, DoubleRange and FractionRange.