mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-19 00:21:40 +00:00
alarm/kodi-rbp to 17.0-1 (#1447)
This commit is contained in:
parent
6f60d8fdbe
commit
00ab15bb55
8 changed files with 121 additions and 2398 deletions
|
@ -1,839 +0,0 @@
|
||||||
From cc3ae0339faf2b669bee20cb360c526410910f42 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lars Op den Kamp <lars@opdenkamp.eu>
|
|
||||||
Date: Fri, 11 Nov 2016 10:09:36 +0100
|
|
||||||
Subject: [PATCH 1/4] [cec] bump to libCEC 4.0.0
|
|
||||||
|
|
||||||
---
|
|
||||||
.../resource.language.en_gb/resources/strings.po | 5 -
|
|
||||||
configure.ac | 4 +-
|
|
||||||
project/BuildDependencies/scripts/0_package.list | 2 +-
|
|
||||||
project/cmake/modules/FindCEC.cmake | 2 +-
|
|
||||||
system/peripherals.xml | 1 -
|
|
||||||
tools/depends/target/Makefile | 5 +-
|
|
||||||
tools/depends/target/libcec/Makefile | 4 +-
|
|
||||||
tools/depends/target/p8-platform/Makefile | 34 ++++
|
|
||||||
xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 192 +++++++++------------
|
|
||||||
xbmc/peripherals/devices/PeripheralCecAdapter.h | 17 +-
|
|
||||||
10 files changed, 138 insertions(+), 128 deletions(-)
|
|
||||||
create mode 100644 tools/depends/target/p8-platform/Makefile
|
|
||||||
|
|
||||||
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
|
|
||||||
index e3f8a37..e482196 100644
|
|
||||||
--- a/addons/resource.language.en_gb/resources/strings.po
|
|
||||||
+++ b/addons/resource.language.en_gb/resources/strings.po
|
|
||||||
@@ -16376,11 +16376,6 @@ msgctxt "#36021"
|
|
||||||
msgid "Physical address (overrules HDMI port)"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
-#: system/peripherals.xml
|
|
||||||
-msgctxt "#36022"
|
|
||||||
-msgid "COM port (leave empty unless needed)"
|
|
||||||
-msgstr ""
|
|
||||||
-
|
|
||||||
#: xbmc/peripherals/devices/peripheralcecadapter.cpp
|
|
||||||
msgctxt "#36023"
|
|
||||||
msgid "Configuration updated"
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index e61d4ae..34fe643 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -1453,9 +1453,9 @@ 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
|
|
||||||
if test "x$use_libcec" != "xauto"; then
|
|
||||||
- PKG_CHECK_MODULES([CEC],[libcec >= 3.0.0],,[use_libcec="no";AC_MSG_ERROR($libcec_disabled)])
|
|
||||||
+ PKG_CHECK_MODULES([CEC],[libcec >= 4.0.0],,[use_libcec="no";AC_MSG_ERROR($libcec_disabled)])
|
|
||||||
else
|
|
||||||
- PKG_CHECK_MODULES([CEC],[libcec >= 3.0.0],,[use_libcec="no";AC_MSG_RESULT($libcec_disabled)])
|
|
||||||
+ PKG_CHECK_MODULES([CEC],[libcec >= 4.0.0],,[use_libcec="no";AC_MSG_RESULT($libcec_disabled)])
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$use_libcec" != "xno"; then
|
|
||||||
diff --git a/project/BuildDependencies/scripts/0_package.list b/project/BuildDependencies/scripts/0_package.list
|
|
||||||
index 9a5bccb..7b6ec1a 100644
|
|
||||||
--- a/project/BuildDependencies/scripts/0_package.list
|
|
||||||
+++ b/project/BuildDependencies/scripts/0_package.list
|
|
||||||
@@ -19,7 +19,7 @@ jsonschemabuilder-1.0.0-win32-3.7z
|
|
||||||
libass-0.12.1-win32.7z
|
|
||||||
libbluray-0.8.1-win32-vc120.7z
|
|
||||||
libcdio-0.83-win32-2.7z
|
|
||||||
-libcec-3.0.0-win32-2.7z
|
|
||||||
+libcec-4.0.0-win32-vc140.7z
|
|
||||||
libexpat_2.0.1-win32.7z
|
|
||||||
libflac-1.2.1-win32.7z
|
|
||||||
libfribidi-0.19.2-win32.7z
|
|
||||||
diff --git a/system/peripherals.xml b/system/peripherals.xml
|
|
||||||
index f939c0b..58a9d24 100644
|
|
||||||
--- a/system/peripherals.xml
|
|
||||||
+++ b/system/peripherals.xml
|
|
||||||
@@ -24,7 +24,6 @@
|
|
||||||
<setting key="connected_device" type="enum" label="36019" value="36037" lvalues="36037|36038" order="12" />
|
|
||||||
<setting key="cec_hdmi_port" type="int" value="1" min="1" max="15" label="36015" order="13" />
|
|
||||||
<setting key="physical_address" type="string" label="36021" value="0" order="14" />
|
|
||||||
- <setting key="port" type="string" value="" label="36022" order="15" />
|
|
||||||
|
|
||||||
<setting key="tv_vendor" type="int" value="0" configurable="0" />
|
|
||||||
<setting key="device_name" type="string" value="Kodi" configurable="0" />
|
|
||||||
diff --git a/tools/depends/target/Makefile b/tools/depends/target/Makefile
|
|
||||||
index 9bca188..82b378d 100644
|
|
||||||
--- a/tools/depends/target/Makefile
|
|
||||||
+++ b/tools/depends/target/Makefile
|
|
||||||
@@ -15,7 +15,7 @@
|
|
||||||
python26 libshairplay \
|
|
||||||
libplist libcec libbluray boost tinyxml dummy-libxbmc \
|
|
||||||
libamplayer libssh taglib libusb libnfs \
|
|
||||||
- pythonmodule-pil libxslt ffmpeg platform crossguid libdcadec giflib
|
|
||||||
+ pythonmodule-pil libxslt ffmpeg platform crossguid libdcadec giflib p8-platform
|
|
||||||
|
|
||||||
FFMPEG_DEPENDS = gnutls libdcadec
|
|
||||||
|
|
||||||
@@ -101,7 +101,8 @@ pythonmodule-setuptools: python27
|
|
||||||
libsdl2: $(LINUX_SYSTEM_LIBS)
|
|
||||||
libxslt: libgcrypt
|
|
||||||
ffmpeg: $(ICONV) $(ZLIB) bzip2 libvorbis $(FFMPEG_DEPENDS)
|
|
||||||
-libcec: platform
|
|
||||||
+platform: p8-platform
|
|
||||||
+libcec: p8-platform
|
|
||||||
crossguid: $(CROSSGUID_DEPS)
|
|
||||||
|
|
||||||
.installed-$(PLATFORM): $(DEPENDS)
|
|
||||||
diff --git a/tools/depends/target/libcec/Makefile b/tools/depends/target/libcec/Makefile
|
|
||||||
index f54af9e..c75b300 100644
|
|
||||||
--- a/tools/depends/target/libcec/Makefile
|
|
||||||
+++ b/tools/depends/target/libcec/Makefile
|
|
||||||
@@ -3,12 +3,12 @@ DEPS= ../../Makefile.include Makefile
|
|
||||||
|
|
||||||
# lib name, version
|
|
||||||
LIBNAME=libcec
|
|
||||||
-VERSION_MAJOR=3
|
|
||||||
+VERSION_MAJOR=4
|
|
||||||
VERSION_MINOR=0
|
|
||||||
VERSION_PATCH=0
|
|
||||||
|
|
||||||
VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)
|
|
||||||
-SOURCE=$(LIBNAME)-$(VERSION)-6
|
|
||||||
+SOURCE=$(LIBNAME)-$(VERSION)
|
|
||||||
ARCHIVE=$(SOURCE).tar.gz
|
|
||||||
|
|
||||||
LIBDYLIB=$(PLATFORM)/build/src/$(LIBNAME).la
|
|
||||||
diff --git a/tools/depends/target/p8-platform/Makefile b/tools/depends/target/p8-platform/Makefile
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..d5918d7
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/tools/depends/target/p8-platform/Makefile
|
|
||||||
@@ -0,0 +1,34 @@
|
|
||||||
+include ../../Makefile.include
|
|
||||||
+DEPS= ../../Makefile.include Makefile
|
|
||||||
+
|
|
||||||
+# lib name, version
|
|
||||||
+LIBNAME=p8-platform
|
|
||||||
+VERSION=2.1.0.1
|
|
||||||
+SOURCE=$(LIBNAME)-$(VERSION)
|
|
||||||
+ARCHIVE=$(SOURCE).tar.gz
|
|
||||||
+
|
|
||||||
+LIBDYLIB=$(PLATFORM)/build/src/$(LIBNAME).a
|
|
||||||
+
|
|
||||||
+all: .installed-$(PLATFORM)
|
|
||||||
+
|
|
||||||
+$(TARBALLS_LOCATION)/$(ARCHIVE):
|
|
||||||
+ cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
|
|
||||||
+
|
|
||||||
+$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
|
|
||||||
+ rm -rf $(PLATFORM); mkdir -p $(PLATFORM)/build
|
|
||||||
+ cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
|
|
||||||
+ cd $(PLATFORM)/build; $(CMAKE) -DBUILD_SHARED_LIBS=0 -DCMAKE_INSTALL_LIBDIR=$(PREFIX)/lib ..
|
|
||||||
+
|
|
||||||
+$(LIBDYLIB): $(PLATFORM)
|
|
||||||
+ $(MAKE) -C $(PLATFORM)/build
|
|
||||||
+
|
|
||||||
+.installed-$(PLATFORM): $(LIBDYLIB)
|
|
||||||
+ $(MAKE) -C $(PLATFORM)/build install
|
|
||||||
+ touch $@
|
|
||||||
+
|
|
||||||
+clean:
|
|
||||||
+ rm -rf $(PLATFORM) .installed-$(PLATFORM)
|
|
||||||
+
|
|
||||||
+distclean::
|
|
||||||
+ rm -rf $(PLATFORM) .installed-$(PLATFORM)
|
|
||||||
+
|
|
||||||
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
|
||||||
index e6bcbce..a71dc4b 100644
|
|
||||||
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
|
||||||
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
|
||||||
@@ -43,7 +43,7 @@ using namespace PERIPHERALS;
|
|
||||||
using namespace ANNOUNCEMENT;
|
|
||||||
using namespace CEC;
|
|
||||||
|
|
||||||
-#define CEC_LIB_SUPPORTED_VERSION LIBCEC_VERSION_TO_UINT(3, 0, 0)
|
|
||||||
+#define CEC_LIB_SUPPORTED_VERSION LIBCEC_VERSION_TO_UINT(4, 0, 0)
|
|
||||||
|
|
||||||
/* time in seconds to ignore standby commands from devices after the screensaver has been activated */
|
|
||||||
#define SCREENSAVER_TIMEOUT 20
|
|
||||||
@@ -119,25 +119,30 @@ void CPeripheralCecAdapter::ResetMembers(void)
|
|
||||||
m_dll->CECDestroy(m_cecAdapter);
|
|
||||||
m_cecAdapter = NULL;
|
|
||||||
delete m_dll;
|
|
||||||
- m_dll = NULL;
|
|
||||||
- m_bStarted = false;
|
|
||||||
- m_bHasButton = false;
|
|
||||||
- m_bIsReady = false;
|
|
||||||
- m_bHasConnectedAudioSystem = false;
|
|
||||||
- m_strMenuLanguage = "???";
|
|
||||||
- m_lastKeypress = 0;
|
|
||||||
- m_lastChange = VOLUME_CHANGE_NONE;
|
|
||||||
- m_iExitCode = EXITCODE_QUIT;
|
|
||||||
- m_bIsMuted = false; // TODO fetch the correct initial value when system audiostatus is implemented in libCEC
|
|
||||||
- m_bGoingToStandby = false;
|
|
||||||
- m_bIsRunning = false;
|
|
||||||
- m_bDeviceRemoved = false;
|
|
||||||
- m_bActiveSourcePending = false;
|
|
||||||
- m_bStandbyPending = false;
|
|
||||||
+ m_dll = NULL;
|
|
||||||
+ m_bStarted = false;
|
|
||||||
+ m_bHasButton = false;
|
|
||||||
+ m_bIsReady = false;
|
|
||||||
+ m_bHasConnectedAudioSystem = false;
|
|
||||||
+ m_strMenuLanguage = "???";
|
|
||||||
+ m_lastKeypress = 0;
|
|
||||||
+ m_lastChange = VOLUME_CHANGE_NONE;
|
|
||||||
+ m_iExitCode = EXITCODE_QUIT;
|
|
||||||
+ m_bIsMuted = false; //! @todo fetch the correct initial value when system audiostatus is implemented in libCEC
|
|
||||||
+ m_bGoingToStandby = false;
|
|
||||||
+ m_bIsRunning = false;
|
|
||||||
+ m_bDeviceRemoved = false;
|
|
||||||
+ m_bActiveSourcePending = false;
|
|
||||||
+ m_bStandbyPending = false;
|
|
||||||
m_bActiveSourceBeforeStandby = false;
|
|
||||||
- m_bOnPlayReceived = false;
|
|
||||||
- m_bPlaybackPaused = false;
|
|
||||||
- m_queryThread = NULL;
|
|
||||||
+ m_bOnPlayReceived = false;
|
|
||||||
+ m_bPlaybackPaused = false;
|
|
||||||
+ m_queryThread = NULL;
|
|
||||||
+ m_bPowerOnScreensaver = false;
|
|
||||||
+ m_bUseTVMenuLanguage = false;
|
|
||||||
+ m_bSendInactiveSource = false;
|
|
||||||
+ m_bPowerOffScreensaver = false;
|
|
||||||
+ m_bShutdownOnStandby = false;
|
|
||||||
|
|
||||||
m_currentButton.iButton = 0;
|
|
||||||
m_currentButton.iDuration = 0;
|
|
||||||
@@ -166,8 +171,8 @@ void CPeripheralCecAdapter::Announce(AnnouncementFlag flag, const char *sender,
|
|
||||||
if (bIgnoreDeactivate)
|
|
||||||
CLog::Log(LOGDEBUG, "%s - ignoring OnScreensaverDeactivated for power action", __FUNCTION__);
|
|
||||||
}
|
|
||||||
- if (m_configuration.bPowerOnScreensaver == 1 && !bIgnoreDeactivate &&
|
|
||||||
- m_configuration.bActivateSource == 1)
|
|
||||||
+ if (m_bPowerOnScreensaver && !bIgnoreDeactivate &&
|
|
||||||
+ m_configuration.bActivateSource)
|
|
||||||
{
|
|
||||||
ActivateSource();
|
|
||||||
}
|
|
||||||
@@ -175,7 +180,7 @@ void CPeripheralCecAdapter::Announce(AnnouncementFlag flag, const char *sender,
|
|
||||||
else if (flag == GUI && !strcmp(sender, "xbmc") && !strcmp(message, "OnScreensaverActivated") && m_bIsReady)
|
|
||||||
{
|
|
||||||
// Don't put devices to standby if application is currently playing
|
|
||||||
- if ((!g_application.m_pPlayer->IsPlaying() && !g_application.m_pPlayer->IsPaused()) && m_configuration.bPowerOffScreensaver == 1)
|
|
||||||
+ if (!g_application.m_pPlayer->IsPlaying() && m_bPowerOffScreensaver)
|
|
||||||
{
|
|
||||||
// only power off when we're the active source
|
|
||||||
if (m_cecAdapter->IsLibCECActiveSource())
|
|
||||||
@@ -241,14 +246,14 @@ bool CPeripheralCecAdapter::InitialiseFeature(const PeripheralFeature feature)
|
|
||||||
|
|
||||||
SetConfigurationFromSettings();
|
|
||||||
m_callbacks.Clear();
|
|
||||||
- m_callbacks.CBCecLogMessage = &CecLogMessage;
|
|
||||||
- m_callbacks.CBCecKeyPress = &CecKeyPress;
|
|
||||||
- m_callbacks.CBCecCommand = &CecCommand;
|
|
||||||
- m_callbacks.CBCecConfigurationChanged = &CecConfiguration;
|
|
||||||
- m_callbacks.CBCecAlert = &CecAlert;
|
|
||||||
- m_callbacks.CBCecSourceActivated = &CecSourceActivated;
|
|
||||||
- m_configuration.callbackParam = this;
|
|
||||||
- m_configuration.callbacks = &m_callbacks;
|
|
||||||
+ m_callbacks.logMessage = &CecLogMessage;
|
|
||||||
+ m_callbacks.keyPress = &CecKeyPress;
|
|
||||||
+ m_callbacks.commandReceived = &CecCommand;
|
|
||||||
+ m_callbacks.configurationChanged = &CecConfiguration;
|
|
||||||
+ m_callbacks.alert = &CecAlert;
|
|
||||||
+ m_callbacks.sourceActivated = &CecSourceActivated;
|
|
||||||
+ m_configuration.callbackParam = this;
|
|
||||||
+ m_configuration.callbacks = &m_callbacks;
|
|
||||||
|
|
||||||
m_dll = new DllLibCEC;
|
|
||||||
if (m_dll->Load() && m_dll->IsLoaded())
|
|
||||||
@@ -414,7 +419,7 @@ void CPeripheralCecAdapter::Process(void)
|
|
||||||
m_standbySent = CDateTime::GetCurrentDateTime();
|
|
||||||
m_cecAdapter->StandbyDevices();
|
|
||||||
}
|
|
||||||
- else if (m_configuration.bSendInactiveSource == 1)
|
|
||||||
+ else if (m_bSendInactiveSource)
|
|
||||||
{
|
|
||||||
CLog::Log(LOGDEBUG, "%s - sending inactive source commands", __FUNCTION__);
|
|
||||||
m_cecAdapter->SetInactiveView();
|
|
||||||
@@ -614,43 +619,43 @@ void CPeripheralCecAdapter::SetMenuLanguage(const char *strLanguage)
|
|
||||||
CLog::Log(LOGWARNING, "%s - TV menu language set to unknown value '%s'", __FUNCTION__, strLanguage);
|
|
||||||
}
|
|
||||||
|
|
||||||
-int CPeripheralCecAdapter::CecCommand(void *cbParam, const cec_command command)
|
|
||||||
+void CPeripheralCecAdapter::CecCommand(void *cbParam, const cec_command* command)
|
|
||||||
{
|
|
||||||
- CPeripheralCecAdapter *adapter = (CPeripheralCecAdapter *)cbParam;
|
|
||||||
+ CPeripheralCecAdapter *adapter = static_cast<CPeripheralCecAdapter *>(cbParam);
|
|
||||||
if (!adapter)
|
|
||||||
- return 0;
|
|
||||||
+ return;
|
|
||||||
|
|
||||||
if (adapter->m_bIsReady)
|
|
||||||
{
|
|
||||||
- switch (command.opcode)
|
|
||||||
+ switch (command->opcode)
|
|
||||||
{
|
|
||||||
case CEC_OPCODE_STANDBY:
|
|
||||||
/* a device was put in standby mode */
|
|
||||||
- if (command.initiator == CECDEVICE_TV &&
|
|
||||||
- (adapter->m_configuration.bPowerOffOnStandby == 1 || adapter->m_configuration.bShutdownOnStandby == 1) &&
|
|
||||||
+ if (command->initiator == CECDEVICE_TV &&
|
|
||||||
+ (adapter->m_configuration.bPowerOffOnStandby == 1 || adapter->m_bShutdownOnStandby) &&
|
|
||||||
(!adapter->m_standbySent.IsValid() || CDateTime::GetCurrentDateTime() - adapter->m_standbySent > CDateTimeSpan(0, 0, 0, SCREENSAVER_TIMEOUT)))
|
|
||||||
{
|
|
||||||
adapter->m_bStarted = false;
|
|
||||||
if (adapter->m_configuration.bPowerOffOnStandby == 1)
|
|
||||||
g_application.ExecuteXBMCAction("Suspend");
|
|
||||||
- else if (adapter->m_configuration.bShutdownOnStandby == 1)
|
|
||||||
+ else if (adapter->m_bShutdownOnStandby)
|
|
||||||
g_application.ExecuteXBMCAction("Shutdown");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case CEC_OPCODE_SET_MENU_LANGUAGE:
|
|
||||||
- if (adapter->m_configuration.bUseTVMenuLanguage == 1 && command.initiator == CECDEVICE_TV && command.parameters.size == 3)
|
|
||||||
+ if (adapter->m_bUseTVMenuLanguage == 1 && command->initiator == CECDEVICE_TV && command->parameters.size == 3)
|
|
||||||
{
|
|
||||||
char strNewLanguage[4];
|
|
||||||
for (int iPtr = 0; iPtr < 3; iPtr++)
|
|
||||||
- strNewLanguage[iPtr] = command.parameters[iPtr];
|
|
||||||
+ strNewLanguage[iPtr] = command->parameters[iPtr];
|
|
||||||
strNewLanguage[3] = 0;
|
|
||||||
adapter->SetMenuLanguage(strNewLanguage);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case CEC_OPCODE_DECK_CONTROL:
|
|
||||||
- if (command.initiator == CECDEVICE_TV &&
|
|
||||||
- command.parameters.size == 1 &&
|
|
||||||
- command.parameters[0] == CEC_DECK_CONTROL_MODE_STOP)
|
|
||||||
+ if (command->initiator == CECDEVICE_TV &&
|
|
||||||
+ command->parameters.size == 1 &&
|
|
||||||
+ command->parameters[0] == CEC_DECK_CONTROL_MODE_STOP)
|
|
||||||
{
|
|
||||||
cec_keypress key;
|
|
||||||
key.duration = 500;
|
|
||||||
@@ -659,17 +664,17 @@ int CPeripheralCecAdapter::CecCommand(void *cbParam, const cec_command command)
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case CEC_OPCODE_PLAY:
|
|
||||||
- if (command.initiator == CECDEVICE_TV &&
|
|
||||||
- command.parameters.size == 1)
|
|
||||||
+ if (command->initiator == CECDEVICE_TV &&
|
|
||||||
+ command->parameters.size == 1)
|
|
||||||
{
|
|
||||||
- if (command.parameters[0] == CEC_PLAY_MODE_PLAY_FORWARD)
|
|
||||||
+ if (command->parameters[0] == CEC_PLAY_MODE_PLAY_FORWARD)
|
|
||||||
{
|
|
||||||
cec_keypress key;
|
|
||||||
key.duration = 500;
|
|
||||||
key.keycode = CEC_USER_CONTROL_CODE_PLAY;
|
|
||||||
adapter->PushCecKeypress(key);
|
|
||||||
}
|
|
||||||
- else if (command.parameters[0] == CEC_PLAY_MODE_PLAY_STILL)
|
|
||||||
+ else if (command->parameters[0] == CEC_PLAY_MODE_PLAY_STILL)
|
|
||||||
{
|
|
||||||
cec_keypress key;
|
|
||||||
key.duration = 500;
|
|
||||||
@@ -682,25 +687,23 @@ int CPeripheralCecAdapter::CecCommand(void *cbParam, const cec_command command)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
-int CPeripheralCecAdapter::CecConfiguration(void *cbParam, const libcec_configuration config)
|
|
||||||
+void CPeripheralCecAdapter::CecConfiguration(void *cbParam, const libcec_configuration* config)
|
|
||||||
{
|
|
||||||
- CPeripheralCecAdapter *adapter = (CPeripheralCecAdapter *)cbParam;
|
|
||||||
+ CPeripheralCecAdapter *adapter = static_cast<CPeripheralCecAdapter *>(cbParam);
|
|
||||||
if (!adapter)
|
|
||||||
- return 0;
|
|
||||||
+ return;
|
|
||||||
|
|
||||||
CSingleLock lock(adapter->m_critSection);
|
|
||||||
- adapter->SetConfigurationFromLibCEC(config);
|
|
||||||
- return 1;
|
|
||||||
+ adapter->SetConfigurationFromLibCEC(*config);
|
|
||||||
}
|
|
||||||
|
|
||||||
-int CPeripheralCecAdapter::CecAlert(void *cbParam, const libcec_alert alert, const libcec_parameter data)
|
|
||||||
+void CPeripheralCecAdapter::CecAlert(void *cbParam, const libcec_alert alert, const libcec_parameter data)
|
|
||||||
{
|
|
||||||
- CPeripheralCecAdapter *adapter = (CPeripheralCecAdapter *)cbParam;
|
|
||||||
+ CPeripheralCecAdapter *adapter = static_cast<CPeripheralCecAdapter *>(cbParam);
|
|
||||||
if (!adapter)
|
|
||||||
- return 0;
|
|
||||||
+ return;
|
|
||||||
|
|
||||||
bool bReopenConnection(false);
|
|
||||||
int iAlertString(0);
|
|
||||||
@@ -743,18 +746,13 @@ int CPeripheralCecAdapter::CecAlert(void *cbParam, const libcec_alert alert, con
|
|
||||||
|
|
||||||
if (bReopenConnection)
|
|
||||||
adapter->ReopenConnection();
|
|
||||||
-
|
|
||||||
- return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
-int CPeripheralCecAdapter::CecKeyPress(void *cbParam, const cec_keypress key)
|
|
||||||
+void CPeripheralCecAdapter::CecKeyPress(void *cbParam, const cec_keypress* key)
|
|
||||||
{
|
|
||||||
- CPeripheralCecAdapter *adapter = (CPeripheralCecAdapter *)cbParam;
|
|
||||||
- if (!adapter)
|
|
||||||
- return 0;
|
|
||||||
-
|
|
||||||
- adapter->PushCecKeypress(key);
|
|
||||||
- return 1;
|
|
||||||
+ CPeripheralCecAdapter *adapter = static_cast<CPeripheralCecAdapter *>(cbParam);
|
|
||||||
+ if (!!adapter)
|
|
||||||
+ adapter->PushCecKeypress(*key);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CPeripheralCecAdapter::GetNextKey(void)
|
|
||||||
@@ -1154,7 +1152,7 @@ void CPeripheralCecAdapter::OnSettingChanged(const std::string &strChangedSettin
|
|
||||||
|
|
||||||
void CPeripheralCecAdapter::CecSourceActivated(void *cbParam, const CEC::cec_logical_address address, const uint8_t activated)
|
|
||||||
{
|
|
||||||
- CPeripheralCecAdapter *adapter = (CPeripheralCecAdapter *)cbParam;
|
|
||||||
+ CPeripheralCecAdapter *adapter = static_cast<CPeripheralCecAdapter *>(cbParam);
|
|
||||||
if (!adapter)
|
|
||||||
return;
|
|
||||||
|
|
||||||
@@ -1196,14 +1194,14 @@ void CPeripheralCecAdapter::CecSourceActivated(void *cbParam, const CEC::cec_log
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-int CPeripheralCecAdapter::CecLogMessage(void *cbParam, const cec_log_message message)
|
|
||||||
+void CPeripheralCecAdapter::CecLogMessage(void *cbParam, const cec_log_message* message)
|
|
||||||
{
|
|
||||||
- CPeripheralCecAdapter *adapter = (CPeripheralCecAdapter *)cbParam;
|
|
||||||
+ CPeripheralCecAdapter *adapter = static_cast<CPeripheralCecAdapter *>(cbParam);
|
|
||||||
if (!adapter)
|
|
||||||
- return 0;
|
|
||||||
+ return;
|
|
||||||
|
|
||||||
int iLevel = -1;
|
|
||||||
- switch (message.level)
|
|
||||||
+ switch (message->level)
|
|
||||||
{
|
|
||||||
case CEC_LOG_ERROR:
|
|
||||||
iLevel = LOGERROR;
|
|
||||||
@@ -1223,9 +1221,7 @@ int CPeripheralCecAdapter::CecLogMessage(void *cbParam, const cec_log_message me
|
|
||||||
}
|
|
||||||
|
|
||||||
if (iLevel >= CEC_LOG_NOTICE || (iLevel >= 0 && CLog::IsLogLevelLogged(LOGDEBUG) && g_advancedSettings.CanLogComponent(LOGCEC)))
|
|
||||||
- CLog::Log(iLevel, "%s - %s", __FUNCTION__, message.message);
|
|
||||||
-
|
|
||||||
- return 1;
|
|
||||||
+ CLog::Log(iLevel, "%s - %s", __FUNCTION__, message->message);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CPeripheralCecAdapter::SetConfigurationFromLibCEC(const CEC::libcec_configuration &config)
|
|
||||||
@@ -1270,35 +1266,18 @@ void CPeripheralCecAdapter::SetConfigurationFromLibCEC(const CEC::libcec_configu
|
|
||||||
bChanged |= WriteLogicalAddresses(config.powerOffDevices, "standby_devices", "standby_devices_advanced");
|
|
||||||
|
|
||||||
// set the boolean settings
|
|
||||||
- m_configuration.bUseTVMenuLanguage = config.bUseTVMenuLanguage;
|
|
||||||
- bChanged |= SetSetting("use_tv_menu_language", m_configuration.bUseTVMenuLanguage == 1);
|
|
||||||
-
|
|
||||||
m_configuration.bActivateSource = config.bActivateSource;
|
|
||||||
bChanged |= SetSetting("activate_source", m_configuration.bActivateSource == 1);
|
|
||||||
|
|
||||||
- m_configuration.bPowerOffScreensaver = config.bPowerOffScreensaver;
|
|
||||||
- bChanged |= SetSetting("cec_standby_screensaver", m_configuration.bPowerOffScreensaver == 1);
|
|
||||||
-
|
|
||||||
- m_configuration.bPowerOnScreensaver = config.bPowerOnScreensaver;
|
|
||||||
- bChanged |= SetSetting("cec_wake_screensaver", m_configuration.bPowerOnScreensaver == 1);
|
|
||||||
-
|
|
||||||
m_configuration.bPowerOffOnStandby = config.bPowerOffOnStandby;
|
|
||||||
|
|
||||||
- m_configuration.bSendInactiveSource = config.bSendInactiveSource;
|
|
||||||
- bChanged |= SetSetting("send_inactive_source", m_configuration.bSendInactiveSource == 1);
|
|
||||||
-
|
|
||||||
m_configuration.iFirmwareVersion = config.iFirmwareVersion;
|
|
||||||
- m_configuration.bShutdownOnStandby = config.bShutdownOnStandby;
|
|
||||||
|
|
||||||
memcpy(m_configuration.strDeviceLanguage, config.strDeviceLanguage, 3);
|
|
||||||
m_configuration.iFirmwareBuildDate = config.iFirmwareBuildDate;
|
|
||||||
|
|
||||||
SetVersionInfo(m_configuration);
|
|
||||||
|
|
||||||
- bChanged |= SetSetting("standby_pc_on_tv_standby",
|
|
||||||
- m_configuration.bPowerOffOnStandby == 1 ? 13011 :
|
|
||||||
- m_configuration.bShutdownOnStandby == 1 ? 13005 : 36028);
|
|
||||||
-
|
|
||||||
if (bChanged)
|
|
||||||
CLog::Log(LOGDEBUG, "SetConfigurationFromLibCEC - settings updated by libCEC");
|
|
||||||
}
|
|
||||||
@@ -1306,7 +1285,7 @@ void CPeripheralCecAdapter::SetConfigurationFromLibCEC(const CEC::libcec_configu
|
|
||||||
void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
|
|
||||||
{
|
|
||||||
// client version matches the version of libCEC that we originally used the API from
|
|
||||||
- m_configuration.clientVersion = LIBCEC_VERSION_TO_UINT(3, 0, 0);
|
|
||||||
+ m_configuration.clientVersion = LIBCEC_VERSION_TO_UINT(4, 0, 0);
|
|
||||||
|
|
||||||
// device name 'XBMC'
|
|
||||||
snprintf(m_configuration.strDeviceName, 13, "%s", GetSettingString("device_name").c_str());
|
|
||||||
@@ -1373,16 +1352,16 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
|
|
||||||
ReadLogicalAddresses(GetSettingInt("standby_devices"), m_configuration.powerOffDevices);
|
|
||||||
|
|
||||||
// read the boolean settings
|
|
||||||
- m_configuration.bUseTVMenuLanguage = GetSettingBool("use_tv_menu_language") ? 1 : 0;
|
|
||||||
+ m_bUseTVMenuLanguage = GetSettingBool("use_tv_menu_language") ? 1 : 0;
|
|
||||||
m_configuration.bActivateSource = GetSettingBool("activate_source") ? 1 : 0;
|
|
||||||
- m_configuration.bPowerOffScreensaver = GetSettingBool("cec_standby_screensaver") ? 1 : 0;
|
|
||||||
- m_configuration.bPowerOnScreensaver = GetSettingBool("cec_wake_screensaver") ? 1 : 0;
|
|
||||||
- m_configuration.bSendInactiveSource = GetSettingBool("send_inactive_source") ? 1 : 0;
|
|
||||||
+ m_bPowerOffScreensaver = GetSettingBool("cec_standby_screensaver") ? 1 : 0;
|
|
||||||
+ m_bPowerOnScreensaver = GetSettingBool("cec_wake_screensaver") ? 1 : 0;
|
|
||||||
+ m_bSendInactiveSource = GetSettingBool("send_inactive_source") ? 1 : 0;
|
|
||||||
|
|
||||||
// read the mutually exclusive boolean settings
|
|
||||||
int iStandbyAction(GetSettingInt("standby_pc_on_tv_standby"));
|
|
||||||
m_configuration.bPowerOffOnStandby = iStandbyAction == 13011 ? 1 : 0;
|
|
||||||
- m_configuration.bShutdownOnStandby = iStandbyAction == 13005 ? 1 : 0;
|
|
||||||
+ m_bShutdownOnStandby = iStandbyAction == 13005;
|
|
||||||
|
|
||||||
#if defined(CEC_DOUBLE_TAP_TIMEOUT_MS_OLD)
|
|
||||||
// double tap prevention timeout in ms. libCEC uses 50ms units for this in 2.2.0, so divide by 50
|
|
||||||
@@ -1529,14 +1508,11 @@ bool CPeripheralCecAdapterUpdateThread::WaitReady(void)
|
|
||||||
void CPeripheralCecAdapterUpdateThread::UpdateMenuLanguage(void)
|
|
||||||
{
|
|
||||||
// request the menu language of the TV
|
|
||||||
- if (m_configuration.bUseTVMenuLanguage == 1)
|
|
||||||
+ if (m_adapter->m_bUseTVMenuLanguage == 1)
|
|
||||||
{
|
|
||||||
CLog::Log(LOGDEBUG, "%s - requesting the menu language of the TV", __FUNCTION__);
|
|
||||||
- cec_menu_language language;
|
|
||||||
- if (m_adapter->m_cecAdapter->GetDeviceMenuLanguage(CECDEVICE_TV, &language))
|
|
||||||
- m_adapter->SetMenuLanguage(language.language);
|
|
||||||
- else
|
|
||||||
- CLog::Log(LOGDEBUG, "%s - unknown menu language", __FUNCTION__);
|
|
||||||
+ std::string language(m_adapter->m_cecAdapter->GetDeviceMenuLanguage(CECDEVICE_TV));
|
|
||||||
+ m_adapter->SetMenuLanguage(language.c_str());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@@ -1553,9 +1529,9 @@ std::string CPeripheralCecAdapterUpdateThread::UpdateAudioSystemStatus(void)
|
|
||||||
if (m_adapter->m_cecAdapter->IsActiveDeviceType(CEC_DEVICE_TYPE_AUDIO_SYSTEM))
|
|
||||||
{
|
|
||||||
// request the OSD name of the amp
|
|
||||||
- cec_osd_name ampName = m_adapter->m_cecAdapter->GetDeviceOSDName(CECDEVICE_AUDIOSYSTEM);
|
|
||||||
- CLog::Log(LOGDEBUG, "%s - CEC capable amplifier found (%s). volume will be controlled on the amp", __FUNCTION__, ampName.name);
|
|
||||||
- strAmpName += StringUtils::Format("%s", ampName.name);
|
|
||||||
+ std::string ampName(m_adapter->m_cecAdapter->GetDeviceOSDName(CECDEVICE_AUDIOSYSTEM));
|
|
||||||
+ CLog::Log(LOGDEBUG, "%s - CEC capable amplifier found (%s). volume will be controlled on the amp", __FUNCTION__, ampName.c_str());
|
|
||||||
+ strAmpName += StringUtils::Format("%s", ampName.c_str());
|
|
||||||
|
|
||||||
// set amp present
|
|
||||||
m_adapter->SetAudioSystemConnected(true);
|
|
||||||
@@ -1592,8 +1568,8 @@ bool CPeripheralCecAdapterUpdateThread::SetInitialConfiguration(void)
|
|
||||||
|
|
||||||
// request the OSD name of the TV
|
|
||||||
std::string strNotification;
|
|
||||||
- cec_osd_name tvName = m_adapter->m_cecAdapter->GetDeviceOSDName(CECDEVICE_TV);
|
|
||||||
- strNotification = StringUtils::Format("%s: %s", g_localizeStrings.Get(36016).c_str(), tvName.name);
|
|
||||||
+ std::string tvName(m_adapter->m_cecAdapter->GetDeviceOSDName(CECDEVICE_TV));
|
|
||||||
+ strNotification = StringUtils::Format("%s: %s", g_localizeStrings.Get(36016).c_str(), tvName.c_str());
|
|
||||||
|
|
||||||
std::string strAmpName = UpdateAudioSystemStatus();
|
|
||||||
if (!strAmpName.empty())
|
|
||||||
@@ -1766,7 +1742,7 @@ void CPeripheralCecAdapter::ProcessStandbyDevices(void)
|
|
||||||
m_standbySent = CDateTime::GetCurrentDateTime();
|
|
||||||
m_cecAdapter->StandbyDevices(CECDEVICE_BROADCAST);
|
|
||||||
}
|
|
||||||
- else if (m_configuration.bSendInactiveSource == 1)
|
|
||||||
+ else if (m_bSendInactiveSource == 1)
|
|
||||||
{
|
|
||||||
CLog::Log(LOGDEBUG, "%s - sending inactive source commands", __FUNCTION__);
|
|
||||||
m_cecAdapter->SetInactiveView();
|
|
||||||
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.h b/xbmc/peripherals/devices/PeripheralCecAdapter.h
|
|
||||||
index e7f769f..30b22c9 100644
|
|
||||||
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.h
|
|
||||||
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.h
|
|
||||||
@@ -146,12 +146,12 @@ namespace PERIPHERALS
|
|
||||||
void SetMenuLanguage(const char *strLanguage);
|
|
||||||
|
|
||||||
// callbacks from libCEC
|
|
||||||
- static int CecLogMessage(void *cbParam, const CEC::cec_log_message message);
|
|
||||||
- static int CecCommand(void *cbParam, const CEC::cec_command command);
|
|
||||||
- static int CecConfiguration(void *cbParam, const CEC::libcec_configuration config);
|
|
||||||
- static int CecAlert(void *cbParam, const CEC::libcec_alert alert, const CEC::libcec_parameter data);
|
|
||||||
+ static void CecLogMessage(void *cbParam, const CEC::cec_log_message* message);
|
|
||||||
+ static void CecCommand(void *cbParam, const CEC::cec_command* command);
|
|
||||||
+ static void CecConfiguration(void *cbParam, const CEC::libcec_configuration* config);
|
|
||||||
+ static void CecAlert(void *cbParam, const CEC::libcec_alert alert, const CEC::libcec_parameter data);
|
|
||||||
static void CecSourceActivated(void *param, const CEC::cec_logical_address address, const uint8_t activated);
|
|
||||||
- static int CecKeyPress(void *cbParam, const CEC::cec_keypress key);
|
|
||||||
+ static void CecKeyPress(void *cbParam, const CEC::cec_keypress* key);
|
|
||||||
|
|
||||||
DllLibCEC* m_dll;
|
|
||||||
CEC::ICECAdapter* m_cecAdapter;
|
|
||||||
@@ -181,7 +181,12 @@ namespace PERIPHERALS
|
|
||||||
bool m_bActiveSourceBeforeStandby;
|
|
||||||
bool m_bOnPlayReceived;
|
|
||||||
bool m_bPlaybackPaused;
|
|
||||||
- std::string m_strComPort;
|
|
||||||
+ std::string m_strComPort;
|
|
||||||
+ bool m_bPowerOnScreensaver;
|
|
||||||
+ bool m_bUseTVMenuLanguage;
|
|
||||||
+ bool m_bSendInactiveSource;
|
|
||||||
+ bool m_bPowerOffScreensaver;
|
|
||||||
+ bool m_bShutdownOnStandby;
|
|
||||||
};
|
|
||||||
|
|
||||||
class CPeripheralCecAdapterUpdateThread : public CThread
|
|
||||||
|
|
||||||
From 82fe52deb8c11df31fbdf8c298b28a5e1a1491aa Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lars Op den Kamp <lars@opdenkamp.eu>
|
|
||||||
Date: Fri, 11 Nov 2016 10:09:48 +0100
|
|
||||||
Subject: [PATCH 2/4] [cec] Added advanced settings for action when TV goes
|
|
||||||
standby
|
|
||||||
|
|
||||||
Added advances settings for action when TV goes standby : Pause
|
|
||||||
playback, Stop playback, Exit Kodi
|
|
||||||
---
|
|
||||||
system/peripherals.xml | 2 +-
|
|
||||||
xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 47 ++++++++++++++++++-----
|
|
||||||
xbmc/peripherals/devices/PeripheralCecAdapter.h | 1 +
|
|
||||||
3 files changed, 39 insertions(+), 11 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/system/peripherals.xml b/system/peripherals.xml
|
|
||||||
index 58a9d24..1fa31e1 100644
|
|
||||||
--- a/system/peripherals.xml
|
|
||||||
+++ b/system/peripherals.xml
|
|
||||||
@@ -16,7 +16,7 @@
|
|
||||||
<setting key="send_inactive_source" type="bool" value="1" label="36025" order="5" />
|
|
||||||
<setting key="cec_standby_screensaver" type="bool" value="0" label="36009" order="6" />
|
|
||||||
<setting key="cec_wake_screensaver" type="bool" value="1" label="36010" order="7" />
|
|
||||||
- <setting key="standby_pc_on_tv_standby" type="enum" value="13011" label="36029" order="8" lvalues="36028|13005|13011" />
|
|
||||||
+ <setting key="standby_pc_on_tv_standby" type="enum" value="13011" label="36029" order="8" lvalues="36028|13005|13011|13009|36043|36045" />
|
|
||||||
<setting key="standby_tv_on_pc_standby" type="bool" value="1" label="36026" order="9" />
|
|
||||||
<setting key="use_tv_menu_language" type="bool" value="1" label="36018" order="10" />
|
|
||||||
<setting key="pause_playback_on_deactivate" type="bool" value="1" label="36033" configurable="0" />
|
|
||||||
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
|
||||||
index a71dc4b..1b7c38e 100644
|
|
||||||
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
|
||||||
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
|
||||||
@@ -55,6 +55,10 @@ using namespace CEC;
|
|
||||||
#define LOCALISED_ID_TV_AVR 36039
|
|
||||||
#define LOCALISED_ID_STOP 36044
|
|
||||||
#define LOCALISED_ID_PAUSE 36045
|
|
||||||
+#define LOCALISED_ID_POWEROFF 13005
|
|
||||||
+#define LOCALISED_ID_SUSPEND 13011
|
|
||||||
+#define LOCALISED_ID_QUIT 13009
|
|
||||||
+#define LOCALISED_ID_IGNORE 36028
|
|
||||||
|
|
||||||
#define LOCALISED_ID_NONE 231
|
|
||||||
|
|
||||||
@@ -619,6 +623,35 @@ void CPeripheralCecAdapter::SetMenuLanguage(const char *strLanguage)
|
|
||||||
CLog::Log(LOGWARNING, "%s - TV menu language set to unknown value '%s'", __FUNCTION__, strLanguage);
|
|
||||||
}
|
|
||||||
|
|
||||||
+void CPeripheralCecAdapter::OnTvStandby(void)
|
|
||||||
+{
|
|
||||||
+ int iActionOnTvStandby = GetSettingInt("standby_pc_on_tv_standby");
|
|
||||||
+ switch (iActionOnTvStandby)
|
|
||||||
+ {
|
|
||||||
+ case LOCALISED_ID_POWEROFF:
|
|
||||||
+ m_bStarted = false;
|
|
||||||
+ g_application.ExecuteXBMCAction("Shutdown");
|
|
||||||
+ break;
|
|
||||||
+ case LOCALISED_ID_SUSPEND:
|
|
||||||
+ m_bStarted = false;
|
|
||||||
+ g_application.ExecuteXBMCAction("Suspend");
|
|
||||||
+ break;
|
|
||||||
+ case LOCALISED_ID_QUIT:
|
|
||||||
+ m_bStarted = false;
|
|
||||||
+ g_application.ExecuteXBMCAction("Quit");
|
|
||||||
+ break;
|
|
||||||
+ case LOCALISED_ID_PAUSE:
|
|
||||||
+ g_application.OnAction(CAction(ACTION_PAUSE));
|
|
||||||
+ break;
|
|
||||||
+ case LOCALISED_ID_STOP:
|
|
||||||
+ g_application.StopPlaying();
|
|
||||||
+ break;
|
|
||||||
+ default:
|
|
||||||
+ CLog::Log(LOGERROR, "%s - Unexpected [standby_pc_on_tv_standby] setting value", __FUNCTION__);
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
void CPeripheralCecAdapter::CecCommand(void *cbParam, const cec_command* command)
|
|
||||||
{
|
|
||||||
CPeripheralCecAdapter *adapter = static_cast<CPeripheralCecAdapter *>(cbParam);
|
|
||||||
@@ -630,16 +663,10 @@ void CPeripheralCecAdapter::CecCommand(void *cbParam, const cec_command* command
|
|
||||||
switch (command->opcode)
|
|
||||||
{
|
|
||||||
case CEC_OPCODE_STANDBY:
|
|
||||||
- /* a device was put in standby mode */
|
|
||||||
if (command->initiator == CECDEVICE_TV &&
|
|
||||||
- (adapter->m_configuration.bPowerOffOnStandby == 1 || adapter->m_bShutdownOnStandby) &&
|
|
||||||
(!adapter->m_standbySent.IsValid() || CDateTime::GetCurrentDateTime() - adapter->m_standbySent > CDateTimeSpan(0, 0, 0, SCREENSAVER_TIMEOUT)))
|
|
||||||
{
|
|
||||||
- adapter->m_bStarted = false;
|
|
||||||
- if (adapter->m_configuration.bPowerOffOnStandby == 1)
|
|
||||||
- g_application.ExecuteXBMCAction("Suspend");
|
|
||||||
- else if (adapter->m_bShutdownOnStandby)
|
|
||||||
- g_application.ExecuteXBMCAction("Shutdown");
|
|
||||||
+ adapter->OnTvStandby();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case CEC_OPCODE_SET_MENU_LANGUAGE:
|
|
||||||
@@ -1360,8 +1387,8 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
|
|
||||||
|
|
||||||
// read the mutually exclusive boolean settings
|
|
||||||
int iStandbyAction(GetSettingInt("standby_pc_on_tv_standby"));
|
|
||||||
- m_configuration.bPowerOffOnStandby = iStandbyAction == 13011 ? 1 : 0;
|
|
||||||
- m_bShutdownOnStandby = iStandbyAction == 13005;
|
|
||||||
+ m_configuration.bPowerOffOnStandby = iStandbyAction == LOCALISED_ID_SUSPEND ? 1 : 0;
|
|
||||||
+ m_bShutdownOnStandby = iStandbyAction == LOCALISED_ID_POWEROFF;
|
|
||||||
|
|
||||||
#if defined(CEC_DOUBLE_TAP_TIMEOUT_MS_OLD)
|
|
||||||
// double tap prevention timeout in ms. libCEC uses 50ms units for this in 2.2.0, so divide by 50
|
|
||||||
@@ -1373,7 +1400,7 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
|
|
||||||
|
|
||||||
if (GetSettingBool("pause_playback_on_deactivate"))
|
|
||||||
{
|
|
||||||
- SetSetting("pause_or_stop_playback_on_deactivate", 36045);
|
|
||||||
+ SetSetting("pause_or_stop_playback_on_deactivate", LOCALISED_ID_PAUSE);
|
|
||||||
SetSetting("pause_playback_on_deactivate", false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.h b/xbmc/peripherals/devices/PeripheralCecAdapter.h
|
|
||||||
index 30b22c9..9274eab 100644
|
|
||||||
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.h
|
|
||||||
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.h
|
|
||||||
@@ -144,6 +144,7 @@ namespace PERIPHERALS
|
|
||||||
|
|
||||||
void SetAudioSystemConnected(bool bSetTo);
|
|
||||||
void SetMenuLanguage(const char *strLanguage);
|
|
||||||
+ void OnTvStandby(void);
|
|
||||||
|
|
||||||
// callbacks from libCEC
|
|
||||||
static void CecLogMessage(void *cbParam, const CEC::cec_log_message* message);
|
|
||||||
|
|
||||||
From f0e1725617e41e841c9c24a20f1fc9b37347c8c3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lars Op den Kamp <lars@opdenkamp.eu>
|
|
||||||
Date: Fri, 11 Nov 2016 10:09:56 +0100
|
|
||||||
Subject: [PATCH 3/4] [cec] add CEC IMX adapter as known type and set no
|
|
||||||
polling.
|
|
||||||
|
|
||||||
that eliminates extensive periodic /sys walkthrough
|
|
||||||
|
|
||||||
(this is reused Lars's commit e59d7e028288464e6890141a830e4a83d4b9d065)
|
|
||||||
---
|
|
||||||
xbmc/peripherals/PeripheralTypes.h | 5 +++++
|
|
||||||
xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp | 6 ++++++
|
|
||||||
2 files changed, 11 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/xbmc/peripherals/PeripheralTypes.h b/xbmc/peripherals/PeripheralTypes.h
|
|
||||||
index 34ce2ef..c87242f 100644
|
|
||||||
--- a/xbmc/peripherals/PeripheralTypes.h
|
|
||||||
+++ b/xbmc/peripherals/PeripheralTypes.h
|
|
||||||
@@ -38,7 +38,8 @@
|
|
||||||
PERIPHERAL_BUS_USB,
|
|
||||||
PERIPHERAL_BUS_PCI,
|
|
||||||
PERIPHERAL_BUS_RPI,
|
|
||||||
- PERIPHERAL_BUS_CEC
|
|
||||||
+ PERIPHERAL_BUS_CEC,
|
|
||||||
+ PERIPHERAL_BUS_IMX
|
|
||||||
};
|
|
||||||
|
|
||||||
enum PeripheralFeature
|
|
||||||
@@ -173,6 +174,8 @@ namespace PERIPHERALS
|
|
||||||
return "pci";
|
|
||||||
case PERIPHERAL_BUS_RPI:
|
|
||||||
return "rpi";
|
|
||||||
+ case PERIPHERAL_BUS_IMX:
|
|
||||||
+ return "imx";
|
|
||||||
case PERIPHERAL_BUS_CEC:
|
|
||||||
return "cec";
|
|
||||||
case PERIPHERAL_BUS_ADDON:
|
|
||||||
@@ -197,6 +200,8 @@ namespace PERIPHERALS
|
|
||||||
return PERIPHERAL_BUS_PCI;
|
|
||||||
else if (strTypeLowerCase == "rpi")
|
|
||||||
return PERIPHERAL_BUS_RPI;
|
|
||||||
+ else if (strTypeLowerCase == "imx")
|
|
||||||
+ return PERIPHERAL_BUS_IMX;
|
|
||||||
else if (strTypeLowerCase == "cec")
|
|
||||||
return PERIPHERAL_BUS_CEC;
|
|
||||||
else if (strTypeLowerCase == "addon")
|
|
||||||
diff --git a/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp b/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp
|
|
||||||
index b04fe00..abd0a6b 100644
|
|
||||||
--- a/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp
|
|
||||||
+++ b/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp
|
|
||||||
@@ -102,6 +102,12 @@ bool CPeripheralBusCEC::PerformDeviceScan(PeripheralScanResults &results)
|
|
||||||
/** the Pi's adapter cannot be removed, no need to rescan */
|
|
||||||
m_bNeedsPolling = false;
|
|
||||||
break;
|
|
||||||
+#if defined(HAS_IMXVPU)
|
|
||||||
+ case ADAPTERTYPE_IMX:
|
|
||||||
+ result.m_mappedBusType = PERIPHERAL_BUS_IMX;
|
|
||||||
+ m_bNeedsPolling = false;
|
|
||||||
+ break;
|
|
||||||
+#endif
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
From cfcfb4c98cf1a6d756fc3962e6d803c297917684 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lars Op den Kamp <lars@opdenkamp.eu>
|
|
||||||
Date: Fri, 11 Nov 2016 10:10:07 +0100
|
|
||||||
Subject: [PATCH 4/4] [cec] added: setting to make libCEC wake up the AVR
|
|
||||||
explicitly when activating the source.
|
|
||||||
|
|
||||||
ref: https://github.com/Pulse-Eight/libcec/issues/156
|
|
||||||
---
|
|
||||||
addons/resource.language.en_gb/resources/strings.po | 7 ++++++-
|
|
||||||
system/peripherals.xml | 3 ++-
|
|
||||||
xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 1 +
|
|
||||||
3 files changed, 9 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/system/peripherals.xml b/system/peripherals.xml
|
|
||||||
index 1fa31e1..ed707b6 100644
|
|
||||||
--- a/system/peripherals.xml
|
|
||||||
+++ b/system/peripherals.xml
|
|
||||||
@@ -16,7 +16,7 @@
|
|
||||||
<setting key="send_inactive_source" type="bool" value="1" label="36025" order="5" />
|
|
||||||
<setting key="cec_standby_screensaver" type="bool" value="0" label="36009" order="6" />
|
|
||||||
<setting key="cec_wake_screensaver" type="bool" value="1" label="36010" order="7" />
|
|
||||||
- <setting key="standby_pc_on_tv_standby" type="enum" value="13011" label="36029" order="8" lvalues="36028|13005|13011|13009|36043|36045" />
|
|
||||||
+ <setting key="standby_pc_on_tv_standby" type="enum" value="13011" label="36029" order="8" lvalues="36028|13005|13011|13009|36044|36046" />
|
|
||||||
<setting key="standby_tv_on_pc_standby" type="bool" value="1" label="36026" order="9" />
|
|
||||||
<setting key="use_tv_menu_language" type="bool" value="1" label="36018" order="10" />
|
|
||||||
<setting key="pause_playback_on_deactivate" type="bool" value="1" label="36033" configurable="0" />
|
|
||||||
@@ -24,6 +24,7 @@
|
|
||||||
<setting key="connected_device" type="enum" label="36019" value="36037" lvalues="36037|36038" order="12" />
|
|
||||||
<setting key="cec_hdmi_port" type="int" value="1" min="1" max="15" label="36015" order="13" />
|
|
||||||
<setting key="physical_address" type="string" label="36021" value="0" order="14" />
|
|
||||||
+ <setting key="power_avr_on_as" type="bool" label="36045" value="0" order="15" />
|
|
||||||
|
|
||||||
<setting key="tv_vendor" type="int" value="0" configurable="0" />
|
|
||||||
<setting key="device_name" type="string" value="Kodi" configurable="0" />
|
|
||||||
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
|
||||||
index 1b7c38e..d032ffd 100644
|
|
||||||
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
|
||||||
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
|
||||||
@@ -1384,6 +1384,7 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
|
|
||||||
m_bPowerOffScreensaver = GetSettingBool("cec_standby_screensaver") ? 1 : 0;
|
|
||||||
m_bPowerOnScreensaver = GetSettingBool("cec_wake_screensaver") ? 1 : 0;
|
|
||||||
m_bSendInactiveSource = GetSettingBool("send_inactive_source") ? 1 : 0;
|
|
||||||
+ m_configuration.bAutoWakeAVR = GetSettingBool("power_avr_on_as") ? 1 : 0;
|
|
||||||
|
|
||||||
// read the mutually exclusive boolean settings
|
|
||||||
int iStandbyAction(GetSettingInt("standby_pc_on_tv_standby"));
|
|
4
alarm/kodi-rbp/99-kodi.rules
Normal file
4
alarm/kodi-rbp/99-kodi.rules
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
SUBSYSTEM=="bcm2708_vcio",GROUP="video",MODE="0660"
|
||||||
|
SUBSYSTEM=="vc-sm",GROUP="video",MODE="0660"
|
||||||
|
SUBSYSTEM=="vchiq",GROUP="video",MODE="0660"
|
||||||
|
SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0660"
|
|
@ -1,8 +1,9 @@
|
||||||
# Maintainer: Oleg Rakhmanov <oleg@archlinuxarm.org>
|
# Maintainer: Oleg Rakhmanov <oleg@archlinuxarm.org>
|
||||||
|
# Contributor graysky <graysky AT archlinux DOT org>
|
||||||
|
# Contributor BlackIkeEagle < ike DOT devolder AT gmail DOT com >
|
||||||
# Contributor tomasgroth at yahoo.dk
|
# Contributor tomasgroth at yahoo.dk
|
||||||
# Contributor WarheadsSE <max@warheads.net>
|
# Contributor WarheadsSE <max@warheads.net>
|
||||||
# Contributor Romzetron <asromzek@gmail.com>
|
# Contributor Adrian Fedoreanu <adrian [dot] fedoreanu [at] gmail [dot] com>
|
||||||
# Contributor Holzhaus <holthuis.jan@googlemail.com>
|
|
||||||
|
|
||||||
buildarch=20
|
buildarch=20
|
||||||
|
|
||||||
|
@ -10,9 +11,9 @@ _prefix=/usr
|
||||||
|
|
||||||
pkgbase=kodi-rbp
|
pkgbase=kodi-rbp
|
||||||
pkgname=('kodi-rbp' 'kodi-rbp-eventclients')
|
pkgname=('kodi-rbp' 'kodi-rbp-eventclients')
|
||||||
pkgver=16.1
|
pkgver=17.0
|
||||||
_codename=Jarvis
|
_codename=Krypton
|
||||||
pkgrel=7
|
pkgrel=1
|
||||||
pkgdesc="A software media player and entertainment hub for digital media for the Raspberry Pi"
|
pkgdesc="A software media player and entertainment hub for digital media for the Raspberry Pi"
|
||||||
arch=('armv6h' 'armv7h')
|
arch=('armv6h' 'armv7h')
|
||||||
url="http://kodi.tv"
|
url="http://kodi.tv"
|
||||||
|
@ -23,138 +24,113 @@ makedepends=('hicolor-icon-theme' 'fribidi' 'lzo2' 'smbclient' 'libtiff' 'libva'
|
||||||
'libmpeg2' 'libmad' 'libmodplug' 'jasper' 'rtmpdump' 'unzip' 'xorg-xdpyinfo' 'libbluray'
|
'libmpeg2' 'libmad' 'libmodplug' 'jasper' 'rtmpdump' 'unzip' 'xorg-xdpyinfo' 'libbluray'
|
||||||
'libnfs' 'afpfs-ng' 'avahi' 'bluez-libs' 'tinyxml' 'raspberrypi-firmware' 'libcec-rpi'
|
'libnfs' 'afpfs-ng' 'avahi' 'bluez-libs' 'tinyxml' 'raspberrypi-firmware' 'libcec-rpi'
|
||||||
'libplist' 'swig' 'taglib' 'libxslt' 'shairplay' 'boost' 'cmake' 'gperf' 'nasm' 'zip'
|
'libplist' 'swig' 'taglib' 'libxslt' 'shairplay' 'boost' 'cmake' 'gperf' 'nasm' 'zip'
|
||||||
'udisks' 'upower' 'git' 'autoconf' 'java-environment' 'libdcadec.so' 'libcrossguid')
|
'upower' 'autoconf' 'java-environment' 'libcrossguid-git' 'dcadec' 'libpulse' 'cwiid')
|
||||||
source=("https://github.com/xbmc/xbmc/archive/$pkgver-$_codename.tar.gz"
|
source=("https://github.com/xbmc/xbmc/archive/$pkgver-$_codename.tar.gz"
|
||||||
'kodi.service'
|
'kodi.service'
|
||||||
'polkit.rules'
|
'99-kodi.rules'
|
||||||
'gcc6_fix.patch'
|
'https://github.com/popcornmix/xbmc/commit/0c320b6cdd4fb409be45008e6b9042463d54b742.patch'
|
||||||
'hifiberry_digi.patch'
|
'https://github.com/popcornmix/xbmc/commit/4d983105d7fd65b1d92f2ae2602e6e1cdcaddbe0.patch'
|
||||||
'10775.patch')
|
'polkit.rules')
|
||||||
|
|
||||||
sha256sums=('7d82c8aff2715c83deecdf10c566e26105bec0473af530a1356d4c747ebdfd10'
|
sha256sums=('4bfffa2493973ae15ab1d922632c09a2583908d6140bc4f58ec8f9314e4f6545'
|
||||||
'e9276dcc220b853bb24a1404a6016c9046aa080041fb225e16f7ffb97c364308'
|
'5235068d5800d69f0287087815990e7fe8d6572733d60c8800546d35f608e87f'
|
||||||
'9ea592205023ba861603d74b63cdb73126c56372a366dc4cb7beb379073cbb96'
|
'b31570f95654434b01fd8531612fbb6be77cbc1c519dd60f92feae26eb160f3d'
|
||||||
'b0fe75d10b2678894d1dec48f3258c0bec2a4a170f33d76a9a8334bb1969b18f'
|
'813f8c622c341eefb33774115199d2abe9c189cf2ce52e79719dbd42d48a1274'
|
||||||
'0b9d951911a8576c26dec8a31f394282677e48afff49b9579448121d27b8509e'
|
'd830c010ead152bc9a9ba6b812c985d6e649bda7480fec9b3c451f5ea03ba792'
|
||||||
'75529f0f42e9f84d2b55c86ba48d89f5e1286d84365f3ba6676c5b41fba6a314')
|
'9ea592205023ba861603d74b63cdb73126c56372a366dc4cb7beb379073cbb96')
|
||||||
prepare() {
|
prepare() {
|
||||||
cd "$srcdir/xbmc-$pkgver-$_codename"
|
cd "$srcdir/xbmc-$pkgver-$_codename"
|
||||||
|
|
||||||
find -type f -name *.py -exec sed 's|^#!.*python$|#!/usr/bin/python2|' -i "{}" +
|
# ffmpeg: Automatic switch to software decode for GMC with more than one warp point
|
||||||
sed 's|^#!.*python$|#!/usr/bin/python2|' -i tools/depends/native/rpl-native/rpl
|
patch -Np1 -i "$srcdir/0c320b6cdd4fb409be45008e6b9042463d54b742.patch"
|
||||||
sed 's/python/python2/' -i tools/Linux/kodi.sh.in
|
# fix for files with GMC
|
||||||
sed 's/shell python/shell python2/' -i tools/EventClients/Makefile.in
|
patch -Np1 -i "$srcdir/4d983105d7fd65b1d92f2ae2602e6e1cdcaddbe0.patch"
|
||||||
# disable wiiremote due to incompatibility with bluez-5.29
|
|
||||||
sed '/WiiRemote/d' -i tools/EventClients/Makefile.in
|
|
||||||
sed '/mkdir -p $(DESTDIR)$(bindir)/i \
|
|
||||||
install:' -i tools/EventClients/Makefile.in
|
|
||||||
|
|
||||||
patch -Np1 -i ${srcdir}/gcc6_fix.patch
|
[[ -d kodi-build ]] && rm -rf kodi-build
|
||||||
patch -Np1 -i ${srcdir}/hifiberry_digi.patch
|
mkdir $srcdir/kodi-build
|
||||||
|
|
||||||
# libcec 4.0
|
|
||||||
patch -Np1 -i ${srcdir}/10775.patch
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "$srcdir/xbmc-$pkgver-$_codename"
|
cd "kodi-build"
|
||||||
|
|
||||||
# Bootstrapping
|
# -DCPU=arm1176jzf-s for rpi1
|
||||||
MAKEFLAGS=-j1 ./bootstrap
|
# -DCPU=cortex-a7 for rpi2
|
||||||
|
# -DCPU=cortex-a53 for rpi3
|
||||||
|
|
||||||
|
[[ $CARCH == "armv6h" ]] && _CPU=arm1176jzf-s
|
||||||
|
[[ $CARCH == "armv7h" ]] && _CPU=cortex-a7
|
||||||
|
|
||||||
# Configuring Kodi
|
cmake -DCMAKE_INSTALL_PREFIX=/usr \
|
||||||
export PYTHON_VERSION=2 # external python v2
|
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
|
||||||
# we need to compile for armv6 instead of armv5 to avoid problems compiling assembler code
|
-DCMAKE_PREFIX_PATH=/opt/vc \
|
||||||
FLAGS="-Ofast -fexcess-precision=fast -mfloat-abi=hard -mabi=aapcs-linux -pipe -fstack-protector --param=ssp-buffer-size=4\
|
-DCORE_SYSTEM_NAME=rbpi \
|
||||||
-I/opt/vc/include/ -I/opt/vc/include/IL -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
|
-DWITH_CPU="$_CPU" \
|
||||||
[[ $CARCH == "armv6h" ]] && export CFLAGS="$FLAGS -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp" && export CXXFLAGS="$FLAGS -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp"
|
-DENABLE_EVENTCLIENTS=ON \
|
||||||
[[ $CARCH == "armv7h" ]] && export CFLAGS="$FLAGS -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mvectorize-with-neon-quad" && export CXXFLAGS="$FLAGS -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mvectorize-with-neon-quad"
|
-DENABLE_OPENGL=OFF \
|
||||||
|
-DENABLE_X11=OFF \
|
||||||
|
-DENABLE_VAAPI=OFF \
|
||||||
|
-DENABLE_VDPAU=OFF \
|
||||||
|
-DLIRC_DEVICE=/run/lirc/lircd \
|
||||||
|
../"xbmc-$pkgver-$_codename"/project/cmake
|
||||||
|
|
||||||
export LDFLAGS="$LDFLAGS -L/opt/vc/lib"
|
|
||||||
|
|
||||||
# If build fails try uncommenting the line below first
|
|
||||||
# export MAKEFLAGS="-j1"
|
|
||||||
|
|
||||||
./configure --prefix=$_prefix --exec-prefix=$_prefix \
|
|
||||||
--with-platform=raspberry-pi \
|
|
||||||
--disable-gl \
|
|
||||||
--enable-gles \
|
|
||||||
--disable-x11 \
|
|
||||||
--disable-sdl \
|
|
||||||
--enable-optimizations \
|
|
||||||
--disable-goom \
|
|
||||||
--disable-vaapi \
|
|
||||||
--disable-vdpau \
|
|
||||||
--disable-xrandr \
|
|
||||||
--enable-airplay \
|
|
||||||
--enable-airtunes \
|
|
||||||
--enable-avahi \
|
|
||||||
--enable-libbluray \
|
|
||||||
--enable-dvdcss \
|
|
||||||
--disable-debug \
|
|
||||||
--disable-joystick \
|
|
||||||
--disable-mid \
|
|
||||||
--enable-nfs \
|
|
||||||
--disable-profiling \
|
|
||||||
--disable-projectm \
|
|
||||||
--enable-rsxs \
|
|
||||||
--enable-rtmp \
|
|
||||||
--disable-vaapi \
|
|
||||||
--enable-optical-drive \
|
|
||||||
--enable-player=omxplayer \
|
|
||||||
--with-lirc-device=/run/lirc/lircd \
|
|
||||||
ac_cv_lib_bluetooth_hci_devid=no
|
|
||||||
make
|
make
|
||||||
|
make preinstall
|
||||||
}
|
}
|
||||||
|
|
||||||
package_kodi-rbp() {
|
package_kodi-rbp() {
|
||||||
pkgdesc="A software media player and entertainment hub for digital media (Raspberry Pi)"
|
pkgdesc="A software media player and entertainment hub for digital media (Raspberry Pi)"
|
||||||
|
|
||||||
# depends expected for kodi plugins:
|
|
||||||
# 'python2-pillow' 'python2-pybluez' 'python2-simplejson'
|
|
||||||
# depends expeced in FEH.py
|
|
||||||
# 'mesa-demos' 'xorg-xdpyinfo'
|
|
||||||
depends=('hicolor-icon-theme' 'fribidi' 'lzo2' 'smbclient' 'libtiff' 'libva' 'libpng' 'libcdio'
|
depends=('hicolor-icon-theme' 'fribidi' 'lzo2' 'smbclient' 'libtiff' 'libva' 'libpng' 'libcdio'
|
||||||
'yajl' 'libmariadbclient' 'libjpeg-turbo' 'libsamplerate' 'libssh' 'libmicrohttpd'
|
'yajl' 'libmariadbclient' 'libjpeg-turbo' 'libsamplerate' 'libssh' 'libmicrohttpd'
|
||||||
'sdl_image' 'python2' 'python2-pillow' 'python2-pybluez' 'python2-simplejson' 'libass'
|
'sdl_image' 'python2' 'python2-pillow' 'python2-pybluez' 'python2-simplejson' 'libass'
|
||||||
'libmpeg2' 'libmad' 'libmodplug' 'jasper' 'rtmpdump' 'unzip' 'xorg-xdpyinfo' 'libbluray'
|
'libmpeg2' 'libmad' 'libmodplug' 'jasper' 'rtmpdump' 'xorg-xdpyinfo' 'libbluray'
|
||||||
'libnfs' 'avahi' 'bluez-libs' 'tinyxml' 'raspberrypi-firmware' 'libcec-rpi'
|
'avahi' 'bluez-libs' 'tinyxml' 'raspberrypi-firmware' 'libpulse'
|
||||||
'libplist' 'swig' 'taglib' 'libxslt' 'shairplay' 'libdcadec.so')
|
'libplist' 'swig' 'taglib' 'libxslt' 'libcrossguid-git')
|
||||||
|
|
||||||
optdepends=(
|
optdepends=(
|
||||||
'afpfs-ng: Apple shares support'
|
'afpfs-ng: Apple airplay and AFP share support'
|
||||||
|
'libcec-rpi: Pulse-Eight USB-CEC adapter support'
|
||||||
|
'libnfs: NFS shares support'
|
||||||
'lirc: remote controller support'
|
'lirc: remote controller support'
|
||||||
'polkit: permissions for automounting external drives and power management functionality'
|
|
||||||
'udisks: automount external drives'
|
|
||||||
'upower: used to trigger power management functionality'
|
|
||||||
'unrar: access compressed files without unpacking them'
|
|
||||||
'lsb-release: log distro information in crashlog'
|
'lsb-release: log distro information in crashlog'
|
||||||
'gdb: stack trace in crashlog')
|
'polkit: permissions for automounting external drives and power management functionality'
|
||||||
|
'shairplay: limited Apple airplay support'
|
||||||
|
'unrar: access compressed files without unpacking them'
|
||||||
|
'unzip: access compressed files without unpacking them'
|
||||||
|
'upower: used to trigger power management functionality')
|
||||||
|
|
||||||
install="kodi.install"
|
install='kodi.install'
|
||||||
provides=('xbmc' 'kodi')
|
provides=('xbmc' 'kodi')
|
||||||
conflicts=('xbmc' 'kodi' 'arm-mem-git' 'shairplay-git')
|
conflicts=('xbmc' 'kodi' 'arm-mem-git' 'shairplay-git')
|
||||||
replaces=('xbmc-rbp')
|
replaces=('xbmc-rbp-git')
|
||||||
|
|
||||||
cd "$srcdir/xbmc-$pkgver-$_codename"
|
_components=('kodi' 'kodi-bin')
|
||||||
# Running make install
|
|
||||||
make DESTDIR="${pkgdir}" install
|
|
||||||
|
|
||||||
# We will no longer support the xbmc name
|
cd kodi-build
|
||||||
rm "$pkgdir/usr/share/xsessions/xbmc.desktop"
|
# install eventclients
|
||||||
rm "$pkgdir/usr/bin/"xbmc{,-standalone}
|
for _cmp in ${_components[@]}; do
|
||||||
# we will leave /usr/{include,lib,share}/xbmc for now
|
DESTDIR="$pkgdir" /usr/bin/cmake \
|
||||||
|
-DCMAKE_INSTALL_COMPONENT="$_cmp" \
|
||||||
# Licenses
|
-P cmake_install.cmake
|
||||||
install -d -m 0755 "${pkgdir}${_prefix}/share/licenses/${pkgname}"
|
|
||||||
for licensef in LICENSE.GPL copying.txt; do
|
|
||||||
mv "${pkgdir}${_prefix}/share/doc/kodi/${licensef}" "${pkgdir}${_prefix}/share/licenses/${pkgname}"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
install -Dm0644 $srcdir/kodi.service $pkgdir/usr/lib/systemd/system/kodi.service
|
# Licenses
|
||||||
mkdir -m700 -p $pkgdir/usr/share/polkit-1/rules.d/
|
install -dm755 ${pkgdir}/usr/share/licenses/${pkgname}
|
||||||
install -Dm0644 $srcdir/polkit.rules $pkgdir/usr/share/polkit-1/rules.d/10-kodi.rules
|
for licensef in LICENSE.GPL copying.txt; do
|
||||||
chmod 0750 $pkgdir/usr/share/polkit-1/rules.d/
|
mv ${pkgdir}/usr/share/doc/kodi/${licensef} \
|
||||||
|
${pkgdir}/usr/share/licenses/${pkgname}
|
||||||
|
done
|
||||||
|
|
||||||
|
# python2 is being used
|
||||||
|
cd "$pkgdir"
|
||||||
|
grep -lR '#!.*python' * | while read file; do sed -s 's/\(#!.*python\)/\12/g' -i "$file"; done
|
||||||
|
|
||||||
|
install -Dm0644 "$srcdir/kodi.service" "$pkgdir/usr/lib/systemd/system/kodi.service"
|
||||||
|
install -Dm0644 "$srcdir/polkit.rules" "$pkgdir/usr/share/polkit-1/rules.d/10-kodi.rules"
|
||||||
|
chmod 0700 "$pkgdir/usr/share/polkit-1/rules.d/"
|
||||||
|
|
||||||
|
# fix permissions necessary for accelerated video playback
|
||||||
|
install -Dm0644 "$srcdir/99-kodi.rules" "$pkgdir/etc/udev/rules.d/99-kodi.rules"
|
||||||
}
|
}
|
||||||
|
|
||||||
package_kodi-rbp-eventclients() {
|
package_kodi-rbp-eventclients() {
|
||||||
|
@ -163,7 +139,22 @@ package_kodi-rbp-eventclients() {
|
||||||
conflicts=('kodi-eventclients')
|
conflicts=('kodi-eventclients')
|
||||||
depends=('cwiid')
|
depends=('cwiid')
|
||||||
|
|
||||||
cd "$srcdir/xbmc-$pkgver-$_codename"
|
_components=(
|
||||||
|
'kodi-eventclients-common'
|
||||||
|
'kodi-eventclients-ps3'
|
||||||
|
'kodi-eventclients-wiiremote'
|
||||||
|
'kodi-eventclients-xbmc-send'
|
||||||
|
)
|
||||||
|
|
||||||
make DESTDIR="$pkgdir" eventclients WII_EXTRA_OPTS=-DCWIID_OLD
|
cd kodi-build
|
||||||
|
# install eventclients
|
||||||
|
for _cmp in ${_components[@]}; do
|
||||||
|
DESTDIR="$pkgdir" /usr/bin/cmake \
|
||||||
|
-DCMAKE_INSTALL_COMPONENT="$_cmp" \
|
||||||
|
-P cmake_install.cmake
|
||||||
|
done
|
||||||
|
|
||||||
|
# python2 is being used
|
||||||
|
cd "$pkgdir"
|
||||||
|
grep -lR '#!.*python' * | while read file; do sed -s 's/\(#!.*python\)/\12/g' -i "$file"; done
|
||||||
}
|
}
|
||||||
|
|
18
alarm/kodi-rbp/fix_libdvd.patch
Normal file
18
alarm/kodi-rbp/fix_libdvd.patch
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
--- Makefile.in.orig 2016-05-15 08:11:58.074191520 +0000
|
||||||
|
+++ Makefile.in 2016-05-15 08:12:25.599007513 +0000
|
||||||
|
@@ -11,7 +11,6 @@
|
||||||
|
|
||||||
|
DVDPCODECS_DIRS= \
|
||||||
|
lib \
|
||||||
|
- lib/libdvd
|
||||||
|
|
||||||
|
VideoPlayer_ARCHIVES=xbmc/cores/VideoPlayer/VideoPlayer.a \
|
||||||
|
xbmc/cores/VideoPlayer/DVDCodecs/DVDCodecs.a \
|
||||||
|
@@ -341,7 +340,6 @@
|
||||||
|
$(MAKE) -C lib/addons/library.xbmc.pvr
|
||||||
|
$(MAKE) -C lib/addons/library.kodi.inputstream
|
||||||
|
dvdpcodecs: dllloader
|
||||||
|
- $(MAKE) -C lib/libdvd
|
||||||
|
|
||||||
|
dvdpextcodecs:
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,14 +0,0 @@
|
||||||
diff -rupN a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
|
|
||||||
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp 2016-04-24 07:48:30.000000000 +0100
|
|
||||||
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp 2016-07-06 23:15:14.851453568 +0100
|
|
||||||
@@ -1342,6 +1342,10 @@ void CAESinkALSA::EnumerateDevice(AEDevi
|
|
||||||
if (snd_card_get_name(cardNr, &cardName) == 0)
|
|
||||||
info.m_displayName = cardName;
|
|
||||||
|
|
||||||
+ /* hifiberry digi doesn't correctly report as iec958 device. Needs fixing in kernel driver */
|
|
||||||
+ if (info.m_displayName == "snd_rpi_hifiberry_digi")
|
|
||||||
+ info.m_deviceType = AE_DEVTYPE_IEC958;
|
|
||||||
+
|
|
||||||
if (info.m_deviceType == AE_DEVTYPE_HDMI && info.m_displayName.size() > 5 &&
|
|
||||||
info.m_displayName.substr(info.m_displayName.size()-5) == " HDMI")
|
|
||||||
{
|
|
|
@ -3,14 +3,9 @@ post_install() {
|
||||||
[[ $(type -p update-desktop-database) ]] && usr/bin/update-desktop-database -q usr/share/applications
|
[[ $(type -p update-desktop-database) ]] && usr/bin/update-desktop-database -q usr/share/applications
|
||||||
getent group kodi > /dev/null || groupadd -r kodi
|
getent group kodi > /dev/null || groupadd -r kodi
|
||||||
getent passwd kodi > /dev/null || useradd -r -m -d /var/lib/kodi -g kodi -s /usr/bin/nologin kodi
|
getent passwd kodi > /dev/null || useradd -r -m -d /var/lib/kodi -g kodi -s /usr/bin/nologin kodi
|
||||||
usermod -a -G kodi,audio,video,power,network,optical,storage,disk kodi
|
usermod -a -G kodi,audio,video,power,network,optical,storage,disk,tty,input kodi
|
||||||
mkdir -p var/lib/kodi
|
mkdir -p var/lib/kodi
|
||||||
chown -R kodi:kodi var/lib/kodi
|
chown -R kodi:kodi var/lib/kodi
|
||||||
|
|
||||||
echo "****************************************************************"
|
|
||||||
echo "If kodi systemd service does not start, try adding a udev rule:"
|
|
||||||
echo "echo 'SUBSYSTEM==\"vchiq\",GROUP=\"video\",MODE=\"0660\"' > /etc/udev/rules.d/10-vchiq-permissions.rules"
|
|
||||||
echo "****************************************************************"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
post_upgrade() {
|
post_upgrade() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description = Starts an instance of Kodi
|
Description = Starts an instance of Kodi
|
||||||
After = remote-fs.target lircd.service getty.target
|
After = remote-fs.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User = kodi
|
User = kodi
|
||||||
|
|
Loading…
Reference in a new issue