]> git.sesse.net Git - kdenlive/commitdiff
Disable old LADSPA xml effects
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Tue, 17 May 2011 16:02:00 +0000 (16:02 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Tue, 17 May 2011 16:02:00 +0000 (16:02 +0000)
svn path=/trunk/kdenlive/; revision=5594

src/customtrackview.cpp
src/initeffects.cpp
src/trackview.cpp

index 1ce7d165bb88db66b84e3e32ec821ff43c49ad68..3d0d67e3b6caadd299fb9b1389a5f3a521878641 100644 (file)
@@ -1706,11 +1706,14 @@ void CustomTrackView::slotAddGroupEffect(QDomElement effect, AbstractGroupItem *
                 continue;
             }
             item->initEffect(effect);
+
+            // Old LADSPA filter, deprecated
+            /*
             if (effect.attribute("tag") == "ladspa") {
                 QString ladpsaFile = m_document->getLadspaFile();
                 initEffects::ladspaEffectFile(ladpsaFile, effect.attribute("ladspaid").toInt(), getLadspaParams(effect));
                 effect.setAttribute("src", ladpsaFile);
-            }
+            }*/
             new AddEffectCommand(this, m_document->tracksCount() - item->track(), item->startPos(), effect, true, effectCommand);
             count++;
         }
@@ -1783,12 +1786,13 @@ void CustomTrackView::slotAddEffect(QDomElement effect, GenTime pos, int track)
             } else {
                 item->initEffect(effect);
             }
-
-            if (effect.attribute("tag") == "ladspa") {
+            // Old LADSPA filter, deprecated
+            /* if (effect.attribute("tag") == "ladspa") {
                 QString ladpsaFile = m_document->getLadspaFile();
                 initEffects::ladspaEffectFile(ladpsaFile, effect.attribute("ladspaid").toInt(), getLadspaParams(effect));
                 effect.setAttribute("src", ladpsaFile);
             }
+            */
             new AddEffectCommand(this, m_document->tracksCount() - item->track(), item->startPos(), effect, true, effectCommand);
         }
     }
@@ -1875,10 +1879,11 @@ void CustomTrackView::updateEffect(int track, GenTime pos, QDomElement insertedE
     if (pos < GenTime()) {
         // editing a track effect
         EffectsParameterList effectParams = getEffectArgs(effect);
-        if (effect.attribute("tag") == "ladspa") {
+        // Old LADSPA filter, deprecated
+        /*if (effect.attribute("tag") == "ladspa") {
             // Update the ladspa affect file
             initEffects::ladspaEffectFile(effect.attribute("src"), effect.attribute("ladspaid").toInt(), getLadspaParams(effect));
-        }
+        }*/
         // check if we are trying to reset a keyframe effect
         /*if (effectParams.hasParam("keyframes") && effectParams.paramValue("keyframes").isEmpty()) {
             clip->initEffect(effect);
@@ -1914,10 +1919,11 @@ void CustomTrackView::updateEffect(int track, GenTime pos, QDomElement insertedE
         }
 
         EffectsParameterList effectParams = getEffectArgs(effect);
-        if (effect.attribute("tag") == "ladspa") {
+        // Old LADSPA filter, deprecated
+        /*if (effect.attribute("tag") == "ladspa") {
             // Update the ladspa affect file
             initEffects::ladspaEffectFile(effect.attribute("src"), effect.attribute("ladspaid").toInt(), getLadspaParams(effect));
-        }
+        }*/
         // check if we are trying to reset a keyframe effect
         if (effectParams.hasParam("keyframes") && effectParams.paramValue("keyframes").isEmpty()) {
             clip->initEffect(effect);
index 0da445dd76c72233b077da59763bec654689cb8d..50b6224ae7d58be3760936aeb06640a4fdc82daf 100644 (file)
@@ -185,6 +185,8 @@ Mlt::Repository *initEffects::parseEffectFiles()
     // Fill transitions list.
     fillTransitionsList(repository, &MainWindow::transitions, transitionsItemList);
 
+    //WARNING: deprecated, we now use MLT to detect LADSPA filters
+    /*
     // Set the directories to look into for ladspa plugins.
     KGlobal::dirs()->addResourceType("ladspa_plugin", 0, "lib/ladspa");
     KGlobal::dirs()->addResourceDir("ladspa_plugin", "/usr/lib/ladspa");
@@ -192,7 +194,7 @@ Mlt::Repository *initEffects::parseEffectFiles()
     KGlobal::dirs()->addResourceDir("ladspa_plugin", "/opt/lib/ladspa");
     KGlobal::dirs()->addResourceDir("ladspa_plugin", "/opt/local/lib/ladspa");
     KGlobal::dirs()->addResourceDir("ladspa_plugin", "/usr/lib64/ladspa");
-    KGlobal::dirs()->addResourceDir("ladspa_plugin", "/usr/local/lib64/ladspa");
+    KGlobal::dirs()->addResourceDir("ladspa_plugin", "/usr/local/lib64/ladspa");*/
 
     // Set the directories to look into for effects.
     QStringList direc = KGlobal::dirs()->findDirs("appdata", "effects");
@@ -354,8 +356,10 @@ void initEffects::parseEffectFile(EffectsList *customEffectList, EffectsList *au
 
         bool ladspaOk = true;
         if (tag == "ladspa") {
-            QString library = documentElement.attribute("library", QString());
-            if (KStandardDirs::locate("ladspa_plugin", library).isEmpty()) ladspaOk = false;
+            //WARNING: old LADSPA xml effects are deprecated, so hide them
+            /*QString library = documentElement.attribute("library", QString());
+            if (KStandardDirs::locate("ladspa_plugin", library).isEmpty()) ladspaOk = false;*/
+            ladspaOk = false;
         }
 
         // Parse effect information.
index 3b29f7352fa35ba573a806d0ac4441d8e5e4e9b8..edabf94a03fced8d39eb86c7bc07e9d115349ffa 100644 (file)
@@ -857,7 +857,8 @@ void TrackView::slotAddProjectEffects(QDomNodeList effects, QDomElement parentNo
                     }
                 }
             }
-            if (effecttag == "ladspa") {
+            // Old LADSPA filter, deprecated
+            /*if (effecttag == "ladspa") {
                 //QString ladspaEffectFile = EffectsList::parameter(effect, "src", "property");
 
                 if (!QFile::exists(ladspaEffectFile)) {
@@ -865,7 +866,8 @@ void TrackView::slotAddProjectEffects(QDomNodeList effects, QDomElement parentNo
                     initEffects::ladspaEffectFile(ladspaEffectFile, currenteffect.attribute("ladspaid").toInt(), m_trackview->getLadspaParams(currenteffect));
                 }
                 currenteffect.setAttribute("src", ladspaEffectFile);
-            }
+            }*/
+            
             if (disableeffect) currenteffect.setAttribute("disable", "1");
             if (clip)
                 clip->addEffect(currenteffect, false);