+void RecMonitor::showWarningMessage(const QString &text, bool logAction)
+{
+#if KDE_IS_VERSION(4,7,0)
+ m_infoMessage->setText(text);
+ m_infoMessage->setMessageType(KMessageWidget::Warning);
+ if (logAction) {
+ QAction *manualAction = new QAction(i18n("Show log"), this);
+ connect(manualAction, SIGNAL(triggered()), this, SLOT(slotShowLog()));
+ m_infoMessage->addAction(manualAction);
+ }
+#if KDE_IS_VERSION(4,10,0)
+ if (isVisible())
+ m_infoMessage->animatedShow();
+#else
+ QTimer::singleShot(0, m_infoMessage, SLOT(animatedShow()));
+#endif
+#else
+ if (!logAction) {
+ video_frame->setPixmap(mergeSideBySide(KIcon("dialog-warning").pixmap(QSize(50, 50)), text));
+
+ }
+ else {
+ video_frame->setText(QString("<qt>" + text + "<br><a href=\"http://kde.org\">" + i18n("Show log") + "</a>"));
+ connect(video_frame, SIGNAL(linkActivated(QString)), this, SLOT(slotShowLog()));
+ }
+#endif
+}
+
+const QString RecMonitor::getV4lXmlPlaylist(const MltVideoProfile &profile, bool *isXml)
+{
+ QString playlist;
+ if (rec_video->isChecked() && rec_audio->isChecked()) {
+ // We want to capture audio and video, use xml playlist
+ *isXml = true;
+ playlist = QString("<mlt title=\"capture\" LC_NUMERIC=\"C\"><profile description=\"v4l\" width=\"%1\" height=\"%2\" progressive=\"%3\" sample_aspect_num=\"%4\" sample_aspect_den=\"%5\" display_aspect_num=\"%6\" display_aspect_den=\"%7\" frame_rate_num=\"%8\" frame_rate_den=\"%9\" colorspace=\"%10\"/>").arg(profile.width).arg(profile.height).arg(profile.progressive).arg(profile.sample_aspect_num).arg(profile.sample_aspect_den).arg(profile.display_aspect_num).arg(profile.display_aspect_den).arg(profile.frame_rate_num).arg(profile.frame_rate_den).arg(profile.colorspace);