Commit d794fa69 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle

Get rid of buggy processing threads setting

parent 18a73708
......@@ -361,7 +361,7 @@ bool MltDeviceCapture::slotStartCapture(const QString &params, const QString &pa
auto *renderProps = new Mlt::Properties;
renderProps->set("mlt_service", "avformat");
renderProps->set("target", path.toUtf8().constData());
renderProps->set("real_time", -KdenliveSettings::mltthreads());
renderProps->set("real_time", -1);
renderProps->set("terminate_on_pause", 0); // was commented out. restoring it fixes mantis#3415 - FFmpeg recording freezes
// without this line a call to mlt_properties_get_int(terminate on pause) for in mlt/src/modules/core/consumer_multi.c is returning 1
// and going into and endless loop.
......
......@@ -122,8 +122,6 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QMap<QString, QString> mappable_a
m_configEnv.ffmpegurl->lineEdit()->setObjectName(QStringLiteral("kcfg_ffmpegpath"));
m_configEnv.ffplayurl->lineEdit()->setObjectName(QStringLiteral("kcfg_ffplaypath"));
m_configEnv.ffprobeurl->lineEdit()->setObjectName(QStringLiteral("kcfg_ffprobepath"));
int maxThreads = QThread::idealThreadCount();
m_configEnv.kcfg_mltthreads->setMaximum(maxThreads > 2 ? maxThreads : 8);
m_configEnv.tmppathurl->setMode(KFile::Directory);
m_configEnv.tmppathurl->lineEdit()->setObjectName(QStringLiteral("kcfg_currenttmpfolder"));
m_configEnv.capturefolderurl->setMode(KFile::Directory);
......
......@@ -146,7 +146,7 @@ bool MeltJob::startJob()
}
/*
if (!m_consumerParams.contains(QStringLiteral("real_time"))) {
m_consumer->set("real_time", -KdenliveSettings::mltthreads());
m_consumer->set("real_time", -1);
}
*/
......
......@@ -54,7 +54,7 @@ void SceneSplitJob::configureConsumer()
m_consumer = std::make_unique<Mlt::Consumer>(*m_profile.get(), "null");
m_consumer->set("all", 1);
m_consumer->set("terminate_on_pause", 1);
m_consumer->set("real_time", -KdenliveSettings::mltthreads());
m_consumer->set("real_time", -1);
// We just want to find scene change, set all methods to the fastests
m_consumer->set("rescale", "nearest");
m_consumer->set("deinterlace_method", "onefield");
......
......@@ -62,7 +62,7 @@ void SpeedJob::configureConsumer()
m_consumer = std::make_unique<Mlt::Consumer>(*m_profile.get(), "xml", m_destUrl.toUtf8().constData());
m_consumer->set("terminate_on_pause", 1);
m_consumer->set("title", "Speed Change");
m_consumer->set("real_time", -KdenliveSettings::mltthreads());
m_consumer->set("real_time", -1);
}
void SpeedJob::configureProducer()
......
......@@ -53,7 +53,7 @@ void StabilizeJob::configureConsumer()
m_consumer = std::make_unique<Mlt::Consumer>(*m_profile.get(), "xml", m_destUrl.toUtf8().constData());
m_consumer->set("all", 1);
m_consumer->set("title", "Stabilized");
m_consumer->set("real_time", -KdenliveSettings::mltthreads());
m_consumer->set("real_time", -1);
}
void StabilizeJob::configureFilter()
......
......@@ -1135,7 +1135,7 @@ int GLWidget::reconfigure()
// m_producer->set_speed(0.0);
}
int dropFrames = realTime();
int dropFrames = 1;
if (!KdenliveSettings::monitor_dropframes()) {
dropFrames = -dropFrames;
}
......@@ -1332,15 +1332,6 @@ void GLWidget::setOffsetY(int y, int max)
update();
}
int GLWidget::realTime() const
{
// C & D
if (m_glslManager) {
return 1;
}
return KdenliveSettings::mltthreads();
}
std::shared_ptr<Mlt::Consumer> GLWidget::consumer()
{
return m_consumer;
......@@ -1778,7 +1769,7 @@ void GLWidget::setDropFrames(bool drop)
// why this lock?
QMutexLocker locker(&m_mltMutex);
if (m_consumer) {
int dropFrames = realTime();
int dropFrames = 1;
if (!drop) {
dropFrames = -dropFrames;
}
......
......@@ -112,7 +112,6 @@ public:
void resetConsumer(bool fullReset);
void lockMonitor();
void releaseMonitor();
int realTime() const;
int droppedFrames() const;
void resetDrops();
bool checkFrameNumber(int pos, int offset, bool isPlaying);
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>566</width>
<height>441</height>
<width>514</width>
<height>379</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
......@@ -27,51 +27,38 @@
<string>MLT environment</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="1" colspan="3">
<item row="0" column="1" colspan="2">
<widget class="KUrlRequester" name="ffmpegurl"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Processing threads</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="3">
<widget class="KUrlRequester" name="ffplayurl"/>
</item>
<item row="4" column="1" colspan="3">
<widget class="KUrlRequester" name="rendererpathurl"/>
</item>
<item row="5" column="3">
<widget class="QLabel" name="label_7">
<item row="3" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>(&gt;1 is experimental)</string>
<string>MLT profiles folder</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_2">
<item row="0" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Melt path</string>
<string>FFmpeg</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_8">
<item row="2" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>FFmpeg</string>
<string>FFprobe</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label">
<item row="4" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>MLT profiles folder</string>
<string>Melt path</string>
</property>
</widget>
</item>
<item row="6" column="1">
<item row="5" column="1">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
......@@ -84,9 +71,6 @@
</property>
</spacer>
</item>
<item row="3" column="1" colspan="3">
<widget class="KUrlRequester" name="mltpathurl"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
......@@ -94,27 +78,16 @@
</property>
</widget>
</item>
<item row="5" column="1" colspan="2">
<widget class="QSpinBox" name="kcfg_mltthreads">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimum">
<number>1</number>
</property>
</widget>
<item row="1" column="1" colspan="2">
<widget class="KUrlRequester" name="ffplayurl"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>FFprobe</string>
</property>
</widget>
<item row="3" column="1" colspan="2">
<widget class="KUrlRequester" name="mltpathurl"/>
</item>
<item row="4" column="1" colspan="2">
<widget class="KUrlRequester" name="rendererpathurl"/>
</item>
<item row="2" column="1" colspan="3">
<item row="2" column="1" colspan="2">
<widget class="KUrlRequester" name="ffprobeurl"/>
</item>
</layout>
......
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