forked from mia/Aegisub
Fix video cache, just needed to stub out one option which will be made a param to the constructor.
Originally committed to SVN as r5308.
This commit is contained in:
parent
15dab81b91
commit
3d460ca31f
3 changed files with 15 additions and 6 deletions
|
@ -30,6 +30,7 @@ SRC = \
|
||||||
audio/dummy_audio.cpp \
|
audio/dummy_audio.cpp \
|
||||||
audio/pcm.cpp \
|
audio/pcm.cpp \
|
||||||
cache/audio_ram.cpp \
|
cache/audio_ram.cpp \
|
||||||
|
cache/video_cache.cpp \
|
||||||
$(SRC_OPT)
|
$(SRC_OPT)
|
||||||
|
|
||||||
HEADERS = \
|
HEADERS = \
|
||||||
|
|
10
aegisub/libmedia/cache/video_cache.cpp
vendored
10
aegisub/libmedia/cache/video_cache.cpp
vendored
|
@ -35,9 +35,11 @@
|
||||||
///
|
///
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "main.h"
|
//#include "main.h"
|
||||||
|
|
||||||
#include "video_provider_cache.h"
|
#include "video_cache.h"
|
||||||
|
|
||||||
|
namespace media {
|
||||||
|
|
||||||
/// DOCME
|
/// DOCME
|
||||||
/// @class CachedFrame
|
/// @class CachedFrame
|
||||||
|
@ -57,7 +59,7 @@ struct CachedFrame {
|
||||||
///
|
///
|
||||||
VideoProviderCache::VideoProviderCache(VideoProvider *parent)
|
VideoProviderCache::VideoProviderCache(VideoProvider *parent)
|
||||||
: master(parent)
|
: master(parent)
|
||||||
, cacheMax(OPT_GET("Provider/Video/Cache/Size")->GetInt() << 20) // convert MB to bytes
|
//XXX: , cacheMax(OPT_GET("Provider/Video/Cache/Size")->GetInt() << 20) // convert MB to bytes
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,3 +125,5 @@ unsigned VideoProviderCache::GetCurCacheSize() {
|
||||||
sz += i->frame.memSize;
|
sz += i->frame.memSize;
|
||||||
return sz;
|
return sz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace media
|
||||||
|
|
10
aegisub/libmedia/cache/video_cache.h
vendored
10
aegisub/libmedia/cache/video_cache.h
vendored
|
@ -39,7 +39,9 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "include/aegisub/video_provider.h"
|
#include "libmedia/video.h"
|
||||||
|
|
||||||
|
namespace media {
|
||||||
|
|
||||||
struct CachedFrame;
|
struct CachedFrame;
|
||||||
|
|
||||||
|
@ -77,6 +79,8 @@ public:
|
||||||
virtual int GetHeight() const { return master->GetHeight(); }
|
virtual int GetHeight() const { return master->GetHeight(); }
|
||||||
virtual agi::vfr::Framerate GetFPS() const { return master->GetFPS(); }
|
virtual agi::vfr::Framerate GetFPS() const { return master->GetFPS(); }
|
||||||
virtual std::vector<int> GetKeyFrames() const { return master->GetKeyFrames(); }
|
virtual std::vector<int> GetKeyFrames() const { return master->GetKeyFrames(); }
|
||||||
virtual wxString GetWarning() const { return master->GetWarning(); }
|
virtual std::string GetWarning() const { return master->GetWarning(); }
|
||||||
virtual wxString GetDecoderName() const { return master->GetDecoderName(); }
|
virtual std::string GetDecoderName() const { return master->GetDecoderName(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace media
|
||||||
|
|
Loading…
Reference in a new issue