Skip to content

Commit

Permalink
Fix libcec configure to work with v1.5
Browse files Browse the repository at this point in the history
The detection code contained within the mythtv/configure script is mismatched
to the implementation code contained within libs/libmythui/cecadapter.cpp.

The configure script also checks for the deprecated LoadLibCec() function,
which has been removed from libcec version 1.5 whereas
libs/libmythui/cecadapter.cpp has already been switched to use the new
LibCecInit() function.

Increases the minimum version of libcec to 1.5.

Fixes #10366

Signed-off-by: Gavin Hurlbut <ghurlbut@mythtv.org>
  • Loading branch information
Peter Stokes authored and Beirdo committed Mar 2, 2012
1 parent f16048b commit 20d6852
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
9 changes: 5 additions & 4 deletions mythtv/configure
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ Advanced options (experts only):
--disable-joystick-menu disable joystick menu --disable-joystick-menu disable joystick menu
--disable-libcec disable libCEC device support --disable-libcec disable libCEC device support
--libcec-path=HDRLOC location of directory containing --libcec-path=HDRLOC location of directory containing
cec.h [$libcec_path_default] 'libcec/cec.h', not the directory
with 'cec.h' [$libcec_path_default]
--disable-firewire disable support for FireWire cable boxes --disable-firewire disable support for FireWire cable boxes
--disable-iptv disable support for recording RTSP/UDP/RTP streams --disable-iptv disable support for recording RTSP/UDP/RTP streams
--disable-hdhomerun disable support for HDHomeRun boxes --disable-hdhomerun disable support for HDHomeRun boxes
Expand Down Expand Up @@ -2024,7 +2025,7 @@ disable indevs
# mythtv paths # mythtv paths
dvb_path_default="${sysroot}/usr/include" dvb_path_default="${sysroot}/usr/include"
x11_path_default="${sysroot}/usr/X11R6/include" x11_path_default="${sysroot}/usr/X11R6/include"
libcec_path_default="${sysroot}/usr/include/libcec" libcec_path_default="${sysroot}/usr/include"
libxml2_path_default="${sysroot}/usr/include/libxml2" libxml2_path_default="${sysroot}/usr/include/libxml2"


# configurable options # configurable options
Expand Down Expand Up @@ -4138,9 +4139,9 @@ using namespace std;
using namespace CEC; using namespace CEC;
#include <libcec/cecloader.h> #include <libcec/cecloader.h>
int main(void) { int main(void) {
if (CEC_LIB_VERSION_MAJOR < 1) if (CEC_LIB_VERSION_MAJOR < 1 && CEC_LIB_VERSION_MINOR < 5)
return 0; return 0;
return (long) LoadLibCec; return (long) LibCecInit;
} }
EOF EOF
fi fi
Expand Down
5 changes: 2 additions & 3 deletions mythtv/libs/libmythui/cecadapter.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@
#define MAX_CEC_DEVICES 10 #define MAX_CEC_DEVICES 10
#define LOC QString("CECAdapter: ") #define LOC QString("CECAdapter: ")


#include "cec.h" #include <libcec/cec.h>
#include "cecc.h"
#include <iostream> #include <iostream>
using namespace CEC; using namespace CEC;
using namespace std; using namespace std;
#include "cecloader.h" #include <libcec/cecloader.h>


QMutex* CECAdapter::gLock = new QMutex(QMutex::Recursive); QMutex* CECAdapter::gLock = new QMutex(QMutex::Recursive);


Expand Down

0 comments on commit 20d6852

Please sign in to comment.