xbmc-pvr: syncing patches

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2011-08-18 21:19:42 +02:00
parent 31ab196113
commit 30f76383b0
3 changed files with 98 additions and 0 deletions

View File

@ -0,0 +1,53 @@
From f46d7a99bc2f3bc70f274422ec8d16257e2a97aa Mon Sep 17 00:00:00 2001
From: FernetMenta <fernetmenta@online.de>
Date: Sat, 13 Aug 2011 16:07:08 +0200
Subject: [PATCH] ati: limit glxSwapBuffers going to far ahead
---
xbmc/windowing/X11/WinSystemX11GL.cpp | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/xbmc/windowing/X11/WinSystemX11GL.cpp b/xbmc/windowing/X11/WinSystemX11GL.cpp
index 94f369e..870999e 100644
--- a/xbmc/windowing/X11/WinSystemX11GL.cpp
+++ b/xbmc/windowing/X11/WinSystemX11GL.cpp
@@ -43,7 +43,27 @@ CWinSystemX11GL::~CWinSystemX11GL()
bool CWinSystemX11GL::PresentRenderImpl(const CDirtyRegionList& dirty)
{
- if(m_iVSyncMode == 3)
+ if(m_iVSyncMode == 2)
+ {
+ static unsigned int last = 0;
+ unsigned int now;
+ if(m_glXGetVideoSyncSGI(&now) != 0)
+ CLog::Log(LOGERROR, "%s - glXGetVideoSyncSGI - Failed to get current retrace count", __FUNCTION__);
+
+ if (now == last)
+ {
+ if (m_glXWaitVideoSyncSGI(2, (last + 1) % 2, &now) != 0)
+ CLog::Log(LOGERROR, "%s - glXWaitVideoSyncSGI - Returned error", __FUNCTION__);
+ if(m_glXGetVideoSyncSGI(&now) != 0)
+ CLog::Log(LOGERROR, "%s - glXGetVideoSyncSGI - Failed to get current retrace count", __FUNCTION__);
+ last = now + 1;
+ }
+ else
+ last = now;
+
+ glXSwapBuffers(m_dpy, m_glWindow);
+ }
+ else if(m_iVSyncMode == 3)
{
glFinish();
unsigned int before = 0, after = 0;
@@ -236,7 +256,6 @@ bool CWinSystemX11GL::CreateNewWindow(const CStdString& name, bool fullScreen, R
else
m_glXSwapIntervalMESA = NULL;
-
return true;
}
--
1.7.5.4

View File

@ -0,0 +1,27 @@
From dff7d824c82f957e19ad56247134912d70862188 Mon Sep 17 00:00:00 2001
From: FernetMenta <fernetmenta@online.de>
Date: Sun, 14 Aug 2011 11:21:32 +0200
Subject: [PATCH] vaapi: increase number of video surface allocated
---
xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
index bcc3fe1..326c390 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
@@ -358,7 +358,9 @@ bool CDecoder::EnsureContext(AVCodecContext *avctx)
else
m_refs = 2;
}
- return EnsureSurfaces(avctx, m_refs + 3);
+ // number of reference + 3 renderbuffers + Holder
+ // an extra one should not harm
+ return EnsureSurfaces(avctx, m_refs + 5);
}
bool CDecoder::EnsureSurfaces(AVCodecContext *avctx, unsigned n_surfaces_count)
--
1.7.5.4

View File

@ -0,0 +1,18 @@
diff -Naur xbmc-a3c804b/xbmc/interfaces/python/XBPython.cpp xbmc-a3c804b.patch/xbmc/interfaces/python/XBPython.cpp
--- xbmc-a3c804b/xbmc/interfaces/python/XBPython.cpp 2011-08-17 23:40:00.000000000 +0200
+++ xbmc-a3c804b.patch/xbmc/interfaces/python/XBPython.cpp 2011-08-18 03:50:49.652475572 +0200
@@ -335,11 +335,9 @@
// at http://docs.python.org/using/cmdline.html#environment-variables
#if !defined(_WIN32)
- /* PYTHONOPTIMIZE is set off intentionally when using external Python.
- Reason for this is because we cannot be sure what version of Python
- was used to compile the various Python object files (i.e. .pyo,
- .pyc, etc.). */
- // check if we are running as real xbmc.app or just binary
+ // Required for python to find optimized code (pyo) files
+ setenv("PYTHONOPTIMIZE", "1", 1);
+ // check if we are running as real xbmc.app or just binary
if (!CUtil::GetFrameworksPath(true).IsEmpty())
{
// using external python, it's build looking for xxx/lib/python2.6