Skip to content
VideoItem.h 1.1 KiB
Newer Older
/****************************************************************************
 *
 *   (c) 2009-2018 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/
Gus Grubba's avatar
Gus Grubba committed


/**
 * @file
 *   @brief QGC Video Item
 *   @author Gus Grubba <mavlink@grubba.com>
 */

Gus Grubba's avatar
Gus Grubba committed

#include <QtQuick/QQuickItem>
Gus Grubba's avatar
Gus Grubba committed
#include "VideoSurface.h"
Gus Grubba's avatar
Gus Grubba committed

class VideoItem : public QQuickItem
{
    Q_OBJECT
    Q_DISABLE_COPY(VideoItem)
    Q_PROPERTY(VideoSurface* surface READ surface WRITE setSurface)

public:
    explicit VideoItem(QQuickItem *parent = 0);
    virtual ~VideoItem();

    VideoSurface *surface() const;
    void setSurface(VideoSurface *surface);

protected:
#if defined(QGC_GST_STREAMING)
Gus Grubba's avatar
Gus Grubba committed
    /*! Reimplemented from QQuickItem. */
    virtual QSGNode* updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData);
Gus Grubba's avatar
Gus Grubba committed

private:
#if defined(QGC_GST_STREAMING)
Gus Grubba's avatar
Gus Grubba committed
    struct Private;
    Private* const _data;
Gus Grubba's avatar
Gus Grubba committed
};