From f3cd2b7f25800b704ccd2b39c10fa0073e1543e6 Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Fri, 10 Jan 2014 20:04:04 +0200 Subject: [PATCH] xbmc: update to xbmc-13.alpha-3751d14 --- .../xbmc-theme-Confluence/package.mk | 2 +- packages/mediacenter/xbmc/package.mk | 2 +- ...bmc-995.01-fernetmenta-fixes-a66a9b9.patch | 551 ++++---- .../patches/xbmc-999.03-PR3976-pulse.patch | 1166 ----------------- 4 files changed, 250 insertions(+), 1471 deletions(-) delete mode 100644 packages/mediacenter/xbmc/patches/xbmc-999.03-PR3976-pulse.patch diff --git a/packages/mediacenter/xbmc-theme-Confluence/package.mk b/packages/mediacenter/xbmc-theme-Confluence/package.mk index e2e45bacc7..b4e10f9ba2 100644 --- a/packages/mediacenter/xbmc-theme-Confluence/package.mk +++ b/packages/mediacenter/xbmc-theme-Confluence/package.mk @@ -17,7 +17,7 @@ ################################################################################ PKG_NAME="xbmc-theme-Confluence" -PKG_VERSION="13.alpha-024ef6b" +PKG_VERSION="13.alpha-3751d14" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/mediacenter/xbmc/package.mk b/packages/mediacenter/xbmc/package.mk index b8d98d36b3..fa39bbc7bf 100644 --- a/packages/mediacenter/xbmc/package.mk +++ b/packages/mediacenter/xbmc/package.mk @@ -17,7 +17,7 @@ ################################################################################ PKG_NAME="xbmc" -PKG_VERSION="13.alpha-024ef6b" +PKG_VERSION="13.alpha-3751d14" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/mediacenter/xbmc/patches/xbmc-995.01-fernetmenta-fixes-a66a9b9.patch b/packages/mediacenter/xbmc/patches/xbmc-995.01-fernetmenta-fixes-a66a9b9.patch index 942d84d47b..ba4f12a9fd 100644 --- a/packages/mediacenter/xbmc/patches/xbmc-995.01-fernetmenta-fixes-a66a9b9.patch +++ b/packages/mediacenter/xbmc/patches/xbmc-995.01-fernetmenta-fixes-a66a9b9.patch @@ -1,7 +1,7 @@ -From 24592f3fbd65cf39e89d333f5176aea829aefc1f Mon Sep 17 00:00:00 2001 +From 9e8f9907c7e1bfa61888e0e5a2d677de2d5b53be Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 28 May 2012 10:34:39 +0200 -Subject: [PATCH 01/90] videoplayer: adapt lateness detection and dropping to +Subject: [PATCH 01/89] videoplayer: adapt lateness detection and dropping to buffering --- @@ -254,7 +254,7 @@ index 2287031..8376f72 100644 + int m_codecControlFlags; }; diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -index 3a6eac2..d053b2d 100644 +index 4797b19..c8b2ed8 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp @@ -38,6 +38,7 @@ @@ -265,7 +265,7 @@ index 3a6eac2..d053b2d 100644 #include #include #include -@@ -319,8 +320,10 @@ void CDVDPlayerVideo::Process() +@@ -320,8 +321,10 @@ void CDVDPlayerVideo::Process() int iDropped = 0; //frames dropped in a row bool bRequestDrop = false; @@ -276,7 +276,7 @@ index 3a6eac2..d053b2d 100644 while (!m_bStop) { -@@ -430,6 +433,7 @@ void CDVDPlayerVideo::Process() +@@ -431,6 +434,7 @@ void CDVDPlayerVideo::Process() picture.iFlags &= ~DVP_FLAG_ALLOCATED; m_packets.clear(); m_started = false; @@ -284,7 +284,7 @@ index 3a6eac2..d053b2d 100644 } else if (pMsg->IsType(CDVDMsg::GENERAL_FLUSH)) // private message sent by (CDVDPlayerVideo::Flush()) { -@@ -442,6 +446,7 @@ void CDVDPlayerVideo::Process() +@@ -443,6 +447,7 @@ void CDVDPlayerVideo::Process() //we need to recalculate the framerate //TODO: this needs to be set on a streamchange instead ResetFrameRateCalc(); @@ -292,7 +292,7 @@ index 3a6eac2..d053b2d 100644 m_stalled = true; m_started = false; -@@ -459,8 +464,10 @@ void CDVDPlayerVideo::Process() +@@ -460,8 +465,10 @@ void CDVDPlayerVideo::Process() m_speed = static_cast(pMsg)->m_value; if(m_speed == DVD_PLAYSPEED_PAUSE) m_iNrOfPicturesNotToSkip = 0; @@ -303,7 +303,7 @@ index 3a6eac2..d053b2d 100644 } else if (pMsg->IsType(CDVDMsg::PLAYER_STARTED)) { -@@ -506,6 +513,28 @@ void CDVDPlayerVideo::Process() +@@ -507,6 +514,28 @@ void CDVDPlayerVideo::Process() m_iNrOfPicturesNotToSkip = 1; } @@ -332,7 +332,7 @@ index 3a6eac2..d053b2d 100644 if (m_messageQueue.GetDataSize() == 0 || m_speed < 0) { -@@ -558,15 +587,7 @@ void CDVDPlayerVideo::Process() +@@ -559,15 +588,7 @@ void CDVDPlayerVideo::Process() } m_videoStats.AddSampleBytes(pPacket->iSize); @@ -349,7 +349,7 @@ index 3a6eac2..d053b2d 100644 // reset the request, the following while loop may break before // setting the flag to a new value bRequestDrop = false; -@@ -1177,33 +1198,12 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts) +@@ -1178,33 +1199,12 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts) m_FlipTimeStamp += max(0.0, iSleepTime); m_FlipTimeStamp += iFrameDuration; @@ -387,7 +387,7 @@ index 3a6eac2..d053b2d 100644 // set fieldsync if picture is interlaced EFIELDSYNC mDisplayField = FS_NONE; -@@ -1236,7 +1236,7 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts) +@@ -1237,7 +1237,7 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts) if (index < 0) return EOS_DROPPED; @@ -396,7 +396,7 @@ index 3a6eac2..d053b2d 100644 return result; #else -@@ -1536,3 +1536,127 @@ void CDVDPlayerVideo::CalcFrameRate() +@@ -1537,3 +1537,127 @@ void CDVDPlayerVideo::CalcFrameRate() m_iFrameRateCount = 0; } } @@ -582,10 +582,10 @@ index f8ad541..186e271 100644 1.8.5.1 -From e53738b30c0505d02cd748862d4b4df22d815e69 Mon Sep 17 00:00:00 2001 +From 8ed898b48ea0028717a20c17e4ac989340fae4df Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 2 Sep 2012 16:05:21 +0200 -Subject: [PATCH 02/90] video player: present correct pts to user for a/v sync +Subject: [PATCH 02/89] video player: present correct pts to user for a/v sync (after buffering in renderer) --- @@ -594,10 +594,10 @@ Subject: [PATCH 02/90] video player: present correct pts to user for a/v sync 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -index d053b2d..4c3d0e8 100644 +index c8b2ed8..c3b5e37 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -@@ -1456,6 +1456,22 @@ void CDVDPlayerVideo::ResetFrameRateCalc() +@@ -1457,6 +1457,22 @@ void CDVDPlayerVideo::ResetFrameRateCalc() g_advancedSettings.m_videoFpsDetect == 0; } @@ -620,7 +620,7 @@ index d053b2d..4c3d0e8 100644 #define MAXFRAMERATEDIFF 0.01 #define MAXFRAMESERR 1000 -@@ -1574,6 +1590,15 @@ int CDVDPlayerVideo::CalcDropRequirement(double pts) +@@ -1575,6 +1591,15 @@ int CDVDPlayerVideo::CalcDropRequirement(double pts) else iInterval = 1/m_fFrameRate*(double)DVD_TIME_BASE; @@ -653,10 +653,10 @@ index 186e271..59c7f09 100644 1.8.5.1 -From 6615f14d24c86f4ffdf3cc9a885e675921b55ac4 Mon Sep 17 00:00:00 2001 +From 17ee0122aec66522b6edc693a07448d3b8d90358 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 16 Feb 2013 18:25:53 +0100 -Subject: [PATCH 03/90] videoplayer: some rework and documentation +Subject: [PATCH 03/89] videoplayer: some rework and documentation --- .../dvdplayer/DVDCodecs/Video/DVDVideoCodec.h | 29 ++++++++++++++++++++-- @@ -751,10 +751,10 @@ index 8376f72..c0ce198 100644 bool IsHardwareAllowed() { return !m_bSoftware; } diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -index 4c3d0e8..7f6de3c 100644 +index c3b5e37..392d971 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -@@ -1567,7 +1567,7 @@ int CDVDPlayerVideo::CalcDropRequirement(double pts) +@@ -1568,7 +1568,7 @@ int CDVDPlayerVideo::CalcDropRequirement(double pts) int iBufferLevel; // get decoder stats @@ -767,17 +767,17 @@ index 4c3d0e8..7f6de3c 100644 1.8.5.1 -From 5db5f14c8e9732174580db0d088e53d02b2223af Mon Sep 17 00:00:00 2001 +From 44d58b9f19ebbb22755dc0103f41f0655b036336 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sat, 1 Jun 2013 11:21:19 +0200 -Subject: [PATCH 04/90] renderer: bump buffers to 5 +Subject: [PATCH 04/89] renderer: bump buffers to 5 --- xbmc/cores/VideoRenderers/BaseRenderer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xbmc/cores/VideoRenderers/BaseRenderer.h b/xbmc/cores/VideoRenderers/BaseRenderer.h -index 5a21fec..c131dd1 100644 +index dc2712a..9edfbd4 100644 --- a/xbmc/cores/VideoRenderers/BaseRenderer.h +++ b/xbmc/cores/VideoRenderers/BaseRenderer.h @@ -29,7 +29,7 @@ @@ -793,10 +793,10 @@ index 5a21fec..c131dd1 100644 1.8.5.1 -From a930387a334734aa7e206673576bb4b285d496d6 Mon Sep 17 00:00:00 2001 +From 58ff471a148660a62eeb5cb40827d2427e8dc23a Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 28 May 2012 10:41:31 +0200 -Subject: [PATCH 05/90] videoplayer: update frametime, it might change due to +Subject: [PATCH 05/89] videoplayer: update frametime, it might change due to fps detection --- @@ -804,10 +804,10 @@ Subject: [PATCH 05/90] videoplayer: update frametime, it might change due to 1 file changed, 2 insertions(+) diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -index 7f6de3c..699a10a 100644 +index 392d971..b650ccb 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -@@ -707,6 +707,8 @@ void CDVDPlayerVideo::Process() +@@ -708,6 +708,8 @@ void CDVDPlayerVideo::Process() int iResult = OutputPicture(&picture, pts); @@ -820,10 +820,10 @@ index 7f6de3c..699a10a 100644 1.8.5.1 -From 745a1468704148868fce3de8bfe669e224fad325 Mon Sep 17 00:00:00 2001 +From ab372f802f5134eddaf4f352a1380f485b42296c Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 28 May 2012 10:43:06 +0200 -Subject: [PATCH 06/90] videoplayer: give streams with invalid fps a chance for +Subject: [PATCH 06/89] videoplayer: give streams with invalid fps a chance for fps detection --- @@ -831,10 +831,10 @@ Subject: [PATCH 06/90] videoplayer: give streams with invalid fps a chance for 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -index 699a10a..9d1a920 100644 +index b650ccb..3c517f2 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -@@ -1498,7 +1498,7 @@ void CDVDPlayerVideo::CalcFrameRate() +@@ -1499,7 +1499,7 @@ void CDVDPlayerVideo::CalcFrameRate() double frameduration = m_pullupCorrection.GetFrameDuration(); if (frameduration == DVD_NOPTS_VALUE || @@ -847,10 +847,10 @@ index 699a10a..9d1a920 100644 1.8.5.1 -From 2c9244d653b58d8fc26a76586f64dc027ef99e0a Mon Sep 17 00:00:00 2001 +From 3b3293d5843295f833d7b3c01b2602192e4ba16b Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 28 May 2012 10:49:05 +0200 -Subject: [PATCH 07/90] dvdplayer: allow rewinding at end of stream, do a seek +Subject: [PATCH 07/89] dvdplayer: allow rewinding at end of stream, do a seek after rewind --- @@ -887,10 +887,10 @@ index a698b8f..a845c7e 100644 1.8.5.1 -From b8c6c6eac810e27016811f308848931163355ad1 Mon Sep 17 00:00:00 2001 +From 969eb976c74b34580fcbd677061cf987aec10a05 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 15:22:05 +0200 -Subject: [PATCH 08/90] X11: ditch SDL for video and window events +Subject: [PATCH 08/89] X11: ditch SDL for video and window events --- xbmc/Application.cpp | 2 +- @@ -2427,10 +2427,10 @@ index b1464d0..34b912f 100644 1.8.5.1 -From cc20b7067548448a0871322d8aa57cfdbbc23e73 Mon Sep 17 00:00:00 2001 +From c7bcd146f685eb310224d0a49a5e2fb4ec30a948 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 15:24:22 +0200 -Subject: [PATCH 09/90] X11: Add xbmc icon +Subject: [PATCH 09/89] X11: Add xbmc icon --- xbmc/windowing/X11/WinSystemX11.cpp | 126 +++++++++++++++++++++++++++++++++++- @@ -2620,10 +2620,10 @@ index 34b912f..352e90e 100644 1.8.5.1 -From 0b4532f02fe51adf2d61ca5ef912b81b6a983b67 Mon Sep 17 00:00:00 2001 +From f1d9a6efba8101a5386d907564bd2483d7d0c1e5 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 20 May 2012 14:11:26 +0200 -Subject: [PATCH 10/90] X11: add SDL joystick until we have a better solution +Subject: [PATCH 10/89] X11: add SDL joystick until we have a better solution --- xbmc/windowing/WinEventsX11.cpp | 26 ++++++++++++++++++++++++++ @@ -2677,10 +2677,10 @@ index ad58aad..6f57a87 100644 1.8.5.1 -From 16cbb53a9afd1c78c11e54720dd56e8721fcd8d8 Mon Sep 17 00:00:00 2001 +From d47a65a3583753fde83f9594949e4c065cab8a8d Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Thu, 5 Jul 2012 12:35:55 +0200 -Subject: [PATCH 11/90] X11: factor out code handling device reset notification +Subject: [PATCH 11/89] X11: factor out code handling device reset notification --- xbmc/windowing/X11/WinSystemX11.cpp | 22 ++++++++++++++-------- @@ -2743,10 +2743,10 @@ index 352e90e..3f91b9b 100644 1.8.5.1 -From ba1f475963878c21ab85c6534e0bf9d90b1b6e1f Mon Sep 17 00:00:00 2001 +From 3d37269b5f1c45314d2b68b605d1f459cd794859 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 15:02:00 +0200 -Subject: [PATCH 12/90] X11: move xrandr events to WinEventsX11 +Subject: [PATCH 12/89] X11: move xrandr events to WinEventsX11 --- xbmc/windowing/WinEventsX11.cpp | 42 +++++++++++++++++++++++++++++++++++++ @@ -2890,10 +2890,10 @@ index 304dac8..16b13aa 100644 1.8.5.1 -From dd8a6126089ab97a632614b83e8dfa01af66ef1d Mon Sep 17 00:00:00 2001 +From d35184f094a9d545826483d4aae5a519e8426591 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 12 Apr 2012 15:43:56 +0200 -Subject: [PATCH 13/90] xrandr: remove method RestoreState +Subject: [PATCH 13/89] xrandr: remove method RestoreState --- xbmc/windowing/X11/WinSystemX11.cpp | 13 +++++++++++-- @@ -2972,10 +2972,10 @@ index 0aec487..00b49dc 100644 1.8.5.1 -From 71a4051ceafefaf2b017fa0d2e6cae48d828cc96 Mon Sep 17 00:00:00 2001 +From 5bc70b5828ce7351893663f03ed071fd796388c1 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 20 May 2012 13:17:10 +0200 -Subject: [PATCH 14/90] xrandr: observe orientation +Subject: [PATCH 14/89] xrandr: observe orientation --- xbmc/windowing/X11/WinSystemX11.cpp | 89 ++++++++++++++++++++++++++++++------- @@ -3190,10 +3190,10 @@ index 00b49dc..508604d 100644 1.8.5.1 -From 60eafb7be8d81765eb7d4c6cddd5d1bea5c09a72 Mon Sep 17 00:00:00 2001 +From cf656f52ccb4746f87e89373737216cc8c59cbd4 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 11:54:15 +0200 -Subject: [PATCH 15/90] xrandr: allow getting info for multiple screen's +Subject: [PATCH 15/89] xrandr: allow getting info for multiple screen's Refactored by: Joakim Plate --- @@ -3368,10 +3368,10 @@ index 508604d..d37838a 100644 1.8.5.1 -From edb6bec9f527c1ee329bc9b5fa411e8e1001df8c Mon Sep 17 00:00:00 2001 +From a7916c4d9f821e986f7a0fa2cea0fbaef939dc4a Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 11:44:00 +0200 -Subject: [PATCH 16/90] X11: fix multi-head setups +Subject: [PATCH 16/89] X11: fix multi-head setups --- language/English/strings.po | 4 +- @@ -3386,7 +3386,7 @@ Subject: [PATCH 16/90] X11: fix multi-head setups 9 files changed, 227 insertions(+), 113 deletions(-) diff --git a/language/English/strings.po b/language/English/strings.po -index 1c391f0..0c8f3fc 100755 +index 38fa82e..0bc9bcd 100755 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -1019,7 +1019,9 @@ msgctxt "#245" @@ -3401,7 +3401,7 @@ index 1c391f0..0c8f3fc 100755 msgctxt "#247" msgid "Scripts" diff --git a/system/settings/settings.xml b/system/settings/settings.xml -index 8168282..c942022 100644 +index 6879121..08d0a89 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -2067,6 +2067,15 @@ @@ -4130,10 +4130,10 @@ index 4175aab..94584ab 100644 1.8.5.1 -From 3d06c2ad91484062c27442e36277e2946debb5e3 Mon Sep 17 00:00:00 2001 +From 8ea222de6a7c4ee1d0df7f7a3406538a3671e646 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 11:36:32 +0200 -Subject: [PATCH 17/90] X11: remove all DefaultScreen and RootWindow macros +Subject: [PATCH 17/89] X11: remove all DefaultScreen and RootWindow macros --- xbmc/windowing/X11/WinSystemX11.cpp | 6 +++--- @@ -4201,10 +4201,10 @@ index 6383754..21e7dc5 100644 1.8.5.1 -From 9068a69c5dca6c9f48497afba9536df2b486f649 Mon Sep 17 00:00:00 2001 +From 1d63184a156f48067fff78a0478dc0e22d03463b Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 11:45:22 +0200 -Subject: [PATCH 18/90] X11: remove all DefaultScreen and RootWindow macros +Subject: [PATCH 18/89] X11: remove all DefaultScreen and RootWindow macros (VideoRefClock) Note this is on a separate display connection. @@ -4276,10 +4276,10 @@ index 0b3950a..ca43b5a 100644 1.8.5.1 -From 1f827d223dcc8b11ea19a0f1b754f26a2db86e64 Mon Sep 17 00:00:00 2001 +From 6695e32fe18968f58f43fbe35610b6ac298b7739 Mon Sep 17 00:00:00 2001 From: xbmc Date: Wed, 20 Jun 2012 17:37:11 +0200 -Subject: [PATCH 19/90] X11: recreate gl context after output has changed +Subject: [PATCH 19/89] X11: recreate gl context after output has changed --- xbmc/windowing/X11/WinSystemX11.cpp | 24 ++++++++++++++---------- @@ -4430,10 +4430,10 @@ index 21e7dc5..8e68d5d 100644 1.8.5.1 -From 4a7bf50922fcfd2a349d4f50f52b9bd1828cd1ca Mon Sep 17 00:00:00 2001 +From d8f3920852834b6dc54651835ac120339915e258 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 12:06:25 +0200 -Subject: [PATCH 20/90] X11: hook video reference clock in windowing +Subject: [PATCH 20/89] X11: hook video reference clock in windowing --- xbmc/video/VideoReferenceClock.cpp | 71 +++++++++++++++++++++++++++----------- @@ -4638,10 +4638,10 @@ index dd65a1b..afd71fc 100644 1.8.5.1 -From a83c19d317c47e11d94d7705d48793d320b0f28e Mon Sep 17 00:00:00 2001 +From 8d572be09cdf1696a4f1c75ae4db4a0ddb56b10d Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 21 Jun 2012 17:26:51 +0200 -Subject: [PATCH 21/90] X11: fix video calibrations +Subject: [PATCH 21/89] X11: fix video calibrations --- xbmc/windowing/WinSystem.h | 1 + @@ -4733,10 +4733,10 @@ index 9666cc3..5b52d6c 100644 1.8.5.1 -From 8268631f4ee07cdc08c5225487efe3ba2a30ba2f Mon Sep 17 00:00:00 2001 +From 1c28c1319449ae2b4558078cd20f41b68bb00087 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 12:00:26 +0200 -Subject: [PATCH 22/90] X11: deactivate screen saver on startup +Subject: [PATCH 22/89] X11: deactivate screen saver on startup --- xbmc/windowing/X11/WinSystemX11.cpp | 29 +++++++++++++++++++++++++++++ @@ -4806,10 +4806,10 @@ index 5b52d6c..b2bd5a0 100644 1.8.5.1 -From b6b5356d8e0ee94ac975d89b9da33ee555942312 Mon Sep 17 00:00:00 2001 +From a3fc59d8901cda525c5fad1f3e85e6226c57ffa1 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 12:10:09 +0200 -Subject: [PATCH 23/90] X11: change method of going full-screen +Subject: [PATCH 23/89] X11: change method of going full-screen --- xbmc/windowing/X11/WinSystemX11.cpp | 9 ++++++++- @@ -4853,10 +4853,10 @@ index b76b229..869baa8 100644 1.8.5.1 -From d5c29f6c17f4c8af16f94e2edb6220493194f155 Mon Sep 17 00:00:00 2001 +From c7e9ef5c1b88ccc8c53f8ed17571ab6c8024772d Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 28 Jun 2012 19:12:39 +0200 -Subject: [PATCH 24/90] X11: reset key repeat and key modifier on focus lost +Subject: [PATCH 24/89] X11: reset key repeat and key modifier on focus lost and gain --- @@ -4888,10 +4888,10 @@ index d98f12f..743aca9 100644 1.8.5.1 -From f64d20fd9758be91f03b6392864176185e92c919 Mon Sep 17 00:00:00 2001 +From 821c1cdf0c43215e1a46f7a2769809e757fea8eb Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Thu, 5 Jul 2012 14:18:46 +0200 -Subject: [PATCH 25/90] X11: replace custom utf8 to unicode with charset +Subject: [PATCH 25/89] X11: replace custom utf8 to unicode with charset convertor (squash to x11 events) --- @@ -5108,10 +5108,10 @@ index a412f32..9a8a912 100644 1.8.5.1 -From a76e0054995e838e1eb1880127d2c7e467d8f0c3 Mon Sep 17 00:00:00 2001 +From e571aa3c98c5dd38763e4f6fbc9fba74fe44c2ac Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Thu, 5 Jul 2012 14:23:54 +0200 -Subject: [PATCH 26/90] X11: fixed invalid usage of sizeof() (squash into x11 +Subject: [PATCH 26/89] X11: fixed invalid usage of sizeof() (squash into x11 changes) --- @@ -5175,10 +5175,10 @@ index 9a8a912..c69169c 100644 1.8.5.1 -From 949285f58f21f975fe867d277004fe42828bc389 Mon Sep 17 00:00:00 2001 +From a2d991c7c354f7580edbcaa85092a38d8c480fbd Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 9 Jun 2012 18:23:53 +0200 -Subject: [PATCH 27/90] add missing keys to xbmc keytable +Subject: [PATCH 27/89] add missing keys to xbmc keytable --- xbmc/input/XBMC_keytable.cpp | 2 ++ @@ -5201,10 +5201,10 @@ index d57f4d3..b807897 100644 1.8.5.1 -From be9cc25c82711ee3809766240a8a3b28cda9f7de Mon Sep 17 00:00:00 2001 +From 3eb378ac02bb123043fc65b5e883ff2e44ab1918 Mon Sep 17 00:00:00 2001 From: xbmc Date: Fri, 16 Mar 2012 15:57:51 +0100 -Subject: [PATCH 28/90] videorefclock: temp deactivate of nv settings +Subject: [PATCH 28/89] videorefclock: temp deactivate of nv settings --- xbmc/video/VideoReferenceClock.cpp | 2 +- @@ -5227,10 +5227,10 @@ index 0ddf102..3ae7107 100644 1.8.5.1 -From 0f056bdb6f278097d78f7481c49f0a528f5c7608 Mon Sep 17 00:00:00 2001 +From b416327bb422596bcd7838d18faefee2396053e7 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 20 Aug 2012 09:09:09 +0200 -Subject: [PATCH 29/90] videorefclock: ask graphics context for refresh rate +Subject: [PATCH 29/89] videorefclock: ask graphics context for refresh rate --- xbmc/video/VideoReferenceClock.cpp | 3 ++- @@ -5261,10 +5261,10 @@ index 3ae7107..27bebde 100644 1.8.5.1 -From 65e0cc47e6a127aab6c0ddcd9c4d557584bbc621 Mon Sep 17 00:00:00 2001 +From 03af2c2ae298f36fed6c395fa11012b27b6becd7 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 9 Jul 2012 14:00:18 +0200 -Subject: [PATCH 30/90] X11: fix icon texture after +Subject: [PATCH 30/89] X11: fix icon texture after cc5ed3c2474084ebc0373a3046410e6f766e03f4 --- @@ -5372,10 +5372,10 @@ index 869baa8..bfe3797 100644 1.8.5.1 -From aed5bb5a8c312f685130ec3f82bd8f410ec8fc68 Mon Sep 17 00:00:00 2001 +From 727bc2d39c63b7a0beb1716e030b6c6a8f3b0ad0 Mon Sep 17 00:00:00 2001 From: xbmc Date: Tue, 10 Jul 2012 11:14:12 +0200 -Subject: [PATCH 31/90] X11: check for window manager +Subject: [PATCH 31/89] X11: check for window manager --- xbmc/windowing/X11/WinSystemX11.cpp | 74 ++++++++++++++++++++++++++++++++++++- @@ -5496,10 +5496,10 @@ index b2bd5a0..3e62cd8 100644 1.8.5.1 -From 317cd32960a30f9b3513edd91a8c9d9476a4ec03 Mon Sep 17 00:00:00 2001 +From 79b005dad71ee8381446fbe802c37cddf4fdb72d Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 12 Jul 2012 11:11:47 +0200 -Subject: [PATCH 32/90] X11: dont set window on xrandr if no mode available +Subject: [PATCH 32/89] X11: dont set window on xrandr if no mode available --- xbmc/windowing/X11/WinSystemX11.cpp | 11 ++++++----- @@ -5536,10 +5536,10 @@ index af82061..4f33c68 100644 1.8.5.1 -From 08d7410875489edee825cf3ac94b8233c4f5f52c Mon Sep 17 00:00:00 2001 +From e1c1428672b72b078b210aa00524128cb027c06e Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 26 Jul 2012 09:34:28 +0200 -Subject: [PATCH 33/90] X11: fix crash after a resolution change on startup +Subject: [PATCH 33/89] X11: fix crash after a resolution change on startup --- xbmc/windowing/X11/WinSystemX11.cpp | 3 ++- @@ -5563,10 +5563,10 @@ index 4f33c68..bc4e963 100644 1.8.5.1 -From e41ee196dcbbcb55eff486d15a3d7aff7261b5aa Mon Sep 17 00:00:00 2001 +From e9a10ce11313359ba324d2ff24400cb0dc66ab98 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 15 Sep 2012 18:27:29 +0200 -Subject: [PATCH 34/90] X11: lock graphics context in NotifyXRREvent +Subject: [PATCH 34/89] X11: lock graphics context in NotifyXRREvent --- xbmc/windowing/X11/WinSystemX11.cpp | 2 ++ @@ -5589,10 +5589,10 @@ index bc4e963..57a8d20 100644 1.8.5.1 -From 52a382f011f58f35950b38c7823e18092a1fc6b0 Mon Sep 17 00:00:00 2001 +From 66a18c2f103d87206f11462288e8cdf90ac0be2a Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 23 Aug 2012 19:39:49 +0200 -Subject: [PATCH 35/90] ffmpeg: add av_find_default_stream_index to interface +Subject: [PATCH 35/89] ffmpeg: add av_find_default_stream_index to interface --- lib/DllAvFormat.h | 4 ++++ @@ -5638,10 +5638,10 @@ index 0016c0b..3514856 100644 1.8.5.1 -From e37d46be368c6940cd717587e3af4ae6710ce85f Mon Sep 17 00:00:00 2001 +From 008247d59cc28c3af07e9fde49d8774f21cbcdbc Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 20 Aug 2012 16:06:39 +0200 -Subject: [PATCH 36/90] dvdplayer: observe pts counter overflow +Subject: [PATCH 36/89] dvdplayer: observe pts counter overflow --- .../cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp | 198 ++++++++++++++++++++- @@ -5928,46 +5928,46 @@ index aef5ab1..35abbdf 100644 1.8.5.1 -From 9b0b3316f29fb8a7be77159b88082657eed6467d Mon Sep 17 00:00:00 2001 +From 7344934096b2cefa832025b37e8c7abddcfafb81 Mon Sep 17 00:00:00 2001 From: xbmc Date: Tue, 2 Oct 2012 13:02:10 +0200 -Subject: [PATCH 37/90] dvdplayer: avoid short screen flicker caused by +Subject: [PATCH 37/89] dvdplayer: avoid short screen flicker caused by unnecessary reconfigure of renderer --- - xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -index 9d1a920..9880bdb 100644 +index 3c517f2..5d4875c 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -@@ -1059,7 +1059,7 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts) +@@ -1054,13 +1054,16 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts) + + #ifdef HAS_VIDEO_PLAYBACK + double config_framerate = m_bFpsInvalid ? 0.0 : m_fFrameRate; ++ double render_framerate = g_graphicsContext.GetFPS(); ++ if (CSettings::Get().GetInt("videoplayer.adjustrefreshrate") == ADJUST_REFRESHRATE_OFF) ++ render_framerate = config_framerate; + /* check so that our format or aspect has changed. if it has, reconfigure renderer */ + if (!g_renderManager.IsConfigured() + || ( m_output.width != pPicture->iWidth ) || ( m_output.height != pPicture->iHeight ) || ( m_output.dwidth != pPicture->iDisplayWidth ) || ( m_output.dheight != pPicture->iDisplayHeight ) - || ( m_output.framerate != config_framerate ) -+ || (!m_bFpsInvalid && fmod(m_output.framerate, config_framerate) != 0.0 ) ++ || (!m_bFpsInvalid && fmod(m_output.framerate, config_framerate) != 0.0 && render_framerate != config_framerate) || ( m_output.color_format != (unsigned int)pPicture->format ) || ( m_output.extended_format != pPicture->extended_format ) || ( m_output.color_matrix != pPicture->color_matrix && pPicture->color_matrix != 0 ) // don't reconfigure on unspecified -@@ -1115,7 +1115,7 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts) - m_output.height = pPicture->iHeight; - m_output.dwidth = pPicture->iDisplayWidth; - m_output.dheight = pPicture->iDisplayHeight; -- m_output.framerate = config_framerate; -+ m_output.framerate = config_framerate == 0.0 ? g_graphicsContext.GetFPS() : config_framerate; - m_output.color_format = pPicture->format; - m_output.extended_format = pPicture->extended_format; - m_output.color_matrix = pPicture->color_matrix; -- 1.8.5.1 -From 797a38995b45dd6d95eb15875ad2b44a8a6cd0aa Mon Sep 17 00:00:00 2001 +From 4272d6e85de6619721ebe0be2bb45c089859cc18 Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 11 Oct 2012 12:05:50 +0200 -Subject: [PATCH 38/90] vdpau: advanced settings for auto deinterlacing +Subject: [PATCH 38/89] vdpau: advanced settings for auto deinterlacing --- xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 8 ++++---- @@ -6033,10 +6033,10 @@ index 88d2cde..0f0a24e 100644 1.8.5.1 -From 7abe03bc02e60907156d35b919115852db32ebaf Mon Sep 17 00:00:00 2001 +From bbc2fb9cdbdefb861fd067d909cdfb18695267ad Mon Sep 17 00:00:00 2001 From: xbmc Date: Fri, 2 Nov 2012 13:20:03 +0100 -Subject: [PATCH 39/90] player: fix rewind +Subject: [PATCH 39/89] player: fix rewind --- xbmc/cores/dvdplayer/DVDMessage.h | 5 ++++- @@ -6214,10 +6214,10 @@ index dfe679f..96f7fe5 100644 int m_errorCount; diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -index 9880bdb..939f82f 100644 +index 5d4875c..59c5e40 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -@@ -1468,7 +1468,7 @@ double CDVDPlayerVideo::GetCurrentPts() +@@ -1472,7 +1472,7 @@ double CDVDPlayerVideo::GetCurrentPts() if( m_stalled ) iRenderPts = DVD_NOPTS_VALUE; @@ -6226,7 +6226,7 @@ index 9880bdb..939f82f 100644 iRenderPts = iRenderPts - max(0.0, iSleepTime); return iRenderPts; -@@ -1568,6 +1568,8 @@ int CDVDPlayerVideo::CalcDropRequirement(double pts) +@@ -1572,6 +1572,8 @@ int CDVDPlayerVideo::CalcDropRequirement(double pts) int iSkippedDeint = 0; int iBufferLevel; @@ -6251,10 +6251,10 @@ index 59c7f09..65dea76 100644 1.8.5.1 -From e5bfcf319482954baa9f90f22a23b04919874276 Mon Sep 17 00:00:00 2001 +From 4138c27936501a7f0f32168ecbe6079af9eb76e9 Mon Sep 17 00:00:00 2001 From: xbmc Date: Fri, 23 Nov 2012 17:41:12 +0100 -Subject: [PATCH 40/90] xrandr: fix query for multiple screens +Subject: [PATCH 40/89] xrandr: fix query for multiple screens --- xbmc/windowing/X11/XRandR.cpp | 10 ++++++---- @@ -6295,10 +6295,10 @@ index 4685413..e610150 100644 1.8.5.1 -From c18799ec45038e62b99f09ebccd54783f00c6fef Mon Sep 17 00:00:00 2001 +From 6e490eb3b6f7985c645248dcb97ec97e8218514d Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 2 Dec 2012 15:46:55 +0100 -Subject: [PATCH 41/90] X11: add debug log to print out refresh after xrr event +Subject: [PATCH 41/89] X11: add debug log to print out refresh after xrr event --- xbmc/windowing/X11/WinSystemX11.cpp | 6 ++++++ @@ -6325,10 +6325,10 @@ index 57a8d20..a237dc0 100644 1.8.5.1 -From 968cc2a4fdbf7bf705fdce3dbf2c785004a7aea1 Mon Sep 17 00:00:00 2001 +From d1a6ee381382e1932452ee7bf67764536fe52550 Mon Sep 17 00:00:00 2001 From: xbmc Date: Tue, 11 Dec 2012 11:08:13 +0100 -Subject: [PATCH 42/90] X11: dont call XCloseDisplay on shutdown, it crashes +Subject: [PATCH 42/89] X11: dont call XCloseDisplay on shutdown, it crashes when powered doen by cec on ATI --- @@ -6353,10 +6353,10 @@ index a237dc0..ab660b1 100644 1.8.5.1 -From 78c202f2aacc84714032c702c7be32fabf89ee09 Mon Sep 17 00:00:00 2001 +From ade126254e31ef173ea6786c9ed33152cfb79454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Coutant?= Date: Wed, 12 Dec 2012 19:49:47 +0100 -Subject: [PATCH 43/90] x11: support for multiple x screens +Subject: [PATCH 43/89] x11: support for multiple x screens --- xbmc/windowing/X11/XRandR.cpp | 2 +- @@ -6379,10 +6379,10 @@ index e610150..5c53574 100644 1.8.5.1 -From d4b3c981e066b88587e0ba3f90380480d2996834 Mon Sep 17 00:00:00 2001 +From 8ad569e65b7ffcc02dfe6d971448ded360fb1841 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 24 Dec 2012 16:02:42 +0100 -Subject: [PATCH 44/90] pvr: increase changes counter of stream on stream +Subject: [PATCH 44/89] pvr: increase changes counter of stream on stream change, cosmetics after dd307930d39d92f145a01a16600cd00e01ec39be --- @@ -6416,10 +6416,10 @@ index e5f8234..96c9e89 100644 1.8.5.1 -From 7988e181ecfba7bc299887f124348511dc8ac6a5 Mon Sep 17 00:00:00 2001 +From 26e8ade5c24a91d6a2c234cda300125d7746c122 Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 17 Jan 2013 16:03:22 +0100 -Subject: [PATCH 45/90] X11: add keymapping for XF86XK_Sleep +Subject: [PATCH 45/89] X11: add keymapping for XF86XK_Sleep --- xbmc/windowing/WinEventsX11.cpp | 1 + @@ -6441,10 +6441,10 @@ index a62521f..263cb5a 100644 1.8.5.1 -From 30340583a20eadbdab107cc59226ab89a8193161 Mon Sep 17 00:00:00 2001 +From 3ef383727ab93fa3fb100fcf39a108fab8d6ccc8 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 21 Jan 2013 09:00:19 +0100 -Subject: [PATCH 46/90] X11: remove toggle full screen after resume +Subject: [PATCH 46/89] X11: remove toggle full screen after resume --- xbmc/powermanagement/PowerManager.cpp | 5 ----- @@ -6470,10 +6470,10 @@ index 590a887..35b5a21 100644 1.8.5.1 -From 62738e234d581d0e0d470d2c8ccecadf769a82e1 Mon Sep 17 00:00:00 2001 +From baf120bc4979f421e23947567e176030d40225e0 Mon Sep 17 00:00:00 2001 From: xbmc Date: Wed, 23 Jan 2013 17:03:02 +0100 -Subject: [PATCH 47/90] xrandr: set screen on mode change command +Subject: [PATCH 47/89] xrandr: set screen on mode change command --- xbmc/windowing/X11/XRandR.cpp | 2 +- @@ -6496,10 +6496,10 @@ index 5c53574..4355ef7 100644 1.8.5.1 -From 23902bc50ee2ee5f8377e88676700042ecb8e36c Mon Sep 17 00:00:00 2001 +From 53b30c168dab6260a28f0e08b5fb6af056c0c670 Mon Sep 17 00:00:00 2001 From: xbmc Date: Wed, 23 Jan 2013 17:03:39 +0100 -Subject: [PATCH 48/90] X11: recreate glx context when output changes +Subject: [PATCH 48/89] X11: recreate glx context when output changes --- xbmc/windowing/X11/WinSystemX11.cpp | 6 +++--- @@ -6550,10 +6550,10 @@ index 3e62cd8..2a1fb41 100644 1.8.5.1 -From e4cd314a94e46ef500ce19d3b2a6be70f183efb4 Mon Sep 17 00:00:00 2001 +From 6390f62e82118a8aca1bb41c364637cecc61d743 Mon Sep 17 00:00:00 2001 From: xbmc Date: Fri, 14 Dec 2012 14:19:15 +0100 -Subject: [PATCH 49/90] pvr: do not show selection dialog for a single menu +Subject: [PATCH 49/89] pvr: do not show selection dialog for a single menu hook --- @@ -6591,10 +6591,10 @@ index 14c9cde..57b18a5 100644 1.8.5.1 -From 33d5eb66824afda9bf4c6f17322aac53e5c5a31f Mon Sep 17 00:00:00 2001 +From 4e70f782373dfecad3d1523641ac94d1ad31ad97 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 3 Feb 2013 08:17:16 +0100 -Subject: [PATCH 50/90] X11: use default screen parameters if no output +Subject: [PATCH 50/89] X11: use default screen parameters if no output connected --- @@ -6698,10 +6698,10 @@ index 4329a22..2adf8a0 100644 1.8.5.1 -From 0e21994cb45758ff47b4c43d110ba3543fd74df3 Mon Sep 17 00:00:00 2001 +From d7b565c23ce6eefe3a3f924f1147f3efe7ffbef1 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 23 Mar 2013 15:13:32 +0100 -Subject: [PATCH 51/90] X11: create parent window +Subject: [PATCH 51/89] X11: create parent window --- xbmc/windowing/X11/WinSystemX11.cpp | 69 +++++++++++++++++++++++-------------- @@ -6967,10 +6967,10 @@ index 2a1fb41..e8993f1 100644 1.8.5.1 -From b7614099a9b3b74d404e6c989c50e7189dc27d2c Mon Sep 17 00:00:00 2001 +From 1ac6c3b2f2d4385a5342b3a2bdca345cb75c636e Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 24 Mar 2013 12:30:12 +0100 -Subject: [PATCH 52/90] X11: use system key repeat rate instead of hardcoded +Subject: [PATCH 52/89] X11: use system key repeat rate instead of hardcoded one, taken from 58fd64b194e38b73b5f3132744bab35e994e7441 --- @@ -7172,10 +7172,10 @@ index c69169c..6429291 100644 1.8.5.1 -From 60cc0c4ff96182568d9bbfa4823fadfc517bbc3b Mon Sep 17 00:00:00 2001 +From 5f64bc85826da93d1fc976c27237edc9ab1b270c Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 24 Mar 2013 16:04:48 +0100 -Subject: [PATCH 53/90] linux: use CLOCK_MONOTONIC_RAW as this is not subject +Subject: [PATCH 53/89] linux: use CLOCK_MONOTONIC_RAW as this is not subject to NTP --- @@ -7213,17 +7213,17 @@ index c06b8c5..4390d2e 100644 1.8.5.1 -From 3e109b19d0ae881366938a674d2d2e7a2c7bc789 Mon Sep 17 00:00:00 2001 +From 717a8039834c98b01da851037f58f15de078cfff Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 28 Mar 2013 15:18:53 +0100 -Subject: [PATCH 54/90] OMXPlayer: some caching fixes for pvr +Subject: [PATCH 54/89] OMXPlayer: some caching fixes for pvr --- xbmc/cores/omxplayer/OMXPlayer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xbmc/cores/omxplayer/OMXPlayer.cpp b/xbmc/cores/omxplayer/OMXPlayer.cpp -index 9cccaac..4168195 100644 +index e391c0e..ad06062 100644 --- a/xbmc/cores/omxplayer/OMXPlayer.cpp +++ b/xbmc/cores/omxplayer/OMXPlayer.cpp @@ -2577,7 +2577,8 @@ void COMXPlayer::HandleMessages() @@ -7240,10 +7240,10 @@ index 9cccaac..4168195 100644 1.8.5.1 -From f34ea1f3d74e0641f011e7c3746254b563480f55 Mon Sep 17 00:00:00 2001 +From 0f895c66d1b5124735e6a54b1ea23a531126fd24 Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 28 Mar 2013 20:50:59 +0100 -Subject: [PATCH 55/90] fix incorrect display of fps when dr kicks in +Subject: [PATCH 55/89] fix incorrect display of fps when dr kicks in --- xbmc/Application.cpp | 3 ++- @@ -7270,10 +7270,10 @@ index 1aa5e0f..1f04f7e 100644 1.8.5.1 -From ed4b5ab98f24ed626737d1f3a26e5f7ef0c66461 Mon Sep 17 00:00:00 2001 +From be58b6d6ac97bd42b3acee287a639b83e56e4da9 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 13 Apr 2013 08:32:06 +0200 -Subject: [PATCH 56/90] X11: fix mouse coverage +Subject: [PATCH 56/89] X11: fix mouse coverage --- xbmc/windowing/X11/WinSystemX11.cpp | 11 ++++++++--- @@ -7339,10 +7339,10 @@ index e8993f1..5cccfb7 100644 1.8.5.1 -From bf23611d168952e56c6405181ee8d7328c37cf2c Mon Sep 17 00:00:00 2001 +From bef2f3ba30bc2b016b9209dd8b72c0e1decffe48 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Wed, 8 May 2013 13:14:58 +0200 -Subject: [PATCH 57/90] X11: fix incorrectly used screen num in desktop +Subject: [PATCH 57/89] X11: fix incorrectly used screen num in desktop resolution --- @@ -7377,10 +7377,10 @@ index 2acb36d..101ba98 100644 1.8.5.1 -From b489c94c45203e47ad88b4fcf72ab43e16d0a2dc Mon Sep 17 00:00:00 2001 +From 33352b251a0a9a3ada7bdeaecf6a314431693396 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Thu, 9 May 2013 12:07:09 +0200 -Subject: [PATCH 58/90] X11: do not overwrite user selected monitor with +Subject: [PATCH 58/89] X11: do not overwrite user selected monitor with fallback --- @@ -7505,10 +7505,10 @@ index 5cccfb7..1b658e2 100644 1.8.5.1 -From 0bc5eaa8d1f3872f91b3a23d44e0f3af80bdccfe Mon Sep 17 00:00:00 2001 +From cb9466982f167333638fde20ad8b5d01a1679183 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sun, 12 May 2013 10:50:30 +0200 -Subject: [PATCH 59/90] xrandr: add turn on/off to wrapper +Subject: [PATCH 59/89] xrandr: add turn on/off to wrapper --- xbmc/windowing/X11/XRandR.cpp | 78 +++++++++++++++++++++++++++++++++++++++---- @@ -7674,10 +7674,10 @@ index d37838a..059062f 100644 1.8.5.1 -From ea07b3b211dfa1a60db9b7c5fdf9bf61358a753b Mon Sep 17 00:00:00 2001 +From bb2ebac526b481262fb18cb8976c66564d024fbe Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sun, 19 May 2013 12:55:35 +0200 -Subject: [PATCH 60/90] xrandr: add GetPreferredMode to wrapper +Subject: [PATCH 60/89] xrandr: add GetPreferredMode to wrapper --- xbmc/windowing/X11/XRandR.cpp | 23 +++++++++++++++++++++++ @@ -7734,10 +7734,10 @@ index 059062f..ab7cc63 100644 1.8.5.1 -From 4c9eb7d258bf9cbfd68cbcef93eff0d70fb51bba Mon Sep 17 00:00:00 2001 +From 045cfc6e01ecc50cce3454ad8f72070e55a99070 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sat, 11 May 2013 17:12:12 +0200 -Subject: [PATCH 61/90] X11: multi-head improvement - poll for desired output +Subject: [PATCH 61/89] X11: multi-head improvement - poll for desired output if we do not get an xrr event --- @@ -7752,7 +7752,7 @@ Subject: [PATCH 61/90] X11: multi-head improvement - poll for desired output 8 files changed, 105 insertions(+), 12 deletions(-) diff --git a/language/English/strings.po b/language/English/strings.po -index 0c8f3fc..e37b543 100755 +index 0bc9bcd..c842711 100755 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -6464,7 +6464,7 @@ msgctxt "#14071" @@ -7779,7 +7779,7 @@ index 0c8f3fc..e37b543 100755 #: xbmc/video/VideoDatabase.cpp msgctxt "#15012" diff --git a/system/settings/settings.xml b/system/settings/settings.xml -index c942022..52164de 100644 +index 08d0a89..bc55152 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -2076,6 +2076,11 @@ @@ -8018,10 +8018,10 @@ index 62003f5..8525ede 100644 1.8.5.1 -From 8c771dd67da94ca6af616887747b2544b9e19ee9 Mon Sep 17 00:00:00 2001 +From d21608c481856f3ba2a1caa7e2e7f3dc3a626821 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Wed, 15 May 2013 09:14:34 +0200 -Subject: [PATCH 62/90] X11: ignore mouse move event form other windows +Subject: [PATCH 62/89] X11: ignore mouse move event form other windows --- xbmc/windowing/WinEventsX11.cpp | 4 +++- @@ -8053,10 +8053,10 @@ index 908c8b6..938ad26 100644 1.8.5.1 -From e621fb6da4d79ec9938632bf37c386d43b0ed47b Mon Sep 17 00:00:00 2001 +From a160d9304cd95aa57fa3c400d98fff7e6d0fdfba Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Tue, 11 Jun 2013 16:20:29 +0200 -Subject: [PATCH 63/90] renderer: allow some lateness within vblank interval +Subject: [PATCH 63/89] renderer: allow some lateness within vblank interval --- xbmc/cores/VideoRenderers/RenderManager.cpp | 12 ++++++++++-- @@ -8116,10 +8116,10 @@ index 949c652b..d84ff6c 100644 1.8.5.1 -From bbe4389f41ccb394fcf038450fea77d2998814ab Mon Sep 17 00:00:00 2001 +From 8e97b2ea19dd4c1b3db778ac5d9ee20e8b3c9d36 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 16 Jun 2013 13:22:58 +0200 -Subject: [PATCH 64/90] X11: another fix for mouse coverage +Subject: [PATCH 64/89] X11: another fix for mouse coverage --- xbmc/windowing/WinEventsX11.cpp | 6 ++++-- @@ -8152,10 +8152,10 @@ index 938ad26..e4ca56d 100644 1.8.5.1 -From cdc2f2c9b610c765fbb43618677f5b94d92c337e Mon Sep 17 00:00:00 2001 +From b73e0cf7e840ae31c65630941ec159b859137f8a Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Fri, 5 Jul 2013 12:14:00 +0200 -Subject: [PATCH 65/90] X11: set windows class name +Subject: [PATCH 65/89] X11: set windows class name --- xbmc/windowing/X11/WinSystemX11.cpp | 9 ++++++++- @@ -8197,17 +8197,17 @@ index b3fe5102..df5fe9b 100644 1.8.5.1 -From a7c7b381e34c6bdee86f90933a2d312cc8a9a516 Mon Sep 17 00:00:00 2001 +From f7d5986074d9c3e386a00f7695162a069f6fc7f6 Mon Sep 17 00:00:00 2001 From: spiff Date: Tue, 16 Jul 2013 14:34:04 +0200 -Subject: [PATCH 66/90] fixed: typo +Subject: [PATCH 66/89] fixed: typo --- language/English/strings.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language/English/strings.po b/language/English/strings.po -index e37b543..0f7d4d8 100755 +index c842711..3339cf1 100755 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -6598,7 +6598,7 @@ msgstr "" @@ -8223,17 +8223,17 @@ index e37b543..0f7d4d8 100755 1.8.5.1 -From 81da99425aa1be448b0bf1fe7db1f1fd159a39b6 Mon Sep 17 00:00:00 2001 +From 2c19023f1e6241cd68a12fc4dab082b768c081ec Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Thu, 25 Jul 2013 17:18:13 +0200 -Subject: [PATCH 67/90] ActiveAE: slightly reduce buffer size +Subject: [PATCH 67/89] ActiveAE: slightly reduce buffer size --- xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp -index 1a05cdb..76ade09 100644 +index 23f0deb..61cf8e9 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp @@ -30,8 +30,8 @@ @@ -8251,10 +8251,10 @@ index 1a05cdb..76ade09 100644 1.8.5.1 -From 842b13f6890fc69aad8923bcc5e37c505aebfd02 Mon Sep 17 00:00:00 2001 +From c141bcbae7a5ca3ac88937d1d1f3f4a4f42378c4 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sun, 4 Aug 2013 10:11:16 +0200 -Subject: [PATCH 68/90] Revert "vdpau: comment some features that will be added +Subject: [PATCH 68/89] Revert "vdpau: comment some features that will be added later" This reverts commit e00b4f65864d623ab4d2e9e5c06db138e661f1cf. @@ -8310,10 +8310,10 @@ index 3292461..c04f161 100644 1.8.5.1 -From f3a46fb8a624053a475db86d23408f77b8358dad Mon Sep 17 00:00:00 2001 +From aae5ab05a139cee15218e426f6c20bae8c10d279 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Fri, 9 Aug 2013 18:01:40 +0200 -Subject: [PATCH 69/90] X11: fix keysyms +Subject: [PATCH 69/89] X11: fix keysyms --- xbmc/windowing/WinEventsX11.cpp | 2 +- @@ -8336,10 +8336,10 @@ index e4ca56d..b20130c 100644 1.8.5.1 -From b83e40a86eb6779e7eb36fe8392241bfcb52e5a5 Mon Sep 17 00:00:00 2001 +From 4860eabd68b05e6574449182de5cb438e15ed3da Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Fri, 9 Aug 2013 18:42:36 +0200 -Subject: [PATCH 70/90] X11: fix keysym for non-IM +Subject: [PATCH 70/89] X11: fix keysym for non-IM --- xbmc/windowing/WinEventsX11.cpp | 2 +- @@ -8362,10 +8362,10 @@ index b20130c..a38890c 100644 1.8.5.1 -From 26dd7261956f82ff7427fb50acab001209362ae0 Mon Sep 17 00:00:00 2001 +From 97d076e7fb8026e00038e37854b4c898a023a250 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sat, 10 Aug 2013 11:18:16 +0200 -Subject: [PATCH 71/90] add some missing multi media keys +Subject: [PATCH 71/89] add some missing multi media keys --- system/keymaps/keyboard.xml | 3 +++ @@ -8374,7 +8374,7 @@ Subject: [PATCH 71/90] add some missing multi media keys 3 files changed, 10 insertions(+) diff --git a/system/keymaps/keyboard.xml b/system/keymaps/keyboard.xml -index 7db7973..9e9c411 100644 +index 45682a2..01f7904 100644 --- a/system/keymaps/keyboard.xml +++ b/system/keymaps/keyboard.xml @@ -119,6 +119,9 @@ @@ -8420,10 +8420,10 @@ index ee6bb69..364b45a 100644 1.8.5.1 -From bc09b9c0c458b8760d1a840741b1e58b12262bdb Mon Sep 17 00:00:00 2001 +From 60e7f0c50d0991307d6c907f8ae014c234a353b9 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sat, 10 Aug 2013 15:53:45 +0200 -Subject: [PATCH 72/90] X11: squash multi +Subject: [PATCH 72/89] X11: squash multi --- xbmc/windowing/X11/WinSystemX11.cpp | 2 +- @@ -8446,10 +8446,10 @@ index df5fe9b..d8e04d6 100644 1.8.5.1 -From c17028082c85062d378b8908a1b2518f09cc8932 Mon Sep 17 00:00:00 2001 +From caaa59c428f770859c0282154aa396494ee2c037 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Tue, 3 Sep 2013 20:46:17 +0200 -Subject: [PATCH 73/90] X11: do not poll default monitor +Subject: [PATCH 73/89] X11: do not poll default monitor --- xbmc/windowing/X11/WinSystemX11.cpp | 2 +- @@ -8472,10 +8472,10 @@ index d8e04d6..01f5272 100644 1.8.5.1 -From 091c743ee3b3ac8deb0518cadf4015209a7380c5 Mon Sep 17 00:00:00 2001 +From cb2a7fff52648d8d3c6288ac9568e74989dc239c Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Tue, 29 Oct 2013 20:57:28 +0100 -Subject: [PATCH 74/90] X11: fix broken monitor switching +Subject: [PATCH 74/89] X11: fix broken monitor switching --- system/settings/settings.xml | 1 - @@ -8483,7 +8483,7 @@ Subject: [PATCH 74/90] X11: fix broken monitor switching 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/system/settings/settings.xml b/system/settings/settings.xml -index 52164de..0af2826 100644 +index bc55152..a3cda66 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -2120,7 +2120,6 @@ @@ -8578,10 +8578,10 @@ index 40bc3b3..1663836 100644 1.8.5.1 -From 046f8d70c4023960b70488bb4b5d9d299a4757c3 Mon Sep 17 00:00:00 2001 +From b8686045a22c2663873b9f823343f015e2b02519 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Tue, 29 Oct 2013 20:57:59 +0100 -Subject: [PATCH 75/90] X11: remove polling for connected outputs, use xrr +Subject: [PATCH 75/89] X11: remove polling for connected outputs, use xrr events --- @@ -8882,10 +8882,10 @@ index 7ec5be4..14622cb 100644 1.8.5.1 -From 9cb6fbb70e4083aba4683398c295bc913b4f4e2a Mon Sep 17 00:00:00 2001 +From 7b1f8cc18b0f14cc445634d8744d975f275209be Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Thu, 31 Oct 2013 09:37:13 +0100 -Subject: [PATCH 76/90] X11: remove grabbing of keyboard and mouse +Subject: [PATCH 76/89] X11: remove grabbing of keyboard and mouse --- xbmc/windowing/WinEventsX11.cpp | 4 ---- @@ -9003,10 +9003,10 @@ index 14622cb..d1c8729 100644 1.8.5.1 -From ae37df8068f82c8b439e8f5d996c06e90ecd2bc1 Mon Sep 17 00:00:00 2001 +From fab89ab3e42985729e2cbe1211cea9e1ec8759eb Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Thu, 31 Oct 2013 10:46:40 +0100 -Subject: [PATCH 77/90] X11: set ExposureMask on gl window, fixes not updated +Subject: [PATCH 77/89] X11: set ExposureMask on gl window, fixes not updated areas --- @@ -9032,10 +9032,10 @@ index 695b352..e55583c 100644 1.8.5.1 -From 4a42945269e9c8a72ad9307e09b7969c51abbdfd Mon Sep 17 00:00:00 2001 +From 7f8cde9142f7fc805a5375894ecbe4ba85f01c71 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Thu, 31 Oct 2013 11:25:19 +0100 -Subject: [PATCH 78/90] X11: drop shortcuts, have WM do this +Subject: [PATCH 78/89] X11: drop shortcuts, have WM do this --- xbmc/windowing/WinEventsX11.cpp | 21 --------------------- @@ -9097,17 +9097,17 @@ index 6429291..4334d21 100644 1.8.5.1 -From c23e578c7ec7f7ca1bfd2dd75b4b78a01c8db494 Mon Sep 17 00:00:00 2001 +From e231cf4206bf95a4ac51b06ec3bf7ecedbc1778b Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Thu, 7 Nov 2013 15:02:00 +0100 -Subject: [PATCH 79/90] X11: adapt to new settings +Subject: [PATCH 79/89] X11: adapt to new settings --- system/settings/settings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/system/settings/settings.xml b/system/settings/settings.xml -index 0af2826..87f4018 100644 +index a3cda66..89316b0 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -2080,6 +2080,7 @@ @@ -9122,10 +9122,10 @@ index 0af2826..87f4018 100644 1.8.5.1 -From 04108f6c5aa93b641436219c6d2d7cc4c32b52c8 Mon Sep 17 00:00:00 2001 +From 113a9dffc6b33334bb2544aca839318b33546c68 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Thu, 14 Nov 2013 09:28:24 +0100 -Subject: [PATCH 80/90] X11: adapt to changes in cstdstring +Subject: [PATCH 80/89] X11: adapt to changes in cstdstring --- xbmc/windowing/X11/WinSystemX11.cpp | 4 ++-- @@ -9173,10 +9173,10 @@ index 8525ede..c94f2e3 100644 1.8.5.1 -From d8c3a034087e33e6fdf73263feec2a2fd3e0cd75 Mon Sep 17 00:00:00 2001 +From 42220c7c9a5b05c6fbb42c5691ba76c55e2cada2 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Thu, 14 Nov 2013 18:50:57 +0100 -Subject: [PATCH 81/90] dvdplayer: fix failed to get stream message, lookup +Subject: [PATCH 81/89] dvdplayer: fix failed to get stream message, lookup streams the same way as getting the index --- @@ -9200,17 +9200,17 @@ index ad851e9..60475a3 100644 1.8.5.1 -From 19fca107462764a06bce2b6f8420da6cb3017219 Mon Sep 17 00:00:00 2001 +From 3784778e6b3181f13c030bb717eeda96f2dae063 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Thu, 14 Nov 2013 19:22:01 +0100 -Subject: [PATCH 82/90] omxplayer: fix failed to get stream message +Subject: [PATCH 82/89] omxplayer: fix failed to get stream message --- xbmc/cores/omxplayer/OMXPlayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xbmc/cores/omxplayer/OMXPlayer.cpp b/xbmc/cores/omxplayer/OMXPlayer.cpp -index 4168195..f48a30f 100644 +index ad06062..2300372 100644 --- a/xbmc/cores/omxplayer/OMXPlayer.cpp +++ b/xbmc/cores/omxplayer/OMXPlayer.cpp @@ -341,7 +341,7 @@ bool COMXSelectionStreams::Get(StreamType type, CDemuxStream::EFlags flag, OMXSe @@ -9226,10 +9226,10 @@ index 4168195..f48a30f 100644 1.8.5.1 -From 50d0fca3aa08a39084d21358bde8409470b348ac Mon Sep 17 00:00:00 2001 +From 45c060fbefa28d506bd58e1c8efe1f0b9a6bb2b3 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Mon, 18 Nov 2013 17:44:31 +0100 -Subject: [PATCH 83/90] ActiveAE: correct time of buffered samples by resample +Subject: [PATCH 83/89] ActiveAE: correct time of buffered samples by resample ratio --- @@ -9238,7 +9238,7 @@ Subject: [PATCH 83/90] ActiveAE: correct time of buffered samples by resample 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp -index 76ade09..716cc5b 100644 +index 61cf8e9..1c5776c 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp @@ -101,7 +101,7 @@ float CEngineStats::GetDelay(CActiveAEStream *stream) @@ -9251,7 +9251,7 @@ index 76ade09..716cc5b 100644 } diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp -index 4a75f9e..78a2892 100644 +index c6e1a6e..200dad3 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp @@ -58,6 +58,7 @@ @@ -9266,10 +9266,10 @@ index 4a75f9e..78a2892 100644 1.8.5.1 -From 4461e323ee97c6622ef12ae24192f3d3497cc4d7 Mon Sep 17 00:00:00 2001 +From e961a5a310cbc0d547b86a0203f334a1bbaa0c0c Mon Sep 17 00:00:00 2001 From: Marcel Groothuis Date: Thu, 5 Dec 2013 22:02:50 +0100 -Subject: [PATCH 84/90] ffmpeg demuxer: faster channel change for PVR addons +Subject: [PATCH 84/89] ffmpeg demuxer: faster channel change for PVR addons without internal demuxing (such as MediaPortal, ArgusTV, MythTV, NextPVR) Credits: FernetMenta, Davilla, Popcornmix, Whaupt @@ -9630,10 +9630,10 @@ index ca689d0..f383563 100644 1.8.5.1 -From dade96a4ed607310cb8dfded523f86f821b49cd4 Mon Sep 17 00:00:00 2001 +From f69606a60e531d5b388b1f5239b6bb73e5c68893 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Thu, 14 Nov 2013 20:35:04 +0100 -Subject: [PATCH 85/90] ffmpeg demuxer: make sure we start mpegts video with an +Subject: [PATCH 85/89] ffmpeg demuxer: make sure we start mpegts video with an i-frame --- @@ -9717,10 +9717,10 @@ index acde9a8..9ec0877 100644 1.8.5.1 -From 844ba26c952996370543d38ae3d447e4aa3ae6b3 Mon Sep 17 00:00:00 2001 +From 92640ec9b14ff205723f4ce46153081958e45705 Mon Sep 17 00:00:00 2001 From: Wolfgang Haupt Date: Thu, 5 Dec 2013 22:11:57 +0100 -Subject: [PATCH 86/90] DVDFactoryDemuxer: skip streaminfo for udp tcp and +Subject: [PATCH 86/89] DVDFactoryDemuxer: skip streaminfo for udp tcp and pvr-channels --- @@ -9769,10 +9769,10 @@ index f383563..d6580fd 100644 if(demuxer->Open(pInputStream, streaminfo)) return demuxer.release(); diff --git a/xbmc/utils/URIUtils.cpp b/xbmc/utils/URIUtils.cpp -index 5b292bc..89c0bf1 100644 +index 1f44d6f..45a2add 100644 --- a/xbmc/utils/URIUtils.cpp +++ b/xbmc/utils/URIUtils.cpp -@@ -737,6 +737,36 @@ bool URIUtils::IsFTP(const CStdString& strFile) +@@ -788,6 +788,36 @@ bool URIUtils::IsFTP(const CStdString& strFile) StringUtils::StartsWithNoCase(strFile2, "ftps:"); } @@ -9809,7 +9809,7 @@ index 5b292bc..89c0bf1 100644 bool URIUtils::IsDAV(const CStdString& strFile) { CStdString strFile2(strFile); -@@ -1198,3 +1228,8 @@ bool URIUtils::UpdateUrlEncoding(std::string &strFilename) +@@ -1249,3 +1279,8 @@ bool URIUtils::UpdateUrlEncoding(std::string &strFilename) strFilename = newFilename; return true; } @@ -9819,10 +9819,10 @@ index 5b292bc..89c0bf1 100644 + return IsUDP(strFile) || IsTCP(strFile) || IsPVRChannel(strFile); +} diff --git a/xbmc/utils/URIUtils.h b/xbmc/utils/URIUtils.h -index 146bf5c..e030b9d 100644 +index cf7ea3f..7857c3b 100644 --- a/xbmc/utils/URIUtils.h +++ b/xbmc/utils/URIUtils.h -@@ -78,6 +78,8 @@ class URIUtils +@@ -88,6 +88,8 @@ class URIUtils static bool IsDOSPath(const CStdString &path); static bool IsDVD(const CStdString& strFile); static bool IsFTP(const CStdString& strFile); @@ -9831,7 +9831,7 @@ index 146bf5c..e030b9d 100644 static bool IsHD(const CStdString& strFileName); static bool IsHDHomeRun(const CStdString& strFile); static bool IsSlingbox(const CStdString& strFile); -@@ -116,6 +118,8 @@ class URIUtils +@@ -126,6 +128,8 @@ class URIUtils static bool IsBluray(const CStdString& strFile); static bool IsAndroidApp(const CStdString& strFile); static bool IsLibraryFolder(const CStdString& strFile); @@ -9844,10 +9844,10 @@ index 146bf5c..e030b9d 100644 1.8.5.1 -From 38cb405a86d6760e5f6a30225bbd85cde283aa9f Mon Sep 17 00:00:00 2001 +From 9f0d3c00d31dd1a34666b9c553bf98bd12eb3d5b Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sun, 22 Dec 2013 14:52:29 +0100 -Subject: [PATCH 87/90] linux: add shared lib for sse4 operations +Subject: [PATCH 87/89] linux: add shared lib for sse4 operations --- Makefile.in | 8 ++- @@ -9888,7 +9888,7 @@ index 76936d4..0890432 100644 externals: codecs libs visualizations screensavers libaddon pvraddons diff --git a/configure.in b/configure.in -index 2fe5f93..96d0c30 100644 +index 7231ff8..dc8e6b8 100644 --- a/configure.in +++ b/configure.in @@ -875,6 +875,19 @@ elif test "$use_arch" = "arm"; then @@ -9896,7 +9896,7 @@ index 2fe5f93..96d0c30 100644 fi +use_sse4=no -+if test "$ARCH" = "x86_64-linux"; then ++if test "$ARCH" = "x86_64-linux" || test "$ARCH" = "i486-linux"; then + SAVE_CFLAGS="$CFLAGS" + CFLAGS="-msse4.1" + AC_COMPILE_IFELSE( @@ -9911,7 +9911,7 @@ index 2fe5f93..96d0c30 100644 # Checks for library functions. AC_FUNC_ALLOCA AC_FUNC_CHOWN -@@ -2578,6 +2591,10 @@ if test "$use_codec_libstagefright" = "yes"; then +@@ -2573,6 +2586,10 @@ if test "$use_codec_libstagefright" = "yes"; then OUTPUT_FILES="$OUTPUT_FILES xbmc/cores/dvdplayer/DVDCodecs/Video/libstagefrightICS/Makefile" fi @@ -9922,7 +9922,7 @@ index 2fe5f93..96d0c30 100644 OUTPUT_FILES="$OUTPUT_FILES \ xbmc/interfaces/python/Makefile \ xbmc/interfaces/python/test/Makefile" -@@ -2652,6 +2669,7 @@ AC_SUBST(USE_ANDROID) +@@ -2647,6 +2664,7 @@ AC_SUBST(USE_ANDROID) AC_SUBST(GTEST_CONFIGURED) AC_SUBST(USE_DOXYGEN) AC_SUBST(USE_PVR_ADDONS) @@ -10142,10 +10142,10 @@ index 0000000..45aa826 1.8.5.1 -From effc1304680e2c6f26661e2fe4a42d84e1208c60 Mon Sep 17 00:00:00 2001 +From 7e24d4479f9dce205abe2405438762c77088b0ee Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Thu, 19 Dec 2013 15:36:11 +0100 -Subject: [PATCH 88/90] vaapi: option to enable sw filters +Subject: [PATCH 88/89] vaapi: option to enable sw filters --- language/English/strings.po | 14 +- @@ -10156,12 +10156,11 @@ Subject: [PATCH 88/90] vaapi: option to enable sw filters .../DVDCodecs/Video/DVDVideoCodecFFmpeg.h | 3 + xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp | 143 +++++++++++++++++++++ xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h | 30 +++++ - xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 34 ++--- - xbmc/cores/dvdplayer/DVDPlayerVideo.h | 1 + - 10 files changed, 274 insertions(+), 41 deletions(-) + xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 32 ++--- + 9 files changed, 271 insertions(+), 41 deletions(-) diff --git a/language/English/strings.po b/language/English/strings.po -index 0f7d4d8..0b67f51 100755 +index 3339cf1..cf77d48 100755 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -6001,7 +6001,12 @@ msgctxt "#13440" @@ -10178,7 +10177,7 @@ index 0f7d4d8..0b67f51 100755 #: system/settings/settings.xml msgctxt "#13500" -@@ -14735,7 +14740,12 @@ msgctxt "#36428" +@@ -14745,7 +14750,12 @@ msgctxt "#36428" msgid "Record" msgstr "" @@ -10193,7 +10192,7 @@ index 0f7d4d8..0b67f51 100755 #: system/settings/settings.xml diff --git a/system/settings/settings.xml b/system/settings/settings.xml -index 87f4018..706cf56 100644 +index 89316b0..c6cba39 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -436,6 +436,15 @@ @@ -10709,18 +10708,10 @@ index a520e42..49d3117 100644 } diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -index 939f82f..01a18d2 100644 +index 59c5e40..1227c5c 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -@@ -233,6 +233,7 @@ void CDVDPlayerVideo::OpenStream(CDVDStreamInfo &hint, CDVDVideoCodec* codec) - m_bCalcFrameRate = CSettings::Get().GetBool("videoplayer.usedisplayasclock") || - CSettings::Get().GetInt("videoplayer.adjustrefreshrate") != ADJUST_REFRESHRATE_OFF; - ResetFrameRateCalc(); -+ m_bCalcSuccess = false; - - m_iDroppedRequest = 0; - m_iLateFrames = 0; -@@ -553,28 +554,6 @@ void CDVDPlayerVideo::Process() +@@ -554,28 +554,6 @@ void CDVDPlayerVideo::Process() // decoder still needs to provide an empty image structure, with correct flags m_pVideoCodec->SetDropState(bRequestDrop); @@ -10749,7 +10740,7 @@ index 939f82f..01a18d2 100644 int iDecoderState = m_pVideoCodec->Decode(pPacket->pData, pPacket->iSize, pPacket->dts, pPacket->pts); // buffer packets so we can recover should decoder flush for some reason -@@ -661,6 +640,8 @@ void CDVDPlayerVideo::Process() +@@ -662,6 +640,8 @@ void CDVDPlayerVideo::Process() //Deinterlace if codec said format was interlaced or if we have selected we want to deinterlace //this video @@ -10758,7 +10749,7 @@ index 939f82f..01a18d2 100644 if ((mDeintMode == VS_DEINTERLACEMODE_AUTO && (picture.iFlags & DVP_FLAG_INTERLACED)) || mDeintMode == VS_DEINTERLACEMODE_FORCE) { if(mInt == VS_INTERLACEMETHOD_SW_BLEND) -@@ -703,7 +684,15 @@ void CDVDPlayerVideo::Process() +@@ -704,7 +684,15 @@ void CDVDPlayerVideo::Process() } if (picture.iRepeatPicture) @@ -10767,67 +10758,21 @@ index 939f82f..01a18d2 100644 + int skipped, deint; + m_pVideoCodec->GetCodecStats(pts, skipped, deint); + picture.iDuration = frametime; -+ if (m_bCalcSuccess && deint) ++ if (deint && (frametime <= 0.02*DVD_TIME_BASE)) + picture.iDuration *= 2; picture.iDuration *= picture.iRepeatPicture + 1; + } int iResult = OutputPicture(&picture, pts); -@@ -1537,6 +1526,7 @@ void CDVDPlayerVideo::CalcFrameRate() - CLog::Log(LOGDEBUG,"%s framerate was:%f calculated:%f", __FUNCTION__, m_fFrameRate, m_fStableFrameRate / m_iFrameRateCount); - m_fFrameRate = m_fStableFrameRate / m_iFrameRateCount; - m_bFpsInvalid = false; -+ m_bCalcSuccess = true; - } - - //reset the stored framerates -diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.h b/xbmc/cores/dvdplayer/DVDPlayerVideo.h -index 65dea76..e29c5cc 100644 ---- a/xbmc/cores/dvdplayer/DVDPlayerVideo.h -+++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.h -@@ -160,6 +160,7 @@ class CDVDPlayerVideo : public CThread - int m_iFrameRateErr; //how many frames we couldn't calculate the framerate, we give up after a while - int m_iFrameRateLength; //how many seconds we should measure the framerate - //this is increased exponentially from CDVDPlayerVideo::CalcFrameRate() -+ bool m_bCalcSuccess; - - bool m_bFpsInvalid; // needed to ignore fps (e.g. dvd stills) - -- 1.8.5.1 -From f79746a67c55e4b8d8eac1e6a43539fa991a59d9 Mon Sep 17 00:00:00 2001 -From: fritsch -Date: Sat, 28 Dec 2013 11:05:02 +0100 -Subject: [PATCH 89/90] VAAPI: Also try to enable sse4 on normal x86 arch - ---- - configure.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.in b/configure.in -index 96d0c30..4756e82 100644 ---- a/configure.in -+++ b/configure.in -@@ -876,7 +876,7 @@ elif test "$use_arch" = "arm"; then - fi - - use_sse4=no --if test "$ARCH" = "x86_64-linux"; then -+if test "$ARCH" = "x86_64-linux" || test "$ARCH" = "i486-linux"; then - SAVE_CFLAGS="$CFLAGS" - CFLAGS="-msse4.1" - AC_COMPILE_IFELSE( --- -1.8.5.1 - - -From bca1dab4489a10eeb9ab682ff2bb21f8a90bd6d1 Mon Sep 17 00:00:00 2001 +From d97e9b51f8fc40e3a51d5147f816a85d90a34d0d Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Fri, 3 Jan 2014 20:50:46 +0100 -Subject: [PATCH 90/90] X11: check for user output on resize window +Subject: [PATCH 89/89] X11: check for user output on resize window --- xbmc/windowing/X11/WinSystemX11.cpp | 17 ++++++++++++++--- diff --git a/packages/mediacenter/xbmc/patches/xbmc-999.03-PR3976-pulse.patch b/packages/mediacenter/xbmc/patches/xbmc-999.03-PR3976-pulse.patch deleted file mode 100644 index 5d33db2ebe..0000000000 --- a/packages/mediacenter/xbmc/patches/xbmc-999.03-PR3976-pulse.patch +++ /dev/null @@ -1,1166 +0,0 @@ -From cf70010716d4e46ec1e1329f2028779cfa898d2c Mon Sep 17 00:00:00 2001 -From: Tobias Arrskog -Date: Thu, 2 Jan 2014 12:07:49 +0100 -Subject: [PATCH 1/6] AESinkPULSE: Initial Implementation - ---- - xbmc/cores/AudioEngine/AEFactory.cpp | 34 +- - xbmc/cores/AudioEngine/AEFactory.h | 1 - - xbmc/cores/AudioEngine/AESinkFactory.cpp | 17 + - xbmc/cores/AudioEngine/Makefile.in | 4 +- - xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp | 730 +++++++++++++++++++++++++++ - xbmc/cores/AudioEngine/Sinks/AESinkPULSE.h | 72 +++ - 6 files changed, 822 insertions(+), 36 deletions(-) - create mode 100644 xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp - create mode 100644 xbmc/cores/AudioEngine/Sinks/AESinkPULSE.h - -diff --git a/xbmc/cores/AudioEngine/AEFactory.cpp b/xbmc/cores/AudioEngine/AEFactory.cpp -index b76d304..464dd5a 100644 ---- a/xbmc/cores/AudioEngine/AEFactory.cpp -+++ b/xbmc/cores/AudioEngine/AEFactory.cpp -@@ -29,10 +29,6 @@ - #include "Engines/ActiveAE/ActiveAE.h" - #endif - --#if defined(HAS_PULSEAUDIO) -- #include "Engines/PulseAE/PulseAE.h" --#endif -- - #include "guilib/LocalizeStrings.h" - #include "settings/lib/Setting.h" - #include "settings/Settings.h" -@@ -53,32 +49,9 @@ bool CAEFactory::LoadEngine() - - #if defined(TARGET_DARWIN) - return CAEFactory::LoadEngine(AE_ENGINE_COREAUDIO); -+#else -+ return CAEFactory::LoadEngine(AE_ENGINE_ACTIVE); - #endif -- -- std::string engine; -- if (getenv("AE_ENGINE")) -- { -- engine = (std::string)getenv("AE_ENGINE"); -- std::transform(engine.begin(), engine.end(), engine.begin(), ::toupper); -- -- #if defined(HAS_PULSEAUDIO) -- if (!loaded && engine == "PULSE") -- loaded = CAEFactory::LoadEngine(AE_ENGINE_PULSE); -- #endif -- -- if (!loaded && engine == "ACTIVE") -- loaded = CAEFactory::LoadEngine(AE_ENGINE_ACTIVE); -- } -- --#if defined(HAS_PULSEAUDIO) -- if (!loaded) -- loaded = CAEFactory::LoadEngine(AE_ENGINE_PULSE); --#endif -- -- if (!loaded) -- loaded = CAEFactory::LoadEngine(AE_ENGINE_ACTIVE); -- -- return loaded; - } - - bool CAEFactory::LoadEngine(enum AEEngine engine) -@@ -95,9 +68,6 @@ bool CAEFactory::LoadEngine(enum AEEngine engine) - #else - case AE_ENGINE_ACTIVE : AE = new ActiveAE::CActiveAE(); break; - #endif --#if defined(HAS_PULSEAUDIO) -- case AE_ENGINE_PULSE : AE = new CPulseAE(); break; --#endif - default: - return false; - } -diff --git a/xbmc/cores/AudioEngine/AEFactory.h b/xbmc/cores/AudioEngine/AEFactory.h -index cb5317e..9a340cc 100644 ---- a/xbmc/cores/AudioEngine/AEFactory.h -+++ b/xbmc/cores/AudioEngine/AEFactory.h -@@ -30,7 +30,6 @@ enum AEEngine - { - AE_ENGINE_NULL, - AE_ENGINE_COREAUDIO, -- AE_ENGINE_PULSE, - AE_ENGINE_ACTIVE, - AE_ENGINE_PIAUDIO - }; -diff --git a/xbmc/cores/AudioEngine/AESinkFactory.cpp b/xbmc/cores/AudioEngine/AESinkFactory.cpp -index 7dc504b..8999085 100644 ---- a/xbmc/cores/AudioEngine/AESinkFactory.cpp -+++ b/xbmc/cores/AudioEngine/AESinkFactory.cpp -@@ -31,6 +31,9 @@ - #if defined(HAS_ALSA) - #include "Sinks/AESinkALSA.h" - #endif -+ #if defined(HAS_PULSEAUDIO) -+ #include "Sinks/AESinkPULSE.h" -+ #endif - #include "Sinks/AESinkOSS.h" - #else - #pragma message("NOTICE: No audio sink for target platform. Audio output will not be available.") -@@ -63,6 +66,7 @@ void CAESinkFactory::ParseDevice(std::string &device, std::string &driver) - #if defined(HAS_ALSA) - driver == "ALSA" || - #endif -+ driver == "PULSE" || - driver == "OSS" || - #endif - driver == "PROFILER") -@@ -119,6 +123,11 @@ IAESink *CAESinkFactory::Create(std::string &device, AEAudioFormat &desiredForma - TRY_SINK(Pi) - - #elif defined(TARGET_LINUX) || defined(TARGET_FREEBSD) -+ #if defined(HAS_PULSEAUDIO) -+ if (driver.empty() || driver == "PULSE") -+ TRY_SINK(PULSE) -+ #endif -+ - #if defined(HAS_ALSA) - if (driver.empty() || driver == "ALSA") - TRY_SINK(ALSA) -@@ -154,6 +163,14 @@ void CAESinkFactory::EnumerateEx(AESinkInfoList &list, bool force) - #elif defined(TARGET_RASPBERRY_PI) - ENUMERATE_SINK(Pi, force); - #elif defined(TARGET_LINUX) || defined(TARGET_FREEBSD) -+ #if defined(HAS_PULSEAUDIO) -+ ENUMERATE_SINK(PULSE, force); -+ #endif -+ -+ if (!list.empty()) { -+ return; -+ } -+ - #if defined(HAS_ALSA) - ENUMERATE_SINK(ALSA, force); - #endif -diff --git a/xbmc/cores/AudioEngine/Makefile.in b/xbmc/cores/AudioEngine/Makefile.in -index 7f87410..3815a16 100644 ---- a/xbmc/cores/AudioEngine/Makefile.in -+++ b/xbmc/cores/AudioEngine/Makefile.in -@@ -54,9 +54,7 @@ else - SRCS += Sinks/AESinkALSA.cpp - SRCS += Sinks/AESinkOSS.cpp - ifeq (@USE_PULSE@,1) --SRCS += Engines/PulseAE/PulseAE.cpp --SRCS += Engines/PulseAE/PulseAEStream.cpp --SRCS += Engines/PulseAE/PulseAESound.cpp -+SRCS += Sinks/AESinkPULSE.cpp - endif - endif - endif -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp -new file mode 100644 -index 0000000..916aaf6 ---- /dev/null -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp -@@ -0,0 +1,730 @@ -+/* -+ * Copyright (C) 2010-2013 Team XBMC -+ * http://xbmc.org -+ * -+ * This Program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2, or (at your option) -+ * any later version. -+ * -+ * This Program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with XBMC; see the file COPYING. If not, see -+ * . -+ * -+ */ -+#include "system.h" -+#ifdef HAS_PULSEAUDIO -+#include "AESinkPULSE.h" -+#include "utils/log.h" -+#include "Util.h" -+#include "guilib/LocalizeStrings.h" -+ -+using namespace std; -+ -+static const char *ContextStateToString(pa_context_state s) -+{ -+ switch (s) -+ { -+ case PA_CONTEXT_UNCONNECTED: -+ return "unconnected"; -+ case PA_CONTEXT_CONNECTING: -+ return "connecting"; -+ case PA_CONTEXT_AUTHORIZING: -+ return "authorizing"; -+ case PA_CONTEXT_SETTING_NAME: -+ return "setting name"; -+ case PA_CONTEXT_READY: -+ return "ready"; -+ case PA_CONTEXT_FAILED: -+ return "failed"; -+ case PA_CONTEXT_TERMINATED: -+ return "terminated"; -+ default: -+ return "none"; -+ } -+} -+ -+static const char *StreamStateToString(pa_stream_state s) -+{ -+ switch(s) -+ { -+ case PA_STREAM_UNCONNECTED: -+ return "unconnected"; -+ case PA_STREAM_CREATING: -+ return "creating"; -+ case PA_STREAM_READY: -+ return "ready"; -+ case PA_STREAM_FAILED: -+ return "failed"; -+ case PA_STREAM_TERMINATED: -+ return "terminated"; -+ default: -+ return "none"; -+ } -+} -+ -+static pa_sample_format AEFormatToPulseFormat(AEDataFormat format) -+{ -+ switch (format) -+ { -+ case AE_FMT_U8 : return PA_SAMPLE_U8; -+ case AE_FMT_S16LE : return PA_SAMPLE_S16LE; -+ case AE_FMT_S16BE : return PA_SAMPLE_S16BE; -+ case AE_FMT_S16NE : return PA_SAMPLE_S16NE; -+ case AE_FMT_S24LE3: return PA_SAMPLE_S24LE; -+ case AE_FMT_S24BE3: return PA_SAMPLE_S24BE; -+ case AE_FMT_S24NE3: return PA_SAMPLE_S24NE; -+ case AE_FMT_S24LE4: return PA_SAMPLE_S24_32LE; -+ case AE_FMT_S24BE4: return PA_SAMPLE_S24_32BE; -+ case AE_FMT_S24NE4: return PA_SAMPLE_S24_32NE; -+ case AE_FMT_S32BE : return PA_SAMPLE_S32BE; -+ case AE_FMT_S32LE : return PA_SAMPLE_S32LE; -+ case AE_FMT_S32NE : return PA_SAMPLE_S32NE; -+ case AE_FMT_FLOAT : return PA_SAMPLE_FLOAT32; -+ -+ case AE_FMT_AC3: -+ case AE_FMT_DTS: -+ case AE_FMT_EAC3: -+ return PA_SAMPLE_S16NE; -+ -+ default: -+ return PA_SAMPLE_INVALID; -+ } -+} -+ -+static pa_encoding AEFormatToPulseEncoding(AEDataFormat format) -+{ -+ switch (format) -+ { -+ case AE_FMT_AC3 : return PA_ENCODING_AC3_IEC61937; -+ case AE_FMT_DTS : return PA_ENCODING_DTS_IEC61937; -+ case AE_FMT_EAC3 : return PA_ENCODING_EAC3_IEC61937; -+ -+ default: -+ return PA_ENCODING_PCM; -+ } -+} -+ -+static AEDataFormat defaultDataFormats[] = { -+ AE_FMT_U8, -+ AE_FMT_S16LE, -+ AE_FMT_S16BE, -+ AE_FMT_S16NE, -+ AE_FMT_S24LE3, -+ AE_FMT_S24BE3, -+ AE_FMT_S24NE3, -+ AE_FMT_S24LE4, -+ AE_FMT_S24BE4, -+ AE_FMT_S24NE4, -+ AE_FMT_S32BE, -+ AE_FMT_S32LE, -+ AE_FMT_S32NE, -+ AE_FMT_FLOAT -+}; -+ -+static unsigned int defaultSampleRates[] = { -+ 5512, -+ 8000, -+ 11025, -+ 16000, -+ 22050, -+ 32000, -+ 44100, -+ 48000, -+ 64000, -+ 88200, -+ 96000, -+ 176400, -+ 192000, -+ 384000 -+}; -+ -+/* Static callback functions */ -+ -+static void ContextStateCallback(pa_context *c, void *userdata) -+{ -+ pa_threaded_mainloop *m = (pa_threaded_mainloop *)userdata; -+ switch (pa_context_get_state(c)) -+ { -+ case PA_CONTEXT_READY: -+ case PA_CONTEXT_TERMINATED: -+ case PA_CONTEXT_UNCONNECTED: -+ case PA_CONTEXT_CONNECTING: -+ case PA_CONTEXT_AUTHORIZING: -+ case PA_CONTEXT_SETTING_NAME: -+ case PA_CONTEXT_FAILED: -+ pa_threaded_mainloop_signal(m, 0); -+ break; -+ } -+} -+ -+static void StreamStateCallback(pa_stream *s, void *userdata) -+{ -+ pa_threaded_mainloop *m = (pa_threaded_mainloop *)userdata; -+ switch (pa_stream_get_state(s)) -+ { -+ case PA_STREAM_UNCONNECTED: -+ case PA_STREAM_CREATING: -+ case PA_STREAM_READY: -+ case PA_STREAM_FAILED: -+ case PA_STREAM_TERMINATED: -+ pa_threaded_mainloop_signal(m, 0); -+ break; -+ } -+} -+ -+static void StreamRequestCallback(pa_stream *s, size_t length, void *userdata) -+{ -+ pa_threaded_mainloop *m = (pa_threaded_mainloop *)userdata; -+ pa_threaded_mainloop_signal(m, 0); -+} -+ -+static void StreamLatencyUpdateCallback(pa_stream *s, void *userdata) -+{ -+ pa_threaded_mainloop *m = (pa_threaded_mainloop *)userdata; -+ pa_threaded_mainloop_signal(m, 0); -+} -+struct SinkInfoStruct -+{ -+ AEDeviceInfoList *list; -+ bool isHWDevice; -+ bool error; -+ pa_threaded_mainloop *mainloop; -+}; -+ -+static void SinkInfoCallback(pa_context *c, const pa_sink_info *i, int eol, void *userdata) -+{ -+ SinkInfoStruct *sinkStruct = (SinkInfoStruct *)userdata; -+ if(eol) -+ { -+ sinkStruct->error = true; -+ pa_threaded_mainloop_signal(sinkStruct->mainloop, 0); -+ return; -+ } -+ if (i && i->flags && (i->flags & PA_SINK_HARDWARE)) -+ sinkStruct->isHWDevice = true; -+ pa_threaded_mainloop_signal(sinkStruct->mainloop, 0); -+} -+ -+static AEChannel PAChannelToAEChannel(pa_channel_position_t channel) -+{ -+ AEChannel ae_channel; -+ switch (channel) -+ { -+ case PA_CHANNEL_POSITION_FRONT_LEFT: -+ ae_channel = AE_CH_FL; -+ break; -+ case PA_CHANNEL_POSITION_FRONT_RIGHT: -+ ae_channel = AE_CH_FR; -+ break; -+ case PA_CHANNEL_POSITION_FRONT_CENTER: -+ ae_channel = AE_CH_FC; -+ break; -+ case PA_CHANNEL_POSITION_SIDE_LEFT: -+ ae_channel = AE_CH_SL; -+ break; -+ case PA_CHANNEL_POSITION_SIDE_RIGHT: -+ ae_channel = AE_CH_FL; -+ break; -+ case PA_CHANNEL_POSITION_REAR_LEFT: -+ ae_channel = AE_CH_BL; -+ break; -+ case PA_CHANNEL_POSITION_REAR_RIGHT: -+ ae_channel = AE_CH_BR; -+ break; -+ case PA_CHANNEL_POSITION_LFE: -+ ae_channel = AE_CH_LFE; -+ break; -+ default: -+ ae_channel = AE_CH_NULL; -+ break; -+ } -+ return ae_channel; -+} -+ -+static CAEChannelInfo PAChannelToAEChannelMap(pa_channel_map channels) -+{ -+ CAEChannelInfo info; -+ info.Reset(); -+ for (unsigned int i=0; ierror = true; -+ pa_threaded_mainloop_signal(sinkStruct->mainloop, 0); -+ return; -+ } -+ -+ if(sinkStruct && sinkStruct->list->empty()) -+ { -+ //add a default device first -+ CAEDeviceInfo defaultDevice; -+ defaultDevice.m_deviceName = std::string("Default"); -+ defaultDevice.m_displayName = std::string("Default"); -+ defaultDevice.m_displayNameExtra = std::string("PULSE: (Default)"); -+ defaultDevice.m_dataFormats.insert(defaultDevice.m_dataFormats.end(), defaultDataFormats, defaultDataFormats + sizeof(defaultDataFormats) / sizeof(defaultDataFormats[0])); -+ defaultDevice.m_channels = CAEChannelInfo(AE_CH_LAYOUT_2_0); -+ defaultDevice.m_sampleRates.assign(defaultSampleRates, defaultSampleRates + sizeof(defaultSampleRates) / sizeof(defaultSampleRates[0])); -+ defaultDevice.m_deviceType = AE_DEVTYPE_PCM; -+ sinkStruct->list->push_back(defaultDevice); -+ } -+ -+ if (i && i->name) -+ { -+ CAEDeviceInfo device; -+ -+ device.m_deviceName = string(i->name); -+ device.m_displayName = string(i->description); -+ device.m_displayNameExtra = std::string("PULSE: ").append(i->description); -+ unsigned int device_type = AE_DEVTYPE_PCM; //0 -+ -+ device.m_channels = PAChannelToAEChannelMap(i->channel_map); -+ device.m_sampleRates.assign(defaultSampleRates, defaultSampleRates + sizeof(defaultSampleRates) / sizeof(defaultSampleRates[0])); -+ -+ for (unsigned int j = 0; j < i->n_formats; j++) -+ { -+ switch(i->formats[j]->encoding) -+ { -+ case PA_ENCODING_AC3_IEC61937: -+ device.m_dataFormats.push_back(AE_FMT_AC3); -+ device_type |= AE_DEVTYPE_IEC958; -+ break; -+ case PA_ENCODING_DTS_IEC61937: -+ device.m_dataFormats.push_back(AE_FMT_DTS); -+ device_type |= AE_DEVTYPE_IEC958; -+ break; -+ case PA_ENCODING_EAC3_IEC61937: -+ device.m_dataFormats.push_back(AE_FMT_EAC3); -+ device_type |= AE_DEVTYPE_IEC958; -+ break; -+ case PA_ENCODING_PCM: -+ device.m_dataFormats.insert(device.m_dataFormats.end(), defaultDataFormats, defaultDataFormats + sizeof(defaultDataFormats) / sizeof(defaultDataFormats[0])); -+ break; -+ default: -+ break; -+ } -+ } -+ // passthrough is only working when device has Stereo channel config -+ if (device_type > AE_DEVTYPE_PCM && device.m_channels.Count() == 2) -+ device.m_deviceType = AE_DEVTYPE_IEC958; -+ else -+ device.m_deviceType = AE_DEVTYPE_PCM; -+ -+ CLog::Log(LOGDEBUG, "PulseAudio: Found %s with devicestring %s", device.m_displayName.c_str(), device.m_deviceName.c_str()); -+ sinkStruct->list->push_back(device); -+ } -+ pa_threaded_mainloop_signal(sinkStruct->mainloop, 0); -+} -+ -+/* PulseAudio class memberfunctions*/ -+ -+ -+CAESinkPULSE::CAESinkPULSE() -+{ -+ m_IsAllocated = false; -+ m_BytesPerSecond = 0; -+ m_FrameSize = 0; -+ m_BufferSize = 0; -+ m_Channels = 0; -+ m_Stream = NULL; -+ m_Context = NULL; -+} -+ -+CAESinkPULSE::~CAESinkPULSE() -+{ -+ Deinitialize(); -+} -+ -+bool CAESinkPULSE::Initialize(AEAudioFormat &format, std::string &device) -+{ -+ m_IsAllocated = false; -+ m_BytesPerSecond = 0; -+ m_FrameSize = 0; -+ m_BufferSize = 0; -+ m_Channels = 0; -+ m_Stream = NULL; -+ m_Context = NULL; -+ -+ if (!SetupContext(NULL, &m_Context, &m_MainLoop)) -+ { -+ CLog::Log(LOGERROR, "PulseAudio: Failed to create context"); -+ Deinitialize(); -+ return false; -+ } -+ -+ pa_threaded_mainloop_lock(m_MainLoop); -+ -+ m_Channels = format.m_channelLayout.Count(); -+ -+ struct pa_channel_map map; -+ /* TODO Add proper mapping */ -+ pa_channel_map_init_auto(&map, m_Channels, PA_CHANNEL_MAP_ALSA); -+ -+ pa_cvolume_reset(&m_Volume, m_Channels); -+ -+ pa_format_info *info[1]; -+ info[0] = pa_format_info_new(); -+ info[0]->encoding = AEFormatToPulseEncoding(format.m_dataFormat); -+ pa_format_info_set_sample_format(info[0], AEFormatToPulseFormat(format.m_dataFormat)); -+ pa_format_info_set_channels(info[0], m_Channels); -+ unsigned int samplerate = AE_IS_RAW(format.m_dataFormat) ? format.m_encodedRate : format.m_sampleRate; -+ pa_format_info_set_rate(info[0], samplerate); -+ -+ if (!pa_format_info_valid(info[0])) -+ { -+ CLog::Log(LOGERROR, "PulseAudio: Invalid format info"); -+ pa_threaded_mainloop_unlock(m_MainLoop); -+ Deinitialize(); -+ return false; -+ } -+ -+ pa_sample_spec spec; -+ pa_format_info_to_sample_spec(info[0], &spec, &map); -+ if (!pa_sample_spec_valid(&spec)) -+ { -+ CLog::Log(LOGERROR, "PulseAudio: Invalid sample spec"); -+ pa_threaded_mainloop_unlock(m_MainLoop); -+ Deinitialize(); -+ return false; -+ } -+ -+ m_BytesPerSecond = pa_bytes_per_second(&spec); -+ m_FrameSize = pa_frame_size(&spec); -+ -+ m_Stream = pa_stream_new_extended(m_Context, "audio stream", info, 1, NULL); -+ pa_format_info_free(info[0]); -+ -+ if (m_Stream == NULL) -+ { -+ CLog::Log(LOGERROR, "PulseAudio: Could not create a stream"); -+ pa_threaded_mainloop_unlock(m_MainLoop); -+ Deinitialize(); -+ return false; -+ } -+ -+ pa_stream_set_state_callback(m_Stream, StreamStateCallback, m_MainLoop); -+ pa_stream_set_write_callback(m_Stream, StreamRequestCallback, m_MainLoop); -+ pa_stream_set_latency_update_callback(m_Stream, StreamLatencyUpdateCallback, m_MainLoop); -+ -+ bool isDefaultDevice = (device == "Default"); -+ -+ pa_buffer_attr buffer_attr; -+ SinkInfoStruct sinkStruct; -+ sinkStruct.mainloop = m_MainLoop; -+ sinkStruct.isHWDevice = false; -+ sinkStruct.error = false; -+ if (!isDefaultDevice) -+ WaitForOperation(pa_context_get_sink_info_by_name(m_Context, device.c_str(),SinkInfoCallback, &sinkStruct), m_MainLoop, "Get Sink Info"); -+ -+ if(sinkStruct.error) -+ { -+ // device not found, fallback to default device -+ CLog::Log(LOGERROR, "PulseAudio: Failed to open %s output device - will use default device", device.c_str()); -+ sinkStruct.error = false; -+ isDefaultDevice = true; -+ } -+ // 200ms max latency -+ // 50ms min packet size -+ if(sinkStruct.isHWDevice || isDefaultDevice) -+ { -+ unsigned int latency = m_BytesPerSecond / 5; -+ unsigned int process_time = latency / 4; -+ memset(&buffer_attr, 0, sizeof(buffer_attr)); -+ buffer_attr.tlength = (uint32_t) latency; -+ buffer_attr.minreq = (uint32_t) process_time; -+ buffer_attr.maxlength = (uint32_t) -1; -+ buffer_attr.prebuf = (uint32_t) -1; -+ buffer_attr.fragsize = (uint32_t) latency; -+ } -+ -+ if (pa_stream_connect_playback(m_Stream, isDefaultDevice ? NULL : device.c_str(), sinkStruct.isHWDevice ? &buffer_attr : NULL, ((pa_stream_flags)(PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_AUTO_TIMING_UPDATE | PA_STREAM_ADJUST_LATENCY)), &m_Volume, NULL) < 0) -+ { -+ CLog::Log(LOGERROR, "PulseAudio: Failed to connect stream to output"); -+ pa_threaded_mainloop_unlock(m_MainLoop); -+ Deinitialize(); -+ return false; -+ } -+ -+ /* Wait until the stream is ready */ -+ do -+ { -+ pa_threaded_mainloop_wait(m_MainLoop); -+ CLog::Log(LOGDEBUG, "PulseAudio: Stream %s", StreamStateToString(pa_stream_get_state(m_Stream))); -+ } -+ while (pa_stream_get_state(m_Stream) != PA_STREAM_READY && pa_stream_get_state(m_Stream) != PA_STREAM_FAILED); -+ -+ if (pa_stream_get_state(m_Stream) == PA_STREAM_FAILED) -+ { -+ CLog::Log(LOGERROR, "PulseAudio: Waited for the stream but it failed"); -+ pa_threaded_mainloop_unlock(m_MainLoop); -+ Deinitialize(); -+ return false; -+ } -+ -+ const pa_buffer_attr *a; -+ -+ if (!(a = pa_stream_get_buffer_attr(m_Stream))) -+ CLog::Log(LOGERROR, "PulseAudio: %s", pa_strerror(pa_context_errno(m_Context))); -+ else -+ { -+ unsigned int packetSize = a->minreq; -+ m_BufferSize = a->tlength; -+ -+ format.m_frames = packetSize / m_FrameSize; -+ } -+ -+ pa_threaded_mainloop_unlock(m_MainLoop); -+ -+ m_IsAllocated = true; -+ format.m_frameSize = m_FrameSize; -+ format.m_frameSamples = format.m_frames * format.m_channelLayout.Count(); -+ m_format = format; -+ format.m_dataFormat = AE_IS_RAW(format.m_dataFormat) ? AE_FMT_S16NE : format.m_dataFormat; -+ -+ SetVolume(1.0); -+ Cork(false); -+ -+ return true; -+} -+ -+void CAESinkPULSE::Deinitialize() -+{ -+ m_IsAllocated = false; -+ -+ if (m_Stream) -+ Drain(); -+ -+ if (m_MainLoop) -+ pa_threaded_mainloop_stop(m_MainLoop); -+ -+ if (m_Stream) -+ { -+ pa_stream_disconnect(m_Stream); -+ pa_stream_unref(m_Stream); -+ m_Stream = NULL; -+ } -+ -+ if (m_Context) -+ { -+ pa_context_disconnect(m_Context); -+ pa_context_unref(m_Context); -+ m_Context = NULL; -+ } -+ -+ if (m_MainLoop) -+ { -+ pa_threaded_mainloop_free(m_MainLoop); -+ m_MainLoop = NULL; -+ } -+} -+ -+double CAESinkPULSE::GetDelay() -+{ -+ if (!m_IsAllocated) -+ return 0; -+ -+ pa_usec_t latency = (pa_usec_t) -1; -+ pa_threaded_mainloop_lock(m_MainLoop); -+ while (pa_stream_get_latency(m_Stream, &latency, NULL) < 0) -+ { -+ if (pa_context_errno(m_Context) != PA_ERR_NODATA) -+ { -+ CLog::Log(LOGERROR, "PulseAudio: pa_stream_get_latency() failed"); -+ break; -+ } -+ /* Wait until latency data is available again */ -+ pa_threaded_mainloop_wait(m_MainLoop); -+ } -+ pa_threaded_mainloop_unlock(m_MainLoop); -+ return latency / 1000000.0; -+} -+ -+double CAESinkPULSE::GetCacheTotal() -+{ -+ return (float)m_BufferSize / (float)m_BytesPerSecond; -+} -+ -+unsigned int CAESinkPULSE::AddPackets(uint8_t *data, unsigned int frames, bool hasAudio, bool blocking) -+{ -+ if (!m_IsAllocated) -+ return frames; -+ -+ pa_threaded_mainloop_lock(m_MainLoop); -+ -+ unsigned int available = frames * m_format.m_frameSize; -+ unsigned int length = std::min((unsigned int)pa_stream_writable_size(m_Stream), available); -+ int error = pa_stream_write(m_Stream, data, length, NULL, 0, PA_SEEK_RELATIVE); -+ pa_threaded_mainloop_unlock(m_MainLoop); -+ -+ if (error) -+ { -+ CLog::Log(LOGERROR, "CPulseAudioDirectSound::AddPackets - pa_stream_write failed\n"); -+ return 0; -+ } -+ -+ return (unsigned int)(length / m_format.m_frameSize); -+} -+ -+void CAESinkPULSE::Drain() -+{ -+ if (!m_IsAllocated) -+ return; -+ -+ pa_threaded_mainloop_lock(m_MainLoop); -+ WaitForOperation(pa_stream_drain(m_Stream, NULL, NULL), m_MainLoop, "Drain"); -+ pa_threaded_mainloop_unlock(m_MainLoop); -+} -+ -+void CAESinkPULSE::SetVolume(float volume) -+{ -+ if (m_IsAllocated) -+ { -+ pa_threaded_mainloop_lock(m_MainLoop); -+ pa_volume_t pavolume = pa_sw_volume_from_linear(volume); -+ if ( pavolume <= 0 ) -+ pa_cvolume_mute(&m_Volume, m_Channels); -+ else -+ pa_cvolume_set(&m_Volume, m_Channels, pavolume); -+ pa_operation *op = pa_context_set_sink_input_volume(m_Context, pa_stream_get_index(m_Stream), &m_Volume, NULL, NULL); -+ if (op == NULL) -+ CLog::Log(LOGERROR, "PulseAudio: Failed to set volume"); -+ else -+ pa_operation_unref(op); -+ -+ pa_threaded_mainloop_unlock(m_MainLoop); -+ } -+} -+ -+void CAESinkPULSE::EnumerateDevicesEx(AEDeviceInfoList &list, bool force) -+{ -+ pa_context *context; -+ pa_threaded_mainloop *mainloop; -+ -+ if (!SetupContext(NULL, &context, &mainloop)) -+ { -+ CLog::Log(LOGERROR, "PulseAudio: Failed to create context"); -+ return; -+ } -+ -+ pa_threaded_mainloop_lock(mainloop); -+ -+ SinkInfoStruct sinkStruct; -+ sinkStruct.mainloop = mainloop; -+ sinkStruct.list = &list; -+ WaitForOperation(pa_context_get_sink_info_list(context, SinkInfoRequestCallback, &sinkStruct), mainloop, "EnumerateAudioSinks"); -+ -+ pa_threaded_mainloop_unlock(mainloop); -+ -+ if (mainloop) -+ pa_threaded_mainloop_stop(mainloop); -+ -+ if (context) -+ { -+ pa_context_disconnect(context); -+ pa_context_unref(context); -+ context = NULL; -+ } -+ -+ if (mainloop) -+ { -+ pa_threaded_mainloop_free(mainloop); -+ mainloop = NULL; -+ } -+} -+ -+bool CAESinkPULSE::Cork(bool cork) -+{ -+ pa_threaded_mainloop_lock(m_MainLoop); -+ -+ if (!WaitForOperation(pa_stream_cork(m_Stream, cork ? 1 : 0, NULL, NULL), m_MainLoop, cork ? "Pause" : "Resume")) -+ cork = !cork; -+ -+ pa_threaded_mainloop_unlock(m_MainLoop); -+ -+ return cork; -+} -+ -+inline bool CAESinkPULSE::WaitForOperation(pa_operation *op, pa_threaded_mainloop *mainloop, const char *LogEntry = "") -+{ -+ if (op == NULL) -+ return false; -+ -+ bool sucess = true; -+ -+ while (pa_operation_get_state(op) == PA_OPERATION_RUNNING) -+ pa_threaded_mainloop_wait(mainloop); -+ -+ if (pa_operation_get_state(op) != PA_OPERATION_DONE) -+ { -+ CLog::Log(LOGERROR, "PulseAudio: %s Operation failed", LogEntry); -+ sucess = false; -+ } -+ -+ pa_operation_unref(op); -+ return sucess; -+} -+ -+bool CAESinkPULSE::SetupContext(const char *host, pa_context **context, pa_threaded_mainloop **mainloop) -+{ -+ if ((*mainloop = pa_threaded_mainloop_new()) == NULL) -+ { -+ CLog::Log(LOGERROR, "PulseAudio: Failed to allocate main loop"); -+ return false; -+ } -+ -+ if (((*context) = pa_context_new(pa_threaded_mainloop_get_api(*mainloop), "XBMC")) == NULL) -+ { -+ CLog::Log(LOGERROR, "PulseAudio: Failed to allocate context"); -+ return false; -+ } -+ -+ pa_context_set_state_callback(*context, ContextStateCallback, *mainloop); -+ -+ if (pa_context_connect(*context, host, (pa_context_flags_t)0, NULL) < 0) -+ { -+ CLog::Log(LOGERROR, "PulseAudio: Failed to connect context"); -+ return false; -+ } -+ pa_threaded_mainloop_lock(*mainloop); -+ -+ if (pa_threaded_mainloop_start(*mainloop) < 0) -+ { -+ CLog::Log(LOGERROR, "PulseAudio: Failed to start MainLoop"); -+ pa_threaded_mainloop_unlock(*mainloop); -+ return false; -+ } -+ -+ /* Wait until the context is ready */ -+ do -+ { -+ pa_threaded_mainloop_wait(*mainloop); -+ CLog::Log(LOGDEBUG, "PulseAudio: Context %s", ContextStateToString(pa_context_get_state(*context))); -+ } -+ while (pa_context_get_state(*context) != PA_CONTEXT_READY && pa_context_get_state(*context) != PA_CONTEXT_FAILED); -+ -+ if (pa_context_get_state(*context) == PA_CONTEXT_FAILED) -+ { -+ CLog::Log(LOGERROR, "PulseAudio: Waited for the Context but it failed"); -+ pa_threaded_mainloop_unlock(*mainloop); -+ return false; -+ } -+ -+ pa_threaded_mainloop_unlock(*mainloop); -+ return true; -+} -+#endif -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.h b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.h -new file mode 100644 -index 0000000..a0fbbc5 ---- /dev/null -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.h -@@ -0,0 +1,72 @@ -+#pragma once -+/* -+ * Copyright (C) 2010-2013 Team XBMC -+ * http://xbmc.org -+ * -+ * This Program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2, or (at your option) -+ * any later version. -+ * -+ * This Program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with XBMC; see the file COPYING. If not, see -+ * . -+ * -+ */ -+ -+#include "system.h" -+ -+#include "cores/AudioEngine/Interfaces/AESink.h" -+#include "Utils/AEDeviceInfo.h" -+#include "Utils/AEUtil.h" -+#include -+ -+class CAESinkPULSE : public IAESink -+{ -+public: -+ virtual const char *GetName() { return "PULSE"; } -+ -+ CAESinkPULSE(); -+ virtual ~CAESinkPULSE(); -+ -+ virtual bool Initialize(AEAudioFormat &format, std::string &device); -+ virtual void Deinitialize(); -+ -+ virtual double GetDelay (); -+ virtual double GetCacheTotal (); -+ virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio, bool blocking = false); -+ virtual void Drain (); -+ -+ virtual bool HasVolume() { return true; }; -+ virtual void SetVolume(float volume); -+ -+ static void EnumerateDevicesEx(AEDeviceInfoList &list, bool force = false); -+private: -+ bool Cork(bool cork); -+ static inline bool WaitForOperation(pa_operation *op, pa_threaded_mainloop *mainloop, const char *LogEntry); -+ static bool SetupContext(const char *host, pa_context **context, pa_threaded_mainloop **mainloop); -+ -+ bool m_IsAllocated; -+ -+ AEAudioFormat m_format; -+ unsigned int m_BytesPerSecond; -+ unsigned int m_BufferSize; -+ unsigned int m_Channels; -+ unsigned int m_FrameSize; -+/* -+ unsigned int m_uiSamplesPerSec; -+ unsigned int m_uiBitsPerSample; -+ unsigned int m_uiDataChannels; -+ unsigned int m_uiChannels; -+*/ -+ pa_stream *m_Stream; -+ pa_cvolume m_Volume; -+ -+ pa_context *m_Context; -+ pa_threaded_mainloop *m_MainLoop; -+}; --- -1.8.5.1 - - -From 7c4a3a0e9e2e1fb0424e18459268bad64991600f Mon Sep 17 00:00:00 2001 -From: fritsch -Date: Mon, 6 Jan 2014 21:33:31 +0100 -Subject: [PATCH 2/6] AESinkPULSE: Revert error handling - did not work as - expected - ---- - xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp | 26 ++------------------------ - 1 file changed, 2 insertions(+), 24 deletions(-) - -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp -index 916aaf6..dca5e57 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp -@@ -193,22 +193,15 @@ struct SinkInfoStruct - { - AEDeviceInfoList *list; - bool isHWDevice; -- bool error; - pa_threaded_mainloop *mainloop; - }; - - static void SinkInfoCallback(pa_context *c, const pa_sink_info *i, int eol, void *userdata) - { - SinkInfoStruct *sinkStruct = (SinkInfoStruct *)userdata; -- if(eol) -- { -- sinkStruct->error = true; -- pa_threaded_mainloop_signal(sinkStruct->mainloop, 0); -- return; -- } - if (i && i->flags && (i->flags & PA_SINK_HARDWARE)) - sinkStruct->isHWDevice = true; -- pa_threaded_mainloop_signal(sinkStruct->mainloop, 0); -+ pa_threaded_mainloop_signal(sinkStruct->mainloop, 0); - } - - static AEChannel PAChannelToAEChannel(pa_channel_position_t channel) -@@ -262,13 +255,6 @@ static void SinkInfoRequestCallback(pa_context *c, const pa_sink_info *i, int eo - { - - SinkInfoStruct *sinkStruct = (SinkInfoStruct *)userdata; -- -- if(eol) -- { -- sinkStruct->error = true; -- pa_threaded_mainloop_signal(sinkStruct->mainloop, 0); -- return; -- } - - if(sinkStruct && sinkStruct->list->empty()) - { -@@ -427,17 +413,9 @@ bool CAESinkPULSE::Initialize(AEAudioFormat &format, std::string &device) - SinkInfoStruct sinkStruct; - sinkStruct.mainloop = m_MainLoop; - sinkStruct.isHWDevice = false; -- sinkStruct.error = false; - if (!isDefaultDevice) - WaitForOperation(pa_context_get_sink_info_by_name(m_Context, device.c_str(),SinkInfoCallback, &sinkStruct), m_MainLoop, "Get Sink Info"); -- -- if(sinkStruct.error) -- { -- // device not found, fallback to default device -- CLog::Log(LOGERROR, "PulseAudio: Failed to open %s output device - will use default device", device.c_str()); -- sinkStruct.error = false; -- isDefaultDevice = true; -- } -+ - // 200ms max latency - // 50ms min packet size - if(sinkStruct.isHWDevice || isDefaultDevice) --- -1.8.5.1 - - -From c86957a9e4fc196624aa612f8418070e83c29956 Mon Sep 17 00:00:00 2001 -From: fritsch -Date: Mon, 6 Jan 2014 22:01:28 +0100 -Subject: [PATCH 3/6] AESinkPULSE: Add missing #ifdef to not enumerate Pulse - later - ---- - xbmc/cores/AudioEngine/AESinkFactory.cpp | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/xbmc/cores/AudioEngine/AESinkFactory.cpp b/xbmc/cores/AudioEngine/AESinkFactory.cpp -index 8999085..8427cdf 100644 ---- a/xbmc/cores/AudioEngine/AESinkFactory.cpp -+++ b/xbmc/cores/AudioEngine/AESinkFactory.cpp -@@ -66,7 +66,9 @@ void CAESinkFactory::ParseDevice(std::string &device, std::string &driver) - #if defined(HAS_ALSA) - driver == "ALSA" || - #endif -+ #if defined(HAS_PULSEAUDIO) - driver == "PULSE" || -+ #endif - driver == "OSS" || - #endif - driver == "PROFILER") --- -1.8.5.1 - - -From 0478f5deb2b815b172db10f7984b35fe68e4c445 Mon Sep 17 00:00:00 2001 -From: fritsch -Date: Mon, 6 Jan 2014 23:16:14 +0100 -Subject: [PATCH 4/6] AESinkPULSE: Block until something is available - ---- - xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp -index dca5e57..d700b2e 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp -@@ -545,7 +545,13 @@ unsigned int CAESinkPULSE::AddPackets(uint8_t *data, unsigned int frames, bool h - pa_threaded_mainloop_lock(m_MainLoop); - - unsigned int available = frames * m_format.m_frameSize; -- unsigned int length = std::min((unsigned int)pa_stream_writable_size(m_Stream), available); -+ unsigned int length = 0; -+ while ((length = pa_stream_writable_size(m_Stream)) == 0) -+ pa_threaded_mainloop_wait(m_MainLoop); -+ -+ length = std::min((unsigned int)length, available); -+ //CLog::Log(LOGDEBUG, "CPulseAudioDirectSound::AddPackets Length %u Available %u", length, available); -+ - int error = pa_stream_write(m_Stream, data, length, NULL, 0, PA_SEEK_RELATIVE); - pa_threaded_mainloop_unlock(m_MainLoop); - --- -1.8.5.1 - - -From fa79f58a9befcde42080919c92d6e535a6c819d0 Mon Sep 17 00:00:00 2001 -From: fritsch -Date: Tue, 7 Jan 2014 08:25:04 +0100 -Subject: [PATCH 5/6] Squash me later (Remove Log) - ---- - xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp -index d700b2e..35ad796 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp -@@ -546,11 +546,11 @@ unsigned int CAESinkPULSE::AddPackets(uint8_t *data, unsigned int frames, bool h - - unsigned int available = frames * m_format.m_frameSize; - unsigned int length = 0; -+ // revisit me after Gotham - should use a callback for the write function - while ((length = pa_stream_writable_size(m_Stream)) == 0) - pa_threaded_mainloop_wait(m_MainLoop); - - length = std::min((unsigned int)length, available); -- //CLog::Log(LOGDEBUG, "CPulseAudioDirectSound::AddPackets Length %u Available %u", length, available); - - int error = pa_stream_write(m_Stream, data, length, NULL, 0, PA_SEEK_RELATIVE); - pa_threaded_mainloop_unlock(m_MainLoop); --- -1.8.5.1 - - -From 5ca9f9189247a340877d113d400b18bad135398d Mon Sep 17 00:00:00 2001 -From: fritsch -Date: Tue, 7 Jan 2014 11:43:32 +0100 -Subject: [PATCH 6/6] AESinkPULSE: Be compatible to version 1.0 - ---- - xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp -index 35ad796..a7ed63d 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp -@@ -380,7 +380,13 @@ bool CAESinkPULSE::Initialize(AEAudioFormat &format, std::string &device) - } - - pa_sample_spec spec; -- pa_format_info_to_sample_spec(info[0], &spec, &map); -+ #if PA_CHECK_VERSION(2,0,0) -+ pa_format_info_to_sample_spec(info[0], &spec, &map); -+ #else -+ spec.rate = (AEFormatToPulseEncoding(format.m_dataFormat) == PA_ENCODING_EAC3_IEC61937) ? 4 * samplerate : samplerate; -+ spec.format = AEFormatToPulseFormat(format.m_dataFormat); -+ spec.channels = m_Channels; -+ #endif - if (!pa_sample_spec_valid(&spec)) - { - CLog::Log(LOGERROR, "PulseAudio: Invalid sample spec"); --- -1.8.5.1 -