]> git.sesse.net Git - kdenlive/blobdiff - src/abstractmonitor.h
try to find solution for ShuttlePro V2 problem
[kdenlive] / src / abstractmonitor.h
index 33154d40d969dad3dfad2921a3af32766aa255fe..eec0cfefb30cf0af7965febcf7bc4a34f9ef5cda 100644 (file)
@@ -33,7 +33,7 @@
 #include <stdint.h>
 
 class MonitorManager;
-
+class VideoContainer;
 
 class AbstractRender: public QObject
 {
@@ -43,7 +43,7 @@ Q_OBJECT public:
      *  @param name A unique identifier for this renderer
      *  @param winid The parent widget identifier (required for SDL display). Set to 0 for OpenGL rendering
      *  @param profile The MLT profile used for the renderer (default one will be used if empty). */
-    AbstractRender(Kdenlive::MONITORID name, QWidget *parent = 0):QObject(parent), sendFrameForAnalysis(false), m_name(name) {};
+    explicit AbstractRender(Kdenlive::MONITORID name, QWidget *parent = 0):QObject(parent), sendFrameForAnalysis(false), analyseAudio(false), m_name(name) {};
 
     /** @brief Destroy the MLT Renderer. */
     virtual ~AbstractRender() {};
@@ -70,24 +70,42 @@ signals:
     void audioSamplesSignal(QVector<int16_t>,int,int,int);
 };
 
+
+
+class VideoSurface : public QWidget
+{
+    Q_OBJECT
+public:
+    VideoSurface(QWidget *parent = 0);
+    
+signals:
+    void refreshMonitor();
+
+protected:
+    virtual void paintEvent ( QPaintEvent * event );
+};
+
+
 class AbstractMonitor : public QWidget
 {
     Q_OBJECT
 public:
     AbstractMonitor(Kdenlive::MONITORID id, MonitorManager *manager, QWidget *parent = 0);
     Kdenlive::MONITORID id() {return m_id;};
-    virtual ~AbstractMonitor() {};
+    virtual ~AbstractMonitor();
     virtual AbstractRender *abstractRender() = 0;
-    virtual void pause() = 0;
-    virtual void unpause() = 0;
     bool isActive() const;
+    VideoContainer *videoBox;
+    VideoSurface *videoSurface;
+    void createVideoSurface();
+    
     
 public slots:
     virtual void stop() = 0;
     virtual void start() = 0;
     virtual void slotPlay() = 0;
     virtual void slotMouseSeek(int eventDelta, bool fast) = 0;
-    bool slotActivateMonitor();
+    bool slotActivateMonitor(bool forceRefresh = false);
     virtual void slotSwitchFullScreen() = 0;
 
 protected:
@@ -99,7 +117,7 @@ class VideoContainer : public QFrame
 {
     Q_OBJECT
 public:
-    VideoContainer(AbstractMonitor *monitor, QWidget *parent = 0);
+    explicit VideoContainer(AbstractMonitor *monitor, QWidget *parent = 0);
     void switchFullScreen();
 
 protected:
@@ -113,5 +131,4 @@ private:
     AbstractMonitor *m_monitor;
 };
 
-
 #endif