Commit d51cc7a9 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Compilation fix

Removed debug that I (obviously) merged badly in a previous commit
parent 68bf2757
...@@ -125,13 +125,11 @@ void ClipWorkflow::initialize( LibVLCpp::MediaPlayer* mediaPlayer ) ...@@ -125,13 +125,11 @@ void ClipWorkflow::initialize( LibVLCpp::MediaPlayer* mediaPlayer )
m_mediaPlayer->setMedia( m_clip->getParent()->getVLCMedia() ); m_mediaPlayer->setMedia( m_clip->getParent()->getVLCMedia() );
connect( m_mediaPlayer, SIGNAL( playing() ), this, SLOT( setPosition() ), Qt::DirectConnection ); connect( m_mediaPlayer, SIGNAL( playing() ), this, SLOT( setPosition() ), Qt::DirectConnection );
qDebug() << "Launching playback";
m_mediaPlayer->play(); m_mediaPlayer->play();
} }
void ClipWorkflow::setPosition() void ClipWorkflow::setPosition()
{ {
qDebug() << "Setting position";
disconnect( m_mediaPlayer, SIGNAL( playing() ), this, SLOT( setPosition() ) ); disconnect( m_mediaPlayer, SIGNAL( playing() ), this, SLOT( setPosition() ) );
connect( m_mediaPlayer, SIGNAL( positionChanged() ), this, SLOT( pauseAfterPlaybackStarted() ), Qt::DirectConnection ); connect( m_mediaPlayer, SIGNAL( positionChanged() ), this, SLOT( pauseAfterPlaybackStarted() ), Qt::DirectConnection );
m_mediaPlayer->setPosition( m_clip->getBegin() ); m_mediaPlayer->setPosition( m_clip->getBegin() );
...@@ -143,7 +141,6 @@ void ClipWorkflow::pauseAfterPlaybackStarted() ...@@ -143,7 +141,6 @@ void ClipWorkflow::pauseAfterPlaybackStarted()
disconnect( m_mediaPlayer, SIGNAL( playing() ), this, SLOT( pauseAfterPlaybackStarted() ) ); disconnect( m_mediaPlayer, SIGNAL( playing() ), this, SLOT( pauseAfterPlaybackStarted() ) );
connect( m_mediaPlayer, SIGNAL( paused() ), this, SLOT( pausedMediaPlayer() ), Qt::DirectConnection ); connect( m_mediaPlayer, SIGNAL( paused() ), this, SLOT( pausedMediaPlayer() ), Qt::DirectConnection );
qDebug() << "pausing media";
m_mediaPlayer->pause(); m_mediaPlayer->pause();
} }
......
...@@ -39,22 +39,16 @@ void TrackWorkflow::addClip( Clip* clip, qint64 start ) ...@@ -39,22 +39,16 @@ void TrackWorkflow::addClip( Clip* clip, qint64 start )
void TrackWorkflow::startRender() void TrackWorkflow::startRender()
{ {
m_currentClipWorkflow->initialize( m_mediaPlayer );
while ( m_currentClipWorkflow->isReady() == false )
usleep( 150 );
m_currentClipWorkflow->startRender();
} }
unsigned char* TrackWorkflow::getOutput() unsigned char* TrackWorkflow::getOutput()
{ {
m_waitCondition->wakeAll(); m_waitCondition->wakeAll();
while ( m_currentClipWorkflow->renderComplete() == false ) //Getting all the current frame output.
{
//usleep( 1000 );
}
++m_currentFrame; ++m_currentFrame;
if ( m_currentClipWorkflow->isEndReached() == true ) //Check if end of clip workflow is reached => return NULL
return NULL; //else return the current track output
return m_currentClipWorkflow->getOutput(); return NULL;
} }
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