diff options
author | Lars Op den Kamp <lars@opdenkamp.eu> | 2011-11-11 03:23:20 +0100 |
---|---|---|
committer | Lars Op den Kamp <lars@opdenkamp.eu> | 2011-11-11 20:49:10 +0100 |
commit | c2accf2a2385a3b732d18982a6ad8838b28e8474 (patch) | |
tree | 668fe3a082fff2360b8b10fb55b0388e1ebb11ac | |
parent | fb2e7d1e556f724ba9de41546f7bf39d10301bbe (diff) |
cec: updated to libcec 1.1. no longer using a fixed logical address.
-rwxr-xr-x | configure.in | 2 | ||||
-rw-r--r-- | project/BuildDependencies/scripts/libcec_d.txt | 2 | ||||
-rw-r--r-- | xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 27 | ||||
-rw-r--r-- | xbmc/peripherals/devices/PeripheralCecAdapter.h | 1 |
4 files changed, 12 insertions, 20 deletions
diff --git a/configure.in b/configure.in index 3a3fbd9840..fa110f87da 100755 --- a/configure.in +++ b/configure.in @@ -1161,7 +1161,7 @@ if test "x$use_libcec" != "xno"; then # libcec is dyloaded, so we need to check for its headers and link any depends. if test "x$use_libcec" != "xno"; then - PKG_CHECK_MODULES([CEC],[libcec >= 1.0.0],,[use_libcec="no";AC_MSG_RESULT($libcec_disabled)]) + PKG_CHECK_MODULES([CEC],[libcec >= 1.1.0],,[use_libcec="no";AC_MSG_RESULT($libcec_disabled)]) if test "x$use_libcec" != "xno"; then INCLUDES="$INCLUDES $CEC_CFLAGS" diff --git a/project/BuildDependencies/scripts/libcec_d.txt b/project/BuildDependencies/scripts/libcec_d.txt index ff2160ed72..aaa928cc19 100644 --- a/project/BuildDependencies/scripts/libcec_d.txt +++ b/project/BuildDependencies/scripts/libcec_d.txt @@ -1,3 +1,3 @@ ; filename mirror source of the file -libcec1.0.zip http://xbmc.opdenkamp.eu/ http://packages.pulse-eight.net/ +libcec1.1.zip http://xbmc.opdenkamp.eu/ http://packages.pulse-eight.net/ diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp index ac03aa7c15..edf59d91ba 100644 --- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp @@ -48,7 +48,7 @@ class DllLibCECInterface { public: virtual ~DllLibCECInterface() {} - virtual ICECAdapter* CECCreate(const char *interfaceName, uint8_t logicalAddress, uint16_t physicalAddress)=0; + virtual ICECAdapter* CECInit(const char *interfaceName, cec_device_type_list types)=0; virtual void* CECDestroy(ICECAdapter *adapter)=0; }; @@ -56,11 +56,11 @@ class DllLibCEC : public DllDynamic, DllLibCECInterface { DECLARE_DLL_WRAPPER(DllLibCEC, DLL_PATH_LIBCEC) - DEFINE_METHOD3(ICECAdapter*, CECCreate, (const char *p1, uint8_t p2, uint16_t p3)) + DEFINE_METHOD2(ICECAdapter*, CECInit, (const char *p1, cec_device_type_list p2)) DEFINE_METHOD1(void* , CECDestroy, (ICECAdapter *p1)) BEGIN_METHOD_RESOLVE() - RESOLVE_METHOD_RENAME(CECCreate, CECCreate) + RESOLVE_METHOD_RENAME(CECInit, CECInit) RESOLVE_METHOD_RENAME(CECDestroy, CECDestroy) END_METHOD_RESOLVE() }; @@ -78,7 +78,12 @@ CPeripheralCecAdapter::CPeripheralCecAdapter(const PeripheralType type, const Pe m_screensaverLastActivated.SetValid(false); m_dll = new DllLibCEC; if (m_dll->Load() && m_dll->IsLoaded()) - m_cecAdapter = m_dll->CECCreate("XBMC", CECDEVICE_PLAYBACKDEVICE1, CEC_DEFAULT_PHYSICAL_ADDRESS); + { + cec_device_type_list typeList; + typeList.clear(); + typeList.add(CEC_DEVICE_TYPE_PLAYBACK_DEVICE); + m_cecAdapter = m_dll->CECInit("XBMC", typeList); + } else m_cecAdapter = NULL; @@ -327,18 +332,6 @@ bool CPeripheralCecAdapter::SendPing(void) return bReturn; } -bool CPeripheralCecAdapter::StartBootloader(void) -{ - bool bReturn(false); - if (m_cecAdapter && m_bIsReady) - { - CLog::Log(LOGDEBUG, "%s - starting the bootloader", __FUNCTION__); - bReturn = m_cecAdapter->StartBootloader(); - } - - return bReturn; -} - bool CPeripheralCecAdapter::SetHdmiPort(int iHdmiPort) { bool bReturn(false); @@ -446,7 +439,7 @@ void CPeripheralCecAdapter::ProcessNextCommand(void) case CEC_OPCODE_DECK_CONTROL: if (command.initiator == CECDEVICE_TV && command.parameters.size == 1 && - command.parameters[0] == CEC_DESK_CONTROL_MODE_STOP) + command.parameters[0] == CEC_DECK_CONTROL_MODE_STOP) { CSingleLock lock(m_critSection); cec_keypress key; diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.h b/xbmc/peripherals/devices/PeripheralCecAdapter.h index 5484cbaaad..8cd060acb9 100644 --- a/xbmc/peripherals/devices/PeripheralCecAdapter.h +++ b/xbmc/peripherals/devices/PeripheralCecAdapter.h @@ -56,7 +56,6 @@ namespace PERIPHERALS virtual bool StandbyCecDevices(CEC::cec_logical_address iLogicalAddress); virtual bool SendPing(void); - virtual bool StartBootloader(void); virtual bool SetHdmiPort(int iHdmiPort); virtual void OnSettingChanged(const CStdString &strChangedSetting); |