#include <QProcess>
#include <QDBusConnectionInterface>
#include <QDBusInterface>
+#include <QThread>
const int GroupRole = Qt::UserRole;
const int ExtensionRole = GroupRole + 1;
m_view.proxy_render->setHidden(!enableProxy);
+ m_view.encoder_threads->setMaximum(QThread::idealThreadCount());
+ m_view.encoder_threads->setValue(KdenliveSettings::encodethreads());
+ connect(m_view.encoder_threads, SIGNAL(valueChanged(int)), this, SLOT(slotUpdateEncodeThreads(int)));
+
m_view.rescale_keep->setChecked(KdenliveSettings::rescalekeepratio());
connect(m_view.rescale_width, SIGNAL(valueChanged(int)), this, SLOT(slotUpdateRescaleWidth(int)));
connect(m_view.rescale_height, SIGNAL(valueChanged(int)), this, SLOT(slotUpdateRescaleHeight(int)));
// disable audio if requested
if (!exportAudio) renderArgs.append(" an=1 ");
+ // Set the thread counts
+ renderArgs.append(QString(" threads=%1").arg(KdenliveSettings::encodethreads()));
+ renderArgs.append(QString(" real_time=-%1").arg(KdenliveSettings::mltthreads()));
+
// Check if the rendering profile is different from project profile,
// in which case we need to use the producer_comsumer from MLT
QString std = renderArgs;
break;
}
}
-
+
if (resizeProfile)
render_process_args << "consumer:" + (scriptExport ? "$SOURCE" : playlistPath);
else
} else m_view.errorBox->setHidden(true);
}
+void RenderWidget::slotUpdateEncodeThreads(int val)
+{
+ KdenliveSettings::setEncodethreads(val);
+}
+
void RenderWidget::slotUpdateRescaleWidth(int val)
{
KdenliveSettings::setDefaultrescalewidth(val);