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() ...@@ -682,7 +682,7 @@ MainWindow::on_actionRender_triggered()
{ {
if ( checkVideoLength() ) if ( checkVideoLength() )
{ {
m_renderer->killRenderer(); m_renderer->stop();
//Setup dialog box for querying render parameters. //Setup dialog box for querying render parameters.
renderVideoSettings( false ); renderVideoSettings( false );
} }
...@@ -693,7 +693,7 @@ MainWindow::on_actionShare_On_Internet_triggered() ...@@ -693,7 +693,7 @@ MainWindow::on_actionShare_On_Internet_triggered()
{ {
if ( checkVideoLength() ) if ( checkVideoLength() )
{ {
m_renderer->killRenderer(); m_renderer->stop();
if( !renderVideoSettings( true ) ) if( !renderVideoSettings( true ) )
return; return;
......
...@@ -34,8 +34,7 @@ WorkflowFileRendererDialog::WorkflowFileRendererDialog( WorkflowFileRenderer* re ...@@ -34,8 +34,7 @@ WorkflowFileRendererDialog::WorkflowFileRendererDialog( WorkflowFileRenderer* re
m_renderer( renderer ) m_renderer( renderer )
{ {
m_ui.setupUi( this ); m_ui.setupUi( this );
connect( m_ui.cancelButton, SIGNAL( clicked() ), m_renderer, SLOT( stop() ) ); connect( m_ui.cancelButton, SIGNAL( clicked() ), this, SLOT( cancel() ) );
connect( m_ui.cancelButton, SIGNAL( clicked() ), this, SLOT( close() ) );
connect( m_renderer, SIGNAL( renderComplete() ), this, SLOT( accept() ) ); connect( m_renderer, SIGNAL( renderComplete() ), this, SLOT( accept() ) );
connect( m_renderer, SIGNAL( frameChanged( qint64 ) ), this, SLOT( frameChanged( qint64 ) ) ); connect( m_renderer, SIGNAL( frameChanged( qint64 ) ), this, SLOT( frameChanged( qint64 ) ) );
connect( m_renderer, SIGNAL( imageUpdated( const uchar* ) ), connect( m_renderer, SIGNAL( imageUpdated( const uchar* ) ),
...@@ -77,3 +76,10 @@ WorkflowFileRendererDialog::frameChanged( qint64 frame ) ...@@ -77,3 +76,10 @@ WorkflowFileRendererDialog::frameChanged( qint64 frame )
setProgressBarValue( frame * 100 / totalFrames ); setProgressBarValue( frame * 100 / totalFrames );
} }
} }
void
WorkflowFileRendererDialog::cancel()
{
m_renderer->stop();
close();
}
...@@ -48,6 +48,7 @@ public slots: ...@@ -48,6 +48,7 @@ public slots:
private slots: private slots:
void frameChanged( qint64 ); void frameChanged( qint64 );
void cancel();
friend class WorkflowFileRenderer; friend class WorkflowFileRenderer;
}; };
......
...@@ -68,12 +68,6 @@ WorkflowFileRenderer::run( const QString& outputFileName, quint32 width, ...@@ -68,12 +68,6 @@ WorkflowFileRenderer::run( const QString& outputFileName, quint32 width,
m_sourceRenderer->start(); m_sourceRenderer->start();
} }
void
WorkflowFileRenderer::stop()
{
WorkflowRenderer::killRenderer();
}
float float
WorkflowFileRenderer::getFps() const WorkflowFileRenderer::getFps() const
{ {
......
...@@ -59,8 +59,6 @@ protected: ...@@ -59,8 +59,6 @@ protected:
virtual Backend::ISourceRenderer::MemoryInputUnlockCallback getUnlockCallback(); virtual Backend::ISourceRenderer::MemoryInputUnlockCallback getUnlockCallback();
private slots: private slots:
//FIXME: Why a slot here versus a method in parent class?!
void stop();
void __frameChanged( qint64 frame, void __frameChanged( qint64 frame,
Vlmc::FrameChangedReason reason ); Vlmc::FrameChangedReason reason );
......
...@@ -74,7 +74,7 @@ WorkflowRenderer::initializeRenderer() ...@@ -74,7 +74,7 @@ WorkflowRenderer::initializeRenderer()
WorkflowRenderer::~WorkflowRenderer() WorkflowRenderer::~WorkflowRenderer()
{ {
killRenderer(); stop();
delete m_esHandler; delete m_esHandler;
delete m_silencedAudioBuffer; delete m_silencedAudioBuffer;
...@@ -277,16 +277,6 @@ WorkflowRenderer::internalPlayPause( bool forcePause ) ...@@ -277,16 +277,6 @@ WorkflowRenderer::internalPlayPause( bool forcePause )
void void
WorkflowRenderer::stop() 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_isRendering = false;
m_paused = false; m_paused = false;
......
...@@ -137,15 +137,6 @@ class WorkflowRenderer : public GenericRenderer ...@@ -137,15 +137,6 @@ class WorkflowRenderer : public GenericRenderer
*/ */
virtual float getFps() const; 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 saveProject( QXmlStreamWriter &project ) const;
void loadProject( const QDomElement& project ); void loadProject( const QDomElement& project );
private: 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