- if (m_commandBuffer.Push(command))
- {
- CStdString strDebug;
- strDebug.Format("stored command '%2x' in the command buffer. buffer size = %d", command.opcode, m_commandBuffer.Size());
- AddLog(CEC_LOG_DEBUG, strDebug);
- }
- else
- {
- AddLog(CEC_LOG_WARNING, "command buffer is full");
- }
+ return m_client ? m_client->SendVolumeDown(bSendRelease) : (uint8_t)CEC_AUDIO_VOLUME_STATUS_UNKNOWN;
+}
+
+uint8_t CLibCEC::MuteAudio(bool UNUSED(bSendRelease) /* = true */)
+{
+ return m_client ? m_client->SendMuteAudio() : (uint8_t)CEC_AUDIO_VOLUME_STATUS_UNKNOWN;
+}
+
+bool CLibCEC::SendKeypress(cec_logical_address iDestination, cec_user_control_code key, bool bWait /* = true */)
+{
+ return m_client ? m_client->SendKeypress(iDestination, key, bWait) : false;
+}
+
+bool CLibCEC::SendKeyRelease(cec_logical_address iDestination, bool bWait /* = true */)
+{
+ return m_client ? m_client->SendKeyRelease(iDestination, bWait) : false;
+}
+
+cec_osd_name CLibCEC::GetDeviceOSDName(cec_logical_address iAddress)
+{
+ cec_osd_name retVal;
+ retVal.device = CECDEVICE_UNKNOWN;
+ memset(retVal.name, 0, 14);
+
+ if (m_client)
+ retVal = m_client->GetDeviceOSDName(iAddress);
+ return retVal;
+}
+
+cec_logical_address CLibCEC::GetActiveSource(void)
+{
+ return m_client ? m_client->GetActiveSource() : CECDEVICE_UNKNOWN;
+}
+
+bool CLibCEC::IsActiveSource(cec_logical_address iAddress)
+{
+ return m_client ? m_client->IsActiveSource(iAddress) : false;
+}
+bool CLibCEC::SetStreamPath(cec_logical_address iAddress)
+{
+ return m_client ? m_client->SetStreamPath(iAddress) : false;
+}
+
+bool CLibCEC::SetStreamPath(uint16_t iPhysicalAddress)
+{
+ return m_client ? m_client->SetStreamPath(iPhysicalAddress) : false;
+}
+
+cec_logical_addresses CLibCEC::GetLogicalAddresses(void)
+{
+ cec_logical_addresses addresses;
+ addresses.Clear();
+ if (m_client)
+ m_client->GetLogicalAddresses();
+ return addresses;
+}
+
+cec_device_type CLibCEC::GetType(cec_logical_address address)
+{
+ return CCECTypeUtils::GetType(address);
+}
+
+uint16_t CLibCEC::GetMaskForType(cec_logical_address address)
+{
+ return CCECTypeUtils::GetMaskForType(address);
+}
+
+uint16_t CLibCEC::GetMaskForType(cec_device_type type)
+{
+ return CCECTypeUtils::GetMaskForType(type);
+}
+
+bool CLibCEC::IsValidPhysicalAddress(uint16_t iPhysicalAddress)
+{
+ return iPhysicalAddress >= CEC_MIN_PHYSICAL_ADDRESS &&
+ iPhysicalAddress <= CEC_MAX_PHYSICAL_ADDRESS;