Qt 4.8
qvideosurfaceformat.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtMultimedia module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QVIDEOSURFACEFORMAT_H
43 #define QVIDEOSURFACEFORMAT_H
44 
45 #include <QtCore/qlist.h>
46 #include <QtCore/qpair.h>
47 #include <QtCore/qshareddata.h>
48 #include <QtCore/qsize.h>
49 #include <QtGui/qimage.h>
50 #include <QtMultimedia/qvideoframe.h>
51 
53 
55 
56 QT_MODULE(Multimedia)
57 
58 class QDebug;
59 
61 
63 {
64 public:
65  enum Direction
66  {
68  BottomToTop
69  };
70 
72  {
79 #ifndef qdoc
80  YCbCr_CustomMatrix
81 #endif
82  };
83 
86  const QSize &size,
87  QVideoFrame::PixelFormat pixelFormat,
91 
93 
94  bool operator ==(const QVideoSurfaceFormat &format) const;
95  bool operator !=(const QVideoSurfaceFormat &format) const;
96 
97  bool isValid() const;
98 
99  QVideoFrame::PixelFormat pixelFormat() const;
100  QAbstractVideoBuffer::HandleType handleType() const;
101 
102  QSize frameSize() const;
103  void setFrameSize(const QSize &size);
104  void setFrameSize(int width, int height);
105 
106  int frameWidth() const;
107  int frameHeight() const;
108 
109  QRect viewport() const;
110  void setViewport(const QRect &viewport);
111 
112  Direction scanLineDirection() const;
113  void setScanLineDirection(Direction direction);
114 
115  qreal frameRate() const;
116  void setFrameRate(qreal rate);
117 
118  QSize pixelAspectRatio() const;
119  void setPixelAspectRatio(const QSize &ratio);
120  void setPixelAspectRatio(int width, int height);
121 
122  YCbCrColorSpace yCbCrColorSpace() const;
123  void setYCbCrColorSpace(YCbCrColorSpace colorSpace);
124 
125  QSize sizeHint() const;
126 
127  QList<QByteArray> propertyNames() const;
128  QVariant property(const char *name) const;
129  void setProperty(const char *name, const QVariant &value);
130 
131 private:
133 };
134 
135 #ifndef QT_NO_DEBUG_STREAM
137 #endif
138 
140 
143 
145 
146 #endif
147 
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
The QDebug class provides an output stream for debugging information.
Definition: qdebug.h:62
double qreal
Definition: qglobal.h:1193
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
#define QT_MODULE(x)
Definition: qglobal.h:2783
QSharedDataPointer< QVideoSurfaceFormatPrivate > d
#define QT_BEGIN_HEADER
Definition: qglobal.h:136
The QVideoSurfaceFormat class specifies the stream format of a video presentation surface...
bool operator!=(QBool b1, bool b2)
Definition: qglobal.h:2026
HandleType
Identifies the type of a video buffers handle.
static double ratio(Bigint *a, Bigint *b)
PixelFormat
Enumerates video data types.
Definition: qvideoframe.h:72
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
const char * name
#define Q_DECLARE_METATYPE(TYPE)
This macro makes the type Type known to QMetaType as long as it provides a public default constructor...
Definition: qmetatype.h:265
Q_MULTIMEDIA_EXPORT QDebug operator<<(QDebug, const QVideoSurfaceFormat &)
const char * property
Definition: qwizard.cpp:138
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
Direction
Enumerates the layout direction of video scan lines.
#define Q_MULTIMEDIA_EXPORT
Definition: qglobal.h:1456
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
#define QT_END_HEADER
Definition: qglobal.h:137
YCbCrColorSpace
Enumerates the Y&#39;CbCr color space of video frames.
bool operator==(QBool b1, bool b2)
Definition: qglobal.h:2023
Qt::LayoutDirection direction