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

Merge branch 'master' of invent.kde.org:multimedia/kdenlive

parents 6e5bb1f5 d7671262
Pipeline #26795 passed with stage
in 9 minutes and 52 seconds
......@@ -4,11 +4,11 @@ cmake_minimum_required(VERSION 3.0)
# stable release. An additional number can be used for bugfix-only releases.
# KDE Application Version, managed by release script
set(KDE_APPLICATIONS_VERSION_MAJOR "20")
set(KDE_APPLICATIONS_VERSION_MINOR "07")
set(KDE_APPLICATIONS_VERSION_MICRO "70")
set (RELEASE_SERVICE_VERSION_MAJOR "20")
set (RELEASE_SERVICE_VERSION_MINOR "11")
set (RELEASE_SERVICE_VERSION_MICRO "70")
set(KDENLIVE_VERSION ${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO})
set(KDENLIVE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
project(Kdenlive VERSION ${KDENLIVE_VERSION})
......
......@@ -996,11 +996,8 @@ void ProjectClip::setProperties(const QMap<QString, QString> &properties, bool r
QStringLiteral("force_aspect_ratio"), QStringLiteral("set.force_full_luma"), QStringLiteral("full_luma"), QStringLiteral("threads"),
QStringLiteral("force_colorspace"), QStringLiteral("force_tff"), QStringLiteral("force_progressive"), QStringLiteral("video_delay")
};
QStringList forceReloadProperties{QStringLiteral("autorotate"), QStringLiteral("templatetext"), QStringLiteral("resource"),
QStringLiteral("force_fps"), QStringLiteral("set.test_image"),
QStringLiteral("video_index")};
QStringList keys{QStringLiteral("luma_duration"), QStringLiteral("luma_file"), QStringLiteral("fade"), QStringLiteral("ttl"),
QStringLiteral("softness"), QStringLiteral("crop"), QStringLiteral("animation")};
QStringList forceReloadProperties{QStringLiteral("autorotate"), QStringLiteral("templatetext"), QStringLiteral("resource"), QStringLiteral("force_fps"), QStringLiteral("set.test_image"), QStringLiteral("video_index"), QStringLiteral("disable_exif")};
QStringList keys{QStringLiteral("luma_duration"), QStringLiteral("luma_file"), QStringLiteral("fade"), QStringLiteral("ttl"), QStringLiteral("softness"), QStringLiteral("crop"), QStringLiteral("animation")};
QVector<int> updateRoles;
while (i.hasNext()) {
i.next();
......@@ -1055,6 +1052,7 @@ void ProjectClip::setProperties(const QMap<QString, QString> &properties, bool r
for (const QString &k : propKeys) {
if (forceReloadProperties.contains(k)) {
refreshPanel = true;
refreshOnly = false;
reload = true;
break;
}
......
......@@ -153,6 +153,8 @@ bool AudioThumbJob::computeWithFFMPEG()
m_done = true;
}
}
} else {
m_done = true;
}
if (!KdenliveSettings::audiothumbnails()) {
// We only wanted the thumb generation
......@@ -330,16 +332,16 @@ bool AudioThumbJob::startJob()
return false;
}
m_lengthInFrames = m_prod->get_length(); // Multiply this if we want more than 1 sample per frame
int thumbResolution = 1000;
int thumbResolution = 3000;
// Increase audio thumb resolution for longer clips to get a better resolution
if (m_lengthInFrames > 30000) {
// More than 20 minutes at 25fps
if (m_lengthInFrames > 10000) {
// More than 10 minutes at 25fps
if (m_lengthInFrames > 90000) {
// More than 1 hour at 25fps
thumbResolution = 3000;
thumbResolution = 10000;
} else {
thumbResolution = 2000;
thumbResolution = 6000;
}
}
m_thumbSize = QSize(thumbResolution, 1000 / pCore->getCurrentDar());
......@@ -352,6 +354,7 @@ bool AudioThumbJob::startJob()
QMap <int, QString> streams = m_binClip->audioInfo()->streams();
QMapIterator<int, QString> st(streams);
m_done = true;
while (st.hasNext()) {
st.next();
int stream = st.key();
......@@ -433,8 +436,8 @@ bool AudioThumbJob::commitResult(Fun &undo, Fun &redo)
QImage oldImage;
QImage result;
if (m_binClip->clipType() == ClipType::Audio) {
oldImage = m_binClip->thumbnail(m_thumbSize.width(), m_thumbSize.height()).toImage();
result = ThumbnailCache::get()->getAudioThumbnail(m_clipId);
oldImage = m_binClip->thumbnail(200, 200 / pCore->getCurrentDar()).toImage();
result = ThumbnailCache::get()->getAudioThumbnail(m_clipId).scaled(200, 200 / pCore->getCurrentDar());
}
// note that the image is moved into lambda, it won't be available from this class anymore
......
......@@ -316,10 +316,10 @@ const char *ClipController::getPassPropertiesList(bool passLength)
{
if (!passLength) {
return "kdenlive:proxy,kdenlive:originalurl,force_aspect_num,force_aspect_den,force_aspect_ratio,force_fps,force_progressive,force_tff,threads,force_"
"colorspace,set.force_full_luma,file_hash,autorotate,xmldata,video_index,audio_index,set.test_image,set.test_audio";
"colorspace,set.force_full_luma,file_hash,autorotate,disable_exif,xmldata,video_index,audio_index,set.test_image,set.test_audio";
}
return "kdenlive:proxy,kdenlive:originalurl,force_aspect_num,force_aspect_den,force_aspect_ratio,force_fps,force_progressive,force_tff,threads,force_"
"colorspace,set.force_full_luma,templatetext,file_hash,autorotate,xmldata,length,video_index,audio_index,set.test_image,set.test_audio";
"colorspace,set.force_full_luma,templatetext,file_hash,autorotate,disable_exif,xmldata,length,video_index,audio_index,set.test_image,set.test_audio";
}
QMap<QString, QString> ClipController::getPropertiesFromPrefix(const QString &prefix, bool withPrefix)
......
......@@ -342,6 +342,19 @@ ClipPropertiesController::ClipPropertiesController(ClipController *controller, Q
connect(timePos, &TimecodeDisplay::timeCodeEditingFinished, this, &ClipPropertiesController::slotDurationChanged);
connect(this, &ClipPropertiesController::updateTimeCodeFormat, timePos, &TimecodeDisplay::slotUpdateTimeCodeFormat);
connect(this, SIGNAL(modified(int)), timePos, SLOT(setValue(int)));
// Autorotate
if (m_type == ClipType::Image) {
int autorotate = m_properties->get_int("disable_exif");
m_originalProperties.insert(QStringLiteral("disable_exif"), QString::number(autorotate));
hlay = new QHBoxLayout;
box = new QCheckBox(i18n("Disable autorotate"), this);
connect(box, &QCheckBox::stateChanged, this, &ClipPropertiesController::slotEnableForce);
box->setObjectName(QStringLiteral("disable_exif"));
box->setChecked(autorotate == 1);
hlay->addWidget(box);
vbox->addLayout(hlay);
}
// connect(this, static_cast<void(ClipPropertiesController::*)(int)>(&ClipPropertiesController::modified), timePos, &TimecodeDisplay::setValue);
}
if (m_type == ClipType::TextTemplate) {
......@@ -1161,6 +1174,8 @@ void ClipPropertiesController::slotEnableForce(int state)
properties.insert(QStringLiteral("force_aspect_den"), QString::number(spin2->value()));
properties.insert(QStringLiteral("force_aspect_num"), QString::number(spin->value()));
properties.insert(QStringLiteral("force_aspect_ratio"), QString::number((double)spin->value() / spin2->value(), 'f'));
} else if (param == QLatin1String("disable_exif")) {
properties.insert(QStringLiteral("disable_exif"), QString::number(1));
}
}
if (properties.isEmpty()) {
......
......@@ -265,6 +265,7 @@ Item {
]
asynchronous: true
cache: false
smooth: false
}
Rectangle {
width: parent.width
......@@ -284,16 +285,24 @@ Item {
MouseArea {
id: thumbMouseArea
anchors.fill: parent
acceptedButtons: audioThumb.isAudioClip ? Qt.NoButton : Qt.LeftButton
acceptedButtons: Qt.LeftButton
hoverEnabled: true
propagateComposedEvents: true
onPressed: {
if (audioThumb.isAudioClip && mouseY < audioSeekZone.y) {
mouse.accepted = false
return
}
var pos = Math.max(mouseX, 0)
pos += audioThumb.width/root.zoomFactor * root.zoomStart
controller.setPosition(Math.min(pos / root.timeScale, root.duration));
}
onPositionChanged: {
if (mouse.modifiers & Qt.ShiftModifier || (pressed && !audioThumb.isAudioClip)) {
if (audioThumb.isAudioClip && mouseY < audioSeekZone.y) {
mouse.accepted = false
return
}
if (mouse.modifiers & Qt.ShiftModifier || pressed) {
var pos = Math.max(mouseX, 0)
pos += audioThumb.width/root.zoomFactor * root.zoomStart
controller.setPosition(Math.min(pos / root.timeScale, root.duration));
......@@ -313,6 +322,35 @@ Item {
}
}
Rectangle {
id: audioSeekZone
width: parent.width
height: parent.height / 6
anchors.centerIn: parent
anchors.verticalCenterOffset: audioThumb.isAudioClip ? parent.height * 5 / 12 : 0
visible: audioThumb.isAudioClip && thumbMouseArea.containsMouse && thumbMouseArea.mouseY > y
color: 'yellow'
opacity: 0.5
Rectangle {
width: parent.width
height: 1
color: '#000'
anchors.top: parent.top
}
// frame ticks
Repeater {
id: rulerAudioTicks
model: parent.width / root.frameSize + 2
Rectangle {
x: index * root.frameSize - (clipMonitorRuler.rulerZoomOffset % root.frameSize)
anchors.top: audioSeekZone.top
height: (index % 5) ? audioSeekZone.height / 6 : audioSeekZone.height / 3
width: 1
color: '#000'
opacity: 0.8
}
}
}
}
}
Label {
......
......@@ -590,7 +590,7 @@ QStringList ProjectSettings::extractPlaylistUrls(const QString &path)
for (int i = 0; i < files.count(); ++i) {
QDomElement e = files.at(i).toElement();
QString type = Xml::getXmlProperty(e, QStringLiteral("mlt_service"));
if (type != QLatin1String("colour")) {
if (type != QLatin1String("colour") && type != QLatin1String("color")) {
QString url = Xml::getXmlProperty(e, QStringLiteral("resource"));
if (type == QLatin1String("timewarp")) {
url = Xml::getXmlProperty(e, QStringLiteral("warp_resource"));
......
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