summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libw32dll/DirectShow/DS_Filter.c2
-rw-r--r--src/libw32dll/DirectShow/DS_VideoDecoder.c4
-rw-r--r--src/libw32dll/dmo/DMO_VideoDecoder.c2
-rw-r--r--src/libw32dll/qt_decoder.c36
-rw-r--r--src/libw32dll/qtx/qtxsdk/.cvsignore1
-rw-r--r--src/libw32dll/qtx/qtxsdk/components.h1027
-rw-r--r--src/libw32dll/w32codec.c3
-rw-r--r--src/libw32dll/wine/afl.c1
-rw-r--r--src/libw32dll/wine/debugtools.h11
-rw-r--r--src/libw32dll/wine/driver.c8
-rw-r--r--src/libw32dll/wine/elfdll.c1
-rw-r--r--src/libw32dll/wine/ext.c4
-rw-r--r--src/libw32dll/wine/module.c43
-rw-r--r--src/libw32dll/wine/pe_image.c6
-rw-r--r--src/libw32dll/wine/registry.c4
-rw-r--r--src/libw32dll/wine/resource.c10
-rw-r--r--src/libw32dll/wine/vfw.h1
-rw-r--r--src/libw32dll/wine/win32.c43
-rw-r--r--src/libw32dll/wine/win32.h2
19 files changed, 636 insertions, 573 deletions
diff --git a/src/libw32dll/DirectShow/DS_Filter.c b/src/libw32dll/DirectShow/DS_Filter.c
index cfa583535..1f4b6d27a 100644
--- a/src/libw32dll/DirectShow/DS_Filter.c
+++ b/src/libw32dll/DirectShow/DS_Filter.c
@@ -236,7 +236,7 @@ DS_Filter* DS_FilterCreate(const char* dllname, const GUID* id,
if (!init)
{
DS_Filter_Destroy(This);
- printf("Warning: DS_Filter() %s. (DLL=%.200s, r=0x%x)\n", em, dllname, result);
+ printf("Warning: DS_Filter() %s. (DLL=%.200s, r=0x%x)\n", em, dllname, (unsigned)result);
This = 0;
}
return This;
diff --git a/src/libw32dll/DirectShow/DS_VideoDecoder.c b/src/libw32dll/DirectShow/DS_VideoDecoder.c
index 75f28127d..e34659f91 100644
--- a/src/libw32dll/DirectShow/DS_VideoDecoder.c
+++ b/src/libw32dll/DirectShow/DS_VideoDecoder.c
@@ -65,7 +65,7 @@ typedef struct _ct ct;
struct _ct {
unsigned int bits;
fourcc_t fcc;
- GUID *subtype;
+ const GUID *subtype;
int cap;
};
@@ -228,7 +228,7 @@ DS_VideoDecoder * DS_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHEAD
if (!result)
{
this->m_Caps = (this->m_Caps | c->cap);
- printf("%.4s ", &c->fcc);
+ printf("%.4s ", (char *)&c->fcc);
}
}
printf("\n");
diff --git a/src/libw32dll/dmo/DMO_VideoDecoder.c b/src/libw32dll/dmo/DMO_VideoDecoder.c
index aba62ee63..564c26ec8 100644
--- a/src/libw32dll/dmo/DMO_VideoDecoder.c
+++ b/src/libw32dll/dmo/DMO_VideoDecoder.c
@@ -304,7 +304,6 @@ void DMO_VideoDecoder_StopInternal(DMO_VideoDecoder *this)
int DMO_VideoDecoder_DecodeInternal(DMO_VideoDecoder *this, const void* src, int size, int is_keyframe, char* imdata)
{
// IMediaSample* sample = 0;
- char* ptr;
int result;
unsigned long status; // to be ignored by M$ specs
DMO_OUTPUT_DATA_BUFFER db;
@@ -371,7 +370,6 @@ int DMO_VideoDecoder_SetDestFmt(DMO_VideoDecoder *this, int bits, unsigned int c
{
HRESULT result;
int should_test=1;
- int stoped = 0;
Debug printf("DMO_VideoDecoder_SetDestFmt (%p, %d, %d)\n",this,bits,(int)csp);
diff --git a/src/libw32dll/qt_decoder.c b/src/libw32dll/qt_decoder.c
index 2ae8acef3..489bcea1c 100644
--- a/src/libw32dll/qt_decoder.c
+++ b/src/libw32dll/qt_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: qt_decoder.c,v 1.29 2003/12/14 22:13:24 siggi Exp $
+ * $Id: qt_decoder.c,v 1.30 2003/12/24 16:55:35 mroi Exp $
*
* quicktime video/audio decoder plugin, using win32 dlls
* most of this code comes directly from MPlayer
@@ -45,6 +45,7 @@
#include "buffer.h"
#include "qtx/qtxsdk/components.h"
+#include "wine/win32.h"
#include "wine/windef.h"
#include "wine/ldt_keeper.h"
@@ -74,7 +75,6 @@ int WINAPI FreeLibrary(HMODULE);
*/
static pthread_once_t once_control = PTHREAD_ONCE_INIT;
static pthread_mutex_t win32_codec_mutex;
-extern char *win32_def_path;
static void init_routine(void) {
@@ -789,20 +789,20 @@ static void qtv_init_driver (qtv_decoder_t *this, buf_element_t *buf) {
return;
}
- this->InitializeQTML = GetProcAddress (this->qtml_dll, "InitializeQTML");
- this->EnterMovies = GetProcAddress (this->qtml_dll, "EnterMovies");
- this->FindNextComponent = GetProcAddress (this->qtml_dll, "FindNextComponent");
- this->CountComponents = GetProcAddress (this->qtml_dll, "CountComponents");
- this->GetComponentInfo = GetProcAddress (this->qtml_dll, "GetComponentInfo");
- this->OpenComponent = GetProcAddress (this->qtml_dll, "OpenComponent");
- this->ImageCodecInitialize = GetProcAddress (this->qtml_dll, "ImageCodecInitialize");
- this->ImageCodecGetCodecInfo = GetProcAddress (this->qtml_dll, "ImageCodecGetCodecInfo");
- this->ImageCodecBeginBand = GetProcAddress (this->qtml_dll, "ImageCodecBeginBand");
- this->ImageCodecPreDecompress = GetProcAddress (this->qtml_dll, "ImageCodecPreDecompress");
- this->ImageCodecBandDecompress = GetProcAddress (this->qtml_dll, "ImageCodecBandDecompress");
- this->GetGWorldPixMap = GetProcAddress (this->qtml_dll, "GetGWorldPixMap");
- this->QTNewGWorldFromPtr = GetProcAddress (this->qtml_dll, "QTNewGWorldFromPtr");
- this->NewHandleClear = GetProcAddress (this->qtml_dll, "NewHandleClear");
+ this->InitializeQTML = (OSErr(*)(long))GetProcAddress(this->qtml_dll, "InitializeQTML");
+ this->EnterMovies = (OSErr(*)(void))GetProcAddress(this->qtml_dll, "EnterMovies");
+ this->FindNextComponent = (Component(*)(Component,ComponentDescription*))GetProcAddress(this->qtml_dll, "FindNextComponent");
+ this->CountComponents = (long(*)(ComponentDescription*))GetProcAddress(this->qtml_dll, "CountComponents");
+ this->GetComponentInfo = (OSErr(*)(Component,ComponentDescription*,Handle,Handle,Handle))GetProcAddress(this->qtml_dll, "GetComponentInfo");
+ this->OpenComponent = (ComponentInstance(*)(Component))GetProcAddress(this->qtml_dll, "OpenComponent");
+ this->ImageCodecInitialize = (ComponentResult(*)(ComponentInstance,ImageSubCodecDecompressCapabilities*))GetProcAddress(this->qtml_dll, "ImageCodecInitialize");
+ this->ImageCodecGetCodecInfo = (ComponentResult(*)(ComponentInstance,CodecInfo*))GetProcAddress(this->qtml_dll, "ImageCodecGetCodecInfo");
+ this->ImageCodecBeginBand = (ComponentResult(*)(ComponentInstance,CodecDecompressParams*,ImageSubCodecDecompressRecord*,long))GetProcAddress(this->qtml_dll, "ImageCodecBeginBand");
+ this->ImageCodecPreDecompress = (ComponentResult(*)(ComponentInstance,CodecDecompressParams*))GetProcAddress(this->qtml_dll, "ImageCodecPreDecompress");
+ this->ImageCodecBandDecompress = (ComponentResult(*)(ComponentInstance,CodecDecompressParams*))GetProcAddress(this->qtml_dll, "ImageCodecBandDecompress");
+ this->GetGWorldPixMap = (PixMapHandle(*)(GWorldPtr))GetProcAddress(this->qtml_dll, "GetGWorldPixMap");
+ this->QTNewGWorldFromPtr = (OSErr(*)(GWorldPtr*,OSType,const Rect*,CTabHandle,void*,GWorldFlags,void*,long))GetProcAddress(this->qtml_dll, "QTNewGWorldFromPtr");
+ this->NewHandleClear = (OSErr(*)(Size))GetProcAddress(this->qtml_dll, "NewHandleClear");
if (!this->InitializeQTML || !this->EnterMovies || !this->FindNextComponent
|| !this->ImageCodecBandDecompress){
@@ -938,7 +938,7 @@ static void qtv_init_driver (qtv_decoder_t *this, buf_element_t *buf) {
this->decpar.matrix = 0;
this->decpar.capabilities = &this->codeccap;
this->decpar.accuracy = codecNormalQuality;
- this->decpar.port = this->OutBufferGWorld;
+ this->decpar.port = (CGrafPtr)this->OutBufferGWorld;
this->decpar.srcRect = this->OutBufferRect;
this->decpar.transferMode = srcCopy;
@@ -1015,7 +1015,7 @@ static void qtv_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
if (cres&0xFFFF){
xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
- "qt_video: ImageCodecBandDecompress cres=0x%X (-0x%X) %d :(\n", cres,-cres,cres);
+ "qt_video: ImageCodecBandDecompress cres=0x%lX (-0x%lX) %ld :(\n", cres,-cres,cres);
}
img = this->stream->video_out->get_frame (this->stream->video_out,
diff --git a/src/libw32dll/qtx/qtxsdk/.cvsignore b/src/libw32dll/qtx/qtxsdk/.cvsignore
index 22a4e7292..282522db0 100644
--- a/src/libw32dll/qtx/qtxsdk/.cvsignore
+++ b/src/libw32dll/qtx/qtxsdk/.cvsignore
@@ -1,3 +1,2 @@
Makefile
Makefile.in
-
diff --git a/src/libw32dll/qtx/qtxsdk/components.h b/src/libw32dll/qtx/qtxsdk/components.h
index 9d1b167be..1456342f9 100644
--- a/src/libw32dll/qtx/qtxsdk/components.h
+++ b/src/libw32dll/qtx/qtxsdk/components.h
@@ -1,225 +1,226 @@
// Basic types:
-typedef char * Ptr;
-typedef Ptr * Handle;
-typedef long Size;
-typedef unsigned char Boolean;
-typedef unsigned char Str31[32];
-typedef long Fixed;
+typedef char * Ptr;
+typedef Ptr * Handle;
+typedef long Size;
+typedef unsigned char Boolean;
+typedef unsigned char Str31[32];
+typedef long Fixed;
typedef long OSErr;
typedef int OSType;
typedef long ComponentResult;
-typedef unsigned char UInt8;
-typedef signed char SInt8;
-typedef unsigned short UInt16;
-typedef signed short SInt16;
-typedef unsigned long UInt32;
-typedef signed long SInt32;
+typedef unsigned char UInt8;
+typedef signed char SInt8;
+typedef unsigned short UInt16;
+typedef signed short SInt16;
+typedef unsigned long UInt32;
+typedef signed long SInt32;
-#define FOUR_CHAR_CODE(x) ((unsigned long)(x)) /* otherwise compiler will complain about values with high bit set */
+#define FOUR_CHAR_CODE(a,b,c,d) (((a)<<24)|((b)<<16)|((c)<<8)|(d))
// codec private shit:
typedef void *GlobalsPtr;
-typedef void **Globals;
+typedef void **Globals;
//==================== COMPONENTS ===========================
-struct __attribute__((__packed__)) ComponentParameters {
- UInt8 flags; /* call modifiers: sync/async, deferred, immed, etc */
- UInt8 paramSize; /* size in bytes of actual parameters passed to this call */
- short what; /* routine selector, negative for Component management calls */
- long params[1]; /* actual parameters for the indicated routine */
-};
-typedef struct ComponentParameters ComponentParameters;
-
-
-struct __attribute__((__packed__)) ComponentDescription {
- OSType componentType; /* A unique 4-byte code indentifying the command set */
- OSType componentSubType; /* Particular flavor of this instance */
- OSType componentManufacturer; /* Vendor indentification */
- unsigned long componentFlags; /* 8 each for Component,Type,SubType,Manuf/revision */
- unsigned long componentFlagsMask; /* Mask for specifying which flags to consider in search, zero during registration */
-};
-typedef struct ComponentDescription ComponentDescription;
-
-
-struct __attribute__((__packed__)) ResourceSpec {
- OSType resType; /* 4-byte code */
- short resID; /* */
-};
-typedef struct ResourceSpec ResourceSpec;
-
-
-struct __attribute__((__packed__)) ComponentResource {
- ComponentDescription cd; /* Registration parameters */
- ResourceSpec component; /* resource where Component code is found */
- ResourceSpec componentName; /* name string resource */
- ResourceSpec componentInfo; /* info string resource */
- ResourceSpec componentIcon; /* icon resource */
-};
-typedef struct ComponentResource ComponentResource;
-typedef ComponentResource * ComponentResourcePtr;
-typedef ComponentResourcePtr * ComponentResourceHandle;
-
-
-struct __attribute__((__packed__)) ComponentRecord {
- long data[1];
-};
-typedef struct ComponentRecord ComponentRecord;
-typedef ComponentRecord * Component;
-
-
-struct __attribute__((__packed__)) ComponentInstanceRecord {
- long data[1];
-};
-typedef struct ComponentInstanceRecord ComponentInstanceRecord;
- typedef ComponentInstanceRecord * ComponentInstance;
+struct __attribute__((__packed__)) ComponentParameters {
+ UInt8 flags; /* call modifiers: sync/async, deferred, immed, etc */
+ UInt8 paramSize; /* size in bytes of actual parameters passed to this call */
+ short what; /* routine selector, negative for Component management calls */
+ long params[1]; /* actual parameters for the indicated routine */
+};
+typedef struct ComponentParameters ComponentParameters;
+
+
+struct __attribute__((__packed__)) ComponentDescription {
+ OSType componentType; /* A unique 4-byte code indentifying the command set */
+ OSType componentSubType; /* Particular flavor of this instance */
+ OSType componentManufacturer; /* Vendor indentification */
+ unsigned long componentFlags; /* 8 each for Component,Type,SubType,Manuf/revision */
+ unsigned long componentFlagsMask; /* Mask for specifying which flags to consider in search, zero during registration */
+};
+typedef struct ComponentDescription ComponentDescription;
+
+
+struct __attribute__((__packed__)) ResourceSpec {
+ OSType resType; /* 4-byte code */
+ short resID; /* */
+};
+typedef struct ResourceSpec ResourceSpec;
+
+
+struct __attribute__((__packed__)) ComponentResource {
+ ComponentDescription cd; /* Registration parameters */
+ ResourceSpec component; /* resource where Component code is found */
+ ResourceSpec componentName; /* name string resource */
+ ResourceSpec componentInfo; /* info string resource */
+ ResourceSpec componentIcon; /* icon resource */
+};
+typedef struct ComponentResource ComponentResource;
+typedef ComponentResource * ComponentResourcePtr;
+typedef ComponentResourcePtr * ComponentResourceHandle;
+
+
+struct __attribute__((__packed__)) ComponentRecord {
+ long data[1];
+};
+typedef struct ComponentRecord ComponentRecord;
+typedef ComponentRecord * Component;
+
+
+struct __attribute__((__packed__)) ComponentInstanceRecord {
+ long data[1];
+};
+typedef struct ComponentInstanceRecord ComponentInstanceRecord;
+
+typedef ComponentInstanceRecord * ComponentInstance;
// ========================= QUICKDRAW =========================
-struct __attribute__((__packed__)) Rect {
- short top;
- short left;
- short bottom;
- short right;
-};
-typedef struct Rect Rect;
-typedef Rect * RectPtr;
-
-struct __attribute__((__packed__)) RGBColor {
- unsigned short red; /*magnitude of red component*/
- unsigned short green; /*magnitude of green component*/
- unsigned short blue; /*magnitude of blue component*/
-};
-typedef struct RGBColor RGBColor;
-typedef RGBColor * RGBColorPtr;
-typedef RGBColorPtr * RGBColorHdl;
-
-struct __attribute__((__packed__)) ColorSpec {
- short value; /*index or other value*/
- RGBColor rgb; /*true color*/
-};
-typedef struct ColorSpec ColorSpec;
-typedef ColorSpec * ColorSpecPtr;
-typedef ColorSpec CSpecArray[1];
-
-struct __attribute__((__packed__)) ColorTable {
- long ctSeed; /*unique identifier for table*/
- short ctFlags; /*high bit: 0 = PixMap; 1 = device*/
- short ctSize; /*number of entries in CTTable*/
- CSpecArray ctTable; /*array [0..0] of ColorSpec*/
-};
-typedef struct ColorTable ColorTable;
-typedef ColorTable * CTabPtr;
-typedef CTabPtr * CTabHandle;
-
-struct __attribute__((__packed__)) MatrixRecord {
- Fixed matrix[3][3];
-};
-typedef struct MatrixRecord MatrixRecord;
-typedef MatrixRecord * MatrixRecordPtr;
-
-typedef long ImageSequence;
-typedef OSType CodecType;
-typedef unsigned short CodecFlags;
-typedef unsigned long CodecQ;
-
-struct __attribute__((__packed__)) ImageDescription {
- long idSize; /* total size of ImageDescription including extra data ( CLUTs and other per sequence data ) */
- CodecType cType; /* what kind of codec compressed this data */
- long resvd1; /* reserved for Apple use */
- short resvd2; /* reserved for Apple use */
- short dataRefIndex; /* set to zero */
- short version; /* which version is this data */
- short revisionLevel; /* what version of that codec did this */
- long vendor; /* whose codec compressed this data */
- CodecQ temporalQuality; /* what was the temporal quality factor */
- CodecQ spatialQuality; /* what was the spatial quality factor */
- short width; /* how many pixels wide is this data */
- short height; /* how many pixels high is this data */
- Fixed hRes; /* horizontal resolution */
- Fixed vRes; /* vertical resolution */
- long dataSize; /* if known, the size of data for this image descriptor */
- short frameCount; /* number of frames this description applies to */
- Str31 name; /* name of codec ( in case not installed ) */
- short depth; /* what depth is this data (1-32) or ( 33-40 grayscale ) */
- short clutID; /* clut id or if 0 clut follows or -1 if no clut */
-};
-typedef struct ImageDescription ImageDescription;
-typedef ImageDescription * ImageDescriptionPtr;
-typedef ImageDescriptionPtr * ImageDescriptionHandle;
-
-/* values for PixMap.pixelFormat*/
-enum {
- k16LE555PixelFormat = FOUR_CHAR_CODE('L555'), /* 16 bit LE rgb 555 (PC)*/
- k16LE5551PixelFormat = FOUR_CHAR_CODE('5551'), /* 16 bit LE rgb 5551*/
- k16BE565PixelFormat = FOUR_CHAR_CODE('B565'), /* 16 bit BE rgb 565*/
- k16LE565PixelFormat = FOUR_CHAR_CODE('L565'), /* 16 bit LE rgb 565*/
- k24BGRPixelFormat = FOUR_CHAR_CODE('24BG'), /* 24 bit bgr */
- k32BGRAPixelFormat = FOUR_CHAR_CODE('BGRA'), /* 32 bit bgra (Matrox)*/
- k32ABGRPixelFormat = FOUR_CHAR_CODE('ABGR'), /* 32 bit abgr */
- k32RGBAPixelFormat = FOUR_CHAR_CODE('RGBA'), /* 32 bit rgba */
- kYUVSPixelFormat = FOUR_CHAR_CODE('yuvs'), /* YUV 4:2:2 byte ordering 16-unsigned = 'YUY2'*/
- kYUVUPixelFormat = FOUR_CHAR_CODE('yuvu'), /* YUV 4:2:2 byte ordering 16-signed*/
- kYVU9PixelFormat = FOUR_CHAR_CODE('YVU9'), /* YVU9 Planar 9*/
- kYUV411PixelFormat = FOUR_CHAR_CODE('Y411'), /* YUV 4:1:1 Interleaved 16*/
- kYVYU422PixelFormat = FOUR_CHAR_CODE('YVYU'), /* YVYU 4:2:2 byte ordering 16*/
- kUYVY422PixelFormat = FOUR_CHAR_CODE('UYVY'), /* UYVY 4:2:2 byte ordering 16*/
- kYUV211PixelFormat = FOUR_CHAR_CODE('Y211'), /* YUV 2:1:1 Packed 8*/
- k2vuyPixelFormat = FOUR_CHAR_CODE('2vuy') /* UYVY 4:2:2 byte ordering 16*/
-};
-
-struct __attribute__((__packed__)) PixMapExtension {
- long extSize; /*size of struct, duh!*/
- unsigned long pmBits; /*pixmap attributes bitfield*/
- void * pmGD; /*this is a GDHandle*/
- long pmSeed;
- Fixed gammaLevel; /*pixmap gammalevel*/
- Fixed requestedGammaLevel;
- unsigned long reserved2;
- long longRowBytes; /*used when rowBytes > 16382*/
- unsigned long signature;
- Handle baseAddrHandle;
-};
-typedef struct PixMapExtension PixMapExtension;
-
-typedef PixMapExtension * PixMapExtPtr;
-typedef PixMapExtPtr * PixMapExtHandle;
-
-
-struct __attribute__((__packed__)) PixMap {
- Ptr baseAddr; /*pointer to pixels*/
- short rowBytes; /*offset to next line*/
- Rect bounds; /*encloses bitmap*/
- short pmVersion; /*pixMap version number*/
- short packType; /*defines packing format*/
- long packSize; /*length of pixel data*/
- Fixed hRes; /*horiz. resolution (ppi)*/
- Fixed vRes; /*vert. resolution (ppi)*/
- short pixelType; /*defines pixel type*/
- short pixelSize; /*# bits in pixel*/
- short cmpCount; /*# components in pixel*/
- short cmpSize; /*# bits per component*/
- OSType pixelFormat; /*fourCharCode representation*/
- CTabHandle pmTable; /*color map for this pixMap*/
- PixMapExtHandle pmExt; /*Handle to pixMap extension*/
-};
-typedef struct PixMap PixMap;
-typedef PixMap * PixMapPtr;
-typedef PixMapPtr * PixMapHandle;
-
-
-struct __attribute__((__packed__)) BitMap {
- Ptr baseAddr;
- short rowBytes;
- Rect bounds;
-};
-typedef struct BitMap BitMap;
-typedef BitMap * BitMapPtr;
-typedef BitMapPtr * BitMapHandle;
-typedef struct OpaqueRgnHandle* RgnHandle;
+struct __attribute__((__packed__)) Rect {
+ short top;
+ short left;
+ short bottom;
+ short right;
+};
+typedef struct Rect Rect;
+typedef Rect * RectPtr;
+
+struct __attribute__((__packed__)) RGBColor {
+ unsigned short red; /*magnitude of red component*/
+ unsigned short green; /*magnitude of green component*/
+ unsigned short blue; /*magnitude of blue component*/
+};
+typedef struct RGBColor RGBColor;
+typedef RGBColor * RGBColorPtr;
+typedef RGBColorPtr * RGBColorHdl;
+
+struct __attribute__((__packed__)) ColorSpec {
+ short value; /*index or other value*/
+ RGBColor rgb; /*true color*/
+};
+typedef struct ColorSpec ColorSpec;
+typedef ColorSpec * ColorSpecPtr;
+typedef ColorSpec CSpecArray[1];
+
+struct __attribute__((__packed__)) ColorTable {
+ long ctSeed; /*unique identifier for table*/
+ short ctFlags; /*high bit: 0 = PixMap; 1 = device*/
+ short ctSize; /*number of entries in CTTable*/
+ CSpecArray ctTable; /*array [0..0] of ColorSpec*/
+};
+typedef struct ColorTable ColorTable;
+typedef ColorTable * CTabPtr;
+typedef CTabPtr * CTabHandle;
+
+struct __attribute__((__packed__)) MatrixRecord {
+ Fixed matrix[3][3];
+};
+typedef struct MatrixRecord MatrixRecord;
+typedef MatrixRecord * MatrixRecordPtr;
+
+typedef long ImageSequence;
+typedef OSType CodecType;
+typedef unsigned short CodecFlags;
+typedef unsigned long CodecQ;
+
+struct __attribute__((__packed__)) ImageDescription {
+ long idSize; /* total size of ImageDescription including extra data ( CLUTs and other per sequence data ) */
+ CodecType cType; /* what kind of codec compressed this data */
+ long resvd1; /* reserved for Apple use */
+ short resvd2; /* reserved for Apple use */
+ short dataRefIndex; /* set to zero */
+ short version; /* which version is this data */
+ short revisionLevel; /* what version of that codec did this */
+ long vendor; /* whose codec compressed this data */
+ CodecQ temporalQuality; /* what was the temporal quality factor */
+ CodecQ spatialQuality; /* what was the spatial quality factor */
+ short width; /* how many pixels wide is this data */
+ short height; /* how many pixels high is this data */
+ Fixed hRes; /* horizontal resolution */
+ Fixed vRes; /* vertical resolution */
+ long dataSize; /* if known, the size of data for this image descriptor */
+ short frameCount; /* number of frames this description applies to */
+ Str31 name; /* name of codec ( in case not installed ) */
+ short depth; /* what depth is this data (1-32) or ( 33-40 grayscale ) */
+ short clutID; /* clut id or if 0 clut follows or -1 if no clut */
+};
+typedef struct ImageDescription ImageDescription;
+typedef ImageDescription * ImageDescriptionPtr;
+typedef ImageDescriptionPtr * ImageDescriptionHandle;
+
+/* values for PixMap.pixelFormat*/
+enum {
+ k16LE555PixelFormat = FOUR_CHAR_CODE('L','5','5','5'), /* 16 bit LE rgb 555 (PC)*/
+ k16LE5551PixelFormat = FOUR_CHAR_CODE('5','5','5','1'), /* 16 bit LE rgb 5551*/
+ k16BE565PixelFormat = FOUR_CHAR_CODE('B','5','6','5'), /* 16 bit BE rgb 565*/
+ k16LE565PixelFormat = FOUR_CHAR_CODE('L','5','6','5'), /* 16 bit LE rgb 565*/
+ k24BGRPixelFormat = FOUR_CHAR_CODE('2','4','B','G'), /* 24 bit bgr */
+ k32BGRAPixelFormat = FOUR_CHAR_CODE('B','G','R','A'), /* 32 bit bgra (Matrox)*/
+ k32ABGRPixelFormat = FOUR_CHAR_CODE('A','B','G','R'), /* 32 bit abgr */
+ k32RGBAPixelFormat = FOUR_CHAR_CODE('R','G','B','A'), /* 32 bit rgba */
+ kYUVSPixelFormat = FOUR_CHAR_CODE('y','u','v','s'), /* YUV 4:2:2 byte ordering 16-unsigned = 'YUY2'*/
+ kYUVUPixelFormat = FOUR_CHAR_CODE('y','u','v','u'), /* YUV 4:2:2 byte ordering 16-signed*/
+ kYVU9PixelFormat = FOUR_CHAR_CODE('Y','V','U','9'), /* YVU9 Planar 9*/
+ kYUV411PixelFormat = FOUR_CHAR_CODE('Y','4','1','1'), /* YUV 4:1:1 Interleaved 16*/
+ kYVYU422PixelFormat = FOUR_CHAR_CODE('Y','V','Y','U'), /* YVYU 4:2:2 byte ordering 16*/
+ kUYVY422PixelFormat = FOUR_CHAR_CODE('U','Y','V','Y'), /* UYVY 4:2:2 byte ordering 16*/
+ kYUV211PixelFormat = FOUR_CHAR_CODE('Y','2','1','1'), /* YUV 2:1:1 Packed 8*/
+ k2vuyPixelFormat = FOUR_CHAR_CODE('2','v','u','y') /* UYVY 4:2:2 byte ordering 16*/
+};
+
+struct __attribute__((__packed__)) PixMapExtension {
+ long extSize; /*size of struct, duh!*/
+ unsigned long pmBits; /*pixmap attributes bitfield*/
+ void * pmGD; /*this is a GDHandle*/
+ long pmSeed;
+ Fixed gammaLevel; /*pixmap gammalevel*/
+ Fixed requestedGammaLevel;
+ unsigned long reserved2;
+ long longRowBytes; /*used when rowBytes > 16382*/
+ unsigned long signature;
+ Handle baseAddrHandle;
+};
+typedef struct PixMapExtension PixMapExtension;
+
+typedef PixMapExtension * PixMapExtPtr;
+typedef PixMapExtPtr * PixMapExtHandle;
+
+
+struct __attribute__((__packed__)) PixMap {
+ Ptr baseAddr; /*pointer to pixels*/
+ short rowBytes; /*offset to next line*/
+ Rect bounds; /*encloses bitmap*/
+ short pmVersion; /*pixMap version number*/
+ short packType; /*defines packing format*/
+ long packSize; /*length of pixel data*/
+ Fixed hRes; /*horiz. resolution (ppi)*/
+ Fixed vRes; /*vert. resolution (ppi)*/
+ short pixelType; /*defines pixel type*/
+ short pixelSize; /*# bits in pixel*/
+ short cmpCount; /*# components in pixel*/
+ short cmpSize; /*# bits per component*/
+ OSType pixelFormat; /*fourCharCode representation*/
+ CTabHandle pmTable; /*color map for this pixMap*/
+ PixMapExtHandle pmExt; /*Handle to pixMap extension*/
+};
+typedef struct PixMap PixMap;
+typedef PixMap * PixMapPtr;
+typedef PixMapPtr * PixMapHandle;
+
+
+struct __attribute__((__packed__)) BitMap {
+ Ptr baseAddr;
+ short rowBytes;
+ Rect bounds;
+};
+typedef struct BitMap BitMap;
+typedef BitMap * BitMapPtr;
+typedef BitMapPtr * BitMapHandle;
+typedef struct OpaqueRgnHandle* RgnHandle;
struct Pattern {
UInt8 pat[8];
@@ -319,7 +320,7 @@ enum {
// callbacks:
-typedef void* ImageCodecDrawBandCompleteUPP;
+typedef void* ImageCodecDrawBandCompleteUPP;
typedef long long ICMProgressProcRecord;
typedef long long ICMCompletionProcRecord;
typedef long long ICMDataProcRecord;
@@ -328,277 +329,319 @@ typedef void* CDSequenceDataSourcePtr;
typedef void* ICMFrameTimeInfoPtr;
// graphics port
-typedef struct OpaqueGrafPtr* GrafPtr;
-typedef GrafPtr CGrafPtr;
-
-
-/* codec capabilities flags */
-enum {
- codecCanScale = 1L << 0, // 1
- codecCanMask = 1L << 1, // 2
- codecCanMatte = 1L << 2, // 4
- codecCanTransform = 1L << 3, // 8
- codecCanTransferMode = 1L << 4, // 10
- codecCanCopyPrev = 1L << 5, // 20
- codecCanSpool = 1L << 6, // 40
- codecCanClipVertical = 1L << 7, // 80
- codecCanClipRectangular = 1L << 8, // 100
- codecCanRemapColor = 1L << 9, // 200
- codecCanFastDither = 1L << 10, // 400
- codecCanSrcExtract = 1L << 11, // 800
- codecCanCopyPrevComp = 1L << 12, // 1000
- codecCanAsync = 1L << 13, // 2000
- codecCanMakeMask = 1L << 14, // 4000
- codecCanShift = 1L << 15, // 8000
- codecCanAsyncWhen = 1L << 16, // 10000
- codecCanShieldCursor = 1L << 17, // 20000
- codecCanManagePrevBuffer = 1L << 18, // 40000
- codecHasVolatileBuffer = 1L << 19, // 80000 /* codec requires redraw after window movement */
- codecWantsRegionMask = 1L << 20, // 100000
- codecImageBufferIsOnScreen = 1L << 21, // 200000 /* old def of codec using overlay surface, = ( codecIsDirectToScreenOnly | codecUsesOverlaySurface | codecImageBufferIsOverlaySurface | codecSrcMustBeImageBuffer ) */
- codecWantsDestinationPixels = 1L << 22, // 400000
- codecWantsSpecialScaling = 1L << 23, // 800000
- codecHandlesInputs = 1L << 24, // 1000000
- codecCanDoIndirectSurface = 1L << 25, /* codec can handle indirect surface (GDI) */
- codecIsSequenceSensitive = 1L << 26,
- codecRequiresOffscreen = 1L << 27,
- codecRequiresMaskBits = 1L << 28,
- codecCanRemapResolution = 1L << 29,
- codecIsDirectToScreenOnly = 1L << 30, /* codec can only decompress data to the screen */
- codecCanLockSurface = 1L << 31 /* codec can lock destination surface, icm doesn't lock for you */
-};
-
-/* codec capabilities flags2 */
-enum {
- codecUsesOverlaySurface = 1L << 0, /* codec uses overlay surface */
- codecImageBufferIsOverlaySurface = 1L << 1, /* codec image buffer is overlay surface, the bits in the buffer are on the screen */
- codecSrcMustBeImageBuffer = 1L << 2, /* codec can only source data from an image buffer */
- codecImageBufferIsInAGPMemory = 1L << 4, /* codec image buffer is in AGP space, byte writes are OK */
- codecImageBufferIsInPCIMemory = 1L << 5 /* codec image buffer is across a PCI bus; byte writes are bad */
-};
-
-/* codec condition flags */
+typedef struct OpaqueGrafPtr* GrafPtr;
+typedef GrafPtr CGrafPtr;
+
+
+/* codec capabilities flags */
+enum {
+ codecCanScale = 1L << 0,
+ // 1
+ codecCanMask = 1L << 1,
+ // 2
+ codecCanMatte = 1L << 2,
+ // 4
+ codecCanTransform = 1L << 3,
+ // 8
+ codecCanTransferMode = 1L << 4,
+ // 10
+ codecCanCopyPrev = 1L << 5,
+ // 20
+ codecCanSpool = 1L << 6,
+ // 40
+ codecCanClipVertical = 1L << 7,
+ // 80
+ codecCanClipRectangular = 1L << 8,
+ // 100
+ codecCanRemapColor = 1L << 9,
+ // 200
+ codecCanFastDither = 1L << 10,
+ // 400
+ codecCanSrcExtract = 1L << 11,
+ // 800
+ codecCanCopyPrevComp = 1L << 12,
+ // 1000
+ codecCanAsync = 1L << 13,
+ // 2000
+ codecCanMakeMask = 1L << 14,
+ // 4000
+ codecCanShift = 1L << 15,
+ // 8000
+ codecCanAsyncWhen = 1L << 16,
+ // 10000
+ codecCanShieldCursor = 1L << 17,
+ // 20000
+ codecCanManagePrevBuffer = 1L << 18,
+ // 40000
+ codecHasVolatileBuffer = 1L << 19, // 80000 /* codec requires redraw after window movement */
+ codecWantsRegionMask = 1L << 20,
+ // 100000
+ codecImageBufferIsOnScreen = 1L << 21, // 200000 /* old def of codec using overlay surface, = ( codecIsDirectToScreenOnly | codecUsesOverlaySurface | codecImageBufferIsOverlaySurface | codecSrcMustBeImageBuffer ) */
+ codecWantsDestinationPixels = 1L << 22,
+ // 400000
+ codecWantsSpecialScaling = 1L << 23,
+ // 800000
+ codecHandlesInputs = 1L << 24,
+ // 1000000
+ codecCanDoIndirectSurface = 1L << 25, /* codec can handle indirect surface (GDI) */
+ codecIsSequenceSensitive = 1L << 26,
+ codecRequiresOffscreen = 1L << 27,
+ codecRequiresMaskBits = 1L << 28,
+ codecCanRemapResolution = 1L << 29,
+ codecIsDirectToScreenOnly = 1L << 30, /* codec can only decompress data to the screen */
+ codecCanLockSurface = 1L << 31 /* codec can lock destination surface, icm doesn't lock for you */
+};
+
+/* codec capabilities flags2 */
+enum {
+ codecUsesOverlaySurface = 1L << 0, /* codec uses overlay surface */
+ codecImageBufferIsOverlaySurface = 1L << 1, /* codec image buffer is overlay surface, the bits in the buffer are on the screen */
+ codecSrcMustBeImageBuffer = 1L << 2, /* codec can only source data from an image buffer */
+ codecImageBufferIsInAGPMemory = 1L << 4, /* codec image buffer is in AGP space, byte writes are OK */
+ codecImageBufferIsInPCIMemory = 1L << 5 /* codec image buffer is across a PCI bus; byte writes are bad */
+};
+
+/* codec condition flags */
// FFD = 13 = 8+4+1
-enum {
- codecConditionFirstBand = 1L << 0, // 1
- codecConditionLastBand = 1L << 1, // 2
- codecConditionFirstFrame = 1L << 2, // 4
- codecConditionNewDepth = 1L << 3, // 8
- codecConditionNewTransform = 1L << 4, // 10
- codecConditionNewSrcRect = 1L << 5, // 20
- codecConditionNewMask = 1L << 6, // 40
- codecConditionNewMatte = 1L << 7, // 80
- codecConditionNewTransferMode = 1L << 8, // 100
- codecConditionNewClut = 1L << 9, // 200
- codecConditionNewAccuracy = 1L << 10, // 400
- codecConditionNewDestination = 1L << 11, // 800
- codecConditionFirstScreen = 1L << 12, // 1000
- codecConditionDoCursor = 1L << 13, // 2000
- codecConditionCatchUpDiff = 1L << 14, // 4000
- codecConditionMaskMayBeChanged = 1L << 15, // 8000
- codecConditionToBuffer = 1L << 16, // 10000
- codecConditionCodecChangedMask = 1L << 31 // 20000
-};
-
-
-
-struct __attribute__((__packed__)) CodecCapabilities {
- long flags;
- short wantedPixelSize;
- short extendWidth;
- short extendHeight;
- short bandMin;
- short bandInc;
- short pad;
- unsigned long time;
- long flags2; /* field new in QuickTime 4.0 */
-};
-typedef struct CodecCapabilities CodecCapabilities;
-
-struct __attribute__((__packed__)) CodecDecompressParams {
- ImageSequence sequenceID; /* predecompress,banddecompress */
- ImageDescriptionHandle imageDescription; /* predecompress,banddecompress */
- Ptr data;
- long bufferSize;
-
- long frameNumber;
- long startLine;
- long stopLine;
- long conditionFlags;
-
- CodecFlags callerFlags; // short
- CodecCapabilities * capabilities; /* predecompress,banddecompress */
- ICMProgressProcRecord progressProcRecord;
- ICMCompletionProcRecord completionProcRecord;
-
- ICMDataProcRecord dataProcRecord;
- CGrafPtr port; /* predecompress,banddecompress */
- PixMap dstPixMap; /* predecompress,banddecompress */
- BitMapPtr maskBits;
- PixMapPtr mattePixMap;
- Rect srcRect; /* predecompress,banddecompress */
- MatrixRecord * matrix; /* predecompress,banddecompress */
- CodecQ accuracy; /* predecompress,banddecompress */
- short transferMode; /* predecompress,banddecompress */
- ICMFrameTimePtr frameTime; /* banddecompress */
- long reserved[1];
-
- /* The following fields only exist for QuickTime 2.0 and greater */
- SInt8 matrixFlags; /* high bit set if 2x resize */
- SInt8 matrixType;
- Rect dstRect; /* only valid for simple transforms */
-
- /* The following fields only exist for QuickTime 2.1 and greater */
- UInt16 majorSourceChangeSeed;
- UInt16 minorSourceChangeSeed;
- CDSequenceDataSourcePtr sourceData;
-
- RgnHandle maskRegion;
-
- /* The following fields only exist for QuickTime 2.5 and greater */
- OSType ** wantedDestinationPixelTypes; /* Handle to 0-terminated list of OSTypes */
-
- long screenFloodMethod;
- long screenFloodValue;
- short preferredOffscreenPixelSize;
-
- /* The following fields only exist for QuickTime 3.0 and greater */
- ICMFrameTimeInfoPtr syncFrameTime; /* banddecompress */
- Boolean needUpdateOnTimeChange; /* banddecompress */
- Boolean enableBlackLining;
- Boolean needUpdateOnSourceChange; /* band decompress */
- Boolean pad;
-
- long unused;
-
- CGrafPtr finalDestinationPort;
-
- long requestedBufferWidth; /* must set codecWantsSpecialScaling to indicate this field is valid*/
- long requestedBufferHeight; /* must set codecWantsSpecialScaling to indicate this field is valid*/
-
- /* The following fields only exist for QuickTime 4.0 and greater */
- Rect displayableAreaOfRequestedBuffer; /* set in predecompress*/
- Boolean requestedSingleField;
- Boolean needUpdateOnNextIdle;
- Boolean pad2[2];
- Fixed bufferGammaLevel;
-
- /* The following fields only exist for QuickTime 5.0 and greater */
- UInt32 taskWeight; /* preferred weight for MP tasks implementing this operation*/
- OSType taskName; /* preferred name (type) for MP tasks implementing this operation*/
-};
-typedef struct CodecDecompressParams CodecDecompressParams;
-
-
-
-struct __attribute__((__packed__)) ImageSubCodecDecompressCapabilities {
- long recordSize; /* sizeof(ImageSubCodecDecompressCapabilities)*/
- long decompressRecordSize; /* size of your codec's decompress record*/
- Boolean canAsync; /* default true*/
- UInt8 pad0;
-
- /* The following fields only exist for QuickTime 4.0 and greater */
- UInt16 suggestedQueueSize;
- Boolean canProvideTrigger;
-
- /* The following fields only exist for QuickTime 5.0 and greater */
- Boolean subCodecFlushesScreen; /* only used on Mac OS X*/
- Boolean subCodecCallsDrawBandComplete;
- UInt8 pad2[1];
-
- /* The following fields only exist for QuickTime 5.1 and greater */
- Boolean isChildCodec; /* set by base codec before calling Initialize*/
- UInt8 pad3[3];
-};
-typedef struct ImageSubCodecDecompressCapabilities ImageSubCodecDecompressCapabilities;
-
-
-struct __attribute__((__packed__)) ImageSubCodecDecompressRecord {
- Ptr baseAddr;
- long rowBytes;
- Ptr codecData;
- ICMProgressProcRecord progressProcRecord;
- ICMDataProcRecord dataProcRecord;
- void * userDecompressRecord; /* pointer to codec-specific per-band data*/
- UInt8 frameType;
- Boolean inhibitMP; /* set this in BeginBand to tell the base decompressor not to call DrawBand from an MP task for this frame. (Only has any effect for MP-capable subcodecs. New in QuickTime 5.0.)*/
- UInt8 pad[2];
- long priv[2];
-
- /* The following fields only exist for QuickTime 5.0 and greater */
- ImageCodecDrawBandCompleteUPP drawBandCompleteUPP; /* only used if subcodec set subCodecCallsDrawBandComplete; if drawBandCompleteUPP is non-nil, codec must call it when a frame is finished, but may return from DrawBand before the frame is finished. */
- void * drawBandCompleteRefCon; /* Note: do not call drawBandCompleteUPP directly from a hardware interrupt; instead, use DTInstall to run a function at deferred task time, and call drawBandCompleteUPP from that. */
-};
-typedef struct ImageSubCodecDecompressRecord ImageSubCodecDecompressRecord;
-
-
-/* These are the bits that are set in the Component flags, and also in the codecInfo struct. */
-enum {
- codecInfoDoes1 = (1L << 0), /* codec can work with 1-bit pixels */
- codecInfoDoes2 = (1L << 1), /* codec can work with 2-bit pixels */
- codecInfoDoes4 = (1L << 2), /* codec can work with 4-bit pixels */
- codecInfoDoes8 = (1L << 3), /* codec can work with 8-bit pixels */
- codecInfoDoes16 = (1L << 4), /* codec can work with 16-bit pixels */
- codecInfoDoes32 = (1L << 5), /* codec can work with 32-bit pixels */
- codecInfoDoesDither = (1L << 6), /* codec can do ditherMode */
- codecInfoDoesStretch = (1L << 7), /* codec can stretch to arbitrary sizes */
- codecInfoDoesShrink = (1L << 8), /* codec can shrink to arbitrary sizes */
- codecInfoDoesMask = (1L << 9), /* codec can mask to clipping regions */
- codecInfoDoesTemporal = (1L << 10), /* codec can handle temporal redundancy */
- codecInfoDoesDouble = (1L << 11), /* codec can stretch to double size exactly */
- codecInfoDoesQuad = (1L << 12), /* codec can stretch to quadruple size exactly */
- codecInfoDoesHalf = (1L << 13), /* codec can shrink to half size */
- codecInfoDoesQuarter = (1L << 14), /* codec can shrink to quarter size */
- codecInfoDoesRotate = (1L << 15), /* codec can rotate on decompress */
- codecInfoDoesHorizFlip = (1L << 16), /* codec can flip horizontally on decompress */
- codecInfoDoesVertFlip = (1L << 17), /* codec can flip vertically on decompress */
- codecInfoHasEffectParameterList = (1L << 18), /* codec implements get effects parameter list call, once was codecInfoDoesSkew */
- codecInfoDoesBlend = (1L << 19), /* codec can blend on decompress */
- codecInfoDoesWarp = (1L << 20), /* codec can warp arbitrarily on decompress */
- codecInfoDoesRecompress = (1L << 21), /* codec can recompress image without accumulating errors */
- codecInfoDoesSpool = (1L << 22), /* codec can spool image data */
- codecInfoDoesRateConstrain = (1L << 23) /* codec can data rate constrain */
-};
-
-
-enum {
- codecInfoDepth1 = (1L << 0), /* compressed data at 1 bpp depth available */
- codecInfoDepth2 = (1L << 1), /* compressed data at 2 bpp depth available */
- codecInfoDepth4 = (1L << 2), /* compressed data at 4 bpp depth available */
- codecInfoDepth8 = (1L << 3), /* compressed data at 8 bpp depth available */
- codecInfoDepth16 = (1L << 4), /* compressed data at 16 bpp depth available */
- codecInfoDepth32 = (1L << 5), /* compressed data at 32 bpp depth available */
- codecInfoDepth24 = (1L << 6), /* compressed data at 24 bpp depth available */
- codecInfoDepth33 = (1L << 7), /* compressed data at 1 bpp monochrome depth available */
- codecInfoDepth34 = (1L << 8), /* compressed data at 2 bpp grayscale depth available */
- codecInfoDepth36 = (1L << 9), /* compressed data at 4 bpp grayscale depth available */
- codecInfoDepth40 = (1L << 10), /* compressed data at 8 bpp grayscale depth available */
- codecInfoStoresClut = (1L << 11), /* compressed data can have custom cluts */
- codecInfoDoesLossless = (1L << 12), /* compressed data can be stored in lossless format */
- codecInfoSequenceSensitive = (1L << 13) /* compressed data is sensitive to out of sequence decoding */
-};
-
-struct __attribute__((__packed__)) CodecInfo {
- Str31 typeName; /* name of the codec type i.e.: 'Apple Image Compression' */
- short version; /* version of the codec data that this codec knows about */
- short revisionLevel; /* revision level of this codec i.e: 0x00010001 (1.0.1) */
- long vendor; /* Maker of this codec i.e: 'appl' */
- long decompressFlags; /* codecInfo flags for decompression capabilities */
- long compressFlags; /* codecInfo flags for compression capabilities */
- long formatFlags; /* codecInfo flags for compression format details */
- UInt8 compressionAccuracy; /* measure (1-255) of accuracy of this codec for compress (0 if unknown) */
- UInt8 decompressionAccuracy; /* measure (1-255) of accuracy of this codec for decompress (0 if unknown) */
- unsigned short compressionSpeed; /* ( millisecs for compressing 320x240 on base mac II) (0 if unknown) */
- unsigned short decompressionSpeed; /* ( millisecs for decompressing 320x240 on mac II)(0 if unknown) */
- UInt8 compressionLevel; /* measure (1-255) of compression level of this codec (0 if unknown) */
- UInt8 resvd; /* pad */
- short minimumHeight; /* minimum height of image (block size) */
- short minimumWidth; /* minimum width of image (block size) */
- short decompressPipelineLatency; /* in milliseconds ( for asynchronous codecs ) */
- short compressPipelineLatency; /* in milliseconds ( for asynchronous codecs ) */
- long privateData;
-};
-typedef struct CodecInfo CodecInfo;
+enum {
+ codecConditionFirstBand = 1L << 0,
+ // 1
+ codecConditionLastBand = 1L << 1,
+ // 2
+ codecConditionFirstFrame = 1L << 2,
+ // 4
+ codecConditionNewDepth = 1L << 3,
+ // 8
+ codecConditionNewTransform = 1L << 4,
+ // 10
+ codecConditionNewSrcRect = 1L << 5,
+ // 20
+ codecConditionNewMask = 1L << 6,
+ // 40
+ codecConditionNewMatte = 1L << 7,
+ // 80
+ codecConditionNewTransferMode = 1L << 8,
+ // 100
+ codecConditionNewClut = 1L << 9,
+ // 200
+ codecConditionNewAccuracy = 1L << 10,
+ // 400
+ codecConditionNewDestination = 1L << 11,
+ // 800
+ codecConditionFirstScreen = 1L << 12,
+ // 1000
+ codecConditionDoCursor = 1L << 13,
+ // 2000
+ codecConditionCatchUpDiff = 1L << 14,
+ // 4000
+ codecConditionMaskMayBeChanged = 1L << 15,
+ // 8000
+ codecConditionToBuffer = 1L << 16,
+ // 10000
+ codecConditionCodecChangedMask = 1L << 31
+ // 20000
+};
+
+
+
+struct __attribute__((__packed__)) CodecCapabilities {
+ long flags;
+ short wantedPixelSize;
+ short extendWidth;
+ short extendHeight;
+ short bandMin;
+ short bandInc;
+ short pad;
+ unsigned long time;
+ long flags2; /* field new in QuickTime 4.0 */
+};
+typedef struct CodecCapabilities CodecCapabilities;
+
+struct __attribute__((__packed__)) CodecDecompressParams {
+ ImageSequence sequenceID; /* predecompress,banddecompress */
+ ImageDescriptionHandle imageDescription; /* predecompress,banddecompress */
+ Ptr data;
+ long bufferSize;
+
+ long frameNumber;
+ long startLine;
+ long stopLine;
+ long conditionFlags;
+
+ CodecFlags callerFlags;
+ // short
+ CodecCapabilities * capabilities; /* predecompress,banddecompress */
+ ICMProgressProcRecord progressProcRecord;
+ ICMCompletionProcRecord completionProcRecord;
+
+ ICMDataProcRecord dataProcRecord;
+ CGrafPtr port; /* predecompress,banddecompress */
+ PixMap dstPixMap; /* predecompress,banddecompress */
+ BitMapPtr maskBits;
+ PixMapPtr mattePixMap;
+ Rect srcRect; /* predecompress,banddecompress */
+ MatrixRecord * matrix; /* predecompress,banddecompress */
+ CodecQ accuracy; /* predecompress,banddecompress */
+ short transferMode; /* predecompress,banddecompress */
+ ICMFrameTimePtr frameTime; /* banddecompress */
+ long reserved[1];
+
+ /* The following fields only exist for QuickTime 2.0 and greater */
+ SInt8 matrixFlags; /* high bit set if 2x resize */
+ SInt8 matrixType;
+ Rect dstRect; /* only valid for simple transforms */
+
+ /* The following fields only exist for QuickTime 2.1 and greater */
+ UInt16 majorSourceChangeSeed;
+ UInt16 minorSourceChangeSeed;
+ CDSequenceDataSourcePtr sourceData;
+
+ RgnHandle maskRegion;
+
+ /* The following fields only exist for QuickTime 2.5 and greater */
+ OSType ** wantedDestinationPixelTypes; /* Handle to 0-terminated list of OSTypes */
+
+ long screenFloodMethod;
+ long screenFloodValue;
+ short preferredOffscreenPixelSize;
+
+ /* The following fields only exist for QuickTime 3.0 and greater */
+ ICMFrameTimeInfoPtr syncFrameTime; /* banddecompress */
+ Boolean needUpdateOnTimeChange; /* banddecompress */
+ Boolean enableBlackLining;
+ Boolean needUpdateOnSourceChange; /* band decompress */
+ Boolean pad;
+
+ long unused;
+
+ CGrafPtr finalDestinationPort;
+
+ long requestedBufferWidth; /* must set codecWantsSpecialScaling to indicate this field is valid*/
+ long requestedBufferHeight; /* must set codecWantsSpecialScaling to indicate this field is valid*/
+
+ /* The following fields only exist for QuickTime 4.0 and greater */
+ Rect displayableAreaOfRequestedBuffer; /* set in predecompress*/
+ Boolean requestedSingleField;
+ Boolean needUpdateOnNextIdle;
+ Boolean pad2[2];
+ Fixed bufferGammaLevel;
+
+ /* The following fields only exist for QuickTime 5.0 and greater */
+ UInt32 taskWeight; /* preferred weight for MP tasks implementing this operation*/
+ OSType taskName; /* preferred name (type) for MP tasks implementing this operation*/
+};
+typedef struct CodecDecompressParams CodecDecompressParams;
+
+
+
+struct __attribute__((__packed__)) ImageSubCodecDecompressCapabilities {
+ long recordSize; /* sizeof(ImageSubCodecDecompressCapabilities)*/
+ long decompressRecordSize; /* size of your codec's decompress record*/
+ Boolean canAsync; /* default true*/
+ UInt8 pad0;
+
+ /* The following fields only exist for QuickTime 4.0 and greater */
+ UInt16 suggestedQueueSize;
+ Boolean canProvideTrigger;
+
+ /* The following fields only exist for QuickTime 5.0 and greater */
+ Boolean subCodecFlushesScreen; /* only used on Mac OS X*/
+ Boolean subCodecCallsDrawBandComplete;
+ UInt8 pad2[1];
+
+ /* The following fields only exist for QuickTime 5.1 and greater */
+ Boolean isChildCodec; /* set by base codec before calling Initialize*/
+ UInt8 pad3[3];
+};
+typedef struct ImageSubCodecDecompressCapabilities ImageSubCodecDecompressCapabilities;
+
+
+struct __attribute__((__packed__)) ImageSubCodecDecompressRecord {
+ Ptr baseAddr;
+ long rowBytes;
+ Ptr codecData;
+ ICMProgressProcRecord progressProcRecord;
+ ICMDataProcRecord dataProcRecord;
+ void * userDecompressRecord; /* pointer to codec-specific per-band data*/
+ UInt8 frameType;
+ Boolean inhibitMP; /* set this in BeginBand to tell the base decompressor not to call DrawBand from an MP task for this frame. (Only has any effect for MP-capable subcodecs. New in QuickTime 5.0.)*/
+ UInt8 pad[2];
+ long priv[2];
+
+ /* The following fields only exist for QuickTime 5.0 and greater */
+ ImageCodecDrawBandCompleteUPP drawBandCompleteUPP; /* only used if subcodec set subCodecCallsDrawBandComplete; if drawBandCompleteUPP is non-nil, codec must call it when a frame is finished, but may return from DrawBand before the frame is finished. */
+ void * drawBandCompleteRefCon; /* Note: do not call drawBandCompleteUPP directly from a hardware interrupt; instead, use DTInstall to run a function at deferred task time, and call drawBandCompleteUPP from that. */
+};
+typedef struct ImageSubCodecDecompressRecord ImageSubCodecDecompressRecord;
+
+
+/* These are the bits that are set in the Component flags, and also in the codecInfo struct. */
+enum {
+ codecInfoDoes1 = (1L << 0), /* codec can work with 1-bit pixels */
+ codecInfoDoes2 = (1L << 1), /* codec can work with 2-bit pixels */
+ codecInfoDoes4 = (1L << 2), /* codec can work with 4-bit pixels */
+ codecInfoDoes8 = (1L << 3), /* codec can work with 8-bit pixels */
+ codecInfoDoes16 = (1L << 4), /* codec can work with 16-bit pixels */
+ codecInfoDoes32 = (1L << 5), /* codec can work with 32-bit pixels */
+ codecInfoDoesDither = (1L << 6), /* codec can do ditherMode */
+ codecInfoDoesStretch = (1L << 7), /* codec can stretch to arbitrary sizes */
+ codecInfoDoesShrink = (1L << 8), /* codec can shrink to arbitrary sizes */
+ codecInfoDoesMask = (1L << 9), /* codec can mask to clipping regions */
+ codecInfoDoesTemporal = (1L << 10), /* codec can handle temporal redundancy */
+ codecInfoDoesDouble = (1L << 11), /* codec can stretch to double size exactly */
+ codecInfoDoesQuad = (1L << 12), /* codec can stretch to quadruple size exactly */
+ codecInfoDoesHalf = (1L << 13), /* codec can shrink to half size */
+ codecInfoDoesQuarter = (1L << 14), /* codec can shrink to quarter size */
+ codecInfoDoesRotate = (1L << 15), /* codec can rotate on decompress */
+ codecInfoDoesHorizFlip = (1L << 16), /* codec can flip horizontally on decompress */
+ codecInfoDoesVertFlip = (1L << 17), /* codec can flip vertically on decompress */
+ codecInfoHasEffectParameterList = (1L << 18), /* codec implements get effects parameter list call, once was codecInfoDoesSkew */
+ codecInfoDoesBlend = (1L << 19), /* codec can blend on decompress */
+ codecInfoDoesWarp = (1L << 20), /* codec can warp arbitrarily on decompress */
+ codecInfoDoesRecompress = (1L << 21), /* codec can recompress image without accumulating errors */
+ codecInfoDoesSpool = (1L << 22), /* codec can spool image data */
+ codecInfoDoesRateConstrain = (1L << 23) /* codec can data rate constrain */
+};
+
+
+enum {
+ codecInfoDepth1 = (1L << 0), /* compressed data at 1 bpp depth available */
+ codecInfoDepth2 = (1L << 1), /* compressed data at 2 bpp depth available */
+ codecInfoDepth4 = (1L << 2), /* compressed data at 4 bpp depth available */
+ codecInfoDepth8 = (1L << 3), /* compressed data at 8 bpp depth available */
+ codecInfoDepth16 = (1L << 4), /* compressed data at 16 bpp depth available */
+ codecInfoDepth32 = (1L << 5), /* compressed data at 32 bpp depth available */
+ codecInfoDepth24 = (1L << 6), /* compressed data at 24 bpp depth available */
+ codecInfoDepth33 = (1L << 7), /* compressed data at 1 bpp monochrome depth available */
+ codecInfoDepth34 = (1L << 8), /* compressed data at 2 bpp grayscale depth available */
+ codecInfoDepth36 = (1L << 9), /* compressed data at 4 bpp grayscale depth available */
+ codecInfoDepth40 = (1L << 10), /* compressed data at 8 bpp grayscale depth available */
+ codecInfoStoresClut = (1L << 11), /* compressed data can have custom cluts */
+ codecInfoDoesLossless = (1L << 12), /* compressed data can be stored in lossless format */
+ codecInfoSequenceSensitive = (1L << 13) /* compressed data is sensitive to out of sequence decoding */
+};
+
+struct __attribute__((__packed__)) CodecInfo {
+ Str31 typeName; /* name of the codec type i.e.: 'Apple Image Compression' */
+ short version; /* version of the codec data that this codec knows about */
+ short revisionLevel; /* revision level of this codec i.e: 0x00010001 (1.0.1) */
+ long vendor; /* Maker of this codec i.e: 'appl' */
+ long decompressFlags; /* codecInfo flags for decompression capabilities */
+ long compressFlags; /* codecInfo flags for compression capabilities */
+ long formatFlags; /* codecInfo flags for compression format details */
+ UInt8 compressionAccuracy; /* measure (1-255) of accuracy of this codec for compress (0 if unknown) */
+ UInt8 decompressionAccuracy; /* measure (1-255) of accuracy of this codec for decompress (0 if unknown) */
+ unsigned short compressionSpeed; /* ( millisecs for compressing 320x240 on base mac II) (0 if unknown) */
+ unsigned short decompressionSpeed; /* ( millisecs for decompressing 320x240 on mac II)(0 if unknown) */
+ UInt8 compressionLevel; /* measure (1-255) of compression level of this codec (0 if unknown) */
+ UInt8 resvd; /* pad */
+ short minimumHeight; /* minimum height of image (block size) */
+ short minimumWidth; /* minimum width of image (block size) */
+ short decompressPipelineLatency; /* in milliseconds ( for asynchronous codecs ) */
+ short compressPipelineLatency; /* in milliseconds ( for asynchronous codecs ) */
+ long privateData;
+};
+typedef struct CodecInfo CodecInfo;
static inline void dump_ImageDescription(void* xxx){
ImageDescription* id=(ImageDescription*)xxx;
@@ -613,14 +656,14 @@ static inline void dump_ImageDescription(void* xxx){
printf("=============== ImageDescription at %p ==================\n",xxx);
- printf("idSize=0x%X fourcc=0x%08X\n",id->idSize,id->cType);
- printf("ver=%d rev=%d vendor=0x%08X\n",id->version,id->revisionLevel,id->vendor);
- printf("tempQ=%d spatQ=%d dim: %d x %d dpi: %d x %d depth: %d\n",
+ printf("idSize=0x%lX fourcc=0x%08X\n",id->idSize,id->cType);
+ printf("ver=%d rev=%d vendor=0x%08lX\n",id->version,id->revisionLevel,id->vendor);
+ printf("tempQ=%ld spatQ=%ld dim: %d x %d dpi: %ld x %ld depth: %d\n",
id->temporalQuality,id->spatialQuality,
id->width, id->height,
id->hRes, id->vRes,
id->depth);
- printf("dataSize=%d frameCount=%d clutID=%d\n",id->dataSize, id->frameCount, id->clutID);
+ printf("dataSize=%ld frameCount=%d clutID=%d\n",id->dataSize, id->frameCount, id->clutID);
printf("name='%.*s'\n",((char*)(&id->name))[0],((char*)(&id->name))+1);
x=((char*)(&id->clutID))+2;
if(id->idSize>sizeof(ImageDescription)){
@@ -636,7 +679,7 @@ static inline void dump_Rect(char* title,Rect *r){
}
static inline void dump_MatrixRecord(char* title, MatrixRecord *m){
- printf("%s: [%d %d %d][%d %d %d][%d %d %d]\n",title,
+ printf("%s: [%ld %ld %ld][%ld %ld %ld][%ld %ld %ld]\n",title,
m->matrix[0][0],m->matrix[0][1],m->matrix[0][2],
m->matrix[1][0],m->matrix[1][1],m->matrix[1][2],
m->matrix[2][0],m->matrix[2][1],m->matrix[2][2]);
@@ -647,9 +690,9 @@ static inline void dump_PixMap(void* xxx){
printf("=============== PixMap at %p ==================\n",xxx);
printf("base=%p stride=%d\n",p->baseAddr, p->rowBytes);
dump_Rect("bounds",&p->bounds);
- printf("pmVersion=0x%X packType=0x%X\n packSize=0x%X\n",
+ printf("pmVersion=0x%X packType=0x%X\n packSize=0x%lX\n",
p->pmVersion,p->packType, p->packSize);
- printf("hRes=0x%X vRes=0x%X pixelType=0x%X pixelSize=0x%X\n",
+ printf("hRes=0x%lX vRes=0x%lX pixelType=0x%X pixelSize=0x%X\n",
p->hRes,p->vRes,p->pixelType,p->pixelSize);
printf("cmpCount=0x%X cmpSize=0x%X pixelFormat=0x%X\n",
p->cmpCount,p->cmpSize,p->pixelFormat);
@@ -661,11 +704,11 @@ static inline void dump_CodecCapabilities(void* xxx){
CodecCapabilities* cc=xxx;
if(!xxx) return;
printf("=============== CodecCapabilities at %p =================\n",xxx);
- printf("flags=0x%X flags2=0x%X\n",cc->flags,cc->flags2);
+ printf("flags=0x%lX flags2=0x%lX\n",cc->flags,cc->flags2);
printf("wantedPixelSize=%d extendWidth=%d extendHeight=%d band=%d+%d\n",
cc->wantedPixelSize,cc->extendWidth,cc->extendHeight,
cc->bandMin,cc->bandInc);
- printf("pad=0x%X time=0x%X\n",cc->pad,cc->time);
+ printf("pad=0x%X time=0x%lX\n",cc->pad,cc->time);
printf("=========================================================\n");
}
@@ -675,7 +718,7 @@ static inline void dump_CodecDecompressParams(void* xxx){
int i;
if(!xxx) return;
printf("=============== CodecDecompressParams at %p ==================\n",xxx);
- printf("sequenceID=%d\n",cd->sequenceID);
+ printf("sequenceID=%ld\n",cd->sequenceID);
idh=cd->imageDescription;
if(idh && idh[0]) dump_ImageDescription(idh[0]);
@@ -685,8 +728,8 @@ static inline void dump_CodecDecompressParams(void* xxx){
}
printf("\n");
- printf("data=%p size=%d\n",cd->data,cd->bufferSize);
- printf("frameno=%d lines: %d .. %d condflags=0x%X callerflags=0x%X\n",
+ printf("data=%p size=%ld\n",cd->data,cd->bufferSize);
+ printf("frameno=%ld lines: %ld .. %ld condflags=0x%lX callerflags=0x%X\n",
cd->frameNumber, cd->startLine, cd->stopLine, cd->conditionFlags,cd->callerFlags);
// printf("maskBits=%p mattePixMap=%p\n",
// cd->maskBits,cd->mattePixMap);
@@ -700,15 +743,15 @@ static inline void dump_CodecDecompressParams(void* xxx){
printf("dstrect: %d;%d - %d;%d\n",cd->dstRect.top,cd->dstRect.left,cd->dstRect.bottom,cd->dstRect.right);
printf("wantedDestinationPixelTypes=%p\n",cd->wantedDestinationPixelTypes);
if(cd->wantedDestinationPixelTypes){
- unsigned int* p=cd->wantedDestinationPixelTypes;
+ OSType **p=cd->wantedDestinationPixelTypes;
while(p[0]){
- printf(" 0x%08X %.4s\n",p[0],&p[0]);
+ printf(" 0x%p %d\n",p[0],*p[0]);
++p;
}
}
- printf("screenFloodMethod=%d value=%d preferredOffscreenPixelSize=%d\n",
+ printf("screenFloodMethod=%ld value=%ld preferredOffscreenPixelSize=%d\n",
cd->screenFloodMethod, cd->screenFloodValue, cd->preferredOffscreenPixelSize);
- printf("callbacks: progress=%p compl=%p data=%p ftime=%p srcdata=%p sync=%p\n",
+ printf("callbacks: progress=0x%08llX compl=0x%08llX data=0x%08llX ftime=%p srcdata=%p sync=%p\n",
cd->progressProcRecord, cd->completionProcRecord,
cd->dataProcRecord, cd->frameTime, cd->sourceData, cd->syncFrameTime);
// printf("\n");
diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c
index 7889c8d3f..072e9f87c 100644
--- a/src/libw32dll/w32codec.c
+++ b/src/libw32dll/w32codec.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: w32codec.c,v 1.135 2003/12/14 22:13:24 siggi Exp $
+ * $Id: w32codec.c,v 1.136 2003/12/24 16:55:36 mroi Exp $
*
* routines for using w32 codecs
* DirectShow support by Miguel Freitas (Nov/2001)
@@ -132,7 +132,6 @@ static GUID wmav_clsid =
static pthread_mutex_t win32_codec_mutex;
static pthread_once_t once_control = PTHREAD_ONCE_INIT;
static char* win32_codec_name;
-extern char* win32_def_path;
#define VIDEOBUFSIZE 128*1024
diff --git a/src/libw32dll/wine/afl.c b/src/libw32dll/wine/afl.c
index 6f3fb0eb6..8ea29ed6d 100644
--- a/src/libw32dll/wine/afl.c
+++ b/src/libw32dll/wine/afl.c
@@ -36,6 +36,7 @@
#include "msacmdrv.h"
#include "wineacm.h"
#include "ext.h"
+#include "debugtools.h"
#include "driver.h"
diff --git a/src/libw32dll/wine/debugtools.h b/src/libw32dll/wine/debugtools.h
index 79107ff1d..ef86580af 100644
--- a/src/libw32dll/wine/debugtools.h
+++ b/src/libw32dll/wine/debugtools.h
@@ -12,8 +12,13 @@
struct _GUID;
-#define TRACE __vprintf
-#define dbg_printf __vprintf
+#ifdef LOG
+# define TRACE __vprintf
+# define dbg_printf __vprintf
+#else
+# define TRACE(...)
+# define dbg_printf(...)
+#endif
/* Internal definitions (do not use these directly) */
@@ -66,11 +71,13 @@ static inline LPCSTR debugstr_a( LPCSTR s ) { return debugstr_an( s, 80 ); }
static inline LPCSTR debugstr_w( LPCWSTR s ) { return debugstr_wn( s, 80 ); }
#endif
+#if 0 /* dbg_printf already defined as a macro */
#ifdef __GNUC__
extern int dbg_printf(const char *format, ...) __attribute__((format (printf,1,2)));
#else
extern int dbg_printf(const char *format, ...);
#endif
+#endif
#define TRACE_(X) TRACE
#define WARN_(X) TRACE
diff --git a/src/libw32dll/wine/driver.c b/src/libw32dll/wine/driver.c
index 7720a4975..923622aaa 100644
--- a/src/libw32dll/wine/driver.c
+++ b/src/libw32dll/wine/driver.c
@@ -15,8 +15,8 @@
#include "vfw.h"
#include "registry.h"
#include "ldt_keeper.h"
-
-extern char* win32_def_path;
+#include "ext.h"
+#include "debugtools.h"
#if 1
@@ -52,6 +52,7 @@ extern char* win32_def_path;
"pop %%ebx\n\t"::)
#endif
+#if 0
static int needs_free=0;
void SetCodecPath(const char* path)
{
@@ -66,6 +67,7 @@ void SetCodecPath(const char* path)
strcpy(win32_def_path, path);
needs_free=1;
}
+#endif
static DWORD dwDrvID = 0;
@@ -130,7 +132,7 @@ void DrvClose(HDRVR hDriver)
HDRVR DrvOpen(LPARAM lParam2)
{
NPDRVR hDriver;
- int i;
+// int i;
char unknown[0x124];
const char* filename = (const char*) ((ICOPEN*) lParam2)->pV1Reserved;
diff --git a/src/libw32dll/wine/elfdll.c b/src/libw32dll/wine/elfdll.c
index ecee7a28c..d060c5810 100644
--- a/src/libw32dll/wine/elfdll.c
+++ b/src/libw32dll/wine/elfdll.c
@@ -33,7 +33,6 @@ extern void dump_exports(HMODULE hModule);
/*---------------- END HACKS ---------------*/
//char *extra_ld_library_path = "/usr/lib/win32";
-extern char* win32_def_path;
struct elfdll_image
{
diff --git a/src/libw32dll/wine/ext.c b/src/libw32dll/wine/ext.c
index 7cdfdedc8..dee474d39 100644
--- a/src/libw32dll/wine/ext.c
+++ b/src/libw32dll/wine/ext.c
@@ -74,7 +74,7 @@ HANDLE WINAPI GetProcessHeap(void)
LPVOID WINAPI HeapAlloc(HANDLE heap, DWORD flags, DWORD size)
{
- static int i = 5;
+ //static int i = 5;
void* m = (flags & 0x8) ? calloc(size, 1) : malloc(size);
//printf("HeapAlloc %p %d (%d)\n", m, size, flags);
//if (--i == 0)
@@ -326,7 +326,7 @@ int FILE_munmap( LPVOID start, DWORD size_high, DWORD size_low )
printf("offsets larger than 4Gb not supported\n");
return munmap( start, size_low );
}
-static int mapping_size=0;
+//static int mapping_size=0;
struct file_mapping_s;
typedef struct file_mapping_s
diff --git a/src/libw32dll/wine/module.c b/src/libw32dll/wine/module.c
index 559f93201..4393f7f00 100644
--- a/src/libw32dll/wine/module.c
+++ b/src/libw32dll/wine/module.c
@@ -130,8 +130,10 @@ static WIN_BOOL MODULE_InitDll( WINE_MODREF *wm, DWORD type, LPVOID lpReserved )
{
WIN_BOOL retv = TRUE;
+#ifdef LOG
static LPCSTR typeName[] = { "PROCESS_DETACH", "PROCESS_ATTACH",
"THREAD_ATTACH", "THREAD_DETACH" };
+#endif
assert( wm );
@@ -353,7 +355,6 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags)
{
WINE_MODREF *wm = 0;
char* listpath[] = { "", "", "/usr/lib/win32", "/usr/local/lib/win32", 0 };
- extern char* win32_def_path;
char path[512];
char checked[2000];
int i = -1;
@@ -428,10 +429,10 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags)
// dispatch_addr = GetProcAddress(wm->module, "theQuickTimeDispatcher", TRUE);
dispatch_addr = PE_FindExportedFunction(wm, "theQuickTimeDispatcher", TRUE);
- if (dispatch_addr == 0x62924c30)
+ if (dispatch_addr == (void *)0x62924c30)
{
printf ("wine/module: QuickTime5 DLLs found\n");
- ptr = 0x62b75ca4; // dispatch_ptr
+ ptr = (void **)0x62b75ca4; // dispatch_ptr
for (i=0;i<5;i++) ((char*)0x6299e842)[i]=0x90; // make_new_region ?
for (i=0;i<28;i++) ((char*)0x6299e86d)[i]=0x90; // call__call_CreateCompatibleDC ?
for (i=0;i<5;i++) ((char*)0x6299e898)[i]=0x90; // jmp_to_call_loadbitmap ?
@@ -456,10 +457,10 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags)
((char *)0x6288e0ae)[0] = 0xc3; // font/dc remover
for (i=0;i<24;i++) ((char*)0x6287a1ad)[i]=0x90; // destroy window
#endif
- } else if (dispatch_addr == 0x6693b330)
+ } else if (dispatch_addr == (void *)0x6693b330)
{
printf ("wine/module: QuickTime6 DLLs found\n");
- ptr = 0x66bb9524; // dispatcher_ptr
+ ptr = (void **)0x66bb9524; // dispatcher_ptr
for (i=0;i<5;i++) ((char *)0x66a730cc)[i]=0x90; // make_new_region
for (i=0;i<28;i++) ((char *)0x66a730f7)[i]=0x90; // call__call_CreateCompatibleDC
for (i=0;i<5;i++) ((char *)0x66a73122)[i]=0x90; // jmp_to_call_loadbitmap
@@ -467,9 +468,9 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags)
for (i=0;i<96;i++) ((char *)0x66aac852)[i]=0x90; // disable threads
} else
{
- printf ("wine/module: Unsupported QuickTime version (0x%x)\n",
+ printf ("wine/module: Unsupported QuickTime version (%p)\n",
dispatch_addr);
- return NULL;
+ return 0;
}
printf ("wine/module: QuickTime.qts patched!!! old entry=%p\n",ptr[0]);
@@ -559,13 +560,13 @@ FARPROC WINAPI GetProcAddress( HMODULE hModule, LPCSTR function )
#ifdef DEBUG_QTX_API
-struct ComponentParameters {
- unsigned char flags; /* call modifiers: sync/async, deferred, immed, etc */
- unsigned char paramSize; /* size in bytes of actual parameters passed to this call */
- short what; /* routine selector, negative for Component management calls */
- long params[1]; /* actual parameters for the indicated routine */
-};
-typedef struct ComponentParameters ComponentParameters;
+struct ComponentParameters {
+ unsigned char flags; /* call modifiers: sync/async, deferred, immed, etc */
+ unsigned char paramSize; /* size in bytes of actual parameters passed to this call */
+ short what; /* routine selector, negative for Component management calls */
+ long params[1]; /* actual parameters for the indicated routine */
+};
+typedef struct ComponentParameters ComponentParameters;
static char* component_func(int what){
switch(what){
@@ -722,15 +723,15 @@ static int report_func(void *stack_base, int stack_size, reg386_t *reg, u_int32_
// memory management:
case 0x150011: //NewPtrClear
case 0x150012: //NewPtrSysClear
- reg->eax=malloc(((u_int32_t *)stack_base)[1]);
- memset(reg->eax,0,((u_int32_t *)stack_base)[1]);
+ reg->eax=(u_int32_t)malloc(((u_int32_t *)stack_base)[1]);
+ memset((void *)reg->eax,0,((u_int32_t *)stack_base)[1]);
#ifdef DEBUG_QTX_API
printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax);
#endif
return 1;
case 0x15000F: //NewPtr
case 0x150010: //NewPtrSys
- reg->eax=malloc(((u_int32_t *)stack_base)[1]);
+ reg->eax=(u_int32_t)malloc(((u_int32_t *)stack_base)[1]);
#ifdef DEBUG_QTX_API
printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax);
#endif
@@ -739,7 +740,7 @@ static int report_func(void *stack_base, int stack_size, reg386_t *reg, u_int32_
if(((u_int32_t *)stack_base)[1]>=0x60000000)
printf("WARNING! Invalid Ptr handle!\n");
else
- free(((u_int32_t *)stack_base)[1]);
+ free((void *)(((u_int32_t *)stack_base)[1]));
reg->eax=0;
#ifdef DEBUG_QTX_API
printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax);
@@ -840,8 +841,10 @@ static int report_func(void *stack_base, int stack_size, reg386_t *reg, u_int32_
static int report_func_ret(void *stack_base, int stack_size, reg386_t *reg, u_int32_t *flags)
{
+#ifdef DEBUG_QTX_API
int i;
short err;
+#endif
// restore ret addr:
--ret_i;
@@ -953,8 +956,8 @@ FARPROC MODULE_GetProcAddress(
fprintf(stderr,"theQuickTimeDispatcher caught -> %p\n",retproc);
report_entry = report_func;
report_ret = report_func_ret;
- wrapper_target=retproc;
- retproc=wrapper;
+ wrapper_target=(void *)retproc;
+ retproc=(void *)wrapper;
}
}
diff --git a/src/libw32dll/wine/pe_image.c b/src/libw32dll/wine/pe_image.c
index c824933ad..92017f906 100644
--- a/src/libw32dll/wine/pe_image.c
+++ b/src/libw32dll/wine/pe_image.c
@@ -645,8 +645,8 @@ HMODULE PE_LoadImage( int handle, LPCSTR filename, WORD *version )
DWORD end = (pe_sec->SizeOfRawData & ~(page_size-1)) + page_size;
if (end > pe_sec->Misc.VirtualSize) end = pe_sec->Misc.VirtualSize;
TRACE("clearing %p - %p\n",
- RVA(pe_sec->VirtualAddress) + pe_sec->SizeOfRawData,
- RVA(pe_sec->VirtualAddress) + end );
+ (char *)RVA(pe_sec->VirtualAddress) + pe_sec->SizeOfRawData,
+ (char *)RVA(pe_sec->VirtualAddress) + end );
memset( (char*)RVA(pe_sec->VirtualAddress) + pe_sec->SizeOfRawData, 0,
end - pe_sec->SizeOfRawData );
}
@@ -950,6 +950,7 @@ WIN_BOOL PE_InitDLL( WINE_MODREF *wm, DWORD type, LPVOID lpReserved )
return retv;
}
+#if 0
static LPVOID
_fixup_address(PIMAGE_OPTIONAL_HEADER opt,int delta,LPVOID addr) {
if ( ((DWORD)addr>opt->ImageBase) &&
@@ -961,3 +962,4 @@ _fixup_address(PIMAGE_OPTIONAL_HEADER opt,int delta,LPVOID addr) {
return addr;
}
+#endif
diff --git a/src/libw32dll/wine/registry.c b/src/libw32dll/wine/registry.c
index 7be9eab54..0f91499b3 100644
--- a/src/libw32dll/wine/registry.c
+++ b/src/libw32dll/wine/registry.c
@@ -15,6 +15,8 @@
#include "ext.h"
#include "registry.h"
+#include "debugtools.h"
+
#ifdef XINE_MAJOR
#include "xineutils.h"
#endif
@@ -180,6 +182,7 @@ void free_registry(void)
}
+#if 0
static reg_handle_t* find_handle_by_name(const char* name)
{
reg_handle_t* t;
@@ -192,6 +195,7 @@ static reg_handle_t* find_handle_by_name(const char* name)
}
return 0;
}
+#endif
static struct reg_value* find_value_by_name(const char* name)
{
int i;
diff --git a/src/libw32dll/wine/resource.c b/src/libw32dll/wine/resource.c
index 16e015e1f..4faa71e6e 100644
--- a/src/libw32dll/wine/resource.c
+++ b/src/libw32dll/wine/resource.c
@@ -101,13 +101,13 @@ static HRSRC RES_FindResource( HMODULE hModule, LPCSTR type,
static DWORD RES_SizeofResource( HMODULE hModule, HRSRC hRsrc)
{
DWORD size = 0;
- HRSRC hRsrc32;
-
+// HRSRC hRsrc32;
+//
// HMODULE16 hMod16 = MapHModuleLS( hModule );
// NE_MODULE *pModule = NE_GetPtr( hMod16 );
// WINE_MODREF *wm = pModule && pModule->module32?
// MODULE32_LookupHMODULE( pModule->module32 ) : NULL;
- WINE_MODREF *wm = MODULE32_LookupHMODULE( hModule );
+// WINE_MODREF *wm = MODULE32_LookupHMODULE( hModule );
if ( !hModule || !hRsrc ) return 0;
@@ -130,7 +130,7 @@ static HFILE RES_AccessResource( HMODULE hModule, HRSRC hRsrc )
{
HFILE hFile = HFILE_ERROR;
- WINE_MODREF *wm = MODULE32_LookupHMODULE( hModule );
+// WINE_MODREF *wm = MODULE32_LookupHMODULE( hModule );
if ( !hModule || !hRsrc ) return HFILE_ERROR;
@@ -147,7 +147,7 @@ static HFILE RES_AccessResource( HMODULE hModule, HRSRC hRsrc )
static HGLOBAL RES_LoadResource( HMODULE hModule, HRSRC hRsrc)
{
HGLOBAL hMem = 0;
- HRSRC hRsrc32;
+// HRSRC hRsrc32;
WINE_MODREF *wm = MODULE32_LookupHMODULE( hModule );
diff --git a/src/libw32dll/wine/vfw.h b/src/libw32dll/wine/vfw.h
index d2917601e..f2e9364e2 100644
--- a/src/libw32dll/wine/vfw.h
+++ b/src/libw32dll/wine/vfw.h
@@ -430,6 +430,7 @@ long VFWAPIV ICUniversalEx(HIC hic,int command,LPBITMAPINFOHEADER lpbiFormat,LPB
#define ICDRAW_FULLSCREEN 0x00000002L /* draw to full screen */
#define ICDRAW_HDC 0x00000004L /* draw to a HDC/HWND */
+long VFWAPI VideoForWindowsVersion(void);
WIN_BOOL VFWAPI ICInfo(long fccType, long fccHandler, ICINFO * lpicinfo);
LRESULT VFWAPI ICGetInfo(HIC hic,ICINFO *picinfo, long cb);
diff --git a/src/libw32dll/wine/win32.c b/src/libw32dll/wine/win32.c
index 64a36867a..6bf7341c0 100644
--- a/src/libw32dll/wine/win32.c
+++ b/src/libw32dll/wine/win32.c
@@ -238,11 +238,16 @@ typedef struct th_list_t{
// have to be cleared by GARBAGE COLLECTOR
-static unsigned char* heap=NULL;
-static int heap_counter=0;
static tls_t* g_tls=NULL;
static th_list* list=NULL;
+#undef MEMORY_DEBUG
+
+#ifdef MEMORY_DEBUG
+
+static unsigned char* heap=NULL;
+static int heap_counter=0;
+
static void test_heap(void)
{
int offset=0;
@@ -263,10 +268,6 @@ static void test_heap(void)
printf("Free heap corruption at address %d\n", offset);
}
}
-#undef MEMORY_DEBUG
-
-#ifdef MEMORY_DEBUG
-
static void* my_mreq(int size, int to_zero)
{
static int test=0;
@@ -819,7 +820,7 @@ static void* WINAPI expWaitForMultipleObjects(int count, const void** objects,
{
int i;
void *object;
- int ret;
+ void *ret;
dbgprintf("WaitForMultipleObjects(%d, 0x%x, %d, duration %d) =>\n",
count, objects, WaitAll, duration);
@@ -845,7 +846,7 @@ static void WINAPI expExitThread(int retcode)
static HANDLE WINAPI expCreateMutexA(void *pSecAttr,
char bInitialOwner, const char *name)
{
- HANDLE mlist = expCreateEventA(pSecAttr, 0, 0, name);
+ HANDLE mlist = (HANDLE)expCreateEventA(pSecAttr, 0, 0, name);
if (name)
dbgprintf("CreateMutexA(0x%x, %d, '%s') => 0x%x\n",
@@ -858,7 +859,7 @@ static HANDLE WINAPI expCreateMutexA(void *pSecAttr,
waits for ever, else it works ;) */
return mlist;
#else
- return NULL;
+ return 0;
#endif
}
@@ -892,7 +893,9 @@ static void WINAPI expGetSystemInfo(SYSTEM_INFO* si)
/* FIXME: better values for the two entries below... */
static int cache = 0;
static SYSTEM_INFO cachedsi;
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__svr4__)
unsigned int regs[4];
+#endif
dbgprintf("GetSystemInfo(%p) =>\n", si);
if (cache) {
@@ -2529,7 +2532,7 @@ static int WINAPI expGetMonitorInfoA(void *mon, LPMONITORINFO lpmi)
if (lpmi->cbSize == sizeof(MONITORINFOEX))
{
- LPMONITORINFOEX lpmiex = lpmi;
+ LPMONITORINFOEX lpmiex = (LPMONITORINFOEX)lpmi;
dbgprintf("MONITORINFOEX!\n");
strncpy(lpmiex->szDevice, "Monitor1", CCHDEVICENAME);
}
@@ -3570,9 +3573,9 @@ static DWORD WINAPI expGetFullPathNameA
#endif
#else
if (strrchr(lpFileName, '\\'))
- *lpFilePart = strrchr(lpFileName, '\\');
+ *lpFilePart = (int)strrchr(lpFileName, '\\');
else
- *lpFilePart = lpFileName;
+ *lpFilePart = (int)lpFileName;
#endif
strcpy(lpBuffer, lpFileName);
// strncpy(lpBuffer, lpFileName, rindex(lpFileName, '\\')-lpFileName);
@@ -4170,14 +4173,14 @@ static double expcos(double x)
return cos(x);
}
+#else
+
/* doens't work */
static long exp_ftol_wrong(double x)
{
return (long) x;
}
-#else
-
static void explog10(void)
{
__asm__ __volatile__
@@ -4413,7 +4416,7 @@ static void WINAPI expGlobalMemoryStatus(
lpmem->dwAvailPageFile = 16*1024*1024;
}
expGetSystemInfo(&si);
- lpmem->dwTotalVirtual = si.lpMaximumApplicationAddress-si.lpMinimumApplicationAddress;
+ lpmem->dwTotalVirtual = (char *)si.lpMaximumApplicationAddress-(char *)si.lpMinimumApplicationAddress;
/* FIXME: we should track down all the already allocated VM pages and substract them, for now arbitrarily remove 64KB so that it matches NT */
lpmem->dwAvailVirtual = lpmem->dwTotalVirtual-64*1024;
memcpy(&cached_memstatus,lpmem,sizeof(MEMORYSTATUS));
@@ -4444,7 +4447,7 @@ static WIN_BOOL WINAPI expSetThreadPriority(
static void WINAPI expExitProcess( DWORD status )
{
- printf("EXIT - code %d\n",status);
+ printf("EXIT - code %d\n",(int)status);
exit(status);
}
@@ -4503,7 +4506,7 @@ static int expSysStringByteLen(void *str)
static int expDirectDrawCreate(void)
{
dbgprintf("DirectDrawCreate(...) => NULL\n");
- return NULL;
+ return 0;
}
#if 1
@@ -4529,8 +4532,8 @@ static HPALETTE WINAPI expCreatePalette(CONST LOGPALETTE *lpgpl)
dbgprintf("CreatePalette(%x) => NULL\n", lpgpl);
i = sizeof(LOGPALETTE)+((lpgpl->palNumEntries-1)*sizeof(PALETTEENTRY));
- test = malloc(i);
- memcpy(test, lpgpl, i);
+ test = (HPALETTE)malloc(i);
+ memcpy((void *)test, lpgpl, i);
return test;
}
@@ -5133,9 +5136,9 @@ void* LookupExternal(const char* library, int ordinal)
hand, func);
return func;
}
-#endif
no_dll:
+#endif
if(pos>150)return 0;
sprintf(export_names[pos], "%s:%d", library, ordinal);
return add_stub();
diff --git a/src/libw32dll/wine/win32.h b/src/libw32dll/wine/win32.h
index 79d6877e3..23590b320 100644
--- a/src/libw32dll/wine/win32.h
+++ b/src/libw32dll/wine/win32.h
@@ -7,6 +7,8 @@
#include "winbase.h"
#include "com.h"
+extern char* win32_def_path;
+
extern void my_garbagecollection(void);
typedef struct {