[arch-commits] Commit in mythtv/repos (14 files)
Ike Devolder
idevolder at archlinux.org
Sat Jul 15 22:05:59 UTC 2017
Date: Saturday, July 15, 2017 @ 22:05:58
Author: idevolder
Revision: 245261
archrelease: copy trunk to community-staging-i686, community-staging-x86_64
Added:
mythtv/repos/community-staging-i686/
mythtv/repos/community-staging-i686/99-mythbackend.rules
(from rev 245260, mythtv/trunk/99-mythbackend.rules)
mythtv/repos/community-staging-i686/PKGBUILD
(from rev 245260, mythtv/trunk/PKGBUILD)
mythtv/repos/community-staging-i686/libcec4.patch
(from rev 245260, mythtv/trunk/libcec4.patch)
mythtv/repos/community-staging-i686/loggingserver.patch
(from rev 245260, mythtv/trunk/loggingserver.patch)
mythtv/repos/community-staging-i686/mythbackend.service
(from rev 245260, mythtv/trunk/mythbackend.service)
mythtv/repos/community-staging-i686/mythtv.install
(from rev 245260, mythtv/trunk/mythtv.install)
mythtv/repos/community-staging-x86_64/
mythtv/repos/community-staging-x86_64/99-mythbackend.rules
(from rev 245260, mythtv/trunk/99-mythbackend.rules)
mythtv/repos/community-staging-x86_64/PKGBUILD
(from rev 245260, mythtv/trunk/PKGBUILD)
mythtv/repos/community-staging-x86_64/libcec4.patch
(from rev 245260, mythtv/trunk/libcec4.patch)
mythtv/repos/community-staging-x86_64/loggingserver.patch
(from rev 245260, mythtv/trunk/loggingserver.patch)
mythtv/repos/community-staging-x86_64/mythbackend.service
(from rev 245260, mythtv/trunk/mythbackend.service)
mythtv/repos/community-staging-x86_64/mythtv.install
(from rev 245260, mythtv/trunk/mythtv.install)
-----------------------------------------------+
community-staging-i686/99-mythbackend.rules | 6
community-staging-i686/PKGBUILD | 78 +++
community-staging-i686/libcec4.patch | 551 ++++++++++++++++++++++++
community-staging-i686/loggingserver.patch | 11
community-staging-i686/mythbackend.service | 16
community-staging-i686/mythtv.install | 20
community-staging-x86_64/99-mythbackend.rules | 6
community-staging-x86_64/PKGBUILD | 78 +++
community-staging-x86_64/libcec4.patch | 551 ++++++++++++++++++++++++
community-staging-x86_64/loggingserver.patch | 11
community-staging-x86_64/mythbackend.service | 16
community-staging-x86_64/mythtv.install | 20
12 files changed, 1364 insertions(+)
Copied: mythtv/repos/community-staging-i686/99-mythbackend.rules (from rev 245260, mythtv/trunk/99-mythbackend.rules)
===================================================================
--- community-staging-i686/99-mythbackend.rules (rev 0)
+++ community-staging-i686/99-mythbackend.rules 2017-07-15 22:05:58 UTC (rev 245261)
@@ -0,0 +1,6 @@
+#
+# Create systemd device units for capture devices
+#
+SUBSYSTEM=="video4linux", TAG+="systemd"
+SUBSYSTEM=="dvb", TAG+="systemd"
+SUBSYSTEM=="firewire", TAG+="systemd"
Copied: mythtv/repos/community-staging-i686/PKGBUILD (from rev 245260, mythtv/trunk/PKGBUILD)
===================================================================
--- community-staging-i686/PKGBUILD (rev 0)
+++ community-staging-i686/PKGBUILD 2017-07-15 22:05:58 UTC (rev 245261)
@@ -0,0 +1,78 @@
+# $Id$
+# Maintainer: Jonathan Conder <jonno.conder at gmail.com>
+# Contributor: Giovanni Scafora <giovanni at archlinux.org>
+# Contributor: Juergen Hoetzel <juergen at archlinux.org>
+# Contributor: <kleptophobiac at gmail.com>
+# Contributor: dorphell <dorphell at archlinux.org>
+
+pkgname=mythtv
+pkgver=0.28.1
+pkgrel=8
+epoch=1
+pkgdesc="A Homebrew PVR project"
+arch=('i686' 'x86_64')
+url="http://www.mythtv.org/"
+license=('GPL')
+depends=('avahi' 'fftw' 'lame' 'libass' 'libavc1394' 'libcdio' 'libiec61883'
+ 'libgl' 'libpulse' 'libva' 'libvpx' 'libxinerama' 'lirc' 'mariadb-clients'
+ 'mysql-python' 'perl-dbd-mysql' 'perl-io-socket-inet6' 'perl-libwww'
+ 'perl-net-upnp' 'python2-lxml' 'qt5-webkit' 'qt5-script' 'taglib' 'urlgrabber'
+ 'libx264' 'libvdpau' 'exiv2' 'libxrandr' 'jack')
+makedepends=('glew' 'libcec' 'libxml2' 'mesa' 'mesa-libgl' 'openssl' 'yasm' 'x264' 'gdb')
+optdepends=('glew: for GPU commercial flagging'
+ 'libcec: for consumer electronics control capabilities'
+ 'libxml2: to read blu-ray metadata'
+ 'openssl: for AirTunes (RAOP) support')
+conflicts=('myththemes' 'mythplugins-mythvideo')
+replaces=('myththemes' 'mythplugins-mythvideo')
+install='mythtv.install'
+source=("$pkgname-$pkgver.tar.gz::https://github.com/MythTV/$pkgname/archive/v$pkgver.tar.gz"
+ 'mythbackend.service' '99-mythbackend.rules'
+ 'loggingserver.patch')
+sha256sums=('f59688bbb69ef8830cfe76c826ec89027ed0a9bbb75cc97935fc664225b89dee'
+ 'ed5ca54de26b7cd8a64e09626eed6e09f35d677daf88c530bb24cc4252bcce6d'
+ 'ecfd02bbbef5de9773f4de2c52e9b2b382ce8137735f249d7900270d304fd333'
+ '3798c5d00c9dae19fa46b4d69f395df6461018c801dadf9b86f336b8c5ff39ec')
+
+prepare() {
+ cd $pkgname-$pkgver/$pkgname
+
+ patch -p2 -i "$srcdir/loggingserver.patch"
+
+ find 'bindings/python' 'contrib' 'programs/scripts' -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@'
+}
+
+build() {
+ cd $pkgname-$pkgver/$pkgname
+
+ ARCH="${CARCH/_/-}"
+ ./configure --prefix=/usr \
+ --cpu="$ARCH" \
+ --disable-altivec \
+ --disable-audio-jack \
+ --disable-ccache \
+ --disable-distcc \
+ --enable-libfftw3 \
+ --enable-libmp3lame \
+ --enable-libvpx \
+ --enable-libx264 \
+ --enable-vaapi \
+ --python=python2 \
+ --perl-config-opts=INSTALLDIRS=vendor
+ make
+}
+
+package() {
+ cd $pkgname-$pkgver/$pkgname
+ make INSTALL_ROOT="$pkgdir" install
+
+ install -D -m644 "$srcdir/mythbackend.service" "$pkgdir/usr/lib/systemd/system/mythbackend.service"
+ install -D -m644 'database/mc.sql' "$pkgdir/usr/share/mythtv/mc.sql"
+
+ mkdir -p "$pkgdir/usr/share/mythtv"
+ cp -R 'contrib' "$pkgdir/usr/share/mythtv"
+ mkdir -p "$pkgdir/var/log/mythtv"
+
+# Install udev rules https://www.mythtv.org/wiki/Systemd_mythbackend_Configuration#Delay_starting_the_backend_until_tuners_have_initialized
+ install -Dm644 "$srcdir"/99-mythbackend.rules "$pkgdir"/usr/lib/udev/rules.d/99-mythbackend.rules
+}
Copied: mythtv/repos/community-staging-i686/libcec4.patch (from rev 245260, mythtv/trunk/libcec4.patch)
===================================================================
--- community-staging-i686/libcec4.patch (rev 0)
+++ community-staging-i686/libcec4.patch 2017-07-15 22:05:58 UTC (rev 245261)
@@ -0,0 +1,551 @@
+diff --git a/mythtv/libs/libmythui/cecadapter.cpp b/mythtv/libs/libmythui/cecadapter.cpp
+index 00a8c73..06a8f3d 100644
+--- a/mythtv/libs/libmythui/cecadapter.cpp
++++ b/mythtv/libs/libmythui/cecadapter.cpp
+@@ -33,17 +33,31 @@ QWaitCondition* CECAdapter::gActionsReady = new QWaitCondition();
+ // libcec1's callback parameters are pass-by-ref
+ #define CEC_CALLBACK_PARAM_TYPE &
+ #else
+-// libcec2's callback parameters are pass-by-value
++#if CEC_LIB_VERSION_MAJOR <= 3
++// libcec2 and 3 callback parameters are pass-by-value
+ #define CEC_CALLBACK_PARAM_TYPE
+ #endif
++#endif
+
+ // The libCEC callback functions
++#if CEC_LIB_VERSION_MAJOR <= 3
+ static int CECLogMessageCallback(void *adapter, const cec_log_message CEC_CALLBACK_PARAM_TYPE message);
+ static int CECKeyPressCallback(void *adapter, const cec_keypress CEC_CALLBACK_PARAM_TYPE keypress);
+ static int CECCommandCallback(void *adapter, const cec_command CEC_CALLBACK_PARAM_TYPE command);
++#endif
++#if CEC_LIB_VERSION_MAJOR >= 4
++static void CECLogMessageCallback(void *adapter, const cec_log_message* message);
++static void CECKeyPressCallback(void *adapter, const cec_keypress* keypress);
++static void CECCommandCallback(void *adapter, const cec_command* command);
++#endif
+
+ #if CEC_LIB_VERSION_MAJOR >= 2
++#if CEC_LIB_VERSION_MAJOR <= 3
+ static int CECAlertCallback(void *adapter, const libcec_alert alert, const libcec_parameter CEC_CALLBACK_PARAM_TYPE data);
++#endif
++#if CEC_LIB_VERSION_MAJOR >= 4
++static void CECAlertCallback(void *adapter, const libcec_alert alert, const libcec_parameter data);
++#endif
+ static void CECSourceActivatedCallback(void *adapter, const cec_logical_address address, const uint8_t activated);
+ #endif
+
+@@ -107,13 +121,24 @@ class CECAdapterPriv
+ }
+
+ // Set up the callbacks
++#if CEC_LIB_VERSION_MAJOR <= 3
+ callbacks.CBCecLogMessage = &CECLogMessageCallback;
+ callbacks.CBCecKeyPress = &CECKeyPressCallback;
+ callbacks.CBCecCommand = &CECCommandCallback;
+-#if CEC_LIB_VERSION_MAJOR >= 2
++#endif
++#if CEC_LIB_VERSION_MAJOR >= 4
++ callbacks.logMessage = &CECLogMessageCallback;
++ callbacks.keyPress = &CECKeyPressCallback;
++ callbacks.commandReceived = &CECCommandCallback;
++#endif
++#if CEC_LIB_VERSION_MAJOR >= 2 && CEC_LIB_VERSION_MAJOR <= 3
+ callbacks.CBCecAlert = &CECAlertCallback;
+ callbacks.CBCecSourceActivated = &CECSourceActivatedCallback;
+ #endif
++#if CEC_LIB_VERSION_MAJOR >= 4
++ callbacks.alert = &CECAlertCallback;
++ callbacks.sourceActivated = &CECSourceActivatedCallback;
++#endif
+ configuration.callbackParam = this;
+ configuration.callbacks = &callbacks;
+
+@@ -127,8 +152,13 @@ class CECAdapterPriv
+ }
+
+ // find adapters
++#if CEC_LIB_VERSION_MAJOR >= 4
++ cec_adapter_descriptor *devices = new cec_adapter_descriptor[MAX_CEC_DEVICES];
++ uint8_t num_devices = adapter->DetectAdapters(devices, MAX_CEC_DEVICES, NULL, true);
++#else
+ cec_adapter *devices = new cec_adapter[MAX_CEC_DEVICES];
+ uint8_t num_devices = adapter->FindAdapters(devices, MAX_CEC_DEVICES, NULL);
++#endif
+ if (num_devices < 1)
+ {
+ LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to find any CEC devices.");
+@@ -143,22 +173,37 @@ class CECAdapterPriv
+ .arg(num_devices));
+ for (uint8_t i = 0; i < num_devices; i++)
+ {
++#if CEC_LIB_VERSION_MAJOR >= 4
++ QString comm = QString::fromLatin1(devices[i].strComName);
++ QString path = QString::fromLatin1(devices[i].strComPath);
++#else
+ QString comm = QString::fromLatin1(devices[i].comm);
++ QString path = QString::fromLatin1(devices[i].path);
++#endif
+ bool match = find ? (comm == defaultDevice) : (i == 0);
+ devicenum = match ? i : devicenum;
+ LOG(VB_GENERAL, LOG_INFO, LOC +
+ QString("Device %1: path '%2' com port '%3' %4").arg(i + 1)
+- .arg(QString::fromLatin1(devices[i].path)).arg(comm)
++ .arg(path).arg(comm)
+ .arg(match ? "SELECTED" : ""));
+ }
+
+ // open adapter
+- QString path = QString::fromLatin1(devices[devicenum].path);
++#if CEC_LIB_VERSION_MAJOR >= 4
++ QString comm = QString::fromLatin1(devices[devicenum].strComName);
++ QString path = QString::fromLatin1(devices[devicenum].strComPath);
++#else
+ QString comm = QString::fromLatin1(devices[devicenum].comm);
++ QString path = QString::fromLatin1(devices[devicenum].path);
++#endif
+ LOG(VB_GENERAL, LOG_INFO, LOC + QString("Trying to open device %1 (%2).")
+ .arg(path).arg(comm));
+
++#if CEC_LIB_VERSION_MAJOR >= 4
++ if (!adapter->Open(devices[devicenum].strComName))
++#else
+ if (!adapter->Open(devices[devicenum].comm))
++#endif
+ {
+ LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to open device.");
+ return false;
+@@ -213,6 +258,20 @@ class CECAdapterPriv
+ return 1;
+ }
+
++ void LogMessage(const cec_log_message* message)
++ {
++ QString msg(message->message);
++ int lvl = LOG_UNKNOWN;
++ switch (message->level)
++ {
++ case CEC_LOG_ERROR: lvl = LOG_ERR; break;
++ case CEC_LOG_WARNING: lvl = LOG_WARNING; break;
++ case CEC_LOG_NOTICE: lvl = LOG_INFO; break;
++ case CEC_LOG_DEBUG: lvl = LOG_DEBUG; break;
++ }
++ LOG(VB_GENERAL, lvl, LOC + QString("%1").arg(msg));
++ }
++
+ // NOTE - libcec2 changes the callbacks
+ // to be pass-by-value.
+ // For simplicity, this function remains as pass-by-ref
+@@ -241,6 +300,29 @@ class CECAdapterPriv
+ return 1;
+ }
+
++ void HandleCommand(const cec_command* command)
++ {
++ if (!adapter || !valid)
++ return;
++
++ LOG(VB_GENERAL, LOG_DEBUG, LOC +
++ QString("Command %1 from '%2' (%3) - destination '%4' (%5)")
++ .arg(command->opcode)
++ .arg(adapter->ToString(command->initiator))
++ .arg(command->initiator)
++ .arg(adapter->ToString(command->destination))
++ .arg(command->destination));
++
++ switch (command->opcode)
++ {
++ // TODO
++ default:
++ break;
++ }
++ gCoreContext->SendSystemEvent(QString("CEC_COMMAND_RECEIVED COMMAND %1")
++ .arg(command->opcode));
++ }
++
+ int HandleKeyPress(const cec_keypress &key)
+ {
+ if (!adapter || !valid)
+@@ -572,6 +654,335 @@ class CECAdapterPriv
+ return 1;
+ }
+
++ void HandleKeyPress(const cec_keypress* key)
++ {
++ if (!adapter || !valid)
++ return;
++
++ // Ignore key down events and wait for the key 'up'
++ if (key->duration < 1)
++ return;
++
++ QString code;
++ int action = 0;
++ switch (key->keycode)
++ {
++ case CEC_USER_CONTROL_CODE_NUMBER0:
++ action = Qt::Key_0;
++ code = "0";
++ break;
++ case CEC_USER_CONTROL_CODE_NUMBER1:
++ action = Qt::Key_1;
++ code = "1";
++ break;
++ case CEC_USER_CONTROL_CODE_NUMBER2:
++ action = Qt::Key_2;
++ code = "2";
++ break;
++ case CEC_USER_CONTROL_CODE_NUMBER3:
++ action = Qt::Key_3;
++ code = "3";
++ break;
++ case CEC_USER_CONTROL_CODE_NUMBER4:
++ action = Qt::Key_4;
++ code = "4";
++ break;
++ case CEC_USER_CONTROL_CODE_NUMBER5:
++ action = Qt::Key_5;
++ code = "5";
++ break;
++ case CEC_USER_CONTROL_CODE_NUMBER6:
++ action = Qt::Key_6;
++ code = "6";
++ break;
++ case CEC_USER_CONTROL_CODE_NUMBER7:
++ action = Qt::Key_7;
++ code = "7";
++ break;
++ case CEC_USER_CONTROL_CODE_NUMBER8:
++ action = Qt::Key_8;
++ code = "8";
++ break;
++ case CEC_USER_CONTROL_CODE_NUMBER9:
++ action = Qt::Key_9;
++ code = "9";
++ break;
++ case CEC_USER_CONTROL_CODE_SELECT:
++ action = Qt::Key_Select;
++ code = "SELECT";
++ break;
++ case CEC_USER_CONTROL_CODE_ENTER:
++ action = Qt::Key_Enter;
++ code = "ENTER";
++ break;
++ case CEC_USER_CONTROL_CODE_UP:
++ action = Qt::Key_Up;
++ code = "UP";
++ break;
++ case CEC_USER_CONTROL_CODE_DOWN:
++ action = Qt::Key_Down;
++ code = "DOWN";
++ break;
++ case CEC_USER_CONTROL_CODE_LEFT:
++ action = Qt::Key_Left;
++ code = "LEFT";
++ break;
++ case CEC_USER_CONTROL_CODE_LEFT_UP:
++ action = Qt::Key_Left;
++ code = "LEFT_UP";
++ break;
++ case CEC_USER_CONTROL_CODE_LEFT_DOWN:
++ action = Qt::Key_Left;
++ code = "LEFT_DOWN";
++ break;
++ case CEC_USER_CONTROL_CODE_RIGHT:
++ action = Qt::Key_Right;
++ code = "RIGHT";
++ break;
++ case CEC_USER_CONTROL_CODE_RIGHT_UP:
++ action = Qt::Key_Right;
++ code = "RIGHT_UP";
++ break;
++ case CEC_USER_CONTROL_CODE_RIGHT_DOWN:
++ action = Qt::Key_Right;
++ code = "RIGHT_DOWN";
++ break;
++ case CEC_USER_CONTROL_CODE_ROOT_MENU:
++ action = Qt::Key_M;
++ code = "ROOT_MENU";
++ break;
++ case CEC_USER_CONTROL_CODE_EXIT:
++ action = Qt::Key_Escape;
++ code = "EXIT";
++ break;
++ case CEC_USER_CONTROL_CODE_PREVIOUS_CHANNEL:
++ action = Qt::Key_H;
++ code = "PREVIOUS_CHANNEL";
++ break;
++ case CEC_USER_CONTROL_CODE_SOUND_SELECT:
++ action = Qt::Key_Plus;
++ code = "SOUND_SELECT";
++ break;
++ case CEC_USER_CONTROL_CODE_VOLUME_UP:
++ action = Qt::Key_VolumeUp;
++ code = "VOLUME_UP";
++ break;
++ case CEC_USER_CONTROL_CODE_VOLUME_DOWN:
++ action = Qt::Key_VolumeDown;
++ code = "VOLUME_DOWN";
++ break;
++ case CEC_USER_CONTROL_CODE_MUTE:
++ action = Qt::Key_VolumeMute;
++ code = "MUTE";
++ break;
++ case CEC_USER_CONTROL_CODE_PLAY:
++ action = Qt::Key_P;
++ code = "PLAY";
++ break;
++ case CEC_USER_CONTROL_CODE_PAUSE:
++ action = Qt::Key_P; // same as play
++ code = "PAUSE";
++ break;
++ case CEC_USER_CONTROL_CODE_STOP:
++ action = Qt::Key_Stop;
++ code = "STOP";
++ break;
++ case CEC_USER_CONTROL_CODE_RECORD:
++ action = Qt::Key_R;
++ code = "RECORD";
++ break;
++ case CEC_USER_CONTROL_CODE_CLEAR:
++ action = Qt::Key_Clear;
++ code = "CLEAR";
++ break;
++ case CEC_USER_CONTROL_CODE_DISPLAY_INFORMATION:
++ action = Qt::Key_I;
++ code = "DISPLAY_INFORMATION";
++ break;
++ case CEC_USER_CONTROL_CODE_PAGE_UP:
++ action = Qt::Key_PageUp;
++ code = "PAGE_UP";
++ break;
++ case CEC_USER_CONTROL_CODE_PAGE_DOWN:
++ action = Qt::Key_PageDown;
++ code = "PAGE_DOWN";
++ break;
++ case CEC_USER_CONTROL_CODE_EJECT:
++ action = Qt::Key_Eject;
++ code = "EJECT";
++ break;
++ case CEC_USER_CONTROL_CODE_FORWARD:
++ action = Qt::Key_Forward;
++ code = "FORWARD";
++ break;
++ case CEC_USER_CONTROL_CODE_BACKWARD:
++ action = Qt::Key_Back;
++ code = "BACKWARD";
++ break;
++ case CEC_USER_CONTROL_CODE_F1_BLUE:
++ action = Qt::Key_F5; // NB F1 is help and we normally map blue to F5
++ code = "F1_BLUE";
++ break;
++ case CEC_USER_CONTROL_CODE_F2_RED:
++ action = Qt::Key_F2;
++ code = "F2_RED";
++ break;
++ case CEC_USER_CONTROL_CODE_F3_GREEN:
++ action = Qt::Key_F3;
++ code = "F3_GREEN";
++ break;
++ case CEC_USER_CONTROL_CODE_F4_YELLOW:
++ action = Qt::Key_F4;
++ code = "F4_YELLOW";
++ break;
++ case CEC_USER_CONTROL_CODE_SETUP_MENU:
++ action = Qt::Key_M; // Duplicate of Root Menu
++ code = "SETUP_MENU";
++ break;
++ case CEC_USER_CONTROL_CODE_CONTENTS_MENU:
++ action = Qt::Key_M; // Duplicate of Root Menu
++ code = "CONTENTS_MENU";
++ break;
++ case CEC_USER_CONTROL_CODE_FAVORITE_MENU:
++ action = Qt::Key_M; // Duplicate of Root Menu
++ code = "FAVORITE_MENU";
++ break;
++ case CEC_USER_CONTROL_CODE_DOT:
++ action = Qt::Key_Period;
++ code = "DOT";
++ break;
++ case CEC_USER_CONTROL_CODE_NEXT_FAVORITE:
++ action = Qt::Key_Slash;
++ code = "NEXT_FAVORITE";
++ break;
++ case CEC_USER_CONTROL_CODE_INPUT_SELECT:
++ action = Qt::Key_C;
++ code = "INPUT_SELECT";
++ break;
++ case CEC_USER_CONTROL_CODE_HELP:
++ action = Qt::Key_F1;
++ code = "HELP";
++ break;
++ case CEC_USER_CONTROL_CODE_STOP_RECORD:
++ action = Qt::Key_R; // Duplicate of Record
++ code = "STOP_RECORD";
++ break;
++ case CEC_USER_CONTROL_CODE_SUB_PICTURE:
++ action = Qt::Key_V;
++ code = "SUB_PICTURE";
++ break;
++ case CEC_USER_CONTROL_CODE_ELECTRONIC_PROGRAM_GUIDE:
++ action = Qt::Key_S;
++ code = "ELECTRONIC_PROGRAM_GUIDE";
++ break;
++ case CEC_USER_CONTROL_CODE_POWER:
++ action = Qt::Key_PowerOff;
++ code = "POWER";
++ break;
++
++ // these codes have 'non-standard' Qt key mappings to ensure
++ // each code has a unique key mapping
++ case CEC_USER_CONTROL_CODE_CHANNEL_DOWN:
++ action = Qt::Key_F20; // to differentiate from Up
++ code = "CHANNEL_DOWN";
++ break;
++ case CEC_USER_CONTROL_CODE_CHANNEL_UP:
++ action = Qt::Key_F21; // to differentiate from Down
++ code = "CHANNEL_UP";
++ break;
++ case CEC_USER_CONTROL_CODE_REWIND:
++ action = Qt::Key_F22; // to differentiate from Left
++ code = "REWIND";
++ break;
++ case CEC_USER_CONTROL_CODE_FAST_FORWARD:
++ action = Qt::Key_F23; // to differentiate from Right
++ code = "FAST_FORWARD";
++ break;
++ case CEC_USER_CONTROL_CODE_ANGLE:
++ action = Qt::Key_F24;
++ code = "ANGLE";
++ break;
++ case CEC_USER_CONTROL_CODE_F5:
++ action = Qt::Key_F6; // NB!
++ code = "F5";
++ break;
++
++ // codes with no obvious MythTV action
++ case CEC_USER_CONTROL_CODE_INITIAL_CONFIGURATION:
++ code = "INITIAL_CONFIGURATION";
++ break;
++ case CEC_USER_CONTROL_CODE_PAUSE_RECORD:
++ code = "PAUSE_RECORD";
++ break;
++ case CEC_USER_CONTROL_CODE_VIDEO_ON_DEMAND:
++ code = "VIDEO_ON_DEMAND";
++ break;
++ case CEC_USER_CONTROL_CODE_TIMER_PROGRAMMING:
++ code = "TIMER_PROGRAMMING";
++ break;
++ case CEC_USER_CONTROL_CODE_UNKNOWN:
++ code = "UNKNOWN";
++ break;
++ case CEC_USER_CONTROL_CODE_DATA:
++ code = "DATA";
++ break;
++
++ // Functions aren't implemented (similar to macros?)
++ case CEC_USER_CONTROL_CODE_POWER_ON_FUNCTION:
++ code = "POWER_ON_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_PLAY_FUNCTION:
++ code = "PLAY_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_PAUSE_PLAY_FUNCTION:
++ code = "PAUSE_PLAY_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_RECORD_FUNCTION:
++ code = "RECORD_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_PAUSE_RECORD_FUNCTION:
++ code = "PAUSE_RECORD_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_STOP_FUNCTION:
++ code = "STOP_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_MUTE_FUNCTION:
++ code = "MUTE_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_RESTORE_VOLUME_FUNCTION:
++ code = "RESTORE_VOLUME_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_TUNE_FUNCTION:
++ code = "TUNE_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_SELECT_MEDIA_FUNCTION:
++ code = "SELECT_MEDIA_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_SELECT_AV_INPUT_FUNCTION:
++ code = "SELECT_AV_INPUT_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_SELECT_AUDIO_INPUT_FUNCTION:
++ code = "SELECT_AUDIO_INPUT_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_POWER_TOGGLE_FUNCTION:
++ code = "POWER_TOGGLE_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_POWER_OFF_FUNCTION:
++ code = "POWER_OFF_FUNCTION";
++ break;
++ }
++
++ LOG(VB_GENERAL, LOG_DEBUG, LOC + QString("Keypress %1 %2")
++ .arg(code).arg(0 == action ? "(Not actioned)" : ""));
++
++ if (0 == action)
++ return;
++
++ GetMythUI()->ResetScreensaver();
++ QKeyEvent* ke = new QKeyEvent(QEvent::KeyPress, action, Qt::NoModifier);
++ qApp->postEvent(GetMythMainWindow(), (QEvent*)ke);
++ }
++
+ #if CEC_LIB_VERSION_MAJOR >= 2
+ int HandleAlert(const libcec_alert alert, const libcec_parameter &data)
+ {
+@@ -764,6 +1175,7 @@ void CECAdapter::Action(const QString &action)
+ gActionsReady->wakeAll();
+ }
+
++#if CEC_LIB_VERSION_MAJOR <= 3
+ static int CECLogMessageCallback(void *adapter, const cec_log_message CEC_CALLBACK_PARAM_TYPE message)
+ {
+ return ((CECAdapterPriv*)adapter)->LogMessage(message);
+@@ -778,13 +1190,37 @@ static int CECCommandCallback(void *adapter, const cec_command CEC_CALLBACK_PARA
+ {
+ return ((CECAdapterPriv*)adapter)->HandleCommand(command);
+ }
++#endif
++#if CEC_LIB_VERSION_MAJOR >= 4
++static void CECLogMessageCallback(void *adapter, const cec_log_message* message)
++{
++ ((CECAdapterPriv*)adapter)->LogMessage(message);
++}
++
++static void CECKeyPressCallback(void *adapter, const cec_keypress* keypress)
++{
++ ((CECAdapterPriv*)adapter)->HandleKeyPress(keypress);
++}
++
++static void CECCommandCallback(void *adapter, const cec_command* command)
++{
++ ((CECAdapterPriv*)adapter)->HandleCommand(command);
++}
++#endif
+
+ #if CEC_LIB_VERSION_MAJOR >= 2
++#if CEC_LIB_VERSION_MAJOR <= 3
+ static int CECAlertCallback(void *adapter, const libcec_alert alert, const libcec_parameter CEC_CALLBACK_PARAM_TYPE data)
+ {
+ return ((CECAdapterPriv*)adapter)->HandleAlert(alert, data);
+ }
+-
++#endif
++#if CEC_LIB_VERSION_MAJOR >= 4
++static void CECAlertCallback(void *adapter, const libcec_alert alert, const libcec_parameter data)
++{
++ ((CECAdapterPriv*)adapter)->HandleAlert(alert, data);
++}
++#endif
+ static void CECSourceActivatedCallback(void *adapter, const cec_logical_address address, const uint8_t activated)
+ {
+ ((CECAdapterPriv*)adapter)->HandleSourceActivated(address, activated);
Copied: mythtv/repos/community-staging-i686/loggingserver.patch (from rev 245260, mythtv/trunk/loggingserver.patch)
===================================================================
--- community-staging-i686/loggingserver.patch (rev 0)
+++ community-staging-i686/loggingserver.patch 2017-07-15 22:05:58 UTC (rev 245261)
@@ -0,0 +1,11 @@
+--- a/mythtv/libs/libmythbase/loggingserver.cpp 2017-02-13 21:15:14.150339977 +0100
++++ b/mythtv/libs/libmythbase/loggingserver.cpp 2017-02-13 21:15:08.738490693 +0100
+@@ -722,7 +722,7 @@
+ if (!item)
+ continue;
+
+- if (item->message()[0] != '\0')
++ if (item->message()[0] != QChar('\0'))
+ {
+ qLock.unlock();
+ bool logged = m_logger->logqmsg(*query, item);
Copied: mythtv/repos/community-staging-i686/mythbackend.service (from rev 245260, mythtv/trunk/mythbackend.service)
===================================================================
--- community-staging-i686/mythbackend.service (rev 0)
+++ community-staging-i686/mythbackend.service 2017-07-15 22:05:58 UTC (rev 245261)
@@ -0,0 +1,16 @@
+[Unit]
+Description=MythTV Backend
+Wants=network-online.target
+After=network.target mysqld.service
+
+[Service]
+Type=simple
+Environment=HOME=/var/lib/mythtv
+User=mythtv
+ExecStart=/usr/bin/mythbackend --logpath /var/log/mythtv
+ExecStop=/usr/bin/mythshutdown --setscheduledwakeup
+#ExecStop=/usr/bin/mythshutdown --shutdown
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
Copied: mythtv/repos/community-staging-i686/mythtv.install (from rev 245260, mythtv/trunk/mythtv.install)
===================================================================
--- community-staging-i686/mythtv.install (rev 0)
+++ community-staging-i686/mythtv.install 2017-07-15 22:05:58 UTC (rev 245261)
@@ -0,0 +1,20 @@
+post_upgrade() {
+ if ! getent passwd mythtv &>/dev/null; then
+ getent group mythtv &>/dev/null || groupadd -r mythtv >/dev/null
+ useradd -rmd /var/lib/mythtv -g mythtv -G video,audio,optical -s /bin/bash mythtv >/dev/null
+ fi
+
+ echo -e "You may need to load time zone tables in MySQL.\nSee http://www.mythtv.org/wiki/MySQL_Time_Zone_Tables"
+}
+
+post_install() {
+ echo -e "For installation information, visit:\nhttps://wiki.archlinux.org/index.php/MythTV"
+
+ post_upgrade
+}
+
+post_remove() {
+ echo -e "The MythTV database was not removed. To remove it, run:\n mysql -u root -e 'drop database mythconverg;'"
+ [ -d var/lib/mythtv ] && echo "The MythTV home directory /var/lib/mythtv can also be removed."
+ echo -e "The 'mythtv' user and group can also be removed."
+}
Copied: mythtv/repos/community-staging-x86_64/99-mythbackend.rules (from rev 245260, mythtv/trunk/99-mythbackend.rules)
===================================================================
--- community-staging-x86_64/99-mythbackend.rules (rev 0)
+++ community-staging-x86_64/99-mythbackend.rules 2017-07-15 22:05:58 UTC (rev 245261)
@@ -0,0 +1,6 @@
+#
+# Create systemd device units for capture devices
+#
+SUBSYSTEM=="video4linux", TAG+="systemd"
+SUBSYSTEM=="dvb", TAG+="systemd"
+SUBSYSTEM=="firewire", TAG+="systemd"
Copied: mythtv/repos/community-staging-x86_64/PKGBUILD (from rev 245260, mythtv/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2017-07-15 22:05:58 UTC (rev 245261)
@@ -0,0 +1,78 @@
+# $Id$
+# Maintainer: Jonathan Conder <jonno.conder at gmail.com>
+# Contributor: Giovanni Scafora <giovanni at archlinux.org>
+# Contributor: Juergen Hoetzel <juergen at archlinux.org>
+# Contributor: <kleptophobiac at gmail.com>
+# Contributor: dorphell <dorphell at archlinux.org>
+
+pkgname=mythtv
+pkgver=0.28.1
+pkgrel=8
+epoch=1
+pkgdesc="A Homebrew PVR project"
+arch=('i686' 'x86_64')
+url="http://www.mythtv.org/"
+license=('GPL')
+depends=('avahi' 'fftw' 'lame' 'libass' 'libavc1394' 'libcdio' 'libiec61883'
+ 'libgl' 'libpulse' 'libva' 'libvpx' 'libxinerama' 'lirc' 'mariadb-clients'
+ 'mysql-python' 'perl-dbd-mysql' 'perl-io-socket-inet6' 'perl-libwww'
+ 'perl-net-upnp' 'python2-lxml' 'qt5-webkit' 'qt5-script' 'taglib' 'urlgrabber'
+ 'libx264' 'libvdpau' 'exiv2' 'libxrandr' 'jack')
+makedepends=('glew' 'libcec' 'libxml2' 'mesa' 'mesa-libgl' 'openssl' 'yasm' 'x264' 'gdb')
+optdepends=('glew: for GPU commercial flagging'
+ 'libcec: for consumer electronics control capabilities'
+ 'libxml2: to read blu-ray metadata'
+ 'openssl: for AirTunes (RAOP) support')
+conflicts=('myththemes' 'mythplugins-mythvideo')
+replaces=('myththemes' 'mythplugins-mythvideo')
+install='mythtv.install'
+source=("$pkgname-$pkgver.tar.gz::https://github.com/MythTV/$pkgname/archive/v$pkgver.tar.gz"
+ 'mythbackend.service' '99-mythbackend.rules'
+ 'loggingserver.patch')
+sha256sums=('f59688bbb69ef8830cfe76c826ec89027ed0a9bbb75cc97935fc664225b89dee'
+ 'ed5ca54de26b7cd8a64e09626eed6e09f35d677daf88c530bb24cc4252bcce6d'
+ 'ecfd02bbbef5de9773f4de2c52e9b2b382ce8137735f249d7900270d304fd333'
+ '3798c5d00c9dae19fa46b4d69f395df6461018c801dadf9b86f336b8c5ff39ec')
+
+prepare() {
+ cd $pkgname-$pkgver/$pkgname
+
+ patch -p2 -i "$srcdir/loggingserver.patch"
+
+ find 'bindings/python' 'contrib' 'programs/scripts' -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@'
+}
+
+build() {
+ cd $pkgname-$pkgver/$pkgname
+
+ ARCH="${CARCH/_/-}"
+ ./configure --prefix=/usr \
+ --cpu="$ARCH" \
+ --disable-altivec \
+ --disable-audio-jack \
+ --disable-ccache \
+ --disable-distcc \
+ --enable-libfftw3 \
+ --enable-libmp3lame \
+ --enable-libvpx \
+ --enable-libx264 \
+ --enable-vaapi \
+ --python=python2 \
+ --perl-config-opts=INSTALLDIRS=vendor
+ make
+}
+
+package() {
+ cd $pkgname-$pkgver/$pkgname
+ make INSTALL_ROOT="$pkgdir" install
+
+ install -D -m644 "$srcdir/mythbackend.service" "$pkgdir/usr/lib/systemd/system/mythbackend.service"
+ install -D -m644 'database/mc.sql' "$pkgdir/usr/share/mythtv/mc.sql"
+
+ mkdir -p "$pkgdir/usr/share/mythtv"
+ cp -R 'contrib' "$pkgdir/usr/share/mythtv"
+ mkdir -p "$pkgdir/var/log/mythtv"
+
+# Install udev rules https://www.mythtv.org/wiki/Systemd_mythbackend_Configuration#Delay_starting_the_backend_until_tuners_have_initialized
+ install -Dm644 "$srcdir"/99-mythbackend.rules "$pkgdir"/usr/lib/udev/rules.d/99-mythbackend.rules
+}
Copied: mythtv/repos/community-staging-x86_64/libcec4.patch (from rev 245260, mythtv/trunk/libcec4.patch)
===================================================================
--- community-staging-x86_64/libcec4.patch (rev 0)
+++ community-staging-x86_64/libcec4.patch 2017-07-15 22:05:58 UTC (rev 245261)
@@ -0,0 +1,551 @@
+diff --git a/mythtv/libs/libmythui/cecadapter.cpp b/mythtv/libs/libmythui/cecadapter.cpp
+index 00a8c73..06a8f3d 100644
+--- a/mythtv/libs/libmythui/cecadapter.cpp
++++ b/mythtv/libs/libmythui/cecadapter.cpp
+@@ -33,17 +33,31 @@ QWaitCondition* CECAdapter::gActionsReady = new QWaitCondition();
+ // libcec1's callback parameters are pass-by-ref
+ #define CEC_CALLBACK_PARAM_TYPE &
+ #else
+-// libcec2's callback parameters are pass-by-value
++#if CEC_LIB_VERSION_MAJOR <= 3
++// libcec2 and 3 callback parameters are pass-by-value
+ #define CEC_CALLBACK_PARAM_TYPE
+ #endif
++#endif
+
+ // The libCEC callback functions
++#if CEC_LIB_VERSION_MAJOR <= 3
+ static int CECLogMessageCallback(void *adapter, const cec_log_message CEC_CALLBACK_PARAM_TYPE message);
+ static int CECKeyPressCallback(void *adapter, const cec_keypress CEC_CALLBACK_PARAM_TYPE keypress);
+ static int CECCommandCallback(void *adapter, const cec_command CEC_CALLBACK_PARAM_TYPE command);
++#endif
++#if CEC_LIB_VERSION_MAJOR >= 4
++static void CECLogMessageCallback(void *adapter, const cec_log_message* message);
++static void CECKeyPressCallback(void *adapter, const cec_keypress* keypress);
++static void CECCommandCallback(void *adapter, const cec_command* command);
++#endif
+
+ #if CEC_LIB_VERSION_MAJOR >= 2
++#if CEC_LIB_VERSION_MAJOR <= 3
+ static int CECAlertCallback(void *adapter, const libcec_alert alert, const libcec_parameter CEC_CALLBACK_PARAM_TYPE data);
++#endif
++#if CEC_LIB_VERSION_MAJOR >= 4
++static void CECAlertCallback(void *adapter, const libcec_alert alert, const libcec_parameter data);
++#endif
+ static void CECSourceActivatedCallback(void *adapter, const cec_logical_address address, const uint8_t activated);
+ #endif
+
+@@ -107,13 +121,24 @@ class CECAdapterPriv
+ }
+
+ // Set up the callbacks
++#if CEC_LIB_VERSION_MAJOR <= 3
+ callbacks.CBCecLogMessage = &CECLogMessageCallback;
+ callbacks.CBCecKeyPress = &CECKeyPressCallback;
+ callbacks.CBCecCommand = &CECCommandCallback;
+-#if CEC_LIB_VERSION_MAJOR >= 2
++#endif
++#if CEC_LIB_VERSION_MAJOR >= 4
++ callbacks.logMessage = &CECLogMessageCallback;
++ callbacks.keyPress = &CECKeyPressCallback;
++ callbacks.commandReceived = &CECCommandCallback;
++#endif
++#if CEC_LIB_VERSION_MAJOR >= 2 && CEC_LIB_VERSION_MAJOR <= 3
+ callbacks.CBCecAlert = &CECAlertCallback;
+ callbacks.CBCecSourceActivated = &CECSourceActivatedCallback;
+ #endif
++#if CEC_LIB_VERSION_MAJOR >= 4
++ callbacks.alert = &CECAlertCallback;
++ callbacks.sourceActivated = &CECSourceActivatedCallback;
++#endif
+ configuration.callbackParam = this;
+ configuration.callbacks = &callbacks;
+
+@@ -127,8 +152,13 @@ class CECAdapterPriv
+ }
+
+ // find adapters
++#if CEC_LIB_VERSION_MAJOR >= 4
++ cec_adapter_descriptor *devices = new cec_adapter_descriptor[MAX_CEC_DEVICES];
++ uint8_t num_devices = adapter->DetectAdapters(devices, MAX_CEC_DEVICES, NULL, true);
++#else
+ cec_adapter *devices = new cec_adapter[MAX_CEC_DEVICES];
+ uint8_t num_devices = adapter->FindAdapters(devices, MAX_CEC_DEVICES, NULL);
++#endif
+ if (num_devices < 1)
+ {
+ LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to find any CEC devices.");
+@@ -143,22 +173,37 @@ class CECAdapterPriv
+ .arg(num_devices));
+ for (uint8_t i = 0; i < num_devices; i++)
+ {
++#if CEC_LIB_VERSION_MAJOR >= 4
++ QString comm = QString::fromLatin1(devices[i].strComName);
++ QString path = QString::fromLatin1(devices[i].strComPath);
++#else
+ QString comm = QString::fromLatin1(devices[i].comm);
++ QString path = QString::fromLatin1(devices[i].path);
++#endif
+ bool match = find ? (comm == defaultDevice) : (i == 0);
+ devicenum = match ? i : devicenum;
+ LOG(VB_GENERAL, LOG_INFO, LOC +
+ QString("Device %1: path '%2' com port '%3' %4").arg(i + 1)
+- .arg(QString::fromLatin1(devices[i].path)).arg(comm)
++ .arg(path).arg(comm)
+ .arg(match ? "SELECTED" : ""));
+ }
+
+ // open adapter
+- QString path = QString::fromLatin1(devices[devicenum].path);
++#if CEC_LIB_VERSION_MAJOR >= 4
++ QString comm = QString::fromLatin1(devices[devicenum].strComName);
++ QString path = QString::fromLatin1(devices[devicenum].strComPath);
++#else
+ QString comm = QString::fromLatin1(devices[devicenum].comm);
++ QString path = QString::fromLatin1(devices[devicenum].path);
++#endif
+ LOG(VB_GENERAL, LOG_INFO, LOC + QString("Trying to open device %1 (%2).")
+ .arg(path).arg(comm));
+
++#if CEC_LIB_VERSION_MAJOR >= 4
++ if (!adapter->Open(devices[devicenum].strComName))
++#else
+ if (!adapter->Open(devices[devicenum].comm))
++#endif
+ {
+ LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to open device.");
+ return false;
+@@ -213,6 +258,20 @@ class CECAdapterPriv
+ return 1;
+ }
+
++ void LogMessage(const cec_log_message* message)
++ {
++ QString msg(message->message);
++ int lvl = LOG_UNKNOWN;
++ switch (message->level)
++ {
++ case CEC_LOG_ERROR: lvl = LOG_ERR; break;
++ case CEC_LOG_WARNING: lvl = LOG_WARNING; break;
++ case CEC_LOG_NOTICE: lvl = LOG_INFO; break;
++ case CEC_LOG_DEBUG: lvl = LOG_DEBUG; break;
++ }
++ LOG(VB_GENERAL, lvl, LOC + QString("%1").arg(msg));
++ }
++
+ // NOTE - libcec2 changes the callbacks
+ // to be pass-by-value.
+ // For simplicity, this function remains as pass-by-ref
+@@ -241,6 +300,29 @@ class CECAdapterPriv
+ return 1;
+ }
+
++ void HandleCommand(const cec_command* command)
++ {
++ if (!adapter || !valid)
++ return;
++
++ LOG(VB_GENERAL, LOG_DEBUG, LOC +
++ QString("Command %1 from '%2' (%3) - destination '%4' (%5)")
++ .arg(command->opcode)
++ .arg(adapter->ToString(command->initiator))
++ .arg(command->initiator)
++ .arg(adapter->ToString(command->destination))
++ .arg(command->destination));
++
++ switch (command->opcode)
++ {
++ // TODO
++ default:
++ break;
++ }
++ gCoreContext->SendSystemEvent(QString("CEC_COMMAND_RECEIVED COMMAND %1")
++ .arg(command->opcode));
++ }
++
+ int HandleKeyPress(const cec_keypress &key)
+ {
+ if (!adapter || !valid)
+@@ -572,6 +654,335 @@ class CECAdapterPriv
+ return 1;
+ }
+
++ void HandleKeyPress(const cec_keypress* key)
++ {
++ if (!adapter || !valid)
++ return;
++
++ // Ignore key down events and wait for the key 'up'
++ if (key->duration < 1)
++ return;
++
++ QString code;
++ int action = 0;
++ switch (key->keycode)
++ {
++ case CEC_USER_CONTROL_CODE_NUMBER0:
++ action = Qt::Key_0;
++ code = "0";
++ break;
++ case CEC_USER_CONTROL_CODE_NUMBER1:
++ action = Qt::Key_1;
++ code = "1";
++ break;
++ case CEC_USER_CONTROL_CODE_NUMBER2:
++ action = Qt::Key_2;
++ code = "2";
++ break;
++ case CEC_USER_CONTROL_CODE_NUMBER3:
++ action = Qt::Key_3;
++ code = "3";
++ break;
++ case CEC_USER_CONTROL_CODE_NUMBER4:
++ action = Qt::Key_4;
++ code = "4";
++ break;
++ case CEC_USER_CONTROL_CODE_NUMBER5:
++ action = Qt::Key_5;
++ code = "5";
++ break;
++ case CEC_USER_CONTROL_CODE_NUMBER6:
++ action = Qt::Key_6;
++ code = "6";
++ break;
++ case CEC_USER_CONTROL_CODE_NUMBER7:
++ action = Qt::Key_7;
++ code = "7";
++ break;
++ case CEC_USER_CONTROL_CODE_NUMBER8:
++ action = Qt::Key_8;
++ code = "8";
++ break;
++ case CEC_USER_CONTROL_CODE_NUMBER9:
++ action = Qt::Key_9;
++ code = "9";
++ break;
++ case CEC_USER_CONTROL_CODE_SELECT:
++ action = Qt::Key_Select;
++ code = "SELECT";
++ break;
++ case CEC_USER_CONTROL_CODE_ENTER:
++ action = Qt::Key_Enter;
++ code = "ENTER";
++ break;
++ case CEC_USER_CONTROL_CODE_UP:
++ action = Qt::Key_Up;
++ code = "UP";
++ break;
++ case CEC_USER_CONTROL_CODE_DOWN:
++ action = Qt::Key_Down;
++ code = "DOWN";
++ break;
++ case CEC_USER_CONTROL_CODE_LEFT:
++ action = Qt::Key_Left;
++ code = "LEFT";
++ break;
++ case CEC_USER_CONTROL_CODE_LEFT_UP:
++ action = Qt::Key_Left;
++ code = "LEFT_UP";
++ break;
++ case CEC_USER_CONTROL_CODE_LEFT_DOWN:
++ action = Qt::Key_Left;
++ code = "LEFT_DOWN";
++ break;
++ case CEC_USER_CONTROL_CODE_RIGHT:
++ action = Qt::Key_Right;
++ code = "RIGHT";
++ break;
++ case CEC_USER_CONTROL_CODE_RIGHT_UP:
++ action = Qt::Key_Right;
++ code = "RIGHT_UP";
++ break;
++ case CEC_USER_CONTROL_CODE_RIGHT_DOWN:
++ action = Qt::Key_Right;
++ code = "RIGHT_DOWN";
++ break;
++ case CEC_USER_CONTROL_CODE_ROOT_MENU:
++ action = Qt::Key_M;
++ code = "ROOT_MENU";
++ break;
++ case CEC_USER_CONTROL_CODE_EXIT:
++ action = Qt::Key_Escape;
++ code = "EXIT";
++ break;
++ case CEC_USER_CONTROL_CODE_PREVIOUS_CHANNEL:
++ action = Qt::Key_H;
++ code = "PREVIOUS_CHANNEL";
++ break;
++ case CEC_USER_CONTROL_CODE_SOUND_SELECT:
++ action = Qt::Key_Plus;
++ code = "SOUND_SELECT";
++ break;
++ case CEC_USER_CONTROL_CODE_VOLUME_UP:
++ action = Qt::Key_VolumeUp;
++ code = "VOLUME_UP";
++ break;
++ case CEC_USER_CONTROL_CODE_VOLUME_DOWN:
++ action = Qt::Key_VolumeDown;
++ code = "VOLUME_DOWN";
++ break;
++ case CEC_USER_CONTROL_CODE_MUTE:
++ action = Qt::Key_VolumeMute;
++ code = "MUTE";
++ break;
++ case CEC_USER_CONTROL_CODE_PLAY:
++ action = Qt::Key_P;
++ code = "PLAY";
++ break;
++ case CEC_USER_CONTROL_CODE_PAUSE:
++ action = Qt::Key_P; // same as play
++ code = "PAUSE";
++ break;
++ case CEC_USER_CONTROL_CODE_STOP:
++ action = Qt::Key_Stop;
++ code = "STOP";
++ break;
++ case CEC_USER_CONTROL_CODE_RECORD:
++ action = Qt::Key_R;
++ code = "RECORD";
++ break;
++ case CEC_USER_CONTROL_CODE_CLEAR:
++ action = Qt::Key_Clear;
++ code = "CLEAR";
++ break;
++ case CEC_USER_CONTROL_CODE_DISPLAY_INFORMATION:
++ action = Qt::Key_I;
++ code = "DISPLAY_INFORMATION";
++ break;
++ case CEC_USER_CONTROL_CODE_PAGE_UP:
++ action = Qt::Key_PageUp;
++ code = "PAGE_UP";
++ break;
++ case CEC_USER_CONTROL_CODE_PAGE_DOWN:
++ action = Qt::Key_PageDown;
++ code = "PAGE_DOWN";
++ break;
++ case CEC_USER_CONTROL_CODE_EJECT:
++ action = Qt::Key_Eject;
++ code = "EJECT";
++ break;
++ case CEC_USER_CONTROL_CODE_FORWARD:
++ action = Qt::Key_Forward;
++ code = "FORWARD";
++ break;
++ case CEC_USER_CONTROL_CODE_BACKWARD:
++ action = Qt::Key_Back;
++ code = "BACKWARD";
++ break;
++ case CEC_USER_CONTROL_CODE_F1_BLUE:
++ action = Qt::Key_F5; // NB F1 is help and we normally map blue to F5
++ code = "F1_BLUE";
++ break;
++ case CEC_USER_CONTROL_CODE_F2_RED:
++ action = Qt::Key_F2;
++ code = "F2_RED";
++ break;
++ case CEC_USER_CONTROL_CODE_F3_GREEN:
++ action = Qt::Key_F3;
++ code = "F3_GREEN";
++ break;
++ case CEC_USER_CONTROL_CODE_F4_YELLOW:
++ action = Qt::Key_F4;
++ code = "F4_YELLOW";
++ break;
++ case CEC_USER_CONTROL_CODE_SETUP_MENU:
++ action = Qt::Key_M; // Duplicate of Root Menu
++ code = "SETUP_MENU";
++ break;
++ case CEC_USER_CONTROL_CODE_CONTENTS_MENU:
++ action = Qt::Key_M; // Duplicate of Root Menu
++ code = "CONTENTS_MENU";
++ break;
++ case CEC_USER_CONTROL_CODE_FAVORITE_MENU:
++ action = Qt::Key_M; // Duplicate of Root Menu
++ code = "FAVORITE_MENU";
++ break;
++ case CEC_USER_CONTROL_CODE_DOT:
++ action = Qt::Key_Period;
++ code = "DOT";
++ break;
++ case CEC_USER_CONTROL_CODE_NEXT_FAVORITE:
++ action = Qt::Key_Slash;
++ code = "NEXT_FAVORITE";
++ break;
++ case CEC_USER_CONTROL_CODE_INPUT_SELECT:
++ action = Qt::Key_C;
++ code = "INPUT_SELECT";
++ break;
++ case CEC_USER_CONTROL_CODE_HELP:
++ action = Qt::Key_F1;
++ code = "HELP";
++ break;
++ case CEC_USER_CONTROL_CODE_STOP_RECORD:
++ action = Qt::Key_R; // Duplicate of Record
++ code = "STOP_RECORD";
++ break;
++ case CEC_USER_CONTROL_CODE_SUB_PICTURE:
++ action = Qt::Key_V;
++ code = "SUB_PICTURE";
++ break;
++ case CEC_USER_CONTROL_CODE_ELECTRONIC_PROGRAM_GUIDE:
++ action = Qt::Key_S;
++ code = "ELECTRONIC_PROGRAM_GUIDE";
++ break;
++ case CEC_USER_CONTROL_CODE_POWER:
++ action = Qt::Key_PowerOff;
++ code = "POWER";
++ break;
++
++ // these codes have 'non-standard' Qt key mappings to ensure
++ // each code has a unique key mapping
++ case CEC_USER_CONTROL_CODE_CHANNEL_DOWN:
++ action = Qt::Key_F20; // to differentiate from Up
++ code = "CHANNEL_DOWN";
++ break;
++ case CEC_USER_CONTROL_CODE_CHANNEL_UP:
++ action = Qt::Key_F21; // to differentiate from Down
++ code = "CHANNEL_UP";
++ break;
++ case CEC_USER_CONTROL_CODE_REWIND:
++ action = Qt::Key_F22; // to differentiate from Left
++ code = "REWIND";
++ break;
++ case CEC_USER_CONTROL_CODE_FAST_FORWARD:
++ action = Qt::Key_F23; // to differentiate from Right
++ code = "FAST_FORWARD";
++ break;
++ case CEC_USER_CONTROL_CODE_ANGLE:
++ action = Qt::Key_F24;
++ code = "ANGLE";
++ break;
++ case CEC_USER_CONTROL_CODE_F5:
++ action = Qt::Key_F6; // NB!
++ code = "F5";
++ break;
++
++ // codes with no obvious MythTV action
++ case CEC_USER_CONTROL_CODE_INITIAL_CONFIGURATION:
++ code = "INITIAL_CONFIGURATION";
++ break;
++ case CEC_USER_CONTROL_CODE_PAUSE_RECORD:
++ code = "PAUSE_RECORD";
++ break;
++ case CEC_USER_CONTROL_CODE_VIDEO_ON_DEMAND:
++ code = "VIDEO_ON_DEMAND";
++ break;
++ case CEC_USER_CONTROL_CODE_TIMER_PROGRAMMING:
++ code = "TIMER_PROGRAMMING";
++ break;
++ case CEC_USER_CONTROL_CODE_UNKNOWN:
++ code = "UNKNOWN";
++ break;
++ case CEC_USER_CONTROL_CODE_DATA:
++ code = "DATA";
++ break;
++
++ // Functions aren't implemented (similar to macros?)
++ case CEC_USER_CONTROL_CODE_POWER_ON_FUNCTION:
++ code = "POWER_ON_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_PLAY_FUNCTION:
++ code = "PLAY_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_PAUSE_PLAY_FUNCTION:
++ code = "PAUSE_PLAY_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_RECORD_FUNCTION:
++ code = "RECORD_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_PAUSE_RECORD_FUNCTION:
++ code = "PAUSE_RECORD_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_STOP_FUNCTION:
++ code = "STOP_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_MUTE_FUNCTION:
++ code = "MUTE_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_RESTORE_VOLUME_FUNCTION:
++ code = "RESTORE_VOLUME_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_TUNE_FUNCTION:
++ code = "TUNE_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_SELECT_MEDIA_FUNCTION:
++ code = "SELECT_MEDIA_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_SELECT_AV_INPUT_FUNCTION:
++ code = "SELECT_AV_INPUT_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_SELECT_AUDIO_INPUT_FUNCTION:
++ code = "SELECT_AUDIO_INPUT_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_POWER_TOGGLE_FUNCTION:
++ code = "POWER_TOGGLE_FUNCTION";
++ break;
++ case CEC_USER_CONTROL_CODE_POWER_OFF_FUNCTION:
++ code = "POWER_OFF_FUNCTION";
++ break;
++ }
++
++ LOG(VB_GENERAL, LOG_DEBUG, LOC + QString("Keypress %1 %2")
++ .arg(code).arg(0 == action ? "(Not actioned)" : ""));
++
++ if (0 == action)
++ return;
++
++ GetMythUI()->ResetScreensaver();
++ QKeyEvent* ke = new QKeyEvent(QEvent::KeyPress, action, Qt::NoModifier);
++ qApp->postEvent(GetMythMainWindow(), (QEvent*)ke);
++ }
++
+ #if CEC_LIB_VERSION_MAJOR >= 2
+ int HandleAlert(const libcec_alert alert, const libcec_parameter &data)
+ {
+@@ -764,6 +1175,7 @@ void CECAdapter::Action(const QString &action)
+ gActionsReady->wakeAll();
+ }
+
++#if CEC_LIB_VERSION_MAJOR <= 3
+ static int CECLogMessageCallback(void *adapter, const cec_log_message CEC_CALLBACK_PARAM_TYPE message)
+ {
+ return ((CECAdapterPriv*)adapter)->LogMessage(message);
+@@ -778,13 +1190,37 @@ static int CECCommandCallback(void *adapter, const cec_command CEC_CALLBACK_PARA
+ {
+ return ((CECAdapterPriv*)adapter)->HandleCommand(command);
+ }
++#endif
++#if CEC_LIB_VERSION_MAJOR >= 4
++static void CECLogMessageCallback(void *adapter, const cec_log_message* message)
++{
++ ((CECAdapterPriv*)adapter)->LogMessage(message);
++}
++
++static void CECKeyPressCallback(void *adapter, const cec_keypress* keypress)
++{
++ ((CECAdapterPriv*)adapter)->HandleKeyPress(keypress);
++}
++
++static void CECCommandCallback(void *adapter, const cec_command* command)
++{
++ ((CECAdapterPriv*)adapter)->HandleCommand(command);
++}
++#endif
+
+ #if CEC_LIB_VERSION_MAJOR >= 2
++#if CEC_LIB_VERSION_MAJOR <= 3
+ static int CECAlertCallback(void *adapter, const libcec_alert alert, const libcec_parameter CEC_CALLBACK_PARAM_TYPE data)
+ {
+ return ((CECAdapterPriv*)adapter)->HandleAlert(alert, data);
+ }
+-
++#endif
++#if CEC_LIB_VERSION_MAJOR >= 4
++static void CECAlertCallback(void *adapter, const libcec_alert alert, const libcec_parameter data)
++{
++ ((CECAdapterPriv*)adapter)->HandleAlert(alert, data);
++}
++#endif
+ static void CECSourceActivatedCallback(void *adapter, const cec_logical_address address, const uint8_t activated)
+ {
+ ((CECAdapterPriv*)adapter)->HandleSourceActivated(address, activated);
Copied: mythtv/repos/community-staging-x86_64/loggingserver.patch (from rev 245260, mythtv/trunk/loggingserver.patch)
===================================================================
--- community-staging-x86_64/loggingserver.patch (rev 0)
+++ community-staging-x86_64/loggingserver.patch 2017-07-15 22:05:58 UTC (rev 245261)
@@ -0,0 +1,11 @@
+--- a/mythtv/libs/libmythbase/loggingserver.cpp 2017-02-13 21:15:14.150339977 +0100
++++ b/mythtv/libs/libmythbase/loggingserver.cpp 2017-02-13 21:15:08.738490693 +0100
+@@ -722,7 +722,7 @@
+ if (!item)
+ continue;
+
+- if (item->message()[0] != '\0')
++ if (item->message()[0] != QChar('\0'))
+ {
+ qLock.unlock();
+ bool logged = m_logger->logqmsg(*query, item);
Copied: mythtv/repos/community-staging-x86_64/mythbackend.service (from rev 245260, mythtv/trunk/mythbackend.service)
===================================================================
--- community-staging-x86_64/mythbackend.service (rev 0)
+++ community-staging-x86_64/mythbackend.service 2017-07-15 22:05:58 UTC (rev 245261)
@@ -0,0 +1,16 @@
+[Unit]
+Description=MythTV Backend
+Wants=network-online.target
+After=network.target mysqld.service
+
+[Service]
+Type=simple
+Environment=HOME=/var/lib/mythtv
+User=mythtv
+ExecStart=/usr/bin/mythbackend --logpath /var/log/mythtv
+ExecStop=/usr/bin/mythshutdown --setscheduledwakeup
+#ExecStop=/usr/bin/mythshutdown --shutdown
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
Copied: mythtv/repos/community-staging-x86_64/mythtv.install (from rev 245260, mythtv/trunk/mythtv.install)
===================================================================
--- community-staging-x86_64/mythtv.install (rev 0)
+++ community-staging-x86_64/mythtv.install 2017-07-15 22:05:58 UTC (rev 245261)
@@ -0,0 +1,20 @@
+post_upgrade() {
+ if ! getent passwd mythtv &>/dev/null; then
+ getent group mythtv &>/dev/null || groupadd -r mythtv >/dev/null
+ useradd -rmd /var/lib/mythtv -g mythtv -G video,audio,optical -s /bin/bash mythtv >/dev/null
+ fi
+
+ echo -e "You may need to load time zone tables in MySQL.\nSee http://www.mythtv.org/wiki/MySQL_Time_Zone_Tables"
+}
+
+post_install() {
+ echo -e "For installation information, visit:\nhttps://wiki.archlinux.org/index.php/MythTV"
+
+ post_upgrade
+}
+
+post_remove() {
+ echo -e "The MythTV database was not removed. To remove it, run:\n mysql -u root -e 'drop database mythconverg;'"
+ [ -d var/lib/mythtv ] && echo "The MythTV home directory /var/lib/mythtv can also be removed."
+ echo -e "The 'mythtv' user and group can also be removed."
+}
More information about the arch-commits
mailing list