Commit 295c52c5 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen
Browse files

More debug for next/previous step on project render.

parent 68f40c44
......@@ -87,7 +87,7 @@ void ClipWorkflow::lock( ClipWorkflow* cw, void** pp_ret )
// else
// {
*pp_ret = cw->m_buffer;
// qDebug() << "Clip workflow locking";
qDebug() << "Clip workflow locking";
// }
}
......@@ -101,10 +101,10 @@ void ClipWorkflow::unlock( ClipWorkflow* cw )
cw->m_stateLock->unlock();
QMutexLocker lock( cw->m_condMutex );
// 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;
// {
......
......@@ -99,6 +99,7 @@ unsigned char* MainWorkflow::getOutput()
qDebug() << "Returning last frame";
return m_lastRenderedFrame;
}
qDebug() << "Computing frame";
if ( m_renderStarted == true )
{
unsigned char* ret;
......@@ -235,5 +236,5 @@ void MainWorkflow::clipMoved( QUuid clipUuid, int oldTrack, int newTra
void MainWorkflow::activateOneFrameOnly()
{
m_renderOnlyOneFrame = 1;
// m_lastRenderedFrame = NULL;
m_lastRenderedFrame = NULL;
}
......@@ -246,7 +246,10 @@ unsigned char* TrackWorkflow::getOutput( qint64 currentFrame )
m_forceRepositionning = false;
}
else
{
qDebug() << currentFrame - lastFrame;
needRepositioning = ( currentFrame - lastFrame != 1 ) ? true : false;
}
}
while ( it != end )
{
......
......@@ -146,7 +146,25 @@ void RenderPreviewWidget::nextFrame()
void RenderPreviewWidget::previousFrame()
{
{
QWriteLocker lock( m_framePlayedLock );
m_framePlayed = false;
}
//FIXME: MainWorkflow should be paused
m_mainWorkflow->previousFrame();
qDebug() << "Activated one frame only";
m_mainWorkflow->activateOneFrameOnly();
m_mainWorkflow->pause();
m_mediaPlayer->play();
bool framePlayed = false;
while ( framePlayed == false )
{
SleepMS( 50 );
QReadLocker lock( m_framePlayedLock );
framePlayed = m_framePlayed;
}
m_mediaPlayer->pause();
m_mainWorkflow->pause();
}
void RenderPreviewWidget::togglePlayPause( bool forcePause )
......
Supports Markdown
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