Commit 90e6d3cd authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Removed (lots of) debug

parent 544ed18a
......@@ -80,15 +80,12 @@ void MetaDataManager::run()
m_mediaPlayer->play();
}
usleep( 10000 );
qDebug() << "New metadata threaad mainloop iteration";
}
qDebug() << "End of metamanager thread";
return;
}
void MetaDataManager::getMetaData()
{
qDebug() << "getMetaData();";
m_mediaIsPlaying = false;
//TODO: restore this when VLC1.1 comes out.
// m_lengthHasChanged = false;
......@@ -215,7 +212,6 @@ void MetaDataManager::entrypointLengthChanged()
void MetaDataManager::entrypointPlaying()
{
disconnect( m_mediaPlayer, SIGNAL( playing() ), this, SLOT( entrypointPlaying() ) );
qDebug() << "Playing the media";
m_mediaIsPlaying = true;
if ( m_lengthHasChanged == true )
getMetaData();
......
......@@ -105,10 +105,6 @@ void ClipWorkflow::unlock( ClipWorkflow* cw )
cw->m_stateLock->lockForWrite();
cw->m_state = Rendering;
}
else
{
qDebug() << "UnLocking. State = " << cw->m_state << "Debug Id = " << cw->debugId;
}
cw->m_stateLock->unlock();
cw->checkStateChange();
......@@ -119,7 +115,6 @@ void ClipWorkflow::setVmem()
{
char buffer[32];
qDebug() << "Setting vmem from clip " << this->debugId;
//TODO: it would be good if we somehow backup the old media parameters to restore it later.
m_clip->getParent()->getVLCMedia()->addOption( ":vout=vmem" );
m_clip->getParent()->getVLCMedia()->setDataCtx( this );
......@@ -170,7 +165,6 @@ void ClipWorkflow::pausedMediaPlayer()
{
disconnect( m_mediaPlayer, SIGNAL( paused() ), this, SLOT( pausedMediaPlayer() ) );
setState( Ready );
qDebug() << "Set Ready state";
}
bool ClipWorkflow::isReady() const
......@@ -206,7 +200,6 @@ void ClipWorkflow::startRender()
void ClipWorkflow::endReached()
{
qDebug() << "End reached";
setState( EndReached );
}
......@@ -217,15 +210,12 @@ const Clip* ClipWorkflow::getClip() const
void ClipWorkflow::stop()
{
qDebug() << "ClipWorkflow::stop()";
Q_ASSERT( m_mediaPlayer != NULL );
m_mediaPlayer->stop();
qDebug() << "Stopped media player";
m_mediaPlayer = NULL;
setState( Stopped );
QMutexLocker lock( m_requiredStateLock );
m_requiredState = ClipWorkflow::None;
qDebug() << "Changed state";
}
void ClipWorkflow::setPosition( float pos )
......@@ -241,14 +231,12 @@ bool ClipWorkflow::isRendering() const
void ClipWorkflow::setState( State state )
{
qDebug() << "Setting state : " << state;
QWriteLocker lock( m_stateLock );
m_state = state;
}
void ClipWorkflow::queryStateChange( State newState )
{
qDebug() << "Querying state change";
QMutexLocker lock( m_requiredStateLock );
m_requiredState = newState;
}
......@@ -269,4 +257,3 @@ void ClipWorkflow::reinitialize()
m_state = Stopped;
queryStateChange( None );
}
......@@ -44,7 +44,6 @@ TrackWorkflow::~TrackWorkflow()
void TrackWorkflow::addClip( Clip* clip, qint64 start )
{
qDebug() << "Inserting clip at frame nb" << start;
ClipWorkflow* cw = new ClipWorkflow( clip );
m_clips.insert( start, cw );
computeLength();
......@@ -76,11 +75,12 @@ unsigned char* TrackWorkflow::renderClip( ClipWorkflow* cw, bool needReposi
cw->getStateLock()->unlock();
while ( cw->isRendering() == true )
{
// qDebug() << "Waiting for complete render. State == " << cw->getState();
usleep( 100 );
}
cw->getStateLock()->lockForRead();
//This way we can trigger the appropriate if just below.
//by restoring the initial state of the function, and just pretend that
//nothing happened.
cw->getStateLock()->lockForRead();
}
//If frame has been rendered :
......@@ -99,7 +99,6 @@ unsigned char* TrackWorkflow::renderClip( ClipWorkflow* cw, bool needReposi
cw->getStateLock()->unlock();
cw->initialize( m_mediaPlayer );
cw->startRender();
qDebug() << "Render started for clip" << cw->debugId;
}
else if ( cw->getState() == ClipWorkflow::Ready ||
cw->getState() == ClipWorkflow::Initializing )
......@@ -108,7 +107,6 @@ unsigned char* TrackWorkflow::renderClip( ClipWorkflow* cw, bool needReposi
//Otherwise, it will start directly.
cw->getStateLock()->unlock();
cw->startRender();
qDebug() << "Started render for clip" << cw->debugId;
}
else
{
......@@ -144,7 +142,6 @@ void TrackWorkflow::stopClipWorkflow( ClipWorkflow* cw )
cw->getState() == ClipWorkflow::Ready ||
cw->getState() == ClipWorkflow::EndReached )
{
qDebug() << "Stopping from sleeping / ready / endreached state for clip " << cw->debugId;
cw->getStateLock()->unlock();
cw->queryStateChange( ClipWorkflow::Stopping );
cw->wake();
......@@ -152,19 +149,15 @@ void TrackWorkflow::stopClipWorkflow( ClipWorkflow* cw )
}
else if ( cw->getState() == ClipWorkflow::Rendering )
{
qDebug() << "Stopping from rendering state for clip" << cw->debugId;
cw->getStateLock()->unlock();
while ( cw->isRendering() == true )
usleep( 100 );
qDebug() << "Rendering completed" << cw->debugId;
cw->queryStateChange( ClipWorkflow::Stopping );
cw->wake();
cw->stop();
qDebug() << "Mediaplayer Stop asked for clip" << cw->debugId;
}
else if ( cw->getState() == ClipWorkflow::Initializing )
{
qDebug() << "Stopping from initializing state for clip" << cw->debugId;
cw->getStateLock()->unlock();
while ( cw->isReady() == false )
usleep( 20 );
......@@ -196,7 +189,6 @@ unsigned char* TrackWorkflow::getOutput( qint64 currentFrame )
{
if ( needRepositioning == true )
{
qDebug() << "Repositionning";
ret = renderClip( cw, true,
( (float)( currentFrame - start ) / (float)(cw->getClip()->getLength()) ) );
}
......
......@@ -49,11 +49,8 @@ void ListViewMediaItem::snapshotChanged()
QTime length;
length = length.addSecs( m_media->getLength() / 1000 );
qDebug() << m_media->getLength();
qDebug() << length;
setToolTip( "Filename: " + m_media->getFileInfo()->fileName() + "\n" +
"Length: " + length.toString() );
//"Length: " + length.toString("h 'h' m 'm' s 's'") );
}
const Media* ListViewMediaItem::getMedia() const
......
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