mirror of
https://github.com/mpv-player/mpv
synced 2024-12-27 01:22:30 +00:00
f5e88339a5
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15167 b3059339-0415-0410-9bf9-f77b7e298cf2
90 lines
1.9 KiB
C
90 lines
1.9 KiB
C
/*
|
|
* Modified for use with MPlayer, detailed CVS changelog at
|
|
* http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
|
|
* $Id$
|
|
*/
|
|
|
|
#ifndef AVIFILE_COM_H
|
|
#define AVIFILE_COM_H
|
|
|
|
#include "config.h"
|
|
|
|
#ifdef HAVE_STDINT_H
|
|
#include <stdint.h>
|
|
#else
|
|
#include <inttypes.h>
|
|
#endif
|
|
|
|
/**
|
|
* Internal functions and structures for COM emulation code.
|
|
*/
|
|
|
|
#if !defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
void* CoTaskMemAlloc(unsigned long cb);
|
|
void CoTaskMemFree(void* cb);
|
|
|
|
#ifndef GUID_TYPE
|
|
#define GUID_TYPE
|
|
typedef struct
|
|
{
|
|
uint32_t f1;
|
|
uint16_t f2;
|
|
uint16_t f3;
|
|
uint8_t f4[8];
|
|
} GUID;
|
|
#endif
|
|
|
|
extern const GUID IID_IUnknown;
|
|
extern const GUID IID_IClassFactory;
|
|
|
|
typedef long (*GETCLASSOBJECT) (GUID* clsid, const GUID* iid, void** ppv);
|
|
int RegisterComClass(const GUID* clsid, GETCLASSOBJECT gcs);
|
|
int UnregisterComClass(const GUID* clsid, GETCLASSOBJECT gcs);
|
|
|
|
#ifndef STDCALL
|
|
#define STDCALL __attribute__((__stdcall__))
|
|
#endif
|
|
|
|
struct IUnknown;
|
|
struct IClassFactory;
|
|
struct IUnknown_vt
|
|
{
|
|
long STDCALL (*QueryInterface)(struct IUnknown* _this, const GUID* iid, void** ppv);
|
|
long STDCALL (*AddRef)(struct IUnknown* _this) ;
|
|
long STDCALL (*Release)(struct IUnknown* _this) ;
|
|
} ;
|
|
|
|
typedef struct IUnknown
|
|
{
|
|
struct IUnknown_vt* vt;
|
|
} IUnknown;
|
|
|
|
struct IClassFactory_vt
|
|
{
|
|
long STDCALL (*QueryInterface)(struct IUnknown* _this, const GUID* iid, void** ppv);
|
|
long STDCALL (*AddRef)(struct IUnknown* _this) ;
|
|
long STDCALL (*Release)(struct IUnknown* _this) ;
|
|
long STDCALL (*CreateInstance)(struct IClassFactory* _this, struct IUnknown* pUnkOuter, const GUID* riid, void** ppvObject);
|
|
};
|
|
|
|
struct IClassFactory
|
|
{
|
|
struct IClassFactory_vt* vt;
|
|
};
|
|
|
|
long CoCreateInstance(GUID* rclsid, struct IUnknown* pUnkOuter,
|
|
long dwClsContext, const GUID* riid, void** ppv);
|
|
|
|
#ifdef __cplusplus
|
|
};
|
|
#endif /* __cplusplus */
|
|
|
|
#endif /* WIN32 */
|
|
|
|
#endif /* AVIFILE_COM_H */
|