]> git.sesse.net Git - kdenlive/commitdiff
* try to use kdenlive_render from same directory as kdenlive
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 28 Sep 2008 00:53:41 +0000 (00:53 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 28 Sep 2008 00:53:41 +0000 (00:53 +0000)
* remove unused files

svn path=/branches/KDE4/; revision=2416

src/CMakeLists.txt
src/mainwindow.cpp
src/renderjob.cpp [deleted file]
src/renderjob.h [deleted file]

index a28ad5901b758abd874581f061d161b614b15019..00a554b9e04692d9c609ecdf7d3ae102bfad61ac 100644 (file)
@@ -105,7 +105,6 @@ set(kdenlive_SRCS
   effectslistwidget.cpp
   titledocument.cpp
   transition.cpp
-  renderjob.cpp
   renderwidget.cpp
   abstractclipitem.cpp
   transitionsettings.cpp
index 67316c90a5a44fcf6626a89d708b3bc526885c26..ac291b4e7b6e619e8c45b58353d342992faa33ad 100644 (file)
@@ -59,7 +59,6 @@
 #include "profilesdialog.h"
 #include "projectsettings.h"
 #include "events.h"
-#include "renderjob.h"
 #include "clipmanager.h"
 #include "projectlist.h"
 #include "monitor.h"
@@ -965,7 +964,10 @@ void MainWindow::parseProfiles() {
         KdenliveSettings::setMltpath(QString(MLT_PREFIX) + QString("/share/mlt/profiles/"));
     }
     if (KdenliveSettings::rendererpath().isEmpty()) {
-        KdenliveSettings::setRendererpath(KStandardDirs::findExe("inigo"));
+       QString inigoPath = QString(MLT_PREFIX) + QString("/bin/inigo");
+       if (!QFile::exists(inigoPath)) 
+           inigoPath = KStandardDirs::findExe("inigo");
+       else KdenliveSettings::setRendererpath(inigoPath);
     }
     QStringList profilesFilter;
     profilesFilter << "*";
@@ -1073,8 +1075,9 @@ void MainWindow::slotDoRender(const QString &dest, const QString &render, const
             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."));
         }
         args << KdenliveSettings::rendererpath() << m_activeDocument->profilePath() << render << videoPlayer << temp.fileName() << dest << avformat_args;
-        QProcess::startDetached("kdenlive_render", args);
-        kDebug() << "///  STARTING RENDER PROCESS\n\nARGS:\n" << args;
+       QString renderer = QCoreApplication::applicationDirPath() + QString("/kdenlive_render");
+       if (!QFile::exists(renderer)) renderer = "kdenlive_render";
+        QProcess::startDetached(renderer, args);
     }
 }
 
diff --git a/src/renderjob.cpp b/src/renderjob.cpp
deleted file mode 100644 (file)
index 4031ebc..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/***************************************************************************
- *   Copyright (C) 2007 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 <KDebug>
-#include <KLocale>
-#include <kuiserverjobtracker.h>
-
-#include "renderjob.h"
-#include "timecode.h"
-#include "kdenlivesettings.h"
-
-
-
-RenderJob::RenderJob(KUrl scenelist, KUrl dest) : KJob(), m_scenelist(scenelist), m_dest(dest), m_progress(0) {
-    m_renderProcess = new KProcess;
-    *m_renderProcess << "inigo" << scenelist.path() << "-consumer" << "avformat:" + m_dest.path() << "progress=1";
-    connect(m_renderProcess, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotIsOver(int, QProcess::ExitStatus)));
-    connect(m_renderProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(receivedStderr()));
-    connect(m_renderProcess, SIGNAL(readyReadStandardError()), this, SLOT(receivedStderr()));
-    m_renderProcess->setOutputChannelMode(KProcess::OnlyStderrChannel);
-    m_renderProcess->start();
-
-}
-
-
-RenderJob::~RenderJob() {
-}
-
-void RenderJob::receivedStderr() {
-    QString result = QString(m_renderProcess->readAllStandardError());
-    result = result.simplified();
-    result = result.section(" ", -1);
-    int pro = result.toInt();
-    if (pro > m_progress) {
-        m_progress = pro;
-        update();
-    }
-}
-
-void RenderJob::start() {
-    registerJob(this);
-}
-
-void RenderJob::registerJob(KJob *job) {
-    KIO::getJobTracker()->registerJob(job);
-    emit description(this, "Rendering " + m_dest.fileName(),
-                     qMakePair(QString("source"), m_scenelist.path()),
-                     qMakePair(QString("destination"), m_dest.path()));
-}
-
-void RenderJob::unregisterJob(KJob *job) {
-    KIO::getJobTracker()->unregisterJob(job);
-}
-
-
-unsigned long RenderJob::percent() const {
-    return m_progress;
-}
-
-void RenderJob::update() {
-    setPercent(percent());
-}
-
-void RenderJob::slotIsOver(int exitcode, QProcess::ExitStatus status) {
-    emitResult();
-    KIO::getJobTracker()->unregisterJob(this);
-}
-
-#include "renderjob.moc"
diff --git a/src/renderjob.h b/src/renderjob.h
deleted file mode 100644 (file)
index d084b0d..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/***************************************************************************
- *   Copyright (C) 2007 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 RENDERJOB_H
-#define RENDERJOB_H
-
-#include <KJob>
-#include <KUrl>
-#include <KProcess>
-#include <kio/job.h>
-#include <kio/filejob.h>
-
-#include "gentime.h"
-#include "definitions.h"
-
-class RenderJob : public KJob {
-    Q_OBJECT
-public:
-    RenderJob(KUrl scenelist, KUrl dest);
-    ~RenderJob();
-
-    void registerJob(KJob *);
-    void unregisterJob(KJob *);
-
-    void start();
-    unsigned long percent() const;
-
-private slots:
-    void update();
-    void slotIsOver(int exitcode, QProcess::ExitStatus status);
-    void receivedStderr();
-
-private:
-    KUrl m_scenelist;
-    KUrl m_dest;
-    int m_progress;
-    KProcess *m_renderProcess;
-};
-
-#endif