[vlmc-devel] MainWorkflow: Denote the playable length of the workflow in the frameChanged signal

Yikai Lu git at videolan.org
Wed May 31 09:01:35 CEST 2017


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Wed May 31 15:56:41 2017 +0900| [a987aa888cf928694fe356eda7606ca2baa6c1e9] | committer: Yikai Lu

MainWorkflow: Denote the playable length of the workflow in the frameChanged signal

> https://code.videolan.org/videolan/vlmc/commit/a987aa888cf928694fe356eda7606ca2baa6c1e9
---

 src/Workflow/MainWorkflow.cpp | 2 +-
 src/Workflow/MainWorkflow.h   | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/Workflow/MainWorkflow.cpp b/src/Workflow/MainWorkflow.cpp
index e622970a..2280a364 100644
--- a/src/Workflow/MainWorkflow.cpp
+++ b/src/Workflow/MainWorkflow.cpp
@@ -72,7 +72,7 @@ MainWorkflow::MainWorkflow( Settings* projectSettings, int trackCount ) :
     connect( m_renderer->eventWatcher(), &RendererEventWatcher::endReached, this, &MainWorkflow::mainWorkflowEndReached );
     connect( m_renderer->eventWatcher(), &RendererEventWatcher::positionChanged, this, [this]( qint64 pos )
     {
-        emit frameChanged( pos, Vlmc::Renderer );
+        emit frameChanged( pos, m_sequenceWorkflow->input()->playableLength(), Vlmc::Renderer );
     } );
 
     m_settings->createVar( SettingValue::List, "tracks", QVariantList(), "", "", SettingValue::Nothing );
diff --git a/src/Workflow/MainWorkflow.h b/src/Workflow/MainWorkflow.h
index 68771bd3..2adea529 100644
--- a/src/Workflow/MainWorkflow.h
+++ b/src/Workflow/MainWorkflow.h
@@ -206,10 +206,12 @@ class   MainWorkflow : public QObject
          *  \brief      Used to notify a change to the timeline and preview widget cursor
          *
          *  \param      newFrame    The new rendered frame
+         *  \param      length      The playable length
          *  \param      reason      The reason for clipanging frame. Usually, if emitted
          *                          from the MainWorkflow, this should be "Renderer"
          */
         void                    frameChanged( qint64 newFrame,
+                                              qint64 length,
                                               Vlmc::FrameChangedReason reason );
 
         /**



More information about the Vlmc-devel mailing list