#include "monitormanager.h"
+#include "renderer.h"
#include "kdenlivesettings.h"
#include <mlt++/Mlt.h>
void MonitorManager::activateMonitor(QString name)
{
- if (m_blocked || m_clipMonitor == NULL) return;
- if (m_activeMonitor == name) return;
+ if (m_blocked || m_clipMonitor == NULL || m_projectMonitor == NULL)
+ return;
+ if (m_activeMonitor == name)
+ return;
if (name == "clip") {
m_projectMonitor->stop();
m_clipMonitor->start();
emit raiseClipMonitor(false);
}
m_activeMonitor = name;
+ emit checkColorScopes();
}
-void MonitorManager::slotSwitchMonitors()
+void MonitorManager::slotSwitchMonitors(bool activateClip)
{
- if (m_blocked || m_clipMonitor == NULL) return;
- if (m_clipMonitor->isActive()) {
- m_clipMonitor->stop();
- m_projectMonitor->start();
- m_activeMonitor = m_projectMonitor->name();
- emit raiseClipMonitor(false);
- } else {
- m_projectMonitor->stop();
- m_clipMonitor->start();
- m_activeMonitor = m_clipMonitor->name();
- emit raiseClipMonitor(true);
- }
+ if (activateClip)
+ activateMonitor("clip");
+ else
+ activateMonitor("project");
}
void MonitorManager::stopActiveMonitor()
else m_projectMonitor->slotPlay();
}
+void MonitorManager::slotPause()
+{
+ stopActiveMonitor();
+}
+
void MonitorManager::slotPlayZone()
{
if (m_clipMonitor->isActive()) m_clipMonitor->slotPlayZone();
{
if (m_blocked) return;
if (m_projectMonitor == NULL || m_clipMonitor == NULL) return;
+ QString active = m_activeMonitor;
activateMonitor("clip");
m_clipMonitor->resetProfile(KdenliveSettings::current_profile());
+ m_clipMonitor->updateTimecodeFormat();
activateMonitor("project");
m_projectMonitor->resetProfile(KdenliveSettings::current_profile());
+ m_projectMonitor->updateTimecodeFormat();
//m_projectMonitor->refreshMonitor(true);
+ activateMonitor(active);
+}
+
+void MonitorManager::slotRefreshCurrentMonitor()
+{
+ if (m_clipMonitor->isActive()) m_clipMonitor->refreshMonitor();
+ else m_projectMonitor->refreshMonitor();
}
+void MonitorManager::slotUpdateAudioMonitoring()
+{
+ // if(...) added since they are 0x0 when the config wizard is running! --Granjow
+ if (m_clipMonitor) {
+ m_clipMonitor->render->analyseAudio = KdenliveSettings::monitor_audio();
+ }
+ if (m_projectMonitor) {
+ m_projectMonitor->render->analyseAudio = KdenliveSettings::monitor_audio();
+ }
+}
#include "monitormanager.moc"