11#include <QtCore/qcoreevent.h>
12#include <QtCore/qpointer.h>
20 :
rect(0.0, 0.0, 320, 240)
40 q_ptr->prepareGeometryChange();
60 if (
frame.isValid()) {
108QGraphicsVideoItem::~QGraphicsVideoItem()
124QVideoSink *QGraphicsVideoItem::videoSink()
const
126 return d_func()->sink;
136 return d_func()->m_aspectRatioMode;
142 if (
d->m_aspectRatioMode ==
mode)
145 d->m_aspectRatioMode =
mode;
157QPointF QGraphicsVideoItem::offset()
const
159 return d_func()->rect.topLeft();
178QSizeF QGraphicsVideoItem::size()
const
180 return d_func()->rect.size();
183void QGraphicsVideoItem::setSize(
const QSizeF &
size)
196QSizeF QGraphicsVideoItem::nativeSize()
const
198 return d_func()->nativeSize;
204QRectF QGraphicsVideoItem::boundingRect()
const
206 return d_func()->boundingRect;
219 d->m_frame.paint(
painter,
d->rect, { Qt::transparent, d->m_aspectRatioMode });
258#include "moc_qgraphicsvideoitem.cpp"
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value)
This virtual function is called by QGraphicsItem to notify custom items that some part of the item's ...
The QGraphicsObject class provides a base class for all graphics items that require signals,...
void _q_present(const QVideoFrame &)
QGraphicsVideoItem * q_ptr
QGraphicsVideoItemPrivate()
Qt::AspectRatioMode m_aspectRatioMode
The QGraphicsVideoItem class provides a graphics item which display video produced by a QMediaPlayer ...
virtual void timerEvent(QTimerEvent *event)
This event handler can be reimplemented in a subclass to receive timer events for the object.
The QPainter class performs low-level painting on widgets and other paint devices.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr void moveCenter(const QPointF &p) noexcept
Moves the rectangle, leaving the center point at the given position.
constexpr QPointF center() const noexcept
Returns the center point of the rectangle.
constexpr QSizeF size() const noexcept
Returns the size of the rectangle.
void scale(qreal w, qreal h, Qt::AspectRatioMode mode) noexcept
Scales the size to a rectangle with the given width and height, according to the specified mode.
constexpr bool isEmpty() const noexcept
Returns true if either of the width and height is less than or equal to 0; otherwise returns false.
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem.
The QVideoFrame class represents a frame of video data.
The QVideoSink class represents a generic sink for video data.
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLintptr offset
GLsizei GLenum GLboolean sink
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent