int8_t CLibCEC::FindAdapters(cec_adapter *deviceList, uint8_t iBufSize, const char *strDevicePath /* = NULL */)
{
+ if (!CUSBCECAdapterDetection::CanAutodetect())
+ {
+ AddLog(CEC_LOG_WARNING, "libCEC has not been compiled with adapter detection code for this target, so the path to the COM port has to be provided to libCEC");
+ return 0;
+ }
+
return CUSBCECAdapterDetection::FindAdapters(deviceList, iBufSize, strDevicePath);
}
(*it)->AddLog(message);
}
+void CLibCEC::AddCommand(const cec_command &command)
+{
+ // send the command to all clients
+ for (vector<CCECClient *>::iterator it = m_clients.begin(); it != m_clients.end(); it++)
+ (*it)->AddCommand(command);
+}
+
void CLibCEC::Alert(const libcec_alert type, const libcec_parameter ¶m)
{
// send the alert to all clients
return static_cast< void* > (lib);
}
-void * CECInit(const char *strDeviceName, CEC::cec_device_type_list types, uint16_t iPhysicalAddress /* = 0 */)
+void * CECInit(const char *strDeviceName, CEC::cec_device_type_list types, uint16_t UNUSED(iPhysicalAddress) /* = 0 */)
{
libcec_configuration configuration;
// client version < 1.5.0
snprintf(configuration.strDeviceName, 13, "%s", strDeviceName);
configuration.deviceTypes = types;
- configuration.iPhysicalAddress = iPhysicalAddress;
+ configuration.iPhysicalAddress = CEC_INVALID_PHYSICAL_ADDRESS;
if (configuration.deviceTypes.IsEmpty())
configuration.deviceTypes.Add(CEC_DEVICE_TYPE_RECORDING_DEVICE);
// no longer being used
void CLibCEC::AddKey(const cec_keypress &UNUSED(key)) {}
-void CLibCEC::AddCommand(const cec_command &UNUSED(command)) {}
void CLibCEC::ConfigurationChanged(const libcec_configuration &UNUSED(config)) {}
void CLibCEC::SetCurrentButton(cec_user_control_code UNUSED(iButtonCode)) {}
CLibCEC *CLibCEC::GetInstance(void) { return NULL; }