Commit 5aaa7466 authored by Julius Künzel's avatar Julius Künzel
Browse files

Remove DVD Wizard

BUG: 403128
BUG: 403405
BUG: 413567
BUG: 406042
BUG: 407242
BUG: 420319
BUG: 390431
BUG: 377829
BUG: 420428
Fixes #681
Fixes #1005
parent 686355b9
Pipeline #62001 passed with stage
in 8 minutes and 3 seconds
......@@ -239,39 +239,6 @@
<li xml:lang="x-test">xxColor scopesxx</li>
<li xml:lang="zh-CN">颜色范围</li>
<li xml:lang="zh-TW">顏色範圍</li>
<li>Basic DVD Wizard</li>
<li xml:lang="ar">مُرشد DVD أساسيّ</li>
<li xml:lang="az">Əsas DVD bələdçisi</li>
<li xml:lang="ca">Assistent bàsic per als DVD</li>
<li xml:lang="ca-valencia">Assistent bàsic per als DVD</li>
<li xml:lang="cs">Základní průvodce DVD</li>
<li xml:lang="da">Simpel dvd-assistent</li>
<li xml:lang="de">Einfacher DVD-Assistent</li>
<li xml:lang="el">Βασικός οδηγός DVD</li>
<li xml:lang="en-GB">Basic DVD Wizard</li>
<li xml:lang="es">Asistente básico de DVD</li>
<li xml:lang="et">Lihtne DVD nõustaja</li>
<li xml:lang="eu">Oinarrizko DVD morroia</li>
<li xml:lang="fi">Yksinkertainen DVD:n luonti</li>
<li xml:lang="fr">Assistant DVD de base</li>
<li xml:lang="gl">Asistente básico para DVD</li>
<li xml:lang="id">Dasar Asisten DVD</li>
<li xml:lang="it">Procedura guidata di base DVD</li>
<li xml:lang="ko">기본 DVD 마법사</li>
<li xml:lang="nl">Basis dvd-assistent</li>
<li xml:lang="nn">Enkel DVD-vegvisar</li>
<li xml:lang="pl">Podstawowy pomocnik DVD</li>
<li xml:lang="pt">Assistente Básico de DVD's</li>
<li xml:lang="pt-BR">Assistente básico para DVDs</li>
<li xml:lang="ru">Мастер создания DVD.</li>
<li xml:lang="sk">Základný DVD sprievodca</li>
<li xml:lang="sl">Osnovni čarovnik za DVD-je</li>
<li xml:lang="sv">Enkel dvd-guide</li>
<li xml:lang="tr">Temel DVD Sihirbazı</li>
<li xml:lang="uk">Базовий майстер створення DVD.</li>
<li xml:lang="x-test">xxBasic DVD Wizardxx</li>
<li xml:lang="zh-CN">简易 DVD 向导</li>
<li xml:lang="zh-TW">基本 DVD 精靈</li>
</ul>
</description>
<releases>
......
......@@ -60,16 +60,6 @@
"*.cmake"
],
"modules": [
{
"name": "libdvdread",
"sources": [
{
"type": "archive",
"url": "https://download.videolan.org/pub/videolan/libdvdread/6.1.1/libdvdread-6.1.1.tar.bz2",
"sha256": "3e357309a17c5be3731385b9eabda6b7e3fa010f46022a06f104553bf8e21796"
}
]
},
{
"name": "pyaaf2",
"buildsystem": "simple",
......@@ -84,31 +74,6 @@
}
]
},
{
"name": "genisoimage",
"buildsystem": "cmake-ninja",
"builddir": true,
"build-options" : {
"cflags": "-fcommon"
},
"sources": [
{
"type": "archive",
"url": "http://deb.debian.org/debian/pool/main/c/cdrkit/cdrkit_1.1.11.orig.tar.gz",
"sha256": "d1c030756ecc182defee9fe885638c1785d35a2c2a297b4604c0e0dcc78e47da"
}
]
},
{
"name": "dvdauthor",
"sources": [
{
"type": "archive",
"url": "https://downloads.sourceforge.net/project/dvdauthor/dvdauthor-0.7.2.tar.gz",
"sha1": "0e605642140576bfb3e963414d77630d1c073a51"
}
]
},
{
"name": "OpenTimelineIO",
"buildsystem": "simple",
......
......@@ -46,7 +46,6 @@ add_subdirectory(bin)
add_subdirectory(capture)
add_subdirectory(dialogs)
add_subdirectory(doc)
add_subdirectory(dvdwizard)
add_subdirectory(effects)
add_subdirectory(effectslist)
add_subdirectory(jobs)
......
......@@ -39,6 +39,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "mltcontroller/clipcontroller.h"
#include "mltcontroller/clippropertiescontroller.h"
#include "monitor/monitor.h"
#include "monitor/monitormanager.h"
#include "project/dialogs/slideshowclip.h"
#include "project/invaliddialog.h"
#include "project/transcodeseek.h"
......
......@@ -35,7 +35,7 @@ const int MAXCLIPDURATION = 15000;
namespace Kdenlive {
enum MonitorId { NoMonitor = 0x01, ClipMonitor = 0x02, ProjectMonitor = 0x04, RecordMonitor = 0x08, StopMotionMonitor = 0x10, DvdMonitor = 0x20 };
enum MonitorId { NoMonitor = 0x01, ClipMonitor = 0x02, ProjectMonitor = 0x04, RecordMonitor = 0x08, StopMotionMonitor = 0x10 };
const int DefaultThumbHeight = 100;
} // namespace Kdenlive
......
......@@ -31,6 +31,7 @@
#include "profilesdialog.h"
#include "project/dialogs/profilewidget.h"
#include "wizard.h"
#include "monitor/monitor.h"
#ifdef USE_V4L
#include "capture/v4lcapture.h"
......
......@@ -216,7 +216,6 @@ RenderWidget::RenderWidget(bool enableProxy, QWidget *parent)
m_view.buttonGenerateScript->setEnabled(false);
setRescaleEnabled(false);
m_view.guides_box->setVisible(false);
m_view.open_dvd->setVisible(false);
m_view.create_chapter->setVisible(false);
m_view.open_browser->setVisible(false);
m_view.error_box->setVisible(false);
......@@ -2602,9 +2601,7 @@ void RenderWidget::setRenderStatus(const QString &dest, int status, const QStrin
notify->setUrls({QUrl::fromLocalFile(dest)});
notify->sendEvent();
QString itemGroup = item->data(0, Qt::UserRole).toString();
if (itemGroup == QLatin1String("dvd")) {
emit openDvdWizard(item->text(1));
} else if (itemGroup == QLatin1String("websites")) {
if (itemGroup == QLatin1String("websites")) {
QString url = item->metadata();
if (!url.isEmpty()) {
new KRun(QUrl::fromLocalFile(url), this);
......
......@@ -242,7 +242,6 @@ private:
signals:
void abortProcess(const QString &url);
void openDvdWizard(const QString &url);
/** Send the info about rendering that will be saved in the document:
(profile destination, profile name and url of rendered file */
void selectedRenderProfile(const QMap<QString, QString> &renderProps);
......
set(kdenlive_SRCS
${kdenlive_SRCS}
dvdwizard/dvdwizardchapters.cpp
dvdwizard/dvdwizard.cpp
dvdwizard/dvdwizardmenu.cpp
dvdwizard/dvdwizardvob.cpp
PARENT_SCOPE)
This diff is collapsed.
/***************************************************************************
* Copyright (C) 2008 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#ifndef DVDWIZARD_H
#define DVDWIZARD_H
#include "dvdwizard/dvdwizardchapters.h"
#include "dvdwizard/dvdwizardmenu.h"
#include "dvdwizard/dvdwizardvob.h"
#include "ui_dvdwizardchapters_ui.h"
#include "ui_dvdwizardstatus_ui.h"
#include <QProcess>
#include <QWizard>
#include <QTemporaryFile>
typedef QMap<QString, QRect> stringRectMap;
class DvdWizard : public QWizard
{
Q_OBJECT
public:
explicit DvdWizard(MonitorManager *manager, const QString &url = QString(), QWidget *parent = nullptr);
~DvdWizard() override;
void processSpumux();
private:
DvdWizardVob *m_pageVob;
DvdWizardMenu *m_pageMenu;
Ui::DvdWizardStatus_UI m_status;
KMessageWidget *m_isoMessage;
DvdWizardChapters *m_pageChapters;
QTemporaryFile m_authorFile;
QTemporaryFile m_menuFile;
QTemporaryFile m_menuVobFile;
QTemporaryFile m_letterboxMovie;
QProcess *m_dvdauthor;
QProcess *m_mkiso;
QProcess m_menuJob;
QString m_creationLog;
QListWidgetItem *m_vobitem;
QTemporaryFile m_selectedImage;
QTemporaryFile m_selectedLetterImage;
QTemporaryFile m_highlightedImage;
QTemporaryFile m_highlightedLetterImage;
QTemporaryFile m_menuVideo;
QTemporaryFile m_menuFinalVideo;
QTemporaryFile m_menuImageBackground;
QMenu *m_burnMenu;
int m_previousPage;
void cleanup();
void errorMessage(const QString &text);
void infoMessage(const QString &text);
void processDvdauthor(const QString &menuMovieUrl = QString(), const stringRectMap &buttons = stringRectMap(),
const QStringList &buttonsTarget = QStringList());
private slots:
void slotPageChanged(int page);
void slotRenderFinished(int exitCode, QProcess::ExitStatus status);
void slotIsoFinished(int exitCode, QProcess::ExitStatus status);
void generateDvd();
void slotPreview();
void slotBurn();
void slotGenerate();
void slotAbort();
void slotLoad();
void slotSave();
void slotShowRenderInfo();
void slotShowIsoInfo();
void slotProcessMenuStatus(int, QProcess::ExitStatus status);
};
#endif
/***************************************************************************
* Copyright (C) 2009 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include "dvdwizardchapters.h"
DvdWizardChapters::DvdWizardChapters(MonitorManager *manager, DVDFORMAT format, QWidget *parent)
: QWizardPage(parent)
, m_format(format)
, m_monitor(nullptr)
, m_manager(manager)
{
m_view.setupUi(this);
connect(m_view.vob_list, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &DvdWizardChapters::slotUpdateChaptersList);
connect(m_view.button_add, &QAbstractButton::clicked, this, &DvdWizardChapters::slotAddChapter);
connect(m_view.button_delete, &QAbstractButton::clicked, this, &DvdWizardChapters::slotRemoveChapter);
connect(m_view.chapters_list, &QListWidget::itemSelectionChanged, this, &DvdWizardChapters::slotGoToChapter);
connect(m_view.chapters_box, &QCheckBox::stateChanged, this, &DvdWizardChapters::slotEnableChapters);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
// Build monitor for chapters
auto *vbox = new QVBoxLayout;
m_view.video_frame->setLayout(vbox);
if (m_format == PAL || m_format == PAL_WIDE) {
m_tc.setFormat(25);
} else {
m_tc.setFormat(30000.0 / 1001);
}
}
DvdWizardChapters::~DvdWizardChapters()
{
if (m_monitor) {
m_monitor->stop();
m_manager->removeMonitor(m_monitor);
delete m_monitor;
}
}
void DvdWizardChapters::stopMonitor()
{
if (m_monitor) {
m_monitor->pause();
}
}
void DvdWizardChapters::slotUpdateChaptersList()
{
m_monitor->show();
m_manager->activateMonitor(Kdenlive::DvdMonitor);
m_monitor->start();
m_monitor->slotOpenDvdFile(m_view.vob_list->currentText());
m_monitor->adjustRulerSize(m_view.vob_list->itemData(m_view.vob_list->currentIndex(), Qt::UserRole).toInt());
QStringList currentChaps = m_view.vob_list->itemData(m_view.vob_list->currentIndex(), Qt::UserRole + 1).toStringList();
// insert chapters
QStringList chaptersString;
for (int i = 0; i < currentChaps.count(); ++i) {
chaptersString.append(Timecode::getStringTimecode(currentChaps.at(i).toInt(), m_tc.fps(), true));
}
m_view.chapters_list->clear();
m_view.chapters_list->addItems(chaptersString);
updateMonitorMarkers();
m_monitor->refreshMonitorIfActive();
// bool modified = m_view.vob_list->itemData(m_view.vob_list->currentIndex(), Qt::UserRole + 2).toInt();
}
void DvdWizardChapters::slotAddChapter()
{
int pos = m_monitor->position();
QStringList currentChaps = m_view.vob_list->itemData(m_view.vob_list->currentIndex(), Qt::UserRole + 1).toStringList();
if (currentChaps.contains(QString::number(pos))) {
return;
}
currentChaps.append(QString::number(pos));
QList<int> chapterTimes;
chapterTimes.reserve(currentChaps.count());
for (int i = 0; i < currentChaps.count(); ++i) {
chapterTimes.append(currentChaps.at(i).toInt());
}
std::sort(chapterTimes.begin(), chapterTimes.end());
// rebuild chapters
QStringList chaptersString;
currentChaps.clear();
for (int i = 0; i < chapterTimes.count(); ++i) {
chaptersString.append(Timecode::getStringTimecode(chapterTimes.at(i), m_tc.fps(), true));
currentChaps.append(QString::number(chapterTimes.at(i)));
}
// Save item chapters
m_view.vob_list->setItemData(m_view.vob_list->currentIndex(), currentChaps, Qt::UserRole + 1);
// Mark item as modified
m_view.vob_list->setItemData(m_view.vob_list->currentIndex(), 1, Qt::UserRole + 2);
m_view.chapters_list->clear();
m_view.chapters_list->addItems(chaptersString);
updateMonitorMarkers();
}
void DvdWizardChapters::updateMonitorMarkers()
{
const QStringList chapters = m_view.vob_list->itemData(m_view.vob_list->currentIndex(), Qt::UserRole + 1).toStringList();
QList<CommentedTime> markers;
markers.reserve(chapters.count());
for (const QString &frame : chapters) {
markers << CommentedTime(GenTime(frame.toInt(), m_tc.fps()), QString());
}
// TODO: reimplement makers as model
// m_monitor->setMarkers(markers);
}
void DvdWizardChapters::slotRemoveChapter()
{
int ix = m_view.chapters_list->currentRow();
QStringList currentChaps = m_view.vob_list->itemData(m_view.vob_list->currentIndex(), Qt::UserRole + 1).toStringList();
currentChaps.removeAt(ix);
// Save item chapters
m_view.vob_list->setItemData(m_view.vob_list->currentIndex(), currentChaps, Qt::UserRole + 1);
// Mark item as modified
m_view.vob_list->setItemData(m_view.vob_list->currentIndex(), 1, Qt::UserRole + 2);
// rebuild chapters
QStringList chaptersString;
for (int i = 0; i < currentChaps.count(); ++i) {
chaptersString.append(Timecode::getStringTimecode(currentChaps.at(i).toInt(), m_tc.fps(), true));
}
m_view.chapters_list->clear();
m_view.chapters_list->addItems(chaptersString);
updateMonitorMarkers();
}
void DvdWizardChapters::slotGoToChapter()
{
if (m_view.chapters_list->currentItem()) {
m_monitor->setTimePos(m_tc.reformatSeparators(m_view.chapters_list->currentItem()->text()));
}
}
void DvdWizardChapters::createMonitor(DVDFORMAT format)
{
if (m_monitor == nullptr) {
// TODO: allow monitor with different profile for DVD
QString profile = DvdWizardVob::getDvdProfile(format);
m_monitor = new Monitor(Kdenlive::DvdMonitor, m_manager, this);
m_monitor->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
m_view.video_frame->layout()->addWidget(m_monitor);
m_manager->appendMonitor(m_monitor);
m_monitor->setCustomProfile(profile, m_tc);
m_manager->activateMonitor(Kdenlive::DvdMonitor);
m_monitor->start();
}
}
void DvdWizardChapters::setVobFiles(DVDFORMAT format, const QStringList &movies, const QStringList &durations, const QStringList &chapters)
{
m_format = format;
if (m_format == PAL || m_format == PAL_WIDE) {
m_tc.setFormat(25);
} else {
m_tc.setFormat(30000.0 / 1001);
}
m_view.vob_list->blockSignals(true);
m_view.vob_list->clear();
for (int i = 0; i < movies.count(); ++i) {
m_view.vob_list->addItem(movies.at(i), durations.at(i));
m_view.vob_list->setItemData(i, chapters.at(i).split(QLatin1Char(';')), Qt::UserRole + 1);
}
m_view.vob_list->blockSignals(false);
if (m_view.chapters_box->checkState() == Qt::Checked) {
slotUpdateChaptersList();
}
}
QMap<QString, QString> DvdWizardChapters::chaptersData() const
{
QMap<QString, QString> result;
int max = m_view.vob_list->count();
for (int i = 0; i < max; ++i) {
QString chapters = m_view.vob_list->itemData(i, Qt::UserRole + 1).toStringList().join(QLatin1Char(';'));
result.insert(m_view.vob_list->itemText(i), chapters);
}
return result;
}
QStringList DvdWizardChapters::selectedTitles() const
{
QStringList result;
int max = m_view.vob_list->count();
for (int i = 0; i < max; ++i) {
result.append(m_view.vob_list->itemText(i));
if (!m_view.chapters_box->isChecked()) {
continue;
}
QStringList chapters = m_view.vob_list->itemData(i, Qt::UserRole + 1).toStringList();
for (int j = 0; j < chapters.count(); ++j) {
result.append(Timecode::getStringTimecode(chapters.at(j).toInt(), m_tc.fps(), true));
}
}
return result;
}
QStringList DvdWizardChapters::chapters(int ix) const
{
QStringList result;
QStringList chapters = m_view.vob_list->itemData(ix, Qt::UserRole + 1).toStringList();
for (int j = 0; j < chapters.count(); ++j) {
result.append(Timecode::getStringTimecode(chapters.at(j).toInt(), m_tc.fps(), true));
}
return result;
}
QStringList DvdWizardChapters::selectedTargets() const
{
QStringList result;
int max = m_view.vob_list->count();
for (int i = 0; i < max; ++i) {
// rightJustified: fill with 0s to make menus with more than 9 buttons work (now up to 99 buttons possible)
result.append(QStringLiteral("jump title ") + QString::number(i + 1).rightJustified(2, '0'));
if (!m_view.chapters_box->isChecked()) {
continue;
}
QStringList chapters = m_view.vob_list->itemData(i, Qt::UserRole + 1).toStringList();
for (int j = 0; j < chapters.count(); ++j) {
result.append(QStringLiteral("jump title ") + QString::number(i + 1).rightJustified(2, '0') + QStringLiteral(" chapter ") +
QString::number(j + 1).rightJustified(2, '0'));
}
}
return result;
}
QDomElement DvdWizardChapters::toXml() const
{
QDomDocument doc;
QDomElement xml = doc.createElement(QStringLiteral("xml"));
doc.appendChild(xml);
if (!m_view.chapters_box->isChecked()) {
return doc.documentElement();
}
for (int i = 0; i < m_view.vob_list->count(); ++i) {
QDomElement vob = doc.createElement(QStringLiteral("vob"));
vob.setAttribute(QStringLiteral("file"), m_view.vob_list->itemText(i));
vob.setAttribute(QStringLiteral("chapters"), m_view.vob_list->itemData(i, Qt::UserRole + 1).toStringList().join(QLatin1Char(';')));
xml.appendChild(vob);
}
return doc.documentElement();
}
void DvdWizardChapters::slotEnableChapters(int state)
{
m_view.chapters_frame->setEnabled(state == Qt::Checked);
if (state == Qt::Checked) {
createMonitor(m_format);
slotUpdateChaptersList();
}
}
/***************************************************************************
* Copyright (C) 2009 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#ifndef DVDWIZARDCHAPTERS_H
#define DVDWIZARDCHAPTERS_H
#include "dvdwizardvob.h"
#include "monitor/monitor.h"
#include "monitor/monitormanager.h"
#include "ui_dvdwizardchapters_ui.h"
#include <QWizardPage>
class DvdWizardChapters : public QWizardPage
{
Q_OBJECT
public:
explicit DvdWizardChapters(MonitorManager *manager, DVDFORMAT format, QWidget *parent = nullptr);
~DvdWizardChapters() override;
void changeProfile(DVDFORMAT format);
void setPal(bool isPal);
void setVobFiles(DVDFORMAT format, const QStringList &movies, const QStringList &durations, const QStringList &chapters);
QStringList selectedTitles() const;
QStringList selectedTargets() const;
QStringList chapters(int ix) const;
QDomElement toXml() const;
QMap<QString, QString> chaptersData() const;
void stopMonitor();
void createMonitor(DVDFORMAT format);
private:
Ui::DvdWizardChapters_UI m_view;
DVDFORMAT m_format;
Monitor *m_monitor;
MonitorManager *m_manager;
Timecode m_tc;
void updateMonitorMarkers();
private slots:
void slotUpdateChaptersList();
void slotAddChapter();