Punctuation. ;)
[mplayer/glamo.git] / loader / qtx / list.c
blob86d71df2670acb63f82096c9d69a3bddf943bf98
1 /* to compile:
2 edit ../win32.c, change the #if 0 to 1 at line 1326 to enabel quicktime fix!
3 (cd ..;make distclean;make)
4 gcc -o list list.c ../libloader.a -lpthread -ldl -lm -ggdb ../../cpudetect.o
5 */
7 #include <stdio.h>
8 #include <stdlib.h>
9 #include <string.h>
11 #include "qtxsdk/components.h"
12 #include "qtxsdk/select.h"
14 char* get_path(char* x){ return strdup(x);}
15 void* LoadLibraryA(char* name);
16 void* GetProcAddress(void* handle,char* func);
18 #define __stdcall __attribute__((__stdcall__))
19 #define __cdecl __attribute__((__cdecl__))
20 #define APIENTRY
22 typedef long OSErr;
24 int main(int argc, char *argv[]){
25 void *handler;
26 ComponentDescription desc;
27 Component (*FindNextComponent)(Component prev,ComponentDescription* desc);
28 long (*CountComponents)(ComponentDescription* desc);
29 OSErr (*InitializeQTML)(long flags);
30 OSErr (*EnterMovies)(void);
31 OSErr ret;
33 Setup_LDT_Keeper();
34 handler = LoadLibraryA("/usr/lib/win32/qtmlClient.dll");
35 printf("***************************\n");
36 InitializeQTML = 0x1000c870; //GetProcAddress(handler, "InitializeQTML");
37 EnterMovies = 0x10003ac0; //GetProcAddress(handler, "EnterMovies");
38 FindNextComponent = 0x1000d5f0; //GetProcAddress(handler, "FindNextComponent");
39 CountComponents = 0x1000d5d0; //GetProcAddress(handler, "CountComponents");
40 // = GetProcAddress(handler, "");
41 printf("handler: %p, funcs: %p %p %p, %p\n", handler, InitializeQTML, EnterMovies, FindNextComponent,CountComponents);
43 ret=InitializeQTML(0);
44 printf("InitializeQTML->%d\n",ret);
45 ret=EnterMovies();
46 printf("EnterMovies->%d\n",ret);
48 memset(&desc,0,sizeof(desc));
49 desc.componentType= (((unsigned char)'S')<<24)|
50 (((unsigned char)'V')<<16)|
51 (((unsigned char)'Q')<<8)|
52 (((unsigned char)'5'));
53 desc.componentSubType=0;
54 desc.componentManufacturer=0;
55 desc.componentFlags=0;
56 desc.componentFlagsMask=0;
58 printf("Count = %d\n",CountComponents(&desc));
60 Restore_LDT_Keeper();
61 exit(0);