]> git.sesse.net Git - kdenlive/commitdiff
Screen grab now uses recordmydesktop
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 15 Nov 2008 21:51:33 +0000 (21:51 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 15 Nov 2008 21:51:33 +0000 (21:51 +0000)
svn path=/branches/KDE4/; revision=2704

src/kdenlivesettings.kcfg
src/kdenlivesettingsdialog.cpp
src/kdenlivesettingsdialog.h
src/recmonitor.cpp
src/recmonitor.h
src/widgets/configcapture_ui.ui

index 1e42c17637bf294ec3ed61792ead27de4f8ad77f..4aac71c6ca3f93824ae525f39d1c5a83e036f448 100644 (file)
@@ -70,7 +70,9 @@
       <label>Audio driver used for sound output.</label>
       <default>0</default>
     </entry>
+    </group>
 
+    <group name="sdl">
     <entry name="video_driver" type="UInt">
       <label>Video driver used for output.</label>
       <default>0</default>
       <default></default>
     </entry>
 
-    <entry name="screengrabenableaudio" type="Bool">
-      <label>ffmpeg arguments for x11 grab capture.</label>
-      <default>false</default>
+
+    <entry name="video4playback" type="String">
+      <label>ffplay arguments for video playback.</label>
+      <default></default>
+    </entry>
+
+    <entry name="rmd_capture_audio" type="Bool">
+      <label>capture audio.</label>
+      <default>true</default>
     </entry>
 
-    <entry name="useosscapture" type="Bool">
+    <entry name="rmd_use_jack" type="Bool">
       <label>use ffmpeg oss audio capture instead of external program.</label>
       <default>false</default>
     </entry>
 
-    <entry name="screengrabosscapture" type="String">
-      <label>ffmpeg arguments for x11 grab capture.</label>
-      <default>-f oss -i /dev/dsp</default>
+    <entry name="rmd_jackports" type="String">
+      <label>name of the jack ports (space separated).</label>
+      <default>system:capture_1</default>
     </entry>
 
-    <entry name="screengrabalsacapture" type="String">
-      <label>external program audio capture piped into ffmpeg.</label>
-      <default>-Dplughw:0 -c1 -q -r41000 -traw -fS16_LE -</default>
+    <entry name="rmd_alsa_device" type="UInt">
+      <label>Audio device used for sound recording.</label>
+      <default>0</default>
     </entry>
 
-    <entry name="screengrabalsacapture2" type="String">
-      <label>external program audio capture piped into ffmpeg.</label>
-      <default>-f s16le -i - -acodec copy</default>
+    <entry name="rmd_capture_type" type="UInt">
+      <label>capture type.</label>
+      <default>0</default>
     </entry>
 
-    <entry name="screengrabcapture" type="String">
-      <label>ffmpeg arguments for x11 grab capture.</label>
-      <default>-f x11grab -r 10 -s %size -i :0.0%offset</default>
+    <entry name="rmd_follow_mouse" type="Bool">
+      <label>follow mouse in region capture.</label>
+      <default>false</default>
     </entry>
 
-    <entry name="screengrabencoding" type="String">
-      <label>ffmpeg arguments for x11 capture encoding.</label>
-      <default>-pix_fmt yuv422p -vcodec huffyuv</default>
+    <entry name="rmd_offsetx" type="Int">
+      <label>x offset for video capture.</label>
+      <default>1</default>
     </entry>
 
-    <entry name="screengrabextension" type="String">
-      <label>file extension for captured file.</label>
-      <default>avi</default>
+    <entry name="rmd_offsety" type="Int">
+      <label>y offset for video capture.</label>
+      <default>1</default>
     </entry>
 
-    <entry name="fullscreengrab" type="Bool">
-      <label>Capture full screen.</label>
+    <entry name="rmd_width" type="Int">
+      <label>default width for video capture.</label>
+      <default>1280</default>
+    </entry>
+
+    <entry name="rmd_height" type="Int">
+      <label>default height for video capture.</label>
+      <default>720</default>
+    </entry>
+
+    <entry name="rmd_audio_channels" type="Int">
+      <label>number of audio channels.</label>
+      <default>1</default>
+    </entry>
+
+    <entry name="rmd_fps" type="Double">
+      <label>fps for video rec.</label>
+      <default>15.0</default>
+    </entry>
+
+    <entry name="rmd_fullshots" type="Bool">
+      <label>Capture full shots.</label>
       <default>false</default>
     </entry>
 
-    <entry name="video4playback" type="String">
-      <label>ffplay arguments for video playback.</label>
+    <entry name="rmd_alsadevicename" type="String">
+      <label>Name of alsa device for capture.</label>
+      <default></default>
+    </entry>
+
+    <entry name="rmd_path" type="String">
+      <label>Path for the recordmydesktop binary.</label>
       <default></default>
     </entry>
   </group>
index da997ca3817482c8256e26d7920d9b17efc1da3a..b95ce62c486878322d2ce19ca29a7edf95f2d270 100644 (file)
@@ -98,9 +98,9 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QWidget * parent): KConfigDialog(
     connect(m_configCapture.kcfg_video4size, SIGNAL(editingFinished()), this, SLOT(rebuildVideo4Commands()));
     connect(m_configCapture.kcfg_video4rate, SIGNAL(editingFinished()), this, SLOT(rebuildVideo4Commands()));
 
-    connect(m_configCapture.kcfg_screengrabenableaudio, SIGNAL(clicked(bool)), m_configCapture.audio_group, SLOT(setVisible(bool)));
+    connect(m_configCapture.kcfg_rmd_capture_audio, SIGNAL(clicked(bool)), m_configCapture.audio_group, SLOT(setVisible(bool)));
 
-    m_configCapture.audio_group->setVisible(KdenliveSettings::screengrabenableaudio());
+    m_configCapture.audio_group->setVisible(KdenliveSettings::rmd_capture_audio());
 
     connect(m_configEnv.kp_image, SIGNAL(clicked()), this, SLOT(slotEditImageApplication()));
     connect(m_configEnv.kp_audio, SIGNAL(clicked()), this, SLOT(slotEditAudioApplication()));
@@ -116,12 +116,16 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QWidget * parent): KConfigDialog(
     }
 
     checkProfile();
