[vlmc-devel] [PATCH] WorkflowRenderer: Don't pass arguments to setupRenderer

Hugo Beauzée-Luyssen hugo at beauzee.fr
Tue Apr 12 15:26:52 CEST 2016


On 04/12/2016 03:16 PM, yikei lu wrote:
> Could someone review this?
>
> 2016-04-11 1:11 GMT+09:00 Yikai Lu <luyikei.qmltu at gmail.com>:
>> ---
>>   src/Renderer/WorkflowRenderer.cpp | 16 ++++++++--------
>>   src/Renderer/WorkflowRenderer.h   |  2 +-
>>   2 files changed, 9 insertions(+), 9 deletions(-)
>>
>> diff --git a/src/Renderer/WorkflowRenderer.cpp b/src/Renderer/WorkflowRenderer.cpp
>> index ea5a450..c6fafc2 100644
>> --- a/src/Renderer/WorkflowRenderer.cpp
>> +++ b/src/Renderer/WorkflowRenderer.cpp
>> @@ -72,15 +72,15 @@ WorkflowRenderer::~WorkflowRenderer()
>>   }
>>
>>   void
>> -WorkflowRenderer::setupRenderer( quint32 width, quint32 height, double fps, const QString& ar )
>> +WorkflowRenderer::setupRenderer()
>>   {
>> -    m_source->setWidth( width );
>> -    m_source->setHeight( height );
>> -    m_source->setFps( fps );
>> -    m_source->setAspectRatio( qPrintable( ar ) );
>> +    m_source->setWidth( m_width );
>> +    m_source->setHeight( m_height );
>> +    m_source->setFps( m_outputFps );
>> +    m_source->setAspectRatio( qPrintable( m_aspectRatio ) );
>>       m_source->setNumberChannels( m_nbChannels );
>>       m_source->setSampleRate( m_rate );
>> -    m_esHandler->fps = fps;
>> +    m_esHandler->fps = m_outputFps;
>>
>>
>>       delete m_sourceRenderer;
>> @@ -236,7 +236,7 @@ WorkflowRenderer::startRenderToFile( const QString& outputFileName, quint32 widt
>>       m_aspectRatio = ar;
>>
>>       initFilters();
>> -    setupRenderer( width, height, fps, ar );
>> +    setupRenderer();
>>       m_sourceRenderer->setOutputFile( qPrintable( outputFileName ) );
>>       m_sourceRenderer->setOutputAudioBitrate( abitrate );
>>       m_sourceRenderer->setOutputVideoBitrate( vbitrate );
>> @@ -261,7 +261,7 @@ WorkflowRenderer::startPreview()
>>       m_aspectRatio = project->aspectRatio();
>>
>>       initFilters();
>> -    setupRenderer( m_width, m_height, m_outputFps, m_aspectRatio );
>> +    setupRenderer();
>>       m_mainWorkflow->setFullSpeedRender( false );
>>       start();
>>   }
>> diff --git a/src/Renderer/WorkflowRenderer.h b/src/Renderer/WorkflowRenderer.h
>> index 6bd3534..e8a12f4 100644
>> --- a/src/Renderer/WorkflowRenderer.h
>> +++ b/src/Renderer/WorkflowRenderer.h
>> @@ -214,7 +214,7 @@ class   WorkflowRenderer : public GenericRenderer
>>           /**
>>            *  \brief          Configure the production chain.
>>            */
>> -        void                setupRenderer(quint32 width, quint32 height, double fps , const QString& ar);
>> +        void                setupRenderer();
>>
>>       protected:
>>           MainWorkflow*       m_mainWorkflow;
>> --
>> 1.9.1
>>
> _______________________________________________
> Vlmc-devel mailing list
> Vlmc-devel at videolan.org
> https://mailman.videolan.org/listinfo/vlmc-devel
>

LGTM, though I'd expect the startPreview method to ultimately take the 
same parameters as startRenderToFile (minus the filename, obviously) so 
that we can have a preview which isn't the size of the project. It could 
make sense to even offer the preview resolution as a VLMC setting.

The way I see it, we don't need to have the full resolution of the video 
for the preview. A minified version (something like QVGA/VGA) should be 
enough for the basic rendering.
But that's a future plan, we would need to preprocess all videos as they 
are used in a project.
In any case, patch applied, thanks :)


More information about the Vlmc-devel mailing list