1 /***************************************************************************
2 * Copyright (C) 2007 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
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. *
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. *
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 ***************************************************************************/
21 #include "recmonitor.h"
23 #include "kdenlivesettings.h"
24 #include "managecapturesdialog.h"
29 #include <KStandardDirs>
31 #include <KIO/NetAccess>
34 #include <QMouseEvent>
36 #include <QToolButton>
41 RecMonitor::RecMonitor(QString name, QWidget *parent)
42 : QWidget(parent), m_name(name), m_isActive(false), m_isCapturing(false), m_isPlaying(false), m_didCapture(false)
46 ui.video_frame->setAttribute(Qt::WA_PaintOnScreen);
47 ui.device_selector->setCurrentIndex(KdenliveSettings::defaultcapture());
48 connect(ui.device_selector, SIGNAL(currentIndexChanged(int)), this, SLOT(slotVideoDeviceChanged(int)));
52 QToolBar *toolbar = new QToolBar(name, this);
53 QHBoxLayout *layout = new QHBoxLayout;
54 layout->setContentsMargins(0, 0, 0, 0);
55 m_playIcon = KIcon("media-playback-start");
56 m_pauseIcon = KIcon("media-playback-pause");
58 m_discAction = toolbar->addAction(KIcon("network-connect"), i18n("Connect"));
59 connect(m_discAction, SIGNAL(triggered()), this, SLOT(slotDisconnect()));
61 m_rewAction = toolbar->addAction(KIcon("media-seek-backward"), i18n("Rewind"));
62 connect(m_rewAction, SIGNAL(triggered()), this, SLOT(slotRewind()));
64 m_playAction = toolbar->addAction(m_playIcon, i18n("Play"));
65 connect(m_playAction, SIGNAL(triggered()), this, SLOT(slotStartCapture()));
67 m_stopAction = toolbar->addAction(KIcon("media-playback-stop"), i18n("Stop"));
68 connect(m_stopAction, SIGNAL(triggered()), this, SLOT(slotStopCapture()));
69 m_stopAction->setEnabled(false);
70 m_fwdAction = toolbar->addAction(KIcon("media-seek-forward"), i18n("Forward"));
71 connect(m_fwdAction, SIGNAL(triggered()), this, SLOT(slotForward()));
73 m_recAction = toolbar->addAction(KIcon("media-record"), i18n("Record"));
74 connect(m_recAction, SIGNAL(triggered()), this, SLOT(slotRecord()));
75 m_recAction->setCheckable(true);
77 toolbar->addSeparator();
79 QAction *configAction = toolbar->addAction(KIcon("configure"), i18n("Configure"));
80 connect(configAction, SIGNAL(triggered()), this, SLOT(slotConfigure()));
81 configAction->setCheckable(false);
83 layout->addWidget(toolbar);
84 ui.control_frame_firewire->setLayout(layout);
86 slotVideoDeviceChanged(ui.device_selector->currentIndex());
87 displayProcess = new QProcess;
88 captureProcess = new QProcess;
90 connect(captureProcess, SIGNAL(stateChanged(QProcess::ProcessState)), this, SLOT(slotProcessStatus(QProcess::ProcessState)));
92 QStringList env = QProcess::systemEnvironment();
93 env << "SDL_WINDOWID=" + QString::number(ui.video_frame->winId());
95 QString videoDriver = KdenliveSettings::videodrivername();
96 if (!videoDriver.isEmpty()) {
97 if (videoDriver == "x11_noaccel") {
98 env << "SDL_VIDEO_YUV_HWACCEL=0";
99 env << "SDL_VIDEODRIVER=x11";
100 } else env << "SDL_VIDEODRIVER=" + videoDriver;
102 setenv("SDL_VIDEO_ALLOW_SCREENSAVER", "1", 1);
104 displayProcess->setEnvironment(env);
106 if (KdenliveSettings::video4capture().isEmpty()) {
107 QString captureCommand;
108 if (!KdenliveSettings::video4adevice().isEmpty()) captureCommand = "-f " + KdenliveSettings::video4aformat() + " -i " + KdenliveSettings::video4adevice();
110 captureCommand += " -f " + KdenliveSettings::video4vformat() + " -s " + KdenliveSettings::video4size() + " -r " + QString::number(KdenliveSettings::video4rate()) + " -i " + KdenliveSettings::video4vdevice();
111 KdenliveSettings::setVideo4capture(captureCommand);
114 kDebug() << "/////// BUILDING MONITOR, ID: " << ui.video_frame->winId();
117 RecMonitor::~RecMonitor()
119 delete captureProcess;
120 delete displayProcess;
123 QString RecMonitor::name() const
128 void RecMonitor::slotConfigure()
130 emit showConfigDialog(4, ui.device_selector->currentIndex());
133 void RecMonitor::slotUpdateCaptureFolder()
135 if (captureProcess) captureProcess->setWorkingDirectory(KdenliveSettings::capturefolder());
136 slotVideoDeviceChanged(ui.device_selector->currentIndex());
139 void RecMonitor::slotVideoDeviceChanged(int ix)
143 m_discAction->setEnabled(false);
144 m_rewAction->setEnabled(false);
145 m_fwdAction->setEnabled(false);
146 m_recAction->setEnabled(true);
147 m_stopAction->setEnabled(false);
148 m_playAction->setEnabled(false);
149 if (KdenliveSettings::rmd_path().isEmpty()) {
150 QString rmdpath = KStandardDirs::findExe("recordmydesktop");
151 if (rmdpath.isEmpty()) ui.video_frame->setPixmap(mergeSideBySide(KIcon("dialog-warning").pixmap(QSize(50, 50)), i18n("Recordmydesktop utility not found,\n please install it for screen grabs")));
152 else KdenliveSettings::setRmd_path(rmdpath);
154 if (!KdenliveSettings::rmd_path().isEmpty()) 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())));
155 //ui.video_frame->setText(i18n("Press record button\nto start screen capture"));
158 m_discAction->setEnabled(false);
159 m_rewAction->setEnabled(false);
160 m_fwdAction->setEnabled(false);
161 m_recAction->setEnabled(true);
162 m_stopAction->setEnabled(false);
163 m_playAction->setEnabled(true);
164 checkDeviceAvailability();
167 m_discAction->setEnabled(true);
168 m_recAction->setEnabled(false);
169 m_stopAction->setEnabled(false);
170 m_playAction->setEnabled(false);
171 m_rewAction->setEnabled(false);
172 m_fwdAction->setEnabled(false);
173 //ui.video_frame->setText(i18n("Plug your camcorder and\npress connect button\nto initialize connection"));
174 if (KdenliveSettings::dvgrab_path().isEmpty()) {
175 QString dvgrabpath = KStandardDirs::findExe("dvgrab");
176 if (dvgrabpath.isEmpty()) ui.video_frame->setPixmap(mergeSideBySide(KIcon("dialog-warning").pixmap(QSize(50, 50)), i18n("dvgrab utility not found,\n please install it for firewire capture")));
177 else KdenliveSettings::setDvgrab_path(dvgrabpath);
180 if (!KdenliveSettings::dvgrab_path().isEmpty()) ui.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", KdenliveSettings::capturefolder())));
185 QPixmap RecMonitor::mergeSideBySide(const QPixmap& pix, const QString txt)
188 QRect r = p.fontMetrics().boundingRect(QRect(0, 0, ui.video_frame->width(), ui.video_frame->height()), Qt::AlignLeft, txt);
189 int strWidth = r.width();
190 int strHeight = r.height();
191 int pixWidth = pix.width();
192 int pixHeight = pix.height();
193 QPixmap res(strWidth + 8 + pixWidth, qMax(strHeight, pixHeight));
194 res.fill(Qt::transparent);
196 p.drawPixmap(0, 0, pix);
197 p.drawText(QRect(pixWidth + 8, 0, strWidth, strHeight), 0, txt);
203 void RecMonitor::checkDeviceAvailability()
205 if (!KIO::NetAccess::exists(KUrl(KdenliveSettings::video4vdevice()), KIO::NetAccess::SourceSide , this)) {
206 m_playAction->setEnabled(false);
207 m_recAction->setEnabled(false);
208 ui.video_frame->setPixmap(mergeSideBySide(KIcon("camera-web").pixmap(QSize(50, 50)), i18n("Cannot read from device %1\nPlease check drivers and access rights.", KdenliveSettings::video4vdevice())));
209 //ui.video_frame->setText(i18n("Cannot read from device %1\nPlease check drivers and access rights.", KdenliveSettings::video4vdevice()));
210 } else //ui.video_frame->setText(i18n("Press play or record button\nto start video capture"));
211 ui.video_frame->setPixmap(mergeSideBySide(KIcon("camera-web").pixmap(QSize(50, 50)), i18n("Press play or record button\nto start video capture\nFiles will be saved in:\n%1", KdenliveSettings::capturefolder())));
214 void RecMonitor::slotDisconnect()
216 if (captureProcess->state() == QProcess::NotRunning) {
217 m_captureTime = KDateTime::currentLocalDateTime();
218 kDebug() << "CURRENT TIME: " << m_captureTime.toString();
219 m_didCapture = false;
220 slotStartCapture(false);
221 m_discAction->setIcon(KIcon("network-disconnect"));
222 m_discAction->setText(i18n("Disonnect"));
223 m_recAction->setEnabled(true);
224 m_stopAction->setEnabled(true);
225 m_playAction->setEnabled(true);
226 m_rewAction->setEnabled(true);
227 m_fwdAction->setEnabled(true);
229 captureProcess->write("q", 1);
230 QTimer::singleShot(1000, captureProcess, SLOT(kill()));
231 if (m_didCapture) manageCapturedFiles();
232 m_didCapture = false;
236 void RecMonitor::slotRewind()
238 captureProcess->write("a", 1);
241 void RecMonitor::slotForward()
243 captureProcess->write("z", 1);
246 void RecMonitor::slotStopCapture()
249 switch (ui.device_selector->currentIndex()) {
251 captureProcess->write("\e", 2);
252 m_playAction->setIcon(m_playIcon);
256 captureProcess->write("q\n", 3);
257 QTimer::singleShot(1000, captureProcess, SLOT(kill()));
261 captureProcess->write("q\n", 3);
262 QTimer::singleShot(1000, captureProcess, SLOT(kill()));
269 void RecMonitor::slotStartCapture(bool play)
273 *captureProcess<<"dvgrab";
277 switch (m_recPanel->capture_format->currentItem()){
279 *captureProcess<<"--format"<<"dv1";
282 *captureProcess<<"--format"<<"dv2";
285 *captureProcess<<"--format"<<"hdv";
289 *captureProcess<<"--format"<<"raw";
293 if (KdenliveSettings::autosplit()) *captureProcess<<"--autosplit";
294 if (KdenliveSettings::timestamp()) *captureProcess<<"--timestamp";
295 *captureProcess<<"-i"<<"capture"<<"-";*/
298 QStringList captureArgs;
299 captureArgs<<"--format"<<"hdv"<<"-i"<<"capture"<<"-";
300 QStringList displayArgs;
302 displayArgs<<"-f"<<"mpegts"<<"-x"<<QString::number(ui.video_frame->width())<<"-y"<<QString::number(ui.video_frame->height())<<"-";
304 captureProcess->setStandardOutputProcess(displayProcess);
305 ui.video_frame->setScaledContents(false);
306 captureProcess->start("dvgrab",captureArgs);
307 displayProcess->start("ffplay", displayArgs);*/
310 if (captureProcess->state() != QProcess::NotRunning) {
311 if (ui.device_selector->currentIndex() == FIREWIRE) {
313 captureProcess->write("k", 1);
314 //captureProcess->write("\e", 2);
315 m_playAction->setIcon(m_playIcon);
318 captureProcess->write("p", 1);
319 m_playAction->setIcon(m_pauseIcon);
325 m_captureArgs.clear();
326 m_displayArgs.clear();
329 switch (ui.device_selector->currentIndex()) {
331 switch (KdenliveSettings::firewireformat()) {
334 m_captureArgs << "--format" << "raw";
335 m_displayArgs << "-f" << "dv";
339 m_captureArgs << "--format" << "dv1";
340 m_displayArgs << "-f" << "dv";
344 m_captureArgs << "--format" << "dv2";
345 m_displayArgs << "-f" << "dv";
349 m_captureArgs << "--format" << "hdv";
350 m_displayArgs << "-f" << "mpegts";
353 if (KdenliveSettings::firewireautosplit()) m_captureArgs << "--autosplit";
354 if (KdenliveSettings::firewiretimestamp()) m_captureArgs << "--timestamp";
355 m_captureArgs << "-i" << "capture" << "-";
356 m_displayArgs << "-x" << QString::number(ui.video_frame->width()) << "-y" << QString::number(ui.video_frame->height()) << "-";
358 captureProcess->setStandardOutputProcess(displayProcess);
359 captureProcess->setWorkingDirectory(KdenliveSettings::capturefolder());
360 kDebug() << "Capture: Running dvgrab " << m_captureArgs.join(" ");
361 captureProcess->start(KdenliveSettings::dvgrab_path(), m_captureArgs);
362 if (play) captureProcess->write(" ", 1);
363 m_discAction->setEnabled(true);
366 m_captureArgs << KdenliveSettings::video4capture().simplified().split(' ') << KdenliveSettings::video4encoding().simplified().split(' ') << "-f" << "mpegts" << "-vcodec" << "mpeg4" << "-acodec" << "mp2" << "-";
367 m_displayArgs << "-f" << "mpegts" << "-x" << QString::number(ui.video_frame->width()) << "-y" << QString::number(ui.video_frame->height()) << "-";
368 captureProcess->setStandardOutputProcess(displayProcess);
369 kDebug() << "Capture: Running ffmpeg " << m_captureArgs.join(" ");
370 captureProcess->start("ffmpeg", m_captureArgs);
376 if (ui.device_selector->currentIndex() != SCREENGRAB) {
377 kDebug() << "Capture: Running ffplay " << m_displayArgs.join(" ");
378 displayProcess->start("ffplay", m_displayArgs);
379 ui.video_frame->setText(i18n("Initialising..."));
381 // do something when starting screen grab
385 void RecMonitor::slotRecord()
387 if (captureProcess->state() == QProcess::NotRunning && ui.device_selector->currentIndex() == FIREWIRE) {
391 switch (ui.device_selector->currentIndex()) {
393 captureProcess->write("\e", 2);
394 m_playAction->setIcon(m_playIcon);
395 m_isCapturing = false;
397 m_recAction->setChecked(false);
400 captureProcess->terminate();
402 //m_isCapturing = false;
403 QTimer::singleShot(1000, this, SLOT(slotStartCapture()));
406 //captureProcess->write("q\n", 3);
407 captureProcess->terminate();
408 ui.video_frame->setText(i18n("Encoding captured video..."));
409 // in case ffmpeg doesn't exit with the 'q' command, kill it one second later
410 //QTimer::singleShot(1000, captureProcess, SLOT(kill()));
414 } else if (ui.device_selector->currentIndex() == FIREWIRE) {
415 m_isCapturing = true;
417 captureProcess->write("c\n", 3);
420 if (captureProcess->state() == QProcess::NotRunning) {
421 m_recAction->setChecked(true);
422 QString extension = "mp4";
423 if (ui.device_selector->currentIndex() == SCREENGRAB) extension = "ogv"; //KdenliveSettings::screengrabextension();
424 QString path = KdenliveSettings::capturefolder() + "/capture0000." + extension;
426 while (QFile::exists(path)) {
427 QString num = QString::number(i).rightJustified(4, '0', false);
428 path = KdenliveSettings::capturefolder() + "/capture" + num + '.' + extension;
432 m_captureFile = KUrl(path);
434 m_captureArgs.clear();
435 m_displayArgs.clear();
438 switch (ui.device_selector->currentIndex()) {
440 m_captureArgs << "--format" << "hdv" << "-i" << "capture" << "-";
441 m_displayArgs << "-f" << "mpegts" << "-x" << QString::number(ui.video_frame->width()) << "-y" << QString::number(ui.video_frame->height()) << "-";
442 captureProcess->setStandardOutputProcess(displayProcess);
443 kDebug() << "Capture: Running dvgrab " << m_captureArgs.join(" ");
444 captureProcess->start(KdenliveSettings::dvgrab_path(), m_captureArgs);
447 m_captureArgs << KdenliveSettings::video4capture().simplified().split(' ') << KdenliveSettings::video4encoding().simplified().split(' ') << "-vcodec" << "mpeg4" << "-acodec" << "mp2" << "-y" << m_captureFile.path() << "-f" << "mpegts" << "-vcodec" << "mpeg4" << "-acodec" << "mp2" << "-";
448 m_displayArgs << "-f" << "mpegts" << "-x" << QString::number(ui.video_frame->width()) << "-y" << QString::number(ui.video_frame->height()) << "-";
449 captureProcess->setStandardOutputProcess(displayProcess);
450 kDebug() << "Capture: Running ffmpeg " << m_captureArgs.join(" ");
451 captureProcess->start("ffmpeg", m_captureArgs);
454 switch (KdenliveSettings::rmd_capture_type()) {
456 // Full screen capture, nothing special to do
460 m_captureArgs << "-width" << QString::number(KdenliveSettings::rmd_width()) << "-height" << QString::number(KdenliveSettings::rmd_height());
461 if (!KdenliveSettings::rmd_follow_mouse()) {
462 m_captureArgs << "-x" << QString::number(KdenliveSettings::rmd_offsetx()) << "-y" << QString::number(KdenliveSettings::rmd_offsety());
464 m_captureArgs << "--follow-mouse";
465 if (KdenliveSettings::rmd_hide_frame()) m_captureArgs << "--no-frame";
469 m_isCapturing = true;
470 if (KdenliveSettings::rmd_capture_audio()) {
471 m_captureArgs << "-freq" << KdenliveSettings::rmd_freq();
472 m_captureArgs << "-channels" << QString::number(KdenliveSettings::rmd_audio_channels());
473 if (KdenliveSettings::rmd_use_jack()) {
474 m_captureArgs << "-use-jack" << KdenliveSettings::rmd_jackports();
475 if (KdenliveSettings::rmd_jack_buffer() > 0.0)
476 m_captureArgs << "-ring-buffer-size" << QString::number(KdenliveSettings::rmd_jack_buffer());
478 if (!KdenliveSettings::rmd_alsadevicename().isEmpty())
479 m_captureArgs << "-device" << KdenliveSettings::rmd_alsadevicename();
480 if (KdenliveSettings::rmd_alsa_buffer() > 0)
481 m_captureArgs << "-buffer-size" << QString::number(KdenliveSettings::rmd_alsa_buffer());
483 } else m_captureArgs << "--no-sound";
485 if (KdenliveSettings::rmd_fullshots()) m_captureArgs << "--full-shots";
486 m_captureArgs << "-workdir" << KdenliveSettings::currenttmpfolder();
487 m_captureArgs << "-fps" << QString::number(KdenliveSettings::rmd_fps()) << "-o" << m_captureFile.path();
488 captureProcess->start(KdenliveSettings::rmd_path(), m_captureArgs);
489 kDebug() << "// RecordMyDesktop params: " << m_captureArgs;
496 if (ui.device_selector->currentIndex() != SCREENGRAB) {
497 m_isCapturing = true;
498 kDebug() << "Capture: Running ffplay " << m_displayArgs.join(" ");
499 displayProcess->start("ffplay", m_displayArgs);
500 ui.video_frame->setText(i18n("Initialising..."));
504 displayProcess->kill();
505 //captureProcess->kill();
506 QTimer::singleShot(1000, this, SLOT(slotRecord()));
511 void RecMonitor::slotStartGrab(const QRect &rect) {
512 rgnGrab->deleteLater();
513 QApplication::restoreOverrideCursor();
515 if (rect.isNull()) return;
516 int width = rect.width();
517 int height = rect.height();
518 if (width % 2 != 0) width--;
519 if (height % 2 != 0) height--;
520 QString args = KdenliveSettings::screengrabcapture().replace("%size", QString::number(width) + "x" + QString::number(height)).replace("%offset", "+" + QString::number(rect.x()) + "," + QString::number(rect.y()));
521 if (KdenliveSettings::screengrabenableaudio()) {
522 // also capture audio
523 if (KdenliveSettings::useosscapture()) m_captureArgs << KdenliveSettings::screengrabosscapture().simplified().split(' ');
524 else m_captureArgs << KdenliveSettings::screengrabalsacapture2().simplified().split(' ');
526 m_captureArgs << args.simplified().split(' ') << KdenliveSettings::screengrabencoding().simplified().split(' ') << m_captureFile.path();
527 m_isCapturing = true;
528 ui.video_frame->setText(i18n("Capturing..."));
529 if (KdenliveSettings::screengrabenableaudio() && !KdenliveSettings::useosscapture()) {
530 QStringList alsaArgs = KdenliveSettings::screengrabalsacapture().simplified().split(' ');
531 alsaProcess->setStandardOutputProcess(captureProcess);
532 kDebug() << "Capture: Running arecord " << alsaArgs.join(" ");
533 alsaProcess->start("arecord", alsaArgs);
535 kDebug() << "Capture: Running ffmpeg " << m_captureArgs.join(" ");
536 captureProcess->start("ffmpeg", m_captureArgs);
539 void RecMonitor::slotProcessStatus(QProcess::ProcessState status)
541 if (status == QProcess::NotRunning) {
542 displayProcess->kill();
543 if (m_isCapturing && ui.device_selector->currentIndex() != FIREWIRE)
544 if (ui.autoaddbox->isChecked() && QFile::exists(m_captureFile.path())) emit addProjectClip(m_captureFile);
545 if (ui.device_selector->currentIndex() == FIREWIRE) {
546 m_discAction->setIcon(KIcon("network-connect"));
547 m_discAction->setText(i18n("Connect"));
548 m_playAction->setEnabled(false);
549 m_rewAction->setEnabled(false);
550 m_fwdAction->setEnabled(false);
551 m_recAction->setEnabled(false);
554 m_playAction->setIcon(m_playIcon);
555 m_recAction->setChecked(false);
556 m_stopAction->setEnabled(false);
557 ui.device_selector->setEnabled(true);
558 if (captureProcess && captureProcess->exitStatus() == QProcess::CrashExit) {
559 ui.video_frame->setText(i18n("Capture crashed, please check your parameters"));
561 if (ui.device_selector->currentIndex() != SCREENGRAB) ui.video_frame->setText(i18n("Not connected"));
562 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())));
564 m_isCapturing = false;
566 if (ui.device_selector->currentIndex() != SCREENGRAB) m_stopAction->setEnabled(true);
567 ui.device_selector->setEnabled(false);
571 void RecMonitor::manageCapturedFiles()
574 switch (KdenliveSettings::firewireformat()) {
586 QDir dir(KdenliveSettings::capturefolder());
588 filters << "capture*" + extension;
589 const QStringList result = dir.entryList(filters, QDir::Files, QDir::Time);
590 KUrl::List capturedFiles;
591 foreach(const QString &name, result) {
592 KUrl url = KUrl(dir.filePath(name));
593 if (KIO::NetAccess::exists(url, KIO::NetAccess::SourceSide, this)) {
594 KFileItem file(KFileItem::Unknown, KFileItem::Unknown, url, true);
595 if (file.time(KFileItem::ModificationTime) > m_captureTime) capturedFiles.append(url);
598 kDebug() << "Found : " << capturedFiles.count() << " new capture files";
599 kDebug() << capturedFiles;
601 if (capturedFiles.count() > 0) {
602 ManageCapturesDialog *d = new ManageCapturesDialog(capturedFiles, this);
603 if (d->exec() == QDialog::Accepted) {
604 capturedFiles = d->importFiles();
605 foreach(const KUrl &url, capturedFiles) {
606 emit addProjectClip(url);
614 void RecMonitor::mousePressEvent(QMouseEvent * /*event*/)
619 void RecMonitor::activateRecMonitor()
621 //if (!m_isActive) m_monitorManager->activateRecMonitor(m_name);
624 void RecMonitor::stop()
630 void RecMonitor::start()
636 void RecMonitor::refreshRecMonitor(bool visible)
639 //if (!m_isActive) m_monitorManager->activateRecMonitor(m_name);
644 void RecMonitor::slotPlay()
647 //if (!m_isActive) m_monitorManager->activateRecMonitor(m_name);
652 #include "recmonitor.moc"