mirror of https://github.com/odrling/Aegisub
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:
parent
ed3b47b250
commit
abd2597d0f
|
@ -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)
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
VideoProviderCache::VideoProviderCache(VideoProvider *parent) {
|
||||
master = parent;
|
||||
cacheMax = 0;
|
||||
SetCacheMax(parent->GetDesiredCacheSize());
|
||||
parent->WantsCaching() ? SetCacheMax(1) : SetCacheMax(0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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; }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -132,7 +132,7 @@ public:
|
|||
/// @brief DOCME
|
||||
/// @return
|
||||
///
|
||||
int GetDesiredCacheSize() { return 8; };
|
||||
bool WantsCaching() { return true; };
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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; }
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue