Commit 4ba45a6c authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Added permanent rendering.

As soon as a clip is added to the timeline, render is started in paused mode.
This allows the user to move the position slider and gets an updated frame immediatly.
parent ae8c9de5
......@@ -88,6 +88,8 @@ void WorkflowRenderer::initializeRenderer()
connect( m_mainWorkflow, SIGNAL( mainWorkflowEndReached() ), this, SLOT( __endReached() ) );
connect( m_mainWorkflow, SIGNAL( frameChanged( qint64, MainWorkflow::FrameChangedReason ) ),
this, SIGNAL( frameChanged( qint64, MainWorkflow::FrameChangedReason ) ) );
connect( m_mainWorkflow, SIGNAL( lengthChanged( qint64 ) ),
this, SLOT(mainWorkflowLenghtChanged(qint64) ) );
}
WorkflowRenderer::~WorkflowRenderer()
......@@ -453,3 +455,16 @@ void WorkflowRenderer::__endReached()
emit endReached();
}
void
WorkflowRenderer::mainWorkflowLenghtChanged( qint64 newLength )
{
if ( newLength > 0 && m_isRendering == false )
{
startPreview();
togglePlayPause( true );
}
else if ( newLength == 0 && m_isRendering == true )
{
stop();
}
}
......@@ -372,6 +372,13 @@ class WorkflowRenderer : public GenericRenderer
* \brief called when the workflow is unpaused
*/
void mainWorkflowUnpaused();
/**
* \brief Used to launch "permanent playback", as soon as the length
* first changed to a non zero value.
*
* If the length comes to a 0 value again, the permanent playback will be stoped.
*/
void mainWorkflowLenghtChanged( qint64 newLength );
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment