Mercurial > mplayer.hg
annotate loader/qtx/list.c @ 8334:0c9a596abe39
found in an AVI file and reported working by Damian Gatabria
author | rfelker |
---|---|
date | Tue, 03 Dec 2002 02:02:58 +0000 |
parents | fc9ccaa09006 |
children | e60c8c7399d2 |
rev | line source |
---|---|
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
1 /* to compile: |
5210 | 2 edit ../win32.c, change the #if 0 to 1 at line 1326 to enabel quicktime fix! |
3 (cd ..;make distclean;make) | |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
4 gcc -o list list.c ../libloader.a -lpthread -ldl -lm -ggdb ../../cpudetect.o |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
5 */ |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
6 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
7 #include <stdio.h> |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
8 #include <stdlib.h> |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
9 #include <string.h> |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
10 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
11 #include "qtxsdk/components.h" |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
12 #include "qtxsdk/select.h" |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
13 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
14 char* get_path(char* x){ return strdup(x);} |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
15 void* LoadLibraryA(char* name); |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
16 void* GetProcAddress(void* handle,char* func); |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
17 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
18 #define __stdcall __attribute__((__stdcall__)) |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
19 #define __cdecl __attribute__((__cdecl__)) |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
20 #define APIENTRY |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
21 |
5211 | 22 typedef long OSErr; |
23 | |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
24 int main(int argc, char *argv[]){ |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
25 void *handler; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
26 ComponentDescription desc; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
27 Component (*FindNextComponent)(Component prev,ComponentDescription* desc); |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
28 long (*CountComponents)(ComponentDescription* desc); |
5211 | 29 OSErr (*InitializeQTML)(long flags); |
30 OSErr (*EnterMovies)(void); | |
31 OSErr ret; | |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
32 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
33 Setup_LDT_Keeper(); |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
34 handler = LoadLibraryA("/usr/lib/win32/qtmlClient.dll"); |
5211 | 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); | |
42 | |
43 ret=InitializeQTML(0); | |
44 printf("InitializeQTML->%d\n",ret); | |
45 ret=EnterMovies(); | |
46 printf("EnterMovies->%d\n",ret); | |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
47 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
48 memset(&desc,0,sizeof(desc)); |
5211 | 49 desc.componentType= (((unsigned char)'S')<<24)| |
50 (((unsigned char)'V')<<16)| | |
51 (((unsigned char)'Q')<<8)| | |
52 (((unsigned char)'5')); | |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
53 desc.componentSubType=0; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
54 desc.componentManufacturer=0; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
55 desc.componentFlags=0; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
56 desc.componentFlagsMask=0; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
57 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
58 printf("Count = %d\n",CountComponents(&desc)); |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
59 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
60 Restore_LDT_Keeper(); |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
61 exit(0); |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
62 } |