]> git.sesse.net Git - kdenlive/blob - src/recmonitor.cpp
Use selected SDL video driver for record monitor
[kdenlive] / src / recmonitor.cpp
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 #include <QMouseEvent>
22 #include <QStylePainter>
23 #include <QMenu>
24 #include <QToolButton>
25 #include <QFile>
26 #include <QDir>
27 #include <QDesktopWidget>
28
29 #include <KDebug>
30 #include <KLocale>
31 #include <KStandardDirs>
32 #include <KComboBox>
33 #include <KIO/NetAccess>
34 #include <KFileItem>
35
36 #include "gentime.h"
37 #include "kdenlivesettings.h"
38 #include "managecapturesdialog.h"
39 #include "recmonitor.h"
40
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) {
43     ui.setupUi(this);
44
45     ui.video_frame->setAttribute(Qt::WA_PaintOnScreen);
46     ui.device_selector->setCurrentIndex(KdenliveSettings::defaultcapture());
47     connect(ui.device_selector, SIGNAL(currentIndexChanged(int)), this, SLOT(slotVideoDeviceChanged(int)));
48
49
50
51     QToolBar *toolbar = new QToolBar(name, this);
52     QHBoxLayout *layout = new QHBoxLayout;
53     layout->setContentsMargins(0, 0, 0, 0);
54     m_playIcon = KIcon("media-playback-start");
55     m_pauseIcon = KIcon("media-playback-pause");
56
57     m_discAction = toolbar->addAction(KIcon("network-connect"), i18n("Connect"));
58     connect(m_discAction, SIGNAL(triggered()), this, SLOT(slotDisconnect()));
59
60     m_rewAction = toolbar->addAction(KIcon("media-seek-backward"), i18n("Rewind"));
61     connect(m_rewAction, SIGNAL(triggered()), this, SLOT(slotRewind()));
62
63     m_playAction = toolbar->addAction(m_playIcon, i18n("Play"));
64     connect(m_playAction, SIGNAL(triggered()), this, SLOT(slotStartCapture()));
65
66     m_stopAction = toolbar->addAction(KIcon("media-playback-stop"), i18n("Stop"));
67     connect(m_stopAction, SIGNAL(triggered()), this, SLOT(slotStopCapture()));
68     m_stopAction->setEnabled(false);
69     m_fwdAction = toolbar->addAction(KIcon("media-seek-forward"), i18n("Forward"));
70     connect(m_fwdAction, SIGNAL(triggered()), this, SLOT(slotForward()));
71
72     m_recAction = toolbar->addAction(KIcon("media-record"), i18n("Record"));
73     connect(m_recAction, SIGNAL(triggered()), this, SLOT(slotRecord()));
74     m_recAction->setCheckable(true);
75
76     toolbar->addSeparator();
77
78     QAction *configAction = toolbar->addAction(KIcon("configure"), i18n("Configure"));
79     connect(configAction, SIGNAL(triggered()), this, SLOT(slotConfigure()));
80     configAction->setCheckable(false);
81
82     layout->addWidget(toolbar);
83     ui.control_frame_firewire->setLayout(layout);
84
85     slotVideoDeviceChanged(ui.device_selector->currentIndex());
86     displayProcess = new QProcess;
87     captureProcess = new QProcess;
88
89     connect(captureProcess, SIGNAL(stateChanged(QProcess::ProcessState)), this, SLOT(slotProcessStatus(QProcess::ProcessState)));
90
91     QStringList env = QProcess::systemEnvironment();
92     env << "SDL_WINDOWID=" + QString::number(ui.video_frame->winId());
93
94     QString videoDriver = KdenliveSettings::videodrivername();
95     if (!videoDriver.isEmpty()) {
96         if (videoDriver == "x11_noaccel") {
97             env << "SDL_VIDEO_YUV_HWACCEL=0";
98             env << "SDL_VIDEODRIVER=x11";
99         } else env << "SDL_VIDEODRIVER=" + videoDriver;
100     }
101     setenv("SDL_VIDEO_ALLOW_SCREENSAVER", "1", 1);
102
103     displayProcess->setEnvironment(env);
104
105     if (KdenliveSettings::video4capture().isEmpty()) {
106         QString captureCommand;
107         if (!KdenliveSettings::video4adevice().isEmpty()) captureCommand = "-f " + KdenliveSettings::video4aformat() + " -i " + KdenliveSettings::video4adevice();
108
109         captureCommand +=  " -f " + KdenliveSettings::video4vformat() + " -s " + KdenliveSettings::video4size() + " -r " + QString::number(KdenliveSettings::video4rate()) + " -i " + KdenliveSettings::video4vdevice() + " -f " + KdenliveSettings::video4vencoding();
110         KdenliveSettings::setVideo4capture(captureCommand);
111     }
112
113     if (KdenliveSettings::video4playback().isEmpty()) {
114         QString playbackCommand;
115         playbackCommand =  "-f " + KdenliveSettings::video4vencoding();
116         KdenliveSettings::setVideo4playback(playbackCommand);
117     }
118     kDebug() << "/////// BUILDING MONITOR, ID: " << ui.video_frame->winId();
119 }
120
121 QString RecMonitor::name() const {
122     return m_name;
123 }
124
125 void RecMonitor::slotConfigure() {
126     emit showConfigDialog(4, ui.device_selector->currentIndex());
127 }
128
129 void RecMonitor::slotVideoDeviceChanged(int ix) {
130     switch (ix) {
131     case SCREENGRAB:
132         m_discAction->setEnabled(false);
133         m_rewAction->setEnabled(false);
134         m_fwdAction->setEnabled(false);
135         m_recAction->setEnabled(true);
136         m_stopAction->setEnabled(false);
137         m_playAction->setEnabled(false);
138         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())));
139         //ui.video_frame->setText(i18n("Press record button\nto start screen capture"));
140         break;
141     case VIDEO4LINUX:
142         m_discAction->setEnabled(false);
143         m_rewAction->setEnabled(false);
144         m_fwdAction->setEnabled(false);
145         m_recAction->setEnabled(true);
146         m_stopAction->setEnabled(false);
147         m_playAction->setEnabled(true);
148         checkDeviceAvailability();
149         break;
150     default: // FIREWIRE
151         m_discAction->setEnabled(true);
152         m_recAction->setEnabled(false);
153         m_stopAction->setEnabled(false);
154         m_playAction->setEnabled(false);
155         m_rewAction->setEnabled(false);
156         m_fwdAction->setEnabled(false);
157         //ui.video_frame->setText(i18n("Plug your camcorder and\npress connect button\nto initialize connection"));
158         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())));
159         break;
160     }
161 }
162
163 QPixmap RecMonitor::mergeSideBySide(const QPixmap& pix, const QString txt) {
164     QPainter p;
165     QRect r = p.fontMetrics().boundingRect(QRect(0, 0, ui.video_frame->width(), ui.video_frame->height()), Qt::AlignLeft, txt);
166     int strWidth = r.width();
167     int strHeight = r.height();
168     int pixWidth = pix.width();
169     int pixHeight = pix.height();
170     QPixmap res(strWidth + 8 + pixWidth, qMax(strHeight, pixHeight));
171     res.fill(Qt::transparent);
172     p.begin(&res);
173     p.drawPixmap(0, 0, pix);
174     p.drawText(QRect(pixWidth + 8, 0, strWidth, strHeight), 0, txt);
175     p.end();
176     return res;
177 }
178
179
180 void RecMonitor::checkDeviceAvailability() {
181     if (!KIO::NetAccess::exists(KUrl(KdenliveSettings::video4vdevice()), KIO::NetAccess::SourceSide , this)) {
182         m_playAction->setEnabled(false);
183         m_recAction->setEnabled(false);
184         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())));
185         //ui.video_frame->setText(i18n("Cannot read from device %1\nPlease check drivers and access rights.", KdenliveSettings::video4vdevice()));
186     } else //ui.video_frame->setText(i18n("Press play or record button\nto start video capture"));
187         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())));
188 }
189
190 void RecMonitor::slotDisconnect() {
191     if (captureProcess->state() == QProcess::NotRunning) {
192         m_captureTime = KDateTime::currentLocalDateTime();
193         kDebug() << "CURRENT TIME: " << m_captureTime.toString();
194         m_didCapture = false;
195         slotStartCapture(false);
196         m_discAction->setIcon(KIcon("network-disconnect"));
197         m_discAction->setText(i18n("Disonnect"));
198         m_recAction->setEnabled(true);
199         m_stopAction->setEnabled(true);
200         m_playAction->setEnabled(true);
201         m_rewAction->setEnabled(true);
202         m_fwdAction->setEnabled(true);
203     } else {
204         captureProcess->write("q", 1);
205         QTimer::singleShot(1000, captureProcess, SLOT(kill()));
206         if (m_didCapture) manageCapturedFiles();
207         m_didCapture = false;
208     }
209 }
210
211 void RecMonitor::slotRewind() {
212     captureProcess->write("a", 1);
213 }
214
215 void RecMonitor::slotForward() {
216     captureProcess->write("z", 1);
217 }
218
219 void RecMonitor::slotStopCapture() {
220     // stop capture
221     switch (ui.device_selector->currentIndex()) {
222     case FIREWIRE:
223         captureProcess->write("\e", 2);
224         m_playAction->setIcon(m_playIcon);
225         m_isPlaying = false;
226         break;
227     case VIDEO4LINUX:
228         captureProcess->write("q\n", 3);
229         QTimer::singleShot(1000, captureProcess, SLOT(kill()));
230
231         break;
232     case SCREENGRAB:
233         captureProcess->write("q\n", 3);
234         QTimer::singleShot(1000, captureProcess, SLOT(kill()));
235         break;
236     default:
237         break;
238     }
239 }
240
241 void RecMonitor::slotStartCapture(bool play) {
242
243     /*
244     *captureProcess<<"dvgrab";
245
246     bool isHdv = false;
247
248     switch (m_recPanel->capture_format->currentItem()){
249         case 0:
250       *captureProcess<<"--format"<<"dv1";
251      break;
252         case 1:
253       *captureProcess<<"--format"<<"dv2";
254      break;
255         case 3:
256       *captureProcess<<"--format"<<"hdv";
257      isHdv = true;
258      break;
259         default:
260             *captureProcess<<"--format"<<"raw";
261      break;
262     }
263
264     if (KdenliveSettings::autosplit()) *captureProcess<<"--autosplit";
265     if (KdenliveSettings::timestamp()) *captureProcess<<"--timestamp";
266     *captureProcess<<"-i"<<"capture"<<"-";*/
267
268     /*
269         QStringList captureArgs;
270         captureArgs<<"--format"<<"hdv"<<"-i"<<"capture"<<"-";
271         QStringList displayArgs;
272
273         displayArgs<<"-f"<<"mpegts"<<"-x"<<QString::number(ui.video_frame->width())<<"-y"<<QString::number(ui.video_frame->height())<<"-";
274
275         captureProcess->setStandardOutputProcess(displayProcess);
276         ui.video_frame->setScaledContents(false);
277         captureProcess->start("dvgrab",captureArgs);
278         displayProcess->start("ffplay",  displayArgs);*/
279
280
281     if (captureProcess->state() != QProcess::NotRunning) {
282         if (ui.device_selector->currentIndex() == FIREWIRE) {
283             if (m_isPlaying) {
284                 captureProcess->write("k", 1);
285                 //captureProcess->write("\e", 2);
286                 m_playAction->setIcon(m_playIcon);
287                 m_isPlaying = false;
288             } else {
289                 captureProcess->write("p", 1);
290                 m_playAction->setIcon(m_pauseIcon);
291                 m_isPlaying = true;
292             }
293         }
294         return;
295     }
296     m_captureArgs.clear();
297     m_displayArgs.clear();
298     m_isPlaying = false;
299
300     switch (ui.device_selector->currentIndex()) {
301     case FIREWIRE:
302         switch (KdenliveSettings::firewireformat()) {
303         case 0:
304             // RAW DV CAPTURE
305             m_captureArgs << "--format" << "raw";
306             m_displayArgs << "-f" << "dv";
307             break;
308         case 1:
309             // DV type 1
310             m_captureArgs << "--format" << "dv1";
311             m_displayArgs << "-f" << "dv";
312             break;
313         case 2:
314             // DV type 2
315             m_captureArgs << "--format" << "dv2";
316             m_displayArgs << "-f" << "dv";
317             break;
318         case 3:
319             // HDV CAPTURE
320             m_captureArgs << "--format" << "hdv";
321             m_displayArgs << "-f" << "mpegts";
322             break;
323         }
324         if (KdenliveSettings::firewireautosplit()) m_captureArgs << "--autosplit";
325         if (KdenliveSettings::firewiretimestamp()) m_captureArgs << "--timestamp";
326         m_captureArgs << "-i" << "capture" << "-";
327         m_displayArgs << "-x" << QString::number(ui.video_frame->width()) << "-y" << QString::number(ui.video_frame->height()) << "-";
328
329         captureProcess->setStandardOutputProcess(displayProcess);
330         captureProcess->setWorkingDirectory(KdenliveSettings::capturefolder());
331         captureProcess->start("dvgrab", m_captureArgs);
332         if (play) captureProcess->write(" ", 1);
333         m_discAction->setEnabled(true);
334         break;
335     case VIDEO4LINUX:
336         m_captureArgs << KdenliveSettings::video4capture().simplified().split(' ') << "-";
337         m_displayArgs << KdenliveSettings::video4playback().simplified().split(' ') << "-x" << QString::number(ui.video_frame->width()) << "-y" << QString::number(ui.video_frame->height()) << "-";
338         captureProcess->setStandardOutputProcess(displayProcess);
339         captureProcess->start("ffmpeg", m_captureArgs);
340         break;
341     default:
342         break;
343     }
344
345     if (ui.device_selector->currentIndex() != SCREENGRAB) {
346         displayProcess->start("ffplay", m_displayArgs);
347         ui.video_frame->setText(i18n("Initialising..."));
348     } else {
349         // do something when starting screen grab
350     }
351 }
352
353 void RecMonitor::slotRecord() {
354     if (captureProcess->state() == QProcess::NotRunning && ui.device_selector->currentIndex() == FIREWIRE) {
355         slotStartCapture();
356     }
357     if (m_isCapturing) {
358         switch (ui.device_selector->currentIndex()) {
359         case FIREWIRE:
360             captureProcess->write("\e", 2);
361             m_playAction->setIcon(m_playIcon);
362             m_isCapturing = false;
363             m_isPlaying = false;
364             m_recAction->setChecked(false);
365             break;
366         case VIDEO4LINUX:
367             slotStopCapture();
368             //m_isCapturing = false;
369             QTimer::singleShot(1000, this, SLOT(slotStartCapture()));
370             break;
371         case SCREENGRAB:
372             captureProcess->write("q\n", 3);
373             // in case ffmpeg doesn't exit with the 'q' command, kill it one second later
374             QTimer::singleShot(1000, captureProcess, SLOT(kill()));
375             break;
376         }
377         return;
378     } else if (ui.device_selector->currentIndex() == FIREWIRE) {
379         m_isCapturing = true;
380         m_didCapture = true;
381         captureProcess->write("c\n", 3);
382         return;
383     }
384     if (captureProcess->state() == QProcess::NotRunning) {
385         m_recAction->setChecked(true);
386         QString extension = "mpg";
387         if (ui.device_selector->currentIndex() == SCREENGRAB) extension = KdenliveSettings::screengrabextension();
388         QString path = KdenliveSettings::capturefolder() + "/capture0000." + extension;
389         int i = 1;
390         while (QFile::exists(path)) {
391             QString num = QString::number(i).rightJustified(4, '0', false);
392             path = KdenliveSettings::capturefolder() + "/capture" + num + "." + extension;
393             i++;
394         }
395
396         m_captureFile = KUrl(path);
397
398         m_captureArgs.clear();
399         m_displayArgs.clear();
400         QString args;
401
402         switch (ui.device_selector->currentIndex()) {
403         case FIREWIRE:
404             m_captureArgs << "--format" << "hdv" << "-i" << "capture" << "-";
405             m_displayArgs << "-f" << "mpegts" << "-x" << QString::number(ui.video_frame->width()) << "-y" << QString::number(ui.video_frame->height()) << "-";
406             captureProcess->setStandardOutputProcess(displayProcess);
407             captureProcess->start("dvgrab", m_captureArgs);
408             break;
409         case VIDEO4LINUX:
410             m_captureArgs << KdenliveSettings::video4capture().simplified().split(' ') << "-y" << m_captureFile.path() << "-f" << KdenliveSettings::video4vencoding() << "-";
411             m_displayArgs << KdenliveSettings::video4playback().simplified().split(' ') << "-x" << QString::number(ui.video_frame->width()) << "-y" << QString::number(ui.video_frame->height()) << "-";
412             captureProcess->setStandardOutputProcess(displayProcess);
413             captureProcess->start("ffmpeg", m_captureArgs);
414             break;
415         case SCREENGRAB:
416             if (KdenliveSettings::fullscreengrab()) {
417                 const QRect rect = QApplication::desktop()->screenGeometry();
418                 args = KdenliveSettings::screengrabcapture().replace("%size", QString::number(rect.width()) + "x" + QString::number(rect.height())).replace("%offset", QString());
419                 kDebug() << "// capture params: " << args;
420                 if (KdenliveSettings::screengrabenableaudio()) {
421                     // also capture audio
422                     m_captureArgs << KdenliveSettings::screengrabaudiocapture().simplified().split(' ');
423                 }
424                 m_captureArgs << args.simplified().split(' ') << KdenliveSettings::screengrabencoding().simplified().split(' ') << m_captureFile.path();
425                 ui.video_frame->setText(i18n("Capturing..."));
426                 m_isCapturing = true;
427                 captureProcess->start("ffmpeg", m_captureArgs);
428             } else {
429                 ui.video_frame->setText(i18n("Select region..."));
430                 rgnGrab = new RegionGrabber();
431                 connect(rgnGrab, SIGNAL(regionGrabbed(const QRect&)), SLOT(slotStartGrab(const QRect &)));
432             }
433             break;
434         default:
435             break;
436         }
437
438         //ui.video_frame->setScaledContents(false);
439         if (ui.device_selector->currentIndex() != SCREENGRAB) {
440             m_isCapturing = true;
441             displayProcess->start("ffplay", m_displayArgs);
442             ui.video_frame->setText(i18n("Initialising..."));
443         }
444     } else {
445         // stop capture
446         displayProcess->kill();
447         captureProcess->kill();
448         QTimer::singleShot(1000, this, SLOT(slotRecord()));
449     }
450 }
451
452 void RecMonitor::slotStartGrab(const QRect &rect) {
453     rgnGrab->deleteLater();
454     QApplication::restoreOverrideCursor();
455     show();
456     if (rect.isNull()) return;
457     int width = rect.width();
458     int height = rect.height();
459     if (width % 2 != 0) width--;
460     if (height % 2 != 0) height--;
461     QString args = KdenliveSettings::screengrabcapture().replace("%size", QString::number(width) + "x" + QString::number(height)).replace("%offset", "+" + QString::number(rect.x()) + "," + QString::number(rect.y()));
462     kDebug() << "// capture params: " << args;
463     if (KdenliveSettings::screengrabenableaudio()) {
464         // also capture audio
465         m_captureArgs << KdenliveSettings::screengrabaudiocapture().simplified().split(' ');
466     }
467     m_captureArgs << args.simplified().split(' ') << KdenliveSettings::screengrabencoding().simplified().split(' ') << m_captureFile.path();
468     m_isCapturing = true;
469     ui.video_frame->setText(i18n("Capturing..."));
470     captureProcess->start("ffmpeg", m_captureArgs);
471 }
472
473 void RecMonitor::slotProcessStatus(QProcess::ProcessState status) {
474     if (status == QProcess::NotRunning) {
475         displayProcess->kill();
476         if (m_isCapturing && ui.device_selector->currentIndex() != FIREWIRE)
477             if (ui.autoaddbox->isChecked() && QFile::exists(m_captureFile.path())) emit addProjectClip(m_captureFile);
478         if (ui.device_selector->currentIndex() == FIREWIRE) {
479             m_discAction->setIcon(KIcon("network-connect"));
480             m_discAction->setText(i18n("Connect"));
481             m_playAction->setEnabled(false);
482             m_rewAction->setEnabled(false);
483             m_fwdAction->setEnabled(false);
484             m_recAction->setEnabled(false);
485         }
486         m_isPlaying = false;
487         m_playAction->setIcon(m_playIcon);
488         m_recAction->setChecked(false);
489         m_stopAction->setEnabled(false);
490         ui.device_selector->setEnabled(true);
491         if (captureProcess && captureProcess->exitStatus() == QProcess::CrashExit) {
492             ui.video_frame->setText(i18n("Capture crashed, please check your parameters"));
493         } else {
494             ui.video_frame->setText(i18n("Not connected"));
495         }
496         m_isCapturing = false;
497     } else {
498         if (ui.device_selector->currentIndex() != SCREENGRAB) m_stopAction->setEnabled(true);
499         ui.device_selector->setEnabled(false);
500     }
501 }
502
503 void RecMonitor::manageCapturedFiles() {
504     QString extension;
505     switch (KdenliveSettings::firewireformat()) {
506     case 0:
507         extension = ".dv";
508         break;
509     case 1:
510     case 2:
511         extension = ".avi";
512         break;
513     case 3:
514         extension = ".m2t";
515         break;
516     }
517     QDir dir(KdenliveSettings::capturefolder());
518     QStringList filters;
519     filters << "capture*" + extension;
520     const QStringList result = dir.entryList(filters, QDir::Files, QDir::Time);
521     KUrl::List capturedFiles;
522     foreach(QString name, result) {
523         KUrl url = KUrl(dir.filePath(name));
524         if (KIO::NetAccess::exists(url, KIO::NetAccess::SourceSide, this)) {
525             KFileItem file(KFileItem::Unknown, KFileItem::Unknown, url, true);
526             if (file.time(KFileItem::ModificationTime) > m_captureTime) capturedFiles.append(url);
527         }
528     }
529     kDebug() << "Found : " << capturedFiles.count() << " new capture files";
530     kDebug() << capturedFiles;
531
532     if (capturedFiles.count() > 0) {
533         ManageCapturesDialog *d = new ManageCapturesDialog(capturedFiles, this);
534         if (d->exec() == QDialog::Accepted) {
535             capturedFiles = d->importFiles();
536             foreach(KUrl url, capturedFiles) {
537                 emit addProjectClip(url);
538             }
539         }
540         delete d;
541     }
542 }
543
544 // virtual
545 void RecMonitor::mousePressEvent(QMouseEvent * event) {
546     slotPlay();
547 }
548
549 void RecMonitor::activateRecMonitor() {
550     //if (!m_isActive) m_monitorManager->activateRecMonitor(m_name);
551 }
552
553 void RecMonitor::stop() {
554     m_isActive = false;
555
556 }
557
558 void RecMonitor::start() {
559     m_isActive = true;
560
561 }
562
563 void RecMonitor::refreshRecMonitor(bool visible) {
564     if (visible) {
565         //if (!m_isActive) m_monitorManager->activateRecMonitor(m_name);
566
567     }
568 }
569
570 void RecMonitor::slotPlay() {
571
572     //if (!m_isActive) m_monitorManager->activateRecMonitor(m_name);
573
574 }
575
576
577 #include "recmonitor.moc"