From 3d460ca31f1dca05fc685ede9939e26bf7b3cabf Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Sun, 6 Feb 2011 19:28:17 +0000 Subject: [PATCH] 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. --- aegisub/libmedia/Makefile | 1 + aegisub/libmedia/cache/video_cache.cpp | 10 +++++++--- aegisub/libmedia/cache/video_cache.h | 10 +++++++--- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/aegisub/libmedia/Makefile b/aegisub/libmedia/Makefile index 9f09586f8..eb0e92341 100644 --- a/aegisub/libmedia/Makefile +++ b/aegisub/libmedia/Makefile @@ -30,6 +30,7 @@ SRC = \ audio/dummy_audio.cpp \ audio/pcm.cpp \ cache/audio_ram.cpp \ + cache/video_cache.cpp \ $(SRC_OPT) HEADERS = \ diff --git a/aegisub/libmedia/cache/video_cache.cpp b/aegisub/libmedia/cache/video_cache.cpp index ab7749b74..5b35096a5 100644 --- a/aegisub/libmedia/cache/video_cache.cpp +++ b/aegisub/libmedia/cache/video_cache.cpp @@ -35,9 +35,11 @@ /// #include "config.h" -#include "main.h" +//#include "main.h" -#include "video_provider_cache.h" +#include "video_cache.h" + +namespace media { /// DOCME /// @class CachedFrame @@ -57,7 +59,7 @@ struct CachedFrame { /// VideoProviderCache::VideoProviderCache(VideoProvider *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; return sz; } + +} // namespace media diff --git a/aegisub/libmedia/cache/video_cache.h b/aegisub/libmedia/cache/video_cache.h index 98962cd33..eff7733b6 100644 --- a/aegisub/libmedia/cache/video_cache.h +++ b/aegisub/libmedia/cache/video_cache.h @@ -39,7 +39,9 @@ #include #endif -#include "include/aegisub/video_provider.h" +#include "libmedia/video.h" + +namespace media { struct CachedFrame; @@ -77,6 +79,8 @@ public: virtual int GetHeight() const { return master->GetHeight(); } virtual agi::vfr::Framerate GetFPS() const { return master->GetFPS(); } virtual std::vector GetKeyFrames() const { return master->GetKeyFrames(); } - virtual wxString GetWarning() const { return master->GetWarning(); } - virtual wxString GetDecoderName() const { return master->GetDecoderName(); } + virtual std::string GetWarning() const { return master->GetWarning(); } + virtual std::string GetDecoderName() const { return master->GetDecoderName(); } }; + +} // namespace media