Merge branch 'master' into release
authorLars Op den Kamp <lars@opdenkamp.eu>
Thu, 28 Feb 2013 18:43:59 +0000 (19:43 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Thu, 28 Feb 2013 18:43:59 +0000 (19:43 +0100)
153 files changed:
ChangeLog
configure.ac
debian/changelog
include/cec.h
include/cecc.h
include/cecloader.h
include/cectypes.h
project/libCEC.nsi
project/libcec.rc
project/p8-usbcec-driver.nsi
project/testclient.rc
src/CecSharpTester/CecSharpClient.cs
src/CecSharpTester/Properties/AssemblyInfo.cs
src/LibCecSharp/AssemblyInfo.cpp
src/LibCecSharp/CecSharpTypes.h
src/LibCecSharp/LibCecSharp.cpp
src/LibCecTray/Program.cs
src/LibCecTray/Properties/AssemblyInfo.cs
src/LibCecTray/controller/Actions.cs
src/LibCecTray/controller/CECController.cs
src/LibCecTray/controller/actions/ConnectToDevice.cs
src/LibCecTray/controller/actions/GetCurrentPhysicalAddress.cs
src/LibCecTray/controller/actions/RescanDevices.cs
src/LibCecTray/controller/actions/SendActivateSource.cs
src/LibCecTray/controller/actions/SendImageViewOn.cs
src/LibCecTray/controller/actions/SendStandby.cs
src/LibCecTray/controller/actions/ShowDeviceInfo.cs
src/LibCecTray/controller/actions/UpdateConfiguration.cs
src/LibCecTray/controller/actions/UpdateConnectedDevice.cs
src/LibCecTray/controller/actions/UpdateDeviceInfo.cs
src/LibCecTray/controller/actions/UpdateEvent.cs
src/LibCecTray/controller/actions/UpdatePhysicalAddress.cs
src/LibCecTray/controller/applications/ApplicationController.cs
src/LibCecTray/controller/applications/ApplicationControllerUI.cs
src/LibCecTray/controller/applications/ApplicationInput.cs
src/LibCecTray/controller/applications/Applications.cs
src/LibCecTray/controller/applications/CecButtonConfig.cs
src/LibCecTray/controller/applications/CecButtonConfigUI.cs
src/LibCecTray/controller/applications/ConfigureApplication.cs
src/LibCecTray/controller/applications/IControllerTabPage.cs
src/LibCecTray/controller/applications/KeyInput.cs
src/LibCecTray/controller/applications/WindowsAPI.cs
src/LibCecTray/controller/applications/internal/WMCController.cs
src/LibCecTray/controller/applications/internal/XBMCController.cs
src/LibCecTray/controller/applications/internal/XBMCControllerUI.cs
src/LibCecTray/settings/CECSetting.cs
src/LibCecTray/settings/CECSettingBool.cs
src/LibCecTray/settings/CECSettingByte.cs
src/LibCecTray/settings/CECSettingDeviceType.cs
src/LibCecTray/settings/CECSettingLogicalAddress.cs
src/LibCecTray/settings/CECSettingLogicalAddresses.cs
src/LibCecTray/settings/CECSettingNumeric.cs
src/LibCecTray/settings/CECSettingString.cs
src/LibCecTray/settings/CECSettingUShort.cs
src/LibCecTray/settings/CECSettingVendorId.cs
src/LibCecTray/settings/CECSettings.cs
src/LibCecTray/ui/About.cs
src/LibCecTray/ui/About.resx
src/LibCecTray/ui/AsyncForm.cs
src/LibCecTray/ui/CECTray.cs
src/LibCecTray/ui/DeviceInformation.cs
src/env.h
src/lib/CECClient.cpp
src/lib/CECClient.h
src/lib/CECInputBuffer.h
src/lib/CECProcessor.cpp
src/lib/CECProcessor.h
src/lib/CECTypeUtils.h
src/lib/LibCEC.cpp
src/lib/LibCEC.h
src/lib/LibCECC.cpp
src/lib/LibCECDll.cpp
src/lib/adapter/AdapterCommunication.h
src/lib/adapter/AdapterFactory.cpp
src/lib/adapter/AdapterFactory.h
src/lib/adapter/Pulse-Eight/USBCECAdapterCommands.cpp
src/lib/adapter/Pulse-Eight/USBCECAdapterCommands.h
src/lib/adapter/Pulse-Eight/USBCECAdapterCommunication.cpp
src/lib/adapter/Pulse-Eight/USBCECAdapterCommunication.h
src/lib/adapter/Pulse-Eight/USBCECAdapterDetection.cpp
src/lib/adapter/Pulse-Eight/USBCECAdapterDetection.h
src/lib/adapter/Pulse-Eight/USBCECAdapterMessage.cpp
src/lib/adapter/Pulse-Eight/USBCECAdapterMessage.h
src/lib/adapter/Pulse-Eight/USBCECAdapterMessageQueue.cpp
src/lib/adapter/Pulse-Eight/USBCECAdapterMessageQueue.h
src/lib/adapter/RPi/RPiCECAdapterCommunication.cpp
src/lib/adapter/RPi/RPiCECAdapterCommunication.h
src/lib/adapter/RPi/RPiCECAdapterDetection.cpp
src/lib/adapter/RPi/RPiCECAdapterDetection.h
src/lib/adapter/RPi/RPiCECAdapterMessageQueue.cpp
src/lib/adapter/RPi/RPiCECAdapterMessageQueue.h
src/lib/adapter/TDA995x/AdapterMessageQueue.h
src/lib/adapter/TDA995x/TDA995xCECAdapterCommunication.cpp
src/lib/adapter/TDA995x/TDA995xCECAdapterCommunication.h
src/lib/adapter/TDA995x/TDA995xCECAdapterDetection.cpp
src/lib/adapter/TDA995x/TDA995xCECAdapterDetection.h
src/lib/devices/CECAudioSystem.cpp
src/lib/devices/CECAudioSystem.h
src/lib/devices/CECBusDevice.cpp
src/lib/devices/CECBusDevice.h
src/lib/devices/CECDeviceMap.cpp
src/lib/devices/CECDeviceMap.h
src/lib/devices/CECPlaybackDevice.cpp
src/lib/devices/CECPlaybackDevice.h
src/lib/devices/CECRecordingDevice.cpp
src/lib/devices/CECRecordingDevice.h
src/lib/devices/CECTV.cpp
src/lib/devices/CECTV.h
src/lib/devices/CECTuner.cpp
src/lib/devices/CECTuner.h
src/lib/implementations/ANCommandHandler.cpp
src/lib/implementations/ANCommandHandler.h
src/lib/implementations/CECCommandHandler.cpp
src/lib/implementations/CECCommandHandler.h
src/lib/implementations/PHCommandHandler.cpp
src/lib/implementations/PHCommandHandler.h
src/lib/implementations/RLCommandHandler.cpp
src/lib/implementations/RLCommandHandler.h
src/lib/implementations/SLCommandHandler.cpp
src/lib/implementations/SLCommandHandler.h
src/lib/implementations/VLCommandHandler.cpp
src/lib/implementations/VLCommandHandler.h
src/lib/platform/adl/adl-edid.cpp
src/lib/platform/adl/adl-edid.h
src/lib/platform/nvidia/nv-edid.cpp
src/lib/platform/nvidia/nv-edid.h
src/lib/platform/os.h
src/lib/platform/posix/os-edid.cpp
src/lib/platform/posix/os-socket.h
src/lib/platform/posix/os-threads.h
src/lib/platform/posix/os-types.h
src/lib/platform/posix/serialport.cpp
src/lib/platform/posix/serversocket.cpp
src/lib/platform/sockets/cdevsocket.h
src/lib/platform/sockets/serialport.h
src/lib/platform/sockets/serversocket.h
src/lib/platform/sockets/socket.h
src/lib/platform/sockets/tcp.h
src/lib/platform/threads/mutex.h
src/lib/platform/threads/threads.h
src/lib/platform/util/baudrate.h
src/lib/platform/util/buffer.h
src/lib/platform/util/edid.h
src/lib/platform/util/timeutils.h
src/lib/platform/util/util.h
src/lib/platform/windows/os-edid.cpp
src/lib/platform/windows/os-socket.h
src/lib/platform/windows/os-threads.cpp
src/lib/platform/windows/os-threads.h
src/lib/platform/windows/os-types.h
src/lib/platform/windows/serialport.cpp
src/testclient/main.cpp
support/cec-test-device.sh

index d284eda629476aaf92297789799965b9e2123057..79f81e6ca0b906712b87d39086b7d1fb5cba1739 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,29 @@
+libcec (2.1.0-1) unstable; urgency=low
+
+  * changed / added:
+    * added vendor id for Denon
+    * added DetectAdapters() method, that returns all device information for
+      detected adapters, not just the com port
+    * added new method PowerOnScreensaver. credits: @jmarcet
+    * LibCECTray: Added ability to send modifiers by nesting commands in
+      KeyInput.cs. credits: Nate Burr
+    * rpi: Added /opt/vc/include/interface/vmcs_host/linux to rpi_cflags to fix
+      building on 'next' firmware branch. credits: Nedim Lisica
+  * fixed:
+    * don't send two active source message sequences to philips. issue #118
+    * don't send deck status updates to philips when activating the source
+    * update the active source status correctly after a manual switch to
+      another source. closes #124
+    * rename cec_audio_status() to cec_audio_get_status() to avoid conflict
+      with the cec_audio_status enum.  This makes the C API compile again.
+      credits: Dave Chapman
+    * LibCECTray: Fixed bug with libcec adding the keyup for button commands
+      and making sure they are still executed. credits: Nate Burr
+    * rpi: register callback for HPD. re-read the physical address when we
+      received VC_HDMI_ATTACHED. issue #109
+
+ -- Pulse-Eight Packaging <packaging@pulse-eight.com>  Tue, 26 Feb 2013 23:06:00 +0100
+
 libcec (2.0.5-1) unstable; urgency=low
 
   * changed:
index b1796775b2f7a4b83c46793a2a9fa9b1b7ea9959..9b2ac344b039b3455052cb30fe99b9b3c81c40ad 100644 (file)
@@ -1,5 +1,5 @@
 AC_PREREQ(2.59)
-AC_INIT([libcec], [2:0:0], [http://libcec.pulse-eight.com/])
+AC_INIT([libcec], [2:1:0], [http://libcec.pulse-eight.com/])
 AC_CONFIG_HEADERS([config.h])
 AH_TOP([#pragma once])
 
@@ -68,7 +68,7 @@ AC_ARG_ENABLE([rpi],
 AC_ARG_WITH([rpi-include-path],
   [AS_HELP_STRING([--with-rpi-include-path],
     [location of the Raspberry Pi headers (location of /opt/vc/include, default is auto)])],
-  [RPI_CFLAGS="-I$withval -I$withval/interface/vcos/pthreads"])
+  [RPI_CFLAGS="-I$withval -I$withval/interface/vcos/pthreads -I$withval/interface/vmcs_host/linux"])
 
 ## Optional path to libbcm_host.so
 AC_ARG_WITH([rpi-lib-path],
index d284eda629476aaf92297789799965b9e2123057..79f81e6ca0b906712b87d39086b7d1fb5cba1739 100644 (file)
@@ -1,3 +1,29 @@
+libcec (2.1.0-1) unstable; urgency=low
+
+  * changed / added:
+    * added vendor id for Denon
+    * added DetectAdapters() method, that returns all device information for
+      detected adapters, not just the com port
+    * added new method PowerOnScreensaver. credits: @jmarcet
+    * LibCECTray: Added ability to send modifiers by nesting commands in
+      KeyInput.cs. credits: Nate Burr
+    * rpi: Added /opt/vc/include/interface/vmcs_host/linux to rpi_cflags to fix
+      building on 'next' firmware branch. credits: Nedim Lisica
+  * fixed:
+    * don't send two active source message sequences to philips. issue #118
+    * don't send deck status updates to philips when activating the source
+    * update the active source status correctly after a manual switch to
+      another source. closes #124
+    * rename cec_audio_status() to cec_audio_get_status() to avoid conflict
+      with the cec_audio_status enum.  This makes the C API compile again.
+      credits: Dave Chapman
+    * LibCECTray: Fixed bug with libcec adding the keyup for button commands
+      and making sure they are still executed. credits: Nate Burr
+    * rpi: register callback for HPD. re-read the physical address when we
+      received VC_HDMI_ATTACHED. issue #109
+
+ -- Pulse-Eight Packaging <packaging@pulse-eight.com>  Tue, 26 Feb 2013 23:06:00 +0100
+
 libcec (2.0.5-1) unstable; urgency=low
 
   * changed:
index 02450331d43c0e365ab32eed44a6e5bbc62e1ca1..ebfaf488f16d4b8d6e9bdcfa6b8764cf5c03888f 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -72,6 +72,7 @@ namespace CEC
     virtual void Close(void) = 0;
 
     /*!
+     * @deprecated Use DetectAdapters() instead
      * @brief Try to find all connected CEC adapters.
      * @param deviceList The vector to store device descriptors in.
      * @param iBufSize The size of the deviceList buffer.
@@ -446,6 +447,17 @@ namespace CEC
      * @return The current audio status, or cec_audio_status if unknown.
      */
     virtual uint8_t AudioStatus(void) = 0;
+
+    /*!
+     * @brief Try to find all connected CEC adapters.
+     * @param deviceList The vector to store device descriptors in.
+     * @param iBufSize The size of the deviceList buffer.
+     * @param strDevicePath Optional device path. Only adds device descriptors that match the given device path.
+     * @param bQuickScan True to do a "quick scan", which will not open a connection to the adapter. Firmware version information and the exact device type will be missing
+     * @return The number of devices that were found, or -1 when an error occured.
+     */
+    virtual int8_t DetectAdapters(cec_adapter_descriptor *deviceList, uint8_t iBufSize, const char *strDevicePath = NULL, bool bQuickScan = false) = 0;
+
   };
 };
 
index 2e1f9a80d8ab6f5260aa7eaf47450a9be51f238f..0aca0b7683a811efe671e72293656a4c77c529fc 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -282,7 +282,13 @@ extern DECLSPEC uint8_t cec_audio_mute(void);
 
 extern DECLSPEC uint8_t cec_audio_unmute(void);
 
-extern DECLSPEC uint8_t cec_audio_status(void);
+extern DECLSPEC uint8_t cec_audio_get_status(void);
+
+#ifdef __cplusplus
+extern DECLSPEC int8_t cec_detect_adapters(CEC::cec_adapter_descriptor *deviceList, uint8_t iBufSize, const char *strDevicePath, int bQuickScan);
+#else
+extern DECLSPEC int8_t cec_detect_adapters(cec_adapter_descriptor *deviceList, uint8_t iBufSize, const char *strDevicePath, int bQuickScan);
+#endif
 
 #ifdef __cplusplus
 };
index de138cc7ea90e070e6a056bb9f60bd21bbc353e4..190f3f87bef2d920b9a602f29fd60b06e92d1dda 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index e85bcfa44bccf45e3c182531a455f9b94c4ba374..0b62529fda39b8abf986e76e0b6d44eda2f42cd1 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -174,6 +174,11 @@ namespace CEC {
  */
 #define CEC_DEFAULT_SETTING_POWER_OFF_SCREENSAVER     1
 
+/*!
+ * default value for settings "wake up when deactivating the screensaver"
+ */
+#define CEC_DEFAULT_SETTING_POWER_ON_SCREENSAVER      1
+
 /*!
  * default value for settings "power off on standby"
  */
@@ -307,7 +312,7 @@ namespace CEC {
 /*!
  * libCEC's minor version number
  */
-#define CEC_LIB_VERSION_MINOR        0
+#define CEC_LIB_VERSION_MINOR        1
 
 #define MSGSTART                     0xFF
 #define MSGEND                       0xFE
@@ -820,26 +825,26 @@ typedef enum cec_bus_device_status
 
 typedef enum cec_vendor_id
 {
+  CEC_VENDOR_TOSHIBA   = 0x000039,
   CEC_VENDOR_SAMSUNG   = 0x0000F0,
-  CEC_VENDOR_LG        = 0x00E091,
-  CEC_VENDOR_PANASONIC = 0x008045,
-  CEC_VENDOR_PIONEER   = 0x00E036,
+  CEC_VENDOR_DENON     = 0x0005CD,
+  CEC_VENDOR_LOEWE     = 0x000982,
   CEC_VENDOR_ONKYO     = 0x0009B0,
-  CEC_VENDOR_YAMAHA    = 0x00A0DE,
-  CEC_VENDOR_PHILIPS   = 0x00903E,
-  CEC_VENDOR_SONY      = 0x080046,
-  CEC_VENDOR_TOSHIBA   = 0x000039,
+  CEC_VENDOR_MEDION    = 0x000CB8,
   CEC_VENDOR_AKAI      = 0x0020C7,
   CEC_VENDOR_AOC       = 0x002467,
-  CEC_VENDOR_BENQ      = 0x8065E9,
+  CEC_VENDOR_PANASONIC = 0x008045,
+  CEC_VENDOR_PHILIPS   = 0x00903E,
   CEC_VENDOR_DAEWOO    = 0x009053,
+  CEC_VENDOR_YAMAHA    = 0x00A0DE,
   CEC_VENDOR_GRUNDIG   = 0x00D0D5,
-  CEC_VENDOR_MEDION    = 0x000CB8,
+  CEC_VENDOR_PIONEER   = 0x00E036,
+  CEC_VENDOR_LG        = 0x00E091,
   CEC_VENDOR_SHARP     = 0x08001F,
-  CEC_VENDOR_VIZIO     = 0x6B746D,
+  CEC_VENDOR_SONY      = 0x080046,
   CEC_VENDOR_BROADCOM  = 0x18C086,
-  CEC_VENDOR_LOEWE     = 0x000982,
-   
+  CEC_VENDOR_VIZIO     = 0x6B746D,
+  CEC_VENDOR_BENQ      = 0x8065E9,
   CEC_VENDOR_UNKNOWN   = 0
 } cec_vendor_id;
 
@@ -883,6 +888,18 @@ typedef struct cec_adapter
   char comm[1024]; /**< the name of the com port */
 } cec_adapter;
 
+typedef struct cec_adapter_descriptor
+{
+  char             strComPath[1024]; /**< the path to the com port */
+  char             strComName[1024]; /**< the name of the com port */
+  uint16_t         iVendorId;
+  uint16_t         iProductId;
+  uint16_t         iFirmwareVersion;
+  uint16_t         iPhysicalAddress;
+  uint32_t         iFirmwareBuildDate;
+  cec_adapter_type adapterType;
+} cec_adapter_descriptor;
+
 typedef struct cec_datapacket
 {
   uint8_t data[100]; /**< the actual data */
@@ -1387,7 +1404,8 @@ typedef enum cec_client_version
   CEC_CLIENT_VERSION_2_0_3   = 0x2003,
   CEC_CLIENT_VERSION_2_0_4   = 0x2004,
   CEC_CLIENT_VERSION_2_0_5   = 0x2005,
-  CEC_CLIENT_VERSION_CURRENT = 0x2005
+  CEC_CLIENT_VERSION_2_1_0   = 0x2100,
+  CEC_CLIENT_VERSION_CURRENT = 0x2100
 } cec_client_version;
 
 typedef enum cec_server_version
@@ -1415,7 +1433,8 @@ typedef enum cec_server_version
   CEC_SERVER_VERSION_2_0_3   = 0x2003,
   CEC_SERVER_VERSION_2_0_4   = 0x2004,
   CEC_SERVER_VERSION_2_0_5   = 0x2005,
-  CEC_SERVER_VERSION_CURRENT = 0x2005
+  CEC_SERVER_VERSION_2_1_0   = 0x2100,
+  CEC_SERVER_VERSION_CURRENT = 0x2100
 } cec_server_version;
 
 struct libcec_configuration
@@ -1438,6 +1457,7 @@ struct libcec_configuration
   uint8_t               bUseTVMenuLanguage;   /*!< use the menu language of the TV in the player application */
   uint8_t               bActivateSource;      /*!< make libCEC the active source on the bus when starting the player application */
   uint8_t               bPowerOffScreensaver; /*!< put devices in standby mode when activating the screensaver */
+  uint8_t               bPowerOnScreensaver;  /*!< wake devices when deactivating the screensaver */
   uint8_t               bPowerOffOnStandby;   /*!< put this PC in standby mode when the TV is switched off. only used when bShutdownOnStandby = 0  */
   uint8_t               bSendInactiveSource;  /*!< send an 'inactive source' message when stopping the player. added in 1.5.1 */
 
@@ -1490,8 +1510,9 @@ struct libcec_configuration
                   cecVersion                == other.cecVersion &&
                   adapterType               == other.adapterType &&
                   iDoubleTapTimeoutMs       == other.iDoubleTapTimeoutMs &&
-                  (other.clientVersion <= CEC_CLIENT_VERSION_2_0_4 || comboKey           == other.comboKey) &&
-                  (other.clientVersion <= CEC_CLIENT_VERSION_2_0_4 || iComboKeyTimeoutMs == other.iComboKeyTimeoutMs));
+                  (other.clientVersion <= CEC_CLIENT_VERSION_2_0_4 || comboKey            == other.comboKey) &&
+                  (other.clientVersion <= CEC_CLIENT_VERSION_2_0_4 || iComboKeyTimeoutMs  == other.iComboKeyTimeoutMs) &&
+                  (other.clientVersion <  CEC_CLIENT_VERSION_2_1_0 || bPowerOnScreensaver == other.bPowerOnScreensaver));
   }
 
   bool operator!=(const libcec_configuration &other) const
@@ -1515,6 +1536,7 @@ struct libcec_configuration
     bUseTVMenuLanguage =              CEC_DEFAULT_SETTING_USE_TV_MENU_LANGUAGE;
     bActivateSource =                 CEC_DEFAULT_SETTING_ACTIVATE_SOURCE;
     bPowerOffScreensaver =            CEC_DEFAULT_SETTING_POWER_OFF_SCREENSAVER;
+    bPowerOnScreensaver =             CEC_DEFAULT_SETTING_POWER_ON_SCREENSAVER;
     bPowerOffOnStandby =              CEC_DEFAULT_SETTING_POWER_OFF_ON_STANDBY;
     bShutdownOnStandby =              CEC_DEFAULT_SETTING_SHUTDOWN_ON_STANDBY;
     bSendInactiveSource =             CEC_DEFAULT_SETTING_SEND_INACTIVE_SOURCE;
index 635df7abe61bebe1b99dbaaa029e4fe0c46a2a68..3a34ab4ee35a15a48256fa0eb04fb8f11781948f 100644 (file)
@@ -1,5 +1,5 @@
 ;libCEC installer
-;Copyright (C) 2012 Pulse-Eight Ltd.
+;Copyright (C) 2011-2013 Pulse-Eight Ltd.
 ;http://www.pulse-eight.com/
 
 !include "MUI2.nsh"
@@ -7,7 +7,7 @@
 !include "LogicLib.nsh"
 !include "x64.nsh"
 
-Name "Pulse-Eight libCEC version 2.0.5"
+Name "Pulse-Eight libCEC version 2.1.0"
 OutFile "..\build\libCEC-installer.exe"
 
 XPStyle on
index 0b1ebe19a9cb8f8d55ac6d1551cfe2dba85901d4..3b766b503d42d16e5a53191062990107b65b9f6a 100644 (file)
Binary files a/project/libcec.rc and b/project/libcec.rc differ
index 92ac3ac08ab05269f71fb11c4efcb09ea6adcd75..c9323fef064b649d96c04da12e572deecac43aab 100644 (file)
@@ -1,5 +1,5 @@
 ;p8-usbcec-driver installer
-;Copyright (C) 2012 Pulse-Eight Ltd.
+;Copyright (C) 2011-2013 Pulse-Eight Ltd.
 ;http://www.pulse-eight.com/
 
 !include "MUI2.nsh"
index 1f44a184e00ce593bf9a2e618f5c4f8332867887..161e867088f8e8109cff9b74662049a9dba3832a 100644 (file)
Binary files a/project/testclient.rc and b/project/testclient.rc differ
index 0e8f4602858ffbae6864cb020d95ed2787a4d99e..e3d22f6948a889a5bf3abe1d6c1548e9a7514998 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -43,7 +43,7 @@ namespace CecSharpClient
       Config = new LibCECConfiguration();
       Config.DeviceTypes.Types[0] = CecDeviceType.RecordingDevice;
       Config.DeviceName = "CEC Tester";
-      Config.ClientVersion = CecClientVersion.Version2_0_5;
+      Config.ClientVersion = CecClientVersion.Version2_1_0;
       Config.SetCallbacks(this);
       LogLevel = (int)CecLogLevel.All;
 
index d49913bdcba799b3c23e59199236d55654807ca9..f76423a2dd14664a8c6f8f398ed873d5a489b475 100644 (file)
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("Pulse-Eight Ltd.")]
 [assembly: AssemblyProduct("CecSharpClient")]
-[assembly: AssemblyCopyright("Copyright (c) Pulse-Eight Ltd. 2011-2012")]
+[assembly: AssemblyCopyright("Copyright (c) Pulse-Eight Ltd. 2011-2013")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
 // You can specify all the values or you can default the Build and Revision Numbers 
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.0.5.0")]
-[assembly: AssemblyFileVersion("2.0.5.0")]
+[assembly: AssemblyVersion("2.1.0.0")]
+[assembly: AssemblyFileVersion("2.1.0.0")]
index 8e4ecb845e825a9a55f669f5c7f528478bfbcac6..441eca8592a42dccd326e2fb045730d1962e27d9 100644 (file)
@@ -9,11 +9,11 @@ using namespace System::Security::Permissions;
 [assembly:AssemblyConfigurationAttribute("")];
 [assembly:AssemblyCompanyAttribute("Pulse-Eight Ltd.")];
 [assembly:AssemblyProductAttribute("LibCecSharp")];
-[assembly:AssemblyCopyrightAttribute("Copyright (c) Pulse-Eight Ltd. 2011-2012")];
+[assembly:AssemblyCopyrightAttribute("Copyright (c) Pulse-Eight Ltd. 2011-2013")];
 [assembly:AssemblyTrademarkAttribute("")];
 [assembly:AssemblyCultureAttribute("")];
 
-[assembly:AssemblyVersionAttribute("2.0.5.0")];
+[assembly:AssemblyVersionAttribute("2.1.0.0")];
 
 [assembly:ComVisible(false)];
 [assembly:CLSCompliantAttribute(true)];
index a75a76217a511f852ef68f856ca4e8a707df5b8b..c7636a1551bf2cc0696a66c0c942b482673c7319 100644 (file)
@@ -2,7 +2,7 @@
 /*
 * This file is part of the libCEC(R) library.
 *
-* libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+* libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
 * libCEC(R) is an original work, containing original code.
 *
 * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -764,22 +764,26 @@ namespace CecSharp
   /// </summary>
   public enum class CecVendorId
   {
+    Toshiba   = 0x000039,
     Samsung   = 0x0000F0,
-    LG        = 0x00E091,
-    Panasonic = 0x008045,
-    Pioneer   = 0x00E036,
+    Denon     = 0x0005CD,
+    Loewe     = 0x000982,
     Onkyo     = 0x0009B0,
-    Yamaha    = 0x00A0DE,
-    Philips   = 0x00903E,
-    Sony      = 0x080046,
-    Toshiba   = 0x000039,
+    Medion    = 0x000CB8,
     Akai      = 0x0020C7,
-    Benq      = 0x8065E9,
+    AOC       = 0x002467,
+    Panasonic = 0x008045,
+    Philips   = 0x00903E,
     Daewoo    = 0x009053,
+    Yamaha    = 0x00A0DE,
     Grundig   = 0x00D0D5,
-    Medion    = 0x000CB8,
+    Pioneer   = 0x00E036,
+    LG        = 0x00E091,
     Sharp     = 0x08001F,
+    Sony      = 0x080046,
+    Broadcom  = 0x18C086,
     Vizio     = 0x6B746D,
+    Benq      = 0x8065E9,
     Unknown   = 0
   };
 
@@ -1183,7 +1187,11 @@ namespace CecSharp
     /// <summary>
     /// v2.0.5
     /// </summary>
-    Version2_0_5   = 0x2005
+    Version2_0_5   = 0x2005,
+    /// <summary>
+    /// v2.1.0
+    /// </summary>
+    Version2_1_0   = 0x2100
   };
 
   /// <summary>
@@ -1282,7 +1290,11 @@ namespace CecSharp
     /// <summary>
     /// v2.0.5
     /// </summary>
-    Version2_0_5   = 0x2005
+    Version2_0_5   = 0x2005,
+    /// <summary>
+    /// v2.1.0
+    /// </summary>
+    Version2_1_0   = 0x2100
   };
 
   /// <summary>
@@ -1305,7 +1317,11 @@ namespace CecSharp
     /// <summary>
     /// Raspberry Pi
     /// </summary>
-    RaspberryPi             = 0x100
+    RaspberryPi             = 0x100,
+    /// <summary>
+    /// TDA995x
+    /// </summary>
+    TDA995x                 = 0x200
   };
 
   /// <summary>
@@ -1669,8 +1685,8 @@ namespace CecSharp
       PhysicalAddress     = CEC_DEFAULT_PHYSICAL_ADDRESS;
       BaseDevice          = (CecLogicalAddress)CEC_DEFAULT_BASE_DEVICE;
       HDMIPort            = CEC_DEFAULT_HDMI_PORT;
-      ClientVersion       = CecClientVersion::VersionPre1_5;
-      ServerVersion       = CecServerVersion::VersionPre1_5;
+      ClientVersion       = CecClientVersion::Version2_1_0;
+      ServerVersion       = CecServerVersion::Version2_1_0;
       TvVendor            = CecVendorId::Unknown;
 
       GetSettingsFromROM  = false;
@@ -1778,6 +1794,9 @@ namespace CecSharp
 
       if (ServerVersion >= CecServerVersion::Version1_8_2)
         AdapterType = (CecAdapterType)config.adapterType;
+
+      if (ServerVersion >= CecServerVersion::Version2_1_0)
+        PowerOnScreensaver = config.bPowerOnScreensaver == 1;
     }
 
     /// <summary>
@@ -1916,6 +1935,11 @@ namespace CecSharp
     /// The type of adapter that libCEC is connected to.
     /// </summary>
     property CecAdapterType       AdapterType;
+
+       /// <summary>
+    /// True to power on when quitting the screensaver.
+    /// </summary>
+       property bool                 PowerOnScreensaver;
   };
 
   // the callback methods are called by unmanaged code, so we need some delegates for this
index ff3c619f487694166c2ec37d23aa37763e446c67..ecb9bea9223f0f74abefa161f3f7f08818df7078 100644 (file)
@@ -1,7 +1,7 @@
 /*
 * This file is part of the libCEC(R) library.
 *
-* libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+* libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
 * libCEC(R) is an original work, containing original code.
 *
 * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -822,6 +822,9 @@ namespace CecSharp
       if (netConfig->ServerVersion >= CecServerVersion::Version1_8_0)
         config.cecVersion = (cec_version)netConfig->CECVersion;
 
+      if (netConfig->ServerVersion >= CecServerVersion::Version2_1_0)
+        config.bPowerOnScreensaver  = netConfig->PowerOnScreensaver ? 1 : 0;
+
       config.callbacks = &g_cecCallbacks;
     }
 
index c0a6a3a5ee5da5ff1c4434fdabcc384b42a597e7..32dc7af2b8675f7207703931933d17fe2183ef89 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 3f09c27e43e3d700219d28be5e52845a5ca95a52..10d7be7cfd5677c316b209868c7afe4051a64f90 100644 (file)
@@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("Pulse-Eight Ltd.")]
 [assembly: AssemblyProduct("libCEC Tray")]
-[assembly: AssemblyCopyright("Copyright (c) Pulse-Eight Ltd. 2011-2012")]
+[assembly: AssemblyCopyright("Copyright (c) Pulse-Eight Ltd. 2011-2013")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
 // You can specify all the values or you can default the Build and Revision Numbers 
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.0.5.0")]
-[assembly: AssemblyFileVersion("2.0.5.0")]
+[assembly: AssemblyVersion("2.1.0.0")]
+[assembly: AssemblyFileVersion("2.1.0.0")]
index 2d065a94d192b705a7c929cf01af4074efbd0a5d..13dc92035be67a078ffb42660552a6d98c78baf8 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 751330fd77497a234df98c09148cee7205c20063..c1a6ed32e29c26411121a2686d0e8709d680488a 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -438,7 +438,7 @@ namespace LibCECTray.controller
       {
         if (_config == null)
         {
-          _config = new LibCECConfiguration { DeviceName = "CEC Tray", ClientVersion = CecClientVersion.Version2_0_5 };
+          _config = new LibCECConfiguration { DeviceName = "CEC Tray", ClientVersion = CecClientVersion.Version2_1_0 };
           _config.DeviceTypes.Types[0] = CecDeviceType.RecordingDevice;
           _config.SetCallbacks(this);
 
index 02be8389eeb68e2c622ae95168b0bd86d4454648..f2ccfc054f722a9a74d463ed2000313d3bb180ac 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index ada74cab122b34d1580107a2e1bead457139300a..bdda2738c4a0b7bb459d7e56278d2c8f20da9980 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 4d661a189876f598fabb279b1587077b0a0fa456..a03fb0ee3cd298706dc5e83ee7c4d56a236dccd7 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 624ddc82feeb33d29b12ffd6b81511a9c88d3a74..7e8a1e87e19c9d6d5cdb1e89f1c5234c2edf9956 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 69bff63db0da4dcb7ca94ec4b5402cb3626025b2..bda47a2d272bb8ea3a239fd37b768603a33b6994 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 500d9ea26c5a672e5f8fa1f38343ae0c0356eb87..c32a1d50c94c8bf6c401239052fdf710981cc604 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index f64486b99f94f623c088edfacc342c66cfdc8bd6..ce4bc4ad288aa15e4e07070d84565f0ac34dd06a 100644 (file)
@@ -1,3 +1,35 @@
+/*
+ * This file is part of the libCEC(R) library.
+ *
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is an original work, containing original code.
+ *
+ * libCEC(R) is a trademark of Pulse-Eight Limited.
+ *
+ * This program is dual-licensed; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *
+ * Alternatively, you can license this library under a commercial license,
+ * please contact Pulse-Eight Licensing for more information.
+ *
+ * For more information contact:
+ * Pulse-Eight Licensing       <license@pulse-eight.com>
+ *     http://www.pulse-eight.com/
+ *     http://www.pulse-eight.net/
+ */
+
 ï»¿using CecSharp;
 using LibCECTray.Properties;
 using LibCECTray.ui;
index f0ea9186afa563bf90aa9b4a31fd9d7497ebc054..ee9395058a452721950f516d759b03dfff0538b9 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 8c80d40937305c74a3e6c9bf4bd4318e31003d0a..9f888d842df65ef8c009d3ab403a7a83a5802b87 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index d0ecaed8a03c89c489e39211ea31f82b9075bdd0..37c02e90b5decc1c2d54082200b4690ab87d97bc 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index b9713af83f67b496dfa1ab94774a964a7df6c972..a9f2a239a5d991e3ad7554d0ec5a592b50025099 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index d35fdce8172b608856d135eaf1e1f5fc60d6b497..a72619b1463188ac265437203e2a91997fb07c6e 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 7d0b23d3dc46fca2dc149f7725117a1b53eb4983..ae9a226f26cfba18f7bc84b94ee68404d08ff710 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -114,7 +114,20 @@ namespace LibCECTray.controller.applications
                                 var item = args.RowIndex < ButtonConfig.Count ? ButtonConfig[args.RowIndex] : null;
                                 if (item == null)
                                   return;
-                                (new CecButtonConfigUI(item)).ShowDialog();
+                                if (args.ColumnIndex >= 0)
+                                {
+                                  (new CecButtonConfigUI(item)).ShowDialog();
+                                }
+                                else
+                                {
+                                  var mappedButton = ButtonConfig[item.Key]; 
+                                  if (mappedButton == null || mappedButton.Value.Empty())
+                                    return;
+
+                                    var controlWindow = FindInstance();
+                                    if (controlWindow != IntPtr.Zero && item.Key.Duration == 0)
+                                      mappedButton.Value.Transmit(controlWindow);
+                                }
                               };
 
       foreach (var item in _buttonConfig)
@@ -235,7 +248,7 @@ namespace LibCECTray.controller.applications
         return false;
 
       var controlWindow = FindInstance();
-      if (controlWindow != IntPtr.Zero && key.Duration == 0)
+      if (controlWindow != IntPtr.Zero && (key.Duration == 0 || key.Duration > 500))
         return mappedButton.Value.Transmit(controlWindow);
 
       return false;
index 7ba18f0292cf21bd3dae61eae4fb8523a5277bc5..d84133749e4ca0793afb0fbbe21f69682396c5e8 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index c4c02d9ff97661fc97ad3edbeb85082a9ba38441..c124ab0793f26ddb5758245199c341acf67c338a 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 0b1d26f2786f105c09b860ca05942fe64c9546ca..2835f1c16baa11b54c0ca9f53a822519efda5ff1 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 35300bd7688adc6150ca875c0f4c1c1abb9f8da0..2afa257cf8f2365e67f0b22d960333bdeadc92fc 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index bab8c94f170c8d97b9ff59256d6145791b6bcd8c..9f2cdee76e47bcc5dbb724ea59d858b7f9032721 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 3bcd10c462108cce78dc6231d8607c98762f958f..2e5897709dca21958797e3aa5491bd0163e371d8 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 308ce74fb344b596ff5443aae50432cf6cc6cd19..9fada44c914f08c1d8483489513ce2a41cb81208 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index f37fd104fc919506888c6a4512790498ec86c1c0..76e861b76e8762c526f19bba71fd2493415f9833 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -176,8 +176,39 @@ namespace LibCECTray.controller.applications
     {
       if (input != null)
       {
-        foreach (var item in input._input)
-          _input.Add(item);
+        bool foundModifier = false;
+        if (KeyCount > 0)
+        {
+          for (int i = _input.Count - 1; i >= 0; i--)
+          {
+
+            if (_input[i].Data.Keyboard.Flags == 0 && (
+               (ushort)WindowsAPI.VirtualKeyCode.VK_SHIFT == _input[i].Data.Keyboard.KeyCode ||
+               (ushort)WindowsAPI.VirtualKeyCode.VK_LSHIFT == _input[i].Data.Keyboard.KeyCode ||
+               (ushort)WindowsAPI.VirtualKeyCode.VK_RSHIFT == _input[i].Data.Keyboard.KeyCode ||
+
+               (ushort)WindowsAPI.VirtualKeyCode.VK_CONTROL == _input[i].Data.Keyboard.KeyCode ||
+               (ushort)WindowsAPI.VirtualKeyCode.VK_LCONTROL == _input[i].Data.Keyboard.KeyCode ||
+               (ushort)WindowsAPI.VirtualKeyCode.VK_RCONTROL == _input[i].Data.Keyboard.KeyCode ||
+
+               (ushort)WindowsAPI.VirtualKeyCode.VK_MENU == _input[i].Data.Keyboard.KeyCode ||
+               (ushort)WindowsAPI.VirtualKeyCode.VK_LMENU == _input[i].Data.Keyboard.KeyCode ||
+               (ushort)WindowsAPI.VirtualKeyCode.VK_RMENU == _input[i].Data.Keyboard.KeyCode
+              ))
+            {
+              foundModifier = true;
+              _input.Insert(i+1, input._input[0]);
+              _input.Insert(i+2, input._input[1]);
+              break;
+            }
+          }
+        }
+
+        if (!foundModifier)
+        {
+          _input.Add(input._input[0]);
+          _input.Add(input._input[1]);
+        }
       }
       return this;
     }
@@ -202,12 +233,38 @@ namespace LibCECTray.controller.applications
 
     public ApplicationAction RemoveItem(int index)
     {
-      //both keyup and keydown
-      if (index * 2 + 1 < _input.Count)
+      var current = 0;
+      var downKeyIndex = 0;
+      var upKeyIndex = 0;
+      bool downFound = false;
+
+      for (int i = 0; i < _input.Count; i++)
       {
-        _input.RemoveAt(index * 2);
-        _input.RemoveAt(index * 2);
+        if (_input[i].Data.Keyboard.Flags == 0 && !downFound)
+        {
+          if (index == current)
+          {
+            downKeyIndex = i;
+            downFound = true;
+          }
+          current++;
+        }
+        else if(_input[i].Data.Keyboard.Flags != 0 && downFound)
+        {
+          if (_input[i].Data.Keyboard.KeyCode == _input[downKeyIndex].Data.Keyboard.KeyCode)
+          {
+            upKeyIndex = i;
+            break;
+          }
+        }
       }
+
+      WindowsAPI.Input downKey = _input[downKeyIndex];
+      WindowsAPI.Input upKey = _input[upKeyIndex];
+
+      _input.Remove(downKey);
+      _input.Remove(upKey);
+
       return this;
     }
 
@@ -221,7 +278,7 @@ namespace LibCECTray.controller.applications
         {
           var tmp = string.Format(KeyCount > 1 ? "[{0}] " : "{0} ",
                                   WindowsAPI.GetVirtualKeyName((WindowsAPI.VirtualKeyCode) input.Data.Keyboard.KeyCode));
-          current += tmp.Length + 1;
+          current += tmp.Length;
           if (index <= current)
             return RemoveItem(item);
           item++;
@@ -233,4 +290,4 @@ namespace LibCECTray.controller.applications
 
     private readonly List<WindowsAPI.Input> _input = new List<WindowsAPI.Input>();
   }
-}
\ No newline at end of file
+}
index 90453dc8193682eadc3198af7d04391bc58bbc3a..ab9b6e0f3c7d35455f8ce868e998fe3812d3b5a7 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -451,4 +451,4 @@ namespace LibCECTray.controller.applications
       return null;
     }
   }
