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

Removed debug

parent cfdc1f55
......@@ -116,10 +116,8 @@ void ClipWorkflow::unlock( ClipWorkflow* cw )
cw->m_stateLock->unlock();
//Signal that render has been completed.
cw->m_renderWaitCond->wake();
qDebug() << "Render completed";
cw->emit renderComplete( cw );
qDebug() << "Entering condwait";
cw->m_waitCond->wait( cw->m_condMutex );
// qDebug() << "Leaved condwait";
cw->m_stateLock->lockForWrite();
......
......@@ -134,12 +134,10 @@ unsigned char* MainWorkflow::getOutput()
if ( ret == NULL )
ret = MainWorkflow::blackOutput;
nextFrame();
qDebug() << "Getoutput complete";
return ret;
}
else
{
qDebug() << "Getoutput empty";
return MainWorkflow::blackOutput;
}
}
......@@ -299,26 +297,20 @@ void MainWorkflow::tracksRenderCompleted( unsigned int trackId )
//therefore, m_nbTracksToRender will be equal to -1
if ( m_nbTracksToRender <= 0 )
{
qDebug() << "MainWorkflow render completed";
//Just a synchronisation barriere
{
QMutexLocker lock( m_synchroneRenderWaitConditionMutex );
}
m_synchroneRenderWaitCondition->wakeAll();
}
else
qDebug() << m_nbTracksToRender << "tracks left to render";
}
unsigned char* MainWorkflow::getSynchroneOutput()
{
m_synchroneRenderWaitConditionMutex->lock();
getOutput();
qDebug() << "Waiting for synchrone output";
m_synchroneRenderWaitCondition->wait( m_synchroneRenderWaitConditionMutex );
qDebug() << "Got it";
m_synchroneRenderWaitConditionMutex->unlock();
qDebug() << (void*)m_synchroneRenderingBuffer;
if ( m_synchroneRenderingBuffer == NULL )
return MainWorkflow::blackOutput;
return m_synchroneRenderingBuffer;
......
......@@ -102,7 +102,6 @@ unsigned char* TrackWorkflow::renderClip( ClipWorkflow* cw, qint64 currentF
}
if ( cw->getState() == ClipWorkflow::Rendering )
{
qDebug() << "Rendering a 'Rendering' ClipWorkflow";
//The rendering state meens... whell it means that the frame is
//beeing rendered, so we wait.
cw->getStateLock()->unlock();
......@@ -116,7 +115,6 @@ unsigned char* TrackWorkflow::renderClip( ClipWorkflow* cw, qint64 currentF
//If frame has been rendered :
if ( cw->getState() == ClipWorkflow::Sleeping || pauseAfterRender == true )
{
qDebug() << "renderign a sleeping clip worjkflow";
cw->getStateLock()->unlock();
if ( needRepositioning == true )
......@@ -238,7 +236,7 @@ void TrackWorkflow::stopClipWorkflow( ClipWorkflow* cw )
}
else
{
qDebug() << "Unexpected ClipWorkflow::State when stopping :" << cw->getState();
// qDebug() << "Unexpected ClipWorkflow::State when stopping :" << cw->getState();
cw->getStateLock()->unlock();
}
}
......@@ -267,7 +265,6 @@ void TrackWorkflow::stop()
unsigned char* TrackWorkflow::getOutput( qint64 currentFrame )
{
qDebug() << "Getting track output";
QReadLocker lock( m_clipsLock );
unsigned char* ret = NULL;
......@@ -331,13 +328,8 @@ unsigned char* TrackWorkflow::getOutput( qint64 currentFrame )
}
if ( ret == NULL )
{
qDebug() << "No output";
clipWorkflowRenderCompleted( NULL );
}
else
{
qDebug() << "Got output";
}
return ret;
}
......@@ -494,14 +486,8 @@ void TrackWorkflow::clipWorkflowRenderCompleted( ClipWorkflow* cw )
//or equal to 0
if ( m_nbClipToRender <= 0 )
{
qDebug() << "TrackWorkflow render is completed. Buffer =" << (void*)m_synchroneRenderBuffer;
emit renderCompleted( m_trackId );
}
else
{
qDebug() << "Trackworfklow render isn't complete yet." << m_nbClipToRender << "cw remaining";
}
qDebug() << "End of method";
}
unsigned char* TrackWorkflow::getSynchroneOutput()
......
......@@ -84,37 +84,31 @@ WorkflowRenderer::~WorkflowRenderer()
void* WorkflowRenderer::lock( void* datas )
{
qDebug() << "WorkflowRenderer::lock()";
WorkflowRenderer* self = reinterpret_cast<WorkflowRenderer*>( datas );
//If we're not playing, then where in a paused media player.
if ( self->m_pausedMediaPlayer == true )
{
qDebug() << "Returning last frame, since media player is paused";
return self->m_lastFrame;
}
if ( self->m_oneFrameOnly < 2 )
{
void* ret = self->m_mainWorkflow->getSynchroneOutput();
self->m_lastFrame = static_cast<unsigned char*>( ret );
qDebug() << "Returning new frame";
return ret;
}
else
{
qDebug() << "Returning last frame, due to m_oneFrameOnly flag (" << self->m_oneFrameOnly << ")";
return self->m_lastFrame;
}
}
void WorkflowRenderer::unlock( void* datas )
{
qDebug() << __func__;
WorkflowRenderer* self = reinterpret_cast<WorkflowRenderer*>( datas );
if ( self->m_oneFrameOnly == 1 )
{
self->m_mediaPlayer->pause();
qDebug() << "Switching m_oneFrameOnly flag to 2";
self->m_oneFrameOnly = 2;
}
self->m_framePlayed = true;
......@@ -196,10 +190,8 @@ void WorkflowRenderer::previousFrame()
void WorkflowRenderer::pauseMainWorkflow()
{
qDebug() << "Pausing main workflow, setting m_pausedMediaPlayer to true... ?";
if ( m_paused == true )
return ;
qDebug() << "Indeed. Setting m_pausedMediaPlayer to true";
m_pausedMediaPlayer = true;
m_mainWorkflow->pause();
}
......@@ -274,7 +266,6 @@ void WorkflowRenderer::__videoPaused()
void WorkflowRenderer::__videoPlaying()
{
emit playing();
qDebug() << "Setting m_pausedMediaPlayer to false";
m_pausedMediaPlayer = false;
m_paused = false;
}
......
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