Commit 0514c181 authored by Julius Künzel's avatar Julius Künzel
Browse files

Add setting to choose preferred track compositing composition

parent 9d8ec7e7
Pipeline #93114 passed with stage
in 8 minutes and 33 seconds
......@@ -19,6 +19,7 @@ SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include "project/dialogs/profilewidget.h"
#include "wizard.h"
#include "monitor/monitor.h"
#include "doc/kdenlivedoc.h"
#ifdef USE_V4L
#include "capture/v4lcapture.h"
......@@ -127,6 +128,21 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QMap<QString, QString> mappable_a
m_configMisc.kcfg_subtitle_duration->setInputMask(pCore->timecode().mask());
m_configMisc.kcfg_subtitle_duration->setValidator(validator);
if (!KdenliveSettings::preferredcomposite().isEmpty()) {
int ix = m_configMisc.preferredcomposite->findData(KdenliveSettings::preferredcomposite());
if (ix > -1) {
m_configMisc.preferredcomposite->setCurrentIndex(ix);
}
}
connect(m_configMisc.preferredcomposite, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,[&](){
if (m_configMisc.preferredcomposite->currentText() != KdenliveSettings::preferredcomposite()) {
KdenliveSettings::setPreferredcomposite(m_configMisc.preferredcomposite->currentText());
int mode = pCore->currentDoc()->getDocumentProperty(QStringLiteral("compositing")).toInt();
pCore->window()->getMainTimeline()->controller()->switchCompositing(mode);
pCore->currentDoc()->setModified();
}
});
QWidget *p8 = new QWidget;
m_configProject.setupUi(p8);
m_page8 = addPage(p8, i18n("Project Defaults"));
......
......@@ -2218,7 +2218,9 @@ bool DocumentValidator::checkMovit()
bool hasWB = EffectsRepository::get()->exists(QStringLiteral("frei0r.colgate"));
bool hasBlur = EffectsRepository::get()->exists(QStringLiteral("frei0r.IIRblur"));
QString compositeTrans;
if (TransitionsRepository::get()->exists(QStringLiteral("frei0r.cairoblend"))) {
if (KdenliveSettings::preferredcomposite() != i18n("auto") && TransitionsRepository::get()->exists(KdenliveSettings::preferredcomposite())) {
compositeTrans = KdenliveSettings::preferredcomposite();
} else if (TransitionsRepository::get()->exists(QStringLiteral("frei0r.cairoblend"))) {
compositeTrans = QStringLiteral("frei0r.cairoblend");
} else if (TransitionsRepository::get()->exists(QStringLiteral("qtblend"))) {
compositeTrans = QStringLiteral("qtblend");
......
......@@ -490,6 +490,11 @@
<label>Monitor used for fullscreen output.</label>
<default></default>
</entry>
<entry name="preferredcomposite" type="String">
<label>The preferred composition for track compositing.</label>
<default></default>
</entry>
</group>
<group name="env">
......
......@@ -4527,6 +4527,7 @@ void MainWindow::slotCopyDebugInfo() {
debuginfo.append(QStringLiteral("CPU: %1\n").arg(QSysInfo::currentCpuArchitecture()));
debuginfo.append(QStringLiteral("Windowing System: %1\n").arg(QGuiApplication::platformName()));
debuginfo.append(QStringLiteral("Movit (GPU): %1\n").arg(KdenliveSettings::gpu_accel() ? QStringLiteral("enabled") : QStringLiteral("disabled")));
debuginfo.append(QStringLiteral("Track Compositing: %1\n").arg(TransitionsRepository::get()->getCompositingTransition()));
QClipboard *clipboard = QApplication::clipboard();
clipboard->setText(debuginfo);
}
......
......@@ -158,6 +158,9 @@ const QString TransitionsRepository::getCompositingTransition()
if (KdenliveSettings::gpu_accel()) {
return QStringLiteral("movit.overlay");
}
if (KdenliveSettings::preferredcomposite() != i18n("auto") && exists(KdenliveSettings::preferredcomposite())) {
return KdenliveSettings::preferredcomposite();
}
if (exists(QStringLiteral("frei0r.cairoblend"))) {
return QStringLiteral("frei0r.cairoblend");
}
......
......@@ -11,7 +11,55 @@
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="10" column="0" colspan="3">
<item row="4" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_disable_effect_parameters">
<property name="text">
<string>Disable parameters when the effect is disabled</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_openlastproject">
<property name="text">
<string>Open last project on startup</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_automultistreams">
<property name="text">
<string>Automatically import all streams in multi stream clips</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_checkfirstprojectclip">
<property name="text">
<string>Check if first added clip matches project profile</string>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Tab position</string>
</property>
</widget>
</item>
<item row="9" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="11" column="0" colspan="3">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Default Durations</string>
......@@ -100,42 +148,43 @@
</layout>
</widget>
</item>
<item row="13" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
<item row="7" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_use_exiftool">
<property name="text">
<string>Get clip metadata with exiftool</string>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</widget>
</item>
<item row="14" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_ignoresubdirstructure">
<property name="text">
<string>Ignore subfolder structure on import (import all files into toplevel folder)</string>
</property>
</spacer>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="label_4">
<item row="1" column="0">
<widget class="QCheckBox" name="kcfg_crashrecovery">
<property name="text">
<string>Tab position</string>
<string>Activate crash recovery (auto save)</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_disable_effect_parameters">
<item row="3" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_usekuiserver">
<property name="text">
<string>Disable parameters when the effect is disabled</string>
<string>Use KDE job tracking for render jobs</string>
</property>
</widget>
</item>
<item row="9" column="2">
<spacer name="horizontalSpacer">
<item row="15" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
......@@ -164,74 +213,56 @@
</item>
</widget>
</item>
<item row="8" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_use_magicLantern">
<property name="text">
<string>Get clip metadata created by Magic Lantern</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_automultistreams">
<property name="text">
<string>Automatically import all streams in multi stream clips</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_openlastproject">
<item row="6" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_bypasscodeccheck">
<property name="text">
<string>Open last project on startup</string>
<string>Bypass codec verification</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="kcfg_crashrecovery">
<item row="8" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_use_magicLantern">
<property name="text">
<string>Activate crash recovery (auto save)</string>
<string>Get clip metadata created by Magic Lantern</string>
</property>
</widget>
</item>
<item row="11" column="0" colspan="3">
<item row="13" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_autoimagesequence">
<property name="text">
<string>Automatically import image sequences</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_checkfirstprojectclip">
<property name="text">
<string>Check if first added clip matches project profile</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_usekuiserver">
<property name="text">
<string>Use KDE job tracking for render jobs</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_use_exiftool">
<property name="text">
<string>Get clip metadata with exiftool</string>
</property>
</widget>
</item>
<item row="6" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_bypasscodeccheck">
<item row="10" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Bypass codec verification</string>
<string>Prefered track compositing composition</string>
</property>
</widget>
</item>
<item row="12" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_ignoresubdirstructure">
<property name="text">
<string>Ignore subfolder structure on import (import all files into toplevel folder)</string>
</property>
<item row="10" column="1">
<widget class="QComboBox" name="preferredcomposite">
<item>
<property name="text">
<string>auto</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">qtblend</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">frei0r.cairoblend</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">composite</string>
</property>
</item>
</widget>
</item>
</layout>
......
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