Update to the new MLT structure (based on patch by Dan Dennedy)

svn path=/trunk/kdenlive/; revision=3393
parent 240667dd
......@@ -16,7 +16,6 @@ set(catalogname kdenlive)
add_definitions (${QT_DEFINITIONS})
FIND_PACKAGE(LIBMLT REQUIRED)
FIND_PACKAGE(LIBMLTPLUS REQUIRED)
find_package(MSGFMT REQUIRED)
find_program(EXTRACTRC_EXECUTABLE extractrc)
......
......@@ -3,7 +3,7 @@
#
FIND_PROGRAM(MLT_CONFIG_EXECUTABLE pkg-config)
EXEC_PROGRAM(${MLT_CONFIG_EXECUTABLE} ARGS --variable=prefix mlt-framework OUTPUT_VARIABLE MLT_PATH )
EXEC_PROGRAM(${MLT_CONFIG_EXECUTABLE} ARGS --variable=prefix mlt++ OUTPUT_VARIABLE MLT_PATH )
MESSAGE(STATUS "Found MLT INSTALL PATH: ${MLT_PATH}")
SET(CMAKE_CXX_FLAGS -DMLT_PREFIX=\\\"\"${MLT_PATH}\"\\\")
......@@ -23,6 +23,22 @@ FIND_LIBRARY(LIBMLT_LIBRARY
MESSAGE(STATUS "Found MLT LIBR: ${LIBMLT_LIBRARY}")
FIND_PATH(LIBMLTPLUS_INCLUDE_DIR
NAMES mlt++/Mlt.h
PATHS ${MLT_PATH}/include /usr/local/include /usr/include
NO_DEFAULT_PATH
)
MESSAGE(STATUS "Found MLT++ INCLUDES: ${LIBMLTPLUS_INCLUDE_DIR}")
FIND_LIBRARY(LIBMLTPLUS_LIBRARY
NAMES mlt++
PATHS ${MLT_PATH}/lib /usr/lib /usr/local/lib
NO_DEFAULT_PATH
)
MESSAGE(STATUS "Found MLT++ LIBR: ${LIBMLTPLUS_LIBRARY}")
IF (LIBMLT_LIBRARY AND LIBMLT_INCLUDE_DIR)
SET( LIBMLT_FOUND 1 )
SET( LIBMLT_LIBRARIES ${LIBMLT_LIBRARY} )
......@@ -30,6 +46,14 @@ ELSE (LIBMLT_LIBRARY AND LIBMLT_INCLUDE_DIR)
SET( LIBMLT_FOUND 0 )
ENDIF (LIBMLT_LIBRARY AND LIBMLT_INCLUDE_DIR)
IF (LIBMLTPLUS_LIBRARY AND LIBMLTPLUS_INCLUDE_DIR)
SET( LIBMLT_FOUND 1 )
SET( LIBMLTPLUS_LIBRARIES ${LIBMLTPLUS_LIBRARY} )
ELSE (LIBMLTPLUS_LIBRARY AND LIBMLTPLUS_INCLUDE_DIR)
SET( LIBMLT_FOUND 0 )
ENDIF (LIBMLTPLUS_LIBRARY AND LIBMLTPLUS_INCLUDE_DIR)
IF (LIBMLT_FOUND)
IF (NOT LIBMLT_FIND_QUIETLY)
MESSAGE(STATUS "Found MLT library: ${LIBMLT_LIBRARY}")
......
......@@ -47,7 +47,7 @@ KUrl SamplePlugin::generatedClip(const QString &generator, const KUrl &projectFo
} else prePath = projectFolder.path() + "/counter";
int ct = 0;
QString counter = QString::number(ct).rightJustified(5, '0', false);
while (QFile::exists(prePath + counter + ".westley")) {
while (QFile::exists(prePath + counter + ".mlt")) {
ct++;
counter = QString::number(ct).rightJustified(5, '0', false);
}
......@@ -63,11 +63,11 @@ KUrl SamplePlugin::generatedClip(const QString &generator, const KUrl &projectFo
view.font->setValue(height);
}
QString clipFile = prePath + counter + ".westley";
QString clipFile = prePath + counter + ".mlt";
view.path->setPath(clipFile);
if (d.exec() == QDialog::Accepted) {
QDomDocument doc;
QDomElement westley = doc.createElement("westley");
QDomElement mlt = doc.createElement("mlt");
QDomElement playlist = doc.createElement("playlist");
if (generator == i18n("Noise")) {
QDomElement prod = doc.createElement("producer");
......@@ -83,15 +83,15 @@ KUrl SamplePlugin::generatedClip(const QString &generator, const KUrl &projectFo
prod.setAttribute("in", "0");
prod.setAttribute("out", QString::number((int) fps));
prod.setAttribute("text", QString::number(view.duration->value() - i));
//FIXME: the font and pad values are approximate, the pango producer seems unable
//FIXME: the font and pad values are approximate, the pango producer seems unable
// to produce a predictable frame size.
prod.setAttribute("font", QString::number(view.font->value()) + "px");
//prod.setAttribute("pad", 50);
playlist.appendChild(prod);
}
}
westley.appendChild(playlist);
doc.appendChild(westley);
mlt.appendChild(playlist);
doc.appendChild(mlt);
QFile file(view.path->url().path());
if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
kWarning() << "////// ERROR writing to file: " << view.path->url().path();
......
......@@ -90,16 +90,16 @@ int main(int argc, char **argv)
fprintf(stderr, "Kdenlive video renderer for MLT.\nUsage: "
"kdenlive_render [-erase] [-kuiserver] [in=pos] [out=pos] [render] [profile] [rendermodule] [player] [src] [dest] [[arg1] [arg2] ...]\n"
" -erase: if that parameter is present, src file will be erased at the end\n"
" -kuiserver: if that parameter is present, use KDE job tracker\n"
" -kuiserver: if that parameter is present, use KDE job tracker\n"
" in=pos: start rendering at frame pos\n"
" out=pos: end rendering at frame pos\n"
" render: path to inigo render\n"
" render: path to MLT melt renderer\n"
" profile: the MLT video profile\n"
" rendermodule: the MLT consumer used for rendering, usually it is avformat\n"
" player: path to video player to play when rendering is over, use '-' to disable playing\n"
" src: source file (usually westley playlist)\n"
" dest: destination file\n"
" args: space separated libavformat arguments\n");
" src: source file (usually MLT XML)\n"
" dest: destination file\n"
" args: space separated libavformat arguments\n");
}
}
......@@ -104,7 +104,7 @@ void RenderJob::slotAbort(const QString& url)
void RenderJob::slotAbort()
{
qDebug() << "Kdenlive-render: JOB ABORTED BY USER...";
qDebug() << "Kdenlive-render: JOB ABORTED BY USER...";
m_renderProcess->kill();
if (m_kdenliveinterface) {
......@@ -132,7 +132,7 @@ void RenderJob::receivedStderr()
QString result = QString(m_renderProcess->readAllStandardError()).simplified();
if (!result.startsWith("Current Frame")) m_errorMessage.append(result + "<br>");
else {
// m_logstream << "ReceivedStderr from inigo: " << result << endl;
// m_logstream << "ReceivedStderr from melt: " << result << endl;
result = result.section(' ', -1);
int pro = result.toInt();
if (pro < 0 || pro > 100) return;
......@@ -142,14 +142,14 @@ void RenderJob::receivedStderr()
if (!m_kdenliveinterface->isValid()) {
delete m_kdenliveinterface;
m_kdenliveinterface = NULL;
// qDebug() << "BROKEN COMMUNICATION WITH KDENLIVE";
// qDebug() << "BROKEN COMMUNICATION WITH KDENLIVE";
} else {
m_dbusargs[1] = pro;
m_kdenliveinterface->callWithArgumentList(QDBus::NoBlock, "setRenderingProgress", m_dbusargs);
}
} else if (pro % 5 == 0) {
// Try to restart communication with Kdenlive every 5 percents
// qDebug() << "TRYING TO RESTART COMMUNICATION WITH KDENLIVE";
// qDebug() << "TRYING TO RESTART COMMUNICATION WITH KDENLIVE";
initKdenliveDbusInterface();
}
......
......@@ -159,6 +159,7 @@ set(kdenlive_SRCS
changecliptypecommand.cpp
documentchecker.cpp
dvdwizardchapters.cpp
documentconvert.cpp
)
add_definitions( ${KDE4_DEFINITIONS} )
......
......@@ -278,8 +278,8 @@ void DocumentChecker::slotDeleteSelected()
QDomNodeList producers = m_doc.elementsByTagName("producer");
QDomNodeList infoproducers = m_doc.elementsByTagName("kdenlive_producer");
QDomElement westley = m_doc.firstChildElement("westley");
QDomElement kdenlivedoc = westley.firstChildElement("kdenlivedoc");
QDomElement mlt = m_doc.firstChildElement("mlt");
QDomElement kdenlivedoc = mlt.firstChildElement("kdenlivedoc");
for (int i = 0; i < infoproducers.count(); i++) {
e = infoproducers.item(i).toElement();
......@@ -294,7 +294,7 @@ void DocumentChecker::slotDeleteSelected()
e = producers.item(i).toElement();
if (deletedIds.contains(e.attribute("id"))) {
// Remove clip
westley.removeChild(e);
mlt.removeChild(e);
break;
}
}
......
This diff is collapsed.
/***************************************************************************
* 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 DOCUMENTCONVERT_H
#define DOCUMENTCONVERT_H
#include <QDomDocument>
#include <QColor>
class DocumentConvert
{
public:
DocumentConvert(QDomDocument doc);
bool doConvert(double version, const double current_version);
bool isModified() const;
private:
bool m_modified;
QDomDocument m_doc;
QString colorToString(const QColor& c);
void convertToMelt();
};
#endif
......@@ -231,7 +231,7 @@ void DvdWizard::generateDvd()
renderbg.start(KdenliveSettings::rendererpath(), args);
if (renderbg.waitForFinished()) {
if (renderbg.exitStatus() == QProcess::CrashExit) {
kDebug() << "/// RENDERING MENU vob crashed";
kDebug() << "/// RENDERING MENU vob crashed";
QByteArray result = renderbg.readAllStandardError();
vobitem->setIcon(KIcon("dialog-close"));
m_status.error_log->setText(result);
......@@ -239,7 +239,7 @@ void DvdWizard::generateDvd()
return;
}
} else {
kDebug() << "/// RENDERING MENU vob timed out";
kDebug() << "/// RENDERING MENU vob timed out";
vobitem->setIcon(KIcon("dialog-close"));
m_status.error_log->setText(i18n("Rendering job timed out"));
m_status.error_box->setHidden(false);
......@@ -282,7 +282,7 @@ void DvdWizard::generateDvd()
else but.setAttribute("up", 'b' + QString::number(max));
QRect r = it.value();
//int target = it.key();
// TODO: solve play all button
// TODO: solve play all button
//if (target == 0) target = 1;
buttonsTarget.append(it.key());
but.setAttribute("x0", QString::number(r.x()));
......@@ -470,7 +470,7 @@ void DvdWizard::slotRenderFinished(int /*exitCode*/, QProcess::ExitStatus status
delete m_dvdauthor;
m_dvdauthor = NULL;
// Check if DVD structure has the necessary infos
// Check if DVD structure has the necessary infos
if (!QFile::exists(m_iso.tmp_folder->url().path() + "/DVD/VIDEO_TS/VIDEO_TS.IFO")) {
m_status.error_log->setText(m_creationLog + '\n' + i18n("DVD structure broken"));
m_status.error_box->setHidden(false);
......@@ -518,7 +518,7 @@ void DvdWizard::slotIsoFinished(int /*exitCode*/, QProcess::ExitStatus status)
delete m_mkiso;
m_mkiso = NULL;
// Check if DVD iso is ok
// Check if DVD iso is ok
QFile iso(m_iso.iso_image->url().path());
if (!iso.exists() || iso.size() == 0) {
if (iso.exists()) {
......
This diff is collapsed.
......@@ -130,7 +130,7 @@ private:
MltVideoProfile m_profile;
QTimer *m_autoSaveTimer;
QString m_searchFolder;
/** tells whether current doc has been changed since last save event */
/** tells whether current doc has been changed since last save event */
bool m_modified;
/** Project folder, used to store project files (titles, effects,...) */
KUrl m_projectFolder;
......@@ -142,9 +142,7 @@ private:
QList <TrackInfo> m_tracksList;
bool convertDocument(double version);
QDomDocument createEmptyDocument(const int videotracks, const int audiotracks);
QString colorToString(const QColor& c);
void setNewClipResource(const QString &id, const QString &path);
QString searchFileRecursively(const QDir &dir, const QString &matchSize, const QString &matchHash) const;
......@@ -167,7 +165,7 @@ signals:
void updateClipDisplay(const QString&);
void deleteTimelineClip(const QString&);
void progressInfo(const QString &, int);
/** emitted when the document state has been modified (= needs saving or not) */
/** emitted when the document state has been modified (= needs saving or not) */
void docModified(bool);
void selectLastAddedClip(const QString &);
void guidesUpdated();
......
......@@ -184,19 +184,21 @@ QPixmap KThumb::getImage(KUrl url, int width, int height)
void KThumb::extractImage(int frame, int frame2)
{
kDebug() << "//extract thumb: " << frame << ", " << frame2;
if (m_url.isEmpty() || !KdenliveSettings::videothumbnails() || m_producer == NULL) return;
const int twidth = (int)(KdenliveSettings::trackheight() * m_dar);
const int theight = KdenliveSettings::trackheight();
mlt_image_format format = mlt_image_yuv422;
if (m_producer->is_blank()) {
QPixmap pix(twidth, theight);
pix.fill(Qt::black);
emit thumbReady(frame, pix);
if (frame != -1) emit thumbReady(frame, pix);
if (frame2 != -1) emit thumbReady(frame2, pix);
return;
}
Mlt::Frame *mltFrame;
mlt_image_format format = mlt_image_yuv422;
if (frame != -1) {
//videoThumbProducer.getThumb(frame);
m_producer->seek(frame);
......@@ -236,7 +238,7 @@ void KThumb::extractImage(int frame, int frame2)
kDebug() << "///// BROKEN FRAME";
QPixmap p(twidth, theight);
p.fill(Qt::red);
emit thumbReady(frame, p);
emit thumbReady(frame2, p);
return;
} else {
int frame_width = 0;
......@@ -275,8 +277,8 @@ QPixmap KThumb::getImage(KUrl url, int frame, int width, int height)
if (url.isEmpty()) return pix;
char *tmp = Render::decodedString(url.path());
//"<westley><playlist><producer resource=\"" + url.path() + "\" /></playlist></westley>");
//Mlt::Producer producer(profile, "westley-xml", tmp);
//"<mlt><playlist><producer resource=\"" + url.path() + "\" /></playlist></mlt>");
//Mlt::Producer producer(profile, "xml-string", tmp);
Mlt::Producer *producer = new Mlt::Producer(profile, tmp);
delete[] tmp;
......@@ -296,13 +298,13 @@ QPixmap KThumb::getImage(QDomElement xml, int frame, int width, int height) {
Mlt::Profile profile((char*) KdenliveSettings::current_profile().data());
QPixmap pix(width, height);
QDomDocument doc;
QDomElement westley = doc.createElement("westley");
QDomElement mlt = doc.createElement("mlt");
QDomElement play = doc.createElement("playlist");
doc.appendChild(westley);
westley.appendChild(play);
doc.appendChild(mlt);
mlt.appendChild(play);
play.appendChild(doc.importNode(xml, true));
char *tmp = Render::decodedString(doc.toString());
Mlt::Producer producer(profile, "westley-xml", tmp);
Mlt::Producer producer(profile, "xml-string", tmp);
delete[] tmp;
if (producer.is_blank()) {
......
......@@ -1163,7 +1163,7 @@ void MainWindow::readOptions()
//Add new settings from 0.7.1
if (KdenliveSettings::defaultprojectfolder().isEmpty()) {
QString path = QDir::homePath() + "/kdenlive";
if (KStandardDirs::makeDir(path) == false) kDebug() << "/// ERROR CREATING PROJECT FOLDER: " << path;
if (KStandardDirs::makeDir(path) == false) kDebug() << "/// ERROR CREATING PROJECT FOLDER: " << path;
KdenliveSettings::setDefaultprojectfolder(path);
}
}
......@@ -1441,24 +1441,24 @@ void MainWindow::parseProfiles(const QString &mltPath)
//KdenliveSettings::setDefaulttmpfolder();
if (!mltPath.isEmpty()) {
KdenliveSettings::setMltpath(mltPath + "/share/mlt/profiles/");
KdenliveSettings::setRendererpath(mltPath + "/bin/inigo");
KdenliveSettings::setRendererpath(mltPath + "/bin/melt");
}
if (KdenliveSettings::mltpath().isEmpty()) {
KdenliveSettings::setMltpath(QString(MLT_PREFIX) + QString("/share/mlt/profiles/"));
}
if (KdenliveSettings::rendererpath().isEmpty()) {
QString inigoPath = QString(MLT_PREFIX) + QString("/bin/inigo");
if (!QFile::exists(inigoPath))
inigoPath = KStandardDirs::findExe("inigo");
else KdenliveSettings::setRendererpath(inigoPath);
if (KdenliveSettings::rendererpath().isEmpty() || KdenliveSettings::rendererpath().endsWith("inigo")) {
QString meltPath = QString(MLT_PREFIX) + QString("/bin/melt");
if (!QFile::exists(meltPath))
meltPath = KStandardDirs::findExe("melt");
KdenliveSettings::setRendererpath(meltPath);
}
QStringList profilesFilter;
profilesFilter << "*";
QStringList profilesList = QDir(KdenliveSettings::mltpath()).entryList(profilesFilter, QDir::Files);
if (profilesList.isEmpty()) {
// Cannot find MLT path, try finding inigo
// Cannot find MLT path, try finding melt
QString profilePath = KdenliveSettings::rendererpath();
if (!profilePath.isEmpty()) {
profilePath = profilePath.section('/', 0, -3);
......@@ -1482,8 +1482,8 @@ void MainWindow::parseProfiles(const QString &mltPath)
}
if (KdenliveSettings::rendererpath().isEmpty()) {
// Cannot find the MLT inigo renderer, ask for location
KUrlRequesterDialog *getUrl = new KUrlRequesterDialog(QString(), i18n("Cannot find the inigo program required for rendering (part of Mlt)"), this);
// Cannot find the MLT melt renderer, ask for location
KUrlRequesterDialog *getUrl = new KUrlRequesterDialog(QString(), i18n("Cannot find the melt program required for rendering (part of Mlt)"), this);
if (getUrl->exec() == QDialog::Rejected) {
::exit(0);
}
......@@ -1580,17 +1580,17 @@ void MainWindow::slotDoRender(const QStringList args, const QStringList overlay_
KTemporaryFile temp;
temp.setAutoRemove(false);
temp.setSuffix(".westley");
temp.setSuffix(".mlt");
if (!scriptExport.isEmpty() || temp.open()) {
if (KdenliveSettings::dropbframes()) {
KdenliveSettings::setDropbframes(false);
m_activeDocument->clipManager()->updatePreviewSettings();
if (!scriptExport.isEmpty()) m_projectMonitor->saveSceneList(scriptExport + ".westley");
if (!scriptExport.isEmpty()) m_projectMonitor->saveSceneList(scriptExport + ".mlt");
else m_projectMonitor->saveSceneList(temp.fileName());
KdenliveSettings::setDropbframes(true);
m_activeDocument->clipManager()->updatePreviewSettings();
} else {
if (!scriptExport.isEmpty()) m_projectMonitor->saveSceneList(scriptExport + ".westley");
if (!scriptExport.isEmpty()) m_projectMonitor->saveSceneList(scriptExport + ".mlt");
else m_projectMonitor->saveSceneList(temp.fileName());
}
......@@ -1608,7 +1608,7 @@ void MainWindow::slotDoRender(const QStringList args, const QStringList overlay_
if (videoPlayer.isEmpty()) KMessageBox::sorry(this, i18n("Cannot play video after rendering because the default video player application is not set.\nPlease define it in Kdenlive settings dialog."));
}
if (!QFile::exists(KdenliveSettings::rendererpath())) {
KMessageBox::sorry(this, i18n("Cannot find the inigo program required for rendering (part of Mlt)"));
KMessageBox::sorry(this, i18n("Cannot find the melt program required for rendering (part of Mlt)"));
setRenderingProgress(dest, -3);
return;
}
......@@ -2312,7 +2312,7 @@ void MainWindow::customEvent(QEvent* e)
{
if (e->type() == QEvent::User) {
// The timeline playing position changed...
kDebug() << "RECEIVED JOG EVEMNT!!!";
kDebug() << "RECEIVED JOG EVEMNT!!!";
}
}
void MainWindow::slotActivateEffectStackView()
......@@ -2505,7 +2505,7 @@ void MainWindow::slotSaveZone(Render *render, QPoint zone)
QLabel *label1 = new QLabel(i18n("Save clip zone as:"), this);
QString path = m_activeDocument->projectFolder().path();
path.append("/");
path.append("untitled.westley");
path.append("untitled.mlt");
KUrlRequester *url = new KUrlRequester(KUrl(path), this);
url->setFilter("video/mlt-playlist");
QLabel *label2 = new QLabel(i18n("Description:"), this);
......@@ -2635,7 +2635,7 @@ void MainWindow::slotShowTimeline(bool show)
void MainWindow::slotMaximizeCurrent(bool show)
{
//TODO: is there a way to maximize current widget?
//TODO: is there a way to maximize current widget?
//if (show == true)
{
m_timelineState = saveState();
......
......@@ -45,13 +45,13 @@ MarkerDialog::MarkerDialog(DocClipBase *clip, CommentedTime t, Timecode tc, cons
m_profile = new Mlt::Profile((char*) KdenliveSettings::current_profile().data());
m_dar = m_profile->dar();
QDomDocument doc;
QDomElement westley = doc.createElement("westley");
QDomElement play = doc.createElement("playlist");
doc.appendChild(westley);
westley.appendChild(play);
QDomElement mlt = doc.createElement("mlt");
QDomElement play = doc.createElement("mlt");
doc.appendChild(mlt);
mlt.appendChild(play);
play.appendChild(doc.importNode(clip->toXML(), true));
//char *tmp = doc.toString().toUtf8().data();
m_producer = new Mlt::Producer(*m_profile, "westley-xml", doc.toString().toUtf8().data());
m_producer = new Mlt::Producer(*m_profile, "xml-string", doc.toString().toUtf8().data());
//delete[] tmp;
QPixmap p((int)(100 * m_dar), 100);
......
......@@ -697,10 +697,10 @@ void Monitor::slotOpenFile(const QString &file)
if (render == NULL) return;
activateMonitor();
QDomDocument doc;
QDomElement westley = doc.createElement("westley");
doc.appendChild(westley);
QDomElement mlt = doc.createElement("mlt");
doc.appendChild(mlt);
QDomElement prod = doc.createElement("producer");
westley.appendChild(prod);
mlt.appendChild(prod);
prod.setAttribute("mlt_service", "avformat");
prod.setAttribute("resource", file);
render->setSceneList(doc, 0);
......
This diff is collapsed.
......@@ -468,7 +468,7 @@ void RenderWidget::slotDeleteProfile(bool refresh)
/*
QString edit = m_view.size_list->currentItem()->data(EditableRole).toString();
if (!edit.endsWith("customprofiles.xml")) {
// This is a KNewStuff installed file, process through KNS
// This is a KNewStuff installed file, process through KNS
KNS::Engine engine(0);
if (engine.init("kdenlive_render.knsrc")) {
KNS::Entry::List entries;
......@@ -602,7 +602,7 @@ void RenderWidget::slotExport(bool scriptExport)
QString filterFile = KStandardDirs::locate("appdata", "metadata.properties");
overlayargs << "meta.attr.timecode=1" << "meta.attr.timecode.markup=#timecode";
overlayargs << "-attach" << "data_feed:attr_check" << "-attach";
overlayargs << "data_show:" + filterFile << "_fezzik=1" << "dynamic=1";
overlayargs << "data_show:" + filterFile << "_loader=1" << "dynamic=1";
}
double startPos = -1;
double endPos = -1;
......@@ -1290,7 +1290,7 @@ void RenderWidget::parseScriptFiles()
m_view.scripts_list->clear();
QTreeWidgetItem *item;
// List the project scripts
// List the project scripts
QStringList scriptFiles = QDir(m_projectFolder + "/scripts").entryList(scriptsFilter, QDir::Files);
for (int i = 0; i < scriptFiles.size(); ++i) {
KUrl scriptpath(m_projectFolder + "/scripts/" + scriptFiles.at(i));
......@@ -1365,7 +1365,7 @@ void RenderWidget::slotDeleteScript()
QTreeWidgetItem *item = m_view.scripts_list->currentItem();
if (item) {
QString path = item->data(0, Qt::UserRole + 1).toString();
KIO::NetAccess::del(path + ".westley", this);
KIO::NetAccess::del(path + ".mlt", this);
KIO::NetAccess::del(path, this);
parseScriptFiles();
}
......
......@@ -209,7 +209,7 @@ void TrackView::parseDocument(QDomDocument doc)
trackduration = slotAddProjectTrack(pos, p, m_doc->isTrackLocked(i - 1));
pos--;
//kDebug() << " PRO DUR: " << trackduration << ", TRACK DUR: " << duration;
//kDebug() << " PRO DUR: " << trackduration << ", TRACK DUR: " << duration;
if (trackduration > duration) duration = trackduration;
} else {
// background black track
......@@ -243,10 +243,10 @@ void TrackView::parseDocument(QDomDocument doc)
p = transitionparams.item(k).toElement();
if (!p.isNull()) {
QString paramName = p.attribute("name");
// do not add audio mixing transitions
// do not add audio mixing transitions
if (paramName == "internal_added" && p.text() == "237") {
transitionAdd = false;
//kDebug() << "// TRANSITRION " << i << " IS NOT VALID (INTERN ADDED)";
//kDebug() << "// TRANSITRION " << i << " IS NOT VALID (INTERN ADDED)";
//break;
} else if (paramName == "a_track") a_track = p.text().toInt();
else if (paramName == "b_track") b_track = p.text().toInt();
......@@ -451,14 +451,14 @@ int TrackView::slotAddProjectTrack(int ix, QDomElement xml, bool locked)
} else id = id.section('_', 0, 0);
DocClipBase *clip = m_doc->clipManager()->getClipById(id);
if (clip == NULL) {
// The clip in playlist was not listed in the kdenlive producers,
// The clip in playlist was not listed in the kdenlive producers,
// something went wrong, repair required.
kWarning() << "CANNOT INSERT CLIP " << id;
clip = getMissingProducer(id);
if (!clip) {
// We cannot find the producer, something is really wrong, add
// placeholder color clip
// placeholder color clip
QDomDocument doc;
QDomElement producerXml = doc.createElement("producer");
doc.appendChild(producerXml);
......@@ -487,7 +487,7 @@ int TrackView::slotAddProjectTrack(int ix, QDomElement xml, bool locked)
clipinfo.endPos = clipinfo.startPos + GenTime(out - in + 1, m_doc->fps());
clipinfo.cropStart = GenTime(in, m_doc->fps());
clipinfo.track = ix;
//kDebug() << "// INSERTING CLIP: " << in << "x" << out << ", track: " << ix << ", ID: " << id << ", SCALE: " << m_scale << ", FPS: " << m_doc->fps();
//kDebug() << "// INSERTING CLIP: " << in << "x" << out << ", track: " << ix << ", ID: " << id << ", SCALE: " << m_scale << ", FPS: " << m_doc->fps();
ClipItem *item = new ClipItem(clip, clipinfo, m_doc->fps(), speed, false);
if (idString.endsWith("_video")) item->setVideoOnly(true);
else if (idString.endsWith("_audio")) item->setAudioOnly(true);
......@@ -695,7 +695,7 @@ DocClipBase *TrackView::getMissingProducer(const QString id) const
break;
}
}
// prepend westley document root if no path in clip resource and not a color clip
// prepend MLT XML document root if no path in clip resource and not a color clip
if (!resource.contains('/') && !resource.startsWith("0x")) resource.prepend(docRoot);
DocClipBase *missingClip = NULL;
if (!resource.isEmpty())
......
......@@ -40,7 +40,7 @@
<item row="1" column="0" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>Inigo path</string>
<string>Melt path</string>
</property>
</widget>
</item>
......
......@@ -31,7 +31,7 @@
#include <QXmlStreamWriter>
#include <QTimer>
const double recommendedMltVersion = 38;
const double recommendedMltVersion = 40;
Wizard::Wizard(bool upgrade, QWidget *parent) :
QWizard(parent)
......@@ -126,17 +126,17 @@ void Wizard::checkMltComponents()
QTreeWidgetItem *mltitem = new QTreeWidgetItem(m_mltCheck.programList);
QTreeWidgetItem *inigoitem = new QTreeWidgetItem(m_mltCheck.programList, QStringList() << QString() << i18n("Inigo") + " (" + KdenliveSettings::rendererpath() + ')');
inigoitem->setData(1, Qt::UserRole, i18n("Required for rendering (part of MLT package)"));
inigoitem->setSizeHint(0, itemSize);
inigoitem->setIcon(0, m_okIcon);
QTreeWidgetItem *meltitem = new QTreeWidgetItem(m_mltCheck.programList, QStringList() << QString() << i18n("Melt") + " (" + KdenliveSettings::rendererpath() + ')');
meltitem->setData(1, Qt::UserRole, i18n("Required for rendering (part of MLT package)"));
meltitem->setSizeHint(0, itemSize);
meltitem->setIcon(0, m_okIcon);
// Check MLT's installed producers
QProcess checkProcess;
checkProcess.start(KdenliveSettings::rendererpath(), QStringList() << "-query" << "producer");
if (!checkProcess.waitForStarted()) {
inigoitem->setIcon(0, m_badIcon);
inigoitem->setData(1, Qt::UserRole, i18n("Error starting MLT's command line player (inigo)"));
meltitem->setIcon(0, m_badIcon);
meltitem->setData(1, Qt::UserRole, i18n("Error starting MLT's command line player (melt)"));
button(QWizard::NextButton)->setEnabled(false);
} else {
checkProcess.waitForFinished();
......@@ -157,7 +157,7 @@ void Wizard::checkMltComponents()
QString mltVersion;
QString exepath = KStandardDirs::findExe("pkg-config");
if (!exepath.isEmpty()) {
checkProcess.start(exepath, QStringList() << "--variable=version" << "mlt-framework");
checkProcess.start(exepath, QStringList() << "--variable=version" << "mlt++");
if (!checkProcess.waitForStarted()) {
kDebug() << "// Error querying MLT's version";
} else {
......@@ -459,7 +459,7 @@ void Wizard::adjustSettings()
KdenliveSettings::setDefault_profile(selectedProfile);
}
QString path = m_extra.projectfolder->url().path();
if (KStandardDirs::makeDir(path) == false) kDebug() << "/// ERROR CREATING PROJECT FOLDER: " << path;
if (KStandardDirs::makeDir(path) == false) kDebug() << "/// ERROR CREATING PROJECT FOLDER: " << path;
KdenliveSettings::setDefaultprojectfolder(path);
}
......@@ -473,7 +473,7 @@ void Wizard::slotCheckMlt()
/*QProcess checkProcess;
checkProcess.start(KdenliveSettings::rendererpath(), QStringList() << "-query" << "producer");
if (!checkProcess.waitForStarted())
errorMessage.append(i18n("Error starting MLT's command line player (inigo)") + ".\n");
errorMessage.append(i18n("Error starting MLT's command line player (melt)") + ".\n");
checkProcess.waitForFinished();
......@@ -483,7 +483,7 @@ void Wizard::slotCheckMlt()
QProcess checkProcess2;
checkProcess2.start(KdenliveSettings::rendererpath(), QStringList() << "-query" << "consumer");
if (!checkProcess2.waitForStarted())
errorMessage.append(i18n("Error starting MLT's command line player (inigo).") + '\n');
errorMessage.append(i18n("Error starting MLT's command line player (melt).") + '\n');
checkProcess2.waitForFinished();
......
......@@ -43,47 +43,47 @@
extern "C"
{
KDE_EXPORT ThumbCreator *new_creator() {
return new WestleyPreview;
return new MltPreview;
}
}
WestleyPreview::WestleyPreview() :
MltPreview::MltPreview() :
QObject(),
ThumbCreator(),
m_inigoprocess(0),
m_meltProcess(0),
m_rand(0)
{
}
WestleyPreview::~WestleyPreview()
MltPreview::~MltPreview()
{
delete m_rand;
delete m_inigoprocess;
delete m_meltProcess;
}
bool WestleyPreview::startAndWaitProcess(const QStringList &args)
bool MltPreview::startAndWaitProcess(const QStringList &args)
{
kDebug(DBG_AREA) << "westleypreview: starting process with args: " << args << endl;
m_inigoprocess->start(args.join(" "));
if (! m_inigoprocess->waitForStarted()) {
kDebug(DBG_AREA) << "westleypreview: PROCESS NOT STARTED!!! exiting\n";
kDebug(DBG_AREA) << "MltPreview: starting process with args: " << args << endl;
m_meltProcess->start(args.join(" "));
if (! m_meltProcess->waitForStarted()) {
kDebug(DBG_AREA) << "MltPreview: PROCESS NOT STARTED!!! exiting\n";
return false;
}
if (! m_inigoprocess->waitForFinished()) {
kDebug(DBG_AREA) << "westleypreview: PROCESS DIDN'T FINISH!! exiting\n";
m_inigoprocess->close();
if (! m_meltProcess->waitForFinished()) {