return bReturn;
}
+bool CCECBusDevice::TransmitSetMenuLanguage(cec_logical_address dest)
+{
+ bool bReturn(false);
+ cec_menu_language language = GetMenuLanguage();
+
+ char lang[3];
+ {
+ CLockObject lock(m_mutex);
+ lang[0] = language.language[0];
+ lang[1] = language.language[1];
+ lang[2] = language.language[2];
+ }
+
+ MarkBusy();
+ if (lang[0] == '?' && lang[1] == '?' && lang[2] == '?')
+ {
+ CLibCEC::AddLog(CEC_LOG_NOTICE, "<< %s (%X) -> %s (%X): Menu language feature abort", GetLogicalAddressName(), m_iLogicalAddress, ToString(dest), dest);
+ m_processor->TransmitAbort(dest, CEC_OPCODE_GIVE_DEVICE_VENDOR_ID);
+ bReturn = true;
+ }
+ else
+ {
+ CLibCEC::AddLog(CEC_LOG_NOTICE, "<< %s (%X) -> broadcast (F): Menu language '%s'", GetLogicalAddressName(), m_iLogicalAddress, lang);
+ bReturn = m_handler->TransmitSetMenuLanguage(m_iLogicalAddress, lang);
+ }
+ MarkReady();
+ return bReturn;
+}
+
bool CCECBusDevice::TransmitPoll(cec_logical_address dest)
{
bool bReturn(false);
virtual bool TransmitOSDName(cec_logical_address dest);
virtual bool TransmitOSDString(cec_logical_address dest, cec_display_control duration, const char *strMessage);
virtual bool TransmitPhysicalAddress(void);
+ virtual bool TransmitSetMenuLanguage(cec_logical_address dest);
virtual bool TransmitPowerState(cec_logical_address dest);
virtual bool TransmitPoll(cec_logical_address dest);
virtual bool TransmitVendorID(cec_logical_address dest, bool bSendAbort = true);
if (m_processor->IsInitialised())
HandleGivePhysicalAddress(command);
break;
+ case CEC_OPCODE_GET_MENU_LANGUAGE:
+ if (m_processor->IsInitialised())
+ HandleGiveMenuLanguage(command);
+ break;
case CEC_OPCODE_GIVE_OSD_NAME:
if (m_processor->IsInitialised())
HandleGiveOSDName(command);
return false;
}
+bool CCECCommandHandler::HandleGiveMenuLanguage(const cec_command &command)
+{
+ if (m_processor->IsRunning() && m_busDevice->MyLogicalAddressContains(command.destination))
+ {
+ CCECBusDevice *device = GetDevice(command.destination);
+ if (device)
+ return device->TransmitSetMenuLanguage(command.initiator);
+ }
+
+ return false;
+}
+
bool CCECCommandHandler::HandleGiveSystemAudioModeStatus(const cec_command &command)
{
if (m_processor->IsRunning() && m_busDevice->MyLogicalAddressContains(command.destination))
return Transmit(command, false);
}
+bool CCECCommandHandler::TransmitSetMenuLanguage(const cec_logical_address iInitiator, const char lang[3])
+{
+ cec_command command;
+ command.Format(command, iInitiator, CECDEVICE_BROADCAST, CEC_OPCODE_SET_MENU_LANGUAGE);
+ command.parameters.PushBack((uint8_t) lang[0]);
+ command.parameters.PushBack((uint8_t) lang[1]);
+ command.parameters.PushBack((uint8_t) lang[2]);
+
+ return Transmit(command, false);
+}
+
bool CCECCommandHandler::TransmitPoll(const cec_logical_address iInitiator, const cec_logical_address iDestination)
{
cec_command command;
virtual bool TransmitOSDName(const cec_logical_address iInitiator, const cec_logical_address iDestination, CStdString strDeviceName);
virtual bool TransmitOSDString(const cec_logical_address iInitiator, const cec_logical_address iDestination, cec_display_control duration, const char *strMessage);
virtual bool TransmitPhysicalAddress(const cec_logical_address iInitiator, uint16_t iPhysicalAddress, cec_device_type type);
+ virtual bool TransmitSetMenuLanguage(const cec_logical_address iInitiator, const char lang[3]);
virtual bool TransmitPoll(const cec_logical_address iInitiator, const cec_logical_address iDestination);
virtual bool TransmitPowerState(const cec_logical_address iInitiator, const cec_logical_address iDestination, cec_power_status state);
virtual bool TransmitVendorID(const cec_logical_address iInitiator, uint64_t iVendorId);
virtual bool HandleGiveDeviceVendorId(const cec_command &command);
virtual bool HandleGiveOSDName(const cec_command &command);
virtual bool HandleGivePhysicalAddress(const cec_command &command);
+ virtual bool HandleGiveMenuLanguage(const cec_command &command);
virtual bool HandleGiveSystemAudioModeStatus(const cec_command &command);
virtual bool HandleImageViewOn(const cec_command &command);
virtual bool HandleMenuRequest(const cec_command &command);