]> git.sesse.net Git - kdenlive/blobdiff - src/monitor.cpp
Merge branch 'master' into bugfix/jogshuttle
[kdenlive] / src / monitor.cpp
index ccdce950d04d512769f24e3f0c57e74002c80f26..9a08767e208553c90c67db781fca65c10ac61b82 100644 (file)
@@ -202,7 +202,7 @@ Monitor::Monitor(Kdenlive::MONITORID id, MonitorManager *manager, QString profil
     m_toolbar->addWidget(spacer);
     m_timePos = new TimecodeDisplay(m_monitorManager->timecode(), this);
     m_toolbar->addWidget(m_timePos);
-    connect(m_timePos, SIGNAL(editingFinished()), this, SLOT(slotSeek()));
+    connect(m_timePos, SIGNAL(timeCodeEditingFinished()), this, SLOT(slotSeek()));
     m_toolbar->setMaximumHeight(s * 1.5);
     layout->addWidget(m_toolbar);
 }
@@ -226,6 +226,7 @@ QWidget *Monitor::container()
 bool Monitor::createOpenGlWidget(QWidget *parent, const QString profile)
 {
     render = new Render(id(), 0, profile, this);
+    kDebug()<<"+++++++++++++\nCREATED OPENGL WIDG\n++++++++++++++";
     m_glWidget = new VideoGLWidget(parent);
     if (m_glWidget == NULL) {
         // Creation failed, we are in trouble...
@@ -366,8 +367,8 @@ void Monitor::updateMarkers(DocClipBase *source)
                 QAction *go = m_markerMenu->addAction(position);
                 go->setData(pos);
             }
-            m_ruler->setMarkers(marks);
-        } else m_ruler->setMarkers(QList <int>());
+        }
+       m_ruler->setMarkers(markers);
         m_markerMenu->setEnabled(!m_markerMenu->isEmpty());
     }
 }
@@ -742,7 +743,7 @@ void Monitor::stop()
 void Monitor::start()
 {
     if (!isVisible() || !isActive()) return;
-    if (render) render->doRefresh();// start();
+    if (render) render->startConsumer();
 }
 
 void Monitor::refreshMonitor(bool visible)
@@ -829,6 +830,7 @@ void Monitor::slotSetClipProducer(DocClipBase *clip, QPoint zone, bool forceUpda
 {
     if (render == NULL) return;
     if (clip == NULL && m_currentClip != NULL) {
+       m_currentClip->lastSeekPosition = render->seekFramePosition();
         kDebug()<<"// SETTING NULL CLIP MONITOR";
         m_currentClip = NULL;
         m_length = -1;
@@ -837,8 +839,9 @@ void Monitor::slotSetClipProducer(DocClipBase *clip, QPoint zone, bool forceUpda
     }
 
     if (clip != m_currentClip || forceUpdate) {
+       if (m_currentClip) m_currentClip->lastSeekPosition = render->seekFramePosition();
         m_currentClip = clip;
-        if (m_currentClip) slotActivateMonitor();
+       if (position == -1) position = clip->lastSeekPosition;
         updateMarkers(clip);
         Mlt::Producer *prod = NULL;
         if (clip) prod = clip->getCloneProducer();