Skip to content

Commit

Permalink
[mmalcodec] Tidy up debug logging for decode
Browse files Browse the repository at this point in the history
  • Loading branch information
popcornmix committed Jul 31, 2015
1 parent e9af0da commit 658a2e0
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.cpp
Expand Up @@ -861,11 +861,7 @@ int CMMALVideo::Decode(uint8_t* pData, int iSize, double dts, double pts)
m_demuxerPts = dts;
double queued = m_decoderPts != DVD_NOPTS_VALUE && m_demuxerPts != DVD_NOPTS_VALUE ? m_demuxerPts - m_decoderPts : 0.0;
if (mmal_queue_length(m_dec_input_pool->queue) > 0 && !m_demux_queue_length && queued <= DVD_MSEC_TO_TIME(1000))
{
if (g_advancedSettings.CanLogComponent(LOGVIDEO))
CLog::Log(LOGDEBUG, "%s::%s - got space for output: demux_queue(%d) space(%d) queued(%.2f)", CLASSNAME, __func__, m_demux_queue_length, mmal_queue_length(m_dec_input_pool->queue) * m_dec_input->buffer_size, queued*1e-6);
ret |= VC_BUFFER;
}
else
m_preroll = false;

Expand All @@ -874,21 +870,17 @@ int CMMALVideo::Decode(uint8_t* pData, int iSize, double dts, double pts)

if (!m_output_ready.empty() && !m_preroll)
{
if (g_advancedSettings.CanLogComponent(LOGVIDEO))
CLog::Log(LOGDEBUG, "%s::%s - got output picture:%d", CLASSNAME, __func__, m_output_ready.size());
ret |= VC_PICTURE;
// renderer is low - give priority to returning pictures
if (0 && m_codecControlFlags & DVD_CODEC_CTRL_DRAIN)
ret &= ~VC_BUFFER;
}
if (!ret)
{
if (g_advancedSettings.CanLogComponent(LOGVIDEO))
CLog::Log(LOGDEBUG, "%s::%s - Nothing to do: ready_queue(%d) demux_queue(%d) space(%d) preroll(%d)",
CLASSNAME, __func__, m_output_ready.size(), m_demux_queue_length, mmal_queue_length(m_dec_input_pool->queue) * m_dec_input->buffer_size, m_preroll);
lock.Leave();
Sleep(10); // otherwise we busy spin
}

if (g_advancedSettings.CanLogComponent(LOGVIDEO))
CLog::Log(LOGDEBUG, "%s::%s - ret(%x) pics(%d) demux_queue(%d) space(%d) queued(%.2f) preroll(%d) flags(%x)", CLASSNAME, __func__, ret, m_output_ready.size(), m_demux_queue_length, mmal_queue_length(m_dec_input_pool->queue) * m_dec_input->buffer_size, queued*1e-6, m_preroll, m_codecControlFlags);

return ret;
}

Expand Down

0 comments on commit 658a2e0

Please sign in to comment.