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