]> git.sesse.net Git - kdenlive/blobdiff - src/customtrackview.cpp
Remove (old) LADSPA related code.
[kdenlive] / src / customtrackview.cpp
index 0f7d88a8993830d14db0482b9d1db983e0804c53..32e2de5e9223fc93e2ca9d9616e4079186195607 100644 (file)
@@ -1702,13 +1702,6 @@ void CustomTrackView::slotAddGroupEffect(QDomElement effect, AbstractGroupItem *
             }
             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++;
         }
@@ -1781,13 +1774,6 @@ void CustomTrackView::slotAddEffect(QDomElement effect, GenTime pos, int track)
             } else {
                 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);
         }
     }
@@ -1874,11 +1860,6 @@ void CustomTrackView::updateEffect(int track, GenTime pos, QDomElement insertedE
     if (pos < GenTime()) {
         // editing a track effect
         EffectsParameterList effectParams = getEffectArgs(effect);
-        // 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,11 +1895,6 @@ void CustomTrackView::updateEffect(int track, GenTime pos, QDomElement insertedE
         }
 
         EffectsParameterList effectParams = getEffectArgs(effect);
-        // 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);
@@ -5804,26 +5780,6 @@ void CustomTrackView::autoTransition()
     setDocumentModified();
 }
 
-
-QStringList CustomTrackView::getLadspaParams(QDomElement effect) const
-{
-    QStringList result;
-    QLocale locale;
-    QDomNodeList params = effect.elementsByTagName("parameter");
-    for (int i = 0; i < params.count(); i++) {
-        QDomElement e = params.item(i).toElement();
-        if (!e.isNull() && e.attribute("type") == "constant") {
-            if (e.hasAttribute("factor")) {
-                double factor = e.attribute("factor").toDouble();
-                double value = e.attribute("value").toDouble();
-                value = value / factor;
-                result.append(locale.toString(value));
-            } else result.append(e.attribute("value"));
-        }
-    }
-    return result;
-}
-
 void CustomTrackView::clipNameChanged(const QString id, const QString name)
 {
     QList<QGraphicsItem *> list = scene()->items();