Mercurial > mplayer.hg
annotate loader/com.h @ 36737:456840015a07
Merge DVDNAV event handling into a single switch.
First attempt to slightly deobfuscate this bug-riddled code.
author | reimar |
---|---|
date | Fri, 14 Feb 2014 21:34:06 +0000 |
parents | 2211ce940290 |
children |
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 |
35953 | 9 #include <stdint.h> |
9967
b0d1b415320c
cygwin support patch by Sascha Sommer and some fixes by me
alex
parents:
7386
diff
changeset
|
10 |
35953 | 11 #include "config.h" |
1544 | 12 |
1 | 13 /** |
14 * Internal functions and structures for COM emulation code. | |
15 */ | |
16 | |
1544 | 17 #ifndef GUID_TYPE |
18 #define GUID_TYPE | |
1 | 19 typedef struct |
20 { | |
1544 | 21 uint32_t f1; |
22 uint16_t f2; | |
23 uint16_t f3; | |
24 uint8_t f4[8]; | |
1 | 25 } GUID; |
1544 | 26 #endif |
1 | 27 |
34118 | 28 // use copies of the IIDs to avoid symbol collisions |
34115 | 29 #define IID_IUnknown MP_IID_IUnknown |
30 #define IID_IClassFactory MP_IID_IClassFactory | |
7386 | 31 extern const GUID IID_IUnknown; |
32 extern const GUID IID_IClassFactory; | |
1 | 33 |
7386 | 34 typedef long (*GETCLASSOBJECT) (GUID* clsid, const GUID* iid, void** ppv); |
35 int RegisterComClass(const GUID* clsid, GETCLASSOBJECT gcs); | |
36 int UnregisterComClass(const GUID* clsid, GETCLASSOBJECT gcs); | |
1 | 37 |
38 #ifndef STDCALL | |
1544 | 39 #define STDCALL __attribute__((__stdcall__)) |
1 | 40 #endif |
41 | |
42 struct IUnknown; | |
43 struct IClassFactory; | |
44 struct IUnknown_vt | |
45 { | |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
46 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
|
47 long STDCALL (*AddRef)(struct IUnknown* this) ; |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
48 long STDCALL (*Release)(struct IUnknown* this) ; |
1 | 49 } ; |
3128 | 50 |
51 typedef struct IUnknown | |
1 | 52 { |
53 struct IUnknown_vt* vt; | |
3128 | 54 } IUnknown; |
1 | 55 |
56 struct IClassFactory_vt | |
57 { | |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
58 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
|
59 long STDCALL (*AddRef)(struct IUnknown* this) ; |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
60 long STDCALL (*Release)(struct IUnknown* this) ; |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
61 long STDCALL (*CreateInstance)(struct IClassFactory* this, struct IUnknown* pUnkOuter, const GUID* riid, void** ppvObject); |
1 | 62 }; |
63 | |
64 struct IClassFactory | |
65 { | |
66 struct IClassFactory_vt* vt; | |
67 }; | |
68 | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27726
diff
changeset
|
69 #ifdef WIN32_LOADER |
1 | 70 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
|
71 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
|
72 void* CoTaskMemAlloc(unsigned long cb); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
73 void CoTaskMemFree(void* cb); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
74 #else |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
75 long STDCALL CoCreateInstance(GUID* rclsid, struct IUnknown* pUnkOuter, |
7386 | 76 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
|
77 void* STDCALL CoTaskMemAlloc(unsigned long); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
78 void STDCALL CoTaskMemFree(void*); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
79 #endif |
1 | 80 |
26045 | 81 #endif /* MPLAYER_COM_H */ |