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

ffmpegdirectpainterwidget.h Example File
ffmpeg/ffmpegdirectpainterwidget.h

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

    #ifndef __FFMPEG_DIRECTPAINTERSINK_H
    #define __FFMPEG_DIRECTPAINTERSINK_H

    #include <libavcodec/avcodec.h>
    #include <libavformat/avformat.h>

    #include <QDirectPainter>

    #include "ffmpegsinkwidget.h"

    class QVideoFrame;
    class QVideoSurface;

    namespace ffmpeg
    {

    class DirectPainterWidget :
        public SinkWidget
    {
    public:
        DirectPainterWidget(QObject* parent = 0);
        ~DirectPainterWidget();

        // Sink widget
        QRect       m_viewPort;

        virtual QVideoSurface *videoSurface();

        void setVideoSize(int width, int height);
        void paint( const QVideoFrame& frame );

        virtual int windowId() const;

    private:
        QVideoSurface *m_videoSurface;
    };

    }   // ns ffmpeg

    #endif  // __FFMPEG_DIRECTPAINTERSINK_H


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3