]> git.sesse.net Git - kdenlive/blobdiff - src/recmonitor.h
Fix keyframes in timeline cannot be dragged to beginning of clip. Also fixes painting...
[kdenlive] / src / recmonitor.h
index e52bce9eae479afef54e9ccb89dc510e85ec7772..79befd52336e2ba931917ddc05068c8e0602bdfc 100644 (file)
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA          *
  ***************************************************************************/
 
+/**
+* @class RecMonitor
+* @brief Records video via dvgrab, video4linux and recordmydesktop
+* @author Jean-Baptiste Mardelle
+*/
 
 #ifndef RECMONITOR_H
 #define RECMONITOR_H
 
+#include "blackmagic/capture.h"
+#include "ui_recmonitor_ui.h"
+
 #include <QToolBar>
 #include <QTimer>
 #include <QProcess>
 #include <KAction>
 #include <KRestrictedLine>
 #include <KDateTime>
+#include <kdeversion.h>
+#include <KComboBox>
 
-#include "ui_recmonitor_ui.h"
+#if KDE_IS_VERSION(4,2,0)
+#include <kcapacitybar.h>
+#endif
 
-class RecMonitor : public QWidget
+class RecMonitor : public QWidget, public Ui::RecMonitor_UI
 {
     Q_OBJECT
 
@@ -43,16 +55,27 @@ public:
 
     QString name() const;
 
-    enum CAPTUREDEVICE {FIREWIRE = 0, VIDEO4LINUX = 1, SCREENGRAB = 2};
+    enum CAPTUREDEVICE {FIREWIRE = 0, VIDEO4LINUX = 1, SCREENGRAB = 2, BLACKMAGIC = 3};
 
 protected:
     virtual void mousePressEvent(QMouseEvent * event);
 
 private:
-    Ui::RecMonitor_UI m_ui;
     QString m_name;
     bool m_isActive;
     KDateTime m_captureTime;
+    /** @brief Provide feedback about dvgrab operations */
+    QLabel m_dvinfo;
+    
+    /** @brief Keeps a brief (max ten items) history of warning or error messages
+     *         (currently only used for BLACKMAGIC). */
+    KComboBox m_logger;
+    QString m_capturePath;
+
+#if KDE_IS_VERSION(4,2,0)
+    KCapacityBar *m_freeSpace;
+    QTimer m_spaceTimer;
+#endif
 
     KUrl m_captureFile;
     KIcon m_playIcon;
@@ -75,6 +98,10 @@ private:
     void checkDeviceAvailability();
     QPixmap mergeSideBySide(const QPixmap& pix, const QString txt);
     void manageCapturedFiles();
+    CaptureHandler *m_bmCapture;
+    /** @brief Indicates whether we are currently capturing from BLACKMAGIC. */
+    bool m_blackmagicCapturing;
+    void createBlackmagicDevice();
 
 private slots:
     void slotStartCapture(bool play = true);
@@ -87,6 +114,10 @@ private slots:
     void slotDisconnect();
     //void slotStartGrab(const QRect &rect);
     void slotConfigure();
+    void slotReadDvgrabInfo();
+    void slotUpdateFreeSpace();
+    void slotGotBlackmagicFrameNumber(ulong ix);
+    void slotGotBlackmagicMessage(const QString &message);
 
 public slots:
     void refreshRecMonitor(bool visible);
@@ -94,7 +125,7 @@ public slots:
     void start();
     void activateRecMonitor();
     void slotPlay();
-    void slotUpdateCaptureFolder();
+    void slotUpdateCaptureFolder(const QString currentProjectFolder);
 
 signals:
     void renderPosition(int);