Mercurial > mplayer.hg
annotate loader/qtx/list.c @ 30533:e3e329bc727a
Avoid forward declarations for import_initial_playtree_into_gui() and
import_playtree_playlist_into_gui; declare them in interface.h instead.
author | diego |
---|---|
date | Sun, 14 Feb 2010 13:49:31 +0000 |
parents | fee09b258e8a |
children | 996166ae509d |
rev | line source |
---|---|
30452
fee09b258e8a
Add missing license headers to test programs for external libraries.
diego
parents:
30170
diff
changeset
|
1 /* |
fee09b258e8a
Add missing license headers to test programs for external libraries.
diego
parents:
30170
diff
changeset
|
2 * To compile edit loader/win32.c and change the #if 0 to 1 at line 1326 |
fee09b258e8a
Add missing license headers to test programs for external libraries.
diego
parents:
30170
diff
changeset
|
3 * to enable quicktime fix! |
fee09b258e8a
Add missing license headers to test programs for external libraries.
diego
parents:
30170
diff
changeset
|
4 * |
fee09b258e8a
Add missing license headers to test programs for external libraries.
diego
parents:
30170
diff
changeset
|
5 * This file is part of MPlayer. |
fee09b258e8a
Add missing license headers to test programs for external libraries.
diego
parents:
30170
diff
changeset
|
6 * |
fee09b258e8a
Add missing license headers to test programs for external libraries.
diego
parents:
30170
diff
changeset
|
7 * MPlayer is free software; you can redistribute it and/or modify |
fee09b258e8a
Add missing license headers to test programs for external libraries.
diego
parents:
30170
diff
changeset
|
8 * it under the terms of the GNU General Public License as published by |
fee09b258e8a
Add missing license headers to test programs for external libraries.
diego
parents:
30170
diff
changeset
|
9 * the Free Software Foundation; either version 2 of the License, or |
fee09b258e8a
Add missing license headers to test programs for external libraries.
diego
parents:
30170
diff
changeset
|
10 * (at your option) any later version. |
fee09b258e8a
Add missing license headers to test programs for external libraries.
diego
parents:
30170
diff
changeset
|
11 * |
fee09b258e8a
Add missing license headers to test programs for external libraries.
diego
parents:
30170
diff
changeset
|
12 * MPlayer is distributed in the hope that it will be useful, |
fee09b258e8a
Add missing license headers to test programs for external libraries.
diego
parents:
30170
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
fee09b258e8a
Add missing license headers to test programs for external libraries.
diego
parents:
30170
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
fee09b258e8a
Add missing license headers to test programs for external libraries.
diego
parents:
30170
diff
changeset
|
15 * GNU General Public License for more details. |
fee09b258e8a
Add missing license headers to test programs for external libraries.
diego
parents:
30170
diff
changeset
|
16 * |
fee09b258e8a
Add missing license headers to test programs for external libraries.
diego
parents:
30170
diff
changeset
|
17 * You should have received a copy of the GNU General Public License along |
fee09b258e8a
Add missing license headers to test programs for external libraries.
diego
parents:
30170
diff
changeset
|
18 * with MPlayer; if not, write to the Free Software Foundation, Inc., |
fee09b258e8a
Add missing license headers to test programs for external libraries.
diego
parents:
30170
diff
changeset
|
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
20 */ |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
21 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
22 #include <stdio.h> |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
23 #include <stdlib.h> |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
24 #include <string.h> |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
25 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
26 #include "qtxsdk/components.h" |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
27 #include "qtxsdk/select.h" |
30170
008338d7679f
Drop -Iloader from CPPFLAGS for the loader subdirectory.
diego
parents:
29263
diff
changeset
|
28 #include "loader/ldt_keeper.h" |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
29 |
18889
e60c8c7399d2
get_path as const, patch by Stefan Huehner, stefan AT huehner-org
reynaldo
parents:
5211
diff
changeset
|
30 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
|
31 void* LoadLibraryA(char* name); |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
32 void* GetProcAddress(void* handle,char* func); |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
33 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
34 #define __stdcall __attribute__((__stdcall__)) |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
35 #define __cdecl __attribute__((__cdecl__)) |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28599
diff
changeset
|
36 #define APIENTRY |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
37 |
28599
3ff0da40013d
cosmetics: Replace unused 'argc/argv' in main declarations by 'void'.
diego
parents:
26538
diff
changeset
|
38 int main(void) { |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
39 void *handler; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
40 ComponentDescription desc; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
41 Component (*FindNextComponent)(Component prev,ComponentDescription* desc); |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
42 long (*CountComponents)(ComponentDescription* desc); |
5211 | 43 OSErr (*InitializeQTML)(long flags); |
44 OSErr (*EnterMovies)(void); | |
45 OSErr ret; | |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
46 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
47 Setup_LDT_Keeper(); |
25593 | 48 handler = LoadLibraryA("/usr/local/lib/codecs/qtmlClient.dll"); |
5211 | 49 printf("***************************\n"); |
50 InitializeQTML = 0x1000c870; //GetProcAddress(handler, "InitializeQTML"); | |
51 EnterMovies = 0x10003ac0; //GetProcAddress(handler, "EnterMovies"); | |
52 FindNextComponent = 0x1000d5f0; //GetProcAddress(handler, "FindNextComponent"); | |
53 CountComponents = 0x1000d5d0; //GetProcAddress(handler, "CountComponents"); | |
54 // = GetProcAddress(handler, ""); | |
55 printf("handler: %p, funcs: %p %p %p, %p\n", handler, InitializeQTML, EnterMovies, FindNextComponent,CountComponents); | |
56 | |
57 ret=InitializeQTML(0); | |
58 printf("InitializeQTML->%d\n",ret); | |
59 ret=EnterMovies(); | |
60 printf("EnterMovies->%d\n",ret); | |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
61 |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
62 memset(&desc,0,sizeof(desc)); |
5211 | 63 desc.componentType= (((unsigned char)'S')<<24)| |
64 (((unsigned char)'V')<<16)| | |
65 (((unsigned char)'Q')<<8)| | |
66 (((unsigned char)'5')); | |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
67 desc.componentSubType=0; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
68 desc.componentManufacturer=0; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
69 desc.componentFlags=0; |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
70 desc.componentFlagsMask=0; |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28599
diff
changeset
|
71 |
26529 | 72 printf("Count = %ld\n",CountComponents(&desc)); |
26538
1b05ff23d572
Remove calls to Restore_LDT_Keeper, exit() is called immediately afterwards
diego
parents:
26537
diff
changeset
|
73 |
5209
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
74 exit(0); |
591e470e805b
simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff
changeset
|
75 } |