kodi: drop commits from RPi backports patch

This commit is contained in:
chewitt 2017-03-21 05:12:18 +00:00
parent 08c2e35be9
commit 735086eb55
2 changed files with 0 additions and 220 deletions

View File

@ -1,87 +1,3 @@
From ca8af64149c77c0fce5d240115afb91caa08a6a9 Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Tue, 28 Oct 2014 00:19:40 +0000
Subject: [PATCH 01/68] [cec] Add settings for configuring button repeats
---
addons/resource.language.en_gb/resources/strings.po | 15 +++++++++++++++
system/peripherals.xml | 4 +++-
xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 16 ++++++++++++++++
3 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
index e0060d1fae556de529274dbc6be07455701573a3..6443f3dd885bf0aa8e031039e36e273972a310ae 100644
--- a/addons/resource.language.en_gb/resources/strings.po
+++ b/addons/resource.language.en_gb/resources/strings.po
@@ -19745,3 +19745,18 @@ msgstr ""
msgctxt "#39010"
msgid "Select sort method"
msgstr ""
+
+#: system/peripherals.xml
+msgctxt "#38050"
+msgid "Remote button press delay before repeating (ms)"
+msgstr ""
+
+#: system/peripherals.xml
+msgctxt "#38051"
+msgid "Remote button press repeat rate (ms)"
+msgstr ""
+
+#: system/peripherals.xml
+msgctxt "#38052"
+msgid "Remote button press release time (ms)"
+msgstr ""
diff --git a/system/peripherals.xml b/system/peripherals.xml
index d5704b249c3065b2980dc92c7c81dc7b384187bc..02b1a9ed6fce1986bd864bba09a9df0621f9e041 100644
--- a/system/peripherals.xml
+++ b/system/peripherals.xml
@@ -31,7 +31,9 @@
<setting key="device_type" type="int" value="1" configurable="0" />
<setting key="wake_devices_advanced" type="string" value="" configurable="0" />
<setting key="standby_devices_advanced" type="string" value="" configurable="0" />
- <setting key="double_tap_timeout_ms" type="int" min="0" value="300" configurable="0" />
+ <setting key="double_tap_timeout_ms" type="int" min="50" max="1000" step="50" value="300" label="38050" order="16" />
+ <setting key="button_repeat_rate_ms" type="int" min="0" max="250" step="10" value="0" label="38051" order="17" />
+ <setting key="button_release_delay_ms" type="int" min="0" max="500" step="50" value="0" label="38052" order="18" />
</peripheral>
<peripheral vendor_product="2548:1001,2548:1002" bus="usb" name="Pulse-Eight CEC Adapter" mapTo="cec">
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
index d032ffd707fee5eec035e90bdf618530f7215c37..30367a3fde956090afdca9930fa52e829f35046f 100644
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
@@ -1296,6 +1296,20 @@ void CPeripheralCecAdapter::SetConfigurationFromLibCEC(const CEC::libcec_configu
m_configuration.bActivateSource = config.bActivateSource;
bChanged |= SetSetting("activate_source", m_configuration.bActivateSource == 1);
+#if defined(CEC_DOUBLE_TAP_TIMEOUT_MS_OLD)
+ m_configuration.iDoubleTapTimeout50Ms = config.iDoubleTapTimeout50Ms;
+ bChanged |= SetSetting("double_tap_timeout_ms", (int)m_configuration.iDoubleTapTimeout50Ms * 50);
+#else
+ m_configuration.iDoubleTapTimeoutMs = config.iDoubleTapTimeoutMs;
+ bChanged |= SetSetting("double_tap_timeout_ms", (int)m_configuration.iDoubleTapTimeoutMs);
+#endif
+
+ m_configuration.iButtonRepeatRateMs = config.iButtonRepeatRateMs;
+ bChanged |= SetSetting("button_repeat_rate_ms", (int)m_configuration.iButtonRepeatRateMs);
+
+ m_configuration.iButtonReleaseDelayMs = config.iButtonReleaseDelayMs;
+ bChanged |= SetSetting("button_release_delay_ms", (int)m_configuration.iButtonReleaseDelayMs);
+
m_configuration.bPowerOffOnStandby = config.bPowerOffOnStandby;
m_configuration.iFirmwareVersion = config.iFirmwareVersion;
@@ -1398,6 +1412,8 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
// backwards compatibility. will be removed once the next major release of libCEC is out
m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms");
#endif
+ m_configuration.iButtonRepeatRateMs = GetSettingInt("button_repeat_rate_ms");
+ m_configuration.iButtonReleaseDelayMs = GetSettingInt("button_release_delay_ms");
if (GetSettingBool("pause_playback_on_deactivate"))
{
From b551892df962870860845022b74db883f71d8094 Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Sat, 26 Apr 2014 17:27:52 +0100
@ -51685,32 +51601,6 @@ index bbb836a61344689a83af68c821c05c212a86b097..54f91a02391368fbfbb4d669c003f425
virtual int GetStreamLength() { return 0; };
virtual CDemuxStream* GetStream(int iStreamId) const override { return nullptr; };
From b8be297f0b24924f32af51950557b29ed45ba42f Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Mon, 3 Nov 2014 23:17:46 +0000
Subject: [PATCH 53/68] [cec] Don't discard buttons when repeat mode is enabled
---
xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
index 30367a3fde956090afdca9930fa52e829f35046f..febacb3b7964eab3b8615a6a807e0f27d911b4da 100644
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
@@ -803,7 +803,10 @@ void CPeripheralCecAdapter::PushCecKeypress(const CecButtonPress &key)
CLog::Log(LOGDEBUG, "%s - received key %2x duration %d", __FUNCTION__, key.iButton, key.iDuration);
CSingleLock lock(m_critSection);
- if (key.iDuration > 0)
+ // avoid the queue getting too long
+ if (m_configuration.iButtonRepeatRateMs && m_buttonQueue.size() > 5)
+ return;
+ if (m_configuration.iButtonRepeatRateMs == 0 && key.iDuration > 0)
{
if (m_currentButton.iButton == key.iButton && m_currentButton.iDuration == 0)
{
From 0574f5f0334a0cce8227f141469b67590e6d1f2b Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Tue, 4 Nov 2014 18:50:00 +0000

View File

@ -1,87 +1,3 @@
From ca8af64149c77c0fce5d240115afb91caa08a6a9 Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Tue, 28 Oct 2014 00:19:40 +0000
Subject: [PATCH 01/68] [cec] Add settings for configuring button repeats
---
addons/resource.language.en_gb/resources/strings.po | 15 +++++++++++++++
system/peripherals.xml | 4 +++-
xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 16 ++++++++++++++++
3 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
index e0060d1fae556de529274dbc6be07455701573a3..6443f3dd885bf0aa8e031039e36e273972a310ae 100644
--- a/addons/resource.language.en_gb/resources/strings.po
+++ b/addons/resource.language.en_gb/resources/strings.po
@@ -19745,3 +19745,18 @@ msgstr ""
msgctxt "#39010"
msgid "Select sort method"
msgstr ""
+
+#: system/peripherals.xml
+msgctxt "#38050"
+msgid "Remote button press delay before repeating (ms)"
+msgstr ""
+
+#: system/peripherals.xml
+msgctxt "#38051"
+msgid "Remote button press repeat rate (ms)"
+msgstr ""
+
+#: system/peripherals.xml
+msgctxt "#38052"
+msgid "Remote button press release time (ms)"
+msgstr ""
diff --git a/system/peripherals.xml b/system/peripherals.xml
index d5704b249c3065b2980dc92c7c81dc7b384187bc..02b1a9ed6fce1986bd864bba09a9df0621f9e041 100644
--- a/system/peripherals.xml
+++ b/system/peripherals.xml
@@ -31,7 +31,9 @@
<setting key="device_type" type="int" value="1" configurable="0" />
<setting key="wake_devices_advanced" type="string" value="" configurable="0" />
<setting key="standby_devices_advanced" type="string" value="" configurable="0" />
- <setting key="double_tap_timeout_ms" type="int" min="0" value="300" configurable="0" />
+ <setting key="double_tap_timeout_ms" type="int" min="50" max="1000" step="50" value="300" label="38050" order="16" />
+ <setting key="button_repeat_rate_ms" type="int" min="0" max="250" step="10" value="0" label="38051" order="17" />
+ <setting key="button_release_delay_ms" type="int" min="0" max="500" step="50" value="0" label="38052" order="18" />
</peripheral>
<peripheral vendor_product="2548:1001,2548:1002" bus="usb" name="Pulse-Eight CEC Adapter" mapTo="cec">
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
index d032ffd707fee5eec035e90bdf618530f7215c37..30367a3fde956090afdca9930fa52e829f35046f 100644
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
@@ -1296,6 +1296,20 @@ void CPeripheralCecAdapter::SetConfigurationFromLibCEC(const CEC::libcec_configu
m_configuration.bActivateSource = config.bActivateSource;
bChanged |= SetSetting("activate_source", m_configuration.bActivateSource == 1);
+#if defined(CEC_DOUBLE_TAP_TIMEOUT_MS_OLD)
+ m_configuration.iDoubleTapTimeout50Ms = config.iDoubleTapTimeout50Ms;
+ bChanged |= SetSetting("double_tap_timeout_ms", (int)m_configuration.iDoubleTapTimeout50Ms * 50);
+#else
+ m_configuration.iDoubleTapTimeoutMs = config.iDoubleTapTimeoutMs;
+ bChanged |= SetSetting("double_tap_timeout_ms", (int)m_configuration.iDoubleTapTimeoutMs);
+#endif
+
+ m_configuration.iButtonRepeatRateMs = config.iButtonRepeatRateMs;
+ bChanged |= SetSetting("button_repeat_rate_ms", (int)m_configuration.iButtonRepeatRateMs);
+
+ m_configuration.iButtonReleaseDelayMs = config.iButtonReleaseDelayMs;
+ bChanged |= SetSetting("button_release_delay_ms", (int)m_configuration.iButtonReleaseDelayMs);
+
m_configuration.bPowerOffOnStandby = config.bPowerOffOnStandby;
m_configuration.iFirmwareVersion = config.iFirmwareVersion;
@@ -1398,6 +1412,8 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
// backwards compatibility. will be removed once the next major release of libCEC is out
m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms");
#endif
+ m_configuration.iButtonRepeatRateMs = GetSettingInt("button_repeat_rate_ms");
+ m_configuration.iButtonReleaseDelayMs = GetSettingInt("button_release_delay_ms");
if (GetSettingBool("pause_playback_on_deactivate"))
{
From b551892df962870860845022b74db883f71d8094 Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Sat, 26 Apr 2014 17:27:52 +0100
@ -51685,32 +51601,6 @@ index bbb836a61344689a83af68c821c05c212a86b097..54f91a02391368fbfbb4d669c003f425
virtual int GetStreamLength() { return 0; };
virtual CDemuxStream* GetStream(int iStreamId) const override { return nullptr; };
From b8be297f0b24924f32af51950557b29ed45ba42f Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Mon, 3 Nov 2014 23:17:46 +0000
Subject: [PATCH 53/68] [cec] Don't discard buttons when repeat mode is enabled
---
xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
index 30367a3fde956090afdca9930fa52e829f35046f..febacb3b7964eab3b8615a6a807e0f27d911b4da 100644
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
@@ -803,7 +803,10 @@ void CPeripheralCecAdapter::PushCecKeypress(const CecButtonPress &key)
CLog::Log(LOGDEBUG, "%s - received key %2x duration %d", __FUNCTION__, key.iButton, key.iDuration);
CSingleLock lock(m_critSection);
- if (key.iDuration > 0)
+ // avoid the queue getting too long
+ if (m_configuration.iButtonRepeatRateMs && m_buttonQueue.size() > 5)
+ return;
+ if (m_configuration.iButtonRepeatRateMs == 0 && key.iDuration > 0)
{
if (m_currentButton.iButton == key.iButton && m_currentButton.iDuration == 0)
{
From 0574f5f0334a0cce8227f141469b67590e6d1f2b Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Tue, 4 Nov 2014 18:50:00 +0000