mirror of
https://github.com/odrling/Aegisub
synced 2025-04-11 22:56:02 +02:00
FFmpegSource2: more portability
Originally committed to SVN as r2351.
This commit is contained in:
parent
f5e18443de
commit
2cb713baef
@ -26,17 +26,25 @@
|
|||||||
#define FFMS_EXPORTS
|
#define FFMS_EXPORTS
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
# define EXTERN_C extern "C"
|
# define EXTERN_C extern "C"
|
||||||
#else
|
#else
|
||||||
# define EXTERN_C
|
# define EXTERN_C
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define FFMS_CC __stdcall
|
#ifdef WIN32
|
||||||
|
# define FFMS_CC __stdcall
|
||||||
#ifdef FFMS_EXPORTS
|
|
||||||
# define FFMS_API(ret) EXTERN_C __declspec(dllexport) ret FFMS_CC
|
|
||||||
#else
|
#else
|
||||||
# define FFMS_API(ret) EXTERN_C __declspec(dllimport) ret FFMS_CC
|
# define FFMS_CC
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
# ifdef FFMS_EXPORTS
|
||||||
|
# define FFMS_API(ret) EXTERN_C __declspec(dllexport) ret FFMS_CC
|
||||||
|
# else
|
||||||
|
# define FFMS_API(ret) EXTERN_C __declspec(dllimport) ret FFMS_CC
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define FFMS_API(ret) EXTERN_C ret FFMS_CC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class VideoBase;
|
class VideoBase;
|
||||||
@ -110,14 +118,14 @@ struct TrackTimeBase {
|
|||||||
int Den;
|
int Den;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FrameInfo {
|
class FrameInfo {
|
||||||
|
public:
|
||||||
int64_t DTS;
|
int64_t DTS;
|
||||||
bool KeyFrame;
|
bool KeyFrame;
|
||||||
FrameInfo(int64_t DTS, bool KeyFrame);
|
FrameInfo(int64_t DTS, bool KeyFrame);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct VideoProperties {
|
struct VideoProperties {
|
||||||
public:
|
|
||||||
int Width;
|
int Width;
|
||||||
int Height;
|
int Height;
|
||||||
int FPSDenominator;
|
int FPSDenominator;
|
||||||
|
@ -54,7 +54,7 @@ protected:
|
|||||||
AVFrameLite *OutputFrame(AVFrame *Frame);
|
AVFrameLite *OutputFrame(AVFrame *Frame);
|
||||||
public:
|
public:
|
||||||
virtual ~VideoBase();
|
virtual ~VideoBase();
|
||||||
const VideoProperties& __stdcall GetVideoProperties() { return VP; }
|
const VideoProperties& GetVideoProperties() { return VP; }
|
||||||
int GetTrack() { return VideoTrack; }
|
int GetTrack() { return VideoTrack; }
|
||||||
FrameInfoVector *GetFrameInfoVector() { return &Frames; }
|
FrameInfoVector *GetFrameInfoVector() { return &Frames; }
|
||||||
virtual AVFrameLite *GetFrame(int n, char *ErrorMsg, unsigned MsgSize) = 0;
|
virtual AVFrameLite *GetFrame(int n, char *ErrorMsg, unsigned MsgSize) = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user