Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

ffmpegdirectpainterwidget.cpp Example File
ffmpeg/ffmpegdirectpainterwidget.cpp

    /****************************************************************************
    **
    ** This file is part of the Qt Extended Opensource Package.
    **
    ** Copyright (C) 2009 Trolltech ASA.
    **
    ** $QT_EXTENDED_DUAL_LICENSE$
    **
    ****************************************************************************/

    #include <QSize>
    #include <QRect>
    #include <QPainter>
    #include <QPaintEvent>
    #include <QtGui/qscreen_qws.h>
    #include <QDebug>

    #include <custom.h>

    #include "ffmpegdirectpainterwidget.h"
    #include "ffmpegsinkwidget.h"

    #include "qvideosurface.h"

    namespace ffmpeg
    {

    /*!
        \class ffmpeg::DirectPainterWidget
        \internal
    */

    DirectPainterWidget::DirectPainterWidget(QObject* parent)
    {
        m_videoSurface = new QVideoSurface(0);
    }

    DirectPainterWidget::~DirectPainterWidget()
    {
        delete m_videoSurface;
    }

    int DirectPainterWidget::windowId() const
    {
        return m_videoSurface->winId();
    }

    void DirectPainterWidget::setVideoSize(int w, int h)
    {
        Q_UNUSED(w);
        Q_UNUSED(h);
    }

    QVideoSurface *DirectPainterWidget::videoSurface()
    {
        return m_videoSurface;
    }

    void DirectPainterWidget::paint(const QVideoFrame& frame)
    {
        m_videoSurface->renderFrame( frame );
    }

    }   // ns ffmpeg


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3