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

Removed debug

parent 9f0abbc3
......@@ -79,7 +79,7 @@ void MediaPlayer::callbacks( const libvlc_event_t* ev
self->emit playing();
break;
case libvlc_MediaPlayerPaused:
qDebug() << "Media player paused";
// qDebug() << "Media player paused";
self->emit paused();
break;
case libvlc_MediaPlayerStopped:
......
......@@ -73,13 +73,11 @@ void ClipWorkflow::checkStateChange()
QWriteLocker lock2( m_stateLock );
if ( m_requiredState != ClipWorkflow::None )
{
qDebug() << "Changed state from" << m_state << "to state" << m_requiredState;
// qDebug() << "Changed state from" << m_state << "to state" << m_requiredState;
m_state = m_requiredState;
m_requiredState = ClipWorkflow::None;
checkSynchronisation( m_state );
}
else
qDebug() << "No state required";
}
void ClipWorkflow::lock( ClipWorkflow* cw, void** pp_ret )
......@@ -93,7 +91,7 @@ void ClipWorkflow::lock( ClipWorkflow* cw, void** pp_ret )
// else
// {
*pp_ret = cw->m_buffer;
qDebug() << "Clip workflow locking <<<<<<<<<<<<<<<<<<<<<<<<<<";
// qDebug() << "Clip workflow locking <<<<<<<<<<<<<<<<<<<<<<<<<<";
// }
}
......@@ -114,15 +112,14 @@ void ClipWorkflow::unlock( ClipWorkflow* cw )
{
QMutexLocker lock( cw->m_condMutex );
qDebug() << "Setting state to Sleeping";
cw->m_state = Sleeping;
cw->m_stateLock->unlock();
//Signal that render has been completed.
cw->m_renderWaitCond->wake();
qDebug() << "Entering condwait";
// qDebug() << "Entering condwait";
cw->m_waitCond->wait( cw->m_condMutex );
qDebug() << "Leaved condwait";
// qDebug() << "Leaved condwait";
cw->m_stateLock->lockForWrite();
cw->m_state = Rendering;
// {
......@@ -133,7 +130,6 @@ void ClipWorkflow::unlock( ClipWorkflow* cw )
}
else if ( cw->m_state == Paused )
{
qDebug() << "Forcing pause inside of unlock";
cw->m_stateLock->unlock();
cw->m_waitCond->wait( cw->m_condMutex );
}
......@@ -283,7 +279,6 @@ void ClipWorkflow::checkSynchronisation( State newState )
m_initWaitCond->wake();
break ;
case Pausing:
qDebug() << "Waking m_pausingStateWaitCond";
m_pausingStateWaitCond->wake();
break ;
default:
......@@ -302,7 +297,7 @@ void ClipWorkflow::setState( State state )
void ClipWorkflow::queryStateChange( State newState )
{
qDebug() << "Querying state change to" << newState;
// qDebug() << "Querying state change to" << newState;
QMutexLocker lock( m_requiredStateLock );
m_requiredState = newState;
}
......@@ -310,7 +305,6 @@ void ClipWorkflow::queryStateChange( State newState )
void ClipWorkflow::wake()
{
m_waitCond->wakeAll();
qDebug() << "Awaked thread";
}
QReadWriteLock* ClipWorkflow::getStateLock()
......@@ -330,7 +324,6 @@ void ClipWorkflow::pause()
setState( Paused );
m_mediaPlayer->pause();
QMutexLocker lock( m_requiredStateLock );
qDebug() << "ClipWorkflow::pause(); Reseting required state";
m_requiredState = ClipWorkflow::None;
}
......
......@@ -126,13 +126,11 @@ void MainWorkflow::pause()
{
QMutexLocker lock( m_renderMutex );
qDebug() << "Pausing.......................";
for ( unsigned int i = 0; i < m_trackCount; ++i )
{
if ( m_tracks[i].activated() == true )
m_tracks[i]->pause();
}
qDebug() << "Pausing completed <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n";
}
void MainWorkflow::nextFrame()
......
......@@ -128,7 +128,6 @@ unsigned char* TrackWorkflow::renderClip( ClipWorkflow* cw, qint64 currentF
// qDebug() << "Querying state back to pause after render";
cw->queryStateChange( ClipWorkflow::Paused );
}
qDebug() << ">>> Awaking ClipWorkflow thread for render";
cw->wake();
}
else if ( cw->getState() == ClipWorkflow::Stopped )
......@@ -201,15 +200,11 @@ void TrackWorkflow::stopClipWorkflow( ClipWorkflow* cw )
}
else if ( cw->getState() == ClipWorkflow::Rendering )
{
qDebug() << "Stopping while rendering";
cw->getStateLock()->unlock();
qDebug() << "Waiting complete render";
cw->waitForCompleteRender();
qDebug() << "Waited ok.";
cw->queryStateChange( ClipWorkflow::Stopping );
cw->wake();
cw->stop();
qDebug() << "Stopped clip workflow";
}
else if ( cw->getState() == ClipWorkflow::Initializing )
{
......@@ -264,7 +259,6 @@ unsigned char* TrackWorkflow::getOutput( qint64 currentFrame )
bool needRepositioning;
bool oneFrameOnlyFlag = false;
qDebug() << "Asking for track output";
// qDebug() << "Checking flag...";
if ( m_oneFrameOnly == 1 )
{
......@@ -341,42 +335,30 @@ void TrackWorkflow::pauseClipWorkflow( ClipWorkflow* cw )
cw->getState() == ClipWorkflow::Ready ||
cw->getState() == ClipWorkflow::EndReached )
{
qDebug() << "Pausing a sleeping, ready or EndReached ClipWorkflow, state =" << cw->getState();
cw->queryStateChange( ClipWorkflow::Pausing );
qDebug() << "Unlocked state mutex";
cw->getStateLock()->unlock();
cw->wake();
}
else if ( cw->getState() == ClipWorkflow::Rendering )
{
qDebug() << "Pausing a rendering clip workflow";
cw->getStateLock()->unlock();
qDebug() << "Waiting for render complete";
cw->waitForCompleteRender();
qDebug() << "Waiting complete";
qDebug() << "Waiting for sleep mutex";
QMutexLocker lock( cw->getSleepMutex() );
qDebug() << "Got sleep mutex";
cw->queryStateChange( ClipWorkflow::Pausing );
cw->wake();
}
else if ( cw->getState() == ClipWorkflow::Initializing )
{
qDebug() << "Pausing a Initializing ClipWorkflow";
cw->getStateLock()->unlock();
//TODO: since a Initializing clipworkflow will pause itself at the end, shouldn't we do nothing ?
cw->waitForCompleteInit();
}
else
{
qDebug() << "Unexpected ClipWorkflow::State when pausing:" << cw->getState();
cw->getStateLock()->unlock();
}
qDebug() << "Waiting for pausing state";
cw->waitForPausingState();
qDebug() << "Waiting ok. Pausing now... ";
cw->pause();
qDebug() << "Clip paused.";
}
void TrackWorkflow::pause()
......@@ -387,7 +369,6 @@ void TrackWorkflow::pause()
QMap<qint64, ClipWorkflow*>::iterator end = m_clips.end();
//FIXME: it's probably bad to iterate over every clip workflows.
qDebug() << "Started track pause loop";
for ( ; it != end; ++it )
{
ClipWorkflow* cw = it.value();
......@@ -407,10 +388,9 @@ void TrackWorkflow::pause()
{
//This should never be used.
//TODO: remove this in a few revision (wrote on July 16 2009 )
qDebug() << "Asking to pause in an already paused state";
// qDebug() << "Asking to pause in an already paused state";
}
}
qDebug() << "End of loop";
m_paused = !m_paused;
}
......
......@@ -90,10 +90,8 @@ void* WorkflowRenderer::lock( void* datas )
return self->m_lastFrame;
if ( self->m_oneFrameOnly < 2 )
{
qDebug() << "\nQuerying new picture";
void* ret = self->m_mainWorkflow->getOutput();
self->m_lastFrame = static_cast<unsigned char*>( ret );
qDebug() << "Got picture";
return ret;
}
else
......@@ -125,7 +123,6 @@ void WorkflowRenderer::checkActions()
switch ( act )
{
case Pause:
qDebug() << "Pausing WorkflowRenderer mediaPlayer";
m_mediaPlayer->pause();
//This will also pause the MainWorkflow via a signal/slot
break ;
......@@ -184,7 +181,6 @@ void WorkflowRenderer::previousFrame()
void WorkflowRenderer::pauseMainWorkflow()
{
qDebug() << "In pause callback";
m_mainWorkflow->pause();
m_paused = true;
}
......
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