From 78147d45acfa1e8416b3c86888aaf68d64bb584e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 11 Nov 2016 14:03:29 +0000 Subject: [PATCH 01/63] cec: fixup strings after PR 10775 --- system/peripherals.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/peripherals.xml b/system/peripherals.xml index ed707b6767f6fc9184adf2090810b5b1ad89d10d..d5704b249c3065b2980dc92c7c81dc7b384187bc 100644 --- a/system/peripherals.xml +++ b/system/peripherals.xml @@ -16,7 +16,7 @@ - + @@ -24,7 +24,7 @@ - + From 1febcd53bb19499e0820cb7bcaaf39619d8a3666 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 28 Oct 2014 00:19:40 +0000 Subject: [PATCH 02/63] [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 abfc92bd5a9f1da9e2eed758a90416ce2d369e3b..15745a792a5a28c79c19effc4d9037e842535da6 100644 --- a/addons/resource.language.en_gb/resources/strings.po +++ b/addons/resource.language.en_gb/resources/strings.po @@ -19714,3 +19714,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 @@ - + + + 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 b713d931abc454fd9248650c21b93820688e8f5b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 26 Apr 2014 17:27:52 +0100 Subject: [PATCH 03/63] [cec] Don't suspend pi on tv switch off - it can't wake up --- system/peripherals.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/peripherals.xml b/system/peripherals.xml index 02b1a9ed6fce1986bd864bba09a9df0621f9e041..54f9b70cfd5c8c82ceb99932e1b3e3251211cd20 100644 --- a/system/peripherals.xml +++ b/system/peripherals.xml @@ -16,7 +16,7 @@ - + From 2971cf8df975ab6fc221bf1d5342d3371ce5b41e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 21 Apr 2016 16:49:02 +0100 Subject: [PATCH 04/63] Revert "[settings] remove show EXIF picture information setting" This reverts commit e7d90188436b6966eff23fd695e1a9d18f4af1b4. --- addons/resource.language.en_gb/resources/strings.po | 10 ++++++++++ system/settings/settings.xml | 5 +++++ xbmc/pictures/GUIWindowPictures.cpp | 2 +- xbmc/pictures/PictureInfoLoader.cpp | 8 ++++++-- xbmc/pictures/PictureInfoLoader.h | 1 + xbmc/settings/Settings.cpp | 1 + xbmc/settings/Settings.h | 1 + 7 files changed, 25 insertions(+), 3 deletions(-) diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po index 15745a792a5a28c79c19effc4d9037e842535da6..dbd80f07e305ad99a29d90211a7596b8bb5cedec 100644 --- a/addons/resource.language.en_gb/resources/strings.po +++ b/addons/resource.language.en_gb/resources/strings.po @@ -19729,3 +19729,13 @@ msgstr "" msgctxt "#38052" msgid "Remote button press release time (ms)" msgstr "" + +#. Description of setting "Pictures -> Show EXIF picture information" with label #38207 +#: system/settings/settings.xml +msgctxt "#38207" +msgid "Show EXIF picture information" +msgstr "" + +msgctxt "#38208" +msgid "If EXIF information exists (date, time, camera used, etc.), it will be displayed." +msgstr "" diff --git a/system/settings/settings.xml b/system/settings/settings.xml index c3804da9625186f5651a8d8be0edcedd8a2b255b..63613fc13acfd66476a880f8ebe9047a53837a33 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -1172,6 +1172,11 @@ + + 0 + true + + 0 true diff --git a/xbmc/pictures/GUIWindowPictures.cpp b/xbmc/pictures/GUIWindowPictures.cpp index 4b5ec502a49d5116cafd53441a6d823be0da6b54..072639baae58479ec7d746f96634de069ee87e34 100644 --- a/xbmc/pictures/GUIWindowPictures.cpp +++ b/xbmc/pictures/GUIWindowPictures.cpp @@ -203,7 +203,7 @@ void CGUIWindowPictures::OnPrepareFileItems(CFileItemList& items) if (StringUtils::EqualsNoCase(items[i]->GetLabel(), "folder.jpg")) items.Remove(i); - if (items.GetFolderCount() == items.Size()) + if (items.GetFolderCount() == items.Size() || !CSettings::GetInstance().GetBool(CSettings::SETTING_PICTURES_USETAGS)) return; // Start the music info loader thread diff --git a/xbmc/pictures/PictureInfoLoader.cpp b/xbmc/pictures/PictureInfoLoader.cpp index dd3347277c75c5e63a4a4db9af9cc46605bb5ea9..05304f9fc44285d5577f2056625cceb15347ae57 100644 --- a/xbmc/pictures/PictureInfoLoader.cpp +++ b/xbmc/pictures/PictureInfoLoader.cpp @@ -43,6 +43,7 @@ void CPictureInfoLoader::OnLoaderStart() m_mapFileItems->SetFastLookup(true); m_tagReads = 0; + m_loadTags = CSettings::GetInstance().GetBool(CSettings::SETTING_PICTURES_USETAGS); if (m_pProgressCallback) m_pProgressCallback->SetProgressMax(m_pVecItems->GetFileCount()); @@ -87,8 +88,11 @@ bool CPictureInfoLoader::LoadItemLookup(CFileItem* pItem) if (pItem->HasPictureInfoTag()) return false; - pItem->GetPictureInfoTag()->Load(pItem->GetPath()); - m_tagReads++; + if (m_loadTags) + { // Nothing found, load tag from file + pItem->GetPictureInfoTag()->Load(pItem->GetPath()); + m_tagReads++; + } return true; } diff --git a/xbmc/pictures/PictureInfoLoader.h b/xbmc/pictures/PictureInfoLoader.h index 000b54fe1bb1dd1963edd5cf208ea318a5a5499d..2a022ff0ff66d237f0ebd12092c7b5ce8244a511 100644 --- a/xbmc/pictures/PictureInfoLoader.h +++ b/xbmc/pictures/PictureInfoLoader.h @@ -39,5 +39,6 @@ protected: CFileItemList* m_mapFileItems; unsigned int m_tagReads; + bool m_loadTags; }; diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp index 9940b6aac87971d7024c1c925846b4dac1ca98a0..6e13ba61b99217d95c1ad423131221869be6036b 100644 --- a/xbmc/settings/Settings.cpp +++ b/xbmc/settings/Settings.cpp @@ -296,6 +296,7 @@ const std::string CSettings::SETTING_AUDIOCDS_SETTINGS = "audiocds.settings"; const std::string CSettings::SETTING_AUDIOCDS_EJECTONRIP = "audiocds.ejectonrip"; const std::string CSettings::SETTING_MYMUSIC_SONGTHUMBINVIS = "mymusic.songthumbinvis"; const std::string CSettings::SETTING_MYMUSIC_DEFAULTLIBVIEW = "mymusic.defaultlibview"; +const std::string CSettings::SETTING_PICTURES_USETAGS = "pictures.usetags"; const std::string CSettings::SETTING_PICTURES_GENERATETHUMBS = "pictures.generatethumbs"; const std::string CSettings::SETTING_PICTURES_SHOWVIDEOS = "pictures.showvideos"; const std::string CSettings::SETTING_PICTURES_DISPLAYRESOLUTION = "pictures.displayresolution"; diff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h index 482f61db8aab70aff4013fee2f1c73a5b5a9b4a9..269a3a741340d60354037166c3b03ddfdd36cf01 100644 --- a/xbmc/settings/Settings.h +++ b/xbmc/settings/Settings.h @@ -253,6 +253,7 @@ public: static const std::string SETTING_AUDIOCDS_EJECTONRIP; static const std::string SETTING_MYMUSIC_SONGTHUMBINVIS; static const std::string SETTING_MYMUSIC_DEFAULTLIBVIEW; + static const std::string SETTING_PICTURES_USETAGS; static const std::string SETTING_PICTURES_GENERATETHUMBS; static const std::string SETTING_PICTURES_SHOWVIDEOS; static const std::string SETTING_PICTURES_DISPLAYRESOLUTION; From 76cd8f440e9203cc4ba28a0bbeede281dc391559 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Thu, 1 May 2014 16:28:39 +0100 Subject: [PATCH 07/63] Improved file buffering in CArchive Even though memcpy is typically inlined by the compiler into byte/word loads and stores (at least for release builds), the frequency with which 1, 2 and 4 byte loads/stores are encountered in cases where the size is *not* determinable at compile time is still high enough that it's worth handling these specially. On the ARM1176JZF-S in the Raspberry Pi, this improves the total time to open a library (in the case where it's fetched from a CArchive) by around 4%. It should be noted that this code uses 16-bit and 32-bit word loads and stores that are not necessarily aligned to their respective widths. It is possible that there are some architectures out there which do not support this, although all ARMs since ARMv6 have supported it (and ARMs earlier than that are probably not powerful enough to be good targets for XBMC). --- xbmc/utils/Archive.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/xbmc/utils/Archive.h b/xbmc/utils/Archive.h index 23cac2759fb10d532da56fa75c5528c5589e9010..89d31d4db1afa7340ed8cd51a7a9fa7acce53b3a 100644 --- a/xbmc/utils/Archive.h +++ b/xbmc/utils/Archive.h @@ -155,9 +155,17 @@ protected: * than waiting until we attempt to put more data into an already full buffer */ if (m_BufferRemain > size) { + switch (size) + { + case 1: *m_BufferPos++ = *ptr; m_BufferRemain--; break; + case 2: *(uint16_t *) m_BufferPos = *(const uint16_t *) ptr; m_BufferPos += 2; m_BufferRemain -= 2; break; + case 4: *(uint32_t *) m_BufferPos = *(const uint32_t *) ptr; m_BufferPos += 4; m_BufferRemain -= 4; break; + default: memcpy(m_BufferPos, ptr, size); m_BufferPos += size; m_BufferRemain -= size; + break; + } return *this; } @@ -170,9 +178,17 @@ protected: /* Note, refilling the buffer is deferred until we know we need to read more from it */ if (m_BufferRemain >= size) { + switch (size) + { + case 1: *ptr = *m_BufferPos++; m_BufferRemain--; break; + case 2: *(uint16_t *) ptr = *(const uint16_t *) m_BufferPos; m_BufferPos += 2; m_BufferRemain -= 2; break; + case 4: *(uint32_t *) ptr = *(const uint32_t *) m_BufferPos; m_BufferPos += 4; m_BufferRemain -= 4; break; + default: memcpy(ptr, m_BufferPos, size); m_BufferPos += size; m_BufferRemain -= size; + break; + } return *this; } From 46eb2adb4e1c586c374f9bedeac9fef6f2dca4f0 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 10 Aug 2014 16:45:16 +0100 Subject: [PATCH 08/63] filesystem: Make support of browsing into archives optional The ability to browse, scan and play content in archives can cause problems on low powered/low memory devices. It's quite common to see reports of a large rar file that causes xbmc to crash with an out-of-memory error when browsing or scanning. It also can be slow as any archive in the directory is opened and extracted. This causes issues for people who scan library with archives disabled, then subsequently enable it. The library has the .rar files in which don't play without removing and re-adding. We'll let people who don't use archives disable it manually --- addons/resource.language.en_gb/resources/strings.po | 9 +++++++++ system/settings/rbp.xml | 11 +++++++++++ xbmc/Util.cpp | 4 ++-- xbmc/filesystem/FileDirectoryFactory.cpp | 4 ++++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po index dbd80f07e305ad99a29d90211a7596b8bb5cedec..ecea05ac43622f75034c60cc3b2bd16859065a80 100644 --- a/addons/resource.language.en_gb/resources/strings.po +++ b/addons/resource.language.en_gb/resources/strings.po @@ -19371,6 +19371,15 @@ msgstr "" #: system/settings/rbp.xml msgctxt "#38010" msgid "GPU accelerated" + +#: system/settings/settings.xml +msgctxt "#38040" +msgid "Support browsing into archives" +msgstr "" + +#: system/settings/settings.xml +msgctxt "#38041" +msgid "Allow viewing and playing files in archives (e.g. zip, rar)" msgstr "" #. Setting #38011 "Show All Items entry" diff --git a/system/settings/rbp.xml b/system/settings/rbp.xml index 62e9c8ed2199f8c57a640b06b0216ee4c8f0ca1e..e8b0d3d472b02fd161a4b51e957b9129e3cb9792 100644 --- a/system/settings/rbp.xml +++ b/system/settings/rbp.xml @@ -102,4 +102,15 @@ +
+ + + + 1 + true + + + + +
diff --git a/xbmc/Util.cpp b/xbmc/Util.cpp index c3567941192c724f2600494a8d7e355584b57b52..da1508dcedbd196789988d895e64548a08439d8f 100644 --- a/xbmc/Util.cpp +++ b/xbmc/Util.cpp @@ -1899,7 +1899,7 @@ void CUtil::ScanPathsForAssociatedItems(const std::string& videoName, URIUtils::RemoveExtension(strCandidate); if (StringUtils::StartsWithNoCase(strCandidate, videoName)) { - if (URIUtils::IsRAR(pItem->GetPath()) || URIUtils::IsZIP(pItem->GetPath())) + if (CSettings::GetInstance().GetBool("filelists.browsearchives") && (URIUtils::IsRAR(pItem->GetPath()) || URIUtils::IsZIP(pItem->GetPath()))) CUtil::ScanArchiveForAssociatedItems(pItem->GetPath(), "", item_exts, associatedFiles); else { @@ -1909,7 +1909,7 @@ void CUtil::ScanPathsForAssociatedItems(const std::string& videoName, } else { - if (URIUtils::IsRAR(pItem->GetPath()) || URIUtils::IsZIP(pItem->GetPath())) + if (CSettings::GetInstance().GetBool("filelists.browsearchives") && (URIUtils::IsRAR(pItem->GetPath()) || URIUtils::IsZIP(pItem->GetPath()))) CUtil::ScanArchiveForAssociatedItems(pItem->GetPath(), videoName, item_exts, associatedFiles); } } diff --git a/xbmc/filesystem/FileDirectoryFactory.cpp b/xbmc/filesystem/FileDirectoryFactory.cpp index a0fd0a9011e71f4af1535110c696b6ea5c4b37db..688b71a297c7c617c6764bfe6be157d727eb49d3 100644 --- a/xbmc/filesystem/FileDirectoryFactory.cpp +++ b/xbmc/filesystem/FileDirectoryFactory.cpp @@ -40,6 +40,7 @@ #include "playlists/PlayListFactory.h" #include "Directory.h" #include "File.h" +#include "settings/Settings.h" #include "FileItem.h" #include "utils/StringUtils.h" #include "URL.h" @@ -116,6 +117,8 @@ IFileDirectory* CFileDirectoryFactory::Create(const CURL& url, CFileItem* pItem, return NULL; } #endif + if (CSettings::GetInstance().GetBool("filelists.browsearchives")) + { if (url.IsFileType("zip")) { CURL zipURL = URIUtils::CreateArchivePath("zip", url); @@ -189,6 +192,7 @@ IFileDirectory* CFileDirectoryFactory::Create(const CURL& url, CFileItem* pItem, } return NULL; } + } if (url.IsFileType("xbt")) { CURL xbtUrl = URIUtils::CreateArchivePath("xbt", url); From de4036d5f101d94439763545120b52bb346f4875 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 24 Sep 2014 23:13:52 +0100 Subject: [PATCH 11/63] [audio] Add settings option to boost centre channel when downmixing This allows a dB volume increase to be added to centre channel. This can help improve dialgue in the presence of background music/effects. It can go up to 30dB for testing purposes, but value of 6 is probably more reasonable. It is recommended to ensure "Normalise levels on downmix" is enabled when boosting by large values to avoid clipping. Should work with Pi Sink (dvdplayer/paplayer) and omxplayer --- addons/resource.language.en_gb/resources/strings.po | 15 +++++++++++++++ system/settings/settings.xml | 12 ++++++++++++ .../Engines/ActiveAE/ActiveAEResampleFFMPEG.cpp | 7 +++++++ .../AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.cpp | 6 ++++++ xbmc/cores/omxplayer/OMXAudio.cpp | 6 ++++++ 5 files changed, 46 insertions(+) diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po index ecea05ac43622f75034c60cc3b2bd16859065a80..de5eb0dd99700c0bdc7c3409c1b63f1c01c650bb 100644 --- a/addons/resource.language.en_gb/resources/strings.po +++ b/addons/resource.language.en_gb/resources/strings.po @@ -19591,6 +19591,21 @@ msgstr "" #empty strings from id 38062 to 38099 +#: system/settings/settings.xml +msgctxt "#38007" +msgid "Boost centre channel when downmixing" +msgstr "" + +#: system/settings/settings.xml +msgctxt "#38008" +msgid "Increase this value to make the dialogue louder compared to background sounds when downmixing multichannel audio" +msgstr "" + +#: system/settings/settings.xml +msgctxt "#38009" +msgid "%i dB" +msgstr "" + #. Description of section #14200 "Player"" #: system/settings/settings.xml msgctxt "#38100" diff --git a/system/settings/settings.xml b/system/settings/settings.xml index 63613fc13acfd66476a880f8ebe9047a53837a33..9ce9e725aec4d8ed000200342a2a99f3bc34a749 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -2358,6 +2358,18 @@
+ + 2 + 0 + + 0 + 1 + 30 + + + 38009 + + HAS_AE_QUALITY_LEVELS 2 diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResampleFFMPEG.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResampleFFMPEG.cpp index af5bf93116543bd282953b01d0c5bcef93bb3a84..d7165dedd242abdfa7c0607eee332451c3187298 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResampleFFMPEG.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResampleFFMPEG.cpp @@ -20,6 +20,7 @@ #include "cores/AudioEngine/Utils/AEUtil.h" #include "ActiveAEResampleFFMPEG.h" +#include "settings/Settings.h" #include "utils/log.h" extern "C" { @@ -104,6 +105,12 @@ bool CActiveAEResampleFFMPEG::Init(uint64_t dst_chan_layout, int dst_channels, i { av_opt_set_double(m_pContext, "rematrix_maxval", 1.0, 0); } + int boost_center = CSettings::GetInstance().GetInt("audiooutput.boostcenter"); + if (boost_center) + { + float gain = pow(10.0f, ((float)(-3 + boost_center))/20.0f); + av_opt_set_double(m_pContext, "center_mix_level", gain, 0); + } if (remapLayout) { diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.cpp index 78071493fca4756c6741d7085e35cbe2f27038e6..698a6ae1e2bc0cc9256caec42c0dcfb0893301b5 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.cpp @@ -164,6 +164,12 @@ bool CActiveAEResamplePi::Init(uint64_t dst_chan_layout, int dst_channels, int d { av_opt_set_double(m_pContext, "rematrix_maxval", 1.0, 0); } + int boost_center = CSettings::GetInstance().GetInt("audiooutput.boostcenter"); + if (boost_center) + { + float gain = pow(10.0f, ((float)(-3 + boost_center))/20.0f); + av_opt_set_double(m_pContext, "center_mix_level", gain, 0); + } if (remapLayout) { diff --git a/xbmc/cores/omxplayer/OMXAudio.cpp b/xbmc/cores/omxplayer/OMXAudio.cpp index f16b822ed7b4aebe18b5d339b3f71ee66e97c23f..993d4b33a294e88c2c004b7943895ba55558c2d0 100644 --- a/xbmc/cores/omxplayer/OMXAudio.cpp +++ b/xbmc/cores/omxplayer/OMXAudio.cpp @@ -633,6 +633,12 @@ bool COMXAudio::Initialize(AEAudioFormat format, OMXClock *clock, CDVDStreamInfo { av_opt_set_double(m_pContext, "rematrix_maxval", 1.0, 0); } + int boost_center = CSettings::GetInstance().GetInt("audiooutput.boostcenter"); + if (boost_center) + { + float gain = pow(10.0f, ((float)(-3 + boost_center))/20.0f); + av_opt_set_double(m_pContext, "center_mix_level", gain, 0); + } // stereo upmix if (upmix && m_src_channels == 2 && m_dst_channels > 2) From abc2a09d9cb7b423a37f1dfae6f198dfa361f1af Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 27 Oct 2014 15:23:51 +0000 Subject: [PATCH 12/63] [rbp] Default extract thumbnails to false It can take 80 seconds for a single file on a Pi. It can cause crashes with out-of-memory errors. It genereates a lot of support issues. Best to default to disabled and let users enable it if they must --- system/settings/rbp.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/system/settings/rbp.xml b/system/settings/rbp.xml index e8b0d3d472b02fd161a4b51e957b9129e3cb9792..289dc55ec41aa44848519a05f8ee1ccc72740085 100644 --- a/system/settings/rbp.xml +++ b/system/settings/rbp.xml @@ -43,6 +43,12 @@ false + + false + + + false + From e182b3ca45dd427c939d6c39366664e9afb382a8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 11 Dec 2014 17:00:57 +0000 Subject: [PATCH 15/63] Fix for UI not showing both extractflags and extractthumb --- addons/resource.language.en_gb/resources/strings.po | 10 +++++++--- system/settings/settings.xml | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po index de5eb0dd99700c0bdc7c3409c1b63f1c01c650bb..ae3aa10aa65beac6689f129d60056cadf8a5b5c1 100644 --- a/addons/resource.language.en_gb/resources/strings.po +++ b/addons/resource.language.en_gb/resources/strings.po @@ -12451,7 +12451,7 @@ msgstr "" #: system/settings/settings.xml msgctxt "#20433" -msgid "Extract thumbnails and video information" +msgid "Extract video information from files" msgstr "" #: xbmc/dialogs/GUIDialogSmartPlaylistRule.cpp @@ -17011,7 +17011,7 @@ msgstr "" #. Description of setting with label #20433 "Extract thumbnails and video information" #: system/settings/settings.xml msgctxt "#36178" -msgid "Extract thumbnails and metadata information such as codec and aspect ratio from videos." +msgid "Extract metadata information such as codec and aspect ratio from videos." msgstr "" #. Description of setting with label #20419 "Replace file names with library titles" @@ -17023,7 +17023,7 @@ msgstr "" #. Description of setting with label #20433 "Extract thumbnails and video information" #: system/settings/settings.xml msgctxt "#36180" -msgid "Extract thumbnails and information, such as codecs and aspect ratio, to display in library mode." +msgid "Extract thumbnails, to display in library Mode." msgstr "" #: system/settings/settings.xml @@ -19763,3 +19763,7 @@ msgstr "" msgctxt "#38208" msgid "If EXIF information exists (date, time, camera used, etc.), it will be displayed." msgstr "" + +msgctxt "#38190" +msgid "Extract thumbnails from video files" +msgstr "" diff --git a/system/settings/settings.xml b/system/settings/settings.xml index 9ce9e725aec4d8ed000200342a2a99f3bc34a749..326ffbd0f08428c3b4a95208134253feeabf1b1f 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -969,8 +969,8 @@ true - - 4 + + 1 true From 31ef126da025be5761a86664e2c9428f5208f2ae Mon Sep 17 00:00:00 2001 From: anaconda Date: Thu, 11 Sep 2014 21:30:43 +0200 Subject: [PATCH 16/63] Disable autoscrolling while on screensaver and while opening streams. --- xbmc/Application.cpp | 10 ++++++++++ xbmc/Application.h | 2 ++ xbmc/guilib/GUIFadeLabelControl.cpp | 4 +++- xbmc/guilib/GUIFont.cpp | 4 ++++ xbmc/guilib/GUILabel.cpp | 4 +++- xbmc/guilib/GUITextBox.cpp | 3 ++- 6 files changed, 24 insertions(+), 3 deletions(-) diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index 100a2f2cd2a097ec275751a75e82500324166757..6e5c33c1118cbda79a614d90c6ca4b610f338c87 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -5240,3 +5240,13 @@ bool CApplication::NotifyActionListeners(const CAction &action) const return false; } + +bool CApplication::ScreenSaverDisablesAutoScrolling() +{ + bool onBlackDimScreenSaver = IsInScreenSaver() && m_screenSaver && + (m_screenSaver->ID() == "screensaver.xbmc.builtin.black" || + m_screenSaver->ID() == "screensaver.xbmc.builtin.dim"); + bool openingStreams = m_pPlayer->IsPlaying() && g_windowManager.IsWindowActive(WINDOW_DIALOG_BUSY); + + return onBlackDimScreenSaver || openingStreams; +} diff --git a/xbmc/Application.h b/xbmc/Application.h index a9d9bf5c4d69f0073e683e28cbd82d72d0fe4e06..dfee194a7d88a2cd6f503b5c7fbc258709997cb8 100644 --- a/xbmc/Application.h +++ b/xbmc/Application.h @@ -394,6 +394,8 @@ public: */ void UnregisterActionListener(IActionListener *listener); + bool ScreenSaverDisablesAutoScrolling(); + std::unique_ptr m_ServiceManager; /*! diff --git a/xbmc/guilib/GUIFadeLabelControl.cpp b/xbmc/guilib/GUIFadeLabelControl.cpp index 01826a5f7ca2ccb104f897ca0670571a9b04b83d..553a6458a71009dd592c8a843eeb3bc336864d61 100644 --- a/xbmc/guilib/GUIFadeLabelControl.cpp +++ b/xbmc/guilib/GUIFadeLabelControl.cpp @@ -21,6 +21,8 @@ #include "GUIFadeLabelControl.h" #include "utils/Random.h" +#include "Application.h" + CGUIFadeLabelControl::CGUIFadeLabelControl(int parentID, int controlID, float posX, float posY, float width, float height, const CLabelInfo& labelInfo, bool scrollOut, unsigned int timeToDelayAtEnd, bool resetOnLabelChange, bool randomized) : CGUIControl(parentID, controlID, posX, posY, width, height), m_label(labelInfo), m_scrollInfo(50, labelInfo.offsetX, labelInfo.scrollSpeed) , m_textLayout(labelInfo.font, false) @@ -106,7 +108,7 @@ void CGUIFadeLabelControl::Process(unsigned int currentTime, CDirtyRegionList &d m_lastLabel = m_currentLabel; } - if (m_infoLabels.size() > 1 || !m_shortText) + if ((m_infoLabels.size() > 1 || !m_shortText) && !g_application.ScreenSaverDisablesAutoScrolling()) { // have scrolling text bool moveToNextLabel = false; if (!m_scrollOut) diff --git a/xbmc/guilib/GUIFont.cpp b/xbmc/guilib/GUIFont.cpp index 7f1108939a63162024c7a055403a58e395f090b6..1192b74675b79d1a862de2949a60163abb916035 100644 --- a/xbmc/guilib/GUIFont.cpp +++ b/xbmc/guilib/GUIFont.cpp @@ -22,6 +22,7 @@ #include "GUIFontTTF.h" #include "GraphicContext.h" +#include "Application.h" #include "threads/SingleLock.h" #include "utils/TimeUtils.h" #include "utils/MathUtils.h" @@ -128,6 +129,9 @@ bool CGUIFont::UpdateScrollInfo(const vecText &text, CScrollInfo &scrollInfo) // If the string is smaller than the viewport, then it may be plotted even // more times than that. // + if (g_application.ScreenSaverDisablesAutoScrolling()) + return false; + if (scrollInfo.waitTime) { scrollInfo.waitTime--; diff --git a/xbmc/guilib/GUILabel.cpp b/xbmc/guilib/GUILabel.cpp index f15e847ec43d07b44660caec9f8faca780b0a061..ba88a7c5e45da13404d59dfbf1bbc8b93d3528c1 100644 --- a/xbmc/guilib/GUILabel.cpp +++ b/xbmc/guilib/GUILabel.cpp @@ -21,6 +21,8 @@ #include "GUILabel.h" #include +#include "Application.h" + CGUILabel::CGUILabel(float posX, float posY, float width, float height, const CLabelInfo& labelInfo, CGUILabel::OVER_FLOW overflow) : m_label(labelInfo) , m_textLayout(labelInfo.font, overflow == OVER_FLOW_WRAP, height) @@ -103,7 +105,7 @@ void CGUILabel::Render() color_t color = GetColor(); bool renderSolid = (m_color == COLOR_DISABLED); bool overFlows = (m_renderRect.Width() + 0.5f < m_textLayout.GetTextWidth()); // 0.5f to deal with floating point rounding issues - if (overFlows && m_scrolling && !renderSolid) + if (overFlows && m_scrolling && !renderSolid && !g_application.ScreenSaverDisablesAutoScrolling()) m_textLayout.RenderScrolling(m_renderRect.x1, m_renderRect.y1, m_label.angle, color, m_label.shadowColor, 0, m_renderRect.Width(), m_scrollInfo); else { diff --git a/xbmc/guilib/GUITextBox.cpp b/xbmc/guilib/GUITextBox.cpp index d7bc1c5ba6067af9a460589920367288c640a915..ac766293f1c47c7f145cb46f6b152144b303f15f 100644 --- a/xbmc/guilib/GUITextBox.cpp +++ b/xbmc/guilib/GUITextBox.cpp @@ -24,6 +24,7 @@ #include "utils/MathUtils.h" #include "utils/StringUtils.h" #include "guiinfo/GUIInfoLabels.h" +#include "Application.h" #include @@ -133,7 +134,7 @@ void CGUITextBox::Process(unsigned int currentTime, CDirtyRegionList &dirtyregio // update our auto-scrolling as necessary if (m_autoScrollTime && m_lines.size() > m_itemsPerPage) { - if (!m_autoScrollCondition || m_autoScrollCondition->Get()) + if ((!m_autoScrollCondition || m_autoScrollCondition->Get()) && !g_application.ScreenSaverDisablesAutoScrolling()) { if (m_lastRenderTime) m_autoScrollDelayTime += currentTime - m_lastRenderTime; From 08f34e983316fb995d27145fe023c5dbf7316df9 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 3 Nov 2014 23:17:46 +0000 Subject: [PATCH 55/63] [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 fc196a50f90057e3eb1b6553347a9d400c717db8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 4 Nov 2014 18:50:00 +0000 Subject: [PATCH 56/63] [cec] Temp - more logging --- xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp index febacb3b7964eab3b8615a6a807e0f27d911b4da..52d6e6a7ab68ce91faf5a3881b23ea7adde96cb8 100644 --- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp @@ -800,12 +800,15 @@ void CPeripheralCecAdapter::GetNextKey(void) void CPeripheralCecAdapter::PushCecKeypress(const CecButtonPress &key) { - CLog::Log(LOGDEBUG, "%s - received key %2x duration %d", __FUNCTION__, key.iButton, key.iDuration); + CLog::Log(LOGDEBUG, "%s - received key %2x duration %d (rep:%d size:%d)", __FUNCTION__, key.iButton, key.iDuration, m_configuration.iButtonRepeatRateMs, m_buttonQueue.size()); CSingleLock lock(m_critSection); // avoid the queue getting too long if (m_configuration.iButtonRepeatRateMs && m_buttonQueue.size() > 5) + { + CLog::Log(LOGDEBUG, "%s - discarded key %2x", __FUNCTION__, key.iButton); return; + } if (m_configuration.iButtonRepeatRateMs == 0 && key.iDuration > 0) { if (m_currentButton.iButton == key.iButton && m_currentButton.iDuration == 0) @@ -814,6 +817,7 @@ void CPeripheralCecAdapter::PushCecKeypress(const CecButtonPress &key) if (m_bHasButton) m_currentButton.iDuration = key.iDuration; // ignore this one, since it's already been handled by xbmc + CLog::Log(LOGDEBUG, "%s - ignored key %2x", __FUNCTION__, key.iButton); return; } // if we received a keypress with a duration set, try to find the same one without a duration set, and replace it @@ -824,6 +828,7 @@ void CPeripheralCecAdapter::PushCecKeypress(const CecButtonPress &key) if ((*it).iDuration == 0) { // replace this entry + CLog::Log(LOGDEBUG, "%s - replaced key %2x", __FUNCTION__, key.iButton); (*it).iDuration = key.iDuration; return; } @@ -833,6 +838,7 @@ void CPeripheralCecAdapter::PushCecKeypress(const CecButtonPress &key) } } + CLog::Log(LOGDEBUG, "%s - added key %2x", __FUNCTION__, key.iButton); m_buttonQueue.push_back(key); } From dd28ae7d01450884dca135169ca72a6ac6344117 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Tue, 22 Mar 2016 09:51:52 +0100 Subject: [PATCH 57/63] python: use kodi provided cert if available --- xbmc/interfaces/python/XBPython.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xbmc/interfaces/python/XBPython.cpp b/xbmc/interfaces/python/XBPython.cpp index bc84af9411ef55eaf5ba71a320b5cbfec5f49548..ff4ed7db26845905108ea0ae504e4f589f9c7d0f 100644 --- a/xbmc/interfaces/python/XBPython.cpp +++ b/xbmc/interfaces/python/XBPython.cpp @@ -595,6 +595,12 @@ bool XBPython::OnScriptInitialized(ILanguageInvoker *invoker) CEnvironment::putenv(buf); #endif +#if !defined(TARGET_WINDOWS) + // use Kodi provided cert if available + if (XFILE::CFile::Exists("special://xbmc/system/certs/cacert.pem")) + setenv("SSL_CERT_FILE", CSpecialProtocol::TranslatePath("special://xbmc/system/certs/cacert.pem").c_str(), 1); +#endif + if (PyEval_ThreadsInitialized()) PyEval_AcquireLock(); else