-}
\ No newline at end of file
+}
index 237973026f37a3627301881b2144b8bc0984f8f2..17d7cc73297f814a22afef6b5c7073a68e7c494e 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index c2697885973735bc992989e25cc40cea5a8c09f5..075178c3c47f69db8a692eb4f01154444dacedf0 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 7c2226f8c2002e9e10b3129ed1fbac8b2ed1c67c..372d7b11b9357d8d764e37b8a07202b54e8c47d7 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 5a32ad2dfb2eabcbd512b5e1091ce56b2a99fde7..989118624e8bfd01d97de3395334546ca2300c90 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 056661bbc8d33f73a98e12451591837358679dd3..8cfd7fb1a3f1fe3591f7290acc155f45d58bd1fd 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index e135bfc7a709fd8a67d1162aa3a29776ba368db3..537ec22a3f9b968bcfd9089acb28d1ae77bd73fd 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 0faf5c3b3cbf625aae5845d2cf90d991c0859e3b..665f7884c54906be8d8ac8203b5cb74245b24a2b 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 252b5c3df70aea1c6e3b45fa9e8c4b4e62b3517b..430082a5d2e4eb902d73ae62114dde04091bb629 100644 (file)
@@ -1,3 +1,35 @@
+/*
+ * This file is part of the libCEC(R) library.
+ *
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is an original work, containing original code.
+ *
+ * libCEC(R) is a trademark of Pulse-Eight Limited.
+ *
+ * This program is dual-licensed; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *
+ * Alternatively, you can license this library under a commercial license,
+ * please contact Pulse-Eight Licensing for more information.
+ *
+ * For more information contact:
+ * Pulse-Eight Licensing       <license@pulse-eight.com>
+ *     http://www.pulse-eight.com/
+ *     http://www.pulse-eight.net/
+ */
+
 ï»¿using System.Windows.Forms;
 using CecSharp;
 using LibCECTray.Properties;
