Commit 18e413af authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

WorkflowRenderer: Remove duplicated killRenderer method

parent 5f971004
......@@ -682,7 +682,7 @@ MainWindow::on_actionRender_triggered()
{
if ( checkVideoLength() )
{
m_renderer->killRenderer();
m_renderer->stop();
//Setup dialog box for querying render parameters.
renderVideoSettings( false );
}
......@@ -693,7 +693,7 @@ MainWindow::on_actionShare_On_Internet_triggered()
{
if ( checkVideoLength() )
{
m_renderer->killRenderer();
m_renderer->stop();
if( !renderVideoSettings( true ) )
return;
......
......@@ -34,8 +34,7 @@ WorkflowFileRendererDialog::WorkflowFileRendererDialog( WorkflowFileRenderer* re
m_renderer( renderer )
{
m_ui.setupUi( this );
connect( m_ui.cancelButton, SIGNAL( clicked() ), m_renderer, SLOT( stop() ) );
connect( m_ui.cancelButton, SIGNAL( clicked() ), this, SLOT( close() ) );
connect( m_ui.cancelButton, SIGNAL( clicked() ), this, SLOT( cancel() ) );
connect( m_renderer, SIGNAL( renderComplete() ), this, SLOT( accept() ) );
connect( m_renderer, SIGNAL( frameChanged( qint64 ) ), this, SLOT( frameChanged( qint64 ) ) );
connect( m_renderer, SIGNAL( imageUpdated( const uchar* ) ),
......@@ -77,3 +76,10 @@ WorkflowFileRendererDialog::frameChanged( qint64 frame )
setProgressBarValue( frame * 100 / totalFrames );
}
}
void
WorkflowFileRendererDialog::cancel()
{
m_renderer->stop();
close();
}
......@@ -48,6 +48,7 @@ public slots:
private slots:
void frameChanged( qint64 );
void cancel();
friend class WorkflowFileRenderer;
};
......
......@@ -68,12 +68,6 @@ WorkflowFileRenderer::run( const QString& outputFileName, quint32 width,
m_sourceRenderer->start();
}
void
WorkflowFileRenderer::stop()
{
WorkflowRenderer::killRenderer();
}
float
WorkflowFileRenderer::getFps() const
{
......
......@@ -59,8 +59,6 @@ protected:
virtual Backend::ISourceRenderer::MemoryInputUnlockCallback getUnlockCallback();
private slots:
//FIXME: Why a slot here versus a method in parent class?!
void stop();
void __frameChanged( qint64 frame,
Vlmc::FrameChangedReason reason );
......
......@@ -74,7 +74,7 @@ WorkflowRenderer::initializeRenderer()
WorkflowRenderer::~WorkflowRenderer()
{
killRenderer();
stop();
delete m_esHandler;
delete m_silencedAudioBuffer;
......@@ -277,16 +277,6 @@ WorkflowRenderer::internalPlayPause( bool forcePause )
void
WorkflowRenderer::stop()
{
//Since we want permanent render (to have a permanent render update, we shouldn't
//stop, but pause
// togglePlayPause( true );
// m_mainWorkflow->setCurrentFrame( 0, MainWorkflow::Renderer );
killRenderer();
}
void
WorkflowRenderer::killRenderer()
{
m_isRendering = false;
m_paused = false;
......
......@@ -137,15 +137,6 @@ class WorkflowRenderer : public GenericRenderer
*/
virtual float getFps() const;
/**
* \brief Completely kill the renderer.
*
* This will stop both mainworkflow and renderer thread.
* This should only be used when destroying the renderer.
* \sa stop();
*/
void killRenderer();
void saveProject( QXmlStreamWriter &project ) const;
void loadProject( const QDomElement& project );
private:
......
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