aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <[email protected]>2015-07-13 20:52:43 +0200
committerJean-Baptiste Mardelle <[email protected]>2015-07-13 20:52:43 +0200
commit593e6d48b4352a05795aa1cb14a64d17a679050a (patch)
tree175bba39cbb1cb7dcdad5ff41d58feb74e105456
parentd0a5f823534d75f8824d6e29b565df986af49ff1 (diff)
Cleanup & implement monitor mute shortcut
-rw-r--r--data/kdenliveui.rc3
-rw-r--r--src/bin/bin.cpp6
-rw-r--r--src/doc/documentchecker.cpp12
-rw-r--r--src/doc/documentvalidator.cpp12
-rw-r--r--src/doc/kdenlivedoc.cpp3
-rw-r--r--src/mainwindow.cpp4
-rw-r--r--src/monitor/abstractmonitor.h1
-rw-r--r--src/monitor/glwidget.cpp5
-rw-r--r--src/monitor/monitor.cpp13
-rw-r--r--src/monitor/monitor.h1
-rw-r--r--src/monitor/monitormanager.cpp26
-rw-r--r--src/monitor/monitormanager.h5
-rw-r--r--src/project/jobs/jobmanager.cpp9
-rw-r--r--src/project/jobs/jobmanager.h4
-rw-r--r--src/renderer.cpp43
-rw-r--r--src/renderer.h3
-rw-r--r--src/stopmotion/stopmotion.cpp7
-rw-r--r--src/stopmotion/stopmotion.h1
-rw-r--r--src/timeline/timeline.cpp11
19 files changed, 110 insertions, 59 deletions
diff --git a/data/kdenliveui.rc b/data/kdenliveui.rc
index a0bc435..84bf6b9 100644
--- a/data/kdenliveui.rc
+++ b/data/kdenliveui.rc
@@ -1,5 +1,5 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="kdenlive" version="81" translationDomain="kdenlive">
+<kpartgui name="kdenlive" version="82" translationDomain="kdenlive">
<ToolBar name="extraToolBar" >
<text>Extra Toolbar</text>
<Action name="project_render" />
@@ -167,6 +167,7 @@
<Action name="mlt_interlace" />
<Action name="mlt_interpolation" />
<Action name="mlt_gamma" />
+ <Action name="mlt_mute" />
</Menu>
<Action name="switch_monitor" />
<Action name="insert_project_tree" />
diff --git a/src/bin/bin.cpp b/src/bin/bin.cpp
index 31b1144..46af928 100644
--- a/src/bin/bin.cpp
+++ b/src/bin/bin.cpp
@@ -579,7 +579,7 @@ void Bin::setDocument(KdenliveDoc* project)
m_doc = project;
int iconHeight = QFontInfo(font()).pixelSize() * 3.5;
m_iconSize = QSize(iconHeight * m_doc->dar(), iconHeight);
- m_jobManager = new JobManager(this, project->fps());
+ m_jobManager = new JobManager(this);
m_rootFolder = new ProjectFolder(this);
setEnabled(true);
connect(this, SIGNAL(producerReady(QString)), m_doc->renderer(), SLOT(slotProcessingDone(QString)));
@@ -1564,7 +1564,7 @@ void Bin::startJob(const QString &id, AbstractClipJob::JOBTYPE type)
if (clip && !hasPendingJob(id, type)) {
// Launch job
clips << clip;
- m_jobManager->prepareJobs(clips, type);
+ m_jobManager->prepareJobs(clips, m_doc->fps(), type);
}
}
@@ -1810,7 +1810,7 @@ void Bin::startClipJob(const QStringList &params)
}
AbstractClipJob::JOBTYPE jobType = (AbstractClipJob::JOBTYPE) data.takeFirst().toInt();
QList <ProjectClip *>clips = selectedClips();
- m_jobManager->prepareJobs(clips, jobType, data);
+ m_jobManager->prepareJobs(clips, m_doc->fps(), jobType, data);
}
void Bin::slotCancelRunningJob(const QString &id, const QMap<QString, QString> &newProps)
diff --git a/src/doc/documentchecker.cpp b/src/doc/documentchecker.cpp
index c93ae47..7b022ee 100644
--- a/src/doc/documentchecker.cpp
+++ b/src/doc/documentchecker.cpp
@@ -282,8 +282,7 @@ bool DocumentChecker::hasErrorInClips()
if (max > 0) {
// original doc was modified
- QDomElement infoXml = m_doc.elementsByTagName("kdenlivedoc").at(0).toElement();
- infoXml.setAttribute("modified", "1");
+ m_doc.documentElement().setAttribute("modified", "1");
}
// Check clips with available proxies but missing original source clips
@@ -317,8 +316,7 @@ bool DocumentChecker::hasErrorInClips()
if (max > 0) {
// original doc was modified
- QDomElement infoXml = m_doc.elementsByTagName("kdenlivedoc").at(0).toElement();
- infoXml.setAttribute("modified", "1");
+ m_doc.documentElement().setAttribute("modified", "1");
}
connect(m_ui.recursiveSearch, SIGNAL(pressed()), this, SLOT(slotSearchClips()));
@@ -424,8 +422,7 @@ void DocumentChecker::slotSearchClips()
m_ui.recursiveSearch->setEnabled(true);
if (fixed) {
// original doc was modified
- QDomElement infoXml = m_doc.elementsByTagName("kdenlivedoc").at(0).toElement();
- infoXml.setAttribute("modified", "1");
+ m_doc.documentElement().setAttribute("modified", "1");
}
checkStatus();
}
@@ -768,8 +765,7 @@ void DocumentChecker::slotDeleteSelected()
}
}
}
- QDomElement infoXml = m_doc.elementsByTagName("kdenlivedoc").at(0).toElement();
- infoXml.setAttribute("modified", "1");
+ m_doc.documentElement().setAttribute("modified", "1");
checkStatus();
}
}
diff --git a/src/doc/documentvalidator.cpp b/src/doc/documentvalidator.cpp
index b8feb74..b6ab783 100644
--- a/src/doc/documentvalidator.cpp
+++ b/src/doc/documentvalidator.cpp
@@ -287,9 +287,15 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
}
// <kdenlivedoc />
- QDomNode infoXmlNode = m_doc.elementsByTagName("kdenlivedoc").at(0);
- QDomElement infoXml = infoXmlNode.toElement();
- infoXml.setAttribute("upgraded", "1");
+ QDomNode infoXmlNode;
+ QDomElement infoXml;
+ QDomNodeList docs = m_doc.elementsByTagName("kdenlivedoc");
+ if (!docs.isEmpty()) {
+ infoXmlNode = m_doc.elementsByTagName("kdenlivedoc").at(0);
+ infoXml = infoXmlNode.toElement();
+ infoXml.setAttribute("upgraded", "1");
+ }
+ m_doc.documentElement().setAttribute("upgraded", "1");
if (version <= 0.6) {
QDomElement infoXml_old = infoXmlNode.cloneNode(true).toElement(); // Needed for folders
diff --git a/src/doc/kdenlivedoc.cpp b/src/doc/kdenlivedoc.cpp
index 452a24d..734f44b 100644
--- a/src/doc/kdenlivedoc.cpp
+++ b/src/doc/kdenlivedoc.cpp
@@ -197,8 +197,7 @@ KdenliveDoc::KdenliveDoc(const QUrl &url, const QUrl &projectFolder, QUndoGroup
else {
// Document was modified, ask for backup
QDomElement mlt = m_document.documentElement();
- QDomElement info = mlt.firstChildElement("kdenlivedoc");
- if (!info.isNull()) info.setAttribute("modified", 1);
+ mlt.setAttribute("modified", 1);
}
}
}
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index f66cfb1..1facfa9 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1420,12 +1420,11 @@ void MainWindow::slotUpdateProjectProfile(const QString &profile)
m_transitionConfig->slotTransitionItemSelected(NULL, 0, QPoint(), false);
m_clipMonitor->openClip(NULL);
bool updateFps = project->setProfilePath(profile);
- pCore->binController()->resetProfile(profile);
+ project->renderer()->resetBinProfile(profile);
KdenliveSettings::setProject_fps(project->fps());
setWindowTitle(project->description());
setWindowModified(project->isModified());
- project->clipManager()->clearUnusedProducers();
pCore->monitorManager()->resetProfiles(project->timecode());
m_transitionConfig->updateProjectFormat();
m_effectStack->updateProjectFormat(project->timecode());
@@ -1540,6 +1539,7 @@ void MainWindow::connectDocument()
{
KdenliveDoc *project = pCore->projectManager()->current();
Timeline *trackView = pCore->projectManager()->currentTimeline();
+ qDebug()<<"------------------------- CONNECT DOCUMENT\n"<<project->profilePath()<<"\n- - - - -- - - -- -";
pCore->binController()->resetProfile(project->profilePath());
connect(project, SIGNAL(startAutoSave()), pCore->projectManager(), SLOT(slotStartAutoSave()));
connect(project, SIGNAL(reloadEffects()), this, SLOT(slotReloadEffects()));
diff --git a/src/monitor/abstractmonitor.h b/src/monitor/abstractmonitor.h
index 4a48446..16c61f0 100644
--- a/src/monitor/abstractmonitor.h
+++ b/src/monitor/abstractmonitor.h
@@ -83,6 +83,7 @@ public:
virtual ~AbstractMonitor();
virtual AbstractRender *abstractRender() = 0;
bool isActive() const;
+ virtual void mute(bool mute, bool updateIconOnly = false) = 0;
public slots:
virtual void stop() = 0;
diff --git a/src/monitor/glwidget.cpp b/src/monitor/glwidget.cpp
index 3136d23..3df05d8 100644
--- a/src/monitor/glwidget.cpp
+++ b/src/monitor/glwidget.cpp
@@ -71,7 +71,6 @@ GLWidget::GLWidget()
, m_audioWaveDisplayed(false)
, m_fbo(NULL)
{
- qDebug() << "begin";
m_texture[0] = m_texture[1] = m_texture[2] = 0;
qRegisterMetaType<Mlt::Frame>("Mlt::Frame");
qRegisterMetaType<SharedFrame>("SharedFrame");
@@ -122,7 +121,6 @@ GLWidget::~GLWidget()
void GLWidget::initializeGL()
{
- qDebug() << "begin";
if (m_isInitialized) return;
initializeOpenGLFunctions();
@@ -763,6 +761,9 @@ int GLWidget::reconfigure(bool isMulti)
/*if (property("keyer").isValid())
m_consumer->set("keyer", property("keyer").toInt());*/
}
+ int volume = KdenliveSettings::volume();
+ m_consumer->set("volume", (double)volume / 100);
+
if (m_glslManager) {
if (!m_threadStartEvent)
m_threadStartEvent = m_consumer->listen("consumer-thread-started", this, (mlt_listener) onThreadStarted);
diff --git a/src/monitor/monitor.cpp b/src/monitor/monitor.cpp
index 8bb8f26..7a846b8 100644
--- a/src/monitor/monitor.cpp
+++ b/src/monitor/monitor.cpp
@@ -914,6 +914,17 @@ void Monitor::stop()
if (render) render->stop();
}
+void Monitor::mute(bool mute, bool updateIconOnly)
+{
+ if (render) {
+ QIcon icon;
+ if (mute || KdenliveSettings::volume() == 0) icon = QIcon::fromTheme("audio-volume-muted");
+ else icon = QIcon::fromTheme("audio-volume-medium");
+ static_cast <QToolButton *>(m_volumeWidget)->setIcon(icon);
+ if (!updateIconOnly) render->setVolume(mute ? 0 : (double)KdenliveSettings::volume() / 100.0 );
+ }
+}
+
void Monitor::start()
{
if (!isVisible() || !isActive()) return;
@@ -1291,7 +1302,7 @@ void Monitor::slotSetVolume(int volume)
if (volume == 0) icon = QIcon::fromTheme("audio-volume-muted");
else icon = QIcon::fromTheme("audio-volume-medium");
static_cast <QToolButton *>(m_volumeWidget)->setIcon(icon);
- render->slotSetVolume(volume);
+ render->setVolume((double) volume / 100.0);
}
void Monitor::slotShowVolume()
diff --git a/src/monitor/monitor.h b/src/monitor/monitor.h
index 6ed0e32..674792e 100644
--- a/src/monitor/monitor.h
+++ b/src/monitor/monitor.h
@@ -98,6 +98,7 @@ public:
void switchMonitorInfo(bool show);
void switchDropFrames(bool drop);
void updateMonitorGamma();
+ void mute(bool, bool updateIconOnly = false);
protected:
void mousePressEvent(QMouseEvent * event);
diff --git a/src/monitor/monitormanager.cpp b/src/monitor/monitormanager.cpp
index 11b7f06..9dbff14 100644
--- a/src/monitor/monitormanager.cpp
+++ b/src/monitor/monitormanager.cpp
@@ -29,6 +29,8 @@
#include <mlt++/Mlt.h>
#include "klocalizedstring.h"
+#include <KDualAction>
+
#include <QObject>
#include <QTimer>
#include <QDebug>
@@ -117,6 +119,7 @@ bool MonitorManager::activateMonitor(Kdenlive::MonitorId name, bool forceRefresh
m_activeMonitor->parentWidget()->raise();
m_activeMonitor->blockSignals(false);
m_activeMonitor->start();
+ updateAudioIcons();
}
emit checkColorScopes();
return (m_activeMonitor != NULL);
@@ -398,6 +401,12 @@ void MonitorManager::setupActions()
zoneStart->setShortcut(Qt::SHIFT + Qt::Key_I);
pCore->window()->addAction("seek_zone_start", zoneStart);
connect(zoneStart, &QAction::triggered, this, &MonitorManager::slotZoneStart);
+
+ m_muteAction = new KDualAction(i18n("Mute monitor"), i18n("Unmute monitor"), this);
+ m_muteAction->setActiveIcon(QIcon::fromTheme("audio-volume-medium"));
+ m_muteAction->setInactiveIcon(QIcon::fromTheme("audio-volume-muted"));
+ pCore->window()->addAction("mlt_mute", m_muteAction);
+ connect(m_muteAction, SIGNAL(activeChanged(bool)), this, SLOT(slotMuteCurrentMonitor(bool)));
QAction * zoneEnd = new QAction(QIcon::fromTheme("media-seek-forward"), i18n("Go to Zone End"), this);
zoneEnd->setShortcut(Qt::SHIFT + Qt::Key_O);
@@ -458,6 +467,11 @@ void MonitorManager::slotSetInterpolation(int ix)
setConsumerProperty("rescale", value);
}
+void MonitorManager::slotMuteCurrentMonitor(bool active)
+{
+ m_activeMonitor->mute(active);
+}
+
Monitor* MonitorManager::clipMonitor()
{
return m_clipMonitor;
@@ -502,5 +516,13 @@ void MonitorManager::slotSetOutPoint()
}
}
-
-
+void MonitorManager::updateAudioIcons()
+{
+ Monitor *m = static_cast<Monitor *> (m_activeMonitor);
+ if (!m) return;
+ int volume = m->render->volume();
+ m_muteAction->blockSignals(true);
+ m_muteAction->setChecked(volume == 0);
+ m_muteAction->blockSignals(false);
+ m->mute(volume == 0, true);
+}
diff --git a/src/monitor/monitormanager.h b/src/monitor/monitormanager.h
index 0be6324..f264e9e 100644
--- a/src/monitor/monitormanager.h
+++ b/src/monitor/monitormanager.h
@@ -28,6 +28,7 @@
class KdenliveDoc;
class BinController;
+class KDualAction;
namespace Mlt {
class Profile;
@@ -105,6 +106,8 @@ private slots:
void slotSetDeinterlacer(int ix);
/** @brief Set MLT's consumer interpolation method */
void slotSetInterpolation(int ix);
+ /** @brief Switch muting on/off */
+ void slotMuteCurrentMonitor(bool active);
private:
/** @brief Sets up all the actions and attaches them to the collection of MainWindow. */
@@ -115,6 +118,8 @@ private:
Timecode m_timecode;
AbstractMonitor *m_activeMonitor;
QList <AbstractMonitor *>m_monitorsList;
+ KDualAction *m_muteAction;
+ void updateAudioIcons();
signals:
/** @brief When the monitor changed, update the visible color scopes */
diff --git a/src/project/jobs/jobmanager.cpp b/src/project/jobs/jobmanager.cpp
index e5c5fff..233f066 100644
--- a/src/project/jobs/jobmanager.cpp
+++ b/src/project/jobs/jobmanager.cpp
@@ -42,10 +42,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KMessageBox>
#include "ui_scenecutdialog_ui.h"
-JobManager::JobManager(Bin *bin, double fps): QObject()
+JobManager::JobManager(Bin *bin): QObject()
, m_bin(bin)
, m_abortAllJobs(false)
- , m_fps(fps)
{
connect(this, SIGNAL(processLog(QString,int,int,QString)), this, SLOT(slotProcessLog(QString,int,int,QString)));
connect(this, SIGNAL(checkJobProcess()), this, SLOT(slotCheckJobProcess()));
@@ -231,7 +230,7 @@ void JobManager::prepareJobFromTimeline(ProjectClip *clip, const QMap<QString,QS
launchJob(clip, job);
}
-void JobManager::prepareJobs(QList <ProjectClip *>clips, AbstractClipJob::JOBTYPE jobType, const QStringList params)
+void JobManager::prepareJobs(QList <ProjectClip *>clips, double fps, AbstractClipJob::JOBTYPE jobType, const QStringList params)
{
//TODO filter clips
QList <ProjectClip *> matching = filterClips(clips, jobType, params);
@@ -241,11 +240,11 @@ void JobManager::prepareJobs(QList <ProjectClip *>clips, AbstractClipJob::JOBTYP
}
QMap <ProjectClip *, AbstractClipJob *> jobs;
if (jobType == AbstractClipJob::TRANSCODEJOB) {
- jobs = CutClipJob::prepareTranscodeJob(m_fps, matching, params);
+ jobs = CutClipJob::prepareTranscodeJob(fps, matching, params);
} else if (jobType == AbstractClipJob::CUTJOB) {
ProjectClip *clip = matching.first();
double originalFps = clip->getOriginalFps();
- jobs = CutClipJob::prepareCutClipJob(m_fps, originalFps, clip);
+ jobs = CutClipJob::prepareCutClipJob(fps, originalFps, clip);
} else if (jobType == AbstractClipJob::FILTERCLIPJOB) {
jobs = FilterJob::prepareJob(matching, params);
} else if (jobType == AbstractClipJob::PROXYJOB) {
diff --git a/src/project/jobs/jobmanager.h b/src/project/jobs/jobmanager.h
index 0ce8d0e..1a4b029 100644
--- a/src/project/jobs/jobmanager.h
+++ b/src/project/jobs/jobmanager.h
@@ -44,7 +44,7 @@ class JobManager : public QObject
Q_OBJECT
public:
- JobManager(Bin *bin, double fps);
+ JobManager(Bin *bin);
virtual ~JobManager();
/** @brief Discard specific job type for a clip.
@@ -73,7 +73,7 @@ public:
* @param jobType the jobtype requested
* @param type the parameters for the job
*/
- void prepareJobs(QList <ProjectClip *>clips, AbstractClipJob::JOBTYPE jobType, const QStringList params = QStringList());
+ void prepareJobs(QList <ProjectClip *>clips, double fps, AbstractClipJob::JOBTYPE jobType, const QStringList params = QStringList());
/** @brief Filter a list of selected clips to keep only those that match the job type
* @param clips the list of selected clips
diff --git a/src/renderer.cpp b/src/renderer.cpp
index ca3e452..1041082 100644
--- a/src/renderer.cpp
+++ b/src/renderer.cpp
@@ -73,7 +73,6 @@ Render::Render(Kdenlive::MonitorId rendererName, BinController *binController, G
m_name(rendererName),
m_mltConsumer(NULL),
m_mltProducer(NULL),
- m_mltProfile(binController->profile()),
m_showFrameEvent(NULL),
m_pauseEvent(NULL),
m_binController(binController),
@@ -84,6 +83,7 @@ Render::Render(Kdenlive::MonitorId rendererName, BinController *binController, G
m_blackClip(NULL),
m_isActive(false)
{
+ m_mltProfile = binController->profile();
qRegisterMetaType<stringMap> ("stringMap");
analyseAudio = KdenliveSettings::monitor_audio();
//buildConsumer();
@@ -264,7 +264,6 @@ bool Render::hasProfile(const QString &profileName) const
int Render::resetProfile(const QString &profileName, bool dropSceneList)
{
- return 0;
m_refreshTimer.stop();
if (m_mltConsumer) {
if (externalConsumer == KdenliveSettings::external_display()) {
@@ -649,7 +648,7 @@ void Render::processFileProperties()
m_infoMutex.unlock();
// Special case, we just want the thumbnail for existing producer
Mlt::Producer *prod = new Mlt::Producer(*m_binController->getBinProducer(info.clipId));
-
+
// Check if we are using GPU accel, then we need to use alternate producer
if (KdenliveSettings::gpu_accel()) {
QString service = prod->get("mlt_service");
@@ -870,7 +869,7 @@ void Render::processFileProperties()
if (frame) delete frame;
}
// replace clip
- qDebug()<<" / / /CREATED PROD: "<<producer->get("resource");
+ //qDebug()<<" / / /CREATED PROD: "<<producer->get("resource");
m_processingClipId.removeAll(info.clipId);
m_binController->replaceProducer(info.clipId, *producer);
emit gotFileProperties(info, NULL);
@@ -1342,7 +1341,9 @@ int Render::setSceneList(QString playlist, int position)
blockSignals(true);
m_locale = QLocale();
m_locale.setNumberOptions(QLocale::OmitGroupSeparator);
+ m_mltProfile->set_explicit(false);
m_mltProducer = new Mlt::Producer(*m_mltProfile, "xml-string", playlist.toUtf8().constData());
+ m_mltProfile->set_explicit(true);
//qDebug()<<" + + +PLAYLIST: "<<playlist;
//m_mltProducer = new Mlt::Producer(*m_mltProfile, "xml-nogl-string", playlist.toUtf8().constData());
if (!m_mltProducer || !m_mltProducer->is_valid()) {
@@ -1352,8 +1353,6 @@ int Render::setSceneList(QString playlist, int position)
}
m_mltProducer->set("eof", "pause");
checkMaxThreads();
- int volume = KdenliveSettings::volume();
- m_mltProducer->set("meta.volume", (double)volume / 100);
m_mltProducer->optimise();
m_fps = m_mltProducer->get_fps();
@@ -1464,8 +1463,6 @@ int Render::reloadSceneList(QString playlist, int position)
}
m_mltProducer->set("eof", "pause");
checkMaxThreads();
- int volume = KdenliveSettings::volume();
- m_mltProducer->set("meta.volume", (double)volume / 100);
m_mltProducer->optimise();
m_fps = m_mltProducer->get_fps();
@@ -1636,13 +1633,10 @@ double Render::fps() const
int Render::volume() const
{
if (!m_mltConsumer || !m_mltProducer) return -1;
- return ((int) 100 * m_mltProducer->get_double("meta.volume"));
-}
-
-void Render::slotSetVolume(int volume)
-{
- if (!m_mltConsumer || !m_mltProducer) return;
- m_mltProducer->set("meta.volume", (double)volume / 100.0);
+ if (m_mltConsumer->get("mlt_service") == QString("multi")) {
+ return ((int) 100 * m_mltConsumer->get_double("0.volume"));
+ }
+ return ((int) 100 * m_mltConsumer->get_double("volume"));
}
void Render::start()
@@ -4523,4 +4517,23 @@ const QString Render::getBinProperty(const QString &name)
return m_binController->getProperty(name);
}
+void Render::resetBinProfile(const QString &name)
+{
+ m_mltProducer->set_speed(0);
+ if (!m_mltConsumer->is_stopped())
+ m_mltConsumer->stop();
+ m_mltConsumer->purge();
+ m_binController->resetProfile(name);
+ //m_mltConsumer->start();
+}
+void Render::setVolume(double volume)
+{
+ if (m_mltConsumer) {
+ if (m_mltConsumer->get("mlt_service") == QString("multi")) {
+ m_mltConsumer->set("0.volume", volume);
+ } else {
+ m_mltConsumer->set("volume", volume);
+ }
+ }
+}
diff --git a/src/renderer.h b/src/renderer.h
index b6435df..d430ad9 100644
--- a/src/renderer.h
+++ b/src/renderer.h
@@ -342,6 +342,8 @@ class Render: public AbstractRender
void loadExtraProducer(const QString &id, Mlt::Producer *prod);
/** @brief Get a property from the bin's playlist */
const QString getBinProperty(const QString &name);
+ void resetBinProfile(const QString &name);
+ void setVolume(double volume);
private:
@@ -491,7 +493,6 @@ public slots:
void slotSplitView(bool doit);
void slotSwitchFullscreen();
- void slotSetVolume(int volume);
void seekToFrame(int pos);
/** @brief Starts a timer to query for a refresh. */
void doRefresh();
diff --git a/src/stopmotion/stopmotion.cpp b/src/stopmotion/stopmotion.cpp
index 2b0b6b6..3bff0e2 100644
--- a/src/stopmotion/stopmotion.cpp
+++ b/src/stopmotion/stopmotion.cpp
@@ -134,6 +134,10 @@ void StopmotionMonitor::slotPlay()
{
}
+void StopmotionMonitor::mute(bool,bool)
+{
+}
+
void StopmotionMonitor::slotMouseSeek(int /*eventDelta*/, bool /*fast*/)
{
}
@@ -897,6 +901,3 @@ const QString StopmotionWidget::createProducer(const MltVideoProfile &profile, c
}
-
-
-
diff --git a/src/stopmotion/stopmotion.h b/src/stopmotion/stopmotion.h
index 2ba5ae0..0e5e7a3 100644
--- a/src/stopmotion/stopmotion.h
+++ b/src/stopmotion/stopmotion.h
@@ -65,6 +65,7 @@ public:
AbstractRender *abstractRender();
Kdenlive::MonitorId id() const;
void setRender(MltDeviceCapture *render);
+ void mute(bool,bool);
private:
MltDeviceCapture *m_captureDevice;
diff --git a/src/timeline/timeline.cpp b/src/timeline/timeline.cpp
index 78e7ea3..d5e1e48 100644
--- a/src/timeline/timeline.cpp
+++ b/src/timeline/timeline.cpp
@@ -57,10 +57,8 @@ Timeline::Timeline(KdenliveDoc *doc, const QList<QAction *> &actions, bool *ok,
// size_frame->setMaximumHeight();
m_scene = new CustomTrackScene(this);
m_trackview = new CustomTrackView(doc, this, m_scene, parent);
-
if (m_doc->setSceneList() == -1) *ok = false;
else *ok = true;
-
m_ruler = new CustomRuler(doc->timecode(), m_trackview);
connect(m_ruler, SIGNAL(zoneMoved(int,int)), this, SIGNAL(zoneMoved(int,int)));
connect(m_ruler, SIGNAL(adjustZoom(int)), this, SIGNAL(setZoom(int)));
@@ -114,11 +112,9 @@ Timeline::Timeline(KdenliveDoc *doc, const QList<QAction *> &actions, bool *ok,
connect(m_trackview, SIGNAL(updateTrackHeaders()), this, SLOT(slotRepaintTracks()));
connect(m_trackview, SIGNAL(showTrackEffects(int,TrackInfo)), this, SIGNAL(showTrackEffects(int,TrackInfo)));
connect(m_trackview, SIGNAL(updateTrackEffectState(int)), this, SLOT(slotUpdateTrackEffectState(int)));
-
Mlt::Service s(m_doc->renderer()->getProducer()->parent().get_service());
m_tractor = new Mlt::Tractor(s);
parseDocument(m_doc->toXml());
-
connect(m_trackview, SIGNAL(cursorMoved(int,int)), m_ruler, SLOT(slotCursorMoved(int,int)));
connect(m_trackview, SIGNAL(updateRuler(int)), m_ruler, SLOT(updateRuler(int)), Qt::DirectConnection);
@@ -364,7 +360,6 @@ void Timeline::parseDocument(const QDomDocument &doc)
continue;
}
}
-
QDomElement e;
QDomElement p;
m_trackview->setDuration(getTracks());
@@ -377,7 +372,6 @@ void Timeline::parseDocument(const QDomDocument &doc)
int currentPos = propsXml.attribute("position").toInt();
if (currentPos > 0) m_trackview->initCursorPos(currentPos);*/
-
// Rebuild groups
QDomDocument groupsDoc;
groupsDoc.setContent(m_doc->renderer()->getBinProperty("kdenlive:clipgroups"));
@@ -391,12 +385,11 @@ void Timeline::parseDocument(const QDomDocument &doc)
if (!effects.isEmpty()) {
m_doc->saveCustomEffects(effects);
}
-
// Remove Kdenlive extra info from xml doc before sending it to MLT
mlt.removeChild(infoXml);
if (!m_documentErrors.isNull()) KMessageBox::sorry(this, m_documentErrors);
- if (infoXml.hasAttribute("upgraded") || infoXml.hasAttribute("modified")) {
+ if (mlt.hasAttribute("upgraded") || mlt.hasAttribute("modified")) {
// Our document was upgraded, create a backup copy just in case
QString baseFile = m_doc->url().path().section(".kdenlive", 0, 0);
int ct = 0;
@@ -406,7 +399,7 @@ void Timeline::parseDocument(const QDomDocument &doc)
backupFile = baseFile + "_backup" + QString::number(ct) + ".kdenlive";
}
QString message;
- if (infoXml.hasAttribute("upgraded"))
+ if (mlt.hasAttribute("upgraded"))
message = i18n("Your project file was upgraded to the latest Kdenlive document version.\nTo make sure you don't lose data, a backup copy called %1 was created.", backupFile);
else
message = i18n("Your project file was modified by Kdenlive.\nTo make sure you don't lose data, a backup copy called %1 was created.", backupFile);