Mercurial > mplayer.hg
annotate loader/qtx/list.c @ 26429:fac5790e3ff7
synced with r26460
author | ptt |
---|---|
date | Fri, 18 Apr 2008 17:26:00 +0000 |
parents | 96ce0ca753ff |
children | 75c404032a70 |
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! |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
3 */ |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
4 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
5 #include <stdio.h> |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
6 #include <stdlib.h> |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
7 #include <string.h> |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
8 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
9 #include "qtxsdk/components.h" |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
10 #include "qtxsdk/select.h" |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
11 |
18889
e60c8c7399d2
get_path as const, patch by Stefan Huehner, stefan AT huehner-org
reynaldo
parents:
5211
diff
changeset
|
12 char* get_path(const char* x){ return strdup(x);} |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
13 void* LoadLibraryA(char* name); |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
14 void* GetProcAddress(void* handle,char* func); |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
15 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
16 #define __stdcall __attribute__((__stdcall__)) |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
17 #define __cdecl __attribute__((__cdecl__)) |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
18 #define APIENTRY |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
19 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
20 int main(int argc, char *argv[]){ |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
21 void *handler; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
22 ComponentDescription desc; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
23 Component (*FindNextComponent)(Component prev,ComponentDescription* desc); |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
24 long (*CountComponents)(ComponentDescription* desc); |
5211 | 25 OSErr (*InitializeQTML)(long flags); |
26 OSErr (*EnterMovies)(void); | |
27 OSErr ret; | |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
28 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
29 Setup_LDT_Keeper(); |
25593 | 30 handler = LoadLibraryA("/usr/local/lib/codecs/qtmlClient.dll"); |
5211 | 31 printf("***************************\n"); |
32 InitializeQTML = 0x1000c870; //GetProcAddress(handler, "InitializeQTML"); | |
33 EnterMovies = 0x10003ac0; //GetProcAddress(handler, "EnterMovies"); | |
34 FindNextComponent = 0x1000d5f0; //GetProcAddress(handler, "FindNextComponent"); | |
35 CountComponents = 0x1000d5d0; //GetProcAddress(handler, "CountComponents"); | |
36 // = GetProcAddress(handler, ""); | |
37 printf("handler: %p, funcs: %p %p %p, %p\n", handler, InitializeQTML, EnterMovies, FindNextComponent,CountComponents); | |
38 | |
39 ret=InitializeQTML(0); | |
40 printf("InitializeQTML->%d\n",ret); | |
41 ret=EnterMovies(); | |
42 printf("EnterMovies->%d\n",ret); | |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
43 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
44 memset(&desc,0,sizeof(desc)); |
5211 | 45 desc.componentType= (((unsigned char)'S')<<24)| |
46 (((unsigned char)'V')<<16)| | |
47 (((unsigned char)'Q')<<8)| | |
48 (((unsigned char)'5')); | |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
49 desc.componentSubType=0; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
50 desc.componentManufacturer=0; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
51 desc.componentFlags=0; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
52 desc.componentFlagsMask=0; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
53 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
54 printf("Count = %d\n",CountComponents(&desc)); |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
55 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
56 Restore_LDT_Keeper(); |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
57 exit(0); |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
58 } |