diff --git a/packages/mediacenter/xbmc/meta b/packages/mediacenter/xbmc/meta index 7a5de4230e..31f2e34c3d 100644 --- a/packages/mediacenter/xbmc/meta +++ b/packages/mediacenter/xbmc/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="xbmc" -PKG_VERSION="f38655f" +PKG_VERSION="11.0" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/mediacenter/xbmc/patches/xbmc-f38655f-001-add_support_to_specify_GIT_REV-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-11.0-001-add_support_to_specify_GIT_REV-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-f38655f-001-add_support_to_specify_GIT_REV-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-11.0-001-add_support_to_specify_GIT_REV-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-f38655f-303-fix_libdvd_xFLAGS-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-11.0-303-fix_libdvd_xFLAGS-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-f38655f-303-fix_libdvd_xFLAGS-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-11.0-303-fix_libdvd_xFLAGS-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-f38655f-311-fix_rsxs_build-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-11.0-311-fix_rsxs_build-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-f38655f-311-fix_rsxs_build-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-11.0-311-fix_rsxs_build-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-f38655f-402-enable_yasm_in_ffmpeg-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-11.0-402-enable_yasm_in_ffmpeg-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-f38655f-402-enable_yasm_in_ffmpeg-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-11.0-402-enable_yasm_in_ffmpeg-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-f38655f-404-add_lame_check-0.6.patch b/packages/mediacenter/xbmc/patches/xbmc-11.0-404-add_lame_check-0.6.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-f38655f-404-add_lame_check-0.6.patch rename to packages/mediacenter/xbmc/patches/xbmc-11.0-404-add_lame_check-0.6.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-f38655f-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-11.0-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-f38655f-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-11.0-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-f38655f-452-change_lcd_content-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-11.0-452-change_lcd_content-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-f38655f-452-change_lcd_content-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-11.0-452-change_lcd_content-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-f38655f-453-add_openelec.tv_RSS_news-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-11.0-453-add_openelec.tv_RSS_news-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-f38655f-453-add_openelec.tv_RSS_news-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-11.0-453-add_openelec.tv_RSS_news-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-f38655f-454-disable_backslash-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-11.0-454-disable_backslash-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-f38655f-454-disable_backslash-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-11.0-454-disable_backslash-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-f38655f-457-fix_connection_check-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-11.0-457-fix_connection_check-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-f38655f-457-fix_connection_check-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-11.0-457-fix_connection_check-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-f38655f-463-add_remote_devinput-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-11.0-463-add_remote_devinput-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-f38655f-463-add_remote_devinput-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-11.0-463-add_remote_devinput-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-f38655f-464-add_eject_keymapping_for_lirc-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-11.0-464-add_eject_keymapping_for_lirc-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-f38655f-464-add_eject_keymapping_for_lirc-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-11.0-464-add_eject_keymapping_for_lirc-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-f38655f-801-cec-PR570.patch b/packages/mediacenter/xbmc/patches/xbmc-11.0-801-cec-PR570.patch similarity index 80% rename from packages/mediacenter/xbmc/patches/xbmc-f38655f-801-cec-PR570.patch rename to packages/mediacenter/xbmc/patches/xbmc-11.0-801-cec-PR570.patch index 62714a356d..61afa4ef36 100644 --- a/packages/mediacenter/xbmc/patches/xbmc-f38655f-801-cec-PR570.patch +++ b/packages/mediacenter/xbmc/patches/xbmc-11.0-801-cec-PR570.patch @@ -1,7 +1,7 @@ -From 474d259c0f89dfd33cfc4669e3bde8bd48f68731 Mon Sep 17 00:00:00 2001 +From d9fce0781e61c46f70f19532b968485ffc70806a Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Thu, 12 Jan 2012 22:16:49 +0100 -Subject: [PATCH 01/17] cec: added volume control on a CEC enabled amplifier +Subject: [PATCH 01/18] cec: added volume control on a CEC enabled amplifier when one is found --- @@ -12,10 +12,10 @@ Subject: [PATCH 01/17] cec: added volume control on a CEC enabled amplifier 4 files changed, 225 insertions(+), 2 deletions(-) diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp -index cedda60..8fcef58 100644 +index df7de6e..c09c6d9 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp -@@ -2596,6 +2596,26 @@ bool CApplication::OnAction(const CAction &action) +@@ -2583,6 +2583,26 @@ bool CApplication::OnAction(const CAction &action) // Check for global volume control if (action.GetAmount() && (action.GetID() == ACTION_VOLUME_UP || action.GetID() == ACTION_VOLUME_DOWN)) { @@ -42,7 +42,7 @@ index cedda60..8fcef58 100644 if (!m_pPlayer || !m_pPlayer->IsPassthrough()) { // increase or decrease the volume -@@ -5033,11 +5053,49 @@ void CApplication::ShowVolumeBar(const CAction *action) +@@ -5027,11 +5047,49 @@ void CApplication::ShowVolumeBar(const CAction *action) bool CApplication::IsMuted() const { @@ -92,7 +92,7 @@ index cedda60..8fcef58 100644 if (g_settings.m_bMute) UnMute(); else -@@ -5046,6 +5104,9 @@ void CApplication::ToggleMute(void) +@@ -5040,6 +5098,9 @@ void CApplication::ToggleMute(void) void CApplication::Mute() { @@ -102,7 +102,7 @@ index cedda60..8fcef58 100644 g_settings.m_iPreMuteVolumeLevel = GetVolume(); SetVolume(0); g_settings.m_bMute = true; -@@ -5053,6 +5114,9 @@ void CApplication::Mute() +@@ -5047,6 +5108,9 @@ void CApplication::Mute() void CApplication::UnMute() { @@ -125,7 +125,7 @@ index 6e6a005..2fd09aa 100644 int GetPlaySpeed() const; int GetSubtitleDelay() const; diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp -index a117d82..ab95dab 100644 +index b169c5c..88477df 100644 --- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp @@ -31,6 +31,7 @@ @@ -155,7 +155,7 @@ index a117d82..ab95dab 100644 { m_button.iButton = 0; m_button.iDuration = 0; -@@ -269,8 +273,24 @@ void CPeripheralCecAdapter::Process(void) +@@ -273,8 +277,24 @@ void CPeripheralCecAdapter::Process(void) SetMenuLanguage(language.language); } @@ -181,7 +181,7 @@ index a117d82..ab95dab 100644 while (!m_bStop) { -@@ -278,6 +298,8 @@ void CPeripheralCecAdapter::Process(void) +@@ -282,6 +302,8 @@ void CPeripheralCecAdapter::Process(void) if (!m_bStop) ProcessNextCommand(); if (!m_bStop) @@ -190,7 +190,7 @@ index a117d82..ab95dab 100644 Sleep(5); } -@@ -339,6 +361,125 @@ bool CPeripheralCecAdapter::SetHdmiPort(int iHdmiPort) +@@ -343,6 +365,125 @@ bool CPeripheralCecAdapter::SetHdmiPort(int iHdmiPort) return bReturn; } @@ -370,10 +370,10 @@ index 2fcbb1d..e1e302d 100644 1.7.5.4 -From e681e81cddcef74c3e74c7dc5d43f7484f8a4162 Mon Sep 17 00:00:00 2001 +From abc71c1114a9f493ba89e5346e5c0749338ff0d3 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Thu, 12 Jan 2012 22:18:31 +0100 -Subject: [PATCH 02/17] cec: set the HDMI port and the device to which the CEC +Subject: [PATCH 02/18] cec: set the HDMI port and the device to which the CEC adapter was connected, to be able to determine the correct physical address. this is a work around, until the CEC adapter's firmware supports physical @@ -381,15 +381,24 @@ Subject: [PATCH 02/17] cec: set the HDMI port and the device to which the CEC connected XBMC to something else than the TV --- - language/Dutch/strings.xml | 1 + + language/Dutch/strings.xml | 3 ++- language/English/strings.xml | 1 + system/peripherals.xml | 1 + xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 13 +++++++------ xbmc/peripherals/devices/PeripheralCecAdapter.h | 2 +- - 5 files changed, 11 insertions(+), 7 deletions(-) + 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/language/Dutch/strings.xml b/language/Dutch/strings.xml -index 58d0003..721bd73 100644 +index f1e3419..fd86371 100644 +--- a/language/Dutch/strings.xml ++++ b/language/Dutch/strings.xml +@@ -2403,4 +2403,5 @@ + Verbonden + Adapter gevonden, maar libcec is niet beschikbaar + Gebruik de taalinstelling van de TV +- ++ Verbonden met HDMI apparaat ++ \ No newline at end of file diff --git a/language/English/strings.xml b/language/English/strings.xml index ca2ac4d..fb5b8fb 100644 @@ -413,10 +422,10 @@ index f5cf50d..94b9d85 100644 diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp -index ab95dab..3e56070 100644 +index 88477df..6f7e1f5 100644 --- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp -@@ -235,8 +235,9 @@ void CPeripheralCecAdapter::Process(void) +@@ -239,8 +239,9 @@ void CPeripheralCecAdapter::Process(void) return; // set correct physical address from peripheral settings @@ -427,7 +436,7 @@ index ab95dab..3e56070 100644 FlushLog(); // open the CEC adapter -@@ -347,15 +348,15 @@ bool CPeripheralCecAdapter::SendPing(void) +@@ -351,15 +352,15 @@ bool CPeripheralCecAdapter::SendPing(void) return bReturn; } @@ -446,7 +455,7 @@ index ab95dab..3e56070 100644 } return bReturn; -@@ -863,9 +864,9 @@ void CPeripheralCecAdapter::OnSettingChanged(const CStdString &strChangedSetting +@@ -867,9 +868,9 @@ void CPeripheralCecAdapter::OnSettingChanged(const CStdString &strChangedSetting else if (bEnabled && !m_cecAdapter && m_bStarted) InitialiseFeature(FEATURE_CEC); } @@ -475,10 +484,10 @@ index e1e302d..768e38a 100644 1.7.5.4 -From 83a9ecf3e1e7125be5c824fc8584f190a091f911 Mon Sep 17 00:00:00 2001 +From 7ec1b7548f84b663ea6952d9952a90812ec523fb Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Tue, 3 Jan 2012 20:40:19 +0100 -Subject: [PATCH 03/17] cec: also mark XBMC as active source when powering up +Subject: [PATCH 03/18] cec: also mark XBMC as active source when powering up devices --- @@ -486,10 +495,10 @@ Subject: [PATCH 03/17] cec: also mark XBMC as active source when powering up 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp -index 3e56070..f524a0d 100644 +index 6f7e1f5..bc04f58 100644 --- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp -@@ -264,6 +264,7 @@ void CPeripheralCecAdapter::Process(void) +@@ -268,6 +268,7 @@ void CPeripheralCecAdapter::Process(void) if (GetSettingBool("cec_power_on_startup")) { PowerOnCecDevices(CECDEVICE_TV); @@ -501,44 +510,10 @@ index 3e56070..f524a0d 100644 1.7.5.4 -From 494f831383031c47858945595904cf0ed7d43e6c Mon Sep 17 00:00:00 2001 -From: Lars Op den Kamp -Date: Tue, 10 Jan 2012 11:56:34 +0100 -Subject: [PATCH 04/17] cec: delete m_dll when it's been created. fixes leak - when the libCEC version is invalid - ---- - xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 5 ++++- - 1 files changed, 4 insertions(+), 1 deletions(-) - -diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp -index f524a0d..250e7c6 100644 ---- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp -+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp -@@ -119,11 +119,14 @@ class DllLibCEC : public DllDynamic, DllLibCECInterface - m_bStop = true; - StopThread(true); - -- if (m_dll && m_cecAdapter) -+ if (m_cecAdapter) - { - FlushLog(); - m_dll->CECDestroy(m_cecAdapter); - m_cecAdapter = NULL; -+ } -+ if (m_dll) -+ { - delete m_dll; - m_dll = NULL; - } --- -1.7.5.4 - - -From fec1ac30a1c5b1c4e352536578ab28d59826cda7 Mon Sep 17 00:00:00 2001 +From 4eb02842120d960c78c95b67898bb3166b789259 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Wed, 11 Jan 2012 00:09:02 +0100 -Subject: [PATCH 05/17] cec: some TVs don't like us querying it while +Subject: [PATCH 04/18] cec: some TVs don't like us querying it while activating sources. moved the queries to a background thread, and only query after the TV reports power state active. @@ -549,10 +524,10 @@ Subject: [PATCH 05/17] cec: some TVs don't like us querying it while 2 files changed, 108 insertions(+), 40 deletions(-) diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp -index 250e7c6..67c37d5 100644 +index bc04f58..97cb1d8 100644 --- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp -@@ -260,9 +260,8 @@ void CPeripheralCecAdapter::Process(void) +@@ -261,9 +261,8 @@ void CPeripheralCecAdapter::Process(void) return; } @@ -563,7 +538,7 @@ index 250e7c6..67c37d5 100644 if (GetSettingBool("cec_power_on_startup")) { -@@ -271,31 +270,8 @@ void CPeripheralCecAdapter::Process(void) +@@ -272,31 +271,8 @@ void CPeripheralCecAdapter::Process(void) FlushLog(); } @@ -597,7 +572,7 @@ index 250e7c6..67c37d5 100644 while (!m_bStop) { -@@ -304,10 +280,12 @@ void CPeripheralCecAdapter::Process(void) +@@ -305,10 +281,12 @@ void CPeripheralCecAdapter::Process(void) ProcessNextCommand(); if (!m_bStop) ProcessVolumeChange(); @@ -610,7 +585,7 @@ index 250e7c6..67c37d5 100644 m_cecAdapter->Close(); CLog::Log(LOGDEBUG, "%s - CEC adapter processor thread ended", __FUNCTION__); -@@ -609,6 +587,15 @@ void CPeripheralCecAdapter::ProcessNextCommand(void) +@@ -610,6 +588,15 @@ void CPeripheralCecAdapter::ProcessNextCommand(void) } } break; @@ -626,7 +601,7 @@ index 250e7c6..67c37d5 100644 default: break; } -@@ -916,4 +903,65 @@ bool CPeripheralCecAdapter::TranslateComPort(CStdString &strLocation) +@@ -917,4 +904,65 @@ bool CPeripheralCecAdapter::TranslateComPort(CStdString &strLocation) return false; } @@ -767,10 +742,10 @@ index 768e38a..f10f2ea 100644 1.7.5.4 -From 28a24375bc43adaddb098569764593b54b649799 Mon Sep 17 00:00:00 2001 +From 2ccef5513bec1a5ddfe50470a7f1aee30d5b509d Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Thu, 12 Jan 2012 22:22:17 +0100 -Subject: [PATCH 06/17] cec: use callback methods instead of constant polling. +Subject: [PATCH 05/18] cec: use callback methods instead of constant polling. this requires libCEC 1.4.0 or higher --- @@ -779,18 +754,18 @@ Subject: [PATCH 06/17] cec: use callback methods instead of constant polling. 2 files changed, 76 insertions(+), 57 deletions(-) diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp -index 67c37d5..e79972f 100644 +index 97cb1d8..0565836 100644 --- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp @@ -121,7 +121,6 @@ class DllLibCEC : public DllDynamic, DllLibCECInterface - if (m_cecAdapter) + if (m_dll && m_cecAdapter) { - FlushLog(); m_dll->CECDestroy(m_cecAdapter); m_cecAdapter = NULL; - } -@@ -169,7 +168,6 @@ void CPeripheralCecAdapter::Announce(EAnnouncementFlag flag, const char *sender, + delete m_dll; +@@ -170,7 +169,6 @@ void CPeripheralCecAdapter::Announce(EAnnouncementFlag flag, const char *sender, if (!m_cecAdapter->Open(strPort.c_str(), 10000)) { CLog::Log(LOGERROR, "%s - failed to reconnect to the CEC adapter", __FUNCTION__); @@ -798,7 +773,7 @@ index 67c37d5..e79972f 100644 m_bStop = true; } else -@@ -237,11 +235,12 @@ void CPeripheralCecAdapter::Process(void) +@@ -238,11 +236,12 @@ void CPeripheralCecAdapter::Process(void) if (strPort.empty()) return; @@ -812,7 +787,7 @@ index 67c37d5..e79972f 100644 // open the CEC adapter CLog::Log(LOGDEBUG, "%s - opening a connection to the CEC adapter: %s", __FUNCTION__, strPort.c_str()); -@@ -253,21 +252,19 @@ void CPeripheralCecAdapter::Process(void) +@@ -254,21 +253,19 @@ void CPeripheralCecAdapter::Process(void) if (!m_cecAdapter->Open(strPort.c_str(), 10000)) { @@ -835,7 +810,7 @@ index 67c37d5..e79972f 100644 } m_queryThread = new CPeripheralCecAdapterQueryThread(this); -@@ -275,9 +272,6 @@ void CPeripheralCecAdapter::Process(void) +@@ -276,9 +273,6 @@ void CPeripheralCecAdapter::Process(void) while (!m_bStop) { @@ -845,7 +820,7 @@ index 67c37d5..e79972f 100644 if (!m_bStop) ProcessVolumeChange(); -@@ -524,10 +518,13 @@ void CPeripheralCecAdapter::SetMenuLanguage(const char *strLanguage) +@@ -525,10 +519,13 @@ void CPeripheralCecAdapter::SetMenuLanguage(const char *strLanguage) CLog::Log(LOGWARNING, "%s - TV menu language set to unknown value '%s'", __FUNCTION__, strLanguage); } @@ -862,7 +837,7 @@ index 67c37d5..e79972f 100644 { CLog::Log(LOGDEBUG, "%s - processing command: initiator=%1x destination=%1x opcode=%02x", __FUNCTION__, command.initiator, command.destination, command.opcode); -@@ -536,21 +533,21 @@ void CPeripheralCecAdapter::ProcessNextCommand(void) +@@ -537,21 +534,21 @@ void CPeripheralCecAdapter::ProcessNextCommand(void) case CEC_OPCODE_STANDBY: /* a device was put in standby mode */ CLog::Log(LOGDEBUG, "%s - device %1x was put in standby mode", __FUNCTION__, command.initiator); @@ -889,7 +864,7 @@ index 67c37d5..e79972f 100644 } break; case CEC_OPCODE_DECK_CONTROL: -@@ -558,11 +555,11 @@ void CPeripheralCecAdapter::ProcessNextCommand(void) +@@ -559,11 +556,11 @@ void CPeripheralCecAdapter::ProcessNextCommand(void) command.parameters.size == 1 && command.parameters[0] == CEC_DECK_CONTROL_MODE_STOP) { @@ -903,7 +878,7 @@ index 67c37d5..e79972f 100644 } break; case CEC_OPCODE_PLAY: -@@ -571,19 +568,19 @@ void CPeripheralCecAdapter::ProcessNextCommand(void) +@@ -572,19 +569,19 @@ void CPeripheralCecAdapter::ProcessNextCommand(void) { if (command.parameters[0] == CEC_PLAY_MODE_PLAY_FORWARD) { @@ -927,7 +902,7 @@ index 67c37d5..e79972f 100644 } } break; -@@ -591,15 +588,27 @@ void CPeripheralCecAdapter::ProcessNextCommand(void) +@@ -592,15 +589,27 @@ void CPeripheralCecAdapter::ProcessNextCommand(void) if (command.initiator == CECDEVICE_TV && command.parameters.size == 1 && command.parameters[0] == CEC_POWER_STATUS_ON && @@ -957,7 +932,7 @@ index 67c37d5..e79972f 100644 } bool CPeripheralCecAdapter::GetNextCecKey(cec_keypress &key) -@@ -612,10 +621,6 @@ bool CPeripheralCecAdapter::GetNextCecKey(cec_keypress &key) +@@ -613,10 +622,6 @@ bool CPeripheralCecAdapter::GetNextCecKey(cec_keypress &key) m_buttonQueue.pop(); bReturn = true; } @@ -968,7 +943,7 @@ index 67c37d5..e79972f 100644 return bReturn; } -@@ -861,35 +866,37 @@ void CPeripheralCecAdapter::OnSettingChanged(const CStdString &strChangedSetting +@@ -862,35 +867,37 @@ void CPeripheralCecAdapter::OnSettingChanged(const CStdString &strChangedSetting } } @@ -1031,7 +1006,7 @@ index 67c37d5..e79972f 100644 } bool CPeripheralCecAdapter::TranslateComPort(CStdString &strLocation) -@@ -964,4 +971,12 @@ void CPeripheralCecAdapterQueryThread::Process(void) +@@ -965,4 +972,12 @@ void CPeripheralCecAdapterQueryThread::Process(void) CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(36000), strNotification); } @@ -1079,68 +1054,10 @@ index f10f2ea..085b683 100644 1.7.5.4 -From 4243d50d70f631312a1d42497693d6827ff0fbc7 Mon Sep 17 00:00:00 2001 -From: Lars Op den Kamp -Date: Thu, 12 Jan 2012 22:22:37 +0100 -Subject: [PATCH 07/17] cec: these new features and fixes need libCEC v1.4.0 - or higher - ---- - configure.in | 2 +- - lib/libcec/Makefile | 2 +- - project/BuildDependencies/scripts/libcec_d.txt | 2 +- - tools/darwin/depends/libcec/Makefile | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/configure.in b/configure.in -index c55488c..a4ea21d 100755 ---- a/configure.in -+++ b/configure.in -@@ -1173,7 +1173,7 @@ 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 -- PKG_CHECK_MODULES([CEC],[libcec >= 1.1.0],,[use_libcec="no";AC_MSG_RESULT($libcec_disabled)]) -+ PKG_CHECK_MODULES([CEC],[libcec >= 1.4.0],,[use_libcec="no";AC_MSG_RESULT($libcec_disabled)]) - - if test "x$use_libcec" != "xno"; then - INCLUDES="$INCLUDES $CEC_CFLAGS" -diff --git a/lib/libcec/Makefile b/lib/libcec/Makefile -index 8776161..5ca2a54 100644 ---- a/lib/libcec/Makefile -+++ b/lib/libcec/Makefile -@@ -7,7 +7,7 @@ - - # lib name, version - LIBNAME=libcec --VERSION=1.2.0 -+VERSION=1.4.0 - SOURCE=$(LIBNAME)-$(VERSION) - - # download location and format -diff --git a/project/BuildDependencies/scripts/libcec_d.txt b/project/BuildDependencies/scripts/libcec_d.txt -index ec9df80..867d639 100644 -diff --git a/tools/darwin/depends/libcec/Makefile b/tools/darwin/depends/libcec/Makefile -index c6b44c0..e72dc10 100644 ---- a/tools/darwin/depends/libcec/Makefile -+++ b/tools/darwin/depends/libcec/Makefile -@@ -2,7 +2,7 @@ include ../Makefile.include - - # lib name, version - LIBNAME=libcec --VERSION=1.2.0 -+VERSION=1.4.0 - SOURCE=$(LIBNAME)-$(VERSION) - ARCHIVE=$(SOURCE).tar.gz - --- -1.7.5.4 - - -From 3ed60a169464b04400e21177ae3e2830ff5eaf48 Mon Sep 17 00:00:00 2001 +From 19e321b92bd480bcd6028c093071ae248f52dfab Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Wed, 25 Jan 2012 16:11:57 +0100 -Subject: [PATCH 08/17] cec: only send an inactive source messages when not +Subject: [PATCH 06/18] cec: only send an inactive source messages when not sending a power off command, or AVR devices will power up again @@ -1149,10 +1066,10 @@ Subject: [PATCH 08/17] cec: only send an inactive source messages when not 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp -index e79972f..8bb01d4 100644 +index 0565836..867085b 100644 --- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp -@@ -135,9 +135,10 @@ void CPeripheralCecAdapter::Announce(EAnnouncementFlag flag, const char *sender, +@@ -132,9 +132,10 @@ void CPeripheralCecAdapter::Announce(EAnnouncementFlag flag, const char *sender, { if (flag == System && !strcmp(sender, "xbmc") && !strcmp(message, "OnQuit") && m_bIsReady) { @@ -1168,10 +1085,10 @@ index e79972f..8bb01d4 100644 1.7.5.4 -From 3147e96475ab2fe0ebc9deba99b55d2b66e7f2ce Mon Sep 17 00:00:00 2001 +From e41eab29179fb54d82b429c9a17f4b4c9f3529a1 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Wed, 25 Jan 2012 16:31:14 +0100 -Subject: [PATCH 09/17] cec: removed the cec_debug_logging setting. always +Subject: [PATCH 07/18] cec: removed the cec_debug_logging setting. always show cec debug logging when debugging in XBMC is enabled @@ -1193,10 +1110,10 @@ index 94b9d85..72042ec 100644 diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp -index 8bb01d4..4d778ed 100644 +index 867085b..b42e064 100644 --- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp -@@ -887,8 +887,7 @@ int CPeripheralCecAdapter::CecLogMessage(void *cbParam, const cec_log_message &m +@@ -888,8 +888,7 @@ int CPeripheralCecAdapter::CecLogMessage(void *cbParam, const cec_log_message &m break; case CEC_LOG_TRAFFIC: case CEC_LOG_DEBUG: @@ -1210,18 +1127,95 @@ index 8bb01d4..4d778ed 100644 1.7.5.4 -From 133cd4d7994475047d65afc4a82a86118428b389 Mon Sep 17 00:00:00 2001 +From 46c0c583637744c4b8c52c6c450dbf29c9998362 Mon Sep 17 00:00:00 2001 +From: Lars Op den Kamp +Date: Sun, 29 Jan 2012 19:06:24 +0100 +Subject: [PATCH 08/18] cec: don't call libCEC directly from the GUI thread + +--- + xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 13 +++++++++++-- + xbmc/peripherals/devices/PeripheralCecAdapter.h | 2 ++ + 2 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +index b42e064..a686def 100644 +--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp ++++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +@@ -74,6 +74,7 @@ class DllLibCEC : public DllDynamic, DllLibCECInterface + m_bStarted(false), + m_bHasButton(false), + m_bIsReady(false), ++ m_bHasConnectedAudioSystem(false), + m_strMenuLanguage("???"), + m_lastKeypress(0), + m_lastChange(VOLUME_CHANGE_NONE) +@@ -342,7 +343,14 @@ bool CPeripheralCecAdapter::SetHdmiPort(int iDevice, int iHdmiPort) + + bool CPeripheralCecAdapter::HasConnectedAudioSystem(void) + { +- return m_cecAdapter && m_cecAdapter->IsActiveDeviceType(CEC_DEVICE_TYPE_AUDIO_SYSTEM); ++ CSingleLock lock(m_critSection); ++ return m_bHasConnectedAudioSystem; ++} ++ ++void CPeripheralCecAdapter::SetAudioSystemConnected(bool bSetTo) ++{ ++ CSingleLock lock(m_critSection); ++ m_bHasConnectedAudioSystem = bSetTo; + } + + void CPeripheralCecAdapter::ScheduleVolumeUp(void) +@@ -956,12 +964,13 @@ void CPeripheralCecAdapterQueryThread::Process(void) + + /* disable the mute setting when an amp is found, because the amp handles the mute setting and + set PCM output to 100% */ +- if (m_adapter->HasConnectedAudioSystem()) ++ if (m_adapter->m_cecAdapter->IsActiveDeviceType(CEC_DEVICE_TYPE_AUDIO_SYSTEM)) + { + 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); + strNotification.AppendFormat(" - %s", ampName.name); + ++ m_adapter->SetAudioSystemConnected(true); + g_settings.m_bMute = false; + g_settings.m_nVolumeLevel = VOLUME_MAXIMUM; + } +diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.h b/xbmc/peripherals/devices/PeripheralCecAdapter.h +index 085b683..54eef5f 100644 +--- a/xbmc/peripherals/devices/PeripheralCecAdapter.h ++++ b/xbmc/peripherals/devices/PeripheralCecAdapter.h +@@ -71,6 +71,7 @@ + virtual bool PowerOnCecDevices(CEC::cec_logical_address iLogicalAddress); + virtual bool StandbyCecDevices(CEC::cec_logical_address iLogicalAddress); + virtual bool HasConnectedAudioSystem(void); ++ virtual void SetAudioSystemConnected(bool bSetTo); + virtual void ScheduleVolumeUp(void); + virtual void VolumeUp(void); + virtual void ScheduleVolumeDown(void); +@@ -108,6 +109,7 @@ + bool m_bStarted; + bool m_bHasButton; + bool m_bIsReady; ++ bool m_bHasConnectedAudioSystem; + CStdString m_strMenuLanguage; + CDateTime m_screensaverLastActivated; + CecButtonPress m_button; +-- +1.7.5.4 + + +From cd3e1b4dfc7296332b4272ceac9a871796a5927c Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Thu, 26 Jan 2012 21:28:53 +0100 -Subject: [PATCH 10/17] peripherals: added an optional order to settings +Subject: [PATCH 09/18] peripherals: added an optional order to settings --- system/peripherals.xml | 28 ++++++++++---------- - xbmc/peripherals/Peripherals.cpp | 24 +++++++++++++++++ + xbmc/peripherals/Peripherals.cpp | 23 ++++++++++++++++ xbmc/peripherals/devices/Peripheral.cpp | 25 +++++++++++++++--- xbmc/peripherals/devices/Peripheral.h | 2 + .../dialogs/GUIDialogPeripheralSettings.cpp | 17 +++++------- - 5 files changed, 68 insertions(+), 28 deletions(-) + 5 files changed, 67 insertions(+), 28 deletions(-) diff --git a/system/peripherals.xml b/system/peripherals.xml index 72042ec..6c91e49 100644 @@ -1265,10 +1259,10 @@ index 72042ec..6c91e49 100644 diff --git a/xbmc/peripherals/Peripherals.cpp b/xbmc/peripherals/Peripherals.cpp -index 3868cc7..b586163 100644 +index 53ce5c2..7b24cd5 100644 --- a/xbmc/peripherals/Peripherals.cpp +++ b/xbmc/peripherals/Peripherals.cpp -@@ -438,6 +438,8 @@ bool CPeripherals::LoadMappings(void) +@@ -447,6 +447,8 @@ bool CPeripherals::LoadMappings(void) void CPeripherals::GetSettingsFromMappingsFile(TiXmlElement *xmlNode, map &m_settings) { TiXmlElement *currentNode = xmlNode->FirstChildElement("setting"); @@ -1277,7 +1271,7 @@ index 3868cc7..b586163 100644 while (currentNode) { CSetting *setting = NULL; -@@ -483,10 +485,32 @@ void CPeripherals::GetSettingsFromMappingsFile(TiXmlElement *xmlNode, mapAttribute("order")) -+ iOrder = atoi(currentNode->Attribute("order")); ++ currentNode->Attribute("order", &iOrder); + if (iOrder < 0) + iOrder = 0; + setting->SetOrder(iOrder); @@ -1467,10 +1460,10 @@ index c79f961..cc801ef 100644 1.7.5.4 -From 603eba55dd34c2846c87d5759ca106a0a718b5f8 Mon Sep 17 00:00:00 2001 +From 97953270d4f2a49e1e19a09c49ddd805fcc61f0e Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Fri, 27 Jan 2012 16:09:18 +0100 -Subject: [PATCH 11/17] peripherals: change the 'keymap_enabled' setting for +Subject: [PATCH 10/18] peripherals: change the 'keymap_enabled' setting for HID devices into 'do_not_use_custom_keymap', and hide the setting when the keymap is not configurable @@ -1585,173 +1578,106 @@ index ec0250d..48469cc 100644 1.7.5.4 -From 47c9aa665e5ffc62527f9b4d1e0aeca2cfbc1488 Mon Sep 17 00:00:00 2001 +From 5c86d3ce71842b1b293c8aaccc046dd732a733f0 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp -Date: Fri, 27 Jan 2012 19:41:01 +0100 -Subject: [PATCH 12/17] cec: updated to libCEC 1.4.2 +Date: Fri, 17 Feb 2012 12:48:41 +0100 +Subject: [PATCH 11/18] peripherals: use std::set for changed settings instead + of std::vector --- - lib/libcec/Makefile | 2 +- - project/BuildDependencies/scripts/libcec_d.txt | 2 +- - tools/darwin/depends/libcec/Makefile | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) + xbmc/peripherals/devices/Peripheral.cpp | 12 ++++++------ + xbmc/peripherals/devices/Peripheral.h | 4 ++-- + 2 files changed, 8 insertions(+), 8 deletions(-) -diff --git a/lib/libcec/Makefile b/lib/libcec/Makefile -index 5ca2a54..7da3164 100644 ---- a/lib/libcec/Makefile -+++ b/lib/libcec/Makefile -@@ -7,7 +7,7 @@ - - # lib name, version - LIBNAME=libcec --VERSION=1.4.0 -+VERSION=1.4.2 - SOURCE=$(LIBNAME)-$(VERSION) - - # download location and format -diff --git a/project/BuildDependencies/scripts/libcec_d.txt b/project/BuildDependencies/scripts/libcec_d.txt -index 867d639..4f2e2f1 100644 -diff --git a/tools/darwin/depends/libcec/Makefile b/tools/darwin/depends/libcec/Makefile -index e72dc10..abcaf2c 100644 ---- a/tools/darwin/depends/libcec/Makefile -+++ b/tools/darwin/depends/libcec/Makefile -@@ -2,7 +2,7 @@ include ../Makefile.include - - # lib name, version - LIBNAME=libcec --VERSION=1.4.0 -+VERSION=1.4.2 - SOURCE=$(LIBNAME)-$(VERSION) - ARCHIVE=$(SOURCE).tar.gz - --- -1.7.5.4 - - -From 6361244ae694c4a4bf96ceac49625fd71f4610e2 Mon Sep 17 00:00:00 2001 -From: Lars Op den Kamp -Date: Sun, 29 Jan 2012 19:06:24 +0100 -Subject: [PATCH 13/17] cec: don't call libCEC directly from the GUI thread - ---- - xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 13 +++++++++++-- - xbmc/peripherals/devices/PeripheralCecAdapter.h | 2 ++ - 2 files changed, 13 insertions(+), 2 deletions(-) - -diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp -index 4d778ed..0683fa6 100644 ---- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp -+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp -@@ -74,6 +74,7 @@ class DllLibCEC : public DllDynamic, DllLibCECInterface - m_bStarted(false), - m_bHasButton(false), - m_bIsReady(false), -+ m_bHasConnectedAudioSystem(false), - m_strMenuLanguage("???"), - m_lastKeypress(0), - m_lastChange(VOLUME_CHANGE_NONE) -@@ -341,7 +342,14 @@ bool CPeripheralCecAdapter::SetHdmiPort(int iDevice, int iHdmiPort) - - bool CPeripheralCecAdapter::HasConnectedAudioSystem(void) - { -- return m_cecAdapter && m_cecAdapter->IsActiveDeviceType(CEC_DEVICE_TYPE_AUDIO_SYSTEM); -+ CSingleLock lock(m_critSection); -+ return m_bHasConnectedAudioSystem; -+} -+ -+void CPeripheralCecAdapter::SetAudioSystemConnected(bool bSetTo) -+{ -+ CSingleLock lock(m_critSection); -+ m_bHasConnectedAudioSystem = bSetTo; - } - - void CPeripheralCecAdapter::ScheduleVolumeUp(void) -@@ -955,12 +963,13 @@ void CPeripheralCecAdapterQueryThread::Process(void) - - /* disable the mute setting when an amp is found, because the amp handles the mute setting and - set PCM output to 100% */ -- if (m_adapter->HasConnectedAudioSystem()) -+ if (m_adapter->m_cecAdapter->IsActiveDeviceType(CEC_DEVICE_TYPE_AUDIO_SYSTEM)) - { - 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); - strNotification.AppendFormat(" - %s", ampName.name); - -+ m_adapter->SetAudioSystemConnected(true); - g_settings.m_bMute = false; - g_settings.m_nVolumeLevel = VOLUME_MAXIMUM; +diff --git a/xbmc/peripherals/devices/Peripheral.cpp b/xbmc/peripherals/devices/Peripheral.cpp +index 11ec8b0..3d9a238 100644 +--- a/xbmc/peripherals/devices/Peripheral.cpp ++++ b/xbmc/peripherals/devices/Peripheral.cpp +@@ -340,7 +340,7 @@ void CPeripheral::SetSetting(const CStdString &strKey, bool bValue) + bool bChanged(boolSetting->GetData() != bValue); + boolSetting->SetData(bValue); + if (bChanged && m_bInitialised) +- m_changedSettings.push_back(strKey); ++ m_changedSettings.insert(strKey); + } } -diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.h b/xbmc/peripherals/devices/PeripheralCecAdapter.h -index 085b683..54eef5f 100644 ---- a/xbmc/peripherals/devices/PeripheralCecAdapter.h -+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.h -@@ -71,6 +71,7 @@ - virtual bool PowerOnCecDevices(CEC::cec_logical_address iLogicalAddress); - virtual bool StandbyCecDevices(CEC::cec_logical_address iLogicalAddress); - virtual bool HasConnectedAudioSystem(void); -+ virtual void SetAudioSystemConnected(bool bSetTo); - virtual void ScheduleVolumeUp(void); - virtual void VolumeUp(void); - virtual void ScheduleVolumeDown(void); -@@ -108,6 +109,7 @@ - bool m_bStarted; - bool m_bHasButton; - bool m_bIsReady; -+ bool m_bHasConnectedAudioSystem; - CStdString m_strMenuLanguage; - CDateTime m_screensaverLastActivated; - CecButtonPress m_button; + } +@@ -356,7 +356,7 @@ void CPeripheral::SetSetting(const CStdString &strKey, int iValue) + bool bChanged(intSetting->GetData() != iValue); + intSetting->SetData(iValue); + if (bChanged && m_bInitialised) +- m_changedSettings.push_back(strKey); ++ m_changedSettings.insert(strKey); + } + } + } +@@ -372,7 +372,7 @@ void CPeripheral::SetSetting(const CStdString &strKey, float fValue) + bool bChanged(floatSetting->GetData() != fValue); + floatSetting->SetData(fValue); + if (bChanged && m_bInitialised) +- m_changedSettings.push_back(strKey); ++ m_changedSettings.insert(strKey); + } + } + } +@@ -405,7 +405,7 @@ void CPeripheral::SetSetting(const CStdString &strKey, const CStdString &strValu + bool bChanged(!stringSetting->GetData().Equals(strValue)); + stringSetting->SetData(strValue); + if (bChanged && m_bInitialised) +- m_changedSettings.push_back(strKey); ++ m_changedSettings.insert(strKey); + } + } + else if ((*it).second->GetType() == SETTINGS_TYPE_INT) +@@ -468,7 +468,7 @@ void CPeripheral::PersistSettings(bool bExiting /* = false */) + + if (!bExiting) + { +- for (vector::iterator it = m_changedSettings.begin(); it != m_changedSettings.end(); it++) ++ for (set::const_iterator it = m_changedSettings.begin(); it != m_changedSettings.end(); it++) + OnSettingChanged(*it); + } + m_changedSettings.clear(); +@@ -499,7 +499,7 @@ void CPeripheral::ResetDefaultSettings(void) + map::iterator it = m_settings.begin(); + while (it != m_settings.end()) + { +- m_changedSettings.push_back((*it).first); ++ m_changedSettings.insert((*it).first); + ++it; + } + +diff --git a/xbmc/peripherals/devices/Peripheral.h b/xbmc/peripherals/devices/Peripheral.h +index 237cd62..1c6ca71b 100644 +--- a/xbmc/peripherals/devices/Peripheral.h ++++ b/xbmc/peripherals/devices/Peripheral.h +@@ -20,7 +20,7 @@ + * + */ + +-#include ++#include + #include "utils/StdString.h" + #include "peripherals/PeripheralTypes.h" + +@@ -167,6 +167,6 @@ + std::vector m_features; + std::vector m_subDevices; + std::map m_settings; +- std::vector m_changedSettings; ++ std::set m_changedSettings; + }; + } -- 1.7.5.4 -From ef988c31181e743c94e84f18c8e3c5faad8ecf3d Mon Sep 17 00:00:00 2001 +From 878c1e79ecc0e69e2fd587bbac1ac05872fee0ce Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp -Date: Tue, 7 Feb 2012 19:34:51 +0100 -Subject: [PATCH 14/17] cec: updated to libCEC 1.4.3 - ---- - lib/libcec/Makefile | 2 +- - project/BuildDependencies/scripts/libcec_d.txt | 2 +- - tools/darwin/depends/libcec/Makefile | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/lib/libcec/Makefile b/lib/libcec/Makefile -index 7da3164..4fb987a 100644 ---- a/lib/libcec/Makefile -+++ b/lib/libcec/Makefile -@@ -7,7 +7,7 @@ - - # lib name, version - LIBNAME=libcec --VERSION=1.4.2 -+VERSION=1.4.3 - SOURCE=$(LIBNAME)-$(VERSION) - - # download location and format -diff --git a/project/BuildDependencies/scripts/libcec_d.txt b/project/BuildDependencies/scripts/libcec_d.txt -index 4f2e2f1..8aee2c4 100644 -diff --git a/tools/darwin/depends/libcec/Makefile b/tools/darwin/depends/libcec/Makefile -index abcaf2c..3a37afe 100644 ---- a/tools/darwin/depends/libcec/Makefile -+++ b/tools/darwin/depends/libcec/Makefile -@@ -2,7 +2,7 @@ include ../Makefile.include - - # lib name, version - LIBNAME=libcec --VERSION=1.4.2 -+VERSION=1.4.3 - SOURCE=$(LIBNAME)-$(VERSION) - ARCHIVE=$(SOURCE).tar.gz - --- -1.7.5.4 - - -From 25a2708cac01b6e0b5a2addbf5210d3e7037a4c6 Mon Sep 17 00:00:00 2001 -From: Lars Op den Kamp -Date: Thu, 16 Feb 2012 19:40:16 +0100 -Subject: [PATCH 15/17] cec: updated to libCEC 1.5.0 +Date: Mon, 19 Mar 2012 16:45:55 +0100 +Subject: [PATCH 12/18] cec: updated to libCEC 1.5. uses struct + libcec_configuration to get and set the config in + libCEC. --- configure.in | 2 +- @@ -1762,25 +1688,53 @@ Subject: [PATCH 15/17] cec: updated to libCEC 1.5.0 project/BuildDependencies/scripts/libcec_d.txt | 2 +- system/peripherals.xml | 24 +- tools/darwin/depends/libcec/Makefile | 2 +- - xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 425 ++++++++++++++------- + xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 422 ++++++++++++++------- xbmc/peripherals/devices/PeripheralCecAdapter.h | 17 +- - 10 files changed, 324 insertions(+), 179 deletions(-) + 10 files changed, 321 insertions(+), 179 deletions(-) diff --git a/configure.in b/configure.in -index a4ea21d..270dab3 100755 +index bca9239..e6f04df 100755 --- a/configure.in +++ b/configure.in @@ -1173,7 +1173,7 @@ 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 -- PKG_CHECK_MODULES([CEC],[libcec >= 1.4.0],,[use_libcec="no";AC_MSG_RESULT($libcec_disabled)]) +- PKG_CHECK_MODULES([CEC],[libcec >= 1.1.0],,[use_libcec="no";AC_MSG_RESULT($libcec_disabled)]) + PKG_CHECK_MODULES([CEC],[libcec >= 1.5.0],,[use_libcec="no";AC_MSG_RESULT($libcec_disabled)]) if test "x$use_libcec" != "xno"; then INCLUDES="$INCLUDES $CEC_CFLAGS" diff --git a/language/Dutch/strings.xml b/language/Dutch/strings.xml -index 721bd73..b398189 100644 +index fd86371..545cc33 100644 +--- a/language/Dutch/strings.xml ++++ b/language/Dutch/strings.xml +@@ -2391,17 +2391,20 @@ + Druk op "user" knop commando + Schakel commando's in bij het wisselen van kant + Kon de adapter niet openen +- Schakel de TV in bij het opstarten van XBMC ++ Schakel apparatuur in bij het opstarten van XBMC + Schakel apparatuur uit bij het stoppen van XBMC + Schakel app. uit zolang de schermbeveiliging actief is + +- Kon de CEC poort niet detecteren. Stel het manueel in. +- Kon de CEC adapter niet detecteren. +- Versie %d van de libcec interface version wordt niet ondersteund door XBMC (> %d) ++ Kon de COM poort niet detecteren. Stel het manueel in. ++ Kon de CEC adapter niet initialiseren. ++ Versie %d van de libCEC interface version wordt niet ondersteund door XBMC (> %d) + Zet XBMC in standby wanneer de TV uitgeschakeld wordt + HDMI poort nummer + Verbonden +- Adapter gevonden, maar libcec is niet beschikbaar ++ Adapter gevonden, maar libCEC is niet beschikbaar + Gebruik de taalinstelling van de TV + Verbonden met HDMI apparaat ++ Maak XBMC de actieve bron bij het opstarten ++ Physiek adres (overschrijft HDMI poort) ++ COM poort (laat leeg, tenzij noodzakelijk) + \ No newline at end of file diff --git a/language/English/strings.xml b/language/English/strings.xml index 9c7caaf..27487f4 100644 @@ -1813,14 +1767,14 @@ index 9c7caaf..27487f4 100644 + COM port (leave empty unless needed) diff --git a/lib/libcec/Makefile b/lib/libcec/Makefile -index 4fb987a..d9af688 100644 +index 8776161..d9af688 100644 --- a/lib/libcec/Makefile +++ b/lib/libcec/Makefile @@ -7,7 +7,7 @@ # lib name, version LIBNAME=libcec --VERSION=1.4.3 +-VERSION=1.2.0 +VERSION=1.5.0 SOURCE=$(LIBNAME)-$(VERSION) @@ -1828,7 +1782,7 @@ index 4fb987a..d9af688 100644 diff --git a/project/BuildDependencies/scripts/libcec_d.bat b/project/BuildDependencies/scripts/libcec_d.bat index 27160b4..86a2797 100644 diff --git a/project/BuildDependencies/scripts/libcec_d.txt b/project/BuildDependencies/scripts/libcec_d.txt -index 8aee2c4..0f70461 100644 +index ec9df80..0f70461 100644 diff --git a/system/peripherals.xml b/system/peripherals.xml index 4e2142d..1df6f1a 100644 --- a/system/peripherals.xml @@ -1865,20 +1819,20 @@ index 4e2142d..1df6f1a 100644 diff --git a/tools/darwin/depends/libcec/Makefile b/tools/darwin/depends/libcec/Makefile -index 3a37afe..be4ee35 100644 +index c6b44c0..be4ee35 100644 --- a/tools/darwin/depends/libcec/Makefile +++ b/tools/darwin/depends/libcec/Makefile @@ -2,7 +2,7 @@ include ../Makefile.include # lib name, version LIBNAME=libcec --VERSION=1.4.3 +-VERSION=1.2.0 +VERSION=1.5.0 SOURCE=$(LIBNAME)-$(VERSION) ARCHIVE=$(SOURCE).tar.gz diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp -index 0683fa6..7fed634 100644 +index a686def..645ca4f 100644 --- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp @@ -18,8 +18,8 @@ @@ -1970,7 +1924,7 @@ index 0683fa6..7fed634 100644 } CPeripheralCecAdapter::~CPeripheralCecAdapter(void) -@@ -136,49 +110,59 @@ void CPeripheralCecAdapter::Announce(EAnnouncementFlag flag, const char *sender, +@@ -133,53 +107,60 @@ void CPeripheralCecAdapter::Announce(EAnnouncementFlag flag, const char *sender, { if (flag == System && !strcmp(sender, "xbmc") && !strcmp(message, "OnQuit") && m_bIsReady) { @@ -2007,15 +1961,16 @@ index 0683fa6..7fed634 100644 - else if (flag == GUI && !strcmp(sender, "xbmc") && !strcmp(message, "OnScreensaverActivated") && GetSettingBool("cec_standby_screensaver")) + else if (flag == GUI && !strcmp(sender, "xbmc") && !strcmp(message, "OnScreensaverActivated") && m_bIsReady) { -- m_screensaverLastActivated = CDateTime::GetCurrentDateTime(); -- m_cecAdapter->StandbyDevices(); -+ if (m_configuration.bPowerOffScreensaver == 1) -+ { -+ m_screensaverLastActivated = CDateTime::GetCurrentDateTime(); + // Don't put devices to standby if application is currently playing +- if (!g_application.IsPlaying() || g_application.IsPaused()) ++ if ((!g_application.IsPlaying() || g_application.IsPaused()) && m_configuration.bPowerOffScreensaver == 1) + { + m_screensaverLastActivated = CDateTime::GetCurrentDateTime(); +- m_cecAdapter->StandbyDevices(); + // only power off when we're the active source + if (m_cecAdapter->IsLibCECActiveSource()) + m_cecAdapter->StandbyDevices(CECDEVICE_BROADCAST); -+ } + } } else if (flag == System && !strcmp(sender, "xbmc") && !strcmp(message, "OnSleep")) { @@ -2056,7 +2011,7 @@ index 0683fa6..7fed634 100644 } } -@@ -186,6 +170,41 @@ bool CPeripheralCecAdapter::InitialiseFeature(const PeripheralFeature feature) +@@ -187,6 +168,41 @@ bool CPeripheralCecAdapter::InitialiseFeature(const PeripheralFeature feature) { if (feature == FEATURE_CEC && !m_bStarted) { @@ -2098,7 +2053,7 @@ index 0683fa6..7fed634 100644 m_bStarted = true; Create(); } -@@ -224,25 +243,20 @@ CStdString CPeripheralCecAdapter::GetComPort(void) +@@ -225,25 +241,20 @@ CStdString CPeripheralCecAdapter::GetComPort(void) return strPort; } @@ -2129,7 +2084,7 @@ index 0683fa6..7fed634 100644 // open the CEC adapter CLog::Log(LOGDEBUG, "%s - opening a connection to the CEC adapter: %s", __FUNCTION__, strPort.c_str()); -@@ -252,24 +266,43 @@ void CPeripheralCecAdapter::Process(void) +@@ -253,24 +264,43 @@ void CPeripheralCecAdapter::Process(void) strMessage.Format(g_localizeStrings.Get(21336), g_localizeStrings.Get(36000)); CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(36000), strMessage); @@ -2185,7 +2140,7 @@ index 0683fa6..7fed634 100644 m_queryThread->Create(false); while (!m_bStop) -@@ -282,62 +315,19 @@ void CPeripheralCecAdapter::Process(void) +@@ -283,62 +313,19 @@ void CPeripheralCecAdapter::Process(void) } delete m_queryThread; @@ -2207,7 +2162,7 @@ index 0683fa6..7fed634 100644 - - return bReturn; -} - +- -bool CPeripheralCecAdapter::StandbyCecDevices(cec_logical_address iLogicalAddress) -{ - bool bReturn(false); @@ -2220,7 +2175,7 @@ index 0683fa6..7fed634 100644 - - return bReturn; -} -- + -bool CPeripheralCecAdapter::SendPing(void) -{ - bool bReturn(false); @@ -2256,7 +2211,7 @@ index 0683fa6..7fed634 100644 } bool CPeripheralCecAdapter::HasConnectedAudioSystem(void) -@@ -542,7 +532,7 @@ int CPeripheralCecAdapter::CecCommand(void *cbParam, const cec_command &command) +@@ -543,7 +530,7 @@ int CPeripheralCecAdapter::CecCommand(void *cbParam, const cec_command &command) case CEC_OPCODE_STANDBY: /* a device was put in standby mode */ CLog::Log(LOGDEBUG, "%s - device %1x was put in standby mode", __FUNCTION__, command.initiator); @@ -2265,7 +2220,7 @@ index 0683fa6..7fed634 100644 (!adapter->m_screensaverLastActivated.IsValid() || CDateTime::GetCurrentDateTime() - adapter->m_screensaverLastActivated > CDateTimeSpan(0, 0, 0, SCREENSAVER_TIMEOUT))) { adapter->m_bStarted = false; -@@ -550,7 +540,7 @@ int CPeripheralCecAdapter::CecCommand(void *cbParam, const cec_command &command) +@@ -551,7 +538,7 @@ int CPeripheralCecAdapter::CecCommand(void *cbParam, const cec_command &command) } break; case CEC_OPCODE_SET_MENU_LANGUAGE: @@ -2274,7 +2229,7 @@ index 0683fa6..7fed634 100644 { char strNewLanguage[4]; for (int iPtr = 0; iPtr < 3; iPtr++) -@@ -609,6 +599,17 @@ int CPeripheralCecAdapter::CecCommand(void *cbParam, const cec_command &command) +@@ -610,6 +597,17 @@ int CPeripheralCecAdapter::CecCommand(void *cbParam, const cec_command &command) return 1; } @@ -2292,7 +2247,7 @@ index 0683fa6..7fed634 100644 int CPeripheralCecAdapter::CecKeyPress(void *cbParam, const cec_keypress &key) { CPeripheralCecAdapter *adapter = (CPeripheralCecAdapter *)cbParam; -@@ -869,9 +870,10 @@ void CPeripheralCecAdapter::OnSettingChanged(const CStdString &strChangedSetting +@@ -870,9 +868,10 @@ void CPeripheralCecAdapter::OnSettingChanged(const CStdString &strChangedSetting else if (bEnabled && !m_cecAdapter && m_bStarted) InitialiseFeature(FEATURE_CEC); } @@ -2305,7 +2260,7 @@ index 0683fa6..7fed634 100644 } } -@@ -919,9 +921,10 @@ bool CPeripheralCecAdapter::TranslateComPort(CStdString &strLocation) +@@ -920,9 +919,10 @@ bool CPeripheralCecAdapter::TranslateComPort(CStdString &strLocation) return false; } @@ -2318,7 +2273,7 @@ index 0683fa6..7fed634 100644 { m_event.Reset(); } -@@ -950,7 +953,7 @@ void CPeripheralCecAdapterQueryThread::Process(void) +@@ -951,7 +951,7 @@ void CPeripheralCecAdapterQueryThread::Process(void) bContinue = true; }while(!bContinue); @@ -2327,7 +2282,7 @@ index 0683fa6..7fed634 100644 { cec_menu_language language; if (m_adapter->m_cecAdapter->GetDeviceMenuLanguage(CECDEVICE_TV, &language)) -@@ -980,12 +983,140 @@ void CPeripheralCecAdapterQueryThread::Process(void) +@@ -981,12 +981,140 @@ void CPeripheralCecAdapterQueryThread::Process(void) CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(36000), strNotification); } @@ -2392,7 +2347,11 @@ index 0683fa6..7fed634 100644 +} + +void CPeripheralCecAdapter::SetConfigurationFromSettings(void) -+{ + { +- m_callbacks.CBCecLogMessage = &CecLogMessage; +- m_callbacks.CBCecKeyPress = &CecKeyPress; +- m_callbacks.CBCecCommand = &CecCommand; +- m_cecAdapter->EnableCallbacks(this, &m_callbacks); + // client version 1.5.0 + m_configuration.clientVersion = CEC_CLIENT_VERSION_1_5_0; + @@ -2455,11 +2414,7 @@ index 0683fa6..7fed634 100644 +} + +void CPeripheralCecAdapter::ReadLogicalAddresses(const CStdString &strString, cec_logical_addresses &addresses) - { -- m_callbacks.CBCecLogMessage = &CecLogMessage; -- m_callbacks.CBCecKeyPress = &CecKeyPress; -- m_callbacks.CBCecCommand = &CecCommand; -- m_cecAdapter->EnableCallbacks(this, &m_callbacks); ++{ + for (size_t iPtr = 0; iPtr < strString.size(); iPtr++) + { + CStdString strDevice = CStdString(strString.substr(iPtr, 1)).Trim(); @@ -2548,104 +2503,10 @@ index 54eef5f..9de351d 100644 1.7.5.4 -From 330968b652de0f357cc95e1aafa0aaf94f881cc5 Mon Sep 17 00:00:00 2001 -From: Lars Op den Kamp -Date: Fri, 17 Feb 2012 12:48:41 +0100 -Subject: [PATCH 16/17] peripherals: use std::set for changed settings instead - of std::vector - ---- - xbmc/peripherals/devices/Peripheral.cpp | 12 ++++++------ - xbmc/peripherals/devices/Peripheral.h | 4 ++-- - 2 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/xbmc/peripherals/devices/Peripheral.cpp b/xbmc/peripherals/devices/Peripheral.cpp -index 11ec8b0..3d9a238 100644 ---- a/xbmc/peripherals/devices/Peripheral.cpp -+++ b/xbmc/peripherals/devices/Peripheral.cpp -@@ -340,7 +340,7 @@ void CPeripheral::SetSetting(const CStdString &strKey, bool bValue) - bool bChanged(boolSetting->GetData() != bValue); - boolSetting->SetData(bValue); - if (bChanged && m_bInitialised) -- m_changedSettings.push_back(strKey); -+ m_changedSettings.insert(strKey); - } - } - } -@@ -356,7 +356,7 @@ void CPeripheral::SetSetting(const CStdString &strKey, int iValue) - bool bChanged(intSetting->GetData() != iValue); - intSetting->SetData(iValue); - if (bChanged && m_bInitialised) -- m_changedSettings.push_back(strKey); -+ m_changedSettings.insert(strKey); - } - } - } -@@ -372,7 +372,7 @@ void CPeripheral::SetSetting(const CStdString &strKey, float fValue) - bool bChanged(floatSetting->GetData() != fValue); - floatSetting->SetData(fValue); - if (bChanged && m_bInitialised) -- m_changedSettings.push_back(strKey); -+ m_changedSettings.insert(strKey); - } - } - } -@@ -405,7 +405,7 @@ void CPeripheral::SetSetting(const CStdString &strKey, const CStdString &strValu - bool bChanged(!stringSetting->GetData().Equals(strValue)); - stringSetting->SetData(strValue); - if (bChanged && m_bInitialised) -- m_changedSettings.push_back(strKey); -+ m_changedSettings.insert(strKey); - } - } - else if ((*it).second->GetType() == SETTINGS_TYPE_INT) -@@ -468,7 +468,7 @@ void CPeripheral::PersistSettings(bool bExiting /* = false */) - - if (!bExiting) - { -- for (vector::iterator it = m_changedSettings.begin(); it != m_changedSettings.end(); it++) -+ for (set::const_iterator it = m_changedSettings.begin(); it != m_changedSettings.end(); it++) - OnSettingChanged(*it); - } - m_changedSettings.clear(); -@@ -499,7 +499,7 @@ void CPeripheral::ResetDefaultSettings(void) - map::iterator it = m_settings.begin(); - while (it != m_settings.end()) - { -- m_changedSettings.push_back((*it).first); -+ m_changedSettings.insert((*it).first); - ++it; - } - -diff --git a/xbmc/peripherals/devices/Peripheral.h b/xbmc/peripherals/devices/Peripheral.h -index 237cd62..1c6ca71b 100644 ---- a/xbmc/peripherals/devices/Peripheral.h -+++ b/xbmc/peripherals/devices/Peripheral.h -@@ -20,7 +20,7 @@ - * - */ - --#include -+#include - #include "utils/StdString.h" - #include "peripherals/PeripheralTypes.h" - -@@ -167,6 +167,6 @@ - std::vector m_features; - std::vector m_subDevices; - std::map m_settings; -- std::vector m_changedSettings; -+ std::set m_changedSettings; - }; - } --- -1.7.5.4 - - -From 7cf28db5f6868b86d90594d5ba503dced8ea5fca Mon Sep 17 00:00:00 2001 +From 7d03a9a7c37eab5891872eb93a5301f42cf0e7e8 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Fri, 17 Feb 2012 14:05:42 +0100 -Subject: [PATCH 17/17] cec: update settings async, so we don't block the gui +Subject: [PATCH 13/18] cec: update settings async, so we don't block the gui thread when the OK button is pressed --- @@ -2666,10 +2527,10 @@ index 27487f4..1dc30d9 100644 + Failed to set the new configuration. Please check your settings. diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp -index 7fed634..32e21ef 100644 +index 645ca4f..ef89bce 100644 --- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp -@@ -302,7 +302,7 @@ void CPeripheralCecAdapter::Process(void) +@@ -300,7 +300,7 @@ void CPeripheralCecAdapter::Process(void) CAnnouncementManager::AddAnnouncer(this); @@ -2678,7 +2539,7 @@ index 7fed634..32e21ef 100644 m_queryThread->Create(false); while (!m_bStop) -@@ -873,7 +873,7 @@ void CPeripheralCecAdapter::OnSettingChanged(const CStdString &strChangedSetting +@@ -871,7 +871,7 @@ void CPeripheralCecAdapter::OnSettingChanged(const CStdString &strChangedSetting else { SetConfigurationFromSettings(); @@ -2687,7 +2548,7 @@ index 7fed634..32e21ef 100644 } } -@@ -921,68 +921,6 @@ bool CPeripheralCecAdapter::TranslateComPort(CStdString &strLocation) +@@ -919,68 +919,6 @@ bool CPeripheralCecAdapter::TranslateComPort(CStdString &strLocation) return false; } @@ -2756,7 +2617,7 @@ index 7fed634..32e21ef 100644 void CPeripheralCecAdapter::SetConfigurationFromLibCEC(const CEC::libcec_configuration &config) { // set the primary device type -@@ -1119,4 +1057,157 @@ void CPeripheralCecAdapter::ReadLogicalAddresses(const CStdString &strString, ce +@@ -1117,4 +1055,157 @@ void CPeripheralCecAdapter::ReadLogicalAddresses(const CStdString &strString, ce } } @@ -2980,3 +2841,472 @@ index 9de351d..1eadca2 100644 -- 1.7.5.4 + +From e0206eb915349f7fc056cec7e80066a02af51edd Mon Sep 17 00:00:00 2001 +From: Lars Op den Kamp +Date: Mon, 27 Feb 2012 20:49:08 +0100 +Subject: [PATCH 14/18] cec: don't send an inactive source message / standby + command directly when receiving the OnQuit + notification, but just stop the thread. fixes 'double + standby' commands being sent. bugzid: 439 + +--- + xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 11 +---------- + 1 files changed, 1 insertions(+), 10 deletions(-) + +diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +index ef89bce..99346ae 100644 +--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp ++++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +@@ -107,16 +107,7 @@ void CPeripheralCecAdapter::Announce(EAnnouncementFlag flag, const char *sender, + { + if (flag == System && !strcmp(sender, "xbmc") && !strcmp(message, "OnQuit") && m_bIsReady) + { +- // only send power off and inactive source command when we're currently active +- if (m_cecAdapter->IsLibCECActiveSource()) +- { +- // if there are any devices to power off set, power them off +- if (!m_configuration.powerOffDevices.IsEmpty()) +- m_cecAdapter->StandbyDevices(CECDEVICE_BROADCAST); +- // send an inactive source command otherwise +- else +- m_cecAdapter->SetInactiveView(); +- } ++ StopThread(false); + } + else if (flag == GUI && !strcmp(sender, "xbmc") && !strcmp(message, "OnScreensaverDeactivated") && m_bIsReady) + { +-- +1.7.5.4 + + +From fd9ba787f368b2eeee89b290b580a93443a804e9 Mon Sep 17 00:00:00 2001 +From: Lars Op den Kamp +Date: Mon, 27 Feb 2012 21:58:10 +0100 +Subject: [PATCH 15/18] cec: added an option to configure whether or not to + send an 'inactive source' message. bugzid: 439 + +--- + language/Dutch/strings.xml | 3 +++ + language/English/strings.xml | 1 + + lib/libcec/Makefile | 2 +- + project/BuildDependencies/scripts/libcec_d.txt | 2 +- + system/peripherals.xml | 21 +++++++++++---------- + tools/darwin/depends/libcec/Makefile | 2 +- + xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 17 +++++++++++------ + 7 files changed, 29 insertions(+), 19 deletions(-) + +diff --git a/language/Dutch/strings.xml b/language/Dutch/strings.xml +index 545cc33..8452a88 100644 +--- a/language/Dutch/strings.xml ++++ b/language/Dutch/strings.xml +@@ -2407,4 +2407,7 @@ + Maak XBMC de actieve bron bij het opstarten + Physiek adres (overschrijft HDMI poort) + COM poort (laat leeg, tenzij noodzakelijk) ++ Configuratie aangepast ++ Kon de nieuwe configuratie niet instellen. Controleer de instellingen. ++ Verstuur 'inactieve bron' commando bij het stoppen + +\ No newline at end of file +diff --git a/language/English/strings.xml b/language/English/strings.xml +index 1dc30d9..c60e728 100644 +--- a/language/English/strings.xml ++++ b/language/English/strings.xml +@@ -2411,4 +2411,5 @@ + COM port (leave empty unless needed) + Configuration updated + Failed to set the new configuration. Please check your settings. ++ Send 'inactive source' command when stopping XBMC + +diff --git a/lib/libcec/Makefile b/lib/libcec/Makefile +index d9af688..27eb5d2 100644 +--- a/lib/libcec/Makefile ++++ b/lib/libcec/Makefile +@@ -7,7 +7,7 @@ + + # lib name, version + LIBNAME=libcec +-VERSION=1.5.0 ++VERSION=1.5.1 + SOURCE=$(LIBNAME)-$(VERSION) + + # download location and format +diff --git a/project/BuildDependencies/scripts/libcec_d.txt b/project/BuildDependencies/scripts/libcec_d.txt +index 0f70461..9aa0d55 100644 +diff --git a/system/peripherals.xml b/system/peripherals.xml +index 1df6f1a..c6852f7 100644 +--- a/system/peripherals.xml ++++ b/system/peripherals.xml +@@ -10,18 +10,19 @@ + + + +- +- +- ++ ++ ++ + +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ + +- ++ + + + +diff --git a/tools/darwin/depends/libcec/Makefile b/tools/darwin/depends/libcec/Makefile +index be4ee35..abba42d 100644 +--- a/tools/darwin/depends/libcec/Makefile ++++ b/tools/darwin/depends/libcec/Makefile +@@ -2,7 +2,7 @@ include ../Makefile.include + + # lib name, version + LIBNAME=libcec +-VERSION=1.5.0 ++VERSION=1.5.1 + SOURCE=$(LIBNAME)-$(VERSION) + ARCHIVE=$(SOURCE).tar.gz + +diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +index 99346ae..a8fbf48 100644 +--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp ++++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +@@ -309,7 +309,7 @@ void CPeripheralCecAdapter::Process(void) + { + if (m_configuration.bPowerOffOnStandby == 1) + m_cecAdapter->StandbyDevices(); +- else ++ else if (m_configuration.bSendInactiveSource == 1) + m_cecAdapter->SetInactiveView(); + } + +@@ -956,23 +956,27 @@ void CPeripheralCecAdapter::SetConfigurationFromLibCEC(const CEC::libcec_configu + SetSetting("wake_devices", strPowerOffDevices.Trim()); + + // set the boolean settings +- m_configuration.bUseTVMenuLanguage = m_configuration.bUseTVMenuLanguage; ++ m_configuration.bUseTVMenuLanguage = config.bUseTVMenuLanguage; + SetSetting("use_tv_menu_language", m_configuration.bUseTVMenuLanguage == 1); + +- m_configuration.bActivateSource = m_configuration.bActivateSource; ++ m_configuration.bActivateSource = config.bActivateSource; + SetSetting("activate_source", m_configuration.bActivateSource == 1); + +- m_configuration.bPowerOffScreensaver = m_configuration.bPowerOffScreensaver; ++ m_configuration.bPowerOffScreensaver = config.bPowerOffScreensaver; + SetSetting("cec_standby_screensaver", m_configuration.bPowerOffScreensaver == 1); + +- m_configuration.bPowerOffOnStandby = m_configuration.bPowerOffOnStandby; ++ m_configuration.bPowerOffOnStandby = config.bPowerOffOnStandby; + SetSetting("standby_pc_on_tv_standby", m_configuration.bPowerOffOnStandby == 1); ++ ++ if (config.serverVersion >= CEC_SERVER_VERSION_1_5_1) ++ m_configuration.bSendInactiveSource = config.bSendInactiveSource; ++ SetSetting("send_inactive_source", m_configuration.bSendInactiveSource == 1); + } + + void CPeripheralCecAdapter::SetConfigurationFromSettings(void) + { + // client version 1.5.0 +- m_configuration.clientVersion = CEC_CLIENT_VERSION_1_5_0; ++ m_configuration.clientVersion = CEC_CLIENT_VERSION_1_5_1; + + // device name 'XBMC' + snprintf(m_configuration.strDeviceName, 13, "%s", GetSettingString("device_name").c_str()); +@@ -1030,6 +1034,7 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void) + m_configuration.bActivateSource = GetSettingBool("activate_source") ? 1 : 0; + m_configuration.bPowerOffScreensaver = GetSettingBool("cec_standby_screensaver") ? 1 : 0; + m_configuration.bPowerOffOnStandby = GetSettingBool("standby_pc_on_tv_standby") ? 1 : 0; ++ m_configuration.bSendInactiveSource = GetSettingBool("send_inactive_source") ? 1 : 0; + } + + void CPeripheralCecAdapter::ReadLogicalAddresses(const CStdString &strString, cec_logical_addresses &addresses) +-- +1.7.5.4 + + +From 0eccc2b66ec49b9fbee7bbe9d0894e8b3658cf7a Mon Sep 17 00:00:00 2001 +From: Lars Op den Kamp +Date: Mon, 27 Feb 2012 22:13:45 +0100 +Subject: [PATCH 16/18] cec: don't send standby or inactive source messages + when rebooting + +--- + xbmc/Application.cpp | 3 +- + xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 28 ++++++++++++++++---- + xbmc/peripherals/devices/PeripheralCecAdapter.h | 1 + + 3 files changed, 25 insertions(+), 7 deletions(-) + +diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp +index c09c6d9..2b50388 100644 +--- a/xbmc/Application.cpp ++++ b/xbmc/Application.cpp +@@ -3308,7 +3308,8 @@ void CApplication::Stop(int exitCode) + { + try + { +- CAnnouncementManager::Announce(System, "xbmc", "OnQuit"); ++ CVariant vExitCode(exitCode); ++ CAnnouncementManager::Announce(System, "xbmc", "OnQuit", vExitCode); + + // cancel any jobs from the jobmanager + CJobManager::GetInstance().CancelJobs(); +diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +index a8fbf48..ca5ada1 100644 +--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp ++++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +@@ -33,6 +33,7 @@ + #include "settings/GUISettings.h" + #include "settings/Settings.h" + #include "utils/log.h" ++#include "utils/Variant.h" + + #include + +@@ -77,7 +78,8 @@ class DllLibCEC : public DllDynamic, DllLibCECInterface + m_bHasConnectedAudioSystem(false), + m_strMenuLanguage("???"), + m_lastKeypress(0), +- m_lastChange(VOLUME_CHANGE_NONE) ++ m_lastChange(VOLUME_CHANGE_NONE), ++ m_iExitCode(0) + { + m_button.iButton = 0; + m_button.iDuration = 0; +@@ -107,6 +109,7 @@ void CPeripheralCecAdapter::Announce(EAnnouncementFlag flag, const char *sender, + { + if (flag == System && !strcmp(sender, "xbmc") && !strcmp(message, "OnQuit") && m_bIsReady) + { ++ m_iExitCode = data.asInteger(0); + StopThread(false); + } + else if (flag == GUI && !strcmp(sender, "xbmc") && !strcmp(message, "OnScreensaverDeactivated") && m_bIsReady) +@@ -305,12 +308,25 @@ void CPeripheralCecAdapter::Process(void) + + delete m_queryThread; + +- if (m_cecAdapter->IsLibCECActiveSource()) ++ if (m_iExitCode != EXITCODE_REBOOT) + { +- if (m_configuration.bPowerOffOnStandby == 1) +- m_cecAdapter->StandbyDevices(); +- else if (m_configuration.bSendInactiveSource == 1) +- m_cecAdapter->SetInactiveView(); ++ if (m_cecAdapter->IsLibCECActiveSource()) ++ { ++ if (!m_configuration.powerOffDevices.IsEmpty()) ++ { ++ CLog::Log(LOGDEBUG, "%s - sending standby commands", __FUNCTION__); ++ m_cecAdapter->StandbyDevices(); ++ } ++ else if (m_configuration.bSendInactiveSource == 1) ++ { ++ CLog::Log(LOGDEBUG, "%s - sending inactive source commands", __FUNCTION__); ++ m_cecAdapter->SetInactiveView(); ++ } ++ } ++ else ++ { ++ CLog::Log(LOGDEBUG, "%s - XBMC is not the active source, not sending any standby commands", __FUNCTION__); ++ } + } + + m_cecAdapter->Close(); +diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.h b/xbmc/peripherals/devices/PeripheralCecAdapter.h +index 1eadca2..7a9d8e8 100644 +--- a/xbmc/peripherals/devices/PeripheralCecAdapter.h ++++ b/xbmc/peripherals/devices/PeripheralCecAdapter.h +@@ -116,6 +116,7 @@ + std::queue m_volumeChangeQueue; + unsigned int m_lastKeypress; + CecVolumeChange m_lastChange; ++ int m_iExitCode; + CPeripheralCecAdapterUpdateThread*m_queryThread; + CEC::ICECCallbacks m_callbacks; + CCriticalSection m_critSection; +-- +1.7.5.4 + + +From 04dee9642a307adc62d07c6cab6b721e414ab0fd Mon Sep 17 00:00:00 2001 +From: Lars Op den Kamp +Date: Mon, 19 Mar 2012 16:50:03 +0100 +Subject: [PATCH 17/18] cec: get libCEC-latest from packages.pulse-eight.net, + so it can be updated separately, e.g. to add vendor + support + +--- + lib/libcec/Makefile | 30 ++++++++++++------------ + project/BuildDependencies/scripts/libcec_d.txt | 2 +- + tools/darwin/depends/libcec/Makefile | 26 ++++++++++---------- + 3 files changed, 29 insertions(+), 29 deletions(-) + +diff --git a/lib/libcec/Makefile b/lib/libcec/Makefile +index 27eb5d2..ec307c4 100644 +--- a/lib/libcec/Makefile ++++ b/lib/libcec/Makefile +@@ -7,17 +7,17 @@ + + # lib name, version + LIBNAME=libcec +-VERSION=1.5.1 ++VERSION=latest + SOURCE=$(LIBNAME)-$(VERSION) + + # download location and format +-BASE_URL=http://mirrors.xbmc.org/build-deps/darwin-libs +-ARCHIVE=$(SOURCE).tar.gz ++BASE_URL=http://packages.pulse-eight.net/pulse/sources/libcec ++ARCHIVE=$(SOURCE).tar.bz2 + TARBALLS_LOCATION=. + RETRIEVE_TOOL=/usr/bin/curl + RETRIEVE_TOOL_FLAGS=-Ls --create-dirs --output $(TARBALLS_LOCATION)/$(ARCHIVE) + ARCHIVE_TOOL=tar +-ARCHIVE_TOOL_FLAGS=xf ++ARCHIVE_TOOL_FLAGS=jxf + + PREFIX ?= /usr/local + LIBCEC_CONFIGOPTS ?= --prefix=$(PREFIX) +@@ -25,30 +25,30 @@ LIBCEC_CONFIGOPTS ?= --prefix=$(PREFIX) + # configuration settings + CONFIGURE=./configure CFLAGS=-D_FILE_OFFSET_BITS=64 $(LIBCEC_CONFIGOPTS) + +-SO_NAME=$(SOURCE)/.libs/$(LIBNAME).so ++SO_NAME=$(LIBNAME)/.libs/$(LIBNAME).so + + all: $(SO_NAME) + + $(TARBALLS_LOCATION)/$(ARCHIVE): + $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) + +-$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) +- rm -rf $(SOURCE) ++$(LIBNAME): $(TARBALLS_LOCATION)/$(ARCHIVE) ++ rm -rf $(LIBNAME) + $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) +- echo $(SOURCE) > .gitignore +- cd $(SOURCE); autoreconf -vif +- cd $(SOURCE); $(CONFIGURE) ++ echo $(LIBNAME) > .gitignore ++ cd $(LIBNAME); autoreconf -vif ++ cd $(LIBNAME); $(CONFIGURE) + +-$(SO_NAME): $(SOURCE) +- make -j 1 -C $(SOURCE) ++$(SO_NAME): $(LIBNAME) ++ make -j 1 -C $(LIBNAME) + + install: +- make -C $(SOURCE) install ++ make -C $(LIBNAME) install + ldconfig + + clean: +- rm -rf $(SOURCE) ++ rm -rf $(LIBNAME) + + distclean:: +- rm -rf $(SOURCE) ++ rm -rf $(LIBNAME) + +diff --git a/project/BuildDependencies/scripts/libcec_d.txt b/project/BuildDependencies/scripts/libcec_d.txt +index 9aa0d55..daa4e75 100644 +diff --git a/tools/darwin/depends/libcec/Makefile b/tools/darwin/depends/libcec/Makefile +index abba42d..2eaa7f6 100644 +--- a/tools/darwin/depends/libcec/Makefile ++++ b/tools/darwin/depends/libcec/Makefile +@@ -2,37 +2,37 @@ include ../Makefile.include + + # lib name, version + LIBNAME=libcec +-VERSION=1.5.1 ++VERSION=latest + SOURCE=$(LIBNAME)-$(VERSION) +-ARCHIVE=$(SOURCE).tar.gz ++ARCHIVE=$(SOURCE).tar.bz2 + + # configuration settings + CONFIGURE=./configure --prefix=$(PREFIX) + +-LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).dylib ++LIBDYLIB=$(LIBNAME)/.libs/$(LIBNAME).dylib + + all: $(LIBDYLIB) .installed + + $(TARBALLS_LOCATION)/$(ARCHIVE): + $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) + +-$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) +- rm -rf $(SOURCE) ++$(LIBNAME): $(TARBALLS_LOCATION)/$(ARCHIVE) ++ rm -rf $(LIBNAME) + $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) +- echo $(SOURCE) > .gitignore +- cd $(SOURCE); autoreconf -vif +- cd $(SOURCE); $(CONFIGURE) ++ echo $(LIBNAME) > .gitignore ++ cd $(LIBNAME); autoreconf -vif ++ cd $(LIBNAME); $(CONFIGURE) + +-$(LIBDYLIB): $(SOURCE) +- make -j 1 -C $(SOURCE) ++$(LIBDYLIB): $(LIBNAME) ++ make -j 1 -C $(LIBNAME) + + .installed: +- make -C $(SOURCE) install ++ make -C $(LIBNAME) install + touch $@ + + clean: +- rm -rf $(SOURCE) .installed ++ rm -rf $(LIBNAME) .installed + + distclean:: +- rm -rf $(SOURCE) .installed ++ rm -rf $(LIBNAME) .installed + +-- +1.7.5.4 + + +From 2486a8c6a9a9ecdd801777729c3315cd543e7061 Mon Sep 17 00:00:00 2001 +From: Lars Op den Kamp +Date: Tue, 20 Mar 2012 15:30:01 +0100 +Subject: [PATCH 18/18] cec: don't send an updated configuration to libCEC + when stopping the update thread + +--- + xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +index ca5ada1..093675e 100644 +--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp ++++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +@@ -1197,6 +1197,8 @@ void CPeripheralCecAdapterUpdateThread::Process(void) + // update received + if (m_event.WaitMSec(500) || bUpdate) + { ++ if (m_bStop) ++ return; + // set the new configuration + bool bConfigSet(m_adapter->m_cecAdapter->SetConfiguration(&m_configuration)); + CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(36000), g_localizeStrings.Get(bConfigSet ? 36023 : 36024)); +-- +1.7.5.4 + diff --git a/packages/mediacenter/xbmc/patches/xbmc-f38655f-806.01-cdrip-PR616.patch b/packages/mediacenter/xbmc/patches/xbmc-11.0-806.01-cdrip-PR616.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-f38655f-806.01-cdrip-PR616.patch rename to packages/mediacenter/xbmc/patches/xbmc-11.0-806.01-cdrip-PR616.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-f38655f-806.02-cdrip-PR718.patch b/packages/mediacenter/xbmc/patches/xbmc-11.0-806.02-cdrip-PR718.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-f38655f-806.02-cdrip-PR718.patch rename to packages/mediacenter/xbmc/patches/xbmc-11.0-806.02-cdrip-PR718.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-f38655f-902.01-xvba_support-46bda285a6b3a8cebdb5760780101fe71d74a766.patch b/packages/mediacenter/xbmc/patches/xbmc-11.0-902.01-xvba_support-46bda285a6b3a8cebdb5760780101fe71d74a766.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-f38655f-902.01-xvba_support-46bda285a6b3a8cebdb5760780101fe71d74a766.patch rename to packages/mediacenter/xbmc/patches/xbmc-11.0-902.01-xvba_support-46bda285a6b3a8cebdb5760780101fe71d74a766.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-f38655f-981-toggleButtonState.patch b/packages/mediacenter/xbmc/patches/xbmc-11.0-981-toggleButtonState.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-f38655f-981-toggleButtonState.patch rename to packages/mediacenter/xbmc/patches/xbmc-11.0-981-toggleButtonState.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-f38655f-990-disable_gui_sounds_before_starting_player.patch b/packages/mediacenter/xbmc/patches/xbmc-f38655f-990-disable_gui_sounds_before_starting_player.patch deleted file mode 100644 index 01799aa1a1..0000000000 --- a/packages/mediacenter/xbmc/patches/xbmc-f38655f-990-disable_gui_sounds_before_starting_player.patch +++ /dev/null @@ -1,34 +0,0 @@ -From ff7b191ae381bd16a3b86fd2820d43a45a08fe4b Mon Sep 17 00:00:00 2001 -From: xbmc -Date: Mon, 27 Feb 2012 18:27:47 +0100 -Subject: [PATCH] linux: disable gui sounds before starting player - ---- - xbmc/Application.cpp | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp -index 9b362af..8a0fe87 100644 ---- a/xbmc/Application.cpp -+++ b/xbmc/Application.cpp -@@ -3868,7 +3868,7 @@ bool CApplication::PlayFile(const CFileItem& item, bool bRestart) - - // Workaround for bug/quirk in SDL_Mixer on OSX. - // TODO: Remove after GUI Sounds redux --#if defined(__APPLE__) -+#if defined(__APPLE__) || defined(_LINUX) - g_audioManager.Enable(false); - #endif - -@@ -3932,7 +3932,7 @@ bool CApplication::PlayFile(const CFileItem& item, bool bRestart) - } - #endif - --#if !defined(__APPLE__) -+#if !defined(__APPLE__) && !defined(_LINUX) - g_audioManager.Enable(false); - #endif - } --- -1.7.5.4 - diff --git a/packages/mediacenter/xbmc/patches/xbmc-f38655f-991.01-libpng-1.5_support.patch b/packages/mediacenter/xbmc/patches/xbmc-f38655f-991.01-libpng-1.5_support.patch deleted file mode 100644 index 7b2c572516..0000000000 --- a/packages/mediacenter/xbmc/patches/xbmc-f38655f-991.01-libpng-1.5_support.patch +++ /dev/null @@ -1,618 +0,0 @@ -From 06688eb1982c9a672a1cdffc0f0873f0ec4b5bfb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Damien=20Th=C3=A9bault?= -Date: Sat, 14 Jan 2012 23:33:45 +0100 -Subject: [PATCH] Commit cleaned libpng 1.5 support. - ---- - lib/cximage-6.0/CxImage/ximapng.cpp | 258 ++++++++++++++++++++++++++++++++++- - lib/cximage-6.0/CxImage/ximapng.h | 5 + - 2 files changed, 262 insertions(+), 1 deletions(-) - -diff --git a/lib/cximage-6.0/CxImage/ximapng.cpp b/lib/cximage-6.0/CxImage/ximapng.cpp -index f718269..3e0cf73 100644 ---- a/lib/cximage-6.0/CxImage/ximapng.cpp -+++ b/lib/cximage-6.0/CxImage/ximapng.cpp -@@ -15,7 +15,11 @@ - void CxImagePNG::ima_png_error(png_struct *png_ptr, char *message) - { - strcpy(info.szLastError,message); -+#if PNG_LIBPNG_VER > 10499 -+ longjmp(png_jmpbuf(png_ptr), 1); -+#else - longjmp(png_ptr->jmpbuf, 1); -+#endif - } - //////////////////////////////////////////////////////////////////////////////// - #if CXIMAGE_SUPPORT_DECODE -@@ -62,7 +66,11 @@ bool CxImagePNG::Decode(CxFile *hFile) - /* Set error handling if you are using the setjmp/longjmp method (this is - * the normal method of doing things with libpng). REQUIRED unless you - * set up your own error handlers in the png_create_read_struct() earlier. */ -+#if PNG_LIBPNG_VER > 10499 -+ if (setjmp(png_jmpbuf(png_ptr))) { -+#else - if (setjmp(png_ptr->jmpbuf)) { -+#endif - /* Free all of the memory associated with the png_ptr and info_ptr */ - delete [] row_pointers; - png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); -@@ -76,16 +84,34 @@ bool CxImagePNG::Decode(CxFile *hFile) - /* read the file information */ - png_read_info(png_ptr, info_ptr); - -+#if PNG_LIBPNG_VER > 10499 -+ png_uint_32 _width,_height; -+ int _bit_depth,_color_type,_interlace_type,_compression_type,_filter_type; -+ png_get_IHDR(png_ptr,info_ptr,&_width,&_height,&_bit_depth,&_color_type, -+ &_interlace_type,&_compression_type,&_filter_type); -+ -+ if (info.nEscape == -1){ -+ head.biWidth = _width; -+ head.biHeight= _height; -+ info.dwType = CXIMAGE_FORMAT_PNG; -+ longjmp(png_jmpbuf(png_ptr), 1); -+ } -+#else - if (info.nEscape == -1){ - head.biWidth = info_ptr->width; - head.biHeight= info_ptr->height; - info.dwType = CXIMAGE_FORMAT_PNG; - longjmp(png_ptr->jmpbuf, 1); - } -+#endif - - /* calculate new number of channels */ - int channels=0; -+#if PNG_LIBPNG_VER > 10499 -+ switch(_color_type){ -+#else - switch(info_ptr->color_type){ -+#endif - case PNG_COLOR_TYPE_GRAY: - case PNG_COLOR_TYPE_PALETTE: - channels = 1; -@@ -101,20 +127,49 @@ bool CxImagePNG::Decode(CxFile *hFile) - break; - default: - strcpy(info.szLastError,"unknown PNG color type"); -+#if PNG_LIBPNG_VER > 10499 -+ longjmp(png_jmpbuf(png_ptr), 1); -+#else - longjmp(png_ptr->jmpbuf, 1); -+#endif - } - - //find the right pixel depth used for cximage -+#if PNG_LIBPNG_VER > 10499 -+ int pixel_depth = _bit_depth * png_get_channels(png_ptr,info_ptr); -+#else - int pixel_depth = info_ptr->pixel_depth; -+#endif - if (channels == 1 && pixel_depth>8) pixel_depth=8; - if (channels == 2) pixel_depth=8; - if (channels >= 3) pixel_depth=24; - -+#if PNG_LIBPNG_VER > 10499 -+ if (!Create(_width, _height, pixel_depth, CXIMAGE_FORMAT_PNG)){ -+ longjmp(png_jmpbuf(png_ptr), 1); -+#else - if (!Create(info_ptr->width, info_ptr->height, pixel_depth, CXIMAGE_FORMAT_PNG)){ - longjmp(png_ptr->jmpbuf, 1); -+#endif - } - - /* get metrics */ -+#if PNG_LIBPNG_VER > 10499 -+ png_uint_32 _x_pixels_per_unit,_y_pixels_per_unit; -+ int _phys_unit_type; -+ png_get_pHYs(png_ptr,info_ptr,&_x_pixels_per_unit,&_y_pixels_per_unit,&_phys_unit_type); -+ switch (_phys_unit_type) -+ { -+ case PNG_RESOLUTION_UNKNOWN: -+ SetXDPI(_x_pixels_per_unit); -+ SetYDPI(_y_pixels_per_unit); -+ break; -+ case PNG_RESOLUTION_METER: -+ SetXDPI((long)floor(_x_pixels_per_unit * 254.0 / 10000.0 + 0.5)); -+ SetYDPI((long)floor(_y_pixels_per_unit * 254.0 / 10000.0 + 0.5)); -+ break; -+ } -+#else - switch (info_ptr->phys_unit_type) - { - case PNG_RESOLUTION_UNKNOWN: -@@ -126,46 +181,94 @@ bool CxImagePNG::Decode(CxFile *hFile) - SetYDPI((long)floor(info_ptr->y_pixels_per_unit * 254.0 / 10000.0 + 0.5)); - break; - } -+#endif - -+#if PNG_LIBPNG_VER > 10499 -+ int _num_palette; -+ png_colorp _palette; -+ png_uint_32 _palette_ret; -+ _palette_ret = png_get_PLTE(png_ptr,info_ptr,&_palette,&_num_palette); -+ if (_palette_ret && _num_palette>0){ -+ SetPalette((rgb_color*)_palette,_num_palette); -+ SetClrImportant(_num_palette); -+ } else if (_bit_depth ==2) { // needed for 2 bpp grayscale PNGs -+#else - if (info_ptr->num_palette>0){ - SetPalette((rgb_color*)info_ptr->palette,info_ptr->num_palette); - SetClrImportant(info_ptr->num_palette); - } else if (info_ptr->bit_depth ==2) { // needed for 2 bpp grayscale PNGs -+#endif - SetPaletteColor(0,0,0,0); - SetPaletteColor(1,85,85,85); - SetPaletteColor(2,170,170,170); - SetPaletteColor(3,255,255,255); - } else SetGrayPalette(); // needed for grayscale PNGs - -+#if PNG_LIBPNG_VER > 10499 -+ int nshift = max(0,(_bit_depth>>3)-1)<<3; -+#else - int nshift = max(0,(info_ptr->bit_depth>>3)-1)<<3; -+#endif - -+#if PNG_LIBPNG_VER > 10499 -+ png_bytep _trans_alpha; -+ int _num_trans; -+ png_color_16p _trans_color; -+ png_uint_32 _trans_ret; -+ _trans_ret = png_get_tRNS(png_ptr,info_ptr,&_trans_alpha,&_num_trans,&_trans_color); -+ if (_trans_ret && _num_trans!=0){ //palette transparency -+ if (_num_trans==1){ -+ if (_color_type == PNG_COLOR_TYPE_PALETTE){ -+#else - if (info_ptr->num_trans!=0){ //palette transparency - if (info_ptr->num_trans==1){ - if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE){ -+#endif -+#if PNG_LIBPNG_VER > 10499 -+ info.nBkgndIndex = _trans_color->index; -+#else - #if PNG_LIBPNG_VER > 10399 - info.nBkgndIndex = info_ptr->trans_color.index; - #else - info.nBkgndIndex = info_ptr->trans_values.index; - #endif -+#endif - } else{ -+#if PNG_LIBPNG_VER > 10499 -+ info.nBkgndIndex = _trans_color->gray>>nshift; -+#else - #if PNG_LIBPNG_VER > 10399 - info.nBkgndIndex = info_ptr->trans_color.gray>>nshift; - #else - info.nBkgndIndex = info_ptr->trans_values.gray>>nshift; - #endif -+#endif - } - } -+#if PNG_LIBPNG_VER > 10499 -+ if (_num_trans>1 && _trans_alpha!=NULL){ -+#else - if (info_ptr->num_trans>1){ -+#endif - RGBQUAD* pal=GetPalette(); - if (pal){ - DWORD ip; -+#if PNG_LIBPNG_VER > 10499 -+ for (ip=0;ipnum_trans);ip++) - #if PNG_LIBPNG_VER > 10399 - pal[ip].rgbReserved=info_ptr->trans_alpha[ip]; - #else - pal[ip].rgbReserved=info_ptr->trans[ip]; - #endif -+#endif -+#if PNG_LIBPNG_VER > 10499 -+ for (ip=_num_trans;ipnum_trans;ip 10499 -+ info.nBkgndColor.rgbRed = (BYTE)(_trans_color->red>>nshift); -+ info.nBkgndColor.rgbGreen = (BYTE)(_trans_color->green>>nshift); -+ info.nBkgndColor.rgbBlue = (BYTE)(_trans_color->blue>>nshift); -+#else - #if PNG_LIBPNG_VER > 10399 - info.nBkgndColor.rgbRed = (BYTE)(info_ptr->trans_color.red>>nshift); - info.nBkgndColor.rgbGreen = (BYTE)(info_ptr->trans_color.green>>nshift); -@@ -187,6 +295,7 @@ bool CxImagePNG::Decode(CxFile *hFile) - info.nBkgndColor.rgbGreen = (BYTE)(info_ptr->trans_values.green>>nshift); - info.nBkgndColor.rgbBlue = (BYTE)(info_ptr->trans_values.blue>>nshift); - #endif -+#endif - info.nBkgndColor.rgbReserved = 0; - info.nBkgndIndex = 0; - } -@@ -202,15 +311,27 @@ bool CxImagePNG::Decode(CxFile *hFile) - } - - // - flip the RGB pixels to BGR (or RGBA to BGRA) -+#if PNG_LIBPNG_VER > 10499 -+ if (_color_type & PNG_COLOR_MASK_COLOR){ -+#else - if (info_ptr->color_type & PNG_COLOR_MASK_COLOR){ -+#endif - png_set_bgr(png_ptr); - } - - // - handle cancel -+#if PNG_LIBPNG_VER > 10499 -+ if (info.nEscape) longjmp(png_jmpbuf(png_ptr), 1); -+#else - if (info.nEscape) longjmp(png_ptr->jmpbuf, 1); -+#endif - - // row_bytes is the width x number of channels x (bit-depth / 8) -+#if PNG_LIBPNG_VER > 10499 -+ row_pointers = new BYTE[png_get_rowbytes(png_ptr,info_ptr) + 8]; -+#else - row_pointers = new BYTE[info_ptr->rowbytes + 8]; -+#endif - - // turn on interlace handling - int number_passes = png_set_interlace_handling(png_ptr); -@@ -221,8 +342,16 @@ bool CxImagePNG::Decode(CxFile *hFile) - SetCodecOption(0); - } - -+#if PNG_LIBPNG_VER > 10499 -+ int chan_offset = _bit_depth >> 3; -+#else - int chan_offset = info_ptr->bit_depth >> 3; -+#endif -+#if PNG_LIBPNG_VER > 10499 -+ int pixel_offset = (_bit_depth * png_get_channels(png_ptr,info_ptr)) >> 3; -+#else - int pixel_offset = info_ptr->pixel_depth >> 3; -+#endif - - for (int pass=0; pass < number_passes; pass++) { - iter.Upset(); -@@ -230,7 +359,11 @@ bool CxImagePNG::Decode(CxFile *hFile) - do { - - // - handle cancel -+#if PNG_LIBPNG_VER > 10499 -+ if (info.nEscape) longjmp(png_jmpbuf(png_ptr), 1); -+#else - if (info.nEscape) longjmp(png_ptr->jmpbuf, 1); -+#endif - - #if CXIMAGE_SUPPORT_ALPHA // - if (AlphaIsValid()) { -@@ -241,7 +374,11 @@ bool CxImagePNG::Decode(CxFile *hFile) - BYTE* prow= iter.GetRow(ay); - - //recover data from previous scan -+#if PNG_LIBPNG_VER > 10499 -+ if (_interlace_type && pass>0 && pass!=7){ -+#else - if (info_ptr->interlace_type && pass>0 && pass!=7){ -+#endif - for(ax=0;ax 10499 -+ if (_interlace_type && pass>0){ -+ iter.GetRow(row_pointers, png_get_rowbytes(png_ptr,info_ptr)); -+ //re-expand buffer for images with bit depth > 8 -+ if (_bit_depth > 8){ -+#else - if (info_ptr->interlace_type && pass>0){ - iter.GetRow(row_pointers, info_ptr->rowbytes); - //re-expand buffer for images with bit depth > 8 - if (info_ptr->bit_depth > 8){ -+#endif - for(long ax=(head.biWidth*channels-1);ax>=0;ax--) - row_pointers[ax*chan_offset] = row_pointers[ax]; - } -@@ -291,15 +435,27 @@ bool CxImagePNG::Decode(CxFile *hFile) - png_read_row(png_ptr, row_pointers, NULL); - - //shrink 16 bit depth images down to 8 bits -+#if PNG_LIBPNG_VER > 10499 -+ if (_bit_depth > 8){ -+#else - if (info_ptr->bit_depth > 8){ -+#endif - for(long ax=0;ax<(head.biWidth*channels);ax++) - row_pointers[ax] = row_pointers[ax*chan_offset]; - } - - //copy the pixels -+#if PNG_LIBPNG_VER > 10499 -+ iter.SetRow(row_pointers, png_get_rowbytes(png_ptr,info_ptr)); -+#else - iter.SetRow(row_pointers, info_ptr->rowbytes); -+#endif - // expand 2 bpp images only in the last pass -+#if PNG_LIBPNG_VER > 10499 -+ if (_bit_depth==2 && pass==(number_passes-1)) -+#else - if (info_ptr->bit_depth==2 && pass==(number_passes-1)) -+#endif - expand2to4bpp(iter.GetRow()); - - //go on -@@ -361,9 +517,13 @@ bool CxImagePNG::Encode(CxFile *hFile) - /* Set error handling. REQUIRED if you aren't supplying your own - * error hadnling functions in the png_create_write_struct() call. - */ -+#if PNG_LIBPNG_VER > 10499 -+ if (setjmp(png_jmpbuf(png_ptr))){ -+#else - if (setjmp(png_ptr->jmpbuf)){ - /* If we get here, we had a problem reading the file */ - if (info_ptr->palette) free(info_ptr->palette); -+#endif - png_destroy_write_struct(&png_ptr, (png_infopp)&info_ptr); - cx_throw("Error saving PNG file"); - } -@@ -372,9 +532,23 @@ bool CxImagePNG::Encode(CxFile *hFile) - //png_init_io(png_ptr, hFile); - - // use custom I/O functions -- png_set_write_fn(png_ptr,hFile,/*(png_rw_ptr)*/user_write_data,/*(png_flush_ptr)*/user_flush_data); -+ png_set_write_fn(png_ptr,hFile,/*(png_rw_ptr)*/user_write_data,/*(png_flush_ptr)*/user_flush_data); - - /* set the file information here */ -+#if PNG_LIBPNG_VER > 10499 -+ /* use variables to hold the values so it isnt necessary to png_get them later */ -+ png_uint_32 _width,_height; -+ int _bit_depth,_color_type,_interlace_type,_compression_type,_filter_type; -+ png_byte _channels,_pixel_depth; -+ -+ _width = GetWidth(); -+ _height = GetHeight(); -+ _pixel_depth = (BYTE)GetBpp(); -+ _channels = (GetBpp()>8) ? (BYTE)3: (BYTE)1; -+ _bit_depth = (BYTE)(GetBpp()/_channels); -+ _compression_type = PNG_COMPRESSION_TYPE_DEFAULT; -+ _filter_type = PNG_FILTER_TYPE_DEFAULT; -+#else - info_ptr->width = GetWidth(); - info_ptr->height = GetHeight(); - info_ptr->pixel_depth = (BYTE)GetBpp(); -@@ -382,13 +556,22 @@ bool CxImagePNG::Encode(CxFile *hFile) - info_ptr->bit_depth = (BYTE)(GetBpp()/info_ptr->channels); - info_ptr->compression_type = info_ptr->filter_type = 0; - info_ptr->valid = 0; -+#endif - - switch(GetCodecOption(CXIMAGE_FORMAT_PNG)){ - case 1: -+#if PNG_LIBPNG_VER > 10499 -+ _interlace_type = PNG_INTERLACE_ADAM7; -+#else - info_ptr->interlace_type = PNG_INTERLACE_ADAM7; -+#endif - break; - default: -+#if PNG_LIBPNG_VER > 10499 -+ _interlace_type = PNG_INTERLACE_NONE; -+#else - info_ptr->interlace_type = PNG_INTERLACE_NONE; -+#endif - } - - /* set compression level */ -@@ -398,19 +581,38 @@ bool CxImagePNG::Encode(CxFile *hFile) - - if (GetNumColors()){ - if (bGrayScale){ -+#if PNG_LIBPNG_VER > 10499 -+ _color_type = PNG_COLOR_TYPE_GRAY; -+#else - info_ptr->color_type = PNG_COLOR_TYPE_GRAY; -+#endif - } else { -+#if PNG_LIBPNG_VER > 10499 -+ _color_type = PNG_COLOR_TYPE_PALETTE; -+#else - info_ptr->color_type = PNG_COLOR_TYPE_PALETTE; -+#endif - } - } else { -+#if PNG_LIBPNG_VER > 10499 -+ _color_type = PNG_COLOR_TYPE_RGB; -+#else - info_ptr->color_type = PNG_COLOR_TYPE_RGB; -+#endif - } - #if CXIMAGE_SUPPORT_ALPHA - if (AlphaIsValid()){ -+#if PNG_LIBPNG_VER > 10499 -+ _color_type |= PNG_COLOR_MASK_ALPHA; -+ _channels++; -+ _bit_depth = 8; -+ _pixel_depth += 8; -+#else - info_ptr->color_type |= PNG_COLOR_MASK_ALPHA; - info_ptr->channels++; - info_ptr->bit_depth = 8; - info_ptr->pixel_depth += 8; -+#endif - } - #endif - -@@ -427,14 +629,30 @@ bool CxImagePNG::Encode(CxFile *hFile) - /* set metrics */ - png_set_pHYs(png_ptr, info_ptr, head.biXPelsPerMeter, head.biYPelsPerMeter, PNG_RESOLUTION_METER); - -+#if PNG_LIBPNG_VER > 10499 -+ png_set_IHDR(png_ptr,info_ptr,_width,_height,_bit_depth,_color_type,_interlace_type, -+ _compression_type,_filter_type); -+#else - png_set_IHDR(png_ptr, info_ptr, info_ptr->width, info_ptr->height, info_ptr->bit_depth, - info_ptr->color_type, info_ptr->interlace_type, - PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); -+#endif - - // simple transparency - if (info.nBkgndIndex >= 0){ -+#if PNG_LIBPNG_VER <= 10499 - info_ptr->num_trans = 1; - info_ptr->valid |= PNG_INFO_tRNS; -+#endif -+#if PNG_LIBPNG_VER > 10499 -+ png_color_16 _trans_color; -+ _trans_color.index = (BYTE)info.nBkgndIndex; -+ _trans_color.red = tc.rgbRed; -+ _trans_color.green = tc.rgbGreen; -+ _trans_color.blue = tc.rgbBlue; -+ _trans_color.gray = _trans_color.index; -+ png_set_tRNS(png_ptr,info_ptr,(png_bytep)trans,1,&_trans_color); -+#else - #if PNG_LIBPNG_VER > 10399 - info_ptr->trans_alpha = trans; - info_ptr->trans_color.index = (BYTE)info.nBkgndIndex; -@@ -450,6 +668,7 @@ bool CxImagePNG::Encode(CxFile *hFile) - info_ptr->trans_values.blue = tc.rgbBlue; - info_ptr->trans_values.gray = info_ptr->trans_values.index; - #endif -+#endif - - // the transparency indexes start from 0 for non grayscale palette - if (!bGrayScale && head.biClrUsed && info.nBkgndIndex) -@@ -457,10 +676,16 @@ bool CxImagePNG::Encode(CxFile *hFile) - } - - /* set the palette if there is one */ -+#if PNG_LIBPNG_VER > 10499 -+ png_colorp _palette = NULL; -+ if (GetPalette()){ -+ /* png_set_PLTE() will be called once the palette is ready */ -+#else - if (GetPalette()){ - if (!bGrayScale){ - info_ptr->valid |= PNG_INFO_PLTE; - } -+#endif - - int nc = GetClrImportant(); - if (nc==0) nc = GetNumColors(); -@@ -468,20 +693,34 @@ bool CxImagePNG::Encode(CxFile *hFile) - if (info.bAlphaPaletteEnabled){ - for(WORD ip=0; ipnum_trans = (WORD)nc; - info_ptr->valid |= PNG_INFO_tRNS; -+#endif -+#if PNG_LIBPNG_VER > 10499 -+ png_set_tRNS(png_ptr,info_ptr,(png_bytep)trans,nc,NULL); -+#else - #if PNG_LIBPNG_VER > 10399 - info_ptr->trans_alpha = trans; - #else - info_ptr->trans = trans; - #endif -+#endif - } - - // copy the palette colors -+#if PNG_LIBPNG_VER > 10499 -+ _palette = new png_color[nc]; -+ for (int i=0; ipalette = new png_color[nc]; - info_ptr->num_palette = (png_uint_16) nc; - for (int i=0; ipalette[i].red, &info_ptr->palette[i].green, &info_ptr->palette[i].blue); -+#endif - } - - #if CXIMAGE_SUPPORT_ALPHA // -@@ -495,8 +734,12 @@ bool CxImagePNG::Encode(CxFile *hFile) - } } } - #endif // CXIMAGE_SUPPORT_ALPHA // - -+#if PNG_LIBPNG_VER > 10499 -+ int row_size = max(info.dwEffWidth, (_width * _channels * _bit_depth / 8)); -+#else - int row_size = max(info.dwEffWidth, info_ptr->width*info_ptr->channels*(info_ptr->bit_depth/8)); - info_ptr->rowbytes = row_size; -+#endif - BYTE *row_pointers = new BYTE[row_size]; - - /* write the file information */ -@@ -514,7 +757,11 @@ bool CxImagePNG::Encode(CxFile *hFile) - if (AlphaIsValid()){ - for (long ax=head.biWidth-1; ax>=0;ax--){ - c = BlindGetPixelColor(ax,ay); -+#if PNG_LIBPNG_VER > 10499 -+ int px = ax * _channels; -+#else - int px = ax * info_ptr->channels; -+#endif - if (!bGrayScale){ - row_pointers[px++]=c.rgbRed; - row_pointers[px++]=c.rgbGreen; -@@ -529,7 +776,11 @@ bool CxImagePNG::Encode(CxFile *hFile) - #endif //CXIMAGE_SUPPORT_ALPHA // - { - iter.GetRow(row_pointers, row_size); -+#if PNG_LIBPNG_VER > 10499 -+ if (_color_type == PNG_COLOR_TYPE_RGB) //HACK BY OP -+#else - if (info_ptr->color_type == PNG_COLOR_TYPE_RGB) //HACK BY OP -+#endif - RGBtoBGR(row_pointers, row_size); - png_write_row(png_ptr, row_pointers); - } -@@ -546,9 +797,14 @@ bool CxImagePNG::Encode(CxFile *hFile) - png_write_end(png_ptr, info_ptr); - - /* if you malloced the palette, free it here */ -+#if PNG_LIBPNG_VER > 10499 -+ if (_palette){ -+ delete [] (_palette); -+#else - if (info_ptr->palette){ - delete [] (info_ptr->palette); - info_ptr->palette = NULL; -+#endif - } - - /* clean up after the write, and free any memory allocated */ -diff --git a/lib/cximage-6.0/CxImage/ximapng.h b/lib/cximage-6.0/CxImage/ximapng.h -index db41935..68d8ddb 100644 ---- a/lib/cximage-6.0/CxImage/ximapng.h -+++ b/lib/cximage-6.0/CxImage/ximapng.h -@@ -69,8 +69,13 @@ class CxImagePNG: public CxImage - - static void PNGAPI user_error_fn(png_structp png_ptr,png_const_charp error_msg) - { -+#if PNG_LIBPNG_VER > 10499 -+ strncpy((char*)png_get_error_ptr(png_ptr),error_msg,255); -+ longjmp(png_jmpbuf(png_ptr), 1); -+#else - strncpy((char*)png_ptr->error_ptr,error_msg,255); - longjmp(png_ptr->jmpbuf, 1); -+#endif - } - }; - --- -1.7.5.4 - diff --git a/packages/mediacenter/xbmc/patches/xbmc-f38655f-991.02-simplyfing_libpng-1.5_check.patch b/packages/mediacenter/xbmc/patches/xbmc-f38655f-991.02-simplyfing_libpng-1.5_check.patch deleted file mode 100644 index 76ee54bb28..0000000000 --- a/packages/mediacenter/xbmc/patches/xbmc-f38655f-991.02-simplyfing_libpng-1.5_check.patch +++ /dev/null @@ -1,434 +0,0 @@ -From d6d1dd650bbe94fc2b106af239e7d476879feaff Mon Sep 17 00:00:00 2001 -From: bobo1on1 -Date: Sun, 18 Mar 2012 01:02:12 +0100 -Subject: [PATCH] fixed: do the libpng version check in only one place - ---- - lib/cximage-6.0/CxImage/ximapng.cpp | 90 +++++++++++++++++----------------- - lib/cximage-6.0/CxImage/ximapng.h | 6 ++- - 2 files changed, 50 insertions(+), 46 deletions(-) - -diff --git a/lib/cximage-6.0/CxImage/ximapng.cpp b/lib/cximage-6.0/CxImage/ximapng.cpp -index 3e0cf73..adadeea 100644 ---- a/lib/cximage-6.0/CxImage/ximapng.cpp -+++ b/lib/cximage-6.0/CxImage/ximapng.cpp -@@ -15,7 +15,7 @@ - void CxImagePNG::ima_png_error(png_struct *png_ptr, char *message) - { - strcpy(info.szLastError,message); --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - longjmp(png_jmpbuf(png_ptr), 1); - #else - longjmp(png_ptr->jmpbuf, 1); -@@ -66,7 +66,7 @@ bool CxImagePNG::Decode(CxFile *hFile) - /* Set error handling if you are using the setjmp/longjmp method (this is - * the normal method of doing things with libpng). REQUIRED unless you - * set up your own error handlers in the png_create_read_struct() earlier. */ --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - if (setjmp(png_jmpbuf(png_ptr))) { - #else - if (setjmp(png_ptr->jmpbuf)) { -@@ -84,7 +84,7 @@ bool CxImagePNG::Decode(CxFile *hFile) - /* read the file information */ - png_read_info(png_ptr, info_ptr); - --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - png_uint_32 _width,_height; - int _bit_depth,_color_type,_interlace_type,_compression_type,_filter_type; - png_get_IHDR(png_ptr,info_ptr,&_width,&_height,&_bit_depth,&_color_type, -@@ -107,7 +107,7 @@ bool CxImagePNG::Decode(CxFile *hFile) - - /* calculate new number of channels */ - int channels=0; --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - switch(_color_type){ - #else - switch(info_ptr->color_type){ -@@ -127,7 +127,7 @@ bool CxImagePNG::Decode(CxFile *hFile) - break; - default: - strcpy(info.szLastError,"unknown PNG color type"); --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - longjmp(png_jmpbuf(png_ptr), 1); - #else - longjmp(png_ptr->jmpbuf, 1); -@@ -135,7 +135,7 @@ bool CxImagePNG::Decode(CxFile *hFile) - } - - //find the right pixel depth used for cximage --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - int pixel_depth = _bit_depth * png_get_channels(png_ptr,info_ptr); - #else - int pixel_depth = info_ptr->pixel_depth; -@@ -144,7 +144,7 @@ bool CxImagePNG::Decode(CxFile *hFile) - if (channels == 2) pixel_depth=8; - if (channels >= 3) pixel_depth=24; - --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - if (!Create(_width, _height, pixel_depth, CXIMAGE_FORMAT_PNG)){ - longjmp(png_jmpbuf(png_ptr), 1); - #else -@@ -154,7 +154,7 @@ bool CxImagePNG::Decode(CxFile *hFile) - } - - /* get metrics */ --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - png_uint_32 _x_pixels_per_unit,_y_pixels_per_unit; - int _phys_unit_type; - png_get_pHYs(png_ptr,info_ptr,&_x_pixels_per_unit,&_y_pixels_per_unit,&_phys_unit_type); -@@ -183,7 +183,7 @@ bool CxImagePNG::Decode(CxFile *hFile) - } - #endif - --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - int _num_palette; - png_colorp _palette; - png_uint_32 _palette_ret; -@@ -204,13 +204,13 @@ bool CxImagePNG::Decode(CxFile *hFile) - SetPaletteColor(3,255,255,255); - } else SetGrayPalette(); // needed for grayscale PNGs - --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - int nshift = max(0,(_bit_depth>>3)-1)<<3; - #else - int nshift = max(0,(info_ptr->bit_depth>>3)-1)<<3; - #endif - --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - png_bytep _trans_alpha; - int _num_trans; - png_color_16p _trans_color; -@@ -224,7 +224,7 @@ bool CxImagePNG::Decode(CxFile *hFile) - if (info_ptr->num_trans==1){ - if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE){ - #endif --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - info.nBkgndIndex = _trans_color->index; - #else - #if PNG_LIBPNG_VER > 10399 -@@ -234,7 +234,7 @@ bool CxImagePNG::Decode(CxFile *hFile) - #endif - #endif - } else{ --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - info.nBkgndIndex = _trans_color->gray>>nshift; - #else - #if PNG_LIBPNG_VER > 10399 -@@ -245,7 +245,7 @@ bool CxImagePNG::Decode(CxFile *hFile) - #endif - } - } --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - if (_num_trans>1 && _trans_alpha!=NULL){ - #else - if (info_ptr->num_trans>1){ -@@ -253,7 +253,7 @@ bool CxImagePNG::Decode(CxFile *hFile) - RGBQUAD* pal=GetPalette(); - if (pal){ - DWORD ip; --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - for (ip=0;iptrans[ip]; - #endif - #endif --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - for (ip=_num_trans;ipnum_trans;ip 10499 -+#ifdef USE_NEW_LIBPNG_API - info.nBkgndColor.rgbRed = (BYTE)(_trans_color->red>>nshift); - info.nBkgndColor.rgbGreen = (BYTE)(_trans_color->green>>nshift); - info.nBkgndColor.rgbBlue = (BYTE)(_trans_color->blue>>nshift); -@@ -311,7 +311,7 @@ bool CxImagePNG::Decode(CxFile *hFile) - } - - // - flip the RGB pixels to BGR (or RGBA to BGRA) --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - if (_color_type & PNG_COLOR_MASK_COLOR){ - #else - if (info_ptr->color_type & PNG_COLOR_MASK_COLOR){ -@@ -320,14 +320,14 @@ bool CxImagePNG::Decode(CxFile *hFile) - } - - // - handle cancel --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - if (info.nEscape) longjmp(png_jmpbuf(png_ptr), 1); - #else - if (info.nEscape) longjmp(png_ptr->jmpbuf, 1); - #endif - - // row_bytes is the width x number of channels x (bit-depth / 8) --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - row_pointers = new BYTE[png_get_rowbytes(png_ptr,info_ptr) + 8]; - #else - row_pointers = new BYTE[info_ptr->rowbytes + 8]; -@@ -342,12 +342,12 @@ bool CxImagePNG::Decode(CxFile *hFile) - SetCodecOption(0); - } - --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - int chan_offset = _bit_depth >> 3; - #else - int chan_offset = info_ptr->bit_depth >> 3; - #endif --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - int pixel_offset = (_bit_depth * png_get_channels(png_ptr,info_ptr)) >> 3; - #else - int pixel_offset = info_ptr->pixel_depth >> 3; -@@ -359,7 +359,7 @@ bool CxImagePNG::Decode(CxFile *hFile) - do { - - // - handle cancel --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - if (info.nEscape) longjmp(png_jmpbuf(png_ptr), 1); - #else - if (info.nEscape) longjmp(png_ptr->jmpbuf, 1); -@@ -374,7 +374,7 @@ bool CxImagePNG::Decode(CxFile *hFile) - BYTE* prow= iter.GetRow(ay); - - //recover data from previous scan --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - if (_interlace_type && pass>0 && pass!=7){ - #else - if (info_ptr->interlace_type && pass>0 && pass!=7){ -@@ -415,7 +415,7 @@ bool CxImagePNG::Decode(CxFile *hFile) - #endif // CXIMAGE_SUPPORT_ALPHA // vho - { - //recover data from previous scan --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - if (_interlace_type && pass>0){ - iter.GetRow(row_pointers, png_get_rowbytes(png_ptr,info_ptr)); - //re-expand buffer for images with bit depth > 8 -@@ -435,7 +435,7 @@ bool CxImagePNG::Decode(CxFile *hFile) - png_read_row(png_ptr, row_pointers, NULL); - - //shrink 16 bit depth images down to 8 bits --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - if (_bit_depth > 8){ - #else - if (info_ptr->bit_depth > 8){ -@@ -445,13 +445,13 @@ bool CxImagePNG::Decode(CxFile *hFile) - } - - //copy the pixels --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - iter.SetRow(row_pointers, png_get_rowbytes(png_ptr,info_ptr)); - #else - iter.SetRow(row_pointers, info_ptr->rowbytes); - #endif - // expand 2 bpp images only in the last pass --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - if (_bit_depth==2 && pass==(number_passes-1)) - #else - if (info_ptr->bit_depth==2 && pass==(number_passes-1)) -@@ -517,7 +517,7 @@ bool CxImagePNG::Encode(CxFile *hFile) - /* Set error handling. REQUIRED if you aren't supplying your own - * error hadnling functions in the png_create_write_struct() call. - */ --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - if (setjmp(png_jmpbuf(png_ptr))){ - #else - if (setjmp(png_ptr->jmpbuf)){ -@@ -535,7 +535,7 @@ bool CxImagePNG::Encode(CxFile *hFile) - png_set_write_fn(png_ptr,hFile,/*(png_rw_ptr)*/user_write_data,/*(png_flush_ptr)*/user_flush_data); - - /* set the file information here */ --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - /* use variables to hold the values so it isnt necessary to png_get them later */ - png_uint_32 _width,_height; - int _bit_depth,_color_type,_interlace_type,_compression_type,_filter_type; -@@ -560,14 +560,14 @@ bool CxImagePNG::Encode(CxFile *hFile) - - switch(GetCodecOption(CXIMAGE_FORMAT_PNG)){ - case 1: --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - _interlace_type = PNG_INTERLACE_ADAM7; - #else - info_ptr->interlace_type = PNG_INTERLACE_ADAM7; - #endif - break; - default: --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - _interlace_type = PNG_INTERLACE_NONE; - #else - info_ptr->interlace_type = PNG_INTERLACE_NONE; -@@ -581,20 +581,20 @@ bool CxImagePNG::Encode(CxFile *hFile) - - if (GetNumColors()){ - if (bGrayScale){ --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - _color_type = PNG_COLOR_TYPE_GRAY; - #else - info_ptr->color_type = PNG_COLOR_TYPE_GRAY; - #endif - } else { --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - _color_type = PNG_COLOR_TYPE_PALETTE; - #else - info_ptr->color_type = PNG_COLOR_TYPE_PALETTE; - #endif - } - } else { --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - _color_type = PNG_COLOR_TYPE_RGB; - #else - info_ptr->color_type = PNG_COLOR_TYPE_RGB; -@@ -602,7 +602,7 @@ bool CxImagePNG::Encode(CxFile *hFile) - } - #if CXIMAGE_SUPPORT_ALPHA - if (AlphaIsValid()){ --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - _color_type |= PNG_COLOR_MASK_ALPHA; - _channels++; - _bit_depth = 8; -@@ -629,7 +629,7 @@ bool CxImagePNG::Encode(CxFile *hFile) - /* set metrics */ - png_set_pHYs(png_ptr, info_ptr, head.biXPelsPerMeter, head.biYPelsPerMeter, PNG_RESOLUTION_METER); - --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - png_set_IHDR(png_ptr,info_ptr,_width,_height,_bit_depth,_color_type,_interlace_type, - _compression_type,_filter_type); - #else -@@ -644,7 +644,7 @@ bool CxImagePNG::Encode(CxFile *hFile) - info_ptr->num_trans = 1; - info_ptr->valid |= PNG_INFO_tRNS; - #endif --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - png_color_16 _trans_color; - _trans_color.index = (BYTE)info.nBkgndIndex; - _trans_color.red = tc.rgbRed; -@@ -676,7 +676,7 @@ bool CxImagePNG::Encode(CxFile *hFile) - } - - /* set the palette if there is one */ --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - png_colorp _palette = NULL; - if (GetPalette()){ - /* png_set_PLTE() will be called once the palette is ready */ -@@ -697,7 +697,7 @@ bool CxImagePNG::Encode(CxFile *hFile) - info_ptr->num_trans = (WORD)nc; - info_ptr->valid |= PNG_INFO_tRNS; - #endif --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - png_set_tRNS(png_ptr,info_ptr,(png_bytep)trans,nc,NULL); - #else - #if PNG_LIBPNG_VER > 10399 -@@ -709,7 +709,7 @@ bool CxImagePNG::Encode(CxFile *hFile) - } - - // copy the palette colors --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - _palette = new png_color[nc]; - for (int i=0; i - --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - int row_size = max(info.dwEffWidth, (_width * _channels * _bit_depth / 8)); - #else - int row_size = max(info.dwEffWidth, info_ptr->width*info_ptr->channels*(info_ptr->bit_depth/8)); -@@ -757,7 +757,7 @@ bool CxImagePNG::Encode(CxFile *hFile) - if (AlphaIsValid()){ - for (long ax=head.biWidth-1; ax>=0;ax--){ - c = BlindGetPixelColor(ax,ay); --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - int px = ax * _channels; - #else - int px = ax * info_ptr->channels; -@@ -776,7 +776,7 @@ bool CxImagePNG::Encode(CxFile *hFile) - #endif //CXIMAGE_SUPPORT_ALPHA // - { - iter.GetRow(row_pointers, row_size); --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - if (_color_type == PNG_COLOR_TYPE_RGB) //HACK BY OP - #else - if (info_ptr->color_type == PNG_COLOR_TYPE_RGB) //HACK BY OP -@@ -797,7 +797,7 @@ bool CxImagePNG::Encode(CxFile *hFile) - png_write_end(png_ptr, info_ptr); - - /* if you malloced the palette, free it here */ --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - if (_palette){ - delete [] (_palette); - #else -diff --git a/lib/cximage-6.0/CxImage/ximapng.h b/lib/cximage-6.0/CxImage/ximapng.h -index 68d8ddb..7d1611b 100644 ---- a/lib/cximage-6.0/CxImage/ximapng.h -+++ b/lib/cximage-6.0/CxImage/ximapng.h -@@ -30,6 +30,10 @@ - #endif - } - -+#if PNG_LIBPNG_VER > 10499 -+ #define USE_NEW_LIBPNG_API -+#endif -+ - class CxImagePNG: public CxImage - { - public: -@@ -69,7 +73,7 @@ class CxImagePNG: public CxImage - - static void PNGAPI user_error_fn(png_structp png_ptr,png_const_charp error_msg) - { --#if PNG_LIBPNG_VER > 10499 -+#ifdef USE_NEW_LIBPNG_API - strncpy((char*)png_get_error_ptr(png_ptr),error_msg,255); - longjmp(png_jmpbuf(png_ptr), 1); - #else --- -1.7.5.4 - diff --git a/tools/mkpkg/mkpkg_xbmc-eden b/tools/mkpkg/mkpkg_xbmc-eden index ba07bb51a5..63a05b9051 100755 --- a/tools/mkpkg/mkpkg_xbmc-eden +++ b/tools/mkpkg/mkpkg_xbmc-eden @@ -37,44 +37,40 @@ echo "getting version..." cd .. echo "copying sources..." - rm -rf $PKG_NAME-$GIT_REV - cp -R $DEST_DIR-latest $PKG_NAME-$GIT_REV - echo "$GIT_REV" > $PKG_NAME-$GIT_REV/git.version + rm -rf $PKG_NAME-11.0 + cp -R $DEST_DIR-latest $PKG_NAME-11.0 + echo "$GIT_REV" > $PKG_NAME-11.0/git.version echo "cleaning sources..." - rm -rf $PKG_NAME-$GIT_REV/.git + rm -rf $PKG_NAME-11.0/.git echo "seperating theme..." - rm -rf $PKG_NAME-theme-Confluence-$GIT_REV - mv $PKG_NAME-$GIT_REV/addons/skin.confluence $PKG_NAME-theme-Confluence-$GIT_REV -# rm -rf $PKG_NAME-theme-Touched-$GIT_REV -# mv $PKG_NAME-$GIT_REV/addons/skin.touched $PKG_NAME-theme-Touched-$GIT_REV + rm -rf $PKG_NAME-theme-Confluence-11.0 + mv $PKG_NAME-11.0/addons/skin.confluence $PKG_NAME-theme-Confluence-11.0 echo "cleaning sources..." - rm -rf $PKG_NAME-$GIT_REV/visualisations - rm -rf $PKG_NAME-$GIT_REV/lib/libSDL-* - rm -rf $PKG_NAME-$GIT_REV/lib/libcurl-* - rm -rf $PKG_NAME-$GIT_REV/project + rm -rf $PKG_NAME-11.0/visualisations + rm -rf $PKG_NAME-11.0/lib/libSDL-* + rm -rf $PKG_NAME-11.0/lib/libcurl-* + rm -rf $PKG_NAME-11.0/project for i in "Changelog" "Fake\ Episode\ Maker" "MingwBuildEnvironment" \ "PackageMaker" "Translator" "XBMCLive" "XprPack" \ "HardwareConfigure" "Mach5" "osx" "UpdateThumbs.py" "XBMCTex"; do - rm -rf $PKG_NAME-$GIT_REV/tools/$i + rm -rf $PKG_NAME-11.0/tools/$i done for i in dll a lib so bat; do - find $PKG_NAME-$GIT_REV -name *.$i -exec rm -rf {} ";" + find $PKG_NAME-11.0 -name *.$i -exec rm -rf {} ";" done # bundled win32 binaries - rm -r $PKG_NAME-$GIT_REV/xbmc/visualizations/XBMCProjectM/win32 + rm -r $PKG_NAME-11.0/xbmc/visualizations/XBMCProjectM/win32 echo "packing sources..." - tar cvJf $PKG_NAME-$GIT_REV.tar.xz $PKG_NAME-$GIT_REV - tar cvJf $PKG_NAME-theme-Confluence-$GIT_REV.tar.xz $PKG_NAME-theme-Confluence-$GIT_REV -# tar cvJf $PKG_NAME-theme-Touched-$GIT_REV.tar.xz $PKG_NAME-theme-Touched-$GIT_REV + tar cvJf $PKG_NAME-11.0.tar.xz $PKG_NAME-11.0 + tar cvJf $PKG_NAME-theme-Confluence-11.0.tar.xz $PKG_NAME-theme-Confluence-11.0 echo "remove temporary sourcedir..." - rm -rf $PKG_NAME-$GIT_REV - rm -rf $PKG_NAME-theme-Confluence-$GIT_REV -# rm -rf $PKG_NAME-theme-Touched-$GIT_REV + rm -rf $PKG_NAME-11.0 + rm -rf $PKG_NAME-theme-Confluence-11.0