Commit 4116874f authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Handle fps changes

parent ccd7dc81
......@@ -40,6 +40,7 @@ quint8* WorkflowRenderer::silencedAudioBuffer = NULL;
WorkflowRenderer::WorkflowRenderer() :
m_mainWorkflow( MainWorkflow::getInstance() ),
m_stopping( false ),
m_outputFps( 0.0f ),
m_oldLength( 0 ),
m_renderVideoFrame( NULL ),
m_media( NULL ),
......@@ -355,14 +356,21 @@ WorkflowRenderer::height() const
return height->get().toUInt();
}
float
WorkflowRenderer::outputFps() const
{
const SettingValue *outputFps = SettingsManager::getInstance()->getValue( "VLMC",
"VLMCOutPutFPS" );
return outputFps->get().toDouble();
}
bool
WorkflowRenderer::parametersChanged()
{
const SettingValue *newOutputFpsSV = SettingsManager::getInstance()->getValue( "VLMC",
"VLMCOutPutFPS" );
quint32 newWidth = width();
quint32 newHeight = height();
float newOutputFps = newOutputFpsSV->get().toDouble();
float newOutputFps = outputFps();
if ( newWidth != m_width || newHeight != m_height ||
newOutputFps != m_outputFps )
{
......
......@@ -227,6 +227,18 @@ class WorkflowRenderer : public GenericRenderer
* \return The video height for the underlying WorkflowRenderer
*/
virtual quint32 height() const;
/**
* \return The output fps for this specific render.
*
* The output fps may change according to the rendering target.
* IE the output may be different when previewing and when rendering to a file.
* This method has to be reimplemented in the underlying WorkflowRenderer, to
* adjust itself to the specific renderer fps.
* \warning This may be confused with getFps(), and therefore, one of the
* two should be modified.
*/
virtual float outputFps() const;
/**
* \brief Configure the production chain.
*/
......
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