[mythtv-users] HDMI-CEC ?

Mark Kendall mark.kendall at gmail.com
Mon Oct 24 21:17:09 UTC 2011


On 24 October 2011 21:30, martin <martin at mstubbs.co.uk> wrote:
> Mark,
>
> Thank you for the cecadapter cpp and h. I'm struggling with where to
> make the necessary changes to get the software to compile and be called
> from + linked into mythfrontend. Are you able to provide diffs for that
> part as well?

Well that's embarrassing:)

The hacked up code below should do the trick or if you want to wait a
little, I'll be committing a proper version to master either tonight
or tomorrow morning.

regards

Mark

diff --git a/mythtv/programs/mythfrontend/main.cpp
b/mythtv/programs/mythfrontend/main.cpp
index 599f493..11ba4b2 100644
--- a/mythtv/programs/mythfrontend/main.cpp
+++ b/mythtv/programs/mythfrontend/main.cpp
@@ -74,6 +74,7 @@ using namespace std;
 #include "themechooser.h"
 #include "mythversion.h"
 #include "taskqueue.h"
+#include "cecadapter.h"

 // Video
 #include "cleanup.h"
@@ -1679,8 +1680,16 @@ int main(int argc, char **argv)
     PreviewGeneratorQueue::CreatePreviewGeneratorQueue(
         PreviewGenerator::kRemote, 50, 60);

+#ifdef USING_LIBCEC
+    CECAdapter *cecadapter = new CECAdapter();
+#endif
+
     int ret = qApp->exec();

+#ifdef USING_LIBCEC
+    if (cecadapter)
+        delete cecadapter;
+#endif
     PreviewGeneratorQueue::TeardownPreviewGeneratorQueue();

     if (themeUpdateChecker)
diff --git a/mythtv/programs/mythfrontend/mythfrontend.pro
b/mythtv/programs/mythfrontend/mythfrontend.pro
index cf985d6..238df8c 100644
--- a/mythtv/programs/mythfrontend/mythfrontend.pro
+++ b/mythtv/programs/mythfrontend/mythfrontend.pro
@@ -85,6 +85,13 @@ win32 : !debug {
     DEFINES += WINDOWS_CLOSE_CONSOLE
 }

+#using_libcec {
+    DEFINES += USING_LIBCEC
+    HEADERS += cecadapter.h
+    SOURCES += cecadapter.cpp
+    LIBS    += -lcec
+#}
+
 using_x11:DEFINES += USING_X11
 using_xv:DEFINES += USING_XV
 using_xrandr:DEFINES += USING_XRANDR


More information about the mythtv-users mailing list