From a92e397934534f496e8c0464dc2cbb8153a36d8f Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 22 Mar 2002 19:20:11 +0000 Subject: [PATCH] Rewrote some headers from scratch based on publicly available information to avoid EULA concerns. --- include/audevcod.h | 44 ++++++++++++++--------------- include/dmo.h | 20 ++++++++----- include/dmoreg.h | 70 +++++++++++++++++++++++++++++----------------- include/dmort.h | 24 +++++++--------- include/dshow.h | 31 +++++++++----------- include/mediaerr.h | 20 ++++++------- include/mediaobj.h | 44 ++++++++++++++++------------- 7 files changed, 136 insertions(+), 117 deletions(-) diff --git a/include/audevcod.h b/include/audevcod.h index fc17deade1f..f362fb3b700 100644 --- a/include/audevcod.h +++ b/include/audevcod.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001 Hidenori Takeshima + * Copyright (C) 2002 Alexandre Julliard * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,29 +16,29 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef __WINE_AUDEVCOD_H_ -#define __WINE_AUDEVCOD_H_ +#ifndef __AUDEVCOD__ +#define __AUDEVCOD__ -typedef enum +typedef enum _tagSND_DEVICE_ERROR { - SNDDEV_ERROR_Open = 1, - SNDDEV_ERROR_Close = 2, - SNDDEV_ERROR_GetCaps = 3, - SNDDEV_ERROR_PrepareHeader = 4, - SNDDEV_ERROR_UnprepareHeader = 5, - SNDDEV_ERROR_Reset = 6, - SNDDEV_ERROR_Restart = 7, - SNDDEV_ERROR_GetPosition = 8, - SNDDEV_ERROR_Write = 9, - SNDDEV_ERROR_Pause = 10, - SNDDEV_ERROR_Stop = 11, - SNDDEV_ERROR_Start = 12, - SNDDEV_ERROR_AddBuffer = 13, - SNDDEV_ERROR_Query = 14, + SNDDEV_ERROR_Open=1, + SNDDEV_ERROR_Close=2, + SNDDEV_ERROR_GetCaps=3, + SNDDEV_ERROR_PrepareHeader=4, + SNDDEV_ERROR_UnprepareHeader=5, + SNDDEV_ERROR_Reset=6, + SNDDEV_ERROR_Restart=7, + SNDDEV_ERROR_GetPosition=8, + SNDDEV_ERROR_Write=9, + SNDDEV_ERROR_Pause=10, + SNDDEV_ERROR_Stop=11, + SNDDEV_ERROR_Start=12, + SNDDEV_ERROR_AddBuffer=13, + SNDDEV_ERROR_Query=14 } SNDDEV_ERR; -#define EC_SND_DEVICE_ERROR_BASE 0x0200 -#define EC_SNDDEV_IN_ERROR (EC_SND_DEVICE_ERROR_BASE + 0x00) -#define EC_SNDDEV_OUT_ERROR (EC_SND_DEVICE_ERROR_BASE + 0x01) +#define EC_SND_DEVICE_ERROR_BASE 0x0200 +#define EC_SNDDEV_IN_ERROR (EC_SND_DEVICE_ERROR_BASE+0x00) +#define EC_SNDDEV_OUT_ERROR (EC_SND_DEVICE_ERROR_BASE+0x01) -#endif /* __WINE_AUDEVCOD_H_ */ +#endif /* __AUDEVCOD__ */ diff --git a/include/dmo.h b/include/dmo.h index db4216b15a7..65d627dbb58 100644 --- a/include/dmo.h +++ b/include/dmo.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002 Hidenori Takeshima + * Copyright (C) 2002 Alexandre Julliard * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,13 +16,19 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef __WINE_DMO_H_ -#define __WINE_DMO_H_ +#ifndef __DMO_H__ +#define __DMO_H__ -#include "mediaobj.h" -#include "dmoreg.h" -#include "dmort.h" #include "mediaerr.h" +#ifdef FIX_LOCK_NAME +#define Lock DMOLock +#endif +#include "mediaobj.h" +#ifdef FIX_LOCK_NAME +#undef Lock +#endif +#include "dmoreg.h" +#include "dmort.h" -#endif /* __WINE_DMO_H_ */ +#endif /* __DMO_H__ */ diff --git a/include/dmoreg.h b/include/dmoreg.h index beb3c9450a0..2368a1be171 100644 --- a/include/dmoreg.h +++ b/include/dmoreg.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002 Hidenori Takeshima + * Copyright (C) 2002 Alexandre Julliard * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,35 +16,53 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef __WINE_DMOREG_H_ -#define __WINE_DMOREG_H_ +#ifndef __DMOREG_H__ +#define __DMOREG_H__ - -/* structs. */ - -typedef struct +typedef struct _DMO_PARTIAL_MEDIATYPE { - GUID type; - GUID subtype; -} DMO_PARTIAL_MEDIATYPE; + GUID type; + GUID subtype; +} DMO_PARTIAL_MEDIATYPE, *PDMO_PARTIAL_MEDIATYPE; -/* exported APIs */ +enum DMO_REGISTER_FLAGS +{ + DMO_REGISTERF_IS_KEYED = 1 +}; -HRESULT WINAPI DMOEnum( REFGUID rguidCat, DWORD dwFlags, DWORD dwCountOfInTypes, const DMO_PARTIAL_MEDIATYPE* pInTypes, DWORD dwCountOfOutTypes, const DMO_PARTIAL_MEDIATYPE* pOutTypes, IEnumDMO** ppEnum ); +enum DMO_ENUM_FLAGS +{ + DMO_ENUMF_INCLUDE_KEYED = 1 +}; -HRESULT WINAPI DMOGetName( REFCLSID rclsid, WCHAR* pwszName ); +HRESULT WINAPI DMORegister(LPCWSTR,REFCLSID,REFGUID,DWORD,DWORD,const DMO_PARTIAL_MEDIATYPE*, + DWORD,const DMO_PARTIAL_MEDIATYPE*); +HRESULT WINAPI DMOUnregister(REFCLSID,REFGUID); +HRESULT WINAPI DMOEnum(REFGUID,DWORD,DWORD,const DMO_PARTIAL_MEDIATYPE*,DWORD, + const DMO_PARTIAL_MEDIATYPE*,IEnumDMO**); +HRESULT WINAPI DMOGetTypes(REFCLSID,unsigned long,unsigned long*,DMO_PARTIAL_MEDIATYPE*, + unsigned long,unsigned long*,DMO_PARTIAL_MEDIATYPE*); +HRESULT WINAPI DMOGetName(REFCLSID,WCHAR*); -HRESULT WINAPI DMOGetTypes( REFCLSID rclsid, unsigned long ulInputTypesReq, unsigned long* pulInputTypesRet, unsigned long ulOutputTypesReq, unsigned long* pulOutputTypesRet, const DMO_PARTIAL_MEDIATYPE* pOutTypes ); +DEFINE_GUID(DMOCATEGORY_AUDIO_DECODER, + 0x57f2db8b,0xe6bb,0x4513,0x9d,0x43,0xdc,0xd2,0xa6,0x59,0x31,0x25); +DEFINE_GUID(DMOCATEGORY_AUDIO_ENCODER, + 0x33d9a761,0x90c8,0x11d0,0xbd,0x43,0x00,0xa0,0xc9,0x11,0xce,0x86); +DEFINE_GUID(DMOCATEGORY_VIDEO_DECODER, + 0x4a69b442,0x28be,0x4991,0x96,0x9c,0xb5,0x00,0xad,0xf5,0xd8,0xa8); +DEFINE_GUID(DMOCATEGORY_VIDEO_ENCODER, + 0x33d9a760,0x90c8,0x11d0,0xbd,0x43,0x00,0xa0,0xc9,0x11,0xce,0x86); +DEFINE_GUID(DMOCATEGORY_AUDIO_EFFECT, + 0xf3602b3f,0x0592,0x48df,0xa4,0xcd,0x67,0x47,0x21,0xe7,0xeb,0xeb); +DEFINE_GUID(DMOCATEGORY_VIDEO_EFFECT, + 0xd990ee14,0x776c,0x4723,0xbe,0x46,0x3d,0xa2,0xf5,0x6f,0x10,0xb9); +DEFINE_GUID(DMOCATEGORY_AUDIO_CAPTURE_EFFECT, + 0xf665aaba,0x3e09,0x4920,0xaa,0x5f,0x21,0x98,0x11,0x14,0x8f,0x09); +DEFINE_GUID(DMOCATEGORY_ACOUSTIC_ECHO_CANCEL, + 0xbf963d80,0xc559,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1); +DEFINE_GUID(DMOCATEGORY_AUDIO_NOISE_SUPPRESS, + 0xe07f903f,0x62fd,0x4e60,0x8c,0xdd,0xde,0xa7,0x23,0x66,0x65,0xb5); +DEFINE_GUID(DMOCATEGORY_AGC, + 0xe88c9ba0,0xc557,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1); -/* DMOGuidToStrA - undocumented */ -/* DMOGuidToStrW - undocumented */ - -HRESULT WINAPI DMORegister( LPCWSTR pwszName, REFCLSID rclsid, REFGUID rguidCat, DWORD dwFlags, DWORD dwCountOfInTypes, const DMO_PARTIAL_MEDIATYPE* pInTypes, DWORD dwCountOfOutTypes, const DMO_PARTIAL_MEDIATYPE* pOutTypes ); - -/* DMOStrToGuidA - undocumented */ -/* DMOStrToGuidW - undocumented */ - -HRESULT WINAPI DMOUnregister( REFCLSID rclsid, REFGUID rguidCat ); - - -#endif /* __WINE_DMOREG_H_ */ +#endif /* __DMOREG_H__ */ diff --git a/include/dmort.h b/include/dmort.h index 3a12ab07fc9..395059dbfd3 100644 --- a/include/dmort.h +++ b/include/dmort.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002 Hidenori Takeshima + * Copyright (C) 2002 Alexandre Julliard * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,18 +16,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef __WINE_DMORT_H_ -#define __WINE_DMORT_H_ +#ifndef __DMORT_H__ +#define __DMORT_H__ +HRESULT WINAPI MoCopyMediaType(DMO_MEDIA_TYPE*,const DMO_MEDIA_TYPE*); +HRESULT WINAPI MoCreateMediaType(DMO_MEDIA_TYPE**,DWORD); +HRESULT WINAPI MoDeleteMediaType(DMO_MEDIA_TYPE*); +HRESULT WINAPI MoDuplicateMediaType(DMO_MEDIA_TYPE**,const DMO_MEDIA_TYPE*); +HRESULT WINAPI MoFreeMediaType(DMO_MEDIA_TYPE*); +HRESULT WINAPI MoInitMediaType(DMO_MEDIA_TYPE*,DWORD); -/* exported APIs */ - -HRESULT WINAPI MoCopyMediaType( DMO_MEDIA_TYPE* pmtDst, const DMO_MEDIA_TYPE* pmtSrc ); -HRESULT WINAPI MoCreateMediaType( DMO_MEDIA_TYPE** ppmt, DWORD cbFormat ); -HRESULT WINAPI MoDeleteMediaType( DMO_MEDIA_TYPE* pmt ); -HRESULT WINAPI MoDuplicateMediaType( DMO_MEDIA_TYPE** ppmtDest, const DMO_MEDIA_TYPE* pmtSrc ); -HRESULT WINAPI MoFreeMediaType( DMO_MEDIA_TYPE* pmt ); -HRESULT WINAPI MoInitMediaType( DMO_MEDIA_TYPE* pmt, DWORD cbFormat ); - - -#endif /* __WINE_DMORT_H_ */ +#endif /* __DMORT_H__ */ diff --git a/include/dshow.h b/include/dshow.h index 7dbc49c4b05..66d79d4b3d1 100644 --- a/include/dshow.h +++ b/include/dshow.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001 Hidenori Takeshima + * Copyright (C) 2002 Alexandre Julliard * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,8 +16,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef __WINE_DSHOW_H -#define __WINE_DSHOW_H +#ifndef __DSHOW_INCLUDED__ +#define __DSHOW_INCLUDED__ + +#define AM_NOVTABLE #include "windows.h" #include "windowsx.h" @@ -25,6 +27,10 @@ #include "ddraw.h" #include "mmsystem.h" +#ifndef NUMELMS +#define NUMELMS(array) (sizeof(array)/sizeof((array)[0])) +#endif + #include "strmif.h" #include "amvideo.h" #include "amaudio.h" @@ -32,24 +38,13 @@ #include "evcode.h" #include "uuids.h" #include "errors.h" -/*#include "edevdefs.h"*/ /* not yet */ #include "audevcod.h" -/*#include "dvdevcod.h"*/ /* not yet */ - -#ifndef AM_NOVTABLE -#define AM_NOVTABLE -#endif /* AM_NOVTABLE */ - -#ifndef NUMELEMS -#define NUMELEMS(elem) (sizeof(elem)/sizeof((elem)[0])) -#endif /* NUMELEMS */ #ifndef OATRUE -#define OATRUE (-1) -#endif /* OATRUE */ +#define OATRUE (-1) +#endif #ifndef OAFALSE #define OAFALSE (0) -#endif /* OAFALSE */ +#endif - -#endif /* __WINE_DSHOW_H */ +#endif /* __DSHOW_INCLUDED__ */ diff --git a/include/mediaerr.h b/include/mediaerr.h index 5b7c9172278..fe52746fdfd 100644 --- a/include/mediaerr.h +++ b/include/mediaerr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002 Hidenori Takeshima + * Copyright (C) 2002 Alexandre Julliard * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,14 +16,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef __WINE_MEDIAERR_H_ -#define __WINE_MEDIAERR_H_ +#ifndef _MEDIAERR_H_ +#define _MEDIAERR_H_ -#define DMO_E_INVALIDSTREAMINDEX 0x80040201 -#define DMO_E_INVALIDTYPE 0x80040202 -#define DMO_E_TYPE_NOT_SET 0x80040203 -#define DMO_E_NOTACCEPTING 0x80040204 -#define DMO_E_TYPE_NOT_ACCEPTED 0x80040205 -#define DMO_E_NO_MORE_ITEMS 0x80040206 +#define DMO_E_INVALIDSTREAMINDEX 0x80040201 +#define DMO_E_INVALIDTYPE 0x80040202 +#define DMO_E_TYPE_NOT_SET 0x80040203 +#define DMO_E_NOTACCEPTING 0x80040204 +#define DMO_E_TYPE_NOT_ACCEPTED 0x80040205 +#define DMO_E_NO_MORE_ITEMS 0x80040206 -#endif /* __WINE_MEDIAERR_H_ */ +#endif /* _MEDIAERR_H_ */ diff --git a/include/mediaobj.h b/include/mediaobj.h index b6aaff9f03c..58ec373fd54 100644 --- a/include/mediaobj.h +++ b/include/mediaobj.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002 Hidenori Takeshima + * Copyright (C) 2002 Alexandre Julliard * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,10 +16,17 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef __WINE_MEDIAOBJ_H_ -#define __WINE_MEDIAOBJ_H_ +#ifndef __WINE__ +#include "rpc.h" +#include "rpcndr.h" +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif +#endif -/* forward decls. */ +#ifndef __mediaobj_h__ +#define __mediaobj_h__ typedef struct IDMOQualityControl IDMOQualityControl; typedef struct IDMOVideoOutputOptimizations IDMOVideoOutputOptimizations; @@ -28,23 +35,20 @@ typedef struct IMediaBuffer IMediaBuffer; typedef struct IMediaObject IMediaObject; typedef struct IMediaObjectInPlace IMediaObjectInPlace; +#include "unknwn.h" +#include "objidl.h" - -/* structs. */ - -typedef struct +typedef struct _DMOMediaType { - GUID majortype; - GUID subtype; - BOOL bFixedSizeSamples; - BOOL bTemporalCompression; - ULONG lSampleSize; - GUID formattype; - IUnknown* pUnk; - ULONG cbFormat; - BYTE* pbFormat; + GUID majortype; + GUID subtype; + BOOL bFixedSizeSamples; + BOOL bTemporalCompression; + ULONG lSampleSize; + GUID formattype; + IUnknown *pUnk; + ULONG cbFormat; + BYTE *pbFormat; } DMO_MEDIA_TYPE; - - -#endif /* __WINE_MEDIAOBJ_H_ */ +#endif /* __mediaobj_h__ */