index 0a9950ca85f49d61b0bde970c88fcb3285bf1477..6a505b186d75e9aebd9bb6f86f2d2d371e40ffd6 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index cee77e3133866eea659c06230d9bf4a02273a7fc..44f856a0681c9142a1fbeab362779fd235f55099 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index b2bffe943c66ac62825122ea961da14124cfeb4d..693a713deb79ed4682a46374e1beef40c93f9d54 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 68adcf19e7fabf643c3f5a292cdcca0595b2dc02..a593a9ee4ce3f28861645e532cd0d5a449d40471 100644 (file)
@@ -1,3 +1,35 @@
+/*
+ * This file is part of the libCEC(R) library.
+ *
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is an original work, containing original code.
+ *
+ * libCEC(R) is a trademark of Pulse-Eight Limited.
+ *
+ * This program is dual-licensed; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *
+ * Alternatively, you can license this library under a commercial license,
+ * please contact Pulse-Eight Licensing for more information.
+ *
+ * For more information contact:
+ * Pulse-Eight Licensing       <license@pulse-eight.com>
+ *     http://www.pulse-eight.com/
+ *     http://www.pulse-eight.net/
+ */
+
 ï»¿using System.Globalization;
 using System.Windows.Forms;
 
index 49ba2e777d157d82641ec6cb9d58d4ca3fad9563..77dc804a7e3ed1e1051934e853a3d06f30f6f653 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index e7e8a5c3bd86992e2267c3bf86f0f70939f30906..d5c3e7fd77a9c34512614b47ba7d1c08c75ee7c2 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 70a9b9c1556a8d57d3cb62b400b92bac251f8bef..a9464073d5975bdd59f303d365698830905c88f7 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index be9d282baa6b73fa979214585cd19fcd83e09593..2e2f242d3b87f6617cf6d0e50beac022ca7d9bd7 100644 (file)
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   <data name="label1.Text" xml:space="preserve">
-    <value>libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+    <value>libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
 libCEC(R) is an original work, containing original code.
 
 libCEC(R) is a trademark of Pulse-Eight Limited.
