FFmpegSource2: more portability

Originally committed to SVN as r2351.
This commit is contained in:
Fredrik Mellbin 2008-09-12 20:41:29 +00:00
parent f5e18443de
commit 2cb713baef
2 changed files with 18 additions and 10 deletions

View File

@ -26,17 +26,25 @@
#define FFMS_EXPORTS
#ifdef __cplusplus
# define EXTERN_C extern "C"
# define EXTERN_C extern "C"
#else
# define EXTERN_C
# define EXTERN_C
#endif
#define FFMS_CC __stdcall
#ifdef FFMS_EXPORTS
# define FFMS_API(ret) EXTERN_C __declspec(dllexport) ret FFMS_CC
#ifdef WIN32
# define FFMS_CC __stdcall
#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
class VideoBase;
@ -110,14 +118,14 @@ struct TrackTimeBase {
int Den;
};
struct FrameInfo {
class FrameInfo {
public:
int64_t DTS;
bool KeyFrame;
FrameInfo(int64_t DTS, bool KeyFrame);
};
struct VideoProperties {
public:
int Width;
int Height;
int FPSDenominator;

View File

@ -54,7 +54,7 @@ protected:
AVFrameLite *OutputFrame(AVFrame *Frame);
public:
virtual ~VideoBase();
const VideoProperties& __stdcall GetVideoProperties() { return VP; }
const VideoProperties& GetVideoProperties() { return VP; }
int GetTrack() { return VideoTrack; }
FrameInfoVector *GetFrameInfoVector() { return &Frames; }
virtual AVFrameLite *GetFrame(int n, char *ErrorMsg, unsigned MsgSize) = 0;