Changeset e090e9969c in mythtv
- Timestamp:
- Oct 26, 2011, 8:07:17 AM (13 years ago)
- Branches:
- devel/2020-player, devel/ffmpeg-resync, devel/gpu-commflag, fixes/0.25, fixes/0.26, fixes/0.27, fixes/0.28, fixes/29, fixes/30, fixes/31, github-templates, master
- Children:
- 98642603cb
- Parents:
- 145b2097a5
- Location:
- mythtv
- Files:
-
- 2 added
- 6 edited
-
configure (modified) (8 diffs)
-
libs/libmythui/cecadapter.cpp (added)
-
libs/libmythui/cecadapter.h (added)
-
libs/libmythui/libmythui.pro (modified) (1 diff)
-
libs/libmythui/mythmainwindow.cpp (modified) (7 diffs)
-
libs/libmythui/mythmainwindow.h (modified) (1 diff)
-
libs/libmythui/mythscreentype.cpp (modified) (1 diff)
-
libs/libmythui/mythuiactions.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
mythtv/configure
r145b2097a5 re090e9969c 106 106 --disable-lirc disable lirc support (Infrared Remotes) 107 107 --disable-joystick-menu disable joystick menu 108 --disable-libcec disable libCEC device support 109 --libcec-path=HDRLOC location of directory containing 110 cec.h [$libcec_path_default] 108 111 --disable-firewire disable support for FireWire cable boxes 109 112 --disable-iptv disable support for recording RTSP/UDP/RTP streams … … 1347 1350 asi 1348 1351 joystick_menu 1352 libcec 1349 1353 libfftw3 1350 1354 libmpeg2external … … 1429 1433 dvb_path 1430 1434 incdir 1435 libcec_path 1431 1436 libdir 1432 1437 mandir … … 1987 1992 enable lamemp3 1988 1993 enable libass 1994 enable libcec 1989 1995 enable libxml2 1990 1996 enable libudf … … 2007 2013 dvb_path_default="${sysroot}/usr/include" 2008 2014 x11_path_default="${sysroot}/usr/X11R6/include" 2015 libcec_path_default="${sysroot}/usr/include/libcec" 2009 2016 libxml2_path_default="${sysroot}/usr/include/libxml2" 2010 2017 … … 4106 4113 enabled libass && check_lib2 ass/ass.h ass_flush_events -lass || disable libass 4107 4114 4115 enabled libcec && check_cxx -I"$libcec_path" <<EOF || { echolog "libCEC support needs libcec >= 7" && disable libcec; } 4116 #include <libcec/cec.h> 4117 #include <iostream> 4118 using namespace std; 4119 using namespace CEC; 4120 #include <libcec/cecloader.h> 4121 int main(void) { 4122 if (CEC_LIB_VERSION < 7) 4123 return 0; 4124 return (long) LoadLibCec; 4125 } 4126 EOF 4127 4108 4128 if enabled libxml2 ; then 4109 4129 if pkg-config --exists libxml-2.0 ; then … … 4438 4458 echo "Joystick menu ${joystick_menu-no}" 4439 4459 echo "lirc support ${lirc-no}" 4460 echo "libCEC device support ${libcec-no} [$libcec_path]" 4440 4461 if test x"$target_os" = x"darwin" ; then 4441 4462 echo "Apple Remote ${appleremote-no}" … … 4831 4852 fi 4832 4853 4854 if enabled libcec; then 4855 append CONFIG_DEFINES "using_libcec" 4856 append CONFIG_INCLUDEPATH "$libcec_path" 4857 fi 4858 4833 4859 if enabled libxml2; then 4834 4860 if [ -d $libxml2_path ] ; then -
mythtv/libs/libmythui/libmythui.pro
r145b2097a5 re090e9969c 117 117 } 118 118 119 using_libcec { 120 DEFINES += USING_LIBCEC 121 HEADERS += cecadapter.h 122 SOURCES += cecadapter.cpp 123 } 124 119 125 using_xrandr { 120 126 DEFINES += USING_XRANDR -
mythtv/libs/libmythui/mythmainwindow.cpp
r145b2097a5 re090e9969c 63 63 #endif 64 64 65 #ifdef USING_LIBCEC 66 #include "cecadapter.h" 67 #endif 68 65 69 #include "mythscreentype.h" 66 70 #include "mythpainter.h" … … 135 139 appleRemote(NULL), 136 140 #endif 141 142 #ifdef USING_LIBCEC 143 cecAdapter(NULL), 144 #endif 145 137 146 exitingtomain(false), 138 147 popwindows(false), … … 201 210 AppleRemoteListener *appleRemoteListener; 202 211 AppleRemote *appleRemote; 212 #endif 213 214 #ifdef USING_LIBCEC 215 CECAdapter* cecAdapter; 203 216 #endif 204 217 … … 445 458 #endif 446 459 460 #ifdef USING_LIBCEC 461 d->cecAdapter = new CECAdapter(); 462 if (!d->cecAdapter->IsValid()) 463 { 464 delete d->cecAdapter; 465 d->cecAdapter = NULL; 466 } 467 #endif 468 447 469 d->m_udpListener = new MythUDPListener(); 448 470 … … 523 545 524 546 delete d->appleRemoteListener; 547 #endif 548 549 #ifdef USING_LIBCEC 550 if (d->cecAdapter) 551 delete d->cecAdapter; 525 552 #endif 526 553 … … 1103 1130 RegisterKey("Global", ACTION_9, QT_TRANSLATE_NOOP("MythControls","9"), "9"); 1104 1131 1132 RegisterKey("Global", ACTION_TVPOWERON, QT_TRANSLATE_NOOP("MythControls", 1133 "Turn the display on"), ""); 1134 RegisterKey("Global", ACTION_TVPOWEROFF, QT_TRANSLATE_NOOP("MythControls", 1135 "Turn the display off"), ""); 1136 1105 1137 RegisterKey("Global", "SYSEVENT01", QT_TRANSLATE_NOOP("MythControls", 1106 1138 "Trigger System Key Event #1"), ""); … … 1823 1855 1824 1856 return false; 1857 } 1858 1859 void MythMainWindow::HandleTVPower(bool poweron) 1860 { 1861 if (poweron) 1862 { 1863 #ifdef USING_LIBCEC 1864 if (d->cecAdapter) 1865 d->cecAdapter->Action(ACTION_TVPOWERON); 1866 #endif 1867 } 1868 else 1869 { 1870 #ifdef USING_LIBCEC 1871 if (d->cecAdapter) 1872 d->cecAdapter->Action(ACTION_TVPOWEROFF); 1873 #endif 1874 } 1825 1875 } 1826 1876 -
mythtv/libs/libmythui/mythmainwindow.h
r145b2097a5 re090e9969c 77 77 int season=0, int episode=0, const QString& inetref="", 78 78 int lenMins=120, const QString& year="1895"); 79 void HandleTVPower(bool poweron); 79 80 80 81 void JumpTo(const QString &destination, bool pop = true); -
mythtv/libs/libmythui/mythscreentype.cpp
r145b2097a5 re090e9969c 472 472 gCoreContext->SendSystemEvent(QString("KEY_%1").arg(action.mid(8))); 473 473 else if (action == ACTION_SCREENSHOT) 474 {475 474 GetMythMainWindow()->ScreenShot(); 476 } 475 else if (action == ACTION_TVPOWERON) 476 GetMythMainWindow()->HandleTVPower(true); 477 else if (action == ACTION_TVPOWEROFF) 478 GetMythMainWindow()->HandleTVPower(false); 477 479 else 478 480 handled = false; -
mythtv/libs/libmythui/mythuiactions.h
r145b2097a5 re090e9969c 22 22 #define ACTION_SCREENSHOT "SCREENSHOT" 23 23 24 #define ACTION_TVPOWEROFF "TVPOWEROFF" 25 #define ACTION_TVPOWERON "TVPOWERON" 26 24 27 #endif // MYTHUI_ACTIONS_H
Note: See TracChangeset
for help on using the changeset viewer.
