Commit 5fbf6e74 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Correcting a state bug, that was making the mainworkflow believed it just has been paused.

parent b75b6f8a
......@@ -85,11 +85,11 @@ void MediaPlayer::callbacks( const libvlc_event_t* ev
switch ( event->type )
{
case libvlc_MediaPlayerPlaying:
// qDebug() << "Media player playing";
qDebug() << "Media player playing";
self->emit playing();
break;
case libvlc_MediaPlayerPaused:
// qDebug() << "Media player paused";
qDebug() << "Media player paused";
self->emit paused();
break;
case libvlc_MediaPlayerStopped:
......
......@@ -164,7 +164,6 @@ void ClipWorkflow::pauseAfterPlaybackStarted()
void ClipWorkflow::initializedMediaPlayer()
{
disconnect( m_mediaPlayer, SIGNAL( paused() ), this, SLOT( initializedMediaPlayer() ) );
connect( m_mediaPlayer, SIGNAL( paused() ), this, SLOT( pausedMediaPlayer() ), Qt::DirectConnection );
setState( Ready );
}
......@@ -294,6 +293,7 @@ void ClipWorkflow::reinitialize()
void ClipWorkflow::pause()
{
connect( m_mediaPlayer, SIGNAL( paused() ), this, SLOT( pausedMediaPlayer() ), Qt::DirectConnection );
setState( Pausing );
m_mediaPlayer->pause();
QMutexLocker lock( m_requiredStateLock );
......@@ -336,6 +336,7 @@ LibVLCpp::MediaPlayer* ClipWorkflow::getMediaPlayer()
void ClipWorkflow::pausedMediaPlayer()
{
disconnect( m_mediaPlayer, SIGNAL( paused() ), this, SLOT( pausedMediaPlayer() ) );
setState( Paused );
emit paused();
}
......
......@@ -189,6 +189,7 @@ void WorkflowRenderer::mainWorkflowPaused()
QMutexLocker lock( m_condMutex );
}
m_waitCond->wakeAll();
qDebug() << "mainWorkflowPaused();";
emit paused();
}
......@@ -196,6 +197,7 @@ void WorkflowRenderer::mainWorkflowUnpaused()
{
m_paused = false;
m_unpauseAsked = false;
qDebug() << "mainWorkflowUnpaused";
emit playing();
}
......@@ -275,6 +277,7 @@ void WorkflowRenderer::__videoPlaying()
{
m_paused = false;
m_pausedMediaPlayer = false;
qDebug() << "Emmiting playing";
emit playing();
}
}
......
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