Switch namespace to media and use VideoProvider

Originally committed to SVN as r5300.
This commit is contained in:
Amar Takhar 2011-02-06 03:02:45 +00:00
parent 0ca6266c86
commit e18ad3768b
2 changed files with 12 additions and 14 deletions

View File

@ -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

View File

@ -22,20 +22,19 @@
#include <vector>
#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 <libaegisub/exception.h>
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