Commit 1f67f8cd authored by Julius Künzel's avatar Julius Künzel 💬
Browse files

Adjust Kdenlive rendering to recent changes in kdenlive_render

parent daa0c02c
......@@ -1035,14 +1035,16 @@ RenderJobItem *RenderWidget::createRenderJob(const QString &playlist, const QStr
renderItem->setData(1, StartTimeRole, t);
renderItem->setData(1, LastTimeRole, t);
renderItem->setData(1, LastFrameRole, in);
QStringList argsJob = {KdenliveSettings::rendererpath(),
QStringList argsJob = {QStringLiteral("delivery"),
KdenliveSettings::rendererpath(),
playlist,
outputFile,
QStringLiteral("-pid:%1").arg(QCoreApplication::applicationPid()),
QStringLiteral("-out"),
QStringLiteral("--pid"),
QString::number(QCoreApplication::applicationPid()),
QStringLiteral("--out"),
QString::number(out)};
if (!subtitleFile.isEmpty()) {
argsJob << QStringLiteral("-subtitle") << subtitleFile;
argsJob << QStringLiteral("--subtitle") << subtitleFile;
}
renderItem->setData(1, ParametersRole, argsJob);
qDebug() << "* CREATED JOB WITH ARGS: " << argsJob;
......@@ -1752,11 +1754,13 @@ void RenderWidget::slotStartScript()
QDateTime t = QDateTime::currentDateTime();
renderItem->setData(1, StartTimeRole, t);
renderItem->setData(1, LastTimeRole, t);
QStringList argsJob = {KdenliveSettings::rendererpath(),
QStringList argsJob = {QStringLiteral("delivery"),
KdenliveSettings::rendererpath(),
path,
destination,
QStringLiteral("-pid:%1").arg(QCoreApplication::applicationPid()),
QStringLiteral("-out"),
QStringLiteral("--pid"),
QString::number(QCoreApplication::applicationPid()),
QStringLiteral("--out"),
QString::number(out)};
renderItem->setData(1, ParametersRole, argsJob);
checkRenderStatus();
......
......@@ -592,10 +592,9 @@ void PreviewManager::doPreviewRender(const QString &scene)
m_chunksToRender = m_dirtyChunks.count();
m_processedChunks = 0;
int chunkSize = KdenliveSettings::timelinechunks();
QStringList args{KdenliveSettings::rendererpath(),
QStringList args{QStringLiteral("preview-chunks"),
scene,
m_cacheDir.absolutePath(),
QStringLiteral("-split"),
dirtyChunks.join(QLatin1Char(',')),
QString::number(chunkSize - 1),
pCore->getCurrentProfilePath(),
......@@ -609,11 +608,11 @@ void PreviewManager::doPreviewRender(const QString &scene)
}
}
void PreviewManager::processEnded(int, QProcess::ExitStatus status)
void PreviewManager::processEnded(int exitCode, QProcess::ExitStatus status)
{
const QString sceneList = m_cacheDir.absoluteFilePath(QStringLiteral("preview.mlt"));
QFile::remove(sceneList);
if (status == QProcess::QProcess::CrashExit) {
if (status == QProcess::QProcess::CrashExit || exitCode != 0) {
emit previewRender(0, m_errorLog, -1);
if (workingPreview >= 0) {
const QString fileName = QStringLiteral("%1.%2").arg(workingPreview).arg(m_extension);
......@@ -622,6 +621,7 @@ void PreviewManager::processEnded(int, QProcess::ExitStatus status)
}
}
} else {
// Normal exit and exit code 0: everything okay
pCore->currentDoc()->previewProgress(1000);
}
workingPreview = -1;
......
......@@ -133,7 +133,7 @@ private slots:
void slotProcessDirtyChunks();
/** @brief: Process preview rendering output. */
void receivedStderr();
void processEnded(int, QProcess::ExitStatus status);
void processEnded(int exitCode, QProcess::ExitStatus status);
public slots:
/** @brief: Prepare and start rendering. */
......
Supports Markdown
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