-void RecMonitor::slotVideoDeviceChanged(int ix) {
- switch (ix) {
- case SCREENGRAB:
- m_discAction->setEnabled(false);
- m_rewAction->setEnabled(false);
- m_fwdAction->setEnabled(false);
- m_recAction->setEnabled(true);
- m_stopAction->setEnabled(false);
- m_playAction->setEnabled(false);
- break;
- case VIDEO4LINUX:
- m_discAction->setEnabled(false);
- m_rewAction->setEnabled(false);
- m_fwdAction->setEnabled(false);
- m_recAction->setEnabled(true);
- m_stopAction->setEnabled(false);
- m_playAction->setEnabled(true);
- break;
- default: // FIREWIRE
- m_discAction->setEnabled(true);
- m_recAction->setEnabled(false);
- m_stopAction->setEnabled(false);
- m_playAction->setEnabled(false);
- m_rewAction->setEnabled(false);
- m_fwdAction->setEnabled(false);
- break;
+void RecMonitor::slotConfigure()
+{
+ emit showConfigDialog(4, device_selector->currentIndex());
+}
+
+void RecMonitor::slotUpdateCaptureFolder()
+{
+ if (m_captureProcess) m_captureProcess->setWorkingDirectory(KdenliveSettings::capturefolder());
+ if (m_captureProcess->state() != QProcess::NotRunning) {
+ if (device_selector->currentIndex() == FIREWIRE)
+ KMessageBox::information(this, i18n("You need to disconnect and reconnect in the capture monitor to apply your changes"), i18n("Capturing"));
+ else KMessageBox::information(this, i18n("You need to stop capture before your changes can be applied"), i18n("Capturing"));
+ } else slotVideoDeviceChanged(device_selector->currentIndex());
+ kDebug() << "// UPDATE CAPT FOLD: " << KdenliveSettings::capturefolder();
+
+#if KDE_IS_VERSION(4,2,0)
+ // update free space info
+ slotUpdateFreeSpace();
+#endif
+}
+
+void RecMonitor::slotVideoDeviceChanged(int ix)
+{
+ switch (ix) {
+ case SCREENGRAB:
+ m_discAction->setEnabled(false);
+ m_rewAction->setEnabled(false);
+ m_fwdAction->setEnabled(false);
+ 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()) video_frame->setPixmap(mergeSideBySide(KIcon("dialog-warning").pixmap(QSize(50, 50)), i18n("Recordmydesktop utility not found,\n please install it for screen grabs")));
+ else KdenliveSettings::setRmd_path(rmdpath);
+ }
+ if (!KdenliveSettings::rmd_path().isEmpty()) 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())));
+ //video_frame->setText(i18n("Press record button\nto start screen capture"));
+ break;
+ case VIDEO4LINUX:
+ m_discAction->setEnabled(false);
+ m_rewAction->setEnabled(false);
+ m_fwdAction->setEnabled(false);
+ m_recAction->setEnabled(true);
+ m_stopAction->setEnabled(false);
+ m_playAction->setEnabled(true);
+ checkDeviceAvailability();
+ break;
+ default: // FIREWIRE
+ m_discAction->setEnabled(true);
+ m_recAction->setEnabled(false);
+ m_stopAction->setEnabled(false);
+ m_playAction->setEnabled(false);
+ m_rewAction->setEnabled(false);
+ m_fwdAction->setEnabled(false);
+
+ // Check that dvgab is available
+ if (KdenliveSettings::dvgrab_path().isEmpty()) {
+ QString dvgrabpath = KStandardDirs::findExe("dvgrab");
+ if (dvgrabpath.isEmpty()) video_frame->setPixmap(mergeSideBySide(KIcon("dialog-warning").pixmap(QSize(50, 50)), i18n("dvgrab utility not found,\n please install it for firewire capture")));
+ else KdenliveSettings::setDvgrab_path(dvgrabpath);
+ } else {
+ // Show capture info
+ QString capturefile = KdenliveSettings::capturefolder();
+ if (!capturefile.endsWith("/")) capturefile.append("/");
+ QString capturename = KdenliveSettings::dvgrabfilename();
+ if (capturename.isEmpty()) capturename = "capture";
+ QString extension;
+ switch (KdenliveSettings::firewireformat()) {
+ case 0:
+ extension = ".dv";
+ break;
+ case 1:
+ case 2:
+ extension = ".avi";
+ break;
+ case 3:
+ extension = ".m2t";
+ break;
+ }
+ capturename.append("xxx" + extension);
+ capturefile.append(capturename);
+ video_frame->setPixmap(mergeSideBySide(KIcon("network-connect").pixmap(QSize(50, 50)), i18n("Plug your camcorder and\npress connect button\nto initialize connection\nFiles will be saved in:\n%1", capturefile)));
+ }
+ break;