m_busDevices[addr]->SetActiveSource();
if (m_busDevices[addr]->GetPhysicalAddress(false) != 0xFFFF)
- bReturn = m_busDevices[addr]->GetHandler()->ActivateSource();
+ {
+ bReturn = m_busDevices[addr]->TransmitActiveSource();
+
+ if (bReturn && (m_busDevices[addr]->GetType() == CEC_DEVICE_TYPE_PLAYBACK_DEVICE ||
+ m_busDevices[addr]->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE) &&
+ m_busDevices[addr]->GetHandler()->SendDeckStatusUpdateOnActiveSource())
+ {
+ bReturn = ((CCECPlaybackDevice *)m_busDevices[addr])->TransmitDeckStatus(CECDEVICE_TV);
+ }
+ }
return bReturn;
}
bool CCECProcessor::SetHDMIPort(cec_logical_address iBaseDevice, uint8_t iPort, bool bForce /* = false */)
{
bool bReturn(false);
- {
- CLockObject lock(&m_mutex);
+ CLockObject lock(&m_mutex);
- m_iBaseDevice = iBaseDevice;
- m_iHDMIPort = iPort;
- if (!m_bStarted && !bForce)
- return true;
- }
+ m_iBaseDevice = iBaseDevice;
+ m_iHDMIPort = iPort;
+ if (!m_bStarted && !bForce)
+ return true;
CStdString strLog;
strLog.Format("setting HDMI port to %d on device %s (%d)", iPort, ToString(iBaseDevice), (int)iBaseDevice);
uint16_t iPhysicalAddress(0);
if (iBaseDevice > CECDEVICE_TV)
+ {
+ lock.Leave();
iPhysicalAddress = m_busDevices[iBaseDevice]->GetPhysicalAddress();
+ lock.Lock();
+ }
if (iPhysicalAddress < 0xffff)
{
}
}
-const char *CCECProcessor::ToString(const cec_audio_status status)
+const char *CCECProcessor::ToString(const cec_audio_status UNUSED(status))
{
// TODO this is a mask
return "TODO";