forked from mia/Aegisub
Switch namespace to media and use VideoProvider
Originally committed to SVN as r5300.
This commit is contained in:
parent
0ca6266c86
commit
e18ad3768b
2 changed files with 12 additions and 14 deletions
|
@ -35,7 +35,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "ffms_video.h"
|
#include "ffms_video.h"
|
||||||
#include "libmedia/exception.h"
|
|
||||||
#include "libaegisub/util.h"
|
#include "libaegisub/util.h"
|
||||||
|
|
||||||
//#include "aegisub_endian.h"
|
//#include "aegisub_endian.h"
|
||||||
|
@ -45,7 +44,7 @@
|
||||||
//#include "video_context.h"
|
//#include "video_context.h"
|
||||||
//#include "video_provider_ffmpegsource.h"
|
//#include "video_provider_ffmpegsource.h"
|
||||||
|
|
||||||
namespace agi {
|
namespace media {
|
||||||
namespace ffms {
|
namespace ffms {
|
||||||
|
|
||||||
/// @brief Constructor
|
/// @brief Constructor
|
||||||
|
@ -266,7 +265,7 @@ void Video::Close() {
|
||||||
/// @return
|
/// @return
|
||||||
///
|
///
|
||||||
const media::AegiVideoFrame Video::GetFrame(int n) {
|
const media::AegiVideoFrame Video::GetFrame(int n) {
|
||||||
FrameNumber = util::mid(0, n, GetFrameCount() - 1);
|
FrameNumber = agi::util::mid(0, n, GetFrameCount() - 1);
|
||||||
|
|
||||||
// decode frame
|
// decode frame
|
||||||
const FFMS_Frame *SrcFrame = FFMS_GetFrame(VideoSource, FrameNumber, &ErrInfo);
|
const FFMS_Frame *SrcFrame = FFMS_GetFrame(VideoSource, FrameNumber, &ErrInfo);
|
||||||
|
@ -280,4 +279,4 @@ const media::AegiVideoFrame Video::GetFrame(int n) {
|
||||||
#endif /* WITH_FFMPEGSOURCE */
|
#endif /* WITH_FFMPEGSOURCE */
|
||||||
|
|
||||||
} // namespace ffms
|
} // namespace ffms
|
||||||
} // namespace agi
|
} // namespace media
|
||||||
|
|
|
@ -22,20 +22,19 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#include "ffmpegsource_common.h"
|
#include <libaegisub/exception.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"
|
|
||||||
|
|
||||||
namespace agi {
|
#include "../../libffms/include/ffms.h"
|
||||||
|
#include "libaegisub/vfr.h"
|
||||||
|
#include "../common/ffms_common.h"
|
||||||
|
#include "libmedia/video.h"
|
||||||
|
|
||||||
|
namespace media {
|
||||||
namespace ffms {
|
namespace ffms {
|
||||||
|
|
||||||
/// @class FFmpegSourceVideoProvider
|
/// @class FFmpegSourceVideoProvider
|
||||||
/// @brief Implements video loading through the FFMS library.
|
/// @brief Implements video loading through the FFMS library.
|
||||||
class Video : public FFmpegSourceProvider {
|
class Video : public VideoProvider, FFmpegSourceProvider {
|
||||||
private:
|
private:
|
||||||
FFMS_VideoSource *VideoSource; /// video source object
|
FFMS_VideoSource *VideoSource; /// video source object
|
||||||
const FFMS_VideoProperties *VideoInfo; /// video properties
|
const FFMS_VideoProperties *VideoInfo; /// video properties
|
||||||
|
@ -77,4 +76,4 @@ public:
|
||||||
|
|
||||||
|
|
||||||
} // namespace ffms
|
} // namespace ffms
|
||||||
} // namespace agi
|
} // namespace media
|
||||||
|
|
Loading…
Reference in a new issue