Mercurial > mplayer.hg
annotate loader/com.h @ 34120:5feea1437279
Support ASP by QNAP Systems.
author | cehoyos |
---|---|
date | Sun, 16 Oct 2011 11:48:05 +0000 |
parents | b8175cad9b8a |
children | 2211ce940290 |
rev | line source |
---|---|
15166
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
9978
diff
changeset
|
1 /* |
18783 | 2 * Modified for use with MPlayer, detailed changelog at |
3 * http://svn.mplayerhq.hu/mplayer/trunk/ | |
15166
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
9978
diff
changeset
|
4 */ |
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
9978
diff
changeset
|
5 |
26045 | 6 #ifndef MPLAYER_COM_H |
7 #define MPLAYER_COM_H | |
1544 | 8 |
9967
b0d1b415320c
cygwin support patch by Sascha Sommer and some fixes by me
alex
parents:
7386
diff
changeset
|
9 #include "config.h" |
b0d1b415320c
cygwin support patch by Sascha Sommer and some fixes by me
alex
parents:
7386
diff
changeset
|
10 |
7386 | 11 #ifdef HAVE_STDINT_H |
12 #include <stdint.h> | |
13 #else | |
1544 | 14 #include <inttypes.h> |
7386 | 15 #endif |
1544 | 16 |
1 | 17 /** |
18 * Internal functions and structures for COM emulation code. | |
19 */ | |
20 | |
1544 | 21 #ifndef GUID_TYPE |
22 #define GUID_TYPE | |
1 | 23 typedef struct |
24 { | |
1544 | 25 uint32_t f1; |
26 uint16_t f2; | |
27 uint16_t f3; | |
28 uint8_t f4[8]; | |
1 | 29 } GUID; |
1544 | 30 #endif |
1 | 31 |
34118 | 32 // use copies of the IIDs to avoid symbol collisions |
34115 | 33 #define IID_IUnknown MP_IID_IUnknown |
34 #define IID_IClassFactory MP_IID_IClassFactory | |
7386 | 35 extern const GUID IID_IUnknown; |
36 extern const GUID IID_IClassFactory; | |
1 | 37 |
7386 | 38 typedef long (*GETCLASSOBJECT) (GUID* clsid, const GUID* iid, void** ppv); |
39 int RegisterComClass(const GUID* clsid, GETCLASSOBJECT gcs); | |
40 int UnregisterComClass(const GUID* clsid, GETCLASSOBJECT gcs); | |
1 | 41 |
42 #ifndef STDCALL | |
1544 | 43 #define STDCALL __attribute__((__stdcall__)) |
1 | 44 #endif |
45 | |
46 struct IUnknown; | |
47 struct IClassFactory; | |
48 struct IUnknown_vt | |
49 { | |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
50 long STDCALL (*QueryInterface)(struct IUnknown* this, const GUID* iid, void** ppv); |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
51 long STDCALL (*AddRef)(struct IUnknown* this) ; |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
52 long STDCALL (*Release)(struct IUnknown* this) ; |
1 | 53 } ; |
3128 | 54 |
55 typedef struct IUnknown | |
1 | 56 { |
57 struct IUnknown_vt* vt; | |
3128 | 58 } IUnknown; |
1 | 59 |
60 struct IClassFactory_vt | |
61 { | |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
62 long STDCALL (*QueryInterface)(struct IUnknown* this, const GUID* iid, void** ppv); |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
63 long STDCALL (*AddRef)(struct IUnknown* this) ; |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
64 long STDCALL (*Release)(struct IUnknown* this) ; |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
65 long STDCALL (*CreateInstance)(struct IClassFactory* this, struct IUnknown* pUnkOuter, const GUID* riid, void** ppvObject); |
1 | 66 }; |
67 | |
68 struct IClassFactory | |
69 { | |
70 struct IClassFactory_vt* vt; | |
71 }; | |
72 | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27726
diff
changeset
|
73 #ifdef WIN32_LOADER |
1 | 74 long CoCreateInstance(GUID* rclsid, struct IUnknown* pUnkOuter, |
22305
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
75 long dwClsContext, const GUID* riid, void** ppv); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
76 void* CoTaskMemAlloc(unsigned long cb); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
77 void CoTaskMemFree(void* cb); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
78 #else |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
79 long STDCALL CoCreateInstance(GUID* rclsid, struct IUnknown* pUnkOuter, |
7386 | 80 long dwClsContext, const GUID* riid, void** ppv); |
22305
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
81 void* STDCALL CoTaskMemAlloc(unsigned long); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
82 void STDCALL CoTaskMemFree(void*); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
83 #endif |
1 | 84 |
26045 | 85 #endif /* MPLAYER_COM_H */ |