zxing/symbian/QQrDecoder/myvideosurface.h
ftylitak@gmail.com e1aab01022 Updated Symbian project QQrDecoder. It now supports the latest devices and Symbian OSs (Symbian^3, Belle, Anna).
Uses Qt SDK + Camera APIs from Qt Mobility.

Updated the tutorial which shows how to use it.

Updated the installation file included to test without compiling (also advice the tutorial for details).

git-svn-id: https://zxing.googlecode.com/svn/trunk@1920 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2011-09-19 10:32:17 +00:00

45 lines
1,015 B
C++

#ifndef MYVIDEOSURFACE_H
#define MYVIDEOSURFACE_H
#include <QWidget>
#include <QVideoFrame>
#include <QImage>
#include <QVideoSurfaceFormat>
#include <QAbstractVideoSurface>
#include <QVideoRendererControl>
#include <QVideoSurfaceFormat>
#include <QPainter>
class VideoIF
{
public:
virtual void updateVideo() = 0;
};
class MyVideoSurface: public QAbstractVideoSurface
{
Q_OBJECT
public:
MyVideoSurface(QWidget* widget, VideoIF* target, QObject * parent = 0);
~MyVideoSurface();
bool start(const QVideoSurfaceFormat &format);
bool present(const QVideoFrame &frame);
QList<QVideoFrame::PixelFormat> supportedPixelFormats(
QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const;
void paint(QPainter*);
private:
QWidget* m_targetWidget;
VideoIF* m_target;
QVideoFrame m_frame;
QImage::Format m_imageFormat;
QVideoSurfaceFormat m_videoFormat;
};
#endif // MYVIDEOSURFACE_H