effectInfo = MainWindow::videoEffects.at(i);
effectsMap.insert(effectInfo.elementsByTagName("name").item(0).toElement().text().toLower().toUtf8().data(), effectInfo);
}
- // Add remaining filters to the list of video effects.
+ // Add remaining filters
foreach(const QString & filtername, filtersList) {
QDomDocument doc = createDescriptionFromMlt(repository, "filters", filtername);
if (!doc.isNull())
effectsMap.insert(doc.documentElement().elementsByTagName("name").item(0).toElement().text().toLower().toUtf8().data(), doc.documentElement());
}
MainWindow::videoEffects.clearList();
- foreach(const QDomElement & effect, effectsMap)
- MainWindow::videoEffects.append(effect);
+ foreach(const QDomElement & effect, effectsMap) {
+ if (effect.attribute("type") == "audio")
+ MainWindow::audioEffects.append(effect);
+ else
+ MainWindow::videoEffects.append(effect);
+ }
return repository;
}
// a specific version of the filter is required
Mlt::Properties *metadata = repository->metadata(filter_type, tag.toUtf8().data());
if (metadata && metadata->is_valid()) {
- double version = atof(metadata->get("version"));
- if (documentElement.attribute("version").toDouble() > version)
+ double version = metadata->get_double("version");
+ if (documentElement.attribute("version").toDouble() > version) {
+ delete metadata;
return;
+ }
}
delete metadata;
}
if (metadata && metadata->is_valid()) {
if (metadata->get("title") && metadata->get("identifier")) {
QDomElement eff = ret.createElement("effect");
- eff.setAttribute("tag", metadata->get("identifier"));
- eff.setAttribute("id", metadata->get("identifier"));
+ QString id = metadata->get("identifier");
+ eff.setAttribute("tag", id);
+ eff.setAttribute("id", id);
+ if (id.startsWith("ladspa")) eff.setAttribute("type", "audio");
QDomElement name = ret.createElement("name");
name.appendChild(ret.createTextNode(metadata->get("title")));
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");
tname.appendChild(ret.createTextNode(i18n("Composite")));
desc.appendChild(ret.createTextNode(i18n("A key-framable alpha-channel compositor for two frames.")));
paramList.append(quickParameterFill(ret, i18n("Geometry"), "geometry", "geometry", "0%,0%:100%x100%:100", "-500;-500;-500;-500;0", "500;500;500;500;100"));
- paramList.append(quickParameterFill(ret, i18n("Alpha Channel Operation"), "operator", "list", "over", "", "", "over,and,or,xor", "over,and,or,xor"));
+ paramList.append(quickParameterFill(ret, i18n("Alpha Channel Operation"), "operator", "list", "over", "", "", "over,and,or,xor", i18n("Over,And,Or,Xor")));
paramList.append(quickParameterFill(ret, i18n("Align"), "aligned", "bool", "1", "0", "1"));
paramList.append(quickParameterFill(ret, i18n("Fill"), "fill", "bool", "1", "0", "1"));
paramList.append(quickParameterFill(ret, i18n("Distort"), "distort", "bool", "0", "0", "1"));
paramList.append(quickParameterFill(ret, i18n("Force Deinterlace Overlay"), "deinterlace", "bool", "0", "0", "1"));
} else if (name == "affine") {
tname.appendChild(ret.createTextNode(i18n("Affine")));
- paramList.append(quickParameterFill(ret, i18n("Rotate Y"), "rotate_y", "double", "0", "0", "360"));
+ ret.documentElement().setAttribute("showrotation", "1");
+ /*paramList.append(quickParameterFill(ret, i18n("Rotate Y"), "rotate_y", "double", "0", "0", "360"));
paramList.append(quickParameterFill(ret, i18n("Rotate X"), "rotate_x", "double", "0", "0", "360"));
paramList.append(quickParameterFill(ret, i18n("Rotate Z"), "rotate_z", "double", "0", "0", "360"));
paramList.append(quickParameterFill(ret, i18n("Fix Rotate Y"), "fix_rotate_y", "double", "0", "0", "360"));
paramList.append(quickParameterFill(ret, i18n("Fix Rotate Z"), "fix_rotate_z", "double", "0", "0", "360"));
paramList.append(quickParameterFill(ret, i18n("Shear Y"), "shear_y", "double", "0", "0", "360"));
paramList.append(quickParameterFill(ret, i18n("Shear X"), "shear_x", "double", "0", "0", "360"));
- paramList.append(quickParameterFill(ret, i18n("Shear Z"), "shear_z", "double", "0", "0", "360"));
+ paramList.append(quickParameterFill(ret, i18n("Shear Z"), "shear_z", "double", "0", "0", "360"));*/
+ /*paramList.append(quickParameterFill(ret, i18n("Fix Shear Y"), "fix_shear_y", "double", "0", "0", "360"));
+ paramList.append(quickParameterFill(ret, i18n("Fix Shear X"), "fix_shear_x", "double", "0", "0", "360"));
+ paramList.append(quickParameterFill(ret, i18n("Fix Shear Z"), "fix_shear_z", "double", "0", "0", "360"));*/
+
+ paramList.append(quickParameterFill(ret, "keyed", "keyed", "fixed", "1", "1", "1"));
+ paramList.append(quickParameterFill(ret, i18n("Geometry"), "geometry", "geometry", "0,0,100%,100%,100%", "0,0,100%,100%,100%", "0,0,100%,100%,100%", "", "", "", "", "", "true"));
+
+ paramList.append(quickParameterFill(ret, i18n("Rotate X"), "rotate_x", "addedgeometry", "0", "-1800", "1800", QString(), QString(), "10"));
+ paramList.append(quickParameterFill(ret, i18n("Rotate Y"), "rotate_y", "addedgeometry", "0", "-1800", "1800", QString(), QString(), "10"));
+ paramList.append(quickParameterFill(ret, i18n("Rotate Z"), "rotate_z", "addedgeometry", "0", "-1800", "1800", QString(), QString(), "10"));
+ /*paramList.append(quickParameterFill(ret, i18n("Rotate Y"), "rotate_y", "simplekeyframe", "0", "-1800", "1800", QString(), QString(), "10"));
+ paramList.append(quickParameterFill(ret, i18n("Rotate Z"), "rotate_z", "simplekeyframe", "0", "-1800", "1800", QString(), QString(), "10"));*/
+
paramList.append(quickParameterFill(ret, i18n("Fix Shear Y"), "fix_shear_y", "double", "0", "0", "360"));
paramList.append(quickParameterFill(ret, i18n("Fix Shear X"), "fix_shear_x", "double", "0", "0", "360"));
paramList.append(quickParameterFill(ret, i18n("Fix Shear Z"), "fix_shear_z", "double", "0", "0", "360"));
- paramList.append(quickParameterFill(ret, i18n("Geometry"), "geometry", "geometry", "0,0,100%,100%,100%", "0,0,100%,100%,100%", "0,0,100%,100%,100%", "", "", "", "", "", "false"));
} else if (name == "mix") {
tname.appendChild(ret.createTextNode(i18n("Mix")));
} else if (name == "region") {
desc.appendChild(ret.createTextNode(i18n("Use alpha channel of another clip to create a transition.")));
paramList.append(quickParameterFill(ret, i18n("Transparency clip"), "resource", "url", "", "", "", "", "", ""));
paramList.append(quickParameterFill(ret, i18n("Geometry"), "composite.geometry", "geometry", "0%,0%:100%x100%:100", "-500;-500;-500;-500;0", "500;500;500;500;100"));
- paramList.append(quickParameterFill(ret, i18n("Alpha Channel Operation"), "composite.operator", "list", "over", "", "", "over,and,or,xor", "over,and,or,xor"));
+ paramList.append(quickParameterFill(ret, i18n("Alpha Channel Operation"), "composite.operator", "list", "over", "", "", "over,and,or,xor", i18n("Over,And,Or,Xor")));
paramList.append(quickParameterFill(ret, i18n("Align"), "composite.aligned", "bool", "1", "0", "1"));
paramList.append(quickParameterFill(ret, i18n("Fill"), "composite.fill", "bool", "1", "0", "1"));
paramList.append(quickParameterFill(ret, i18n("Distort"), "composite.distort", "bool", "0", "0", "1"));