[MPlayer-dev-eng] [PATCH] a couple of warning fixes in qt decoder and encoder

Dominik Mierzejewski dominik at rangers.eu.org
Mon Dec 16 15:55:54 CET 2002


Nothing major this time, just a few trivial fixes to silence some warnings.

-- 
MPlayer RPMs maintainer: http://www.piorunek.pl/~dominik/linux/pkgs/mplayer/
"The Universe doesn't give you any points for doing things that are easy."
        -- Sheridan to Garibaldi in Babylon 5:"The Geometry of Shadows"
-------------- next part --------------
--- MPlayer-20021216/libmpcodecs/vd_qtvideo.c.warn	Mon Dec 16 15:22:10 2002
+++ MPlayer-20021216/libmpcodecs/vd_qtvideo.c	Mon Dec 16 15:48:14 2002
@@ -173,14 +173,14 @@
 	printf("Cannot find requested component\n");
 	return(0);
     }
-    printf("Found it! ID = 0x%X\n",prev);
+    printf("Found it! ID = %p\n",prev);
 
     ci=OpenComponent(prev);
     printf("ci=%p\n",ci);
 
     memset(&icap,0,sizeof(icap));
     cres=ImageCodecInitialize(ci,&icap);
-    printf("ImageCodecInitialize->%p  size=%d (%d)\n",cres,icap.recordSize,icap.decompressRecordSize);
+    printf("ImageCodecInitialize->%#lx  size=%d (%d)\n",cres,icap.recordSize,icap.decompressRecordSize);
     
     memset(&cinfo,0,sizeof(cinfo));
     cres=ImageCodecGetCodecInfo(ci,&cinfo);
@@ -216,7 +216,7 @@
 //    result = FindCodec ('SVQ1',anyCodec,&compressor,&decompressor );                 
 //    printf("FindCodec SVQ1 returned:%i compressor: 0x%X decompressor: 0x%X\n",result,compressor,decompressor);
 
-    sh->context = kYUVSPixelFormat;
+    sh->context = (void *)kYUVSPixelFormat;
 #if 1
     {
 	int imgfmt = sh->codec->outfmt[sh->outfmtidx];
@@ -255,8 +255,8 @@
 	    printf("Unknown requested csp\n");
 	    return(0);    
     }
-    printf("imgfmt: %s qt_imgfmt: %.4s\n", vo_format_name(imgfmt), &qt_imgfmt);
-    sh->context = qt_imgfmt;
+    printf("imgfmt: %s qt_imgfmt: %.4s\n", vo_format_name(imgfmt), (char *)&qt_imgfmt);
+    sh->context = (void *)qt_imgfmt;
     if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,imgfmt)) return 0;
     }
 #else
@@ -291,7 +291,7 @@
     result = QTNewGWorldFromPtr(
         &OutBufferGWorld,  
 //        kYUVSPixelFormat, //pixel format of new GWorld == YUY2
-	sh->context,
+	(OSType)sh->context,
         &OutBufferRect,   //we should benchmark if yvu9 is faster for svq3, too
         0, 
         0, 
@@ -339,7 +339,7 @@
     if(decpar.wantedDestinationPixelTypes)
     { OSType *p=*(decpar.wantedDestinationPixelTypes);
       if(p) while(*p){
-          printf("supported csp: 0x%08X %.4s\n",*p,p);
+          printf("supported csp: 0x%08X %.4s\n",*p,(char *)p);
 	  ++p;
       }
     }
--- MPlayer-20021216/libmpcodecs/ve_qtvideo.c.warn	Mon Dec 16 02:49:39 2002
+++ MPlayer-20021216/libmpcodecs/ve_qtvideo.c	Mon Dec 16 15:48:49 2002
@@ -16,6 +16,10 @@
 #include "../loader/qtx/qtxsdk/components.h"
 #include "wine/windef.h"
 
+#ifdef USE_WIN32DLL
+#include "ldt_keeper.h"
+#endif
+
 #include "codec-cfg.h"
 #include "stream.h"
 #include "demuxer.h"
@@ -148,7 +152,7 @@
 	printf("Cannot find requested component\n");
 	return(0);
     }
