Commit 67f2b35b authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Removed debug text

parent aa5a0fc2
......@@ -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 )
......@@ -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;
}
......
......@@ -53,7 +53,6 @@ MainWorkflow::MainWorkflow( int trackCount ) :
MainWorkflow::~MainWorkflow()
{
qDebug() << "MainWorkflow::~MainWorkflow()";
stop();
delete m_renderStartedLock;
......@@ -128,7 +127,6 @@ void MainWorkflow::pause()
{
QMutexLocker lock( m_renderMutex );
qDebug() << "MainWorkflow Pausing Started >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n\n";
m_nbTracksToPause = 0;
for ( unsigned int i = 0; i < m_trackCount; ++i )
{
......@@ -138,7 +136,6 @@ void MainWorkflow::pause()
m_tracks[i]->pause();
}
}
qDebug() << "MainWorkflow Pausing asked completed <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n";
}
void MainWorkflow::nextFrame()
......@@ -262,6 +259,5 @@ void MainWorkflow::trackPaused()
if ( m_nbTracksToPause == 0 )
{
emit mainWorkflowPaused();
qDebug() << "Emitted mainworkflow paused";
}
}
......@@ -92,11 +92,9 @@ unsigned char* TrackWorkflow::renderClip( ClipWorkflow* cw, qint64 currentF
if ( cw->getState() == ClipWorkflow::Paused && pauseAfterRender == false )
{
cw->getStateLock()->unlock();
// qDebug() << "Unpausing clip workflow";
//If we must pause after render, we must NOT wake the renderer thread, or it could render more than one frame
// (since this is for the next/previous frame)
//However, if this is just for a classic unpause, with just don't give a shit :)
// qDebug() << "Unpausing clip";
cw->unpause( true );
cw->getStateLock()->lockForRead();
}
......@@ -128,7 +126,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 +198,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 +257,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,46 +333,33 @@ void TrackWorkflow::pauseClipWorkflow( ClipWorkflow* cw )
cw->getState() == ClipWorkflow::Ready ||
cw->getState() == ClipWorkflow::EndReached )
{
qDebug() << "Pausing a sleeping, ready or EndReached ClipWorkflow, state =" << cw->getState();
qDebug() << "Unlocked state mutex";
cw->getStateLock()->unlock();
qDebug() << "Waiting for sleep mutex";
QMutexLocker lock( cw->getSleepMutex() );
qDebug() << "Got sleep mutex";
cw->queryStateChange( ClipWorkflow::Pausing );
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();
// 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()
......@@ -391,7 +370,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";
m_nbClipToPause = 0;
for ( ; it != end; ++it )
{
......@@ -418,7 +396,6 @@ void TrackWorkflow::pause()
cw->getStateLock()->unlock();
}
}
qDebug() << "End of loop";
m_paused = !m_paused;
}
......@@ -482,6 +459,5 @@ void TrackWorkflow::clipWorkflowPaused()
if ( m_nbClipToPause == 0 )
{
emit trackPaused();
qDebug() << "Emitted track paused";
}
}
......@@ -91,10 +91,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
......@@ -126,7 +124,6 @@ void WorkflowRenderer::checkActions()
switch ( act )
{
case Pause:
qDebug() << "Pausing WorkflowRenderer mediaPlayer";
if ( m_pauseAsked == true )
continue ;
m_pauseAsked = true;
......@@ -189,7 +186,6 @@ void WorkflowRenderer::previousFrame()
void WorkflowRenderer::pauseMainWorkflow()
{
qDebug() << "In pause callback";
if ( m_paused == true )
return ;
m_pausedMediaPlayer = true;
......@@ -198,7 +194,6 @@ void WorkflowRenderer::pauseMainWorkflow()
void WorkflowRenderer::mainWorkflowPaused()
{
qDebug() << "MAIN WORKFLOW PAUSED<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<";
m_paused = true;
m_pauseAsked = false;
emit paused();
......
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