-
     slotUpdateDisplay();
-    m_audioDevice = KdenliveSettings::audio_device();
+
     initDevices();
     connect(m_configMisc.kcfg_profiles_list, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateDisplay()));
 
+    connect(m_configCapture.kcfg_rmd_capture_type, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateRmdRegionStatus()));
+
+    slotUpdateRmdRegionStatus();
+
+
     //HACK: check dvgrab version, because only dvgrab >= 3.3 supports
     //   --timestamp option without bug
     double dvgrabVersion = 0;
@@ -133,6 +137,7 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QWidget * parent): KConfigDialog(
         QString version = QString(versionCheck->readAll()).simplified();
         if (version.contains(' ')) version = version.section(' ', -1);
         dvgrabVersion = version.toDouble();
+
         kDebug() << "// FOUND DVGRAB VERSION: " << dvgrabVersion;
     }
     if (versionCheck) delete versionCheck;
@@ -140,10 +145,22 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QWidget * parent): KConfigDialog(
         KdenliveSettings::setFirewiretimestamp(false);
         m_configCapture.kcfg_firewiretimestamp->setEnabled(false);
     }
+
+    QString rmdpath = KStandardDirs::findExe("recordmydesktop");
+    if (rmdpath.isEmpty()) {
+        KdenliveSettings::setRmd_path(QString());
+        m_configCapture.rmd_info->setText(i18n("Recordmydesktop utility not found, please install it for screen grabs"));
+    } else {
+        KdenliveSettings::setRmd_path(rmdpath);
+        m_configCapture.rmd_info->setText(i18n("Recordmydesktop found at: %1", rmdpath));
+    }
 }
 
 KdenliveSettingsDialog::~KdenliveSettingsDialog() {}
 
