Commit 3d9ffd59 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

ClipRenderer: Remove the notion of endReached. Stopped is enough here

parent c5e1fbbe
...@@ -46,7 +46,6 @@ ClipRenderer::ClipRenderer() : ...@@ -46,7 +46,6 @@ ClipRenderer::ClipRenderer() :
connect( m_mediaPlayer, SIGNAL( playing() ), this, SIGNAL( playing() ) ); connect( m_mediaPlayer, SIGNAL( playing() ), this, SIGNAL( playing() ) );
connect( m_mediaPlayer, SIGNAL( volumeChanged() ), this, SIGNAL( volumeChanged() ) ); connect( m_mediaPlayer, SIGNAL( volumeChanged() ), this, SIGNAL( volumeChanged() ) );
connect( m_mediaPlayer, SIGNAL( timeChanged( qint64 ) ),this, SLOT( __timeChanged( qint64 ) ) ); connect( m_mediaPlayer, SIGNAL( timeChanged( qint64 ) ),this, SLOT( __timeChanged( qint64 ) ) );
connect( m_mediaPlayer, SIGNAL( endReached() ), this, SLOT( __endReached() ) );
} }
ClipRenderer::~ClipRenderer() ClipRenderer::~ClipRenderer()
...@@ -256,6 +255,9 @@ ClipRenderer::previewWidgetCursorChanged( qint64 newFrame ) ...@@ -256,6 +255,9 @@ ClipRenderer::previewWidgetCursorChanged( qint64 newFrame )
void void
ClipRenderer::__videoStopped() ClipRenderer::__videoStopped()
{ {
m_isRendering = false;
if ( m_mediaChanged == true )
m_clipLoaded = false;
emit frameChanged( 0, Vlmc::Renderer ); emit frameChanged( 0, Vlmc::Renderer );
emit stopped(); emit stopped();
} }
...@@ -268,19 +270,8 @@ ClipRenderer::__timeChanged( qint64 time ) ...@@ -268,19 +270,8 @@ ClipRenderer::__timeChanged( qint64 time )
fps = m_selectedClip->getMedia()->fps(); fps = m_selectedClip->getMedia()->fps();
qint64 f = qRound64( (qreal)time / 1000.0 * fps ); qint64 f = qRound64( (qreal)time / 1000.0 * fps );
if ( f >= m_end ) if ( f >= m_end )
{
__endReached();
return ; return ;
}
f = f - m_begin; f = f - m_begin;
emit frameChanged( f, Vlmc::Renderer ); emit frameChanged( f, Vlmc::Renderer );
} }
void
ClipRenderer::__endReached()
{
m_mediaPlayer->stop();
m_isRendering = false;
if ( m_mediaChanged == true )
m_clipLoaded = false;
}
...@@ -90,7 +90,6 @@ public slots: ...@@ -90,7 +90,6 @@ public slots:
* \sa frameChanged(); * \sa frameChanged();
*/ */
void __timeChanged( qint64 time ); void __timeChanged( qint64 time );
void __endReached();
void __videoStopped(); void __videoStopped();
}; };
......
...@@ -185,10 +185,6 @@ protected: ...@@ -185,10 +185,6 @@ protected:
QWidget* m_renderWidget; QWidget* m_renderWidget;
public slots: public slots:
/**
* \brief This SLOT has to be called when the render ends.
*/
virtual void __endReached() = 0;
/** /**
* \brief This SLOT will be called when the time cursor has changed. * \brief This SLOT will be called when the time cursor has changed.
* *
......
...@@ -452,7 +452,6 @@ WorkflowRenderer::loadProject( const QDomElement &project ) ...@@ -452,7 +452,6 @@ WorkflowRenderer::loadProject( const QDomElement &project )
void void
WorkflowRenderer::__endReached() WorkflowRenderer::__endReached()
{ {
//FIXME: Is this necessary?!
stop(); stop();
} }
......
...@@ -317,7 +317,7 @@ class WorkflowRenderer : public GenericRenderer ...@@ -317,7 +317,7 @@ class WorkflowRenderer : public GenericRenderer
* \brief Called when the workflow end is reached. * \brief Called when the workflow end is reached.
* \sa stop(); * \sa stop();
*/ */
void __endReached(); virtual void __endReached();
private slots: private slots:
/** /**
......
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