]> git.sesse.net Git - kdenlive/commitdiff
Capture monitor with video4linux support!
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 16 Mar 2008 00:25:31 +0000 (00:25 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 16 Mar 2008 00:25:31 +0000 (00:25 +0000)
svn path=/branches/KDE4/; revision=2061

src/CMakeLists.txt
src/kdenlivesettings.kcfg
src/kdenlivesettingsdialog.cpp
src/kdenlivesettingsdialog.h
src/mainwindow.cpp
src/mainwindow.h
src/projectlist.h
src/recmonitor.cpp [new file with mode: 0644]
src/recmonitor.h [new file with mode: 0644]
src/widgets/configcapture_ui.ui [new file with mode: 0644]
src/widgets/recmonitor_ui.ui [new file with mode: 0644]

index 8c5d95885d3e68c0a35ec04d6bbbc94242a00e81..d8e437eb6690c60b502a51a3b72645fec1cebcf4 100644 (file)
@@ -19,13 +19,16 @@ ${NEPOMUK_LIBRARIES}
 )
 
 
+
 kde4_add_ui_files(kdenlive_UI
   widgets/timeline_ui.ui
   widgets/monitor_ui.ui
+  widgets/recmonitor_ui.ui
   widgets/colorclip_ui.ui
   widgets/configmisc_ui.ui
   widgets/configenv_ui.ui
   widgets/configdisplay_ui.ui
+  widgets/configcapture_ui.ui
   widgets/effectlist_ui.ui
   widgets/effectstack_ui.ui
   widgets/profiledialog_ui.ui
@@ -89,6 +92,7 @@ set(kdenlive_SRCS
   renderwidget.cpp
   abstractclipitem.cpp
   transitionsettings.cpp
+  recmonitor.cpp
 )
 
 kde4_add_kcfg_files(kdenlive_SRCS GENERATE_MOC kdenlivesettings.kcfgc )
index c3580d3355c64e7647aea9dddd24d260f2320c3a..6760855a0c1f1baeab6a21b118a5e63fcb639129 100644 (file)
     </entry>
   </group>
 
+  <group name="capture">
+    <entry name="defaultcapture" type="UInt">
+      <label>Default video capture system.</label>
+      <default>0</default>
+    </entry>
+
+    <entry name="capturefolder" type="Path">
+      <label>Default folder for captured files.</label>
+      <default>$HOME</default>
+    </entry>
+
+    <entry name="firewireformat" type="UInt">
+      <label>Default firewire capture format.</label>
+      <default>0</default>
+    </entry>
+
+    <entry name="video4vformat" type="String">
+      <label>Default video4linux capture format.</label>
+      <default>m4v</default>
+    </entry>
+
+    <entry name="video4vdevice" type="String">
+      <label>Default video4linux capture format.</label>
+      <default>/dev/video0</default>
+    </entry>
+
+    <entry name="video4aformat" type="String">
+      <label>Default video4linux capture format.</label>
+      <default>oss</default>
+    </entry>
+
+    <entry name="video4adevice" type="String">
+      <label>Default video4linux capture format.</label>
+      <default>/dev/dsp</default>
+    </entry>
+
+    <entry name="video4width" type="Int">
+      <label>Default video4linux capture format.</label>
+      <default>320</default>
+    </entry>
+
+    <entry name="video4height" type="Int">
+      <label>Default video4linux capture format.</label>
+      <default>240</default>
+    </entry>
+
+    <entry name="video4rate" type="Int">
+      <label>Default video4linux capture format.</label>
+      <default>15</default>
+    </entry>
+  </group>
+
   <group name="unmanaged">
     <entry name="project_display_ratio" type="Double">
       <label>Current project display ratio.</label>
index 4e1871d9725f9afac05652910c7609ea86bb5271..18ee2947a339c343616fe8b7d8817f346af36962 100644 (file)
@@ -30,7 +30,7 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QWidget * parent): KConfigDialog(
 
     QWidget *p1 = new QWidget;
     m_configMisc.setupUi(p1);
-    page1 = addPage(p1, i18n("Misc"), "misc");
+    page1 = addPage(p1, i18n("Misc"), "configure");
 
     QWidget *p3 = new QWidget;
     m_configDisplay.setupUi(p3);
@@ -43,7 +43,13 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QWidget * parent): KConfigDialog(
     m_configEnv.rendererpathurl->lineEdit()->setObjectName("kcfg_rendererpath");
     m_configEnv.tmppathurl->setMode(KFile::Directory);
     m_configEnv.tmppathurl->lineEdit()->setObjectName("kcfg_currenttmpfolder");
-    page2 = addPage(p2, i18n("Environnement"), "env");
+    page2 = addPage(p2, i18n("Environnement"), "terminal");
+
+    QWidget *p4 = new QWidget;
+    m_configCapture.setupUi(p4);
+    m_configCapture.capturefolderurl->setMode(KFile::Directory);
+    m_configCapture.capturefolderurl->lineEdit()->setObjectName("kcfg_capturefolder");
+    page4 = addPage(p4, i18n("Capture"), "audio-card");
 
     QStringList profilesNames = ProfilesDialog::getProfileNames();
     m_configMisc.profiles_list->addItems(profilesNames);
index 44bc590e449874e7570524ff1d691d662cdb97ac..9f63715523b74e8db6a337a19d24fd4366ebe25b 100644 (file)
@@ -28,6 +28,7 @@
 #include "ui_configmisc_ui.h"
 #include "ui_configenv_ui.h"
 #include "ui_configdisplay_ui.h"
+#include "ui_configcapture_ui.h"
 
 class KdenliveSettingsDialog : public KConfigDialog {
     Q_OBJECT
@@ -46,9 +47,11 @@ private:
     KPageWidgetItem *page1;
     KPageWidgetItem *page2;
     KPageWidgetItem *page3;
+    KPageWidgetItem *page4;
     Ui::ConfigEnv_UI m_configEnv;
     Ui::ConfigMisc_UI m_configMisc;
     Ui::ConfigDisplay_UI m_configDisplay;
+    Ui::ConfigCapture_UI m_configCapture;
     QStringList m_mltProfilesList;
     QStringList m_customProfilesList;
     bool m_isCustomProfile;
index 9b041f45e654bc5eac31b96301e62fb7e05aecec..8069ed9a8e1331b781e478737f0b2495c0d87dc8 100644 (file)
@@ -126,6 +126,14 @@ MainWindow::MainWindow(QWidget *parent)
     projectMonitorDock->setWidget(m_projectMonitor);
     addDockWidget(Qt::TopDockWidgetArea, projectMonitorDock);
 
+    recMonitorDock = new QDockWidget(i18n("Record Monitor"), this);
+    recMonitorDock->setObjectName("record_monitor");
+    m_recMonitor = new RecMonitor("record", this);
+    recMonitorDock->setWidget(m_recMonitor);
+    addDockWidget(Qt::TopDockWidgetArea, recMonitorDock);
+
+    connect(m_recMonitor, SIGNAL(addProjectClip(KUrl)), this, SLOT(slotAddProjectClip(KUrl)));
+
     undoViewDock = new QDockWidget(i18n("Undo History"), this);
     undoViewDock->setObjectName("undo_history");
     m_undoView = new QUndoView(this);
@@ -726,6 +734,11 @@ void MainWindow::slotDeleteTimelineClip() {
     }
 }
 
+void MainWindow::slotAddProjectClip(KUrl url) {
+    if (m_activeDocument)
+        m_activeDocument->slotAddClipFile(url, QString());
+}
+
 void MainWindow::slotAddVideoEffect(QAction *result) {
     if (!result) return;
     QDomElement effect = m_videoEffects.getEffectByName(result->data().toString());
index cdf1c20a2fd736602645ac43e20ca80d2f184f92..d8cf446c41d059d042ace86f13d06f0c26b63d61 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "projectlist.h"
 #include "monitor.h"
+#include "recmonitor.h"
 #include "monitormanager.h"
 #include "kdenlivedoc.h"
 #include "trackview.h"
@@ -86,6 +87,9 @@ private:
     QDockWidget *projectMonitorDock;
     Monitor *m_projectMonitor;
 
+    QDockWidget *recMonitorDock;
+    RecMonitor *m_recMonitor;
+
     QDockWidget *undoViewDock;
     QUndoView *m_undoView;
     QUndoGroup *m_commandStack;
@@ -148,6 +152,7 @@ private slots:
     void slotAddVideoEffect(QAction *result);
     void slotAddAudioEffect(QAction *result);
     void slotAddCustomEffect(QAction *result);
+    void slotAddProjectClip(KUrl url);
 };
 
 #endif
index fe3e6c0be6424d4e0e534fa8a515fa3f8a6b7517..64d6288705ab1bdd71c8df819834af3522ea678f 100644 (file)
@@ -131,7 +131,7 @@ private:
     KdenliveDoc *m_doc;
 
 private slots:
-    void slotAddClip(QUrl givenUrl = QUrl(), const QString &group = QString::null);
+    void slotAddClip(QUrl givenUrl = QUrl(), const QString &group = QString());
     void slotRemoveClip();
     void slotEditClip();
     void slotClipSelected();
diff --git a/src/recmonitor.cpp b/src/recmonitor.cpp
new file mode 100644 (file)
index 0000000..ad3d5da
--- /dev/null
@@ -0,0 +1,221 @@
+/***************************************************************************
+ *   Copyright (C) 2007 by Jean-Baptiste Mardelle (jb@kdenlive.org)        *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA          *
+ ***************************************************************************/
+
+
+#include <QMouseEvent>
+#include <QStylePainter>
+#include <QMenu>
+#include <QToolButton>
+#include <QFile>
+#include <QDir>
+
+#include <KDebug>
+#include <KLocale>
+#include <KStandardDirs>
+
+#include "gentime.h"
+#include "kdenlivesettings.h"
+#include "recmonitor.h"
+
+RecMonitor::RecMonitor(QString name, QWidget *parent)
+        : QWidget(parent), m_name(name), m_isActive(false), m_isCapturing(false) {
+    ui.setupUi(this);
+
+    ui.video_frame->setAttribute(Qt::WA_PaintOnScreen);
+    connect(ui.buttonConnect, SIGNAL(clicked()), this, SLOT(slotSwitchCapture()));
+    connect(ui.buttonRec, SIGNAL(clicked()), this, SLOT(slotCapture()));
+    ui.buttonRec->setCheckable(true);
+
+    displayProcess = new QProcess;
+    captureProcess = new QProcess;
+
+    connect(displayProcess, SIGNAL(stateChanged(QProcess::ProcessState)), this, SLOT(slotProcessStatus(QProcess::ProcessState)));
+
+    QStringList env = QProcess::systemEnvironment();
+    env << "SDL_WINDOWID=" + QString::number(ui.video_frame->winId());
+    displayProcess->setEnvironment(env);
+
+    kDebug() << "/////// BUILDING MONITOR, ID: " << ui.video_frame->winId();
+}
+
+QString RecMonitor::name() const {
+    return m_name;
+}
+
+void RecMonitor::slotSwitchCapture() {
+
+    /*
+    *captureProcess<<"dvgrab";
+
+    bool isHdv = false;
+
+    switch (m_recPanel->capture_format->currentItem()){
+        case 0:
+      *captureProcess<<"--format"<<"dv1";
+     break;
+        case 1:
+      *captureProcess<<"--format"<<"dv2";
+     break;
+        case 3:
+      *captureProcess<<"--format"<<"hdv";
+     isHdv = true;
+     break;
+        default:
+            *captureProcess<<"--format"<<"raw";
+     break;
+    }
+
+    if (KdenliveSettings::autosplit()) *captureProcess<<"--autosplit";
+    if (KdenliveSettings::timestamp()) *captureProcess<<"--timestamp";
+    *captureProcess<<"-i"<<"capture"<<"-";*/
+
+    /*
+        QStringList captureArgs;
+        captureArgs<<"--format"<<"hdv"<<"-i"<<"capture"<<"-";
+        QStringList displayArgs;
+
+        displayArgs<<"-f"<<"mpegts"<<"-x"<<QString::number(ui.video_frame->width())<<"-y"<<QString::number(ui.video_frame->height())<<"-";
+
+        captureProcess->setStandardOutputProcess(displayProcess);
+        ui.video_frame->setScaledContents(false);
+        captureProcess->start("dvgrab",captureArgs);
+        displayProcess->start("ffplay",  displayArgs);*/
+    ui.buttonRec->setChecked(false);
+    m_isCapturing = false;
+    if (captureProcess->state() == QProcess::Starting) return;
+    else if (captureProcess->state() == QProcess::NotRunning) {
+        m_captureArgs.clear();
+        m_displayArgs.clear();
+
+        if (KdenliveSettings::defaultcapture() == 0) {
+            m_captureArgs << "--format" << "hdv" << "-i" << "capture" << "-";
+            m_displayArgs << "-f" << "mpegts" << "-x" << QString::number(ui.video_frame->width()) << "-y" << QString::number(ui.video_frame->height()) << "-";
+        } else {
+            if (!KdenliveSettings::video4adevice().isEmpty()) m_captureArgs << "-f" << KdenliveSettings::video4aformat() << "-i" << KdenliveSettings::video4adevice();
+            m_captureArgs << "-f" << "video4linux2" << "-s" << QString::number(KdenliveSettings::video4width()) + "x" + QString::number(KdenliveSettings::video4height()) << "-r" << QString::number(KdenliveSettings::video4rate()) << "-i" << KdenliveSettings::video4vdevice() << "-f" << KdenliveSettings::video4vformat() << "-";
+            m_displayArgs << "-f" << KdenliveSettings::video4vformat() << "-x" << QString::number(ui.video_frame->width()) << "-y" << QString::number(ui.video_frame->height()) << "-";
+        }
+
+        captureProcess->setStandardOutputProcess(displayProcess);
+        if (KdenliveSettings::defaultcapture() == 0) captureProcess->start("dvgrab", m_captureArgs);
+        else captureProcess->start("ffmpeg", m_captureArgs);
+        displayProcess->start("ffplay", m_displayArgs);
+        ui.video_frame->setText(i18n("Initialising..."));
+    } else {
+        // stop capture
+        displayProcess->kill();
+        captureProcess->kill();
+    }
+}
+
+void RecMonitor::slotCapture() {
+
+    if (captureProcess->state() == QProcess::NotRunning) {
+        ui.buttonConnect->setEnabled(false);
+
+        QString path = KdenliveSettings::capturefolder() + "/capture0000.mpg";
+        int i = 1;
+        while (QFile::exists(path)) {
+            QString num = QString::number(i);
+            if (i < 10) num.prepend("000");
+            else if (i < 100) num.prepend("00");
+            else num.prepend("0");
+            path = KdenliveSettings::capturefolder() + "/capture" + num + ".mpg";
+        }
+
+        m_captureFile = KUrl(path);
+
+        m_isCapturing = true;
+        m_captureArgs.clear();
+        m_displayArgs.clear();
+
+        if (KdenliveSettings::defaultcapture() == 0) {
+            m_captureArgs << "--format" << "hdv" << "-i" << "capture" << "-";
+            m_displayArgs << "-f" << "mpegts" << "-x" << QString::number(ui.video_frame->width()) << "-y" << QString::number(ui.video_frame->height()) << "-";
+        } else {
+            if (!KdenliveSettings::video4adevice().isEmpty()) m_captureArgs << "-f" << KdenliveSettings::video4aformat() << "-i" << KdenliveSettings::video4adevice();
+            m_captureArgs << "-f" << "video4linux2" << "-s" << QString::number(KdenliveSettings::video4width()) + "x" + QString::number(KdenliveSettings::video4height()) << "-r" << QString::number(KdenliveSettings::video4rate()) << "-i" << KdenliveSettings::video4vdevice() << "-y" << "-f" << KdenliveSettings::video4vformat() << m_captureFile.path() << "-f" << KdenliveSettings::video4vformat() << "-";
+            m_displayArgs << "-f" << KdenliveSettings::video4vformat() << "-x" << QString::number(ui.video_frame->width()) << "-y" << QString::number(ui.video_frame->height()) << "-";
+        }
+
+        captureProcess->setStandardOutputProcess(displayProcess);
+        //ui.video_frame->setScaledContents(false);
+        if (KdenliveSettings::defaultcapture() == 0) captureProcess->start("dvgrab", m_captureArgs);
+        else captureProcess->start("ffmpeg", m_captureArgs);
+        displayProcess->start("ffplay", m_displayArgs);
+        ui.video_frame->setText(i18n("Initialising..."));
+        ui.buttonRec->setChecked(true);
+    } else {
+        // stop capture
+        displayProcess->kill();
+        captureProcess->kill();
+        if (m_isCapturing) {
+            QTimer::singleShot(1000, this, SLOT(slotSwitchCapture()));
+            ui.buttonRec->setChecked(false);
+            ui.buttonConnect->setEnabled(true);
+            if (ui.autoaddbox->isChecked()) emit addProjectClip(m_captureFile);
+        } else {
+            QTimer::singleShot(1000, this, SLOT(slotCapture()));
+            ui.buttonRec->setChecked(true);
+        }
+    }
+}
+
+void RecMonitor::slotProcessStatus(QProcess::ProcessState status) {
+    if (status == QProcess::Starting) ui.buttonConnect->setText(i18n("Starting..."));
+    else if (status == QProcess::NotRunning) {
+        ui.buttonConnect->setText(i18n("Connect"));
+        ui.video_frame->setText(i18n("Not connected"));
+    } else ui.buttonConnect->setText(i18n("Disconnect"));
+}
+
+// virtual
+void RecMonitor::mousePressEvent(QMouseEvent * event) {
+    slotPlay();
+}
+
+void RecMonitor::activateRecMonitor() {
+    //if (!m_isActive) m_monitorManager->activateRecMonitor(m_name);
+}
+
+void RecMonitor::stop() {
+    m_isActive = false;
+
+}
+
+void RecMonitor::start() {
+    m_isActive = true;
+
+}
+
+void RecMonitor::refreshRecMonitor(bool visible) {
+    if (visible) {
+        //if (!m_isActive) m_monitorManager->activateRecMonitor(m_name);
+
+    }
+}
+
+void RecMonitor::slotPlay() {
+
+    //if (!m_isActive) m_monitorManager->activateRecMonitor(m_name);
+
+}
+
+
+#include "recmonitor.moc"
diff --git a/src/recmonitor.h b/src/recmonitor.h
new file mode 100644 (file)
index 0000000..20bba7b
--- /dev/null
@@ -0,0 +1,82 @@
+/***************************************************************************
+ *   Copyright (C) 2007 by Jean-Baptiste Mardelle (jb@kdenlive.org)        *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA          *
+ ***************************************************************************/
+
+
+#ifndef RECMONITOR_H
+#define RECMONITOR_H
+
+#include <QToolBar>
+#include <QTimer>
+#include <QProcess>
+#include <QImage>
+
+#include <KIcon>
+#include <KAction>
+#include <KRestrictedLine>
+
+#include "ui_recmonitor_ui.h"
+#include "smallruler.h"
+
+class RecMonitor : public QWidget {
+    Q_OBJECT
+
+public:
+    RecMonitor(QString name, QWidget *parent = 0);
+    QString name() const;
+
+
+protected:
+    virtual void mousePressEvent(QMouseEvent * event);
+
+private:
+    Ui::RecMonitor_UI ui;
+    QString m_tmpFolder;
+    QString m_name;
+
+    bool m_isActive;
+
+
+    KUrl m_captureFile;
+
+    QProcess *captureProcess;
+    QProcess *displayProcess;
+    QTimer *m_initTimer;
+    bool m_isCapturing;
+    QStringList m_captureArgs;
+    QStringList m_displayArgs;
+
+private slots:
+    void slotSwitchCapture();
+    void slotCapture();
+    void slotProcessStatus(QProcess::ProcessState status);
+
+public slots:
+    void refreshRecMonitor(bool visible);
+    void stop();
+    void start();
+    void activateRecMonitor();
+    void slotPlay();
+
+signals:
+    void renderPosition(int);
+    void durationChanged(int);
+    void addProjectClip(KUrl);
+};
+
+#endif
diff --git a/src/widgets/configcapture_ui.ui b/src/widgets/configcapture_ui.ui
new file mode 100644 (file)
index 0000000..a177b4f
--- /dev/null
@@ -0,0 +1,231 @@
+<ui version="4.0" >
+ <class>ConfigCapture_UI</class>
+ <widget class="QWidget" name="ConfigCapture_UI" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>422</width>
+    <height>339</height>
+   </rect>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_3" >
+   <item row="0" column="0" >
+    <widget class="QLabel" name="label" >
+     <property name="text" >
+      <string>Default capture device</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1" >
+    <widget class="KComboBox" name="kcfg_defaultcapture" >
+     <item>
+      <property name="text" >
+       <string> Firewire (DV / HDV)</string>
+      </property>
+     </item>
+     <item>
+      <property name="text" >
+       <string>Video4Linux (webcam)</string>
+      </property>
+     </item>
+    </widget>
+   </item>
+   <item row="2" column="0" colspan="2" >
+    <widget class="QGroupBox" name="groupBox" >
+     <property name="title" >
+      <string>Firewire config</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_2" >
+      <item row="0" column="0" >
+       <widget class="QLabel" name="label_2" >
+        <property name="text" >
+         <string>Default format</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="KComboBox" name="kcfg_firewireformat" >
+        <item>
+         <property name="text" >
+          <string>DV Raw</string>
+         </property>
+        </item>
+        <item>
+         <property name="text" >
+          <string>DV AVI type 1</string>
+         </property>
+        </item>
+        <item>
+         <property name="text" >
+          <string>DV AVI type 2</string>
+         </property>
+        </item>
+        <item>
+         <property name="text" >
+          <string>HDV</string>
+         </property>
+        </item>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="3" column="0" colspan="2" >
+    <widget class="QGroupBox" name="groupBox_2" >
+     <property name="title" >
+      <string>Video4Linux</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout" >
+      <item row="0" column="0" colspan="2" >
+       <widget class="QLabel" name="label_7" >
+        <property name="text" >
+         <string>Video device</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" colspan="2" >
+       <widget class="KLineEdit" name="kcfg_video4vdevice" >
+        <property name="text" >
+         <string>/dev/video0</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="4" >
+       <widget class="QLabel" name="label_3" >
+        <property name="text" >
+         <string>Format</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="5" >
+       <widget class="KLineEdit" name="kcfg_video4vformat" >
+        <property name="text" >
+         <string>m4v</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0" colspan="2" >
+       <widget class="QLabel" name="label_8" >
+        <property name="text" >
+         <string>Audio device</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2" colspan="2" >
+       <widget class="KLineEdit" name="kcfg_video4adevice" >
+        <property name="text" >
+         <string>/dev/dsp</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="4" >
+       <widget class="QLabel" name="label_9" >
+        <property name="text" >
+         <string>Format</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="5" >
+       <widget class="KLineEdit" name="kcfg_video4aformat" >
+        <property name="text" >
+         <string>oss</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0" >
+       <widget class="QLabel" name="label_4" >
+        <property name="text" >
+         <string>Image width</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1" colspan="2" >
+       <widget class="QSpinBox" name="kcfg_video4width" >
+        <property name="maximum" >
+         <number>2000</number>
+        </property>
+        <property name="value" >
+         <number>320</number>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="3" >
+       <widget class="QLabel" name="label_5" >
+        <property name="text" >
+         <string>Image height</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="4" colspan="2" >
+       <widget class="QSpinBox" name="kcfg_video4height" >
+        <property name="maximum" >
+         <number>2000</number>
+        </property>
+        <property name="value" >
+         <number>240</number>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0" >
+       <widget class="QLabel" name="label_6" >
+        <property name="text" >
+         <string>Frame rate</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1" colspan="2" >
+       <widget class="QSpinBox" name="kcfg_video4rate" >
+        <property name="value" >
+         <number>15</number>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="4" column="0" colspan="2" >
+    <spacer name="verticalSpacer" >
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>20</width>
+       <height>56</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="0" >
+    <widget class="QLabel" name="label_10" >
+     <property name="text" >
+      <string>Capture folder</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1" >
+    <widget class="KUrlRequester" name="capturefolderurl" />
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>KComboBox</class>
+   <extends>QComboBox</extends>
+   <header>kcombobox.h</header>
+  </customwidget>
+  <customwidget>
+   <class>KLineEdit</class>
+   <extends>QLineEdit</extends>
+   <header>klineedit.h</header>
+  </customwidget>
+  <customwidget>
+   <class>KUrlRequester</class>
+   <extends>QFrame</extends>
+   <header>kurlrequester.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/widgets/recmonitor_ui.ui b/src/widgets/recmonitor_ui.ui
new file mode 100644 (file)
index 0000000..90a9910
--- /dev/null
@@ -0,0 +1,93 @@
+<ui version="4.0" >
+ <class>RecMonitor_UI</class>
+ <widget class="QWidget" name="RecMonitor_UI" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>301</width>
+    <height>248</height>
+   </rect>
+  </property>
+  <layout class="QGridLayout" name="gridLayout" >
+   <item row="0" column="0" colspan="4" >
+    <widget class="QLabel" name="video_frame" >
+     <property name="text" >
+      <string>Not connected</string>
+     </property>
+     <property name="alignment" >
+      <set>Qt::AlignCenter</set>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0" >
+    <widget class="KPushButton" name="buttonConnect" >
+     <property name="text" >
+      <string>Connect</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2" >
+    <spacer name="horizontalSpacer" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>40</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="3" >
+    <widget class="KPushButton" name="buttonRec" >
+     <property name="text" >
+      <string>Record</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0" colspan="4" >
+    <widget class="QFrame" name="control_frame" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Maximum" hsizetype="Preferred" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize" >
+      <size>
+       <width>0</width>
+       <height>15</height>
+      </size>
+     </property>
+     <property name="frameShape" >
+      <enum>QFrame::StyledPanel</enum>
+     </property>
+     <property name="frameShadow" >
+      <enum>QFrame::Raised</enum>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0" >
+    <widget class="QCheckBox" name="autoaddbox" >
+     <property name="text" >
+      <string>Auto add</string>
+     </property>
+     <property name="checked" >
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>KPushButton</class>
+   <extends>QPushButton</extends>
+   <header>kpushbutton.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>