index d3d6ae86a3f05752f6fe3e1f0f36a5f3d8aab0f1..464547bad2a57b173f633b7f61598065cdf15504 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index a781ce73049fa658b858e1d04dbafaba96436628..6703e5f8d76e6a9a22c825678bf7b7ccb0a4fcd8 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -63,7 +63,6 @@ namespace LibCECTray.ui
     {
       Text = Resources.app_name;
       InitializeComponent();
-      _controller = new CECController(this);
       VisibleChanged += delegate
                        {
                          if (!Visible)
@@ -81,7 +80,7 @@ namespace LibCECTray.ui
 
     private void CECTrayLoad(object sender, EventArgs e)
     {
-      _controller.Initialise();
+      Controller.Initialise();
     }
 
     protected override void Dispose(bool disposing)
@@ -89,7 +88,7 @@ namespace LibCECTray.ui
       Hide();
       if (disposing)
       {
-        _controller.Close();
+        Controller.Close();
       }
       if (disposing && (components != null))
       {
@@ -120,12 +119,12 @@ namespace LibCECTray.ui
 
     private void BSaveClick(object sender, EventArgs e)
     {
-      _controller.PersistSettings();
+      Controller.PersistSettings();
     }
    
     private void BReloadConfigClick(object sender, EventArgs e)
     {
-      _controller.ResetDefaultSettings();
+      Controller.ResetDefaultSettings();
     }
     #endregion
 
@@ -170,22 +169,22 @@ namespace LibCECTray.ui
 
     private void BSendImageViewOnClick(object sender, EventArgs e)
     {
-      _controller.CECActions.SendImageViewOn(GetTargetDevice());
+      Controller.CECActions.SendImageViewOn(GetTargetDevice());
     }
 
     private void BStandbyClick(object sender, EventArgs e)
     {
-      _controller.CECActions.SendStandby(GetTargetDevice());
+      Controller.CECActions.SendStandby(GetTargetDevice());
     }
 
     private void BScanClick(object sender, EventArgs e)
     {
-      _controller.CECActions.ShowDeviceInfo(GetTargetDevice());
+      Controller.CECActions.ShowDeviceInfo(GetTargetDevice());
     }
 
     private void BActivateSourceClick(object sender, EventArgs e)
     {
-      _controller.CECActions.ActivateSource(GetTargetDevice());
+      Controller.CECActions.ActivateSource(GetTargetDevice());
     }
 
     private void CbCommandDestinationSelectedIndexChanged(object sender, EventArgs e)
@@ -200,22 +199,22 @@ namespace LibCECTray.ui
 
     private void BVolUpClick(object sender, EventArgs e)
     {
-      _controller.Lib.VolumeUp(true);
+      Controller.Lib.VolumeUp(true);
     }
 
     private void BVolDownClick(object sender, EventArgs e)
     {
-      _controller.Lib.VolumeDown(true);
+      Controller.Lib.VolumeDown(true);
     }
 
     private void BMuteClick(object sender, EventArgs e)
     {
-      _controller.Lib.MuteAudio(true);
+      Controller.Lib.MuteAudio(true);
     }
 
     private void BRescanDevicesClick(object sender, EventArgs e)
     {
-      _controller.CECActions.RescanDevices();
+      Controller.CECActions.RescanDevices();
     }
     #endregion
 
@@ -333,12 +332,12 @@ namespace LibCECTray.ui
 
     private void AboutToolStripMenuItemClick(object sender, EventArgs e)
     {
-      (new About(_controller.LibServerVersion, _controller.LibClientVersion, _controller.LibInfo)).ShowDialog();
+      (new About(Controller.LibServerVersion, Controller.LibClientVersion, Controller.LibInfo)).ShowDialog();
     }
 
     private void AdvancedModeToolStripMenuItemClick(object sender, EventArgs e)
     {
-      _controller.Settings.AdvancedMode.Value = !advancedModeToolStripMenuItem.Checked;
+      Controller.Settings.AdvancedMode.Value = !advancedModeToolStripMenuItem.Checked;
       ShowHideAdvanced(!advancedModeToolStripMenuItem.Checked);
     }
 
@@ -372,12 +371,12 @@ namespace LibCECTray.ui
     {
       if (Visible && WindowState != FormWindowState.Minimized)
       {
-        _controller.Settings.StartHidden.Value = true;
+        Controller.Settings.StartHidden.Value = true;
         Hide();
       }
       else
       {
-        _controller.Settings.StartHidden.Value = false;
+        Controller.Settings.StartHidden.Value = false;
         Show();
       }
     }
@@ -426,7 +425,7 @@ namespace LibCECTray.ui
 
     private void TsAdvancedClick(object sender, EventArgs e)
     {
-      _controller.Settings.AdvancedMode.Value = !tsAdvanced.Checked;
+      Controller.Settings.AdvancedMode.Value = !tsAdvanced.Checked;
       ShowHideAdvanced(!tsAdvanced.Checked);
     }
 
@@ -482,10 +481,10 @@ namespace LibCECTray.ui
     #region Class members
     private ConfigTab _selectedTab = ConfigTab.Configuration;
     private string _log = string.Empty;
-    private readonly CECController _controller;
+    private CECController _controller;
     public CECController Controller
     {
-      get { return _controller; }
+      get { return _controller ?? (_controller = new CECController(this)); }
     }
     public Control.ControlCollection TabControls
     {
@@ -499,8 +498,8 @@ namespace LibCECTray.ui
 
     private void AddNewApplicationToolStripMenuItemClick(object sender, EventArgs e)
     {
-      ConfigureApplication appConfig = new ConfigureApplication(_controller.Settings, _controller);
-      _controller.DisplayDialog(appConfig, false);
+      ConfigureApplication appConfig = new ConfigureApplication(Controller.Settings, Controller);
+      Controller.DisplayDialog(appConfig, false);
     }
   }
 }
index 135ff7348d71d5b0e07854642f1a60b1cb378066..581a41797fb8ff189431bfea849d33374aabea86 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿/*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 21f0d79a81bce2fefc22d009b6b2d247ae7b444d..3fcffadf0a55fb9e8f179205e649de864dbd8920 100644 (file)
--- a/src/env.h
+++ b/src/env.h
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index d0699130cd303a6bc247351edd318653ce7cdd5a..4db7fcd50f1476eb2caf9df8e77966253f808cc7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -822,6 +822,7 @@ bool CCECClient::GetCurrentConfiguration(libcec_configuration &configuration)
   configuration.wakeDevices               = m_configuration.wakeDevices;
   configuration.powerOffDevices           = m_configuration.powerOffDevices;
   configuration.bPowerOffScreensaver      = m_configuration.bPowerOffScreensaver;
+  configuration.bPowerOnScreensaver       = m_configuration.bPowerOnScreensaver;
   configuration.bPowerOffOnStandby        = m_configuration.bPowerOffOnStandby;
   configuration.bSendInactiveSource       = m_configuration.bSendInactiveSource;
   configuration.logicalAddresses          = m_configuration.logicalAddresses;
@@ -888,6 +889,11 @@ bool CCECClient::SetConfiguration(const libcec_configuration &configuration)
       m_configuration.comboKey           = defaultSettings.comboKey;
       m_configuration.iComboKeyTimeoutMs = defaultSettings.iComboKeyTimeoutMs;
     }
+
+    if (m_configuration.clientVersion >= CEC_CLIENT_VERSION_2_1_0)
+      m_configuration.bPowerOnScreensaver = configuration.bPowerOnScreensaver;
+    else
+      m_configuration.bPowerOnScreensaver = defaultSettings.bPowerOnScreensaver;
   }
 
   bool bNeedReinit(false);
index adeaf739b22c5474ce6e9ddae15085063bbb46d2..ba76736add04d9111a2d9a1627f13f200c116106 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index a8679b81b611d4b231edb70ae3dd88954835c05b..674d89bc1e9e1bddb18bc86daea5ba37db85e86a 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 707b8eb2d6e767a13c527d62b4d23ac21fa803ea..84a46d635e01823a7fb7bcff25adcb666fcdf36b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -623,6 +623,8 @@ bool CCECProcessor::GetDeviceInformation(const char *strPort, libcec_configurati
   config->iFirmwareBuildDate = m_communication->GetFirmwareBuildDate();
   config->adapterType        = m_communication->GetAdapterType();
 
+  Close();
+
   return true;
 }
 
@@ -986,6 +988,14 @@ void CCECProcessor::HandleLogicalAddressLost(cec_logical_address oldAddress)
   }
 }
 
+void CCECProcessor::HandlePhysicalAddressChanged(uint16_t iNewAddress)
+{
+  m_libcec->AddLog(CEC_LOG_NOTICE, "physical address changed to %04x", iNewAddress);
+  CCECClient* client = GetPrimaryClient();
+  if (client)
+    client->SetPhysicalAddress(iNewAddress);
+}
+
 uint16_t CCECProcessor::GetAdapterVendorId(void) const
 {
   return m_communication ? m_communication->GetAdapterVendorId() : 0;
index 69586a7cb8fd47f7f010223ad40eb58d5195b0a4..268be64ae0dc9d2956b7fb37df79ec2809a3d937 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -83,6 +83,7 @@ namespace CEC
 
       bool                  OnCommandReceived(const cec_command &command);
       void                  HandleLogicalAddressLost(cec_logical_address oldAddress);
+      void                  HandlePhysicalAddressChanged(uint16_t iNewAddress);
 
       CCECBusDevice *       GetDevice(cec_logical_address address) const;
       CCECAudioSystem *     GetAudioSystem(void) const;
index b3e209bb97c3516d69f1236a476bbf1e85e91349..065d6849f605f0e8d5587abf1ce52b5058762e2a 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -512,6 +512,8 @@ namespace CEC
         return "Broadcom";
       case CEC_VENDOR_LOEWE:
         return "Loewe";
+      case CEC_VENDOR_DENON:
+        return "Denon";
       default:
         return "Unknown";
       }
@@ -567,6 +569,8 @@ namespace CEC
         return "2.0.4";
       case CEC_CLIENT_VERSION_2_0_5:
         return "2.0.5";
+      case CEC_CLIENT_VERSION_2_1_0:
+        return "2.1.0";
       default:
         return "Unknown";
       }
@@ -622,6 +626,8 @@ namespace CEC
         return "2.0.4";
       case CEC_SERVER_VERSION_2_0_5:
         return "2.0.5";
+      case CEC_SERVER_VERSION_2_1_0:
+        return "2.1.0";
       default:
         return "Unknown";
       }
index a27ad9dbc45530e02a38ed3a3b408b64db6f9955..c24b4ed96e7d2ffcd8cb93fdbc7051d3325a0d30 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -559,3 +559,21 @@ uint8_t CLibCEC::AudioStatus(void)
 {
   return m_client ? m_client->AudioStatus() : (uint8_t)CEC_AUDIO_VOLUME_STATUS_UNKNOWN;
 }
+
+int8_t CLibCEC::DetectAdapters(cec_adapter_descriptor *deviceList, uint8_t iBufSize, const char *strDevicePath /* = NULL */, bool bQuickScan /* = false */)
+{
+  int8_t iAdaptersFound = CAdapterFactory(this).DetectAdapters(deviceList, iBufSize, strDevicePath);
+  if (!bQuickScan)
+  {
+    for (int8_t iPtr = 0; iPtr < iAdaptersFound; iPtr++)
+    {
+      libcec_configuration config;
+      GetDeviceInformation(deviceList[iPtr].strComName, &config);
+      deviceList[iPtr].iFirmwareVersion   = config.iFirmwareVersion;
+      deviceList[iPtr].iPhysicalAddress   = config.iPhysicalAddress;
+      deviceList[iPtr].iFirmwareBuildDate = config.iFirmwareBuildDate;
+      deviceList[iPtr].adapterType        = config.adapterType;
+    }
+  }
+  return iAdaptersFound;
+}
index f65b8186b9e843d2917fa95e98be62b891a1b2a5..3a312c00d4be7aea42bd98b5d61024713ab290c4 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -52,6 +52,7 @@ namespace CEC
       void Close(void);
       bool EnableCallbacks(void *cbParam, ICECCallbacks *callbacks);
       int8_t FindAdapters(cec_adapter *deviceList, uint8_t iBufSize, const char *strDevicePath = NULL);
+      int8_t DetectAdapters(cec_adapter_descriptor *deviceList, uint8_t iBufSize, const char *strDevicePath = NULL, bool bQuickScan = false);
       bool PingAdapter(void);
       bool StartBootloader(void);
 
index b53dc05f29541ef7bd3aa23553a23d0cd5efe264..fc5c9c2126cc38be180b3ef3acc3f9cdddc49efd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -403,9 +403,16 @@ uint8_t cec_audio_unmute(void)
   return cec_parser ? cec_parser->AudioUnmute() : (uint8_t)CEC_AUDIO_VOLUME_STATUS_UNKNOWN;
 }
 
