3 #ifndef QT_CAM_VIEWFINDER_RENDERER_MEEGO_H
4 #define QT_CAM_VIEWFINDER_RENDERER_MEEGO_H
6 #include "qtcamviewfinderrenderer.h"
10 #include <GLES2/gl2.h>
12 class QGLShaderProgram;
14 class QtCamViewfinderRendererMeeGo : public QtCamViewfinderRenderer {
18 Q_INVOKABLE QtCamViewfinderRendererMeeGo(QtCamConfig *config, QObject *parent = 0);
20 ~QtCamViewfinderRendererMeeGo();
22 virtual void paint(QPainter *painter);
23 virtual void resize(const QSizeF& size);
25 virtual GstElement *sinkElement();
28 void setVideoSize(const QSizeF& size);
31 static void frame_ready(GstElement *sink, int frame, QtCamViewfinderRendererMeeGo *r);
32 static void sink_notify(QtCamViewfinderRendererMeeGo *q, GObject *object, gboolean is_last_ref);
33 static void sink_caps_changed(GObject *obj, GParamSpec *pspec, QtCamViewfinderRendererMeeGo *q);
35 void calculateProjectionMatrix(const QRectF& rect);
37 void paintFrame(QPainter *painter, int frame);
38 void calculateCoords();
46 unsigned long m_notify;
48 QGLShaderProgram *m_program;
49 QMatrix4x4 m_projectionMatrix;
50 GLfloat m_vertexCoords[8];
51 GLfloat m_texCoords[8];
57 #endif /* QT_CAM_VIEWFINDER_RENDERER_MEEGO_H */