Mercurial > mplayer.hg
annotate loader/com.h @ 26178:5ba88511ec0a
Make av_class a pointer to const.
Patch by Takis.
author | benoit |
---|---|
date | Mon, 10 Mar 2008 14:30:49 +0000 |
parents | a8ea87c71d18 |
children | 5e3c7164f943 |
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 | |
9978 | 21 #if !defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) |
1 | 22 |
23 #ifdef __cplusplus | |
24 extern "C" { | |
25 #endif | |
26 | |
1544 | 27 #ifndef GUID_TYPE |
28 #define GUID_TYPE | |
1 | 29 typedef struct |
30 { | |
1544 | 31 uint32_t f1; |
32 uint16_t f2; | |
33 uint16_t f3; | |
34 uint8_t f4[8]; | |
1 | 35 } GUID; |
1544 | 36 #endif |
1 | 37 |
7386 | 38 extern const GUID IID_IUnknown; |
39 extern const GUID IID_IClassFactory; | |
1 | 40 |
7386 | 41 typedef long (*GETCLASSOBJECT) (GUID* clsid, const GUID* iid, void** ppv); |
42 int RegisterComClass(const GUID* clsid, GETCLASSOBJECT gcs); | |
43 int UnregisterComClass(const GUID* clsid, GETCLASSOBJECT gcs); | |
1 | 44 |
45 #ifndef STDCALL | |
1544 | 46 #define STDCALL __attribute__((__stdcall__)) |
1 | 47 #endif |
48 | |
49 struct IUnknown; | |
50 struct IClassFactory; | |
51 struct IUnknown_vt | |
52 { | |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
53 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
|
54 long STDCALL (*AddRef)(struct IUnknown* this) ; |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
55 long STDCALL (*Release)(struct IUnknown* this) ; |
1 | 56 } ; |
3128 | 57 |
58 typedef struct IUnknown | |
1 | 59 { |
60 struct IUnknown_vt* vt; | |
3128 | 61 } IUnknown; |
1 | 62 |
63 struct IClassFactory_vt | |
64 { | |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
65 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
|
66 long STDCALL (*AddRef)(struct IUnknown* this) ; |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
67 long STDCALL (*Release)(struct IUnknown* this) ; |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
68 long STDCALL (*CreateInstance)(struct IClassFactory* this, struct IUnknown* pUnkOuter, const GUID* riid, void** ppvObject); |
1 | 69 }; |
70 | |
71 struct IClassFactory | |
72 { | |
73 struct IClassFactory_vt* vt; | |
74 }; | |
75 | |
22325
12afc06c044e
Replace __MINGW32__ by more consistent WIN32_LOADER. This should fix compilation under
voroshil
parents:
22305
diff
changeset
|
76 #ifdef WIN32_LOADER |
1 | 77 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
|
78 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
|
79 void* CoTaskMemAlloc(unsigned long cb); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
80 void CoTaskMemFree(void* cb); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
81 #else |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
82 long STDCALL CoCreateInstance(GUID* rclsid, struct IUnknown* pUnkOuter, |
7386 | 83 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
|
84 void* STDCALL CoTaskMemAlloc(unsigned long); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
85 void STDCALL CoTaskMemFree(void*); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
86 #endif |
1 | 87 |
88 #ifdef __cplusplus | |
89 }; | |
1544 | 90 #endif /* __cplusplus */ |
1 | 91 |
1544 | 92 #endif /* WIN32 */ |
302 | 93 |
26045 | 94 #endif /* MPLAYER_COM_H */ |