-uint8_t cec_audio_status(void)
+uint8_t cec_audio_get_status(void)
 {
   return cec_parser ? cec_parser->AudioStatus() : (uint8_t)CEC_AUDIO_VOLUME_STATUS_UNKNOWN;
 }
 
+int8_t cec_detect_adapters(cec_adapter_descriptor *deviceList, uint8_t iBufSize, const char *strDevicePath, int bQuickScan)
+{
+  if (cec_parser)
+    return cec_parser->DetectAdapters(deviceList, iBufSize, strDevicePath, bQuickScan == 1);
+  return -1;
+}
+
 //@}
index 9657b57c9f75fe7aad468d772cd5dec57f86faec..53417a0c3d950df14009d242be0803c07fdd1203 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index b1762b7a111db0755c03ede6922cf4e7ac785ae8..39f0c9801deb54c304bd58558209b0c3020138bc 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -81,6 +81,12 @@ namespace CEC
      */
     virtual void HandleLogicalAddressLost(cec_logical_address oldAddress) = 0;
 
+    /*!
+     * @brief Callback method for IAdapterCommunication, called when the physical address changed.
+     * @param iNewAddress The new physical address.
+     */
+    virtual void HandlePhysicalAddressChanged(uint16_t iNewAddress) = 0;
+
     virtual CLibCEC *GetLib(void) const = 0;
   };
 
