m_mltConsumer->set("terminate_on_pause", 0);
m_mltConsumer->set("buffer", 12);
m_mltConsumer->set("deinterlace_method", "onefield");
+ m_mltConsumer->set("real_time", KdenliveSettings::mltthreads());
mlt_log_set_callback(kdenlive_callback);
}
if (m_mltConsumer && m_mltConsumer->is_valid()) return;
m_mltConsumer->set("progressive", 1);
m_mltConsumer->set("audio_buffer", 1024);
m_mltConsumer->set("frequency", 48000);
+ m_mltConsumer->set("real_time", KdenliveSettings::mltthreads());
}
Mlt::Producer *Render::invalidProducer(const QString &id)
void Render::getFileProperties(const QDomElement xml, const QString &clipId, int imageHeight, bool replaceProducer, bool selectClip)
{
QString path;
- if (xml.hasAttribute("proxy")) path = xml.attribute("proxy");
+ if (xml.hasAttribute("proxy") && xml.attribute("proxy") != "-") path = xml.attribute("proxy");
else path = xml.attribute("resource");
KUrl url = KUrl(path);
Mlt::Producer *producer = NULL;
if (producer == NULL || producer->is_blank() || !producer->is_valid()) {
kDebug() << " / / / / / / / / ERROR / / / / // CANNOT LOAD PRODUCER: ";
- emit removeInvalidClip(clipId, replaceProducer);
+ if (xml.hasAttribute("proxy") && xml.attribute("proxy") != "-") {
+ // Proxy file is corrupted
+ emit removeInvalidProxy(clipId);
+ }
+ else emit removeInvalidClip(clipId, replaceProducer);
delete producer;
return;
}
}
// setup length here as otherwise default length (currently 15000 frames in MLT) will be taken even if outpoint is larger
- if (type == COLOR || type == TEXT || type == IMAGE || type == SLIDESHOW)
- producer->set("length", xml.attribute("out").toInt() - xml.attribute("in").toInt() + 1);
+ if (type == COLOR || type == TEXT || type == IMAGE || type == SLIDESHOW) {
+ int length;
+ if (xml.hasAttribute("length")) length = xml.attribute("length").toInt();
+ else length = xml.attribute("out").toInt() - xml.attribute("in").toInt();
+ producer->set("length", length);
+ }
if (xml.hasAttribute("out"))
producer->set_in_and_out(xml.attribute("in").toInt(), xml.attribute("out").toInt());
void Render::setDropFrames(bool show)
{
if (m_mltConsumer) {
- int dropFrames = 1;
- if (show == false) dropFrames = 0;
+ int dropFrames = KdenliveSettings::mltthreads();
+ if (show == false) dropFrames = -dropFrames;
m_mltConsumer->stop();
if (m_winid == 0)
m_mltConsumer->set("real_time", dropFrames);