|
Blender V2.27
|
00001 00032 #ifndef IMB_ANIM_H 00033 #define IMB_ANIM_H 00034 00035 #ifdef _WIN32 00036 #define INC_OLE2 00037 #include <windows.h> 00038 #include <windowsx.h> 00039 #include <mmsystem.h> 00040 #include <memory.h> 00041 #include <commdlg.h> 00042 00043 #ifndef FREE_WINDOWS 00044 #include <vfw.h> 00045 #endif 00046 00047 #undef AVIIF_KEYFRAME // redefined in AVI_avi.h 00048 #undef AVIIF_LIST // redefined in AVI_avi.h 00049 00050 #define FIXCC(fcc) if (fcc == 0) fcc = mmioFOURCC('N', 'o', 'n', 'e'); \ 00051 if (fcc == BI_RLE8) fcc = mmioFOURCC('R', 'l', 'e', '8'); 00052 #endif 00053 00054 #include <sys/types.h> 00055 #include <ctype.h> 00056 #include <stdlib.h> 00057 #include <stdio.h> 00058 #ifndef _WIN32 00059 #include <dirent.h> 00060 #else 00061 #include <io.h> 00062 #endif 00063 00064 #include "BLI_blenlib.h" /* BLI_remlink BLI_filesize BLI_addtail 00065 BLI_countlist BLI_stringdec */ 00066 00067 #include "imbuf.h" 00068 00069 #include "AVI_avi.h" 00070 00071 #ifdef WITH_QUICKTIME 00072 #if defined(_WIN32) || defined(__APPLE__) 00073 #include "quicktime_import.h" 00074 #endif /* _WIN32 || __APPLE__ */ 00075 #endif /* WITH_QUICKTIME */ 00076 00077 #ifdef WITH_FFMPEG 00078 #include <libavformat/avformat.h> 00079 #include <libavcodec/avcodec.h> 00080 #include <libswscale/swscale.h> 00081 #endif 00082 00083 #ifdef WITH_REDCODE 00084 #ifdef _WIN32 /* on windows we use the one in extern instead */ 00085 #include "libredcode/format.h" 00086 #else 00087 #include "libredcode/format.h" 00088 #endif 00089 #endif 00090 00091 #include "IMB_imbuf_types.h" 00092 #include "IMB_imbuf.h" 00093 00094 #include "IMB_allocimbuf.h" 00095 00096 00097 00098 /* actually hard coded endianness */ 00099 #define GET_BIG_LONG(x) (((uchar *) (x))[0] << 24 | ((uchar *) (x))[1] << 16 | ((uchar *) (x))[2] << 8 | ((uchar *) (x))[3]) 00100 #define GET_LITTLE_LONG(x) (((uchar *) (x))[3] << 24 | ((uchar *) (x))[2] << 16 | ((uchar *) (x))[1] << 8 | ((uchar *) (x))[0]) 00101 #define SWAP_L(x) (((x << 24) & 0xff000000) | ((x << 8) & 0xff0000) | ((x >> 8) & 0xff00) | ((x >> 24) & 0xff)) 00102 #define SWAP_S(x) (((x << 8) & 0xff00) | ((x >> 8) & 0xff)) 00103 00104 /* more endianness... should move to a separate file... */ 00105 #if defined(__sgi) || defined (__sparc) || (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__) 00106 #define GET_ID GET_BIG_LONG 00107 #define LITTLE_LONG SWAP_LONG 00108 #else 00109 #define GET_ID GET_LITTLE_LONG 00110 #define LITTLE_LONG ENDIAN_NOP 00111 #endif 00112 00113 /* anim.curtype, runtime only */ 00114 #define ANIM_NONE 0 00115 #define ANIM_SEQUENCE (1 << 0) 00116 #define ANIM_MOVIE (1 << 4) 00117 #define ANIM_AVI (1 << 6) 00118 #define ANIM_QTIME (1 << 7) 00119 #define ANIM_FFMPEG (1 << 8) 00120 #define ANIM_REDCODE (1 << 9) 00121 00122 #define MAXNUMSTREAMS 50 00123 00124 struct _AviMovie; 00125 00126 struct anim { 00127 int ib_flags; 00128 int curtype; 00129 int curposition; /* index 0 = 1e, 1 = 2e, enz. */ 00130 int duration; 00131 int x, y; 00132 00133 /* voor op nummer */ 00134 char name[256]; 00135 /* voor sequence */ 00136 char first[256]; 00137 00138 /* movie */ 00139 void *movie; 00140 void *track; 00141 void *params; 00142 int orientation; 00143 size_t framesize; 00144 int interlacing; 00145 int preseek; 00146 00147 /* data */ 00148 struct ImBuf * ibuf1, * ibuf2; 00149 00150 /* avi */ 00151 struct _AviMovie *avi; 00152 00153 #if defined(_WIN32) && !defined(FREE_WINDOWS) 00154 /* windows avi */ 00155 int avistreams; 00156 int firstvideo; 00157 int pfileopen; 00158 PAVIFILE pfile; 00159 PAVISTREAM pavi[MAXNUMSTREAMS]; // the current streams 00160 PGETFRAME pgf; 00161 #endif 00162 00163 #ifdef WITH_QUICKTIME 00164 /* quicktime */ 00165 struct _QuicktimeMovie *qtime; 00166 #endif /* WITH_QUICKTIME */ 00167 00168 #ifdef WITH_FFMPEG 00169 AVFormatContext *pFormatCtx; 00170 AVCodecContext *pCodecCtx; 00171 AVCodec *pCodec; 00172 AVFrame *pFrame; 00173 AVFrame *pFrameRGB; 00174 AVFrame *pFrameDeinterlaced; 00175 struct SwsContext *img_convert_ctx; 00176 int videoStream; 00177 #endif 00178 00179 #ifdef WITH_REDCODE 00180 struct redcode_handle * redcodeCtx; 00181 #endif 00182 }; 00183 00184 #endif 00185
1.7.3