cec: added an option to configure whether or not to send an 'inactive source' message...
authorLars Op den Kamp <lars@opdenkamp.eu>
Mon, 27 Feb 2012 20:58:10 +0000 (21:58 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Tue, 27 Mar 2012 14:05:13 +0000 (16:05 +0200)
language/Dutch/strings.xml
language/English/strings.xml
lib/libcec/Makefile
project/BuildDependencies/scripts/libcec_d.txt
system/peripherals.xml
tools/darwin/depends/libcec/Makefile
xbmc/peripherals/devices/PeripheralCecAdapter.cpp

index 545cc33..8452a88 100644 (file)
   <string id="36020">Maak XBMC de actieve bron bij het opstarten</string>
   <string id="36021">Physiek adres (overschrijft HDMI poort)</string>
   <string id="36022">COM poort (laat leeg, tenzij noodzakelijk)</string>
+  <string id="36023">Configuratie aangepast</string>
+  <string id="36024">Kon de nieuwe configuratie niet instellen. Controleer de instellingen.</string>
+  <string id="36025">Verstuur 'inactieve bron' commando bij het stoppen</string>
 </strings>
\ No newline at end of file
index c3e4608..5ad11dd 100644 (file)
   <string id="36022">COM port (leave empty unless needed)</string>
   <string id="36023">Configuration updated</string>
   <string id="36024">Failed to set the new configuration. Please check your settings.</string>
+  <string id="36025">Send 'inactive source' command when stopping XBMC</string>
 </strings>
index d9af688..27eb5d2 100644 (file)
@@ -7,7 +7,7 @@
 
 # lib name, version
 LIBNAME=libcec
-VERSION=1.5.0
+VERSION=1.5.1
 SOURCE=$(LIBNAME)-$(VERSION)
 
 # download location and format
index 0f70461..9aa0d55 100644 (file)
@@ -1,3 +1,3 @@
 ; filename                        source of the file
 
-libcec1.5.0.zip                   http://packages.pulse-eight.net/windows/
+libcec1.5.1.zip                   http://packages.pulse-eight.net/windows/
index 1df6f1a..c6852f7 100644 (file)
 
   <peripheral vendor_product="2548:1001" bus="usb" name="Pulse-Eight CEC Adapter" mapTo="cec">
     <setting key="enabled" type="bool" value="1" label="305" order="1" />
-       <setting key="activate_source" type="bool" value="1" label="36020" order="2" />
-       <setting key="wake_devices" type="string" value="0" label="36007" order="3" />
-       <setting key="standby_devices" type="string" value="0" label="36008" order="4" />
+    <setting key="activate_source" type="bool" value="1" label="36020" order="2" />
+    <setting key="wake_devices" type="string" value="0" label="36007" order="3" />
+    <setting key="standby_devices" type="string" value="0" label="36008" order="4" />
     <setting key="cec_standby_screensaver" type="bool" value="1" label="36009" order="5" />
-       <setting key="standby_pc_on_tv_standby" type="bool" value="1" label="36014" order="6" />
-       <setting key="use_tv_menu_language" type="bool" value="1" label="36018" order="7" />
-       <setting key="physical_address" type="string" label="36021" value="0" order="8" />
-    <setting key="cec_hdmi_port" type="int" value="1" min="1" max="16" label="36015" order="9" />
-    <setting key="connected_device" type="int" label="36019" value="0" min="0" max="15" step="1" order="10" />
-    <setting key="port" type="string" value="" label="36022" order="11" />
+    <setting key="standby_pc_on_tv_standby" type="bool" value="1" label="36014" order="6" />
+    <setting key="send_inactive_source" type="bool" value="1" label="36025" order="7" />
+    <setting key="use_tv_menu_language" type="bool" value="1" label="36018" order="8" />
+    <setting key="physical_address" type="string" label="36021" value="0" order="9" />
+    <setting key="cec_hdmi_port" type="int" value="1" min="1" max="16" label="36015" order="10" />
+    <setting key="connected_device" type="int" label="36019" value="0" min="0" max="15" step="1" order="11" />
+    <setting key="port" type="string" value="" label="36022" order="12" />
 
-       <setting key="tv_vendor" type="int" value="0" configurable="0" />
+    <setting key="tv_vendor" type="int" value="0" configurable="0" />
     <setting key="device_name" type="string" value="XBMC" configurable="0" />
     <setting key="device_type" type="int" value="1" configurable="0" />
   </peripheral>
index be4ee35..abba42d 100644 (file)
@@ -2,7 +2,7 @@ include ../Makefile.include
 
 # lib name, version
 LIBNAME=libcec
-VERSION=1.5.0
+VERSION=1.5.1
 SOURCE=$(LIBNAME)-$(VERSION)
 ARCHIVE=$(SOURCE).tar.gz
 
index cf398fd..658a9ea 100644 (file)
@@ -309,7 +309,7 @@ void CPeripheralCecAdapter::Process(void)
   {
     if (m_configuration.bPowerOffOnStandby == 1)
       m_cecAdapter->StandbyDevices();
-    else
+    else if (m_configuration.bSendInactiveSource == 1)
       m_cecAdapter->SetInactiveView();
   }
 
@@ -956,23 +956,27 @@ void CPeripheralCecAdapter::SetConfigurationFromLibCEC(const CEC::libcec_configu
   SetSetting("wake_devices", strPowerOffDevices.Trim());
 
   // set the boolean settings
-  m_configuration.bUseTVMenuLanguage = m_configuration.bUseTVMenuLanguage;
+  m_configuration.bUseTVMenuLanguage = config.bUseTVMenuLanguage;
   SetSetting("use_tv_menu_language", m_configuration.bUseTVMenuLanguage == 1);
 
-  m_configuration.bActivateSource = m_configuration.bActivateSource;
+  m_configuration.bActivateSource = config.bActivateSource;
   SetSetting("activate_source", m_configuration.bActivateSource == 1);
 
-  m_configuration.bPowerOffScreensaver = m_configuration.bPowerOffScreensaver;
+  m_configuration.bPowerOffScreensaver = config.bPowerOffScreensaver;
   SetSetting("cec_standby_screensaver", m_configuration.bPowerOffScreensaver == 1);
 
-  m_configuration.bPowerOffOnStandby = m_configuration.bPowerOffOnStandby;
+  m_configuration.bPowerOffOnStandby = config.bPowerOffOnStandby;
   SetSetting("standby_pc_on_tv_standby", m_configuration.bPowerOffOnStandby == 1);
+
+  if (config.serverVersion >= CEC_SERVER_VERSION_1_5_1)
+    m_configuration.bSendInactiveSource = config.bSendInactiveSource;
+  SetSetting("send_inactive_source", m_configuration.bSendInactiveSource == 1);
 }
 
 void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
 {
   // client version 1.5.0
-  m_configuration.clientVersion = CEC_CLIENT_VERSION_1_5_0;
+  m_configuration.clientVersion = CEC_CLIENT_VERSION_1_5_1;
 
   // device name 'XBMC'
   snprintf(m_configuration.strDeviceName, 13, "%s", GetSettingString("device_name").c_str());
@@ -1030,6 +1034,7 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
   m_configuration.bActivateSource      = GetSettingBool("activate_source") ? 1 : 0;
   m_configuration.bPowerOffScreensaver = GetSettingBool("cec_standby_screensaver") ? 1 : 0;
   m_configuration.bPowerOffOnStandby   = GetSettingBool("standby_pc_on_tv_standby") ? 1 : 0;
+  m_configuration.bSendInactiveSource  = GetSettingBool("send_inactive_source") ? 1 : 0;
 }
 
 void CPeripheralCecAdapter::ReadLogicalAddresses(const CStdString &strString, cec_logical_addresses &addresses)