Possible cache bug?
#1
I already posted this: http://forum.xbmc.org/showthread.php?tid...ight=cache

And now had a quick look into the code. I added some logging to "DVDPlayer.cpp":

Code:
int CDVDPlayer::GetCacheLevel() const
{

CLog::Log(LOGNOTICE, "CDVDPlayer::GetCacheLevel: DataSize = %i" , m_dvdPlayerAudio.m_messageQueue.GetDataSize());
CLog::Log(LOGNOTICE, "CDVDPlayer::GetCacheLevel: MaxDataSize = %i" , m_dvdPlayerAudio.m_messageQueue.GetMaxDataSize());
   int a = min(100,100 * m_dvdPlayerAudio.m_messageQueue.GetDataSize() / m_dvdPlayerAudio.m_messageQueue.GetMaxDataSize());
  int v = min(100,100 * m_dvdPlayerVideo.m_messageQueue.GetDataSize() / m_dvdPlayerVideo.m_messageQueue.GetMaxDataSize());
  return max(a, v);
}

Just to see, that my configured settings are ignored. MaxDataSize was 491520. Then i saw in DVDPlayerAudio,cpp, Line 104 this:

Code:
m_messageQueue.SetMaxDataSize(30 * 16 * 1024);

Now, guess that 30 * 16 * 1024 = 491520! :-D

When changing this "const" to 1024 my stream will play almost instantly, or at least as fast as in VLC, So this should be changed to get the settings in the "Cache Configuration Screen", shouldn't it?

Btw,there are other "magic numbers" like this, just look for "SetMaxDataSize(" in the code...
Reply

Logout Mark Read Team Forum Stats Members Help
Possible cache bug?0