]> git.sesse.net Git - kdenlive/commitdiff
Use selected SDL video driver for record monitor
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 5 Oct 2008 14:17:20 +0000 (14:17 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 5 Oct 2008 14:17:20 +0000 (14:17 +0000)
svn path=/branches/KDE4/; revision=2434

src/mainwindow.cpp
src/recmonitor.cpp

index 80b52314b1dcf46ba61e659eba007c6d86cdbc3e..6d083c4274d195ce8fdb439d18d58e06ed1271f0 100644 (file)
@@ -224,9 +224,9 @@ MainWindow::MainWindow(QWidget *parent)
     m_customEffectsMenu = static_cast<QMenu*>(factory()->container("custom_effects_menu", this));
     effects = customEffects.effectNames();
     if (effects.isEmpty()) {
-       action = new QAction(i18n("No Custom Effects"), this);
-       action->setEnabled(false);
-       m_customEffectsMenu->addAction(action);
+        action = new QAction(i18n("No Custom Effects"), this);
+        action->setEnabled(false);
+        m_customEffectsMenu->addAction(action);
     }
     foreach(const QString &name, effects) {
         action = new QAction(name, this);
@@ -346,9 +346,9 @@ void MainWindow::slotReloadEffects() {
     const QStringList effects = customEffects.effectNames();
     QAction *action;
     if (effects.isEmpty()) {
-       action = new QAction(i18n("No Custom Effects"), this);
-       action->setEnabled(false);
-       m_customEffectsMenu->addAction(action);
+        action = new QAction(i18n("No Custom Effects"), this);
+        action->setEnabled(false);
+        m_customEffectsMenu->addAction(action);
     }
     foreach(const QString &name, effects) {
         action = new QAction(name, this);
index a9bcc382218e132be3ef48c2650cf5dfc2f0efa6..b8d6ce713ba9668a57b833b3fb1f24383b28f3a1 100644 (file)
@@ -90,6 +90,16 @@ RecMonitor::RecMonitor(QString name, QWidget *parent)
 
     QStringList env = QProcess::systemEnvironment();
     env << "SDL_WINDOWID=" + QString::number(ui.video_frame->winId());
+
+    QString videoDriver = KdenliveSettings::videodrivername();
+    if (!videoDriver.isEmpty()) {
+        if (videoDriver == "x11_noaccel") {
+            env << "SDL_VIDEO_YUV_HWACCEL=0";
+            env << "SDL_VIDEODRIVER=x11";
+        } else env << "SDL_VIDEODRIVER=" + videoDriver;
+    }
+    setenv("SDL_VIDEO_ALLOW_SCREENSAVER", "1", 1);
+
     displayProcess->setEnvironment(env);
 
     if (KdenliveSettings::video4capture().isEmpty()) {