Set media.name to '*'.
[harmattan/cameraplus] / lib / qtcamviewfinderrenderermeego.h
index 714ff12..d7ec2b3 100644 (file)
@@ -3,7 +3,7 @@
 /*!
  * This file is part of CameraPlus.
  *
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -28,6 +28,7 @@
 #include <QMutex>
 #include <QMatrix4x4>
 #include <GLES2/gl2.h>
+#include <EGL/egl.h>
 
 class QGLShaderProgram;
 
@@ -39,11 +40,16 @@ public:
 
   ~QtCamViewfinderRendererMeeGo();
 
-  virtual void paint(QPainter *painter);
+  virtual void paint(const QMatrix4x4& matrix, const QRectF& viewport);
   virtual void resize(const QSizeF& size);
   virtual void reset();
   virtual GstElement *sinkElement();
 
+  QRectF renderArea();
+  QSizeF videoResolution();
+
+  bool needsNativePainting();
+
 private slots:
   void setVideoSize(const QSizeF& size);
 
@@ -54,9 +60,8 @@ private:
 
   void calculateProjectionMatrix(const QRectF& rect);
   void createProgram();
-  void paintFrame(QPainter *painter, int frame);
+  void paintFrame(const QMatrix4x4& matrix, int frame);
   void calculateCoords();
-  QRectF renderArea();
 
   QtCamConfig *m_conf;
   GstElement *m_sink;
@@ -72,6 +77,7 @@ private:
   QSizeF m_size;
   QSizeF m_videoSize;
   QRectF m_renderArea;
+  EGLDisplay m_dpy;
 };
 
 #endif /* QT_CAM_VIEWFINDER_RENDERER_MEEGO_H */