Qt 4.8
Public Functions | Static Public Functions | Public Variables | List of all members
QVideoSurfaceFormatPrivate Class Reference
Inheritance diagram for QVideoSurfaceFormatPrivate:
QSharedData

Public Functions

bool operator== (const QVideoSurfaceFormatPrivate &other) const
 
 QVideoSurfaceFormatPrivate ()
 
 QVideoSurfaceFormatPrivate (const QSize &size, QVideoFrame::PixelFormat format, QAbstractVideoBuffer::HandleType type)
 
 QVideoSurfaceFormatPrivate (const QVideoSurfaceFormatPrivate &other)
 
- Public Functions inherited from QSharedData
 QSharedData ()
 Constructs a QSharedData object with a reference count of 0. More...
 
 QSharedData (const QSharedData &)
 Constructs a QSharedData object with reference count 0. More...
 

Static Public Functions

static bool frameRatesEqual (qreal r1, qreal r2)
 

Public Variables

qreal frameRate
 
QSize frameSize
 
QAbstractVideoBuffer::HandleType handleType
 
QSize pixelAspectRatio
 
QVideoFrame::PixelFormat pixelFormat
 
QList< QByteArraypropertyNames
 
QList< QVariantpropertyValues
 
QVideoSurfaceFormat::Direction scanLineDirection
 
QRect viewport
 
QVideoSurfaceFormat::YCbCrColorSpace ycbcrColorSpace
 
- Public Variables inherited from QSharedData
QAtomicInt ref
 

Detailed Description

Definition at line 52 of file qvideosurfaceformat.cpp.

Constructors and Destructors

◆ QVideoSurfaceFormatPrivate() [1/3]

QVideoSurfaceFormatPrivate::QVideoSurfaceFormatPrivate ( )
inline

◆ QVideoSurfaceFormatPrivate() [2/3]

QVideoSurfaceFormatPrivate::QVideoSurfaceFormatPrivate ( const QSize size,
QVideoFrame::PixelFormat  format,
QAbstractVideoBuffer::HandleType  type 
)
inline

Definition at line 65 of file qvideosurfaceformat.cpp.

70  , handleType(type)
72  , frameSize(size)
73  , pixelAspectRatio(1, 1)
75  , viewport(QPoint(0, 0), size)
76  , frameRate(0.0)
77  {
78  }
int type
Definition: qmetatype.cpp:239
QVideoSurfaceFormat::Direction scanLineDirection
QVideoFrame::PixelFormat pixelFormat
QVideoSurfaceFormat::YCbCrColorSpace ycbcrColorSpace
QAbstractVideoBuffer::HandleType handleType
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53

◆ QVideoSurfaceFormatPrivate() [3/3]

QVideoSurfaceFormatPrivate::QVideoSurfaceFormatPrivate ( const QVideoSurfaceFormatPrivate other)
inline

Definition at line 80 of file qvideosurfaceformat.cpp.

81  : QSharedData(other)
82  , pixelFormat(other.pixelFormat)
83  , handleType(other.handleType)
85  , frameSize(other.frameSize)
88  , viewport(other.viewport)
89  , frameRate(other.frameRate)
92  {
93  }
QSharedData()
Constructs a QSharedData object with a reference count of 0.
Definition: qshareddata.h:61
QVideoSurfaceFormat::Direction scanLineDirection
QVideoFrame::PixelFormat pixelFormat
QVideoSurfaceFormat::YCbCrColorSpace ycbcrColorSpace
QAbstractVideoBuffer::HandleType handleType

Functions

◆ frameRatesEqual()

static bool QVideoSurfaceFormatPrivate::frameRatesEqual ( qreal  r1,
qreal  r2 
)
inlinestatic

Definition at line 118 of file qvideosurfaceformat.cpp.

Referenced by operator==().

119  {
120  return qAbs(r1 - r2) <= 0.00001 * qMin(qAbs(r1), qAbs(r2));
121  }
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
Definition: qglobal.h:1215
Q_DECL_CONSTEXPR T qAbs(const T &t)
Definition: qglobal.h:1201

◆ operator==()

bool QVideoSurfaceFormatPrivate::operator== ( const QVideoSurfaceFormatPrivate other) const
inline

Definition at line 95 of file qvideosurfaceformat.cpp.

96  {
97  if (pixelFormat == other.pixelFormat
98  && handleType == other.handleType
100  && frameSize == other.frameSize
102  && viewport == other.viewport
104  && ycbcrColorSpace == other.ycbcrColorSpace
105  && propertyNames.count() == other.propertyNames.count()) {
106  for (int i = 0; i < propertyNames.count(); ++i) {
107  int j = other.propertyNames.indexOf(propertyNames.at(i));
108 
109  if (j == -1 || propertyValues.at(i) != other.propertyValues.at(j))
110  return false;
111  }
112  return true;
113  } else {
114  return false;
115  }
116  }
QVideoSurfaceFormat::Direction scanLineDirection
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
QVideoFrame::PixelFormat pixelFormat
QVideoSurfaceFormat::YCbCrColorSpace ycbcrColorSpace
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
static bool frameRatesEqual(qreal r1, qreal r2)
int indexOf(const T &t, int from=0) const
Returns the index position of the first occurrence of value in the list, searching forward from index...
Definition: qlist.h:847
QAbstractVideoBuffer::HandleType handleType

Properties

◆ frameRate

qreal QVideoSurfaceFormatPrivate::frameRate

◆ frameSize

QSize QVideoSurfaceFormatPrivate::frameSize

◆ handleType

QAbstractVideoBuffer::HandleType QVideoSurfaceFormatPrivate::handleType

◆ pixelAspectRatio

QSize QVideoSurfaceFormatPrivate::pixelAspectRatio

◆ pixelFormat

QVideoFrame::PixelFormat QVideoSurfaceFormatPrivate::pixelFormat

◆ propertyNames

QList<QByteArray> QVideoSurfaceFormatPrivate::propertyNames

◆ propertyValues

QList<QVariant> QVideoSurfaceFormatPrivate::propertyValues

◆ scanLineDirection

QVideoSurfaceFormat::Direction QVideoSurfaceFormatPrivate::scanLineDirection

◆ viewport

QRect QVideoSurfaceFormatPrivate::viewport

◆ ycbcrColorSpace

QVideoSurfaceFormat::YCbCrColorSpace QVideoSurfaceFormatPrivate::ycbcrColorSpace

The documentation for this class was generated from the following file: