Permalink
Browse files

[cec] fixed - don't send an active source message for the next playli…

…st item for players that don't send OnStop before OnPlay
  • Loading branch information...
opdenkamp committed Dec 6, 2012
1 parent abcb3f8 commit 879a7b9074b57aa448a027f2eadf7731d3d34fac
@@ -131,6 +131,7 @@ void CPeripheralCecAdapter::ResetMembers(void)
m_bActiveSourcePending = false;
m_bStandbyPending = false;
m_bActiveSourceBeforeStandby = false;
+ m_bOnPlayReceived = false;
m_currentButton.iButton = 0;
m_currentButton.iDuration = 0;
@@ -204,6 +205,7 @@ void CPeripheralCecAdapter::Announce(AnnouncementFlag flag, const char *sender,
{
CSingleLock lock(m_critSection);
m_preventActivateSourceOnPlay = CDateTime::GetCurrentDateTime();
+ m_bOnPlayReceived = false;
}
else if (flag == Player && !strcmp(sender, "xbmc") && !strcmp(message, "OnPlay"))
{
@@ -212,7 +214,9 @@ void CPeripheralCecAdapter::Announce(AnnouncementFlag flag, const char *sender,
{
CSingleLock lock(m_critSection);
bActivateSource = (m_configuration.bActivateSource &&
+ !m_bOnPlayReceived &&
(!m_preventActivateSourceOnPlay.IsValid() || CDateTime::GetCurrentDateTime() - m_preventActivateSourceOnPlay > CDateTimeSpan(0, 0, 0, CEC_SUPPRESS_ACTIVATE_SOURCE_AFTER_ON_STOP)));
+ m_bOnPlayReceived = true;
}
if (bActivateSource)
ActivateSource();
@@ -169,6 +169,7 @@ namespace PERIPHERALS
bool m_bStandbyPending;
CDateTime m_preventActivateSourceOnPlay;
bool m_bActiveSourceBeforeStandby;
+ bool m_bOnPlayReceived;
};
class CPeripheralCecAdapterUpdateThread : public CThread

0 comments on commit 879a7b9

Please sign in to comment.