-void MainWindow::slotUpdateGfxScopeFrameRequest()
-{
- // We need a delay to make sure widgets are hidden after a close event for example
- QTimer::singleShot(500, this, SLOT(slotDoUpdateGfxScopeFrameRequest()));
-}
-
-void MainWindow::slotDoUpdateGfxScopeFrameRequest()
-{
- // Check scopes
- bool request = false;
- for (int i = 0; i < m_gfxScopesList.count(); i++) {
- if (!m_gfxScopesList.at(i)->widget()->visibleRegion().isEmpty() && static_cast<AbstractGfxScopeWidget *>(m_gfxScopesList.at(i)->widget())->autoRefreshEnabled()) {
- kDebug() << "SCOPE VISIBLE: " << static_cast<AbstractGfxScopeWidget *>(m_gfxScopesList.at(i)->widget())->widgetName();
- request = true;
- break;
- }
- }
- if (!request) {
- if (!m_projectMonitor->effectSceneDisplayed()) {
- m_projectMonitor->render->sendFrameForAnalysis = false;
- }
- m_clipMonitor->render->sendFrameForAnalysis = false;
- if (m_recMonitor)
- m_recMonitor->analyseFrames(false);
- } else {
- m_projectMonitor->render->sendFrameForAnalysis = true;
- m_clipMonitor->render->sendFrameForAnalysis = true;
- if (m_recMonitor)
- m_recMonitor->analyseFrames(true);
- }
-}
-
-void MainWindow::slotUpdateAudioScopeFrameRequest()
-{
- QTimer::singleShot(500, this, SLOT(slotDoUpdateAudioScopeFrameRequest()));
-}
-
-void MainWindow::slotDoUpdateAudioScopeFrameRequest()
-{
- bool request = false;
- for (int i = 0; i < m_audioScopesList.count(); i++) {
- if (!m_audioScopesList.at(i)->visibleRegion().isEmpty() && m_audioScopesList.at(i)->autoRefreshEnabled()) {
- kDebug() << "AUDIO SCOPE VISIBLE: " << m_audioScopesList.at(i)->widgetName();
- request = true;
- break;
- }
- }
- // Handle audio signal separately (no common interface)
- if (!m_audiosignal->visibleRegion().isEmpty() && m_audiosignal->monitoringEnabled()) {
- kDebug() << "AUDIO SCOPE VISIBLE: " << "audiosignal";
- request = true;
- }
-#ifdef DEBUG_MAINW
- qDebug() << "Scopes Requesting Audio data: " << request;
-#endif
- KdenliveSettings::setMonitor_audio(request);
- m_monitorManager->slotUpdateAudioMonitoring();
-}
-
-void MainWindow::slotUpdateColorScopes()
-{
- bool request = false;
- for (int i = 0; i < m_gfxScopesList.count(); i++) {
- // Check if we need the renderer to send a new frame for update
- if (!m_gfxScopesList.at(i)->widget()->visibleRegion().isEmpty() && !(static_cast<AbstractGfxScopeWidget *>(m_gfxScopesList.at(i)->widget())->autoRefreshEnabled())) request = true;
- static_cast<AbstractGfxScopeWidget *>(m_gfxScopesList.at(i)->widget())->slotActiveMonitorChanged();
- }
- if (request && m_monitorManager->activeRenderer()) {
- m_monitorManager->activeRenderer()->sendFrameUpdate();
- }
- if (m_audiosignal->isVisible() && m_recMonitor->abstractRender()) {
- connect(m_recMonitor->abstractRender(), SIGNAL(audioSamplesSignal(const QVector<int16_t>&, const int&, const int&, const int&)), m_audiosignal, SLOT(slotReceiveAudio(const QVector<int16_t>&, const int&, const int&, const int&)));
- }
-}
-
-void MainWindow::slotClearColorScopes()
-{
- for (int i = 0; i < m_gfxScopesList.count(); i++) {
- static_cast<AbstractGfxScopeWidget *>(m_gfxScopesList.at(i)->widget())->slotClearMonitor();
- }
-}