Commit 5421947d authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Removed debug.

parent 6cd92916
......@@ -113,7 +113,7 @@ int WorkflowRenderer::lock( void *datas, int64_t *dts, int64_t *pts, unsigne
handler->self->m_mainWorkflow->goToNextFrame( MainWorkflow::AudioTrack );
}
else
qWarning() << "Invalid ES type";
qCritical() << "Invalid ES type";
// qDebug() << "ES Type:" << handler->type << "pts:" << *pts;
return ret;
}
......@@ -167,7 +167,7 @@ int WorkflowRenderer::lockAudio( int64_t *pts, size_t *bufferSize, void **b
ptsDiff = m_pts - m_audioPts;
}
m_audioPts = *pts = m_audioPts + ptsDiff;
qDebug() << "Audio pts" << m_audioPts << "debug id:" << m_renderAudioSample->debugId << "diff:" << ptsDiff;
// qDebug() << "Audio pts" << m_audioPts << "debug id:" << m_renderAudioSample->debugId << "diff:" << ptsDiff;
//*pts = m_audioPts * 1000000.0f / m_rate;
//m_audioPts += nbSample * m_nbChannels;
return 0;
......
......@@ -61,10 +61,10 @@ void* AudioClipWorkflow::getOutput( ClipWorkflow::GetMode mode )
QMutexLocker lock2( m_computedBuffersMutex );
preGetOutput();
qWarning() << "Audio. Available:" << m_availableBuffers.count() << "Computed:" << m_computedBuffers.count();
// qWarning() << "Audio. Available:" << m_availableBuffers.count() << "Computed:" << m_computedBuffers.count();
if ( isEndReached() == true )
{
qDebug() << "End is reached";
// qDebug() << "End is reached";
return NULL;
}
if ( mode == ClipWorkflow::Get )
......@@ -110,7 +110,7 @@ void AudioClipWorkflow::lock( AudioClipWorkflow* cw, uint8_t** pcm_buffer
AudioSample* as = NULL;
if ( cw->m_availableBuffers.isEmpty() == true )
{
qCritical() << cw << "Late buffer generation. Spawning new audio buffer.";
// qCritical() << cw << "Late buffer generation. Spawning new audio buffer.";
as = cw->createBuffer( size );
}
else
......@@ -146,11 +146,7 @@ void AudioClipWorkflow::unlock( AudioClipWorkflow* cw, uint8_t* pcm_buffe
as->nbChannels = channels;
as->ptsDiff = cw->m_currentPts - cw->m_previousPts;
}
qWarning() << "::::Computing audio PTS: debugId:" << as->debugId << "ptsdiff:" << as->ptsDiff;
if ( as->ptsDiff > 100000 )
{
qWarning() << "Probably invalid pts diff.";
}
// qWarning() << "::::Computing audio PTS: debugId:" << as->debugId << "ptsdiff:" << as->ptsDiff;
cw->commonUnlock();
cw->m_renderLock->unlock();
cw->m_computedBuffersMutex->unlock();
......
......@@ -150,7 +150,7 @@ void ClipWorkflow::stop()
void ClipWorkflow::setTime( qint64 time )
{
qDebug() << "setting clipworkflow time:" << time;
// qDebug() << "setting clipworkflow time:" << time;
m_mediaPlayer->setTime( time );
flushComputedBuffers();
}
......@@ -200,12 +200,10 @@ void ClipWorkflow::preGetOutput()
//Computed buffer mutex is already locked by underlying clipworkflow getoutput method
if ( getNbComputedBuffers() == 0 )
{
if ( debugType == 1)
qWarning() << "Waiting for buffer to be fed";
// qWarning() << "Waiting for buffer to be fed";
m_renderLock->unlock();
m_computedBuffersMutex->unlock();
if ( debugType == 1)
qDebug() << "Unlocked render lock, entering cond wait";
// qDebug() << "Unlocked render lock, entering cond wait";
m_feedingCondWait->waitLocked();
m_computedBuffersMutex->lock();
m_renderLock->lock();
......@@ -220,8 +218,7 @@ void ClipWorkflow::postGetOutput()
QWriteLocker lock( m_stateLock );
if ( m_state == ClipWorkflow::Paused )
{
if ( debugType == 1)
qWarning() << "Unpausing media player. type:" << debugType;
// qWarning() << "Unpausing media player. type:" << debugType;
m_state = ClipWorkflow::UnpauseRequired;
// This will act like an "unpause";
m_mediaPlayer->pause();
......@@ -264,8 +261,7 @@ void ClipWorkflow::computePtsDiff( qint64 pts )
m_currentPts = pts;
if ( m_pauseDuration != -1 )
{
if ( debugType == 1 )
qDebug() << "In pause mode";
// qDebug() << "In pause mode";
m_previousPts = m_currentPts + m_pauseDuration;
m_pauseDuration = -1;
}
......@@ -285,20 +281,16 @@ void ClipWorkflow::computePtsDiff( qint64 pts )
void ClipWorkflow::mediaPlayerPaused()
{
if ( debugType == 1)
qWarning() << "\n\nMedia player paused, waiting for buffers to be consumed.Type:" << debugType;
// qWarning() << "\n\nMedia player paused, waiting for buffers to be consumed.Type:" << debugType;
setState( ClipWorkflow::Paused );
m_beginPausePts = mdate();
if ( debugType == 1)
qDebug() << "got pause pts:" << m_beginPausePts;
// qDebug() << "got pause pts:" << m_beginPausePts;
}
void ClipWorkflow::mediaPlayerUnpaused()
{
if ( debugType == 1)
qWarning() << "Media player unpaused. Go back to rendering. Type:" << debugType;
// qWarning() << "Media player unpaused. Go back to rendering. Type:" << debugType;
setState( ClipWorkflow::Rendering );
m_pauseDuration = mdate() - m_beginPausePts;
if ( debugType == 1)
qDebug() << "pause duration:" << m_pauseDuration;
// qDebug() << "pause duration:" << m_pauseDuration;
}
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