Change GetDesiredCacheSize() to WantsCaching() since video providers aren't setting number of frames to cache anymore.

Originally committed to SVN as r3831.
This commit is contained in:
Karl Blomster 2009-11-29 19:07:53 +00:00
parent ed3b47b250
commit abd2597d0f
6 changed files with 6 additions and 6 deletions

View File

@ -87,7 +87,7 @@ public:
/// @brief // How many frames does this provider want Aegisub to cache? Set to 0 if it doesn't require caching.
/// @return
///
virtual int GetDesiredCacheSize() { return 0; }
virtual bool WantsCaching() { return false; }
/// @brief // For "special" providers that don't deal well with VFR (i.e. Avisynth)

View File

@ -49,7 +49,7 @@
VideoProviderCache::VideoProviderCache(VideoProvider *parent) {
master = parent;
cacheMax = 0;
SetCacheMax(parent->GetDesiredCacheSize());
parent->WantsCaching() ? SetCacheMax(1) : SetCacheMax(0);
}

View File

@ -100,7 +100,7 @@ public:
wxString GetDecoderName() { return L"FFmpegSource"; }
/// @brief Gets the number of frames to cache.
/// @return Returns 8.
int GetDesiredCacheSize() { return 8; }
bool WantsCaching() { return true; }
};

View File

@ -93,7 +93,7 @@ VideoProvider *VideoProviderFactoryManager::GetProvider(wxString video) {
VideoProvider *provider = GetFactory(list[i])->CreateProvider(video.wc_str());
if (provider) {
// Cache if necessary
if (provider->GetDesiredCacheSize()) {
if (provider->WantsCaching()) {
provider = new VideoProviderCache(provider);
}
return provider;

View File

@ -132,7 +132,7 @@ public:
/// @brief DOCME
/// @return
///
int GetDesiredCacheSize() { return 8; };
bool WantsCaching() { return true; };
};

View File

@ -163,7 +163,7 @@ public:
bool IsVFR() { return false; };
FrameRate GetTrueFrameRate() { return FrameRate(); }
wxString GetDecoderName() { return L"YUV4MPEG"; }
int GetDesiredCacheSize() { return 8; }
bool WantsCaching() { return true; }
};