Fix slideshow clip animation broken

BUG: 352407
parent 6c3c0e59
......@@ -715,15 +715,15 @@ void Render::processFileProperties()
////qDebug() << "/////// PRODUCER: " << url.path() << " IS: " << producer->get_playtime();
if (type == SlideShow) {
int ttl = info.xml.hasAttribute("ttl") ? info.xml.attribute("ttl").toInt() : 0;
if (ttl) producer->set("ttl", ttl);
if (!info.xml.attribute("animation").isEmpty()) {
int ttl = EffectsList::property(info.xml,"ttl").toInt();
QString anim = EffectsList::property(info.xml,"animation");
if (!anim.isEmpty()) {
Mlt::Filter *filter = new Mlt::Filter(*m_qmlView->profile(), "affine");
if (filter && filter->is_valid()) {
int cycle = ttl;
QString geometry = SlideshowClip::animationToGeometry(info.xml.attribute("animation"), cycle);
QString geometry = SlideshowClip::animationToGeometry(anim, cycle);
if (!geometry.isEmpty()) {
if (info.xml.attribute("animation").contains("low-pass")) {
if (anim.contains("low-pass")) {
Mlt::Filter *blur = new Mlt::Filter(*m_qmlView->profile(), "boxblur");
if (blur && blur->is_valid())
producer->attach(*blur);
......@@ -734,23 +734,28 @@ void Render::processFileProperties()
}
}
}
if (info.xml.attribute("fade") == "1") {
QString fade = EffectsList::property(info.xml,"fade");
if (fade == "1") {
// user wants a fade effect to slideshow
Mlt::Filter *filter = new Mlt::Filter(*m_qmlView->profile(), "luma");
if (filter && filter->is_valid()) {
if (ttl) filter->set("cycle", ttl);
if (info.xml.hasAttribute("luma_duration") && !info.xml.attribute("luma_duration").isEmpty()) filter->set("duration", info.xml.attribute("luma_duration").toInt());
if (info.xml.hasAttribute("luma_file") && !info.xml.attribute("luma_file").isEmpty()) {
filter->set("luma.resource", info.xml.attribute("luma_file").toUtf8().constData());
if (info.xml.hasAttribute("softness")) {
int soft = info.xml.attribute("softness").toInt();
QString luma_duration = EffectsList::property(info.xml,"luma_duration");
QString luma_file = EffectsList::property(info.xml,"luma_file");
if (!luma_duration.isEmpty()) filter->set("duration", luma_duration.toInt());
if (!luma_file.isEmpty()) {
filter->set("luma.resource", luma_file.toUtf8().constData());
QString softness = EffectsList::property(info.xml,"softness");
if (!softness.isEmpty()) {
int soft = softness.toInt();
filter->set("luma.softness", (double) soft / 100.0);
}
}
producer->attach(*filter);
}
}
if (info.xml.attribute("crop") == "1") {
QString crop = EffectsList::property(info.xml,"crop");
if (crop == "1") {
// user wants to center crop the slides
Mlt::Filter *filter = new Mlt::Filter(*m_qmlView->profile(), "crop");
if (filter && filter->is_valid()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment