Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #2931 from popcornmix/log_eos

[rbp/omxplayer] Add logging for when audio/video EOS is first detected
  • Loading branch information...
commit de034fa7f7178ad7c0000aa1a90ce8878971bb5a 2 parents 8320a82 + 40d3949
@huceke huceke authored
View
18 xbmc/cores/omxplayer/OMXAudio.cpp
@@ -112,7 +112,8 @@ COMXAudio::COMXAudio() :
m_eEncoding (OMX_AUDIO_CodingPCM),
m_extradata (NULL ),
m_extrasize (0 ),
- m_last_pts (DVD_NOPTS_VALUE)
+ m_last_pts (DVD_NOPTS_VALUE),
+ m_submitted_eos (false )
{
m_vizBufferSize = m_vizRemapBufferSize = VIS_PACKET_SIZE * sizeof(float);
m_vizRemapBuffer = (uint8_t *)_aligned_malloc(m_vizRemapBufferSize,16);
@@ -570,6 +571,7 @@ bool COMXAudio::Initialize(AEAudioFormat format, std::string& device, OMXClock *
m_Initialized = true;
m_settings_changed = false;
m_setStartTime = true;
+ m_submitted_eos = false;
m_last_pts = DVD_NOPTS_VALUE;
CLog::Log(LOGDEBUG, "COMXAudio::Initialize Input bps %d samplerate %d channels %d buffer size %d bytes per second %d",
@@ -1016,6 +1018,8 @@ void COMXAudio::SubmitEOS()
if(!m_Initialized)
return;
+ m_submitted_eos = true;
+
OMX_ERRORTYPE omx_err = OMX_ErrorNone;
OMX_BUFFERHEADERTYPE *omx_buffer = m_omx_decoder.GetInputBuffer();
@@ -1037,6 +1041,7 @@ void COMXAudio::SubmitEOS()
CLog::Log(LOGERROR, "%s::%s - OMX_EmptyThisBuffer() failed with result(0x%x)\n", CLASSNAME, __func__, omx_err);
return;
}
+ CLog::Log(LOGINFO, "%s::%s", CLASSNAME, __func__);
}
bool COMXAudio::IsEOS()
@@ -1045,7 +1050,16 @@ bool COMXAudio::IsEOS()
return true;
unsigned int latency = GetAudioRenderingLatency();
CSingleLock lock (m_critSection);
- return m_omx_decoder.IsEOS() && latency <= 0;
+
+ if (!(m_omx_decoder.IsEOS() && latency == 0))
+ return false;
+
+ if (m_submitted_eos)
+ {
+ CLog::Log(LOGINFO, "%s::%s", CLASSNAME, __func__);
+ m_submitted_eos = false;
+ }
+ return true;
}
void COMXAudio::SwitchChannels(int iAudioStream, bool bAudioOnAllSpeakers)
View
1  xbmc/cores/omxplayer/OMXAudio.h
@@ -124,6 +124,7 @@ class COMXAudio
int m_vizRemapBufferSize;
uint8_t *m_vizRemapBuffer;
CAERemap m_vizRemap;
+ bool m_submitted_eos;
OMX_AUDIO_PARAM_PCMMODETYPE m_pcm_output;
OMX_AUDIO_PARAM_PCMMODETYPE m_pcm_input;
View
10 xbmc/cores/omxplayer/OMXVideo.cpp
@@ -888,11 +888,19 @@ void COMXVideo::SubmitEOS()
CLog::Log(LOGERROR, "%s::%s - OMX_EmptyThisBuffer() failed with result(0x%x)\n", CLASSNAME, __func__, omx_err);
return;
}
+ CLog::Log(LOGINFO, "%s::%s", CLASSNAME, __func__);
}
bool COMXVideo::IsEOS()
{
if(!m_is_open)
return true;
- return m_omx_render.IsEOS();
+ if (!m_omx_render.IsEOS())
+ return false;
+ if (m_submitted_eos)
+ {
+ CLog::Log(LOGINFO, "%s::%s", CLASSNAME, __func__);
+ m_submitted_eos = false;
+ }
+ return true;
}
Please sign in to comment.
Something went wrong with that request. Please try again.