ffmpegdirectpainterwidget.cpp Example File
ffmpeg/ffmpegdirectpainterwidget.cpp
#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
{
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 );
}
}
Copyright © 2009 Trolltech |
Trademarks |
Qt Extended 4.4.3 |