[vlmc-devel] commit: FileRendererDialog: Check and set progress. (Rohit Yadav )

Rohit Yadav rohityadav89 at gmail.com
Sat Oct 30 13:43:06 CEST 2010


Turns out sometimes when the project is rendered (into a file), VLMC tries
to render more frames then max. possible which leads to a crash or a thread
deadlock.
My conclusion is that the workflow (both file and project) needs attention.

Best Regards,
Rohit Yadav

On Sat, Oct 30, 2010 at 5:08 PM, <git at videolan.org> wrote:

> vlmc | branch: master | Rohit Yadav <rohityadav89 at gmail.com> | Sat Oct 30
> 17:23:04 2010 +0530| [2b52d996a402cc8835ec8693254ae7d0c915399b] | committer:
> Rohit Yadav
>
> FileRendererDialog: Check and set progress.
> Apply HACKING on function implementation.
>
> >
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=2b52d996a402cc8835ec8693254ae7d0c915399b
> ---
>
>  src/Gui/WorkflowFileRendererDialog.cpp |   23 ++++++++++++++++-------
>  1 files changed, 16 insertions(+), 7 deletions(-)
>
> diff --git a/src/Gui/WorkflowFileRendererDialog.cpp
> b/src/Gui/WorkflowFileRendererDialog.cpp
> index 8d6fd7b..78fb0ad 100644
> --- a/src/Gui/WorkflowFileRendererDialog.cpp
> +++ b/src/Gui/WorkflowFileRendererDialog.cpp
> @@ -43,28 +43,37 @@ WorkflowFileRendererDialog::WorkflowFileRendererDialog(
> WorkflowFileRenderer* re
>              Qt::QueuedConnection );
>  }
>
> -void    WorkflowFileRendererDialog::setOutputFileName( const QString&
> outputFileName )
> +void
> +WorkflowFileRendererDialog::setOutputFileName( const QString&
> outputFileName )
>  {
>     m_ui.nameLabel->setText( outputFileName );
>     m_ui.previewLabel->setMinimumSize( m_width, m_height );
>     setWindowTitle( "Rendering to " + outputFileName );
>  }
>
> -void    WorkflowFileRendererDialog::setProgressBarValue( int val )
> +void
> +WorkflowFileRendererDialog::setProgressBarValue( int val )
>  {
>     m_ui.progressBar->setValue( val );
>  }
>
> -void    WorkflowFileRendererDialog::updatePreview( const uchar* buff )
> +void
> +WorkflowFileRendererDialog::updatePreview( const uchar* buff )
>  {
>     m_ui.previewLabel->setPixmap(
>             QPixmap::fromImage( QImage( buff, m_width, m_height,
>                                         QImage::Format_RGB32 ) ) );
>  }
>
> -void    WorkflowFileRendererDialog::frameChanged( qint64 frame )
> +void
> +WorkflowFileRendererDialog::frameChanged( qint64 frame )
>  {
> -    m_ui.frameCounter->setText( tr("Rendering frame %1 /
> %2").arg(QString::number( frame ),
> -
>  QString::number(MainWorkflow::getInstance()->getLengthFrame() ) ) );
> -    setProgressBarValue( frame * 100 /
> MainWorkflow::getInstance()->getLengthFrame() );
> +    qint64 totalFrames = MainWorkflow::getInstance()->getLengthFrame();
> +
> +    if ( frame <= totalFrames )
> +    {
> +        m_ui.frameCounter->setText( tr("Rendering frame %1 /
> %2").arg(QString::number( frame ),
> +                                        QString::number( totalFrames ) )
> );
> +        setProgressBarValue( frame * 100 / totalFrames );
> +    }
>  }
>
> _______________________________________________
> Vlmc-devel mailing list
> Vlmc-devel at videolan.org
> http://mailman.videolan.org/listinfo/vlmc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlmc-devel/attachments/20101030/a9c73c99/attachment.htm>


More information about the Vlmc-devel mailing list