// 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");
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");
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.
QString id = metadata->get("identifier");
eff.setAttribute("tag", id);
eff.setAttribute("id", id);
- if (id.startsWith("ladspa")) eff.setAttribute("type", "audio");
+ //kDebug()<<"Effect: "<<id;
QDomElement name = ret.createElement("name");
name.appendChild(ret.createTextNode(metadata->get("title")));
eff.appendChild(author);
eff.appendChild(desc);
+ Mlt::Properties tags((mlt_properties) metadata->get_data("tags"));
+ if (QString(tags.get(0)) == "Audio") eff.setAttribute("type", "audio");
+ /*for (int i = 0; i < tags.count(); i++)
+ kDebug()<<tags.get_name(i)<<"="<<tags.get(i);*/
+
Mlt::Properties param_props((mlt_properties) metadata->get_data("parameters"));
for (int j = 0; param_props.is_valid() && j < param_props.count(); j++) {
QDomElement params = ret.createElement("parameter");
params.setAttribute("type", "constant");
if (QString(paramdesc.get("type")) == "float") {
params.setAttribute("type", "constant");
- params.setAttribute("factor", "1000");
- if (paramdesc.get("maximum")) params.setAttribute("max", QString(paramdesc.get("maximum")).toFloat() * 1000.0);
- if (paramdesc.get("minimum")) params.setAttribute("min", QString(paramdesc.get("minimum")).toFloat() * 1000.0);
+ // param type is float, set default decimals to 3
+ params.setAttribute("decimals", "3");
}
if (QString(paramdesc.get("type")) == "boolean")
params.setAttribute("type", "bool");