]> git.sesse.net Git - kdenlive/blob - src/recmonitor.h
Capture monitor with video4linux support!
[kdenlive] / src / recmonitor.h
1 /***************************************************************************
2  *   Copyright (C) 2007 by Jean-Baptiste Mardelle (jb@kdenlive.org)        *
3  *                                                                         *
4  *   This program is free software; you can redistribute it and/or modify  *
5  *   it under the terms of the GNU General Public License as published by  *
6  *   the Free Software Foundation; either version 2 of the License, or     *
7  *   (at your option) any later version.                                   *
8  *                                                                         *
9  *   This program is distributed in the hope that it will be useful,       *
10  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12  *   GNU General Public License for more details.                          *
13  *                                                                         *
14  *   You should have received a copy of the GNU General Public License     *
15  *   along with this program; if not, write to the                         *
16  *   Free Software Foundation, Inc.,                                       *
17  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA          *
18  ***************************************************************************/
19
20
21 #ifndef RECMONITOR_H
22 #define RECMONITOR_H
23
24 #include <QToolBar>
25 #include <QTimer>
26 #include <QProcess>
27 #include <QImage>
28
29 #include <KIcon>
30 #include <KAction>
31 #include <KRestrictedLine>
32
33 #include "ui_recmonitor_ui.h"
34 #include "smallruler.h"
35
36 class RecMonitor : public QWidget {
37     Q_OBJECT
38
39 public:
40     RecMonitor(QString name, QWidget *parent = 0);
41     QString name() const;
42
43
44 protected:
45     virtual void mousePressEvent(QMouseEvent * event);
46
47 private:
48     Ui::RecMonitor_UI ui;
49     QString m_tmpFolder;
50     QString m_name;
51
52     bool m_isActive;
53
54
55     KUrl m_captureFile;
56
57     QProcess *captureProcess;
58     QProcess *displayProcess;
59     QTimer *m_initTimer;
60     bool m_isCapturing;
61     QStringList m_captureArgs;
62     QStringList m_displayArgs;
63
64 private slots:
65     void slotSwitchCapture();
66     void slotCapture();
67     void slotProcessStatus(QProcess::ProcessState status);
68
69 public slots:
70     void refreshRecMonitor(bool visible);
71     void stop();
72     void start();
73     void activateRecMonitor();
74     void slotPlay();
75
76 signals:
77     void renderPosition(int);
78     void durationChanged(int);
79     void addProjectClip(KUrl);
80 };
81
82 #endif