[vlmc-devel] [PATCH 7/7] WorkflowRenderer: Configure a temporary FileTarget

yikei lu luyikei.qmltu at gmail.com
Sun Apr 17 10:03:43 CEST 2016


well we can set WidgetTarget everytime we click the play button :)

void
PreviewWidget::on_pushButtonPlay_clicked()

2016-04-17 17:02 GMT+09:00 yikei lu <luyikei.qmltu at gmail.com>:
> I meant project preview in MainWindow, not that in a dialog. Sorry if
> I misunderstand something.
>
> void
> MainWindow::setupProjectPreview()
> {
>     m_projectPreview = new PreviewWidget;
>     m_projectPreview->setRenderer( Core::instance()->workflowRenderer() );
>
> 2016-04-17 16:57 GMT+09:00 Hugo Beauzée-Luyssen <hugo at beauzee.fr>:
>> On 04/17/2016 09:47 AM, yikei lu wrote:
>>>
>>> Because
>>>
>>> PreviewWidget::setRenderer is called once, which setRenderTarget(
>>> WidgetTarget ). So if we overwrite it with FileTarget, we can't show
>>> project preview anymore :(
>>>
>>> 2016-04-17 16:33 GMT+09:00 Hugo Beauzée-Luyssen <hugo at beauzee.fr>:
>>>>
>>>> On 04/16/2016 08:22 AM, Yikai Lu wrote:
>>>>>
>>>>>
>>>>> ---
>>>>>    src/Renderer/WorkflowRenderer.cpp | 6 +++++-
>>>>>    1 file changed, 5 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/src/Renderer/WorkflowRenderer.cpp
>>>>> b/src/Renderer/WorkflowRenderer.cpp
>>>>> index 7056555..77d524f 100644
>>>>> --- a/src/Renderer/WorkflowRenderer.cpp
>>>>> +++ b/src/Renderer/WorkflowRenderer.cpp
>>>>> @@ -35,6 +35,7 @@
>>>>>    #include "GenericRenderer.h"
>>>>>    #include "Backend/IBackend.h"
>>>>>    #include "Backend/ISource.h"
>>>>> +#include "Backend/Target/FileTarget.h"
>>>>>    #include "Workflow/MainWorkflow.h"
>>>>>    #include "Gui/preview/RenderWidget.h"
>>>>>    #include "Settings/Settings.h"
>>>>> @@ -227,7 +228,10 @@ WorkflowRenderer::startRenderToFile( const QString&
>>>>> outputFileName, quint32 widt
>>>>>        m_aspectRatio = ar;
>>>>>
>>>>>        setupRenderer();
>>>>> -    m_sourceRenderer->setOutputFile( qPrintable( outputFileName ) );
>>>>> +
>>>>> +    Backend::FileTarget fileTarget( qPrintable( outputFileName ) );
>>>>> +    fileTarget.configure( m_sourceRenderer );
>>>>> +
>>>>>        m_sourceRenderer->setOutputAudioBitrate( abitrate );
>>>>>        m_sourceRenderer->setOutputVideoBitrate( vbitrate );
>>>>>        connect( m_mainWorkflow, &MainWorkflow::mainWorkflowEndReached,
>>>>> this, &WorkflowRenderer::renderComplete );
>>>>>
>>>>
>>>> Why not using setRenderTarget? I agree that this should work, but it
>>>> seems
>>>> inconsistent with your previous commit
>>>>
>>>> Regards,
>>>> _______________________________________________
>>>> Vlmc-devel mailing list
>>>> Vlmc-devel at videolan.org
>>>> https://mailman.videolan.org/listinfo/vlmc-devel
>>>
>>> _______________________________________________
>>> Vlmc-devel mailing list
>>> Vlmc-devel at videolan.org
>>> https://mailman.videolan.org/listinfo/vlmc-devel
>>>
>> Actually it's expected not to show the preview. Internally, if you are
>> rendering to a widget, VLC will pace the output to the required framerate.
>> If you're rendering to a file, there's is no need to pace, and the renderer
>> should be allowed to process as fast as possible.
>> That's why we had the signal with a frame preview when rendering to a file.
>>
>> _______________________________________________
>> Vlmc-devel mailing list
>> Vlmc-devel at videolan.org
>> https://mailman.videolan.org/listinfo/vlmc-devel


More information about the Vlmc-devel mailing list