Commit 3da987ce authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Corrected connection type, updated debug messages

parent ac6bec4a
......@@ -30,7 +30,7 @@ Instance::Instance()
{
char const *argv[] =
{
// "-vvvvv",
"-vvvvv",
"--no-skip-frames",
// "--intf", "dummy",
"--text-renderer", "dummy",
......
......@@ -67,7 +67,7 @@ void WorkflowRenderer::initializeRenderer()
strcat( inputSlave, audioParameters );
m_media = new LibVLCpp::Media( "imem://" + QString( videoString ) );
m_media->addOption( inputSlave );
// m_media->addOption( inputSlave );
sprintf( callbacks, "imem-get=%lld", (qint64)WorkflowRenderer::lock );
m_media->addOption( callbacks );
......
......@@ -86,8 +86,8 @@ void ClipWorkflow::loadingComplete()
{
adjustBegin();
disconnect( m_mediaPlayer, SIGNAL( playing() ), this, SLOT( loadingComplete() ) );
connect( m_mediaPlayer, SIGNAL( playing() ), this, SLOT( mediaPlayerUnpaused() ), Qt::DirectConnection );
connect( m_mediaPlayer, SIGNAL( paused() ), this, SLOT( mediaPlayerPaused() ), Qt::DirectConnection );
connect( m_mediaPlayer, SIGNAL( playing() ), this, SLOT( mediaPlayerUnpaused() ) );
connect( m_mediaPlayer, SIGNAL( paused() ), this, SLOT( mediaPlayerPaused() ) );
QMutexLocker lock( m_initWaitCond->getMutex() );
setState( Rendering );
qDebug() << "Waking init wait cond";
......@@ -219,7 +219,7 @@ void ClipWorkflow::postGetOutput()
m_mediaPlayer->pause();
}
else
qCritical() << "Running out of output buffers !";
qCritical() << "Running out of computed buffers !";
}
}
......@@ -231,7 +231,9 @@ void ClipWorkflow::commonUnlock()
{
qWarning() << "Pausing media player";
setState( ClipWorkflow::PauseRequired );
qDebug() << "State has been set...calling pause method.";
m_mediaPlayer->pause();
qDebug() << "Pause method has been called";
}
if ( getComputedBuffers() == 1 )
{
......
......@@ -135,6 +135,7 @@ void* TrackWorkflow::renderClip( ClipWorkflow* cw, qint64 currentFrame,
cw->getState() == ClipWorkflow::PauseRequired ||
cw->getState() == ClipWorkflow::UnpauseRequired )
{
qDebug() << "Asking for output";
cw->getStateLock()->unlock();
if ( needRepositioning == true )
adjustClipTime( currentFrame, start, cw );
......
......@@ -89,7 +89,7 @@ void* VideoClipWorkflow::getOutput( ClipWorkflow::GetMode mode )
QMutexLocker lock( m_renderLock );
preGetOutput();
// qWarning() << "Video. Available:" << m_availableBuffers.count() << "Computed:" << m_computedBuffers.count();
qWarning() << "Video::getOutput(). Available:" << m_availableBuffers.count() << "Computed:" << m_computedBuffers.count();
if ( isEndReached() == true )
{
qWarning() << "End is reached. returning NULL";
......@@ -97,13 +97,11 @@ void* VideoClipWorkflow::getOutput( ClipWorkflow::GetMode mode )
}
StackedBuffer<LightVideoFrame*>* buff;
if ( mode == ClipWorkflow::Pop )
{
buff = new StackedBuffer<LightVideoFrame*>( m_computedBuffers.pop(), &m_availableBuffers, true );
qDebug() << "buff:" << (void*)buff;
}
else if ( mode == ClipWorkflow::Get )
buff = new StackedBuffer<LightVideoFrame*>( m_computedBuffers.head(), NULL, false );
postGetOutput();
qDebug() << "End of getoutput computation";
return buff;
}
......@@ -122,7 +120,7 @@ void VideoClipWorkflow::lock( VideoClipWorkflow* cw, void** pp_ret, int size
else
lvf = cw->m_availableBuffers.pop();
cw->m_computedBuffers.push_back( lvf );
// qWarning() << ">>>VideoGeneration. Available:" << cw->m_availableBuffers.count() << "Computed:" << cw->m_computedBuffers.count();
qWarning() << ">>>VideoGeneration. Available:" << cw->m_availableBuffers.count() << "Computed:" << cw->m_computedBuffers.count();
// qWarning() << "feeding video buffer";
*pp_ret = (*(lvf))->frame.octets;
}
......
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