Mercurial > mplayer.hg
annotate loader/com.h @ 27896:4c2232462353
100l, stream->cache_pid can not be used directly in pthread_create,
it has the wrong type. Luckily we currently do not need the value anyway.
author | reimar |
---|---|
date | Sat, 15 Nov 2008 19:43:39 +0000 |
parents | 5e3c7164f943 |
children | 0f1b5b68af32 |
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 | |
21 #ifdef __cplusplus | |
22 extern "C" { | |
23 #endif | |
24 | |
1544 | 25 #ifndef GUID_TYPE |
26 #define GUID_TYPE | |
1 | 27 typedef struct |
28 { | |
1544 | 29 uint32_t f1; |
30 uint16_t f2; | |
31 uint16_t f3; | |
32 uint8_t f4[8]; | |
1 | 33 } GUID; |
1544 | 34 #endif |
1 | 35 |
7386 | 36 extern const GUID IID_IUnknown; |
37 extern const GUID IID_IClassFactory; | |
1 | 38 |
7386 | 39 typedef long (*GETCLASSOBJECT) (GUID* clsid, const GUID* iid, void** ppv); |
40 int RegisterComClass(const GUID* clsid, GETCLASSOBJECT gcs); | |
41 int UnregisterComClass(const GUID* clsid, GETCLASSOBJECT gcs); | |
1 | 42 |
43 #ifndef STDCALL | |
1544 | 44 #define STDCALL __attribute__((__stdcall__)) |
1 | 45 #endif |
46 | |
47 struct IUnknown; | |
48 struct IClassFactory; | |
49 struct IUnknown_vt | |
50 { | |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
51 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
|
52 long STDCALL (*AddRef)(struct IUnknown* this) ; |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
53 long STDCALL (*Release)(struct IUnknown* this) ; |
1 | 54 } ; |
3128 | 55 |
56 typedef struct IUnknown | |
1 | 57 { |
58 struct IUnknown_vt* vt; | |
3128 | 59 } IUnknown; |
1 | 60 |
61 struct IClassFactory_vt | |
62 { | |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
63 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
|
64 long STDCALL (*AddRef)(struct IUnknown* this) ; |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
65 long STDCALL (*Release)(struct IUnknown* this) ; |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
66 long STDCALL (*CreateInstance)(struct IClassFactory* this, struct IUnknown* pUnkOuter, const GUID* riid, void** ppvObject); |
1 | 67 }; |
68 | |
69 struct IClassFactory | |
70 { | |
71 struct IClassFactory_vt* vt; | |
72 }; | |
73 | |
22325
12afc06c044e
Replace __MINGW32__ by more consistent WIN32_LOADER. This should fix compilation under
voroshil
parents:
22305
diff
changeset
|
74 #ifdef WIN32_LOADER |
1 | 75 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
|
76 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
|
77 void* CoTaskMemAlloc(unsigned long cb); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
78 void CoTaskMemFree(void* cb); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
79 #else |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
80 long STDCALL CoCreateInstance(GUID* rclsid, struct IUnknown* pUnkOuter, |
7386 | 81 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
|
82 void* STDCALL CoTaskMemAlloc(unsigned long); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
83 void STDCALL CoTaskMemFree(void*); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
84 #endif |
1 | 85 |
86 #ifdef __cplusplus | |
87 }; | |
1544 | 88 #endif /* __cplusplus */ |
1 | 89 |
26045 | 90 #endif /* MPLAYER_COM_H */ |