18#include "videosurface_p.h"
20#include "../elementfactory.h"
21#include "../../QGlib/connect.h"
23#include <QtCore/QDebug>
24#include <QtQuick/QQuickItem>
29VideoSurface::VideoSurface(QObject *parent)
30 : QObject(parent), d(new VideoSurfacePrivate)
34VideoSurface::~VideoSurface()
36 if (!d->videoSink.isNull()) {
37 d->videoSink->setState(QGst::StateNull);
45 if (d->videoSink.isNull()) {
46 d->videoSink = QGst::ElementFactory::make(
"qtquick2videosink");
48 if (d->videoSink.isNull()) {
49 qCritical(
"Failed to create qtquick2videosink. Make sure it is installed correctly");
55 &VideoSurface::onUpdate);
62void VideoSurface::onUpdate()
64 Q_FOREACH(QQuickItem *item, d->items) {
Helper class for painting video on a QtQuick2 VideoItem.
bool connect(void *instance, const char *detailedSignal, T *receiver, R(T::*slot)(Args...), ConnectFlags flags=0)
Wrappers for GStreamer classes.