From e18ad3768b9d83b0b51be0df426a4764ebf5fa6b Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Sun, 6 Feb 2011 03:02:45 +0000 Subject: [PATCH] Switch namespace to media and use VideoProvider Originally committed to SVN as r5300. --- aegisub/libmedia/video/ffms_video.cpp | 7 +++---- aegisub/libmedia/video/ffms_video.h | 19 +++++++++---------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/aegisub/libmedia/video/ffms_video.cpp b/aegisub/libmedia/video/ffms_video.cpp index f2b5e160f..9b813e144 100644 --- a/aegisub/libmedia/video/ffms_video.cpp +++ b/aegisub/libmedia/video/ffms_video.cpp @@ -35,7 +35,6 @@ #endif #include "ffms_video.h" -#include "libmedia/exception.h" #include "libaegisub/util.h" //#include "aegisub_endian.h" @@ -45,7 +44,7 @@ //#include "video_context.h" //#include "video_provider_ffmpegsource.h" -namespace agi { +namespace media { namespace ffms { /// @brief Constructor @@ -266,7 +265,7 @@ void Video::Close() { /// @return /// const media::AegiVideoFrame Video::GetFrame(int n) { - FrameNumber = util::mid(0, n, GetFrameCount() - 1); + FrameNumber = agi::util::mid(0, n, GetFrameCount() - 1); // decode frame const FFMS_Frame *SrcFrame = FFMS_GetFrame(VideoSource, FrameNumber, &ErrInfo); @@ -280,4 +279,4 @@ const media::AegiVideoFrame Video::GetFrame(int n) { #endif /* WITH_FFMPEGSOURCE */ } // namespace ffms -} // namespace agi +} // namespace media diff --git a/aegisub/libmedia/video/ffms_video.h b/aegisub/libmedia/video/ffms_video.h index 383e11b2a..e6197d044 100644 --- a/aegisub/libmedia/video/ffms_video.h +++ b/aegisub/libmedia/video/ffms_video.h @@ -22,20 +22,19 @@ #include #endif -//#include "ffmpegsource_common.h" -//#include "include/aegisub/video_provider.h" -#include "../../libffms/include/ffms.h" -#include "libmedia/video_frame.h" -#include "libaegisub/vfr.h" -#include "libaegisub/exception.h" -#include "../common/ffms_common.h" +#include -namespace agi { +#include "../../libffms/include/ffms.h" +#include "libaegisub/vfr.h" +#include "../common/ffms_common.h" +#include "libmedia/video.h" + +namespace media { namespace ffms { /// @class FFmpegSourceVideoProvider /// @brief Implements video loading through the FFMS library. -class Video : public FFmpegSourceProvider { +class Video : public VideoProvider, FFmpegSourceProvider { private: FFMS_VideoSource *VideoSource; /// video source object const FFMS_VideoProperties *VideoInfo; /// video properties @@ -77,4 +76,4 @@ public: } // namespace ffms -} // namespace agi +} // namespace media