Commit 6a185052 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Merge branch '1908'

parents d5fb7f8e dc3340cc
Pipeline #6078 passed with stage
in 28 minutes and 39 seconds
......@@ -1086,6 +1086,10 @@ void RenderWidget::focusFirstVisibleItem(const QString &profile)
void RenderWidget::slotPrepareExport(bool delayedRendering, const QString &scriptPath)
{
Q_UNUSED(scriptPath);
if (pCore->projectDuration() < 2) {
// Empty project, dont attempt to render
return;
}
if (!QFile::exists(KdenliveSettings::rendererpath())) {
KMessageBox::sorry(this, i18n("Cannot find the melt program required for rendering (part of Mlt)"));
return;
......@@ -1116,7 +1120,7 @@ void RenderWidget::slotPrepareExport(bool delayedRendering, const QString &scrip
void RenderWidget::prepareRendering(bool delayedRendering, const QString &chapterFile)
{
KdenliveDoc *project = pCore->currentDoc();
// Save rendering profile to document
QMap<QString, QString> renderProps;
renderProps.insert(QStringLiteral("rendercategory"), m_view.formats->currentItem()->parent()->text(0));
......@@ -1149,7 +1153,7 @@ void RenderWidget::prepareRendering(bool delayedRendering, const QString &chapte
renderProps.insert(QStringLiteral("renderspeed"), QString::number(m_view.speed->value()));
emit selectedRenderProfile(renderProps);
QString playlistPath;
QString mltSuffix(QStringLiteral(".mlt"));
QList<QString> playlistPaths;
......
......@@ -1036,7 +1036,7 @@ void Monitor::slotExtractCurrentFrame(QString frameName, bool addToProject)
QString framesFolder = KRecentDirs::dir(QStringLiteral(":KdenliveFramesFolder"));
if (framesFolder.isEmpty()) {
framesFolder = QDir::homePath();
framesFolder = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation);
}
QScopedPointer<QDialog> dlg(new QDialog(this));
QScopedPointer<KFileWidget> fileWidget(new KFileWidget(QUrl::fromLocalFile(framesFolder), dlg.data()));
......@@ -1096,7 +1096,7 @@ void Monitor::slotExtractCurrentFrame(QString frameName, bool addToProject)
if (addToProject) {
QString folderInfo = pCore->bin()->getCurrentFolder();
pCore->bin()->droppedUrls(QList<QUrl>() << QUrl::fromLocalFile(selectedFile), folderInfo);
pCore->bin()->droppedUrls(QList<QUrl> {QUrl::fromLocalFile(selectedFile)}, folderInfo);
}
}
}
......
......@@ -251,7 +251,13 @@ QImage MonitorProxy::extractFrame(int frame_position, const QString &path, int w
tmpProd->attach(converter);
// TODO: paste effects
// Clip(*tmpProd).addEffects(*q->m_producer);
tmpProd->seek(q->m_producer->position());
double projectFps = pCore->getCurrentFps();
double currentFps = tmpProfile->fps();
if (qFuzzyCompare(projectFps, currentFps)) {
tmpProd->seek(q->m_producer->position());
} else {
tmpProd->seek(q->m_producer->position() * currentFps / projectFps);
}
frame = tmpProd->get_frame();
img = KThumb::getFrame(frame, width, height);
delete frame;
......
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