index 02b6200e1616674964f34af5459cc9955ffe6a22..42cdd0beacb7b088cd3a8935c09d9ad38d536121 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -56,6 +56,18 @@ using namespace std;
 using namespace CEC;
 
 int8_t CAdapterFactory::FindAdapters(cec_adapter *deviceList, uint8_t iBufSize, const char *strDevicePath /* = NULL */)
+{
+  cec_adapter_descriptor devices[50];
+  int8_t iReturn = DetectAdapters(devices, iBufSize, strDevicePath);
+  for (int8_t iPtr = 0; iPtr < iReturn; iPtr++)
+  {
+    strncpy(deviceList[iPtr].comm, devices[iPtr].strComName, sizeof(deviceList[iPtr].comm));
+    strncpy(deviceList[iPtr].path, devices[iPtr].strComPath, sizeof(deviceList[iPtr].path));
+  }
+  return iReturn;
+}
+
+int8_t CAdapterFactory::DetectAdapters(cec_adapter_descriptor *deviceList, uint8_t iBufSize, const char *strDevicePath /* = NULL */)
 {
   int8_t iAdaptersFound(0);
 
@@ -75,8 +87,12 @@ int8_t CAdapterFactory::FindAdapters(cec_adapter *deviceList, uint8_t iBufSize,
   if (iAdaptersFound < iBufSize && CRPiCECAdapterDetection::FindAdapter() &&
       (!strDevicePath || !strcmp(strDevicePath, CEC_RPI_VIRTUAL_COM)))
   {
-    snprintf(deviceList[iAdaptersFound].path, 1024, CEC_RPI_VIRTUAL_PATH);
-    snprintf(deviceList[iAdaptersFound++].comm, 1024, CEC_RPI_VIRTUAL_COM);
+    snprintf(deviceList[iAdaptersFound].strComPath, sizeof(deviceList[iAdaptersFound].strComPath), CEC_RPI_VIRTUAL_PATH);
+    snprintf(deviceList[iAdaptersFound].strComName, sizeof(deviceList[iAdaptersFound].strComName), CEC_RPI_VIRTUAL_COM);
+    deviceList[iAdaptersFound].iVendorId = RPI_ADAPTER_VID;
+    deviceList[iAdaptersFound].iProductId = RPI_ADAPTER_PID;
+    deviceList[iAdaptersFound].adapterType = ADAPTERTYPE_RPI;
+    iAdaptersFound++;
   }
 #endif
 
@@ -84,8 +100,12 @@ int8_t CAdapterFactory::FindAdapters(cec_adapter *deviceList, uint8_t iBufSize,
   if (iAdaptersFound < iBufSize && CTDA995xCECAdapterDetection::FindAdapter() &&
       (!strDevicePath || !strcmp(strDevicePath, CEC_TDA995x_VIRTUAL_COM)))
   {
-    snprintf(deviceList[iAdaptersFound].path, 1024, CEC_TDA995x_PATH);
-    snprintf(deviceList[iAdaptersFound++].comm, 1024, CEC_TDA995x_VIRTUAL_COM);
+    snprintf(deviceList[iAdaptersFound].strComPath, sizeof(deviceList[iAdaptersFound].strComPath), CEC_TDA995x_PATH);
+    snprintf(deviceList[iAdaptersFound].strComName, sizeof(deviceList[iAdaptersFound].strComName), CEC_TDA995x_VIRTUAL_COM);
+    deviceList[iAdaptersFound].iVendorId = TDA995X_ADAPTER_VID;
+    deviceList[iAdaptersFound].iProductId = TDA995X_ADAPTER_PID;
+    deviceList[iAdaptersFound].adapterType = ADAPTERTYPE_TDA995x;
+    iAdaptersFound++;
   }
 #endif
 
index d8a13602da346f6158ac42d5554d5d20277e8685..def510204fa031d604c124d2f97c39629d8eee42 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -47,6 +47,7 @@ namespace CEC
     virtual ~CAdapterFactory(void) {};
 
     int8_t FindAdapters(cec_adapter *deviceList, uint8_t iBufSize, const char *strDevicePath = NULL);
+    int8_t DetectAdapters(cec_adapter_descriptor *deviceList, uint8_t iBufSize, const char *strDevicePath = NULL);
     IAdapterCommunication *GetInstance(const char *strPort, uint16_t iBaudRate = CEC_SERIAL_DEFAULT_BAUDRATE);
 
     static void InitVideoStandalone(void);
index b037e1cab9f9a2d0975a8dc5e8b175648141a228..f70c8ef76f80582955fd9222e85552241824a2b3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index e0bfb1fe7388b3318ee82c5ac54004338cd10779..4c44221ac086b7966e2063a2c2af4a01e7153337 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 0024d11e8def1a17bda2a79be8f9b03c55474353..07255a79c84fa5c52500d0da6362a048c95c3e1e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 0c473ea3216cfb956845423f57d2b3b8e83d9a07..ba5d7ca65bd40a4cc81e29fd3ea92a1ccb4ac87f 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 433a3d325df954e29fdf698e998cd451f2f0b68c..35ba386788a93dcab316b466da3230aca0957058 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -202,7 +202,7 @@ static bool FindComPortForComposite(const char* strLocation, char* strPortName,
 }
 #endif
 
-uint8_t CUSBCECAdapterDetection::FindAdapters(cec_adapter *deviceList, uint8_t iBufSize, const char *strDevicePath /* = NULL */)
+uint8_t CUSBCECAdapterDetection::FindAdapters(cec_adapter_descriptor *deviceList, uint8_t iBufSize, const char *strDevicePath /* = NULL */)
 {
   uint8_t iFound(0);
 
@@ -262,10 +262,13 @@ uint8_t CUSBCECAdapterDetection::FindAdapters(cec_adapter *deviceList, uint8_t i
             if (!strDevicePath || !strcmp(bsdPath, strDevicePath))
             {
               // on darwin, the device path is the same as the comm path.
-              if (iFound == 0 || strcmp(deviceList[iFound-1].comm, bsdPath))
+              if (iFound == 0 || strcmp(deviceList[iFound-1].strComName, bsdPath))
               {
-                snprintf(deviceList[iFound].path, sizeof(deviceList[iFound].path), "%s", bsdPath);
-                snprintf(deviceList[iFound].comm, sizeof(deviceList[iFound].path), "%s", bsdPath);
+                snprintf(deviceList[iFound].strComPath, sizeof(deviceList[iFound].strComPath), "%s", bsdPath);
+                snprintf(deviceList[iFound].strComName, sizeof(deviceList[iFound].strComName), "%s", bsdPath);
+                deviceList[iFound].iVendorId = iVendor;
+                deviceList[iFound].iProductId = iProduct;
+                deviceList[iFound].adapterType = ADAPTERTYPE_P8_EXTERNAL; // will be overridden when not doing a "quick scan" by the actual type
                 iFound++;
               }
             }
@@ -312,10 +315,13 @@ uint8_t CUSBCECAdapterDetection::FindAdapters(cec_adapter *deviceList, uint8_t i
       if (!strDevicePath || !strcmp(strPath.c_str(), strDevicePath))
       {
         CStdString strComm(strPath);
-        if (FindComPort(strComm) && (iFound == 0 || strcmp(deviceList[iFound-1].comm, strComm.c_str())))
+        if (FindComPort(strComm) && (iFound == 0 || strcmp(deviceList[iFound-1].strComName, strComm.c_str())))
         {
-          snprintf(deviceList[iFound].path, sizeof(deviceList[iFound].path), "%s", strPath.c_str());
-          snprintf(deviceList[iFound].comm, sizeof(deviceList[iFound].path), "%s", strComm.c_str());
+          snprintf(deviceList[iFound].strComPath, sizeof(deviceList[iFound].strComPath), "%s", strPath.c_str());
+          snprintf(deviceList[iFound].strComName, sizeof(deviceList[iFound].strComName), "%s", strComm.c_str());
+          deviceList[iFound].iVendorId = iVendor;
+          deviceList[iFound].iProductId = iProduct;
+          deviceList[iFound].adapterType = ADAPTERTYPE_P8_EXTERNAL; // will be overridden when not doing a "quick scan" by the actual type
           iFound++;
         }
       }
@@ -408,15 +414,21 @@ uint8_t CUSBCECAdapterDetection::FindAdapters(cec_adapter *deviceList, uint8_t i
       // the 1002 pid indicates a composite device, that needs special treatment
       char strId[512];
       CM_Get_Device_ID(devInfoData.DevInst, strId, 512, 0);
-      if (FindComPortForComposite(strId, deviceList[iFound].comm, sizeof(deviceList[iFound].comm)))
+      if (FindComPortForComposite(strId, deviceList[iFound].strComName, sizeof(deviceList[iFound].strComName)))
       {
-        snprintf(deviceList[iFound].path, sizeof(deviceList[iFound].path), "%s", devicedetailData->DevicePath);
+        snprintf(deviceList[iFound].strComPath, sizeof(deviceList[iFound].strComPath), "%s", devicedetailData->DevicePath);
+        deviceList[iFound].iVendorId = (uint16_t)iVendor;
+        deviceList[iFound].iProductId = (uint16_t)iProduct;
+        deviceList[iFound].adapterType = ADAPTERTYPE_P8_EXTERNAL; // will be overridden when not doing a "quick scan" by the actual type
         iFound++;
       }
     }
-    else if (GetComPortFromHandle(hDevHandle, &devInfoData, deviceList[iFound].comm, sizeof(deviceList[iFound].comm)))
+    else if (GetComPortFromHandle(hDevHandle, &devInfoData, deviceList[iFound].strComName, sizeof(deviceList[iFound].strComName)))
     {
-      snprintf(deviceList[iFound].path, sizeof(deviceList[iFound].path), "%s", devicedetailData->DevicePath);
+      snprintf(deviceList[iFound].strComPath, sizeof(deviceList[iFound].strComPath), "%s", devicedetailData->DevicePath);
+      deviceList[iFound].iVendorId = (uint16_t)iVendor;
+      deviceList[iFound].iProductId = (uint16_t)iProduct;
+      deviceList[iFound].adapterType = ADAPTERTYPE_P8_EXTERNAL; // will be overridden when not doing a "quick scan" by the actual type
       iFound++;
     }
   }
@@ -431,8 +443,11 @@ uint8_t CUSBCECAdapterDetection::FindAdapters(cec_adapter *deviceList, uint8_t i
       continue;
     if (!access(devicePath, 0))
     {
-      snprintf(deviceList[iFound].path, sizeof(deviceList[iFound].path), "%s", devicePath);
-      snprintf(deviceList[iFound].comm, sizeof(deviceList[iFound].path), "%s", devicePath);
+      snprintf(deviceList[iFound].strComPath, sizeof(deviceList[iFound].strComPath), "%s", devicePath);
+      snprintf(deviceList[iFound].strComName, sizeof(deviceList[iFound].strComName), "%s", devicePath);
+      deviceList[iFound].iVendorId = CEC_VID;
+      deviceList[iFound].iProductId = CEC_VID;
+      deviceList[iFound].adapterType = ADAPTERTYPE_P8_EXTERNAL; // will be overridden when not doing a "quick scan" by the actual type
       iFound++;
     }
   }
index 37478b9632036770d6e480537c94252d074d9ad6..7ba74e95fd2ac9977f3ca9aaccfb27fc0e87d8e7 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -40,7 +40,7 @@ namespace CEC
   class CUSBCECAdapterDetection
   {
   public:
-    static uint8_t FindAdapters(cec_adapter *deviceList, uint8_t iBufSize, const char *strDevicePath = NULL);
+    static uint8_t FindAdapters(cec_adapter_descriptor *deviceList, uint8_t iBufSize, const char *strDevicePath = NULL);
     static bool    CanAutodetect(void);
   };
 };
index 5756283a60d883acddd2bd05a4d2d4201d29c56b..1d787536a1128a0f8109a248fb32073e01170704 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index ec45bb9e63e38d3cfa1ac46dce96e12c46e6d55f..b862fea5d116f84e828e13f71c89d715dcf53bea 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index a9913ab560af37674f81106e30ca1f6288ba05a2..880ad1c6438964ae9a825369be76114304e8da0c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 7e01436372250ec30ae63c7911f87343e6bdc82b..8b3b0253b98ecc1632aa2a01a723f18ef77ed8dc 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index e1fcae6af7cd5caf561afe94e918ca6b78f23b06..a68c0ec64227ec6aa6f318bc20ecb33e6baf50e0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -58,11 +58,19 @@ void rpi_cec_callback(void *callback_data, uint32_t p0, uint32_t p1, uint32_t p2
     static_cast<CRPiCECAdapterCommunication *>(callback_data)->OnDataReceived(p0, p1, p2, p3, p4);
 }
 
+// callback for the TV service
+void rpi_tv_callback(void *callback_data, uint32_t reason, uint32_t p0, uint32_t p1)
+{
+  if (callback_data)
+    static_cast<CRPiCECAdapterCommunication *>(callback_data)->OnTVServiceCallback(reason, p0, p1);
+}
+
 CRPiCECAdapterCommunication::CRPiCECAdapterCommunication(IAdapterCommunicationCallback *callback) :
     IAdapterCommunication(callback),
     m_logicalAddress(CECDEVICE_UNKNOWN),
     m_bLogicalAddressChanged(false),
-    m_previousLogicalAddress(CECDEVICE_FREEUSE)
+    m_previousLogicalAddress(CECDEVICE_FREEUSE),
+    m_bLogicalAddressRegistered(false)
 {
   m_queue = new CRPiCECAdapterMessageQueue(this);
 }
@@ -106,6 +114,32 @@ bool CRPiCECAdapterCommunication::IsInitialised(void)
   return m_bInitialised;
 }
 
+void CRPiCECAdapterCommunication::OnTVServiceCallback(uint32_t reason, uint32_t UNUSED(p0), uint32_t UNUSED(p1))
+{
+  switch(reason)
+  {
+  case VC_HDMI_UNPLUGGED:
+  {
+    m_callback->HandlePhysicalAddressChanged(0x1000);
+    break;
+  }
+  case VC_HDMI_ATTACHED:
+  {
+    uint16_t iNewAddress = GetPhysicalAddress();
+    m_callback->HandlePhysicalAddressChanged(iNewAddress);
+    break;
+  }
+  case VC_HDMI_DVI:
+  case VC_HDMI_HDMI:
+  case VC_HDMI_HDCP_UNAUTH:
+  case VC_HDMI_HDCP_AUTH:
+  case VC_HDMI_HDCP_KEY_DOWNLOAD:
+  case VC_HDMI_HDCP_SRM_DOWNLOAD:
+  default:
+     break;
+  }
+}
+
 void CRPiCECAdapterCommunication::OnDataReceived(uint32_t header, uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3)
 {
   VC_CEC_NOTIFY_T reason = (VC_CEC_NOTIFY_T)CEC_CB_REASON(header);
@@ -199,7 +233,12 @@ void CRPiCECAdapterCommunication::OnDataReceived(uint32_t header, uint32_t p0, u
       m_logicalAddress = CECDEVICE_UNKNOWN;
 
       // notify libCEC that we lost our LA when the connection was initialised
-      if (m_bInitialised)
+      bool bNotify(false);
+      {
+        CLockObject lock(m_mutex);
+        bNotify = m_bInitialised && m_bLogicalAddressRegistered;
+      }
+      if (bNotify)
         m_callback->HandleLogicalAddressLost(previousAddress);
     }
     break;
@@ -266,8 +305,9 @@ bool CRPiCECAdapterCommunication::Open(uint32_t iTimeoutMs /* = CEC_DEFAULT_CONN
     // enable passive mode
     vc_cec_set_passive(true);
 
-    // register the callback
-    vc_cec_register_callback(((CECSERVICE_CALLBACK_T)rpi_cec_callback), (void*)this);
+    // register the callbacks
+    vc_cec_register_callback(rpi_cec_callback, (void*)this);
+    vc_tv_register_callback(rpi_tv_callback, (void*)this);
 
     // release previous LA
     vc_cec_release_logical_address();
@@ -317,6 +357,8 @@ void CRPiCECAdapterCommunication::Close(void)
     else
       return;
   }
+  vc_tv_unregister_callback(rpi_tv_callback);
+
   UnregisterLogicalAddress();
 
   // disable passive mode
@@ -379,7 +421,11 @@ bool CRPiCECAdapterCommunication::UnregisterLogicalAddress(void)
     return true;
 
   LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s - releasing previous logical address", __FUNCTION__);
-  m_bLogicalAddressChanged = false;
+  {
+    CLockObject lock(m_mutex);
+    m_bLogicalAddressRegistered = false;
+    m_bLogicalAddressChanged    = false;
+  }
 
   vc_cec_release_logical_address();
 
@@ -411,7 +457,12 @@ bool CRPiCECAdapterCommunication::RegisterLogicalAddress(const cec_logical_addre
     return false;
   }
 
-  return m_logicalAddressCondition.Wait(m_mutex, m_bLogicalAddressChanged);
+  if (m_logicalAddressCondition.Wait(m_mutex, m_bLogicalAddressChanged))
+  {
+    m_bLogicalAddressRegistered = true;
+    return true;
+  }
+  return false;
 }
 
 cec_logical_addresses CRPiCECAdapterCommunication::GetLogicalAddresses(void)
index 92b7157be3360d0e00e1af181cbce4968ec45a60..7fbc1052f7793f3fa576e10d9c5d1374b8329f50 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -90,6 +90,7 @@ namespace CEC
 
     bool IsInitialised(void);
     void OnDataReceived(uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4);
+    void OnTVServiceCallback(uint32_t reason, uint32_t p0, uint32_t p1);
 
     static void InitHost(void);
 
@@ -110,6 +111,7 @@ namespace CEC
     VCHI_INSTANCE_T             m_vchi_instance;
     VCHI_CONNECTION_T *         m_vchi_connection;
     cec_logical_address         m_previousLogicalAddress;
+    bool                        m_bLogicalAddressRegistered;
   };
 };
 
index 818d5ed1845e13cfe511f93d55e24b7a1015b809..5fcd26c8f20d89197184b6b8561601f13603c9c4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 34f22342ab673c4fe6915ebc960fa3a0a0a523ea..b5818afbea3ac62d7abb5048397d4eb2717678a2 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 625b2e9e5ab4102b5906baadd43fe5f0c9c807c6..aa9701d3ec260c26139fc15bc15bd712de4fa051 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 35d2859a80233e317f32f7232612e48a7ede57d1..af5756b68aa5588815f19344f74d3aa66434b9e8 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index d17f3444a7f6a1f7d77083e134a5e30136247e46..c8bcf7181f407b4f10846c2649a5c944f46aa1f7 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 83df1199b26a9fe0a801c1cb02b01761eac6c5e1..27a4f56bc930eaae18982ac76e4f031a37441aa0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 2adc1f824a6fa199422b69b5f6d31b318c2c7388..9af9b9e8fc0ba9585d54cf86ff134e61cbacc6e4 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index a355f78b99d4d558b040bb9a2c144976c5eab89c..9a4e19b5230578b3c2637f207a7828d5c6165ce1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 5380663fd8bf1db967bd2dabd6cb7c92c758a7fb..174190e74398dd1f6e9451ac3e65a255a4f17632 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 1dc2bdcbd7ca48ee29ed9e32d93bbdf1485fe8f7..c25f6dc703d1ab2ff30186c308dbb2653048647b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 8ab055e0bc7a520ca207ca20afdaf1ab7727c022..3c2498cc5c32c61becc77b82e6656f89b89df475 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index fa063f4e52d47209bf3b223228c939b683602652..9d172d88a7ccec657bd09af093d2e92d03c0e821 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -1134,8 +1134,26 @@ void CCECBusDevice::SetActiveRoute(uint16_t iRoute)
     return;
 
   CCECBusDevice* newRoute = m_processor->GetDeviceByPhysicalAddress(iRoute, true);
-  if (newRoute && newRoute->IsHandledByLibCEC())
-    newRoute->ActivateSource();
+  if (newRoute)
+  {
+    // we were made the active source, send notification
+    if (newRoute->IsHandledByLibCEC())
+      newRoute->ActivateSource();
+    // another device was made active
+    else
+      newRoute->MarkAsActiveSource();
+  }
+  else
+  {
+    // get the current active source and it's physical address
+    CCECBusDevice *device = m_processor->GetDevices()->GetActiveSource();
+    uint16_t iPhysicalAddress(device ? device->GetCurrentPhysicalAddress() : CEC_INVALID_PHYSICAL_ADDRESS);
+
+    // check whether the route below the device changed
+    if (CLibCEC::IsValidPhysicalAddress(iPhysicalAddress) &&
+        !CCECTypeUtils::PhysicalAddressIsIncluded(iPhysicalAddress, iRoute))
+      device->MarkAsInactiveSource();
+  }
 }
 
 void CCECBusDevice::SetStreamPath(uint16_t iNewAddress, uint16_t iOldAddress /* = CEC_INVALID_PHYSICAL_ADDRESS */)
index d04b559e3df9f5e5b5de8f476db526fa70a49733..e159aea2289d243b65d2b6bd83fd7d3b8d267d80 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index b7f3ab2026b4143b88b1096358b04d513b5caa3c..84fda1d68d79da50feacbc7e7a8145e2a648b8ae 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 6037fa3d548140523b587b2df8d34c28eb2c441c..cb8005ccd11cf2268b73b7b455f1999e45f7a721 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index d5acfe9e8dba6edcb2615800e2febb3150c24ae7..a4df0acc159d1cc9f7999f685ba36a66f4773c5d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index d12c15053878ce4ff927d8bceb1e3e7f4c16dc41..2fe42c3032a6b999cedc7d84810e7feee917d6c9 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 8b1d5755bf6d7c6042f37c1fff8b71966941da3a..a6431ec579a262f6fbb7cac3b83621dd581cddd4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index f37c37b1a02fd62b9f5222bf9b96fb2b849bbd3c..4130e7b2e437858ddc3ae9b957ec112520f9c394 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 2f852ae4b4ae34f505f109a7da3d687aa25c00bd..16f33d4c17cf1539fd9344af23983e8771af8047 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 293f5e8004d3704705fa441874f055b969f9160c..3b4db2bee21cfae353786142005efd5f1464e31f 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 2de4a1fb185e21292e3599043c1ff54c3926f935..35491f79070aacfe9aff6acc2a257d13aa781a1a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index e9ce44c7809facd3190120c6bd53ea714106ad43..2092295772604ff684aec35ff361866d077d8c49 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 92b4464b2fe82dd06325d0c8f723ec9e41b4b547..16831a974c4680bd897b24ac54708bc4121348dc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 3b08cbd04a8ae5839cc76f2d3ea7d8e6ed65554a..bc4b921cf83f7eb4f0e8adad7116997d4f009826 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 174275ca2e48850fc4c9b63511ef1345949a04ac..28cee428128f5caadbc5cf2346fb0c8377c66537 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 4a8dacbe7f59e25ecc400ca6763b5eb559525bfc..e265038821e77d85435fa8226f3b2c7b08b19bed 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index b46f69e06bfb53cf80727744eff943ca61209f93..d7e484860304788a3365089d938a4cbc9ca52e84 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -86,6 +86,7 @@ CPHCommandHandler::CPHCommandHandler(CCECBusDevice *busDevice,
 {
   m_imageViewOnCheck = new CImageViewOnCheck(this);
   m_vendorId = CEC_VENDOR_PHILIPS;
+  m_bOPTSendDeckStatusUpdateOnActiveSource = false;
 }
 
 CPHCommandHandler::~CPHCommandHandler(void)
@@ -121,7 +122,7 @@ bool CPHCommandHandler::ActivateSource(bool bTransmitDelayedCommandsOnly /* = fa
   {
     // tv sometimes ignores image view on. check the power status of the tv in 5 seconds, and retry when it failed to power up
     if (m_imageViewOnCheck && !m_imageViewOnCheck->IsRunning())
-      m_imageViewOnCheck->CreateThread(false);
+      return m_imageViewOnCheck->CreateThread(false);
   }
 
   return CCECCommandHandler::ActivateSource(bTransmitDelayedCommandsOnly);
index 38ebfe596d1993491604283afdcf4494f95c43b8..f6f3fcc8fcbb2623716bafc1f75fdd02a5f4904f 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 6956a218ab8c4156518fe2db584ad2f2894d16c2..5264c110ba092f454005758a425fbad07032f2cc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 446c91b883dc217a9e636ea2689ea24c834a647e..1bb04993c221c0b472cc493ac99ce8a88c054718 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index e686fdd800edf383416522563eab4ab0b06f7b58..e3062bf704cbc4564a59df2c58589fa983cb192a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index ec2a4ae5ee8da337baab00a77fce9fe17c151cdf..ac8cb5c66fa515bee3a89f151c4b680abf5fe4ed 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 21dc42ef448ae5dbad2070c1a8a6c446f006ef92..44feabc4f4e5efe0e6cd74739121605646ca74fd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 3ad80b49150b53749bc61d0f306f972631a5a00c..cbf6ba63b2cb6602bd8c32abe6bf322bcc3336c2 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index c69c8137dbc54a44ddeacc1b90bebda0a8a8f502..fda3e1b6da99af10c84190c3fbd403fb418cedd3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index e6b1b0468412a1f3d8ecd9307cea5c5d40de25f8..9401f18b81c6a6df6f9271a8c8360403eaa9c556 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 3de775481f3a6de19444a82e2eaafa84221f130d..549255c0489827a3f0fde68326032bf55a0ef7fa 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index a9ba9405a9e68fd53eb1ff1842ac36c91e3a254d..9438c51e08501fe536ea5e40bcf23b8fde20715f 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 70e603cbe27ab5148ccc42710c4ff36d8cabd7c6..d3108e4f5126fe997be83fe477deca2de4f8bf8a 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 05ce9fa4dd182202590d80705cd9522c6e7abb95..4347688ca5ac43fafabd53d8c614ebb6cebeefa7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 739c6a71823d76ee002f306fb11888325775010e..7156c752c239c7f1c389572236c6cb539a865906 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index e5f935cf64ac9d24ff0c7637b53725755671c417..7b7fc3c118273812ee99001f99b46f2acfe26baf 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 261dd035e6d6efdf893d0423c3a69cf5c1edbbc9..af076b2242001c40f895449ce058c6fbd00ef395 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index f067ac45a873f42203755de6bd95cb9787fa9ce4..7eb695dc59429327c68268dc82c0148cf223a7ac 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 30d80eea6ca0bd5324d017e90c8810cc824b6571..c708a9967e99d6e5a64699fb6c352d68846948c9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 0cb54868d5b887490295dbb8cafce28ff4e3dada..78034e93d7ce50cb3a6e74c131c7a2b1aa293e09 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index cb78b37c17a2d3821ab7f9ea99f7ecd7b6747789..bf33df9aa61cdfc1e6a74a6d116828ffcc884f04 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 0aa51eb8e932d013a3b218ef47d8f365541f8538..c57379796f0a33b42501ac7a834a5ba929640f30 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index e894172b0873f7eb52029c325ccf77109018fad1..d36dbb0ea420be625066f1c9b84d2141eca7ae17 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 1dad499e5ea608947f576b25e39739dc1c3aa37e..15c2db7ed9c163a1f87debee923c8b8eb6724458 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 286cc3274dd6240e73acba22886188a64553063d..2bd908e533ee00d2298c6c1083afdd6bcd44f3b5 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index d99cbf6bee34345aa9a54256a881676124094c29..dc304f056e9b7472fbaac95874dd17ea4ee9f042 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 1411452cffda4c6cdc9521bb3e375daf37bba260..2e0e2c137ed47e0f5b8f07da38e0e18119af2606 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 30fcac84167d6ec483b7d37e6d43fe535d1cd4f5..28ba30cf3468bd61d7dac496d16b04f3ef23497b 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 148728ed2686ca730a760c1cdac3f73d924b3d31..c43b062bdc03543481cb1a0b7cda65551d2760cb 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index e95c10df1ff44c3074a7f35d35f141531ad160b7..d7c0fe25a0a0dad06ffd41b6d69b5f1a4be84e85 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 2b85c63255b26265a9275f9078acd4a91f23151f..6fa01fcc3b57dc0315e0f6d4522beb05d81c5887 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index d956ee836a1ab29fe2ab716ae9c6b69d05f0071c..d040257fe001f33aeb98accb22b64b4e1b9f9971 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 0c3855558ddeb7b164d151cb3e1e50ca0fa1cdee..1ce8912475a7645bbfe7cf01aa5e853565f2bdbb 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 6a06dd2800da5f1c7b8e7657c1ed07fcddef46d7..69203456d644c17dc497894ad5b9cc5142177c55 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index f696ff798717bc304a91ebf9cdd17ed6f52db98e..e39b6011b277ce1359fb522ad0cd735d25b1be88 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index d47eb056d65a06df9684b8ce68f3cd078945fbdd..b8035c22e3c445e254817b0bc87a450958558f12 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index 00ba7bb80e0ce3530182cb95542176bb75ee89be..e1cec66d83ce10c2cdc73e56202c1989aa991278 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
index c6082921bf1844c22b70f86f114f211bd3cf7c67..b6c2cafb6e49247d121db9f1085d9a426be0db68 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -197,45 +197,41 @@ int CecAlert(void *UNUSED(cbParam), const libcec_alert type, const libcec_parame
 
 void ListDevices(ICECAdapter *parser)
 {
-  cec_adapter *devices = new cec_adapter[10];
-  int8_t iDevicesFound = parser->FindAdapters(devices, 10, NULL);
+  cec_adapter_descriptor devices[10];
+  int8_t iDevicesFound = parser->DetectAdapters(devices, 10, NULL);
   if (iDevicesFound <= 0)
   {
     PrintToStdOut("Found devices: NONE");
   }
   else
   {
-    CStdString strDeviceInfo;
-    strDeviceInfo.Format("Found devices: %d\n\n", iDevicesFound);
+    PrintToStdOut("Found devices: %d\n", iDevicesFound);
 
     for (int8_t iDevicePtr = 0; iDevicePtr < iDevicesFound; iDevicePtr++)
     {
-      strDeviceInfo.AppendFormat("device:              %d\ncom port:            %s\n", iDevicePtr + 1, devices[iDevicePtr].comm);
-      libcec_configuration config;
-      config.Clear();
+      PrintToStdOut("device:              %d", iDevicePtr + 1);
+      PrintToStdOut("com port:            %s", devices[iDevicePtr].strComName);
+      PrintToStdOut("vendor id:           %04x", devices[iDevicePtr].iVendorId);
+      PrintToStdOut("product id:          %04x", devices[iDevicePtr].iProductId);
+      PrintToStdOut("firmware version:    %d", devices[iDevicePtr].iFirmwareVersion);
 
-      if (!parser->GetDeviceInformation(devices[iDevicePtr].comm, &config))
-        PrintToStdOut("WARNING: unable to open the device on port %s", devices[iDevicePtr].comm);
-      else
+      if (devices[iDevicePtr].iFirmwareBuildDate != CEC_FW_BUILD_UNKNOWN)
       {
-        strDeviceInfo.AppendFormat("firmware version:    %d\n", config.iFirmwareVersion);
-
-        if (config.iFirmwareBuildDate != CEC_FW_BUILD_UNKNOWN)
-        {
-          time_t buildTime = (time_t)config.iFirmwareBuildDate;
-          strDeviceInfo.AppendFormat("firmware build date: %s", asctime(gmtime(&buildTime)));
-          strDeviceInfo = strDeviceInfo.Left(strDeviceInfo.length() > 1 ? (unsigned)(strDeviceInfo.length() - 1) : 0); // strip \n added by asctime
-          strDeviceInfo.append(" +0000\n");
-        }
+        time_t buildTime = (time_t)devices[iDevicePtr].iFirmwareBuildDate;
+        CStdString strDeviceInfo;
+        strDeviceInfo.AppendFormat("firmware build date: %s", asctime(gmtime(&buildTime)));
+        strDeviceInfo = strDeviceInfo.Left(strDeviceInfo.length() > 1 ? (unsigned)(strDeviceInfo.length() - 1) : 0); // strip \n added by asctime
+        strDeviceInfo.append(" +0000");
+        PrintToStdOut(strDeviceInfo.c_str());
+      }
 
-        if (config.adapterType != ADAPTERTYPE_UNKNOWN)
-        {
-          strDeviceInfo.AppendFormat("type:                %s\n", parser->ToString(config.adapterType));
-        }
+      if (devices[iDevicePtr].adapterType != ADAPTERTYPE_UNKNOWN)
+      {
+        PrintToStdOut("type:                %s", parser->ToString(devices[iDevicePtr].adapterType));
       }
-      strDeviceInfo.append("\n");
+
+      PrintToStdOut("");
     }
-    PrintToStdOut(strDeviceInfo.c_str());
   }
 }
 
index d00b483f7d7d6d89f147f0d2b72f7a1f51fb7e34..a121d40647afb678f0edf9aa7b11b5e24f04d8d3 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 ## Tests whether the USB-CEC adapter can be accessed correctly
-## Copyright (C) 2011 Pulse-Eight Ltd.
+## Copyright (C) 2011-2013 Pulse-Eight Ltd.
 
 check_lsusb()
 {