mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
kodi: update to kodi-14-bcfc032
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
1aaa369786
commit
bddb577ede
@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="kodi-theme-Confluence"
|
||||
PKG_VERSION="14-73b8a0f"
|
||||
PKG_VERSION="14-bcfc032"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
|
@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="kodi"
|
||||
PKG_VERSION="14-73b8a0f"
|
||||
PKG_VERSION="14-bcfc032"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
|
@ -10081,293 +10081,6 @@ index f030e37..7a8fc10 100644
|
||||
|
||||
if (pMsg->IsType(CDVDMsg::GENERAL_SYNCHRONIZE))
|
||||
|
||||
From 4076f6c27bc3ae13a27ca65bafe51bf5a24b711f Mon Sep 17 00:00:00 2001
|
||||
From: arnova <arnova@void.org>
|
||||
Date: Sun, 23 Nov 2014 11:14:53 +0100
|
||||
Subject: [PATCH 92/94] changed: Modify rate calculation to obtain a proper
|
||||
average with heavy seeking/cache swapping
|
||||
|
||||
---
|
||||
xbmc/filesystem/CacheStrategy.cpp | 20 ++++++++++----------
|
||||
xbmc/filesystem/CacheStrategy.h | 6 +++---
|
||||
xbmc/filesystem/CircularCache.cpp | 6 ++++--
|
||||
xbmc/filesystem/CircularCache.h | 2 +-
|
||||
xbmc/filesystem/FileCache.cpp | 29 +++++++++++++++++++++++------
|
||||
xbmc/filesystem/MemBufferCache.cpp | 3 ++-
|
||||
xbmc/filesystem/MemBufferCache.h | 2 +-
|
||||
7 files changed, 44 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/xbmc/filesystem/CacheStrategy.cpp b/xbmc/filesystem/CacheStrategy.cpp
|
||||
index c1d1409..3cee421 100644
|
||||
--- a/xbmc/filesystem/CacheStrategy.cpp
|
||||
+++ b/xbmc/filesystem/CacheStrategy.cpp
|
||||
@@ -235,17 +235,18 @@ int64_t CSimpleFileCache::Seek(int64_t iFilePosition)
|
||||
return iFilePosition;
|
||||
}
|
||||
|
||||
-void CSimpleFileCache::Reset(int64_t iSourcePosition, bool clearAnyway)
|
||||
+bool CSimpleFileCache::Reset(int64_t iSourcePosition, bool clearAnyway)
|
||||
{
|
||||
if (!clearAnyway && IsCachedPosition(iSourcePosition))
|
||||
{
|
||||
m_nReadPosition = m_cacheFileRead->Seek(iSourcePosition - m_nStartPosition, SEEK_SET);
|
||||
- return;
|
||||
+ return false;
|
||||
}
|
||||
|
||||
m_nStartPosition = iSourcePosition;
|
||||
m_nWritePosition = m_cacheFileWrite->Seek(0, SEEK_SET);
|
||||
m_nReadPosition = m_cacheFileRead->Seek(0, SEEK_SET);
|
||||
+ return true;
|
||||
}
|
||||
|
||||
void CSimpleFileCache::EndOfInput()
|
||||
@@ -330,14 +331,13 @@ int64_t CDoubleCache::Seek(int64_t iFilePosition)
|
||||
return m_pCache->Seek(iFilePosition);
|
||||
}
|
||||
|
||||
-void CDoubleCache::Reset(int64_t iSourcePosition, bool clearAnyway)
|
||||
+bool CDoubleCache::Reset(int64_t iSourcePosition, bool clearAnyway)
|
||||
{
|
||||
if (!clearAnyway && m_pCache->IsCachedPosition(iSourcePosition)
|
||||
&& (!m_pCacheOld || !m_pCacheOld->IsCachedPosition(iSourcePosition)
|
||||
|| m_pCache->CachedDataEndPos() >= m_pCacheOld->CachedDataEndPos()))
|
||||
{
|
||||
- m_pCache->Reset(iSourcePosition, clearAnyway);
|
||||
- return;
|
||||
+ return m_pCache->Reset(iSourcePosition, clearAnyway);
|
||||
}
|
||||
if (!m_pCacheOld)
|
||||
{
|
||||
@@ -345,18 +345,18 @@ void CDoubleCache::Reset(int64_t iSourcePosition, bool clearAnyway)
|
||||
if (pCacheNew->Open() != CACHE_RC_OK)
|
||||
{
|
||||
delete pCacheNew;
|
||||
- m_pCache->Reset(iSourcePosition, clearAnyway);
|
||||
- return;
|
||||
+ return m_pCache->Reset(iSourcePosition, clearAnyway);
|
||||
}
|
||||
- pCacheNew->Reset(iSourcePosition, clearAnyway);
|
||||
+ bool bRes = pCacheNew->Reset(iSourcePosition, clearAnyway);
|
||||
m_pCacheOld = m_pCache;
|
||||
m_pCache = pCacheNew;
|
||||
- return;
|
||||
+ return bRes;
|
||||
}
|
||||
- m_pCacheOld->Reset(iSourcePosition, clearAnyway);
|
||||
+ bool bRes = m_pCacheOld->Reset(iSourcePosition, clearAnyway);
|
||||
CCacheStrategy *tmp = m_pCacheOld;
|
||||
m_pCacheOld = m_pCache;
|
||||
m_pCache = tmp;
|
||||
+ return bRes;
|
||||
}
|
||||
|
||||
void CDoubleCache::EndOfInput()
|
||||
diff --git a/xbmc/filesystem/CacheStrategy.h b/xbmc/filesystem/CacheStrategy.h
|
||||
index 5067d01..aa624d2 100644
|
||||
--- a/xbmc/filesystem/CacheStrategy.h
|
||||
+++ b/xbmc/filesystem/CacheStrategy.h
|
||||
@@ -50,7 +50,7 @@ class CCacheStrategy{
|
||||
virtual int64_t WaitForData(unsigned int iMinAvail, unsigned int iMillis) = 0;
|
||||
|
||||
virtual int64_t Seek(int64_t iFilePosition) = 0;
|
||||
- virtual void Reset(int64_t iSourcePosition, bool clearAnyway=true) = 0;
|
||||
+ virtual bool Reset(int64_t iSourcePosition, bool clearAnyway=true) = 0;
|
||||
|
||||
virtual void EndOfInput(); // mark the end of the input stream so that Read will know when to return EOF
|
||||
virtual bool IsEndOfInput();
|
||||
@@ -83,7 +83,7 @@ class CSimpleFileCache : public CCacheStrategy {
|
||||
virtual int64_t WaitForData(unsigned int iMinAvail, unsigned int iMillis) ;
|
||||
|
||||
virtual int64_t Seek(int64_t iFilePosition);
|
||||
- virtual void Reset(int64_t iSourcePosition, bool clearAnyway=true);
|
||||
+ virtual bool Reset(int64_t iSourcePosition, bool clearAnyway=true);
|
||||
virtual void EndOfInput();
|
||||
|
||||
virtual int64_t CachedDataEndPosIfSeekTo(int64_t iFilePosition);
|
||||
@@ -118,7 +118,7 @@ class CDoubleCache : public CCacheStrategy{
|
||||
virtual int64_t WaitForData(unsigned int iMinAvail, unsigned int iMillis) ;
|
||||
|
||||
virtual int64_t Seek(int64_t iFilePosition);
|
||||
- virtual void Reset(int64_t iSourcePosition, bool clearAnyway=true);
|
||||
+ virtual bool Reset(int64_t iSourcePosition, bool clearAnyway=true);
|
||||
virtual void EndOfInput();
|
||||
virtual bool IsEndOfInput();
|
||||
virtual void ClearEndOfInput();
|
||||
diff --git a/xbmc/filesystem/CircularCache.cpp b/xbmc/filesystem/CircularCache.cpp
|
||||
index 746a64a..eb8c044 100644
|
||||
--- a/xbmc/filesystem/CircularCache.cpp
|
||||
+++ b/xbmc/filesystem/CircularCache.cpp
|
||||
@@ -232,17 +232,19 @@ int64_t CCircularCache::Seek(int64_t pos)
|
||||
return CACHE_RC_ERROR;
|
||||
}
|
||||
|
||||
-void CCircularCache::Reset(int64_t pos, bool clearAnyway)
|
||||
+bool CCircularCache::Reset(int64_t pos, bool clearAnyway)
|
||||
{
|
||||
CSingleLock lock(m_sync);
|
||||
if (!clearAnyway && IsCachedPosition(pos))
|
||||
{
|
||||
m_cur = pos;
|
||||
- return;
|
||||
+ return false;
|
||||
}
|
||||
m_end = pos;
|
||||
m_beg = pos;
|
||||
m_cur = pos;
|
||||
+
|
||||
+ return true;
|
||||
}
|
||||
|
||||
int64_t CCircularCache::CachedDataEndPosIfSeekTo(int64_t iFilePosition)
|
||||
diff --git a/xbmc/filesystem/CircularCache.h b/xbmc/filesystem/CircularCache.h
|
||||
index f6aa6a7..3954eae 100644
|
||||
--- a/xbmc/filesystem/CircularCache.h
|
||||
+++ b/xbmc/filesystem/CircularCache.h
|
||||
@@ -42,7 +42,7 @@ class CCircularCache : public CCacheStrategy
|
||||
virtual int64_t WaitForData(unsigned int minimum, unsigned int iMillis) ;
|
||||
|
||||
virtual int64_t Seek(int64_t pos) ;
|
||||
- virtual void Reset(int64_t pos, bool clearAnyway=true) ;
|
||||
+ virtual bool Reset(int64_t pos, bool clearAnyway=true) ;
|
||||
|
||||
virtual int64_t CachedDataEndPosIfSeekTo(int64_t iFilePosition);
|
||||
virtual int64_t CachedDataEndPos();
|
||||
diff --git a/xbmc/filesystem/FileCache.cpp b/xbmc/filesystem/FileCache.cpp
|
||||
index 1ac2848..b65c3df 100644
|
||||
--- a/xbmc/filesystem/FileCache.cpp
|
||||
+++ b/xbmc/filesystem/FileCache.cpp
|
||||
@@ -44,20 +44,35 @@ class CWriteRate
|
||||
m_stamp = XbmcThreads::SystemClockMillis();
|
||||
m_pos = 0;
|
||||
m_pause = 0;
|
||||
+ m_size = 0;
|
||||
+ m_time = 0;
|
||||
}
|
||||
|
||||
- void Reset(int64_t pos)
|
||||
+ void Reset(int64_t pos, bool bResetAll = true)
|
||||
{
|
||||
m_stamp = XbmcThreads::SystemClockMillis();
|
||||
m_pos = pos;
|
||||
+
|
||||
+ if (bResetAll)
|
||||
+ {
|
||||
+ m_size = 0;
|
||||
+ m_time = 0;
|
||||
+ }
|
||||
}
|
||||
|
||||
unsigned Rate(int64_t pos, unsigned int time_bias = 0)
|
||||
{
|
||||
- const unsigned ts = XbmcThreads::SystemClockMillis() + time_bias;
|
||||
- if (ts == m_stamp)
|
||||
+ const unsigned ts = XbmcThreads::SystemClockMillis();
|
||||
+
|
||||
+ m_size += (pos - m_pos);
|
||||
+ m_time += (ts - m_stamp);
|
||||
+ m_pos = pos;
|
||||
+ m_stamp = ts;
|
||||
+
|
||||
+ if (m_time == 0)
|
||||
return 0;
|
||||
- return (unsigned)(1000 * (pos - m_pos) / (ts - m_stamp));
|
||||
+
|
||||
+ return (unsigned)(1000 * (m_size / (m_time + time_bias)));
|
||||
}
|
||||
|
||||
void Pause()
|
||||
@@ -75,6 +90,8 @@ class CWriteRate
|
||||
unsigned m_stamp;
|
||||
int64_t m_pos;
|
||||
unsigned m_pause;
|
||||
+ int64_t m_size;
|
||||
+ int64_t m_time;
|
||||
};
|
||||
|
||||
|
||||
@@ -233,11 +250,11 @@ void CFileCache::Process()
|
||||
}
|
||||
if (!sourceSeekFailed)
|
||||
{
|
||||
- m_pCache->Reset(m_seekPos, false);
|
||||
+ const bool bCompleteReset = m_pCache->Reset(m_seekPos, false);
|
||||
m_readPos = m_seekPos;
|
||||
m_writePos = m_pCache->CachedDataEndPos();
|
||||
assert(m_writePos == cacheMaxPos);
|
||||
- average.Reset(m_writePos);
|
||||
+ average.Reset(m_writePos, bCompleteReset); // Can only recalculate new average from scratch after a full reset (empty cache)
|
||||
limiter.Reset(m_writePos);
|
||||
m_cacheFull = (m_pCache->GetMaxWriteSize(m_chunkSize) == 0);
|
||||
m_nSeekResult = m_seekPos;
|
||||
diff --git a/xbmc/filesystem/MemBufferCache.cpp b/xbmc/filesystem/MemBufferCache.cpp
|
||||
index 7c1c61d..01583f6 100644
|
||||
--- a/xbmc/filesystem/MemBufferCache.cpp
|
||||
+++ b/xbmc/filesystem/MemBufferCache.cpp
|
||||
@@ -215,13 +215,14 @@ int64_t MemBufferCache::Seek(int64_t iFilePosition)
|
||||
return CACHE_RC_ERROR;
|
||||
}
|
||||
|
||||
-void MemBufferCache::Reset(int64_t iSourcePosition)
|
||||
+bool MemBufferCache::Reset(int64_t iSourcePosition, bool clearAnyway)
|
||||
{
|
||||
CSingleLock lock(m_sync);
|
||||
m_nStartPosition = iSourcePosition;
|
||||
m_buffer.Clear();
|
||||
m_HistoryBuffer.Clear();
|
||||
m_forwardBuffer.Clear();
|
||||
+ return true;
|
||||
}
|
||||
|
||||
|
||||
diff --git a/xbmc/filesystem/MemBufferCache.h b/xbmc/filesystem/MemBufferCache.h
|
||||
index 56b8d9c..7083b2d 100644
|
||||
--- a/xbmc/filesystem/MemBufferCache.h
|
||||
+++ b/xbmc/filesystem/MemBufferCache.h
|
||||
@@ -46,7 +46,7 @@ class MemBufferCache : public CCacheStrategy
|
||||
virtual int64_t WaitForData(unsigned int iMinAvail, unsigned int iMillis) ;
|
||||
|
||||
virtual int64_t Seek(int64_t iFilePosition) ;
|
||||
- virtual void Reset(int64_t iSourcePosition) ;
|
||||
+ virtual bool Reset(int64_t iSourcePosition, bool clearAnyway) ;
|
||||
|
||||
protected:
|
||||
int64_t m_nStartPosition;
|
||||
|
||||
From 35bea50d22dbee5af6765cbe852ff351f481b29d Mon Sep 17 00:00:00 2001
|
||||
From: arnova <arnova@void.org>
|
||||
Date: Mon, 24 Nov 2014 07:29:26 +0100
|
||||
Subject: [PATCH 93/94] changed: Don't perform wait-on-data if position is in
|
||||
our old cache
|
||||
|
||||
---
|
||||
xbmc/filesystem/CacheStrategy.cpp | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/xbmc/filesystem/CacheStrategy.cpp b/xbmc/filesystem/CacheStrategy.cpp
|
||||
index 3cee421..f7b4f0a 100644
|
||||
--- a/xbmc/filesystem/CacheStrategy.cpp
|
||||
+++ b/xbmc/filesystem/CacheStrategy.cpp
|
||||
@@ -328,7 +328,17 @@ int64_t CDoubleCache::WaitForData(unsigned int iMinAvail, unsigned int iMillis)
|
||||
|
||||
int64_t CDoubleCache::Seek(int64_t iFilePosition)
|
||||
{
|
||||
- return m_pCache->Seek(iFilePosition);
|
||||
+ /* Check whether position is NOT in our current cache but IS in our old cache.
|
||||
+ * This is faster/more efficient than having to possibly wait for data in the
|
||||
+ * Seek() call below
|
||||
+ */
|
||||
+ if (!m_pCache->IsCachedPosition(iFilePosition) &&
|
||||
+ m_pCacheOld && m_pCacheOld->IsCachedPosition(iFilePosition))
|
||||
+ {
|
||||
+ return CACHE_RC_ERROR; // Request seek event, so caches are swapped
|
||||
+ }
|
||||
+
|
||||
+ return m_pCache->Seek(iFilePosition); // Normal seek
|
||||
}
|
||||
|
||||
bool CDoubleCache::Reset(int64_t iSourcePosition, bool clearAnyway)
|
||||
|
||||
From 69f17df3156d7057c56fb2cc26c817ce5dbdf79b Mon Sep 17 00:00:00 2001
|
||||
From: Arne Morten Kvarving <cptspiff@gmail.com>
|
||||
Date: Tue, 25 Nov 2014 17:03:36 +0100
|
||||
|
Loading…
x
Reference in New Issue
Block a user