-    printf("Found it! ID = 0x%X\n",compressor);
+    printf("Found it! ID = %p\n",compressor);
 
 //	cres= FindCodec (fourcc,anyCodec,&compressor,&decompressor );
 //	printf("FindCodec returned:%i compressor: 0x%X decompressor: 0x%X\n",cres&0xFFFF,compressor,decompressor);
@@ -174,7 +178,7 @@
     long framesizemax;
     UInt8 similarity;
     long compressedsize;
-    int in_format=kYUVSPixelFormat;
+    OSType in_format=kYUVSPixelFormat;
     int width = mpi->width;
     int height = mpi->height;
     int stride = width*2;
@@ -291,18 +295,18 @@
 
     Setup_LDT_Keeper();
     handler = LoadLibraryA("qtmlClient.dll");
-    InitializeQTML = GetProcAddress(handler, "InitializeQTML");
-    GetGWorldPixMap = GetProcAddress(handler, "GetGWorldPixMap");
-    QTNewGWorldFromPtr = GetProcAddress(handler, "QTNewGWorldFromPtr");
-    NewHandleClear = GetProcAddress(handler, "NewHandleClear");
-    FindCodec = GetProcAddress(handler,"FindCodec");
-    CompressSequenceBegin = GetProcAddress(handler,"CompressSequenceBegin");
-    CompressSequenceFrame = GetProcAddress(handler,"CompressSequenceFrame");
-    GetMaxCompressionSize = GetProcAddress(handler,"GetMaxCompressionSize");
-    CDSequenceEnd = GetProcAddress(handler,"CDSequenceEnd");
-    FindNextComponent = GetProcAddress(handler, "FindNextComponent");
-    CountComponents = GetProcAddress(handler, "CountComponents");
-    GetComponentInfo = GetProcAddress(handler, "GetComponentInfo");
+    InitializeQTML = (OSErr (*)(long))GetProcAddress(handler, "InitializeQTML");
+    GetGWorldPixMap = (PixMapHandle (*)(GWorldPtr))GetProcAddress(handler, "GetGWorldPixMap");
+    QTNewGWorldFromPtr = (OSErr(*)(GWorldPtr *,OSType,const Rect *,CTabHandle,void*,GWorldFlags,void *,long))GetProcAddress(handler, "QTNewGWorldFromPtr");
+    NewHandleClear = (OSErr(*)(Size))GetProcAddress(handler, "NewHandleClear");
+    FindCodec = (OSErr (*)(CodecType,CodecComponent,CompressorComponent *,DecompressorComponent *))GetProcAddress(handler,"FindCodec");
+    CompressSequenceBegin = (OSErr(*)(ImageSequence *,PixMapHandle,PixMapHandle,const Rect *,const Rect *,short,CodecType,CompressorComponent,CodecQ,CodecQ,long,CTabHandle,CodecFlags,ImageDescriptionHandle))GetProcAddress(handler,"CompressSequenceBegin");
+    CompressSequenceFrame = (OSErr(*)(ImageSequence,PixMapHandle,const Rect *,CodecFlags,Ptr,long *,UInt8 *,ICMCompletionProcRecordPtr))GetProcAddress(handler,"CompressSequenceFrame");
+    GetMaxCompressionSize = (OSErr(*)(PixMapHandle,const Rect *,short,CodecQ,CodecType,CompressorComponent,long *))GetProcAddress(handler,"GetMaxCompressionSize");
+    CDSequenceEnd = (OSErr (*)(ImageSequence))GetProcAddress(handler,"CDSequenceEnd");
+    FindNextComponent = (Component (*)(Component,ComponentDescription*))GetProcAddress(handler, "FindNextComponent");
+    CountComponents = (long (*)(ComponentDescription*))GetProcAddress(handler, "CountComponents");
+    GetComponentInfo = (OSErr (*)(Component,ComponentDescription*,Handle,Handle,Handle))GetProcAddress(handler, "GetComponentInfo");
     if(!InitializeQTML  ||!CompressSequenceBegin){
         printf("invalid qt DLL!\n");
         return 0;


More information about the MPlayer-dev-eng mailing list