+void KdenliveSettingsDialog::slotUpdateRmdRegionStatus() {
+    m_configCapture.region_group->setHidden(m_configCapture.kcfg_rmd_capture_type->currentIndex() != 1);
+}
 
 void KdenliveSettingsDialog::checkProfile() {
     if (!KdenliveSettings::default_profile().isEmpty()) {
@@ -186,6 +203,7 @@ void KdenliveSettingsDialog::initDevices() {
 
     // Fill the list of audio playback devices
     m_configSdl.kcfg_audio_device->addItem(i18n("Default"), QString());
+    m_configCapture.kcfg_rmd_alsa_device->addItem(i18n("Default"), QString());
     if (KStandardDirs::findExe("aplay") != QString::null) {
         m_readProcess.setOutputChannelMode(KProcess::OnlyStdoutChannel);
         m_readProcess.setProgram("aplay", QStringList() << "-l");
@@ -197,12 +215,17 @@ void KdenliveSettingsDialog::initDevices() {
         if (file.open(QIODevice::ReadOnly)) {
             QTextStream stream(&file);
             QString line;
+            QString deviceId;
             while (!stream.atEnd()) {
                 line = stream.readLine();
                 if (line.contains("playback")) {
-                    QString deviceId = line.section(":", 0, 0);
+                    deviceId = line.section(":", 0, 0);
                     m_configSdl.kcfg_audio_device->addItem(line.section(":", 1, 1), "plughw:" + QString::number(deviceId.section("-", 0, 0).toInt()) + "," + QString::number(deviceId.section("-", 1, 1).toInt()));
                 }
+                if (line.contains("capture")) {
+                    deviceId = line.section(":", 0, 0);
+                    m_configCapture.kcfg_rmd_alsa_device->addItem(line.section(":", 1, 1), "plughw:" + QString::number(deviceId.section("-", 0, 0).toInt()) + "," + QString::number(deviceId.section("-", 1, 1).toInt()));
+                }
             }
             file.close();
         }
@@ -221,6 +244,7 @@ void KdenliveSettingsDialog::slotReadAudioDevices() {
             QString card = data.section(":", 0, 0).section(" ", -1);
             QString device = data.section(":", 1, 1).section(" ", -1);
             m_configSdl.kcfg_audio_device->addItem(data.section(":", -1), "plughw:" + card + "," + device);
+            m_configCapture.kcfg_rmd_alsa_device->addItem(data.section(":", -1), "plughw:" + card + "," + device);
         }
     }
 }
@@ -344,6 +368,11 @@ void KdenliveSettingsDialog::updateSettings() {
         resetProfile = true;
     }
 
+    value = m_configCapture.kcfg_rmd_alsa_device->itemData(m_configCapture.kcfg_rmd_alsa_device->currentIndex()).toString();
+    if (value != KdenliveSettings::rmd_alsadevicename()) {
+        KdenliveSettings::setRmd_alsadevicename(value);
+    }
+
     value = m_configSdl.kcfg_audio_driver->itemData(m_configSdl.kcfg_audio_driver->currentIndex()).toString();
     if (value != KdenliveSettings::audiodrivername()) {
         KdenliveSettings::setAudiodrivername(value);
index 48352967cd724f3f349ace764a7db13909c7eb67..640ef95383edde1a22e58f6aa5868195941f133b 100644 (file)
@@ -56,6 +56,7 @@ private slots:
     void slotEditAudioApplication();
     void slotEditVideoApplication();
     void slotReadAudioDevices();
+    void slotUpdateRmdRegionStatus();
 
 private:
     KPageWidgetItem *page1;
@@ -77,7 +78,6 @@ private:
     QString m_defaultPath;
     KProcess m_readProcess;
     void initDevices();
-    uint m_audioDevice;
 
 signals:
     void customChanged();
index 828a5ea82f0a2dd20779c71bf5de0d3a572fbc5c..4160d102eceeea7315b75bdcf0296623eca5e685 100644 (file)
@@ -85,7 +85,6 @@ RecMonitor::RecMonitor(QString name, QWidget *parent)
     slotVideoDeviceChanged(ui.device_selector->currentIndex());
     displayProcess = new QProcess;
     captureProcess = new QProcess;
-    alsaProcess = new QProcess;
 
     connect(captureProcess, SIGNAL(stateChanged(QProcess::ProcessState)), this, SLOT(slotProcessStatus(QProcess::ProcessState)));
 
@@ -123,7 +122,6 @@ RecMonitor::RecMonitor(QString name, QWidget *parent)
 RecMonitor::~RecMonitor() {
     delete captureProcess;
     delete displayProcess;
-    delete alsaProcess;
 }
 
 QString RecMonitor::name() const {
@@ -143,6 +141,11 @@ void RecMonitor::slotVideoDeviceChanged(int ix) {
         m_recAction->setEnabled(true);
         m_stopAction->setEnabled(false);
         m_playAction->setEnabled(false);
+        if (KdenliveSettings::rmd_path().isEmpty()) {
+            QString rmdpath = KStandardDirs::findExe("recordmydesktop");
+            if (rmdpath.isEmpty()) ui.video_frame->setPixmap(mergeSideBySide(KIcon("dialog-warning").pixmap(QSize(50, 50)), i18n("Recordmydesktop utility not found, please install it for screen grabs")));
+            else KdenliveSettings::setRmd_path(rmdpath);
+        }
         ui.video_frame->setPixmap(mergeSideBySide(KIcon("video-display").pixmap(QSize(50, 50)), i18n("Press record button\nto start screen capture\nFiles will be saved in:\n%1", KdenliveSettings::capturefolder())));
         //ui.video_frame->setText(i18n("Press record button\nto start screen capture"));
         break;
@@ -381,12 +384,11 @@ void RecMonitor::slotRecord() {
             QTimer::singleShot(1000, this, SLOT(slotStartCapture()));
             break;
         case SCREENGRAB:
-            captureProcess->write("q\n", 3);
+            //captureProcess->write("q\n", 3);
             captureProcess->terminate();
-            alsaProcess->terminate();
-            alsaProcess->kill();
+            ui.video_frame->setText(i18n("Encoding captured video..."));
             // in case ffmpeg doesn't exit with the 'q' command, kill it one second later
-            QTimer::singleShot(1000, captureProcess, SLOT(kill()));
+            //QTimer::singleShot(1000, captureProcess, SLOT(kill()));
             break;
         }
         return;
@@ -399,7 +401,7 @@ void RecMonitor::slotRecord() {
     if (captureProcess->state() == QProcess::NotRunning) {
         m_recAction->setChecked(true);
         QString extension = "mpg";
-        if (ui.device_selector->currentIndex() == SCREENGRAB) extension = KdenliveSettings::screengrabextension();
+        if (ui.device_selector->currentIndex() == SCREENGRAB) extension = "ogv"; //KdenliveSettings::screengrabextension();
         QString path = KdenliveSettings::capturefolder() + "/capture0000." + extension;
         int i = 1;
         while (QFile::exists(path)) {
@@ -430,36 +432,35 @@ void RecMonitor::slotRecord() {
             captureProcess->start("ffmpeg", m_captureArgs);
             break;
         case SCREENGRAB:
-            if (KdenliveSettings::fullscreengrab()) {
-                const QRect rect = QApplication::desktop()->screenGeometry();
-                args = KdenliveSettings::screengrabcapture().replace("%size", QString::number(rect.width()) + "x" + QString::number(rect.height())).replace("%offset", QString());
-                if (KdenliveSettings::screengrabenableaudio()) {
-                    // also capture audio
-                    if (KdenliveSettings::useosscapture()) m_captureArgs << KdenliveSettings::screengrabosscapture().simplified().split(' ');
-                    else m_captureArgs << KdenliveSettings::screengrabalsacapture2().simplified().split(' ');
-                }
-                m_captureArgs << args.simplified().split(' ') << KdenliveSettings::screengrabencoding().simplified().split(' ') << m_captureFile.path();
-                ui.video_frame->setText(i18n("Capturing..."));
-                m_isCapturing = true;
-                if (KdenliveSettings::screengrabenableaudio() && !KdenliveSettings::useosscapture()) {
-                    QStringList alsaArgs = KdenliveSettings::screengrabalsacapture().simplified().split(' ');
-                    alsaProcess->setStandardOutputProcess(captureProcess);
-                    kDebug() << "Capture: Running arecord " << alsaArgs.join(" ");
-                    alsaProcess->start("arecord", alsaArgs);
-                }
-                kDebug() << "Capture: Running ffmpeg " << m_captureArgs.join(" ");
-                captureProcess->start("ffmpeg", m_captureArgs);
-            } else {
-                ui.video_frame->setText(i18n("Select region..."));
-                rgnGrab = new RegionGrabber();
-                connect(rgnGrab, SIGNAL(regionGrabbed(const QRect&)), SLOT(slotStartGrab(const QRect &)));
+            switch (KdenliveSettings::rmd_capture_type()) {
+            case 0:
+                // Full screen capture, nothing special to do
+                break;
+            default:
+                // Region capture
+                m_captureArgs << "-width" << QString::number(KdenliveSettings::rmd_width()) << "-height" << QString::number(KdenliveSettings::rmd_height());
+                if (!KdenliveSettings::rmd_follow_mouse()) {
+                    m_captureArgs << "-x" << QString::number(KdenliveSettings::rmd_offsetx()) << "-y" << QString::number(KdenliveSettings::rmd_offsety());
+                } else m_captureArgs << "--follow-mouse";
+                break;
             }
+            m_isCapturing = true;
+            if (KdenliveSettings::rmd_capture_audio()) {
+                if (KdenliveSettings::rmd_use_jack()) m_captureArgs << "-use-jack" << KdenliveSettings::rmd_jackports();
+                else if (!KdenliveSettings::rmd_alsadevicename().isEmpty())
+                    m_captureArgs << "-device" << KdenliveSettings::rmd_alsadevicename();
+            } else m_captureArgs << "--no-sound";
+
+            if (KdenliveSettings::rmd_fullshots()) m_captureArgs << "--full-shots";
+            m_captureArgs << "-fps" << QString::number(KdenliveSettings::rmd_fps()) << "-o" << m_captureFile.path();
+            captureProcess->start(KdenliveSettings::rmd_path(), m_captureArgs);
+            kDebug() << "// RecordMyDesktop params: " << m_captureArgs;
             break;
         default:
             break;
         }
 
-        //ui.video_frame->setScaledContents(false);
+
         if (ui.device_selector->currentIndex() != SCREENGRAB) {
             m_isCapturing = true;
             kDebug() << "Capture: Running ffplay " << m_displayArgs.join(" ");
@@ -469,12 +470,12 @@ void RecMonitor::slotRecord() {
     } else {
         // stop capture
         displayProcess->kill();
-        captureProcess->kill();
-        alsaProcess->kill();
+        //captureProcess->kill();
         QTimer::singleShot(1000, this, SLOT(slotRecord()));
     }
 }
 
+/*
 void RecMonitor::slotStartGrab(const QRect &rect) {
     rgnGrab->deleteLater();
     QApplication::restoreOverrideCursor();
@@ -501,7 +502,7 @@ void RecMonitor::slotStartGrab(const QRect &rect) {
     }
     kDebug() << "Capture: Running ffmpeg " << m_captureArgs.join(" ");
     captureProcess->start("ffmpeg", m_captureArgs);
-}
+}*/
 
 void RecMonitor::slotProcessStatus(QProcess::ProcessState status) {
     if (status == QProcess::NotRunning) {
@@ -524,7 +525,8 @@ void RecMonitor::slotProcessStatus(QProcess::ProcessState status) {
         if (captureProcess && captureProcess->exitStatus() == QProcess::CrashExit) {
             ui.video_frame->setText(i18n("Capture crashed, please check your parameters"));
         } else {
-            ui.video_frame->setText(i18n("Not connected"));
+            if (ui.device_selector->currentIndex() != SCREENGRAB) ui.video_frame->setText(i18n("Not connected"));
+            else ui.video_frame->setPixmap(mergeSideBySide(KIcon("video-display").pixmap(QSize(50, 50)), i18n("Press record button\nto start screen capture\nFiles will be saved in:\n%1", KdenliveSettings::capturefolder())));
         }
         m_isCapturing = false;
     } else {
index 855acb13b5c04c5f63bfbbc10333606987d69043..ba44c3059de15981075f74b0f2f81b3c9b828828 100644 (file)
@@ -63,7 +63,6 @@ private:
 
     QProcess *captureProcess;
     QProcess *displayProcess;
-    QProcess *alsaProcess;
     QTimer *m_initTimer;
     bool m_isCapturing;
     /** did the user capture something ? */
@@ -90,7 +89,7 @@ private slots:
     void slotRewind();
     void slotForward();
     void slotDisconnect();
-    void slotStartGrab(const QRect &rect);
+    //void slotStartGrab(const QRect &rect);
     void slotConfigure();
 
 public slots:
index 439d2d2f81ebcf325a9084fdfa4691b8acbd6748..3928b5f24abf8ee6a2db932337acb86dc60d5e69 100644 (file)
@@ -6,10 +6,10 @@
     <x>0</x>
     <y>0</y>
     <width>409</width>
-    <height>311</height>
+    <height>411</height>
    </rect>
   </property>
-  <layout class="QGridLayout" name="gridLayout_3" >
+  <layout class="QGridLayout" name="gridLayout_6" >
    <item row="0" column="0" >
     <widget class="QLabel" name="label" >
      <property name="text" >
      </property>
      <widget class="QWidget" name="tab" >
       <attribute name="title" >
-       <string>Firewire / dvgrab</string>
+       <string>Firewire</string>
       </attribute>
       <layout class="QGridLayout" name="gridLayout_2" >
-       <item row="0" column="0" >
+       <item row="0" column="0" colspan="3" >
+        <widget class="QLabel" name="dvgrab_info" >
+         <property name="frameShape" >
+          <enum>QFrame::StyledPanel</enum>
+         </property>
+         <property name="frameShadow" >
+          <enum>QFrame::Raised</enum>
+         </property>
+         <property name="text" >
+          <string/>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="0" >
         <widget class="QLabel" name="label_2" >
          <property name="text" >
           <string>Capture format</string>
          </property>
         </widget>
        </item>
-       <item row="0" column="1" >
+       <item row="1" column="1" >
         <widget class="KComboBox" name="kcfg_firewireformat" >
          <item>
           <property name="text" >
@@ -83,7 +96,7 @@
          </item>
         </widget>
        </item>
-       <item row="0" column="2" >
+       <item row="1" column="2" >
         <spacer name="horizontalSpacer" >
          <property name="orientation" >
           <enum>Qt::Horizontal</enum>
          </property>
         </spacer>
        </item>
-       <item row="1" column="0" colspan="3" >
+       <item row="2" column="0" colspan="3" >
         <widget class="QCheckBox" name="kcfg_firewireautosplit" >
          <property name="text" >
           <string>Automatically start a new file on scene cut</string>
          </property>
         </widget>
        </item>
-       <item row="2" column="0" colspan="3" >
+       <item row="3" column="0" colspan="3" >
         <widget class="QCheckBox" name="kcfg_firewiretimestamp" >
          <property name="text" >
           <string>Add recording time to captured file name</string>
          </property>
         </widget>
        </item>
-       <item row="3" column="1" >
+       <item row="4" column="1" >
         <spacer name="verticalSpacer_2" >
          <property name="orientation" >
           <enum>Qt::Vertical</enum>
      </widget>
      <widget class="QWidget" name="tab_2" >
       <attribute name="title" >
-       <string>Video4Linux / FFmpeg</string>
+       <string>Video4Linux</string>
       </attribute>
       <layout class="QGridLayout" name="gridLayout" >
        <item row="1" column="1" colspan="3" >
          </property>
         </widget>
        </item>
+       <item row="8" column="3" >
+        <spacer name="verticalSpacer" >
+         <property name="orientation" >
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0" >
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
       </layout>
      </widget>
      <widget class="QWidget" name="tab_3" >
       <attribute name="title" >
-       <string>Screen Grab / FFmpeg</string>
+       <string>Screen Grab</string>
       </attribute>
-      <layout class="QGridLayout" name="gridLayout_5" >
-       <item row="0" column="0" colspan="2" >
-        <widget class="QCheckBox" name="kcfg_screengrabenableaudio" >
+      <layout class="QGridLayout" name="gridLayout_3" >
+       <item row="0" column="0" colspan="5" >
+        <widget class="QLabel" name="rmd_info" >
+         <property name="frameShape" >
+          <enum>QFrame::StyledPanel</enum>
+         </property>
+         <property name="frameShadow" >
+          <enum>QFrame::Raised</enum>
+         </property>
+         <property name="text" >
+          <string/>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="0" colspan="5" >
+        <widget class="QCheckBox" name="kcfg_rmd_capture_audio" >
          <property name="text" >
           <string>Capture audio</string>
          </property>
         </widget>
        </item>
-       <item row="1" column="0" colspan="3" >
+       <item row="2" column="0" colspan="5" >
         <widget class="QFrame" name="audio_group" >
          <property name="frameShape" >
           <enum>QFrame::StyledPanel</enum>
             </property>
            </widget>
           </item>
-          <item row="0" column="1" >
-           <widget class="KLineEdit" name="kcfg_screengrabalsacapture" />
-          </item>
-          <item row="0" column="2" >
-           <widget class="KLineEdit" name="kcfg_screengrabalsacapture2" />
-          </item>
           <item row="1" column="0" >
-           <widget class="QRadioButton" name="kcfg_useosscapture" >
+           <widget class="QRadioButton" name="kcfg_rmd_use_jack" >
             <property name="text" >
-             <string>OSS</string>
+             <string>Jack</string>
             </property>
            </widget>
           </item>
-          <item row="1" column="1" colspan="2" >
-           <widget class="KLineEdit" name="kcfg_screengrabosscapture" />
+          <item row="0" column="1" colspan="2" >
+           <widget class="KComboBox" name="kcfg_rmd_alsa_device" />
+          </item>
+          <item row="1" column="2" >
+           <widget class="KLineEdit" name="kcfg_rmd_jackports" />
+          </item>
+          <item row="1" column="1" >
+           <widget class="QLabel" name="label_10" >
+            <property name="text" >
+             <string>Ports:</string>
+            </property>
+           </widget>
           </item>
          </layout>
         </widget>
        </item>
-       <item row="2" column="0" colspan="2" >
-        <widget class="QLabel" name="label_17" >
-         <property name="text" >
-          <string>Video capture params</string>
-         </property>
+       <item row="3" column="0" colspan="5" >
+        <widget class="KComboBox" name="kcfg_rmd_capture_type" >
+         <item>
+          <property name="text" >
+           <string>Full screen capture</string>
+          </property>
+         </item>
+         <item>
+          <property name="text" >
+           <string>Region capture</string>
+          </property>
+         </item>
         </widget>
        </item>
-       <item row="2" column="2" >
-        <widget class="KLineEdit" name="kcfg_screengrabcapture" />
-       </item>
-       <item row="3" column="0" colspan="2" >
-        <widget class="QLabel" name="label_8" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="Preferred" hsizetype="Maximum" >
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
+       <item row="4" column="0" colspan="5" >
+        <widget class="QFrame" name="region_group" >
+         <property name="frameShape" >
+          <enum>QFrame::StyledPanel</enum>
          </property>
-         <property name="text" >
-          <string>Encoding parameters</string>
+         <property name="frameShadow" >
+          <enum>QFrame::Raised</enum>
          </property>
+         <layout class="QGridLayout" name="gridLayout_5" >
+          <item row="1" column="1" >
+           <widget class="KIntSpinBox" name="kcfg_rmd_offsetx" >
+            <property name="minimum" >
+             <number>1</number>
+            </property>
+            <property name="maximum" >
+             <number>5000</number>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="2" >
+           <widget class="KIntSpinBox" name="kcfg_rmd_offsety" >
+            <property name="minimum" >
+             <number>1</number>
+            </property>
+            <property name="maximum" >
+             <number>5000</number>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="2" >
+           <widget class="KIntSpinBox" name="kcfg_rmd_height" >
+            <property name="maximum" >
+             <number>5000</number>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="1" >
+           <widget class="KIntSpinBox" name="kcfg_rmd_width" >
+            <property name="maximum" >
+             <number>5000</number>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="0" >
+           <widget class="QLabel" name="label_19" >
+            <property name="text" >
+             <string>Offset</string>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="0" >
+           <widget class="QLabel" name="label_20" >
+            <property name="text" >
+             <string>Size</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="0" >
+           <widget class="QCheckBox" name="kcfg_rmd_follow_mouse" >
+            <property name="text" >
+             <string>Follow mouse</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
         </widget>
        </item>
-       <item row="3" column="2" >
-        <widget class="KLineEdit" name="kcfg_screengrabencoding" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
+       <item row="5" column="0" >
+        <widget class="QLabel" name="label_8" >
          <property name="text" >
-          <string/>
+          <string>Audio channels</string>
          </property>
         </widget>
        </item>
-       <item row="4" column="0" >
-        <widget class="QLabel" name="label_10" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="Preferred" hsizetype="Maximum" >
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
+       <item row="5" column="1" >
+        <widget class="KIntSpinBox" name="kcfg_rmd_audio_channels" />
+       </item>
+       <item row="5" column="2" >
+        <spacer name="horizontalSpacer_2" >
+         <property name="orientation" >
+          <enum>Qt::Horizontal</enum>
          </property>
-         <property name="text" >
-          <string>File extension</string>
+         <property name="sizeHint" stdset="0" >
+          <size>
+           <width>86</width>
+           <height>26</height>
+          </size>
          </property>
-        </widget>
+        </spacer>
        </item>
-       <item row="4" column="2" >
-        <widget class="KLineEdit" name="kcfg_screengrabextension" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
+       <item row="5" column="3" >
+        <widget class="QLabel" name="label_18" >
          <property name="text" >
-          <string/>
+          <string>Frame rate</string>
          </property>
         </widget>
        </item>
-       <item row="5" column="0" colspan="3" >
-        <widget class="QCheckBox" name="kcfg_fullscreengrab" >
+       <item row="5" column="4" >
+        <widget class="KDoubleNumInput" name="kcfg_rmd_fps" />
+       </item>
+       <item row="6" column="0" colspan="4" >
+        <widget class="QCheckBox" name="kcfg_rmd_fullshots" >
          <property name="text" >
-          <string>Full screen capture</string>
+          <string>Full shots</string>
          </property>
         </widget>
        </item>
-       <item row="6" column="1" colspan="2" >
+       <item row="7" column="0" colspan="5" >
         <spacer name="verticalSpacer_3" >
          <property name="orientation" >
           <enum>Qt::Vertical</enum>
     </widget>
    </item>
   </layout>
-  <zorder>label</zorder>
-  <zorder>kcfg_defaultcapture</zorder>
-  <zorder>tabWidget</zorder>
  </widget>
  <customwidgets>
   <customwidget>
    <extends>QComboBox</extends>
    <header>kcombobox.h</header>
   </customwidget>
+  <customwidget>
+   <class>KDoubleNumInput</class>
+   <extends>QWidget</extends>
+   <header>knuminput.h</header>
+  </customwidget>
+  <customwidget>
+   <class>KIntSpinBox</class>
+   <extends>QSpinBox</extends>
+   <header>knuminput.h</header>
+  </customwidget>
   <customwidget>
    <class>KLineEdit</class>
    <extends>QLineEdit</extends>