Mercurial > mplayer.hg
annotate loader/qtx/list.c @ 30000:a30debd7acd7
Add -xineramascreen support to corevideo vo. Still prefer corevideo's own device_id parameter if it's set.
author | adrian |
---|---|
date | Tue, 15 Dec 2009 20:25:50 +0000 |
parents | 0f1b5b68af32 |
children | 008338d7679f |
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" |
26537
4120a65789a8
Add missing ldt_keeper.h #include; this fixes a bunch of implicit declaration
diego
parents:
26529
diff
changeset
|
11 #include "ldt_keeper.h" |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
12 |
18889
e60c8c7399d2
get_path as const, patch by Stefan Huehner, stefan AT huehner-org
reynaldo
parents:
5211
diff
changeset
|
13 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
|
14 void* LoadLibraryA(char* name); |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
15 void* GetProcAddress(void* handle,char* func); |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
16 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
17 #define __stdcall __attribute__((__stdcall__)) |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
18 #define __cdecl __attribute__((__cdecl__)) |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28599
diff
changeset
|
19 #define APIENTRY |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
20 |
28599
3ff0da40013d
cosmetics: Replace unused 'argc/argv' in main declarations by 'void'.
diego
parents:
26538
diff
changeset
|
21 int main(void) { |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
22 void *handler; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
23 ComponentDescription desc; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
24 Component (*FindNextComponent)(Component prev,ComponentDescription* desc); |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
25 long (*CountComponents)(ComponentDescription* desc); |
5211 | 26 OSErr (*InitializeQTML)(long flags); |
27 OSErr (*EnterMovies)(void); | |
28 OSErr ret; | |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
29 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
30 Setup_LDT_Keeper(); |
25593 | 31 handler = LoadLibraryA("/usr/local/lib/codecs/qtmlClient.dll"); |
5211 | 32 printf("***************************\n"); |
33 InitializeQTML = 0x1000c870; //GetProcAddress(handler, "InitializeQTML"); | |
34 EnterMovies = 0x10003ac0; //GetProcAddress(handler, "EnterMovies"); | |
35 FindNextComponent = 0x1000d5f0; //GetProcAddress(handler, "FindNextComponent"); | |
36 CountComponents = 0x1000d5d0; //GetProcAddress(handler, "CountComponents"); | |
37 // = GetProcAddress(handler, ""); | |
38 printf("handler: %p, funcs: %p %p %p, %p\n", handler, InitializeQTML, EnterMovies, FindNextComponent,CountComponents); | |
39 | |
40 ret=InitializeQTML(0); | |
41 printf("InitializeQTML->%d\n",ret); | |
42 ret=EnterMovies(); | |
43 printf("EnterMovies->%d\n",ret); | |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
44 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
45 memset(&desc,0,sizeof(desc)); |
5211 | 46 desc.componentType= (((unsigned char)'S')<<24)| |
47 (((unsigned char)'V')<<16)| | |
48 (((unsigned char)'Q')<<8)| | |
49 (((unsigned char)'5')); | |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
50 desc.componentSubType=0; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
51 desc.componentManufacturer=0; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
52 desc.componentFlags=0; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
53 desc.componentFlagsMask=0; |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28599
diff
changeset
|
54 |
26529 | 55 printf("Count = %ld\n",CountComponents(&desc)); |
26538
1b05ff23d572
Remove calls to Restore_LDT_Keeper, exit() is called immediately afterwards
diego
parents:
26537
diff
changeset
|
56 |
5209
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 } |