- QString url = QString::fromUtf8(m_producer->get("resource"));
- prod = new Mlt::Producer(*m_profile, url.toUtf8().constData());
+ m_producer = new Mlt::Producer(*m_profile, m_url.toUtf8().constData());
+ if (m_producer) m_length = m_producer->get_length();
+ }
+ else {
+ Mlt::Producer *tmp = new Mlt::Producer(*m_profile, m_url.toUtf8().constData());
+ if (tmp) m_producer = tmp->cut(in, out);
+ delete tmp;
+ if (m_producer) m_length = m_producer->get_playtime();
+ }
+ if (!m_producer || !m_producer->is_valid()) {
+ // Clip was removed or something went wrong, Notify user?
+ //m_errorMessage.append(i18n("Invalid clip"));
+ setStatus(JOBCRASHED);
+ return;
+ }
+ if (m_extra.contains("producer_profile")) {
+ m_profile->from_producer(*m_producer);
+ m_profile->set_explicit(true);