Initial commit

This commit is contained in:
Eagle517
2025-02-17 23:17:30 -06:00
commit 7cad314c94
4726 changed files with 1145203 additions and 0 deletions

79
lib/Makefile Executable file
View File

@ -0,0 +1,79 @@
#--------------------------------------
# include and verify the users mk/conf.mk
-include ../mk/conf.mk
ifndef CONFIG_STATUS
doConfigure:
$(error Configuration file not defined. Please run make -f mk/configure.mk)
#@make --no-print-directory -f ../mk/configure.mk
else
ifeq ($(CONFIG_STATUS),INVALID)
doConfigure:
$(error Invalid Configuration file. Please run make -f mk/configure.mk)
#@make --no-print-directory -f mk/configure.mk
else
include ../mk/conf.$(COMPILER).$(OS).mk
include ../mk/conf.$(COMPILER).mk
endif
endif
default: \
$(DIR.OBJ)/ \
$(DIR.OBJ)/lpng$(EXT.LIB) \
$(DIR.OBJ)/zlib$(EXT.LIB) \
$(DIR.OBJ)/ljpeg$(EXT.LIB) \
$(DIR.OBJ)/lungif$(EXT.LIB) \
$(DIR.OBJ)/opengl2d3d$(EXT.DLL) \
$(DIR.OBJ)/glu2d3d$(EXT.DLL)
# opengl2d3d currently does not compile with CodeWarrior6
# until the link errors are resolved create dummy targets
COMPILE_D3D ?= true
ifeq "$(COMPILER)" "CW6"
COMPILE_D3D = false
endif
# no need to compile D3D stuff under Linux :)
ifeq "$(OS)" "LINUX"
COMPILE_D3D = false
endif
# or FreeBSD
ifeq "$(OS)" "FreeBSD"
COMPILE_D3D = false
endif
# or OpenBSD!
ifeq "$(OS)" "OpenBSD"
COMPILE_D3D = false
endif
ifeq "$(COMPILE_D3D)" "false"
$(DIR.OBJ)/opengl2d3d$(EXT.DLL): ;
$(DIR.OBJ)/glu2d3d$(EXT.DLL): ;
else
include targets.opengl2d3d.mk
endif
include targets.lpng.mk
include targets.zlib.mk
include targets.ljpeg.mk
include targets.lungif.mk
include ../mk/conf.common.mk
TORQUEclean: ljpegclean zlibclean ljpegclean lungif
#default:
# echo default.
ifneq ($(MAKECMDGOALS),clean)
-include $(addprefix $(DIR.OBJ)/, $(addsuffix $(EXT.DEP), $(basename $(filter %.cc %.c,$(SOURCE.ALL)))))
endif

18
lib/directx8/activecf.h Executable file
View File

@ -0,0 +1,18 @@
//------------------------------------------------------------------------------
// File: ActiveCf.h
//
// Desc: Contains the data formats for the transfer of VfW4 filters via the
// clipboard.
//
// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#define CFSTR_VFW_FILTERLIST "Video for Windows 4 Filters"
typedef struct tagVFW_FILTERLIST{
UINT cFilters; // number of CLSIDs in aClsId
CLSID aClsId[1]; // ClsId of each filter
} VFW_FILTERLIST;

54
lib/directx8/amaudio.h Executable file
View File

@ -0,0 +1,54 @@
//------------------------------------------------------------------------------
// File: AMAudio.h
//
// Desc: Audio related definitions and interfaces for ActiveMovie.
//
// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __AMAUDIO__
#define __AMAUDIO__
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
#include <mmsystem.h>
#include <dsound.h>
// This is the interface the audio renderer supports to give the application
// access to the direct sound object and buffers it is using, to allow the
// application to use things like the 3D features of Direct Sound for the
// soundtrack of a movie being played with Active Movie
// be nice to our friends in C
#undef INTERFACE
#define INTERFACE IAMDirectSound
DECLARE_INTERFACE_(IAMDirectSound,IUnknown)
{
/* IUnknown methods */
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/* IAMDirectSound methods */
STDMETHOD(GetDirectSoundInterface)(THIS_ LPDIRECTSOUND *lplpds) PURE;
STDMETHOD(GetPrimaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER *lplpdsb) PURE;
STDMETHOD(GetSecondaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER *lplpdsb) PURE;
STDMETHOD(ReleaseDirectSoundInterface)(THIS_ LPDIRECTSOUND lpds) PURE;
STDMETHOD(ReleasePrimaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER lpdsb) PURE;
STDMETHOD(ReleaseSecondaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER lpdsb) PURE;
STDMETHOD(SetFocusWindow)(THIS_ HWND, BOOL) PURE ;
STDMETHOD(GetFocusWindow)(THIS_ HWND *, BOOL*) PURE ;
};
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // __AMAUDIO__

38
lib/directx8/amparse.h Executable file
View File

@ -0,0 +1,38 @@
//------------------------------------------------------------------------------
// File: AMParse.h
//
// Desc: Interface to the parser to get current time. This is useful for
// multifile playback.
//
// Copyright (c) 1996 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __AMPARSE__
#define __AMPARSE__
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
DEFINE_GUID(IID_IAMParse,
0xc47a3420, 0x005c, 0x11d2, 0x90, 0x38, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x98);
//
// Parser interface - supported by MPEG-2 splitter filter
//
DECLARE_INTERFACE_(IAMParse, IUnknown) {
STDMETHOD(GetParseTime) (THIS_
REFERENCE_TIME *prtCurrent
) PURE;
STDMETHOD(SetParseTime) (THIS_
REFERENCE_TIME rtCurrent
) PURE;
STDMETHOD(Flush) (THIS) PURE;
};
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // __AMPARSE__

2295
lib/directx8/amstream.h Executable file

File diff suppressed because it is too large Load Diff

85
lib/directx8/amva.h Executable file
View File

@ -0,0 +1,85 @@
//------------------------------------------------------------------------------
// File: AMVA.h
//
// Desc: DirectShowMotionComp include file.
//
// Copyright (c) 1997 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __AMVA_INCLUDED__
#define __AMVA_INCLUDED__
#ifdef __cplusplus
extern "C" {
#endif
#define AMVA_TYPEINDEX_OUTPUTFRAME 0xFFFFFFFF
// Flags for QueryRenderStatus
#define AMVA_QUERYRENDERSTATUSF_READ 0x00000001 // Query for read
// set this bit to 0
// if query for update
typedef struct _tag_AMVAUncompBufferInfo
{
DWORD dwMinNumSurfaces; // IN min number of surfaces to be allocated
DWORD dwMaxNumSurfaces; // IN max number of surfaces to be allocated
DDPIXELFORMAT ddUncompPixelFormat; // IN pixel format of surfaces to be allocated
} AMVAUncompBufferInfo, *LPAMVAUncompBufferInfo;
typedef struct _tag_AMVAUncompDataInfo
{
DWORD dwUncompWidth; // [in] width of uncompressed data
DWORD dwUncompHeight; // [in] height of uncompressed data
DDPIXELFORMAT ddUncompPixelFormat; // [in] pixel-format of uncompressed data
} AMVAUncompDataInfo, *LPAMVAUncompDataInfo;
typedef struct _tag_AMVAInternalMemInfo
{
DWORD dwScratchMemAlloc; // [out] amount of scratch memory will the hal allocate for its private use
} AMVAInternalMemInfo, *LPAMVAInternalMemInfo;
typedef struct _tag_AMVACompBufferInfo
{
DWORD dwNumCompBuffers; // [out] number of buffers reqd for compressed data
DWORD dwWidthToCreate; // [out] Width of surface to create
DWORD dwHeightToCreate; // [out] Height of surface to create
DWORD dwBytesToAllocate; // [out] Total number of bytes used by each surface
DDSCAPS2 ddCompCaps; // [out] caps to create surfaces to store compressed data
DDPIXELFORMAT ddPixelFormat; // [out] fourcc to create surfaces to store compressed data
} AMVACompBufferInfo, *LPAMVACompBufferInfo;
// Note that you are NOT allowed to store any pointer in pMiscData
typedef struct _tag_AMVABeginFrameInfo
{
DWORD dwDestSurfaceIndex; // IN destination buffer in which to decoding this frame
LPVOID pInputData; // IN pointer to misc data
DWORD dwSizeInputData; // IN size of other misc data to begin frame
LPVOID pOutputData; // OUT pointer to data which the VGA is going to fill
DWORD dwSizeOutputData; // IN size of data which the VGA is going to fill
} AMVABeginFrameInfo, *LPAMVABeginFrameInfo;
// Note that you are NOT allowed to store any pointer in pMiscData
typedef struct _tag_AMVAEndFrameInfo
{
DWORD dwSizeMiscData; // [in] size of other misc data to begin frame
LPVOID pMiscData; // [in] pointer to misc data
} AMVAEndFrameInfo, *LPAMVAEndFrameInfo;
typedef struct _tag_AMVABUFFERINFO
{
DWORD dwTypeIndex; // [in] Type of buffer
DWORD dwBufferIndex; // [in] Buffer index
DWORD dwDataOffset; // [in] offset of relevant data from the beginning of buffer
DWORD dwDataSize; // [in] size of relevant data
} AMVABUFFERINFO, *LPAMVABUFFERINFO;
#ifdef __cplusplus
};
#endif
#endif // _AMVA_INCLUDED

433
lib/directx8/amvideo.h Executable file
View File

@ -0,0 +1,433 @@
//------------------------------------------------------------------------------
// File: AMVideo.h
//
// Desc: Video related definitions and interfaces for ActiveMovie.
//
// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __AMVIDEO__
#define __AMVIDEO__
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
#include <ddraw.h>
// This is an interface on the video renderer that provides information about
// DirectDraw with respect to its use by the renderer. For example it allows
// an application to get details of the surface and any hardware capabilities
// that are available. It also allows someone to adjust the surfaces that the
// renderer should use and furthermore even set the DirectDraw instance. We
// allow someone to set the DirectDraw instance because DirectDraw can only
// be opened once per process so it helps resolve conflicts. There is some
// duplication in this interface as the hardware/emulated/FOURCCs available
// can all be found through the IDirectDraw interface, this interface allows
// simple access to that information without calling the DirectDraw provider
// itself. The AMDDS prefix is ActiveMovie DirectDraw Switches abbreviated.
#define AMDDS_NONE 0x00 // No use for DCI/DirectDraw
#define AMDDS_DCIPS 0x01 // Use DCI primary surface
#define AMDDS_PS 0x02 // Use DirectDraw primary
#define AMDDS_RGBOVR 0x04 // RGB overlay surfaces
#define AMDDS_YUVOVR 0x08 // YUV overlay surfaces
#define AMDDS_RGBOFF 0x10 // RGB offscreen surfaces
#define AMDDS_YUVOFF 0x20 // YUV offscreen surfaces
#define AMDDS_RGBFLP 0x40 // RGB flipping surfaces
#define AMDDS_YUVFLP 0x80 // YUV flipping surfaces
#define AMDDS_ALL 0xFF // ALL the previous flags
#define AMDDS_DEFAULT AMDDS_ALL // Use all available surfaces
#define AMDDS_YUV (AMDDS_YUVOFF | AMDDS_YUVOVR | AMDDS_YUVFLP)
#define AMDDS_RGB (AMDDS_RGBOFF | AMDDS_RGBOVR | AMDDS_RGBFLP)
#define AMDDS_PRIMARY (AMDDS_DCIPS | AMDDS_PS)
// be nice to our friends in C
#undef INTERFACE
#define INTERFACE IDirectDrawVideo
DECLARE_INTERFACE_(IDirectDrawVideo, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
// IDirectDrawVideo methods
STDMETHOD(GetSwitches)(THIS_ DWORD *pSwitches) PURE;
STDMETHOD(SetSwitches)(THIS_ DWORD Switches) PURE;
STDMETHOD(GetCaps)(THIS_ DDCAPS *pCaps) PURE;
STDMETHOD(GetEmulatedCaps)(THIS_ DDCAPS *pCaps) PURE;
STDMETHOD(GetSurfaceDesc)(THIS_ DDSURFACEDESC *pSurfaceDesc) PURE;
STDMETHOD(GetFourCCCodes)(THIS_ DWORD *pCount,DWORD *pCodes) PURE;
STDMETHOD(SetDirectDraw)(THIS_ LPDIRECTDRAW pDirectDraw) PURE;
STDMETHOD(GetDirectDraw)(THIS_ LPDIRECTDRAW *ppDirectDraw) PURE;
STDMETHOD(GetSurfaceType)(THIS_ DWORD *pSurfaceType) PURE;
STDMETHOD(SetDefault)(THIS) PURE;
STDMETHOD(UseScanLine)(THIS_ long UseScanLine) PURE;
STDMETHOD(CanUseScanLine)(THIS_ long *UseScanLine) PURE;
STDMETHOD(UseOverlayStretch)(THIS_ long UseOverlayStretch) PURE;
STDMETHOD(CanUseOverlayStretch)(THIS_ long *UseOverlayStretch) PURE;
STDMETHOD(UseWhenFullScreen)(THIS_ long UseWhenFullScreen) PURE;
STDMETHOD(WillUseFullScreen)(THIS_ long *UseWhenFullScreen) PURE;
};
// be nice to our friends in C
#undef INTERFACE
#define INTERFACE IQualProp
DECLARE_INTERFACE_(IQualProp, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
// Compare these with the functions in class CGargle in gargle.h
STDMETHOD(get_FramesDroppedInRenderer)(THIS_ int *pcFrames) PURE; // Out
STDMETHOD(get_FramesDrawn)(THIS_ int *pcFramesDrawn) PURE; // Out
STDMETHOD(get_AvgFrameRate)(THIS_ int *piAvgFrameRate) PURE; // Out
STDMETHOD(get_Jitter)(THIS_ int *iJitter) PURE; // Out
STDMETHOD(get_AvgSyncOffset)(THIS_ int *piAvg) PURE; // Out
STDMETHOD(get_DevSyncOffset)(THIS_ int *piDev) PURE; // Out
};
// This interface allows an application or plug in distributor to control a
// full screen renderer. The Modex renderer supports this interface. When
// connected a renderer should load the display modes it has available
// The number of modes available can be obtained through CountModes. Then
// information on each individual mode is available by calling GetModeInfo
// and IsModeAvailable. An application may enable and disable any modes
// by calling the SetEnabled flag with OATRUE or OAFALSE (not C/C++ TRUE
// and FALSE values) - the current value may be queried by IsModeEnabled
// A more generic way of setting the modes enabled that is easier to use
// when writing applications is the clip loss factor. This defines the
// amount of video that can be lost when deciding which display mode to
// use. Assuming the decoder cannot compress the video then playing an
// MPEG file (say 352x288) into a 320x200 display will lose about 25% of
// the image. The clip loss factor specifies the upper range permissible.
// To allow typical MPEG video to be played in 320x200 it defaults to 25%
// be nice to our friends in C
#undef INTERFACE
#define INTERFACE IFullScreenVideo
DECLARE_INTERFACE_(IFullScreenVideo, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
// IFullScreenVideo methods
STDMETHOD(CountModes)(THIS_ long *pModes) PURE;
STDMETHOD(GetModeInfo)(THIS_ long Mode,long *pWidth,long *pHeight,long *pDepth) PURE;
STDMETHOD(GetCurrentMode)(THIS_ long *pMode) PURE;
STDMETHOD(IsModeAvailable)(THIS_ long Mode) PURE;
STDMETHOD(IsModeEnabled)(THIS_ long Mode) PURE;
STDMETHOD(SetEnabled)(THIS_ long Mode,long bEnabled) PURE;
STDMETHOD(GetClipFactor)(THIS_ long *pClipFactor) PURE;
STDMETHOD(SetClipFactor)(THIS_ long ClipFactor) PURE;
STDMETHOD(SetMessageDrain)(THIS_ HWND hwnd) PURE;
STDMETHOD(GetMessageDrain)(THIS_ HWND *hwnd) PURE;
STDMETHOD(SetMonitor)(THIS_ long Monitor) PURE;
STDMETHOD(GetMonitor)(THIS_ long *Monitor) PURE;
STDMETHOD(HideOnDeactivate)(THIS_ long Hide) PURE;
STDMETHOD(IsHideOnDeactivate)(THIS) PURE;
STDMETHOD(SetCaption)(THIS_ BSTR strCaption) PURE;
STDMETHOD(GetCaption)(THIS_ BSTR *pstrCaption) PURE;
STDMETHOD(SetDefault)(THIS) PURE;
};
// This adds the accelerator table capabilities in fullscreen. This is being
// added between the original runtime release and the full SDK release. We
// cannot just add the method to IFullScreenVideo as we don't want to force
// applications to have to ship the ActiveMovie support DLLs - this is very
// important to applications that plan on being downloaded over the Internet
// be nice to our friends in C
#undef INTERFACE
#define INTERFACE IFullScreenVideoEx
DECLARE_INTERFACE_(IFullScreenVideoEx, IFullScreenVideo)
{
// IUnknown methods
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
// IFullScreenVideo methods
STDMETHOD(CountModes)(THIS_ long *pModes) PURE;
STDMETHOD(GetModeInfo)(THIS_ long Mode,long *pWidth,long *pHeight,long *pDepth) PURE;
STDMETHOD(GetCurrentMode)(THIS_ long *pMode) PURE;
STDMETHOD(IsModeAvailable)(THIS_ long Mode) PURE;
STDMETHOD(IsModeEnabled)(THIS_ long Mode) PURE;
STDMETHOD(SetEnabled)(THIS_ long Mode,long bEnabled) PURE;
STDMETHOD(GetClipFactor)(THIS_ long *pClipFactor) PURE;
STDMETHOD(SetClipFactor)(THIS_ long ClipFactor) PURE;
STDMETHOD(SetMessageDrain)(THIS_ HWND hwnd) PURE;
STDMETHOD(GetMessageDrain)(THIS_ HWND *hwnd) PURE;
STDMETHOD(SetMonitor)(THIS_ long Monitor) PURE;
STDMETHOD(GetMonitor)(THIS_ long *Monitor) PURE;
STDMETHOD(HideOnDeactivate)(THIS_ long Hide) PURE;
STDMETHOD(IsHideOnDeactivate)(THIS) PURE;
STDMETHOD(SetCaption)(THIS_ BSTR strCaption) PURE;
STDMETHOD(GetCaption)(THIS_ BSTR *pstrCaption) PURE;
STDMETHOD(SetDefault)(THIS) PURE;
// IFullScreenVideoEx
STDMETHOD(SetAcceleratorTable)(THIS_ HWND hwnd,HACCEL hAccel) PURE;
STDMETHOD(GetAcceleratorTable)(THIS_ HWND *phwnd,HACCEL *phAccel) PURE;
STDMETHOD(KeepPixelAspectRatio)(THIS_ long KeepAspect) PURE;
STDMETHOD(IsKeepPixelAspectRatio)(THIS_ long *pKeepAspect) PURE;
};
// The SDK base classes contain a base video mixer class. Video mixing in a
// software environment is tricky because we typically have multiple streams
// each sending data at unpredictable times. To work with this we defined a
// pin that is the lead pin, when data arrives on this pin we do a mix. As
// an alternative we may not want to have a lead pin but output samples at
// predefined spaces, like one every 1/15 of a second, this interfaces also
// supports that mode of operations (there is a working video mixer sample)
// be nice to our friends in C
#undef INTERFACE
#define INTERFACE IBaseVideoMixer
DECLARE_INTERFACE_(IBaseVideoMixer, IUnknown)
{
STDMETHOD(SetLeadPin)(THIS_ int iPin) PURE;
STDMETHOD(GetLeadPin)(THIS_ int *piPin) PURE;
STDMETHOD(GetInputPinCount)(THIS_ int *piPinCount) PURE;
STDMETHOD(IsUsingClock)(THIS_ int *pbValue) PURE;
STDMETHOD(SetUsingClock)(THIS_ int bValue) PURE;
STDMETHOD(GetClockPeriod)(THIS_ int *pbValue) PURE;
STDMETHOD(SetClockPeriod)(THIS_ int bValue) PURE;
};
#define iPALETTE_COLORS 256 // Maximum colours in palette
#define iEGA_COLORS 16 // Number colours in EGA palette
#define iMASK_COLORS 3 // Maximum three components
#define iTRUECOLOR 16 // Minimum true colour device
#define iRED 0 // Index position for RED mask
#define iGREEN 1 // Index position for GREEN mask
#define iBLUE 2 // Index position for BLUE mask
#define iPALETTE 8 // Maximum colour depth using a palette
#define iMAXBITS 8 // Maximum bits per colour component
// Used for true colour images that also have a palette
typedef struct tag_TRUECOLORINFO {
DWORD dwBitMasks[iMASK_COLORS];
RGBQUAD bmiColors[iPALETTE_COLORS];
} TRUECOLORINFO;
// The BITMAPINFOHEADER contains all the details about the video stream such
// as the actual image dimensions and their pixel depth. A source filter may
// also request that the sink take only a section of the video by providing a
// clipping rectangle in rcSource. In the worst case where the sink filter
// forgets to check this on connection it will simply render the whole thing
// which isn't a disaster. Ideally a sink filter will check the rcSource and
// if it doesn't support image extraction and the rectangle is not empty then
// it will reject the connection. A filter should use SetRectEmpty to reset a
// rectangle to all zeroes (and IsRectEmpty to later check the rectangle).
// The rcTarget specifies the destination rectangle for the video, for most
// source filters they will set this to all zeroes, a downstream filter may
// request that the video be placed in a particular area of the buffers it
// supplies in which case it will call QueryAccept with a non empty target
typedef struct tagVIDEOINFOHEADER {
RECT rcSource; // The bit we really want to use
RECT rcTarget; // Where the video should go
DWORD dwBitRate; // Approximate bit data rate
DWORD dwBitErrorRate; // Bit error rate for this stream
REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
BITMAPINFOHEADER bmiHeader;
} VIDEOINFOHEADER;
// make sure the pbmi is initialized before using these macros
#define TRUECOLOR(pbmi) ((TRUECOLORINFO *)(((LPBYTE)&((pbmi)->bmiHeader)) \
+ (pbmi)->bmiHeader.biSize))
#define COLORS(pbmi) ((RGBQUAD *)(((LPBYTE)&((pbmi)->bmiHeader)) \
+ (pbmi)->bmiHeader.biSize))
#define BITMASKS(pbmi) ((DWORD *)(((LPBYTE)&((pbmi)->bmiHeader)) \
+ (pbmi)->bmiHeader.biSize))
// All the image based filters use this to communicate their media types. It's
// centred principally around the BITMAPINFO. This structure always contains a
// BITMAPINFOHEADER followed by a number of other fields depending on what the
// BITMAPINFOHEADER contains. If it contains details of a palettised format it
// will be followed by one or more RGBQUADs defining the palette. If it holds
// details of a true colour format then it may be followed by a set of three
// DWORD bit masks that specify where the RGB data can be found in the image
// (For more information regarding BITMAPINFOs see the Win32 documentation)
// The rcSource and rcTarget fields are not for use by filters supplying the
// data. The destination (target) rectangle should be set to all zeroes. The
// source may also be zero filled or set with the dimensions of the video. So
// if the video is 352x288 pixels then set it to (0,0,352,288). These fields
// are mainly used by downstream filters that want to ask the source filter
// to place the image in a different position in an output buffer. So when
// using for example the primary surface the video renderer may ask a filter
// to place the video images in a destination position of (100,100,452,388)
// on the display since that's where the window is positioned on the display
// !!! WARNING !!!
// DO NOT use this structure unless you are sure that the BITMAPINFOHEADER
// has a normal biSize == sizeof(BITMAPINFOHEADER) !
// !!! WARNING !!!
typedef struct tagVIDEOINFO {
RECT rcSource; // The bit we really want to use
RECT rcTarget; // Where the video should go
DWORD dwBitRate; // Approximate bit data rate
DWORD dwBitErrorRate; // Bit error rate for this stream
REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
BITMAPINFOHEADER bmiHeader;
union {
RGBQUAD bmiColors[iPALETTE_COLORS]; // Colour palette
DWORD dwBitMasks[iMASK_COLORS]; // True colour masks
TRUECOLORINFO TrueColorInfo; // Both of the above
};
} VIDEOINFO;
// These macros define some standard bitmap format sizes
#define SIZE_EGA_PALETTE (iEGA_COLORS * sizeof(RGBQUAD))
#define SIZE_PALETTE (iPALETTE_COLORS * sizeof(RGBQUAD))
#define SIZE_MASKS (iMASK_COLORS * sizeof(DWORD))
#define SIZE_PREHEADER (FIELD_OFFSET(VIDEOINFOHEADER,bmiHeader))
#define SIZE_VIDEOHEADER (sizeof(BITMAPINFOHEADER) + SIZE_PREHEADER)
// !!! for abnormal biSizes
// #define SIZE_VIDEOHEADER(pbmi) ((pbmi)->bmiHeader.biSize + SIZE_PREHEADER)
// DIBSIZE calculates the number of bytes required by an image
#define WIDTHBYTES(bits) ((DWORD)(((bits)+31) & (~31)) / 8)
#define DIBWIDTHBYTES(bi) (DWORD)WIDTHBYTES((DWORD)(bi).biWidth * (DWORD)(bi).biBitCount)
#define _DIBSIZE(bi) (DIBWIDTHBYTES(bi) * (DWORD)(bi).biHeight)
#define DIBSIZE(bi) ((bi).biHeight < 0 ? (-1)*(_DIBSIZE(bi)) : _DIBSIZE(bi))
// This compares the bit masks between two VIDEOINFOHEADERs
#define BIT_MASKS_MATCH(pbmi1,pbmi2) \
(((pbmi1)->dwBitMasks[iRED] == (pbmi2)->dwBitMasks[iRED]) && \
((pbmi1)->dwBitMasks[iGREEN] == (pbmi2)->dwBitMasks[iGREEN]) && \
((pbmi1)->dwBitMasks[iBLUE] == (pbmi2)->dwBitMasks[iBLUE]))
// These zero fill different parts of the VIDEOINFOHEADER structure
// Only use these macros for pbmi's with a normal BITMAPINFOHEADER biSize
#define RESET_MASKS(pbmi) (ZeroMemory((PVOID)(pbmi)->dwBitFields,SIZE_MASKS))
#define RESET_HEADER(pbmi) (ZeroMemory((PVOID)(pbmi),SIZE_VIDEOHEADER))
#define RESET_PALETTE(pbmi) (ZeroMemory((PVOID)(pbmi)->bmiColors,SIZE_PALETTE));
#if 0
// !!! This is the right way to do it, but may break existing code
#define RESET_MASKS(pbmi) (ZeroMemory((PVOID)(((LPBYTE)(pbmi)->bmiHeader) + \
(pbmi)->bmiHeader.biSize,SIZE_MASKS)))
#define RESET_HEADER(pbmi) (ZeroMemory((PVOID)(pbmi), SIZE_PREHEADER + \
sizeof(BITMAPINFOHEADER)))
#define RESET_PALETTE(pbmi) (ZeroMemory((PVOID)(((LPBYTE)(pbmi)->bmiHeader) + \
(pbmi)->bmiHeader.biSize,SIZE_PALETTE))
#endif
// Other (hopefully) useful bits and bobs
#define PALETTISED(pbmi) ((pbmi)->bmiHeader.biBitCount <= iPALETTE)
#define PALETTE_ENTRIES(pbmi) ((DWORD) 1 << (pbmi)->bmiHeader.biBitCount)
// Returns the address of the BITMAPINFOHEADER from the VIDEOINFOHEADER
#define HEADER(pVideoInfo) (&(((VIDEOINFOHEADER *) (pVideoInfo))->bmiHeader))
// MPEG variant - includes a DWORD length followed by the
// video sequence header after the video header.
//
// The sequence header includes the sequence header start code and the
// quantization matrices associated with the first sequence header in the
// stream so is a maximum of 140 bytes long.
typedef struct tagMPEG1VIDEOINFO {
VIDEOINFOHEADER hdr; // Compatible with VIDEOINFO
DWORD dwStartTimeCode; // 25-bit Group of pictures time code
// at start of data
DWORD cbSequenceHeader; // Length in bytes of bSequenceHeader
BYTE bSequenceHeader[1]; // Sequence header including
// quantization matrices if any
} MPEG1VIDEOINFO;
#define MAX_SIZE_MPEG1_SEQUENCE_INFO 140
#define SIZE_MPEG1VIDEOINFO(pv) (FIELD_OFFSET(MPEG1VIDEOINFO, bSequenceHeader[0]) + (pv)->cbSequenceHeader)
#define MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader)
// Analog video variant - Use this when the format is FORMAT_AnalogVideo
//
// rcSource defines the portion of the active video signal to use
// rcTarget defines the destination rectangle
// both of the above are relative to the dwActiveWidth and dwActiveHeight fields
// dwActiveWidth is currently set to 720 for all formats (but could change for HDTV)
// dwActiveHeight is 483 for NTSC and 575 for PAL/SECAM (but could change for HDTV)
typedef struct tagAnalogVideoInfo {
RECT rcSource; // Width max is 720, height varies w/ TransmissionStd
RECT rcTarget; // Where the video should go
DWORD dwActiveWidth; // Always 720 (CCIR-601 active samples per line)
DWORD dwActiveHeight; // 483 for NTSC, 575 for PAL/SECAM
REFERENCE_TIME AvgTimePerFrame; // Normal ActiveMovie units (100 nS)
} ANALOGVIDEOINFO;
//
// AM_KSPROPSETID_FrameStep property set definitions
//
typedef enum {
// Step
AM_PROPERTY_FRAMESTEP_STEP = 0x01,
AM_PROPERTY_FRAMESTEP_CANCEL = 0x02,
// S_OK for these 2 means we can - S_FALSE if we can't
AM_PROPERTY_FRAMESTEP_CANSTEP = 0x03,
AM_PROPERTY_FRAMESTEP_CANSTEPMULTIPLE = 0x04
} AM_PROPERTY_FRAMESTEP;
typedef struct _AM_FRAMESTEP_STEP
{
// 1 means step 1 frame forward
// 0 is invalid
// n (n > 1) means skip n - 1 frames and show the nth
DWORD dwFramesToStep;
} AM_FRAMESTEP_STEP;
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // __AMVIDEO__

34
lib/directx8/atsmedia.h Executable file
View File

@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// File: ATSMedia.h
//
// Desc: Broadcast Driver Architecture Media Definitions for ATSC
//
// Copyright (c) 1996 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#if !defined(_KSMEDIA_)
#error KSMEDIA.H must be included before BDAMEDIA.H
#endif // !defined(_KSMEDIA_)
#if !defined(_BDAMEDIA_)
#error BDAMEDIA.H must be included before ATSCMEDIA.H
#endif // !defined(_KSMEDIA_)
#if !defined(_ATSCMEDIA_)
#define _ATSCMEDIA_
//===========================================================================
//
// ATSC Network Type
//
//===========================================================================
#define STATIC_BDANETWORKTYPE_ATSC\
0x71985f51, 0x1ca1, 0x11d3, 0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0
DEFINE_GUIDSTRUCT("71985F51-1CA1-11d3-9CC8-00C04F7971E0", BDANETWORKTYPE_ATSC);
#define BDANETWORKTYPE_ATSC DEFINE_GUIDNAMED(BDANETWORKTYPE_ATSC)
#endif // _ATSCMEDIA_

53
lib/directx8/audevcod.h Executable file
View File

@ -0,0 +1,53 @@
//------------------------------------------------------------------------------
// File: AudEvCod.h
//
// Desc: List of Audio device error event codes and the expected params.
//
// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __AUDEVCOD__
#define __AUDEVCOD__
#define EC_SND_DEVICE_ERROR_BASE 0x0200
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_ERR;
// Sound device error event codes
// ==============================
//
// All audio device error events are always passed on to the application, and are
// never processed by the filter graph
#define EC_SNDDEV_IN_ERROR (EC_SND_DEVICE_ERROR_BASE + 0x00)
#define EC_SNDDEV_OUT_ERROR (EC_SND_DEVICE_ERROR_BASE + 0x01)
// Parameters: ( DWORD, DWORD)
// lParam1 is an enum SND_DEVICE_ERROR which notifies the app how the device was
// being accessed when the failure occurred.
//
// lParam2 is the error returned from the sound device call.
//
#endif // __AUDEVCOD__

715
lib/directx8/austream.h Executable file
View File

@ -0,0 +1,715 @@
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 6.00.0338 */
/* Compiler settings for austream.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
protocol : dce , ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
//@@MIDL_FILE_HEADING( )
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 440
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __austream_h__
#define __austream_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __IAudioMediaStream_FWD_DEFINED__
#define __IAudioMediaStream_FWD_DEFINED__
typedef interface IAudioMediaStream IAudioMediaStream;
#endif /* __IAudioMediaStream_FWD_DEFINED__ */
#ifndef __IAudioStreamSample_FWD_DEFINED__
#define __IAudioStreamSample_FWD_DEFINED__
typedef interface IAudioStreamSample IAudioStreamSample;
#endif /* __IAudioStreamSample_FWD_DEFINED__ */
#ifndef __IMemoryData_FWD_DEFINED__
#define __IMemoryData_FWD_DEFINED__
typedef interface IMemoryData IMemoryData;
#endif /* __IMemoryData_FWD_DEFINED__ */
#ifndef __IAudioData_FWD_DEFINED__
#define __IAudioData_FWD_DEFINED__
typedef interface IAudioData IAudioData;
#endif /* __IAudioData_FWD_DEFINED__ */
/* header files for imported files */
#include "unknwn.h"
#include "mmstream.h"
#ifdef __cplusplus
extern "C"{
#endif
void * __RPC_USER MIDL_user_allocate(size_t);
void __RPC_USER MIDL_user_free( void * );
/* interface __MIDL_itf_austream_0000 */
/* [local] */
//
// The following declarations within the 'if 0' block are dummy typedefs used to make
// the ddstream.idl file build. The actual definitions are contained in DDRAW.H
//
#if 0
typedef struct tWAVEFORMATEX WAVEFORMATEX;
#endif
extern RPC_IF_HANDLE __MIDL_itf_austream_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_austream_0000_v0_0_s_ifspec;
#ifndef __IAudioMediaStream_INTERFACE_DEFINED__
#define __IAudioMediaStream_INTERFACE_DEFINED__
/* interface IAudioMediaStream */
/* [unique][uuid][local][object] */
EXTERN_C const IID IID_IAudioMediaStream;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("f7537560-a3be-11d0-8212-00c04fc32c45")
IAudioMediaStream : public IMediaStream
{
public:
virtual HRESULT STDMETHODCALLTYPE GetFormat(
/* [out] */ WAVEFORMATEX *pWaveFormatCurrent) = 0;
virtual HRESULT STDMETHODCALLTYPE SetFormat(
/* [in] */ const WAVEFORMATEX *lpWaveFormat) = 0;
virtual HRESULT STDMETHODCALLTYPE CreateSample(
/* [in] */ IAudioData *pAudioData,
/* [in] */ DWORD dwFlags,
/* [out] */ IAudioStreamSample **ppSample) = 0;
};
#else /* C style interface */
typedef struct IAudioMediaStreamVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IAudioMediaStream * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IAudioMediaStream * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IAudioMediaStream * This);
HRESULT ( STDMETHODCALLTYPE *GetMultiMediaStream )(
IAudioMediaStream * This,
/* [out] */ IMultiMediaStream **ppMultiMediaStream);
HRESULT ( STDMETHODCALLTYPE *GetInformation )(
IAudioMediaStream * This,
/* [out] */ MSPID *pPurposeId,
/* [out] */ STREAM_TYPE *pType);
HRESULT ( STDMETHODCALLTYPE *SetSameFormat )(
IAudioMediaStream * This,
/* [in] */ IMediaStream *pStreamThatHasDesiredFormat,
/* [in] */ DWORD dwFlags);
HRESULT ( STDMETHODCALLTYPE *AllocateSample )(
IAudioMediaStream * This,
/* [in] */ DWORD dwFlags,
/* [out] */ IStreamSample **ppSample);
HRESULT ( STDMETHODCALLTYPE *CreateSharedSample )(
IAudioMediaStream * This,
/* [in] */ IStreamSample *pExistingSample,
/* [in] */ DWORD dwFlags,
/* [out] */ IStreamSample **ppNewSample);
HRESULT ( STDMETHODCALLTYPE *SendEndOfStream )(
IAudioMediaStream * This,
DWORD dwFlags);
HRESULT ( STDMETHODCALLTYPE *GetFormat )(
IAudioMediaStream * This,
/* [out] */ WAVEFORMATEX *pWaveFormatCurrent);
HRESULT ( STDMETHODCALLTYPE *SetFormat )(
IAudioMediaStream * This,
/* [in] */ const WAVEFORMATEX *lpWaveFormat);
HRESULT ( STDMETHODCALLTYPE *CreateSample )(
IAudioMediaStream * This,
/* [in] */ IAudioData *pAudioData,
/* [in] */ DWORD dwFlags,
/* [out] */ IAudioStreamSample **ppSample);
END_INTERFACE
} IAudioMediaStreamVtbl;
interface IAudioMediaStream
{
CONST_VTBL struct IAudioMediaStreamVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IAudioMediaStream_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IAudioMediaStream_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IAudioMediaStream_Release(This) \
(This)->lpVtbl -> Release(This)
#define IAudioMediaStream_GetMultiMediaStream(This,ppMultiMediaStream) \
(This)->lpVtbl -> GetMultiMediaStream(This,ppMultiMediaStream)
#define IAudioMediaStream_GetInformation(This,pPurposeId,pType) \
(This)->lpVtbl -> GetInformation(This,pPurposeId,pType)
#define IAudioMediaStream_SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags) \
(This)->lpVtbl -> SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags)
#define IAudioMediaStream_AllocateSample(This,dwFlags,ppSample) \
(This)->lpVtbl -> AllocateSample(This,dwFlags,ppSample)
#define IAudioMediaStream_CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample) \
(This)->lpVtbl -> CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample)
#define IAudioMediaStream_SendEndOfStream(This,dwFlags) \
(This)->lpVtbl -> SendEndOfStream(This,dwFlags)
#define IAudioMediaStream_GetFormat(This,pWaveFormatCurrent) \
(This)->lpVtbl -> GetFormat(This,pWaveFormatCurrent)
#define IAudioMediaStream_SetFormat(This,lpWaveFormat) \
(This)->lpVtbl -> SetFormat(This,lpWaveFormat)
#define IAudioMediaStream_CreateSample(This,pAudioData,dwFlags,ppSample) \
(This)->lpVtbl -> CreateSample(This,pAudioData,dwFlags,ppSample)
#endif /* COBJMACROS */
#endif /* C style interface */
HRESULT STDMETHODCALLTYPE IAudioMediaStream_GetFormat_Proxy(
IAudioMediaStream * This,
/* [out] */ WAVEFORMATEX *pWaveFormatCurrent);
void __RPC_STUB IAudioMediaStream_GetFormat_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IAudioMediaStream_SetFormat_Proxy(
IAudioMediaStream * This,
/* [in] */ const WAVEFORMATEX *lpWaveFormat);
void __RPC_STUB IAudioMediaStream_SetFormat_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IAudioMediaStream_CreateSample_Proxy(
IAudioMediaStream * This,
/* [in] */ IAudioData *pAudioData,
/* [in] */ DWORD dwFlags,
/* [out] */ IAudioStreamSample **ppSample);
void __RPC_STUB IAudioMediaStream_CreateSample_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IAudioMediaStream_INTERFACE_DEFINED__ */
#ifndef __IAudioStreamSample_INTERFACE_DEFINED__
#define __IAudioStreamSample_INTERFACE_DEFINED__
/* interface IAudioStreamSample */
/* [unique][uuid][local][object] */
EXTERN_C const IID IID_IAudioStreamSample;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("345fee00-aba5-11d0-8212-00c04fc32c45")
IAudioStreamSample : public IStreamSample
{
public:
virtual HRESULT STDMETHODCALLTYPE GetAudioData(
/* [out] */ IAudioData **ppAudio) = 0;
};
#else /* C style interface */
typedef struct IAudioStreamSampleVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IAudioStreamSample * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IAudioStreamSample * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IAudioStreamSample * This);
HRESULT ( STDMETHODCALLTYPE *GetMediaStream )(
IAudioStreamSample * This,
/* [in] */ IMediaStream **ppMediaStream);
HRESULT ( STDMETHODCALLTYPE *GetSampleTimes )(
IAudioStreamSample * This,
/* [out] */ STREAM_TIME *pStartTime,
/* [out] */ STREAM_TIME *pEndTime,
/* [out] */ STREAM_TIME *pCurrentTime);
HRESULT ( STDMETHODCALLTYPE *SetSampleTimes )(
IAudioStreamSample * This,
/* [in] */ const STREAM_TIME *pStartTime,
/* [in] */ const STREAM_TIME *pEndTime);
HRESULT ( STDMETHODCALLTYPE *Update )(
IAudioStreamSample * This,
/* [in] */ DWORD dwFlags,
/* [in] */ HANDLE hEvent,
/* [in] */ PAPCFUNC pfnAPC,
/* [in] */ DWORD_PTR dwAPCData);
HRESULT ( STDMETHODCALLTYPE *CompletionStatus )(
IAudioStreamSample * This,
/* [in] */ DWORD dwFlags,
/* [in] */ DWORD dwMilliseconds);
HRESULT ( STDMETHODCALLTYPE *GetAudioData )(
IAudioStreamSample * This,
/* [out] */ IAudioData **ppAudio);
END_INTERFACE
} IAudioStreamSampleVtbl;
interface IAudioStreamSample
{
CONST_VTBL struct IAudioStreamSampleVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IAudioStreamSample_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IAudioStreamSample_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IAudioStreamSample_Release(This) \
(This)->lpVtbl -> Release(This)
#define IAudioStreamSample_GetMediaStream(This,ppMediaStream) \
(This)->lpVtbl -> GetMediaStream(This,ppMediaStream)
#define IAudioStreamSample_GetSampleTimes(This,pStartTime,pEndTime,pCurrentTime) \
(This)->lpVtbl -> GetSampleTimes(This,pStartTime,pEndTime,pCurrentTime)
#define IAudioStreamSample_SetSampleTimes(This,pStartTime,pEndTime) \
(This)->lpVtbl -> SetSampleTimes(This,pStartTime,pEndTime)
#define IAudioStreamSample_Update(This,dwFlags,hEvent,pfnAPC,dwAPCData) \
(This)->lpVtbl -> Update(This,dwFlags,hEvent,pfnAPC,dwAPCData)
#define IAudioStreamSample_CompletionStatus(This,dwFlags,dwMilliseconds) \
(This)->lpVtbl -> CompletionStatus(This,dwFlags,dwMilliseconds)
#define IAudioStreamSample_GetAudioData(This,ppAudio) \
(This)->lpVtbl -> GetAudioData(This,ppAudio)
#endif /* COBJMACROS */
#endif /* C style interface */
HRESULT STDMETHODCALLTYPE IAudioStreamSample_GetAudioData_Proxy(
IAudioStreamSample * This,
/* [out] */ IAudioData **ppAudio);
void __RPC_STUB IAudioStreamSample_GetAudioData_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IAudioStreamSample_INTERFACE_DEFINED__ */
#ifndef __IMemoryData_INTERFACE_DEFINED__
#define __IMemoryData_INTERFACE_DEFINED__
/* interface IMemoryData */
/* [unique][uuid][local][object] */
EXTERN_C const IID IID_IMemoryData;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("327fc560-af60-11d0-8212-00c04fc32c45")
IMemoryData : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE SetBuffer(
/* [in] */ DWORD cbSize,
/* [in] */ BYTE *pbData,
/* [in] */ DWORD dwFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE GetInfo(
/* [out] */ DWORD *pdwLength,
/* [out] */ BYTE **ppbData,
/* [out] */ DWORD *pcbActualData) = 0;
virtual HRESULT STDMETHODCALLTYPE SetActual(
/* [in] */ DWORD cbDataValid) = 0;
};
#else /* C style interface */
typedef struct IMemoryDataVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IMemoryData * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IMemoryData * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IMemoryData * This);
HRESULT ( STDMETHODCALLTYPE *SetBuffer )(
IMemoryData * This,
/* [in] */ DWORD cbSize,
/* [in] */ BYTE *pbData,
/* [in] */ DWORD dwFlags);
HRESULT ( STDMETHODCALLTYPE *GetInfo )(
IMemoryData * This,
/* [out] */ DWORD *pdwLength,
/* [out] */ BYTE **ppbData,
/* [out] */ DWORD *pcbActualData);
HRESULT ( STDMETHODCALLTYPE *SetActual )(
IMemoryData * This,
/* [in] */ DWORD cbDataValid);
END_INTERFACE
} IMemoryDataVtbl;
interface IMemoryData
{
CONST_VTBL struct IMemoryDataVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IMemoryData_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IMemoryData_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IMemoryData_Release(This) \
(This)->lpVtbl -> Release(This)
#define IMemoryData_SetBuffer(This,cbSize,pbData,dwFlags) \
(This)->lpVtbl -> SetBuffer(This,cbSize,pbData,dwFlags)
#define IMemoryData_GetInfo(This,pdwLength,ppbData,pcbActualData) \
(This)->lpVtbl -> GetInfo(This,pdwLength,ppbData,pcbActualData)
#define IMemoryData_SetActual(This,cbDataValid) \
(This)->lpVtbl -> SetActual(This,cbDataValid)
#endif /* COBJMACROS */
#endif /* C style interface */
HRESULT STDMETHODCALLTYPE IMemoryData_SetBuffer_Proxy(
IMemoryData * This,
/* [in] */ DWORD cbSize,
/* [in] */ BYTE *pbData,
/* [in] */ DWORD dwFlags);
void __RPC_STUB IMemoryData_SetBuffer_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMemoryData_GetInfo_Proxy(
IMemoryData * This,
/* [out] */ DWORD *pdwLength,
/* [out] */ BYTE **ppbData,
/* [out] */ DWORD *pcbActualData);
void __RPC_STUB IMemoryData_GetInfo_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMemoryData_SetActual_Proxy(
IMemoryData * This,
/* [in] */ DWORD cbDataValid);
void __RPC_STUB IMemoryData_SetActual_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IMemoryData_INTERFACE_DEFINED__ */
#ifndef __IAudioData_INTERFACE_DEFINED__
#define __IAudioData_INTERFACE_DEFINED__
/* interface IAudioData */
/* [unique][uuid][local][object] */
EXTERN_C const IID IID_IAudioData;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("54c719c0-af60-11d0-8212-00c04fc32c45")
IAudioData : public IMemoryData
{
public:
virtual HRESULT STDMETHODCALLTYPE GetFormat(
/* [out] */ WAVEFORMATEX *pWaveFormatCurrent) = 0;
virtual HRESULT STDMETHODCALLTYPE SetFormat(
/* [in] */ const WAVEFORMATEX *lpWaveFormat) = 0;
};
#else /* C style interface */
typedef struct IAudioDataVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IAudioData * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IAudioData * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IAudioData * This);
HRESULT ( STDMETHODCALLTYPE *SetBuffer )(
IAudioData * This,
/* [in] */ DWORD cbSize,
/* [in] */ BYTE *pbData,
/* [in] */ DWORD dwFlags);
HRESULT ( STDMETHODCALLTYPE *GetInfo )(
IAudioData * This,
/* [out] */ DWORD *pdwLength,
/* [out] */ BYTE **ppbData,
/* [out] */ DWORD *pcbActualData);
HRESULT ( STDMETHODCALLTYPE *SetActual )(
IAudioData * This,
/* [in] */ DWORD cbDataValid);
HRESULT ( STDMETHODCALLTYPE *GetFormat )(
IAudioData * This,
/* [out] */ WAVEFORMATEX *pWaveFormatCurrent);
HRESULT ( STDMETHODCALLTYPE *SetFormat )(
IAudioData * This,
/* [in] */ const WAVEFORMATEX *lpWaveFormat);
END_INTERFACE
} IAudioDataVtbl;
interface IAudioData
{
CONST_VTBL struct IAudioDataVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IAudioData_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IAudioData_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IAudioData_Release(This) \
(This)->lpVtbl -> Release(This)
#define IAudioData_SetBuffer(This,cbSize,pbData,dwFlags) \
(This)->lpVtbl -> SetBuffer(This,cbSize,pbData,dwFlags)
#define IAudioData_GetInfo(This,pdwLength,ppbData,pcbActualData) \
(This)->lpVtbl -> GetInfo(This,pdwLength,ppbData,pcbActualData)
#define IAudioData_SetActual(This,cbDataValid) \
(This)->lpVtbl -> SetActual(This,cbDataValid)
#define IAudioData_GetFormat(This,pWaveFormatCurrent) \
(This)->lpVtbl -> GetFormat(This,pWaveFormatCurrent)
#define IAudioData_SetFormat(This,lpWaveFormat) \
(This)->lpVtbl -> SetFormat(This,lpWaveFormat)
#endif /* COBJMACROS */
#endif /* C style interface */
HRESULT STDMETHODCALLTYPE IAudioData_GetFormat_Proxy(
IAudioData * This,
/* [out] */ WAVEFORMATEX *pWaveFormatCurrent);
void __RPC_STUB IAudioData_GetFormat_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IAudioData_SetFormat_Proxy(
IAudioData * This,
/* [in] */ const WAVEFORMATEX *lpWaveFormat);
void __RPC_STUB IAudioData_SetFormat_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IAudioData_INTERFACE_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

402
lib/directx8/aviriff.h Executable file
View File

@ -0,0 +1,402 @@
//------------------------------------------------------------------------------
// File: AVIRIFF.h
//
// Desc: Structures and defines for the RIFF AVI file format extended to
// handle very large/long files.
//
// Copyright (c) 1996 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#pragma warning(disable: 4097 4511 4512 4514 4705)
#if !defined AVIRIFF_H
#define AVIRIFF_H
#if !defined NUMELMS
#define NUMELMS(aa) (sizeof(aa)/sizeof((aa)[0]))
#endif
// all structures in this file are packed on word boundaries
//
#include <pshpack2.h>
/*
* heres the general layout of an AVI riff file (new format)
*
* RIFF (3F??????) AVI <- not more than 1 GB in size
* LIST (size) hdrl
* avih (0038)
* LIST (size) strl
* strh (0038)
* strf (????)
* indx (3ff8) <- size may vary, should be sector sized
* LIST (size) strl
* strh (0038)
* strf (????)
* indx (3ff8) <- size may vary, should be sector sized
* LIST (size) odml
* dmlh (????)
* JUNK (size) <- fill to align to sector - 12
* LIST (7f??????) movi <- aligned on sector - 12
* 00dc (size) <- sector aligned
* 01wb (size) <- sector aligned
* ix00 (size) <- sector aligned
* idx1 (00??????) <- sector aligned
* RIFF (7F??????) AVIX
* JUNK (size) <- fill to align to sector -12
* LIST (size) movi
* 00dc (size) <- sector aligned
* RIFF (7F??????) AVIX <- not more than 2GB in size
* JUNK (size) <- fill to align to sector - 12
* LIST (size) movi
* 00dc (size) <- sector aligned
*
*-===================================================================*/
//
// structures for manipulating RIFF headers
//
#define FCC(ch4) ((((DWORD)(ch4) & 0xFF) << 24) | \
(((DWORD)(ch4) & 0xFF00) << 8) | \
(((DWORD)(ch4) & 0xFF0000) >> 8) | \
(((DWORD)(ch4) & 0xFF000000) >> 24))
typedef struct _riffchunk {
FOURCC fcc;
DWORD cb;
} RIFFCHUNK, * LPRIFFCHUNK;
typedef struct _rifflist {
FOURCC fcc;
DWORD cb;
FOURCC fccListType;
} RIFFLIST, * LPRIFFLIST;
#define RIFFROUND(cb) ((cb) + ((cb)&1))
#define RIFFNEXT(pChunk) (LPRIFFCHUNK)((LPBYTE)(pChunk) \
+ sizeof(RIFFCHUNK) \
+ RIFFROUND(((LPRIFFCHUNK)pChunk)->cb))
//
// ==================== avi header structures ===========================
//
// main header for the avi file (compatibility header)
//
#define ckidMAINAVIHEADER FCC('avih')
typedef struct _avimainheader {
FOURCC fcc; // 'avih'
DWORD cb; // size of this structure -8
DWORD dwMicroSecPerFrame; // frame display rate (or 0L)
DWORD dwMaxBytesPerSec; // max. transfer rate
DWORD dwPaddingGranularity; // pad to multiples of this size; normally 2K.
DWORD dwFlags; // the ever-present flags
#define AVIF_HASINDEX 0x00000010 // Index at end of file?
#define AVIF_MUSTUSEINDEX 0x00000020
#define AVIF_ISINTERLEAVED 0x00000100
#define AVIF_TRUSTCKTYPE 0x00000800 // Use CKType to find key frames
#define AVIF_WASCAPTUREFILE 0x00010000
#define AVIF_COPYRIGHTED 0x00020000
DWORD dwTotalFrames; // # frames in first movi list
DWORD dwInitialFrames;
DWORD dwStreams;
DWORD dwSuggestedBufferSize;
DWORD dwWidth;
DWORD dwHeight;
DWORD dwReserved[4];
} AVIMAINHEADER;
#define ckidODML FCC('odml')
#define ckidAVIEXTHEADER FCC('dmlh')
typedef struct _aviextheader {
FOURCC fcc; // 'dmlh'
DWORD cb; // size of this structure -8
DWORD dwGrandFrames; // total number of frames in the file
DWORD dwFuture[61]; // to be defined later
} AVIEXTHEADER;
//
// structure of an AVI stream header riff chunk
//
#define ckidSTREAMLIST FCC('strl')
#ifndef ckidSTREAMHEADER
#define ckidSTREAMHEADER FCC('strh')
#endif
typedef struct _avistreamheader {
FOURCC fcc; // 'strh'
DWORD cb; // size of this structure - 8
FOURCC fccType; // stream type codes
#ifndef streamtypeVIDEO
#define streamtypeVIDEO FCC('vids')
#define streamtypeAUDIO FCC('auds')
#define streamtypeMIDI FCC('mids')
#define streamtypeTEXT FCC('txts')
#endif
FOURCC fccHandler;
DWORD dwFlags;
#define AVISF_DISABLED 0x00000001
#define AVISF_VIDEO_PALCHANGES 0x00010000
WORD wPriority;
WORD wLanguage;
DWORD dwInitialFrames;
DWORD dwScale;
DWORD dwRate; // dwRate/dwScale is stream tick rate in ticks/sec
DWORD dwStart;
DWORD dwLength;
DWORD dwSuggestedBufferSize;
DWORD dwQuality;
DWORD dwSampleSize;
struct {
short int left;
short int top;
short int right;
short int bottom;
} rcFrame;
} AVISTREAMHEADER;
//
// structure of an AVI stream format chunk
//
#ifndef ckidSTREAMFORMAT
#define ckidSTREAMFORMAT FCC('strf')
#endif
//
// avi stream formats are different for each stream type
//
// BITMAPINFOHEADER for video streams
// WAVEFORMATEX or PCMWAVEFORMAT for audio streams
// nothing for text streams
// nothing for midi streams
#pragma warning(disable:4200)
//
// structure of old style AVI index
//
#define ckidAVIOLDINDEX FCC('idx1')
typedef struct _avioldindex {
FOURCC fcc; // 'idx1'
DWORD cb; // size of this structure -8
struct _avioldindex_entry {
DWORD dwChunkId;
DWORD dwFlags;
#ifndef AVIIF_LIST
#define AVIIF_LIST 0x00000001
#define AVIIF_KEYFRAME 0x00000010
#endif
#define AVIIF_NO_TIME 0x00000100
#define AVIIF_COMPRESSOR 0x0FFF0000 // unused?
DWORD dwOffset; // offset of riff chunk header for the data
DWORD dwSize; // size of the data (excluding riff header size)
} aIndex[]; // size of this array
} AVIOLDINDEX;
//
// ============ structures for timecode in an AVI file =================
//
#ifndef TIMECODE_DEFINED
#define TIMECODE_DEFINED
// defined
// timecode time structure
//
typedef union _timecode {
struct {
WORD wFrameRate;
WORD wFrameFract;
LONG cFrames;
};
DWORDLONG qw;
} TIMECODE;
#endif // TIMECODE_DEFINED
#define TIMECODE_RATE_30DROP 0 // this MUST be zero
// struct for all the SMPTE timecode info
//
typedef struct _timecodedata {
TIMECODE time;
DWORD dwSMPTEflags;
DWORD dwUser;
} TIMECODEDATA;
// dwSMPTEflags masks/values
//
#define TIMECODE_SMPTE_BINARY_GROUP 0x07
#define TIMECODE_SMPTE_COLOR_FRAME 0x08
//
// ============ structures for new style AVI indexes =================
//
// index type codes
//
#define AVI_INDEX_OF_INDEXES 0x00
#define AVI_INDEX_OF_CHUNKS 0x01
#define AVI_INDEX_OF_TIMED_CHUNKS 0x02
#define AVI_INDEX_OF_SUB_2FIELD 0x03
#define AVI_INDEX_IS_DATA 0x80
// index subtype codes
//
#define AVI_INDEX_SUB_DEFAULT 0x00
// INDEX_OF_CHUNKS subtype codes
//
#define AVI_INDEX_SUB_2FIELD 0x01
// meta structure of all avi indexes
//
typedef struct _avimetaindex {
FOURCC fcc;
UINT cb;
WORD wLongsPerEntry;
BYTE bIndexSubType;
BYTE bIndexType;
DWORD nEntriesInUse;
DWORD dwChunkId;
DWORD dwReserved[3];
DWORD adwIndex[];
} AVIMETAINDEX;
#define STDINDEXSIZE 0x4000
#define NUMINDEX(wLongsPerEntry) ((STDINDEXSIZE-32)/4/(wLongsPerEntry))
#define NUMINDEXFILL(wLongsPerEntry) ((STDINDEXSIZE/4) - NUMINDEX(wLongsPerEntry))
// structure of a super index (INDEX_OF_INDEXES)
//
#define ckidAVISUPERINDEX FCC('indx')
typedef struct _avisuperindex {
FOURCC fcc; // 'indx'
UINT cb; // size of this structure
WORD wLongsPerEntry; // ==4
BYTE bIndexSubType; // ==0 (frame index) or AVI_INDEX_SUB_2FIELD
BYTE bIndexType; // ==AVI_INDEX_OF_INDEXES
DWORD nEntriesInUse; // offset of next unused entry in aIndex
DWORD dwChunkId; // chunk ID of chunks being indexed, (i.e. RGB8)
DWORD dwReserved[3]; // must be 0
struct _avisuperindex_entry {
DWORDLONG qwOffset; // 64 bit offset to sub index chunk
DWORD dwSize; // 32 bit size of sub index chunk
DWORD dwDuration; // time span of subindex chunk (in stream ticks)
} aIndex[NUMINDEX(4)];
} AVISUPERINDEX;
#define Valid_SUPERINDEX(pi) (*(DWORD *)(&((pi)->wLongsPerEntry)) == (4 | (AVI_INDEX_OF_INDEXES << 24)))
// struct of a standard index (AVI_INDEX_OF_CHUNKS)
//
typedef struct _avistdindex_entry {
DWORD dwOffset; // 32 bit offset to data (points to data, not riff header)
DWORD dwSize; // 31 bit size of data (does not include size of riff header), bit 31 is deltaframe bit
} AVISTDINDEX_ENTRY;
#define AVISTDINDEX_DELTAFRAME ( 0x80000000) // Delta frames have the high bit set
#define AVISTDINDEX_SIZEMASK (~0x80000000)
typedef struct _avistdindex {
FOURCC fcc; // 'indx' or '##ix'
UINT cb; // size of this structure
WORD wLongsPerEntry; // ==2
BYTE bIndexSubType; // ==0
BYTE bIndexType; // ==AVI_INDEX_OF_CHUNKS
DWORD nEntriesInUse; // offset of next unused entry in aIndex
DWORD dwChunkId; // chunk ID of chunks being indexed, (i.e. RGB8)
DWORDLONG qwBaseOffset; // base offset that all index intries are relative to
DWORD dwReserved_3; // must be 0
AVISTDINDEX_ENTRY aIndex[NUMINDEX(2)];
} AVISTDINDEX;
// struct of a time variant standard index (AVI_INDEX_OF_TIMED_CHUNKS)
//
typedef struct _avitimedindex_entry {
DWORD dwOffset; // 32 bit offset to data (points to data, not riff header)
DWORD dwSize; // 31 bit size of data (does not include size of riff header) (high bit is deltaframe bit)
DWORD dwDuration; // how much time the chunk should be played (in stream ticks)
} AVITIMEDINDEX_ENTRY;
typedef struct _avitimedindex {
FOURCC fcc; // 'indx' or '##ix'
UINT cb; // size of this structure
WORD wLongsPerEntry; // ==3
BYTE bIndexSubType; // ==0
BYTE bIndexType; // ==AVI_INDEX_OF_TIMED_CHUNKS
DWORD nEntriesInUse; // offset of next unused entry in aIndex
DWORD dwChunkId; // chunk ID of chunks being indexed, (i.e. RGB8)
DWORDLONG qwBaseOffset; // base offset that all index intries are relative to
DWORD dwReserved_3; // must be 0
AVITIMEDINDEX_ENTRY aIndex[NUMINDEX(3)];
DWORD adwTrailingFill[NUMINDEXFILL(3)]; // to align struct to correct size
} AVITIMEDINDEX;
// structure of a timecode stream
//
typedef struct _avitimecodeindex {
FOURCC fcc; // 'indx' or '##ix'
UINT cb; // size of this structure
WORD wLongsPerEntry; // ==4
BYTE bIndexSubType; // ==0
BYTE bIndexType; // ==AVI_INDEX_IS_DATA
DWORD nEntriesInUse; // offset of next unused entry in aIndex
DWORD dwChunkId; // 'time'
DWORD dwReserved[3]; // must be 0
TIMECODEDATA aIndex[NUMINDEX(sizeof(TIMECODEDATA)/sizeof(LONG))];
} AVITIMECODEINDEX;
// structure of a timecode discontinuity list (when wLongsPerEntry == 7)
//
typedef struct _avitcdlindex_entry {
DWORD dwTick; // stream tick time that maps to this timecode value
TIMECODE time;
DWORD dwSMPTEflags;
DWORD dwUser;
TCHAR szReelId[12];
} AVITCDLINDEX_ENTRY;
typedef struct _avitcdlindex {
FOURCC fcc; // 'indx' or '##ix'
UINT cb; // size of this structure
WORD wLongsPerEntry; // ==7 (must be 4 or more all 'tcdl' indexes
BYTE bIndexSubType; // ==0
BYTE bIndexType; // ==AVI_INDEX_IS_DATA
DWORD nEntriesInUse; // offset of next unused entry in aIndex
DWORD dwChunkId; // 'tcdl'
DWORD dwReserved[3]; // must be 0
AVITCDLINDEX_ENTRY aIndex[NUMINDEX(7)];
DWORD adwTrailingFill[NUMINDEXFILL(7)]; // to align struct to correct size
} AVITCDLINDEX;
typedef struct _avifieldindex_chunk {
FOURCC fcc; // 'ix##'
DWORD cb; // size of this structure
WORD wLongsPerEntry; // must be 3 (size of each entry in
// aIndex array)
BYTE bIndexSubType; // AVI_INDEX_2FIELD
BYTE bIndexType; // AVI_INDEX_OF_CHUNKS
DWORD nEntriesInUse; //
DWORD dwChunkId; // '##dc' or '##db'
DWORDLONG qwBaseOffset; // offsets in aIndex array are relative to this
DWORD dwReserved3; // must be 0
struct _avifieldindex_entry {
DWORD dwOffset;
DWORD dwSize; // size of all fields
// (bit 31 set for NON-keyframes)
DWORD dwOffsetField2; // offset to second field
} aIndex[ ];
} AVIFIELDINDEX, * PAVIFIELDINDEX;
#include <poppack.h>
#endif

342
lib/directx8/basetsd.h Executable file
View File

@ -0,0 +1,342 @@
/*++
Copyright (c) 1997-1999 Microsoft Corporation
Module Name:
basetsd.h
Abstract:
Type definitions for the basic sized types.
Author:
Jeff Havens (jhavens) 23-Oct-1997
Revision History:
--*/
#ifndef _BASETSD_H_
#define _BASETSD_H_
#if _MSC_VER > 1000
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
typedef signed char INT8, *PINT8;
typedef signed short INT16, *PINT16;
typedef signed int INT32, *PINT32;
typedef signed __int64 INT64, *PINT64;
typedef unsigned char UINT8, *PUINT8;
typedef unsigned short UINT16, *PUINT16;
typedef unsigned int UINT32, *PUINT32;
typedef unsigned __int64 UINT64, *PUINT64;
//
// The following types are guaranteed to be signed and 32 bits wide.
//
typedef signed int LONG32, *PLONG32;
//
// The following types are guaranteed to be unsigned and 32 bits wide.
//
typedef unsigned int ULONG32, *PULONG32;
typedef unsigned int DWORD32, *PDWORD32;
#if !defined(_W64)
#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
#define _W64 __w64
#else
#define _W64
#endif
#endif
//
// The INT_PTR is guaranteed to be the same size as a pointer. Its
// size with change with pointer size (32/64). It should be used
// anywhere that a pointer is cast to an integer type. UINT_PTR is
// the unsigned variation.
//
// __int3264 is intrinsic to 64b MIDL but not to old MIDL or to C compiler.
//
#if ( 501 < __midl )
typedef [public] __int3264 INT_PTR, *PINT_PTR;
typedef [public] unsigned __int3264 UINT_PTR, *PUINT_PTR;
typedef [public] __int3264 LONG_PTR, *PLONG_PTR;
typedef [public] unsigned __int3264 ULONG_PTR, *PULONG_PTR;
#else // midl64
// old midl and C++ compiler
#if defined(_WIN64)
typedef __int64 INT_PTR, *PINT_PTR;
typedef unsigned __int64 UINT_PTR, *PUINT_PTR;
typedef __int64 LONG_PTR, *PLONG_PTR;
typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
#define __int3264 __int64
#else
typedef _W64 int INT_PTR, *PINT_PTR;
typedef _W64 unsigned int UINT_PTR, *PUINT_PTR;
typedef _W64 long LONG_PTR, *PLONG_PTR;
typedef _W64 unsigned long ULONG_PTR, *PULONG_PTR;
#define __int3264 __int32
#endif
#endif // midl64
//
// HALF_PTR is half the size of a pointer it intended for use with
// within strcuture which contain a pointer and two small fields.
// UHALF_PTR is the unsigned variation.
//
#ifdef _WIN64
#define ADDRESS_TAG_BIT 0x40000000000UI64
typedef unsigned __int64 HANDLE_PTR;
typedef unsigned int UHALF_PTR, *PUHALF_PTR;
typedef int HALF_PTR, *PHALF_PTR;
#pragma warning(disable:4311) // type cast truncation
#if _MSC_VER >= 1200
#pragma warning(push)
#endif
#pragma warning(disable:4305) // type cast truncation
#if !defined(__midl)
__inline
unsigned long
HandleToULong(
const void *h
)
{
return((unsigned long) h );
}
__inline
long
HandleToLong(
const void *h
)
{
return((long) h );
}
__inline
void *
ULongToHandle(
const unsigned long h
)
{
return((void *) (UINT_PTR) h );
}
__inline
void *
LongToHandle(
const long h
)
{
return((void *) (INT_PTR) h );
}
__inline
unsigned long
PtrToUlong(
const void *p
)
{
return((unsigned long) p );
}
__inline
unsigned int
PtrToUint(
const void *p
)
{
return((unsigned int) p );
}
__inline
unsigned short
PtrToUshort(
const void *p
)
{
return((unsigned short) p );
}
__inline
long
PtrToLong(
const void *p
)
{
return((long) p );
}
__inline
int
PtrToInt(
const void *p
)
{
return((int) p );
}
__inline
short
PtrToShort(
const void *p
)
{
return((short) p );
}
__inline
void *
IntToPtr(
const int i
)
// Caution: IntToPtr() sign-extends the int value.
{
return( (void *)(INT_PTR)i );
}
__inline
void *
UIntToPtr(
const unsigned int ui
)
// Caution: UIntToPtr() zero-extends the unsigned int value.
{
return( (void *)(UINT_PTR)ui );
}
__inline
void *
LongToPtr(
const long l
)
// Caution: LongToPtr() sign-extends the long value.
{
return( (void *)(LONG_PTR)l );
}
__inline
void *
ULongToPtr(
const unsigned long ul
)
// Caution: ULongToPtr() zero-extends the unsigned long value.
{
return( (void *)(ULONG_PTR)ul );
}
#endif // !_midl
#if _MSC_VER >= 1200
#pragma warning(pop) // restore 4305
#endif
#pragma warning(3:4311) // bump 4311 to a level 3
#else // !_WIN64
#define ADDRESS_TAG_BIT 0x80000000UL
typedef unsigned short UHALF_PTR, *PUHALF_PTR;
typedef short HALF_PTR, *PHALF_PTR;
typedef _W64 unsigned long HANDLE_PTR;
#define HandleToULong( h ) ((ULONG)(ULONG_PTR)(h) )
#define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )
#define ULongToHandle( ul ) ((HANDLE)(ULONG_PTR) (ul) )
#define LongToHandle( h ) ((HANDLE)(LONG_PTR) (h) )
#define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) )
#define PtrToLong( p ) ((LONG)(LONG_PTR) (p) )
#define PtrToUint( p ) ((UINT)(UINT_PTR) (p) )
#define PtrToInt( p ) ((INT)(INT_PTR) (p) )
#define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) )
#define PtrToShort( p ) ((short)(LONG_PTR)(p) )
#define IntToPtr( i ) ((VOID *)(INT_PTR)((int)i))
#define UIntToPtr( ui ) ((VOID *)(UINT_PTR)((unsigned int)ui))
#define LongToPtr( l ) ((VOID *)(LONG_PTR)((long)l))
#define ULongToPtr( ul ) ((VOID *)(ULONG_PTR)((unsigned long)ul))
#endif // !_WIN64
#define HandleToUlong(h) HandleToULong(h)
#define UlongToHandle(ul) ULongToHandle(ul)
#define UlongToPtr(ul) ULongToPtr(ul)
#define UintToPtr(ui) UIntToPtr(ui)
#define MAXUINT_PTR (~((UINT_PTR)0))
#define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1))
#define MININT_PTR (~MAXINT_PTR)
#define MAXULONG_PTR (~((ULONG_PTR)0))
#define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1))
#define MINLONG_PTR (~MAXLONG_PTR)
#define MAXUHALF_PTR ((UHALF_PTR)~0)
#define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1))
#define MINHALF_PTR (~MAXHALF_PTR)
//
// SIZE_T used for counts or ranges which need to span the range of
// of a pointer. SSIZE_T is the signed variation.
//
typedef ULONG_PTR SIZE_T, *PSIZE_T;
typedef LONG_PTR SSIZE_T, *PSSIZE_T;
//
// Add Windows flavor DWORD_PTR types
//
typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
//
// The following types are guaranteed to be signed and 64 bits wide.
//
typedef __int64 LONG64, *PLONG64;
//
// The following types are guaranteed to be unsigned and 64 bits wide.
//
typedef unsigned __int64 ULONG64, *PULONG64;
typedef unsigned __int64 DWORD64, *PDWORD64;
//
// Thread affinity.
//
typedef ULONG_PTR KAFFINITY;
typedef KAFFINITY *PKAFFINITY;
#ifdef __cplusplus
}
#endif
#endif // _BASETSD_H_

3067
lib/directx8/bdaiface.h Executable file

File diff suppressed because it is too large Load Diff

1417
lib/directx8/bdamedia.h Executable file

File diff suppressed because it is too large Load Diff

585
lib/directx8/bdatypes.h Executable file
View File

@ -0,0 +1,585 @@
//------------------------------------------------------------------------------
// File: BDATypes.h
//
// Desc: Typedefs and enums needed by both the WDM drivers and the user mode
// COM interfaces.
//
// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef _BDATYPES_
#define _BDATYPES_ 1
/* Utility Macros */
#define MIN_DIMENSION 1
#define NATURAL 4
#define CACHE_LINE 128
#define PAGE 4096
#define ALIGN( pointer, size) (((ULONG)(pointer) + (ULONG)(size) - 1) & ~((ULONG)(size) - 1))
#define BDA_STRING_CONST(x) {sizeof(L##x)-2, sizeof(L##x), L##x}
#ifdef __midl
#define V1_ENUM [v1_enum]
#else
#define V1_ENUM
#endif
//===========================================================================
//
// BDA Topology Structures
//
//===========================================================================
typedef struct _BDA_TEMPLATE_CONNECTION
{
ULONG FromNodeType;
ULONG FromNodePinType;
ULONG ToNodeType;
ULONG ToNodePinType;
}BDA_TEMPLATE_CONNECTION, *PBDA_TEMPLATE_CONNECTION;
typedef struct _BDA_TEMPLATE_PIN_JOINT
{
ULONG uliTemplateConnection;
ULONG ulcInstancesMax;
}BDA_TEMPLATE_PIN_JOINT, *PBDA_TEMPLATE_PIN_JOINT;
//===========================================================================
//
// BDA Events
//
//===========================================================================
// In-band Event IDs
//
typedef enum {
BDA_EVENT_SIGNAL_LOSS = 0,
BDA_EVENT_SIGNAL_LOCK,
BDA_EVENT_DATA_START,
BDA_EVENT_DATA_STOP,
BDA_EVENT_CHANNEL_ACQUIRED,
BDA_EVENT_CHANNEL_LOST,
BDA_EVENT_CHANNEL_SOURCE_CHANGED,
BDA_EVENT_CHANNEL_ACTIVATED,
BDA_EVENT_CHANNEL_DEACTIVATED,
BDA_EVENT_SUBCHANNEL_ACQUIRED,
BDA_EVENT_SUBCHANNEL_LOST,
BDA_EVENT_SUBCHANNEL_SOURCE_CHANGED,
BDA_EVENT_SUBCHANNEL_ACTIVATED,
BDA_EVENT_SUBCHANNEL_DEACTIVATED,
BDA_EVENT_ACCESS_GRANTED,
BDA_EVENT_ACCESS_DENIED,
BDA_EVENT_OFFER_EXTENDED,
BDA_EVENT_PURCHASE_COMPLETED,
BDA_EVENT_SMART_CARD_INSERTED,
BDA_EVENT_SMART_CARD_REMOVED
} BDA_EVENT_ID, *PBDA_EVENT_ID;
//===========================================================================
//
// KSSTREAM_HEADER extensions for BDA
//
//===========================================================================
typedef struct tagKS_BDA_FRAME_INFO {
ULONG ExtendedHeaderSize; // Size of this extended header
DWORD dwFrameFlags; //
ULONG ulEvent; //
ULONG ulChannelNumber; //
ULONG ulSubchannelNumber; //
ULONG ulReason; //
} KS_BDA_FRAME_INFO, *PKS_BDA_FRAME_INFO;
//------------------------------------------------------------
//
// BDA Network Ethernet Filter Property Set
//
// {71985F43-1CA1-11d3-9CC8-00C04F7971E0}
//
typedef struct _BDA_ETHERNET_ADDRESS {
BYTE rgbAddress[6];
} BDA_ETHERNET_ADDRESS, *PBDA_ETHERNET_ADDRESS;
typedef struct _BDA_ETHERNET_ADDRESS_LIST {
ULONG ulcAddresses;
BDA_ETHERNET_ADDRESS rgAddressl[MIN_DIMENSION];
} BDA_ETHERNET_ADDRESS_LIST, * PBDA_ETHERNET_ADDRESS_LIST;
typedef enum {
BDA_PROMISCUOUS_MULTICAST = 0,
BDA_FILTERED_MULTICAST,
BDA_NO_MULTICAST
} BDA_MULTICAST_MODE, *PBDA_MULTICAST_MODE;
//------------------------------------------------------------
//
// BDA Network IPv4 Filter Property Set
//
// {71985F44-1CA1-11d3-9CC8-00C04F7971E0}
//
typedef struct _BDA_IPv4_ADDRESS {
BYTE rgbAddress[4];
} BDA_IPv4_ADDRESS, *PBDA_IPv4_ADDRESS;
typedef struct _BDA_IPv4_ADDRESS_LIST {
ULONG ulcAddresses;
BDA_IPv4_ADDRESS rgAddressl[MIN_DIMENSION];
} BDA_IPv4_ADDRESS_LIST, * PBDA_IPv4_ADDRESS_LIST;
//------------------------------------------------------------
//
// BDA Network IPv4 Filter Property Set
//
// {E1785A74-2A23-4fb3-9245-A8F88017EF33}
//
typedef struct _BDA_IPv6_ADDRESS {
BYTE rgbAddress[6];
} BDA_IPv6_ADDRESS, *PBDA_IPv6_ADDRESS;
typedef struct _BDA_IPv6_ADDRESS_LIST {
ULONG ulcAddresses;
BDA_IPv6_ADDRESS rgAddressl[MIN_DIMENSION];
} BDA_IPv6_ADDRESS_LIST, * PBDA_IPv6_ADDRESS_LIST;
//------------------------------------------------------------
//
//
// BDA Signal Property Set
//
// {D2F1644B-B409-11d2-BC69-00A0C9EE9E16}
//
typedef enum {
BDA_SIGNAL_UNAVAILABLE = 0,
BDA_SIGNAL_INACTIVE,
BDA_SIGNAL_ACTIVE
} BDA_SIGNAL_STATE, * PBDA_SIGNAL_STATE;
//------------------------------------------------------------
//
//
// BDA Change Sync Method Set
//
// {FD0A5AF3-B41D-11d2-9C95-00C04F7971E0}
//
typedef enum
{
BDA_CHANGES_COMPLETE = 0,
BDA_CHANGES_PENDING
} BDA_CHANGE_STATE, * PBDA_CHANGE_STATE;
//------------------------------------------------------------
//
//
// BDA Device Configuration Method Set
//
// {71985F45-1CA1-11d3-9CC8-00C04F7971E0}
//
//------------------------------------------------------------
//
//
// BDA Topology Property Set
//
// {A14EE835-0A23-11d3-9CC7-00C04F7971E0}
//
typedef struct _BDANODE_DESCRIPTOR
{
ULONG ulBdaNodeType; // The node type as it is used
// in the BDA template topology
GUID guidFunction; // GUID from BdaMedia.h describing
// the node's function (e.g.
// KSNODE_BDA_RF_TUNER)
GUID guidName; // GUID that can be use to look up
// a displayable name for the node.
} BDANODE_DESCRIPTOR, *PBDANODE_DESCRIPTOR;
//------------------------------------------------------------
//
//
// BDA Void Transform Property Set
//
// {71985F46-1CA1-11d3-9CC8-00C04F7971E0}
//
//------------------------------------------------------------
//
//
// BDA Null Transform Property Set
//
// {DDF15B0D-BD25-11d2-9CA0-00C04F7971E0}
//
//------------------------------------------------------------
//
//
// BDA Frequency Filter Property Set
//
// {71985F47-1CA1-11d3-9CC8-00C04F7971E0}
//
//------------------------------------------------------------
//
//
// BDA Autodemodulate Property Set
//
// {DDF15B12-BD25-11d2-9CA0-00C04F7971E0}
//
//------------------------------------------------------------
//
//
// BDA PmtProcessor Property Set
//
// {516B99C5-971C-4aaf-B3F3-D9FDA8A15E16}
//
typedef struct _BDA_PMT
{
ULONG ulTableID;
ULONG ulcbSectionLength;
ULONG argbSectionData[MIN_DIMENSION];
} BDA_PMT, *PBDA_PMT;
//------------------------------------------------------------
//
//
// BDA Descriptor Property Set
//
// {DE6A1C9E-87DF-48aa-95AA-289B7AA4F49F}
//
typedef struct _BDA_CAT_DESCRIPTOR
{
ULONG ulTag;
ULONG ulcbLength;
ULONG argbData[MIN_DIMENSION];
} BDA_CAT_DESCRIPTOR, *PBDA_CAT_DESCRIPTOR;
typedef struct _BDA_ES_DESCRIPTOR
{
ULONG ulProgramNum;
ULONG ulContentPID;
ULONG ulTag;
ULONG ulcbLength;
ULONG argbData[MIN_DIMENSION];
} BDA_ES_DESCRIPTOR, *PBDA_ES_DESCRIPTOR;
typedef struct _BDA_PROGRAM_DESCRIPTOR
{
ULONG ulProgramNum;
ULONG ulTag;
ULONG ulcbLength;
ULONG argbData[MIN_DIMENSION];
} BDA_PROGRAM_DESCRIPTOR, *PBDA_PROGRAM_DESCRIPTOR;
//------------------------------------------------------------
//
//
// BDA EsMap Property Set
//
// {FA14A8B3-6068-48ef-96DD-53010B985A7D}
//
typedef enum
{
ES_MAP_STATE_GOOD_FLOW = 0,
ES_MAP_STATE_NO_CONTENT,
ES_MAP_STATE_NO_ECM,
ES_MAP_STATE_BAD_MAP
} BDA_ES_MAP_STATE, *PBDA_ES_MAP_STATE;
typedef struct _BDA_ES_MAP
{
ULONG ulContentPID;
ULONG ulProgramNum;
ULONG ulStreamType;
BDA_ES_MAP_STATE mapState;
} BDA_ES_MAP, *PBDA_ES_MAP;
//------------------------------------------------------------
//
//
// BDA PID Filter Property Set
//
// {D0A67D65-08DF-4fec-8533-E5B550410B85}
//
//---------------------------------------------------------------------
// From IEnumPIDMap interface
//---------------------------------------------------------------------
typedef enum {
MEDIA_TRANSPORT_PACKET, // complete TS packet e.g. pass-through mode
MEDIA_ELEMENTARY_STREAM, // PES payloads; audio/video only
MEDIA_MPEG2_PSI, // PAT, PMT, CAT, Private
MEDIA_TRANSPORT_PAYLOAD // gathered TS packet payloads (PES packets, etc...)
} MEDIA_SAMPLE_CONTENT ;
typedef struct {
ULONG ulPID ;
MEDIA_SAMPLE_CONTENT MediaSampleContent ;
} PID_MAP ;
typedef struct _BDA_PID_MAP
{
MEDIA_SAMPLE_CONTENT MediaSampleContent;
ULONG ulcPIDs;
ULONG aulPIDs[MIN_DIMENSION];
} BDA_PID_MAP, *PBDA_PID_MAP;
typedef struct _BDA_PID_UNMAP
{
ULONG ulcPIDs;
ULONG aulPIDs[MIN_DIMENSION];
} BDA_PID_UNMAP, *PBDA_PID_UNMAP;
//------------------------------------------------------------
//
//
// BDA CA Property Set
//
// {B0693766-5278-4ec6-B9E1-3CE40560EF5A}
//
typedef struct _BDA_CA_MODULE_UI
{
ULONG ulFormat;
ULONG ulbcDesc;
ULONG ulDesc[MIN_DIMENSION];
} BDA_CA_MODULE_UI, *PBDA_CA_MODULE_UI;
//------------------------------------------------------------
//
//
// BDA CA Event Set
//
// {488C4CCC-B768-4129-8EB1-B00A071F9068}
//
//=============================================================
//
//
// BDA Tuning Model enumerations
//
//
//=============================================================
// system type for particular DVB Tuning Space instance
typedef enum DVBSystemType {
DVB_Cable,
DVB_Terrestrial,
DVB_Satellite,
} DVBSystemType;
//------------------------------------------------------------
//
// BDA Channel Tune Request
V1_ENUM enum {
BDA_UNDEFINED_CHANNEL = -1,
};
//------------------------------------------------------------
//
// BDA Component(substream)
//
typedef V1_ENUM enum ComponentCategory
{
CategoryNotSet = -1,
CategoryOther = 0,
CategoryVideo,
CategoryAudio,
CategoryText,
CategoryData,
} ComponentCategory;
// Component Status
typedef enum ComponentStatus
{
StatusActive,
StatusInactive,
StatusUnavailable,
} ComponentStatus;
//------------------------------------------------------------
//
// BDA MPEG2 Component Type
//
// from the MPEG2 specification
typedef V1_ENUM enum MPEG2StreamType {
BDA_UNITIALIZED_MPEG2STREAMTYPE = -1,
Reserved1 = 0x0,
ISO_IEC_11172_2_VIDEO = Reserved1 + 1,
ISO_IEC_13818_2_VIDEO = ISO_IEC_11172_2_VIDEO + 1,
ISO_IEC_11172_3_AUDIO = ISO_IEC_13818_2_VIDEO + 1,
ISO_IEC_13818_3_AUDIO = ISO_IEC_11172_3_AUDIO + 1,
ISO_IEC_13818_1_PRIVATE_SECTION = ISO_IEC_13818_3_AUDIO + 1,
ISO_IEC_13818_1_PES = ISO_IEC_13818_1_PRIVATE_SECTION + 1,
ISO_IEC_13522_MHEG = ISO_IEC_13818_1_PES + 1,
ANNEX_A_DSM_CC = ISO_IEC_13522_MHEG + 1,
ITU_T_REC_H_222_1 = ANNEX_A_DSM_CC + 1,
ISO_IEC_13818_6_TYPE_A = ITU_T_REC_H_222_1 + 1,
ISO_IEC_13818_6_TYPE_B = ISO_IEC_13818_6_TYPE_A + 1,
ISO_IEC_13818_6_TYPE_C = ISO_IEC_13818_6_TYPE_B + 1,
ISO_IEC_13818_6_TYPE_D = ISO_IEC_13818_6_TYPE_C + 1,
ISO_IEC_13818_1_AUXILIARY = ISO_IEC_13818_6_TYPE_D + 1,
ISO_IEC_13818_1_RESERVED = ISO_IEC_13818_1_AUXILIARY + 1,
USER_PRIVATE = ISO_IEC_13818_1_RESERVED + 1
} MPEG2StreamType;
//------------------------------------------------------------
//
// BDA ATSC Component Type
//
//
// ATSC made AC3 Audio a descriptor instead of
// defining a user private stream type.
typedef enum ATSCComponentTypeFlags {
// bit flags for various component type properties
ATSCCT_AC3 = 0x00000001,
} ATSCComponentTypeFlags;
//------------------------------------------------------------
//
// BDA Locators
//
typedef V1_ENUM enum BinaryConvolutionCodeRate {
BDA_BCC_RATE_NOT_SET = -1,
BDA_BCC_RATE_NOT_DEFINED = 0,
BDA_BCC_RATE_1_2 = 1, // 1/2
BDA_BCC_RATE_2_3, // 2/3
BDA_BCC_RATE_3_4, // 3/4
BDA_BCC_RATE_3_5,
BDA_BCC_RATE_4_5,
BDA_BCC_RATE_5_6, // 5/6
BDA_BCC_RATE_5_11,
BDA_BCC_RATE_7_8, // 7/8
BDA_BCC_RATE_MAX,
} BinaryConvolutionCodeRate;
typedef V1_ENUM enum FECMethod {
BDA_FEC_METHOD_NOT_SET = -1,
BDA_FEC_METHOD_NOT_DEFINED = 0,
BDA_FEC_VITERBI = 1, // FEC is a Viterbi Binary Convolution.
BDA_FEC_RS_204_188, // The FEC is Reed-Solomon 204/188 (outer FEC)
BDA_FEC_MAX,
} FECMethod;
typedef V1_ENUM enum ModulationType {
BDA_MOD_NOT_SET = -1,
BDA_MOD_NOT_DEFINED = 0,
BDA_MOD_16QAM = 1,
BDA_MOD_32QAM,
BDA_MOD_64QAM,
BDA_MOD_80QAM,
BDA_MOD_96QAM,
BDA_MOD_112QAM,
BDA_MOD_128QAM,
BDA_MOD_160QAM,
BDA_MOD_192QAM,
BDA_MOD_224QAM,
BDA_MOD_256QAM,
BDA_MOD_320QAM,
BDA_MOD_384QAM,
BDA_MOD_448QAM,
BDA_MOD_512QAM,
BDA_MOD_640QAM,
BDA_MOD_768QAM,
BDA_MOD_896QAM,
BDA_MOD_1024QAM,
BDA_MOD_QPSK,
BDA_MOD_BPSK,
BDA_MOD_OQPSK,
BDA_MOD_8VSB,
BDA_MOD_16VSB,
BDA_MOD_ANALOG_AMPLITUDE, // std am
BDA_MOD_ANALOG_FREQUENCY, // std fm
BDA_MOD_MAX,
} ModulationType;
typedef V1_ENUM enum SpectralInversion {
BDA_SPECTRAL_INVERSION_NOT_SET = -1,
BDA_SPECTRAL_INVERSION_NOT_DEFINED = 0,
BDA_SPECTRAL_INVERSION_AUTOMATIC = 1,
BDA_SPECTRAL_INVERSION_NORMAL,
BDA_SPECTRAL_INVERSION_INVERTED,
BDA_SPECTRAL_INVERSION_MAX
} SpectralInversion;
typedef V1_ENUM enum Polarisation {
BDA_POLARISATION_NOT_SET = -1,
BDA_POLARISATION_NOT_DEFINED = 0,
BDA_POLARISATION_LINEAR_H = 1, // Linear horizontal polarisation
BDA_POLARISATION_LINEAR_V, // Linear vertical polarisation
BDA_POLARISATION_CIRCULAR_L, // Circular left polarisation
BDA_POLARISATION_CIRCULAR_R, // Circular right polarisation
BDA_POLARISATION_MAX,
} Polarisation;
typedef V1_ENUM enum GuardInterval {
BDA_GUARD_NOT_SET = -1,
BDA_GUARD_NOT_DEFINED = 0,
BDA_GUARD_1_32 = 1, // Guard interval is 1/32
BDA_GUARD_1_16, // Guard interval is 1/16
BDA_GUARD_1_8, // Guard interval is 1/8
BDA_GUARD_1_4, // Guard interval is 1/4
BDA_GUARD_MAX,
} GuardInterval;
typedef V1_ENUM enum HierarchyAlpha {
BDA_HALPHA_NOT_SET = -1,
BDA_HALPHA_NOT_DEFINED = 0,
BDA_HALPHA_1 = 1, // Hierarchy alpha is 1.
BDA_HALPHA_2, // Hierarchy alpha is 2.
BDA_HALPHA_4, // Hierarchy alpha is 4.
BDA_HALPHA_MAX,
} HierarchyAlpha;
typedef V1_ENUM enum TransmissionMode {
BDA_XMIT_MODE_NOT_SET = -1,
BDA_XMIT_MODE_NOT_DEFINED = 0,
BDA_XMIT_MODE_2K = 1, // Transmission uses 1705 carriers (use a 2K FFT)
BDA_XMIT_MODE_8K, // Transmission uses 6817 carriers (use an 8K FFT)
BDA_XMIT_MODE_MAX,
} TransmissionMode;
#endif // not defined _BDATYPES_
// end of file -- bdatypes.h

26
lib/directx8/comlite.h Executable file
View File

@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// File: COMLite.h
//
// Desc: This header file is to provide a migration path for users of
// ActiveMovie betas 1 and 2.
//
// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef _INC_COMLITE_
#define _INC_COMLITE_
#define QzInitialize CoInitialize
#define QzUninitialize CoUninitialize
#define QzFreeUnusedLibraries CoFreeUnusedLibraries
#define QzGetMalloc CoGetMalloc
#define QzTaskMemAlloc CoTaskMemAlloc
#define QzTaskMemRealloc CoTaskMemRealloc
#define QzTaskMemFree CoTaskMemFree
#define QzCreateFilterObject CoCreateInstance
#define QzCLSIDFromString CLSIDFromString
#define QzStringFromGUID2 StringFromGUID2
#endif // _INC_COMLITE_

5539
lib/directx8/control.h Executable file

File diff suppressed because it is too large Load Diff

1687
lib/directx8/d3d.h Executable file

File diff suppressed because it is too large Load Diff

1276
lib/directx8/d3d8.h Executable file

File diff suppressed because it is too large Load Diff

354
lib/directx8/d3d8caps.h Executable file
View File

@ -0,0 +1,354 @@
/*==========================================================================;
*
* Copyright (C) 1995-2000 Microsoft Corporation. All Rights Reserved.
*
* File: d3d8caps.h
* Content: Direct3D capabilities include file
*
***************************************************************************/
#ifndef _D3D8CAPS_H
#define _D3D8CAPS_H
#ifndef DIRECT3D_VERSION
#define DIRECT3D_VERSION 0x0800
#endif //DIRECT3D_VERSION
// include this file content only if compiling for DX8 interfaces
#if(DIRECT3D_VERSION >= 0x0800)
#pragma pack(4)
typedef struct _D3DCAPS8
{
/* Device Info */
D3DDEVTYPE DeviceType;
UINT AdapterOrdinal;
/* Caps from DX7 Draw */
DWORD Caps;
DWORD Caps2;
DWORD Caps3;
DWORD PresentationIntervals;
/* Cursor Caps */
DWORD CursorCaps;
/* 3D Device Caps */
DWORD DevCaps;
DWORD PrimitiveMiscCaps;
DWORD RasterCaps;
DWORD ZCmpCaps;
DWORD SrcBlendCaps;
DWORD DestBlendCaps;
DWORD AlphaCmpCaps;
DWORD ShadeCaps;
DWORD TextureCaps;
DWORD TextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DTexture8's
DWORD CubeTextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DCubeTexture8's
DWORD VolumeTextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DVolumeTexture8's
DWORD TextureAddressCaps; // D3DPTADDRESSCAPS for IDirect3DTexture8's
DWORD VolumeTextureAddressCaps; // D3DPTADDRESSCAPS for IDirect3DVolumeTexture8's
DWORD LineCaps; // D3DLINECAPS
DWORD MaxTextureWidth, MaxTextureHeight;
DWORD MaxVolumeExtent;
DWORD MaxTextureRepeat;
DWORD MaxTextureAspectRatio;
DWORD MaxAnisotropy;
float MaxVertexW;
float GuardBandLeft;
float GuardBandTop;
float GuardBandRight;
float GuardBandBottom;
float ExtentsAdjust;
DWORD StencilCaps;
DWORD FVFCaps;
DWORD TextureOpCaps;
DWORD MaxTextureBlendStages;
DWORD MaxSimultaneousTextures;
DWORD VertexProcessingCaps;
DWORD MaxActiveLights;
DWORD MaxUserClipPlanes;
DWORD MaxVertexBlendMatrices;
DWORD MaxVertexBlendMatrixIndex;
float MaxPointSize;
DWORD MaxPrimitiveCount; // max number of primitives per DrawPrimitive call
DWORD MaxVertexIndex;
DWORD MaxStreams;
DWORD MaxStreamStride; // max stride for SetStreamSource
DWORD VertexShaderVersion;
DWORD MaxVertexShaderConst; // number of vertex shader constant registers
DWORD PixelShaderVersion;
float MaxPixelShaderValue; // max value of pixel shader arithmetic component
} D3DCAPS8;
//
// BIT DEFINES FOR D3DCAPS8 DWORD MEMBERS
//
//
// Caps
//
#define D3DCAPS_READ_SCANLINE 0x00020000L
//
// Caps2
//
#define D3DCAPS2_NO2DDURING3DSCENE 0x00000002L
#define D3DCAPS2_FULLSCREENGAMMA 0x00020000L
#define D3DCAPS2_CANRENDERWINDOWED 0x00080000L
#define D3DCAPS2_CANCALIBRATEGAMMA 0x00100000L
#define D3DCAPS2_RESERVED 0x02000000L
//
// Caps3
//
#define D3DCAPS3_RESERVED 0x8000001fL
//
// PresentationIntervals
//
#define D3DPRESENT_INTERVAL_DEFAULT 0x00000000L
#define D3DPRESENT_INTERVAL_ONE 0x00000001L
#define D3DPRESENT_INTERVAL_TWO 0x00000002L
#define D3DPRESENT_INTERVAL_THREE 0x00000004L
#define D3DPRESENT_INTERVAL_FOUR 0x00000008L
#define D3DPRESENT_INTERVAL_IMMEDIATE 0x80000000L
//
// CursorCaps
//
// Driver supports HW color cursor in at least hi-res modes(height >=400)
#define D3DCURSORCAPS_COLOR 0x00000001L
// Driver supports HW cursor also in low-res modes(height < 400)
#define D3DCURSORCAPS_LOWRES 0x00000002L
//
// DevCaps
//
#define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010L /* Device can use execute buffers from system memory */
#define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020L /* Device can use execute buffers from video memory */
#define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040L /* Device can use TL buffers from system memory */
#define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080L /* Device can use TL buffers from video memory */
#define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100L /* Device can texture from system memory */
#define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200L /* Device can texture from device memory */
#define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400L /* Device can draw TLVERTEX primitives */
#define D3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800L /* Device can render without waiting for flip to complete */
#define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000L /* Device can texture from nonlocal video memory */
#define D3DDEVCAPS_DRAWPRIMITIVES2 0x00002000L /* Device can support DrawPrimitives2 */
#define D3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x00004000L /* Device is texturing from separate memory pools */
#define D3DDEVCAPS_DRAWPRIMITIVES2EX 0x00008000L /* Device can support Extended DrawPrimitives2 i.e. DX7 compliant driver*/
#define D3DDEVCAPS_HWTRANSFORMANDLIGHT 0x00010000L /* Device can support transformation and lighting in hardware and DRAWPRIMITIVES2EX must be also */
#define D3DDEVCAPS_CANBLTSYSTONONLOCAL 0x00020000L /* Device supports a Tex Blt from system memory to non-local vidmem */
#define D3DDEVCAPS_HWRASTERIZATION 0x00080000L /* Device has HW acceleration for rasterization */
#define D3DDEVCAPS_PUREDEVICE 0x00100000L /* Device supports D3DCREATE_PUREDEVICE */
#define D3DDEVCAPS_QUINTICRTPATCHES 0x00200000L /* Device supports quintic Beziers and BSplines */
#define D3DDEVCAPS_RTPATCHES 0x00400000L /* Device supports Rect and Tri patches */
#define D3DDEVCAPS_RTPATCHHANDLEZERO 0x00800000L /* Indicates that RT Patches may be drawn efficiently using handle 0 */
#define D3DDEVCAPS_NPATCHES 0x01000000L /* Device supports N-Patches */
//
// PrimitiveMiscCaps
//
#define D3DPMISCCAPS_MASKZ 0x00000002L
#define D3DPMISCCAPS_LINEPATTERNREP 0x00000004L
#define D3DPMISCCAPS_CULLNONE 0x00000010L
#define D3DPMISCCAPS_CULLCW 0x00000020L
#define D3DPMISCCAPS_CULLCCW 0x00000040L
#define D3DPMISCCAPS_COLORWRITEENABLE 0x00000080L
#define D3DPMISCCAPS_CLIPPLANESCALEDPOINTS 0x00000100L /* Device correctly clips scaled points to clip planes */
#define D3DPMISCCAPS_CLIPTLVERTS 0x00000200L /* device will clip post-transformed vertex primitives */
#define D3DPMISCCAPS_TSSARGTEMP 0x00000400L /* device supports D3DTA_TEMP for temporary register */
#define D3DPMISCCAPS_BLENDOP 0x00000800L /* device supports D3DRS_BLENDOP */
//
// LineCaps
//
#define D3DLINECAPS_TEXTURE 0x00000001L
#define D3DLINECAPS_ZTEST 0x00000002L
#define D3DLINECAPS_BLEND 0x00000004L
#define D3DLINECAPS_ALPHACMP 0x00000008L
#define D3DLINECAPS_FOG 0x00000010L
//
// RasterCaps
//
#define D3DPRASTERCAPS_DITHER 0x00000001L
#define D3DPRASTERCAPS_PAT 0x00000008L
#define D3DPRASTERCAPS_ZTEST 0x00000010L
#define D3DPRASTERCAPS_FOGVERTEX 0x00000080L
#define D3DPRASTERCAPS_FOGTABLE 0x00000100L
#define D3DPRASTERCAPS_ANTIALIASEDGES 0x00001000L
#define D3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000L
#define D3DPRASTERCAPS_ZBIAS 0x00004000L
#define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000L
#define D3DPRASTERCAPS_FOGRANGE 0x00010000L
#define D3DPRASTERCAPS_ANISOTROPY 0x00020000L
#define D3DPRASTERCAPS_WBUFFER 0x00040000L
#define D3DPRASTERCAPS_WFOG 0x00100000L
#define D3DPRASTERCAPS_ZFOG 0x00200000L
#define D3DPRASTERCAPS_COLORPERSPECTIVE 0x00400000L /* Device iterates colors perspective correct */
#define D3DPRASTERCAPS_STRETCHBLTMULTISAMPLE 0x00800000L
//
// ZCmpCaps, AlphaCmpCaps
//
#define D3DPCMPCAPS_NEVER 0x00000001L
#define D3DPCMPCAPS_LESS 0x00000002L
#define D3DPCMPCAPS_EQUAL 0x00000004L
#define D3DPCMPCAPS_LESSEQUAL 0x00000008L
#define D3DPCMPCAPS_GREATER 0x00000010L
#define D3DPCMPCAPS_NOTEQUAL 0x00000020L
#define D3DPCMPCAPS_GREATEREQUAL 0x00000040L
#define D3DPCMPCAPS_ALWAYS 0x00000080L
//
// SourceBlendCaps, DestBlendCaps
//
#define D3DPBLENDCAPS_ZERO 0x00000001L
#define D3DPBLENDCAPS_ONE 0x00000002L
#define D3DPBLENDCAPS_SRCCOLOR 0x00000004L
#define D3DPBLENDCAPS_INVSRCCOLOR 0x00000008L
#define D3DPBLENDCAPS_SRCALPHA 0x00000010L
#define D3DPBLENDCAPS_INVSRCALPHA 0x00000020L
#define D3DPBLENDCAPS_DESTALPHA 0x00000040L
#define D3DPBLENDCAPS_INVDESTALPHA 0x00000080L
#define D3DPBLENDCAPS_DESTCOLOR 0x00000100L
#define D3DPBLENDCAPS_INVDESTCOLOR 0x00000200L
#define D3DPBLENDCAPS_SRCALPHASAT 0x00000400L
#define D3DPBLENDCAPS_BOTHSRCALPHA 0x00000800L
#define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000L
//
// ShadeCaps
//
#define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008L
#define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200L
#define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000L
#define D3DPSHADECAPS_FOGGOURAUD 0x00080000L
//
// TextureCaps
//
#define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001L /* Perspective-correct texturing is supported */
#define D3DPTEXTURECAPS_POW2 0x00000002L /* Power-of-2 texture dimensions are required - applies to non-Cube/Volume textures only. */
#define D3DPTEXTURECAPS_ALPHA 0x00000004L /* Alpha in texture pixels is supported */
#define D3DPTEXTURECAPS_SQUAREONLY 0x00000020L /* Only square textures are supported */
#define D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040L /* Texture indices are not scaled by the texture size prior to interpolation */
#define D3DPTEXTURECAPS_ALPHAPALETTE 0x00000080L /* Device can draw alpha from texture palettes */
// Device can use non-POW2 textures if:
// 1) D3DTEXTURE_ADDRESS is set to CLAMP for this texture's stage
// 2) D3DRS_WRAP(N) is zero for this texture's coordinates
// 3) mip mapping is not enabled (use magnification filter only)
#define D3DPTEXTURECAPS_NONPOW2CONDITIONAL 0x00000100L
#define D3DPTEXTURECAPS_PROJECTED 0x00000400L /* Device can do D3DTTFF_PROJECTED */
#define D3DPTEXTURECAPS_CUBEMAP 0x00000800L /* Device can do cubemap textures */
#define D3DPTEXTURECAPS_VOLUMEMAP 0x00002000L /* Device can do volume textures */
#define D3DPTEXTURECAPS_MIPMAP 0x00004000L /* Device can do mipmapped textures */
#define D3DPTEXTURECAPS_MIPVOLUMEMAP 0x00008000L /* Device can do mipmapped volume textures */
#define D3DPTEXTURECAPS_MIPCUBEMAP 0x00010000L /* Device can do mipmapped cube maps */
#define D3DPTEXTURECAPS_CUBEMAP_POW2 0x00020000L /* Device requires that cubemaps be power-of-2 dimension */
#define D3DPTEXTURECAPS_VOLUMEMAP_POW2 0x00040000L /* Device requires that volume maps be power-of-2 dimension */
//
// TextureFilterCaps
//
#define D3DPTFILTERCAPS_MINFPOINT 0x00000100L /* Min Filter */
#define D3DPTFILTERCAPS_MINFLINEAR 0x00000200L
#define D3DPTFILTERCAPS_MINFANISOTROPIC 0x00000400L
#define D3DPTFILTERCAPS_MIPFPOINT 0x00010000L /* Mip Filter */
#define D3DPTFILTERCAPS_MIPFLINEAR 0x00020000L
#define D3DPTFILTERCAPS_MAGFPOINT 0x01000000L /* Mag Filter */
#define D3DPTFILTERCAPS_MAGFLINEAR 0x02000000L
#define D3DPTFILTERCAPS_MAGFANISOTROPIC 0x04000000L
#define D3DPTFILTERCAPS_MAGFAFLATCUBIC 0x08000000L
#define D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC 0x10000000L
//
// TextureAddressCaps
//
#define D3DPTADDRESSCAPS_WRAP 0x00000001L
#define D3DPTADDRESSCAPS_MIRROR 0x00000002L
#define D3DPTADDRESSCAPS_CLAMP 0x00000004L
#define D3DPTADDRESSCAPS_BORDER 0x00000008L
#define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010L
#define D3DPTADDRESSCAPS_MIRRORONCE 0x00000020L
//
// StencilCaps
//
#define D3DSTENCILCAPS_KEEP 0x00000001L
#define D3DSTENCILCAPS_ZERO 0x00000002L
#define D3DSTENCILCAPS_REPLACE 0x00000004L
#define D3DSTENCILCAPS_INCRSAT 0x00000008L
#define D3DSTENCILCAPS_DECRSAT 0x00000010L
#define D3DSTENCILCAPS_INVERT 0x00000020L
#define D3DSTENCILCAPS_INCR 0x00000040L
#define D3DSTENCILCAPS_DECR 0x00000080L
//
// TextureOpCaps
//
#define D3DTEXOPCAPS_DISABLE 0x00000001L
#define D3DTEXOPCAPS_SELECTARG1 0x00000002L
#define D3DTEXOPCAPS_SELECTARG2 0x00000004L
#define D3DTEXOPCAPS_MODULATE 0x00000008L
#define D3DTEXOPCAPS_MODULATE2X 0x00000010L
#define D3DTEXOPCAPS_MODULATE4X 0x00000020L
#define D3DTEXOPCAPS_ADD 0x00000040L
#define D3DTEXOPCAPS_ADDSIGNED 0x00000080L
#define D3DTEXOPCAPS_ADDSIGNED2X 0x00000100L
#define D3DTEXOPCAPS_SUBTRACT 0x00000200L
#define D3DTEXOPCAPS_ADDSMOOTH 0x00000400L
#define D3DTEXOPCAPS_BLENDDIFFUSEALPHA 0x00000800L
#define D3DTEXOPCAPS_BLENDTEXTUREALPHA 0x00001000L
#define D3DTEXOPCAPS_BLENDFACTORALPHA 0x00002000L
#define D3DTEXOPCAPS_BLENDTEXTUREALPHAPM 0x00004000L
#define D3DTEXOPCAPS_BLENDCURRENTALPHA 0x00008000L
#define D3DTEXOPCAPS_PREMODULATE 0x00010000L
#define D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR 0x00020000L
#define D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA 0x00040000L
#define D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR 0x00080000L
#define D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA 0x00100000L
#define D3DTEXOPCAPS_BUMPENVMAP 0x00200000L
#define D3DTEXOPCAPS_BUMPENVMAPLUMINANCE 0x00400000L
#define D3DTEXOPCAPS_DOTPRODUCT3 0x00800000L
#define D3DTEXOPCAPS_MULTIPLYADD 0x01000000L
#define D3DTEXOPCAPS_LERP 0x02000000L
//
// FVFCaps
//
#define D3DFVFCAPS_TEXCOORDCOUNTMASK 0x0000ffffL /* mask for texture coordinate count field */
#define D3DFVFCAPS_DONOTSTRIPELEMENTS 0x00080000L /* Device prefers that vertex elements not be stripped */
#define D3DFVFCAPS_PSIZE 0x00100000L /* Device can receive point size */
//
// VertexProcessingCaps
//
#define D3DVTXPCAPS_TEXGEN 0x00000001L /* device can do texgen */
#define D3DVTXPCAPS_MATERIALSOURCE7 0x00000002L /* device can do DX7-level colormaterialsource ops */
#define D3DVTXPCAPS_DIRECTIONALLIGHTS 0x00000008L /* device can do directional lights */
#define D3DVTXPCAPS_POSITIONALLIGHTS 0x00000010L /* device can do positional lights (includes point and spot) */
#define D3DVTXPCAPS_LOCALVIEWER 0x00000020L /* device can do local viewer */
#define D3DVTXPCAPS_TWEENING 0x00000040L /* device can do vertex tweening */
#define D3DVTXPCAPS_NO_VSDT_UBYTE4 0x00000080L /* device does not support D3DVSDT_UBYTE4 */
#pragma pack()
#endif /* (DIRECT3D_VERSION >= 0x0800) */
#endif /* _D3D8CAPS_H_ */

1600
lib/directx8/d3d8types.h Executable file

File diff suppressed because it is too large Load Diff

598
lib/directx8/d3dcaps.h Executable file
View File

@ -0,0 +1,598 @@
/*==========================================================================;
*
*
* File: d3dcaps.h
* Content: Direct3D capabilities include file
*
***************************************************************************/
#ifndef _D3DCAPS_H
#define _D3DCAPS_H
/*
* Pull in DirectDraw include file automatically:
*/
#include "ddraw.h"
#ifndef DIRECT3D_VERSION
#define DIRECT3D_VERSION 0x0700
#endif
#pragma pack(4)
/* Description of capabilities of transform */
typedef struct _D3DTRANSFORMCAPS {
DWORD dwSize;
DWORD dwCaps;
} D3DTRANSFORMCAPS, *LPD3DTRANSFORMCAPS;
#define D3DTRANSFORMCAPS_CLIP 0x00000001L /* Will clip whilst transforming */
/* Description of capabilities of lighting */
typedef struct _D3DLIGHTINGCAPS {
DWORD dwSize;
DWORD dwCaps; /* Lighting caps */
DWORD dwLightingModel; /* Lighting model - RGB or mono */
DWORD dwNumLights; /* Number of lights that can be handled */
} D3DLIGHTINGCAPS, *LPD3DLIGHTINGCAPS;
#define D3DLIGHTINGMODEL_RGB 0x00000001L
#define D3DLIGHTINGMODEL_MONO 0x00000002L
#define D3DLIGHTCAPS_POINT 0x00000001L /* Point lights supported */
#define D3DLIGHTCAPS_SPOT 0x00000002L /* Spot lights supported */
#define D3DLIGHTCAPS_DIRECTIONAL 0x00000004L /* Directional lights supported */
#if(DIRECT3D_VERSION < 0x700)
#define D3DLIGHTCAPS_PARALLELPOINT 0x00000008L /* Parallel point lights supported */
#endif
#if(DIRECT3D_VERSION < 0x500)
#define D3DLIGHTCAPS_GLSPOT 0x00000010L /* GL syle spot lights supported */
#endif
/* Description of capabilities for each primitive type */
typedef struct _D3DPrimCaps {
DWORD dwSize;
DWORD dwMiscCaps; /* Capability flags */
DWORD dwRasterCaps;
DWORD dwZCmpCaps;
DWORD dwSrcBlendCaps;
DWORD dwDestBlendCaps;
DWORD dwAlphaCmpCaps;
DWORD dwShadeCaps;
DWORD dwTextureCaps;
DWORD dwTextureFilterCaps;
DWORD dwTextureBlendCaps;
DWORD dwTextureAddressCaps;
DWORD dwStippleWidth; /* maximum width and height of */
DWORD dwStippleHeight; /* of supported stipple (up to 32x32) */
} D3DPRIMCAPS, *LPD3DPRIMCAPS;
/* D3DPRIMCAPS dwMiscCaps */
#define D3DPMISCCAPS_MASKPLANES 0x00000001L
#define D3DPMISCCAPS_MASKZ 0x00000002L
#define D3DPMISCCAPS_LINEPATTERNREP 0x00000004L
#define D3DPMISCCAPS_CONFORMANT 0x00000008L
#define D3DPMISCCAPS_CULLNONE 0x00000010L
#define D3DPMISCCAPS_CULLCW 0x00000020L
#define D3DPMISCCAPS_CULLCCW 0x00000040L
/* D3DPRIMCAPS dwRasterCaps */
#define D3DPRASTERCAPS_DITHER 0x00000001L
#define D3DPRASTERCAPS_ROP2 0x00000002L
#define D3DPRASTERCAPS_XOR 0x00000004L
#define D3DPRASTERCAPS_PAT 0x00000008L
#define D3DPRASTERCAPS_ZTEST 0x00000010L
#define D3DPRASTERCAPS_SUBPIXEL 0x00000020L
#define D3DPRASTERCAPS_SUBPIXELX 0x00000040L
#define D3DPRASTERCAPS_FOGVERTEX 0x00000080L
#define D3DPRASTERCAPS_FOGTABLE 0x00000100L
#define D3DPRASTERCAPS_STIPPLE 0x00000200L
#if(DIRECT3D_VERSION >= 0x0500)
#define D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT 0x00000400L
#define D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT 0x00000800L
#define D3DPRASTERCAPS_ANTIALIASEDGES 0x00001000L
#define D3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000L
#define D3DPRASTERCAPS_ZBIAS 0x00004000L
#define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000L
#define D3DPRASTERCAPS_FOGRANGE 0x00010000L
#define D3DPRASTERCAPS_ANISOTROPY 0x00020000L
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
#define D3DPRASTERCAPS_WBUFFER 0x00040000L
#define D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT 0x00080000L
#define D3DPRASTERCAPS_WFOG 0x00100000L
#define D3DPRASTERCAPS_ZFOG 0x00200000L
#endif /* DIRECT3D_VERSION >= 0x0600 */
/* D3DPRIMCAPS dwZCmpCaps, dwAlphaCmpCaps */
#define D3DPCMPCAPS_NEVER 0x00000001L
#define D3DPCMPCAPS_LESS 0x00000002L
#define D3DPCMPCAPS_EQUAL 0x00000004L
#define D3DPCMPCAPS_LESSEQUAL 0x00000008L
#define D3DPCMPCAPS_GREATER 0x00000010L
#define D3DPCMPCAPS_NOTEQUAL 0x00000020L
#define D3DPCMPCAPS_GREATEREQUAL 0x00000040L
#define D3DPCMPCAPS_ALWAYS 0x00000080L
/* D3DPRIMCAPS dwSourceBlendCaps, dwDestBlendCaps */
#define D3DPBLENDCAPS_ZERO 0x00000001L
#define D3DPBLENDCAPS_ONE 0x00000002L
#define D3DPBLENDCAPS_SRCCOLOR 0x00000004L
#define D3DPBLENDCAPS_INVSRCCOLOR 0x00000008L
#define D3DPBLENDCAPS_SRCALPHA 0x00000010L
#define D3DPBLENDCAPS_INVSRCALPHA 0x00000020L
#define D3DPBLENDCAPS_DESTALPHA 0x00000040L
#define D3DPBLENDCAPS_INVDESTALPHA 0x00000080L
#define D3DPBLENDCAPS_DESTCOLOR 0x00000100L
#define D3DPBLENDCAPS_INVDESTCOLOR 0x00000200L
#define D3DPBLENDCAPS_SRCALPHASAT 0x00000400L
#define D3DPBLENDCAPS_BOTHSRCALPHA 0x00000800L
#define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000L
/* D3DPRIMCAPS dwShadeCaps */
#define D3DPSHADECAPS_COLORFLATMONO 0x00000001L
#define D3DPSHADECAPS_COLORFLATRGB 0x00000002L
#define D3DPSHADECAPS_COLORGOURAUDMONO 0x00000004L
#define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008L
#define D3DPSHADECAPS_COLORPHONGMONO 0x00000010L
#define D3DPSHADECAPS_COLORPHONGRGB 0x00000020L
#define D3DPSHADECAPS_SPECULARFLATMONO 0x00000040L
#define D3DPSHADECAPS_SPECULARFLATRGB 0x00000080L
#define D3DPSHADECAPS_SPECULARGOURAUDMONO 0x00000100L
#define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200L
#define D3DPSHADECAPS_SPECULARPHONGMONO 0x00000400L
#define D3DPSHADECAPS_SPECULARPHONGRGB 0x00000800L
#define D3DPSHADECAPS_ALPHAFLATBLEND 0x00001000L
#define D3DPSHADECAPS_ALPHAFLATSTIPPLED 0x00002000L
#define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000L
#define D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED 0x00008000L
#define D3DPSHADECAPS_ALPHAPHONGBLEND 0x00010000L
#define D3DPSHADECAPS_ALPHAPHONGSTIPPLED 0x00020000L
#define D3DPSHADECAPS_FOGFLAT 0x00040000L
#define D3DPSHADECAPS_FOGGOURAUD 0x00080000L
#define D3DPSHADECAPS_FOGPHONG 0x00100000L
/* D3DPRIMCAPS dwTextureCaps */
/*
* Perspective-correct texturing is supported
*/
#define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001L
/*
* Power-of-2 texture dimensions are required
*/
#define D3DPTEXTURECAPS_POW2 0x00000002L
/*
* Alpha in texture pixels is supported
*/
#define D3DPTEXTURECAPS_ALPHA 0x00000004L
/*
* Color-keyed textures are supported
*/
#define D3DPTEXTURECAPS_TRANSPARENCY 0x00000008L
/*
* obsolete, see D3DPTADDRESSCAPS_BORDER
*/
#define D3DPTEXTURECAPS_BORDER 0x00000010L
/*
* Only square textures are supported
*/
#define D3DPTEXTURECAPS_SQUAREONLY 0x00000020L
#if(DIRECT3D_VERSION >= 0x0600)
/*
* Texture indices are not scaled by the texture size prior
* to interpolation.
*/
#define D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040L
/*
* Device can draw alpha from texture palettes
*/
#define D3DPTEXTURECAPS_ALPHAPALETTE 0x00000080L
/*
* Device can use non-POW2 textures if:
* 1) D3DTEXTURE_ADDRESS is set to CLAMP for this texture's stage
* 2) D3DRS_WRAP(N) is zero for this texture's coordinates
* 3) mip mapping is not enabled (use magnification filter only)
*/
#define D3DPTEXTURECAPS_NONPOW2CONDITIONAL 0x00000100L
#endif /* DIRECT3D_VERSION >= 0x0600 */
#if(DIRECT3D_VERSION >= 0x0700)
// 0x00000200L unused
/*
* Device can divide transformed texture coordinates by the
* COUNTth texture coordinate (can do D3DTTFF_PROJECTED)
*/
#define D3DPTEXTURECAPS_PROJECTED 0x00000400L
/*
* Device can do cubemap textures
*/
#define D3DPTEXTURECAPS_CUBEMAP 0x00000800L
#define D3DPTEXTURECAPS_COLORKEYBLEND 0x00001000L
#endif /* DIRECT3D_VERSION >= 0x0700 */
/* D3DPRIMCAPS dwTextureFilterCaps */
#define D3DPTFILTERCAPS_NEAREST 0x00000001L
#define D3DPTFILTERCAPS_LINEAR 0x00000002L
#define D3DPTFILTERCAPS_MIPNEAREST 0x00000004L
#define D3DPTFILTERCAPS_MIPLINEAR 0x00000008L
#define D3DPTFILTERCAPS_LINEARMIPNEAREST 0x00000010L
#define D3DPTFILTERCAPS_LINEARMIPLINEAR 0x00000020L
#if(DIRECT3D_VERSION >= 0x0600)
/* Device3 Min Filter */
#define D3DPTFILTERCAPS_MINFPOINT 0x00000100L
#define D3DPTFILTERCAPS_MINFLINEAR 0x00000200L
#define D3DPTFILTERCAPS_MINFANISOTROPIC 0x00000400L
/* Device3 Mip Filter */
#define D3DPTFILTERCAPS_MIPFPOINT 0x00010000L
#define D3DPTFILTERCAPS_MIPFLINEAR 0x00020000L
/* Device3 Mag Filter */
#define D3DPTFILTERCAPS_MAGFPOINT 0x01000000L
#define D3DPTFILTERCAPS_MAGFLINEAR 0x02000000L
#define D3DPTFILTERCAPS_MAGFANISOTROPIC 0x04000000L
#define D3DPTFILTERCAPS_MAGFAFLATCUBIC 0x08000000L
#define D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC 0x10000000L
#endif /* DIRECT3D_VERSION >= 0x0600 */
/* D3DPRIMCAPS dwTextureBlendCaps */
#define D3DPTBLENDCAPS_DECAL 0x00000001L
#define D3DPTBLENDCAPS_MODULATE 0x00000002L
#define D3DPTBLENDCAPS_DECALALPHA 0x00000004L
#define D3DPTBLENDCAPS_MODULATEALPHA 0x00000008L
#define D3DPTBLENDCAPS_DECALMASK 0x00000010L
#define D3DPTBLENDCAPS_MODULATEMASK 0x00000020L
#define D3DPTBLENDCAPS_COPY 0x00000040L
#if(DIRECT3D_VERSION >= 0x0500)
#define D3DPTBLENDCAPS_ADD 0x00000080L
#endif /* DIRECT3D_VERSION >= 0x0500 */
/* D3DPRIMCAPS dwTextureAddressCaps */
#define D3DPTADDRESSCAPS_WRAP 0x00000001L
#define D3DPTADDRESSCAPS_MIRROR 0x00000002L
#define D3DPTADDRESSCAPS_CLAMP 0x00000004L
#if(DIRECT3D_VERSION >= 0x0500)
#define D3DPTADDRESSCAPS_BORDER 0x00000008L
#define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010L
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
/* D3DDEVICEDESC dwStencilCaps */
#define D3DSTENCILCAPS_KEEP 0x00000001L
#define D3DSTENCILCAPS_ZERO 0x00000002L
#define D3DSTENCILCAPS_REPLACE 0x00000004L
#define D3DSTENCILCAPS_INCRSAT 0x00000008L
#define D3DSTENCILCAPS_DECRSAT 0x00000010L
#define D3DSTENCILCAPS_INVERT 0x00000020L
#define D3DSTENCILCAPS_INCR 0x00000040L
#define D3DSTENCILCAPS_DECR 0x00000080L
/* D3DDEVICEDESC dwTextureOpCaps */
#define D3DTEXOPCAPS_DISABLE 0x00000001L
#define D3DTEXOPCAPS_SELECTARG1 0x00000002L
#define D3DTEXOPCAPS_SELECTARG2 0x00000004L
#define D3DTEXOPCAPS_MODULATE 0x00000008L
#define D3DTEXOPCAPS_MODULATE2X 0x00000010L
#define D3DTEXOPCAPS_MODULATE4X 0x00000020L
#define D3DTEXOPCAPS_ADD 0x00000040L
#define D3DTEXOPCAPS_ADDSIGNED 0x00000080L
#define D3DTEXOPCAPS_ADDSIGNED2X 0x00000100L
#define D3DTEXOPCAPS_SUBTRACT 0x00000200L
#define D3DTEXOPCAPS_ADDSMOOTH 0x00000400L
#define D3DTEXOPCAPS_BLENDDIFFUSEALPHA 0x00000800L
#define D3DTEXOPCAPS_BLENDTEXTUREALPHA 0x00001000L
#define D3DTEXOPCAPS_BLENDFACTORALPHA 0x00002000L
#define D3DTEXOPCAPS_BLENDTEXTUREALPHAPM 0x00004000L
#define D3DTEXOPCAPS_BLENDCURRENTALPHA 0x00008000L
#define D3DTEXOPCAPS_PREMODULATE 0x00010000L
#define D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR 0x00020000L
#define D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA 0x00040000L
#define D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR 0x00080000L
#define D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA 0x00100000L
#define D3DTEXOPCAPS_BUMPENVMAP 0x00200000L
#define D3DTEXOPCAPS_BUMPENVMAPLUMINANCE 0x00400000L
#define D3DTEXOPCAPS_DOTPRODUCT3 0x00800000L
/* D3DDEVICEDESC dwFVFCaps flags */
#define D3DFVFCAPS_TEXCOORDCOUNTMASK 0x0000ffffL /* mask for texture coordinate count field */
#define D3DFVFCAPS_DONOTSTRIPELEMENTS 0x00080000L /* Device prefers that vertex elements not be stripped */
#endif /* DIRECT3D_VERSION >= 0x0600 */
/*
* Description for a device.
* This is used to describe a device that is to be created or to query
* the current device.
*/
typedef struct _D3DDeviceDesc {
DWORD dwSize; /* Size of D3DDEVICEDESC structure */
DWORD dwFlags; /* Indicates which fields have valid data */
D3DCOLORMODEL dcmColorModel; /* Color model of device */
DWORD dwDevCaps; /* Capabilities of device */
D3DTRANSFORMCAPS dtcTransformCaps; /* Capabilities of transform */
BOOL bClipping; /* Device can do 3D clipping */
D3DLIGHTINGCAPS dlcLightingCaps; /* Capabilities of lighting */
D3DPRIMCAPS dpcLineCaps;
D3DPRIMCAPS dpcTriCaps;
DWORD dwDeviceRenderBitDepth; /* One of DDBB_8, 16, etc.. */
DWORD dwDeviceZBufferBitDepth;/* One of DDBD_16, 32, etc.. */
DWORD dwMaxBufferSize; /* Maximum execute buffer size */
DWORD dwMaxVertexCount; /* Maximum vertex count */
#if(DIRECT3D_VERSION >= 0x0500)
// *** New fields for DX5 *** //
// Width and height caps are 0 for legacy HALs.
DWORD dwMinTextureWidth, dwMinTextureHeight;
DWORD dwMaxTextureWidth, dwMaxTextureHeight;
DWORD dwMinStippleWidth, dwMaxStippleWidth;
DWORD dwMinStippleHeight, dwMaxStippleHeight;
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
// New fields for DX6
DWORD dwMaxTextureRepeat;
DWORD dwMaxTextureAspectRatio;
DWORD dwMaxAnisotropy;
// Guard band that the rasterizer can accommodate
// Screen-space vertices inside this space but outside the viewport
// will get clipped properly.
D3DVALUE dvGuardBandLeft;
D3DVALUE dvGuardBandTop;
D3DVALUE dvGuardBandRight;
D3DVALUE dvGuardBandBottom;
D3DVALUE dvExtentsAdjust;
DWORD dwStencilCaps;
DWORD dwFVFCaps;
DWORD dwTextureOpCaps;
WORD wMaxTextureBlendStages;
WORD wMaxSimultaneousTextures;
#endif /* DIRECT3D_VERSION >= 0x0600 */
} D3DDEVICEDESC, *LPD3DDEVICEDESC;
#if(DIRECT3D_VERSION >= 0x0700)
typedef struct _D3DDeviceDesc7 {
DWORD dwDevCaps; /* Capabilities of device */
D3DPRIMCAPS dpcLineCaps;
D3DPRIMCAPS dpcTriCaps;
DWORD dwDeviceRenderBitDepth; /* One of DDBB_8, 16, etc.. */
DWORD dwDeviceZBufferBitDepth;/* One of DDBD_16, 32, etc.. */
DWORD dwMinTextureWidth, dwMinTextureHeight;
DWORD dwMaxTextureWidth, dwMaxTextureHeight;
DWORD dwMaxTextureRepeat;
DWORD dwMaxTextureAspectRatio;
DWORD dwMaxAnisotropy;
D3DVALUE dvGuardBandLeft;
D3DVALUE dvGuardBandTop;
D3DVALUE dvGuardBandRight;
D3DVALUE dvGuardBandBottom;
D3DVALUE dvExtentsAdjust;
DWORD dwStencilCaps;
DWORD dwFVFCaps;
DWORD dwTextureOpCaps;
WORD wMaxTextureBlendStages;
WORD wMaxSimultaneousTextures;
DWORD dwMaxActiveLights;
D3DVALUE dvMaxVertexW;
GUID deviceGUID;
WORD wMaxUserClipPlanes;
WORD wMaxVertexBlendMatrices;
DWORD dwVertexProcessingCaps;
DWORD dwReserved1;
DWORD dwReserved2;
DWORD dwReserved3;
DWORD dwReserved4;
} D3DDEVICEDESC7, *LPD3DDEVICEDESC7;
#endif /* DIRECT3D_VERSION >= 0x0700 */
#define D3DDEVICEDESCSIZE (sizeof(D3DDEVICEDESC))
#define D3DDEVICEDESC7SIZE (sizeof(D3DDEVICEDESC7))
typedef HRESULT (CALLBACK * LPD3DENUMDEVICESCALLBACK)(GUID FAR *lpGuid, LPSTR lpDeviceDescription, LPSTR lpDeviceName, LPD3DDEVICEDESC, LPD3DDEVICEDESC, LPVOID);
#if(DIRECT3D_VERSION >= 0x0700)
typedef HRESULT (CALLBACK * LPD3DENUMDEVICESCALLBACK7)(LPSTR lpDeviceDescription, LPSTR lpDeviceName, LPD3DDEVICEDESC7, LPVOID);
#endif /* DIRECT3D_VERSION >= 0x0700 */
/* D3DDEVICEDESC dwFlags indicating valid fields */
#define D3DDD_COLORMODEL 0x00000001L /* dcmColorModel is valid */
#define D3DDD_DEVCAPS 0x00000002L /* dwDevCaps is valid */
#define D3DDD_TRANSFORMCAPS 0x00000004L /* dtcTransformCaps is valid */
#define D3DDD_LIGHTINGCAPS 0x00000008L /* dlcLightingCaps is valid */
#define D3DDD_BCLIPPING 0x00000010L /* bClipping is valid */
#define D3DDD_LINECAPS 0x00000020L /* dpcLineCaps is valid */
#define D3DDD_TRICAPS 0x00000040L /* dpcTriCaps is valid */
#define D3DDD_DEVICERENDERBITDEPTH 0x00000080L /* dwDeviceRenderBitDepth is valid */
#define D3DDD_DEVICEZBUFFERBITDEPTH 0x00000100L /* dwDeviceZBufferBitDepth is valid */
#define D3DDD_MAXBUFFERSIZE 0x00000200L /* dwMaxBufferSize is valid */
#define D3DDD_MAXVERTEXCOUNT 0x00000400L /* dwMaxVertexCount is valid */
/* D3DDEVICEDESC dwDevCaps flags */
#define D3DDEVCAPS_FLOATTLVERTEX 0x00000001L /* Device accepts floating point */
/* for post-transform vertex data */
#define D3DDEVCAPS_SORTINCREASINGZ 0x00000002L /* Device needs data sorted for increasing Z */
#define D3DDEVCAPS_SORTDECREASINGZ 0X00000004L /* Device needs data sorted for decreasing Z */
#define D3DDEVCAPS_SORTEXACT 0x00000008L /* Device needs data sorted exactly */
#define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010L /* Device can use execute buffers from system memory */
#define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020L /* Device can use execute buffers from video memory */
#define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040L /* Device can use TL buffers from system memory */
#define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080L /* Device can use TL buffers from video memory */
#define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100L /* Device can texture from system memory */
#define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200L /* Device can texture from device memory */
#if(DIRECT3D_VERSION >= 0x0500)
#define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400L /* Device can draw TLVERTEX primitives */
#define D3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800L /* Device can render without waiting for flip to complete */
#define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000L /* Device can texture from nonlocal video memory */
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
#define D3DDEVCAPS_DRAWPRIMITIVES2 0x00002000L /* Device can support DrawPrimitives2 */
#define D3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x00004000L /* Device is texturing from separate memory pools */
#define D3DDEVCAPS_DRAWPRIMITIVES2EX 0x00008000L /* Device can support Extended DrawPrimitives2 i.e. DX7 compliant driver*/
#endif /* DIRECT3D_VERSION >= 0x0600 */
#if(DIRECT3D_VERSION >= 0x0700)
#define D3DDEVCAPS_HWTRANSFORMANDLIGHT 0x00010000L /* Device can support transformation and lighting in hardware and DRAWPRIMITIVES2EX must be also */
#define D3DDEVCAPS_CANBLTSYSTONONLOCAL 0x00020000L /* Device supports a Tex Blt from system memory to non-local vidmem */
#define D3DDEVCAPS_HWRASTERIZATION 0x00080000L /* Device has HW acceleration for rasterization */
/*
* These are the flags in the D3DDEVICEDESC7.dwVertexProcessingCaps field
*/
/* device can do texgen */
#define D3DVTXPCAPS_TEXGEN 0x00000001L
/* device can do IDirect3DDevice7 colormaterialsource ops */
#define D3DVTXPCAPS_MATERIALSOURCE7 0x00000002L
/* device can do vertex fog */
#define D3DVTXPCAPS_VERTEXFOG 0x00000004L
/* device can do directional lights */
#define D3DVTXPCAPS_DIRECTIONALLIGHTS 0x00000008L
/* device can do positional lights (includes point and spot) */
#define D3DVTXPCAPS_POSITIONALLIGHTS 0x00000010L
/* device can do local viewer */
#define D3DVTXPCAPS_LOCALVIEWER 0x00000020L
#endif /* DIRECT3D_VERSION >= 0x0700 */
#define D3DFDS_COLORMODEL 0x00000001L /* Match color model */
#define D3DFDS_GUID 0x00000002L /* Match guid */
#define D3DFDS_HARDWARE 0x00000004L /* Match hardware/software */
#define D3DFDS_TRIANGLES 0x00000008L /* Match in triCaps */
#define D3DFDS_LINES 0x00000010L /* Match in lineCaps */
#define D3DFDS_MISCCAPS 0x00000020L /* Match primCaps.dwMiscCaps */
#define D3DFDS_RASTERCAPS 0x00000040L /* Match primCaps.dwRasterCaps */
#define D3DFDS_ZCMPCAPS 0x00000080L /* Match primCaps.dwZCmpCaps */
#define D3DFDS_ALPHACMPCAPS 0x00000100L /* Match primCaps.dwAlphaCmpCaps */
#define D3DFDS_SRCBLENDCAPS 0x00000200L /* Match primCaps.dwSourceBlendCaps */
#define D3DFDS_DSTBLENDCAPS 0x00000400L /* Match primCaps.dwDestBlendCaps */
#define D3DFDS_SHADECAPS 0x00000800L /* Match primCaps.dwShadeCaps */
#define D3DFDS_TEXTURECAPS 0x00001000L /* Match primCaps.dwTextureCaps */
#define D3DFDS_TEXTUREFILTERCAPS 0x00002000L /* Match primCaps.dwTextureFilterCaps */
#define D3DFDS_TEXTUREBLENDCAPS 0x00004000L /* Match primCaps.dwTextureBlendCaps */
#define D3DFDS_TEXTUREADDRESSCAPS 0x00008000L /* Match primCaps.dwTextureBlendCaps */
/*
* FindDevice arguments
*/
typedef struct _D3DFINDDEVICESEARCH {
DWORD dwSize;
DWORD dwFlags;
BOOL bHardware;
D3DCOLORMODEL dcmColorModel;
GUID guid;
DWORD dwCaps;
D3DPRIMCAPS dpcPrimCaps;
} D3DFINDDEVICESEARCH, *LPD3DFINDDEVICESEARCH;
typedef struct _D3DFINDDEVICERESULT {
DWORD dwSize;
GUID guid; /* guid which matched */
D3DDEVICEDESC ddHwDesc; /* hardware D3DDEVICEDESC */
D3DDEVICEDESC ddSwDesc; /* software D3DDEVICEDESC */
} D3DFINDDEVICERESULT, *LPD3DFINDDEVICERESULT;
/*
* Description of execute buffer.
*/
typedef struct _D3DExecuteBufferDesc {
DWORD dwSize; /* size of this structure */
DWORD dwFlags; /* flags indicating which fields are valid */
DWORD dwCaps; /* capabilities of execute buffer */
DWORD dwBufferSize; /* size of execute buffer data */
LPVOID lpData; /* pointer to actual data */
} D3DEXECUTEBUFFERDESC, *LPD3DEXECUTEBUFFERDESC;
/* D3DEXECUTEBUFFER dwFlags indicating valid fields */
#define D3DDEB_BUFSIZE 0x00000001l /* buffer size valid */
#define D3DDEB_CAPS 0x00000002l /* caps valid */
#define D3DDEB_LPDATA 0x00000004l /* lpData valid */
/* D3DEXECUTEBUFFER dwCaps */
#define D3DDEBCAPS_SYSTEMMEMORY 0x00000001l /* buffer in system memory */
#define D3DDEBCAPS_VIDEOMEMORY 0x00000002l /* buffer in device memory */
#define D3DDEBCAPS_MEM (D3DDEBCAPS_SYSTEMMEMORY|D3DDEBCAPS_VIDEOMEMORY)
#if(DIRECT3D_VERSION < 0x0800)
#if(DIRECT3D_VERSION >= 0x0700)
typedef struct _D3DDEVINFO_TEXTUREMANAGER {
BOOL bThrashing; /* indicates if thrashing */
DWORD dwApproxBytesDownloaded; /* Approximate number of bytes downloaded by texture manager */
DWORD dwNumEvicts; /* number of textures evicted */
DWORD dwNumVidCreates; /* number of textures created in video memory */
DWORD dwNumTexturesUsed; /* number of textures used */
DWORD dwNumUsedTexInVid; /* number of used textures present in video memory */
DWORD dwWorkingSet; /* number of textures in video memory */
DWORD dwWorkingSetBytes; /* number of bytes in video memory */
DWORD dwTotalManaged; /* total number of managed textures */
DWORD dwTotalBytes; /* total number of bytes of managed textures */
DWORD dwLastPri; /* priority of last texture evicted */
} D3DDEVINFO_TEXTUREMANAGER, *LPD3DDEVINFO_TEXTUREMANAGER;
typedef struct _D3DDEVINFO_TEXTURING {
DWORD dwNumLoads; /* counts Load() API calls */
DWORD dwApproxBytesLoaded; /* Approximate number bytes loaded via Load() */
DWORD dwNumPreLoads; /* counts PreLoad() API calls */
DWORD dwNumSet; /* counts SetTexture() API calls */
DWORD dwNumCreates; /* counts texture creates */
DWORD dwNumDestroys; /* counts texture destroys */
DWORD dwNumSetPriorities; /* counts SetPriority() API calls */
DWORD dwNumSetLODs; /* counts SetLOD() API calls */
DWORD dwNumLocks; /* counts number of texture locks */
DWORD dwNumGetDCs; /* counts number of GetDCs to textures */
} D3DDEVINFO_TEXTURING, *LPD3DDEVINFO_TEXTURING;
#endif /* DIRECT3D_VERSION >= 0x0700 */
#endif //(DIRECT3D_VERSION < 0x0800)
#pragma pack()
#endif /* _D3DCAPS_H_ */

342
lib/directx8/d3drm.h Executable file
View File

@ -0,0 +1,342 @@
/*==========================================================================;
*
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
*
* File: d3drm.h
* Content: Direct3DRM include file
*
***************************************************************************/
#ifndef __D3DRM_H__
#define __D3DRM_H__
#include "ddraw.h"
#ifdef __cplusplus
struct IDirect3DRM;
#endif
typedef struct IDirect3DRM *LPDIRECT3DRM;
#include "d3drmobj.h"
#ifdef __cplusplus
extern "C" {
#endif
DEFINE_GUID(IID_IDirect3DRM, 0x2bc49361, 0x8327, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
DEFINE_GUID(IID_IDirect3DRM2, 0x4516ecc8, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
DEFINE_GUID(IID_IDirect3DRM3, 0x4516ec83, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
WIN_TYPES(IDirect3DRM, DIRECT3DRM);
WIN_TYPES(IDirect3DRM2, DIRECT3DRM2);
WIN_TYPES(IDirect3DRM3, DIRECT3DRM3);
/*
* Direct3DRM Object Class (for CoCreateInstance())
*/
DEFINE_GUID(CLSID_CDirect3DRM, 0x4516ec41, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
/* Create a Direct3DRM API */
STDAPI Direct3DRMCreate(LPDIRECT3DRM FAR *lplpDirect3DRM);
#undef INTERFACE
#define INTERFACE IDirect3DRM
DECLARE_INTERFACE_(IDirect3DRM, IUnknown)
{
IUNKNOWN_METHODS(PURE);
STDMETHOD(CreateObject)
(THIS_ REFCLSID rclsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID FAR* ppv) PURE;
STDMETHOD(CreateFrame) (THIS_ LPDIRECT3DRMFRAME, LPDIRECT3DRMFRAME *) PURE;
STDMETHOD(CreateMesh) (THIS_ LPDIRECT3DRMMESH *) PURE;
STDMETHOD(CreateMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER *) PURE;
STDMETHOD(CreateFace) (THIS_ LPDIRECT3DRMFACE *) PURE;
STDMETHOD(CreateAnimation) (THIS_ LPDIRECT3DRMANIMATION *) PURE;
STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET *) PURE;
STDMETHOD(CreateTexture) (THIS_ LPD3DRMIMAGE, LPDIRECT3DRMTEXTURE *) PURE;
STDMETHOD(CreateLight) (THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE;
STDMETHOD(CreateLightRGB)
(THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE;
STDMETHOD(CreateMaterial) (THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL *) PURE;
STDMETHOD(CreateDevice) (THIS_ DWORD, DWORD, LPDIRECT3DRMDEVICE *) PURE;
/* Create a Windows Device using DirectDraw surfaces */
STDMETHOD(CreateDeviceFromSurface)
( THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD,
LPDIRECTDRAWSURFACE lpDDSBack, LPDIRECT3DRMDEVICE *
) PURE;
/* Create a Windows Device using D3D objects */
STDMETHOD(CreateDeviceFromD3D)
( THIS_ LPDIRECT3D lpD3D, LPDIRECT3DDEVICE lpD3DDev,
LPDIRECT3DRMDEVICE *
) PURE;
STDMETHOD(CreateDeviceFromClipper)
( THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID,
int width, int height, LPDIRECT3DRMDEVICE *) PURE;
STDMETHOD(CreateTextureFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DRMTEXTURE *) PURE;
STDMETHOD(CreateShadow)
( THIS_ LPDIRECT3DRMVISUAL, LPDIRECT3DRMLIGHT,
D3DVALUE px, D3DVALUE py, D3DVALUE pz,
D3DVALUE nx, D3DVALUE ny, D3DVALUE nz,
LPDIRECT3DRMVISUAL *
) PURE;
STDMETHOD(CreateViewport)
( THIS_ LPDIRECT3DRMDEVICE, LPDIRECT3DRMFRAME, DWORD, DWORD,
DWORD, DWORD, LPDIRECT3DRMVIEWPORT *
) PURE;
STDMETHOD(CreateWrap)
( THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME,
D3DVALUE ox, D3DVALUE oy, D3DVALUE oz,
D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
D3DVALUE ux, D3DVALUE uy, D3DVALUE uz,
D3DVALUE ou, D3DVALUE ov,
D3DVALUE su, D3DVALUE sv,
LPDIRECT3DRMWRAP *
) PURE;
STDMETHOD(CreateUserVisual) (THIS_ D3DRMUSERVISUALCALLBACK, LPVOID lPArg, LPDIRECT3DRMUSERVISUAL *) PURE;
STDMETHOD(LoadTexture) (THIS_ const char *, LPDIRECT3DRMTEXTURE *) PURE;
STDMETHOD(LoadTextureFromResource) (THIS_ HRSRC rs, LPDIRECT3DRMTEXTURE *) PURE;
STDMETHOD(SetSearchPath) (THIS_ LPCSTR) PURE;
STDMETHOD(AddSearchPath) (THIS_ LPCSTR) PURE;
STDMETHOD(GetSearchPath) (THIS_ DWORD *size_return, LPSTR path_return) PURE;
STDMETHOD(SetDefaultTextureColors)(THIS_ DWORD) PURE;
STDMETHOD(SetDefaultTextureShades)(THIS_ DWORD) PURE;
STDMETHOD(GetDevices) (THIS_ LPDIRECT3DRMDEVICEARRAY *) PURE;
STDMETHOD(GetNamedObject) (THIS_ const char *, LPDIRECT3DRMOBJECT *) PURE;
STDMETHOD(EnumerateObjects) (THIS_ D3DRMOBJECTCALLBACK, LPVOID) PURE;
STDMETHOD(Load)
( THIS_ LPVOID, LPVOID, LPIID *, DWORD, D3DRMLOADOPTIONS,
D3DRMLOADCALLBACK, LPVOID, D3DRMLOADTEXTURECALLBACK, LPVOID,
LPDIRECT3DRMFRAME
) PURE;
STDMETHOD(Tick) (THIS_ D3DVALUE) PURE;
};
#undef INTERFACE
#define INTERFACE IDirect3DRM2
DECLARE_INTERFACE_(IDirect3DRM2, IUnknown)
{
IUNKNOWN_METHODS(PURE);
STDMETHOD(CreateObject)
(THIS_ REFCLSID rclsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID FAR* ppv) PURE;
STDMETHOD(CreateFrame) (THIS_ LPDIRECT3DRMFRAME, LPDIRECT3DRMFRAME2 *) PURE;
STDMETHOD(CreateMesh) (THIS_ LPDIRECT3DRMMESH *) PURE;
STDMETHOD(CreateMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER2 *) PURE;
STDMETHOD(CreateFace) (THIS_ LPDIRECT3DRMFACE *) PURE;
STDMETHOD(CreateAnimation) (THIS_ LPDIRECT3DRMANIMATION *) PURE;
STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET *) PURE;
STDMETHOD(CreateTexture) (THIS_ LPD3DRMIMAGE, LPDIRECT3DRMTEXTURE2 *) PURE;
STDMETHOD(CreateLight) (THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE;
STDMETHOD(CreateLightRGB)
(THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE;
STDMETHOD(CreateMaterial) (THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL *) PURE;
STDMETHOD(CreateDevice) (THIS_ DWORD, DWORD, LPDIRECT3DRMDEVICE2 *) PURE;
/* Create a Windows Device using DirectDraw surfaces */
STDMETHOD(CreateDeviceFromSurface)
( THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD,
LPDIRECTDRAWSURFACE lpDDSBack, LPDIRECT3DRMDEVICE2 *
) PURE;
/* Create a Windows Device using D3D objects */
STDMETHOD(CreateDeviceFromD3D)
( THIS_ LPDIRECT3D2 lpD3D, LPDIRECT3DDEVICE2 lpD3DDev,
LPDIRECT3DRMDEVICE2 *
) PURE;
STDMETHOD(CreateDeviceFromClipper)
( THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID,
int width, int height, LPDIRECT3DRMDEVICE2 *) PURE;
STDMETHOD(CreateTextureFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DRMTEXTURE2 *) PURE;
STDMETHOD(CreateShadow)
( THIS_ LPDIRECT3DRMVISUAL, LPDIRECT3DRMLIGHT,
D3DVALUE px, D3DVALUE py, D3DVALUE pz,
D3DVALUE nx, D3DVALUE ny, D3DVALUE nz,
LPDIRECT3DRMVISUAL *
) PURE;
STDMETHOD(CreateViewport)
( THIS_ LPDIRECT3DRMDEVICE, LPDIRECT3DRMFRAME, DWORD, DWORD,
DWORD, DWORD, LPDIRECT3DRMVIEWPORT *
) PURE;
STDMETHOD(CreateWrap)
( THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME,
D3DVALUE ox, D3DVALUE oy, D3DVALUE oz,
D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
D3DVALUE ux, D3DVALUE uy, D3DVALUE uz,
D3DVALUE ou, D3DVALUE ov,
D3DVALUE su, D3DVALUE sv,
LPDIRECT3DRMWRAP *
) PURE;
STDMETHOD(CreateUserVisual) (THIS_ D3DRMUSERVISUALCALLBACK, LPVOID lPArg, LPDIRECT3DRMUSERVISUAL *) PURE;
STDMETHOD(LoadTexture) (THIS_ const char *, LPDIRECT3DRMTEXTURE2 *) PURE;
STDMETHOD(LoadTextureFromResource) (THIS_ HMODULE hModule, LPCTSTR strName, LPCTSTR strType, LPDIRECT3DRMTEXTURE2 *) PURE;
STDMETHOD(SetSearchPath) (THIS_ LPCSTR) PURE;
STDMETHOD(AddSearchPath) (THIS_ LPCSTR) PURE;
STDMETHOD(GetSearchPath) (THIS_ DWORD *size_return, LPSTR path_return) PURE;
STDMETHOD(SetDefaultTextureColors)(THIS_ DWORD) PURE;
STDMETHOD(SetDefaultTextureShades)(THIS_ DWORD) PURE;
STDMETHOD(GetDevices) (THIS_ LPDIRECT3DRMDEVICEARRAY *) PURE;
STDMETHOD(GetNamedObject) (THIS_ const char *, LPDIRECT3DRMOBJECT *) PURE;
STDMETHOD(EnumerateObjects) (THIS_ D3DRMOBJECTCALLBACK, LPVOID) PURE;
STDMETHOD(Load)
( THIS_ LPVOID, LPVOID, LPIID *, DWORD, D3DRMLOADOPTIONS,
D3DRMLOADCALLBACK, LPVOID, D3DRMLOADTEXTURECALLBACK, LPVOID,
LPDIRECT3DRMFRAME
) PURE;
STDMETHOD(Tick) (THIS_ D3DVALUE) PURE;
STDMETHOD(CreateProgressiveMesh)(THIS_ LPDIRECT3DRMPROGRESSIVEMESH *) PURE;
};
#undef INTERFACE
#define INTERFACE IDirect3DRM3
DECLARE_INTERFACE_(IDirect3DRM3, IUnknown)
{
IUNKNOWN_METHODS(PURE);
STDMETHOD(CreateObject)
(THIS_ REFCLSID rclsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID FAR* ppv) PURE;
STDMETHOD(CreateFrame) (THIS_ LPDIRECT3DRMFRAME3, LPDIRECT3DRMFRAME3 *) PURE;
STDMETHOD(CreateMesh) (THIS_ LPDIRECT3DRMMESH *) PURE;
STDMETHOD(CreateMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER3 *) PURE;
STDMETHOD(CreateFace) (THIS_ LPDIRECT3DRMFACE2 *) PURE;
STDMETHOD(CreateAnimation) (THIS_ LPDIRECT3DRMANIMATION2 *) PURE;
STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET2 *) PURE;
STDMETHOD(CreateTexture) (THIS_ LPD3DRMIMAGE, LPDIRECT3DRMTEXTURE3 *) PURE;
STDMETHOD(CreateLight) (THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE;
STDMETHOD(CreateLightRGB)
(THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE;
STDMETHOD(CreateMaterial) (THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL2 *) PURE;
STDMETHOD(CreateDevice) (THIS_ DWORD, DWORD, LPDIRECT3DRMDEVICE3 *) PURE;
/* Create a Windows Device using DirectDraw surfaces */
STDMETHOD(CreateDeviceFromSurface)
( THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD,
LPDIRECTDRAWSURFACE lpDDSBack, DWORD dwFlags, LPDIRECT3DRMDEVICE3 *
) PURE;
/* Create a Windows Device using D3D objects */
STDMETHOD(CreateDeviceFromD3D)
( THIS_ LPDIRECT3D2 lpD3D, LPDIRECT3DDEVICE2 lpD3DDev,
LPDIRECT3DRMDEVICE3 *
) PURE;
STDMETHOD(CreateDeviceFromClipper)
( THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID,
int width, int height, LPDIRECT3DRMDEVICE3 *) PURE;
STDMETHOD(CreateTextureFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DRMTEXTURE3 *) PURE;
STDMETHOD(CreateShadow)
( THIS_ LPUNKNOWN, LPDIRECT3DRMLIGHT,
D3DVALUE px, D3DVALUE py, D3DVALUE pz,
D3DVALUE nx, D3DVALUE ny, D3DVALUE nz,
LPDIRECT3DRMSHADOW2 *
) PURE;
STDMETHOD(CreateViewport)
( THIS_ LPDIRECT3DRMDEVICE3, LPDIRECT3DRMFRAME3, DWORD, DWORD,
DWORD, DWORD, LPDIRECT3DRMVIEWPORT2 *
) PURE;
STDMETHOD(CreateWrap)
( THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME3,
D3DVALUE ox, D3DVALUE oy, D3DVALUE oz,
D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
D3DVALUE ux, D3DVALUE uy, D3DVALUE uz,
D3DVALUE ou, D3DVALUE ov,
D3DVALUE su, D3DVALUE sv,
LPDIRECT3DRMWRAP *
) PURE;
STDMETHOD(CreateUserVisual) (THIS_ D3DRMUSERVISUALCALLBACK, LPVOID lPArg, LPDIRECT3DRMUSERVISUAL *) PURE;
STDMETHOD(LoadTexture) (THIS_ const char *, LPDIRECT3DRMTEXTURE3 *) PURE;
STDMETHOD(LoadTextureFromResource) (THIS_ HMODULE hModule, LPCTSTR strName, LPCTSTR strType, LPDIRECT3DRMTEXTURE3 *) PURE;
STDMETHOD(SetSearchPath) (THIS_ LPCSTR) PURE;
STDMETHOD(AddSearchPath) (THIS_ LPCSTR) PURE;
STDMETHOD(GetSearchPath) (THIS_ DWORD *size_return, LPSTR path_return) PURE;
STDMETHOD(SetDefaultTextureColors)(THIS_ DWORD) PURE;
STDMETHOD(SetDefaultTextureShades)(THIS_ DWORD) PURE;
STDMETHOD(GetDevices) (THIS_ LPDIRECT3DRMDEVICEARRAY *) PURE;
STDMETHOD(GetNamedObject) (THIS_ const char *, LPDIRECT3DRMOBJECT *) PURE;
STDMETHOD(EnumerateObjects) (THIS_ D3DRMOBJECTCALLBACK, LPVOID) PURE;
STDMETHOD(Load)
( THIS_ LPVOID, LPVOID, LPIID *, DWORD, D3DRMLOADOPTIONS,
D3DRMLOADCALLBACK, LPVOID, D3DRMLOADTEXTURE3CALLBACK, LPVOID,
LPDIRECT3DRMFRAME3
) PURE;
STDMETHOD(Tick) (THIS_ D3DVALUE) PURE;
STDMETHOD(CreateProgressiveMesh)(THIS_ LPDIRECT3DRMPROGRESSIVEMESH *) PURE;
/* Used with IDirect3DRMObject2 */
STDMETHOD(RegisterClient) (THIS_ REFGUID rguid, LPDWORD lpdwID) PURE;
STDMETHOD(UnregisterClient) (THIS_ REFGUID rguid) PURE;
STDMETHOD(CreateClippedVisual) (THIS_ LPDIRECT3DRMVISUAL, LPDIRECT3DRMCLIPPEDVISUAL *) PURE;
STDMETHOD(SetOptions) (THIS_ DWORD);
STDMETHOD(GetOptions) (THIS_ LPDWORD);
};
#define D3DRM_OK DD_OK
#define D3DRMERR_BADOBJECT MAKE_DDHRESULT(781)
#define D3DRMERR_BADTYPE MAKE_DDHRESULT(782)
#define D3DRMERR_BADALLOC MAKE_DDHRESULT(783)
#define D3DRMERR_FACEUSED MAKE_DDHRESULT(784)
#define D3DRMERR_NOTFOUND MAKE_DDHRESULT(785)
#define D3DRMERR_NOTDONEYET MAKE_DDHRESULT(786)
#define D3DRMERR_FILENOTFOUND MAKE_DDHRESULT(787)
#define D3DRMERR_BADFILE MAKE_DDHRESULT(788)
#define D3DRMERR_BADDEVICE MAKE_DDHRESULT(789)
#define D3DRMERR_BADVALUE MAKE_DDHRESULT(790)
#define D3DRMERR_BADMAJORVERSION MAKE_DDHRESULT(791)
#define D3DRMERR_BADMINORVERSION MAKE_DDHRESULT(792)
#define D3DRMERR_UNABLETOEXECUTE MAKE_DDHRESULT(793)
#define D3DRMERR_LIBRARYNOTFOUND MAKE_DDHRESULT(794)
#define D3DRMERR_INVALIDLIBRARY MAKE_DDHRESULT(795)
#define D3DRMERR_PENDING MAKE_DDHRESULT(796)
#define D3DRMERR_NOTENOUGHDATA MAKE_DDHRESULT(797)
#define D3DRMERR_REQUESTTOOLARGE MAKE_DDHRESULT(798)
#define D3DRMERR_REQUESTTOOSMALL MAKE_DDHRESULT(799)
#define D3DRMERR_CONNECTIONLOST MAKE_DDHRESULT(800)
#define D3DRMERR_LOADABORTED MAKE_DDHRESULT(801)
#define D3DRMERR_NOINTERNET MAKE_DDHRESULT(802)
#define D3DRMERR_BADCACHEFILE MAKE_DDHRESULT(803)
#define D3DRMERR_BOXNOTSET MAKE_DDHRESULT(804)
#define D3DRMERR_BADPMDATA MAKE_DDHRESULT(805)
#define D3DRMERR_CLIENTNOTREGISTERED MAKE_DDHRESULT(806)
#define D3DRMERR_NOTCREATEDFROMDDS MAKE_DDHRESULT(807)
#define D3DRMERR_NOSUCHKEY MAKE_DDHRESULT(808)
#define D3DRMERR_INCOMPATABLEKEY MAKE_DDHRESULT(809)
#define D3DRMERR_ELEMENTINUSE MAKE_DDHRESULT(810)
#define D3DRMERR_TEXTUREFORMATNOTFOUND MAKE_DDHRESULT(811)
#define D3DRMERR_NOTAGGREGATED MAKE_DDHRESULT(812)
#ifdef __cplusplus
};
#endif
#endif /* _D3DRMAPI_H_ */

695
lib/directx8/d3drmdef.h Executable file
View File

@ -0,0 +1,695 @@
/*==========================================================================;
*
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
*
* File: d3drm.h
* Content: Direct3DRM include file
*
***************************************************************************/
#ifndef __D3DRMDEFS_H__
#define __D3DRMDEFS_H__
#include <stddef.h>
#include "d3dtypes.h"
#ifdef WIN32
#define D3DRMAPI __stdcall
#else
#define D3DRMAPI
#endif
#if defined(__cplusplus)
extern "C" {
#endif
#ifndef TRUE
#define FALSE 0
#define TRUE 1
#endif
typedef struct _D3DRMVECTOR4D
{ D3DVALUE x, y, z, w;
} D3DRMVECTOR4D, *LPD3DRMVECTOR4D;
typedef D3DVALUE D3DRMMATRIX4D[4][4];
typedef struct _D3DRMQUATERNION
{ D3DVALUE s;
D3DVECTOR v;
} D3DRMQUATERNION, *LPD3DRMQUATERNION;
typedef struct _D3DRMRAY
{ D3DVECTOR dvDir;
D3DVECTOR dvPos;
} D3DRMRAY, *LPD3DRMRAY;
typedef struct _D3DRMBOX
{ D3DVECTOR min, max;
} D3DRMBOX, *LPD3DRMBOX;
typedef void (*D3DRMWRAPCALLBACK)
(LPD3DVECTOR, int* u, int* v, LPD3DVECTOR a, LPD3DVECTOR b, LPVOID);
typedef enum _D3DRMLIGHTTYPE
{ D3DRMLIGHT_AMBIENT,
D3DRMLIGHT_POINT,
D3DRMLIGHT_SPOT,
D3DRMLIGHT_DIRECTIONAL,
D3DRMLIGHT_PARALLELPOINT
} D3DRMLIGHTTYPE, *LPD3DRMLIGHTTYPE;
typedef enum _D3DRMSHADEMODE {
D3DRMSHADE_FLAT = 0,
D3DRMSHADE_GOURAUD = 1,
D3DRMSHADE_PHONG = 2,
D3DRMSHADE_MASK = 7,
D3DRMSHADE_MAX = 8
} D3DRMSHADEMODE, *LPD3DRMSHADEMODE;
typedef enum _D3DRMLIGHTMODE {
D3DRMLIGHT_OFF = 0 * D3DRMSHADE_MAX,
D3DRMLIGHT_ON = 1 * D3DRMSHADE_MAX,
D3DRMLIGHT_MASK = 7 * D3DRMSHADE_MAX,
D3DRMLIGHT_MAX = 8 * D3DRMSHADE_MAX
} D3DRMLIGHTMODE, *LPD3DRMLIGHTMODE;
typedef enum _D3DRMFILLMODE {
D3DRMFILL_POINTS = 0 * D3DRMLIGHT_MAX,
D3DRMFILL_WIREFRAME = 1 * D3DRMLIGHT_MAX,
D3DRMFILL_SOLID = 2 * D3DRMLIGHT_MAX,
D3DRMFILL_MASK = 7 * D3DRMLIGHT_MAX,
D3DRMFILL_MAX = 8 * D3DRMLIGHT_MAX
} D3DRMFILLMODE, *LPD3DRMFILLMODE;
typedef DWORD D3DRMRENDERQUALITY, *LPD3DRMRENDERQUALITY;
#define D3DRMRENDER_WIREFRAME (D3DRMSHADE_FLAT+D3DRMLIGHT_OFF+D3DRMFILL_WIREFRAME)
#define D3DRMRENDER_UNLITFLAT (D3DRMSHADE_FLAT+D3DRMLIGHT_OFF+D3DRMFILL_SOLID)
#define D3DRMRENDER_FLAT (D3DRMSHADE_FLAT+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
#define D3DRMRENDER_GOURAUD (D3DRMSHADE_GOURAUD+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
#define D3DRMRENDER_PHONG (D3DRMSHADE_PHONG+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
#define D3DRMRENDERMODE_BLENDEDTRANSPARENCY 1
#define D3DRMRENDERMODE_SORTEDTRANSPARENCY 2
#define D3DRMRENDERMODE_LIGHTINMODELSPACE 8
#define D3DRMRENDERMODE_VIEWDEPENDENTSPECULAR 16
#define D3DRMRENDERMODE_DISABLESORTEDALPHAZWRITE 32
typedef enum _D3DRMTEXTUREQUALITY
{ D3DRMTEXTURE_NEAREST, /* choose nearest texel */
D3DRMTEXTURE_LINEAR, /* interpolate 4 texels */
D3DRMTEXTURE_MIPNEAREST, /* nearest texel in nearest mipmap */
D3DRMTEXTURE_MIPLINEAR, /* interpolate 2 texels from 2 mipmaps */
D3DRMTEXTURE_LINEARMIPNEAREST, /* interpolate 4 texels in nearest mipmap */
D3DRMTEXTURE_LINEARMIPLINEAR /* interpolate 8 texels from 2 mipmaps */
} D3DRMTEXTUREQUALITY, *LPD3DRMTEXTUREQUALITY;
/*
* Texture flags
*/
#define D3DRMTEXTURE_FORCERESIDENT 0x00000001 /* texture should be kept in video memory */
#define D3DRMTEXTURE_STATIC 0x00000002 /* texture will not change */
#define D3DRMTEXTURE_DOWNSAMPLEPOINT 0x00000004 /* point filtering should be used when downsampling */
#define D3DRMTEXTURE_DOWNSAMPLEBILINEAR 0x00000008 /* bilinear filtering should be used when downsampling */
#define D3DRMTEXTURE_DOWNSAMPLEREDUCEDEPTH 0x00000010 /* reduce bit depth when downsampling */
#define D3DRMTEXTURE_DOWNSAMPLENONE 0x00000020 /* texture should never be downsampled */
#define D3DRMTEXTURE_CHANGEDPIXELS 0x00000040 /* pixels have changed */
#define D3DRMTEXTURE_CHANGEDPALETTE 0x00000080 /* palette has changed */
#define D3DRMTEXTURE_INVALIDATEONLY 0x00000100 /* dirty regions are invalid */
/*
* Shadow flags
*/
#define D3DRMSHADOW_TRUEALPHA 0x00000001 /* shadow should render without artifacts when true alpha is on */
typedef enum _D3DRMCOMBINETYPE
{ D3DRMCOMBINE_REPLACE,
D3DRMCOMBINE_BEFORE,
D3DRMCOMBINE_AFTER
} D3DRMCOMBINETYPE, *LPD3DRMCOMBINETYPE;
typedef D3DCOLORMODEL D3DRMCOLORMODEL, *LPD3DRMCOLORMODEL;
typedef enum _D3DRMPALETTEFLAGS
{ D3DRMPALETTE_FREE, /* renderer may use this entry freely */
D3DRMPALETTE_READONLY, /* fixed but may be used by renderer */
D3DRMPALETTE_RESERVED /* may not be used by renderer */
} D3DRMPALETTEFLAGS, *LPD3DRMPALETTEFLAGS;
typedef struct _D3DRMPALETTEENTRY
{ unsigned char red; /* 0 .. 255 */
unsigned char green; /* 0 .. 255 */
unsigned char blue; /* 0 .. 255 */
unsigned char flags; /* one of D3DRMPALETTEFLAGS */
} D3DRMPALETTEENTRY, *LPD3DRMPALETTEENTRY;
typedef struct _D3DRMIMAGE
{ int width, height; /* width and height in pixels */
int aspectx, aspecty; /* aspect ratio for non-square pixels */
int depth; /* bits per pixel */
int rgb; /* if false, pixels are indices into a
palette otherwise, pixels encode
RGB values. */
int bytes_per_line; /* number of bytes of memory for a
scanline. This must be a multiple
of 4. */
void* buffer1; /* memory to render into (first buffer). */
void* buffer2; /* second rendering buffer for double
buffering, set to NULL for single
buffering. */
unsigned long red_mask;
unsigned long green_mask;
unsigned long blue_mask;
unsigned long alpha_mask; /* if rgb is true, these are masks for
the red, green and blue parts of a
pixel. Otherwise, these are masks
for the significant bits of the
red, green and blue elements in the
palette. For instance, most SVGA
displays use 64 intensities of red,
green and blue, so the masks should
all be set to 0xfc. */
int palette_size; /* number of entries in palette */
D3DRMPALETTEENTRY* palette; /* description of the palette (only if
rgb is false). Must be (1<<depth)
elements. */
} D3DRMIMAGE, *LPD3DRMIMAGE;
typedef enum _D3DRMWRAPTYPE
{ D3DRMWRAP_FLAT,
D3DRMWRAP_CYLINDER,
D3DRMWRAP_SPHERE,
D3DRMWRAP_CHROME,
D3DRMWRAP_SHEET,
D3DRMWRAP_BOX
} D3DRMWRAPTYPE, *LPD3DRMWRAPTYPE;
#define D3DRMWIREFRAME_CULL 1 /* cull backfaces */
#define D3DRMWIREFRAME_HIDDENLINE 2 /* lines are obscured by closer objects */
/*
* Do not use righthanded perspective in Viewport2::SetProjection().
* Set up righthanded mode by using IDirect3DRM3::SetOptions().
*/
typedef enum _D3DRMPROJECTIONTYPE
{ D3DRMPROJECT_PERSPECTIVE,
D3DRMPROJECT_ORTHOGRAPHIC,
D3DRMPROJECT_RIGHTHANDPERSPECTIVE, /* Only valid pre-DX6 */
D3DRMPROJECT_RIGHTHANDORTHOGRAPHIC /* Only valid pre-DX6 */
} D3DRMPROJECTIONTYPE, *LPD3DRMPROJECTIONTYPE;
#define D3DRMOPTIONS_LEFTHANDED 0x00000001L /* Default */
#define D3DRMOPTIONS_RIGHTHANDED 0x00000002L
typedef enum _D3DRMXOFFORMAT
{ D3DRMXOF_BINARY,
D3DRMXOF_COMPRESSED,
D3DRMXOF_TEXT
} D3DRMXOFFORMAT, *LPD3DRMXOFFORMAT;
typedef DWORD D3DRMSAVEOPTIONS;
#define D3DRMXOFSAVE_NORMALS 1
#define D3DRMXOFSAVE_TEXTURECOORDINATES 2
#define D3DRMXOFSAVE_MATERIALS 4
#define D3DRMXOFSAVE_TEXTURENAMES 8
#define D3DRMXOFSAVE_ALL 15
#define D3DRMXOFSAVE_TEMPLATES 16
#define D3DRMXOFSAVE_TEXTURETOPOLOGY 32
typedef enum _D3DRMCOLORSOURCE
{ D3DRMCOLOR_FROMFACE,
D3DRMCOLOR_FROMVERTEX
} D3DRMCOLORSOURCE, *LPD3DRMCOLORSOURCE;
typedef enum _D3DRMFRAMECONSTRAINT
{ D3DRMCONSTRAIN_Z, /* use only X and Y rotations */
D3DRMCONSTRAIN_Y, /* use only X and Z rotations */
D3DRMCONSTRAIN_X /* use only Y and Z rotations */
} D3DRMFRAMECONSTRAINT, *LPD3DRMFRAMECONSTRAINT;
typedef enum _D3DRMMATERIALMODE
{ D3DRMMATERIAL_FROMMESH,
D3DRMMATERIAL_FROMPARENT,
D3DRMMATERIAL_FROMFRAME
} D3DRMMATERIALMODE, *LPD3DRMMATERIALMODE;
typedef enum _D3DRMFOGMODE
{ D3DRMFOG_LINEAR, /* linear between start and end */
D3DRMFOG_EXPONENTIAL, /* density * exp(-distance) */
D3DRMFOG_EXPONENTIALSQUARED /* density * exp(-distance*distance) */
} D3DRMFOGMODE, *LPD3DRMFOGMODE;
typedef enum _D3DRMZBUFFERMODE {
D3DRMZBUFFER_FROMPARENT, /* default */
D3DRMZBUFFER_ENABLE, /* enable zbuffering */
D3DRMZBUFFER_DISABLE /* disable zbuffering */
} D3DRMZBUFFERMODE, *LPD3DRMZBUFFERMODE;
typedef enum _D3DRMSORTMODE {
D3DRMSORT_FROMPARENT, /* default */
D3DRMSORT_NONE, /* don't sort child frames */
D3DRMSORT_FRONTTOBACK, /* sort child frames front-to-back */
D3DRMSORT_BACKTOFRONT /* sort child frames back-to-front */
} D3DRMSORTMODE, *LPD3DRMSORTMODE;
typedef struct _D3DRMMATERIALOVERRIDE
{
DWORD dwSize; /* Size of this structure */
DWORD dwFlags; /* Indicate which fields are valid */
D3DCOLORVALUE dcDiffuse; /* RGBA */
D3DCOLORVALUE dcAmbient; /* RGB */
D3DCOLORVALUE dcEmissive; /* RGB */
D3DCOLORVALUE dcSpecular; /* RGB */
D3DVALUE dvPower;
LPUNKNOWN lpD3DRMTex;
} D3DRMMATERIALOVERRIDE, *LPD3DRMMATERIALOVERRIDE;
#define D3DRMMATERIALOVERRIDE_DIFFUSE_ALPHAONLY 0x00000001L
#define D3DRMMATERIALOVERRIDE_DIFFUSE_RGBONLY 0x00000002L
#define D3DRMMATERIALOVERRIDE_DIFFUSE 0x00000003L
#define D3DRMMATERIALOVERRIDE_AMBIENT 0x00000004L
#define D3DRMMATERIALOVERRIDE_EMISSIVE 0x00000008L
#define D3DRMMATERIALOVERRIDE_SPECULAR 0x00000010L
#define D3DRMMATERIALOVERRIDE_POWER 0x00000020L
#define D3DRMMATERIALOVERRIDE_TEXTURE 0x00000040L
#define D3DRMMATERIALOVERRIDE_DIFFUSE_ALPHAMULTIPLY 0x00000080L
#define D3DRMMATERIALOVERRIDE_ALL 0x000000FFL
#define D3DRMFPTF_ALPHA 0x00000001L
#define D3DRMFPTF_NOALPHA 0x00000002L
#define D3DRMFPTF_PALETTIZED 0x00000004L
#define D3DRMFPTF_NOTPALETTIZED 0x00000008L
#define D3DRMSTATECHANGE_UPDATEONLY 0x000000001L
#define D3DRMSTATECHANGE_VOLATILE 0x000000002L
#define D3DRMSTATECHANGE_NONVOLATILE 0x000000004L
#define D3DRMSTATECHANGE_RENDER 0x000000020L
#define D3DRMSTATECHANGE_LIGHT 0x000000040L
/*
* Values for flags in RM3::CreateDeviceFromSurface
*/
#define D3DRMDEVICE_NOZBUFFER 0x00000001L
/*
* Values for flags in Object2::SetClientData
*/
#define D3DRMCLIENTDATA_NONE 0x00000001L
#define D3DRMCLIENTDATA_LOCALFREE 0x00000002L
#define D3DRMCLIENTDATA_IUNKNOWN 0x00000004L
/*
* Values for flags in Frame2::AddMoveCallback.
*/
#define D3DRMCALLBACK_PREORDER 0
#define D3DRMCALLBACK_POSTORDER 1
/*
* Values for flags in MeshBuilder2::RayPick.
*/
#define D3DRMRAYPICK_ONLYBOUNDINGBOXES 1
#define D3DRMRAYPICK_IGNOREFURTHERPRIMITIVES 2
#define D3DRMRAYPICK_INTERPOLATEUV 4
#define D3DRMRAYPICK_INTERPOLATECOLOR 8
#define D3DRMRAYPICK_INTERPOLATENORMAL 0x10
/*
* Values for flags in MeshBuilder3::AddFacesIndexed.
*/
#define D3DRMADDFACES_VERTICESONLY 1
/*
* Values for flags in MeshBuilder2::GenerateNormals.
*/
#define D3DRMGENERATENORMALS_PRECOMPACT 1
#define D3DRMGENERATENORMALS_USECREASEANGLE 2
/*
* Values for MeshBuilder3::GetParentMesh
*/
#define D3DRMMESHBUILDER_DIRECTPARENT 1
#define D3DRMMESHBUILDER_ROOTMESH 2
/*
* Flags for MeshBuilder3::Enable
*/
#define D3DRMMESHBUILDER_RENDERENABLE 0x00000001L
#define D3DRMMESHBUILDER_PICKENABLE 0x00000002L
/*
* Flags for MeshBuilder3::AddMeshBuilder
*/
#define D3DRMADDMESHBUILDER_DONTCOPYAPPDATA 1
#define D3DRMADDMESHBUILDER_FLATTENSUBMESHES 2
#define D3DRMADDMESHBUILDER_NOSUBMESHES 4
/*
* Flags for Object2::GetAge when used with MeshBuilders
*/
#define D3DRMMESHBUILDERAGE_GEOMETRY 0x00000001L
#define D3DRMMESHBUILDERAGE_MATERIALS 0x00000002L
#define D3DRMMESHBUILDERAGE_TEXTURES 0x00000004L
/*
* Format flags for MeshBuilder3::AddTriangles.
*/
#define D3DRMFVF_TYPE 0x00000001L
#define D3DRMFVF_NORMAL 0x00000002L
#define D3DRMFVF_COLOR 0x00000004L
#define D3DRMFVF_TEXTURECOORDS 0x00000008L
#define D3DRMVERTEX_STRIP 0x00000001L
#define D3DRMVERTEX_FAN 0x00000002L
#define D3DRMVERTEX_LIST 0x00000004L
/*
* Values for flags in Viewport2::Clear2
*/
#define D3DRMCLEAR_TARGET 0x00000001L
#define D3DRMCLEAR_ZBUFFER 0x00000002L
#define D3DRMCLEAR_DIRTYRECTS 0x00000004L
#define D3DRMCLEAR_ALL (D3DRMCLEAR_TARGET | \
D3DRMCLEAR_ZBUFFER | \
D3DRMCLEAR_DIRTYRECTS)
/*
* Values for flags in Frame3::SetSceneFogMethod
*/
#define D3DRMFOGMETHOD_VERTEX 0x00000001L
#define D3DRMFOGMETHOD_TABLE 0x00000002L
#define D3DRMFOGMETHOD_ANY 0x00000004L
/*
* Values for flags in Frame3::SetTraversalOptions
*/
#define D3DRMFRAME_RENDERENABLE 0x00000001L
#define D3DRMFRAME_PICKENABLE 0x00000002L
typedef DWORD D3DRMANIMATIONOPTIONS;
#define D3DRMANIMATION_OPEN 0x01L
#define D3DRMANIMATION_CLOSED 0x02L
#define D3DRMANIMATION_LINEARPOSITION 0x04L
#define D3DRMANIMATION_SPLINEPOSITION 0x08L
#define D3DRMANIMATION_SCALEANDROTATION 0x00000010L
#define D3DRMANIMATION_POSITION 0x00000020L
typedef DWORD D3DRMINTERPOLATIONOPTIONS;
#define D3DRMINTERPOLATION_OPEN 0x01L
#define D3DRMINTERPOLATION_CLOSED 0x02L
#define D3DRMINTERPOLATION_NEAREST 0x0100L
#define D3DRMINTERPOLATION_LINEAR 0x04L
#define D3DRMINTERPOLATION_SPLINE 0x08L
#define D3DRMINTERPOLATION_VERTEXCOLOR 0x40L
#define D3DRMINTERPOLATION_SLERPNORMALS 0x80L
typedef DWORD D3DRMLOADOPTIONS;
#define D3DRMLOAD_FROMFILE 0x00L
#define D3DRMLOAD_FROMRESOURCE 0x01L
#define D3DRMLOAD_FROMMEMORY 0x02L
#define D3DRMLOAD_FROMSTREAM 0x04L
#define D3DRMLOAD_FROMURL 0x08L
#define D3DRMLOAD_BYNAME 0x10L
#define D3DRMLOAD_BYPOSITION 0x20L
#define D3DRMLOAD_BYGUID 0x40L
#define D3DRMLOAD_FIRST 0x80L
#define D3DRMLOAD_INSTANCEBYREFERENCE 0x100L
#define D3DRMLOAD_INSTANCEBYCOPYING 0x200L
#define D3DRMLOAD_ASYNCHRONOUS 0x400L
typedef struct _D3DRMLOADRESOURCE {
HMODULE hModule;
LPCTSTR lpName;
LPCTSTR lpType;
} D3DRMLOADRESOURCE, *LPD3DRMLOADRESOURCE;
typedef struct _D3DRMLOADMEMORY {
LPVOID lpMemory;
DWORD dSize;
} D3DRMLOADMEMORY, *LPD3DRMLOADMEMORY;
#define D3DRMPMESHSTATUS_VALID 0x01L
#define D3DRMPMESHSTATUS_INTERRUPTED 0x02L
#define D3DRMPMESHSTATUS_BASEMESHCOMPLETE 0x04L
#define D3DRMPMESHSTATUS_COMPLETE 0x08L
#define D3DRMPMESHSTATUS_RENDERABLE 0x10L
#define D3DRMPMESHEVENT_BASEMESH 0x01L
#define D3DRMPMESHEVENT_COMPLETE 0x02L
typedef struct _D3DRMPMESHLOADSTATUS {
DWORD dwSize; // Size of this structure
DWORD dwPMeshSize; // Total Size (bytes)
DWORD dwBaseMeshSize; // Total Size of the Base Mesh
DWORD dwBytesLoaded; // Total bytes loaded
DWORD dwVerticesLoaded; // Number of vertices loaded
DWORD dwFacesLoaded; // Number of faces loaded
HRESULT dwLoadResult; // Result of the load operation
DWORD dwFlags;
} D3DRMPMESHLOADSTATUS, *LPD3DRMPMESHLOADSTATUS;
typedef enum _D3DRMUSERVISUALREASON {
D3DRMUSERVISUAL_CANSEE,
D3DRMUSERVISUAL_RENDER
} D3DRMUSERVISUALREASON, *LPD3DRMUSERVISUALREASON;
typedef struct _D3DRMANIMATIONKEY
{
DWORD dwSize;
DWORD dwKeyType;
D3DVALUE dvTime;
DWORD dwID;
#if (!defined __cplusplus) || (!defined D3D_OVERLOADS)
union
{
D3DRMQUATERNION dqRotateKey;
D3DVECTOR dvScaleKey;
D3DVECTOR dvPositionKey;
};
#else
/*
* We do this as D3D_OVERLOADS defines constructors for D3DVECTOR,
* this can then not be used in a union. Use the inlines provided
* to extract and set the required component.
*/
D3DVALUE dvK[4];
#endif
} D3DRMANIMATIONKEY;
typedef D3DRMANIMATIONKEY *LPD3DRMANIMATIONKEY;
#if (defined __cplusplus) && (defined D3D_OVERLOADS)
inline VOID
D3DRMAnimationGetRotateKey(const D3DRMANIMATIONKEY& rmKey,
D3DRMQUATERNION& rmQuat)
{
rmQuat.s = rmKey.dvK[0];
rmQuat.v = D3DVECTOR(rmKey.dvK[1], rmKey.dvK[2], rmKey.dvK[3]);
}
inline VOID
D3DRMAnimationGetScaleKey(const D3DRMANIMATIONKEY& rmKey,
D3DVECTOR& dvVec)
{
dvVec = D3DVECTOR(rmKey.dvK[0], rmKey.dvK[1], rmKey.dvK[2]);
}
inline VOID
D3DRMAnimationGetPositionKey(const D3DRMANIMATIONKEY& rmKey,
D3DVECTOR& dvVec)
{
dvVec = D3DVECTOR(rmKey.dvK[0], rmKey.dvK[1], rmKey.dvK[2]);
}
inline VOID
D3DRMAnimationSetRotateKey(D3DRMANIMATIONKEY& rmKey,
const D3DRMQUATERNION& rmQuat)
{
rmKey.dvK[0] = rmQuat.s;
rmKey.dvK[1] = rmQuat.v.x;
rmKey.dvK[2] = rmQuat.v.y;
rmKey.dvK[3] = rmQuat.v.z;
}
inline VOID
D3DRMAnimationSetScaleKey(D3DRMANIMATIONKEY& rmKey,
const D3DVECTOR& dvVec)
{
rmKey.dvK[0] = dvVec.x;
rmKey.dvK[1] = dvVec.y;
rmKey.dvK[2] = dvVec.z;
}
inline VOID
D3DRMAnimationSetPositionKey(D3DRMANIMATIONKEY& rmKey,
const D3DVECTOR& dvVec)
{
rmKey.dvK[0] = dvVec.x;
rmKey.dvK[1] = dvVec.y;
rmKey.dvK[2] = dvVec.z;
}
#endif
#define D3DRMANIMATION_ROTATEKEY 0x01
#define D3DRMANIMATION_SCALEKEY 0x02
#define D3DRMANIMATION_POSITIONKEY 0x03
typedef DWORD D3DRMMAPPING, D3DRMMAPPINGFLAG, *LPD3DRMMAPPING;
static const D3DRMMAPPINGFLAG D3DRMMAP_WRAPU = 1;
static const D3DRMMAPPINGFLAG D3DRMMAP_WRAPV = 2;
static const D3DRMMAPPINGFLAG D3DRMMAP_PERSPCORRECT = 4;
typedef struct _D3DRMVERTEX
{ D3DVECTOR position;
D3DVECTOR normal;
D3DVALUE tu, tv;
D3DCOLOR color;
} D3DRMVERTEX, *LPD3DRMVERTEX;
typedef LONG D3DRMGROUPINDEX; /* group indexes begin a 0 */
static const D3DRMGROUPINDEX D3DRMGROUP_ALLGROUPS = -1;
/*
* Create a color from three components in the range 0-1 inclusive.
*/
extern D3DCOLOR D3DRMAPI D3DRMCreateColorRGB(D3DVALUE red,
D3DVALUE green,
D3DVALUE blue);
/*
* Create a color from four components in the range 0-1 inclusive.
*/
extern D3DCOLOR D3DRMAPI D3DRMCreateColorRGBA(D3DVALUE red,
D3DVALUE green,
D3DVALUE blue,
D3DVALUE alpha);
/*
* Get the red component of a color.
*/
extern D3DVALUE D3DRMAPI D3DRMColorGetRed(D3DCOLOR);
/*
* Get the green component of a color.
*/
extern D3DVALUE D3DRMAPI D3DRMColorGetGreen(D3DCOLOR);
/*
* Get the blue component of a color.
*/
extern D3DVALUE D3DRMAPI D3DRMColorGetBlue(D3DCOLOR);
/*
* Get the alpha component of a color.
*/
extern D3DVALUE D3DRMAPI D3DRMColorGetAlpha(D3DCOLOR);
/*
* Add two vectors. Returns its first argument.
*/
extern LPD3DVECTOR D3DRMAPI D3DRMVectorAdd(LPD3DVECTOR d,
LPD3DVECTOR s1,
LPD3DVECTOR s2);
/*
* Subtract two vectors. Returns its first argument.
*/
extern LPD3DVECTOR D3DRMAPI D3DRMVectorSubtract(LPD3DVECTOR d,
LPD3DVECTOR s1,
LPD3DVECTOR s2);
/*
* Reflect a ray about a given normal. Returns its first argument.
*/
extern LPD3DVECTOR D3DRMAPI D3DRMVectorReflect(LPD3DVECTOR d,
LPD3DVECTOR ray,
LPD3DVECTOR norm);
/*
* Calculate the vector cross product. Returns its first argument.
*/
extern LPD3DVECTOR D3DRMAPI D3DRMVectorCrossProduct(LPD3DVECTOR d,
LPD3DVECTOR s1,
LPD3DVECTOR s2);
/*
* Return the vector dot product.
*/
extern D3DVALUE D3DRMAPI D3DRMVectorDotProduct(LPD3DVECTOR s1,
LPD3DVECTOR s2);
/*
* Scale a vector so that its modulus is 1. Returns its argument or
* NULL if there was an error (e.g. a zero vector was passed).
*/
extern LPD3DVECTOR D3DRMAPI D3DRMVectorNormalize(LPD3DVECTOR);
#define D3DRMVectorNormalise D3DRMVectorNormalize
/*
* Return the length of a vector (e.g. sqrt(x*x + y*y + z*z)).
*/
extern D3DVALUE D3DRMAPI D3DRMVectorModulus(LPD3DVECTOR v);
/*
* Set the rotation part of a matrix to be a rotation of theta radians
* around the given axis.
*/
extern LPD3DVECTOR D3DRMAPI D3DRMVectorRotate(LPD3DVECTOR r, LPD3DVECTOR v, LPD3DVECTOR axis, D3DVALUE theta);
/*
* Scale a vector uniformly in all three axes
*/
extern LPD3DVECTOR D3DRMAPI D3DRMVectorScale(LPD3DVECTOR d, LPD3DVECTOR s, D3DVALUE factor);
/*
* Return a random unit vector
*/
extern LPD3DVECTOR D3DRMAPI D3DRMVectorRandom(LPD3DVECTOR d);
/*
* Returns a unit quaternion that represents a rotation of theta radians
* around the given axis.
*/
extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionFromRotation(LPD3DRMQUATERNION quat,
LPD3DVECTOR v,
D3DVALUE theta);
/*
* Calculate the product of two quaternions
*/
extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionMultiply(LPD3DRMQUATERNION q,
LPD3DRMQUATERNION a,
LPD3DRMQUATERNION b);
/*
* Interpolate between two quaternions
*/
extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionSlerp(LPD3DRMQUATERNION q,
LPD3DRMQUATERNION a,
LPD3DRMQUATERNION b,
D3DVALUE alpha);
/*
* Calculate the matrix for the rotation that a unit quaternion represents
*/
extern void D3DRMAPI D3DRMMatrixFromQuaternion(D3DRMMATRIX4D dmMat, LPD3DRMQUATERNION lpDqQuat);
/*
* Calculate the quaternion that corresponds to a rotation matrix
*/
extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionFromMatrix(LPD3DRMQUATERNION, D3DRMMATRIX4D);
#if defined(__cplusplus)
};
#endif
#endif

1666
lib/directx8/d3drmobj.h Executable file

File diff suppressed because it is too large Load Diff

50
lib/directx8/d3drmwin.h Executable file
View File

@ -0,0 +1,50 @@
/*==========================================================================;
*
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
*
* File: d3drm.h
* Content: Direct3DRM include file
*
***************************************************************************/
#ifndef __D3DRMWIN_H__
#define __D3DRMWIN_H__
#ifndef WIN32
#define WIN32
#endif
#include "d3drm.h"
#include "ddraw.h"
#include "d3d.h"
/*
* GUIDS used by Direct3DRM Windows interface
*/
DEFINE_GUID(IID_IDirect3DRMWinDevice, 0xc5016cc0, 0xd273, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
WIN_TYPES(IDirect3DRMWinDevice, DIRECT3DRMWINDEVICE);
#undef INTERFACE
#define INTERFACE IDirect3DRMWinDevice
DECLARE_INTERFACE_(IDirect3DRMWinDevice, IDirect3DRMObject)
{
IUNKNOWN_METHODS(PURE);
IDIRECT3DRMOBJECT_METHODS(PURE);
/*
* IDirect3DRMWinDevice methods
*/
/* Repaint the window with the last frame which was rendered. */
STDMETHOD(HandlePaint)(THIS_ HDC hdc) PURE;
/* Respond to a WM_ACTIVATE message. */
STDMETHOD(HandleActivate)(THIS_ WORD wparam) PURE;
};
#endif

2117
lib/directx8/d3dtypes.h Executable file

File diff suppressed because it is too large Load Diff

255
lib/directx8/d3dvec.inl Executable file
View File

@ -0,0 +1,255 @@
/******************************************************************
* *
* D3DVec.inl *
* *
* Float-valued 3D vector class for Direct3D. *
* *
* Copyright (c) 1996-1998 Microsoft Corp. All rights reserved. *
* *
******************************************************************/
#include <math.h>
// =====================================
// Constructors
// =====================================
inline
_D3DVECTOR::_D3DVECTOR(D3DVALUE f)
{
x = y = z = f;
}
inline
_D3DVECTOR::_D3DVECTOR(D3DVALUE _x, D3DVALUE _y, D3DVALUE _z)
{
x = _x; y = _y; z = _z;
}
inline
_D3DVECTOR::_D3DVECTOR(const D3DVALUE f[3])
{
x = f[0]; y = f[1]; z = f[2];
}
// =====================================
// Access grants
// =====================================
inline const D3DVALUE&
_D3DVECTOR::operator[](int i) const
{
return (&x)[i];
}
inline D3DVALUE&
_D3DVECTOR::operator[](int i)
{
return (&x)[i];
}
// =====================================
// Assignment operators
// =====================================
inline _D3DVECTOR&
_D3DVECTOR::operator += (const _D3DVECTOR& v)
{
x += v.x; y += v.y; z += v.z;
return *this;
}
inline _D3DVECTOR&
_D3DVECTOR::operator -= (const _D3DVECTOR& v)
{
x -= v.x; y -= v.y; z -= v.z;
return *this;
}
inline _D3DVECTOR&
_D3DVECTOR::operator *= (const _D3DVECTOR& v)
{
x *= v.x; y *= v.y; z *= v.z;
return *this;
}
inline _D3DVECTOR&
_D3DVECTOR::operator /= (const _D3DVECTOR& v)
{
x /= v.x; y /= v.y; z /= v.z;
return *this;
}
inline _D3DVECTOR&
_D3DVECTOR::operator *= (D3DVALUE s)
{
x *= s; y *= s; z *= s;
return *this;
}
inline _D3DVECTOR&
_D3DVECTOR::operator /= (D3DVALUE s)
{
x /= s; y /= s; z /= s;
return *this;
}
inline _D3DVECTOR
operator + (const _D3DVECTOR& v)
{
return v;
}
inline _D3DVECTOR
operator - (const _D3DVECTOR& v)
{
return _D3DVECTOR(-v.x, -v.y, -v.z);
}
inline _D3DVECTOR
operator + (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
return _D3DVECTOR(v1.x+v2.x, v1.y+v2.y, v1.z+v2.z);
}
inline _D3DVECTOR
operator - (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
return _D3DVECTOR(v1.x-v2.x, v1.y-v2.y, v1.z-v2.z);
}
inline _D3DVECTOR
operator * (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
return _D3DVECTOR(v1.x*v2.x, v1.y*v2.y, v1.z*v2.z);
}
inline _D3DVECTOR
operator / (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
return _D3DVECTOR(v1.x/v2.x, v1.y/v2.y, v1.z/v2.z);
}
inline int
operator < (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
return v1[0] < v2[0] && v1[1] < v2[1] && v1[2] < v2[2];
}
inline int
operator <= (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
return v1[0] <= v2[0] && v1[1] <= v2[1] && v1[2] <= v2[2];
}
inline _D3DVECTOR
operator * (const _D3DVECTOR& v, D3DVALUE s)
{
return _D3DVECTOR(s*v.x, s*v.y, s*v.z);
}
inline _D3DVECTOR
operator * (D3DVALUE s, const _D3DVECTOR& v)
{
return _D3DVECTOR(s*v.x, s*v.y, s*v.z);
}
inline _D3DVECTOR
operator / (const _D3DVECTOR& v, D3DVALUE s)
{
return _D3DVECTOR(v.x/s, v.y/s, v.z/s);
}
inline int
operator == (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
return v1.x==v2.x && v1.y==v2.y && v1.z == v2.z;
}
inline D3DVALUE
Magnitude (const _D3DVECTOR& v)
{
return (D3DVALUE) sqrt(SquareMagnitude(v));
}
inline D3DVALUE
SquareMagnitude (const _D3DVECTOR& v)
{
return v.x*v.x + v.y*v.y + v.z*v.z;
}
inline _D3DVECTOR
Normalize (const _D3DVECTOR& v)
{
return v / Magnitude(v);
}
inline D3DVALUE
Min (const _D3DVECTOR& v)
{
D3DVALUE ret = v.x;
if (v.y < ret) ret = v.y;
if (v.z < ret) ret = v.z;
return ret;
}
inline D3DVALUE
Max (const _D3DVECTOR& v)
{
D3DVALUE ret = v.x;
if (ret < v.y) ret = v.y;
if (ret < v.z) ret = v.z;
return ret;
}
inline _D3DVECTOR
Minimize (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
return _D3DVECTOR( v1[0] < v2[0] ? v1[0] : v2[0],
v1[1] < v2[1] ? v1[1] : v2[1],
v1[2] < v2[2] ? v1[2] : v2[2]);
}
inline _D3DVECTOR
Maximize (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
return _D3DVECTOR( v1[0] > v2[0] ? v1[0] : v2[0],
v1[1] > v2[1] ? v1[1] : v2[1],
v1[2] > v2[2] ? v1[2] : v2[2]);
}
inline D3DVALUE
DotProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
return v1.x*v2.x + v1.y * v2.y + v1.z*v2.z;
}
inline _D3DVECTOR
CrossProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
_D3DVECTOR result;
result[0] = v1[1] * v2[2] - v1[2] * v2[1];
result[1] = v1[2] * v2[0] - v1[0] * v2[2];
result[2] = v1[0] * v2[1] - v1[1] * v2[0];
return result;
}
inline _D3DMATRIX
operator* (const _D3DMATRIX& a, const _D3DMATRIX& b)
{
_D3DMATRIX ret;
for (int i=0; i<4; i++) {
for (int j=0; j<4; j++) {
ret(i, j) = 0.0f;
for (int k=0; k<4; k++) {
ret(i, j) += a(i, k) * b(k, j);
}
}
}
return ret;
}

26
lib/directx8/d3dx.h Executable file
View File

@ -0,0 +1,26 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
//
// File: d3dx.h
// Content: D3DX utility library
//
///////////////////////////////////////////////////////////////////////////
#ifndef __D3DX_H__
#define __D3DX_H__
#ifndef D3DXINLINE
#ifdef __cplusplus
#define D3DXINLINE inline
#else
#define D3DXINLINE _inline
#endif
#endif
#include "d3dxcore.h"
#include "d3dxmath.h"
#include "d3dxshapes.h"
#include "d3dxsprite.h"
#endif //__D3DX_H__

BIN
lib/directx8/d3dx.lib Executable file

Binary file not shown.

36
lib/directx8/d3dx8.h Executable file
View File

@ -0,0 +1,36 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
//
// File: d3dx8.h
// Content: D3DX utility library
//
///////////////////////////////////////////////////////////////////////////
#ifndef __D3DX8_H__
#define __D3DX8_H__
#include <d3d8.h>
#include <limits.h>
#ifndef D3DXINLINE
#ifdef __cplusplus
#define D3DXINLINE inline
#else
#define D3DXINLINE _inline
#endif
#endif
#define D3DX_DEFAULT ULONG_MAX
#define D3DX_DEFAULT_FLOAT FLT_MAX
#include "d3dx8math.h"
#include "d3dx8core.h"
#include "d3dx8tex.h"
#include "d3dx8mesh.h"
#include "d3dx8shape.h"
#include "d3dx8effect.h"
#endif //__D3DX8_H__

476
lib/directx8/d3dx8core.h Executable file
View File

@ -0,0 +1,476 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
//
// File: d3dx8core.h
// Content: D3DX core types and functions
//
///////////////////////////////////////////////////////////////////////////
#include "d3dx8.h"
#ifndef __D3DX8CORE_H__
#define __D3DX8CORE_H__
///////////////////////////////////////////////////////////////////////////
// ID3DXBuffer:
// ------------
// The buffer object is used to return arbitrary lenght data.
///////////////////////////////////////////////////////////////////////////
typedef interface ID3DXBuffer ID3DXBuffer;
typedef interface ID3DXBuffer *LPD3DXBUFFER;
// {932E6A7E-C68E-45dd-A7BF-53D19C86DB1F}
DEFINE_GUID(IID_ID3DXBuffer,
0x932e6a7e, 0xc68e, 0x45dd, 0xa7, 0xbf, 0x53, 0xd1, 0x9c, 0x86, 0xdb, 0x1f);
DECLARE_INTERFACE_(ID3DXBuffer, IUnknown)
{
// IUnknown
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// ID3DXBuffer
STDMETHOD_(LPVOID, GetBufferPointer)(THIS) PURE;
STDMETHOD_(DWORD, GetBufferSize)(THIS) PURE;
};
///////////////////////////////////////////////////////////////////////////
// ID3DXFont:
// ----------
// Font objects contain the textures and resources needed to render
// a specific font on a specific device.
//
// Begin -
// Prepartes device for drawing text. This is optional.. if DrawText
// is called outside of Begin/End, it will call Begin and End for you.
//
// DrawText -
// Draws formatted text on a D3D device. Some parameters are
// surprisingly similar to those of GDI's DrawText function. See GDI
// documentation for a detailed description of these parameters.
//
// End -
// Restores device state to how it was when Begin was called.
///////////////////////////////////////////////////////////////////////////
typedef interface ID3DXFont ID3DXFont;
typedef interface ID3DXFont *LPD3DXFONT;
// {2D501DF7-D253-4414-865F-A6D54A753138}
DEFINE_GUID( IID_ID3DXFont,
0x2d501df7, 0xd253, 0x4414, 0x86, 0x5f, 0xa6, 0xd5, 0x4a, 0x75, 0x31, 0x38);
DECLARE_INTERFACE_(ID3DXFont, IUnknown)
{
// IUnknown
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// ID3DXFont
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
STDMETHOD(GetLogFont)(THIS_ LOGFONT* pLogFont) PURE;
STDMETHOD(Begin)(THIS) PURE;
STDMETHOD_(INT, DrawTextA)(THIS_ LPCSTR pString, INT Count, LPRECT pRect, DWORD Format, D3DCOLOR Color) PURE;
STDMETHOD_(INT, DrawTextW)(THIS_ LPCWSTR pString, INT Count, LPRECT pRect, DWORD Format, D3DCOLOR Color) PURE;
STDMETHOD(End)(THIS) PURE;
};
#ifndef DrawText
#ifdef UNICODE
#define DrawText DrawTextW
#else
#define DrawText DrawTextA
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
HRESULT WINAPI
D3DXCreateFont(
LPDIRECT3DDEVICE8 pDevice,
HFONT hFont,
LPD3DXFONT* ppFont);
HRESULT WINAPI
D3DXCreateFontIndirect(
LPDIRECT3DDEVICE8 pDevice,
CONST LOGFONT* pLogFont,
LPD3DXFONT* ppFont);
#ifdef __cplusplus
}
#endif //__cplusplus
///////////////////////////////////////////////////////////////////////////
// ID3DXSprite:
// ------------
// This object intends to provide an easy way to drawing sprites using D3D.
//
// Begin -
// Prepares device for drawing sprites
//
// Draw, DrawAffine, DrawTransform
// Draws a sprite in screen-space. Before transformation, the sprite is
// the size of SrcRect, with its top-left corner at the origin (0,0).
// The color and alpha channels are modulated by Color.
//
// End -
// Restores device state to how it was when Begin was called.
///////////////////////////////////////////////////////////////////////////
typedef interface ID3DXSprite ID3DXSprite;
typedef interface ID3DXSprite *LPD3DXSPRITE;
// {E8691849-87B8-4929-9050-1B0542D5538C}
DEFINE_GUID( IID_ID3DXSprite,
0xe8691849, 0x87b8, 0x4929, 0x90, 0x50, 0x1b, 0x5, 0x42, 0xd5, 0x53, 0x8c);
DECLARE_INTERFACE_(ID3DXSprite, IUnknown)
{
// IUnknown
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// ID3DXSprite
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
STDMETHOD(Begin)(THIS) PURE;
STDMETHOD(Draw)(THIS_ LPDIRECT3DTEXTURE8 pSrcTexture,
CONST RECT* pSrcRect, CONST D3DXVECTOR2* pScaling,
CONST D3DXVECTOR2* pRotationCenter, FLOAT Rotation,
CONST D3DXVECTOR2* pTranslation, D3DCOLOR Color) PURE;
STDMETHOD(DrawTransform)(THIS_ LPDIRECT3DTEXTURE8 pSrcTexture,
CONST RECT* pSrcRect, CONST D3DXMATRIX* pTransform,
D3DCOLOR Color) PURE;
STDMETHOD(End)(THIS) PURE;
};
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
HRESULT WINAPI
D3DXCreateSprite(
LPDIRECT3DDEVICE8 pDevice,
LPD3DXSPRITE* ppSprite);
#ifdef __cplusplus
}
#endif //__cplusplus
///////////////////////////////////////////////////////////////////////////
// ID3DXRenderToSurface:
// ---------------------
// This object abstracts rendering to surfaces. These surfaces do not
// necessarily need to be render targets. If they are not, a compatible
// render target is used, and the result copied into surface at end scene.
///////////////////////////////////////////////////////////////////////////
typedef struct _D3DXRTS_DESC
{
UINT Width;
UINT Height;
D3DFORMAT Format;
BOOL DepthStencil;
D3DFORMAT DepthStencilFormat;
} D3DXRTS_DESC;
typedef interface ID3DXRenderToSurface ID3DXRenderToSurface;
typedef interface ID3DXRenderToSurface *LPD3DXRENDERTOSURFACE;
// {69CC587C-E40C-458d-B5D3-B029E18EB60A}
DEFINE_GUID( IID_ID3DXRenderToSurface,
0x69cc587c, 0xe40c, 0x458d, 0xb5, 0xd3, 0xb0, 0x29, 0xe1, 0x8e, 0xb6, 0xa);
DECLARE_INTERFACE_(ID3DXRenderToSurface, IUnknown)
{
// IUnknown
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// ID3DXRenderToSurface
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
STDMETHOD(GetDesc)(THIS_ D3DXRTS_DESC* pDesc) PURE;
STDMETHOD(BeginScene)(THIS_ LPDIRECT3DSURFACE8 pSurface, CONST D3DVIEWPORT8* pViewport) PURE;
STDMETHOD(EndScene)(THIS) PURE;
};
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
HRESULT WINAPI
D3DXCreateRenderToSurface(
LPDIRECT3DDEVICE8 pDevice,
UINT Width,
UINT Height,
D3DFORMAT Format,
BOOL DepthStencil,
D3DFORMAT DepthStencilFormat,
LPD3DXRENDERTOSURFACE* ppRenderToSurface);
#ifdef __cplusplus
}
#endif //__cplusplus
///////////////////////////////////////////////////////////////////////////
// ID3DXRenderToEnvMap:
// --------------------
///////////////////////////////////////////////////////////////////////////
typedef struct _D3DXRTE_DESC
{
UINT Size;
D3DFORMAT Format;
BOOL DepthStencil;
D3DFORMAT DepthStencilFormat;
} D3DXRTE_DESC;
typedef interface ID3DXRenderToEnvMap ID3DXRenderToEnvMap;
typedef interface ID3DXRenderToEnvMap *LPD3DXRenderToEnvMap;
// {9F6779E5-60A9-4d8b-AEE4-32770F405DBA}
DEFINE_GUID( IID_ID3DXRenderToEnvMap,
0x9f6779e5, 0x60a9, 0x4d8b, 0xae, 0xe4, 0x32, 0x77, 0xf, 0x40, 0x5d, 0xba);
DECLARE_INTERFACE_(ID3DXRenderToEnvMap, IUnknown)
{
// IUnknown
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// ID3DXRenderToEnvMap
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
STDMETHOD(GetDesc)(THIS_ D3DXRTE_DESC* pDesc) PURE;
STDMETHOD(BeginCube)(THIS_
LPDIRECT3DCUBETEXTURE8 pCubeTex) PURE;
STDMETHOD(BeginSphere)(THIS_
LPDIRECT3DTEXTURE8 pTex) PURE;
STDMETHOD(BeginHemisphere)(THIS_
LPDIRECT3DTEXTURE8 pTexZPos,
LPDIRECT3DTEXTURE8 pTexZNeg) PURE;
STDMETHOD(BeginParabolic)(THIS_
LPDIRECT3DTEXTURE8 pTexZPos,
LPDIRECT3DTEXTURE8 pTexZNeg) PURE;
STDMETHOD(Face)(THIS_ D3DCUBEMAP_FACES Face) PURE;
STDMETHOD(End)(THIS) PURE;
};
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
HRESULT WINAPI
D3DXCreateRenderToEnvMap(
LPDIRECT3DDEVICE8 pDevice,
UINT Size,
D3DFORMAT Format,
BOOL DepthStencil,
D3DFORMAT DepthStencilFormat,
LPD3DXRenderToEnvMap* ppRenderToEnvMap);
#ifdef __cplusplus
}
#endif //__cplusplus
///////////////////////////////////////////////////////////////////////////
// Shader assemblers:
///////////////////////////////////////////////////////////////////////////
//-------------------------------------------------------------------------
// D3DXASM flags:
// --------------
//
// D3DXASM_DEBUG
// Generate debug info.
//
// D3DXASM_SKIPVALIDATION
// Do not validate the generated code against known capabilities and
// constraints. This option is only recommended when assembling shaders
// you KNOW will work. (ie. have assembled before without this option.)
//-------------------------------------------------------------------------
#define D3DXASM_DEBUG (1 << 0)
#define D3DXASM_SKIPVALIDATION (1 << 1)
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
//-------------------------------------------------------------------------
// D3DXAssembleShader:
// ------------------------
// Assembles an ascii description of a vertex or pixel shader into
// binary form.
//
// Parameters:
// pSrcFile
// Source file name
// pSrcData
// Pointer to source code
// SrcDataLen
// Size of source code, in bytes
// Flags
// D3DXASM_xxx flags
// ppConstants
// Returns an ID3DXBuffer object containing constant declarations.
// ppCompiledShader
// Returns an ID3DXBuffer object containing the object code.
// ppCompilationErrors
// Returns an ID3DXBuffer object containing ascii error messages
//-------------------------------------------------------------------------
HRESULT WINAPI
D3DXAssembleShaderFromFileA(
LPCSTR pSrcFile,
DWORD Flags,
LPD3DXBUFFER* ppConstants,
LPD3DXBUFFER* ppCompiledShader,
LPD3DXBUFFER* ppCompilationErrors);
HRESULT WINAPI
D3DXAssembleShaderFromFileW(
LPCWSTR pSrcFile,
DWORD Flags,
LPD3DXBUFFER* ppConstants,
LPD3DXBUFFER* ppCompiledShader,
LPD3DXBUFFER* ppCompilationErrors);
#ifdef UNICODE
#define D3DXAssembleShaderFromFile D3DXAssembleShaderFromFileW
#else
#define D3DXAssembleShaderFromFile D3DXAssembleShaderFromFileA
#endif
HRESULT WINAPI
D3DXAssembleShader(
LPCVOID pSrcData,
UINT SrcDataLen,
DWORD Flags,
LPD3DXBUFFER* ppConstants,
LPD3DXBUFFER* ppCompiledShader,
LPD3DXBUFFER* ppCompilationErrors);
#ifdef __cplusplus
}
#endif //__cplusplus
///////////////////////////////////////////////////////////////////////////
// Misc APIs:
///////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
//-------------------------------------------------------------------------
// D3DXGetFVFVertexSize:
// ---------------------
// Returns the size (in bytes) of a vertex for a given FVF.
//-------------------------------------------------------------------------
UINT WINAPI
D3DXGetFVFVertexSize(DWORD FVF);
//-------------------------------------------------------------------------
// D3DXGetErrorString:
// ------------------
// Returns the error string for given an hresult. Interprets all D3DX and
// D3D hresults.
//
// Parameters:
// hr
// The error code to be deciphered.
// pBuffer
// Pointer to the buffer to be filled in.
// BufferLen
// Count of characters in buffer. Any error message longer than this
// length will be truncated to fit.
//-------------------------------------------------------------------------
HRESULT WINAPI
D3DXGetErrorStringA(
HRESULT hr,
LPSTR pBuffer,
UINT BufferLen);
HRESULT WINAPI
D3DXGetErrorStringW(
HRESULT hr,
LPWSTR pBuffer,
UINT BufferLen);
#ifdef UNICODE
#define D3DXGetErrorString D3DXGetErrorStringW
#else
#define D3DXGetErrorString D3DXGetErrorStringA
#endif
#ifdef __cplusplus
}
#endif //__cplusplus
#endif //__D3DX8CORE_H__

236
lib/directx8/d3dx8effect.h Executable file
View File

@ -0,0 +1,236 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
//
// File: d3dx8effect.h
// Content: D3DX effect types and functions
//
///////////////////////////////////////////////////////////////////////////
#include "d3dx8.h"
#ifndef __D3DX8EFFECT_H__
#define __D3DX8EFFECT_H__
typedef enum _D3DXPARAMETERTYPE
{
D3DXPT_DWORD = 0,
D3DXPT_FLOAT = 1,
D3DXPT_VECTOR = 2,
D3DXPT_MATRIX = 3,
D3DXPT_TEXTURE = 4,
D3DXPT_VERTEXSHADER = 5,
D3DXPT_PIXELSHADER = 6,
D3DXPT_CONSTANT = 7,
D3DXPT_FORCE_DWORD = 0x7fffffff /* force 32-bit size enum */
} D3DXPARAMETERTYPE;
typedef struct _D3DXEFFECT_DESC
{
UINT Parameters;
UINT Techniques;
DWORD Usage;
} D3DXEFFECT_DESC;
typedef struct _D3DXPARAMETER_DESC
{
DWORD Name;
D3DXPARAMETERTYPE Type;
} D3DXPARAMETER_DESC;
typedef struct _D3DXTECHNIQUE_DESC
{
DWORD Name;
UINT Passes;
} D3DXTECHNIQUE_DESC;
typedef struct _D3DXPASS_DESC
{
DWORD Name;
} D3DXPASS_DESC;
typedef struct ID3DXEffect *LPD3DXEFFECT;
typedef struct ID3DXTechnique *LPD3DXTECHNIQUE;
//////////////////////////////////////////////////////////////////////////////
// ID3DXTechnique ////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// {A00F378D-AF79-4917-907E-4D635EE63844}
DEFINE_GUID( IID_ID3DXTechnique,
0xa00f378d, 0xaf79, 0x4917, 0x90, 0x7e, 0x4d, 0x63, 0x5e, 0xe6, 0x38, 0x44);
DECLARE_INTERFACE_(ID3DXTechnique, IUnknown)
{
// IUnknown
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// ID3DXTechnique
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
STDMETHOD(GetDesc)(THIS_ D3DXTECHNIQUE_DESC* pDesc) PURE;
STDMETHOD(GetPassDesc)(THIS_ UINT Index, D3DXPASS_DESC* pDesc) PURE;
STDMETHOD_(BOOL, IsParameterUsed)(THIS_ DWORD dwName) PURE;
STDMETHOD(Validate)(THIS) PURE;
STDMETHOD(Begin)(THIS_ UINT *pPasses) PURE;
STDMETHOD(Pass)(THIS_ UINT Index) PURE;
STDMETHOD(End)(THIS) PURE;
};
//////////////////////////////////////////////////////////////////////////////
// ID3DXEffect ///////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// {281BBDD4-AEDF-4907-8650-E79CDFD45165}
DEFINE_GUID( IID_ID3DXEffect,
0x281bbdd4, 0xaedf, 0x4907, 0x86, 0x50, 0xe7, 0x9c, 0xdf, 0xd4, 0x51, 0x65);
DECLARE_INTERFACE_(ID3DXEffect, IUnknown)
{
// IUnknown
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// ID3DXEffect
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* pDesc) PURE;
STDMETHOD(GetParameterDesc)(THIS_ UINT Index, D3DXPARAMETER_DESC* pDesc) PURE;
STDMETHOD(GetTechniqueDesc)(THIS_ UINT Index, D3DXTECHNIQUE_DESC* pDesc) PURE;
STDMETHOD(SetDword)(THIS_ DWORD Name, DWORD dw) PURE;
STDMETHOD(GetDword)(THIS_ DWORD Name, DWORD* pdw) PURE;
STDMETHOD(SetFloat)(THIS_ DWORD Name, FLOAT f) PURE;
STDMETHOD(GetFloat)(THIS_ DWORD Name, FLOAT* pf) PURE;
STDMETHOD(SetVector)(THIS_ DWORD Name, D3DXVECTOR4* pVector) PURE;
STDMETHOD(GetVector)(THIS_ DWORD Name, D3DXVECTOR4* pVector) PURE;
STDMETHOD(SetMatrix)(THIS_ DWORD Name, D3DXMATRIX* pMatrix) PURE;
STDMETHOD(GetMatrix)(THIS_ DWORD Name, D3DXMATRIX* pMatrix) PURE;
STDMETHOD(SetTexture)(THIS_ DWORD Name, LPDIRECT3DBASETEXTURE8 pTexture) PURE;
STDMETHOD(GetTexture)(THIS_ DWORD Name, LPDIRECT3DBASETEXTURE8 *ppTexture) PURE;
STDMETHOD(SetVertexShader)(THIS_ DWORD Name, DWORD Handle) PURE;
STDMETHOD(GetVertexShader)(THIS_ DWORD Name, DWORD* pHandle) PURE;
STDMETHOD(SetPixelShader)(THIS_ DWORD Name, DWORD Handle) PURE;
STDMETHOD(GetPixelShader)(THIS_ DWORD Name, DWORD* pHandle) PURE;
STDMETHOD(GetTechnique)(THIS_ UINT Index, LPD3DXTECHNIQUE* ppTechnique) PURE;
STDMETHOD(CloneEffect)(THIS_ LPDIRECT3DDEVICE8 pDevice, DWORD Usage, LPD3DXEFFECT* ppEffect) PURE;
};
//////////////////////////////////////////////////////////////////////////////
// APIs //////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
//----------------------------------------------------------------------------
// D3DXCompileEffect:
// ------------------
// Compiles an ascii effect description into a binary form usable by
// D3DXCreateEffect.
//
// Parameters:
// pSrcFile
// Name of the file containing the ascii effect description
// pSrcData
// Pointer to ascii effect description
// SrcDataSize
// Size of the effect description in bytes
// ppCompiledEffect
// Returns a buffer containing compiled effect.
// ppCompilationErrors
// Returns a buffer containing any error messages which occurred during
// compile. Or NULL if you do not care about the error messages.
//
//----------------------------------------------------------------------------
HRESULT WINAPI
D3DXCompileEffectFromFileA(
LPCSTR pSrcFile,
LPD3DXBUFFER* ppCompiledEffect,
LPD3DXBUFFER* ppCompilationErrors);
HRESULT WINAPI
D3DXCompileEffectFromFileW(
LPCWSTR pSrcFile,
LPD3DXBUFFER* ppCompiledEffect,
LPD3DXBUFFER* ppCompilationErrors);
#ifdef UNICODE
#define D3DXCompileEffectFromFile D3DXCompileEffectFromFileW
#else
#define D3DXCompileEffectFromFile D3DXCompileEffectFromFileA
#endif
HRESULT WINAPI
D3DXCompileEffect(
LPCVOID pSrcData,
UINT SrcDataSize,
LPD3DXBUFFER* ppCompiledEffect,
LPD3DXBUFFER* ppCompilationErrors);
//----------------------------------------------------------------------------
// D3DXCreateEffect:
// -----------------
// Creates an effect object, given compiled binary effect data
//
// Parameters:
// pDevice
// Pointer to the device to be used.
// pCompiledEffect
// Pointer to compiled effect data
// CompiledEffectSize
// Size of compiled effect data in bytes
// Usage
// Allows the specification of D3DUSAGE_SOFTWAREPROCESSING
// ppEffect
// Returns the created effect object
//----------------------------------------------------------------------------
HRESULT WINAPI
D3DXCreateEffect(
LPDIRECT3DDEVICE8 pDevice,
LPCVOID pCompiledEffect,
UINT CompiledEffectSize,
DWORD Usage,
LPD3DXEFFECT* ppEffect);
#ifdef __cplusplus
}
#endif //__cplusplus
#endif //__D3DX8EFFECT_H__

1079
lib/directx8/d3dx8math.h Executable file

File diff suppressed because it is too large Load Diff

1757
lib/directx8/d3dx8math.inl Executable file

File diff suppressed because it is too large Load Diff

566
lib/directx8/d3dx8mesh.h Executable file
View File

@ -0,0 +1,566 @@
//////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 1998 Microsoft Corporation. All Rights Reserved.
//
// File: d3dx8mesh.h
// Content: D3DX mesh types and functions
//
//////////////////////////////////////////////////////////////////////////////
#include "d3dx8.h"
#ifndef __D3DX8MESH_H__
#define __D3DX8MESH_H__
#include "dxfile.h" // defines LPDIRECTXFILEDATA
// {A69BA991-1F7D-11d3-B929-00C04F68DC23}
DEFINE_GUID(IID_ID3DXBaseMesh,
0xa69ba991, 0x1f7d, 0x11d3, 0xb9, 0x29, 0x0, 0xc0, 0x4f, 0x68, 0xdc, 0x23);
// {9D84AC46-6B90-49a9-A721-085C7A3E3DAE}
DEFINE_GUID(IID_ID3DXMesh,
0x9d84ac46, 0x6b90, 0x49a9, 0xa7, 0x21, 0x8, 0x5c, 0x7a, 0x3e, 0x3d, 0xae);
// {15981AA8-1A05-48e3-BBE7-FF5D49654E3F}
DEFINE_GUID(IID_ID3DXPMesh,
0x15981aa8, 0x1a05, 0x48e3, 0xbb, 0xe7, 0xff, 0x5d, 0x49, 0x65, 0x4e, 0x3f);
// {BC3BBDE2-1F7D-11d3-B929-00C04F68DC23}
DEFINE_GUID(IID_ID3DXSPMesh,
0xbc3bbde2, 0x1f7d, 0x11d3, 0xb9, 0x29, 0x0, 0xc0, 0x4f, 0x68, 0xdc, 0x23);
// {82A53844-F322-409e-A2E9-992E1104069D}
DEFINE_GUID(IID_ID3DXSkinMesh,
0x82a53844, 0xf322, 0x409e, 0xa2, 0xe9, 0x99, 0x2e, 0x11, 0x4, 0x6, 0x9d);
enum _D3DXMESH {
D3DXMESH_32BIT = 0x001, // If set, then use 32 bit indices, if not set use 16 bit indices. 32BIT meshes currently not supported on ID3DXSkinMesh object
D3DXMESH_DONOTCLIP = 0x002, // Use D3DUSAGE_DONOTCLIP for VB & IB.
D3DXMESH_POINTS = 0x004, // Use D3DUSAGE_POINTS for VB & IB.
D3DXMESH_RTPATCHES = 0x008, // Use D3DUSAGE_RTPATCHES for VB & IB.
D3DXMESH_NPATCHES = 0x4000,// Use D3DUSAGE_NPATCHES for VB & IB.
D3DXMESH_VB_SYSTEMMEM = 0x010, // Use D3DPOOL_SYSTEMMEM for VB. Overrides D3DXMESH_MANAGEDVERTEXBUFFER
D3DXMESH_VB_MANAGED = 0x020, // Use D3DPOOL_MANAGED for VB.
D3DXMESH_VB_WRITEONLY = 0x040, // Use D3DUSAGE_WRITEONLY for VB.
D3DXMESH_VB_DYNAMIC = 0x080, // Use D3DUSAGE_DYNAMIC for VB.
D3DXMESH_IB_SYSTEMMEM = 0x100, // Use D3DPOOL_SYSTEMMEM for IB. Overrides D3DXMESH_MANAGEDINDEXBUFFER
D3DXMESH_IB_MANAGED = 0x200, // Use D3DPOOL_MANAGED for IB.
D3DXMESH_IB_WRITEONLY = 0x400, // Use D3DUSAGE_WRITEONLY for IB.
D3DXMESH_IB_DYNAMIC = 0x800, // Use D3DUSAGE_DYNAMIC for IB.
D3DXMESH_VB_SHARE = 0x1000, // Valid for Clone* calls only, forces cloned mesh/pmesh to share vertex buffer
D3DXMESH_USEHWONLY = 0x2000, // Valid for ID3DXSkinMesh::ConvertToBlendedMesh
// Helper options
D3DXMESH_SYSTEMMEM = 0x110, // D3DXMESH_VB_SYSTEMMEM | D3DXMESH_IB_SYSTEMMEM
D3DXMESH_MANAGED = 0x220, // D3DXMESH_VB_MANAGED | D3DXMESH_IB_MANAGED
D3DXMESH_WRITEONLY = 0x440, // D3DXMESH_VB_WRITEONLY | D3DXMESH_IB_WRITEONLY
D3DXMESH_DYNAMIC = 0x880, // D3DXMESH_VB_DYNAMIC | D3DXMESH_IB_DYNAMIC
};
// option field values for specifying min value in D3DXGeneratePMesh and D3DXSimplifyMesh
enum _D3DXMESHSIMP
{
D3DXMESHSIMP_VERTEX = 0x1,
D3DXMESHSIMP_FACE = 0x2,
};
enum _MAX_FVF_DECL_SIZE
{
MAX_FVF_DECL_SIZE = 20
};
typedef struct ID3DXBaseMesh *LPD3DXBASEMESH;
typedef struct ID3DXMesh *LPD3DXMESH;
typedef struct ID3DXPMesh *LPD3DXPMESH;
typedef struct ID3DXSPMesh *LPD3DXSPMESH;
typedef struct ID3DXSkinMesh *LPD3DXSKINMESH;
typedef struct _D3DXATTRIBUTERANGE
{
DWORD AttribId;
DWORD FaceStart;
DWORD FaceCount;
DWORD VertexStart;
DWORD VertexCount;
} D3DXATTRIBUTERANGE;
typedef D3DXATTRIBUTERANGE* LPD3DXATTRIBUTERANGE;
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
struct D3DXMATERIAL
{
D3DMATERIAL8 MatD3D;
LPSTR pTextureFilename;
};
typedef struct D3DXMATERIAL *LPD3DXMATERIAL;
#ifdef __cplusplus
}
#endif //__cplusplus
typedef struct _D3DXATTRIBUTEWEIGHTS
{
FLOAT Position;
FLOAT Boundary;
FLOAT Normal;
FLOAT Diffuse;
FLOAT Specular;
FLOAT Tex[8];
} D3DXATTRIBUTEWEIGHTS;
typedef D3DXATTRIBUTEWEIGHTS* LPD3DXATTRIBUTEWEIGHTS;
DECLARE_INTERFACE_(ID3DXBaseMesh, IUnknown)
{
// IUnknown
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// ID3DXBaseMesh
STDMETHOD(DrawSubset)(THIS_ DWORD AttribId) PURE;
STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
STDMETHOD(GetDeclaration)(THIS_ DWORD Declaration[MAX_FVF_DECL_SIZE]) PURE;
STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
STDMETHOD(CloneMeshFVF)(THIS_ DWORD Options,
DWORD FVF, LPDIRECT3DDEVICE8 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE;
STDMETHOD(CloneMesh)(THIS_ DWORD Options,
CONST DWORD *pDeclaration, LPDIRECT3DDEVICE8 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE;
STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER8* ppVB) PURE;
STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER8* ppIB) PURE;
STDMETHOD(LockVertexBuffer)(THIS_ DWORD Flags, BYTE** ppData) PURE;
STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
STDMETHOD(LockIndexBuffer)(THIS_ DWORD Flags, BYTE** ppData) PURE;
STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
STDMETHOD(GetAttributeTable)(
THIS_ D3DXATTRIBUTERANGE *pAttribTable, DWORD* pAttribTableSize) PURE;
};
DECLARE_INTERFACE_(ID3DXMesh, ID3DXBaseMesh)
{
// IUnknown
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// ID3DXBaseMesh
STDMETHOD(DrawSubset)(THIS_ DWORD AttribId) PURE;
STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
STDMETHOD(GetDeclaration)(THIS_ DWORD Declaration[MAX_FVF_DECL_SIZE]) PURE;
STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
STDMETHOD(CloneMeshFVF)(THIS_ DWORD Options,
DWORD FVF, LPDIRECT3DDEVICE8 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE;
STDMETHOD(CloneMesh)(THIS_ DWORD Options,
CONST DWORD *pDeclaration, LPDIRECT3DDEVICE8 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE;
STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER8* ppVB) PURE;
STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER8* ppIB) PURE;
STDMETHOD(LockVertexBuffer)(THIS_ DWORD Flags, BYTE** ppData) PURE;
STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
STDMETHOD(LockIndexBuffer)(THIS_ DWORD Flags, BYTE** ppData) PURE;
STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
STDMETHOD(GetAttributeTable)(
THIS_ D3DXATTRIBUTERANGE *pAttribTable, DWORD* pAttribTableSize) PURE;
// ID3DXMesh
STDMETHOD(LockAttributeBuffer)(THIS_ DWORD Flags, DWORD** ppData) PURE;
STDMETHOD(UnlockAttributeBuffer)(THIS) PURE;
STDMETHOD(ConvertPointRepsToAdjacency)(THIS_ CONST DWORD* pPRep, DWORD* pAdjacency) PURE;
STDMETHOD(ConvertAdjacencyToPointReps)(THIS_ CONST DWORD* pAdjacency, DWORD* pPRep) PURE;
STDMETHOD(GenerateAdjacency)(THIS_ FLOAT fEpsilon, DWORD* pAdjacency) PURE;
STDMETHOD(Optimize)(THIS_ DWORD Flags, CONST DWORD* pAdjacencyIn, DWORD* pAdjacencyOut,
DWORD* pFaceRemap, LPD3DXBUFFER *ppVertexRemap,
LPD3DXMESH* ppOptMesh) PURE;
STDMETHOD(OptimizeInplace)(THIS_ DWORD Flags, CONST DWORD* pAdjacencyIn, DWORD* pAdjacencyOut,
DWORD* pFaceRemap, LPD3DXBUFFER *ppVertexRemap) PURE;
};
DECLARE_INTERFACE_(ID3DXPMesh, ID3DXBaseMesh)
{
// IUnknown
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// ID3DXBaseMesh
STDMETHOD(DrawSubset)(THIS_ DWORD AttribId) PURE;
STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
STDMETHOD(GetDeclaration)(THIS_ DWORD Declaration[MAX_FVF_DECL_SIZE]) PURE;
STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
STDMETHOD(CloneMeshFVF)(THIS_ DWORD Options,
DWORD FVF, LPDIRECT3DDEVICE8 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE;
STDMETHOD(CloneMesh)(THIS_ DWORD Options,
CONST DWORD *pDeclaration, LPDIRECT3DDEVICE8 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE;
STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER8* ppVB) PURE;
STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER8* ppIB) PURE;
STDMETHOD(LockVertexBuffer)(THIS_ DWORD Flags, BYTE** ppData) PURE;
STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
STDMETHOD(LockIndexBuffer)(THIS_ DWORD Flags, BYTE** ppData) PURE;
STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
STDMETHOD(GetAttributeTable)(
THIS_ D3DXATTRIBUTERANGE *pAttribTable, DWORD* pAttribTableSize) PURE;
// ID3DXPMesh
STDMETHOD(ClonePMeshFVF)(THIS_ DWORD Options,
DWORD FVF, LPDIRECT3DDEVICE8 pD3D, LPD3DXPMESH* ppCloneMesh) PURE;
STDMETHOD(ClonePMesh)(THIS_ DWORD Options,
CONST DWORD *pDeclaration, LPDIRECT3DDEVICE8 pD3D, LPD3DXPMESH* ppCloneMesh) PURE;
STDMETHOD(SetNumFaces)(THIS_ DWORD Faces) PURE;
STDMETHOD(SetNumVertices)(THIS_ DWORD Vertices) PURE;
STDMETHOD_(DWORD, GetMaxFaces)(THIS) PURE;
STDMETHOD_(DWORD, GetMinFaces)(THIS) PURE;
STDMETHOD_(DWORD, GetMaxVertices)(THIS) PURE;
STDMETHOD_(DWORD, GetMinVertices)(THIS) PURE;
STDMETHOD(Save)(THIS_ IStream *pStream, LPD3DXMATERIAL pMaterials, DWORD NumMaterials) PURE;
STDMETHOD(Optimize)(THIS_ DWORD Flags, DWORD* pAdjacencyOut,
DWORD* pFaceRemap, LPD3DXBUFFER *ppVertexRemap,
LPD3DXMESH* ppOptMesh) PURE;
STDMETHOD(GetAdjacency)(THIS_ DWORD* pAdjacency) PURE;
};
DECLARE_INTERFACE_(ID3DXSPMesh, IUnknown)
{
// IUnknown
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// ID3DXSPMesh
STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
STDMETHOD(GetDeclaration)(THIS_ DWORD Declaration[MAX_FVF_DECL_SIZE]) PURE;
STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
STDMETHOD(CloneMeshFVF)(THIS_ DWORD Options,
DWORD FVF, LPDIRECT3DDEVICE8 pD3D, DWORD *pAdjacencyOut, DWORD *pVertexRemapOut, LPD3DXMESH* ppCloneMesh) PURE;
STDMETHOD(CloneMesh)(THIS_ DWORD Options,
CONST DWORD *pDeclaration, LPDIRECT3DDEVICE8 pD3DDevice, DWORD *pAdjacencyOut, DWORD *pVertexRemapOut, LPD3DXMESH* ppCloneMesh) PURE;
STDMETHOD(ClonePMeshFVF)(THIS_ DWORD Options,
DWORD FVF, LPDIRECT3DDEVICE8 pD3D, DWORD *pVertexRemapOut, LPD3DXPMESH* ppCloneMesh) PURE;
STDMETHOD(ClonePMesh)(THIS_ DWORD Options,
CONST DWORD *pDeclaration, LPDIRECT3DDEVICE8 pD3D, DWORD *pVertexRemapOut, LPD3DXPMESH* ppCloneMesh) PURE;
STDMETHOD(ReduceFaces)(THIS_ DWORD Faces) PURE;
STDMETHOD(ReduceVertices)(THIS_ DWORD Vertices) PURE;
STDMETHOD_(DWORD, GetMaxFaces)(THIS) PURE;
STDMETHOD_(DWORD, GetMaxVertices)(THIS) PURE;
};
#define UNUSED16 (0xffff)
#define UNUSED32 (0xffffffff)
// ID3DXMesh::Optimize options
enum _D3DXMESHOPT {
D3DXMESHOPT_COMPACT = 0x001,
D3DXMESHOPT_ATTRSORT = 0x002,
D3DXMESHOPT_VERTEXCACHE = 0x004,
D3DXMESHOPT_STRIPREORDER = 0x008,
D3DXMESHOPT_IGNOREVERTS = 0x010, // optimize faces only, don't touch vertices
D3DXMESHOPT_SHAREVB = 0x020,
};
// Subset of the mesh that has the same attribute and bone combination.
// This subset can be rendered in a single draw call
typedef struct _D3DXBONECOMBINATION
{
DWORD AttribId;
DWORD FaceStart;
DWORD FaceCount;
DWORD VertexStart;
DWORD VertexCount;
DWORD* BoneId;
} D3DXBONECOMBINATION, *LPD3DXBONECOMBINATION;
DECLARE_INTERFACE_(ID3DXSkinMesh, IUnknown)
{
// IUnknown
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// ID3DXMesh
STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
STDMETHOD(GetDeclaration)(THIS_ DWORD Declaration[MAX_FVF_DECL_SIZE]) PURE;
STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER8* ppVB) PURE;
STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER8* ppIB) PURE;
STDMETHOD(LockVertexBuffer)(THIS_ DWORD flags, BYTE** ppData) PURE;
STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
STDMETHOD(LockIndexBuffer)(THIS_ DWORD flags, BYTE** ppData) PURE;
STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
STDMETHOD(LockAttributeBuffer)(THIS_ DWORD flags, DWORD** ppData) PURE;
STDMETHOD(UnlockAttributeBuffer)(THIS) PURE;
// ID3DXSkinMesh
STDMETHOD_(DWORD, GetNumBones)(THIS) PURE;
STDMETHOD(GetOriginalMesh)(THIS_ LPD3DXMESH* ppMesh) PURE;
STDMETHOD(SetBoneInfluence)(THIS_ DWORD bone, DWORD numInfluences, CONST DWORD* vertices, CONST FLOAT* weights) PURE;
STDMETHOD_(DWORD, GetNumBoneInfluences)(THIS_ DWORD bone) PURE;
STDMETHOD(GetBoneInfluence)(THIS_ DWORD bone, DWORD* vertices, FLOAT* weights) PURE;
STDMETHOD(GetMaxVertexInfluences)(THIS_ DWORD* maxVertexInfluences) PURE;
STDMETHOD(GetMaxFaceInfluences)(THIS_ DWORD* maxFaceInfluences) PURE;
STDMETHOD(ConvertToBlendedMesh)(THIS_ DWORD options, CONST LPDWORD pAdjacencyIn, LPDWORD pAdjacencyOut,
DWORD* pNumBoneCombinations, LPD3DXBUFFER* ppBoneCombinationTable, LPD3DXMESH* ppMesh) PURE;
STDMETHOD(ConvertToIndexedBlendedMesh)(THIS_ DWORD options,
CONST LPDWORD pAdjacencyIn,
DWORD paletteSize,
LPDWORD pAdjacencyOut,
DWORD* pNumBoneCombinations,
LPD3DXBUFFER* ppBoneCombinationTable,
LPD3DXMESH* ppMesh) PURE;
STDMETHOD(GenerateSkinnedMesh)(THIS_ DWORD options, FLOAT minWeight, CONST LPDWORD pAdjacencyIn, LPDWORD pAdjacencyOut, LPD3DXMESH* ppMesh) PURE;
STDMETHOD(UpdateSkinnedMesh)(THIS_ CONST D3DXMATRIX* pBoneTransforms, LPD3DXMESH pMesh) PURE;
};
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
HRESULT WINAPI
D3DXCreateMesh(
DWORD NumFaces,
DWORD NumVertices,
DWORD Options,
CONST DWORD *pDeclaration,
LPDIRECT3DDEVICE8 pD3D,
LPD3DXMESH* ppMesh);
HRESULT WINAPI
D3DXCreateMeshFVF(
DWORD NumFaces,
DWORD NumVertices,
DWORD Options,
DWORD FVF,
LPDIRECT3DDEVICE8 pD3D,
LPD3DXMESH* ppMesh);
HRESULT WINAPI
D3DXCreateSPMesh(
LPD3DXMESH pMesh,
CONST DWORD* pAdjacency,
CONST LPD3DXATTRIBUTEWEIGHTS pVertexAttributeWeights,
CONST FLOAT *pVertexWeights,
LPD3DXSPMESH* ppSMesh);
// clean a mesh up for simplification, try to make manifold
HRESULT WINAPI
D3DXCleanMesh(
LPD3DXMESH pMeshIn,
CONST DWORD* pAdjacency,
LPD3DXMESH* ppMeshOut);
HRESULT WINAPI
D3DXValidMesh(
LPD3DXMESH pMeshIn,
CONST DWORD* pAdjacency);
HRESULT WINAPI
D3DXGeneratePMesh(
LPD3DXMESH pMesh,
CONST DWORD* pAdjacency,
CONST LPD3DXATTRIBUTEWEIGHTS pVertexAttributeWeights,
CONST FLOAT *pVertexWeights,
DWORD MinValue,
DWORD Options,
LPD3DXPMESH* ppPMesh);
HRESULT WINAPI
D3DXSimplifyMesh(
LPD3DXMESH pMesh,
CONST DWORD* pAdjacency,
CONST LPD3DXATTRIBUTEWEIGHTS pVertexAttributeWeights,
CONST FLOAT *pVertexWeights,
DWORD MinValue,
DWORD Options,
LPD3DXMESH* ppMesh);
HRESULT WINAPI
D3DXComputeBoundingSphere(
PVOID pPointsFVF,
DWORD NumVertices,
DWORD FVF,
D3DXVECTOR3 *pCenter,
FLOAT *pRadius);
HRESULT WINAPI
D3DXComputeBoundingBox(
PVOID pPointsFVF,
DWORD NumVertices,
DWORD FVF,
D3DXVECTOR3 *pMin,
D3DXVECTOR3 *pMax);
HRESULT WINAPI
D3DXComputeNormals(
LPD3DXBASEMESH pMesh);
HRESULT WINAPI
D3DXCreateBuffer(
DWORD NumBytes,
LPD3DXBUFFER *ppBuffer);
HRESULT WINAPI
D3DXLoadMeshFromX(
LPSTR pFilename,
DWORD Options,
LPDIRECT3DDEVICE8 pD3D,
LPD3DXBUFFER *ppAdjacency,
LPD3DXBUFFER *ppMaterials,
PDWORD pNumMaterials,
LPD3DXMESH *ppMesh);
HRESULT WINAPI
D3DXSaveMeshToX(
LPSTR pFilename,
LPD3DXMESH pMesh,
CONST DWORD* pAdjacency,
CONST LPD3DXMATERIAL pMaterials,
DWORD NumMaterials,
DWORD Format
);
HRESULT WINAPI
D3DXCreatePMeshFromStream(
IStream *pStream,
DWORD Options,
LPDIRECT3DDEVICE8 pD3DDevice,
LPD3DXBUFFER *ppMaterials,
DWORD* pNumMaterials,
LPD3DXPMESH *ppPMesh);
HRESULT WINAPI
D3DXCreateSkinMesh(
DWORD numFaces,
DWORD numVertices,
DWORD numBones,
DWORD options,
CONST DWORD *pDeclaration,
LPDIRECT3DDEVICE8 pD3D,
LPD3DXSKINMESH* ppSkinMesh);
HRESULT WINAPI
D3DXCreateSkinMeshFVF(
DWORD numFaces,
DWORD numVertices,
DWORD numBones,
DWORD options,
DWORD fvf,
LPDIRECT3DDEVICE8 pD3D,
LPD3DXSKINMESH* ppSkinMesh);
HRESULT WINAPI
D3DXCreateSkinMeshFromMesh(
LPD3DXMESH pMesh,
DWORD numBones,
LPD3DXSKINMESH* ppSkinMesh);
HRESULT WINAPI
D3DXLoadMeshFromXof(
LPDIRECTXFILEDATA pXofObjMesh,
DWORD Options,
LPDIRECT3DDEVICE8 pD3DDevice,
LPD3DXBUFFER *ppAdjacency,
LPD3DXBUFFER *ppMaterials,
PDWORD pNumMaterials,
LPD3DXMESH *ppMesh);
HRESULT WINAPI
D3DXLoadSkinMeshFromXof(
LPDIRECTXFILEDATA pxofobjMesh,
DWORD options,
LPDIRECT3DDEVICE8 pD3D,
LPD3DXBUFFER* ppAdjacency,
LPD3DXBUFFER* ppMaterials,
PDWORD pMatOut,
LPD3DXBUFFER* ppBoneNames,
LPD3DXBUFFER* ppBoneTransforms,
LPD3DXSKINMESH* ppMesh);
HRESULT WINAPI
D3DXTesselateMesh(
LPD3DXMESH pMeshIn,
CONST DWORD* pAdjacency,
FLOAT NumSegs,
BOOL QuadraticInterpNormals, // if false use linear intrep for normals, if true use quadratic
LPD3DXMESH *ppMeshOut);
HRESULT WINAPI
D3DXDeclaratorFromFVF(
DWORD FVF,
DWORD Declaration[MAX_FVF_DECL_SIZE]);
HRESULT WINAPI
D3DXFVFFromDeclarator(
CONST DWORD *pDeclarator,
DWORD *pFVF);
HRESULT WINAPI
D3DXWeldVertices(
CONST LPD3DXMESH pMesh,
float fEpsilon,
CONST DWORD *rgdwAdjacencyIn,
DWORD *rgdwAdjacencyOut,
DWORD* pFaceRemap,
LPD3DXBUFFER *ppbufVertexRemap);
HRESULT WINAPI
D3DXIntersect(
LPD3DXBASEMESH pMesh,
CONST D3DXVECTOR3 *pRayPos,
CONST D3DXVECTOR3 *pRayDir,
BOOL *pHit,
DWORD *pFaceIndex,
FLOAT *pU,
FLOAT *pV,
FLOAT *pDist);
BOOL WINAPI
D3DXSphereBoundProbe(
CONST D3DXVECTOR3 *pvCenter,
FLOAT fRadius,
D3DXVECTOR3 *pvRayPosition,
D3DXVECTOR3 *pvRayDirection);
BOOL WINAPI
D3DXBoxBoundProbe(
CONST D3DXVECTOR3 *pvMin,
CONST D3DXVECTOR3 *pvMax,
D3DXVECTOR3 *pvRayPosition,
D3DXVECTOR3 *pvRayDirection);
enum _D3DXERR {
D3DXERR_CANNOTMODIFYINDEXBUFFER = MAKE_DDHRESULT(2900),
D3DXERR_INVALIDMESH = MAKE_DDHRESULT(2901),
D3DXERR_CANNOTATTRSORT = MAKE_DDHRESULT(2902),
D3DXERR_SKINNINGNOTSUPPORTED = MAKE_DDHRESULT(2903),
D3DXERR_TOOMANYINFLUENCES = MAKE_DDHRESULT(2904),
D3DXERR_INVALIDDATA = MAKE_DDHRESULT(2905),
D3DXERR_LOADEDMESHASNODATA = MAKE_DDHRESULT(2906),
};
#ifdef __cplusplus
}
#endif //__cplusplus
#endif //__D3DX8MESH_H__

218
lib/directx8/d3dx8shape.h Executable file
View File

@ -0,0 +1,218 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
//
// File: d3dx8shapes.h
// Content: D3DX simple shapes
//
///////////////////////////////////////////////////////////////////////////
#include "d3dx8.h"
#ifndef __D3DX8SHAPES_H__
#define __D3DX8SHAPES_H__
///////////////////////////////////////////////////////////////////////////
// Functions:
///////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
//-------------------------------------------------------------------------
// D3DXCreatePolygon:
// ------------------
// Creates a mesh containing an n-sided polygon. The polygon is centered
// at the origin.
//
// Parameters:
//
// pDevice The D3D device with which the mesh is going to be used.
// Length Length of each side.
// Sides Number of sides the polygon has. (Must be >= 3)
// ppMesh The mesh object which will be created
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
//-------------------------------------------------------------------------
HRESULT WINAPI
D3DXCreatePolygon(
LPDIRECT3DDEVICE8 pDevice,
FLOAT Length,
UINT Sides,
LPD3DXMESH* ppMesh,
LPD3DXBUFFER* ppAdjacency);
//-------------------------------------------------------------------------
// D3DXCreateBox:
// --------------
// Creates a mesh containing an axis-aligned box. The box is centered at
// the origin.
//
// Parameters:
//
// pDevice The D3D device with which the mesh is going to be used.
// Width Width of box (along X-axis)
// Height Height of box (along Y-axis)
// Depth Depth of box (along Z-axis)
// ppMesh The mesh object which will be created
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
//-------------------------------------------------------------------------
HRESULT WINAPI
D3DXCreateBox(
LPDIRECT3DDEVICE8 pDevice,
FLOAT Width,
FLOAT Height,
FLOAT Depth,
LPD3DXMESH* ppMesh,
LPD3DXBUFFER* ppAdjacency);
//-------------------------------------------------------------------------
// D3DXCreateCylinder:
// -------------------
// Creates a mesh containing a cylinder. The generated cylinder is
// centered at the origin, and its axis is aligned with the Z-axis.
//
// Parameters:
//
// pDevice The D3D device with which the mesh is going to be used.
// Radius1 Radius at -Z end (should be >= 0.0f)
// Radius2 Radius at +Z end (should be >= 0.0f)
// Length Length of cylinder (along Z-axis)
// Slices Number of slices about the main axis
// Stacks Number of stacks along the main axis
// ppMesh The mesh object which will be created
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
//-------------------------------------------------------------------------
HRESULT WINAPI
D3DXCreateCylinder(
LPDIRECT3DDEVICE8 pDevice,
FLOAT Radius1,
FLOAT Radius2,
FLOAT Length,
UINT Slices,
UINT Stacks,
LPD3DXMESH* ppMesh,
LPD3DXBUFFER* ppAdjacency);
//-------------------------------------------------------------------------
// D3DXCreateSphere:
// -----------------
// Creates a mesh containing a sphere. The sphere is centered at the
// origin.
//
// Parameters:
//
// pDevice The D3D device with which the mesh is going to be used.
// Radius Radius of the sphere (should be >= 0.0f)
// Slices Number of slices about the main axis
// Stacks Number of stacks along the main axis
// ppMesh The mesh object which will be created
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
//-------------------------------------------------------------------------
HRESULT WINAPI
D3DXCreateSphere(
LPDIRECT3DDEVICE8 pDevice,
FLOAT Radius,
UINT Slices,
UINT Stacks,
LPD3DXMESH* ppMesh,
LPD3DXBUFFER* ppAdjacency);
//-------------------------------------------------------------------------
// D3DXCreateTorus:
// ----------------
// Creates a mesh containing a torus. The generated torus is centered at
// the origin, and its axis is aligned with the Z-axis.
//
// Parameters:
//
// pDevice The D3D device with which the mesh is going to be used.
// InnerRadius Inner radius of the torus (should be >= 0.0f)
// OuterRadius Outer radius of the torue (should be >= 0.0f)
// Sides Number of sides in a cross-section (must be >= 3)
// Rings Number of rings making up the torus (must be >= 3)
// ppMesh The mesh object which will be created
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
//-------------------------------------------------------------------------
HRESULT WINAPI
D3DXCreateTorus(
LPDIRECT3DDEVICE8 pDevice,
FLOAT InnerRadius,
FLOAT OuterRadius,
UINT Sides,
UINT Rings,
LPD3DXMESH* ppMesh,
LPD3DXBUFFER* ppAdjacency);
//-------------------------------------------------------------------------
// D3DXCreateTeapot:
// -----------------
// Creates a mesh containing a teapot.
//
// Parameters:
//
// pDevice The D3D device with which the mesh is going to be used.
// ppMesh The mesh object which will be created
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
//-------------------------------------------------------------------------
HRESULT WINAPI
D3DXCreateTeapot(
LPDIRECT3DDEVICE8 pDevice,
LPD3DXMESH* ppMesh,
LPD3DXBUFFER* ppAdjacency);
//-------------------------------------------------------------------------
// D3DXCreateText:
// ---------------
// Creates a mesh containing the specified text using the font associated
// with the device context.
//
// Parameters:
//
// pDevice The D3D device with which the mesh is going to be used.
// hDC Device context, with desired font selected
// pText Text to generate
// Deviation Maximum chordal deviation from true font outlines
// Extrusion Amount to extrude text in -Z direction
// ppMesh The mesh object which will be created
// pGlyphMetrics Address of buffer to receive glyph metric data (or NULL)
//-------------------------------------------------------------------------
HRESULT WINAPI
D3DXCreateTextA(
LPDIRECT3DDEVICE8 pDevice,
HDC hDC,
LPCSTR pText,
FLOAT Deviation,
FLOAT Extrusion,
LPD3DXMESH* ppMesh,
LPGLYPHMETRICSFLOAT pGlyphMetrics);
HRESULT WINAPI
D3DXCreateTextW(
LPDIRECT3DDEVICE8 pDevice,
HDC hDC,
LPCWSTR pText,
FLOAT Deviation,
FLOAT Extrusion,
LPD3DXMESH* ppMesh,
LPGLYPHMETRICSFLOAT pGlyphMetrics);
#ifdef UNICODE
#define D3DXCreateText D3DXCreateTextW
#else
#define D3DXCreateText D3DXCreateTextA
#endif
#ifdef __cplusplus
}
#endif //__cplusplus
#endif //__D3DX8SHAPES_H__

1069
lib/directx8/d3dx8tex.h Executable file

File diff suppressed because it is too large Load Diff

1027
lib/directx8/d3dxcore.h Executable file

File diff suppressed because it is too large Load Diff

407
lib/directx8/d3dxerr.h Executable file
View File

@ -0,0 +1,407 @@
//----------------------------------------------------------------------
//
// d3dxerr.h -- 0xC code definitions for the D3DX API
//
// Copyright (c) 1991-1999, Microsoft Corp. All rights reserved.
//
//----------------------------------------------------------------------
#ifndef __D3DXERR_H__
#define __D3DXERR_H__
//
//
// Values are 32 bit values layed out as follows:
//
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
// +---+-+-+-----------------------+-------------------------------+
// |Sev|C|R| Facility | Code |
// +---+-+-+-----------------------+-------------------------------+
//
// where
//
// Sev - is the severity code
//
// 00 - Success
// 01 - Informational
// 10 - Warning
// 11 - Error
//
// C - is the Customer code flag
//
// R - is a reserved bit
//
// Facility - is the facility code
//
// Code - is the facility's status code
//
//
// Define the facility codes
//
#define FACILITY_D3DX 0x877
//
// MessageId: D3DXERR_NOMEMORY
//
// MessageText:
//
// Out of memory.
//
#define D3DXERR_NOMEMORY ((HRESULT)0xC8770BB8L)
//
// MessageId: D3DXERR_NULLPOINTER
//
// MessageText:
//
// A NULL pointer was passed as a parameter.
//
#define D3DXERR_NULLPOINTER ((HRESULT)0xC8770BB9L)
//
// MessageId: D3DXERR_INVALIDD3DXDEVICEINDEX
//
// MessageText:
//
// The Device Index passed in is invalid.
//
#define D3DXERR_INVALIDD3DXDEVICEINDEX ((HRESULT)0xC8770BBAL)
//
// MessageId: D3DXERR_NODIRECTDRAWAVAILABLE
//
// MessageText:
//
// DirectDraw has not been created.
//
#define D3DXERR_NODIRECTDRAWAVAILABLE ((HRESULT)0xC8770BBBL)
//
// MessageId: D3DXERR_NODIRECT3DAVAILABLE
//
// MessageText:
//
// Direct3D has not been created.
//
#define D3DXERR_NODIRECT3DAVAILABLE ((HRESULT)0xC8770BBCL)
//
// MessageId: D3DXERR_NODIRECT3DDEVICEAVAILABLE
//
// MessageText:
//
// Direct3D device has not been created.
//
#define D3DXERR_NODIRECT3DDEVICEAVAILABLE ((HRESULT)0xC8770BBDL)
//
// MessageId: D3DXERR_NOPRIMARYAVAILABLE
//
// MessageText:
//
// Primary surface has not been created.
//
#define D3DXERR_NOPRIMARYAVAILABLE ((HRESULT)0xC8770BBEL)
//
// MessageId: D3DXERR_NOZBUFFERAVAILABLE
//
// MessageText:
//
// Z buffer has not been created.
//
#define D3DXERR_NOZBUFFERAVAILABLE ((HRESULT)0xC8770BBFL)
//
// MessageId: D3DXERR_NOBACKBUFFERAVAILABLE
//
// MessageText:
//
// Backbuffer has not been created.
//
#define D3DXERR_NOBACKBUFFERAVAILABLE ((HRESULT)0xC8770BC0L)
//
// MessageId: D3DXERR_COULDNTUPDATECAPS
//
// MessageText:
//
// Failed to update caps database after changing display mode.
//
#define D3DXERR_COULDNTUPDATECAPS ((HRESULT)0xC8770BC1L)
//
// MessageId: D3DXERR_NOZBUFFER
//
// MessageText:
//
// Could not create Z buffer.
//
#define D3DXERR_NOZBUFFER ((HRESULT)0xC8770BC2L)
//
// MessageId: D3DXERR_INVALIDMODE
//
// MessageText:
//
// Display mode is not valid.
//
#define D3DXERR_INVALIDMODE ((HRESULT)0xC8770BC3L)
//
// MessageId: D3DXERR_INVALIDPARAMETER
//
// MessageText:
//
// One or more of the parameters passed is invalid.
//
#define D3DXERR_INVALIDPARAMETER ((HRESULT)0xC8770BC4L)
//
// MessageId: D3DXERR_INITFAILED
//
// MessageText:
//
// D3DX failed to initialize itself.
//
#define D3DXERR_INITFAILED ((HRESULT)0xC8770BC5L)
//
// MessageId: D3DXERR_STARTUPFAILED
//
// MessageText:
//
// D3DX failed to start up.
//
#define D3DXERR_STARTUPFAILED ((HRESULT)0xC8770BC6L)
//
// MessageId: D3DXERR_D3DXNOTSTARTEDYET
//
// MessageText:
//
// D3DXInitialize() must be called first.
//
#define D3DXERR_D3DXNOTSTARTEDYET ((HRESULT)0xC8770BC7L)
//
// MessageId: D3DXERR_NOTINITIALIZED
//
// MessageText:
//
// D3DX is not initialized yet.
//
#define D3DXERR_NOTINITIALIZED ((HRESULT)0xC8770BC8L)
//
// MessageId: D3DXERR_FAILEDDRAWTEXT
//
// MessageText:
//
// Failed to render text to the surface.
//
#define D3DXERR_FAILEDDRAWTEXT ((HRESULT)0xC8770BC9L)
//
// MessageId: D3DXERR_BADD3DXCONTEXT
//
// MessageText:
//
// Bad D3DX context.
//
#define D3DXERR_BADD3DXCONTEXT ((HRESULT)0xC8770BCAL)
//
// MessageId: D3DXERR_CAPSNOTSUPPORTED
//
// MessageText:
//
// The requested device capabilities are not supported.
//
#define D3DXERR_CAPSNOTSUPPORTED ((HRESULT)0xC8770BCBL)
//
// MessageId: D3DXERR_UNSUPPORTEDFILEFORMAT
//
// MessageText:
//
// The image file format is unrecognized.
//
#define D3DXERR_UNSUPPORTEDFILEFORMAT ((HRESULT)0xC8770BCCL)
//
// MessageId: D3DXERR_IFLERROR
//
// MessageText:
//
// The image file loading library error.
//
#define D3DXERR_IFLERROR ((HRESULT)0xC8770BCDL)
//
// MessageId: D3DXERR_FAILEDGETCAPS
//
// MessageText:
//
// Could not obtain device caps.
//
#define D3DXERR_FAILEDGETCAPS ((HRESULT)0xC8770BCEL)
//
// MessageId: D3DXERR_CANNOTRESIZEFULLSCREEN
//
// MessageText:
//
// Resize does not work for full-screen.
//
#define D3DXERR_CANNOTRESIZEFULLSCREEN ((HRESULT)0xC8770BCFL)
//
// MessageId: D3DXERR_CANNOTRESIZENONWINDOWED
//
// MessageText:
//
// Resize does not work for non-windowed contexts.
//
#define D3DXERR_CANNOTRESIZENONWINDOWED ((HRESULT)0xC8770BD0L)
//
// MessageId: D3DXERR_FRONTBUFFERALREADYEXISTS
//
// MessageText:
//
// Front buffer already exists.
//
#define D3DXERR_FRONTBUFFERALREADYEXISTS ((HRESULT)0xC8770BD1L)
//
// MessageId: D3DXERR_FULLSCREENPRIMARYEXISTS
//
// MessageText:
//
// The app is using the primary in full-screen mode.
//
#define D3DXERR_FULLSCREENPRIMARYEXISTS ((HRESULT)0xC8770BD2L)
//
// MessageId: D3DXERR_GETDCFAILED
//
// MessageText:
//
// Could not get device context.
//
#define D3DXERR_GETDCFAILED ((HRESULT)0xC8770BD3L)
//
// MessageId: D3DXERR_BITBLTFAILED
//
// MessageText:
//
// Could not bitBlt.
//
#define D3DXERR_BITBLTFAILED ((HRESULT)0xC8770BD4L)
//
// MessageId: D3DXERR_NOTEXTURE
//
// MessageText:
//
// There is no surface backing up this texture.
//
#define D3DXERR_NOTEXTURE ((HRESULT)0xC8770BD5L)
//
// MessageId: D3DXERR_MIPLEVELABSENT
//
// MessageText:
//
// There is no such miplevel for this surface.
//
#define D3DXERR_MIPLEVELABSENT ((HRESULT)0xC8770BD6L)
//
// MessageId: D3DXERR_SURFACENOTPALETTED
//
// MessageText:
//
// The surface is not paletted.
//
#define D3DXERR_SURFACENOTPALETTED ((HRESULT)0xC8770BD7L)
//
// MessageId: D3DXERR_ENUMFORMATSFAILED
//
// MessageText:
//
// An error occured while enumerating surface formats.
//
#define D3DXERR_ENUMFORMATSFAILED ((HRESULT)0xC8770BD8L)
//
// MessageId: D3DXERR_COLORDEPTHTOOLOW
//
// MessageText:
//
// D3DX only supports color depths of 16 bit or greater.
//
#define D3DXERR_COLORDEPTHTOOLOW ((HRESULT)0xC8770BD9L)
//
// MessageId: D3DXERR_INVALIDFILEFORMAT
//
// MessageText:
//
// The file format is invalid.
//
#define D3DXERR_INVALIDFILEFORMAT ((HRESULT)0xC8770BDAL)
//
// MessageId: D3DXERR_NOMATCHFOUND
//
// MessageText:
//
// No suitable match found.
//
#define D3DXERR_NOMATCHFOUND ((HRESULT)0xC8770BDBL)
#endif //__D3DXERR_H__

1085
lib/directx8/d3dxmath.h Executable file

File diff suppressed because it is too large Load Diff

1809
lib/directx8/d3dxmath.inl Executable file

File diff suppressed because it is too large Load Diff

209
lib/directx8/d3dxshapes.h Executable file
View File

@ -0,0 +1,209 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
//
// File: d3dxshapes.h
// Content: D3DX simple shapes
//
///////////////////////////////////////////////////////////////////////////
#ifndef __D3DXSHAPES_H__
#define __D3DXSHAPES_H__
#include <d3d.h>
#include <limits.h>
#include "d3dxerr.h"
typedef struct ID3DXSimpleShape *LPD3DXSIMPLESHAPE;
// {CFCD4602-EB7B-11d2-A440-00A0C90629A8}
DEFINE_GUID( IID_ID3DXSimpleShape,
0xcfcd4602, 0xeb7b, 0x11d2, 0xa4, 0x40, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8 );
///////////////////////////////////////////////////////////////////////////
// Interfaces:
///////////////////////////////////////////////////////////////////////////
//-------------------------------------------------------------------------
// ID3DXSimpleShape interface:
//-------------------------------------------------------------------------
DECLARE_INTERFACE_(ID3DXSimpleShape, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
// ID3DXSimpleShape methods
STDMETHOD_(LPDIRECT3DVERTEXBUFFER7, GetVB)(THIS) PURE;
STDMETHOD_(DWORD, GetIndices)(THIS_ LPWORD *ppIndices) PURE;
STDMETHOD(Draw)(THIS) PURE;
};
///////////////////////////////////////////////////////////////////////////
// Functions:
///////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
//-------------------------------------------------------------------------
// D3DXCreatePolygon: Creates an 'n' sided polygon using the device
// ---------------- specified. It returns a vertex buffer that can be used
// for drawing or manipulation by the program later on.
//
// Params:
// [in] LPDIRECT3DDEVICE7 pDevice: The device to create off.
// [in] float sideSize: Length of a side.
// [in] DWORD numTexCoords: The number of texture coordinates desired
// in the vertex-buffer. (Default is 1)
// D3DX_DEFAULT is a valid input.
// [out] IDirect3DVertexBuffer7** ppVB: The output shape interface.
//-------------------------------------------------------------------------
HRESULT WINAPI
D3DXCreatePolygon(LPDIRECT3DDEVICE7 pDevice,
float sideSize,
DWORD numSides,
DWORD numTexCoords,
LPD3DXSIMPLESHAPE* ppShape );
//-------------------------------------------------------------------------
// D3DXCreateBox: Creates a box (cuboid) of given dimensions using the
// ------------ device. It returns a vertex buffer that can
// be used for drawing or manipulation by the program later on.
//
// Params:
// [in] LPDIRECT3DDEVICE7 pDevice: The device to create off.
// [in] float width: Width of the box (along x-axis)
// [in] float height: Height of the box (along y-axis)
// [in] float depth: Depth of the box (along z-axis)
// [in] DWORD numTexCoords: The number of texture coordinates desired
// in the vertex-buffer. Default is 1.
// D3DX_DEFAULT is a valid input here.
// [out] LPD3DXSIMPLESHAPE* ppShape: The output vertex-buffer.
//-------------------------------------------------------------------------
HRESULT WINAPI
D3DXCreateBox(LPDIRECT3DDEVICE7 pDevice,
float width,
float height,
float depth,
DWORD numTexCoords,
LPD3DXSIMPLESHAPE* ppShape );
//-------------------------------------------------------------------------
// D3DXCreateCylinder: Creates a cylinder of given dimensions using the
// ----------------- device. It returns a vertex buffer that
// can be used for drawing or manipulation by the program
// later on.
//
// Params:
// [in] LPDIRECT3DDEVICE7 pDevice: The device to create off.
// [in] float baseRadius: Base-radius (default is 1.0f, shd be >= 0.0f)
// [in] float topRadius: Top-radius (default is 1.0f, shd be >= 0.0f)
// [in] float height: Height (default is 1.0f, shd be >= 0.0f)
// [in] DWORD numSlices: Number of slices about the main axis.
// (default is 8) D3DX_DEFAULT is a valid input.
// [in] DWORD numStacks: Number of stacks along the main axis.
// (default is 8) D3DX_DEFAULT is a valid input.
// [in] DWORD numTexCoords: The number of texture coordinates desired
// in the vertex-buffer. Default is 1.
// D3DX_DEFAULT is a valid input here.
// [out] LPD3DXSIMPLESHAPE* ppShape: The output shape interface.
//-------------------------------------------------------------------------
HRESULT WINAPI
D3DXCreateCylinder(LPDIRECT3DDEVICE7 pDevice,
float baseRadius,
float topRadius,
float height,
DWORD numSlices,
DWORD numStacks,
DWORD numTexCoords,
LPD3DXSIMPLESHAPE* ppShape );
//-------------------------------------------------------------------------
// D3DXCreateTorus: Creates a torus of given dimensions using the
// -------------- device specified. It returns a vertex buffer that can
// be used for drawing or manipulation by the program later
// on. It draws a doughnut, centered at (0, 0, 0) whose axis
// is aligned with the z-axis. With the innerRadius used
// as the radius of the cross-section (minor-Radius) and
// the outerRadius used as the radius of the central 'hole'.
//
// Params:
// [in] LPDIRECT3DDEVICE7 pDevice: The device to create off.
// [in] float innerRadius: inner radius (default is 1.0f, shd be >= 0.0f)
// [in] float outerRadius: outer radius (default is 2.0f, shd be >= 0.0f)
// [in] DWORD numSides: Number of sides in the cross-section
// (default is 8). D3DX_DEFAULT is a valid input.
// [in] DWORD numRings: Number of rings making up the torus
// (default is 8) D3DX_DEFAULT is a valid input.
// [in] DWORD numTexCoords: The number of texture coordinates desired
// in the vertex-buffer. Default is 1.
// D3DX_DEFAULT is a valid input here.
// [out] LPD3DXSIMPLESHAPE* ppShape: The output shape interface.
//-------------------------------------------------------------------------
HRESULT WINAPI
D3DXCreateTorus(LPDIRECT3DDEVICE7 pDevice,
float innerRadius,
float outerRadius,
DWORD numSides,
DWORD numRings,
DWORD numTexCoords,
LPD3DXSIMPLESHAPE* ppShape );
//-------------------------------------------------------------------------
// D3DXCreateTeapot: Creates a teapot using the device specified.
// ---------------- It returns a vertex buffer that can be used for
// drawing or manipulation by the program later on.
//
// Params:
// [in] LPDIRECT3DDEVICE7 pDevice: The device to create off.
// [in] DWORD numTexCoords: The number of texture coordinates desired
// in the vertex-buffer. Default is 1.
// D3DX_DEFAULT is a valid input here.
// [out] LPD3DXSIMPLESHAPE* ppShape: The output shape interface.
//-------------------------------------------------------------------------
HRESULT WINAPI
D3DXCreateTeapot(LPDIRECT3DDEVICE7 pDevice,
DWORD numTexCoords,
LPD3DXSIMPLESHAPE* ppShape);
//-------------------------------------------------------------------------
// D3DXCreateSphere: Creates a cylinder of given dimensions using the
// ---------------- device specified.
// It returns a vertex buffer that can be used for
// drawing or manipulation by the program later on.
//
// Params:
// [in] LPDIRECT3DDEVICE7 pDevice: The device to create off.
// [in] float radius: radius (default is 1.0f, shd be >= 0.0f)
// [in] float height: Height (default is 1.0f, shd be >= 0.0f)
// [in] DWORD numSlices: Number of slices about the main axis
// (default is 8) D3DX_DEFAULT is a valid input.
// [in] DWORD numStacks: Number of stacks along the main axis
// (default is 8) D3DX_DEFAULT is a valid input.
// [in] DWORD numTexCoords: The number of texture coordinates desired
// in the vertex-buffer. Default is 1.
// D3DX_DEFAULT is a valid input here.
// [out] LPD3DXSIMPLESHAPE* ppShape: The output shape interface.
//-------------------------------------------------------------------------
HRESULT WINAPI
D3DXCreateSphere(LPDIRECT3DDEVICE7 pDevice,
float radius,
DWORD numSlices,
DWORD numStacks,
DWORD numTexCoords,
LPD3DXSIMPLESHAPE* ppShape);
#ifdef __cplusplus
}
#endif //__cplusplus
#endif //__D3DXSHAPES_H__

321
lib/directx8/d3dxsprite.h Executable file
View File

@ -0,0 +1,321 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
//
// File: d3dxsprite.h
// Content: D3DX sprite helper functions
//
// These functions allow you to use sprites with D3DX. A "sprite" is
// loosely defined as a 2D image that you want to transfer to the
// rendering target. The source image can be a texture created
// with the help of the D3DX texture loader; though advanced users may
// want to create their own. A helper function (PrepareDeviceForSprite)
// is provided to make it easy to set up render states on a device.
// (Again, advanced users can use their own created devices.)
//
// There are two general techniques for sprites; the simpler one just
// specifies a destination rectangle and a rotation anlge. A more
// powerful technique supports rendering to non-rectangular quads.
//
// Both techniques support clipping, alpha, and rotation. More
// details are below.
//
///////////////////////////////////////////////////////////////////////////
#ifndef __D3DXSPRITE_H__
#define __D3DXSPRITE_H__
#include <d3d.h>
#include <limits.h>
#include "d3dxerr.h"
#ifdef __cplusplus
extern "C" {
#endif
//-------------------------------------------------------------------------
// D3DXPrepareDeviceForSprite:
//
// Call this function to set up all the render states necessary for
// BltSprite/WarpSprite to work correctly. (Advanced users may opt to
// not call this function first; in which case Blt/WarpSprite functions
// will use whatever render/texture states were set up on the device when
// they are called.)
//
// Warning: This function modifies render states and may impact performance
// negatively on some 3D hardware if it is called too often per frame.
//
// Warning: If the render state changes (other than through calls to
// BltSprite or WarpSprite), you will need to call this function again before
// calling BltSprite or WarpSprite.
//
// Details: This function modifies the the rendering first texture stage and
// it modifies some renderstates for the entire device. Here is the exact
// list:
//
// SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
// SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
// SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
// SetTextureStageState(0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE);
// SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_MODULATE);
// SetTextureStageState(0, D3DTSS_MINFILTER, D3DTFN_LINEAR);
// SetTextureStageState(0, D3DTSS_MAGFILTER, D3DTFG_LINEAR);
//
// SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_SRCALPHA);
// SetRenderState(D3DRENDERSTATE_DESTBLEND, D3DBLEND_INVSRCALPHA);
// SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, TRUE);
//
// Depending on the value of ZEnable parameter, this function will
// will either call
// SetRenderState(D3DRENDERSTATE_ZENABLE, FALSE);
// - or -
// SetRenderState(D3DRENDERSTATE_ZENABLE, TRUE);
//
// Parameters:
// pd3dDevice - a pointer to the d3d device that you wish to prepare
// for use with D3DX Sprite Services
// ZEnable - a flag indicating whether you want the sprites to
// check and update the Z buffer as part of rendering.
// If ZEnable is FALSE, OR you are using
// alpha-blending, then it is necessary to render your
// sprites from back-to-front.
//
//-------------------------------------------------------------------------
#ifdef __cplusplus
HRESULT WINAPI
D3DXPrepareDeviceForSprite( LPDIRECT3DDEVICE7 pd3dDevice,
BOOL ZEnable = FALSE);
#else
HRESULT WINAPI
D3DXPrepareDeviceForSprite( LPDIRECT3DDEVICE7 pd3dDevice,
BOOL ZEnable);
#endif
//-------------------------------------------------------------------------
// The D3DXDrawBasicSprite() function performs blitting of source images onto
// a 3D rendering device. This function only calls SetTexture on the first
// renderstage with the parameter (pd3dTexture) if that parameter is non-null.
// This function assumes that D3DXPrepareDeviceForSprite has been called on
// the device or that caller has in some other way correctly prepared the
// renderstates.
//
// This function supports scaling, rotations, alpha-blending, and choosing
// a source sub-rect.
//
// Rotation angle is specified in radians. Both rotations and scales
// are applied around the center of the sprite; where the center of the
// sprite is half the width/height of the sprite, plus the offset parameter.
//
// Use the offset parameter if you want the sprite's center to be something
// other than the image center.
//
// The destination point indicates where you would like the center of
// the sprite to draw to.
//
// Parameters:
// pd3dTexture - a pointer to the surface containing the texture
// pd3dDevice - a pointer to the d3d device to render to. It is
// assumed that render states are set up. (See
// D3DXPrepareDeviceForSprite)
// ppointDest - a pointer to the target point for the sprite. The
// components of the vector must be in screen
// space.
// alpha - alpha value to apply to sprite. 1.0 means totally
// opaque; and 0.0 means totally transparent.
// WARNING: If you are using alpha, then you should render
// from back to front in order to avoid rendering
// artifacts.
// angleRad - angle of rotation around the 'center' of the rect
// scale - a uniform scale that is applied to the source rect
// to specify the size of the image that is rendered
// pOffset - offset from the center of the source rect to use as the
// center of rotation
// pSourceRect - a rect that indicates what portion of the source
// source texture to use. If NULL is passed, then the
// entire source is used. If the source texture was
// created via D3DX, then the rect should be specified
// in the coordinates of the original image (so that you
// don't have to worry about stretching/scaling that D3DX
// may have done to make the image work with your current
// 3D Device.) Note that horizontal or vertical mirroring
// may be simply accomplished by swapping the left/right
// or top/bottom fields of this RECT.
//-------------------------------------------------------------------------
#ifdef __cplusplus
HRESULT WINAPI
D3DXDrawSpriteSimple(LPDIRECTDRAWSURFACE7 pd3dTexture,
LPDIRECT3DDEVICE7 pd3dDevice,
const D3DXVECTOR3 *ppointDest,
float alpha = 1.0f,
float scale = 1.0f,
float angleRad = 0.0f,
const D3DXVECTOR2 *pOffset = NULL,
const RECT *pSourceRect = NULL);
#else
HRESULT WINAPI
D3DXDrawSpriteSimple(LPDIRECTDRAWSURFACE7 pd3dTexture,
LPDIRECT3DDEVICE7 pd3dDevice,
D3DXVECTOR3 *ppointDest,
float alpha,
float scale,
float angleRad,
D3DXVECTOR2 *pOffset,
RECT *pSourceRect);
#endif
//-------------------------------------------------------------------------
// The D3DXDrawSprite() function transforms source images onto a 3D
// rendering device. It takes a general 4x4 matrix which is use to transform
// the points of a default rect: (left=-.5, top=-.5, right=+.5, bottom=+.5).
// (This default rect was chosen so that it was centered around the origin
// to ease setting up rotations. And it was chosen to have a width/height of one
// to ease setting up scales.)
//
// This function only calls SetTexture on the first
// renderstage with the parameter (pd3dTexture) if that parameter is non-null.
// This function assumes that D3DXPrepareDeviceForSprite has been called on
// the device or that caller has in some other way correctly prepared the
// renderstates.
//
// This function supports alpha-blending, and choosing
// a source sub-rect. (A value of NULL for source sub-rect means the entire
// texture is used.)
//
// Note that if the transformed points have a value for w (the homogenous
// coordinate) that is not 1, then this function will invert it and pass
// that value to D3D as the rhw field of a TLVERTEX. If the value for w is
// zero, then it use 1 as the rhw.
//
// Parameters:
// pd3dTexture - a pointer to the surface containing the texture
// pd3dDevice - a pointer to the d3d device to render to. It is
// assumed that render states are set up. (See
// D3DXPrepareDeviceForSprite)
// pMatrixTransform - 4x4 matrix that specifies the transformation
// that will be applied to the default -.5 to +.5
// rectangle.
// alpha - alpha value to apply to sprite. 1.0 means totally
// opaque; and 0.0 means totally transparent.
// WARNING: If you are using alpha, then you should render
// from back to front in order to avoid rendering
// artifacts.Furthermore, you should avoid scenarios where
// semi-transparent objects intersect.
// pSourceRect - a rect that indicates what portion of the source
// source texture to use. If NULL is passed, then the
// entire source is used. If the source texture was
// created via D3DX, then the rect should be specified
// in the coordinates of the original image (so that you
// don't have to worry about stretching/scaling that D3DX
// may have done to make the image work with your current
// 3D Device.) Note that mirroring may be simply accomplished
// by swapping the left/right or top/bottom fields of
// this RECT.
//
//-------------------------------------------------------------------------
#ifdef __cplusplus
HRESULT WINAPI
D3DXDrawSpriteTransform(LPDIRECTDRAWSURFACE7 pd3dTexture,
LPDIRECT3DDEVICE7 pd3dDevice,
const D3DXMATRIX *pMatrixTransform,
float alpha = 1.0f,
const RECT *pSourceRect = NULL);
#else
HRESULT WINAPI
D3DXDrawSpriteTransform(LPDIRECTDRAWSURFACE7 pd3dTexture,
LPDIRECT3DDEVICE7 pd3dDevice,
D3DXMATRIX *pMatrixTransform,
float alpha,
RECT *pSourceRect);
#endif
//-------------------------------------------------------------------------
// The D3DXBuildSpriteTransform() function is a helper provided which
// creates a matrix corresponding to simple properties. This matrix is
// set up to pass directly to D3DXTransformSprite.
//
// Parameters:
// pMatrix - a pointer to the result matrix
// prectDest - a pointer to the target rectangle for the sprite
// angleRad - angle of rotation around the 'center' of the rect
// pOffset - offset from the center of the source rect to use as the
// center of rotation
//
//-------------------------------------------------------------------------
#ifdef __cplusplus
void WINAPI
D3DXBuildSpriteTransform(D3DXMATRIX *pMatrix,
const RECT *prectDest,
float angleRad = 0.0f,
const D3DXVECTOR2 *pOffset = NULL);
#else
void WINAPI
D3DXBuildSpriteTransform(D3DXMATRIX *pMatrix,
RECT *prectDest,
float angleRad,
D3DXVECTOR2 *pOffset);
#endif
//-------------------------------------------------------------------------
// The D3DXDrawSprite3D() function renders a texture onto a 3D quad. The
// quad ABCD is broken into two triangles ABC and ACD which are rendered
// via DrawPrim.
//
// Parameters:
// pd3dTexture - a pointer to the surface containing the texture
// pd3dDevice - a pointer to the d3d device to render to. It is
// assumed that render states are set up. (See
// D3DXPrepareDeviceForSprite)
// quad - array of 4 points in the following order:
// upper-left, upper-right, lower-right, lower-left.
// If these vectors contain a W, then this function
// will take the reciprocal of that value to pass as
// as the rhw (i.e. reciprocal homogenous w).
// alpha - alpha value to apply to sprite. 1.0 means totally
// opaque; and 0.0 means totally transparent.
// WARNING: If you are using alpha, then you should render
// from back to front in order to avoid rendering
// artifacts.Furthermore, you should avoid scenarios where
// semi-transparent objects intersect.
// pSourceRect - a rect that indicates what portion of the source
// source texture to use. If NULL is passed, then the
// entire source is used. If the source texture was
// created via D3DX, then the rect should be specified
// in the coordinates of the original image (so that you
// don't have to worry about stretching/scaling that D3DX
// may have done to make the image work with your current
// 3D Device.) Note that mirroring may be simply accomplished
// by swapping the left/right or top/bottom fields of
// this RECT.
//-------------------------------------------------------------------------
#ifdef __cplusplus
HRESULT WINAPI
D3DXDrawSprite3D(LPDIRECTDRAWSURFACE7 pd3dTexture,
LPDIRECT3DDEVICE7 pd3dDevice,
const D3DXVECTOR4 quad[4],
float alpha = 1.0f,
const RECT *pSourceRect = NULL);
#else
HRESULT WINAPI
D3DXDrawSprite3D(LPDIRECTDRAWSURFACE7 pd3dTexture,
LPDIRECT3DDEVICE7 pd3dDevice,
D3DXVECTOR4 quad[4],
float alpha,
RECT *pSourceRect);
#endif
#ifdef __cplusplus
} // extern "C"
#endif
#endif // __D3DXSPRITE_H__

5668
lib/directx8/ddraw.h Executable file

File diff suppressed because it is too large Load Diff

BIN
lib/directx8/ddraw.lib Executable file

Binary file not shown.

218
lib/directx8/ddrawex.h Executable file
View File

@ -0,0 +1,218 @@
//*********************************************************************
//* Microsoft Windows **
//* Copyright(c) Microsoft Corp., 1995-1997 **
//*********************************************************************
//
// DDRAWEX.H
//
// Header file for DirectDrawEx functionality
#ifndef __DDRAWEXH__
#define __DDRAWEXH__
#ifdef __cplusplus
extern "C" {
#endif
#include <ddraw.h>
// {4FD2A832-86C8-11d0-8FCA-00C04FD9189D}
DEFINE_GUID(CLSID_DirectDrawFactory,
0x4fd2a832, 0x86c8, 0x11d0, 0x8f, 0xca, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
DEFINE_GUID(IID_IDirectDrawFactory,
0x4fd2a833, 0x86c8, 0x11d0, 0x8f, 0xca, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
#ifndef DIRECTDRAW_VERSION
//Functionality supported by DDrawex but not DX3
#define DDSD_LPSURFACE 0x00000800l
DEFINE_GUID( IID_IDirectDrawSurface3,
0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
typedef struct IDirectDrawSurface3 FAR *LPDIRECTDRAWSURFACE3;
#undef INTERFACE
#define INTERFACE IDirectDrawSurface3
DECLARE_INTERFACE_( IDirectDrawSurface3, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDrawSurface methods ***/
STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE3) PURE;
STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE3, LPRECT,DWORD, LPDDBLTFX) PURE;
STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE3, LPRECT,DWORD) PURE;
STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE3) PURE;
STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE3, DWORD) PURE;
STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE3 FAR *) PURE;
STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
STDMETHOD(IsLost)(THIS) PURE;
STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
STDMETHOD(Restore)(THIS) PURE;
STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE3,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE3) PURE;
/*** Added in the v2 interface ***/
STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
STDMETHOD(PageLock)(THIS_ DWORD) PURE;
STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
/*** Added in the v3 interface ***/
STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC, DWORD ) PURE;
};
#endif
#define DDSCAPS_DATAEXCHANGE (DDSCAPS_SYSTEMMEMORY|DDSCAPS_VIDEOMEMORY)
#undef INTERFACE
#define INTERFACE IDirectDrawFactory
DECLARE_INTERFACE_(IDirectDrawFactory, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDrawFactory methods ***/
STDMETHOD(CreateDirectDraw) (THIS_ GUID * pGUID, HWND hWnd, DWORD dwCoopLevelFlags, DWORD dwReserved, IUnknown *pUnkOuter, IDirectDraw **ppDirectDraw) PURE;
STDMETHOD(DirectDrawEnumerate) (THIS_ LPDDENUMCALLBACK lpCallback, LPVOID lpContext) PURE;
};
// {618F8AD4-8B7A-11d0-8FCC-00C04FD9189D}
DEFINE_GUID(IID_IDirectDraw3,
0x618f8ad4, 0x8b7a, 0x11d0, 0x8f, 0xcc, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
typedef struct IDirectDraw3 FAR *LPDIRECTDRAW3;
#undef INTERFACE
#define INTERFACE IDirectDraw3
DECLARE_INTERFACE_(IDirectDraw3, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDraw methods ***/
STDMETHOD(Compact)(THIS) PURE;
STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
STDMETHOD(FlipToGDISurface)(THIS) PURE;
STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
STDMETHOD(RestoreDisplayMode)(THIS) PURE;
STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
/*** Added in the v2 interface ***/
STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS, LPDWORD, LPDWORD) PURE;
/*** IDirectDraw3 methods ***/
STDMETHOD(GetSurfaceFromDC) (THIS_ HDC, IDirectDrawSurface **) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDraw3_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirectDraw3_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDraw3_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDraw3_Compact(p) (p)->lpVtbl->Compact(p)
#define IDirectDraw3_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
#define IDirectDraw3_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
#define IDirectDraw3_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
#define IDirectDraw3_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
#define IDirectDraw3_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
#define IDirectDraw3_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
#define IDirectDraw3_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
#define IDirectDraw3_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
#define IDirectDraw3_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
#define IDirectDraw3_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
#define IDirectDraw3_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
#define IDirectDraw3_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
#define IDirectDraw3_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
#define IDirectDraw3_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
#define IDirectDraw3_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
#define IDirectDraw3_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
#define IDirectDraw3_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
#define IDirectDraw3_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
#define IDirectDraw3_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
#define IDirectDraw3_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
#define IDirectDraw3_GetSurfaceFromDC(p, a, b) (p)->lpVtbl->GetSurfaceFromDC(p, a, b)
#endif
/*===========================================================================
*
*
* DIRECTDRAWEX RETURN CODES
*
* The return values from DirectDrawEx Commands and Surface that return an
* HRESULT are codes from DirectDrawEx concerning the results of the action
* requested by DirectDrawEx.
*
*==========================================================================*/
/*
* An attempt was made to load ddraw.dll
*/
#define DDERR_LOADFAILED MAKE_DDHRESULT( 901 )
/*
* Unable to determine module/os version number
*/
#define DDERR_BADVERSIONINFO MAKE_DDHRESULT( 902 )
/*
* Unable to determine address of ddraw.dll exported symbol (DirectDrawCreate or
* DirectDrawEnumerate).
*/
#define DDERR_BADPROCADDRESS MAKE_DDHRESULT( 903 )
/*
* Legacy usage: do not use QI() to create D3D device objects from surface objects.
* Use IDirect3D2::CreateDevice()
*/
#define DDERR_LEGACYUSAGE MAKE_DDHRESULT( 904 )
#ifdef __cplusplus
}
#endif
#endif // __DDRAWEXH__

533
lib/directx8/ddstream.h Executable file
View File

@ -0,0 +1,533 @@
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 6.00.0338 */
/* Compiler settings for ddstream.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
protocol : dce , ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
//@@MIDL_FILE_HEADING( )
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 440
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __ddstream_h__
#define __ddstream_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __IDirectDrawMediaStream_FWD_DEFINED__
#define __IDirectDrawMediaStream_FWD_DEFINED__
typedef interface IDirectDrawMediaStream IDirectDrawMediaStream;
#endif /* __IDirectDrawMediaStream_FWD_DEFINED__ */
#ifndef __IDirectDrawStreamSample_FWD_DEFINED__
#define __IDirectDrawStreamSample_FWD_DEFINED__
typedef interface IDirectDrawStreamSample IDirectDrawStreamSample;
#endif /* __IDirectDrawStreamSample_FWD_DEFINED__ */
/* header files for imported files */
#include "unknwn.h"
#include "mmstream.h"
#ifdef __cplusplus
extern "C"{
#endif
void * __RPC_USER MIDL_user_allocate(size_t);
void __RPC_USER MIDL_user_free( void * );
/* interface __MIDL_itf_ddstream_0000 */
/* [local] */
//
// The following declarations within the 'if 0' block are dummy typedefs used to make
// the ddstream.idl file build. The actual definitions are contained in DDRAW.H
//
#if 0
typedef void *LPDDSURFACEDESC;
typedef struct tDDSURFACEDESC DDSURFACEDESC;
#endif
#include <ddraw.h>
enum __MIDL___MIDL_itf_ddstream_0000_0001
{ DDSFF_PROGRESSIVERENDER = 0x1
} ;
extern RPC_IF_HANDLE __MIDL_itf_ddstream_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_ddstream_0000_v0_0_s_ifspec;
#ifndef __IDirectDrawMediaStream_INTERFACE_DEFINED__
#define __IDirectDrawMediaStream_INTERFACE_DEFINED__
/* interface IDirectDrawMediaStream */
/* [unique][uuid][local][object] */
EXTERN_C const IID IID_IDirectDrawMediaStream;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("F4104FCE-9A70-11d0-8FDE-00C04FD9189D")
IDirectDrawMediaStream : public IMediaStream
{
public:
virtual HRESULT STDMETHODCALLTYPE GetFormat(
/* [out] */ DDSURFACEDESC *pDDSDCurrent,
/* [out] */ IDirectDrawPalette **ppDirectDrawPalette,
/* [out] */ DDSURFACEDESC *pDDSDDesired,
/* [out] */ DWORD *pdwFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE SetFormat(
/* [in] */ const DDSURFACEDESC *pDDSurfaceDesc,
/* [in] */ IDirectDrawPalette *pDirectDrawPalette) = 0;
virtual HRESULT STDMETHODCALLTYPE GetDirectDraw(
/* [out] */ IDirectDraw **ppDirectDraw) = 0;
virtual HRESULT STDMETHODCALLTYPE SetDirectDraw(
/* [in] */ IDirectDraw *pDirectDraw) = 0;
virtual HRESULT STDMETHODCALLTYPE CreateSample(
/* [in] */ IDirectDrawSurface *pSurface,
/* [in] */ const RECT *pRect,
/* [in] */ DWORD dwFlags,
/* [out] */ IDirectDrawStreamSample **ppSample) = 0;
virtual HRESULT STDMETHODCALLTYPE GetTimePerFrame(
/* [out] */ STREAM_TIME *pFrameTime) = 0;
};
#else /* C style interface */
typedef struct IDirectDrawMediaStreamVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IDirectDrawMediaStream * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IDirectDrawMediaStream * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IDirectDrawMediaStream * This);
HRESULT ( STDMETHODCALLTYPE *GetMultiMediaStream )(
IDirectDrawMediaStream * This,
/* [out] */ IMultiMediaStream **ppMultiMediaStream);
HRESULT ( STDMETHODCALLTYPE *GetInformation )(
IDirectDrawMediaStream * This,
/* [out] */ MSPID *pPurposeId,
/* [out] */ STREAM_TYPE *pType);
HRESULT ( STDMETHODCALLTYPE *SetSameFormat )(
IDirectDrawMediaStream * This,
/* [in] */ IMediaStream *pStreamThatHasDesiredFormat,
/* [in] */ DWORD dwFlags);
HRESULT ( STDMETHODCALLTYPE *AllocateSample )(
IDirectDrawMediaStream * This,
/* [in] */ DWORD dwFlags,
/* [out] */ IStreamSample **ppSample);
HRESULT ( STDMETHODCALLTYPE *CreateSharedSample )(
IDirectDrawMediaStream * This,
/* [in] */ IStreamSample *pExistingSample,
/* [in] */ DWORD dwFlags,
/* [out] */ IStreamSample **ppNewSample);
HRESULT ( STDMETHODCALLTYPE *SendEndOfStream )(
IDirectDrawMediaStream * This,
DWORD dwFlags);
HRESULT ( STDMETHODCALLTYPE *GetFormat )(
IDirectDrawMediaStream * This,
/* [out] */ DDSURFACEDESC *pDDSDCurrent,
/* [out] */ IDirectDrawPalette **ppDirectDrawPalette,
/* [out] */ DDSURFACEDESC *pDDSDDesired,
/* [out] */ DWORD *pdwFlags);
HRESULT ( STDMETHODCALLTYPE *SetFormat )(
IDirectDrawMediaStream * This,
/* [in] */ const DDSURFACEDESC *pDDSurfaceDesc,
/* [in] */ IDirectDrawPalette *pDirectDrawPalette);
HRESULT ( STDMETHODCALLTYPE *GetDirectDraw )(
IDirectDrawMediaStream * This,
/* [out] */ IDirectDraw **ppDirectDraw);
HRESULT ( STDMETHODCALLTYPE *SetDirectDraw )(
IDirectDrawMediaStream * This,
/* [in] */ IDirectDraw *pDirectDraw);
HRESULT ( STDMETHODCALLTYPE *CreateSample )(
IDirectDrawMediaStream * This,
/* [in] */ IDirectDrawSurface *pSurface,
/* [in] */ const RECT *pRect,
/* [in] */ DWORD dwFlags,
/* [out] */ IDirectDrawStreamSample **ppSample);
HRESULT ( STDMETHODCALLTYPE *GetTimePerFrame )(
IDirectDrawMediaStream * This,
/* [out] */ STREAM_TIME *pFrameTime);
END_INTERFACE
} IDirectDrawMediaStreamVtbl;
interface IDirectDrawMediaStream
{
CONST_VTBL struct IDirectDrawMediaStreamVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IDirectDrawMediaStream_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IDirectDrawMediaStream_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IDirectDrawMediaStream_Release(This) \
(This)->lpVtbl -> Release(This)
#define IDirectDrawMediaStream_GetMultiMediaStream(This,ppMultiMediaStream) \
(This)->lpVtbl -> GetMultiMediaStream(This,ppMultiMediaStream)
#define IDirectDrawMediaStream_GetInformation(This,pPurposeId,pType) \
(This)->lpVtbl -> GetInformation(This,pPurposeId,pType)
#define IDirectDrawMediaStream_SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags) \
(This)->lpVtbl -> SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags)
#define IDirectDrawMediaStream_AllocateSample(This,dwFlags,ppSample) \
(This)->lpVtbl -> AllocateSample(This,dwFlags,ppSample)
#define IDirectDrawMediaStream_CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample) \
(This)->lpVtbl -> CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample)
#define IDirectDrawMediaStream_SendEndOfStream(This,dwFlags) \
(This)->lpVtbl -> SendEndOfStream(This,dwFlags)
#define IDirectDrawMediaStream_GetFormat(This,pDDSDCurrent,ppDirectDrawPalette,pDDSDDesired,pdwFlags) \
(This)->lpVtbl -> GetFormat(This,pDDSDCurrent,ppDirectDrawPalette,pDDSDDesired,pdwFlags)
#define IDirectDrawMediaStream_SetFormat(This,pDDSurfaceDesc,pDirectDrawPalette) \
(This)->lpVtbl -> SetFormat(This,pDDSurfaceDesc,pDirectDrawPalette)
#define IDirectDrawMediaStream_GetDirectDraw(This,ppDirectDraw) \
(This)->lpVtbl -> GetDirectDraw(This,ppDirectDraw)
#define IDirectDrawMediaStream_SetDirectDraw(This,pDirectDraw) \
(This)->lpVtbl -> SetDirectDraw(This,pDirectDraw)
#define IDirectDrawMediaStream_CreateSample(This,pSurface,pRect,dwFlags,ppSample) \
(This)->lpVtbl -> CreateSample(This,pSurface,pRect,dwFlags,ppSample)
#define IDirectDrawMediaStream_GetTimePerFrame(This,pFrameTime) \
(This)->lpVtbl -> GetTimePerFrame(This,pFrameTime)
#endif /* COBJMACROS */
#endif /* C style interface */
HRESULT STDMETHODCALLTYPE IDirectDrawMediaStream_GetFormat_Proxy(
IDirectDrawMediaStream * This,
/* [out] */ DDSURFACEDESC *pDDSDCurrent,
/* [out] */ IDirectDrawPalette **ppDirectDrawPalette,
/* [out] */ DDSURFACEDESC *pDDSDDesired,
/* [out] */ DWORD *pdwFlags);
void __RPC_STUB IDirectDrawMediaStream_GetFormat_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IDirectDrawMediaStream_SetFormat_Proxy(
IDirectDrawMediaStream * This,
/* [in] */ const DDSURFACEDESC *pDDSurfaceDesc,
/* [in] */ IDirectDrawPalette *pDirectDrawPalette);
void __RPC_STUB IDirectDrawMediaStream_SetFormat_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IDirectDrawMediaStream_GetDirectDraw_Proxy(
IDirectDrawMediaStream * This,
/* [out] */ IDirectDraw **ppDirectDraw);
void __RPC_STUB IDirectDrawMediaStream_GetDirectDraw_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IDirectDrawMediaStream_SetDirectDraw_Proxy(
IDirectDrawMediaStream * This,
/* [in] */ IDirectDraw *pDirectDraw);
void __RPC_STUB IDirectDrawMediaStream_SetDirectDraw_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IDirectDrawMediaStream_CreateSample_Proxy(
IDirectDrawMediaStream * This,
/* [in] */ IDirectDrawSurface *pSurface,
/* [in] */ const RECT *pRect,
/* [in] */ DWORD dwFlags,
/* [out] */ IDirectDrawStreamSample **ppSample);
void __RPC_STUB IDirectDrawMediaStream_CreateSample_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IDirectDrawMediaStream_GetTimePerFrame_Proxy(
IDirectDrawMediaStream * This,
/* [out] */ STREAM_TIME *pFrameTime);
void __RPC_STUB IDirectDrawMediaStream_GetTimePerFrame_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IDirectDrawMediaStream_INTERFACE_DEFINED__ */
#ifndef __IDirectDrawStreamSample_INTERFACE_DEFINED__
#define __IDirectDrawStreamSample_INTERFACE_DEFINED__
/* interface IDirectDrawStreamSample */
/* [unique][uuid][local][object] */
EXTERN_C const IID IID_IDirectDrawStreamSample;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("F4104FCF-9A70-11d0-8FDE-00C04FD9189D")
IDirectDrawStreamSample : public IStreamSample
{
public:
virtual HRESULT STDMETHODCALLTYPE GetSurface(
/* [out] */ IDirectDrawSurface **ppDirectDrawSurface,
/* [out] */ RECT *pRect) = 0;
virtual HRESULT STDMETHODCALLTYPE SetRect(
/* [in] */ const RECT *pRect) = 0;
};
#else /* C style interface */
typedef struct IDirectDrawStreamSampleVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IDirectDrawStreamSample * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IDirectDrawStreamSample * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IDirectDrawStreamSample * This);
HRESULT ( STDMETHODCALLTYPE *GetMediaStream )(
IDirectDrawStreamSample * This,
/* [in] */ IMediaStream **ppMediaStream);
HRESULT ( STDMETHODCALLTYPE *GetSampleTimes )(
IDirectDrawStreamSample * This,
/* [out] */ STREAM_TIME *pStartTime,
/* [out] */ STREAM_TIME *pEndTime,
/* [out] */ STREAM_TIME *pCurrentTime);
HRESULT ( STDMETHODCALLTYPE *SetSampleTimes )(
IDirectDrawStreamSample * This,
/* [in] */ const STREAM_TIME *pStartTime,
/* [in] */ const STREAM_TIME *pEndTime);
HRESULT ( STDMETHODCALLTYPE *Update )(
IDirectDrawStreamSample * This,
/* [in] */ DWORD dwFlags,
/* [in] */ HANDLE hEvent,
/* [in] */ PAPCFUNC pfnAPC,
/* [in] */ DWORD_PTR dwAPCData);
HRESULT ( STDMETHODCALLTYPE *CompletionStatus )(
IDirectDrawStreamSample * This,
/* [in] */ DWORD dwFlags,
/* [in] */ DWORD dwMilliseconds);
HRESULT ( STDMETHODCALLTYPE *GetSurface )(
IDirectDrawStreamSample * This,
/* [out] */ IDirectDrawSurface **ppDirectDrawSurface,
/* [out] */ RECT *pRect);
HRESULT ( STDMETHODCALLTYPE *SetRect )(
IDirectDrawStreamSample * This,
/* [in] */ const RECT *pRect);
END_INTERFACE
} IDirectDrawStreamSampleVtbl;
interface IDirectDrawStreamSample
{
CONST_VTBL struct IDirectDrawStreamSampleVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IDirectDrawStreamSample_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IDirectDrawStreamSample_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IDirectDrawStreamSample_Release(This) \
(This)->lpVtbl -> Release(This)
#define IDirectDrawStreamSample_GetMediaStream(This,ppMediaStream) \
(This)->lpVtbl -> GetMediaStream(This,ppMediaStream)
#define IDirectDrawStreamSample_GetSampleTimes(This,pStartTime,pEndTime,pCurrentTime) \
(This)->lpVtbl -> GetSampleTimes(This,pStartTime,pEndTime,pCurrentTime)
#define IDirectDrawStreamSample_SetSampleTimes(This,pStartTime,pEndTime) \
(This)->lpVtbl -> SetSampleTimes(This,pStartTime,pEndTime)
#define IDirectDrawStreamSample_Update(This,dwFlags,hEvent,pfnAPC,dwAPCData) \
(This)->lpVtbl -> Update(This,dwFlags,hEvent,pfnAPC,dwAPCData)
#define IDirectDrawStreamSample_CompletionStatus(This,dwFlags,dwMilliseconds) \
(This)->lpVtbl -> CompletionStatus(This,dwFlags,dwMilliseconds)
#define IDirectDrawStreamSample_GetSurface(This,ppDirectDrawSurface,pRect) \
(This)->lpVtbl -> GetSurface(This,ppDirectDrawSurface,pRect)
#define IDirectDrawStreamSample_SetRect(This,pRect) \
(This)->lpVtbl -> SetRect(This,pRect)
#endif /* COBJMACROS */
#endif /* C style interface */
HRESULT STDMETHODCALLTYPE IDirectDrawStreamSample_GetSurface_Proxy(
IDirectDrawStreamSample * This,
/* [out] */ IDirectDrawSurface **ppDirectDrawSurface,
/* [out] */ RECT *pRect);
void __RPC_STUB IDirectDrawStreamSample_GetSurface_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IDirectDrawStreamSample_SetRect_Proxy(
IDirectDrawStreamSample * This,
/* [in] */ const RECT *pRect);
void __RPC_STUB IDirectDrawStreamSample_SetRect_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IDirectDrawStreamSample_INTERFACE_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

4387
lib/directx8/dinput.h Executable file

File diff suppressed because it is too large Load Diff

739
lib/directx8/dinputd.h Executable file
View File

@ -0,0 +1,739 @@
/****************************************************************************
*
* Copyright (C) 1995-2000 Microsoft Corporation. All Rights Reserved.
*
* File: dinputd.h
* Content: DirectInput include file for device driver implementors
*
****************************************************************************/
#ifndef __DINPUTD_INCLUDED__
#define __DINPUTD_INCLUDED__
#ifndef DIRECTINPUT_VERSION
#define DIRECTINPUT_VERSION 0x0800
#endif
#ifdef __cplusplus
extern "C" {
#endif
/****************************************************************************
*
* Interfaces
*
****************************************************************************/
#ifndef DIJ_RINGZERO
DEFINE_GUID(IID_IDirectInputEffectDriver, 0x02538130,0x898F,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(IID_IDirectInputJoyConfig, 0x1DE12AB1,0xC9F5,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(IID_IDirectInputPIDDriver, 0xEEC6993A,0xB3FD,0x11D2,0xA9,0x16,0x00,0xC0,0x4F,0xB9,0x86,0x38);
DEFINE_GUID(IID_IDirectInputJoyConfig8, 0xeb0d7dfa,0x1990,0x4f27,0xb4,0xd6,0xed,0xf2,0xee,0xc4,0xa4,0x4c);
#endif /* DIJ_RINGZERO */
/****************************************************************************
*
* IDirectInputEffectDriver
*
****************************************************************************/
typedef struct DIOBJECTATTRIBUTES {
DWORD dwFlags;
WORD wUsagePage;
WORD wUsage;
} DIOBJECTATTRIBUTES, *LPDIOBJECTATTRIBUTES;
typedef const DIOBJECTATTRIBUTES *LPCDIOBJECTATTRIBUTES;
typedef struct DIFFOBJECTATTRIBUTES {
DWORD dwFFMaxForce;
DWORD dwFFForceResolution;
} DIFFOBJECTATTRIBUTES, *LPDIFFOBJECTATTRIBUTES;
typedef const DIFFOBJECTATTRIBUTES *LPCDIFFOBJECTATTRIBUTES;
typedef struct DIOBJECTCALIBRATION {
LONG lMin;
LONG lCenter;
LONG lMax;
} DIOBJECTCALIBRATION, *LPDIOBJECTCALIBRATION;
typedef const DIOBJECTCALIBRATION *LPCDIOBJECTCALIBRATION;
typedef struct DIEFFECTATTRIBUTES {
DWORD dwEffectId;
DWORD dwEffType;
DWORD dwStaticParams;
DWORD dwDynamicParams;
DWORD dwCoords;
} DIEFFECTATTRIBUTES, *LPDIEFFECTATTRIBUTES;
typedef const DIEFFECTATTRIBUTES *LPCDIEFFECTATTRIBUTES;
typedef struct DIFFDEVICEATTRIBUTES {
DWORD dwFlags;
DWORD dwFFSamplePeriod;
DWORD dwFFMinTimeResolution;
} DIFFDEVICEATTRIBUTES, *LPDIFFDEVICEATTRIBUTES;
typedef const DIFFDEVICEATTRIBUTES *LPCDIFFDEVICEATTRIBUTES;
typedef struct DIDRIVERVERSIONS {
DWORD dwSize;
DWORD dwFirmwareRevision;
DWORD dwHardwareRevision;
DWORD dwFFDriverVersion;
} DIDRIVERVERSIONS, *LPDIDRIVERVERSIONS;
typedef const DIDRIVERVERSIONS *LPCDIDRIVERVERSIONS;
typedef struct DIDEVICESTATE {
DWORD dwSize;
DWORD dwState;
DWORD dwLoad;
} DIDEVICESTATE, *LPDIDEVICESTATE;
#define DEV_STS_EFFECT_RUNNING DIEGES_PLAYING
#ifndef DIJ_RINGZERO
typedef struct DIHIDFFINITINFO {
DWORD dwSize;
LPWSTR pwszDeviceInterface;
GUID GuidInstance;
} DIHIDFFINITINFO, *LPDIHIDFFINITINFO;
#undef INTERFACE
#define INTERFACE IDirectInputEffectDriver
DECLARE_INTERFACE_(IDirectInputEffectDriver, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectInputEffectDriver methods ***/
STDMETHOD(DeviceID)(THIS_ DWORD,DWORD,DWORD,DWORD,LPVOID) PURE;
STDMETHOD(GetVersions)(THIS_ LPDIDRIVERVERSIONS) PURE;
STDMETHOD(Escape)(THIS_ DWORD,DWORD,LPDIEFFESCAPE) PURE;
STDMETHOD(SetGain)(THIS_ DWORD,DWORD) PURE;
STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD,DWORD) PURE;
STDMETHOD(GetForceFeedbackState)(THIS_ DWORD,LPDIDEVICESTATE) PURE;
STDMETHOD(DownloadEffect)(THIS_ DWORD,DWORD,LPDWORD,LPCDIEFFECT,DWORD) PURE;
STDMETHOD(DestroyEffect)(THIS_ DWORD,DWORD) PURE;
STDMETHOD(StartEffect)(THIS_ DWORD,DWORD,DWORD,DWORD) PURE;
STDMETHOD(StopEffect)(THIS_ DWORD,DWORD) PURE;
STDMETHOD(GetEffectStatus)(THIS_ DWORD,DWORD,LPDWORD) PURE;
};
typedef struct IDirectInputEffectDriver *LPDIRECTINPUTEFFECTDRIVER;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectInputEffectDriver_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectInputEffectDriver_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectInputEffectDriver_Release(p) (p)->lpVtbl->Release(p)
#define IDirectInputEffectDriver_DeviceID(p,a,b,c,d,e) (p)->lpVtbl->DeviceID(p,a,b,c,d,e)
#define IDirectInputEffectDriver_GetVersions(p,a) (p)->lpVtbl->GetVersions(p,a)
#define IDirectInputEffectDriver_Escape(p,a,b,c) (p)->lpVtbl->Escape(p,a,b,c)
#define IDirectInputEffectDriver_SetGain(p,a,b) (p)->lpVtbl->SetGain(p,a,b)
#define IDirectInputEffectDriver_SendForceFeedbackCommand(p,a,b) (p)->lpVtbl->SendForceFeedbackCommand(p,a,b)
#define IDirectInputEffectDriver_GetForceFeedbackState(p,a,b) (p)->lpVtbl->GetForceFeedbackState(p,a,b)
#define IDirectInputEffectDriver_DownloadEffect(p,a,b,c,d,e) (p)->lpVtbl->DownloadEffect(p,a,b,c,d,e)
#define IDirectInputEffectDriver_DestroyEffect(p,a,b) (p)->lpVtbl->DestroyEffect(p,a,b)
#define IDirectInputEffectDriver_StartEffect(p,a,b,c,d) (p)->lpVtbl->StartEffect(p,a,b,c,d)
#define IDirectInputEffectDriver_StopEffect(p,a,b) (p)->lpVtbl->StopEffect(p,a,b)
#define IDirectInputEffectDriver_GetEffectStatus(p,a,b,c) (p)->lpVtbl->GetEffectStatus(p,a,b,c)
#else
#define IDirectInputEffectDriver_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectInputEffectDriver_AddRef(p) (p)->AddRef()
#define IDirectInputEffectDriver_Release(p) (p)->Release()
#define IDirectInputEffectDriver_DeviceID(p,a,b,c,d,e) (p)->DeviceID(a,b,c,d,e)
#define IDirectInputEffectDriver_GetVersions(p,a) (p)->GetVersions(a)
#define IDirectInputEffectDriver_Escape(p,a,b,c) (p)->Escape(a,b,c)
#define IDirectInputEffectDriver_SetGain(p,a,b) (p)->SetGain(a,b)
#define IDirectInputEffectDriver_SendForceFeedbackCommand(p,a,b) (p)->SendForceFeedbackCommand(a,b)
#define IDirectInputEffectDriver_GetForceFeedbackState(p,a,b) (p)->GetForceFeedbackState(a,b)
#define IDirectInputEffectDriver_DownloadEffect(p,a,b,c,d,e) (p)->DownloadEffect(a,b,c,d,e)
#define IDirectInputEffectDriver_DestroyEffect(p,a,b) (p)->DestroyEffect(a,b)
#define IDirectInputEffectDriver_StartEffect(p,a,b,c,d) (p)->StartEffect(a,b,c,d)
#define IDirectInputEffectDriver_StopEffect(p,a,b) (p)->StopEffect(a,b)
#define IDirectInputEffectDriver_GetEffectStatus(p,a,b,c) (p)->GetEffectStatus(a,b,c)
#endif
#endif /* DIJ_RINGZERO */
/****************************************************************************
*
* IDirectInputJoyConfig
*
****************************************************************************/
/****************************************************************************
*
* Definitions copied from the DDK
*
****************************************************************************/
#ifndef JOY_HW_NONE
/* pre-defined joystick types */
#define JOY_HW_NONE 0
#define JOY_HW_CUSTOM 1
#define JOY_HW_2A_2B_GENERIC 2
#define JOY_HW_2A_4B_GENERIC 3
#define JOY_HW_2B_GAMEPAD 4
#define JOY_HW_2B_FLIGHTYOKE 5
#define JOY_HW_2B_FLIGHTYOKETHROTTLE 6
#define JOY_HW_3A_2B_GENERIC 7
#define JOY_HW_3A_4B_GENERIC 8
#define JOY_HW_4B_GAMEPAD 9
#define JOY_HW_4B_FLIGHTYOKE 10
#define JOY_HW_4B_FLIGHTYOKETHROTTLE 11
#define JOY_HW_TWO_2A_2B_WITH_Y 12
#define JOY_HW_LASTENTRY 13
/* calibration flags */
#define JOY_ISCAL_XY 0x00000001l /* XY are calibrated */
#define JOY_ISCAL_Z 0x00000002l /* Z is calibrated */
#define JOY_ISCAL_R 0x00000004l /* R is calibrated */
#define JOY_ISCAL_U 0x00000008l /* U is calibrated */
#define JOY_ISCAL_V 0x00000010l /* V is calibrated */
#define JOY_ISCAL_POV 0x00000020l /* POV is calibrated */
/* point of view constants */
#define JOY_POV_NUMDIRS 4
#define JOY_POVVAL_FORWARD 0
#define JOY_POVVAL_BACKWARD 1
#define JOY_POVVAL_LEFT 2
#define JOY_POVVAL_RIGHT 3
/* Specific settings for joystick hardware */
#define JOY_HWS_HASZ 0x00000001l /* has Z info? */
#define JOY_HWS_HASPOV 0x00000002l /* point of view hat present */
#define JOY_HWS_POVISBUTTONCOMBOS 0x00000004l /* pov done through combo of buttons */
#define JOY_HWS_POVISPOLL 0x00000008l /* pov done through polling */
#define JOY_HWS_ISYOKE 0x00000010l /* joystick is a flight yoke */
#define JOY_HWS_ISGAMEPAD 0x00000020l /* joystick is a game pad */
#define JOY_HWS_ISCARCTRL 0x00000040l /* joystick is a car controller */
/* X defaults to J1 X axis */
#define JOY_HWS_XISJ1Y 0x00000080l /* X is on J1 Y axis */
#define JOY_HWS_XISJ2X 0x00000100l /* X is on J2 X axis */
#define JOY_HWS_XISJ2Y 0x00000200l /* X is on J2 Y axis */
/* Y defaults to J1 Y axis */
#define JOY_HWS_YISJ1X 0x00000400l /* Y is on J1 X axis */
#define JOY_HWS_YISJ2X 0x00000800l /* Y is on J2 X axis */
#define JOY_HWS_YISJ2Y 0x00001000l /* Y is on J2 Y axis */
/* Z defaults to J2 Y axis */
#define JOY_HWS_ZISJ1X 0x00002000l /* Z is on J1 X axis */
#define JOY_HWS_ZISJ1Y 0x00004000l /* Z is on J1 Y axis */
#define JOY_HWS_ZISJ2X 0x00008000l /* Z is on J2 X axis */
/* POV defaults to J2 Y axis, if it is not button based */
#define JOY_HWS_POVISJ1X 0x00010000l /* pov done through J1 X axis */
#define JOY_HWS_POVISJ1Y 0x00020000l /* pov done through J1 Y axis */
#define JOY_HWS_POVISJ2X 0x00040000l /* pov done through J2 X axis */
/* R defaults to J2 X axis */
#define JOY_HWS_HASR 0x00080000l /* has R (4th axis) info */
#define JOY_HWS_RISJ1X 0x00100000l /* R done through J1 X axis */
#define JOY_HWS_RISJ1Y 0x00200000l /* R done through J1 Y axis */
#define JOY_HWS_RISJ2Y 0x00400000l /* R done through J2 X axis */
/* U & V for future hardware */
#define JOY_HWS_HASU 0x00800000l /* has U (5th axis) info */
#define JOY_HWS_HASV 0x01000000l /* has V (6th axis) info */
/* Usage settings */
#define JOY_US_HASRUDDER 0x00000001l /* joystick configured with rudder */
#define JOY_US_PRESENT 0x00000002l /* is joystick actually present? */
#define JOY_US_ISOEM 0x00000004l /* joystick is an OEM defined type */
/* reserved for future use -> as link to next possible dword */
#define JOY_US_RESERVED 0x80000000l /* reserved */
/* Settings for TypeInfo Flags1 */
#define JOYTYPE_ZEROGAMEENUMOEMDATA 0x00000001l /* Zero GameEnum's OEM data field */
#define JOYTYPE_NOAUTODETECTGAMEPORT 0x00000002l /* Device does not support Autodetect gameport*/
#define JOYTYPE_NOHIDDIRECT 0x00000004l /* Do not use HID directly for this device */
#define JOYTYPE_DEFAULTPROPSHEET 0x80000000l /* CPL overrides custom property sheet */
/* Settings for TypeInfo Flags2 */
#define JOYTYPE_DEVICEHIDE 0x00010000l /* Hide unclassified devices */
#define JOYTYPE_MOUSEHIDE 0x00020000l /* Hide mice */
#define JOYTYPE_KEYBHIDE 0x00040000l /* Hide keyboards */
#define JOYTYPE_GAMEHIDE 0x00080000l /* Hide game controllers */
#define JOYTYPE_HIDEACTIVE 0x00100000l /* Hide flags are active */
#define JOYTYPE_INFOMASK 0x00E00000l /* Mask for type specific info */
#define JOYTYPE_INFODEFAULT 0x00000000l /* Use default axis mappings */
#define JOYTYPE_INFOYYPEDALS 0x00200000l /* Use Y as a combined pedals axis */
#define JOYTYPE_INFOZYPEDALS 0x00400000l /* Use Z for accelerate, Y for brake */
#define JOYTYPE_INFOYRPEDALS 0x00600000l /* Use Y for accelerate, R for brake */
#define JOYTYPE_INFOZRPEDALS 0x00800000l /* Use Z for accelerate, R for brake */
#define JOYTYPE_INFOZISSLIDER 0x00200000l /* Use Z as a slider */
#define JOYTYPE_INFOZISZ 0x00400000l /* Use Z as Z axis */
/* struct for storing x,y, z, and rudder values */
typedef struct joypos_tag {
DWORD dwX;
DWORD dwY;
DWORD dwZ;
DWORD dwR;
DWORD dwU;
DWORD dwV;
} JOYPOS, FAR *LPJOYPOS;
/* struct for storing ranges */
typedef struct joyrange_tag {
JOYPOS jpMin;
JOYPOS jpMax;
JOYPOS jpCenter;
} JOYRANGE,FAR *LPJOYRANGE;
/*
* dwTimeout - value at which to timeout joystick polling
* jrvRanges - range of values app wants returned for axes
* jpDeadZone - area around center to be considered
* as "dead". specified as a percentage
* (0-100). Only X & Y handled by system driver
*/
typedef struct joyreguservalues_tag {
DWORD dwTimeOut;
JOYRANGE jrvRanges;
JOYPOS jpDeadZone;
} JOYREGUSERVALUES, FAR *LPJOYREGUSERVALUES;
typedef struct joyreghwsettings_tag {
DWORD dwFlags;
DWORD dwNumButtons;
} JOYREGHWSETTINGS, FAR *LPJOYHWSETTINGS;
/* range of values returned by the hardware (filled in by calibration) */
/*
* jrvHardware - values returned by hardware
* dwPOVValues - POV values returned by hardware
* dwCalFlags - what has been calibrated
*/
typedef struct joyreghwvalues_tag {
JOYRANGE jrvHardware;
DWORD dwPOVValues[JOY_POV_NUMDIRS];
DWORD dwCalFlags;
} JOYREGHWVALUES, FAR *LPJOYREGHWVALUES;
/* hardware configuration */
/*
* hws - hardware settings
* dwUsageSettings - usage settings
* hwv - values returned by hardware
* dwType - type of joystick
* dwReserved - reserved for OEM drivers
*/
typedef struct joyreghwconfig_tag {
JOYREGHWSETTINGS hws;
DWORD dwUsageSettings;
JOYREGHWVALUES hwv;
DWORD dwType;
DWORD dwReserved;
} JOYREGHWCONFIG, FAR *LPJOYREGHWCONFIG;
/* joystick calibration info structure */
typedef struct joycalibrate_tag {
UINT wXbase;
UINT wXdelta;
UINT wYbase;
UINT wYdelta;
UINT wZbase;
UINT wZdelta;
} JOYCALIBRATE;
typedef JOYCALIBRATE FAR *LPJOYCALIBRATE;
#endif
#ifndef DIJ_RINGZERO
#define MAX_JOYSTRING 256
typedef BOOL (FAR PASCAL * LPDIJOYTYPECALLBACK)(LPCWSTR, LPVOID);
#ifndef MAX_JOYSTICKOEMVXDNAME
#define MAX_JOYSTICKOEMVXDNAME 260
#endif
#define DITC_REGHWSETTINGS 0x00000001
#define DITC_CLSIDCONFIG 0x00000002
#define DITC_DISPLAYNAME 0x00000004
#define DITC_CALLOUT 0x00000008
#define DITC_HARDWAREID 0x00000010
#define DITC_FLAGS1 0x00000020
#define DITC_FLAGS2 0x00000040
#define DITC_MAPFILE 0x00000080
/* This structure is defined for DirectX 5.0 compatibility */
typedef struct DIJOYTYPEINFO_DX5 {
DWORD dwSize;
JOYREGHWSETTINGS hws;
CLSID clsidConfig;
WCHAR wszDisplayName[MAX_JOYSTRING];
WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME];
} DIJOYTYPEINFO_DX5, *LPDIJOYTYPEINFO_DX5;
typedef const DIJOYTYPEINFO_DX5 *LPCDIJOYTYPEINFO_DX5;
/* This structure is defined for DirectX 6.1 compatibility */
typedef struct DIJOYTYPEINFO_DX6 {
DWORD dwSize;
JOYREGHWSETTINGS hws;
CLSID clsidConfig;
WCHAR wszDisplayName[MAX_JOYSTRING];
WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME];
WCHAR wszHardwareId[MAX_JOYSTRING];
DWORD dwFlags1;
} DIJOYTYPEINFO_DX6, *LPDIJOYTYPEINFO_DX6;
typedef const DIJOYTYPEINFO_DX6 *LPCDIJOYTYPEINFO_DX6;
typedef struct DIJOYTYPEINFO {
DWORD dwSize;
JOYREGHWSETTINGS hws;
CLSID clsidConfig;
WCHAR wszDisplayName[MAX_JOYSTRING];
WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME];
#if(DIRECTINPUT_VERSION >= 0x05b2)
WCHAR wszHardwareId[MAX_JOYSTRING];
DWORD dwFlags1;
#if(DIRECTINPUT_VERSION >= 0x0800)
DWORD dwFlags2;
WCHAR wszMapFile[MAX_JOYSTRING];
#endif /* DIRECTINPUT_VERSION >= 0x0800 */
#endif /* DIRECTINPUT_VERSION >= 0x05b2 */
} DIJOYTYPEINFO, *LPDIJOYTYPEINFO;
typedef const DIJOYTYPEINFO *LPCDIJOYTYPEINFO;
#define DIJC_GUIDINSTANCE 0x00000001
#define DIJC_REGHWCONFIGTYPE 0x00000002
#define DIJC_GAIN 0x00000004
#define DIJC_CALLOUT 0x00000008
#define DIJC_WDMGAMEPORT 0x00000010
/* This structure is defined for DirectX 5.0 compatibility */
typedef struct DIJOYCONFIG_DX5 {
DWORD dwSize;
GUID guidInstance;
JOYREGHWCONFIG hwc;
DWORD dwGain;
WCHAR wszType[MAX_JOYSTRING];
WCHAR wszCallout[MAX_JOYSTRING];
} DIJOYCONFIG_DX5, *LPDIJOYCONFIG_DX5;
typedef const DIJOYCONFIG_DX5 *LPCDIJOYCONFIG_DX5;
typedef struct DIJOYCONFIG {
DWORD dwSize;
GUID guidInstance;
JOYREGHWCONFIG hwc;
DWORD dwGain;
WCHAR wszType[MAX_JOYSTRING];
WCHAR wszCallout[MAX_JOYSTRING];
#if(DIRECTINPUT_VERSION >= 0x05b2)
GUID guidGameport;
#endif /* DIRECTINPUT_VERSION >= 0x05b2 */
} DIJOYCONFIG, *LPDIJOYCONFIG;
typedef const DIJOYCONFIG *LPCDIJOYCONFIG;
#define DIJU_USERVALUES 0x00000001
#define DIJU_GLOBALDRIVER 0x00000002
#define DIJU_GAMEPORTEMULATOR 0x00000004
typedef struct DIJOYUSERVALUES {
DWORD dwSize;
JOYREGUSERVALUES ruv;
WCHAR wszGlobalDriver[MAX_JOYSTRING];
WCHAR wszGameportEmulator[MAX_JOYSTRING];
} DIJOYUSERVALUES, *LPDIJOYUSERVALUES;
typedef const DIJOYUSERVALUES *LPCDIJOYUSERVALUES;
DEFINE_GUID(GUID_KeyboardClass, 0x4D36E96B,0xE325,0x11CE,0xBF,0xC1,0x08,0x00,0x2B,0xE1,0x03,0x18);
DEFINE_GUID(GUID_MediaClass, 0x4D36E96C,0xE325,0x11CE,0xBF,0xC1,0x08,0x00,0x2B,0xE1,0x03,0x18);
DEFINE_GUID(GUID_MouseClass, 0x4D36E96F,0xE325,0x11CE,0xBF,0xC1,0x08,0x00,0x2B,0xE1,0x03,0x18);
DEFINE_GUID(GUID_HIDClass, 0x745A17A0,0x74D3,0x11D0,0xB6,0xFE,0x00,0xA0,0xC9,0x0F,0x57,0xDA);
#undef INTERFACE
#define INTERFACE IDirectInputJoyConfig
DECLARE_INTERFACE_(IDirectInputJoyConfig, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectInputJoyConfig methods ***/
STDMETHOD(Acquire)(THIS) PURE;
STDMETHOD(Unacquire)(THIS) PURE;
STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(SendNotify)(THIS) PURE;
STDMETHOD(EnumTypes)(THIS_ LPDIJOYTYPECALLBACK,LPVOID) PURE;
STDMETHOD(GetTypeInfo)(THIS_ LPCWSTR,LPDIJOYTYPEINFO,DWORD) PURE;
STDMETHOD(SetTypeInfo)(THIS_ LPCWSTR,LPCDIJOYTYPEINFO,DWORD) PURE;
STDMETHOD(DeleteType)(THIS_ LPCWSTR) PURE;
STDMETHOD(GetConfig)(THIS_ UINT,LPDIJOYCONFIG,DWORD) PURE;
STDMETHOD(SetConfig)(THIS_ UINT,LPCDIJOYCONFIG,DWORD) PURE;
STDMETHOD(DeleteConfig)(THIS_ UINT) PURE;
STDMETHOD(GetUserValues)(THIS_ LPDIJOYUSERVALUES,DWORD) PURE;
STDMETHOD(SetUserValues)(THIS_ LPCDIJOYUSERVALUES,DWORD) PURE;
STDMETHOD(AddNewHardware)(THIS_ HWND,REFGUID) PURE;
STDMETHOD(OpenTypeKey)(THIS_ LPCWSTR,DWORD,PHKEY) PURE;
STDMETHOD(OpenConfigKey)(THIS_ UINT,DWORD,PHKEY) PURE;
};
typedef struct IDirectInputJoyConfig *LPDIRECTINPUTJOYCONFIG;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectInputJoyConfig_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectInputJoyConfig_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectInputJoyConfig_Release(p) (p)->lpVtbl->Release(p)
#define IDirectInputJoyConfig_Acquire(p) (p)->lpVtbl->Acquire(p)
#define IDirectInputJoyConfig_Unacquire(p) (p)->lpVtbl->Unacquire(p)
#define IDirectInputJoyConfig_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
#define IDirectInputJoyConfig_SendNotify(p) (p)->lpVtbl->SendNotify(p)
#define IDirectInputJoyConfig_EnumTypes(p,a,b) (p)->lpVtbl->EnumTypes(p,a,b)
#define IDirectInputJoyConfig_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
#define IDirectInputJoyConfig_SetTypeInfo(p,a,b,c) (p)->lpVtbl->SetTypeInfo(p,a,b,c)
#define IDirectInputJoyConfig_DeleteType(p,a) (p)->lpVtbl->DeleteType(p,a)
#define IDirectInputJoyConfig_GetConfig(p,a,b,c) (p)->lpVtbl->GetConfig(p,a,b,c)
#define IDirectInputJoyConfig_SetConfig(p,a,b,c) (p)->lpVtbl->SetConfig(p,a,b,c)
#define IDirectInputJoyConfig_DeleteConfig(p,a) (p)->lpVtbl->DeleteConfig(p,a)
#define IDirectInputJoyConfig_GetUserValues(p,a,b) (p)->lpVtbl->GetUserValues(p,a,b)
#define IDirectInputJoyConfig_SetUserValues(p,a,b) (p)->lpVtbl->SetUserValues(p,a,b)
#define IDirectInputJoyConfig_AddNewHardware(p,a,b) (p)->lpVtbl->AddNewHardware(p,a,b)
#define IDirectInputJoyConfig_OpenTypeKey(p,a,b,c) (p)->lpVtbl->OpenTypeKey(p,a,b,c)
#define IDirectInputJoyConfig_OpenConfigKey(p,a,b,c) (p)->lpVtbl->OpenConfigKey(p,a,b,c)
#else
#define IDirectInputJoyConfig_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectInputJoyConfig_AddRef(p) (p)->AddRef()
#define IDirectInputJoyConfig_Release(p) (p)->Release()
#define IDirectInputJoyConfig_Acquire(p) (p)->Acquire()
#define IDirectInputJoyConfig_Unacquire(p) (p)->Unacquire()
#define IDirectInputJoyConfig_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
#define IDirectInputJoyConfig_SendNotify(p) (p)->SendNotify()
#define IDirectInputJoyConfig_EnumTypes(p,a,b) (p)->EnumTypes(a,b)
#define IDirectInputJoyConfig_GetTypeInfo(p,a,b,c) (p)->GetTypeInfo(a,b,c)
#define IDirectInputJoyConfig_SetTypeInfo(p,a,b,c) (p)->SetTypeInfo(a,b,c)
#define IDirectInputJoyConfig_DeleteType(p,a) (p)->DeleteType(a)
#define IDirectInputJoyConfig_GetConfig(p,a,b,c) (p)->GetConfig(a,b,c)
#define IDirectInputJoyConfig_SetConfig(p,a,b,c) (p)->SetConfig(a,b,c)
#define IDirectInputJoyConfig_DeleteConfig(p,a) (p)->DeleteConfig(a)
#define IDirectInputJoyConfig_GetUserValues(p,a,b) (p)->GetUserValues(a,b)
#define IDirectInputJoyConfig_SetUserValues(p,a,b) (p)->SetUserValues(a,b)
#define IDirectInputJoyConfig_AddNewHardware(p,a,b) (p)->AddNewHardware(a,b)
#define IDirectInputJoyConfig_OpenTypeKey(p,a,b,c) (p)->OpenTypeKey(a,b,c)
#define IDirectInputJoyConfig_OpenConfigKey(p,a,b,c) (p)->OpenConfigKey(a,b,c)
#endif
#endif /* DIJ_RINGZERO */
#if(DIRECTINPUT_VERSION >= 0x0800)
#ifndef DIJ_RINGZERO
#undef INTERFACE
#define INTERFACE IDirectInputJoyConfig8
DECLARE_INTERFACE_(IDirectInputJoyConfig8, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectInputJoyConfig8 methods ***/
STDMETHOD(Acquire)(THIS) PURE;
STDMETHOD(Unacquire)(THIS) PURE;
STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(SendNotify)(THIS) PURE;
STDMETHOD(EnumTypes)(THIS_ LPDIJOYTYPECALLBACK,LPVOID) PURE;
STDMETHOD(GetTypeInfo)(THIS_ LPCWSTR,LPDIJOYTYPEINFO,DWORD) PURE;
STDMETHOD(SetTypeInfo)(THIS_ LPCWSTR,LPCDIJOYTYPEINFO,DWORD,LPWSTR) PURE;
STDMETHOD(DeleteType)(THIS_ LPCWSTR) PURE;
STDMETHOD(GetConfig)(THIS_ UINT,LPDIJOYCONFIG,DWORD) PURE;
STDMETHOD(SetConfig)(THIS_ UINT,LPCDIJOYCONFIG,DWORD) PURE;
STDMETHOD(DeleteConfig)(THIS_ UINT) PURE;
STDMETHOD(GetUserValues)(THIS_ LPDIJOYUSERVALUES,DWORD) PURE;
STDMETHOD(SetUserValues)(THIS_ LPCDIJOYUSERVALUES,DWORD) PURE;
STDMETHOD(AddNewHardware)(THIS_ HWND,REFGUID) PURE;
STDMETHOD(OpenTypeKey)(THIS_ LPCWSTR,DWORD,PHKEY) PURE;
STDMETHOD(OpenAppStatusKey)(THIS_ PHKEY) PURE;
};
typedef struct IDirectInputJoyConfig8 *LPDIRECTINPUTJOYCONFIG8;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectInputJoyConfig8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectInputJoyConfig8_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectInputJoyConfig8_Release(p) (p)->lpVtbl->Release(p)
#define IDirectInputJoyConfig8_Acquire(p) (p)->lpVtbl->Acquire(p)
#define IDirectInputJoyConfig8_Unacquire(p) (p)->lpVtbl->Unacquire(p)
#define IDirectInputJoyConfig8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
#define IDirectInputJoyConfig8_SendNotify(p) (p)->lpVtbl->SendNotify(p)
#define IDirectInputJoyConfig8_EnumTypes(p,a,b) (p)->lpVtbl->EnumTypes(p,a,b)
#define IDirectInputJoyConfig8_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
#define IDirectInputJoyConfig8_SetTypeInfo(p,a,b,c,d) (p)->lpVtbl->SetTypeInfo(p,a,b,c,d)
#define IDirectInputJoyConfig8_DeleteType(p,a) (p)->lpVtbl->DeleteType(p,a)
#define IDirectInputJoyConfig8_GetConfig(p,a,b,c) (p)->lpVtbl->GetConfig(p,a,b,c)
#define IDirectInputJoyConfig8_SetConfig(p,a,b,c) (p)->lpVtbl->SetConfig(p,a,b,c)
#define IDirectInputJoyConfig8_DeleteConfig(p,a) (p)->lpVtbl->DeleteConfig(p,a)
#define IDirectInputJoyConfig8_GetUserValues(p,a,b) (p)->lpVtbl->GetUserValues(p,a,b)
#define IDirectInputJoyConfig8_SetUserValues(p,a,b) (p)->lpVtbl->SetUserValues(p,a,b)
#define IDirectInputJoyConfig8_AddNewHardware(p,a,b) (p)->lpVtbl->AddNewHardware(p,a,b)
#define IDirectInputJoyConfig8_OpenTypeKey(p,a,b,c) (p)->lpVtbl->OpenTypeKey(p,a,b,c)
#define IDirectInputJoyConfig8_OpenAppStatusKey(p,a) (p)->lpVtbl->OpenAppStatusKey(p,a)
#else
#define IDirectInputJoyConfig8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectInputJoyConfig8_AddRef(p) (p)->AddRef()
#define IDirectInputJoyConfig8_Release(p) (p)->Release()
#define IDirectInputJoyConfig8_Acquire(p) (p)->Acquire()
#define IDirectInputJoyConfig8_Unacquire(p) (p)->Unacquire()
#define IDirectInputJoyConfig8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
#define IDirectInputJoyConfig8_SendNotify(p) (p)->SendNotify()
#define IDirectInputJoyConfig8_EnumTypes(p,a,b) (p)->EnumTypes(a,b)
#define IDirectInputJoyConfig8_GetTypeInfo(p,a,b,c) (p)->GetTypeInfo(a,b,c)
#define IDirectInputJoyConfig8_SetTypeInfo(p,a,b,c,d) (p)->SetTypeInfo(a,b,c,d)
#define IDirectInputJoyConfig8_DeleteType(p,a) (p)->DeleteType(a)
#define IDirectInputJoyConfig8_GetConfig(p,a,b,c) (p)->GetConfig(a,b,c)
#define IDirectInputJoyConfig8_SetConfig(p,a,b,c) (p)->SetConfig(a,b,c)
#define IDirectInputJoyConfig8_DeleteConfig(p,a) (p)->DeleteConfig(a)
#define IDirectInputJoyConfig8_GetUserValues(p,a,b) (p)->GetUserValues(a,b)
#define IDirectInputJoyConfig8_SetUserValues(p,a,b) (p)->SetUserValues(a,b)
#define IDirectInputJoyConfig8_AddNewHardware(p,a,b) (p)->AddNewHardware(a,b)
#define IDirectInputJoyConfig8_OpenTypeKey(p,a,b,c) (p)->OpenTypeKey(a,b,c)
#define IDirectInputJoyConfig8_OpenAppStatusKey(p,a) (p)->OpenAppStatusKey(a)
#endif
#endif /* DIJ_RINGZERO */
/****************************************************************************
*
* Notification Messages
*
****************************************************************************/
/* RegisterWindowMessage with this to get DirectInput notification messages */
#define DIRECTINPUT_NOTIFICATION_MSGSTRINGA "DIRECTINPUT_NOTIFICATION_MSGSTRING"
#define DIRECTINPUT_NOTIFICATION_MSGSTRINGW L"DIRECTINPUT_NOTIFICATION_MSGSTRING"
#ifdef UNICODE
#define DIRECTINPUT_NOTIFICATION_MSGSTRING DIRECTINPUT_NOTIFICATION_MSGSTRINGW
#else
#define DIRECTINPUT_NOTIFICATION_MSGSTRING DIRECTINPUT_NOTIFICATION_MSGSTRINGA
#endif
#define DIMSGWP_NEWAPPSTART 0x00000001
#define DIMSGWP_DX8APPSTART 0x00000002
#define DIMSGWP_DX8MAPPERAPPSTART 0x00000003
#endif /* DIRECTINPUT_VERSION >= 0x0800 */
#define DIRECTINPUT_REGSTR_KEY_LASTAPPA "MostRecentApplication"
#define DIRECTINPUT_REGSTR_KEY_LASTMAPAPPA "MostRecentMapperApplication"
#define DIRECTINPUT_REGSTR_VAL_VERSIONA "Version"
#define DIRECTINPUT_REGSTR_VAL_NAMEA "Name"
#define DIRECTINPUT_REGSTR_VAL_IDA "Id"
#define DIRECTINPUT_REGSTR_VAL_MAPPERA "UsesMapper"
#define DIRECTINPUT_REGSTR_VAL_LASTSTARTA "MostRecentStart"
#define DIRECTINPUT_REGSTR_KEY_LASTAPPW L"MostRecentApplication"
#define DIRECTINPUT_REGSTR_KEY_LASTMAPAPPW L"MostRecentMapperApplication"
#define DIRECTINPUT_REGSTR_VAL_VERSIONW L"Version"
#define DIRECTINPUT_REGSTR_VAL_NAMEW L"Name"
#define DIRECTINPUT_REGSTR_VAL_IDW L"Id"
#define DIRECTINPUT_REGSTR_VAL_MAPPERW L"UsesMapper"
#define DIRECTINPUT_REGSTR_VAL_LASTSTARTW L"MostRecentStart"
#ifdef UNICODE
#define DIRECTINPUT_REGSTR_KEY_LASTAPP DIRECTINPUT_REGSTR_KEY_LASTAPPW
#define DIRECTINPUT_REGSTR_KEY_LASTMAPAPP DIRECTINPUT_REGSTR_KEY_LASTMAPAPPW
#define DIRECTINPUT_REGSTR_VAL_VERSION DIRECTINPUT_REGSTR_VAL_VERSIONW
#define DIRECTINPUT_REGSTR_VAL_NAME DIRECTINPUT_REGSTR_VAL_NAMEW
#define DIRECTINPUT_REGSTR_VAL_ID DIRECTINPUT_REGSTR_VAL_IDW
#define DIRECTINPUT_REGSTR_VAL_MAPPER DIRECTINPUT_REGSTR_VAL_MAPPERW
#define DIRECTINPUT_REGSTR_VAL_LASTSTART DIRECTINPUT_REGSTR_VAL_LASTSTARTW
#else
#define DIRECTINPUT_REGSTR_KEY_LASTAPP DIRECTINPUT_REGSTR_KEY_LASTAPPA
#define DIRECTINPUT_REGSTR_KEY_LASTMAPAPP DIRECTINPUT_REGSTR_KEY_LASTMAPAPPA
#define DIRECTINPUT_REGSTR_VAL_VERSION DIRECTINPUT_REGSTR_VAL_VERSIONA
#define DIRECTINPUT_REGSTR_VAL_NAME DIRECTINPUT_REGSTR_VAL_NAMEA
#define DIRECTINPUT_REGSTR_VAL_ID DIRECTINPUT_REGSTR_VAL_IDA
#define DIRECTINPUT_REGSTR_VAL_MAPPER DIRECTINPUT_REGSTR_VAL_MAPPERA
#define DIRECTINPUT_REGSTR_VAL_LASTSTART DIRECTINPUT_REGSTR_VAL_LASTSTARTA
#endif
/****************************************************************************
*
* Return Codes
*
****************************************************************************/
#define DIERR_NOMOREITEMS \
MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NO_MORE_ITEMS)
/*
* Device driver-specific codes.
*/
#define DIERR_DRIVERFIRST 0x80040300L
#define DIERR_DRIVERLAST 0x800403FFL
/*
* Unless the specific driver has been precisely identified, no meaning
* should be attributed to these values other than that the driver
* originated the error. However, to illustrate the types of error that
* may be causing the failure, the PID force feedback driver distributed
* with DirectX 7 could return the following errors:
*
* DIERR_DRIVERFIRST + 1
* The requested usage was not found.
* DIERR_DRIVERFIRST + 2
* The parameter block couldn't be downloaded to the device.
* DIERR_DRIVERFIRST + 3
* PID initialization failed.
* DIERR_DRIVERFIRST + 4
* The provided values couldn't be scaled.
*/
/*
* Device installer errors.
*/
/*
* Registry entry or DLL for class installer invalid
* or class installer not found.
*/
#define DIERR_INVALIDCLASSINSTALLER 0x80040400L
/*
* The user cancelled the install operation.
*/
#define DIERR_CANCELLED 0x80040401L
/*
* The INF file for the selected device could not be
* found or is invalid or is damaged.
*/
#define DIERR_BADINF 0x80040402L
/****************************************************************************
*
* Map files
*
****************************************************************************/
/*
* Delete particular data from default map file.
*/
#define DIDIFT_DELETE 0x01000000
#ifdef __cplusplus
};
#endif
#endif /* __DINPUTD_INCLUDED__ */

267
lib/directx8/dls1.h Executable file
View File

@ -0,0 +1,267 @@
/*==========================================================================;
//
// dls1.h
//
//
// Description:
//
// Interface defines and structures for the Instrument Collection Form
// RIFF DLS.
//
//
// Written by Sonic Foundry 1996. Released for public use.
//
//=========================================================================*/
#ifndef _INC_DLS1
#define _INC_DLS1
/*//////////////////////////////////////////////////////////////////////////
//
//
// Layout of an instrument collection:
//
//
// RIFF [] 'DLS ' [dlid,colh,INSTLIST,WAVEPOOL,INFOLIST]
//
// INSTLIST
// LIST [] 'lins'
// LIST [] 'ins ' [dlid,insh,RGNLIST,ARTLIST,INFOLIST]
// LIST [] 'ins ' [dlid,insh,RGNLIST,ARTLIST,INFOLIST]
// LIST [] 'ins ' [dlid,insh,RGNLIST,ARTLIST,INFOLIST]
//
// RGNLIST
// LIST [] 'lrgn'
// LIST [] 'rgn ' [rgnh,wsmp,wlnk,ARTLIST]
// LIST [] 'rgn ' [rgnh,wsmp,wlnk,ARTLIST]
// LIST [] 'rgn ' [rgnh,wsmp,wlnk,ARTLIST]
//
// ARTLIST
// LIST [] 'lart'
// 'art1' level 1 Articulation connection graph
// 'art2' level 2 Articulation connection graph
// '3rd1' Possible 3rd party articulation structure 1
// '3rd2' Possible 3rd party articulation structure 2 .... and so on
//
// WAVEPOOL
// ptbl [] [pool table]
// LIST [] 'wvpl'
// [path],
// [path],
// LIST [] 'wave' [dlid,RIFFWAVE]
// LIST [] 'wave' [dlid,RIFFWAVE]
// LIST [] 'wave' [dlid,RIFFWAVE]
// LIST [] 'wave' [dlid,RIFFWAVE]
// LIST [] 'wave' [dlid,RIFFWAVE]
//
// INFOLIST
// LIST [] 'INFO'
// 'icmt' 'One of those crazy comments.'
// 'icop' 'Copyright (C) 1996 Sonic Foundry'
//
/////////////////////////////////////////////////////////////////////////*/
/*/////////////////////////////////////////////////////////////////////////
// FOURCC's used in the DLS file
/////////////////////////////////////////////////////////////////////////*/
#define FOURCC_DLS mmioFOURCC('D','L','S',' ')
#define FOURCC_DLID mmioFOURCC('d','l','i','d')
#define FOURCC_COLH mmioFOURCC('c','o','l','h')
#define FOURCC_WVPL mmioFOURCC('w','v','p','l')
#define FOURCC_PTBL mmioFOURCC('p','t','b','l')
#define FOURCC_PATH mmioFOURCC('p','a','t','h')
#define FOURCC_wave mmioFOURCC('w','a','v','e')
#define FOURCC_LINS mmioFOURCC('l','i','n','s')
#define FOURCC_INS mmioFOURCC('i','n','s',' ')
#define FOURCC_INSH mmioFOURCC('i','n','s','h')
#define FOURCC_LRGN mmioFOURCC('l','r','g','n')
#define FOURCC_RGN mmioFOURCC('r','g','n',' ')
#define FOURCC_RGNH mmioFOURCC('r','g','n','h')
#define FOURCC_LART mmioFOURCC('l','a','r','t')
#define FOURCC_ART1 mmioFOURCC('a','r','t','1')
#define FOURCC_WLNK mmioFOURCC('w','l','n','k')
#define FOURCC_WSMP mmioFOURCC('w','s','m','p')
#define FOURCC_VERS mmioFOURCC('v','e','r','s')
/*/////////////////////////////////////////////////////////////////////////
// Articulation connection graph definitions
/////////////////////////////////////////////////////////////////////////*/
/* Generic Sources */
#define CONN_SRC_NONE 0x0000
#define CONN_SRC_LFO 0x0001
#define CONN_SRC_KEYONVELOCITY 0x0002
#define CONN_SRC_KEYNUMBER 0x0003
#define CONN_SRC_EG1 0x0004
#define CONN_SRC_EG2 0x0005
#define CONN_SRC_PITCHWHEEL 0x0006
/* Midi Controllers 0-127 */
#define CONN_SRC_CC1 0x0081
#define CONN_SRC_CC7 0x0087
#define CONN_SRC_CC10 0x008a
#define CONN_SRC_CC11 0x008b
/* Generic Destinations */
#define CONN_DST_NONE 0x0000
#define CONN_DST_ATTENUATION 0x0001
#define CONN_DST_PITCH 0x0003
#define CONN_DST_PAN 0x0004
/* LFO Destinations */
#define CONN_DST_LFO_FREQUENCY 0x0104
#define CONN_DST_LFO_STARTDELAY 0x0105
/* EG1 Destinations */
#define CONN_DST_EG1_ATTACKTIME 0x0206
#define CONN_DST_EG1_DECAYTIME 0x0207
#define CONN_DST_EG1_RELEASETIME 0x0209
#define CONN_DST_EG1_SUSTAINLEVEL 0x020a
/* EG2 Destinations */
#define CONN_DST_EG2_ATTACKTIME 0x030a
#define CONN_DST_EG2_DECAYTIME 0x030b
#define CONN_DST_EG2_RELEASETIME 0x030d
#define CONN_DST_EG2_SUSTAINLEVEL 0x030e
#define CONN_TRN_NONE 0x0000
#define CONN_TRN_CONCAVE 0x0001
typedef struct _DLSID {
ULONG ulData1;
USHORT usData2;
USHORT usData3;
BYTE abData4[8];
} DLSID, FAR *LPDLSID;
typedef struct _DLSVERSION {
DWORD dwVersionMS;
DWORD dwVersionLS;
}DLSVERSION, FAR *LPDLSVERSION;
typedef struct _CONNECTION {
USHORT usSource;
USHORT usControl;
USHORT usDestination;
USHORT usTransform;
LONG lScale;
}CONNECTION, FAR *LPCONNECTION;
/* Level 1 Articulation Data */
typedef struct _CONNECTIONLIST {
ULONG cbSize; /* size of the connection list structure */
ULONG cConnections; /* count of connections in the list */
} CONNECTIONLIST, FAR *LPCONNECTIONLIST;
/*/////////////////////////////////////////////////////////////////////////
// Generic type defines for regions and instruments
/////////////////////////////////////////////////////////////////////////*/
typedef struct _RGNRANGE {
USHORT usLow;
USHORT usHigh;
}RGNRANGE, FAR * LPRGNRANGE;
#define F_INSTRUMENT_DRUMS 0x80000000
typedef struct _MIDILOCALE {
ULONG ulBank;
ULONG ulInstrument;
}MIDILOCALE, FAR *LPMIDILOCALE;
/*/////////////////////////////////////////////////////////////////////////
// Header structures found in an DLS file for collection, instruments, and
// regions.
/////////////////////////////////////////////////////////////////////////*/
#define F_RGN_OPTION_SELFNONEXCLUSIVE 0x0001
typedef struct _RGNHEADER {
RGNRANGE RangeKey; /* Key range */
RGNRANGE RangeVelocity; /* Velocity Range */
USHORT fusOptions; /* Synthesis options for this range */
USHORT usKeyGroup; /* Key grouping for non simultaneous play */
/* 0 = no group, 1 up is group */
/* for Level 1 only groups 1-15 are allowed */
}RGNHEADER, FAR *LPRGNHEADER;
typedef struct _INSTHEADER {
ULONG cRegions; /* Count of regions in this instrument */
MIDILOCALE Locale; /* Intended MIDI locale of this instrument */
}INSTHEADER, FAR *LPINSTHEADER;
typedef struct _DLSHEADER {
ULONG cInstruments; /* Count of instruments in the collection */
}DLSHEADER, FAR *LPDLSHEADER;
/*////////////////////////////////////////////////////////////////////////////
// definitions for the Wave link structure
////////////////////////////////////////////////////////////////////////////*/
/* **** For level 1 only WAVELINK_CHANNEL_MONO is valid **** */
/* ulChannel allows for up to 32 channels of audio with each bit position */
/* specifiying a channel of playback */
#define WAVELINK_CHANNEL_LEFT 0x0001l
#define WAVELINK_CHANNEL_RIGHT 0x0002l
#define F_WAVELINK_PHASE_MASTER 0x0001
typedef struct _WAVELINK { /* any paths or links are stored right after struct */
USHORT fusOptions; /* options flags for this wave */
USHORT usPhaseGroup; /* Phase grouping for locking channels */
ULONG ulChannel; /* channel placement */
ULONG ulTableIndex; /* index into the wave pool table, 0 based */
}WAVELINK, FAR *LPWAVELINK;
#define POOL_CUE_NULL 0xffffffffl
typedef struct _POOLCUE {
ULONG ulOffset; /* Offset to the entry in the list */
}POOLCUE, FAR *LPPOOLCUE;
typedef struct _POOLTABLE {
ULONG cbSize; /* size of the pool table structure */
ULONG cCues; /* count of cues in the list */
} POOLTABLE, FAR *LPPOOLTABLE;
/*////////////////////////////////////////////////////////////////////////////
// Structures for the "wsmp" chunk
////////////////////////////////////////////////////////////////////////////*/
#define F_WSMP_NO_TRUNCATION 0x0001l
#define F_WSMP_NO_COMPRESSION 0x0002l
typedef struct _rwsmp {
ULONG cbSize;
USHORT usUnityNote; /* MIDI Unity Playback Note */
SHORT sFineTune; /* Fine Tune in log tuning */
LONG lAttenuation; /* Overall Attenuation to be applied to data */
ULONG fulOptions; /* Flag options */
ULONG cSampleLoops; /* Count of Sample loops, 0 loops is one shot */
} WSMPL, FAR *LPWSMPL;
/* This loop type is a normal forward playing loop which is continually */
/* played until the envelope reaches an off threshold in the release */
/* portion of the volume envelope */
#define WLOOP_TYPE_FORWARD 0
typedef struct _rloop {
ULONG cbSize;
ULONG ulType; /* Loop Type */
ULONG ulStart; /* Start of loop in samples */
ULONG ulLength; /* Length of loop in samples */
} WLOOP, FAR *LPWLOOP;
#endif /*_INC_DLS1 */

130
lib/directx8/dls2.h Executable file
View File

@ -0,0 +1,130 @@
/*
dls2.h
Description:
Interface defines and structures for the DLS2 extensions of DLS.
Written by Microsoft 1998. Released for public use.
*/
#ifndef _INC_DLS2
#define _INC_DLS2
/*
FOURCC's used in the DLS2 file, in addition to DLS1 chunks
*/
#define FOURCC_RGN2 mmioFOURCC('r','g','n','2')
#define FOURCC_LAR2 mmioFOURCC('l','a','r','2')
#define FOURCC_ART2 mmioFOURCC('a','r','t','2')
#define FOURCC_CDL mmioFOURCC('c','d','l',' ')
#define FOURCC_DLID mmioFOURCC('d','l','i','d')
/*
Articulation connection graph definitions. These are in addition to
the definitions in the DLS1 header.
*/
/* Generic Sources (in addition to DLS1 sources. */
#define CONN_SRC_POLYPRESSURE 0x0007 /* Polyphonic Pressure */
#define CONN_SRC_CHANNELPRESSURE 0x0008 /* Channel Pressure */
#define CONN_SRC_VIBRATO 0x0009 /* Vibrato LFO */
#define CONN_SRC_MONOPRESSURE 0x000a /* MIDI Mono pressure */
/* Midi Controllers */
#define CONN_SRC_CC91 0x00db /* Reverb Send */
#define CONN_SRC_CC93 0x00dd /* Chorus Send */
/* Generic Destinations */
#define CONN_DST_GAIN 0x0001 /* Same as CONN_DST_ ATTENUATION, but more appropriate terminology. */
#define CONN_DST_KEYNUMBER 0x0005 /* Key Number Generator */
/* Audio Channel Output Destinations */
#define CONN_DST_LEFT 0x0010 /* Left Channel Send */
#define CONN_DST_RIGHT 0x0011 /* Right Channel Send */
#define CONN_DST_CENTER 0x0012 /* Center Channel Send */
#define CONN_DST_LEFTREAR 0x0013 /* Left Rear Channel Send */
#define CONN_DST_RIGHTREAR 0x0014 /* Right Rear Channel Send */
#define CONN_DST_LFE_CHANNEL 0x0015 /* LFE Channel Send */
#define CONN_DST_CHORUS 0x0080 /* Chorus Send */
#define CONN_DST_REVERB 0x0081 /* Reverb Send */
/* Vibrato LFO Destinations */
#define CONN_DST_VIB_FREQUENCY 0x0114 /* Vibrato Frequency */
#define CONN_DST_VIB_STARTDELAY 0x0115 /* Vibrato Start Delay */
/* EG1 Destinations */
#define CONN_DST_EG1_DELAYTIME 0x020B /* EG1 Delay Time */
#define CONN_DST_EG1_HOLDTIME 0x020C /* EG1 Hold Time */
#define CONN_DST_EG1_SHUTDOWNTIME 0x020D /* EG1 Shutdown Time */
/* EG2 Destinations */
#define CONN_DST_EG2_DELAYTIME 0x030F /* EG2 Delay Time */
#define CONN_DST_EG2_HOLDTIME 0x0310 /* EG2 Hold Time */
/* Filter Destinations */
#define CONN_DST_FILTER_CUTOFF 0x0500 /* Filter Cutoff Frequency */
#define CONN_DST_FILTER_Q 0x0501 /* Filter Resonance */
/* Transforms */
#define CONN_TRN_CONVEX 0x0002 /* Convex Transform */
#define CONN_TRN_SWITCH 0x0003 /* Switch Transform */
/* Conditional chunk operators */
#define DLS_CDL_AND 0x0001 /* X = X & Y */
#define DLS_CDL_OR 0x0002 /* X = X | Y */
#define DLS_CDL_XOR 0x0003 /* X = X ^ Y */
#define DLS_CDL_ADD 0x0004 /* X = X + Y */
#define DLS_CDL_SUBTRACT 0x0005 /* X = X - Y */
#define DLS_CDL_MULTIPLY 0x0006 /* X = X * Y */
#define DLS_CDL_DIVIDE 0x0007 /* X = X / Y */
#define DLS_CDL_LOGICAL_AND 0x0008 /* X = X && Y */
#define DLS_CDL_LOGICAL_OR 0x0009 /* X = X || Y */
#define DLS_CDL_LT 0x000A /* X = (X < Y) */
#define DLS_CDL_LE 0x000B /* X = (X <= Y) */
#define DLS_CDL_GT 0x000C /* X = (X > Y) */
#define DLS_CDL_GE 0x000D /* X = (X >= Y) */
#define DLS_CDL_EQ 0x000E /* X = (X == Y) */
#define DLS_CDL_NOT 0x000F /* X = !X */
#define DLS_CDL_CONST 0x0010 /* 32-bit constant */
#define DLS_CDL_QUERY 0x0011 /* 32-bit value returned from query */
#define DLS_CDL_QUERYSUPPORTED 0x0012 /* Test to see if query is supported by synth */
/*
Loop and release
*/
#define WLOOP_TYPE_RELEASE 1
/*
WaveLink chunk <wlnk-ck>
*/
#define F_WAVELINK_MULTICHANNEL 0x0002
/*
DLSID queries for <cdl-ck>
*/
DEFINE_GUID(DLSID_GMInHardware, 0x178f2f24, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
DEFINE_GUID(DLSID_GSInHardware, 0x178f2f25, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
DEFINE_GUID(DLSID_XGInHardware, 0x178f2f26, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
DEFINE_GUID(DLSID_SupportsDLS1, 0x178f2f27, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
DEFINE_GUID(DLSID_SupportsDLS2, 0xf14599e5, 0x4689, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
DEFINE_GUID(DLSID_SampleMemorySize, 0x178f2f28, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
DEFINE_GUID(DLSID_ManufacturersID, 0xb03e1181, 0x8095, 0x11d2, 0xa1, 0xef, 0x0, 0x60, 0x8, 0x33, 0xdb, 0xd8);
DEFINE_GUID(DLSID_ProductID, 0xb03e1182, 0x8095, 0x11d2, 0xa1, 0xef, 0x0, 0x60, 0x8, 0x33, 0xdb, 0xd8);
DEFINE_GUID(DLSID_SamplePlaybackRate, 0x2a91f713, 0xa4bf, 0x11d2, 0xbb, 0xdf, 0x0, 0x60, 0x8, 0x33, 0xdb, 0xd8);
#endif /* _INC_DLS2 */

199
lib/directx8/dmdls.h Executable file
View File

@ -0,0 +1,199 @@
/************************************************************************
* *
* dmdls.h -- DLS download definitions for DirectMusic API's *
* *
* Copyright (c) 1998-1999 Microsoft Corporation *
* *
************************************************************************/
#ifndef _DMDLS_
#define _DMDLS_
#include "dls1.h"
typedef long PCENT; /* Pitch cents */
typedef long GCENT; /* Gain cents */
typedef long TCENT; /* Time cents */
typedef long PERCENT; /* Per.. cent! */
typedef LONGLONG REFERENCE_TIME;
typedef REFERENCE_TIME *LPREFERENCE_TIME;
#ifndef MAKE_FOURCC
#define MAKEFOURCC(ch0, ch1, ch2, ch3) \
((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
typedef DWORD FOURCC; /* a four character code */
#endif
typedef struct _DMUS_DOWNLOADINFO
{
DWORD dwDLType; /* Instrument or Wave */
DWORD dwDLId; /* Unique identifier to tag this download. */
DWORD dwNumOffsetTableEntries; /* Number of index in the offset address table. */
DWORD cbSize; /* Total size of this memory chunk. */
} DMUS_DOWNLOADINFO;
#define DMUS_DOWNLOADINFO_INSTRUMENT 1
#define DMUS_DOWNLOADINFO_WAVE 2
#define DMUS_DOWNLOADINFO_INSTRUMENT2 3 /* New version for better DLS2 support. */
/* Support for oneshot and streaming wave data
*/
#define DMUS_DOWNLOADINFO_WAVEARTICULATION 4 /* Wave articulation data */
#define DMUS_DOWNLOADINFO_STREAMINGWAVE 5 /* One chunk of a streaming */
#define DMUS_DOWNLOADINFO_ONESHOTWAVE 6
#define DMUS_DEFAULT_SIZE_OFFSETTABLE 1
/* Flags for DMUS_INSTRUMENT's ulFlags member */
#define DMUS_INSTRUMENT_GM_INSTRUMENT (1 << 0)
typedef struct _DMUS_OFFSETTABLE
{
ULONG ulOffsetTable[DMUS_DEFAULT_SIZE_OFFSETTABLE];
} DMUS_OFFSETTABLE;
typedef struct _DMUS_INSTRUMENT
{
ULONG ulPatch;
ULONG ulFirstRegionIdx;
ULONG ulGlobalArtIdx; /* If zero the instrument does not have an articulation */
ULONG ulFirstExtCkIdx; /* If zero no 3rd party entenstion chunks associated with the instrument */
ULONG ulCopyrightIdx; /* If zero no Copyright information associated with the instrument */
ULONG ulFlags;
} DMUS_INSTRUMENT;
typedef struct _DMUS_REGION
{
RGNRANGE RangeKey;
RGNRANGE RangeVelocity;
USHORT fusOptions;
USHORT usKeyGroup;
ULONG ulRegionArtIdx; /* If zero the region does not have an articulation */
ULONG ulNextRegionIdx; /* If zero no more regions */
ULONG ulFirstExtCkIdx; /* If zero no 3rd party entenstion chunks associated with the region */
WAVELINK WaveLink;
WSMPL WSMP; /* If WSMP.cSampleLoops > 1 then a WLOOP is included */
WLOOP WLOOP[1];
} DMUS_REGION;
typedef struct _DMUS_LFOPARAMS
{
PCENT pcFrequency;
TCENT tcDelay;
GCENT gcVolumeScale;
PCENT pcPitchScale;
GCENT gcMWToVolume;
PCENT pcMWToPitch;
} DMUS_LFOPARAMS;
typedef struct _DMUS_VEGPARAMS
{
TCENT tcAttack;
TCENT tcDecay;
PERCENT ptSustain;
TCENT tcRelease;
TCENT tcVel2Attack;
TCENT tcKey2Decay;
} DMUS_VEGPARAMS;
typedef struct _DMUS_PEGPARAMS
{
TCENT tcAttack;
TCENT tcDecay;
PERCENT ptSustain;
TCENT tcRelease;
TCENT tcVel2Attack;
TCENT tcKey2Decay;
PCENT pcRange;
} DMUS_PEGPARAMS;
typedef struct _DMUS_MSCPARAMS
{
PERCENT ptDefaultPan;
} DMUS_MSCPARAMS;
typedef struct _DMUS_ARTICPARAMS
{
DMUS_LFOPARAMS LFO;
DMUS_VEGPARAMS VolEG;
DMUS_PEGPARAMS PitchEG;
DMUS_MSCPARAMS Misc;
} DMUS_ARTICPARAMS;
typedef struct _DMUS_ARTICULATION /* Articulation chunk for DMUS_DOWNLOADINFO_INSTRUMENT format. */
{
ULONG ulArt1Idx; /* DLS Level 1 articulation chunk */
ULONG ulFirstExtCkIdx; /* 3rd party extenstion chunks associated with the articulation */
} DMUS_ARTICULATION;
typedef struct _DMUS_ARTICULATION2 /* Articulation chunk for DMUS_DOWNLOADINFO_INSTRUMENT2 format. */
{
ULONG ulArtIdx; /* DLS Level 1/2 articulation chunk */
ULONG ulFirstExtCkIdx; /* 3rd party extenstion chunks associated with the articulation */
ULONG ulNextArtIdx; /* Additional articulation chunks */
} DMUS_ARTICULATION2;
#define DMUS_MIN_DATA_SIZE 4
/* The actual number is determined by cbSize of struct _DMUS_EXTENSIONCHUNK */
typedef struct _DMUS_EXTENSIONCHUNK
{
ULONG cbSize; /* Size of extension chunk */
ULONG ulNextExtCkIdx; /* If zero no more 3rd party entenstion chunks */
FOURCC ExtCkID;
BYTE byExtCk[DMUS_MIN_DATA_SIZE]; /* The actual number that follows is determined by cbSize */
} DMUS_EXTENSIONCHUNK;
/* The actual number is determined by cbSize of struct _DMUS_COPYRIGHT */
typedef struct _DMUS_COPYRIGHT
{
ULONG cbSize; /* Size of copyright information */
BYTE byCopyright[DMUS_MIN_DATA_SIZE]; /* The actual number that follows is determined by cbSize */
} DMUS_COPYRIGHT;
typedef struct _DMUS_WAVEDATA
{
ULONG cbSize;
BYTE byData[DMUS_MIN_DATA_SIZE];
} DMUS_WAVEDATA;
typedef struct _DMUS_WAVE
{
ULONG ulFirstExtCkIdx; /* If zero no 3rd party entenstion chunks associated with the wave */
ULONG ulCopyrightIdx; /* If zero no Copyright information associated with the wave */
ULONG ulWaveDataIdx; /* Location of actual wave data. */
WAVEFORMATEX WaveformatEx;
} DMUS_WAVE;
typedef struct _DMUS_NOTERANGE *LPDMUS_NOTERANGE;
typedef struct _DMUS_NOTERANGE
{
DWORD dwLowNote; /* Sets the low note for the range of MIDI note events to which the instrument responds.*/
DWORD dwHighNote; /* Sets the high note for the range of MIDI note events to which the instrument responds.*/
} DMUS_NOTERANGE;
typedef struct _DMUS_WAVEARTDL
{
ULONG ulDownloadIdIdx; /* Download ID's of each buffer */
ULONG ulBus; /* Playback bus */
ULONG ulBuffers; /* Buffers */
ULONG ulMasterDLId; /* Download ID of master voice of slave group */
USHORT usOptions; /* Same as DLS2 region options */
} DMUS_WAVEARTDL,
*LPDMUS_WAVEARTDL;
typedef struct _DMUS_WAVEDL
{
ULONG cbWaveData; /* Bytes of wave data */
} DMUS_WAVEDL,
*LPDMUS_WAVEDL;
#endif

843
lib/directx8/dmerror.h Executable file
View File

@ -0,0 +1,843 @@
/************************************************************************
* *
* dmerror.h -- Error code returned by DirectMusic API's *
* *
* Copyright (c) 1998-1999 Microsoft Corporation
* *
************************************************************************/
#ifndef _DMERROR_
#define _DMERROR_
#define FACILITY_DIRECTMUSIC 0x878 /* Shared with DirectSound */
#define DMUS_ERRBASE 0x1000 /* Make error codes human readable in hex */
#ifndef MAKE_HRESULT
#define MAKE_HRESULT(sev,fac,code) \
((HRESULT) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))) )
#endif
#define MAKE_DMHRESULTSUCCESS(code) MAKE_HRESULT(0, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code)))
#define MAKE_DMHRESULTERROR(code) MAKE_HRESULT(1, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code)))
/* DMUS_S_PARTIALLOAD
*
* The object could only load partially. This can happen if some components are
* not registered properly, such as embedded tracks and tools. This can also happen
* if some content is missing. For example, if a segment uses a DLS collection that
* is not in the loader's current search directory.
*/
#define DMUS_S_PARTIALLOAD MAKE_DMHRESULTSUCCESS(0x091)
/* DMUS_S_PARTIALDOWNLOAD
*
* Return value from IDirectMusicBand::Download() which indicates that
* some of the instruments safely downloaded, but others failed. This usually
* occurs when some instruments are on PChannels not supported by the performance
* or port.
*/
#define DMUS_S_PARTIALDOWNLOAD MAKE_DMHRESULTSUCCESS(0x092)
/* DMUS_S_REQUEUE
*
* Return value from IDirectMusicTool::ProcessPMsg() which indicates to the
* performance that it should cue the PMsg again automatically.
*/
#define DMUS_S_REQUEUE MAKE_DMHRESULTSUCCESS(0x200)
/* DMUS_S_FREE
*
* Return value from IDirectMusicTool::ProcessPMsg() which indicates to the
* performance that it should free the PMsg automatically.
*/
#define DMUS_S_FREE MAKE_DMHRESULTSUCCESS(0x201)
/* DMUS_S_END
*
* Return value from IDirectMusicTrack::Play() which indicates to the
* segment that the track has no more data after mtEnd.
*/
#define DMUS_S_END MAKE_DMHRESULTSUCCESS(0x202)
/* DMUS_S_STRING_TRUNCATED
*
* Returned string has been truncated to fit the buffer size.
*/
#define DMUS_S_STRING_TRUNCATED MAKE_DMHRESULTSUCCESS(0x210)
/* DMUS_S_LAST_TOOL
*
* Returned from IDirectMusicGraph::StampPMsg(), this indicates that the PMsg
* is already stamped with the last tool in the graph. The returned PMsg's
* tool pointer is now NULL.
*/
#define DMUS_S_LAST_TOOL MAKE_DMHRESULTSUCCESS(0x211)
/* DMUS_S_OVER_CHORD
*
* Returned from IDirectMusicPerformance::MusicToMIDI(), this indicates
* that no note has been calculated because the music value has the note
* at a position higher than the top note of the chord. This applies only
* to DMUS_PLAYMODE_NORMALCHORD play mode. This success code indicates
* that the caller should not do anything with the note. It is not meant
* to be played against this chord.
*/
#define DMUS_S_OVER_CHORD MAKE_DMHRESULTSUCCESS(0x212)
/* DMUS_S_UP_OCTAVE
*
* Returned from IDirectMusicPerformance::MIDIToMusic(), and
* IDirectMusicPerformance::MusicToMIDI(), this indicates
* that the note conversion generated a note value that is below 0,
* so it has been bumped up one or more octaves to be in the proper
* MIDI range of 0 through 127.
* Note that this is valid for MIDIToMusic() when using play modes
* DMUS_PLAYMODE_FIXEDTOCHORD and DMUS_PLAYMODE_FIXEDTOKEY, both of
* which store MIDI values in wMusicValue. With MusicToMIDI(), it is
* valid for all play modes.
* Ofcourse, DMUS_PLAYMODE_FIXED will never return this success code.
*/
#define DMUS_S_UP_OCTAVE MAKE_DMHRESULTSUCCESS(0x213)
/* DMUS_S_DOWN_OCTAVE
*
* Returned from IDirectMusicPerformance::MIDIToMusic(), and
* IDirectMusicPerformance::MusicToMIDI(), this indicates
* that the note conversion generated a note value that is above 127,
* so it has been bumped down one or more octaves to be in the proper
* MIDI range of 0 through 127.
* Note that this is valid for MIDIToMusic() when using play modes
* DMUS_PLAYMODE_FIXEDTOCHORD and DMUS_PLAYMODE_FIXEDTOKEY, both of
* which store MIDI values in wMusicValue. With MusicToMIDI(), it is
* valid for all play modes.
* Ofcourse, DMUS_PLAYMODE_FIXED will never return this success code.
*/
#define DMUS_S_DOWN_OCTAVE MAKE_DMHRESULTSUCCESS(0x214)
/* DMUS_S_NOBUFFERCONTROL
*
* Although the audio output from the port will be routed to the
* same device as the given DirectSound buffer, buffer controls
* such as pan and volume will not affect the output.
*
*/
#define DMUS_S_NOBUFFERCONTROL MAKE_DMHRESULTSUCCESS(0x215)
/* DMUS_S_GARBAGE_COLLECTED
*
* The requested operation was not performed because during CollectGarbage
* the loader determined that the object had been released.
*/
#define DMUS_S_GARBAGE_COLLECTED MAKE_DMHRESULTSUCCESS(0x216)
/* DMUS_E_DRIVER_FAILED
*
* An unexpected error was returned from a device driver, indicating
* possible failure of the driver or hardware.
*/
#define DMUS_E_DRIVER_FAILED MAKE_DMHRESULTERROR(0x0101)
/* DMUS_E_PORTS_OPEN
*
* The requested operation cannot be performed while there are
* instantiated ports in any process in the system.
*/
#define DMUS_E_PORTS_OPEN MAKE_DMHRESULTERROR(0x0102)
/* DMUS_E_DEVICE_IN_USE
*
* The requested device is already in use (possibly by a non-DirectMusic
* client) and cannot be opened again.
*/
#define DMUS_E_DEVICE_IN_USE MAKE_DMHRESULTERROR(0x0103)
/* DMUS_E_INSUFFICIENTBUFFER
*
* Buffer is not large enough for requested operation.
*/
#define DMUS_E_INSUFFICIENTBUFFER MAKE_DMHRESULTERROR(0x0104)
/* DMUS_E_BUFFERNOTSET
*
* No buffer was prepared for the download data.
*/
#define DMUS_E_BUFFERNOTSET MAKE_DMHRESULTERROR(0x0105)
/* DMUS_E_BUFFERNOTAVAILABLE
*
* Download failed due to inability to access or create download buffer.
*/
#define DMUS_E_BUFFERNOTAVAILABLE MAKE_DMHRESULTERROR(0x0106)
/* DMUS_E_NOTADLSCOL
*
* Error parsing DLS collection. File is corrupt.
*/
#define DMUS_E_NOTADLSCOL MAKE_DMHRESULTERROR(0x0108)
/* DMUS_E_INVALIDOFFSET
*
* Wave chunks in DLS collection file are at incorrect offsets.
*/
#define DMUS_E_INVALIDOFFSET MAKE_DMHRESULTERROR(0x0109)
/* DMUS_E_ALREADY_LOADED
*
* Second attempt to load a DLS collection that is currently open.
*/
#define DMUS_E_ALREADY_LOADED MAKE_DMHRESULTERROR(0x0111)
/* DMUS_E_INVALIDPOS
*
* Error reading wave data from DLS collection. Indicates bad file.
*/
#define DMUS_E_INVALIDPOS MAKE_DMHRESULTERROR(0x0113)
/* DMUS_E_INVALIDPATCH
*
* There is no instrument in the collection that matches patch number.
*/
#define DMUS_E_INVALIDPATCH MAKE_DMHRESULTERROR(0x0114)
/* DMUS_E_CANNOTSEEK
*
* The IStream* doesn't support Seek().
*/
#define DMUS_E_CANNOTSEEK MAKE_DMHRESULTERROR(0x0115)
/* DMUS_E_CANNOTWRITE
*
* The IStream* doesn't support Write().
*/
#define DMUS_E_CANNOTWRITE MAKE_DMHRESULTERROR(0x0116)
/* DMUS_E_CHUNKNOTFOUND
*
* The RIFF parser doesn't contain a required chunk while parsing file.
*/
#define DMUS_E_CHUNKNOTFOUND MAKE_DMHRESULTERROR(0x0117)
/* DMUS_E_INVALID_DOWNLOADID
*
* Invalid download id was used in the process of creating a download buffer.
*/
#define DMUS_E_INVALID_DOWNLOADID MAKE_DMHRESULTERROR(0x0119)
/* DMUS_E_NOT_DOWNLOADED_TO_PORT
*
* Tried to unload an object that was not downloaded or previously unloaded.
*/
#define DMUS_E_NOT_DOWNLOADED_TO_PORT MAKE_DMHRESULTERROR(0x0120)
/* DMUS_E_ALREADY_DOWNLOADED
*
* Buffer was already downloaded to synth.
*/
#define DMUS_E_ALREADY_DOWNLOADED MAKE_DMHRESULTERROR(0x0121)
/* DMUS_E_UNKNOWN_PROPERTY
*
* The specified property item was not recognized by the target object.
*/
#define DMUS_E_UNKNOWN_PROPERTY MAKE_DMHRESULTERROR(0x0122)
/* DMUS_E_SET_UNSUPPORTED
*
* The specified property item may not be set on the target object.
*/
#define DMUS_E_SET_UNSUPPORTED MAKE_DMHRESULTERROR(0x0123)
/* DMUS_E_GET_UNSUPPORTED
*
* The specified property item may not be retrieved from the target object.
*/
#define DMUS_E_GET_UNSUPPORTED MAKE_DMHRESULTERROR(0x0124)
/* DMUS_E_NOTMONO
*
* Wave chunk has more than one interleaved channel. DLS format requires MONO.
*/
#define DMUS_E_NOTMONO MAKE_DMHRESULTERROR(0x0125)
/* DMUS_E_BADARTICULATION
*
* Invalid articulation chunk in DLS collection.
*/
#define DMUS_E_BADARTICULATION MAKE_DMHRESULTERROR(0x0126)
/* DMUS_E_BADINSTRUMENT
*
* Invalid instrument chunk in DLS collection.
*/
#define DMUS_E_BADINSTRUMENT MAKE_DMHRESULTERROR(0x0127)
/* DMUS_E_BADWAVELINK
*
* Wavelink chunk in DLS collection points to invalid wave.
*/
#define DMUS_E_BADWAVELINK MAKE_DMHRESULTERROR(0x0128)
/* DMUS_E_NOARTICULATION
*
* Articulation missing from instrument in DLS collection.
*/
#define DMUS_E_NOARTICULATION MAKE_DMHRESULTERROR(0x0129)
/* DMUS_E_NOTPCM
*
* Downoaded DLS wave is not in PCM format.
*/
#define DMUS_E_NOTPCM MAKE_DMHRESULTERROR(0x012A)
/* DMUS_E_BADWAVE
*
* Bad wave chunk in DLS collection
*/
#define DMUS_E_BADWAVE MAKE_DMHRESULTERROR(0x012B)
/* DMUS_E_BADOFFSETTABLE
*
* Offset Table for download buffer has errors.
*/
#define DMUS_E_BADOFFSETTABLE MAKE_DMHRESULTERROR(0x012C)
/* DMUS_E_UNKNOWNDOWNLOAD
*
* Attempted to download unknown data type.
*/
#define DMUS_E_UNKNOWNDOWNLOAD MAKE_DMHRESULTERROR(0x012D)
/* DMUS_E_NOSYNTHSINK
*
* The operation could not be completed because no sink was connected to
* the synthesizer.
*/
#define DMUS_E_NOSYNTHSINK MAKE_DMHRESULTERROR(0x012E)
/* DMUS_E_ALREADYOPEN
*
* An attempt was made to open the software synthesizer while it was already
* open.
* ASSERT?
*/
#define DMUS_E_ALREADYOPEN MAKE_DMHRESULTERROR(0x012F)
/* DMUS_E_ALREADYCLOSE
*
* An attempt was made to close the software synthesizer while it was already
* open.
* ASSERT?
*/
#define DMUS_E_ALREADYCLOSED MAKE_DMHRESULTERROR(0x0130)
/* DMUS_E_SYNTHNOTCONFIGURED
*
* The operation could not be completed because the software synth has not
* yet been fully configured.
* ASSERT?
*/
#define DMUS_E_SYNTHNOTCONFIGURED MAKE_DMHRESULTERROR(0x0131)
/* DMUS_E_SYNTHACTIVE
*
* The operation cannot be carried out while the synthesizer is active.
*/
#define DMUS_E_SYNTHACTIVE MAKE_DMHRESULTERROR(0x0132)
/* DMUS_E_CANNOTREAD
*
* An error occurred while attempting to read from the IStream* object.
*/
#define DMUS_E_CANNOTREAD MAKE_DMHRESULTERROR(0x0133)
/* DMUS_E_DMUSIC_RELEASED
*
* The operation cannot be performed because the final instance of the
* DirectMusic object was released. Ports cannot be used after final
* release of the DirectMusic object.
*/
#define DMUS_E_DMUSIC_RELEASED MAKE_DMHRESULTERROR(0x0134)
/* DMUS_E_BUFFER_EMPTY
*
* There was no data in the referenced buffer.
*/
#define DMUS_E_BUFFER_EMPTY MAKE_DMHRESULTERROR(0x0135)
/* DMUS_E_BUFFER_FULL
*
* There is insufficient space to insert the given event into the buffer.
*/
#define DMUS_E_BUFFER_FULL MAKE_DMHRESULTERROR(0x0136)
/* DMUS_E_PORT_NOT_CAPTURE
*
* The given operation could not be carried out because the port is a
* capture port.
*/
#define DMUS_E_PORT_NOT_CAPTURE MAKE_DMHRESULTERROR(0x0137)
/* DMUS_E_PORT_NOT_RENDER
*
* The given operation could not be carried out because the port is a
* render port.
*/
#define DMUS_E_PORT_NOT_RENDER MAKE_DMHRESULTERROR(0x0138)
/* DMUS_E_DSOUND_NOT_SET
*
* The port could not be created because no DirectSound has been specified.
* Specify a DirectSound interface via the IDirectMusic::SetDirectSound
* method; pass NULL to have DirectMusic manage usage of DirectSound.
*/
#define DMUS_E_DSOUND_NOT_SET MAKE_DMHRESULTERROR(0x0139)
/* DMUS_E_ALREADY_ACTIVATED
*
* The operation cannot be carried out while the port is active.
*/
#define DMUS_E_ALREADY_ACTIVATED MAKE_DMHRESULTERROR(0x013A)
/* DMUS_E_INVALIDBUFFER
*
* Invalid DirectSound buffer was handed to port.
*/
#define DMUS_E_INVALIDBUFFER MAKE_DMHRESULTERROR(0x013B)
/* DMUS_E_WAVEFORMATNOTSUPPORTED
*
* Invalid buffer format was handed to the synth sink.
*/
#define DMUS_E_WAVEFORMATNOTSUPPORTED MAKE_DMHRESULTERROR(0x013C)
/* DMUS_E_SYNTHINACTIVE
*
* The operation cannot be carried out while the synthesizer is inactive.
*/
#define DMUS_E_SYNTHINACTIVE MAKE_DMHRESULTERROR(0x013D)
/* DMUS_E_DSOUND_ALREADY_SET
*
* IDirectMusic::SetDirectSound has already been called. It may not be
* changed while in use.
*/
#define DMUS_E_DSOUND_ALREADY_SET MAKE_DMHRESULTERROR(0x013E)
/* DMUS_E_INVALID_EVENT
*
* The given event is invalid (either it is not a valid MIDI message
* or it makes use of running status). The event cannot be packed
* into the buffer.
*/
#define DMUS_E_INVALID_EVENT MAKE_DMHRESULTERROR(0x013F)
/* DMUS_E_UNSUPPORTED_STREAM
*
* The IStream* object does not contain data supported by the loading object.
*/
#define DMUS_E_UNSUPPORTED_STREAM MAKE_DMHRESULTERROR(0x0150)
/* DMUS_E_ALREADY_INITED
*
* The object has already been initialized.
*/
#define DMUS_E_ALREADY_INITED MAKE_DMHRESULTERROR(0x0151)
/* DMUS_E_INVALID_BAND
*
* The file does not contain a valid band.
*/
#define DMUS_E_INVALID_BAND MAKE_DMHRESULTERROR(0x0152)
/* DMUS_E_TRACK_HDR_NOT_FIRST_CK
*
* The IStream* object's data does not have a track header as the first chunk,
* and therefore can not be read by the segment object.
*/
#define DMUS_E_TRACK_HDR_NOT_FIRST_CK MAKE_DMHRESULTERROR(0x0155)
/* DMUS_E_TOOL_HDR_NOT_FIRST_CK
*
* The IStream* object's data does not have a tool header as the first chunk,
* and therefore can not be read by the graph object.
*/
#define DMUS_E_TOOL_HDR_NOT_FIRST_CK MAKE_DMHRESULTERROR(0x0156)
/* DMUS_E_INVALID_TRACK_HDR
*
* The IStream* object's data contains an invalid track header (ckid is 0 and
* fccType is NULL,) and therefore can not be read by the segment object.
*/
#define DMUS_E_INVALID_TRACK_HDR MAKE_DMHRESULTERROR(0x0157)
/* DMUS_E_INVALID_TOOL_HDR
*
* The IStream* object's data contains an invalid tool header (ckid is 0 and
* fccType is NULL,) and therefore can not be read by the graph object.
*/
#define DMUS_E_INVALID_TOOL_HDR MAKE_DMHRESULTERROR(0x0158)
/* DMUS_E_ALL_TOOLS_FAILED
*
* The graph object was unable to load all tools from the IStream* object data.
* This may be due to errors in the stream, or the tools being incorrectly
* registered on the client.
*/
#define DMUS_E_ALL_TOOLS_FAILED MAKE_DMHRESULTERROR(0x0159)
/* DMUS_E_ALL_TRACKS_FAILED
*
* The segment object was unable to load all tracks from the IStream* object data.
* This may be due to errors in the stream, or the tracks being incorrectly
* registered on the client.
*/
#define DMUS_E_ALL_TRACKS_FAILED MAKE_DMHRESULTERROR(0x0160)
/* DMUS_E_NOT_FOUND
*
* The requested item was not contained by the object.
*/
#define DMUS_E_NOT_FOUND MAKE_DMHRESULTERROR(0x0161)
/* DMUS_E_NOT_INIT
*
* A required object is not initialized or failed to initialize.
*/
#define DMUS_E_NOT_INIT MAKE_DMHRESULTERROR(0x0162)
/* DMUS_E_TYPE_DISABLED
*
* The requested parameter type is currently disabled. Parameter types may
* be enabled and disabled by certain calls to SetParam().
*/
#define DMUS_E_TYPE_DISABLED MAKE_DMHRESULTERROR(0x0163)
/* DMUS_E_TYPE_UNSUPPORTED
*
* The requested parameter type is not supported on the object.
*/
#define DMUS_E_TYPE_UNSUPPORTED MAKE_DMHRESULTERROR(0x0164)
/* DMUS_E_TIME_PAST
*
* The time is in the past, and the operation can not succeed.
*/
#define DMUS_E_TIME_PAST MAKE_DMHRESULTERROR(0x0165)
/* DMUS_E_TRACK_NOT_FOUND
*
* The requested track is not contained by the segment.
*/
#define DMUS_E_TRACK_NOT_FOUND MAKE_DMHRESULTERROR(0x0166)
/* DMUS_E_TRACK_NO_CLOCKTIME_SUPPORT
*
* The track does not support clock time playback or getparam.
*/
#define DMUS_E_TRACK_NO_CLOCKTIME_SUPPORT MAKE_DMHRESULTERROR(0x0167)
/* DMUS_E_NO_MASTER_CLOCK
*
* There is no master clock in the performance. Be sure to call
* IDirectMusicPerformance::Init().
*/
#define DMUS_E_NO_MASTER_CLOCK MAKE_DMHRESULTERROR(0x0170)
/* DMUS_E_LOADER_NOCLASSID
*
* The class id field is required and missing in the DMUS_OBJECTDESC.
*/
#define DMUS_E_LOADER_NOCLASSID MAKE_DMHRESULTERROR(0x0180)
/* DMUS_E_LOADER_BADPATH
*
* The requested file path is invalid.
*/
#define DMUS_E_LOADER_BADPATH MAKE_DMHRESULTERROR(0x0181)
/* DMUS_E_LOADER_FAILEDOPEN
*
* File open failed - either file doesn't exist or is locked.
*/
#define DMUS_E_LOADER_FAILEDOPEN MAKE_DMHRESULTERROR(0x0182)
/* DMUS_E_LOADER_FORMATNOTSUPPORTED
*
* Search data type is not supported.
*/
#define DMUS_E_LOADER_FORMATNOTSUPPORTED MAKE_DMHRESULTERROR(0x0183)
/* DMUS_E_LOADER_FAILEDCREATE
*
* Unable to find or create object.
*/
#define DMUS_E_LOADER_FAILEDCREATE MAKE_DMHRESULTERROR(0x0184)
/* DMUS_E_LOADER_OBJECTNOTFOUND
*
* Object was not found.
*/
#define DMUS_E_LOADER_OBJECTNOTFOUND MAKE_DMHRESULTERROR(0x0185)
/* DMUS_E_LOADER_NOFILENAME
*
* The file name is missing from the DMUS_OBJECTDESC.
*/
#define DMUS_E_LOADER_NOFILENAME MAKE_DMHRESULTERROR(0x0186)
/* DMUS_E_INVALIDFILE
*
* The file requested is not a valid file.
*/
#define DMUS_E_INVALIDFILE MAKE_DMHRESULTERROR(0x0200)
/* DMUS_E_ALREADY_EXISTS
*
* The tool is already contained in the graph. Create a new instance.
*/
#define DMUS_E_ALREADY_EXISTS MAKE_DMHRESULTERROR(0x0201)
/* DMUS_E_OUT_OF_RANGE
*
* Value is out of range, for instance the requested length is longer than
* the segment.
*/
#define DMUS_E_OUT_OF_RANGE MAKE_DMHRESULTERROR(0x0202)
/* DMUS_E_SEGMENT_INIT_FAILED
*
* Segment initialization failed, most likely due to a critical memory situation.
*/
#define DMUS_E_SEGMENT_INIT_FAILED MAKE_DMHRESULTERROR(0x0203)
/* DMUS_E_ALREADY_SENT
*
* The DMUS_PMSG has already been sent to the performance object via
* IDirectMusicPerformance::SendPMsg().
*/
#define DMUS_E_ALREADY_SENT MAKE_DMHRESULTERROR(0x0204)
/* DMUS_E_CANNOT_FREE
*
* The DMUS_PMSG was either not allocated by the performance via
* IDirectMusicPerformance::AllocPMsg(), or it was already freed via
* IDirectMusicPerformance::FreePMsg().
*/
#define DMUS_E_CANNOT_FREE MAKE_DMHRESULTERROR(0x0205)
/* DMUS_E_CANNOT_OPEN_PORT
*
* The default system port could not be opened.
*/
#define DMUS_E_CANNOT_OPEN_PORT MAKE_DMHRESULTERROR(0x0206)
/* DMUS_E_CANNOT_CONVERT
*
* A call to MIDIToMusic() or MusicToMIDI() resulted in an error because
* the requested conversion could not happen. This usually occurs when the
* provided DMUS_CHORD_KEY structure has an invalid chord or scale pattern.
*/
#define DMUS_E_CANNOT_CONVERT MAKE_DMHRESULTERROR(0x0207)
/* misspelling in previous versions of DirectX preserved for backward compatibility */
#define DMUS_E_CONNOT_CONVERT DMUS_E_CANNOT_CONVERT
/* DMUS_E_DESCEND_CHUNK_FAIL
*
* DMUS_E_DESCEND_CHUNK_FAIL is returned when the end of the file
* was reached before the desired chunk was found.
*/
#define DMUS_E_DESCEND_CHUNK_FAIL MAKE_DMHRESULTERROR(0x0210)
/* DMUS_E_NOT_LOADED
*
* An attempt to use this object failed because it first needs to
* be loaded.
*/
#define DMUS_E_NOT_LOADED MAKE_DMHRESULTERROR(0x0211)
/* DMUS_E_SCRIPT_LANGUAGE_INCOMPATIBLE
*
* The activeX scripting engine for the script's language is not compatible with
* DirectMusic.
*
*/
#define DMUS_E_SCRIPT_LANGUAGE_INCOMPATIBLE MAKE_DMHRESULTERROR(0x0213)
/* DMUS_E_SCRIPT_UNSUPPORTED_VARTYPE
*
* A varient was used that had a type that is not supported by DirectMusic.
*
*/
#define DMUS_E_SCRIPT_UNSUPPORTED_VARTYPE MAKE_DMHRESULTERROR(0x0214)
/* DMUS_E_SCRIPT_ERROR_IN_SCRIPT
*
* An error was encountered while parsing or executing the script.
* The pErrorInfo parameter (if supplied) was filled with information about the error.
*/
#define DMUS_E_SCRIPT_ERROR_IN_SCRIPT MAKE_DMHRESULTERROR(0x0215)
/* DMUS_E_SCRIPT_CANTLOAD_OLEAUT32
*
* Loading of oleaut32.dll failed. VBScript and other activeX scripting languages
* require use of oleaut32.dll. On platforms where oleaut32.dll is not present, only
* the DirectMusicScript language, which doesn't require oleaut32.dll can be used.
*/
#define DMUS_E_SCRIPT_CANTLOAD_OLEAUT32 MAKE_DMHRESULTERROR(0x0216)
/* DMUS_E_SCRIPT_LOADSCRIPT_ERROR
*
* An error occured while parsing a script loaded using LoadScript. The script that
* was loaded contains an error.
*/
#define DMUS_E_SCRIPT_LOADSCRIPT_ERROR MAKE_DMHRESULTERROR(0x0217)
/* DMUS_E_SCRIPT_INVALID_FILE
*
* The script file is invalid.
*/
#define DMUS_E_SCRIPT_INVALID_FILE MAKE_DMHRESULTERROR(0x0218)
/* DMUS_E_INVALID_SCRIPTTRACK
*
* The file contains an invalid script track.
*/
#define DMUS_E_INVALID_SCRIPTTRACK MAKE_DMHRESULTERROR(0x0219)
/* DMUS_E_SCRIPT_VARIABLE_NOT_FOUND
*
* The script does not contain a variable with the specified name.
*/
#define DMUS_E_SCRIPT_VARIABLE_NOT_FOUND MAKE_DMHRESULTERROR(0x021A)
/* DMUS_E_SCRIPT_ROUTINE_NOT_FOUND
*
* The script does not contain a routine with the specified name.
*/
#define DMUS_E_SCRIPT_ROUTINE_NOT_FOUND MAKE_DMHRESULTERROR(0x021B)
/* DMUS_E_SCRIPT_CONTENT_READONLY
*
* Scripts variables for content referenced or embedded in a script cannot be set.
*/
#define DMUS_E_SCRIPT_CONTENT_READONLY MAKE_DMHRESULTERROR(0x021C)
/* DMUS_E_SCRIPT_NOT_A_REFERENCE
*
* Attempt was made to set a script's variable by reference to a value that was
* not an object type.
*/
#define DMUS_E_SCRIPT_NOT_A_REFERENCE MAKE_DMHRESULTERROR(0x021D)
/* DMUS_E_SCRIPT_VALUE_NOT_SUPPORTED
*
* Attempt was made to set a script's variable by value to an object that does
* not support a default value property.
*/
#define DMUS_E_SCRIPT_VALUE_NOT_SUPPORTED MAKE_DMHRESULTERROR(0x021E)
/* DMUS_E_INVALID_SEGMENTTRIGGERTRACK
*
* The file contains an invalid segment trigger track.
*/
#define DMUS_E_INVALID_SEGMENTTRIGGERTRACK MAKE_DMHRESULTERROR(0x0220)
/* DMUS_E_INVALID_LYRICSTRACK
*
* The file contains an invalid lyrics track.
*/
#define DMUS_E_INVALID_LYRICSTRACK MAKE_DMHRESULTERROR(0x0221)
/* DMUS_E_INVALID_PARAMCONTROLTRACK
*
* The file contains an invalid parameter control track.
*/
#define DMUS_E_INVALID_PARAMCONTROLTRACK MAKE_DMHRESULTERROR(0x0222)
/* DMUS_E_AUDIOVBSCRIPT_SYNTAXERROR
*
* A script written in AudioVBScript could not be read because it contained a statement that
* is not allowed by the AudioVBScript language.
*/
#define DMUS_E_AUDIOVBSCRIPT_SYNTAXERROR MAKE_DMHRESULTERROR(0x0223)
/* DMUS_E_AUDIOVBSCRIPT_RUNTIMEERROR
*
* A script routine written in AudioVBScript failed because an invalid operation occurred. For example,
* adding the number 3 to a segment object would produce this error. So would attempting to call a routine
* that doesn't exist.
*/
#define DMUS_E_AUDIOVBSCRIPT_RUNTIMEERROR MAKE_DMHRESULTERROR(0x0224)
/* DMUS_E_AUDIOVBSCRIPT_OPERATIONFAILURE
*
* A script routine written in AudioVBScript failed because a function outside of a script failed to complete.
* For example, a call to PlaySegment that fails to play because of low memory would return this error.
*/
#define DMUS_E_AUDIOVBSCRIPT_OPERATIONFAILURE MAKE_DMHRESULTERROR(0x0225)
/* DMUS_E_AUDIOPATHS_NOT_VALID
*
* The Performance has set up some PChannels using the AssignPChannel command, which
* makes it not capable of supporting audio paths.
*/
#define DMUS_E_AUDIOPATHS_NOT_VALID MAKE_DMHRESULTERROR(0x0226)
/* DMUS_E_AUDIOPATHS_IN_USE
*
* This is the inverse of the previous error.
* The Performance has set up some audio paths, which makes is incompatible
* with the calls to allocate pchannels, etc.
*/
#define DMUS_E_AUDIOPATHS_IN_USE MAKE_DMHRESULTERROR(0x0227)
/* DMUS_E_NO_AUDIOPATH_CONFIG
*
* A segment or song was asked for its embedded audio path configuration,
* but there isn't any.
*/
#define DMUS_E_NO_AUDIOPATH_CONFIG MAKE_DMHRESULTERROR(0x0228)
/* DMUS_E_AUDIOPATH_INACTIVE
*
* An audiopath is inactive, perhaps because closedown was called.
*/
#define DMUS_E_AUDIOPATH_INACTIVE MAKE_DMHRESULTERROR(0x0229)
/* DMUS_E_AUDIOPATH_NOBUFFER
*
* An audiopath failed to create because a requested buffer could not be created.
*/
#define DMUS_E_AUDIOPATH_NOBUFFER MAKE_DMHRESULTERROR(0x022A)
/* DMUS_E_AUDIOPATH_NOPORT
*
* An audiopath could not be used for playback because it lacked port assignments.
*/
#define DMUS_E_AUDIOPATH_NOPORT MAKE_DMHRESULTERROR(0x022B)
/* DMUS_E_NO_AUDIOPATH
*
* Attempt was made to play segment in audiopath mode and there was no audiopath.
*/
#define DMUS_E_NO_AUDIOPATH MAKE_DMHRESULTERROR(0x022C)
/* DMUS_E_INVALIDCHUNK
*
* Invalid data was found in a RIFF file chunk.
*/
#define DMUS_E_INVALIDCHUNK MAKE_DMHRESULTERROR(0x022D)
/* DMUS_E_AUDIOPATH_NOGLOBALFXBUFFER
*
* Attempt was made to create an audiopath that sends to a global effects buffer which did not exist.
*/
#define DMUS_E_AUDIOPATH_NOGLOBALFXBUFFER MAKE_DMHRESULTERROR(0x022E)
/* DMUS_E_INVALID_CONTAINER_OBJECT
*
* The file does not contain a valid container object.
*/
#define DMUS_E_INVALID_CONTAINER_OBJECT MAKE_DMHRESULTERROR(0x022F)
#endif

167
lib/directx8/dmksctrl.h Executable file
View File

@ -0,0 +1,167 @@
/************************************************************************
* *
* dmksctrl.h -- Definition of IKsControl *
* *
* Copyright (c) 1998-1999 Microsoft Corporation
* *
* *
* This header file contains the definition of IKsControl, which *
* duplicates definitions from ks.h and ksproxy.h. Your code should *
* include ks.h and ksproxy.h directly if you have them (they are *
* provided in the Windows 98 DDK and will be in the Windows NT 5 *
* SDK). *
* *
************************************************************************/
#ifndef _DMKSCTRL_
#define _DMKSCTRL_
#if _MSC_VER >= 1200
#pragma warning(push)
#endif
#pragma warning(disable:4201) /* Disable warnings on anonymous unions */
#include <pshpack8.h>
#include <objbase.h>
#if !defined(_NTRTL_)
#ifndef DEFINE_GUIDEX
#define DEFINE_GUIDEX(name) EXTERN_C const CDECL GUID name
#endif /* !defined(DEFINE_GUIDEX) */
#ifndef STATICGUIDOF
#define STATICGUIDOF(guid) STATIC_##guid
#endif /* !defined(STATICGUIDOF) */
#endif /* !defined(_NTRTL_) */
#ifndef STATIC_IID_IKsControl
#define STATIC_IID_IKsControl\
0x28F54685L, 0x06FD, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
#endif /* STATIC_IID_IKsControl */
/*
* Warning: This will prevent the rest of ks.h from being pulled in if ks.h is
* included after dmksctrl.h. Make sure you do not include both headers in
* the same source file.
*/
#ifndef _KS_
#define _KS_
#if (defined(_MSC_EXTENSIONS) || defined(__cplusplus)) && !defined(CINTERFACE)
typedef struct {
union {
struct {
GUID Set;
ULONG Id;
ULONG Flags;
};
LONGLONG Alignment;
};
} KSIDENTIFIER, *PKSIDENTIFIER;
#else
typedef struct {
union {
struct {
GUID Set;
ULONG Id;
ULONG Flags;
} Data;
LONGLONG Alignment;
};
} KSIDENTIFIER, *PKSIDENTIFIER;
#endif
typedef KSIDENTIFIER KSPROPERTY, *PKSPROPERTY, KSMETHOD, *PKSMETHOD, KSEVENT, *PKSEVENT;
#define KSMETHOD_TYPE_NONE 0x00000000
#define KSMETHOD_TYPE_READ 0x00000001
#define KSMETHOD_TYPE_WRITE 0x00000002
#define KSMETHOD_TYPE_MODIFY 0x00000003
#define KSMETHOD_TYPE_SOURCE 0x00000004
#define KSMETHOD_TYPE_SEND 0x00000001
#define KSMETHOD_TYPE_SETSUPPORT 0x00000100
#define KSMETHOD_TYPE_BASICSUPPORT 0x00000200
#define KSPROPERTY_TYPE_GET 0x00000001
#define KSPROPERTY_TYPE_SET 0x00000002
#define KSPROPERTY_TYPE_SETSUPPORT 0x00000100
#define KSPROPERTY_TYPE_BASICSUPPORT 0x00000200
#define KSPROPERTY_TYPE_RELATIONS 0x00000400
#define KSPROPERTY_TYPE_SERIALIZESET 0x00000800
#define KSPROPERTY_TYPE_UNSERIALIZESET 0x00001000
#define KSPROPERTY_TYPE_SERIALIZERAW 0x00002000
#define KSPROPERTY_TYPE_UNSERIALIZERAW 0x00004000
#define KSPROPERTY_TYPE_SERIALIZESIZE 0x00008000
#define KSPROPERTY_TYPE_DEFAULTVALUES 0x00010000
#define KSPROPERTY_TYPE_TOPOLOGY 0x10000000
#endif /* _KS_ */
#ifndef _IKsControl_
#define _IKsControl_
#ifdef DECLARE_INTERFACE_
#undef INTERFACE
#define INTERFACE IKsControl
DECLARE_INTERFACE_(IKsControl, IUnknown)
{
/* IUnknown */
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*IKsControl*/
STDMETHOD(KsProperty)(
THIS_
IN PKSPROPERTY Property,
IN ULONG PropertyLength,
IN OUT LPVOID PropertyData,
IN ULONG DataLength,
OUT ULONG* BytesReturned
) PURE;
STDMETHOD(KsMethod)(
THIS_
IN PKSMETHOD Method,
IN ULONG MethodLength,
IN OUT LPVOID MethodData,
IN ULONG DataLength,
OUT ULONG* BytesReturned
) PURE;
STDMETHOD(KsEvent)(
THIS_
IN PKSEVENT Event OPTIONAL,
IN ULONG EventLength,
IN OUT LPVOID EventData,
IN ULONG DataLength,
OUT ULONG* BytesReturned
) PURE;
};
#endif /* DECLARE_INTERFACE_ */
#endif /* _IKsControl_ */
#include <poppack.h>
DEFINE_GUID(IID_IKsControl, 0x28F54685, 0x06FD, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96);
/* These formats are in ksmedia.h
*/
#ifndef _KSMEDIA_
DEFINE_GUID(KSDATAFORMAT_SUBTYPE_MIDI, 0x1D262760L, 0xE957, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00);
DEFINE_GUID(KSDATAFORMAT_SUBTYPE_DIRECTMUSIC, 0x1a82f8bc, 0x3f8b, 0x11d2, 0xb7, 0x74, 0x00, 0x60, 0x08, 0x33, 0x16, 0xc1);
#endif
#if _MSC_VER >= 1200
#pragma warning(pop)
#endif
#endif /* _DMKSCTRL */

29
lib/directx8/dmo.h Executable file
View File

@ -0,0 +1,29 @@
//------------------------------------------------------------------------------
// File: DMO.h
//
// Desc: Headers needed by almost all DMOs.
//
// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __DMO_H__
#define __DMO_H__
#include "mediaerr.h"
// When using ATL we get collisions on Lock so in this case rename
// IMediaObject::Lock to IMediaObject::DMOLock
#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 //__DMO_H__

176
lib/directx8/dmodshow.h Executable file
View File

@ -0,0 +1,176 @@
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 6.00.0338 */
/* Compiler settings for dmodshow.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
//@@MIDL_FILE_HEADING( )
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __dmodshow_h__
#define __dmodshow_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __IDMOWrapperFilter_FWD_DEFINED__
#define __IDMOWrapperFilter_FWD_DEFINED__
typedef interface IDMOWrapperFilter IDMOWrapperFilter;
#endif /* __IDMOWrapperFilter_FWD_DEFINED__ */
/* header files for imported files */
#include "unknwn.h"
#include "objidl.h"
#include "mediaobj.h"
#ifdef __cplusplus
extern "C"{
#endif
void * __RPC_USER MIDL_user_allocate(size_t);
void __RPC_USER MIDL_user_free( void * );
/* interface __MIDL_itf_dmodshow_0000 */
/* [local] */
DEFINE_GUID(CLSID_DMOWrapperFilter, 0x94297043,0xbd82,0x4dfd,0xb0,0xde,0x81,0x77,0x73,0x9c,0x6d,0x20);
DEFINE_GUID(CLSID_DMOFilterCategory,0xbcd5796c,0xbd52,0x4d30,0xab,0x76,0x70,0xf9,0x75,0xb8,0x91,0x99);
extern RPC_IF_HANDLE __MIDL_itf_dmodshow_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_dmodshow_0000_v0_0_s_ifspec;
#ifndef __IDMOWrapperFilter_INTERFACE_DEFINED__
#define __IDMOWrapperFilter_INTERFACE_DEFINED__
/* interface IDMOWrapperFilter */
/* [uuid][object] */
EXTERN_C const IID IID_IDMOWrapperFilter;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("52d6f586-9f0f-4824-8fc8-e32ca04930c2")
IDMOWrapperFilter : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Init(
REFCLSID clsidDMO,
REFCLSID catDMO) = 0;
};
#else /* C style interface */
typedef struct IDMOWrapperFilterVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IDMOWrapperFilter * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IDMOWrapperFilter * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IDMOWrapperFilter * This);
HRESULT ( STDMETHODCALLTYPE *Init )(
IDMOWrapperFilter * This,
REFCLSID clsidDMO,
REFCLSID catDMO);
END_INTERFACE
} IDMOWrapperFilterVtbl;
interface IDMOWrapperFilter
{
CONST_VTBL struct IDMOWrapperFilterVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IDMOWrapperFilter_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IDMOWrapperFilter_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IDMOWrapperFilter_Release(This) \
(This)->lpVtbl -> Release(This)
#define IDMOWrapperFilter_Init(This,clsidDMO,catDMO) \
(This)->lpVtbl -> Init(This,clsidDMO,catDMO)
#endif /* COBJMACROS */
#endif /* C style interface */
HRESULT STDMETHODCALLTYPE IDMOWrapperFilter_Init_Proxy(
IDMOWrapperFilter * This,
REFCLSID clsidDMO,
REFCLSID catDMO);
void __RPC_STUB IDMOWrapperFilter_Init_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IDMOWrapperFilter_INTERFACE_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

631
lib/directx8/dmoimpl.h Executable file
View File

@ -0,0 +1,631 @@
//------------------------------------------------------------------------------
// File: DMOImpl.h
//
// Desc: Classes to implement a DMO.
//
// Copyright (c) 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef _dmoimpl_h_
#define _dmoimpl_h_
#ifdef _DEBUG
#include <crtdbg.h>
#endif
// Class to implement a DMO
//
//
// Assumes the number of input and output streams is fixed
// (these are template parameters)
//
// Provides following services:
//
// Basic parameter checking and locking
// Fully implements :
// GetStreamCount
// SetInputType
// SetOutputType
// GetCurrentInputType
// GetCurrentOutputType
//
// Checks if all types are set before streaming
// Automatically calls AllocateStreamingResources before streaming
// if it's not been called already
// Prevents streaming until the types on all non-optional streams
// have been set
//
//
// Derived class implements the following methods :
//
/*
HRESULT InternalGetInputStreamInfo(DWORD dwInputStreamIndex, DWORD *pdwFlags);
HRESULT InternalGetOutputStreamInfo(DWORD dwOutputStreamIndex, DWORD *pdwFlags);
HRESULT InternalCheckInputType(DWORD dwInputStreamIndex, const DMO_MEDIA_TYPE *pmt);
HRESULT InternalCheckOutputType(DWORD dwOutputStreamIndex, const DMO_MEDIA_TYPE *pmt);
HRESULT InternalGetInputType(DWORD dwInputStreamIndex, DWORD dwTypeIndex,
DMO_MEDIA_TYPE *pmt);
HRESULT InternalGetOutputType(DWORD dwOutputStreamIndex, DWORD dwTypeIndex,
DMO_MEDIA_TYPE *pmt);
HRESULT InternalGetInputSizeInfo(DWORD dwInputStreamIndex, DWORD *pcbSize,
DWORD *pcbMaxLookahead, DWORD *pcbAlignment);
HRESULT InternalGetOutputSizeInfo(DWORD dwOutputStreamIndex, DWORD *pcbSize,
DWORD *pcbAlignment);
HRESULT InternalGetInputMaxLatency(DWORD dwInputStreamIndex, REFERENCE_TIME *prtMaxLatency);
HRESULT InternalSetInputMaxLatency(DWORD dwInputStreamIndex, REFERENCE_TIME rtMaxLatency);
HRESULT InternalFlush();
HRESULT InternalDiscontinuity(DWORD dwInputStreamIndex);
HRESULT InternalAllocateStreamingResources();
HRESULT InternalFreeStreamingResources();
HRESULT InternalProcessInput(DWORD dwInputStreamIndex, IMediaBuffer *pBuffer,
DWORD dwFlags, REFERENCE_TIME rtTimestamp,
REFERENCE_TIME rtTimelength);
HRESULT InternalProcessOutput(DWORD dwFlags, DWORD cOutputBufferCount,
DMO_OUTPUT_DATA_BUFFER *pOutputBuffers,
DWORD *pdwStatus);
HRESULT InternalAcceptingInput(DWORD dwInputStreamIndex);
void Lock();
void Unlock();
Notes:
The derived class is meant to do most work to initialize streaming
in AllocateStreamingResources rather than when types are set.
This centralizes the work to one
clear place based on the types set for all streams.
The derived class implements locking.
The derived class implements the IUnknown methods
Usage example (1 input and 1 output) :
class CMyDMO : public IMediaObjectImpl<CMyDmo, 1, 1>,
...
*/
#define INTERNAL_CALL(_T_, _X_) \
static_cast<_T_ *>(this)->Internal##_X_
template <class _DERIVED_, int NUMBEROFINPUTS, int NUMBEROFOUTPUTS>
class IMediaObjectImpl : public IMediaObject
{
private:
// Member variables
struct {
DWORD fTypeSet:1;
DWORD fIncomplete:1;
DMO_MEDIA_TYPE CurrentMediaType;
} m_InputInfo[NUMBEROFINPUTS], m_OutputInfo[NUMBEROFOUTPUTS];
bool m_fTypesSet;
bool m_fFlushed;
bool m_fResourcesAllocated;
protected:
// Helpers
bool InputTypeSet(DWORD ulInputStreamIndex) const
{
_ASSERTE(ulInputStreamIndex < NUMBEROFINPUTS);
return 0 != m_InputInfo[ulInputStreamIndex].fTypeSet;
}
bool OutputTypeSet(DWORD ulOutputStreamIndex) const
{
_ASSERTE(ulOutputStreamIndex < NUMBEROFOUTPUTS);
return 0 != m_OutputInfo[ulOutputStreamIndex].fTypeSet;
}
const DMO_MEDIA_TYPE *InputType(DWORD ulInputStreamIndex)
{
if (!InputTypeSet(ulInputStreamIndex)) {
return NULL;
}
return &m_InputInfo[ulInputStreamIndex].CurrentMediaType;
}
const DMO_MEDIA_TYPE *OutputType(DWORD ulOutputStreamIndex)
{
if (!OutputTypeSet(ulOutputStreamIndex)) {
return NULL;
}
return &m_OutputInfo[ulOutputStreamIndex].CurrentMediaType;
}
class LockIt
{
public:
LockIt(_DERIVED_ *p) : m_p(p)
{
static_cast<_DERIVED_ *>(m_p)->Lock();
}
~LockIt()
{
static_cast<_DERIVED_ *>(m_p)->Unlock();
}
_DERIVED_ *const m_p;
};
bool CheckTypesSet()
{
m_fTypesSet = false;
DWORD dw;
for (dw = 0; dw < NUMBEROFINPUTS; dw++) {
if (!InputTypeSet(dw)) {
return false;
}
}
for (dw = 0; dw < NUMBEROFOUTPUTS; dw++) {
if (!OutputTypeSet(dw)) {
// Check if it's optional
DWORD dwFlags;
#ifdef _DEBUG
dwFlags = 0xFFFFFFFF;
#endif
INTERNAL_CALL(_DERIVED_, GetOutputStreamInfo)(dw, &dwFlags);
_ASSERTE(0 == (dwFlags & ~(DMO_OUTPUT_STREAMF_WHOLE_SAMPLES |
DMO_OUTPUT_STREAMF_SINGLE_SAMPLE_PER_BUFFER |
DMO_OUTPUT_STREAMF_FIXED_SAMPLE_SIZE |
DMO_OUTPUT_STREAMF_DISCARDABLE |
DMO_OUTPUT_STREAMF_OPTIONAL)));
if (!(dwFlags & DMO_OUTPUT_STREAMF_OPTIONAL)) {
return false;
}
}
}
m_fTypesSet = true;
return true;
}
IMediaObjectImpl() :
m_fTypesSet(false),
m_fFlushed(true),
m_fResourcesAllocated(false)
{
ZeroMemory(&m_InputInfo, sizeof(m_InputInfo));
ZeroMemory(&m_OutputInfo, sizeof(m_OutputInfo));
}
virtual ~IMediaObjectImpl() {
DWORD dwCurrentType;
for (dwCurrentType = 0; dwCurrentType < NUMBEROFINPUTS; dwCurrentType++) {
if(InputTypeSet(dwCurrentType)) {
MoFreeMediaType(&m_InputInfo[dwCurrentType].CurrentMediaType);
}
}
for (dwCurrentType = 0; dwCurrentType < NUMBEROFOUTPUTS; dwCurrentType++) {
if(OutputTypeSet(dwCurrentType)) {
MoFreeMediaType(&m_OutputInfo[dwCurrentType].CurrentMediaType);
}
}
}
// IMediaObject methods
//
// IMediaObject methods
//
STDMETHODIMP GetStreamCount(unsigned long *pulNumberOfInputStreams, unsigned long *pulNumberOfOutputStreams)
{
LockIt lck(static_cast<_DERIVED_ *>(this));
if (pulNumberOfInputStreams == NULL ||
pulNumberOfOutputStreams == NULL) {
return E_POINTER;
}
*pulNumberOfInputStreams = NUMBEROFINPUTS;
*pulNumberOfOutputStreams = NUMBEROFOUTPUTS;
return S_OK;
}
STDMETHODIMP GetInputStreamInfo(ULONG ulStreamIndex, DWORD *pdwFlags)
{
LockIt lck(static_cast<_DERIVED_ *>(this));
if (ulStreamIndex >= NUMBEROFINPUTS) {
return DMO_E_INVALIDSTREAMINDEX;
}
if (pdwFlags == NULL) {
return E_POINTER;
}
HRESULT hr = INTERNAL_CALL(_DERIVED_, GetInputStreamInfo)(ulStreamIndex, pdwFlags);
_ASSERTE(0 == (*pdwFlags & ~(DMO_INPUT_STREAMF_WHOLE_SAMPLES |
DMO_INPUT_STREAMF_SINGLE_SAMPLE_PER_BUFFER |
DMO_INPUT_STREAMF_FIXED_SAMPLE_SIZE |
DMO_INPUT_STREAMF_HOLDS_BUFFERS)));
return hr;
}
STDMETHODIMP GetOutputStreamInfo(ULONG ulStreamIndex, DWORD *pdwFlags)
{
LockIt lck(static_cast<_DERIVED_ *>(this));
if (ulStreamIndex >= NUMBEROFOUTPUTS) {
return DMO_E_INVALIDSTREAMINDEX;
}
if (pdwFlags == NULL) {
return E_POINTER;
}
HRESULT hr = INTERNAL_CALL(_DERIVED_, GetOutputStreamInfo)(ulStreamIndex, pdwFlags);
_ASSERTE(0 == (*pdwFlags & ~(DMO_OUTPUT_STREAMF_WHOLE_SAMPLES |
DMO_OUTPUT_STREAMF_SINGLE_SAMPLE_PER_BUFFER |
DMO_OUTPUT_STREAMF_FIXED_SAMPLE_SIZE |
DMO_OUTPUT_STREAMF_DISCARDABLE |
DMO_OUTPUT_STREAMF_OPTIONAL)));
return hr;
}
STDMETHODIMP GetInputType(ULONG ulStreamIndex, ULONG ulTypeIndex, DMO_MEDIA_TYPE *pmt) {
if (ulStreamIndex >= NUMBEROFINPUTS) {
return DMO_E_INVALIDSTREAMINDEX;
}
LockIt lck(static_cast<_DERIVED_ *>(this));
return INTERNAL_CALL(_DERIVED_, GetInputType)(ulStreamIndex, ulTypeIndex, pmt);
}
STDMETHODIMP GetOutputType(ULONG ulStreamIndex, ULONG ulTypeIndex, DMO_MEDIA_TYPE *pmt) {
if (ulStreamIndex >= NUMBEROFOUTPUTS) {
return DMO_E_INVALIDSTREAMINDEX;
}
LockIt lck(static_cast<_DERIVED_ *>(this));
return INTERNAL_CALL(_DERIVED_, GetOutputType)(ulStreamIndex, ulTypeIndex, pmt);
}
STDMETHODIMP GetInputCurrentType(ULONG ulStreamIndex, DMO_MEDIA_TYPE *pmt) {
if (ulStreamIndex >= NUMBEROFINPUTS) {
return DMO_E_INVALIDSTREAMINDEX;
}
if (NULL == pmt) {
return E_POINTER;
}
LockIt lck(static_cast<_DERIVED_ *>(this));
if (InputTypeSet(ulStreamIndex))
return MoCopyMediaType(pmt,
&m_InputInfo[ulStreamIndex].CurrentMediaType);
else
return DMO_E_TYPE_NOT_SET;
}
STDMETHODIMP GetOutputCurrentType(ULONG ulStreamIndex, DMO_MEDIA_TYPE *pmt) {
if (ulStreamIndex >= NUMBEROFOUTPUTS) {
return DMO_E_INVALIDSTREAMINDEX;
}
if (NULL == pmt) {
return E_POINTER;
}
LockIt lck(static_cast<_DERIVED_ *>(this));
if (OutputTypeSet(ulStreamIndex))
return MoCopyMediaType(pmt,
&m_OutputInfo[ulStreamIndex].CurrentMediaType);
else
return DMO_E_TYPE_NOT_SET;
}
STDMETHODIMP GetInputSizeInfo(ULONG ulStreamIndex, ULONG *pulSize, ULONG *pcbMaxLookahead, ULONG *pulAlignment) {
if (ulStreamIndex >= NUMBEROFINPUTS) {
return DMO_E_INVALIDSTREAMINDEX;
}
if (NULL == pulSize || NULL == pulAlignment ||
NULL == pcbMaxLookahead) {
return E_POINTER;
}
LockIt lck(static_cast<_DERIVED_ *>(this));
if (!InputTypeSet(ulStreamIndex)) {
return DMO_E_TYPE_NOT_SET;
}
return INTERNAL_CALL(_DERIVED_, GetInputSizeInfo)(ulStreamIndex, pulSize, pcbMaxLookahead, pulAlignment);
}
STDMETHODIMP GetOutputSizeInfo(ULONG ulStreamIndex, ULONG *pulSize, ULONG *pulAlignment) {
if (ulStreamIndex >= NUMBEROFOUTPUTS) {
return DMO_E_INVALIDSTREAMINDEX;
}
if (NULL == pulSize || NULL == pulAlignment) {
return E_POINTER;
}
LockIt lck(static_cast<_DERIVED_ *>(this));
if (!m_fTypesSet || !OutputTypeSet(ulStreamIndex)) {
return DMO_E_TYPE_NOT_SET;
}
return INTERNAL_CALL(_DERIVED_, GetOutputSizeInfo)(ulStreamIndex, pulSize, pulAlignment);
}
STDMETHODIMP SetInputType(ULONG ulStreamIndex, const DMO_MEDIA_TYPE *pmt, DWORD dwFlags) {
if (ulStreamIndex >= NUMBEROFINPUTS) {
return DMO_E_INVALIDSTREAMINDEX;
}
if (dwFlags & ~ (DMO_SET_TYPEF_CLEAR | DMO_SET_TYPEF_TEST_ONLY)) {
return E_INVALIDARG;
}
LockIt lck(static_cast<_DERIVED_ *>(this));
if (dwFlags & DMO_SET_TYPEF_CLEAR) {
MoFreeMediaType(&m_InputInfo[ulStreamIndex].CurrentMediaType);
m_InputInfo[ulStreamIndex].fTypeSet = FALSE;
if (!CheckTypesSet()) {
Flush();
FreeStreamingResources();
}
return NOERROR;
}
if (NULL == pmt) {
return E_POINTER;
}
HRESULT hr = INTERNAL_CALL(_DERIVED_, CheckInputType)(ulStreamIndex, pmt);
if (FAILED(hr))
return hr;
if (dwFlags & DMO_SET_TYPEF_TEST_ONLY) {
return NOERROR;
}
// actually set the type
DMO_MEDIA_TYPE mtTemp;
if (S_OK == MoCopyMediaType(&mtTemp, pmt)) {
// Free any previous mediatype
if (InputTypeSet(ulStreamIndex)) {
MoFreeMediaType(&m_InputInfo[ulStreamIndex].CurrentMediaType);
}
m_InputInfo[ulStreamIndex].CurrentMediaType = mtTemp;
m_InputInfo[ulStreamIndex].fTypeSet = TRUE;
CheckTypesSet();
} else {
return E_OUTOFMEMORY;
}
return NOERROR;
}
STDMETHODIMP SetOutputType(ULONG ulStreamIndex, const DMO_MEDIA_TYPE *pmt, DWORD dwFlags) {
if (ulStreamIndex >= NUMBEROFOUTPUTS) {
return DMO_E_INVALIDSTREAMINDEX;
}
if (dwFlags & ~ (DMO_SET_TYPEF_CLEAR | DMO_SET_TYPEF_TEST_ONLY)) {
return E_INVALIDARG;
}
LockIt lck(static_cast<_DERIVED_ *>(this));
if (dwFlags & DMO_SET_TYPEF_CLEAR) {
MoFreeMediaType(&m_OutputInfo[ulStreamIndex].CurrentMediaType);
m_OutputInfo[ulStreamIndex].fTypeSet = FALSE;
if (!CheckTypesSet()) {
Flush();
FreeStreamingResources();
}
return NOERROR;
}
if (NULL == pmt) {
return E_POINTER;
}
HRESULT hr = INTERNAL_CALL(_DERIVED_, CheckOutputType)(ulStreamIndex, pmt);
if (FAILED(hr)) {
return hr;
}
if (dwFlags & DMO_SET_TYPEF_TEST_ONLY) {
return NOERROR;
}
// actually set the type
DMO_MEDIA_TYPE mtTemp;
if (S_OK == MoCopyMediaType(&mtTemp, pmt)) {
// Free any previous mediatype
if (OutputTypeSet(ulStreamIndex)) {
MoFreeMediaType(&m_OutputInfo[ulStreamIndex].CurrentMediaType);
}
m_OutputInfo[ulStreamIndex].CurrentMediaType = mtTemp;
m_OutputInfo[ulStreamIndex].fTypeSet = TRUE;
CheckTypesSet();
} else {
return E_OUTOFMEMORY;
}
return NOERROR;
}
STDMETHODIMP GetInputStatus(
ULONG ulStreamIndex,
DWORD *pdwStatus
) {
if (ulStreamIndex >= NUMBEROFINPUTS) {
return DMO_E_INVALIDSTREAMINDEX;
}
if (NULL == pdwStatus) {
return E_POINTER;
}
*pdwStatus = 0;
LockIt lck(static_cast<_DERIVED_ *>(this));
if (!m_fTypesSet) {
return DMO_E_TYPE_NOT_SET;
}
if (INTERNAL_CALL(_DERIVED_, AcceptingInput)(ulStreamIndex) == S_OK) {
*pdwStatus |= DMO_INPUT_STATUSF_ACCEPT_DATA;
}
return NOERROR;
}
STDMETHODIMP GetInputMaxLatency(unsigned long ulStreamIndex, REFERENCE_TIME *prtLatency) {
if (prtLatency == NULL) {
return E_POINTER;
}
if (ulStreamIndex >= NUMBEROFINPUTS) {
return DMO_E_INVALIDSTREAMINDEX;
}
LockIt lck(static_cast<_DERIVED_ *>(this));
return INTERNAL_CALL(_DERIVED_, GetInputMaxLatency)(ulStreamIndex, prtLatency);
}
STDMETHODIMP SetInputMaxLatency(unsigned long ulStreamIndex, REFERENCE_TIME rtLatency) {
if (ulStreamIndex >= NUMBEROFINPUTS) {
return DMO_E_INVALIDSTREAMINDEX;
}
LockIt lck(static_cast<_DERIVED_ *>(this));
return INTERNAL_CALL(_DERIVED_, SetInputMaxLatency)(ulStreamIndex, rtLatency);
}
STDMETHODIMP Discontinuity(ULONG ulStreamIndex) {
if (ulStreamIndex >= NUMBEROFINPUTS) {
return DMO_E_INVALIDSTREAMINDEX;
}
LockIt lck(static_cast<_DERIVED_ *>(this));
if (!m_fTypesSet) {
return DMO_E_TYPE_NOT_SET;
}
if (S_OK != INTERNAL_CALL(_DERIVED_, AcceptingInput)(ulStreamIndex)) {
return DMO_E_NOTACCEPTING;
}
return INTERNAL_CALL(_DERIVED_, Discontinuity)(ulStreamIndex);
}
STDMETHODIMP Flush()
{
LockIt lck(static_cast<_DERIVED_ *>(this));
if (!m_fTypesSet) {
return S_OK;
}
if (m_fFlushed) {
return S_OK;
}
HRESULT hr = INTERNAL_CALL(_DERIVED_, Flush)();
m_fFlushed = true;
return hr;
}
STDMETHODIMP AllocateStreamingResources() {
LockIt lck(static_cast<_DERIVED_ *>(this));
if (!m_fTypesSet) {
return DMO_E_TYPE_NOT_SET;
}
if (m_fResourcesAllocated) {
return S_OK;
}
HRESULT hr = INTERNAL_CALL(_DERIVED_, AllocateStreamingResources)();
if (SUCCEEDED(hr)) {
m_fResourcesAllocated = true;
}
return hr;
}
STDMETHODIMP FreeStreamingResources()
{
LockIt lck(static_cast<_DERIVED_ *>(this));
if (m_fResourcesAllocated) {
m_fResourcesAllocated = false;
INTERNAL_CALL(_DERIVED_, Flush)();
return INTERNAL_CALL(_DERIVED_, FreeStreamingResources)();
}
return S_OK;
}
//
// Processing methods - public entry points
//
STDMETHODIMP ProcessInput(
DWORD ulStreamIndex,
IMediaBuffer *pBuffer, // [in], must not be NULL
DWORD dwFlags, // [in] - discontinuity, timestamp, etc.
REFERENCE_TIME rtTimestamp, // [in], valid if flag set
REFERENCE_TIME rtTimelength // [in], valid if flag set
) {
if (!pBuffer) {
return E_POINTER;
}
if (ulStreamIndex >= NUMBEROFINPUTS) {
return DMO_E_INVALIDSTREAMINDEX;
}
if (dwFlags & ~(DMO_INPUT_DATA_BUFFERF_SYNCPOINT |
DMO_INPUT_DATA_BUFFERF_TIME |
DMO_INPUT_DATA_BUFFERF_TIMELENGTH)) {
return E_INVALIDARG;
}
LockIt lck(static_cast<_DERIVED_ *>(this));
// Make sure all streams have media types set and resources are allocated
HRESULT hr = AllocateStreamingResources();
if (FAILED(hr)) {
return hr;
}
if (INTERNAL_CALL(_DERIVED_, AcceptingInput)(ulStreamIndex) != S_OK) {
return DMO_E_NOTACCEPTING;
}
m_fFlushed = false;
return INTERNAL_CALL(_DERIVED_, ProcessInput)(
ulStreamIndex,
pBuffer,
dwFlags,
rtTimestamp,
rtTimelength);
}
STDMETHODIMP ProcessOutput(
DWORD dwFlags,
DWORD ulOutputBufferCount,
DMO_OUTPUT_DATA_BUFFER *pOutputBuffers,
DWORD *pdwStatus)
{
if (pdwStatus == NULL) {
return E_POINTER;
}
if (ulOutputBufferCount != NUMBEROFOUTPUTS || (dwFlags & ~DMO_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER)) {
return E_INVALIDARG;
}
if (NUMBEROFOUTPUTS != 0 && pOutputBuffers == NULL) {
return E_POINTER;
}
*pdwStatus = 0;
LockIt lck(static_cast<_DERIVED_ *>(this));
HRESULT hr = AllocateStreamingResources();
if (FAILED(hr)) {
return hr;
}
for (DWORD dw = 0; dw < NUMBEROFOUTPUTS; dw++) {
pOutputBuffers[dw].dwStatus = 0;
}
hr = INTERNAL_CALL(_DERIVED_, ProcessOutput)(
dwFlags,
ulOutputBufferCount,
pOutputBuffers,
pdwStatus);
// remember the DMO's incomplete status
for (dw = 0; dw < NUMBEROFOUTPUTS; dw++) {
if (pOutputBuffers[dw].dwStatus & DMO_OUTPUT_DATA_BUFFERF_INCOMPLETE) {
m_OutputInfo[dw].fIncomplete = TRUE;
} else {
m_OutputInfo[dw].fIncomplete = FALSE;
}
}
return hr;
}
STDMETHODIMP DMOLock(LONG lLock)
{
if (lLock) {
static_cast<_DERIVED_ *>(this)->Lock();
} else {
static_cast<_DERIVED_ *>(this)->Unlock();
}
return S_OK;
}
};
#endif // _dmoimpl_h_

110
lib/directx8/dmoreg.h Executable file
View File

@ -0,0 +1,110 @@
//------------------------------------------------------------------------------
// File: DMOReg.h
//
// Desc:
//
// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __DMOREG_H__
#define __DMOREG_H__
#include "mediaobj.h"
// 57f2db8b-e6bb-4513-9d43-dcd2a6593125
DEFINE_GUID(DMOCATEGORY_AUDIO_DECODER, 0x57f2db8b,0xe6bb,0x4513,0x9d,0x43,0xdc,0xd2,0xa6,0x59,0x31,0x25);
// 33D9A761-90C8-11d0-BD43-00A0C911CE86
DEFINE_GUID(DMOCATEGORY_AUDIO_ENCODER, 0x33D9A761,0x90C8,0x11d0,0xBD,0x43,0x00,0xA0,0xC9,0x11,0xCE,0x86);
// 4a69b442-28be-4991-969c-b500adf5d8a8
DEFINE_GUID(DMOCATEGORY_VIDEO_DECODER, 0x4a69b442,0x28be,0x4991,0x96,0x9c,0xb5,0x00,0xad,0xf5,0xd8,0xa8);
// 33D9A760-90C8-11d0-BD43-00A0C911CE86
DEFINE_GUID(DMOCATEGORY_VIDEO_ENCODER, 0x33D9A760,0x90C8,0x11d0,0xBD,0x43,0x00,0xA0,0xC9,0x11,0xCE,0x86);
// f3602b3f-0592-48df-a4cd-674721e7ebeb
DEFINE_GUID(DMOCATEGORY_AUDIO_EFFECT, 0xf3602b3f,0x0592,0x48df,0xa4,0xcd,0x67,0x47,0x21,0xe7,0xeb,0xeb);
// d990ee14-776c-4723-be46-3da2f56f10b9
DEFINE_GUID(DMOCATEGORY_VIDEO_EFFECT, 0xd990ee14,0x776c,0x4723,0xbe,0x46,0x3d,0xa2,0xf5,0x6f,0x10,0xb9);
// f665aaba-3e09-4920-aa5f-219811148f09
DEFINE_GUID(DMOCATEGORY_AUDIO_CAPTURE_EFFECT, 0xf665aaba,0x3e09,0x4920,0xaa,0x5f,0x21,0x98,0x11,0x14,0x8f,0x09);
// Acoustic Echo Canceller {BF963D80-C559-11D0-8A2B-00A0C9255AC1}
// Matches KSNODETYPE_ACOUSTIC_ECHO_CANCEL in ksmedia.h
DEFINE_GUID(DMOCATEGORY_ACOUSTIC_ECHO_CANCEL, 0xBF963D80L, 0xC559, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1);
// Noise Supression {E07F903F-62FD-4e60-8CDD-DEA7236665B5}
// Matches KSNODETYPE_AUDIO_NOISE_SUPPRESS in post Windows ME DDK's ksmedia.h
DEFINE_GUID(DMOCATEGORY_AUDIO_NOISE_SUPPRESS, 0xe07f903f, 0x62fd, 0x4e60, 0x8c, 0xdd, 0xde, 0xa7, 0x23, 0x66, 0x65, 0xb5);
// Automatic Gain Control {E88C9BA0-C557-11D0-8A2B-00A0C9255AC1}
// Matches KSNODETYPE_AGC in ksmedia.h
DEFINE_GUID(DMOCATEGORY_AGC, 0xE88C9BA0L, 0xC557, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1);
typedef struct _DMO_PARTIAL_MEDIATYPE {
GUID type;
GUID subtype;
} DMO_PARTIAL_MEDIATYPE, *PDMO_PARTIAL_MEDIATYPE;
enum DMO_REGISTER_FLAGS {
DMO_REGISTERF_IS_KEYED = 0x00000001
};
enum DMO_ENUM_FLAGS {
DMO_ENUMF_INCLUDE_KEYED = 0x00000001
};
STDAPI DMORegister(
LPCWSTR szName,
REFCLSID clsidDMO,
REFGUID guidCategory,
DWORD dwFlags, // DMO_REGISTERF_XXX
//
// Register all mediatypes supported by the object. This carries no
// information about which combinations of input/output types would
// actually work.
//
DWORD cInTypes,
const DMO_PARTIAL_MEDIATYPE *pInTypes,
DWORD cOutTypes,
const DMO_PARTIAL_MEDIATYPE *pOutTypes
);
STDAPI DMOUnregister(
REFCLSID clsidDMO,
REFGUID guidCategory // optional - GUID_NULL means unregister from all
);
STDAPI DMOEnum(
REFGUID guidCategory, // GUID_NULL for "all"
DWORD dwFlags, // DMO_ENUMF_XXX
//
// Enumerate only objects that support at least one of the specified input types
// and at least one of the specified output types. If no input types are specified,
// enumerate objects regardless of what input types they support. Same for
// output types.
//
DWORD cInTypes,
const DMO_PARTIAL_MEDIATYPE *pInTypes, // can be NULL only of ulInTypes = 0
DWORD cOutTypes,
const DMO_PARTIAL_MEDIATYPE *pOutTypes, // can be NULL only of ulOutTypes = 0
//
// Output parameter - this receives a pointer to the DMO CLSID enumerator
//
IEnumDMO **ppEnum
);
STDAPI DMOGetTypes(
REFCLSID clsidDMO,
unsigned long ulInputTypesRequested,
unsigned long *pulInputTypesSupplied,
DMO_PARTIAL_MEDIATYPE *pInputTypes,
unsigned long ulOutputTypesRequested,
unsigned long *pulOutputTypesSupplied,
DMO_PARTIAL_MEDIATYPE *pOutputTypes
);
STDAPI DMOGetName(
REFCLSID clsidDMO,
WCHAR szName[80]
);
#endif //__DMOREG_H__

75
lib/directx8/dmort.h Executable file
View File

@ -0,0 +1,75 @@
//------------------------------------------------------------------------------
// File: DMORt.h
//
// Desc: Miscellaneous runtime support for DirectShow Media Objects
//
// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __DMORT_H__
#define __DMORT_H__
//
// Mediatype helpers. MoInitMediaType() goes with MoFreeMediaType(),
// MoCreateMediaType() goes with MoDeleteMediaType() - don't mix !
//
//
// Takes a pointer to an already allocated DMO_MEDIA_TYPE structure, allocates
// a format block of cbFormat bytes, and sets appropriate members of
// DMO_MEDIA_TYPE to point to the newly allocated format block. Also
// initializes the IUnknown pointer inside DMO_MEDIA_TYPE to NULL.
//
// The format block allocated by MoInitMediaType must be freed by calling
// MoFreeMediaType().
//
STDAPI MoInitMediaType(DMO_MEDIA_TYPE *pmt, DWORD cbFormat);
//
// Frees the format block and releases any IUnknown, but does not free the
// DMO_MEDIA_TYPE structure itself. Input parameter must point to an
// DMO_MEDIA_TYPE structure previously initialized by MoInitMediaType().
//
STDAPI MoFreeMediaType(DMO_MEDIA_TYPE *pmt);
//
// Copies the DMO_MEDIA_TYPE members. Also duplicates the format block and
// the IUnknown pointer. Both parameters must point to valid DMO_MEDIA_TYPE
// structures. Target structure must be later freed using MoFreeMediaType().
//
STDAPI MoCopyMediaType(DMO_MEDIA_TYPE *pmtDest, const DMO_MEDIA_TYPE *pmtSrc);
//
// Allocates a new DMO_MEDIA_TYPE structure and initializes it just like
// MoInitMediaType. I.e., this function allocates both the format block
// and the DMO_MEDIA_TYPE structure itself. Pointer to DMO_MEDIA_TYPE is
// returned as *ppmt.
//
// DMO_MEDIA_TYPE structures allocated by MoCreateMediaType() must be freed
// by calling MoDeleteMediaType().
//
STDAPI MoCreateMediaType(DMO_MEDIA_TYPE **ppmt, DWORD cbFormat);
//
// Frees any format block, releases any IUnknown, and deletes the
// DMO_MEDIA_TYPE structure itself. The input parameter must point to an
// DMO_MEDIA_TYPE structure previously allocated by MoCreateMediaType().
//
STDAPI MoDeleteMediaType(DMO_MEDIA_TYPE *pmt);
//
// Allocates a new DMO_MEDIA_TYPE structure and copies pmtSrc into it like
// MoCopyMediaType. I.e., this function allocates a new DMO_MEDIA_TYPE struct
// as well as a new format block for the target mediatype. Trager mediatype
// must later be freed using MoDeleteMediaType().
//
STDAPI MoDuplicateMediaType(DMO_MEDIA_TYPE **ppmtDest, const DMO_MEDIA_TYPE *pmtSrc);
#endif //__DMORT_H__

281
lib/directx8/dmplugin.h Executable file
View File

@ -0,0 +1,281 @@
/************************************************************************
* *
* dmplugin.h -- This module contains the API for plugins for the *
* DirectMusic performance layer *
* *
* Copyright (c) 1998-1999 Microsoft Corporation *
* *
************************************************************************/
#ifndef _DMPLUGIN_
#define _DMPLUGIN_
#include <windows.h>
#define COM_NO_WINDOWS_H
#include <objbase.h>
#include <mmsystem.h>
#include <dmusici.h>
#include <pshpack8.h>
#ifdef __cplusplus
extern "C" {
#endif
interface IDirectMusicTrack;
interface IDirectMusicTool;
interface IDirectMusicTool8;
interface IDirectMusicTrack8;
interface IDirectMusicPerformance;
interface IDirectMusicPerformance8;
interface IDirectMusicSegment;
interface IDirectMusicSegment8;
interface IDirectMusicSegmentState;
interface IDirectMusicSegmentState8;
interface IDirectMusicGraph;
#ifndef __cplusplus
typedef interface IDirectMusicTrack IDirectMusicTrack;
typedef interface IDirectMusicTool IDirectMusicTool;
typedef interface IDirectMusicTool8 IDirectMusicTool8;
typedef interface IDirectMusicTrack8 IDirectMusicTrack8;
typedef interface IDirectMusicPerformance IDirectMusicPerformance;
typedef interface IDirectMusicPerformance8 IDirectMusicPerformance8;
typedef interface IDirectMusicSegment IDirectMusicSegment;
typedef interface IDirectMusicSegment8 IDirectMusicSegment8;
typedef interface IDirectMusicSegmentState IDirectMusicSegmentState;
typedef interface IDirectMusicSegmentState8 IDirectMusicSegmentState8;
typedef interface IDirectMusicGraph IDirectMusicGraph;
#endif
typedef struct _DMUS_PMSG DMUS_PMSG;
typedef long MUSIC_TIME;
/* Registry location for tools */
#define DMUS_REGSTR_PATH_TOOLS "Software\\Microsoft\\DirectMusic\\Tools"
/*////////////////////////////////////////////////////////////////////
// IDirectMusicTool */
#undef INTERFACE
#define INTERFACE IDirectMusicTool
DECLARE_INTERFACE_(IDirectMusicTool, IUnknown)
{
/* IUnknown */
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectMusicTool */
STDMETHOD(Init) (THIS_ IDirectMusicGraph* pGraph) PURE;
STDMETHOD(GetMsgDeliveryType) (THIS_ DWORD* pdwDeliveryType ) PURE;
STDMETHOD(GetMediaTypeArraySize)(THIS_ DWORD* pdwNumElements ) PURE;
STDMETHOD(GetMediaTypes) (THIS_ DWORD** padwMediaTypes,
DWORD dwNumElements) PURE;
STDMETHOD(ProcessPMsg) (THIS_ IDirectMusicPerformance* pPerf,
DMUS_PMSG* pPMSG) PURE;
STDMETHOD(Flush) (THIS_ IDirectMusicPerformance* pPerf,
DMUS_PMSG* pPMSG,
REFERENCE_TIME rtTime) PURE;
};
/*////////////////////////////////////////////////////////////////////
// IDirectMusicTool8 */
#undef INTERFACE
#define INTERFACE IDirectMusicTool8
DECLARE_INTERFACE_(IDirectMusicTool8, IDirectMusicTool)
{
/* IUnknown */
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectMusicTool */
STDMETHOD(Init) (THIS_ IDirectMusicGraph* pGraph) PURE;
STDMETHOD(GetMsgDeliveryType) (THIS_ DWORD* pdwDeliveryType ) PURE;
STDMETHOD(GetMediaTypeArraySize)(THIS_ DWORD* pdwNumElements ) PURE;
STDMETHOD(GetMediaTypes) (THIS_ DWORD** padwMediaTypes,
DWORD dwNumElements) PURE;
STDMETHOD(ProcessPMsg) (THIS_ IDirectMusicPerformance* pPerf,
DMUS_PMSG* pPMSG) PURE;
STDMETHOD(Flush) (THIS_ IDirectMusicPerformance* pPerf,
DMUS_PMSG* pPMSG,
REFERENCE_TIME rtTime) PURE;
/* IDirectMusicTool8 */
STDMETHOD(Clone) (THIS_ IDirectMusicTool ** ppTool) PURE;
};
/* The following flags are sent in the IDirectMusicTrack::Play() method */
/* inside the dwFlags parameter */
typedef enum enumDMUS_TRACKF_FLAGS
{
DMUS_TRACKF_SEEK = 1, /* set on a seek */
DMUS_TRACKF_LOOP = 2, /* set on a loop (repeat) */
DMUS_TRACKF_START = 4, /* set on first call to Play */
DMUS_TRACKF_FLUSH = 8, /* set when this call is in response to a flush on the perfomance */
DMUS_TRACKF_DIRTY = 0x10, /* set when the track should consider any cached values from a previous call to GetParam to be invalidated */
/* The following flags are DX8 only. */
DMUS_TRACKF_NOTIFY_OFF = 0x20, /* tells track not to send notifications. */
DMUS_TRACKF_PLAY_OFF = 0x40, /* tells track not to play anything (but can still send notifications.) */
DMUS_TRACKF_LOOPEND = 0x80, /* set when the end of range is also a loop end. */
DMUS_TRACKF_STOP = 0x100, /* set when the end of range is also end of playing this segment. */
DMUS_TRACKF_RECOMPOSE = 0x200, /* set to indicate the track should compose. */
DMUS_TRACKF_CLOCK = 0x400, /* set when time parameters are in reference (clock) time. Only valid for PlayEx(). */
} DMUS_TRACKF_FLAGS;
/* The following flags are sent in the IDirectMusicTrack8::GetParamEx() and SetParamEx() methods */
/* inside the dwFlags parameter */
#define DMUS_TRACK_PARAMF_CLOCK 0x01 /* set when the time is measured is in reference (clock) time */
/*////////////////////////////////////////////////////////////////////
// IDirectMusicTrack */
#undef INTERFACE
#define INTERFACE IDirectMusicTrack
DECLARE_INTERFACE_(IDirectMusicTrack, IUnknown)
{
/* IUnknown */
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectMusicTrack */
STDMETHOD(Init) (THIS_ IDirectMusicSegment* pSegment) PURE;
STDMETHOD(InitPlay) (THIS_ IDirectMusicSegmentState* pSegmentState,
IDirectMusicPerformance* pPerformance,
void** ppStateData,
DWORD dwVirtualTrackID,
DWORD dwFlags) PURE;
STDMETHOD(EndPlay) (THIS_ void* pStateData) PURE;
STDMETHOD(Play) (THIS_ void* pStateData,
MUSIC_TIME mtStart,
MUSIC_TIME mtEnd,
MUSIC_TIME mtOffset,
DWORD dwFlags,
IDirectMusicPerformance* pPerf,
IDirectMusicSegmentState* pSegSt,
DWORD dwVirtualID) PURE;
STDMETHOD(GetParam) (THIS_ REFGUID rguidType,
MUSIC_TIME mtTime,
MUSIC_TIME* pmtNext,
void* pParam) PURE;
STDMETHOD(SetParam) (THIS_ REFGUID rguidType,
MUSIC_TIME mtTime,
void* pParam) PURE;
STDMETHOD(IsParamSupported) (THIS_ REFGUID rguidType) PURE;
STDMETHOD(AddNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
STDMETHOD(RemoveNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
STDMETHOD(Clone) (THIS_ MUSIC_TIME mtStart,
MUSIC_TIME mtEnd,
IDirectMusicTrack** ppTrack) PURE;
};
/*////////////////////////////////////////////////////////////////////
// IDirectMusicTrack8 */
#undef INTERFACE
#define INTERFACE IDirectMusicTrack8
DECLARE_INTERFACE_(IDirectMusicTrack8, IDirectMusicTrack)
{
/* IUnknown */
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectMusicTrack */
STDMETHOD(Init) (THIS_ IDirectMusicSegment* pSegment) PURE;
STDMETHOD(InitPlay) (THIS_ IDirectMusicSegmentState* pSegmentState,
IDirectMusicPerformance* pPerformance,
void** ppStateData,
DWORD dwVirtualTrackID,
DWORD dwFlags) PURE;
STDMETHOD(EndPlay) (THIS_ void* pStateData) PURE;
STDMETHOD(Play) (THIS_ void* pStateData,
MUSIC_TIME mtStart,
MUSIC_TIME mtEnd,
MUSIC_TIME mtOffset,
DWORD dwFlags,
IDirectMusicPerformance* pPerf,
IDirectMusicSegmentState* pSegSt,
DWORD dwVirtualID) PURE;
STDMETHOD(GetParam) (THIS_ REFGUID rguidType,
MUSIC_TIME mtTime,
MUSIC_TIME* pmtNext,
void* pParam) PURE;
STDMETHOD(SetParam) (THIS_ REFGUID rguidType,
MUSIC_TIME mtTime,
void* pParam) PURE;
STDMETHOD(IsParamSupported) (THIS_ REFGUID rguidType) PURE;
STDMETHOD(AddNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
STDMETHOD(RemoveNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
STDMETHOD(Clone) (THIS_ MUSIC_TIME mtStart,
MUSIC_TIME mtEnd,
IDirectMusicTrack** ppTrack) PURE;
/* IDirectMusicTrack8 */
STDMETHOD(PlayEx) (THIS_ void* pStateData,
REFERENCE_TIME rtStart,
REFERENCE_TIME rtEnd,
REFERENCE_TIME rtOffset,
DWORD dwFlags,
IDirectMusicPerformance* pPerf,
IDirectMusicSegmentState* pSegSt,
DWORD dwVirtualID) PURE;
STDMETHOD(GetParamEx) (THIS_ REFGUID rguidType, /* Command type. */
REFERENCE_TIME rtTime, /* Time, in ref time if dwFlags == DMUS_TRACK_PARAMF_CLOCK. Otherwise, music time. */
REFERENCE_TIME* prtNext, /* Time of next parameter, relative to rtTime, in music or clock time units. */
void* pParam, /* Pointer to the parameter data. */
void * pStateData, /* State data for track instance. */
DWORD dwFlags) PURE; /* Control flags. */
STDMETHOD(SetParamEx) (THIS_ REFGUID rguidType,
REFERENCE_TIME rtTime,
void* pParam, /* Pointer to the parameter data. */
void * pStateData, /* State data for track instance. */
DWORD dwFlags) PURE; /* Control flags. */
STDMETHOD(Compose) (THIS_ IUnknown* pContext, /* Context for composition (song or segment) */
DWORD dwTrackGroup,
IDirectMusicTrack** ppResultTrack) PURE;
STDMETHOD(Join) (THIS_ IDirectMusicTrack* pNewTrack,
MUSIC_TIME mtJoin,
IUnknown* pContext, /* Context for joining (song or segment) */
DWORD dwTrackGroup,
IDirectMusicTrack** ppResultTrack) PURE;
};
/* CLSID's */
DEFINE_GUID(CLSID_DirectMusicTempoTrack,0xd2ac2885, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
DEFINE_GUID(CLSID_DirectMusicSeqTrack,0xd2ac2886, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
DEFINE_GUID(CLSID_DirectMusicSysExTrack,0xd2ac2887, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
DEFINE_GUID(CLSID_DirectMusicTimeSigTrack,0xd2ac2888, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
DEFINE_GUID(CLSID_DirectMusicChordTrack,0xd2ac288b, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
DEFINE_GUID(CLSID_DirectMusicCommandTrack,0xd2ac288c, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
DEFINE_GUID(CLSID_DirectMusicStyleTrack,0xd2ac288d, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
DEFINE_GUID(CLSID_DirectMusicMotifTrack,0xd2ac288e, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
DEFINE_GUID(CLSID_DirectMusicSignPostTrack,0xf17e8672, 0xc3b4, 0x11d1, 0x87, 0xb, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
DEFINE_GUID(CLSID_DirectMusicBandTrack,0xd2ac2894, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
DEFINE_GUID(CLSID_DirectMusicChordMapTrack,0xd2ac2896, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
DEFINE_GUID(CLSID_DirectMusicMuteTrack,0xd2ac2898, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
/* New CLSID's for DX8 */
DEFINE_GUID(CLSID_DirectMusicScriptTrack,0x4108fa85, 0x3586, 0x11d3, 0x8b, 0xd7, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xb6); /* {4108FA85-3586-11d3-8BD7-00600893B1B6} */
DEFINE_GUID(CLSID_DirectMusicMarkerTrack,0x55a8fd00, 0x4288, 0x11d3, 0x9b, 0xd1, 0x8a, 0xd, 0x61, 0xc8, 0x88, 0x35);
DEFINE_GUID(CLSID_DirectMusicSegmentTriggerTrack, 0xbae4d665, 0x4ea1, 0x11d3, 0x8b, 0xda, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xb6); /* {BAE4D665-4EA1-11d3-8BDA-00600893B1B6} */
DEFINE_GUID(CLSID_DirectMusicLyricsTrack, 0x995c1cf5, 0x54ff, 0x11d3, 0x8b, 0xda, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xb6); /* {995C1CF5-54FF-11d3-8BDA-00600893B1B6} */
DEFINE_GUID(CLSID_DirectMusicParamControlTrack, 0x4be0537b, 0x5c19, 0x11d3, 0x8b, 0xdc, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xb6); /* {4BE0537B-5C19-11d3-8BDC-00600893B1B6} */
DEFINE_GUID(CLSID_DirectMusicMelodyFormulationTrack, 0xb0684266, 0xb57f, 0x11d2, 0x97, 0xf9, 0x0, 0xc0, 0x4f, 0xa3, 0x6e, 0x58);
DEFINE_GUID(CLSID_DirectMusicWaveTrack,0xeed36461, 0x9ea5, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74);
/* IID's */
DEFINE_GUID(IID_IDirectMusicTrack, 0xf96029a1, 0x4282, 0x11d2, 0x87, 0x17, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
DEFINE_GUID(IID_IDirectMusicTool,0xd2ac28ba, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
/* Interface IDs for DX8 */
/* changed interfaces (GUID only) */
DEFINE_GUID(IID_IDirectMusicTool8, 0xe674303, 0x3b05, 0x11d3, 0x9b, 0xd1, 0xf9, 0xe7, 0xf0, 0xa0, 0x15, 0x36);
DEFINE_GUID(IID_IDirectMusicTrack8, 0xe674304, 0x3b05, 0x11d3, 0x9b, 0xd1, 0xf9, 0xe7, 0xf0, 0xa0, 0x15, 0x36);
#ifdef __cplusplus
}; /* extern "C" */
#endif
#include <poppack.h>
#endif /* #ifndef _DMPLUGIN_ */

41
lib/directx8/dmusbuff.h Executable file
View File

@ -0,0 +1,41 @@
/***************************************************************************
* *
* DMusBuff.h -- This module defines the buffer format for DirectMusic *
* Shared file between user mode and kernel mode components *
* *
* Copyright (c) 1998, Microsoft Corp. All rights reserved. *
* *
***************************************************************************/
#ifndef _DMusBuff_
#define _DMusBuff_
/* Format of DirectMusic events in a buffer
*
* A buffer contains 1 or more events, each with the following header.
* Immediately following the header is the event data. The header+data
* size is rounded to the nearest quadword (8 bytes).
*/
#include <pshpack4.h> /* Do not pad at end - that's where the data is */
typedef struct _DMUS_EVENTHEADER *LPDMUS_EVENTHEADER;
typedef struct _DMUS_EVENTHEADER
{
DWORD cbEvent; /* Unrounded bytes in event */
DWORD dwChannelGroup; /* Channel group of event */
REFERENCE_TIME rtDelta; /* Delta from start time of entire buffer */
DWORD dwFlags; /* Flags DMUS_EVENT_xxx */
} DMUS_EVENTHEADER;
#include <poppack.h>
#define DMUS_EVENT_STRUCTURED 0x00000001 /* Unstructured data (SysEx, etc.) */
/* The number of bytes to allocate for an event with 'cb' data bytes.
*/
#define QWORD_ALIGN(x) (((x) + 7) & ~7)
#define DMUS_EVENT_SIZE(cb) QWORD_ALIGN(sizeof(DMUS_EVENTHEADER) + cb)
#endif /* _DMusBuff_ */

783
lib/directx8/dmusicc.h Executable file
View File

@ -0,0 +1,783 @@
/************************************************************************
* *
* dmusicc.h -- This module defines the DirectMusic core API's *
* *
* Copyright (c) 1998-1999 Microsoft Corporation
* *
************************************************************************/
#ifndef _DMUSICC_
#define _DMUSICC_
#include <windows.h>
#define COM_NO_WINDOWS_H
#include <objbase.h>
#include <mmsystem.h>
#include "dls1.h"
#include "dmerror.h"
#include "dmdls.h"
#include "dsound.h"
#include "dmusbuff.h"
#include <pshpack8.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef ULONGLONG SAMPLE_TIME;
typedef ULONGLONG SAMPLE_POSITION;
typedef SAMPLE_TIME *LPSAMPLE_TIME;
#define DMUS_MAX_DESCRIPTION 128
#define DMUS_MAX_DRIVER 128
typedef struct _DMUS_BUFFERDESC *LPDMUS_BUFFERDESC;
typedef struct _DMUS_BUFFERDESC
{
DWORD dwSize;
DWORD dwFlags;
GUID guidBufferFormat;
DWORD cbBuffer;
} DMUS_BUFFERDESC;
/* DMUS_EFFECT_ flags are used in the dwEffectFlags fields of both DMUS_PORTCAPS
* and DMUS_PORTPARAMS.
*/
#define DMUS_EFFECT_NONE 0x00000000
#define DMUS_EFFECT_REVERB 0x00000001
#define DMUS_EFFECT_CHORUS 0x00000002
/* For DMUS_PORTCAPS dwClass
*/
#define DMUS_PC_INPUTCLASS (0)
#define DMUS_PC_OUTPUTCLASS (1)
/* For DMUS_PORTCAPS dwFlags
*/
#define DMUS_PC_DLS (0x00000001) // Supports DLS downloading and DLS level 1.
#define DMUS_PC_EXTERNAL (0x00000002) // External MIDI module.
#define DMUS_PC_SOFTWARESYNTH (0x00000004) // Software synthesizer.
#define DMUS_PC_MEMORYSIZEFIXED (0x00000008) // Memory size is fixed.
#define DMUS_PC_GMINHARDWARE (0x00000010) // GM sound set is built in, no need to download.
#define DMUS_PC_GSINHARDWARE (0x00000020) // GS sound set is built in.
#define DMUS_PC_XGINHARDWARE (0x00000040) // XG sound set is built in.
#define DMUS_PC_DIRECTSOUND (0x00000080) // Connects to DirectSound via a DSound buffer.
#define DMUS_PC_SHAREABLE (0x00000100) // Synth can be actively shared by multiple apps at once.
#define DMUS_PC_DLS2 (0x00000200) // Supports DLS2 instruments.
#define DMUS_PC_AUDIOPATH (0x00000400) // Multiple outputs can be connected to DirectSound for audiopaths.
#define DMUS_PC_WAVE (0x00000800) // Supports streaming and one shot waves.
#define DMUS_PC_SYSTEMMEMORY (0x7FFFFFFF) // Sample memory is system memory.
typedef struct _DMUS_PORTCAPS
{
DWORD dwSize;
DWORD dwFlags;
GUID guidPort;
DWORD dwClass;
DWORD dwType;
DWORD dwMemorySize;
DWORD dwMaxChannelGroups;
DWORD dwMaxVoices;
DWORD dwMaxAudioChannels;
DWORD dwEffectFlags;
WCHAR wszDescription[DMUS_MAX_DESCRIPTION];
} DMUS_PORTCAPS;
typedef DMUS_PORTCAPS *LPDMUS_PORTCAPS;
/* Values for DMUS_PORTCAPS dwType. This field indicates the underlying
* driver type of the port.
*/
#define DMUS_PORT_WINMM_DRIVER (0)
#define DMUS_PORT_USER_MODE_SYNTH (1)
#define DMUS_PORT_KERNEL_MODE (2)
/* These flags (set in dwValidParams) indicate which other members of the */
/* DMUS_PORTPARAMS are valid. */
/* */
#define DMUS_PORTPARAMS_VOICES 0x00000001
#define DMUS_PORTPARAMS_CHANNELGROUPS 0x00000002
#define DMUS_PORTPARAMS_AUDIOCHANNELS 0x00000004
#define DMUS_PORTPARAMS_SAMPLERATE 0x00000008
#define DMUS_PORTPARAMS_EFFECTS 0x00000020
#define DMUS_PORTPARAMS_SHARE 0x00000040
#define DMUS_PORTPARAMS_FEATURES 0x00000080 /* DirectX 8.0 and above */
typedef struct _DMUS_PORTPARAMS
{
DWORD dwSize;
DWORD dwValidParams;
DWORD dwVoices;
DWORD dwChannelGroups;
DWORD dwAudioChannels;
DWORD dwSampleRate;
DWORD dwEffectFlags;
BOOL fShare;
} DMUS_PORTPARAMS7;
typedef struct _DMUS_PORTPARAMS8
{
DWORD dwSize;
DWORD dwValidParams;
DWORD dwVoices;
DWORD dwChannelGroups;
DWORD dwAudioChannels;
DWORD dwSampleRate;
DWORD dwEffectFlags;
BOOL fShare;
DWORD dwFeatures;
} DMUS_PORTPARAMS8;
#define DMUS_PORT_FEATURE_AUDIOPATH 0x00000001 /* Supports audiopath connection to DSound buffers. */
#define DMUS_PORT_FEATURE_STREAMING 0x00000002 /* Supports streaming waves through the synth. */
typedef DMUS_PORTPARAMS8 DMUS_PORTPARAMS;
typedef DMUS_PORTPARAMS *LPDMUS_PORTPARAMS;
typedef struct _DMUS_SYNTHSTATS *LPDMUS_SYNTHSTATS;
typedef struct _DMUS_SYNTHSTATS8 *LPDMUS_SYNTHSTATS8;
typedef struct _DMUS_SYNTHSTATS
{
DWORD dwSize; /* Size in bytes of the structure */
DWORD dwValidStats; /* Flags indicating which fields below are valid. */
DWORD dwVoices; /* Average number of voices playing. */
DWORD dwTotalCPU; /* Total CPU usage as percent * 100. */
DWORD dwCPUPerVoice; /* CPU per voice as percent * 100. */
DWORD dwLostNotes; /* Number of notes lost in 1 second. */
DWORD dwFreeMemory; /* Free memory in bytes */
long lPeakVolume; /* Decibel level * 100. */
} DMUS_SYNTHSTATS;
typedef struct _DMUS_SYNTHSTATS8
{
DWORD dwSize; /* Size in bytes of the structure */
DWORD dwValidStats; /* Flags indicating which fields below are valid. */
DWORD dwVoices; /* Average number of voices playing. */
DWORD dwTotalCPU; /* Total CPU usage as percent * 100. */
DWORD dwCPUPerVoice; /* CPU per voice as percent * 100. */
DWORD dwLostNotes; /* Number of notes lost in 1 second. */
DWORD dwFreeMemory; /* Free memory in bytes */
long lPeakVolume; /* Decibel level * 100. */
DWORD dwSynthMemUse; /* Memory used by synth wave data */
} DMUS_SYNTHSTATS8;
#define DMUS_SYNTHSTATS_VOICES (1 << 0)
#define DMUS_SYNTHSTATS_TOTAL_CPU (1 << 1)
#define DMUS_SYNTHSTATS_CPU_PER_VOICE (1 << 2)
#define DMUS_SYNTHSTATS_LOST_NOTES (1 << 3)
#define DMUS_SYNTHSTATS_PEAK_VOLUME (1 << 4)
#define DMUS_SYNTHSTATS_FREE_MEMORY (1 << 5)
#define DMUS_SYNTHSTATS_SYSTEMMEMORY DMUS_PC_SYSTEMMEMORY
typedef struct _DMUS_WAVES_REVERB_PARAMS
{
float fInGain; /* Input gain in dB (to avoid output overflows) */
float fReverbMix; /* Reverb mix in dB. 0dB means 100% wet reverb (no direct signal)
Negative values gives less wet signal.
The coeficients are calculated so that the overall output level stays
(approximately) constant regardless of the ammount of reverb mix. */
float fReverbTime; /* The reverb decay time, in milliseconds. */
float fHighFreqRTRatio; /* The ratio of the high frequencies to the global reverb time.
Unless very 'splashy-bright' reverbs are wanted, this should be set to
a value < 1.0.
For example if dRevTime==1000ms and dHighFreqRTRatio=0.1 than the
decay time for high frequencies will be 100ms.*/
} DMUS_WAVES_REVERB_PARAMS;
/* Note: Default values for Reverb are:
fInGain = 0.0dB (no change in level)
fReverbMix = -10.0dB (a reasonable reverb mix)
fReverbTime = 1000.0ms (one second global reverb time)
fHighFreqRTRatio = 0.001 (the ratio of the high frequencies to the global reverb time)
*/
typedef enum
{
DMUS_CLOCK_SYSTEM = 0,
DMUS_CLOCK_WAVE = 1
} DMUS_CLOCKTYPE;
#define DMUS_CLOCKF_GLOBAL 0x00000001
typedef struct _DMUS_CLOCKINFO7 *LPDMUS_CLOCKINFO7;
typedef struct _DMUS_CLOCKINFO7
{
DWORD dwSize;
DMUS_CLOCKTYPE ctType;
GUID guidClock; /* Identifies this time source */
WCHAR wszDescription[DMUS_MAX_DESCRIPTION];
} DMUS_CLOCKINFO7;
typedef struct _DMUS_CLOCKINFO8 *LPDMUS_CLOCKINFO8;
typedef struct _DMUS_CLOCKINFO8
{
DWORD dwSize;
DMUS_CLOCKTYPE ctType;
GUID guidClock; /* Identifies this time source */
WCHAR wszDescription[DMUS_MAX_DESCRIPTION];
DWORD dwFlags;
} DMUS_CLOCKINFO8;
typedef DMUS_CLOCKINFO8 DMUS_CLOCKINFO;
typedef DMUS_CLOCKINFO *LPDMUS_CLOCKINFO;
/* Default bus identifiers
*
* The first 17 are direct mappings to the destinations defined in both
* the MMA DLS Level 2 specification and the Microsoft Multi-Channel audio
* specification.
*/
#define DSBUSID_FIRST_SPKR_LOC 0
#define DSBUSID_FRONT_LEFT 0
#define DSBUSID_LEFT 0 /* Front left is also just left */
#define DSBUSID_FRONT_RIGHT 1
#define DSBUSID_RIGHT 1 /* Ditto front right */
#define DSBUSID_FRONT_CENTER 2
#define DSBUSID_LOW_FREQUENCY 3
#define DSBUSID_BACK_LEFT 4
#define DSBUSID_BACK_RIGHT 5
#define DSBUSID_FRONT_LEFT_OF_CENTER 6
#define DSBUSID_FRONT_RIGHT_OF_CENTER 7
#define DSBUSID_BACK_CENTER 8
#define DSBUSID_SIDE_LEFT 9
#define DSBUSID_SIDE_RIGHT 10
#define DSBUSID_TOP_CENTER 11
#define DSBUSID_TOP_FRONT_LEFT 12
#define DSBUSID_TOP_FRONT_CENTER 13
#define DSBUSID_TOP_FRONT_RIGHT 14
#define DSBUSID_TOP_BACK_LEFT 15
#define DSBUSID_TOP_BACK_CENTER 16
#define DSBUSID_TOP_BACK_RIGHT 17
#define DSBUSID_LAST_SPKR_LOC 17
#define DSBUSID_IS_SPKR_LOC(id) ( ((id) >= DSBUSID_FIRST_SPKR_LOC) && ((id) <= DSBUSID_LAST_SPKR_LOC) )
/* These bus identifiers are for the standard DLS effect sends
*/
#define DSBUSID_REVERB_SEND 64
#define DSBUSID_CHORUS_SEND 65
/* Dynamic bus identifiers start here. See the documentation for how
* synthesizers map the output of voices to static and dynamic
* bus identifiers.
*/
#define DSBUSID_DYNAMIC_0 512
/* Null bus, used to identify busses that have no function mapping.
*/
#define DSBUSID_NULL 0xFFFFFFFF
interface IDirectMusic;
interface IDirectMusic8;
interface IDirectMusicBuffer;
interface IDirectMusicPort;
interface IDirectMusicThru;
interface IReferenceClock;
#ifndef __cplusplus
typedef interface IDirectMusic IDirectMusic;
typedef interface IDirectMusic8 IDirectMusic8;
typedef interface IDirectMusicPort IDirectMusicPort;
typedef interface IDirectMusicBuffer IDirectMusicBuffer;
typedef interface IDirectMusicThru IDirectMusicThru;
typedef interface IReferenceClock IReferenceClock;
#endif /* C++ */
typedef IDirectMusic *LPDIRECTMUSIC;
typedef IDirectMusic8 *LPDIRECTMUSIC8;
typedef IDirectMusicPort *LPDIRECTMUSICPORT;
typedef IDirectMusicBuffer *LPDIRECTMUSICBUFFER;
#undef INTERFACE
#define INTERFACE IDirectMusic
DECLARE_INTERFACE_(IDirectMusic, IUnknown)
{
/* IUnknown */
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectMusic */
STDMETHOD(EnumPort) (THIS_ DWORD dwIndex,
LPDMUS_PORTCAPS pPortCaps) PURE;
STDMETHOD(CreateMusicBuffer) (THIS_ LPDMUS_BUFFERDESC pBufferDesc,
LPDIRECTMUSICBUFFER *ppBuffer,
LPUNKNOWN pUnkOuter) PURE;
STDMETHOD(CreatePort) (THIS_ REFCLSID rclsidPort,
LPDMUS_PORTPARAMS pPortParams,
LPDIRECTMUSICPORT *ppPort,
LPUNKNOWN pUnkOuter) PURE;
STDMETHOD(EnumMasterClock) (THIS_ DWORD dwIndex,
LPDMUS_CLOCKINFO lpClockInfo) PURE;
STDMETHOD(GetMasterClock) (THIS_ LPGUID pguidClock,
IReferenceClock **ppReferenceClock) PURE;
STDMETHOD(SetMasterClock) (THIS_ REFGUID rguidClock) PURE;
STDMETHOD(Activate) (THIS_ BOOL fEnable) PURE;
STDMETHOD(GetDefaultPort) (THIS_ LPGUID pguidPort) PURE;
STDMETHOD(SetDirectSound) (THIS_ LPDIRECTSOUND pDirectSound,
HWND hWnd) PURE;
};
#undef INTERFACE
#define INTERFACE IDirectMusic8
DECLARE_INTERFACE_(IDirectMusic8, IDirectMusic)
{
/* IUnknown */
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectMusic */
STDMETHOD(EnumPort) (THIS_ DWORD dwIndex,
LPDMUS_PORTCAPS pPortCaps) PURE;
STDMETHOD(CreateMusicBuffer) (THIS_ LPDMUS_BUFFERDESC pBufferDesc,
LPDIRECTMUSICBUFFER *ppBuffer,
LPUNKNOWN pUnkOuter) PURE;
STDMETHOD(CreatePort) (THIS_ REFCLSID rclsidPort,
LPDMUS_PORTPARAMS pPortParams,
LPDIRECTMUSICPORT *ppPort,
LPUNKNOWN pUnkOuter) PURE;
STDMETHOD(EnumMasterClock) (THIS_ DWORD dwIndex,
LPDMUS_CLOCKINFO lpClockInfo) PURE;
STDMETHOD(GetMasterClock) (THIS_ LPGUID pguidClock,
IReferenceClock **ppReferenceClock) PURE;
STDMETHOD(SetMasterClock) (THIS_ REFGUID rguidClock) PURE;
STDMETHOD(Activate) (THIS_ BOOL fEnable) PURE;
STDMETHOD(GetDefaultPort) (THIS_ LPGUID pguidPort) PURE;
STDMETHOD(SetDirectSound) (THIS_ LPDIRECTSOUND pDirectSound,
HWND hWnd) PURE;
/* IDirectMusic8 */
STDMETHOD(SetExternalMasterClock)
(THIS_ IReferenceClock *pClock) PURE;
};
#undef INTERFACE
#define INTERFACE IDirectMusicBuffer
DECLARE_INTERFACE_(IDirectMusicBuffer, IUnknown)
{
/* IUnknown */
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectMusicBuffer */
STDMETHOD(Flush) (THIS) PURE;
STDMETHOD(TotalTime) (THIS_ LPREFERENCE_TIME prtTime) PURE;
STDMETHOD(PackStructured) (THIS_ REFERENCE_TIME rt,
DWORD dwChannelGroup,
DWORD dwChannelMessage) PURE;
STDMETHOD(PackUnstructured) (THIS_ REFERENCE_TIME rt,
DWORD dwChannelGroup,
DWORD cb,
LPBYTE lpb) PURE;
STDMETHOD(ResetReadPtr) (THIS) PURE;
STDMETHOD(GetNextEvent) (THIS_ LPREFERENCE_TIME prt,
LPDWORD pdwChannelGroup,
LPDWORD pdwLength,
LPBYTE *ppData) PURE;
STDMETHOD(GetRawBufferPtr) (THIS_ LPBYTE *ppData) PURE;
STDMETHOD(GetStartTime) (THIS_ LPREFERENCE_TIME prt) PURE;
STDMETHOD(GetUsedBytes) (THIS_ LPDWORD pcb) PURE;
STDMETHOD(GetMaxBytes) (THIS_ LPDWORD pcb) PURE;
STDMETHOD(GetBufferFormat) (THIS_ LPGUID pGuidFormat) PURE;
STDMETHOD(SetStartTime) (THIS_ REFERENCE_TIME rt) PURE;
STDMETHOD(SetUsedBytes) (THIS_ DWORD cb) PURE;
};
typedef IDirectMusicBuffer IDirectMusicBuffer8;
typedef IDirectMusicBuffer8 *LPDIRECTMUSICBUFFER8;
#undef INTERFACE
#define INTERFACE IDirectMusicInstrument
DECLARE_INTERFACE_(IDirectMusicInstrument, IUnknown)
{
/* IUnknown */
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectMusicInstrument */
STDMETHOD(GetPatch) (THIS_ DWORD* pdwPatch) PURE;
STDMETHOD(SetPatch) (THIS_ DWORD dwPatch) PURE;
};
typedef IDirectMusicInstrument IDirectMusicInstrument8;
typedef IDirectMusicInstrument8 *LPDIRECTMUSICINSTRUMENT8;
#undef INTERFACE
#define INTERFACE IDirectMusicDownloadedInstrument
DECLARE_INTERFACE_(IDirectMusicDownloadedInstrument, IUnknown)
{
/* IUnknown */
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectMusicDownloadedInstrument */
/* None at this time */
};
typedef IDirectMusicDownloadedInstrument IDirectMusicDownloadedInstrument8;
typedef IDirectMusicDownloadedInstrument8 *LPDIRECTMUSICDOWNLOADEDINSTRUMENT8;
#undef INTERFACE
#define INTERFACE IDirectMusicCollection
DECLARE_INTERFACE_(IDirectMusicCollection, IUnknown)
{
/* IUnknown */
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectMusicCollection */
STDMETHOD(GetInstrument) (THIS_ DWORD dwPatch,
IDirectMusicInstrument** ppInstrument) PURE;
STDMETHOD(EnumInstrument) (THIS_ DWORD dwIndex,
DWORD* pdwPatch,
LPWSTR pwszName,
DWORD dwNameLen) PURE;
};
typedef IDirectMusicCollection IDirectMusicCollection8;
typedef IDirectMusicCollection8 *LPDIRECTMUSICCOLLECTION8;
#undef INTERFACE
#define INTERFACE IDirectMusicDownload
DECLARE_INTERFACE_(IDirectMusicDownload , IUnknown)
{
/* IUnknown */
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectMusicDownload */
STDMETHOD(GetBuffer) (THIS_ void** ppvBuffer,
DWORD* pdwSize) PURE;
};
typedef IDirectMusicDownload IDirectMusicDownload8;
typedef IDirectMusicDownload8 *LPDIRECTMUSICDOWNLOAD8;
#undef INTERFACE
#define INTERFACE IDirectMusicPortDownload
DECLARE_INTERFACE_(IDirectMusicPortDownload, IUnknown)
{
/* IUnknown */
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectMusicPortDownload */
STDMETHOD(GetBuffer) (THIS_ DWORD dwDLId,
IDirectMusicDownload** ppIDMDownload) PURE;
STDMETHOD(AllocateBuffer) (THIS_ DWORD dwSize,
IDirectMusicDownload** ppIDMDownload) PURE;
STDMETHOD(GetDLId) (THIS_ DWORD* pdwStartDLId,
DWORD dwCount) PURE;
STDMETHOD(GetAppend) (THIS_ DWORD* pdwAppend) PURE;
STDMETHOD(Download) (THIS_ IDirectMusicDownload* pIDMDownload) PURE;
STDMETHOD(Unload) (THIS_ IDirectMusicDownload* pIDMDownload) PURE;
};
typedef IDirectMusicPortDownload IDirectMusicPortDownload8;
typedef IDirectMusicPortDownload8 *LPDIRECTMUSICPORTDOWNLOAD8;
/* Standard values for voice priorities. Numerically higher priorities are higher in priority.
* These priorities are used to set the voice priority for all voices on a channel. They are
* used in the dwPriority parameter of IDirectMusicPort::GetPriority and returned in the
* lpwPriority parameter of pdwPriority.
*
* These priorities are shared with DirectSound.
*/
#ifndef _DIRECTAUDIO_PRIORITIES_DEFINED_
#define _DIRECTAUDIO_PRIORITIES_DEFINED_
#define DAUD_CRITICAL_VOICE_PRIORITY (0xF0000000)
#define DAUD_HIGH_VOICE_PRIORITY (0xC0000000)
#define DAUD_STANDARD_VOICE_PRIORITY (0x80000000)
#define DAUD_LOW_VOICE_PRIORITY (0x40000000)
#define DAUD_PERSIST_VOICE_PRIORITY (0x10000000)
/* These are the default priorities assigned if not overridden. By default priorities are
* equal across channel groups (e.g. channel 5 on channel group 1 has the same priority as
* channel 5 on channel group 2).
*
* In accordance with DLS level 1, channel 10 has the highest priority, followed by 1 through 16
* except for 10.
*/
#define DAUD_CHAN1_VOICE_PRIORITY_OFFSET (0x0000000E)
#define DAUD_CHAN2_VOICE_PRIORITY_OFFSET (0x0000000D)
#define DAUD_CHAN3_VOICE_PRIORITY_OFFSET (0x0000000C)
#define DAUD_CHAN4_VOICE_PRIORITY_OFFSET (0x0000000B)
#define DAUD_CHAN5_VOICE_PRIORITY_OFFSET (0x0000000A)
#define DAUD_CHAN6_VOICE_PRIORITY_OFFSET (0x00000009)
#define DAUD_CHAN7_VOICE_PRIORITY_OFFSET (0x00000008)
#define DAUD_CHAN8_VOICE_PRIORITY_OFFSET (0x00000007)
#define DAUD_CHAN9_VOICE_PRIORITY_OFFSET (0x00000006)
#define DAUD_CHAN10_VOICE_PRIORITY_OFFSET (0x0000000F)
#define DAUD_CHAN11_VOICE_PRIORITY_OFFSET (0x00000005)
#define DAUD_CHAN12_VOICE_PRIORITY_OFFSET (0x00000004)
#define DAUD_CHAN13_VOICE_PRIORITY_OFFSET (0x00000003)
#define DAUD_CHAN14_VOICE_PRIORITY_OFFSET (0x00000002)
#define DAUD_CHAN15_VOICE_PRIORITY_OFFSET (0x00000001)
#define DAUD_CHAN16_VOICE_PRIORITY_OFFSET (0x00000000)
#define DAUD_CHAN1_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN1_VOICE_PRIORITY_OFFSET)
#define DAUD_CHAN2_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN2_VOICE_PRIORITY_OFFSET)
#define DAUD_CHAN3_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN3_VOICE_PRIORITY_OFFSET)
#define DAUD_CHAN4_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN4_VOICE_PRIORITY_OFFSET)
#define DAUD_CHAN5_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN5_VOICE_PRIORITY_OFFSET)
#define DAUD_CHAN6_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN6_VOICE_PRIORITY_OFFSET)
#define DAUD_CHAN7_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN7_VOICE_PRIORITY_OFFSET)
#define DAUD_CHAN8_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN8_VOICE_PRIORITY_OFFSET)
#define DAUD_CHAN9_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN9_VOICE_PRIORITY_OFFSET)
#define DAUD_CHAN10_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN10_VOICE_PRIORITY_OFFSET)
#define DAUD_CHAN11_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN11_VOICE_PRIORITY_OFFSET)
#define DAUD_CHAN12_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN12_VOICE_PRIORITY_OFFSET)
#define DAUD_CHAN13_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN13_VOICE_PRIORITY_OFFSET)
#define DAUD_CHAN14_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN14_VOICE_PRIORITY_OFFSET)
#define DAUD_CHAN15_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN15_VOICE_PRIORITY_OFFSET)
#define DAUD_CHAN16_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN16_VOICE_PRIORITY_OFFSET)
#endif /* _DIRECTAUDIO_PRIORITIES_DEFINED_ */
#undef INTERFACE
#define INTERFACE IDirectMusicPort
DECLARE_INTERFACE_(IDirectMusicPort, IUnknown)
{
/* IUnknown */
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectMusicPort */
/* */
STDMETHOD(PlayBuffer) (THIS_ LPDIRECTMUSICBUFFER pBuffer) PURE;
STDMETHOD(SetReadNotificationHandle) (THIS_ HANDLE hEvent) PURE;
STDMETHOD(Read) (THIS_ LPDIRECTMUSICBUFFER pBuffer) PURE;
STDMETHOD(DownloadInstrument) (THIS_ IDirectMusicInstrument *pInstrument,
IDirectMusicDownloadedInstrument **ppDownloadedInstrument,
DMUS_NOTERANGE *pNoteRanges,
DWORD dwNumNoteRanges) PURE;
STDMETHOD(UnloadInstrument) (THIS_ IDirectMusicDownloadedInstrument *pDownloadedInstrument) PURE;
STDMETHOD(GetLatencyClock) (THIS_ IReferenceClock **ppClock) PURE;
STDMETHOD(GetRunningStats) (THIS_ LPDMUS_SYNTHSTATS pStats) PURE;
STDMETHOD(Compact) (THIS) PURE;
STDMETHOD(GetCaps) (THIS_ LPDMUS_PORTCAPS pPortCaps) PURE;
STDMETHOD(DeviceIoControl) (THIS_ DWORD dwIoControlCode,
LPVOID lpInBuffer,
DWORD nInBufferSize,
LPVOID lpOutBuffer,
DWORD nOutBufferSize,
LPDWORD lpBytesReturned,
LPOVERLAPPED lpOverlapped) PURE;
STDMETHOD(SetNumChannelGroups) (THIS_ DWORD dwChannelGroups) PURE;
STDMETHOD(GetNumChannelGroups) (THIS_ LPDWORD pdwChannelGroups) PURE;
STDMETHOD(Activate) (THIS_ BOOL fActive) PURE;
STDMETHOD(SetChannelPriority) (THIS_ DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority) PURE;
STDMETHOD(GetChannelPriority) (THIS_ DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwPriority) PURE;
STDMETHOD(SetDirectSound) (THIS_ LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer) PURE;
STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSize, LPDWORD pdwBufferSize) PURE;
};
typedef IDirectMusicPort IDirectMusicPort8;
typedef IDirectMusicPort8 *LPDIRECTMUSICPORT8;
#undef INTERFACE
#define INTERFACE IDirectMusicThru
DECLARE_INTERFACE_(IDirectMusicThru, IUnknown)
{
/* IUnknown */
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectMusicThru
*/
STDMETHOD(ThruChannel) (THIS_ DWORD dwSourceChannelGroup,
DWORD dwSourceChannel,
DWORD dwDestinationChannelGroup,
DWORD dwDestinationChannel,
LPDIRECTMUSICPORT pDestinationPort) PURE;
};
typedef IDirectMusicThru IDirectMusicThru8;
typedef IDirectMusicThru8 *LPDIRECTMUSICTHRU8;
#ifndef __IReferenceClock_INTERFACE_DEFINED__
#define __IReferenceClock_INTERFACE_DEFINED__
DEFINE_GUID(IID_IReferenceClock,0x56a86897,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
#undef INTERFACE
#define INTERFACE IReferenceClock
DECLARE_INTERFACE_(IReferenceClock, IUnknown)
{
/* IUnknown */
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IReferenceClock */
/* */
/* get the time now */
STDMETHOD(GetTime) (THIS_ REFERENCE_TIME *pTime) PURE;
/* ask for an async notification that a time has elapsed */
STDMETHOD(AdviseTime) (THIS_ REFERENCE_TIME baseTime, /* base time */
REFERENCE_TIME streamTime, /* stream offset time */
HANDLE hEvent, /* advise via this event */
DWORD * pdwAdviseCookie) PURE; /* where your cookie goes */
/* ask for an async periodic notification that a time has elapsed */
STDMETHOD(AdvisePeriodic) (THIS_ REFERENCE_TIME startTime, /* starting at this time */
REFERENCE_TIME periodTime, /* time between notifications */
HANDLE hSemaphore, /* advise via a semaphore */
DWORD * pdwAdviseCookie) PURE; /* where your cookie goes */
/* cancel a request for notification */
STDMETHOD(Unadvise) (THIS_ DWORD dwAdviseCookie) PURE;
};
#endif /* __IReferenceClock_INTERFACE_DEFINED__ */
DEFINE_GUID(CLSID_DirectMusic,0x636b9f10,0x0c7d,0x11d1,0x95,0xb2,0x00,0x20,0xaf,0xdc,0x74,0x21);
DEFINE_GUID(CLSID_DirectMusicCollection,0x480ff4b0, 0x28b2, 0x11d1, 0xbe, 0xf7, 0x0, 0xc0, 0x4f, 0xbf, 0x8f, 0xef);
DEFINE_GUID(CLSID_DirectMusicSynth,0x58C2B4D0,0x46E7,0x11D1,0x89,0xAC,0x00,0xA0,0xC9,0x05,0x41,0x29);
DEFINE_GUID(IID_IDirectMusic,0x6536115a,0x7b2d,0x11d2,0xba,0x18,0x00,0x00,0xf8,0x75,0xac,0x12);
DEFINE_GUID(IID_IDirectMusicBuffer,0xd2ac2878, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
DEFINE_GUID(IID_IDirectMusicPort, 0x08f2d8c9,0x37c2,0x11d2,0xb9,0xf9,0x00,0x00,0xf8,0x75,0xac,0x12);
DEFINE_GUID(IID_IDirectMusicThru, 0xced153e7, 0x3606, 0x11d2, 0xb9, 0xf9, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
DEFINE_GUID(IID_IDirectMusicPortDownload,0xd2ac287a, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
DEFINE_GUID(IID_IDirectMusicDownload,0xd2ac287b, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
DEFINE_GUID(IID_IDirectMusicCollection,0xd2ac287c, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
DEFINE_GUID(IID_IDirectMusicInstrument,0xd2ac287d, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
DEFINE_GUID(IID_IDirectMusicDownloadedInstrument,0xd2ac287e, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
/* Alternate interface ID for IID_IDirectMusic, available in DX7 release and after. */
DEFINE_GUID(IID_IDirectMusic2,0x6fc2cae1, 0xbc78, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
DEFINE_GUID(IID_IDirectMusic8,0x2d3629f7,0x813d,0x4939,0x85,0x08,0xf0,0x5c,0x6b,0x75,0xfd,0x97);
#define IID_IDirectMusicThru8 IID_IDirectMusicThru
#define IID_IDirectMusicPortDownload8 IID_IDirectMusicPortDownload
#define IID_IDirectMusicDownload8 IID_IDirectMusicDownload
#define IID_IDirectMusicCollection8 IID_IDirectMusicCollection
#define IID_IDirectMusicInstrument8 IID_IDirectMusicInstrument
#define IID_IDirectMusicDownloadedInstrument8 IID_IDirectMusicDownloadedInstrument
#define IID_IDirectMusicPort8 IID_IDirectMusicPort
/* Property Query GUID_DMUS_PROP_GM_Hardware - Local GM set, no need to download
* Property Query GUID_DMUS_PROP_GS_Hardware - Local GS set, no need to download
* Property Query GUID_DMUS_PROP_XG_Hardware - Local XG set, no need to download
* Property Query GUID_DMUS_PROP_DLS1 - Support DLS level 1
* Property Query GUID_DMUS_PROP_INSTRUMENT2 - Support new INSTRUMENT2 download format
* Property Query GUID_DMUS_PROP_XG_Capable - Support minimum requirements of XG
* Property Query GUID_DMUS_PROP_GS_Capable - Support minimum requirements of GS
* Property Query GUID_DMUS_PROP_SynthSink_DSOUND - Synthsink talks to DSound
* Property Query GUID_DMUS_PROP_SynthSink_WAVE - Synthsink talks to Wave device
*
* Item 0: Supported
* Returns a DWORD which is non-zero if the feature is supported
*/
DEFINE_GUID(GUID_DMUS_PROP_GM_Hardware, 0x178f2f24, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
DEFINE_GUID(GUID_DMUS_PROP_GS_Hardware, 0x178f2f25, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
DEFINE_GUID(GUID_DMUS_PROP_XG_Hardware, 0x178f2f26, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
DEFINE_GUID(GUID_DMUS_PROP_XG_Capable, 0x6496aba1, 0x61b0, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
DEFINE_GUID(GUID_DMUS_PROP_GS_Capable, 0x6496aba2, 0x61b0, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
DEFINE_GUID(GUID_DMUS_PROP_DLS1, 0x178f2f27, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
DEFINE_GUID(GUID_DMUS_PROP_DLS2, 0xf14599e5, 0x4689, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
DEFINE_GUID(GUID_DMUS_PROP_INSTRUMENT2, 0x865fd372, 0x9f67, 0x11d2, 0x87, 0x2a, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
DEFINE_GUID(GUID_DMUS_PROP_SynthSink_DSOUND,0xaa97844, 0xc877, 0x11d1, 0x87, 0xc, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
DEFINE_GUID(GUID_DMUS_PROP_SynthSink_WAVE,0xaa97845, 0xc877, 0x11d1, 0x87, 0xc, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
DEFINE_GUID(GUID_DMUS_PROP_SampleMemorySize, 0x178f2f28, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
DEFINE_GUID(GUID_DMUS_PROP_SamplePlaybackRate, 0x2a91f713, 0xa4bf, 0x11d2, 0xbb, 0xdf, 0x0, 0x60, 0x8, 0x33, 0xdb, 0xd8);
/* Property Get/Set GUID_DMUS_PROP_WriteLatency
*
* Item 0: Synth buffer write latency, in milliseconds
* Get/Set SynthSink latency, the average time after the play head that the next buffer gets written.
*/
DEFINE_GUID(GUID_DMUS_PROP_WriteLatency,0x268a0fa0, 0x60f2, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
/* Property Get/Set GUID_DMUS_PROP_WritePeriod
*
* Item 0: Synth buffer write period, in milliseconds
* Get/Set SynthSink buffer write period, time span between successive writes.
*/
DEFINE_GUID(GUID_DMUS_PROP_WritePeriod,0x268a0fa1, 0x60f2, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
/* Property Get GUID_DMUS_PROP_MemorySize
*
* Item 0: Memory size
* Returns a DWORD containing the total number of bytes of sample RAM
*/
DEFINE_GUID(GUID_DMUS_PROP_MemorySize, 0x178f2f28, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
/* Property Set GUID_DMUS_PROP_WavesReverb
*
* Item 0: DMUS_WAVES_REVERB structure
* Sets reverb parameters
*/
DEFINE_GUID(GUID_DMUS_PROP_WavesReverb,0x4cb5622, 0x32e5, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
/* Property Set GUID_DMUS_PROP_Effects
*
* Item 0: DWORD with effects flags.
* Get/Set effects bits, same as dwEffectFlags in DMUS_PORTPARAMS and DMUS_PORTCAPS:
* DMUS_EFFECT_NONE
* DMUS_EFFECT_REVERB
* DMUS_EFFECT_CHORUS
*/
DEFINE_GUID(GUID_DMUS_PROP_Effects, 0xcda8d611, 0x684a, 0x11d2, 0x87, 0x1e, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
/* Property Set GUID_DMUS_PROP_LegacyCaps
*
* Item 0: The MIDINCAPS or MIDIOUTCAPS which describes the port's underlying WinMM device. This property is only supported
* by ports which wrap WinMM devices.
*/
DEFINE_GUID(GUID_DMUS_PROP_LegacyCaps,0xcfa7cdc2, 0x00a1, 0x11d2, 0xaa, 0xd5, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
/* Property Set GUID_DMUS_PROP_Volume
*
* Item 0: A long which contains an offset, in 1/100 dB, to be added to the final volume
*
*/
DEFINE_GUID(GUID_DMUS_PROP_Volume, 0xfedfae25L, 0xe46e, 0x11d1, 0xaa, 0xce, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
/* Min and Max values for setting volume with GUID_DMUS_PROP_Volume */
#define DMUS_VOLUME_MAX 2000 /* +20 dB */
#define DMUS_VOLUME_MIN -20000 /* -200 dB */
#ifdef __cplusplus
}; /* extern "C" */
#endif
#include <poppack.h>
#endif /* #ifndef _DMUSICC_ */

2373
lib/directx8/dmusicf.h Executable file

File diff suppressed because it is too large Load Diff

1961
lib/directx8/dmusici.h Executable file

File diff suppressed because it is too large Load Diff

193
lib/directx8/dmusics.h Executable file
View File

@ -0,0 +1,193 @@
/************************************************************************
* *
* dmusics.h -- Definitions for created a DirectMusic software synth *
* *
* Copyright (c) 1998-1999 Microsoft Corporation
* *
************************************************************************/
#ifndef _DMUSICS_
#define _DMUSICS_
#include "dmusicc.h"
/* Software synths are enumerated from under this registry key.
*/
#define REGSTR_PATH_SOFTWARESYNTHS "Software\\Microsoft\\DirectMusic\\SoftwareSynths"
interface IDirectMusicSynth;
interface IDirectMusicSynthSink;
#ifndef __cplusplus
typedef interface IDirectMusicSynth IDirectMusicSynth;
typedef interface IDirectMusicSynthSink IDirectMusicSynthSink;
#endif
#ifndef _DMUS_VOICE_STATE_DEFINED
#define _DMUS_VOICE_STATE_DEFINED
typedef struct _DMUS_VOICE_STATE
{
BOOL bExists;
SAMPLE_POSITION spPosition;
} DMUS_VOICE_STATE;
#endif /* _DMUS_VOICE_STATE_DEFINED */
/* IDirectMusicSynth::Refresh
*
* This is the last buffer of the stream. It may be a partial block.
*/
#define REFRESH_F_LASTBUFFER 0x00000001
#undef INTERFACE
#define INTERFACE IDirectMusicSynth
DECLARE_INTERFACE_(IDirectMusicSynth, IUnknown)
{
/* IUnknown */
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectMusicSynth */
STDMETHOD(Open) (THIS_ LPDMUS_PORTPARAMS pPortParams) PURE;
STDMETHOD(Close) (THIS) PURE;
STDMETHOD(SetNumChannelGroups) (THIS_ DWORD dwGroups) PURE;
STDMETHOD(Download) (THIS_ LPHANDLE phDownload,
LPVOID pvData,
LPBOOL pbFree ) PURE;
STDMETHOD(Unload) (THIS_ HANDLE hDownload,
HRESULT ( CALLBACK *lpFreeHandle)(HANDLE,HANDLE),
HANDLE hUserData ) PURE;
STDMETHOD(PlayBuffer) (THIS_ REFERENCE_TIME rt,
LPBYTE pbBuffer,
DWORD cbBuffer) PURE;
STDMETHOD(GetRunningStats) (THIS_ LPDMUS_SYNTHSTATS pStats) PURE;
STDMETHOD(GetPortCaps) (THIS_ LPDMUS_PORTCAPS pCaps) PURE;
STDMETHOD(SetMasterClock) (THIS_ IReferenceClock *pClock) PURE;
STDMETHOD(GetLatencyClock) (THIS_ IReferenceClock **ppClock) PURE;
STDMETHOD(Activate) (THIS_ BOOL fEnable) PURE;
STDMETHOD(SetSynthSink) (THIS_ IDirectMusicSynthSink *pSynthSink) PURE;
STDMETHOD(Render) (THIS_ short *pBuffer,
DWORD dwLength,
LONGLONG llPosition) PURE;
STDMETHOD(SetChannelPriority) (THIS_ DWORD dwChannelGroup,
DWORD dwChannel,
DWORD dwPriority) PURE;
STDMETHOD(GetChannelPriority) (THIS_ DWORD dwChannelGroup,
DWORD dwChannel,
LPDWORD pdwPriority) PURE;
STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX pWaveFormatEx,
LPDWORD pdwWaveFormatExSize) PURE;
STDMETHOD(GetAppend) (THIS_ DWORD* pdwAppend) PURE;
};
#undef INTERFACE
#define INTERFACE IDirectMusicSynth8
DECLARE_INTERFACE_(IDirectMusicSynth8, IDirectMusicSynth)
{
/* IUnknown */
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectMusicSynth */
STDMETHOD(Open) (THIS_ LPDMUS_PORTPARAMS pPortParams) PURE;
STDMETHOD(Close) (THIS) PURE;
STDMETHOD(SetNumChannelGroups) (THIS_ DWORD dwGroups) PURE;
STDMETHOD(Download) (THIS_ LPHANDLE phDownload,
LPVOID pvData,
LPBOOL pbFree ) PURE;
STDMETHOD(Unload) (THIS_ HANDLE hDownload,
HRESULT ( CALLBACK *lpFreeHandle)(HANDLE,HANDLE),
HANDLE hUserData ) PURE;
STDMETHOD(PlayBuffer) (THIS_ REFERENCE_TIME rt,
LPBYTE pbBuffer,
DWORD cbBuffer) PURE;
STDMETHOD(GetRunningStats) (THIS_ LPDMUS_SYNTHSTATS pStats) PURE;
STDMETHOD(GetPortCaps) (THIS_ LPDMUS_PORTCAPS pCaps) PURE;
STDMETHOD(SetMasterClock) (THIS_ IReferenceClock *pClock) PURE;
STDMETHOD(GetLatencyClock) (THIS_ IReferenceClock **ppClock) PURE;
STDMETHOD(Activate) (THIS_ BOOL fEnable) PURE;
STDMETHOD(SetSynthSink) (THIS_ IDirectMusicSynthSink *pSynthSink) PURE;
STDMETHOD(Render) (THIS_ short *pBuffer,
DWORD dwLength,
LONGLONG llPosition) PURE;
STDMETHOD(SetChannelPriority) (THIS_ DWORD dwChannelGroup,
DWORD dwChannel,
DWORD dwPriority) PURE;
STDMETHOD(GetChannelPriority) (THIS_ DWORD dwChannelGroup,
DWORD dwChannel,
LPDWORD pdwPriority) PURE;
STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX pWaveFormatEx,
LPDWORD pdwWaveFormatExSize) PURE;
STDMETHOD(GetAppend) (THIS_ DWORD* pdwAppend) PURE;
/* IDirectMusicSynth8 */
STDMETHOD(PlayVoice) (THIS_ REFERENCE_TIME rt,
DWORD dwVoiceId,
DWORD dwChannelGroup,
DWORD dwChannel,
DWORD dwDLId,
long prPitch, /* PREL not defined here */
long vrVolume, /* VREL not defined here */
SAMPLE_TIME stVoiceStart,
SAMPLE_TIME stLoopStart,
SAMPLE_TIME stLoopEnd) PURE;
STDMETHOD(StopVoice) (THIS_ REFERENCE_TIME rt,
DWORD dwVoiceId ) PURE;
STDMETHOD(GetVoiceState) (THIS_ DWORD dwVoice[],
DWORD cbVoice,
DMUS_VOICE_STATE dwVoiceState[] ) PURE;
STDMETHOD(Refresh) (THIS_ DWORD dwDownloadID,
DWORD dwFlags) PURE;
STDMETHOD(AssignChannelToBuses) (THIS_ DWORD dwChannelGroup,
DWORD dwChannel,
LPDWORD pdwBuses,
DWORD cBuses) PURE;
};
#undef INTERFACE
#define INTERFACE IDirectMusicSynthSink
DECLARE_INTERFACE_(IDirectMusicSynthSink, IUnknown)
{
/* IUnknown */
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectMusicSynthSink */
STDMETHOD(Init) (THIS_ IDirectMusicSynth *pSynth) PURE;
STDMETHOD(SetMasterClock) (THIS_ IReferenceClock *pClock) PURE;
STDMETHOD(GetLatencyClock) (THIS_ IReferenceClock **ppClock) PURE;
STDMETHOD(Activate) (THIS_ BOOL fEnable) PURE;
STDMETHOD(SampleToRefTime) (THIS_ LONGLONG llSampleTime,
REFERENCE_TIME *prfTime) PURE;
STDMETHOD(RefTimeToSample) (THIS_ REFERENCE_TIME rfTime,
LONGLONG *pllSampleTime) PURE;
STDMETHOD(SetDirectSound) (THIS_ LPDIRECTSOUND pDirectSound,
LPDIRECTSOUNDBUFFER pDirectSoundBuffer) PURE;
STDMETHOD(GetDesiredBufferSize) (THIS_ LPDWORD pdwBufferSizeInSamples) PURE;
};
DEFINE_GUID(IID_IDirectMusicSynth, 0x9823661, 0x5c85, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
DEFINE_GUID(IID_IDirectMusicSynth8,0x53cab625, 0x2711, 0x4c9f, 0x9d, 0xe7, 0x1b, 0x7f, 0x92, 0x5f, 0x6f, 0xc8);
DEFINE_GUID(IID_IDirectMusicSynthSink,0x9823663, 0x5c85, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
/* Property Set GUID_DMUS_PROP_SetSynthSink
*
* Item 0: An IUnknown on which the port can QueryInterface for a user-mode synth sink.
*/
DEFINE_GUID(GUID_DMUS_PROP_SetSynthSink,0x0a3a5ba5, 0x37b6, 0x11d2, 0xb9, 0xf9, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
/* Property Set GUID_DMUS_PROP_SinkUsesDSound
*
* Item 0: A DWORD boolean indicating whether or not the sink requires an IDirectSound interface. The
* default is FALSE if this property item is not implemented by the sink.
*/
DEFINE_GUID(GUID_DMUS_PROP_SinkUsesDSound, 0xbe208857, 0x8952, 0x11d2, 0xba, 0x1c, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
#endif

368
lib/directx8/dpaddr.h Executable file
View File

@ -0,0 +1,368 @@
/*==========================================================================;
*
* Copyright (C) 2000 Microsoft Corporation. All Rights Reserved.
*
* File: dpaddr.h
* Content: DirectPlayAddress include file
***************************************************************************/
#ifndef __DIRECTPLAYADDRESS__
#define __DIRECTPLAYADDRESS__
#include <ole2.h> // for DECLARE_INTERFACE and HRESULT
#ifdef __cplusplus
extern "C" {
#endif
#include "dplay8.h"
/****************************************************************************
*
* DirectPlay8Address CLSIDs
*
****************************************************************************/
// {934A9523-A3CA-4bc5-ADA0-D6D95D979421}
DEFINE_GUID(CLSID_DirectPlay8Address,
0x934a9523, 0xa3ca, 0x4bc5, 0xad, 0xa0, 0xd6, 0xd9, 0x5d, 0x97, 0x94, 0x21);
/****************************************************************************
*
* DirectPlay8Address Interface IIDs
*
****************************************************************************/
// {83783300-4063-4c8a-9DB3-82830A7FEB31}
DEFINE_GUID(IID_IDirectPlay8Address,
0x83783300, 0x4063, 0x4c8a, 0x9d, 0xb3, 0x82, 0x83, 0xa, 0x7f, 0xeb, 0x31);
// {E5A0E990-2BAD-430b-87DA-A142CF75DE58}
DEFINE_GUID(IID_IDirectPlay8AddressIP,
0xe5a0e990, 0x2bad, 0x430b, 0x87, 0xda, 0xa1, 0x42, 0xcf, 0x75, 0xde, 0x58);
/****************************************************************************
*
* DirectPlay8Address Interface Pointer definitions
*
****************************************************************************/
typedef struct IDirectPlay8Address *PDIRECTPLAY8ADDRESS, *LPDIRECTPLAY8ADDRESS;
typedef struct IDirectPlay8AddressIP *PDIRECTPLAY8ADDRESSIP, *LPDIRECTPLAY8ADDRESSIP;
/****************************************************************************
*
* DirectPlay8Address Forward Declarations For External Types
*
****************************************************************************/
typedef struct sockaddr SOCKADDR;
/****************************************************************************
*
* DirectPlay8Address Constants
*
****************************************************************************/
//
// Asynchronous operation flags
//
#define DPNA_DATATYPE_STRING 0x00000001
#define DPNA_DATATYPE_DWORD 0x00000002
#define DPNA_DATATYPE_GUID 0x00000003
#define DPNA_DATATYPE_BINARY 0x00000004
#define DPNA_DATATYPE_STRING_ANSI 0x00000005
#define DPNA_DPNSVR_PORT 6073
#define DPNA_INDEX_INVALID 0xFFFFFFFF
/****************************************************************************
*
* DirectPlay8Address Address Elements
*
****************************************************************************/
#define DPNA_SEPARATOR_KEYVALUE L'='
#define DPNA_SEPARATOR_USERDATA L'#'
#define DPNA_SEPARATOR_COMPONENT L';'
#define DPNA_ESCAPECHAR L'%'
// Header
#define DPNA_HEADER L"x-directplay:/"
// key names for address components
#define DPNA_KEY_APPLICATION_INSTANCE L"applicationinstance"
#define DPNA_KEY_BAUD L"baud"
#define DPNA_KEY_DEVICE L"device"
#define DPNA_KEY_FLOWCONTROL L"flowcontrol"
#define DPNA_KEY_HOSTNAME L"hostname"
#define DPNA_KEY_PARITY L"parity"
#define DPNA_KEY_PHONENUMBER L"phonenumber"
#define DPNA_KEY_PORT L"port"
#define DPNA_KEY_PROGRAM L"program"
#define DPNA_KEY_PROVIDER L"provider"
#define DPNA_KEY_STOPBITS L"stopbits"
// values for baud rate
#define DPNA_BAUD_RATE_9600 9600
#define DPNA_BAUD_RATE_14400 14400
#define DPNA_BAUD_RATE_19200 19200
#define DPNA_BAUD_RATE_38400 38400
#define DPNA_BAUD_RATE_56000 56000
#define DPNA_BAUD_RATE_57600 57600
#define DPNA_BAUD_RATE_115200 115200
// values for stop bits
#define DPNA_STOP_BITS_ONE L"1"
#define DPNA_STOP_BITS_ONE_FIVE L"1.5"
#define DPNA_STOP_BITS_TWO L"2"
// values for parity
#define DPNA_PARITY_NONE L"NONE"
#define DPNA_PARITY_EVEN L"EVEN"
#define DPNA_PARITY_ODD L"ODD"
#define DPNA_PARITY_MARK L"MARK"
#define DPNA_PARITY_SPACE L"SPACE"
// values for flow control
#define DPNA_FLOW_CONTROL_NONE L"NONE"
#define DPNA_FLOW_CONTROL_XONXOFF L"XONXOFF"
#define DPNA_FLOW_CONTROL_RTS L"RTS"
#define DPNA_FLOW_CONTROL_DTR L"DTR"
#define DPNA_FLOW_CONTROL_RTSDTR L"RTSDTR"
// Shortcut values
//
// These can be used instead of the corresponding CLSID_DP8SP_XXXX guids
//
#define DPNA_VALUE_TCPIPPROVIDER L"IP"
#define DPNA_VALUE_IPXPROVIDER L"IPX"
#define DPNA_VALUE_MODEMPROVIDER L"MODEM"
#define DPNA_VALUE_SERIALPROVIDER L"SERIAL"
//// ANSI DEFINITIONS
// Header
#define DPNA_HEADER_A "x-directplay:/"
#define DPNA_SEPARATOR_KEYVALUE_A '='
#define DPNA_SEPARATOR_USERDATA_A '#'
#define DPNA_SEPARATOR_COMPONENT_A ';'
#define DPNA_ESCAPECHAR_A '%'
// key names for address components
#define DPNA_KEY_APPLICATION_INSTANCE_A "applicationinstance"
#define DPNA_KEY_BAUD_A "baud"
#define DPNA_KEY_DEVICE_A "device"
#define DPNA_KEY_FLOWCONTROL_A "flowcontrol"
#define DPNA_KEY_HOSTNAME_A "hostname"
#define DPNA_KEY_PARITY_A "parity"
#define DPNA_KEY_PHONENUMBER_A "phonenumber"
#define DPNA_KEY_PORT_A "port"
#define DPNA_KEY_PROGRAM_A "program"
#define DPNA_KEY_PROVIDER_A "provider"
#define DPNA_KEY_STOPBITS_A "stopbits"
// values for stop bits
#define DPNA_STOP_BITS_ONE_A "1"
#define DPNA_STOP_BITS_ONE_FIVE_A "1.5"
#define DPNA_STOP_BITS_TWO_A "2"
// values for parity
#define DPNA_PARITY_NONE_A "NONE"
#define DPNA_PARITY_EVEN_A "EVEN"
#define DPNA_PARITY_ODD_A "ODD"
#define DPNA_PARITY_MARK_A "MARK"
#define DPNA_PARITY_SPACE_A "SPACE"
// values for flow control
#define DPNA_FLOW_CONTROL_NONE_A "NONE"
#define DPNA_FLOW_CONTROL_XONXOFF_A "XONXOFF"
#define DPNA_FLOW_CONTROL_RTS_A "RTS"
#define DPNA_FLOW_CONTROL_DTR_A "DTR"
#define DPNA_FLOW_CONTROL_RTSDTR_A "RTSDTR"
// Shortcut values
//
// These can be used instead of the corresponding CLSID_DP8SP_XXXX guids
//
#define DPNA_VALUE_TCPIPPROVIDER_A "IP"
#define DPNA_VALUE_IPXPROVIDER_A "IPX"
#define DPNA_VALUE_MODEMPROVIDER_A "MODEM"
#define DPNA_VALUE_SERIALPROVIDER_A "SERIAL"
/****************************************************************************
*
* DirectPlay8Address Functions
*
****************************************************************************/
HRESULT WINAPI DirectPlay8AddressCreate( const GUID * pcIID, void **ppvInterface, IUnknown *pUnknown);
/****************************************************************************
*
* DirectPlay8Address Application Interfaces
*
****************************************************************************/
//
// COM definition for IDirectPlay8Address Generic Interface
//
#undef INTERFACE // External COM Implementation
#define INTERFACE IDirectPlay8Address
DECLARE_INTERFACE_(IDirectPlay8Address,IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectPlay8Address methods ***/
STDMETHOD(BuildFromURLW)(THIS_ WCHAR *pwszSourceURL ) PURE;
STDMETHOD(BuildFromURLA)(THIS_ CHAR *pszSourceURL ) PURE;
STDMETHOD(Duplicate)(THIS_ PDIRECTPLAY8ADDRESS *ppdpaNewAddress ) PURE;
STDMETHOD(SetEqual)(THIS_ PDIRECTPLAY8ADDRESS pdpaAddress ) PURE;
STDMETHOD(IsEqual)(THIS_ PDIRECTPLAY8ADDRESS pdpaAddress ) PURE;
STDMETHOD(Clear)(THIS ) PURE;
STDMETHOD(GetURLW)(THIS_ WCHAR *pwszURL, PDWORD pdwNumChars ) PURE;
STDMETHOD(GetURLA)(THIS_ CHAR *pszURL, PDWORD pdwNumChars) PURE;
STDMETHOD(GetSP)(THIS_ GUID *pguidSP ) PURE;
STDMETHOD(GetUserData)(THIS_ void *pvUserData, PDWORD pdwBufferSize) PURE;
STDMETHOD(SetSP)(THIS_ const GUID * const pguidSP ) PURE;
STDMETHOD(SetUserData)(THIS_ const void * const pvUserData, const DWORD dwDataSize) PURE;
STDMETHOD(GetNumComponents)(THIS_ PDWORD pdwNumComponents ) PURE;
STDMETHOD(GetComponentByName)(THIS_ const WCHAR * const pwszName, void *pvBuffer, PDWORD pdwBufferSize, PDWORD pdwDataType ) PURE;
STDMETHOD(GetComponentByIndex)(THIS_ const DWORD dwComponentID, WCHAR * pwszName, PDWORD pdwNameLen, void *pvBuffer, PDWORD pdwBufferSize, PDWORD pdwDataType ) PURE;
STDMETHOD(AddComponent)(THIS_ const WCHAR * const pwszName, const void * const lpvData, const DWORD dwDataSize, const DWORD dwDataType ) PURE;
STDMETHOD(GetDevice)(THIS_ GUID * ) PURE;
STDMETHOD(SetDevice)(THIS_ const GUID * const) PURE;
STDMETHOD(BuildFromDPADDRESS)( THIS_ LPVOID pvAddress, DWORD dwDataSize ) PURE;
};
//
// COM definition for IDirectPlay8AddressIP Generic Interface
//
#undef INTERFACE // External COM Implementation
#define INTERFACE IDirectPlay8AddressIP
DECLARE_INTERFACE_(IDirectPlay8AddressIP,IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID, PVOID *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectPlay8AddressIP methods ***/
// Constructs a IDirectPlay8 TCP Address from a SOCKADDR structure
STDMETHOD(BuildFromSockAddr)(THIS_ const SOCKADDR * const ) PURE;
// Constructs a TCP Address from a string (hostname) and port
STDMETHOD(BuildAddress)(THIS_ const WCHAR * const wszAddress, const USHORT usPort ) PURE;
// Builds a local TCP Address
STDMETHOD(BuildLocalAddress)(THIS_ const GUID * const pguidAdapter, const USHORT usPort ) PURE;
// Gets the address from the structure in SOCKADR format
STDMETHOD(GetSockAddress)(THIS_ SOCKADDR *, PDWORD ) PURE;
// Gets the local afddress
STDMETHOD(GetLocalAddress)(THIS_ GUID *pguidAdapter, USHORT *pusPort ) PURE;
// Gets the remote address
STDMETHOD(GetAddress)(THIS_ WCHAR *wszAddress, PDWORD pdwAddressLength, USHORT *psPort ) PURE;
};
/****************************************************************************
*
* IDirectPlay8 application interface macros
*
****************************************************************************/
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectPlay8Address_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectPlay8Address_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectPlay8Address_Release(p) (p)->lpVtbl->Release(p)
#define IDirectPlay8Address_BuildFromURLW(p,a) (p)->lpVtbl->BuildFromURLW(p,a)
#define IDirectPlay8Address_BuildFromURLA(p,a) (p)->lpVtbl->BuildFromURLA(p,a)
#define IDirectPlay8Address_Duplicate(p,a) (p)->lpVtbl->Duplicate(p,a)
#define IDirectPlay8Address_SetEqual(p,a) (p)->lpVtbl->SetEqual(p,a)
#define IDirectPlay8Address_IsEqual(p,a) (p)->lpVtbl->IsEqual(p,a)
#define IDirectPlay8Address_Clear(p) (p)->lpVtbl->Clear(p)
#define IDirectPlay8Address_GetURLW(p,a,b) (p)->lpVtbl->GetURLW(p,a,b)
#define IDirectPlay8Address_GetURLA(p,a,b) (p)->lpVtbl->GetURLA(p,a,b)
#define IDirectPlay8Address_GetSP(p,a) (p)->lpVtbl->GetSP(p,a)
#define IDirectPlay8Address_GetUserData(p,a,b) (p)->lpVtbl->GetUserData(p,a,b)
#define IDirectPlay8Address_SetSP(p,a) (p)->lpVtbl->SetSP(p,a)
#define IDirectPlay8Address_SetUserData(p,a,b) (p)->lpVtbl->SetUserData(p,a,b)
#define IDirectPlay8Address_GetNumComponents(p,a) (p)->lpVtbl->GetNumComponents(p,a)
#define IDirectPlay8Address_GetComponentByName(p,a,b,c,d) (p)->lpVtbl->GetComponentByName(p,a,b,c,d)
#define IDirectPlay8Address_GetComponentByIndex(p,a,b,c,d,e,f) (p)->lpVtbl->GetComponentByIndex(p,a,b,c,d,e,f)
#define IDirectPlay8Address_AddComponent(p,a,b,c,d) (p)->lpVtbl->AddComponent(p,a,b,c,d)
#define IDirectPlay8Address_SetDevice(p,a) (p)->lpVtbl->SetDevice(p,a)
#define IDirectPlay8Address_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
#define IDirectPlay8Address_BuildFromDirectPlay4Address(p,a,b) (p)->lpVtbl->BuildFromDirectPlay4Address(p,a,b)
#define IDirectPlay8AddressIP_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectPlay8AddressIP_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectPlay8AddressIP_Release(p) (p)->lpVtbl->Release(p)
#define IDirectPlay8AddressIP_BuildFromSockAddr(p,a) (p)->lpVtbl->BuildFromSockAddr(p,a)
#define IDirectPlay8AddressIP_BuildAddress(p,a,b) (p)->lpVtbl->BuildAddress(p,a,b)
#define IDirectPlay8AddressIP_BuildLocalAddress(p,a,b) (p)->lpVtbl->BuildLocalAddress(p,a,b)
#define IDirectPlay8AddressIP_GetSockAddress(p,a,b) (p)->lpVtbl->GetSockAddress(p,a,b)
#define IDirectPlay8AddressIP_GetLocalAddress(p,a,b) (p)->lpVtbl->GetLocalAddress(p,a,b)
#define IDirectPlay8AddressIP_GetAddress(p,a,b,c) (p)->lpVtbl->GetAddress(p,a,b,c)
#else /* C++ */
#define IDirectPlay8Address_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectPlay8Address_AddRef(p) (p)->AddRef()
#define IDirectPlay8Address_Release(p) (p)->Release()
#define IDirectPlay8Address_BuildFromURLW(p,a) (p)->BuildFromURLW(a)
#define IDirectPlay8Address_BuildFromURLA(p,a) (p)->BuildFromURLA(a)
#define IDirectPlay8Address_Duplicate(p,a) (p)->Duplicate(a)
#define IDirectPlay8Address_SetEqual(p,a) (p)->SetEqual(a)
#define IDirectPlay8Address_IsEqual(p,a) (p)->IsEqual(a)
#define IDirectPlay8Address_Clear(p) (p)->Clear()
#define IDirectPlay8Address_GetURLW(p,a,b) (p)->GetURLW(a,b)
#define IDirectPlay8Address_GetURLA(p,a,b) (p)->GetURLA(a,b)
#define IDirectPlay8Address_GetSP(p,a) (p)->GetSP(a)
#define IDirectPlay8Address_GetUserData(p,a,b) (p)->GetUserData(a,b)
#define IDirectPlay8Address_SetSP(p,a) (p)->SetSP(a)
#define IDirectPlay8Address_SetUserData(p,a,b) (p)->SetUserData(a,b)
#define IDirectPlay8Address_GetNumComponents(p,a) (p)->GetNumComponents(a)
#define IDirectPlay8Address_GetComponentByName(p,a,b,c,d) (p)->GetComponentByName(a,b,c,d)
#define IDirectPlay8Address_GetComponentByIndex(p,a,b,c,d,e,f) (p)->GetComponentByIndex(a,b,c,d,e,f)
#define IDirectPlay8Address_AddComponent(p,a,b,c,d) (p)->AddComponent(a,b,c,d)
#define IDirectPlay8Address_SetDevice(p,a) (p)->SetDevice(a)
#define IDirectPlay8Address_GetDevice(p,a) (p)->GetDevice(a)
#define IDirectPlay8Address_BuildFromDirectPlay4Address(p,a,b) (p)->BuildFromDirectPlay4Address(a,b)
#define IDirectPlay8AddressIP_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectPlay8AddressIP_AddRef(p) (p)->AddRef()
#define IDirectPlay8AddressIP_Release(p) (p)->Release()
#define IDirectPlay8AddressIP_BuildFromSockAddr(p,a) (p)->BuildFromSockAddr(a)
#define IDirectPlay8AddressIP_BuildAddress(p,a,b) (p)->BuildAddress(a,b)
#define IDirectPlay8AddressIP_BuildLocalAddress(p,a,b) (p)->BuildLocalAddress(a,b)
#define IDirectPlay8AddressIP_GetSockAddress(p,a,b) (p)->GetSockAddress(a,b)
#define IDirectPlay8AddressIP_GetLocalAddress(p,a,b) (p)->GetLocalAddress(a,b)
#define IDirectPlay8AddressIP_GetAddress(p,a,b,c) (p)->GetAddress(a,b,c)
#endif
#ifdef __cplusplus
}
#endif
#endif

2146
lib/directx8/dplay.h Executable file

File diff suppressed because it is too large Load Diff

1183
lib/directx8/dplay8.h Executable file

File diff suppressed because it is too large Load Diff

853
lib/directx8/dplobby.h Executable file
View File

@ -0,0 +1,853 @@
/*==========================================================================;
*
* Copyright (C) 1996-1997 Microsoft Corporation. All Rights Reserved.
*
* File: dplobby.h
* Content: DirectPlayLobby include file
***************************************************************************/
#ifndef __DPLOBBY_INCLUDED__
#define __DPLOBBY_INCLUDED__
#include "dplay.h"
/* avoid warnings at Level 4 */
#pragma warning(disable:4201)
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*
* GUIDS used by DirectPlay objects
*/
/* {AF465C71-9588-11cf-A020-00AA006157AC} */
DEFINE_GUID(IID_IDirectPlayLobby, 0xaf465c71, 0x9588, 0x11cf, 0xa0, 0x20, 0x0, 0xaa, 0x0, 0x61, 0x57, 0xac);
/* {26C66A70-B367-11cf-A024-00AA006157AC} */
DEFINE_GUID(IID_IDirectPlayLobbyA, 0x26c66a70, 0xb367, 0x11cf, 0xa0, 0x24, 0x0, 0xaa, 0x0, 0x61, 0x57, 0xac);
/* {0194C220-A303-11d0-9C4F-00A0C905425E} */
DEFINE_GUID(IID_IDirectPlayLobby2, 0x194c220, 0xa303, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
/* {1BB4AF80-A303-11d0-9C4F-00A0C905425E} */
DEFINE_GUID(IID_IDirectPlayLobby2A, 0x1bb4af80, 0xa303, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
/* {2DB72490-652C-11d1-A7A8-0000F803ABFC} */
DEFINE_GUID(IID_IDirectPlayLobby3, 0x2db72490, 0x652c, 0x11d1, 0xa7, 0xa8, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
/* {2DB72491-652C-11d1-A7A8-0000F803ABFC} */
DEFINE_GUID(IID_IDirectPlayLobby3A, 0x2db72491, 0x652c, 0x11d1, 0xa7, 0xa8, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
/* {2FE8F810-B2A5-11d0-A787-0000F803ABFC} */
DEFINE_GUID(CLSID_DirectPlayLobby, 0x2fe8f810, 0xb2a5, 0x11d0, 0xa7, 0x87, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
/****************************************************************************
*
* IDirectPlayLobby Structures
*
* Various structures used to invoke DirectPlayLobby.
*
****************************************************************************/
typedef struct IDirectPlayLobby FAR *LPDIRECTPLAYLOBBY;
typedef struct IDirectPlayLobby FAR *LPDIRECTPLAYLOBBYA;
typedef struct IDirectPlayLobby IDirectPlayLobbyA;
typedef struct IDirectPlayLobby2 FAR *LPDIRECTPLAYLOBBY2;
typedef struct IDirectPlayLobby2 FAR *LPDIRECTPLAYLOBBY2A;
typedef struct IDirectPlayLobby2 IDirectPlayLobby2A;
typedef struct IDirectPlayLobby3 FAR *LPDIRECTPLAYLOBBY3;
typedef struct IDirectPlayLobby3 FAR *LPDIRECTPLAYLOBBY3A;
typedef struct IDirectPlayLobby3 IDirectPlayLobby3A;
/*
* DPLAPPINFO
* Used to hold information about a registered DirectPlay
* application
*/
typedef struct DPLAPPINFO
{
DWORD dwSize; // Size of this structure
GUID guidApplication; // GUID of the Application
union
{
LPSTR lpszAppNameA; // Pointer to the Application Name
LPWSTR lpszAppName;
};
} DPLAPPINFO, FAR *LPDPLAPPINFO;
/*
* LPCDPLAPPINFO
* A constant pointer to DPLAPPINFO
*/
typedef const DPLAPPINFO FAR *LPCDPLAPPINFO;
/*
* DPCOMPOUNDADDRESSELEMENT
*
* An array of these is passed to CreateCompoundAddresses()
*/
typedef struct DPCOMPOUNDADDRESSELEMENT
{
GUID guidDataType;
DWORD dwDataSize;
LPVOID lpData;
} DPCOMPOUNDADDRESSELEMENT, FAR *LPDPCOMPOUNDADDRESSELEMENT;
/*
* LPCDPCOMPOUNDADDRESSELEMENT
* A constant pointer to DPCOMPOUNDADDRESSELEMENT
*/
typedef const DPCOMPOUNDADDRESSELEMENT FAR *LPCDPCOMPOUNDADDRESSELEMENT;
/*
* LPDPAPPLICATIONDESC
* Used to register a DirectPlay application
*/
typedef struct DPAPPLICATIONDESC
{
DWORD dwSize;
DWORD dwFlags;
union
{
LPSTR lpszApplicationNameA;
LPWSTR lpszApplicationName;
};
GUID guidApplication;
union
{
LPSTR lpszFilenameA;
LPWSTR lpszFilename;
};
union
{
LPSTR lpszCommandLineA;
LPWSTR lpszCommandLine;
};
union
{
LPSTR lpszPathA;
LPWSTR lpszPath;
};
union
{
LPSTR lpszCurrentDirectoryA;
LPWSTR lpszCurrentDirectory;
};
LPSTR lpszDescriptionA;
LPWSTR lpszDescriptionW;
} DPAPPLICATIONDESC, *LPDPAPPLICATIONDESC;
/*
* LPDPAPPLICATIONDESC2
* Used to register a DirectPlay application
*/
typedef struct DPAPPLICATIONDESC2
{
DWORD dwSize;
DWORD dwFlags;
union
{
LPSTR lpszApplicationNameA;
LPWSTR lpszApplicationName;
};
GUID guidApplication;
union
{
LPSTR lpszFilenameA;
LPWSTR lpszFilename;
};
union
{
LPSTR lpszCommandLineA;
LPWSTR lpszCommandLine;
};
union
{
LPSTR lpszPathA;
LPWSTR lpszPath;
};
union
{
LPSTR lpszCurrentDirectoryA;
LPWSTR lpszCurrentDirectory;
};
LPSTR lpszDescriptionA;
LPWSTR lpszDescriptionW;
union
{
LPSTR lpszAppLauncherNameA;
LPWSTR lpszAppLauncherName;
};
} DPAPPLICATIONDESC2, *LPDPAPPLICATIONDESC2;
/****************************************************************************
*
* Enumeration Method Callback Prototypes
*
****************************************************************************/
/*
* Callback for EnumAddress()
*/
typedef BOOL (FAR PASCAL *LPDPENUMADDRESSCALLBACK)(
REFGUID guidDataType,
DWORD dwDataSize,
LPCVOID lpData,
LPVOID lpContext);
/*
* Callback for EnumAddressTypes()
*/
typedef BOOL (FAR PASCAL *LPDPLENUMADDRESSTYPESCALLBACK)(
REFGUID guidDataType,
LPVOID lpContext,
DWORD dwFlags);
/*
* Callback for EnumLocalApplications()
*/
typedef BOOL (FAR PASCAL * LPDPLENUMLOCALAPPLICATIONSCALLBACK)(
LPCDPLAPPINFO lpAppInfo,
LPVOID lpContext,
DWORD dwFlags);
/****************************************************************************
*
* DirectPlayLobby API Prototypes
*
****************************************************************************/
#ifdef UNICODE
#define DirectPlayLobbyCreate DirectPlayLobbyCreateW
#else
#define DirectPlayLobbyCreate DirectPlayLobbyCreateA
#endif /* UNICODE */
extern HRESULT WINAPI DirectPlayLobbyCreateW(LPGUID, LPDIRECTPLAYLOBBY *, IUnknown *, LPVOID, DWORD );
extern HRESULT WINAPI DirectPlayLobbyCreateA(LPGUID, LPDIRECTPLAYLOBBYA *, IUnknown *, LPVOID, DWORD );
/****************************************************************************
*
* IDirectPlayLobby (and IDirectPlayLobbyA) Interface
*
****************************************************************************/
#undef INTERFACE
#define INTERFACE IDirectPlayLobby
DECLARE_INTERFACE_( IDirectPlayLobby, IUnknown )
{
/* IUnknown Methods */
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectPlayLobby Methods */
STDMETHOD(Connect) (THIS_ DWORD, LPDIRECTPLAY2 *, IUnknown FAR *) PURE;
STDMETHOD(CreateAddress) (THIS_ REFGUID, REFGUID, LPCVOID, DWORD, LPVOID, LPDWORD) PURE;
STDMETHOD(EnumAddress) (THIS_ LPDPENUMADDRESSCALLBACK, LPCVOID, DWORD, LPVOID) PURE;
STDMETHOD(EnumAddressTypes) (THIS_ LPDPLENUMADDRESSTYPESCALLBACK, REFGUID, LPVOID, DWORD) PURE;
STDMETHOD(EnumLocalApplications)(THIS_ LPDPLENUMLOCALAPPLICATIONSCALLBACK, LPVOID, DWORD) PURE;
STDMETHOD(GetConnectionSettings)(THIS_ DWORD, LPVOID, LPDWORD) PURE;
STDMETHOD(ReceiveLobbyMessage) (THIS_ DWORD, DWORD, LPDWORD, LPVOID, LPDWORD) PURE;
STDMETHOD(RunApplication) (THIS_ DWORD, LPDWORD, LPDPLCONNECTION, HANDLE) PURE;
STDMETHOD(SendLobbyMessage) (THIS_ DWORD, DWORD, LPVOID, DWORD) PURE;
STDMETHOD(SetConnectionSettings)(THIS_ DWORD, DWORD, LPDPLCONNECTION) PURE;
STDMETHOD(SetLobbyMessageEvent) (THIS_ DWORD, DWORD, HANDLE) PURE;
};
/****************************************************************************
*
* IDirectPlayLobby2 (and IDirectPlayLobby2A) Interface
*
****************************************************************************/
#undef INTERFACE
#define INTERFACE IDirectPlayLobby2
DECLARE_INTERFACE_( IDirectPlayLobby2, IDirectPlayLobby )
{
/* IUnknown Methods */
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectPlayLobby Methods */
STDMETHOD(Connect) (THIS_ DWORD, LPDIRECTPLAY2 *, IUnknown FAR *) PURE;
STDMETHOD(CreateAddress) (THIS_ REFGUID, REFGUID, LPCVOID, DWORD, LPVOID, LPDWORD) PURE;
STDMETHOD(EnumAddress) (THIS_ LPDPENUMADDRESSCALLBACK, LPCVOID, DWORD, LPVOID) PURE;
STDMETHOD(EnumAddressTypes) (THIS_ LPDPLENUMADDRESSTYPESCALLBACK, REFGUID, LPVOID, DWORD) PURE;
STDMETHOD(EnumLocalApplications)(THIS_ LPDPLENUMLOCALAPPLICATIONSCALLBACK, LPVOID, DWORD) PURE;
STDMETHOD(GetConnectionSettings)(THIS_ DWORD, LPVOID, LPDWORD) PURE;
STDMETHOD(ReceiveLobbyMessage) (THIS_ DWORD, DWORD, LPDWORD, LPVOID, LPDWORD) PURE;
STDMETHOD(RunApplication) (THIS_ DWORD, LPDWORD, LPDPLCONNECTION, HANDLE) PURE;
STDMETHOD(SendLobbyMessage) (THIS_ DWORD, DWORD, LPVOID, DWORD) PURE;
STDMETHOD(SetConnectionSettings)(THIS_ DWORD, DWORD, LPDPLCONNECTION) PURE;
STDMETHOD(SetLobbyMessageEvent) (THIS_ DWORD, DWORD, HANDLE) PURE;
/* IDirectPlayLobby2 Methods */
STDMETHOD(CreateCompoundAddress)(THIS_ LPCDPCOMPOUNDADDRESSELEMENT,DWORD,LPVOID,LPDWORD) PURE;
};
/****************************************************************************
*
* IDirectPlayLobby3 (and IDirectPlayLobby3A) Interface
*
****************************************************************************/
#undef INTERFACE
#define INTERFACE IDirectPlayLobby3
DECLARE_INTERFACE_( IDirectPlayLobby3, IDirectPlayLobby )
{
/* IUnknown Methods */
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectPlayLobby Methods */
STDMETHOD(Connect) (THIS_ DWORD, LPDIRECTPLAY2 *, IUnknown FAR *) PURE;
STDMETHOD(CreateAddress) (THIS_ REFGUID, REFGUID, LPCVOID, DWORD, LPVOID, LPDWORD) PURE;
STDMETHOD(EnumAddress) (THIS_ LPDPENUMADDRESSCALLBACK, LPCVOID, DWORD, LPVOID) PURE;
STDMETHOD(EnumAddressTypes) (THIS_ LPDPLENUMADDRESSTYPESCALLBACK, REFGUID, LPVOID, DWORD) PURE;
STDMETHOD(EnumLocalApplications)(THIS_ LPDPLENUMLOCALAPPLICATIONSCALLBACK, LPVOID, DWORD) PURE;
STDMETHOD(GetConnectionSettings)(THIS_ DWORD, LPVOID, LPDWORD) PURE;
STDMETHOD(ReceiveLobbyMessage) (THIS_ DWORD, DWORD, LPDWORD, LPVOID, LPDWORD) PURE;
STDMETHOD(RunApplication) (THIS_ DWORD, LPDWORD, LPDPLCONNECTION, HANDLE) PURE;
STDMETHOD(SendLobbyMessage) (THIS_ DWORD, DWORD, LPVOID, DWORD) PURE;
STDMETHOD(SetConnectionSettings)(THIS_ DWORD, DWORD, LPDPLCONNECTION) PURE;
STDMETHOD(SetLobbyMessageEvent) (THIS_ DWORD, DWORD, HANDLE) PURE;
/* IDirectPlayLobby2 Methods */
STDMETHOD(CreateCompoundAddress)(THIS_ LPCDPCOMPOUNDADDRESSELEMENT,DWORD,LPVOID,LPDWORD) PURE;
/* IDirectPlayLobby3 Methods */
STDMETHOD(ConnectEx) (THIS_ DWORD, REFIID, LPVOID *, IUnknown FAR *) PURE;
STDMETHOD(RegisterApplication) (THIS_ DWORD, LPVOID) PURE;
STDMETHOD(UnregisterApplication)(THIS_ DWORD, REFGUID) PURE;
STDMETHOD(WaitForConnectionSettings)(THIS_ DWORD) PURE;
};
/****************************************************************************
*
* IDirectPlayLobby interface macros
*
****************************************************************************/
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectPlayLobby_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectPlayLobby_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectPlayLobby_Release(p) (p)->lpVtbl->Release(p)
#define IDirectPlayLobby_Connect(p,a,b,c) (p)->lpVtbl->Connect(p,a,b,c)
#define IDirectPlayLobby_ConnectEx(p,a,b,c,d) (p)->lpVtbl->ConnectEx(p,a,b,c,d)
#define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f) (p)->lpVtbl->CreateAddress(p,a,b,c,d,e,f)
#define IDirectPlayLobby_CreateCompoundAddress(p,a,b,c,d) (p)->lpVtbl->CreateCompoundAddress(p,a,b,c,d)
#define IDirectPlayLobby_EnumAddress(p,a,b,c,d) (p)->lpVtbl->EnumAddress(p,a,b,c,d)
#define IDirectPlayLobby_EnumAddressTypes(p,a,b,c,d) (p)->lpVtbl->EnumAddressTypes(p,a,b,c,d)
#define IDirectPlayLobby_EnumLocalApplications(p,a,b,c) (p)->lpVtbl->EnumLocalApplications(p,a,b,c)
#define IDirectPlayLobby_GetConnectionSettings(p,a,b,c) (p)->lpVtbl->GetConnectionSettings(p,a,b,c)
#define IDirectPlayLobby_ReceiveLobbyMessage(p,a,b,c,d,e) (p)->lpVtbl->ReceiveLobbyMessage(p,a,b,c,d,e)
#define IDirectPlayLobby_RegisterApplication(p,a,b) (p)->lpVtbl->RegisterApplication(p,a,b)
#define IDirectPlayLobby_RunApplication(p,a,b,c,d) (p)->lpVtbl->RunApplication(p,a,b,c,d)
#define IDirectPlayLobby_SendLobbyMessage(p,a,b,c,d) (p)->lpVtbl->SendLobbyMessage(p,a,b,c,d)
#define IDirectPlayLobby_SetConnectionSettings(p,a,b,c) (p)->lpVtbl->SetConnectionSettings(p,a,b,c)
#define IDirectPlayLobby_SetLobbyMessageEvent(p,a,b,c) (p)->lpVtbl->SetLobbyMessageEvent(p,a,b,c)
#define IDirectPlayLobby_UnregisterApplication(p,a,b) (p)->lpVtbl->UnregisterApplication(p,a,b)
#define IDirectPlayLobby_WaitForConnectionSettings(p,a) (p)->lpVtbl->WaitForConnectionSettings(p,a)
#else /* C++ */
#define IDirectPlayLobby_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectPlayLobby_AddRef(p) (p)->AddRef()
#define IDirectPlayLobby_Release(p) (p)->Release()
#define IDirectPlayLobby_Connect(p,a,b,c) (p)->Connect(a,b,c)
#define IDirectPlayLobby_ConnectEx(p,a,b,c,d) (p)->ConnectEx(a,b,c,d)
#define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f) (p)->CreateAddress(a,b,c,d,e,f)
#define IDirectPlayLobby_CreateCompoundAddress(p,a,b,c,d) (p)->CreateCompoundAddress(a,b,c,d)
#define IDirectPlayLobby_EnumAddress(p,a,b,c,d) (p)->EnumAddress(a,b,c,d)
#define IDirectPlayLobby_EnumAddressTypes(p,a,b,c,d) (p)->EnumAddressTypes(a,b,c,d)
#define IDirectPlayLobby_EnumLocalApplications(p,a,b,c) (p)->EnumLocalApplications(a,b,c)
#define IDirectPlayLobby_GetConnectionSettings(p,a,b,c) (p)->GetConnectionSettings(a,b,c)
#define IDirectPlayLobby_ReceiveLobbyMessage(p,a,b,c,d,e) (p)->ReceiveLobbyMessage(a,b,c,d,e)
#define IDirectPlayLobby_RegisterApplication(p,a,b) (p)->RegisterApplication(a,b)
#define IDirectPlayLobby_RunApplication(p,a,b,c,d) (p)->RunApplication(a,b,c,d)
#define IDirectPlayLobby_SendLobbyMessage(p,a,b,c,d) (p)->SendLobbyMessage(a,b,c,d)
#define IDirectPlayLobby_SetConnectionSettings(p,a,b,c) (p)->SetConnectionSettings(a,b,c)
#define IDirectPlayLobby_SetLobbyMessageEvent(p,a,b,c) (p)->SetLobbyMessageEvent(a,b,c)
#define IDirectPlayLobby_UnregisterApplication(p,a,b) (p)->UnregisterApplication(a,b)
#define IDirectPlayLobby_WaitForConnectionSettings(p,a) (p)->WaitForConnectionSettings(a)
#endif
/****************************************************************************
*
* DirectPlayLobby Flags
*
****************************************************************************/
/*
* This flag is used by IDirectPlayLobby->WaitForConnectionSettings to
* cancel a current wait that is in progress.
*/
#define DPLWAIT_CANCEL 0x00000001
/*
* This is a message flag used by ReceiveLobbyMessage. It can be
* returned in the dwMessageFlags parameter to indicate a message from
* the system.
*/
#define DPLMSG_SYSTEM 0x00000001
/*
* This is a message flag used by ReceiveLobbyMessage and SendLobbyMessage.
* It is used to indicate that the message is a standard lobby message.
* DPLMSG_SETPROPERTY, DPLMSG_SETPROPERTYRESPONSE, DPLMSG_GETPROPERTY,
* DPLMSG_GETPROPERTYRESPONSE
*/
#define DPLMSG_STANDARD 0x00000002
/*
* Lobbyable Application registration flags
*/
/*
* Applications registered with this flag will not show up when
* applications are enumerated in the lobby. This application
* will only be able to be launched by a lobby client that already
* knows about the application.
*/
#define DPLAPP_NOENUM 0x80000000
/*
* Applications registered with this flag want voice to automatically
* be enabled for their application. All players will be launched into
* an 'n'-way voice conference when the application is started. The
* user will be able to enable this flag for existing non-voice
* directplay applications.
*/
#define DPLAPP_AUTOVOICE 0x00000001
/*
* Applications that do their own voice conferencing should register with
* this flag to avoid allowing the user to enable other voice chat
* capabilites during the same session. This is to avoid users forcing
* the DPLAPP_AUTOVOICE flag for the application.
*/
#define DPLAPP_SELFVOICE 0x00000002
/****************************************************************************
*
* DirectPlayLobby messages and message data structures
*
* All system messages have a dwMessageFlags value of DPLMSG_SYSTEM returned
* from a call to ReceiveLobbyMessage.
*
* All standard messages have a dwMessageFlags value of DPLMSG_STANDARD returned
* from a call to ReceiveLobbyMessage.
*
****************************************************************************/
/*
* DPLMSG_GENERIC
* Generic message structure used to identify the message type.
*/
typedef struct _DPLMSG_GENERIC
{
DWORD dwType; // Message type
} DPLMSG_GENERIC, FAR *LPDPLMSG_GENERIC;
/*
* DPLMSG_SYSTEMMESSAGE
* Generic message format for all system messages --
* DPLSYS_CONNECTIONSETTINGSREAD, DPLSYS_DPLYCONNECTSUCCEEDED,
* DPLSYS_DPLAYCONNECTFAILED, DPLSYS_APPTERMINATED, DPLSYS_NEWCONNECTIONSETTINGS
*/
typedef struct _DPLMSG_SYSTEMMESSAGE
{
DWORD dwType; // Message type
GUID guidInstance; // Instance GUID of the dplay session the message corresponds to
} DPLMSG_SYSTEMMESSAGE, FAR *LPDPLMSG_SYSTEMMESSAGE;
/*
* DPLMSG_SETPROPERTY
* Standard message sent by an application to a lobby to set a
* property
*/
typedef struct _DPLMSG_SETPROPERTY
{
DWORD dwType; // Message type
DWORD dwRequestID; // Request ID (DPL_NOCONFIRMATION if no confirmation desired)
GUID guidPlayer; // Player GUID
GUID guidPropertyTag; // Property GUID
DWORD dwDataSize; // Size of data
DWORD dwPropertyData[1]; // Buffer containing data
} DPLMSG_SETPROPERTY, FAR *LPDPLMSG_SETPROPERTY;
#define DPL_NOCONFIRMATION 0
/*
* DPLMSG_SETPROPERTYRESPONSE
* Standard message returned by a lobby to confirm a
* DPLMSG_SETPROPERTY message.
*/
typedef struct _DPLMSG_SETPROPERTYRESPONSE
{
DWORD dwType; // Message type
DWORD dwRequestID; // Request ID
GUID guidPlayer; // Player GUID
GUID guidPropertyTag; // Property GUID
HRESULT hr; // Return Code
} DPLMSG_SETPROPERTYRESPONSE, FAR *LPDPLMSG_SETPROPERTYRESPONSE;
/*
* DPLMSG_GETPROPERTY
* Standard message sent by an application to a lobby to request
* the current value of a property
*/
typedef struct _DPLMSG_GETPROPERTY
{
DWORD dwType; // Message type
DWORD dwRequestID; // Request ID
GUID guidPlayer; // Player GUID
GUID guidPropertyTag; // Property GUID
} DPLMSG_GETPROPERTY, FAR *LPDPLMSG_GETPROPERTY;
/*
* DPLMSG_GETPROPERTYRESPONSE
* Standard message returned by a lobby in response to a
* DPLMSG_GETPROPERTY message.
*/
typedef struct _DPLMSG_GETPROPERTYRESPONSE
{
DWORD dwType; // Message type
DWORD dwRequestID; // Request ID
GUID guidPlayer; // Player GUID
GUID guidPropertyTag; // Property GUID
HRESULT hr; // Return Code
DWORD dwDataSize; // Size of data
DWORD dwPropertyData[1]; // Buffer containing data
} DPLMSG_GETPROPERTYRESPONSE, FAR *LPDPLMSG_GETPROPERTYRESPONSE;
/*
* DPLMSG_NEWSESSIONHOST
* Standard message returned by a lobby in response to a
* the session host migrating to a new client
*/
typedef struct _DPLMSG_NEWSESSIONHOST
{
DWORD dwType; // Message type
GUID guidInstance; // GUID Instance of the session
} DPLMSG_NEWSESSIONHOST, FAR *LPDPLMSG_NEWSESSIONHOST;
/******************************************
*
* DirectPlay Lobby message dwType values
*
*****************************************/
/*
* The application has read the connection settings.
* It is now O.K. for the lobby client to release
* its IDirectPlayLobby interface.
*/
#define DPLSYS_CONNECTIONSETTINGSREAD 0x00000001
/*
* The application's call to DirectPlayConnect failed
*/
#define DPLSYS_DPLAYCONNECTFAILED 0x00000002
/*
* The application has created a DirectPlay session.
*/
#define DPLSYS_DPLAYCONNECTSUCCEEDED 0x00000003
/*
* The application has terminated.
*/
#define DPLSYS_APPTERMINATED 0x00000004
/*
* The message is a DPLMSG_SETPROPERTY message.
*/
#define DPLSYS_SETPROPERTY 0x00000005
/*
* The message is a DPLMSG_SETPROPERTYRESPONSE message.
*/
#define DPLSYS_SETPROPERTYRESPONSE 0x00000006
/*
* The message is a DPLMSG_GETPROPERTY message.
*/
#define DPLSYS_GETPROPERTY 0x00000007
/*
* The message is a DPLMSG_GETPROPERTYRESPONSE message.
*/
#define DPLSYS_GETPROPERTYRESPONSE 0x00000008
/*
* The message is a DPLMSG_NEWSESSIONHOST message.
*/
#define DPLSYS_NEWSESSIONHOST 0x00000009
/*
* New connection settings are available.
*/
#define DPLSYS_NEWCONNECTIONSETTINGS 0x0000000A
/*
* The Lobby Client has released the DirectPlayLobby Interface
*/
#define DPLSYS_LOBBYCLIENTRELEASE 0x0000000B
/****************************************************************************
*
* DirectPlay defined property GUIDs and associated data structures
*
****************************************************************************/
/*
* DPLPROPERTY_MessagesSupported
*
* Request whether the lobby supports standard. Lobby with respond with either
* TRUE or FALSE or may not respond at all.
*
* Property data is a single BOOL with TRUE or FALSE
*/
// {762CCDA1-D916-11d0-BA39-00C04FD7ED67}
DEFINE_GUID(DPLPROPERTY_MessagesSupported,
0x762ccda1, 0xd916, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
/*
* DPLPROPERTY_LobbyGuid
*
* Request the GUID that identifies the lobby software that the application
* is communicating with.
*
* Property data is a single GUID.
*/
// {F56920A0-D218-11d0-BA39-00C04FD7ED67}
DEFINE_GUID(DPLPROPERTY_LobbyGuid,
0xf56920a0, 0xd218, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
/*
* DPLPROPERTY_PlayerGuid
*
* Request the GUID that identifies the player on this machine for sending
* property data back to the lobby.
*
* Property data is the DPLDATA_PLAYERDATA structure
*/
// {B4319322-D20D-11d0-BA39-00C04FD7ED67}
DEFINE_GUID(DPLPROPERTY_PlayerGuid,
0xb4319322, 0xd20d, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
/*
* DPLDATA_PLAYERGUID
*
* Data structure to hold the GUID of the player and player creation flags
* from the lobby.
*/
typedef struct _DPLDATA_PLAYERGUID
{
GUID guidPlayer;
DWORD dwPlayerFlags;
} DPLDATA_PLAYERGUID, FAR *LPDPLDATA_PLAYERGUID;
/*
* DPLPROPERTY_PlayerScore
*
* Used to send an array of long integers to the lobby indicating the
* score of a player.
*
* Property data is the DPLDATA_PLAYERSCORE structure.
*/
// {48784000-D219-11d0-BA39-00C04FD7ED67}
DEFINE_GUID(DPLPROPERTY_PlayerScore,
0x48784000, 0xd219, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
/*
* DPLDATA_PLAYERSCORE
*
* Data structure to hold an array of long integers representing a player score.
* Application must allocate enough memory to hold all the scores.
*/
typedef struct _DPLDATA_PLAYERSCORE
{
DWORD dwScoreCount;
LONG Score[1];
} DPLDATA_PLAYERSCORE, FAR *LPDPLDATA_PLAYERSCORE;
/****************************************************************************
*
* DirectPlay Address ID's
*
****************************************************************************/
/* DirectPlay Address
*
* A DirectPlay address consists of multiple chunks of data, each tagged
* with a GUID signifying the type of data in the chunk. The chunk also
* has a length so that unknown chunk types can be skipped.
*
* The EnumAddress() function is used to parse these address data chunks.
*/
/*
* DPADDRESS
*
* Header for block of address data elements
*/
typedef struct _DPADDRESS
{
GUID guidDataType;
DWORD dwDataSize;
} DPADDRESS;
typedef DPADDRESS FAR *LPDPADDRESS;
/*
* DPAID_TotalSize
*
* Chunk is a DWORD containing size of entire DPADDRESS structure
*/
// {1318F560-912C-11d0-9DAA-00A0C90A43CB}
DEFINE_GUID(DPAID_TotalSize,
0x1318f560, 0x912c, 0x11d0, 0x9d, 0xaa, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
/*
* DPAID_ServiceProvider
*
* Chunk is a GUID describing the service provider that created the chunk.
* All addresses must contain this chunk.
*/
// {07D916C0-E0AF-11cf-9C4E-00A0C905425E}
DEFINE_GUID(DPAID_ServiceProvider,
0x7d916c0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
/*
* DPAID_LobbyProvider
*
* Chunk is a GUID describing the lobby provider that created the chunk.
* All addresses must contain this chunk.
*/
// {59B95640-9667-11d0-A77D-0000F803ABFC}
DEFINE_GUID(DPAID_LobbyProvider,
0x59b95640, 0x9667, 0x11d0, 0xa7, 0x7d, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
/*
* DPAID_Phone and DPAID_PhoneW
*
* Chunk is a string containing a phone number (i.e. "1-800-555-1212")
* in ANSI or UNICODE format
*/
// {78EC89A0-E0AF-11cf-9C4E-00A0C905425E}
DEFINE_GUID(DPAID_Phone,
0x78ec89a0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
// {BA5A7A70-9DBF-11d0-9CC1-00A0C905425E}
DEFINE_GUID(DPAID_PhoneW,
0xba5a7a70, 0x9dbf, 0x11d0, 0x9c, 0xc1, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
/*
* DPAID_Modem and DPAID_ModemW
*
* Chunk is a string containing a modem name registered with TAPI
* in ANSI or UNICODE format
*/
// {F6DCC200-A2FE-11d0-9C4F-00A0C905425E}
DEFINE_GUID(DPAID_Modem,
0xf6dcc200, 0xa2fe, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
// {01FD92E0-A2FF-11d0-9C4F-00A0C905425E}
DEFINE_GUID(DPAID_ModemW,
0x1fd92e0, 0xa2ff, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
/*
* DPAID_Inet and DPAID_InetW
*
* Chunk is a string containing a TCP/IP host name or an IP address
* (i.e. "dplay.microsoft.com" or "137.55.100.173") in ANSI or UNICODE format
*/
// {C4A54DA0-E0AF-11cf-9C4E-00A0C905425E}
DEFINE_GUID(DPAID_INet,
0xc4a54da0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
// {E63232A0-9DBF-11d0-9CC1-00A0C905425E}
DEFINE_GUID(DPAID_INetW,
0xe63232a0, 0x9dbf, 0x11d0, 0x9c, 0xc1, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
/*
* DPAID_InetPort
*
* Chunk is the port number used for creating the apps TCP and UDP sockets.
* WORD value (i.e. 47624).
*/
// {E4524541-8EA5-11d1-8A96-006097B01411}
DEFINE_GUID(DPAID_INetPort,
0xe4524541, 0x8ea5, 0x11d1, 0x8a, 0x96, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
#ifdef BIGMESSAGEDEFENSE
#endif
/*
* DPCOMPORTADDRESS
*
* Used to specify com port settings. The constants that define baud rate,
* stop bits and parity are defined in WINBASE.H. The constants for flow
* control are given below.
*/
#define DPCPA_NOFLOW 0 // no flow control
#define DPCPA_XONXOFFFLOW 1 // software flow control
#define DPCPA_RTSFLOW 2 // hardware flow control with RTS
#define DPCPA_DTRFLOW 3 // hardware flow control with DTR
#define DPCPA_RTSDTRFLOW 4 // hardware flow control with RTS and DTR
typedef struct _DPCOMPORTADDRESS
{
DWORD dwComPort; // COM port to use (1-4)
DWORD dwBaudRate; // baud rate (100-256k)
DWORD dwStopBits; // no. stop bits (1-2)
DWORD dwParity; // parity (none, odd, even, mark)
DWORD dwFlowControl; // flow control (none, xon/xoff, rts, dtr)
} DPCOMPORTADDRESS;
typedef DPCOMPORTADDRESS FAR *LPDPCOMPORTADDRESS;
/*
* DPAID_ComPort
*
* Chunk contains a DPCOMPORTADDRESS structure defining the serial port.
*/
// {F2F0CE00-E0AF-11cf-9C4E-00A0C905425E}
DEFINE_GUID(DPAID_ComPort,
0xf2f0ce00, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
/****************************************************************************
*
* dplobby 1.0 obsolete definitions
* Included for compatibility only.
*
****************************************************************************/
#define DPLAD_SYSTEM DPLMSG_SYSTEM
#ifdef __cplusplus
};
#endif /* __cplusplus */
#pragma warning(default:4201)
#endif /* __DPLOBBY_INCLUDED__ */

401
lib/directx8/dplobby8.h Executable file
View File

@ -0,0 +1,401 @@
/*==========================================================================
*
* Copyright (C) 2000 Microsoft Corporation. All Rights Reserved.
*
* File: DPLobby.h
* Content: DirectPlay8 Lobby Include File
*
***************************************************************************/
#ifndef __DPLOBBY_H__
#define __DPLOBBY_H__
#include <ole2.h>
#ifdef __cplusplus
extern "C" {
#endif
/****************************************************************************
*
* DirectPlay8Lobby CLSIDs
*
****************************************************************************/
// {667955AD-6B3B-43ca-B949-BC69B5BAFF7F}
DEFINE_GUID(CLSID_DirectPlay8LobbiedApplication,
0x667955ad, 0x6b3b, 0x43ca, 0xb9, 0x49, 0xbc, 0x69, 0xb5, 0xba, 0xff, 0x7f);
// {3B2B6775-70B6-45af-8DEA-A209C69559F3}
DEFINE_GUID(CLSID_DirectPlay8LobbyClient,
0x3b2b6775, 0x70b6, 0x45af, 0x8d, 0xea, 0xa2, 0x9, 0xc6, 0x95, 0x59, 0xf3);
/****************************************************************************
*
* DirectPlay8Lobby Interface IIDs
*
****************************************************************************/
// {819074A3-016C-11d3-AE14-006097B01411}
DEFINE_GUID(IID_IDirectPlay8LobbiedApplication,
0x819074a3, 0x16c, 0x11d3, 0xae, 0x14, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
// {819074A2-016C-11d3-AE14-006097B01411}
DEFINE_GUID(IID_IDirectPlay8LobbyClient,
0x819074a2, 0x16c, 0x11d3, 0xae, 0x14, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
/****************************************************************************
*
* DirectPlay8Lobby Interface Pointer
*
****************************************************************************/
typedef struct IDirectPlay8LobbiedApplication *PDIRECTPLAY8LOBBIEDAPPLICATION;
typedef struct IDirectPlay8LobbyClient *PDIRECTPLAY8LOBBYCLIENT;
/****************************************************************************
*
* DirectPlay8 Lobby Message IDs
*
****************************************************************************/
#define DPL_MSGID_LOBBY 0x8000
#define DPL_MSGID_RECEIVE (0x0001 | DPL_MSGID_LOBBY)
#define DPL_MSGID_CONNECT (0x0002 | DPL_MSGID_LOBBY)
#define DPL_MSGID_DISCONNECT (0x0003 | DPL_MSGID_LOBBY)
#define DPL_MSGID_SESSION_STATUS (0x0004 | DPL_MSGID_LOBBY)
#define DPL_MSGID_CONNECTION_SETTINGS (0x0005 | DPL_MSGID_LOBBY)
/****************************************************************************
*
* DirectPlay8Lobby Constants
*
****************************************************************************/
//
// Specifies that operation should be performed on all open connections
//
#define DPLHANDLE_ALLCONNECTIONS 0xFFFFFFFF
//
// The associated game session has suceeded in connecting / hosting
//
#define DPLSESSION_CONNECTED 0x0001
// The associated game session failed connecting / hosting
//
#define DPLSESSION_COULDNOTCONNECT 0x0002
//
// The associated game session has disconnected
//
#define DPLSESSION_DISCONNECTED 0x0003
//
// The associated game session has terminated
//
#define DPLSESSION_TERMINATED 0x0004
//
// The associated game session's host has migrated
//
#define DPLSESSION_HOSTMIGRATED 0x0005
//
// The associated game session's host has migrated to the local client
//
#define DPLSESSION_HOSTMIGRATEDHERE 0x0006
/****************************************************************************
*
* DirectPlay8 Lobby Flags
*
****************************************************************************/
//
// Do not automatically make the lobby app unavailable when a connection is established
//
#define DPLAVAILABLE_ALLOWMULTIPLECONNECT 0x0001
//
// Launch a new instance of the application to connect to
//
#define DPLCONNECT_LAUNCHNEW 0x0001
//
// Launch a new instance of the application if one is not waiting
//
#define DPLCONNECT_LAUNCHNOTFOUND 0x0002
//
// When starting the associated game session, start it as a host
//
#define DPLCONNECTSETTINGS_HOST 0x0001
//
// Disable parameter validation
//
#define DPLINITIALIZE_DISABLEPARAMVAL 0x0001
/****************************************************************************
*
* DirectPlay8Lobby Structures (Non-Message)
*
****************************************************************************/
//
// Information on a registered game
//
typedef struct _DPL_APPLICATION_INFO {
GUID guidApplication; // GUID of the application
PWSTR pwszApplicationName; // Name of the application
DWORD dwNumRunning; // # of instances of this application running
DWORD dwNumWaiting; // # of instances of this application waiting
DWORD dwFlags; // Flags
} DPL_APPLICATION_INFO, *PDPL_APPLICATION_INFO;
//
// Settings to be used for connecting / hosting a game session
//
typedef struct _DPL_CONNECTION_SETTINGS {
DWORD dwSize; // Size of this structure
DWORD dwFlags; // Connection settings flags (DPLCONNECTSETTINGS_...)
DPN_APPLICATION_DESC dpnAppDesc; // Application desc for the associated DirectPlay session
IDirectPlay8Address *pdp8HostAddress; // Address of host to connect to
IDirectPlay8Address **ppdp8DeviceAddresses; // Address of device to connect from / host on
DWORD cNumDeviceAddresses; // # of addresses specified in ppdp8DeviceAddresses
PWSTR pwszPlayerName; // Name to give the player
} DPL_CONNECTION_SETTINGS, *PDPL_CONNECTION_SETTINGS;
//
// Information for performing a lobby connect
// (ConnectApplication)
//
typedef struct _DPL_CONNECT_INFO {
DWORD dwSize; // Size of this structure
DWORD dwFlags; // Flags (DPLCONNECT_...)
GUID guidApplication; // GUID of application to launch
PDPL_CONNECTION_SETTINGS pdplConnectionSettings;
// Settings application should use
PVOID pvLobbyConnectData; // User defined data block
DWORD dwLobbyConnectDataSize;
// Size of user defined data block
} DPL_CONNECT_INFO, *PDPL_CONNECT_INFO;
//
// Information for registering an application
// (RegisterApplication)
//
typedef struct _DPL_PROGRAM_DESC {
DWORD dwSize;
DWORD dwFlags;
GUID guidApplication; // Application GUID
PWSTR pwszApplicationName; // Unicode application name
PWSTR pwszCommandLine; // Unicode command line arguments
PWSTR pwszCurrentDirectory; // Unicode current directory
PWSTR pwszDescription; // Unicode application description
PWSTR pwszExecutableFilename; // Unicode filename of application executable
PWSTR pwszExecutablePath; // Unicode path of application executable
PWSTR pwszLauncherFilename; // Unicode filename of launcher executable
PWSTR pwszLauncherPath; // Unicode path of launcher executable
} DPL_PROGRAM_DESC, *PDPL_PROGRAM_DESC;
/****************************************************************************
*
* DirectPlay8 Lobby Message Structures
*
****************************************************************************/
//
// A connection was established
// (DPL_MSGID_CONNECT)
//
typedef struct _DPL_MESSAGE_CONNECT
{
DWORD dwSize; // Size of this structure
DPNHANDLE hConnectId; // Handle of new connection
PDPL_CONNECTION_SETTINGS pdplConnectionSettings; // Connection settings for this connection
PVOID pvLobbyConnectData; // User defined lobby data block
DWORD dwLobbyConnectDataSize; // Size of user defined lobby data block
PVOID pvConnectionContext; // Context value for this connection (user set)
} DPL_MESSAGE_CONNECT, *PDPL_MESSAGE_CONNECT;
//
// Connection settings have been updated
// (DPL_MSGID_CONNECTION_SETTINGS)
//
typedef struct _DPL_MESSAGE_CONNECTION_SETTINGS
{
DWORD dwSize; // Size of this structure
DPNHANDLE hSender; // Handle of the connection for these settings
PDPL_CONNECTION_SETTINGS pdplConnectionSettings; // Connection settings
PVOID pvConnectionContext; // Context value for this connection
} DPL_MESSAGE_CONNECTION_SETTINGS, *PDPL_MESSAGE_CONNECTION_SETTINGS;
//
// A connection has been disconnected
// (DPL_MSGID_DISCONNECT)
//
typedef struct _DPL_MESSAGE_DISCONNECT
{
DWORD dwSize; // Size of this structure
DPNHANDLE hDisconnectId; // Handle of the connection that was terminated
HRESULT hrReason; // Reason the connection was broken
PVOID pvConnectionContext; // Context value for this connection
} DPL_MESSAGE_DISCONNECT, *PDPL_MESSAGE_DISCONNECT;
//
// Data was received through a connection
// (DPL_MSGID_RECEIVE)
//
typedef struct _DPL_MESSAGE_RECEIVE
{
DWORD dwSize; // Size of this structure
DPNHANDLE hSender; // Handle of the connection that is from
BYTE *pBuffer; // Contents of the message
DWORD dwBufferSize; // Size of the message context
PVOID pvConnectionContext; // Context value for this connection
} DPL_MESSAGE_RECEIVE, *PDPL_MESSAGE_RECEIVE;
//
// Current status of the associated connection
// (DPL_MSGID_SESSION_STATUS)
//
typedef struct _DPL_MESSAGE_SESSION_STATUS
{
DWORD dwSize; // Size of this structure
DPNHANDLE hSender; // Handle of the connection that this is from
DWORD dwStatus; // Status (DPLSESSION_...)
PVOID pvConnectionContext; // Context value for this connection
} DPL_MESSAGE_SESSION_STATUS, *PDPL_MESSAGE_SESSION_STATUS;
/****************************************************************************
*
* DirectPlay8Lobby Create
*
****************************************************************************/
extern HRESULT WINAPI DirectPlay8LobbyCreate( const GUID * pcIID, void **ppvInterface, IUnknown *pUnknown);
/****************************************************************************
*
* DirectPlay8 Functions
*
****************************************************************************/
//
// COM definition for DirectPlayLobbyClient
//
#undef INTERFACE // External COM Implementation
#define INTERFACE IDirectPlay8LobbyClient
DECLARE_INTERFACE_(IDirectPlay8LobbyClient,IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectPlayLobbyClient methods
STDMETHOD(Initialize) (THIS_ const PVOID pvUserContext,const PFNDPNMESSAGEHANDLER pfn,const DWORD dwFlags) PURE;
STDMETHOD(EnumLocalPrograms) (THIS_ GUID *const pGuidApplication,BYTE *const pEnumData,DWORD *const pdwEnumData,DWORD *const pdwItems, const DWORD dwFlags) PURE;
STDMETHOD(ConnectApplication) (THIS_ DPL_CONNECT_INFO *const pdplConnectionInfo,const PVOID pvConnectionContext,DPNHANDLE *const hApplication,const DWORD dwTimeOut,const DWORD dwFlags) PURE;
STDMETHOD(Send) (THIS_ const DPNHANDLE hConnection,BYTE *const pBuffer,const DWORD pBufferSize,const DWORD dwFlags) PURE;
STDMETHOD(ReleaseApplication) (THIS_ const DPNHANDLE hConnection, const DWORD dwFlags ) PURE;
STDMETHOD(Close) (THIS_ const DWORD dwFlags ) PURE;
STDMETHOD(GetConnectionSettings) (THIS_ const DPNHANDLE hConnection, DPL_CONNECTION_SETTINGS * const pdplSessionInfo, DWORD *pdwInfoSize, const DWORD dwFlags ) PURE;
STDMETHOD(SetConnectionSettings) (THIS_ const DPNHANDLE hConnection, const DPL_CONNECTION_SETTINGS * const pdplSessionInfo, const DWORD dwFlags ) PURE;
};
//
// COM definition for DirectPlayLobbiedApplication
//
#undef INTERFACE // External COM Implementation
#define INTERFACE IDirectPlay8LobbiedApplication
DECLARE_INTERFACE_(IDirectPlay8LobbiedApplication,IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ REFIID riid,LPVOID *ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectPlayLobbiedApplication methods
STDMETHOD(Initialize) (THIS_ const PVOID pvUserContext,const PFNDPNMESSAGEHANDLER pfn,DPNHANDLE * const pdpnhConnection, const DWORD dwFlags) PURE;
STDMETHOD(RegisterProgram) (THIS_ PDPL_PROGRAM_DESC pdplProgramDesc,const DWORD dwFlags) PURE;
STDMETHOD(UnRegisterProgram) (THIS_ GUID *pguidApplication,const DWORD dwFlags) PURE;
STDMETHOD(Send) (THIS_ const DPNHANDLE hConnection,BYTE *const pBuffer,const DWORD pBufferSize,const DWORD dwFlags) PURE;
STDMETHOD(SetAppAvailable) (THIS_ const BOOL fAvailable, const DWORD dwFlags ) PURE;
STDMETHOD(UpdateStatus) (THIS_ const DPNHANDLE hConnection, const DWORD dwStatus, const DWORD dwFlags ) PURE;
STDMETHOD(Close) (THIS_ const DWORD dwFlags ) PURE;
STDMETHOD(GetConnectionSettings) (THIS_ const DPNHANDLE hConnection, DPL_CONNECTION_SETTINGS * const pdplSessionInfo, DWORD *pdwInfoSize, const DWORD dwFlags ) PURE;
STDMETHOD(SetConnectionSettings) (THIS_ const DPNHANDLE hConnection, const DPL_CONNECTION_SETTINGS * const pdplSessionInfo, const DWORD dwFlags ) PURE;
};
/****************************************************************************
*
* DirectPlayLobby Interface Macros
*
****************************************************************************/
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectPlay8LobbyClient_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectPlay8LobbyClient_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectPlay8LobbyClient_Release(p) (p)->lpVtbl->Release(p)
#define IDirectPlay8LobbyClient_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
#define IDirectPlay8LobbyClient_EnumLocalPrograms(p,a,b,c,d,e) (p)->lpVtbl->EnumLocalPrograms(p,a,b,c,d,e)
#define IDirectPlay8LobbyClient_ConnectApplication(p,a,b,c,d,e) (p)->lpVtbl->ConnectApplication(p,a,b,c,d,e)
#define IDirectPlay8LobbyClient_Send(p,a,b,c,d) (p)->lpVtbl->Send(p,a,b,c,d)
#define IDirectPlay8LobbyClient_ReleaseApplication(p,a,b) (p)->lpVtbl->ReleaseApplication(p,a,b)
#define IDirectPlay8LobbyClient_Close(p,a) (p)->lpVtbl->Close(p,a)
#define IDirectPlay8LobbyClient_GetConnectionSettings(p,a,b,c,d) (p)->lpVtbl->GetConnectionSettings(p,a,b,c,d)
#define IDirectPlay8LobbyClient_SetConnectionSettings(p,a,b,c) (p)->lpVtbl->SetConnectionSettings(p,a,b,c)
#define IDirectPlay8LobbiedApplication_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectPlay8LobbiedApplication_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectPlay8LobbiedApplication_Release(p) (p)->lpVtbl->Release(p)
#define IDirectPlay8LobbiedApplication_Initialize(p,a,b,c,d) (p)->lpVtbl->Initialize(p,a,b,c,d)
#define IDirectPlay8LobbiedApplication_RegisterProgram(p,a,b) (p)->lpVtbl->RegisterProgram(p,a,b)
#define IDirectPlay8LobbiedApplication_UnRegisterProgram(p,a,b) (p)->lpVtbl->UnRegisterProgram(p,a,b)
#define IDirectPlay8LobbiedApplication_Send(p,a,b,c,d) (p)->lpVtbl->Send(p,a,b,c,d)
#define IDirectPlay8LobbiedApplication_SetAppAvailable(p,a,b) (p)->lpVtbl->SetAppAvailable(p,a,b)
#define IDirectPlay8LobbiedApplication_UpdateStatus(p,a,b,c) (p)->lpVtbl->UpdateStatus(p,a,b,c)
#define IDirectPlay8LobbiedApplication_Close(p,a) (p)->lpVtbl->Close(p,a)
#define IDirectPlay8LobbiedApplication_GetConnectionSettings(p,a,b,c,d) (p)->lpVtbl->GetConnectionSettings(p,a,b,c,d)
#define IDirectPlay8LobbiedApplication_SetConnectionSettings(p,a,b,c) (p)->lpVtbl->SetConnectionSettings(p,a,b,c)
#else /* C++ */
#define IDirectPlay8LobbyClient_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectPlay8LobbyClient_AddRef(p) (p)->AddRef()
#define IDirectPlay8LobbyClient_Release(p) (p)->Release()
#define IDirectPlay8LobbyClient_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
#define IDirectPlay8LobbyClient_EnumLocalPrograms(p,a,b,c,d,e) (p)->EnumLocalPrograms(a,b,c,d,e)
#define IDirectPlay8LobbyClient_ConnectApplication(p,a,b,c,d,e) (p)->ConnectApplication(a,b,c,d,e)
#define IDirectPlay8LobbyClient_Send(p,a,b,c,d) (p)->Send(a,b,c,d)
#define IDirectPlay8LobbyClient_ReleaseApplication(p,a,b) (p)->ReleaseApplication(a,b)
#define IDirectPlay8LobbyClient_Close(p,a) (p)->Close(a)
#define IDirectPlay8LobbyClient_GetConnectionSettings(p,a,b,c,d) (p)->GetConnectionSettings(a,b,c,d)
#define IDirectPlay8LobbyClient_SetConnectionSettings(p,a,b,c) (p)->SetConnectionSettings(a,b,c)
#define IDirectPlay8LobbiedApplication_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectPlay8LobbiedApplication_AddRef(p) (p)->AddRef()
#define IDirectPlay8LobbiedApplication_Release(p) (p)->Release()
#define IDirectPlay8LobbiedApplication_Initialize(p,a,b,c,d) (p)->Initialize(a,b,c,d)
#define IDirectPlay8LobbiedApplication_RegisterProgram(p,a,b) (p)->RegisterProgram(a,b)
#define IDirectPlay8LobbiedApplication_UnRegisterProgram(p,a,b) (p)->UnRegisterProgram(a,b)
#define IDirectPlay8LobbiedApplication_Send(p,a,b,c,d) (p)->Send(a,b,c,d)
#define IDirectPlay8LobbiedApplication_SetAppAvailable(p,a,b) (p)->SetAppAvailable(a,b)
#define IDirectPlay8LobbiedApplication_UpdateStatus(p,a,b,c) (p)->UpdateStatus(a,b,c)
#define IDirectPlay8LobbiedApplication_Close(p,a) (p)->Close(a)
#define IDirectPlay8LobbiedApplication_GetConnectionSettings(p,a,b,c,d) (p)->GetConnectionSettings(a,b,c,d)
#define IDirectPlay8LobbiedApplication_SetConnectionSettings(p,a,b,c) (p)->SetConnectionSettings(a,b,c)
#endif
#ifdef __cplusplus
}
#endif
#endif // __DPLOBBY_H__

310
lib/directx8/dsetup.h Executable file
View File

@ -0,0 +1,310 @@
/*==========================================================================
*
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
*
* File: dsetup.h
* Content: DirectXSetup, error codes and flags
***************************************************************************/
#ifndef __DSETUP_H__
#define __DSETUP_H__
#include <windows.h> // windows stuff
#ifdef _WIN32
#define COM_NO_WINDOWS_H
#include <objbase.h>
#else
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define FOURCC_VERS mmioFOURCC('v','e','r','s')
// DSETUP Error Codes, must remain compatible with previous setup.
#define DSETUPERR_SUCCESS_RESTART 1
#define DSETUPERR_SUCCESS 0
#define DSETUPERR_BADWINDOWSVERSION -1
#define DSETUPERR_SOURCEFILENOTFOUND -2
#define DSETUPERR_BADSOURCESIZE -3
#define DSETUPERR_BADSOURCETIME -4
#define DSETUPERR_NOCOPY -5
#define DSETUPERR_OUTOFDISKSPACE -6
#define DSETUPERR_CANTFINDINF -7
#define DSETUPERR_CANTFINDDIR -8
#define DSETUPERR_INTERNAL -9
#define DSETUPERR_NTWITHNO3D -10 /* REM: obsolete, you'll never see this */
#define DSETUPERR_UNKNOWNOS -11
#define DSETUPERR_USERHITCANCEL -12
#define DSETUPERR_NOTPREINSTALLEDONNT -13
#define DSETUPERR_NEWERVERSION -14
#define DSETUPERR_NOTADMIN -15
#define DSETUPERR_UNSUPPORTEDPROCESSOR -16
// DSETUP flags. DirectX 5.0 apps should use these flags only.
#define DSETUP_DDRAWDRV 0x00000008 /* install DirectDraw Drivers */
#define DSETUP_DSOUNDDRV 0x00000010 /* install DirectSound Drivers */
#define DSETUP_DXCORE 0x00010000 /* install DirectX runtime */
#define DSETUP_DIRECTX (DSETUP_DXCORE|DSETUP_DDRAWDRV|DSETUP_DSOUNDDRV)
#define DSETUP_TESTINSTALL 0x00020000 /* just test install, don't do anything */
#define DSETUP_USEROLDERFLAG 0x02000000 /* enable return DSETUPERR_NEWERVERSION */
// Bug #22730
// #define DSETUP_NTINSTALL 0x00080000 /* install on Win2K platform */
// These OBSOLETE flags are here for compatibility with pre-DX5 apps only.
// They are present to allow DX3 apps to be recompiled with DX5 and still work.
// DO NOT USE THEM for DX5. They will go away in future DX releases.
#define DSETUP_DDRAW 0x00000001 /* OBSOLETE. install DirectDraw */
#define DSETUP_DSOUND 0x00000002 /* OBSOLETE. install DirectSound */
#define DSETUP_DPLAY 0x00000004 /* OBSOLETE. install DirectPlay */
#define DSETUP_DPLAYSP 0x00000020 /* OBSOLETE. install DirectPlay Providers */
#define DSETUP_DVIDEO 0x00000040 /* OBSOLETE. install DirectVideo */
#define DSETUP_D3D 0x00000200 /* OBSOLETE. install Direct3D */
#define DSETUP_DINPUT 0x00000800 /* OBSOLETE. install DirectInput */
#define DSETUP_DIRECTXSETUP 0x00001000 /* OBSOLETE. install DirectXSetup DLL's */
#define DSETUP_NOUI 0x00002000 /* OBSOLETE. install DirectX with NO UI */
#define DSETUP_PROMPTFORDRIVERS 0x10000000 /* OBSOLETE. prompt when replacing display/audio drivers */
#define DSETUP_RESTOREDRIVERS 0x20000000 /* OBSOLETE. restore display/audio drivers */
//******************************************************************
// DirectX Setup Callback mechanism
//******************************************************************
// DSETUP Message Info Codes, passed to callback as Reason parameter.
#define DSETUP_CB_MSG_NOMESSAGE 0
#define DSETUP_CB_MSG_CANTINSTALL_UNKNOWNOS 1
#define DSETUP_CB_MSG_CANTINSTALL_NT 2
#define DSETUP_CB_MSG_CANTINSTALL_BETA 3
#define DSETUP_CB_MSG_CANTINSTALL_NOTWIN32 4
#define DSETUP_CB_MSG_CANTINSTALL_WRONGLANGUAGE 5
#define DSETUP_CB_MSG_CANTINSTALL_WRONGPLATFORM 6
#define DSETUP_CB_MSG_PREINSTALL_NT 7
#define DSETUP_CB_MSG_NOTPREINSTALLEDONNT 8
#define DSETUP_CB_MSG_SETUP_INIT_FAILED 9
#define DSETUP_CB_MSG_INTERNAL_ERROR 10
#define DSETUP_CB_MSG_CHECK_DRIVER_UPGRADE 11
#define DSETUP_CB_MSG_OUTOFDISKSPACE 12
#define DSETUP_CB_MSG_BEGIN_INSTALL 13
#define DSETUP_CB_MSG_BEGIN_INSTALL_RUNTIME 14
#define DSETUP_CB_MSG_BEGIN_INSTALL_DRIVERS 15
#define DSETUP_CB_MSG_BEGIN_RESTORE_DRIVERS 16
#define DSETUP_CB_MSG_FILECOPYERROR 17
#define DSETUP_CB_UPGRADE_TYPE_MASK 0x000F
#define DSETUP_CB_UPGRADE_KEEP 0x0001
#define DSETUP_CB_UPGRADE_SAFE 0x0002
#define DSETUP_CB_UPGRADE_FORCE 0x0004
#define DSETUP_CB_UPGRADE_UNKNOWN 0x0008
#define DSETUP_CB_UPGRADE_HASWARNINGS 0x0100
#define DSETUP_CB_UPGRADE_CANTBACKUP 0x0200
#define DSETUP_CB_UPGRADE_DEVICE_ACTIVE 0x0800
#define DSETUP_CB_UPGRADE_DEVICE_DISPLAY 0x1000
#define DSETUP_CB_UPGRADE_DEVICE_MEDIA 0x2000
typedef struct _DSETUP_CB_UPGRADEINFO
{
DWORD UpgradeFlags;
} DSETUP_CB_UPGRADEINFO;
typedef struct _DSETUP_CB_FILECOPYERROR
{
DWORD dwError;
} DSETUP_CB_FILECOPYERROR;
#ifdef _WIN32
//
// Data Structures
//
#ifndef UNICODE_ONLY
typedef struct _DIRECTXREGISTERAPPA {
DWORD dwSize;
DWORD dwFlags;
LPSTR lpszApplicationName;
LPGUID lpGUID;
LPSTR lpszFilename;
LPSTR lpszCommandLine;
LPSTR lpszPath;
LPSTR lpszCurrentDirectory;
} DIRECTXREGISTERAPPA, *PDIRECTXREGISTERAPPA, *LPDIRECTXREGISTERAPPA;
typedef struct _DIRECTXREGISTERAPP2A {
DWORD dwSize;
DWORD dwFlags;
LPSTR lpszApplicationName;
LPGUID lpGUID;
LPSTR lpszFilename;
LPSTR lpszCommandLine;
LPSTR lpszPath;
LPSTR lpszCurrentDirectory;
LPSTR lpszLauncherName;
} DIRECTXREGISTERAPP2A, *PDIRECTXREGISTERAPP2A, *LPDIRECTXREGISTERAPP2A;
#endif //!UNICODE_ONLY
#ifndef ANSI_ONLY
typedef struct _DIRECTXREGISTERAPPW {
DWORD dwSize;
DWORD dwFlags;
LPWSTR lpszApplicationName;
LPGUID lpGUID;
LPWSTR lpszFilename;
LPWSTR lpszCommandLine;
LPWSTR lpszPath;
LPWSTR lpszCurrentDirectory;
} DIRECTXREGISTERAPPW, *PDIRECTXREGISTERAPPW, *LPDIRECTXREGISTERAPPW;
typedef struct _DIRECTXREGISTERAPP2W {
DWORD dwSize;
DWORD dwFlags;
LPWSTR lpszApplicationName;
LPGUID lpGUID;
LPWSTR lpszFilename;
LPWSTR lpszCommandLine;
LPWSTR lpszPath;
LPWSTR lpszCurrentDirectory;
LPWSTR lpszLauncherName;
} DIRECTXREGISTERAPP2W, *PDIRECTXREGISTERAPP2W, *LPDIRECTXREGISTERAPP2W;
#endif //!ANSI_ONLY
#ifdef UNICODE
typedef DIRECTXREGISTERAPPW DIRECTXREGISTERAPP;
typedef PDIRECTXREGISTERAPPW PDIRECTXREGISTERAPP;
typedef LPDIRECTXREGISTERAPPW LPDIRECTXREGISTERAPP;
typedef DIRECTXREGISTERAPP2W DIRECTXREGISTERAPP2;
typedef PDIRECTXREGISTERAPP2W PDIRECTXREGISTERAPP2;
typedef LPDIRECTXREGISTERAPP2W LPDIRECTXREGISTERAPP2;
#else
typedef DIRECTXREGISTERAPPA DIRECTXREGISTERAPP;
typedef PDIRECTXREGISTERAPPA PDIRECTXREGISTERAPP;
typedef LPDIRECTXREGISTERAPPA LPDIRECTXREGISTERAPP;
typedef DIRECTXREGISTERAPP2A DIRECTXREGISTERAPP2;
typedef PDIRECTXREGISTERAPP2A PDIRECTXREGISTERAPP2;
typedef LPDIRECTXREGISTERAPP2A LPDIRECTXREGISTERAPP2;
#endif // UNICODE
//
// API
//
#ifndef UNICODE_ONLY
INT
WINAPI
DirectXSetupA(
HWND hWnd,
LPSTR lpszRootPath,
DWORD dwFlags
);
#endif //!UNICODE_ONLY
#ifndef ANSI_ONLY
INT
WINAPI
DirectXSetupW(
HWND hWnd,
LPWSTR lpszRootPath,
DWORD dwFlags
);
#endif //!ANSI_ONLY
#ifdef UNICODE
#define DirectXSetup DirectXSetupW
#else
#define DirectXSetup DirectXSetupA
#endif // !UNICODE
#ifndef UNICODE_ONLY
INT
WINAPI
DirectXDeviceDriverSetupA(
HWND hWnd,
LPSTR lpszDriverClass,
LPSTR lpszDriverPath,
DWORD dwFlags
);
#endif //!UNICODE_ONLY
#ifndef ANSI_ONLY
INT
WINAPI
DirectXDeviceDriverSetupW(
HWND hWnd,
LPWSTR lpszDriverClass,
LPWSTR lpszDriverPath,
DWORD dwFlags
);
#endif //!ANSI_ONLY
#ifdef UNICODE
#define DirectXDeviceDriverSetup DirectXDeviceDriverSetupW
#else
#define DirectXDeviceDriverSetup DirectXDeviceDriverSetupA
#endif // !UNICODE
#ifndef UNICODE_ONLY
INT
WINAPI
DirectXRegisterApplicationA(
HWND hWnd,
LPVOID lpDXRegApp
);
#endif //!UNICODE_ONLY
#ifndef ANSI_ONLY
INT
WINAPI
DirectXRegisterApplicationW(
HWND hWnd,
LPVOID lpDXRegApp
);
#endif //!ANSI_ONLY
#ifdef UNICODE
#define DirectXRegisterApplication DirectXRegisterApplicationW
#else
#define DirectXRegisterApplication DirectXRegisterApplicationA
#endif // !UNICODE
INT
WINAPI
DirectXUnRegisterApplication(
HWND hWnd,
LPGUID lpGUID
);
//
// Function Pointers
//
#ifdef UNICODE
typedef INT (WINAPI * LPDIRECTXSETUP)(HWND, LPWSTR, DWORD);
typedef INT (WINAPI * LPDIRECTXDEVICEDRIVERSETUP)(HWND, LPWSTR, LPSTR, DWORD);
typedef INT (WINAPI * LPDIRECTXREGISTERAPPLICATION)(HWND, LPVOID);
#else
typedef INT (WINAPI * LPDIRECTXSETUP)(HWND, LPSTR, DWORD);
typedef INT (WINAPI * LPDIRECTXDEVICEDRIVERSETUP)(HWND, LPSTR, LPSTR, DWORD);
typedef INT (WINAPI * LPDIRECTXREGISTERAPPLICATION)(HWND, LPVOID);
#endif // UNICODE
typedef DWORD (FAR PASCAL * DSETUP_CALLBACK)(DWORD Reason,
DWORD MsgType, /* Same as flags to MessageBox */
LPSTR szMessage,
LPSTR szName,
void *pInfo);
INT WINAPI DirectXSetupSetCallback(DSETUP_CALLBACK Callback);
INT WINAPI DirectXSetupGetVersion(DWORD *lpdwVersion, DWORD *lpdwMinorVersion);
#endif // WIN32
#ifdef __cplusplus
};
#endif
#endif

77
lib/directx8/dshow.h Executable file
View File

@ -0,0 +1,77 @@
///////////////////////////////////////////////////////////////////////////
// Copyright (C) 2000 Microsoft Corporation. All Right Reserved.
//
// File: dshow.h
// Content: DirectShow top-level include file
///////////////////////////////////////////////////////////////////////////
#ifndef __DSHOW_INCLUDED__
#define __DSHOW_INCLUDED__
///////////////////////////////////////////////////////////////////////////
// Set up constants & pragmas for the compiler
///////////////////////////////////////////////////////////////////////////
#ifdef _MSC_VER
// disable some level-4 warnings, use #pragma warning(enable:###) to re-enable
#pragma warning(disable:4100) // warning C4100: unreferenced formal parameter
#pragma warning(disable:4201) // warning C4201: nonstandard extension used : nameless struct/union
#pragma warning(disable:4511) // warning C4511: copy constructor could not be generated
#pragma warning(disable:4512) // warning C4512: assignment operator could not be generated
#pragma warning(disable:4514) // warning C4514: "unreferenced inline function has been removed"
#if _MSC_VER>=1100
#define AM_NOVTABLE __declspec(novtable)
#else
#define AM_NOVTABLE
#endif
#endif // MSC_VER
///////////////////////////////////////////////////////////////////////////
// Include standard Windows files
///////////////////////////////////////////////////////////////////////////
#include <windows.h>
#include <windowsx.h>
#include <olectl.h>
#include <ddraw.h>
#include <mmsystem.h>
#ifndef NUMELMS
#define NUMELMS(aa) (sizeof(aa)/sizeof((aa)[0]))
#endif
///////////////////////////////////////////////////////////////////////////
// Include DirectShow include files
///////////////////////////////////////////////////////////////////////////
#include <strmif.h> // Generated IDL header file for streams interfaces
#include <amvideo.h> // ActiveMovie video interfaces and definitions
#include <amaudio.h> // ActiveMovie audio interfaces and definitions
#include <control.h> // generated from control.odl
#include <evcode.h> // event code definitions
#include <uuids.h> // declaration of type GUIDs and well-known clsids
#include <errors.h> // HRESULT status and error definitions
#include <edevdefs.h> // External device control interface defines
#include <audevcod.h> // audio filter device error event codes
#include <dvdevcod.h> // DVD error event codes
///////////////////////////////////////////////////////////////////////////
// Define OLE Automation constants
///////////////////////////////////////////////////////////////////////////
#ifndef OATRUE
#define OATRUE (-1)
#endif // OATRUE
#ifndef OAFALSE
#define OAFALSE (0)
#endif // OAFALSE
///////////////////////////////////////////////////////////////////////////
// Define Win64 interfaces if not already defined
///////////////////////////////////////////////////////////////////////////
// InterlockedExchangePointer
#ifndef InterlockedExchangePointer
#define InterlockedExchangePointer(Target, Value) \
(PVOID)InterlockedExchange((PLONG)(Target), (LONG)(Value))
#endif
#endif // __DSHOW_INCLUDED__

329
lib/directx8/dshowasf.h Executable file
View File

@ -0,0 +1,329 @@
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 6.00.0338 */
/* Compiler settings for dshowasf.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
//@@MIDL_FILE_HEADING( )
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __dshowasf_h__
#define __dshowasf_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __IConfigAsfWriter_FWD_DEFINED__
#define __IConfigAsfWriter_FWD_DEFINED__
typedef interface IConfigAsfWriter IConfigAsfWriter;
#endif /* __IConfigAsfWriter_FWD_DEFINED__ */
/* header files for imported files */
#include "unknwn.h"
#include "objidl.h"
#include "strmif.h"
#include "wmsdkidl.h"
#ifdef __cplusplus
extern "C"{
#endif
void * __RPC_USER MIDL_user_allocate(size_t);
void __RPC_USER MIDL_user_free( void * );
/* interface __MIDL_itf_dshowasf_0000 */
/* [local] */
EXTERN_GUID( IID_IConfigAsfWriter,0x45086030,0xF7E4,0x486a,0xB5,0x04,0x82,0x6B,0xB5,0x79,0x2A,0x3B );
extern RPC_IF_HANDLE __MIDL_itf_dshowasf_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_dshowasf_0000_v0_0_s_ifspec;
#ifndef __IConfigAsfWriter_INTERFACE_DEFINED__
#define __IConfigAsfWriter_INTERFACE_DEFINED__
/* interface IConfigAsfWriter */
/* [unique][uuid][object] */
EXTERN_C const IID IID_IConfigAsfWriter;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("45086030-F7E4-486a-B504-826BB5792A3B")
IConfigAsfWriter : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE ConfigureFilterUsingProfileId(
/* [in] */ DWORD dwProfileId) = 0;
virtual HRESULT STDMETHODCALLTYPE GetCurrentProfileId(
/* [out] */ DWORD *pdwProfileId) = 0;
virtual HRESULT STDMETHODCALLTYPE ConfigureFilterUsingProfileGuid(
/* [in] */ REFGUID guidProfile) = 0;
virtual HRESULT STDMETHODCALLTYPE GetCurrentProfileGuid(
/* [out] */ GUID *pProfileGuid) = 0;
virtual HRESULT STDMETHODCALLTYPE ConfigureFilterUsingProfile(
/* [in] */ IWMProfile *pProfile) = 0;
virtual HRESULT STDMETHODCALLTYPE GetCurrentProfile(
/* [out] */ IWMProfile **ppProfile) = 0;
virtual HRESULT STDMETHODCALLTYPE SetIndexMode(
/* [in] */ BOOL bIndexFile) = 0;
virtual HRESULT STDMETHODCALLTYPE GetIndexMode(
/* [out] */ BOOL *pbIndexFile) = 0;
};
#else /* C style interface */
typedef struct IConfigAsfWriterVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IConfigAsfWriter * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IConfigAsfWriter * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IConfigAsfWriter * This);
HRESULT ( STDMETHODCALLTYPE *ConfigureFilterUsingProfileId )(
IConfigAsfWriter * This,
/* [in] */ DWORD dwProfileId);
HRESULT ( STDMETHODCALLTYPE *GetCurrentProfileId )(
IConfigAsfWriter * This,
/* [out] */ DWORD *pdwProfileId);
HRESULT ( STDMETHODCALLTYPE *ConfigureFilterUsingProfileGuid )(
IConfigAsfWriter * This,
/* [in] */ REFGUID guidProfile);
HRESULT ( STDMETHODCALLTYPE *GetCurrentProfileGuid )(
IConfigAsfWriter * This,
/* [out] */ GUID *pProfileGuid);
HRESULT ( STDMETHODCALLTYPE *ConfigureFilterUsingProfile )(
IConfigAsfWriter * This,
/* [in] */ IWMProfile *pProfile);
HRESULT ( STDMETHODCALLTYPE *GetCurrentProfile )(
IConfigAsfWriter * This,
/* [out] */ IWMProfile **ppProfile);
HRESULT ( STDMETHODCALLTYPE *SetIndexMode )(
IConfigAsfWriter * This,
/* [in] */ BOOL bIndexFile);
HRESULT ( STDMETHODCALLTYPE *GetIndexMode )(
IConfigAsfWriter * This,
/* [out] */ BOOL *pbIndexFile);
END_INTERFACE
} IConfigAsfWriterVtbl;
interface IConfigAsfWriter
{
CONST_VTBL struct IConfigAsfWriterVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IConfigAsfWriter_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IConfigAsfWriter_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IConfigAsfWriter_Release(This) \
(This)->lpVtbl -> Release(This)
#define IConfigAsfWriter_ConfigureFilterUsingProfileId(This,dwProfileId) \
(This)->lpVtbl -> ConfigureFilterUsingProfileId(This,dwProfileId)
#define IConfigAsfWriter_GetCurrentProfileId(This,pdwProfileId) \
(This)->lpVtbl -> GetCurrentProfileId(This,pdwProfileId)
#define IConfigAsfWriter_ConfigureFilterUsingProfileGuid(This,guidProfile) \
(This)->lpVtbl -> ConfigureFilterUsingProfileGuid(This,guidProfile)
#define IConfigAsfWriter_GetCurrentProfileGuid(This,pProfileGuid) \
(This)->lpVtbl -> GetCurrentProfileGuid(This,pProfileGuid)
#define IConfigAsfWriter_ConfigureFilterUsingProfile(This,pProfile) \
(This)->lpVtbl -> ConfigureFilterUsingProfile(This,pProfile)
#define IConfigAsfWriter_GetCurrentProfile(This,ppProfile) \
(This)->lpVtbl -> GetCurrentProfile(This,ppProfile)
#define IConfigAsfWriter_SetIndexMode(This,bIndexFile) \
(This)->lpVtbl -> SetIndexMode(This,bIndexFile)
#define IConfigAsfWriter_GetIndexMode(This,pbIndexFile) \
(This)->lpVtbl -> GetIndexMode(This,pbIndexFile)
#endif /* COBJMACROS */
#endif /* C style interface */
HRESULT STDMETHODCALLTYPE IConfigAsfWriter_ConfigureFilterUsingProfileId_Proxy(
IConfigAsfWriter * This,
/* [in] */ DWORD dwProfileId);
void __RPC_STUB IConfigAsfWriter_ConfigureFilterUsingProfileId_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IConfigAsfWriter_GetCurrentProfileId_Proxy(
IConfigAsfWriter * This,
/* [out] */ DWORD *pdwProfileId);
void __RPC_STUB IConfigAsfWriter_GetCurrentProfileId_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IConfigAsfWriter_ConfigureFilterUsingProfileGuid_Proxy(
IConfigAsfWriter * This,
/* [in] */ REFGUID guidProfile);
void __RPC_STUB IConfigAsfWriter_ConfigureFilterUsingProfileGuid_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IConfigAsfWriter_GetCurrentProfileGuid_Proxy(
IConfigAsfWriter * This,
/* [out] */ GUID *pProfileGuid);
void __RPC_STUB IConfigAsfWriter_GetCurrentProfileGuid_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IConfigAsfWriter_ConfigureFilterUsingProfile_Proxy(
IConfigAsfWriter * This,
/* [in] */ IWMProfile *pProfile);
void __RPC_STUB IConfigAsfWriter_ConfigureFilterUsingProfile_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IConfigAsfWriter_GetCurrentProfile_Proxy(
IConfigAsfWriter * This,
/* [out] */ IWMProfile **ppProfile);
void __RPC_STUB IConfigAsfWriter_GetCurrentProfile_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IConfigAsfWriter_SetIndexMode_Proxy(
IConfigAsfWriter * This,
/* [in] */ BOOL bIndexFile);
void __RPC_STUB IConfigAsfWriter_SetIndexMode_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IConfigAsfWriter_GetIndexMode_Proxy(
IConfigAsfWriter * This,
/* [out] */ BOOL *pbIndexFile);
void __RPC_STUB IConfigAsfWriter_GetIndexMode_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IConfigAsfWriter_INTERFACE_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

2345
lib/directx8/dsound.h Executable file

File diff suppressed because it is too large Load Diff

58
lib/directx8/dv.h Executable file
View File

@ -0,0 +1,58 @@
//------------------------------------------------------------------------------
// File: DV.h
//
// Desc: DV typedefs and defines.
//
// Copyright (c) 1997 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef _DV_H_
#define _DV_H_
#define DV_DVSD_NTSC_FRAMESIZE 120000L
#define DV_DVSD_PAL_FRAMESIZE 144000L
#define DV_SMCHN 0x0000e000
#define DV_AUDIOMODE 0x00000f00
#define DV_AUDIOSMP 0x38000000
#define DV_AUDIOQU 0x07000000
#define DV_NTSCPAL 0x00200000
#define DV_STYPE 0x001f0000
//There are NTSC or PAL DV camcorders
#define DV_NTSC 0
#define DV_PAL 1
//DV camcorder can output sd/hd/sl
#define DV_SD 0x00
#define DV_HD 0x01
#define DV_SL 0x02
//user can choice 12 bits or 16 bits audio from DV camcorder
#define DV_CAP_AUD16Bits 0x00
#define DV_CAP_AUD12Bits 0x01
#define SIZE_DVINFO 0x20
typedef struct Tag_DVAudInfo
{
BYTE bAudStyle[2];
//LSB 6 bits for starting DIF sequence number
//MSB 2 bits: 0 for mon. 1: stereo in one 5/6 DIF sequences, 2: stereo audio in both 5/6 DIF sequences
//example: 0x00: mon, audio in first 5/6 DIF sequence
// 0x05: mon, audio in 2nd 5 DIF sequence
// 0x15: stereo, audio only in 2nd 5 DIF sequence
// 0x10: stereo, audio only in 1st 5/6 DIF sequence
// 0x20: stereo, left ch in 1st 5/6 DIF sequence, right ch in 2nd 5/6 DIF sequence
// 0x26: stereo, rightch in 1st 6 DIF sequence, left ch in 2nd 6 DIF sequence
BYTE bAudQu[2]; //qbits, only support 12, 16,
BYTE bNumAudPin; //how many pin(language)
WORD wAvgSamplesPerPinPerFrm[2]; //samples size for one audio pin in one frame(which has 10 or 12 DIF sequence)
WORD wBlkMode; //45 for NTSC, 54 for PAL
WORD wDIFMode; //5 for NTSC, 6 for PAL
WORD wBlkDiv; //15 for NTSC, 18 for PAL
} DVAudInfo;
#endif // _DV_H_

334
lib/directx8/dvdevcod.h Executable file
View File

@ -0,0 +1,334 @@
//------------------------------------------------------------------------------
// File: DVDevCod.h
//
// Desc: List of standard DVD-Video event codes and the expected params.
//
// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#define EC_DVDBASE 0x0100
#ifndef EXCLUDE_DVDEVCODE_ENUMS
typedef enum _tagDVD_ERROR {
DVD_ERROR_Unexpected=1, // Something unexpected happened, perhaps content
// is incorrectly authored. Playback is stopped.
DVD_ERROR_CopyProtectFail=2, // Key exchange for DVD copy protection failed.
// Playback is stopped.
DVD_ERROR_InvalidDVD1_0Disc=3, // DVD-Video disc is incorrectly authored for v1.0
// of spec. Playback is stopped.
DVD_ERROR_InvalidDiscRegion=4, // The Disc cannot be played because the disc is not
// authored to play in system region.
// The region mismatch may be fixable by
// changing the system region with dvdrgn.exe
DVD_ERROR_LowParentalLevel=5, // Player parental level is lower than the lowest parental
// level available in the DVD content. Playback is stopped.
DVD_ERROR_MacrovisionFail=6, // Macrovision Distribution Failed.
// Playback is stopped.
DVD_ERROR_IncompatibleSystemAndDecoderRegions=7,
// No discs can be played because the system region
// does not match the decoder region.
DVD_ERROR_IncompatibleDiscAndDecoderRegions=8
// The disc cannot be played because the disc is
// not authored to be played in the decoder's region
} DVD_ERROR;
typedef enum _tagDVD_WARNING {
DVD_WARNING_InvalidDVD1_0Disc=1,// DVD-Video disc is incorrectly authored. Playback
// can continue, but unexpected behavior may occur.
DVD_WARNING_FormatNotSupported=2,// A decoder would not support the current format. Playback
// of a stream (audio, video of SP) may not function.
DVD_WARNING_IllegalNavCommand=3,// The internal DVD navigation command processor attempted to
// process an illegal command.
DVD_WARNING_Open = 4, // File Open Failed
DVD_WARNING_Seek = 5, // File Seek Failed
DVD_WARNING_Read = 6 // File Read Failed
} DVD_WARNING;
#endif
// DVD-Video event codes
// ======================
//
// All DVD-Video event are always passed on to the application, and are
// never processed by the filter graph
#define EC_DVD_DOMAIN_CHANGE (EC_DVDBASE + 0x01)
// Parameters: ( DWORD, void )
// lParam1 is enum DVD_DOMAIN, and indicates the player's new domain
//
// Raised from following domains: all
//
// Signaled when ever the DVD player changes domains.
#define EC_DVD_TITLE_CHANGE (EC_DVDBASE + 0x02)
// Parameters: ( DWORD, void )
// lParam1 is the new title number.
//
// Raised from following domains: DVD_DOMAIN_Title
//
// Indicates when the current title number changes. Title numbers
// range 1 to 99. This indicates the TTN, which is the title number
// with respect to the whole disc, not the VTS_TTN which is the title
// number with respect to just a current VTS.
#define EC_DVD_CHAPTER_START (EC_DVDBASE + 0x03)
// Parameters: ( DWORD, void )
// lParam1 is the new chapter number (which is the program number for
// One_Sequential_PGC_Titles).
//
// Raised from following domains: DVD_DOMAIN_Title
//
// Signales that DVD player started playback of a new program in the Title
// domain. This is only signaled for One_Sequential_PGC_Titles.
#define EC_DVD_AUDIO_STREAM_CHANGE (EC_DVDBASE + 0x04)
// Parameters: ( DWORD, void )
// lParam1 is the new user audio stream number.
//
// Raised from following domains: all
//
// Signaled when ever the current user audio stream number changes for the main
// title. This can be changed automatically with a navigation command on disc
// as well as through IDVDAnnexJ.
// Audio stream numbers range from 0 to 7. Stream 0xffffffff
// indicates that no stream is selected.
#define EC_DVD_SUBPICTURE_STREAM_CHANGE (EC_DVDBASE + 0x05)
// Parameters: ( DWORD, void )
// lParam1 is the new user subpicture stream number.
//
// Raised from following domains: all
//
// Signaled when ever the current user subpicture stream number changes for the main
// title. This can be changed automatically with a navigation command on disc
// as well as through IDVDAnnexJ.
// Subpicture stream numbers range from 0 to 31. Stream 0xffffffff
// indicates that no stream is selected.
#define EC_DVD_ANGLE_CHANGE (EC_DVDBASE + 0x06)
// Parameters: ( DWORD, DWORD )
// lParam1 is the number of available angles.
// lParam2 is the current user angle number.
//
// Raised from following domains: all
//
// Signaled when ever either
// a) the number of available angles changes, or
// b) the current user angle number changes.
// Current angle number can be changed automatically with navigation command
// on disc as well as through IDVDAnnexJ.
// When the number of available angles is 1, the current video is not multiangle.
// Angle numbers range from 1 to 9.
#define EC_DVD_BUTTON_CHANGE (EC_DVDBASE + 0x07)
// Parameters: ( DWORD, DWORD )
// lParam1 is the number of available buttons.
// lParam2 is the current selected button number.
//
// Raised from following domains: all
//
// Signaled when ever either
// a) the number of available buttons changes, or
// b) the current selected button number changes.
// The current selected button can be changed automatically with navigation
// commands on disc as well as through IDVDAnnexJ.
// Button numbers range from 1 to 36. Selected button number 0 implies that
// no button is selected. Note that these button numbers enumerate all
// available button numbers, and do not always correspond to button numbers
// used for IDVDAnnexJ::ButtonSelectAndActivate since only a subset of buttons
// may be activated with ButtonSelectAndActivate.
#define EC_DVD_VALID_UOPS_CHANGE (EC_DVDBASE + 0x08)
// Parameters: ( DWORD, void )
// lParam1 is a VALID_UOP_SOMTHING_OR_OTHER bit-field stuct which indicates
// which IDVDAnnexJ commands are explicitly disable by the DVD disc.
//
// Raised from following domains: all
//
// Signaled when ever the available set of IDVDAnnexJ methods changes. This
// only indicates which operations are explicited disabled by the content on
// the DVD disc, and does not guarentee that it is valid to call methods
// which are not disabled. For example, if no buttons are currently present,
// IDVDAnnexJ::ButtonActivate() won't work, even though the buttons are not
// explicitly disabled.
#define EC_DVD_STILL_ON (EC_DVDBASE + 0x09)
// Parameters: ( BOOL, DWORD )
// lParam1 == 0 --> buttons are available, so StillOff won't work
// lParam1 == 1 --> no buttons available, so StillOff will work
// lParam2 indicates the number of seconds the still will last, with 0xffffffff
// indicating an infinite still (wait till button or StillOff selected).
//
// Raised from following domains: all
//
// Signaled at the beginning of any still: PGC still, Cell Still, or VOBU Still.
// Note that all combinations of buttons and still are possible (buttons on with
// still on, buttons on with still off, button off with still on, button off
// with still off).
#define EC_DVD_STILL_OFF (EC_DVDBASE + 0x0a)
// Parameters: ( void, void )
//
// Indicating that any still that is currently active
// has been released.
//
// Raised from following domains: all
//
// Signaled at the end of any still: PGC still, Cell Still, or VOBU Still.
//
#define EC_DVD_CURRENT_TIME (EC_DVDBASE + 0x0b)
// Parameters: ( DWORD, BOOL )
// lParam1 is a DVD_TIMECODE which indicates the current
// playback time code in a BCD HH:MM:SS:FF format.
// lParam2 == 0 --> time code is 25 frames/sec
// lParam2 == 1 --> time code is 30 frames/sec (non-drop).
// lParam2 == 2 --> time code is invalid (current playback time
// cannot be determined for current title)
//
// Raised from following domains: DVD_DOMAIN_Title
//
// Signaled at the beginning of every VOBU, which occurs every .4 to 1.0 sec.
// This is only signaled for One_Sequential_PGC_Titles.
#define EC_DVD_ERROR (EC_DVDBASE + 0x0c)
// Parameters: ( DWORD, void)
// lParam1 is an enum DVD_ERROR which notifies the app of some error condition.
//
// Raised from following domains: all
//
#define EC_DVD_WARNING (EC_DVDBASE + 0x0d)
// Parameters: ( DWORD, void)
// lParam1 is an enum DVD_WARNING which notifies the app of some warning condition.
//
// Raised from following domains: all
//
#define EC_DVD_CHAPTER_AUTOSTOP (EC_DVDBASE + 0x0e)
// Parameters: (BOOL, void)
// lParam1 is a BOOL which indicates the reason for the cancellation of ChapterPlayAutoStop
// lParam1 == 0 indicates successful completion of ChapterPlayAutoStop
// lParam1 == 1 indicates that ChapterPlayAutoStop is being cancelled as a result of another
// IDVDControl call or the end of content has been reached & no more chapters
// can be played.
// Indicating that playback is stopped as a result of a call
// to IDVDControl::ChapterPlayAutoStop()
//
// Raised from following domains : DVD_DOMAIN_TITLE
//
#define EC_DVD_NO_FP_PGC (EC_DVDBASE + 0x0f)
// Parameters : (void, void)
//
// Raised from the following domains : FP_DOM
//
// Indicates that the DVD disc does not have a FP_PGC (First Play Program Chain)
// and the DVD Navigator will not automatically load any PGC and start playback.
//
#define EC_DVD_PLAYBACK_RATE_CHANGE (EC_DVDBASE + 0x10)
// Parameters : (LONG, void)
// lParam1 is a LONG indicating the new playback rate.
// lParam1 < 0 indicates reverse playback mode.
// lParam1 > 0 indicates forward playback mode
// Value of lParam1 is the actual playback rate multiplied by 10000.
// i.e. lParam1 = rate * 10000
//
// Raised from the following domains : TT_DOM
//
// Indicates that a rate change in playback has been initiated and the parameter
// lParam1 indicates the new playback rate that is being used.
//
#define EC_DVD_PARENTAL_LEVEL_CHANGE (EC_DVDBASE + 0x11)
// Parameters : (LONG, void)
// lParam1 is a LONG indicating the new parental level.
//
// Raised from the following domains : VMGM_DOM
//
// Indicates that an authored Nav command has changed the parental level
// setting in the player.
//
#define EC_DVD_PLAYBACK_STOPPED (EC_DVDBASE + 0x12)
// Parameters : (void, void)
//
// Raised from the following domains : All Domains
//
// Indicates that playback has been stopped as the Navigator has completed
// playback of the pgc and did not find any other branching instruction for
// subsequent playback.
//
#define EC_DVD_ANGLES_AVAILABLE (EC_DVDBASE + 0x13)
// Parameters : (BOOL, void)
// lParam1 == 0 indicates that playback is not in an angle block and angles are
// not available
// lParam1 == 1 indicates that an angle block is being played back and angle changes
// can be performed.
//
// Indicates whether an angle block is being played and if angle changes can be
// performed. However, angle changes are not restricted to angle blocks and the
// manifestation of the angle change can be seen only in an angle block.
#define EC_DVD_PLAYPERIOD_AUTOSTOP (EC_DVDBASE + 0x14)
// Parameters: (void, void)
// Sent when the PlayPeriodInTitle completes or is cancelled
//
// Raised from following domains : DVD_DOMAIN_TITLE
//
#define EC_DVD_BUTTON_AUTO_ACTIVATED (EC_DVDBASE + 0x15)
// Parameters: (DWORD button, void)
// Sent when a button is automatically activated
//
// Raised from following domains : DVD_DOMAIN_MENU
//
#define EC_DVD_CMD_START (EC_DVDBASE + 0x16)
// Parameters: (CmdID, HRESULT)
// Sent when a command begins
//
#define EC_DVD_CMD_END (EC_DVDBASE + 0x17)
// Parameters: (CmdID, HRESULT)
// Sent when a command completes
//
#define EC_DVD_DISC_EJECTED (EC_DVDBASE + 0x18)
// Parameters: none
// Sent when the nav detects that a disc was ejected and stops the playback
// The app does not need to take any action to stop the playback.
//
#define EC_DVD_DISC_INSERTED (EC_DVDBASE + 0x19)
// Parameters: none
// Sent when the nav detects that a disc was inserted and the nav begins playback
// The app does not need to take any action to start the playback.
//
#define EC_DVD_CURRENT_HMSF_TIME (EC_DVDBASE + 0x1a)
// Parameters: ( ULONG, ULONG )
// lParam2 contains a union of the DVD_TIMECODE_FLAGS
// lParam1 contains a DVD_HMSF_TIMECODE. Assign lParam1 to a ULONG then cast the
// ULONG as a DVD_HMSF_TIMECODE to use its values.
//
// Raised from following domains: DVD_DOMAIN_Title
//
// Signaled at the beginning of every VOBU, which occurs every .4 to 1.0 sec.
#define EC_DVD_KARAOKE_MODE (EC_DVDBASE + 0x1b)
// Parameters: ( BOOL, reserved )
// lParam1 is either TRUE (a karaoke track is being played) or FALSE (no karaoke data is being played).
//

403
lib/directx8/dvdmedia.h Executable file
View File

@ -0,0 +1,403 @@
//------------------------------------------------------------------------------
// File: DVDMedia.h
//
// Desc: Contains typedefs and defines necessary for user mode (ring 3) DVD
// filters and applications.
//
// This should be included in the DirectShow SDK for user mode filters.
// The types defined here should be kept in synch with ksmedia.h WDM
// DDK for kernel mode filters.
//
// Copyright (c) 1997 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __DVDMEDIA_H__
#define __DVDMEDIA_H__
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
// -----------------------------------------------------------------------
// AC-3 definition for the AM_KSPROPSETID_AC3 property set
// -----------------------------------------------------------------------
typedef enum {
AM_PROPERTY_AC3_ERROR_CONCEALMENT = 1,
AM_PROPERTY_AC3_ALTERNATE_AUDIO = 2,
AM_PROPERTY_AC3_DOWNMIX = 3,
AM_PROPERTY_AC3_BIT_STREAM_MODE = 4,
AM_PROPERTY_AC3_DIALOGUE_LEVEL = 5,
AM_PROPERTY_AC3_LANGUAGE_CODE = 6,
AM_PROPERTY_AC3_ROOM_TYPE = 7
} AM_PROPERTY_AC3;
typedef struct {
BOOL fRepeatPreviousBlock;
BOOL fErrorInCurrentBlock;
} AM_AC3_ERROR_CONCEALMENT, *PAM_AC3_ERROR_CONCEALMENT;
typedef struct {
BOOL fStereo;
ULONG DualMode;
} AM_AC3_ALTERNATE_AUDIO, *PAM_AC3_ALTERNATE_AUDIO;
#define AM_AC3_ALTERNATE_AUDIO_1 1
#define AM_AC3_ALTERNATE_AUDIO_2 2
#define AM_AC3_ALTERNATE_AUDIO_BOTH 3
typedef struct {
BOOL fDownMix;
BOOL fDolbySurround;
} AM_AC3_DOWNMIX, *PAM_AC3_DOWNMIX;
typedef struct {
LONG BitStreamMode;
} AM_AC3_BIT_STREAM_MODE, *PAM_AC3_BIT_STREAM_MODE;
#define AM_AC3_SERVICE_MAIN_AUDIO 0
#define AM_AC3_SERVICE_NO_DIALOG 1
#define AM_AC3_SERVICE_VISUALLY_IMPAIRED 2
#define AM_AC3_SERVICE_HEARING_IMPAIRED 3
#define AM_AC3_SERVICE_DIALOG_ONLY 4
#define AM_AC3_SERVICE_COMMENTARY 5
#define AM_AC3_SERVICE_EMERGENCY_FLASH 6
#define AM_AC3_SERVICE_VOICE_OVER 7
typedef struct {
ULONG DialogueLevel;
} AM_AC3_DIALOGUE_LEVEL, *PAM_AC3_DIALOGUE_LEVEL;
typedef struct {
BOOL fLargeRoom;
} AM_AC3_ROOM_TYPE, *PAM_AC3_ROOM_TYPE;
// -----------------------------------------------------------------------
// subpicture definition for the AM_KSPROPSETID_DvdSubPic property set
// -----------------------------------------------------------------------
typedef enum {
AM_PROPERTY_DVDSUBPIC_PALETTE = 0,
AM_PROPERTY_DVDSUBPIC_HLI = 1,
AM_PROPERTY_DVDSUBPIC_COMPOSIT_ON = 2 // TRUE for subpicture is displayed
} AM_PROPERTY_DVDSUBPIC;
typedef struct _AM_DVD_YUV {
UCHAR Reserved;
UCHAR Y;
UCHAR U;
UCHAR V;
} AM_DVD_YUV, *PAM_DVD_YUV;
typedef struct _AM_PROPERTY_SPPAL {
AM_DVD_YUV sppal[16];
} AM_PROPERTY_SPPAL, *PAM_PROPERTY_SPPAL;
typedef struct _AM_COLCON {
UCHAR emph1col:4;
UCHAR emph2col:4;
UCHAR backcol:4;
UCHAR patcol:4;
UCHAR emph1con:4;
UCHAR emph2con:4;
UCHAR backcon:4;
UCHAR patcon:4;
} AM_COLCON, *PAM_COLCON;
typedef struct _AM_PROPERTY_SPHLI {
USHORT HLISS; //
USHORT Reserved;
ULONG StartPTM; // start presentation time in x/90000
ULONG EndPTM; // end PTM in x/90000
USHORT StartX;
USHORT StartY;
USHORT StopX;
USHORT StopY;
AM_COLCON ColCon; // color contrast description (4 bytes as given in HLI)
} AM_PROPERTY_SPHLI, *PAM_PROPERTY_SPHLI;
typedef BOOL AM_PROPERTY_COMPOSIT_ON, *PAM_PROPERTY_COMPOSIT_ON;
// -----------------------------------------------------------------------
// copy protection definitions
// -----------------------------------------------------------------------
// AM_UseNewCSSKey for the dwTypeSpecificFlags in IMediaSample2 to indicate
// the exact point in a stream after which to start applying a new CSS key.
// This is typically sent on an empty media sample just before attempting
// to renegotiate a CSS key.
#define AM_UseNewCSSKey 0x1
//
// AM_KSPROPSETID_CopyProt property set definitions
//
typedef enum {
AM_PROPERTY_DVDCOPY_CHLG_KEY = 0x01,
AM_PROPERTY_DVDCOPY_DVD_KEY1 = 0x02,
AM_PROPERTY_DVDCOPY_DEC_KEY2 = 0x03,
AM_PROPERTY_DVDCOPY_TITLE_KEY = 0x04,
AM_PROPERTY_COPY_MACROVISION = 0x05,
AM_PROPERTY_DVDCOPY_REGION = 0x06,
AM_PROPERTY_DVDCOPY_SET_COPY_STATE = 0x07,
AM_PROPERTY_DVDCOPY_DISC_KEY = 0x80
} AM_PROPERTY_DVDCOPYPROT;
typedef struct _AM_DVDCOPY_CHLGKEY {
BYTE ChlgKey[10];
BYTE Reserved[2];
} AM_DVDCOPY_CHLGKEY, *PAM_DVDCOPY_CHLGKEY;
typedef struct _AM_DVDCOPY_BUSKEY {
BYTE BusKey[5];
BYTE Reserved[1];
} AM_DVDCOPY_BUSKEY, *PAM_DVDCOPY_BUSKEY;
typedef struct _AM_DVDCOPY_DISCKEY {
BYTE DiscKey[2048];
} AM_DVDCOPY_DISCKEY, *PAM_DVDCOPY_DISCKEY;
typedef struct AM_DVDCOPY_TITLEKEY {
ULONG KeyFlags;
ULONG Reserved1[2];
UCHAR TitleKey[6];
UCHAR Reserved2[2];
} AM_DVDCOPY_TITLEKEY, *PAM_DVDCOPY_TITLEKEY;
typedef struct _AM_COPY_MACROVISION {
ULONG MACROVISIONLevel;
} AM_COPY_MACROVISION, *PAM_COPY_MACROVISION;
typedef struct AM_DVDCOPY_SET_COPY_STATE {
ULONG DVDCopyState;
} AM_DVDCOPY_SET_COPY_STATE, *PAM_DVDCOPY_SET_COPY_STATE;
typedef enum {
AM_DVDCOPYSTATE_INITIALIZE = 0,
AM_DVDCOPYSTATE_INITIALIZE_TITLE = 1, // indicates we are starting a title
// key copy protection sequence
AM_DVDCOPYSTATE_AUTHENTICATION_NOT_REQUIRED = 2,
AM_DVDCOPYSTATE_AUTHENTICATION_REQUIRED = 3,
AM_DVDCOPYSTATE_DONE = 4
} AM_DVDCOPYSTATE;
typedef enum {
AM_MACROVISION_DISABLED = 0,
AM_MACROVISION_LEVEL1 = 1,
AM_MACROVISION_LEVEL2 = 2,
AM_MACROVISION_LEVEL3 = 3
} AM_COPY_MACROVISION_LEVEL, *PAM_COPY_MACROVISION_LEVEL;
// CSS region stucture
typedef struct _DVD_REGION {
UCHAR CopySystem;
UCHAR RegionData;
UCHAR SystemRegion;
UCHAR Reserved;
} DVD_REGION, *PDVD_REGION;
//
// CGMS Copy Protection Flags
//
#define AM_DVD_CGMS_RESERVED_MASK 0x00000078
#define AM_DVD_CGMS_COPY_PROTECT_MASK 0x00000018
#define AM_DVD_CGMS_COPY_PERMITTED 0x00000000
#define AM_DVD_CGMS_COPY_ONCE 0x00000010
#define AM_DVD_CGMS_NO_COPY 0x00000018
#define AM_DVD_COPYRIGHT_MASK 0x00000040
#define AM_DVD_NOT_COPYRIGHTED 0x00000000
#define AM_DVD_COPYRIGHTED 0x00000040
#define AM_DVD_SECTOR_PROTECT_MASK 0x00000020
#define AM_DVD_SECTOR_NOT_PROTECTED 0x00000000
#define AM_DVD_SECTOR_PROTECTED 0x00000020
// -----------------------------------------------------------------------
// video format blocks
// -----------------------------------------------------------------------
enum AM_MPEG2Level {
AM_MPEG2Level_Low = 1,
AM_MPEG2Level_Main = 2,
AM_MPEG2Level_High1440 = 3,
AM_MPEG2Level_High = 4
};
enum AM_MPEG2Profile {
AM_MPEG2Profile_Simple = 1,
AM_MPEG2Profile_Main = 2,
AM_MPEG2Profile_SNRScalable = 3,
AM_MPEG2Profile_SpatiallyScalable = 4,
AM_MPEG2Profile_High = 5
};
#define AMINTERLACE_IsInterlaced 0x00000001 // if 0, other interlace bits are irrelevent
#define AMINTERLACE_1FieldPerSample 0x00000002 // else 2 fields per media sample
#define AMINTERLACE_Field1First 0x00000004 // else Field 2 is first; top field in PAL is field 1, top field in NTSC is field 2?
#define AMINTERLACE_UNUSED 0x00000008 //
#define AMINTERLACE_FieldPatternMask 0x00000030 // use this mask with AMINTERLACE_FieldPat*
#define AMINTERLACE_FieldPatField1Only 0x00000000 // stream never contains a Field2
#define AMINTERLACE_FieldPatField2Only 0x00000010 // stream never contains a Field1
#define AMINTERLACE_FieldPatBothRegular 0x00000020 // There will be a Field2 for every Field1 (required for Weave?)
#define AMINTERLACE_FieldPatBothIrregular 0x00000030 // Random pattern of Field1s and Field2s
#define AMINTERLACE_DisplayModeMask 0x000000c0
#define AMINTERLACE_DisplayModeBobOnly 0x00000000
#define AMINTERLACE_DisplayModeWeaveOnly 0x00000040
#define AMINTERLACE_DisplayModeBobOrWeave 0x00000080
#define AMCOPYPROTECT_RestrictDuplication 0x00000001 // duplication of this stream should be restricted
#define AMMPEG2_DoPanScan 0x00000001 //if set, the MPEG-2 video decoder should crop output image
// based on pan-scan vectors in picture_display_extension
// and change the picture aspect ratio accordingly.
#define AMMPEG2_DVDLine21Field1 0x00000002 //if set, the MPEG-2 decoder must be able to produce an output
// pin for DVD style closed caption data found in GOP layer of field 1
#define AMMPEG2_DVDLine21Field2 0x00000004 //if set, the MPEG-2 decoder must be able to produce an output
// pin for DVD style closed caption data found in GOP layer of field 2
#define AMMPEG2_SourceIsLetterboxed 0x00000008 //if set, indicates that black bars have been encoded in the top
// and bottom of the video.
#define AMMPEG2_FilmCameraMode 0x00000010 //if set, indicates "film mode" used for 625/50 content. If cleared,
// indicates that "camera mode" was used.
#define AMMPEG2_LetterboxAnalogOut 0x00000020 //if set and this stream is sent to an analog output, it should
// be letterboxed. Streams sent to VGA should be letterboxed only by renderers.
typedef struct tagVIDEOINFOHEADER2 {
RECT rcSource;
RECT rcTarget;
DWORD dwBitRate;
DWORD dwBitErrorRate;
REFERENCE_TIME AvgTimePerFrame;
DWORD dwInterlaceFlags; // use AMINTERLACE_* defines. Reject connection if undefined bits are not 0
DWORD dwCopyProtectFlags; // use AMCOPYPROTECT_* defines. Reject connection if undefined bits are not 0
DWORD dwPictAspectRatioX; // X dimension of picture aspect ratio, e.g. 16 for 16x9 display
DWORD dwPictAspectRatioY; // Y dimension of picture aspect ratio, e.g. 9 for 16x9 display
DWORD dwReserved1; // must be 0; reject connection otherwise
DWORD dwReserved2; // must be 0; reject connection otherwise
BITMAPINFOHEADER bmiHeader;
} VIDEOINFOHEADER2;
typedef struct tagMPEG2VIDEOINFO {
VIDEOINFOHEADER2 hdr;
DWORD dwStartTimeCode; // ?? not used for DVD ??
DWORD cbSequenceHeader; // is 0 for DVD (no sequence header)
DWORD dwProfile; // use enum MPEG2Profile
DWORD dwLevel; // use enum MPEG2Level
DWORD dwFlags; // use AMMPEG2_* defines. Reject connection if undefined bits are not 0
DWORD dwSequenceHeader[1]; // DWORD instead of Byte for alignment purposes
// For MPEG-2, if a sequence_header is included, the sequence_extension
// should also be included
} MPEG2VIDEOINFO;
#define SIZE_MPEG2VIDEOINFO(pv) (FIELD_OFFSET(MPEG2VIDEOINFO, dwSequenceHeader[0]) + (pv)->cbSequenceHeader)
// do not use
#define MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader)
// use this macro instead, the previous only works for MPEG1VIDEOINFO structures
#define MPEG2_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->dwSequenceHeader)
//===================================================================================
// flags for dwTypeSpecificFlags in AM_SAMPLE2_PROPERTIES which define type specific
// data in IMediaSample2
//===================================================================================
#define AM_VIDEO_FLAG_FIELD_MASK 0x0003L // use this mask to check whether the sample is field1 or field2 or frame
#define AM_VIDEO_FLAG_INTERLEAVED_FRAME 0x0000L // the sample is a frame (remember to use AM_VIDEO_FLAG_FIELD_MASK when using this)
#define AM_VIDEO_FLAG_FIELD1 0x0001L // the sample is field1 (remember to use AM_VIDEO_FLAG_FIELD_MASK when using this)
#define AM_VIDEO_FLAG_FIELD2 0x0002L // the sample is the field2 (remember to use AM_VIDEO_FLAG_FIELD_MASK when using this)
#define AM_VIDEO_FLAG_FIELD1FIRST 0x0004L // if set means display field1 first, else display field2 first.
// this bit is irrelavant for 1FieldPerSample mode
#define AM_VIDEO_FLAG_WEAVE 0x0008L // if set use bob display mode else weave
#define AM_VIDEO_FLAG_IPB_MASK 0x0030L // use this mask to check whether the sample is I, P or B
#define AM_VIDEO_FLAG_I_SAMPLE 0x0000L // I Sample (remember to use AM_VIDEO_FLAG_IPB_MASK when using this)
#define AM_VIDEO_FLAG_P_SAMPLE 0x0010L // P Sample (remember to use AM_VIDEO_FLAG_IPB_MASK when using this)
#define AM_VIDEO_FLAG_B_SAMPLE 0x0020L // B Sample (remember to use AM_VIDEO_FLAG_IPB_MASK when using this)
#define AM_VIDEO_FLAG_REPEAT_FIELD 0x0040L // if set means display the field which has been displayed first again after displaying
// both fields first. This bit is irrelavant for 1FieldPerSample mode
// -----------------------------------------------------------------------
// AM_KSPROPSETID_DvdKaraoke property set definitions
// -----------------------------------------------------------------------
typedef struct tagAM_DvdKaraokeData
{
DWORD dwDownmix; // bitwise OR of AM_DvdKaraoke_Downmix flags
DWORD dwSpeakerAssignment; // AM_DvdKaraoke_SpeakerAssignment
} AM_DvdKaraokeData;
typedef enum {
AM_PROPERTY_DVDKARAOKE_ENABLE = 0, // BOOL
AM_PROPERTY_DVDKARAOKE_DATA = 1,
} AM_PROPERTY_DVDKARAOKE;
// -----------------------------------------------------------------------
// AM_KSPROPSETID_TSRateChange property set definitions for time stamp
// rate changes.
// -----------------------------------------------------------------------
typedef enum {
AM_RATE_SimpleRateChange = 1, // rw, use AM_SimpleRateChange
AM_RATE_ExactRateChange = 2, // rw, use AM_ExactRateChange
AM_RATE_MaxFullDataRate = 3, // r, use AM_MaxFullDataRate
AM_RATE_Step = 4 // w, use AM_Step
} AM_PROPERTY_TS_RATE_CHANGE;
// -------------------------------------------------------------------
// AM_KSPROPSETID_DVD_RateChange property set definitions for new DVD
// rate change scheme.
// -------------------------------------------------------------------
typedef enum {
AM_RATE_ChangeRate = 1, // w, use AM_DVD_ChangeRate
AM_RATE_FullDataRateMax = 2, // r, use AM_MaxFullDataRate
AM_RATE_ReverseDecode = 3, // r, use LONG
AM_RATE_DecoderPosition = 4, // r, use AM_DVD_DecoderPosition
AM_RATE_DecoderVersion = 5 // r, use LONG
} AM_PROPERTY_DVD_RATE_CHANGE;
typedef struct {
// this is the simplest mechanism to set a time stamp rate change on
// a filter (simplest for the person setting the rate change, harder
// for the filter doing the rate change).
REFERENCE_TIME StartTime; //stream time at which to start this rate
LONG Rate; //new rate * 10000 (decimal)
} AM_SimpleRateChange;
typedef struct {
REFERENCE_TIME OutputZeroTime; //input TS that maps to zero output TS
LONG Rate; //new rate * 10000 (decimal)
} AM_ExactRateChange;
typedef LONG AM_MaxFullDataRate; //rate * 10000 (decimal)
typedef DWORD AM_Step; // number of frame to step
// New rate change property set, structs. enums etc.
typedef struct {
REFERENCE_TIME StartInTime; // stream time (input) at which to start decoding at this rate
REFERENCE_TIME StartOutTime; // reference time (output) at which to start showing at this rate
LONG Rate; // new rate * 10000 (decimal)
} AM_DVD_ChangeRate ;
typedef LONGLONG AM_DVD_DecoderPosition ;
typedef enum {
DVD_DIR_FORWARD = 0,
DVD_DIR_BACKWARD = 1
} DVD_PLAY_DIRECTION ;
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // __DVDMEDIA_H__

850
lib/directx8/dvoice.h Executable file
View File

@ -0,0 +1,850 @@
/*==========================================================================;
*
* Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
*
* File: dpvoice.h
* Content: DirectPlayVoice include file
***************************************************************************/
#ifndef __DVOICE__
#define __DVOICE__
#include <ole2.h> // for DECLARE_INTERFACE and HRESULT
#include <mmsystem.h>
#include <mmreg.h>
#include <msacm.h>
#include "dsound.h"
#ifdef __cplusplus
extern "C" {
#endif
/****************************************************************************
*
* DirectPlayVoice CLSIDs
*
****************************************************************************/
// {B9F3EB85-B781-4ac1-8D90-93A05EE37D7D}
DEFINE_GUID(CLSID_DirectPlayVoiceClient,
0xb9f3eb85, 0xb781, 0x4ac1, 0x8d, 0x90, 0x93, 0xa0, 0x5e, 0xe3, 0x7d, 0x7d);
// {D3F5B8E6-9B78-4a4c-94EA-CA2397B663D3}
DEFINE_GUID(CLSID_DirectPlayVoiceServer,
0xd3f5b8e6, 0x9b78, 0x4a4c, 0x94, 0xea, 0xca, 0x23, 0x97, 0xb6, 0x63, 0xd3);
// {0F0F094B-B01C-4091-A14D-DD0CD807711A}
DEFINE_GUID(CLSID_DirectPlayVoiceTest,
0xf0f094b, 0xb01c, 0x4091, 0xa1, 0x4d, 0xdd, 0xc, 0xd8, 0x7, 0x71, 0x1a);
/****************************************************************************
*
* DirectPlayVoice Interface IIDs
*
****************************************************************************/
// {1DFDC8EA-BCF7-41d6-B295-AB64B3B23306}
DEFINE_GUID(IID_IDirectPlayVoiceClient,
0x1dfdc8ea, 0xbcf7, 0x41d6, 0xb2, 0x95, 0xab, 0x64, 0xb3, 0xb2, 0x33, 0x6);
// {FAA1C173-0468-43b6-8A2A-EA8A4F2076C9}
DEFINE_GUID(IID_IDirectPlayVoiceServer,
0xfaa1c173, 0x468, 0x43b6, 0x8a, 0x2a, 0xea, 0x8a, 0x4f, 0x20, 0x76, 0xc9);
// {D26AF734-208B-41da-8224-E0CE79810BE1}
DEFINE_GUID(IID_IDirectPlayVoiceTest,
0xd26af734, 0x208b, 0x41da, 0x82, 0x24, 0xe0, 0xce, 0x79, 0x81, 0xb, 0xe1);
/****************************************************************************
*
* DirectPlayVoice Compression Type GUIDs
*
****************************************************************************/
// MS-ADPCM 32.8 kbit/s
//
// {699B52C1-A885-46a8-A308-97172419ADC7}
DEFINE_GUID(DPVCTGUID_ADPCM,
0x699b52c1, 0xa885, 0x46a8, 0xa3, 0x8, 0x97, 0x17, 0x24, 0x19, 0xad, 0xc7);
// Microsoft GSM 6.10 13 kbit/s
//
// {24768C60-5A0D-11d3-9BE4-525400D985E7}
DEFINE_GUID(DPVCTGUID_GSM,
0x24768c60, 0x5a0d, 0x11d3, 0x9b, 0xe4, 0x52, 0x54, 0x0, 0xd9, 0x85, 0xe7);
// MS-PCM 64 kbit/s
//
// {8DE12FD4-7CB3-48ce-A7E8-9C47A22E8AC5}
DEFINE_GUID(DPVCTGUID_NONE,
0x8de12fd4, 0x7cb3, 0x48ce, 0xa7, 0xe8, 0x9c, 0x47, 0xa2, 0x2e, 0x8a, 0xc5);
// Voxware SC03 3.2kbit/s
//
// {7D82A29B-2242-4f82-8F39-5D1153DF3E41}
DEFINE_GUID(DPVCTGUID_SC03,
0x7d82a29b, 0x2242, 0x4f82, 0x8f, 0x39, 0x5d, 0x11, 0x53, 0xdf, 0x3e, 0x41);
// Voxware SC06 6.4kbit/s
//
// {53DEF900-7168-4633-B47F-D143916A13C7}
DEFINE_GUID(DPVCTGUID_SC06,
0x53def900, 0x7168, 0x4633, 0xb4, 0x7f, 0xd1, 0x43, 0x91, 0x6a, 0x13, 0xc7);
// TrueSpeech(TM) 8.6 kbit/s
//
// {D7954361-5A0B-11d3-9BE4-525400D985E7}
DEFINE_GUID(DPVCTGUID_TRUESPEECH,
0xd7954361, 0x5a0b, 0x11d3, 0x9b, 0xe4, 0x52, 0x54, 0x0, 0xd9, 0x85, 0xe7);
// Voxware VR12 1.4kbit/s
//
// {FE44A9FE-8ED4-48bf-9D66-1B1ADFF9FF6D}
DEFINE_GUID(DPVCTGUID_VR12,
0xfe44a9fe, 0x8ed4, 0x48bf, 0x9d, 0x66, 0x1b, 0x1a, 0xdf, 0xf9, 0xff, 0x6d);
// Define the default compression type
#define DPVCTGUID_DEFAULT DPVCTGUID_SC03
/****************************************************************************
*
* DirectPlayVoice Interface Pointer definitions
*
****************************************************************************/
typedef struct IDirectPlayVoiceClient FAR *LPDIRECTPLAYVOICECLIENT, *PDIRECTPLAYVOICECLIENT;
typedef struct IDirectPlayVoiceServer FAR *LPDIRECTPLAYVOICESERVER, *PDIRECTPLAYVOICESERVER;
typedef struct IDirectPlayVoiceTest FAR *LPDIRECTPLAYVOICETEST, *PDIRECTPLAYVOICETEST;
/****************************************************************************
*
* DirectPlayVoice Callback Functions
*
****************************************************************************/
typedef HRESULT (FAR PASCAL *PDVMESSAGEHANDLER)(
PVOID pvUserContext,
DWORD dwMessageType,
LPVOID lpMessage
);
typedef PDVMESSAGEHANDLER LPDVMESSAGEHANDLER;
/****************************************************************************
*
* DirectPlayVoice Datatypes (Non-Structure / Non-Message)
*
****************************************************************************/
typedef DWORD DVID, *LPDVID, *PDVID;
/****************************************************************************
*
* DirectPlayVoice Message Types
*
****************************************************************************/
#define DVMSGID_BASE 0x0000
#define DVMSGID_MINBASE (DVMSGID_CREATEVOICEPLAYER)
#define DVMSGID_CREATEVOICEPLAYER (DVMSGID_BASE+0x0001)
#define DVMSGID_DELETEVOICEPLAYER (DVMSGID_BASE+0x0002)
#define DVMSGID_SESSIONLOST (DVMSGID_BASE+0x0003)
#define DVMSGID_PLAYERVOICESTART (DVMSGID_BASE+0x0004)
#define DVMSGID_PLAYERVOICESTOP (DVMSGID_BASE+0x0005)
#define DVMSGID_RECORDSTART (DVMSGID_BASE+0x0006)
#define DVMSGID_RECORDSTOP (DVMSGID_BASE+0x0007)
#define DVMSGID_CONNECTRESULT (DVMSGID_BASE+0x0008)
#define DVMSGID_DISCONNECTRESULT (DVMSGID_BASE+0x0009)
#define DVMSGID_INPUTLEVEL (DVMSGID_BASE+0x000A)
#define DVMSGID_OUTPUTLEVEL (DVMSGID_BASE+0x000B)
#define DVMSGID_HOSTMIGRATED (DVMSGID_BASE+0x000C)
#define DVMSGID_SETTARGETS (DVMSGID_BASE+0x000D)
#define DVMSGID_PLAYEROUTPUTLEVEL (DVMSGID_BASE+0x000E)
#define DVMSGID_LOSTFOCUS (DVMSGID_BASE+0x0010)
#define DVMSGID_GAINFOCUS (DVMSGID_BASE+0x0011)
#define DVMSGID_LOCALHOSTSETUP (DVMSGID_BASE+0x0012)
#define DVMSGID_MAXBASE (DVMSGID_LOCALHOSTSETUP)
/****************************************************************************
*
* DirectPlayVoice Constants
*
****************************************************************************/
//
// Buffer Aggresiveness Value Ranges
//
#define DVBUFFERAGGRESSIVENESS_MIN 0x00000001
#define DVBUFFERAGGRESSIVENESS_MAX 0x00000064
#define DVBUFFERAGGRESSIVENESS_DEFAULT 0x00000000
//
// Buffer Quality Value Ranges
//
#define DVBUFFERQUALITY_MIN 0x00000001
#define DVBUFFERQUALITY_MAX 0x00000064
#define DVBUFFERQUALITY_DEFAULT 0x00000000
#define DVID_SYS 0
//
// Used to identify the session host in client/server
//
#define DVID_SERVERPLAYER 1
//
// Used to target all players
//
#define DVID_ALLPLAYERS 0
//
// Used to identify the main buffer
//
#define DVID_REMAINING 0xFFFFFFFF
//
// Input level range
//
#define DVINPUTLEVEL_MIN 0x00000000
#define DVINPUTLEVEL_MAX 0x00000063 // 99 decimal
#define DVNOTIFYPERIOD_MINPERIOD 20
#define DVPLAYBACKVOLUME_DEFAULT DSBVOLUME_MAX
#define DVRECORDVOLUME_LAST 0x00000001
//
// Use the default value
//
#define DVTHRESHOLD_DEFAULT 0xFFFFFFFF
//
// Threshold Ranges
//
#define DVTHRESHOLD_MIN 0x00000000
#define DVTHRESHOLD_MAX 0x00000063 // 99 decimal
//
// Threshold field is not used
//
#define DVTHRESHOLD_UNUSED 0xFFFFFFFE
//
// Session Types
//
#define DVSESSIONTYPE_PEER 0x00000001
#define DVSESSIONTYPE_MIXING 0x00000002
#define DVSESSIONTYPE_FORWARDING 0x00000003
#define DVSESSIONTYPE_ECHO 0x00000004
/****************************************************************************
*
* DirectPlayVoice Flags
*
****************************************************************************/
//
// Enable automatic adjustment of the recording volume
//
#define DVCLIENTCONFIG_AUTORECORDVOLUME 0x00000008
//
// Enable automatic voice activation
//
#define DVCLIENTCONFIG_AUTOVOICEACTIVATED 0x00000020
//
// Enable echo suppression
//
#define DVCLIENTCONFIG_ECHOSUPPRESSION 0x08000000
//
// Voice Activation manual mode
//
#define DVCLIENTCONFIG_MANUALVOICEACTIVATED 0x00000004
//
// Only playback voices that have buffers created for them
//
#define DVCLIENTCONFIG_MUTEGLOBAL 0x00000010
//
// Mute the playback
//
#define DVCLIENTCONFIG_PLAYBACKMUTE 0x00000002
//
// Mute the recording
//
#define DVCLIENTCONFIG_RECORDMUTE 0x00000001
//
// Complete the operation before returning
//
#define DVFLAGS_SYNC 0x00000001
//
// Just check to see if wizard has been run, and if so what it's results were
//
#define DVFLAGS_QUERYONLY 0x00000002
//
// Shutdown the voice session without migrating the host
//
#define DVFLAGS_NOHOSTMIGRATE 0x00000008
//
// Allow the back button to be enabled in the wizard
//
#define DVFLAGS_ALLOWBACK 0x00000010
//
// Disable host migration in the voice session
//
#define DVSESSION_NOHOSTMIGRATION 0x00000001
//
// Server controlled targetting
//
#define DVSESSION_SERVERCONTROLTARGET 0x00000002
//
// Use DirectSound Normal Mode instead of priority
//
#define DVSOUNDCONFIG_NORMALMODE 0x00000001
//
// Automatically select the microphone
//
#define DVSOUNDCONFIG_AUTOSELECT 0x00000002
//
// Run in half duplex mode
//
#define DVSOUNDCONFIG_HALFDUPLEX 0x00000004
//
// No volume controls are available for the recording device
//
#define DVSOUNDCONFIG_NORECVOLAVAILABLE 0x00000010
//
// Disable capture sharing
//
#define DVSOUNDCONFIG_NOFOCUS 0x20000000
//
// Set system conversion quality to high
//
#define DVSOUNDCONFIG_SETCONVERSIONQUALITY 0x00000008
//
// Enable strict focus mode
//
#define DVSOUNDCONFIG_STRICTFOCUS 0x40000000
//
// Player is in half duplex mode
//
#define DVPLAYERCAPS_HALFDUPLEX 0x00000001
//
// Specifies that player is the local player
//
#define DVPLAYERCAPS_LOCAL 0x00000002
/****************************************************************************
*
* DirectPlayVoice Structures (Non-Message)
*
****************************************************************************/
//
// DirectPlayVoice Caps
// (GetCaps / SetCaps)
//
typedef struct
{
DWORD dwSize; // Size of this structure
DWORD dwFlags; // Caps flags
} DVCAPS, *LPDVCAPS, *PDVCAPS;
//
// DirectPlayVoice Client Configuration
// (Connect / GetClientConfig)
//
typedef struct
{
DWORD dwSize; // Size of this structure
DWORD dwFlags; // Flags for client config (DVCLIENTCONFIG_...)
LONG lRecordVolume; // Recording volume
LONG lPlaybackVolume; // Playback volume
DWORD dwThreshold; // Voice Activation Threshold
DWORD dwBufferQuality; // Buffer quality
DWORD dwBufferAggressiveness; // Buffer aggressiveness
DWORD dwNotifyPeriod; // Period of notification messages (ms)
} DVCLIENTCONFIG, *LPDVCLIENTCONFIG, *PDVCLIENTCONFIG;
//
// DirectPlayVoice Compression Type Information
// (GetCompressionTypes)
//
typedef struct
{
DWORD dwSize; // Size of this structure
GUID guidType; // GUID that identifies this compression type
LPWSTR lpszName; // String name of this compression type
LPWSTR lpszDescription; // Description for this compression type
DWORD dwFlags; // Flags for this compression type
DWORD dwMaxBitsPerSecond; // Maximum # of bit/s this compression type uses
} DVCOMPRESSIONINFO, *LPDVCOMPRESSIONINFO, *PDVCOMPRESSIONINFO;
//
// DirectPlayVoice Session Description
// (Host / GetSessionDesc)
//
typedef struct
{
DWORD dwSize; // Size of this structure
DWORD dwFlags; // Session flags (DVSESSION_...)
DWORD dwSessionType; // Session type (DVSESSIONTYPE_...)
GUID guidCT; // Compression Type to use
DWORD dwBufferQuality; // Buffer quality
DWORD dwBufferAggressiveness; // Buffer aggresiveness
} DVSESSIONDESC, *LPDVSESSIONDESC, *PDVSESSIONDESC;
//
// DirectPlayVoice Client Sound Device Configuration
// (Connect / GetSoundDeviceConfig)
//
typedef struct
{
DWORD dwSize; // Size of this structure
DWORD dwFlags; // Flags for sound config (DVSOUNDCONFIG_...)
GUID guidPlaybackDevice; // GUID of the playback device to use
LPDIRECTSOUND lpdsPlaybackDevice; // DirectSound Object to use (optional)
GUID guidCaptureDevice; // GUID of the capture device to use
LPDIRECTSOUNDCAPTURE lpdsCaptureDevice; // DirectSoundCapture Object to use (optional)
HWND hwndAppWindow; // HWND of your application's top-level window
LPDIRECTSOUNDBUFFER lpdsMainBuffer; // DirectSoundBuffer to use for playback (optional)
DWORD dwMainBufferFlags; // Flags to pass to Play() on the main buffer
DWORD dwMainBufferPriority; // Priority to set when calling Play() on the main buffer
} DVSOUNDDEVICECONFIG, *LPDVSOUNDDEVICECONFIG, *PDVSOUNDDEVICECONFIG;
/****************************************************************************
*
* DirectPlayVoice message handler call back structures
*
****************************************************************************/
//
// Result of the Connect() call. (If it wasn't called Async)
// (DVMSGID_CONNECTRESULT)
//
typedef struct
{
DWORD dwSize; // Size of this structure
HRESULT hrResult; // Result of the Connect() call
} DVMSG_CONNECTRESULT, *LPDVMSG_CONNECTRESULT, *PDVMSG_CONNECTRESULT;
//
// A new player has entered the voice session
// (DVMSGID_CREATEVOICEPLAYER)
//
typedef struct
{
DWORD dwSize; // Size of this structure
DVID dvidPlayer; // DVID of the player who joined
DWORD dwFlags; // Player flags (DVPLAYERCAPS_...)
PVOID pvPlayerContext; // Context value for this player (user set)
} DVMSG_CREATEVOICEPLAYER, *LPDVMSG_CREATEVOICEPLAYER, *PDVMSG_CREATEVOICEPLAYER;
//
// A player has left the voice session
// (DVMSGID_DELETEVOICEPLAYER)
//
typedef struct
{
DWORD dwSize; // Size of this structure
DVID dvidPlayer; // DVID of the player who left
PVOID pvPlayerContext; // Context value for the player
} DVMSG_DELETEVOICEPLAYER, *LPDVMSG_DELETEVOICEPLAYER, *PDVMSG_DELETEVOICEPLAYER;
//
// Result of the Disconnect() call. (If it wasn't called Async)
// (DVMSGID_DISCONNECTRESULT)
//
typedef struct
{
DWORD dwSize; // Size of this structure
HRESULT hrResult; // Result of the Disconnect() call
} DVMSG_DISCONNECTRESULT, *LPDVMSG_DISCONNECTRESULT, *PDVMSG_DISCONNECTRESULT;
//
// The voice session host has migrated.
// (DVMSGID_HOSTMIGRATED)
//
typedef struct
{
DWORD dwSize; // Size of this structure
DVID dvidNewHostID; // DVID of the player who is now the host
LPDIRECTPLAYVOICESERVER pdvServerInterface;
// Pointer to the new host object (if local player is now host)
} DVMSG_HOSTMIGRATED, *LPDVMSG_HOSTMIGRATED, *PDVMSG_HOSTMIGRATED;
//
// The current input level / recording volume on the local machine
// (DVMSGID_INPUTLEVEL)
//
typedef struct
{
DWORD dwSize; // Size of this structure
DWORD dwPeakLevel; // Current peak level of the audio
LONG lRecordVolume; // Current recording volume
PVOID pvLocalPlayerContext; // Context value for the local player
} DVMSG_INPUTLEVEL, *LPDVMSG_INPUTLEVEL, *PDVMSG_INPUTLEVEL;
//
// The local client is about to become the new host
// (DVMSGID_LOCALHOSTSETUP)
//
typedef struct
{
DWORD dwSize; // Size of this structure
PVOID pvContext; // Context value to be passed to Initialize() of new host object
PDVMESSAGEHANDLER pMessageHandler; // Message handler to be used by new host object
} DVMSG_LOCALHOSTSETUP, *LPDVMSG_LOCALHOSTSETUP, *PDVMSG_LOCALHOSTSETUP;
//
// The current output level for the combined output of all incoming streams.
// (DVMSGID_OUTPUTLEVEL)
//
typedef struct
{
DWORD dwSize; // Size of this structure
DWORD dwPeakLevel; // Current peak level of the output
LONG lOutputVolume; // Current playback volume
PVOID pvLocalPlayerContext; // Context value for the local player
} DVMSG_OUTPUTLEVEL, *LPDVMSG_OUTPUTLEVEL, *PDVMSG_OUTPUTLEVEL;
//
// The current peak level of an individual player's incoming audio stream as it is
// being played back.
// (DVMSGID_PLAYEROUTPUTLEVEL)
//
typedef struct
{
DWORD dwSize; // Size of this structure
DVID dvidSourcePlayerID; // DVID of the player
DWORD dwPeakLevel; // Peak level of the player's stream
PVOID pvPlayerContext; // Context value for the player
} DVMSG_PLAYEROUTPUTLEVEL, *LPDVMSG_PLAYEROUTPUTLEVEL, *PDVMSG_PLAYEROUTPUTLEVEL;
//
// An audio stream from the specified player has started playing back on the local client.
// (DVMSGID_PLAYERVOICESTART).
//
typedef struct
{
DWORD dwSize; // Size of this structure
DVID dvidSourcePlayerID; // DVID of the Player
PVOID pvPlayerContext; // Context value for this player
} DVMSG_PLAYERVOICESTART, *LPDVMSG_PLAYERVOICESTART, *PDVMSG_PLAYERVOICESTART;
//
// The audio stream from the specified player has stopped playing back on the local client.
// (DVMSGID_PLAYERVOICESTOP)
//
typedef struct
{
DWORD dwSize; // Size of this structure
DVID dvidSourcePlayerID; // DVID of the player
PVOID pvPlayerContext; // Context value for this player
} DVMSG_PLAYERVOICESTOP, *LPDVMSG_PLAYERVOICESTOP, *PDVMSG_PLAYERVOICESTOP;
//
// Transmission has started on the local machine
// (DVMSGID_RECORDSTART)
//
typedef struct
{
DWORD dwSize; // Size of this structure
DWORD dwPeakLevel; // Peak level that caused transmission to start
PVOID pvLocalPlayerContext; // Context value for the local player
} DVMSG_RECORDSTART, *LPDVMSG_RECORDSTART, *PDVMSG_RECORDSTART;
//
// Transmission has stopped on the local machine
// (DVMSGID_RECORDSTOP)
//
typedef struct
{
DWORD dwSize; // Size of this structure
DWORD dwPeakLevel; // Peak level that caused transmission to stop
PVOID pvLocalPlayerContext; // Context value for the local player
} DVMSG_RECORDSTOP, *LPDVMSG_RECORDSTOP, *PDVMSG_RECORDSTOP;
//
// The voice session has been lost
// (DVMSGID_SESSIONLOST)
//
typedef struct
{
DWORD dwSize; // Size of this structure
HRESULT hrResult; // Reason the session was disconnected
} DVMSG_SESSIONLOST, *LPDVMSG_SESSIONLOST, *PDVMSG_SESSIONLOST;
//
// The target list has been updated for the local client
// (DVMSGID_SETTARGETS)
//
typedef struct
{
DWORD dwSize; // Size of this structure
DWORD dwNumTargets; // # of targets
PDVID pdvidTargets; // An array of DVIDs specifying the current targets
} DVMSG_SETTARGETS, *LPDVMSG_SETTARGETS, *PDVMSG_SETTARGETS;
/****************************************************************************
*
* DirectPlayVoice Functions
*
****************************************************************************/
extern HRESULT WINAPI DirectPlayVoiceCreate( const GUID * pcIID, void **ppvInterface, IUnknown *pUnknown);
/****************************************************************************
*
* DirectPlay8 Application Interfaces
*
****************************************************************************/
#undef INTERFACE
#define INTERFACE IDirectPlayVoiceClient
DECLARE_INTERFACE_( IDirectPlayVoiceClient, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, PVOID *ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectPlayVoiceClient methods ***/
STDMETHOD_(HRESULT, Initialize) (THIS_ LPUNKNOWN, PDVMESSAGEHANDLER, PVOID, PDWORD, DWORD ) PURE;
STDMETHOD_(HRESULT, Connect) (THIS_ PDVSOUNDDEVICECONFIG, PDVCLIENTCONFIG, DWORD ) PURE;
STDMETHOD_(HRESULT, Disconnect) (THIS_ DWORD ) PURE;
STDMETHOD_(HRESULT, GetSessionDesc)(THIS_ PDVSESSIONDESC ) PURE;
STDMETHOD_(HRESULT, GetClientConfig)(THIS_ PDVCLIENTCONFIG ) PURE;
STDMETHOD_(HRESULT, SetClientConfig)(THIS_ PDVCLIENTCONFIG ) PURE;
STDMETHOD_(HRESULT, GetCaps) (THIS_ PDVCAPS ) PURE;
STDMETHOD_(HRESULT, GetCompressionTypes)( THIS_ PVOID, PDWORD, PDWORD, DWORD ) PURE;
STDMETHOD_(HRESULT, SetTransmitTargets)( THIS_ PDVID, DWORD, DWORD ) PURE;
STDMETHOD_(HRESULT, GetTransmitTargets)( THIS_ PDVID, PDWORD, DWORD ) PURE;
STDMETHOD_(HRESULT, Create3DSoundBuffer)( THIS_ DVID, LPDIRECTSOUNDBUFFER, DWORD, DWORD, LPDIRECTSOUND3DBUFFER * ) PURE;
STDMETHOD_(HRESULT, Delete3DSoundBuffer)( THIS_ DVID, LPDIRECTSOUND3DBUFFER * ) PURE;
STDMETHOD_(HRESULT, SetNotifyMask)( THIS_ PDWORD, DWORD ) PURE;
STDMETHOD_(HRESULT, GetSoundDeviceConfig)( THIS_ PDVSOUNDDEVICECONFIG, PDWORD ) PURE;
};
#undef INTERFACE
#define INTERFACE IDirectPlayVoiceServer
DECLARE_INTERFACE_( IDirectPlayVoiceServer, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectPlayVoiceServer methods ***/
STDMETHOD_(HRESULT, Initialize) (THIS_ LPUNKNOWN, PDVMESSAGEHANDLER, PVOID, LPDWORD, DWORD ) PURE;
STDMETHOD_(HRESULT, StartSession) (THIS_ PDVSESSIONDESC, DWORD ) PURE;
STDMETHOD_(HRESULT, StopSession) (THIS_ DWORD ) PURE;
STDMETHOD_(HRESULT, GetSessionDesc)(THIS_ PDVSESSIONDESC ) PURE;
STDMETHOD_(HRESULT, SetSessionDesc)(THIS_ PDVSESSIONDESC ) PURE;
STDMETHOD_(HRESULT, GetCaps) (THIS_ PDVCAPS ) PURE;
STDMETHOD_(HRESULT, GetCompressionTypes)( THIS_ PVOID, PDWORD, PDWORD, DWORD ) PURE;
STDMETHOD_(HRESULT, SetTransmitTargets)( THIS_ DVID, PDVID, DWORD, DWORD ) PURE;
STDMETHOD_(HRESULT, GetTransmitTargets)( THIS_ DVID, PDVID, PDWORD, DWORD ) PURE;
STDMETHOD_(HRESULT, SetNotifyMask)( THIS_ PDWORD, DWORD ) PURE;
};
#undef INTERFACE
#define INTERFACE IDirectPlayVoiceTest
DECLARE_INTERFACE_( IDirectPlayVoiceTest, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, PVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectPlayVoiceTest methods ***/
STDMETHOD_(HRESULT, CheckAudioSetup) (THIS_ const GUID *, const GUID * , HWND, DWORD ) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectPlayVoiceClient_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectPlayVoiceClient_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectPlayVoiceClient_Release(p) (p)->lpVtbl->Release(p)
#define IDirectPlayVoiceClient_Initialize(p,a,b,c,d,e) (p)->lpVtbl->Initialize(p,a,b,c,d,e)
#define IDirectPlayVoiceClient_Connect(p,a,b,c) (p)->lpVtbl->Connect(p,a,b,c)
#define IDirectPlayVoiceClient_Disconnect(p,a) (p)->lpVtbl->Disconnect(p,a)
#define IDirectPlayVoiceClient_GetSessionDesc(p,a) (p)->lpVtbl->GetSessionDesc(p,a)
#define IDirectPlayVoiceClient_GetClientConfig(p,a) (p)->lpVtbl->GetClientConfig(p,a)
#define IDirectPlayVoiceClient_SetClientConfig(p,a) (p)->lpVtbl->SetClientConfig(p,a)
#define IDirectPlayVoiceClient_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
#define IDirectPlayVoiceClient_GetCompressionTypes(p,a,b,c,d) (p)->lpVtbl->GetCompressionTypes(p,a,b,c,d)
#define IDirectPlayVoiceClient_SetTransmitTargets(p,a,b,c) (p)->lpVtbl->SetTransmitTargets(p,a,b,c)
#define IDirectPlayVoiceClient_GetTransmitTargets(p,a,b,c) (p)->lpVtbl->GetTransmitTargets(p,a,b,c)
#define IDirectPlayVoiceClient_Create3DSoundBuffer(p,a,b,c,d,e) (p)->lpVtbl->Create3DSoundBuffer(p,a,b,c,d,e)
#define IDirectPlayVoiceClient_Delete3DSoundBuffer(p,a,b) (p)->lpVtbl->Delete3DSoundBuffer(p,a,b)
#define IDirectPlayVoiceClient_SetNotifyMask(p,a,b) (p)->lpVtbl->SetNotifyMask(p,a,b)
#define IDirectPlayVoiceClient_GetSoundDeviceConfig(p,a,b) (p)->lpVtbl->GetSoundDeviceConfig(p,a,b)
#define IDirectPlayVoiceServer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectPlayVoiceServer_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectPlayVoiceServer_Release(p) (p)->lpVtbl->Release(p)
#define IDirectPlayVoiceServer_Initialize(p,a,b,c,d,e) (p)->lpVtbl->Initialize(p,a,b,c,d,e)
#define IDirectPlayVoiceServer_StartSession(p,a,b) (p)->lpVtbl->StartSession(p,a,b)
#define IDirectPlayVoiceServer_StopSession(p,a) (p)->lpVtbl->StopSession(p,a)
#define IDirectPlayVoiceServer_GetSessionDesc(p,a) (p)->lpVtbl->GetSessionDesc(p,a)
#define IDirectPlayVoiceServer_SetSessionDesc(p,a) (p)->lpVtbl->SetSessionDesc(p,a)
#define IDirectPlayVoiceServer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
#define IDirectPlayVoiceServer_GetCompressionTypes(p,a,b,c,d) (p)->lpVtbl->GetCompressionTypes(p,a,b,c,d)
#define IDirectPlayVoiceServer_SetTransmitTargets(p,a,b,c,d) (p)->lpVtbl->SetTransmitTargets(p,a,b,c,d)
#define IDirectPlayVoiceServer_GetTransmitTargets(p,a,b,c,d) (p)->lpVtbl->GetTransmitTargets(p,a,b,c,d)
#define IDirectPlayVoiceServer_SetNotifyMask(p,a,b) (p)->lpVtbl->SetNotifyMask(p,a,b)
#define IDirectPlayVoiceTest_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectPlayVoiceTest_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectPlayVoiceTest_Release(p) (p)->lpVtbl->Release(p)
#define IDirectPlayVoiceTest_CheckAudioSetup(p,a,b,c,d) (p)->lpVtbl->CheckAudioSetup(p,a,b,c,d)
#else /* C++ */
#define IDirectPlayVoiceClient_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectPlayVoiceClient_AddRef(p) (p)->AddRef()
#define IDirectPlayVoiceClient_Release(p) (p)->Release()
#define IDirectPlayVoiceClient_Initialize(p,a,b,c,d,e) (p)->Initialize(a,b,c,d,e)
#define IDirectPlayVoiceClient_Connect(p,a,b,c) (p)->Connect(a,b,c)
#define IDirectPlayVoiceClient_Disconnect(p,a) (p)->Disconnect(a)
#define IDirectPlayVoiceClient_GetSessionDesc(p,a) (p)->GetSessionDesc(a)
#define IDirectPlayVoiceClient_GetClientConfig(p,a) (p)->GetClientConfig(a)
#define IDirectPlayVoiceClient_SetClientConfig(p,a) (p)->SetClientConfig(a)
#define IDirectPlayVoiceClient_GetCaps(p,a) (p)->GetCaps(a)
#define IDirectPlayVoiceClient_GetCompressionTypes(p,a,b,c,d) (p)->GetCompressionTypes(a,b,c,d)
#define IDirectPlayVoiceClient_SetTransmitTargets(p,a,b,c) (p)->SetTransmitTargets(a,b,c)
#define IDirectPlayVoiceClient_GetTransmitTargets(p,a,b,c) (p)->GetTransmitTargets(a,b,c)
#define IDirectPlayVoiceClient_Create3DSoundBuffer(p,a,b,c,d,e) (p)->Create3DSoundBuffer(a,b,c,d,e)
#define IDirectPlayVoiceClient_Delete3DSoundBuffer(p,a,b) (p)->Delete3DSoundBuffer(a,b)
#define IDirectPlayVoiceClient_SetNotifyMask(p,a,b) (p)->SetNotifyMask(a,b)
#define IDirectPlayVoiceClient_GetSoundDeviceConfig(p,a,b) (p)->GetSoundDeviceConfig(a,b)
#define IDirectPlayVoiceServer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectPlayVoiceServer_AddRef(p) (p)->AddRef()
#define IDirectPlayVoiceServer_Release(p) (p)->Release()
#define IDirectPlayVoiceServer_Initialize(p,a,b,c,d,e) (p)->Initialize(a,b,c,d,e)
#define IDirectPlayVoiceServer_StartSession(p,a,b) (p)->StartSession(a,b)
#define IDirectPlayVoiceServer_StopSession(p,a) (p)->StopSession(a)
#define IDirectPlayVoiceServer_GetSessionDesc(p,a) (p)->GetSessionDesc(a)
#define IDirectPlayVoiceServer_SetSessionDesc(p,a) (p)->SetSessionDesc(a)
#define IDirectPlayVoiceServer_GetCaps(p,a) (p)->GetCaps(a)
#define IDirectPlayVoiceServer_GetCompressionTypes(p,a,b,c,d) (p)->GetCompressionTypes(a,b,c,d)
#define IDirectPlayVoiceServer_SetTransmitTargets(p,a,b,c,d) (p)->SetTransmitTargets(a,b,c,d)
#define IDirectPlayVoiceServer_GetTransmitTargets(p,a,b,c,d) (p)->GetTransmitTargets(a,b,c,d)
#define IDirectPlayVoiceServer_SetNotifyMask(p,a,b) (p)->SetNotifyMask(a,b)
#define IDirectPlayVoiceTest_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectPlayVoiceTest_AddRef(p) (p)->AddRef()
#define IDirectPlayVoiceTest_Release(p) (p)->Release()
#define IDirectPlayVoiceTest_CheckAudioSetup(p,a,b,c,d) (p)->CheckAudioSetup(a,b,c,d)
#endif
/****************************************************************************
*
* DIRECTPLAYVOICE ERRORS
*
* Errors are represented by negative values and cannot be combined.
*
****************************************************************************/
#define _FACDPV 0x15
#define MAKE_DVHRESULT( code ) MAKE_HRESULT( 1, _FACDPV, code )
#define DV_OK S_OK
#define DV_FULLDUPLEX MAKE_HRESULT( 0, _FACDPV, 0x0005 )
#define DV_HALFDUPLEX MAKE_HRESULT( 0, _FACDPV, 0x000A )
#define DV_PENDING MAKE_HRESULT( 0, _FACDPV, 0x0010 )
#define DVERR_BUFFERTOOSMALL MAKE_DVHRESULT( 0x001E )
#define DVERR_EXCEPTION MAKE_DVHRESULT( 0x004A )
#define DVERR_GENERIC E_FAIL
#define DVERR_INVALIDFLAGS MAKE_DVHRESULT( 0x0078 )
#define DVERR_INVALIDOBJECT MAKE_DVHRESULT( 0x0082 )
#define DVERR_INVALIDPARAM E_INVALIDARG
#define DVERR_INVALIDPLAYER MAKE_DVHRESULT( 0x0087 )
#define DVERR_INVALIDGROUP MAKE_DVHRESULT( 0x0091 )
#define DVERR_INVALIDHANDLE MAKE_DVHRESULT( 0x0096 )
#define DVERR_OUTOFMEMORY E_OUTOFMEMORY
#define DVERR_PENDING DV_PENDING
#define DVERR_NOTSUPPORTED E_NOTIMPL
#define DVERR_NOINTERFACE E_NOINTERFACE
#define DVERR_SESSIONLOST MAKE_DVHRESULT( 0x012C )
#define DVERR_NOVOICESESSION MAKE_DVHRESULT( 0x012E )
#define DVERR_CONNECTIONLOST MAKE_DVHRESULT( 0x0168 )
#define DVERR_NOTINITIALIZED MAKE_DVHRESULT( 0x0169 )
#define DVERR_CONNECTED MAKE_DVHRESULT( 0x016A )
#define DVERR_NOTCONNECTED MAKE_DVHRESULT( 0x016B )
#define DVERR_CONNECTABORTING MAKE_DVHRESULT( 0x016E )
#define DVERR_NOTALLOWED MAKE_DVHRESULT( 0x016F )
#define DVERR_INVALIDTARGET MAKE_DVHRESULT( 0x0170 )
#define DVERR_TRANSPORTNOTHOST MAKE_DVHRESULT( 0x0171 )
#define DVERR_COMPRESSIONNOTSUPPORTED MAKE_DVHRESULT( 0x0172 )
#define DVERR_ALREADYPENDING MAKE_DVHRESULT( 0x0173 )
#define DVERR_SOUNDINITFAILURE MAKE_DVHRESULT( 0x0174 )
#define DVERR_TIMEOUT MAKE_DVHRESULT( 0x0175 )
#define DVERR_CONNECTABORTED MAKE_DVHRESULT( 0x0176 )
#define DVERR_NO3DSOUND MAKE_DVHRESULT( 0x0177 )
#define DVERR_ALREADYBUFFERED MAKE_DVHRESULT( 0x0178 )
#define DVERR_NOTBUFFERED MAKE_DVHRESULT( 0x0179 )
#define DVERR_HOSTING MAKE_DVHRESULT( 0x017A )
#define DVERR_NOTHOSTING MAKE_DVHRESULT( 0x017B )
#define DVERR_INVALIDDEVICE MAKE_DVHRESULT( 0x017C )
#define DVERR_RECORDSYSTEMERROR MAKE_DVHRESULT( 0x017D )
#define DVERR_PLAYBACKSYSTEMERROR MAKE_DVHRESULT( 0x017E )
#define DVERR_SENDERROR MAKE_DVHRESULT( 0x017F )
#define DVERR_USERCANCEL MAKE_DVHRESULT( 0x0180 )
#define DVERR_RUNSETUP MAKE_DVHRESULT( 0x0183 )
#define DVERR_INCOMPATIBLEVERSION MAKE_DVHRESULT( 0x0184 )
#define DVERR_INITIALIZED MAKE_DVHRESULT( 0x0187 )
#define DVERR_INVALIDPOINTER E_POINTER
#define DVERR_NOTRANSPORT MAKE_DVHRESULT( 0x0188 )
#define DVERR_NOCALLBACK MAKE_DVHRESULT( 0x0189 )
#define DVERR_TRANSPORTNOTINIT MAKE_DVHRESULT( 0x018A )
#define DVERR_TRANSPORTNOSESSION MAKE_DVHRESULT( 0x018B )
#define DVERR_TRANSPORTNOPLAYER MAKE_DVHRESULT( 0x018C )
#define DVERR_USERBACK MAKE_DVHRESULT( 0x018D )
#define DVERR_NORECVOLAVAILABLE MAKE_DVHRESULT( 0x018E )
#define DVERR_INVALIDBUFFER MAKE_DVHRESULT( 0x018F )
#define DVERR_LOCKEDBUFFER MAKE_DVHRESULT( 0x0190 )
#ifdef __cplusplus
}
#endif
#endif

916
lib/directx8/dvp.h Executable file
View File

@ -0,0 +1,916 @@
/*==========================================================================;
*
* Copyright (C) 1996-1997 Microsoft Corporation. All Rights Reserved.
*
* File: dvp.h
* Content: DirectDrawVideoPort include file
*
***************************************************************************/
#ifndef __DVP_INCLUDED__
#define __DVP_INCLUDED__
/*
* GUIDS used by DirectDrawVideoPort objects
*/
#if defined( _WIN32 ) && (!defined( _NO_COM ) || defined( DEFINE_GUID ))
DEFINE_GUID( IID_IDDVideoPortContainer, 0x6C142760,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
DEFINE_GUID( IID_IDirectDrawVideoPort, 0xB36D93E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
DEFINE_GUID( DDVPTYPE_E_HREFH_VREFH, 0x54F39980L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
DEFINE_GUID( DDVPTYPE_E_HREFH_VREFL, 0x92783220L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
DEFINE_GUID( DDVPTYPE_E_HREFL_VREFH, 0xA07A02E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
DEFINE_GUID( DDVPTYPE_E_HREFL_VREFL, 0xE09C77E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
DEFINE_GUID( DDVPTYPE_CCIR656, 0xFCA326A0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
DEFINE_GUID( DDVPTYPE_BROOKTREE, 0x1352A560L,0xDA61,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
DEFINE_GUID( DDVPTYPE_PHILIPS, 0x332CF160L,0xDA61,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
#endif
#ifndef GUID_DEFS_ONLY
#if defined( _WIN32 ) && !defined( _NO_COM )
#define COM_NO_WINDOWS_H
#include <objbase.h>
#else
#define IUnknown void
#endif
/*
* These definitions are required to allow polymorphic structure members (i.e. those
* that are referred to both as DWORDs and as pointers) to resolve into a type
* of correct size to hold the largest of those two types (i.e. pointer) on 64 bit
* systems. For 32 bit environments, ULONG_PTR resolves to a DWORD.
*/
#ifndef MAXULONG_PTR
#define ULONG_PTR DWORD
#endif //MAXULONG_PTR
#ifdef __cplusplus
extern "C" {
#endif
/*============================================================================
*
* DirectDraw Structures
*
* Various structures used to invoke DirectDraw.
*
*==========================================================================*/
struct IDirectDraw;
struct IDirectDrawSurface;
struct IDirectDrawPalette;
struct IDirectDrawClipper;
typedef struct IDDVideoPortContainer FAR *LPDDVIDEOPORTCONTAINER;
typedef struct IDirectDrawVideoPort FAR *LPDIRECTDRAWVIDEOPORT;
typedef struct _DDVIDEOPORTCONNECT FAR *LPDDVIDEOPORTCONNECT;
typedef struct _DDVIDEOPORTCAPS FAR *LPDDVIDEOPORTCAPS;
typedef struct _DDVIDEOPORTDESC FAR *LPDDVIDEOPORTDESC;
typedef struct _DDVIDEOPORTINFO FAR *LPDDVIDEOPORTINFO;
typedef struct _DDVIDEOPORTBANDWIDTH FAR *LPDDVIDEOPORTBANDWIDTH;
typedef struct _DDVIDEOPORTSTATUS FAR *LPDDVIDEOPORTSTATUS;
typedef struct IDDVideoPortContainerVtbl DDVIDEOPORTCONTAINERCALLBACKS;
typedef struct IDirectDrawVideoPortVtbl DIRECTDRAWVIDEOPORTCALLBACKS;
/*
* API's
*/
typedef HRESULT (FAR PASCAL * LPDDENUMVIDEOCALLBACK)(LPDDVIDEOPORTCAPS, LPVOID);
/*
* INTERACES FOLLOW:
* IDirectDrawVideoPort
* IVideoPort
*/
/*
* IDirectDrawVideoPortContainer
*/
#if defined( _WIN32 ) && !defined( _NO_COM )
#undef INTERFACE
#define INTERFACE IDDVideoPortContainer
DECLARE_INTERFACE_( IDDVideoPortContainer, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDrawVideoPort methods ***/
STDMETHOD(CreateVideoPort)(THIS_ DWORD, LPDDVIDEOPORTDESC, LPDIRECTDRAWVIDEOPORT FAR *, IUnknown FAR *) PURE;
STDMETHOD(EnumVideoPorts)(THIS_ DWORD, LPDDVIDEOPORTCAPS, LPVOID,LPDDENUMVIDEOCALLBACK ) PURE;
STDMETHOD(GetVideoPortConnectInfo)(THIS_ DWORD, LPDWORD, LPDDVIDEOPORTCONNECT ) PURE;
STDMETHOD(QueryVideoPortStatus)(THIS_ DWORD, LPDDVIDEOPORTSTATUS ) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IVideoPortContainer_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IVideoPortContainer_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IVideoPortContainer_Release(p) (p)->lpVtbl->Release(p)
#define IVideoPortContainer_CreateVideoPort(p, a, b, c, d) (p)->lpVtbl->CreateVideoPort(p, a, b, c, d)
#define IVideoPortContainer_EnumVideoPorts(p, a, b, c, d) (p)->lpVtbl->EnumVideoPorts(p, a, b, c, d)
#define IVideoPortContainer_GetVideoPortConnectInfo(p, a, b, c) (p)->lpVtbl->GetVideoPortConnectInfo(p, a, b, c)
#define IVideoPortContainer_QueryVideoPortStatus(p, a, b) (p)->lpVtbl->QueryVideoPortStatus(p, a, b)
#else
#define IVideoPortContainer_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IVideoPortContainer_AddRef(p) (p)->AddRef()
#define IVideoPortContainer_Release(p) (p)->Release()
#define IVideoPortContainer_CreateVideoPort(p, a, b, c, d) (p)->CreateVideoPort(a, b, c, d)
#define IVideoPortContainer_EnumVideoPorts(p, a, b, c, d) (p)->EnumVideoPorts(a, b, c, d)
#define IVideoPortContainer_GetVideoPortConnectInfo(p, a, b, c) (p)->GetVideoPortConnectInfo(a, b, c)
#define IVideoPortContainer_QueryVideoPortStatus(p, a, b) (p)->QueryVideoPortStatus(a, b)
#endif
#endif
/*
* IDirectDrawVideoPort
*/
#if defined( _WIN32 ) && !defined( _NO_COM )
#undef INTERFACE
#define INTERFACE IDirectDrawVideoPort
DECLARE_INTERFACE_( IDirectDrawVideoPort, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IVideoPort methods ***/
STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
STDMETHOD(GetBandwidthInfo)(THIS_ LPDDPIXELFORMAT, DWORD, DWORD, DWORD, LPDDVIDEOPORTBANDWIDTH) PURE;
STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
STDMETHOD(GetInputFormats)(THIS_ LPDWORD, LPDDPIXELFORMAT, DWORD) PURE;
STDMETHOD(GetOutputFormats)(THIS_ LPDDPIXELFORMAT, LPDWORD, LPDDPIXELFORMAT, DWORD) PURE;
STDMETHOD(GetFieldPolarity)(THIS_ LPBOOL) PURE;
STDMETHOD(GetVideoLine)(THIS_ LPDWORD) PURE;
STDMETHOD(GetVideoSignalStatus)(THIS_ LPDWORD) PURE;
STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
STDMETHOD(SetTargetSurface)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
STDMETHOD(StartVideo)(THIS_ LPDDVIDEOPORTINFO) PURE;
STDMETHOD(StopVideo)(THIS) PURE;
STDMETHOD(UpdateVideo)(THIS_ LPDDVIDEOPORTINFO) PURE;
STDMETHOD(WaitForSync)(THIS_ DWORD, DWORD, DWORD) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IVideoPort_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IVideoPort_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IVideoPort_Release(p) (p)->lpVtbl->Release(p)
#define IVideoPort_SetTargetSurface(p,a,b) (p)->lpVtbl->SetTargetSurface(p,a,b)
#define IVideoPort_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
#define IVideoPort_GetBandwidthInfo(p,a,b,c,d,e) (p)->lpVtbl->GetBandwidthInfo(p,a,b,c,d,e)
#define IVideoPort_GetColorControls(p,a) (p)->lpVtbl->GetColorControls(p,a)
#define IVideoPort_GetInputFormats(p,a,b,c) (p)->lpVtbl->GetInputFormats(p,a,b,c)
#define IVideoPort_GetOutputFormats(p,a,b,c,d) (p)->lpVtbl->GetOutputFormats(p,a,b,c,d)
#define IVideoPort_GetFieldPolarity(p,a) (p)->lpVtbl->GetFieldPolarity(p,a)
#define IVideoPort_GetVideoLine(p,a) (p)->lpVtbl->GetVideoLine(p,a)
#define IVideoPort_GetVideoSignalStatus(p,a) (p)->lpVtbl->GetVideoSignalStatus(p,a)
#define IVideoPort_SetColorControls(p,a) (p)->lpVtbl->SetColorControls(p,a)
#define IVideoPort_StartVideo(p,a) (p)->lpVtbl->StartVideo(p,a)
#define IVideoPort_StopVideo(p) (p)->lpVtbl->StopVideo(p)
#define IVideoPort_UpdateVideo(p,a) (p)->lpVtbl->UpdateVideo(p,a)
#define IVideoPort_WaitForSync(p,a,b,c) (p)->lpVtbl->WaitForSync(p,a,b,c)
#else
#define IVideoPort_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IVideoPort_AddRef(p) (p)->AddRef()
#define IVideoPort_Release(p) (p)->Release()
#define IVideoPort_SetTargetSurface(p,a,b) (p)->SetTargetSurface(a,b)
#define IVideoPort_Flip(p,a,b) (p)->Flip(a,b)
#define IVideoPort_GetBandwidthInfo(p,a,b,c,d,e) (p)->GetBandwidthInfo(a,b,c,d,e)
#define IVideoPort_GetColorControls(p,a) (p)->GetColorControls(a)
#define IVideoPort_GetInputFormats(p,a,b,c) (p)->GetInputFormats(a,b,c)
#define IVideoPort_GetOutputFormats(p,a,b,c,d) (p)->GetOutputFormats(a,b,c,d)
#define IVideoPort_GetFieldPolarity(p,a) (p)->GetFieldPolarity(a)
#define IVideoPort_GetVideoLine(p,a) (p)->GetVideoLine(a)
#define IVideoPort_GetVideoSignalStatus(p,a) (p)->GetVideoSignalStatus(a)
#define IVideoPort_SetColorControls(p,a) (p)->SetColorControls(a)
#define IVideoPort_StartVideo(p,a) (p)->StartVideo(a)
#define IVideoPort_StopVideo(p) (p)->StopVideo()
#define IVideoPort_UpdateVideo(p,a) (p)->UpdateVideo(a)
#define IVideoPort_WaitForSync(p,a,b,c) (p)->WaitForSync(a,b,c)
#endif
#endif
/*
* DDVIDEOPORTCONNECT
*/
typedef struct _DDVIDEOPORTCONNECT
{
DWORD dwSize; // size of the DDVIDEOPORTCONNECT structure
DWORD dwPortWidth; // Width of the video port
GUID guidTypeID; // Description of video port connection
DWORD dwFlags; // Connection flags
ULONG_PTR dwReserved1; // Reserved, set to zero.
} DDVIDEOPORTCONNECT;
/*
* DDVIDEOPORTCAPS
*/
typedef struct _DDVIDEOPORTCAPS
{
DWORD dwSize; // size of the DDVIDEOPORTCAPS structure
DWORD dwFlags; // indicates which fields contain data
DWORD dwMaxWidth; // max width of the video port field
DWORD dwMaxVBIWidth; // max width of the VBI data
DWORD dwMaxHeight; // max height of the video port field
DWORD dwVideoPortID; // Video port ID (0 - (dwMaxVideoPorts -1))
DWORD dwCaps; // Video port capabilities
DWORD dwFX; // More video port capabilities
DWORD dwNumAutoFlipSurfaces; // Max number of autoflippable surfaces allowed
DWORD dwAlignVideoPortBoundary; // Byte restriction of placement within the surface
DWORD dwAlignVideoPortPrescaleWidth;// Byte restriction of width after prescaling
DWORD dwAlignVideoPortCropBoundary; // Byte restriction of left cropping
DWORD dwAlignVideoPortCropWidth; // Byte restriction of cropping width
DWORD dwPreshrinkXStep; // Width can be shrunk in steps of 1/x
DWORD dwPreshrinkYStep; // Height can be shrunk in steps of 1/x
DWORD dwNumVBIAutoFlipSurfaces; // Max number of VBI autoflippable surfaces allowed
DWORD dwNumPreferredAutoflip; // Optimal number of autoflippable surfaces for hardware
WORD wNumFilterTapsX; // Number of taps the prescaler uses in the X direction (0 - no prescale, 1 - replication, etc.)
WORD wNumFilterTapsY; // Number of taps the prescaler uses in the Y direction (0 - no prescale, 1 - replication, etc.)
} DDVIDEOPORTCAPS;
/*
* The dwMaxWidth and dwMaxVBIWidth members are valid
*/
#define DDVPD_WIDTH 0x00000001l
/*
* The dwMaxHeight member is valid
*/
#define DDVPD_HEIGHT 0x00000002l
/*
* The dwVideoPortID member is valid
*/
#define DDVPD_ID 0x00000004l
/*
* The dwCaps member is valid
*/
#define DDVPD_CAPS 0x00000008l
/*
* The dwFX member is valid
*/
#define DDVPD_FX 0x00000010l
/*
* The dwNumAutoFlipSurfaces member is valid
*/
#define DDVPD_AUTOFLIP 0x00000020l
/*
* All of the alignment members are valid
*/
#define DDVPD_ALIGN 0x00000040l
/*
* The dwNumPreferredAutoflip member is valid
*/
#define DDVPD_PREFERREDAUTOFLIP 0x00000080l
/*
* The wNumFilterTapsX and wNumFilterTapsY fields are valid
*/
#define DDVPD_FILTERQUALITY 0x00000100l
/*
* DDVIDEOPORTDESC
*/
typedef struct _DDVIDEOPORTDESC
{
DWORD dwSize; // size of the DDVIDEOPORTDESC structure
DWORD dwFieldWidth; // width of the video port field
DWORD dwVBIWidth; // width of the VBI data
DWORD dwFieldHeight; // height of the video port field
DWORD dwMicrosecondsPerField; // Microseconds per video field
DWORD dwMaxPixelsPerSecond; // Maximum pixel rate per second
DWORD dwVideoPortID; // Video port ID (0 - (dwMaxVideoPorts -1))
DWORD dwReserved1; // Reserved for future use - set to zero (struct padding)
DDVIDEOPORTCONNECT VideoPortType; // Description of video port connection
ULONG_PTR dwReserved2; // Reserved for future use - set to zero
ULONG_PTR dwReserved3; // Reserved for future use - set to zero
} DDVIDEOPORTDESC;
/*
* DDVIDEOPORTINFO
*/
typedef struct _DDVIDEOPORTINFO
{
DWORD dwSize; // Size of the structure
DWORD dwOriginX; // Placement of the video data within the surface.
DWORD dwOriginY; // Placement of the video data within the surface.
DWORD dwVPFlags; // Video port options
RECT rCrop; // Cropping rectangle (optional).
DWORD dwPrescaleWidth; // Determines pre-scaling/zooming in the X direction (optional).
DWORD dwPrescaleHeight; // Determines pre-scaling/zooming in the Y direction (optional).
LPDDPIXELFORMAT lpddpfInputFormat; // Video format written to the video port
LPDDPIXELFORMAT lpddpfVBIInputFormat; // Input format of the VBI data
LPDDPIXELFORMAT lpddpfVBIOutputFormat;// Output format of the data
DWORD dwVBIHeight; // Specifies the number of lines of data within the vertical blanking interval.
ULONG_PTR dwReserved1; // Reserved for future use - set to zero
ULONG_PTR dwReserved2; // Reserved for future use - set to zero
} DDVIDEOPORTINFO;
/*
* DDVIDEOPORTBANDWIDTH
*/
typedef struct _DDVIDEOPORTBANDWIDTH
{
DWORD dwSize; // Size of the structure
DWORD dwCaps;
DWORD dwOverlay; // Zoom factor at which overlay is supported
DWORD dwColorkey; // Zoom factor at which overlay w/ colorkey is supported
DWORD dwYInterpolate; // Zoom factor at which overlay w/ Y interpolation is supported
DWORD dwYInterpAndColorkey; // Zoom factor at which ovelray w/ Y interpolation and colorkeying is supported
ULONG_PTR dwReserved1; // Reserved for future use - set to zero
ULONG_PTR dwReserved2; // Reserved for future use - set to zero
} DDVIDEOPORTBANDWIDTH;
/*
* DDVIDEOPORTSTATUS
*/
typedef struct _DDVIDEOPORTSTATUS
{
DWORD dwSize; // Size of the structure
BOOL bInUse; // TRUE if video port is currently being used
DWORD dwFlags; // Currently not used
DWORD dwReserved1; // Reserved for future use
DDVIDEOPORTCONNECT VideoPortType; // Information about the connection
ULONG_PTR dwReserved2; // Reserved for future use
ULONG_PTR dwReserved3; // Reserved for future use
} DDVIDEOPORTSTATUS;
/*============================================================================
*
* Video Port Flags
*
* All flags are bit flags.
*
*==========================================================================*/
/****************************************************************************
*
* VIDEOPORT DDVIDEOPORTCONNECT FLAGS
*
****************************************************************************/
/*
* When this is set by the driver and passed to the client, this
* indicates that the video port is capable of double clocking the data.
* When this is set by the client, this indicates that the video port
* should enable double clocking. This flag is only valid with external
* syncs.
*/
#define DDVPCONNECT_DOUBLECLOCK 0x00000001l
/*
* When this is set by the driver and passed to the client, this
* indicates that the video port is capable of using an external VACT
* signal. When this is set by the client, this indicates that the
* video port should use the external VACT signal.
*/
#define DDVPCONNECT_VACT 0x00000002l
/*
* When this is set by the driver and passed to the client, this
* indicates that the video port is capable of treating even fields
* like odd fields and visa versa. When this is set by the client,
* this indicates that the video port should treat even fields like odd
* fields.
*/
#define DDVPCONNECT_INVERTPOLARITY 0x00000004l
/*
* Indicates that any data written to the video port during the VREF
* period will not be written into the frame buffer. This flag is read only.
*/
#define DDVPCONNECT_DISCARDSVREFDATA 0x00000008l
/*
* When this is set be the driver and passed to the client, this
* indicates that the device will write half lines into the frame buffer
* if half lines are provided by the decoder. If this is set by the client,
* this indicates that the decoder will be supplying half lines.
*/
#define DDVPCONNECT_HALFLINE 0x00000010l
/*
* Indicates that the signal is interlaced. This flag is only
* set by the client.
*/
#define DDVPCONNECT_INTERLACED 0x00000020l
/*
* Indicates that video port is shareable and that this video port
* will use the even fields. This flag is only set by the client.
*/
#define DDVPCONNECT_SHAREEVEN 0x00000040l
/*
* Indicates that video port is shareable and that this video port
* will use the odd fields. This flag is only set by the client.
*/
#define DDVPCONNECT_SHAREODD 0x00000080l
/****************************************************************************
*
* VIDEOPORT DDVIDEOPORTDESC CAPS
*
****************************************************************************/
/*
* Flip can be performed automatically to avoid tearing.
*/
#define DDVPCAPS_AUTOFLIP 0x00000001l
/*
* Supports interlaced video
*/
#define DDVPCAPS_INTERLACED 0x00000002l
/*
* Supports non-interlaced video
*/
#define DDVPCAPS_NONINTERLACED 0x00000004l
/*
* Indicates that the device can return whether the current field
* of an interlaced signal is even or odd.
*/
#define DDVPCAPS_READBACKFIELD 0x00000008l
/*
* Indicates that the device can return the current line of video
* being written into the frame buffer.
*/
#define DDVPCAPS_READBACKLINE 0x00000010l
/*
* Allows two gen-locked video streams to share a single video port,
* where one stream uses the even fields and the other uses the odd
* fields. Separate parameters (including address, scaling,
* cropping, etc.) are maintained for both fields.)
*/
#define DDVPCAPS_SHAREABLE 0x00000020l
/*
* Even fields of video can be automatically discarded.
*/
#define DDVPCAPS_SKIPEVENFIELDS 0x00000040l
/*
* Odd fields of video can be automatically discarded.
*/
#define DDVPCAPS_SKIPODDFIELDS 0x00000080l
/*
* Indicates that the device is capable of driving the graphics
* VSYNC with the video port VSYNC.
*/
#define DDVPCAPS_SYNCMASTER 0x00000100l
/*
* Indicates that data within the vertical blanking interval can
* be written to a different surface.
*/
#define DDVPCAPS_VBISURFACE 0x00000200l
/*
* Indicates that the video port can perform color operations
* on the incoming data before it is written to the frame buffer.
*/
#define DDVPCAPS_COLORCONTROL 0x00000400l
/*
* Indicates that the video port can accept VBI data in a different
* width or format than the regular video data.
*/
#define DDVPCAPS_OVERSAMPLEDVBI 0x00000800l
/*
* Indicates that the video port can write data directly to system memory
*/
#define DDVPCAPS_SYSTEMMEMORY 0x00001000l
/*
* Indicates that the VBI and video portions of the video stream can
* be controlled by an independent processes.
*/
#define DDVPCAPS_VBIANDVIDEOINDEPENDENT 0x00002000l
/*
* Indicates that the video port contains high quality hardware
* de-interlacing hardware that should be used instead of the
* bob/weave algorithms.
*/
#define DDVPCAPS_HARDWAREDEINTERLACE 0x00004000l
/****************************************************************************
*
* VIDEOPORT DDVIDEOPORTDESC FX
*
****************************************************************************/
/*
* Limited cropping is available to crop out the vertical interval data.
*/
#define DDVPFX_CROPTOPDATA 0x00000001l
/*
* Incoming data can be cropped in the X direction before it is written
* to the surface.
*/
#define DDVPFX_CROPX 0x00000002l
/*
* Incoming data can be cropped in the Y direction before it is written
* to the surface.
*/
#define DDVPFX_CROPY 0x00000004l
/*
* Supports interleaving interlaced fields in memory.
*/
#define DDVPFX_INTERLEAVE 0x00000008l
/*
* Supports mirroring left to right as the video data is written
* into the frame buffer.
*/
#define DDVPFX_MIRRORLEFTRIGHT 0x00000010l
/*
* Supports mirroring top to bottom as the video data is written
* into the frame buffer.
*/
#define DDVPFX_MIRRORUPDOWN 0x00000020l
/*
* Data can be arbitrarily shrunk in the X direction before it
* is written to the surface.
*/
#define DDVPFX_PRESHRINKX 0x00000040l
/*
* Data can be arbitrarily shrunk in the Y direction before it
* is written to the surface.
*/
#define DDVPFX_PRESHRINKY 0x00000080l
/*
* Data can be binary shrunk (1/2, 1/4, 1/8, etc.) in the X
* direction before it is written to the surface.
*/
#define DDVPFX_PRESHRINKXB 0x00000100l
/*
* Data can be binary shrunk (1/2, 1/4, 1/8, etc.) in the Y
* direction before it is written to the surface.
*/
#define DDVPFX_PRESHRINKYB 0x00000200l
/*
* Data can be shrunk in increments of 1/x in the X direction
* (where X is specified in the DDVIDEOPORTCAPS.dwPreshrinkXStep)
* before it is written to the surface.
*/
#define DDVPFX_PRESHRINKXS 0x00000400l
/*
* Data can be shrunk in increments of 1/x in the Y direction
* (where X is specified in the DDVIDEOPORTCAPS.dwPreshrinkYStep)
* before it is written to the surface.
*/
#define DDVPFX_PRESHRINKYS 0x00000800l
/*
* Data can be arbitrarily stretched in the X direction before
* it is written to the surface.
*/
#define DDVPFX_PRESTRETCHX 0x00001000l
/*
* Data can be arbitrarily stretched in the Y direction before
* it is written to the surface.
*/
#define DDVPFX_PRESTRETCHY 0x00002000l
/*
* Data can be integer stretched in the X direction before it is
* written to the surface.
*/
#define DDVPFX_PRESTRETCHXN 0x00004000l
/*
* Data can be integer stretched in the Y direction before it is
* written to the surface.
*/
#define DDVPFX_PRESTRETCHYN 0x00008000l
/*
* Indicates that data within the vertical blanking interval can
* be converted independently of the remaining video data.
*/
#define DDVPFX_VBICONVERT 0x00010000l
/*
* Indicates that scaling can be disabled for data within the
* vertical blanking interval.
*/
#define DDVPFX_VBINOSCALE 0x00020000l
/*
* Indicates that the video data can ignore the left and right
* cropping coordinates when cropping oversampled VBI data.
*/
#define DDVPFX_IGNOREVBIXCROP 0x00040000l
/*
* Indicates that interleaving can be disabled for data within the
* vertical blanking interval.
*/
#define DDVPFX_VBINOINTERLEAVE 0x00080000l
/****************************************************************************
*
* VIDEOPORT DDVIDEOPORTINFO FLAGS
*
****************************************************************************/
/*
* Perform automatic flipping. Auto-flipping is performed between
* the overlay surface that was attached to the video port using
* IDirectDrawVideoPort::AttachSurface and the overlay surfaces that
* are attached to the surface via the IDirectDrawSurface::AttachSurface
* method. The flip order is the order in which the overlay surfaces
* were. attached.
*/
#define DDVP_AUTOFLIP 0x00000001l
/*
* Perform conversion using the ddpfOutputFormat information.
*/
#define DDVP_CONVERT 0x00000002l
/*
* Perform cropping using the specified rectangle.
*/
#define DDVP_CROP 0x00000004l
/*
* Indicates that interlaced fields should be interleaved in memory.
*/
#define DDVP_INTERLEAVE 0x00000008l
/*
* Indicates that the data should be mirrored left to right as it's
* written into the frame buffer.
*/
#define DDVP_MIRRORLEFTRIGHT 0x00000010l
/*
* Indicates that the data should be mirrored top to bottom as it's
* written into the frame buffer.
*/
#define DDVP_MIRRORUPDOWN 0x00000020l
/*
* Perform pre-scaling/zooming based on the pre-scale parameters.
*/
#define DDVP_PRESCALE 0x00000040l
/*
* Ignore input of even fields.
*/
#define DDVP_SKIPEVENFIELDS 0x00000080l
/*
* Ignore input of odd fields.
*/
#define DDVP_SKIPODDFIELDS 0x00000100l
/*
* Drive the graphics VSYNCs using the video port VYSNCs.
*/
#define DDVP_SYNCMASTER 0x00000200l
/*
* The ddpfVBIOutputFormatFormat member contains data that should be used
* to convert the data within the vertical blanking interval.
*/
#define DDVP_VBICONVERT 0x00000400l
/*
* Indicates that data within the vertical blanking interval
* should not be scaled.
*/
#define DDVP_VBINOSCALE 0x00000800l
/*
* Indicates that these bob/weave decisions should not be
* overriden by other interfaces.
*/
#define DDVP_OVERRIDEBOBWEAVE 0x00001000l
/*
* Indicates that the video data should ignore the left and right
* cropping coordinates when cropping the VBI data.
*/
#define DDVP_IGNOREVBIXCROP 0x00002000l
/*
* Indicates that interleaving can be disabled for data within the
* vertical blanking interval.
*/
#define DDVP_VBINOINTERLEAVE 0x00004000l
/*
* Indicates that the video port should use the hardware
* de-interlacing hardware.
*/
#define DDVP_HARDWAREDEINTERLACE 0x00008000l
/****************************************************************************
*
* DIRIRECTDRAWVIDEOPORT GETINPUTFORMAT/GETOUTPUTFORMAT FLAGS
*
****************************************************************************/
/*
* Return formats for the video data
*/
#define DDVPFORMAT_VIDEO 0x00000001l
/*
* Return formats for the VBI data
*/
#define DDVPFORMAT_VBI 0x00000002l
/****************************************************************************
*
* DIRIRECTDRAWVIDEOPORT SETTARGETSURFACE FLAGS
*
****************************************************************************/
/*
* Surface should receive video data (and VBI data if a surface
* is not explicitly attached for that purpose)
*/
#define DDVPTARGET_VIDEO 0x00000001l
/*
* Surface should receive VBI data
*/
#define DDVPTARGET_VBI 0x00000002l
/****************************************************************************
*
* DIRIRECTDRAWVIDEOPORT WAITFORSYNC FLAGS
*
****************************************************************************/
/*
* Waits until the beginning of the next VSYNC
*/
#define DDVPWAIT_BEGIN 0x00000001l
/*
* Waits until the end of the next/current VSYNC
*/
#define DDVPWAIT_END 0x00000002l
/*
* Waits until the beginning of the specified line
*/
#define DDVPWAIT_LINE 0x00000003l
/****************************************************************************
*
* DIRECTDRAWVIDEOPORT FLIP FLAGS
*
****************************************************************************/
/*
* Flips the normal video surface
*/
#define DDVPFLIP_VIDEO 0x00000001l
/*
* Flips the VBI surface
*/
#define DDVPFLIP_VBI 0x00000002l
/****************************************************************************
*
* DIRIRECTDRAWVIDEOPORT GETVIDEOSIGNALSTATUS VALUES
*
****************************************************************************/
/*
* No video signal is present at the video port
*/
#define DDVPSQ_NOSIGNAL 0x00000001l
/*
* A valid video signal is present at the video port
*/
#define DDVPSQ_SIGNALOK 0x00000002l
/****************************************************************************
*
* VIDEOPORTBANDWIDTH Flags
*
****************************************************************************/
/*
* The specified height/width refer to the size of the video port data
* written into memory, after prescaling has occured.
*/
#define DDVPB_VIDEOPORT 0x00000001l
/*
* The specified height/width refer to the source size of the overlay.
*/
#define DDVPB_OVERLAY 0x00000002l
/*
* This is a query for the device to return which caps this device requires.
*/
#define DDVPB_TYPE 0x00000004l
/****************************************************************************
*
* VIDEOPORTBANDWIDTH Caps
*
****************************************************************************/
/*
* The bandwidth for this device is dependant on the overlay source size.
*/
#define DDVPBCAPS_SOURCE 0x00000001l
/*
* The bandwidth for this device is dependant on the overlay destination
* size.
*/
#define DDVPBCAPS_DESTINATION 0x00000002l
/****************************************************************************
*
* DDVIDEOPORTCONTAINER CreateVideoPort flags
*
****************************************************************************/
/*
* The process only wants to control the VBI portion of the video stream.
*/
#define DDVPCREATE_VBIONLY 0x00000001l
/*
* The process only wants to control the non-VBI (video) portion of
* the video stream.
*/
#define DDVPCREATE_VIDEOONLY 0x00000002l
/****************************************************************************
*
* DDVIDEOPORTSTATUS flags
*
****************************************************************************/
/*
* The video port interface is only controlling the VBI portion of the
* video stream
*/
#define DDVPSTATUS_VBIONLY 0x00000001l
/*
* The video port interface is only controlling the video portion of the
* video stream
*/
#define DDVPSTATUS_VIDEOONLY 0x00000002l
#ifdef __cplusplus
};
#endif
#endif // GUID_DEFS_ONLY
#endif

98
lib/directx8/dx7todx8.h Executable file
View File

@ -0,0 +1,98 @@
/*==========================================================================;
*
* Copyright (C) 2000 Microsoft Corporation. All Rights Reserved.
*
* File: dx7todx8.h
* Content: DX7 to DX8 Direct3D aliases to aid porting DX7 apps to DX8
*
***************************************************************************/
#ifndef _DX7TODX8_H_
///////////////////////////////////////////////////////////////////////////////
//
// d3d8types.h
//
///////////////////////////////////////////////////////////////////////////////
#define D3DTRANSFORMSTATE_WORLD D3DTS_WORLD
#define D3DTRANSFORMSTATE_VIEW D3DTS_VIEW
#define D3DTRANSFORMSTATE_PROJECTION D3DTS_PROJECTION
#define D3DTRANSFORMSTATE_WORLD1 D3DTS_WORLD1
#define D3DTRANSFORMSTATE_WORLD2 D3DTS_WORLD2
#define D3DTRANSFORMSTATE_WORLD3 D3DTS_WORLD3
#define D3DTRANSFORMSTATE_TEXTURE0 D3DTS_TEXTURE0
#define D3DTRANSFORMSTATE_TEXTURE1 D3DTS_TEXTURE1
#define D3DTRANSFORMSTATE_TEXTURE2 D3DTS_TEXTURE2
#define D3DTRANSFORMSTATE_TEXTURE3 D3DTS_TEXTURE3
#define D3DTRANSFORMSTATE_TEXTURE4 D3DTS_TEXTURE4
#define D3DTRANSFORMSTATE_TEXTURE5 D3DTS_TEXTURE5
#define D3DTRANSFORMSTATE_TEXTURE6 D3DTS_TEXTURE6
#define D3DTRANSFORMSTATE_TEXTURE7 D3DTS_TEXTURE7
#define D3DTRANSFORMSTATE_FORCE_DWORD D3DTS_FORCE_DWORD
#define D3DRENDERSTATE_ZENABLE D3DRS_ZENABLE
#define D3DRENDERSTATE_FILLMODE D3DRS_FILLMODE
#define D3DRENDERSTATE_SHADEMODE D3DRS_SHADEMODE
#define D3DRENDERSTATE_LINEPATTERN D3DRS_LINEPATTERN
#define D3DRENDERSTATE_ZWRITEENABLE D3DRS_ZWRITEENABLE
#define D3DRENDERSTATE_ALPHATESTENABLE D3DRS_ALPHATESTENABLE
#define D3DRENDERSTATE_LASTPIXEL D3DRS_LASTPIXEL
#define D3DRENDERSTATE_SRCBLEND D3DRS_SRCBLEND
#define D3DRENDERSTATE_DESTBLEND D3DRS_DESTBLEND
#define D3DRENDERSTATE_CULLMODE D3DRS_CULLMODE
#define D3DRENDERSTATE_ZFUNC D3DRS_ZFUNC
#define D3DRENDERSTATE_ALPHAREF D3DRS_ALPHAREF
#define D3DRENDERSTATE_ALPHAFUNC D3DRS_ALPHAFUNC
#define D3DRENDERSTATE_DITHERENABLE D3DRS_DITHERENABLE
#define D3DRENDERSTATE_ALPHABLENDENABLE D3DRS_ALPHABLENDENABLE
#define D3DRENDERSTATE_FOGENABLE D3DRS_FOGENABLE
#define D3DRENDERSTATE_SPECULARENABLE D3DRS_SPECULARENABLE
#define D3DRENDERSTATE_ZVISIBLE D3DRS_ZVISIBLE
#define D3DRENDERSTATE_FOGCOLOR D3DRS_FOGCOLOR
#define D3DRENDERSTATE_FOGTABLEMODE D3DRS_FOGTABLEMODE
#define D3DRENDERSTATE_FOGSTART D3DRS_FOGSTART
#define D3DRENDERSTATE_FOGEND D3DRS_FOGEND
#define D3DRENDERSTATE_FOGDENSITY D3DRS_FOGDENSITY
#define D3DRENDERSTATE_EDGEANTIALIAS D3DRS_EDGEANTIALIAS
#define D3DRENDERSTATE_ZBIAS D3DRS_ZBIAS
#define D3DRENDERSTATE_RANGEFOGENABLE D3DRS_RANGEFOGENABLE
#define D3DRENDERSTATE_STENCILENABLE D3DRS_STENCILENABLE
#define D3DRENDERSTATE_STENCILFAIL D3DRS_STENCILFAIL
#define D3DRENDERSTATE_STENCILZFAIL D3DRS_STENCILZFAIL
#define D3DRENDERSTATE_STENCILPASS D3DRS_STENCILPASS
#define D3DRENDERSTATE_STENCILFUNC D3DRS_STENCILFUNC
#define D3DRENDERSTATE_STENCILREF D3DRS_STENCILREF
#define D3DRENDERSTATE_STENCILMASK D3DRS_STENCILMASK
#define D3DRENDERSTATE_STENCILWRITEMASK D3DRS_STENCILWRITEMASK
#define D3DRENDERSTATE_TEXTUREFACTOR D3DRS_TEXTUREFACTOR
#define D3DRENDERSTATE_WRAP0 D3DRS_WRAP0
#define D3DRENDERSTATE_WRAP1 D3DRS_WRAP1
#define D3DRENDERSTATE_WRAP2 D3DRS_WRAP2
#define D3DRENDERSTATE_WRAP3 D3DRS_WRAP3
#define D3DRENDERSTATE_WRAP4 D3DRS_WRAP4
#define D3DRENDERSTATE_WRAP5 D3DRS_WRAP5
#define D3DRENDERSTATE_WRAP6 D3DRS_WRAP6
#define D3DRENDERSTATE_WRAP7 D3DRS_WRAP7
#define D3DRENDERSTATE_CLIPPING D3DRS_CLIPPING
#define D3DRENDERSTATE_LIGHTING D3DRS_LIGHTING
#define D3DRENDERSTATE_EXTENTS D3DRS_EXTENTS
#define D3DRENDERSTATE_AMBIENT D3DRS_AMBIENT
#define D3DRENDERSTATE_FOGVERTEXMODE D3DRS_FOGVERTEXMODE
#define D3DRENDERSTATE_COLORVERTEX D3DRS_COLORVERTEX
#define D3DRENDERSTATE_LOCALVIEWER D3DRS_LOCALVIEWER
#define D3DRENDERSTATE_NORMALIZENORMALS D3DRS_NORMALIZENORMALS
#define D3DRENDERSTATE_DIFFUSEMATERIALSOURCE D3DRS_DIFFUSEMATERIALSOURCE
#define D3DRENDERSTATE_SPECULARMATERIALSOURCE D3DRS_SPECULARMATERIALSOURCE
#define D3DRENDERSTATE_AMBIENTMATERIALSOURCE D3DRS_AMBIENTMATERIALSOURCE
#define D3DRENDERSTATE_EMISSIVEMATERIALSOURCE D3DRS_EMISSIVEMATERIALSOURCE
#define D3DRENDERSTATE_VERTEXBLEND D3DRS_VERTEXBLEND
#define D3DRENDERSTATE_CLIPPLANEENABLE D3DRS_CLIPPLANEENABLE
#define RGBA_MAKE D3DCOLOR_RGBA
#define RGB_MAKE D3DCOLOR_XRGB
#define D3DRGBA D3DCOLOR_COLORVALUE
#define D3DRGB(_r,_g,_b) D3DCOLOR_COLORVALUE(_r,_g,_b,1.f)
#define _DX7TODX8_H_
#endif //_DX7TODX8_H_

74
lib/directx8/dxerr8.h Executable file
View File

@ -0,0 +1,74 @@
/*==========================================================================;
*
*
* File: dxerr8.h
* Content: DirectX Error Library Include File
*
****************************************************************************/
#ifndef _DXERR8_H_
#define _DXERR8_H_
//
// DXGetErrorString8
//
// Desc: Converts an DirectX HRESULT to a string
//
// Args: HRESULT hr Can be any error code from
// DPLAY D3D8 D3DX8 DMUSIC DSOUND
//
// Return: Converted string
//
const char* __stdcall DXGetErrorString8A(HRESULT hr);
const WCHAR* __stdcall DXGetErrorString8W(HRESULT hr);
#ifdef UNICODE
#define DXGetErrorString8 DXGetErrorString8W
#else
#define DXGetErrorString8 DXGetErrorString8A
#endif
//
// DXTrace
//
// Desc: Outputs a formatted error message to the debug stream
//
// Args: CHAR* strFile The current file, typically passed in using the
// __FILE__ macro.
// DWORD dwLine The current line number, typically passed in using the
// __LINE__ macro.
// HRESULT hr An HRESULT that will be traced to the debug stream.
// CHAR* strMsg A string that will be traced to the debug stream (may be NULL)
// BOOL bPopMsgBox If TRUE, then a message box will popup also containing the passed info.
//
// Return: The hr that was passed in.
//
HRESULT __stdcall DXTraceA( char* strFile, DWORD dwLine, HRESULT hr, char* strMsg, BOOL bPopMsgBox = FALSE );
HRESULT __stdcall DXTraceW( char* strFile, DWORD dwLine, HRESULT hr, WCHAR* strMsg, BOOL bPopMsgBox = FALSE );
#ifdef UNICODE
#define DXTrace DXTraceW
#else
#define DXTrace DXTraceA
#endif
//
// Helper macros
//
#if defined(DEBUG) | defined(_DEBUG)
#define DXTRACE_MSG(str) DXTrace( __FILE__, (DWORD)__LINE__, 0, str, FALSE )
#define DXTRACE_ERR(str,hr) DXTrace( __FILE__, (DWORD)__LINE__, hr, str, TRUE )
#define DXTRACE_ERR_NOMSGBOX(str,hr) DXTrace( __FILE__, (DWORD)__LINE__, hr, str, FALSE )
#else
#define DXTRACE_MSG(str) (0L)
#define DXTRACE_ERR(str,hr) (hr)
#define DXTRACE_ERR_NOMSGBOX(str,hr) (hr)
#endif
#endif

239
lib/directx8/dxfile.h Executable file
View File

@ -0,0 +1,239 @@
/***************************************************************************
*
* Copyright (C) 1998-1999 Microsoft Corporation. All Rights Reserved.
*
* File: dxfile.h
*
* Content: DirectX File public header file
*
***************************************************************************/
#ifndef __DXFILE_H__
#define __DXFILE_H__
#ifdef __cplusplus
extern "C" {
#endif
typedef DWORD DXFILEFORMAT;
#define DXFILEFORMAT_BINARY 0
#define DXFILEFORMAT_TEXT 1
#define DXFILEFORMAT_COMPRESSED 2
typedef DWORD DXFILELOADOPTIONS;
#define DXFILELOAD_FROMFILE 0x00L
#define DXFILELOAD_FROMRESOURCE 0x01L
#define DXFILELOAD_FROMMEMORY 0x02L
#define DXFILELOAD_FROMSTREAM 0x04L
#define DXFILELOAD_FROMURL 0x08L
typedef struct _DXFILELOADRESOURCE {
HMODULE hModule;
LPCTSTR lpName;
LPCTSTR lpType;
}DXFILELOADRESOURCE, *LPDXFILELOADRESOURCE;
typedef struct _DXFILELOADMEMORY {
LPVOID lpMemory;
DWORD dSize;
}DXFILELOADMEMORY, *LPDXFILELOADMEMORY;
/*
* DirectX File object types.
*/
#ifndef WIN_TYPES
#define WIN_TYPES(itype, ptype) typedef interface itype *LP##ptype, **LPLP##ptype
#endif
WIN_TYPES(IDirectXFile, DIRECTXFILE);
WIN_TYPES(IDirectXFileEnumObject, DIRECTXFILEENUMOBJECT);
WIN_TYPES(IDirectXFileSaveObject, DIRECTXFILESAVEOBJECT);
WIN_TYPES(IDirectXFileObject, DIRECTXFILEOBJECT);
WIN_TYPES(IDirectXFileData, DIRECTXFILEDATA);
WIN_TYPES(IDirectXFileDataReference, DIRECTXFILEDATAREFERENCE);
WIN_TYPES(IDirectXFileBinary, DIRECTXFILEBINARY);
/*
* API for creating IDirectXFile interface.
*/
STDAPI DirectXFileCreate(LPDIRECTXFILE *lplpDirectXFile);
/*
* The methods for IUnknown
*/
#define IUNKNOWN_METHODS(kind) \
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) kind; \
STDMETHOD_(ULONG, AddRef) (THIS) kind; \
STDMETHOD_(ULONG, Release) (THIS) kind
/*
* The methods for IDirectXFileObject
*/
#define IDIRECTXFILEOBJECT_METHODS(kind) \
STDMETHOD(GetName) (THIS_ LPSTR, LPDWORD) kind; \
STDMETHOD(GetId) (THIS_ LPGUID) kind
/*
* DirectX File interfaces.
*/
#undef INTERFACE
#define INTERFACE IDirectXFile
DECLARE_INTERFACE_(IDirectXFile, IUnknown)
{
IUNKNOWN_METHODS(PURE);
STDMETHOD(CreateEnumObject) (THIS_ LPVOID, DXFILELOADOPTIONS,
LPDIRECTXFILEENUMOBJECT *) PURE;
STDMETHOD(CreateSaveObject) (THIS_ LPCSTR, DXFILEFORMAT,
LPDIRECTXFILESAVEOBJECT *) PURE;
STDMETHOD(RegisterTemplates) (THIS_ LPVOID, DWORD) PURE;
};
#undef INTERFACE
#define INTERFACE IDirectXFileEnumObject
DECLARE_INTERFACE_(IDirectXFileEnumObject, IUnknown)
{
IUNKNOWN_METHODS(PURE);
STDMETHOD(GetNextDataObject) (THIS_ LPDIRECTXFILEDATA *) PURE;
STDMETHOD(GetDataObjectById) (THIS_ REFGUID, LPDIRECTXFILEDATA *) PURE;
STDMETHOD(GetDataObjectByName) (THIS_ LPCSTR, LPDIRECTXFILEDATA *) PURE;
};
#undef INTERFACE
#define INTERFACE IDirectXFileSaveObject
DECLARE_INTERFACE_(IDirectXFileSaveObject, IUnknown)
{
IUNKNOWN_METHODS(PURE);
STDMETHOD(SaveTemplates) (THIS_ DWORD, const GUID **) PURE;
STDMETHOD(CreateDataObject) (THIS_ REFGUID, LPCSTR, const GUID *,
DWORD, LPVOID, LPDIRECTXFILEDATA *) PURE;
STDMETHOD(SaveData) (THIS_ LPDIRECTXFILEDATA) PURE;
};
#undef INTERFACE
#define INTERFACE IDirectXFileObject
DECLARE_INTERFACE_(IDirectXFileObject, IUnknown)
{
IUNKNOWN_METHODS(PURE);
IDIRECTXFILEOBJECT_METHODS(PURE);
};
#undef INTERFACE
#define INTERFACE IDirectXFileData
DECLARE_INTERFACE_(IDirectXFileData, IDirectXFileObject)
{
IUNKNOWN_METHODS(PURE);
IDIRECTXFILEOBJECT_METHODS(PURE);
STDMETHOD(GetData) (THIS_ LPCSTR, DWORD *, void **) PURE;
STDMETHOD(GetType) (THIS_ const GUID **) PURE;
STDMETHOD(GetNextObject) (THIS_ LPDIRECTXFILEOBJECT *) PURE;
STDMETHOD(AddDataObject) (THIS_ LPDIRECTXFILEDATA) PURE;
STDMETHOD(AddDataReference) (THIS_ LPCSTR, const GUID *) PURE;
STDMETHOD(AddBinaryObject) (THIS_ LPCSTR, const GUID *, LPCSTR, LPVOID, DWORD) PURE;
};
#undef INTERFACE
#define INTERFACE IDirectXFileDataReference
DECLARE_INTERFACE_(IDirectXFileDataReference, IDirectXFileObject)
{
IUNKNOWN_METHODS(PURE);
IDIRECTXFILEOBJECT_METHODS(PURE);
STDMETHOD(Resolve) (THIS_ LPDIRECTXFILEDATA *) PURE;
};
#undef INTERFACE
#define INTERFACE IDirectXFileBinary
DECLARE_INTERFACE_(IDirectXFileBinary, IDirectXFileObject)
{
IUNKNOWN_METHODS(PURE);
IDIRECTXFILEOBJECT_METHODS(PURE);
STDMETHOD(GetSize) (THIS_ DWORD *) PURE;
STDMETHOD(GetMimeType) (THIS_ LPCSTR *) PURE;
STDMETHOD(Read) (THIS_ LPVOID, DWORD, LPDWORD) PURE;
};
/*
* DirectXFile Object Class Id (for CoCreateInstance())
*/
DEFINE_GUID(CLSID_CDirectXFile, 0x4516ec43, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
/*
* DirectX File Interface GUIDs.
*/
DEFINE_GUID(IID_IDirectXFile, 0x3d82ab40, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33);
DEFINE_GUID(IID_IDirectXFileEnumObject, 0x3d82ab41, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33);
DEFINE_GUID(IID_IDirectXFileSaveObject, 0x3d82ab42, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33);
DEFINE_GUID(IID_IDirectXFileObject, 0x3d82ab43, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33);
DEFINE_GUID(IID_IDirectXFileData, 0x3d82ab44, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33);
DEFINE_GUID(IID_IDirectXFileDataReference, 0x3d82ab45, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33);
DEFINE_GUID(IID_IDirectXFileBinary, 0x3d82ab46, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33);
/*
* DirectX File Header template's GUID.
*/
DEFINE_GUID(TID_DXFILEHeader, 0x3d82ab43, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33);
/*
* DirectX File errors.
*/
#define _FACDD 0x876
#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
#define DXFILE_OK 0
#define DXFILEERR_BADOBJECT MAKE_DDHRESULT(850)
#define DXFILEERR_BADVALUE MAKE_DDHRESULT(851)
#define DXFILEERR_BADTYPE MAKE_DDHRESULT(852)
#define DXFILEERR_BADSTREAMHANDLE MAKE_DDHRESULT(853)
#define DXFILEERR_BADALLOC MAKE_DDHRESULT(854)
#define DXFILEERR_NOTFOUND MAKE_DDHRESULT(855)
#define DXFILEERR_NOTDONEYET MAKE_DDHRESULT(856)
#define DXFILEERR_FILENOTFOUND MAKE_DDHRESULT(857)
#define DXFILEERR_RESOURCENOTFOUND MAKE_DDHRESULT(858)
#define DXFILEERR_URLNOTFOUND MAKE_DDHRESULT(859)
#define DXFILEERR_BADRESOURCE MAKE_DDHRESULT(860)
#define DXFILEERR_BADFILETYPE MAKE_DDHRESULT(861)
#define DXFILEERR_BADFILEVERSION MAKE_DDHRESULT(862)
#define DXFILEERR_BADFILEFLOATSIZE MAKE_DDHRESULT(863)
#define DXFILEERR_BADFILECOMPRESSIONTYPE MAKE_DDHRESULT(864)
#define DXFILEERR_BADFILE MAKE_DDHRESULT(865)
#define DXFILEERR_PARSEERROR MAKE_DDHRESULT(866)
#define DXFILEERR_NOTEMPLATE MAKE_DDHRESULT(867)
#define DXFILEERR_BADARRAYSIZE MAKE_DDHRESULT(868)
#define DXFILEERR_BADDATAREFERENCE MAKE_DDHRESULT(869)
#define DXFILEERR_INTERNALERROR MAKE_DDHRESULT(870)
#define DXFILEERR_NOMOREOBJECTS MAKE_DDHRESULT(871)
#define DXFILEERR_BADINTRINSICS MAKE_DDHRESULT(872)
#define DXFILEERR_NOMORESTREAMHANDLES MAKE_DDHRESULT(873)
#define DXFILEERR_NOMOREDATA MAKE_DDHRESULT(874)
#define DXFILEERR_BADCACHEFILE MAKE_DDHRESULT(875)
#define DXFILEERR_NOINTERNET MAKE_DDHRESULT(876)
#ifdef __cplusplus
};
#endif
#endif /* _DXFILE_H_ */

131
lib/directx8/dxsdk.inc Executable file
View File

@ -0,0 +1,131 @@
!IFDEF BORLAND
cc = bcc32
rc = brc32
link = ilink32
bldlib = tlib
cflags = -c -3 -j1 -X -Vd -I$(INCLUDE)
rcflags = -r -fo
linkflags = -n -V4.0 -aa
!IFDEF main
linkflags = $(linkflags) -ap
borobjs=c0x32.obj
!ELSE
linkflags = $(linkflags) -Tpe
borobjs=c0w32.obj
!ENDIF
linkflags = $(linkflags) -j$(LIB) -L$(LIB)
libflags=$(OBJ_DIR)\$(proj).lib
outobj = -o
commas =,
outexe=
borlib=+
deflibs = import32.lib cw32mti.lib ole2w32.lib
!IFDEF MFC
cflags =$(cflags) -VF -w-hid -w-par -w-aus -w-inl -w-inq -WM -Vd /D_NO_VCL;_RTLDLL;_AFXDLL;_X86_;_WINDOWS;_MSC_VER=1100;WIN32;
!IFDEF NODEBUG
deflibs = bfc42.lib bfcs42.lib $(deflibs)
!ELSE
deflibs = BFC42D.lib BFCS42D.lib bfcd42d.lib bfco42d.lib bfcn42d.lib $(deflibs)
!ENDIF
!ENDIF
d3dframe=..\..\lib\borland\d3dframe.lib
!IFDEF nodebug
cdebug = -Od
linkdebug = /x
cflags = $(cflags) /DNDEBUG;
!ELSE
cdebug = -Od -v -y
linkdebug = /v
cflags = $(cflags) /DDEBUG;
!ENDIF
!ELSE
!IFDEF WATCOM
cc = cl
rc = rc
link = link
bldlib = lib
deflibs = kernel32.lib gdi32.lib user32.lib advapi32.lib gdi32.lib comdlg32.lib winspool.lib shell32.lib winmm.lib comctl32.lib ole32.lib oleaut32.lib
cflags = -c /D "WIN32" /D "_WINDOWS"
!IFDEF NODEBUG
cflags =$(cflags) /D "NDEBUG"
cdebug = -Ox
linkdebug =
!IFDEF MFC
cflags =$(cflags) /MD /D "_AFXDLL"
!ELSE
cflags =$(cflags) /ML
!ENDIF
!ELSE
cflags =$(cflags) /D "DEBUG"
cdebug = -Z7 -Ox
linkdebug = -map -debug:full
!IFDEF MFC
cflags =$(cflags) /MDd /D "_AFXDLL"
!ELSE
cflags =$(cflags) /MLd
!ENDIF
!ENDIF
rcflags = -r -fo
linkflags = /INCREMENTAL:NO /NOLOGO
!IFDEF main
linkflags = $(linkflags) /SUBSYSTEM:CONSOLE
!ELSE
linkflags = $(linkflags) /SUBSYSTEM:WINDOWS
!ENDIF
libflags=/OUT:$(OBJ_DIR)\$(proj).lib
outobj = -Fo
commas=
outexe=-out:
borobjs=
borlib=
d3dframe=..\..\lib\watcom\d3dframe.lib
!ELSE
cc = cl
rc = rc
link = link
bldlib = lib
deflibs = kernel32.lib gdi32.lib user32.lib advapi32.lib gdi32.lib comdlg32.lib winspool.lib shell32.lib winmm.lib comctl32.lib ole32.lib oleaut32.lib
cflags = -c /D "WIN32" /D "_WINDOWS"
linkflags=
!IFDEF NODEBUG
cflags =$(cflags) /D "NDEBUG"
cdebug = -Ox
linkdebug = /RELEASE
!IFDEF MFC
cflags =$(cflags) /MD /D "_AFXDLL"
!ELSE
cflags =$(cflags) /ML
!ENDIF
!ELSE
cflags = $(cflags) /D "DEBUG"
cdebug = -Z7 -Ox
linkdebug = -map -debug:full -debugtype:cv
!IFDEF MFC
cflags =$(cflags) /MDd /D "_AFXDLL"
!ELSE
linkflags = $(linkflags) /NODEFAULTLIB:LIBC
cflags =$(cflags) /MLd
!ENDIF
!ENDIF
cflags =$(cflags)
rcflags = -r -fo
linkflags = $(linkflags) /INCREMENTAL:NO /PDB:NONE /NOLOGO
!IFDEF main
linkflags = $(linkflags) /SUBSYSTEM:CONSOLE
!ELSE
linkflags = $(linkflags) /SUBSYSTEM:WINDOWS
!ENDIF
libflags=/OUT:$(OBJ_DIR)\$(proj).lib /SUBSYSTEM:WINDOWS
outobj = -Fo
commas=
outexe=-out:
borobjs=
borlib=
d3dframe=..\..\lib\d3dframe.lib
!ENDIF
!ENDIF

4974
lib/directx8/dxtrans.h Executable file

File diff suppressed because it is too large Load Diff

653
lib/directx8/dxva.h Executable file
View File

@ -0,0 +1,653 @@
//------------------------------------------------------------------------------
// File: DXVA.h
//
// Desc: DirectX Video Acceleration header file.
//
// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __DIRECTX_VA__
#define __DIRECTX_VA__
#ifdef __cplusplus
extern "C" {
#endif
DEFINE_GUID(DXVA_ModeNone, 0x1b81be00, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVA_ModeH261_A, 0x1b81be01, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVA_ModeH261_B, 0x1b81be02, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVA_ModeH263_A, 0x1b81be03, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVA_ModeH263_B, 0x1b81be04, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVA_ModeH263_C, 0x1b81be05, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVA_ModeH263_D, 0x1b81be06, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVA_ModeH263_E, 0x1b81be07, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVA_ModeH263_F, 0x1b81be08, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVA_ModeMPEG1_A, 0x1b81be09, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVA_ModeMPEG2_A, 0x1b81be0A, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVA_ModeMPEG2_B, 0x1b81be0B, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVA_ModeMPEG2_C, 0x1b81be0C, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVA_ModeMPEG2_D, 0x1b81be0D, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVA_NoEncrypt, 0x1b81beD0, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVA_EncryptProt1, 0x1b81beD1, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
#define DXVA_RESTRICTED_MODE_UNRESTRICTED 0xFFFF
#define DXVA_RESTRICTED_MODE_H261_A 1
#define DXVA_RESTRICTED_MODE_H261_B 2
#define DXVA_RESTRICTED_MODE_H263_A 3
#define DXVA_RESTRICTED_MODE_H263_B 4
#define DXVA_RESTRICTED_MODE_H263_C 5
#define DXVA_RESTRICTED_MODE_H263_D 6
#define DXVA_RESTRICTED_MODE_H263_E 7
#define DXVA_RESTRICTED_MODE_H263_F 8
#define DXVA_RESTRICTED_MODE_MPEG1_A 9
#define DXVA_RESTRICTED_MODE_MPEG2_A 0xA
#define DXVA_RESTRICTED_MODE_MPEG2_B 0xB
#define DXVA_RESTRICTED_MODE_MPEG2_C 0xC
#define DXVA_RESTRICTED_MODE_MPEG2_D 0xD
#define DXVA_COMPBUFFER_TYPE_THAT_IS_NOT_USED 0
#define DXVA_PICTURE_DECODE_BUFFER 1
#define DXVA_MACROBLOCK_CONTROL_BUFFER 2
#define DXVA_RESIDUAL_DIFFERENCE_BUFFER 3
#define DXVA_DEBLOCKING_CONTROL_BUFFER 4
#define DXVA_INVERSE_QUANTIZATION_MATRIX_BUFFER 5
#define DXVA_SLICE_CONTROL_BUFFER 6
#define DXVA_BITSTREAM_DATA_BUFFER 7
#define DXVA_AYUV_BUFFER 8
#define DXVA_IA44_SURFACE_BUFFER 9
#define DXVA_DPXD_SURFACE_BUFFER 10
#define DXVA_HIGHLIGHT_BUFFER 11
#define DXVA_DCCMD_SURFACE_BUFFER 12
#define DXVA_ALPHA_BLEND_COMBINATION_BUFFER 13
#define DXVA_PICTURE_RESAMPLE_BUFFER 14
#define DXVA_READ_BACK_BUFFER 15
#define DXVA_NUM_TYPES_COMP_BUFFERS 16
/* values for bDXVA_Func */
#define DXVA_PICTURE_DECODING_FUNCTION 1
#define DXVA_ALPHA_BLEND_DATA_LOAD_FUNCTION 2
#define DXVA_ALPHA_BLEND_COMBINATION_FUNCTION 3
#define DXVA_PICTURE_RESAMPLE_FUNCTION 4
/* values returned from Execute command in absence of read-back */
#define DXVA_EXECUTE_RETURN_OK 0
#define DXVA_EXECUTE_RETURN_DATA_ERROR_MINOR 1
#define DXVA_EXECUTE_RETURN_DATA_ERROR_SIGNIF 2
#define DXVA_EXECUTE_RETURN_DATA_ERROR_SEVERE 3
#define DXVA_EXECUTE_RETURN_OTHER_ERROR_SEVERE 4
#pragma pack(push, BeforeDXVApacking, 1)
typedef struct _DXVA_ConnectMode {
GUID guidMode;
WORD wRestrictedMode;
} DXVA_ConnectMode, *LPDXVA_ConnectMode;
typedef DWORD DXVA_ConfigQueryOrReplyFunc, *LPDXVA_ConfigQueryOrReplyFunc;
#define DXVA_QUERYORREPLYFUNCFLAG_DECODER_PROBE_QUERY 0xFFFFF1
#define DXVA_QUERYORREPLYFUNCFLAG_DECODER_LOCK_QUERY 0xFFFFF5
#define DXVA_QUERYORREPLYFUNCFLAG_ACCEL_PROBE_OK_COPY 0xFFFFF8
#define DXVA_QUERYORREPLYFUNCFLAG_ACCEL_PROBE_OK_PLUS 0xFFFFF9
#define DXVA_QUERYORREPLYFUNCFLAG_ACCEL_LOCK_OK_COPY 0xFFFFFC
#define DXVA_QUERYORREPLYFUNCFLAG_ACCEL_PROBE_FALSE_PLUS 0xFFFFFB
#define DXVA_QUERYORREPLYFUNCFLAG_ACCEL_LOCK_FALSE_PLUS 0xFFFFFF
#define readDXVA_QueryOrReplyFuncFlag(ptr) ((*(ptr)) >> 8)
#define readDXVA_QueryOrReplyFuncFlag_ACCEL(ptr) (((*(ptr)) >> 11) & 1)
#define readDXVA_QueryOrReplyFuncFlag_LOCK(ptr) (((*(ptr)) >> 10) & 1)
#define readDXVA_QueryOrReplyFuncFlag_BAD(ptr) (((*(ptr)) >> 9) & 1)
#define readDXVA_QueryOrReplyFuncFlag_PLUS(ptr) (((*(ptr)) >> 8) & 1)
#define readDXVA_QueryOrReplyFuncFunc(ptr) ((*(ptr)) & 0xFF)
#define writeDXVA_QueryOrReplyFunc(ptr, flg, fnc) ((*(ptr)) = ((flg) << 8) | (fnc))
#define setDXVA_QueryOrReplyFuncFlag(ptr, flg) ((*(ptr)) |= ((flg) << 8))
#define setDXVA_QueryOrReplyFuncFunc(ptr, fnc) ((*(ptr)) |= (fnc));
typedef DWORD DXVA_EncryptProtocolFunc, *LPDXVA_EncryptProtocolFunc;
#define DXVA_ENCRYPTPROTOCOLFUNCFLAG_HOST 0xFFFF00
#define DXVA_ENCRYPTPROTOCOLFUNCFLAG_ACCEL 0xFFFF08
#define readDXVA_EncryptProtocolFuncFlag(ptr) ((*(ptr)) >> 8)
#define readDXVA_EncryptProtocolFuncFlag_ACCEL(ptr) (((*(ptr)) >> 11) & 1)
#define readDXVA_EncryptProtocolFuncFunc(ptr) ((*(ptr)) & 0xFF)
#define writeDXVA_EncryptProtocolFunc(ptr, flg, fnc) ((*(ptr)) = ((flg) << 8) | (fnc))
#define setDXVA_EncryptProtocolFuncFlag(ptr, flg) ((*(ptr)) |= ((flg) << 8))
#define setDXVA_EncryptProtocolFuncFunc(ptr, fnc) ((*(ptr)) |= (fnc));
typedef struct _DXVA_EncryptProtocolHeader {
DXVA_EncryptProtocolFunc dwFunction;
DWORD ReservedBits[3];
GUID guidEncryptProtocol;
} DXVA_EncryptProtocolHeader, *LPDXVA_EncryptProtocolHeader;
typedef struct _DXVA_ConfigPictureDecode {
// Operation Indicated
DXVA_ConfigQueryOrReplyFunc dwFunction;
// Alignment
DWORD dwReservedBits[3];
// Encryption GUIDs
GUID guidConfigBitstreamEncryption;
GUID guidConfigMBcontrolEncryption;
GUID guidConfigResidDiffEncryption;
// Bitstream Processing Indicator
BYTE bConfigBitstreamRaw;
// Macroblock Control Config
BYTE bConfigMBcontrolRasterOrder;
// Host Resid Diff Config
BYTE bConfigResidDiffHost;
BYTE bConfigSpatialResid8;
BYTE bConfigResid8Subtraction;
BYTE bConfigSpatialHost8or9Clipping;
BYTE bConfigSpatialResidInterleaved;
BYTE bConfigIntraResidUnsigned;
// Accelerator Resid Diff Config
BYTE bConfigResidDiffAccelerator;
BYTE bConfigHostInverseScan;
BYTE bConfigSpecificIDCT;
BYTE bConfig4GroupedCoefs;
} DXVA_ConfigPictureDecode, *LPDXVA_ConfigPictureDecode;
/* Picture Decoding Parameters */
typedef struct _DXVA_PictureParameters {
WORD wDecodedPictureIndex;
WORD wDeblockedPictureIndex;
WORD wForwardRefPictureIndex;
WORD wBackwardRefPictureIndex;
WORD wPicWidthInMBminus1;
WORD wPicHeightInMBminus1;
BYTE bMacroblockWidthMinus1;
BYTE bMacroblockHeightMinus1;
BYTE bBlockWidthMinus1;
BYTE bBlockHeightMinus1;
BYTE bBPPminus1;
BYTE bPicStructure;
BYTE bSecondField;
BYTE bPicIntra;
BYTE bPicBackwardPrediction;
BYTE bBidirectionalAveragingMode;
BYTE bMVprecisionAndChromaRelation;
BYTE bChromaFormat;
BYTE bPicScanFixed;
BYTE bPicScanMethod;
BYTE bPicReadbackRequests;
BYTE bRcontrol;
BYTE bPicSpatialResid8;
BYTE bPicOverflowBlocks;
BYTE bPicExtrapolation;
BYTE bPicDeblocked;
BYTE bPicDeblockConfined;
BYTE bPic4MVallowed;
BYTE bPicOBMC;
BYTE bPicBinPB;
BYTE bMV_RPS;
BYTE bReservedBits;
WORD wBitstreamFcodes;
WORD wBitstreamPCEelements;
BYTE bBitstreamConcealmentNeed;
BYTE bBitstreamConcealmentMethod;
} DXVA_PictureParameters, *LPDXVA_PictureParameters;
/* Picture Resampling */
typedef struct _DXVA_PicResample {
WORD wPicResampleSourcePicIndex;
WORD wPicResampleDestPicIndex;
WORD wPicResampleRcontrol;
BYTE bPicResampleExtrapWidth;
BYTE bPicResampleExtrapHeight;
DWORD dwPicResampleSourceWidth;
DWORD dwPicResampleSourceHeight;
DWORD dwPicResampleDestWidth;
DWORD dwPicResampleDestHeight;
DWORD dwPicResampleFullDestWidth;
DWORD dwPicResampleFullDestHeight;
} DXVA_PicResample, *LPDXVA_PicResample;
#define DXVA_CHROMA_FORMAT_420 1
#define DXVA_CHROMA_FORMAT_422 2
#define DXVA_CHROMA_FORMAT_444 3
#define DXVA_PICTURE_STRUCTURE_TOP_FIELD 1
#define DXVA_PICTURE_STRUCTURE_BOTTOM_FIELD 2
#define DXVA_PICTURE_STRUCTURE_FRAME 3
#define DXVA_BIDIRECTIONAL_AVERAGING_MPEG2_ROUND 0
#define DXVA_BIDIRECTIONAL_AVERAGING_H263_TRUNC 1
#define DXVA_MV_PRECISION_AND_CHROMA_RELATION_MPEG2 0
#define DXVA_MV_PRECISION_AND_CHROMA_RELATION_H263 1
#define DXVA_MV_PRECISION_AND_CHROMA_RELATION_H261 2
#define DXVA_SCAN_METHOD_ZIG_ZAG 0
#define DXVA_SCAN_METHOD_ALTERNATE_VERTICAL 1
#define DXVA_SCAN_METHOD_ALTERNATE_HORIZONTAL 2
#define DXVA_SCAN_METHOD_ARBITRARY 3
#define DXVA_BITSTREAM_CONCEALMENT_NEED_UNLIKELY 0
#define DXVA_BITSTREAM_CONCEALMENT_NEED_MILD 1
#define DXVA_BITSTREAM_CONCEALMENT_NEED_LIKELY 2
#define DXVA_BITSTREAM_CONCEALMENT_NEED_SEVERE 3
#define DXVA_BITSTREAM_CONCEALMENT_METHOD_UNSPECIFIED 0
#define DXVA_BITSTREAM_CONCEALMENT_METHOD_INTRA 1
#define DXVA_BITSTREAM_CONCEALMENT_METHOD_FORWARD 2
#define DXVA_BITSTREAM_CONCEALMENT_METHOD_BACKWARD 3
/* Buffer Description Data */
typedef struct _DXVA_BufferDescription {
DWORD dwTypeIndex;
DWORD dwBufferIndex;
DWORD dwDataOffset;
DWORD dwDataSize;
DWORD dwFirstMBaddress;
DWORD dwNumMBsInBuffer;
DWORD dwWidth;
DWORD dwHeight;
DWORD dwStride;
DWORD dwReservedBits;
} DXVA_BufferDescription, *LPDXVA_BufferDescription;
/* Off-Host IDCT Coefficient Data Structures */
typedef struct _DXVA_TCoef4Group {
BYTE TCoefIDX[4];
SHORT TCoefValue[4];
} DXVA_TCoef4Group, *LPDXVA_TCoef4Group;
typedef struct _DXVA_TCoefSingle {
WORD wIndexWithEOB;
SHORT TCoefValue;
} DXVA_TCoefSingle, *LPDXVA_TCoefSingle;
/* Macros for Reading EOB and Index Values */
#define readDXVA_TCoefSingleIDX(ptr) ((ptr)->wIndexWithEOB >> 1)
#define readDXVA_TCoefSingleEOB(ptr) ((ptr)->wIndexWithEOB & 1)
/* Macro for Writing EOB and Index Values */
#define writeDXVA_TCoefSingleIndexWithEOB(ptr, idx, eob) ((ptr)->wIndexWithEOB = ((idx) << 1) | (eob))
#define setDXVA_TCoefSingleIDX(ptr, idx) ((ptr)->wIndexWithEOB |= ((idx) << 1))
#define setDXVA_TCoefSingleEOB(ptr) ((ptr)->wIndexWithEOB |= 1)
/* Spatial-Domain Residual Difference Blocks */
#define DXVA_USUAL_BLOCK_WIDTH 8
#define DXVA_USUAL_BLOCK_HEIGHT 8
#define DXVA_USUAL_BLOCK_SIZE (DXVA_USUAL_BLOCK_WIDTH * DXVA_USUAL_BLOCK_HEIGHT)
typedef SHORT DXVA_Sample16[DXVA_USUAL_BLOCK_SIZE];
typedef signed char DXVA_Sample8 [DXVA_USUAL_BLOCK_SIZE];
/* Deblocking Filter Control Structure */
typedef BYTE DXVA_DeblockingEdgeControl;
typedef DXVA_DeblockingEdgeControl * LPDXVA_DeblockingEdgeControl;
/* Macros for Reading STRENGTH and FilterOn */
#define readDXVA_EdgeFilterStrength(ptr) ((*(ptr)) >> 1)
#define readDXVA_EdgeFilterOn(ptr) ((*(ptr)) & 1)
/* Macro for Writing STRENGTH and FilterOn */
#define writeDXVA_DeblockingEdgeControl(ptr, str, fon) ((*(ptr)) = ((str) << 1) | (fon))
#define setDXVA_EdgeFilterStrength(ptr, str) ((*(ptr)) |= ((str) << 1))
#define setDXVA_EdgeFilterOn(ptr) ((*(ptr)) |= 1)
/* Macroblock Control Command Data Structures */
typedef struct _DXVA_MVvalue {
SHORT horz, vert;
} DXVA_MVvalue, *LPDXVA_MVvalue;
/* Inverse Quantization Matrices */
typedef struct _DXVA_QmatrixData {
BYTE bNewQmatrix[4]; /* intra Y, inter Y, intra chroma, inter chroma */
WORD Qmatrix[4][DXVA_USUAL_BLOCK_WIDTH * DXVA_USUAL_BLOCK_HEIGHT];
} DXVA_QmatrixData, *LPDXVA_QmatrixData;
/* Slice Control Buffer Data */
typedef struct _DXVA_SliceInfo {
WORD wHorizontalPosition;
WORD wVerticalPosition;
DWORD dwSliceBitsInBuffer;
DWORD dwSliceDataLocation;
BYTE bStartCodeBitOffset;
BYTE bReservedBits;
WORD wMBbitOffset;
WORD wNumberMBsInSlice;
WORD wQuantizerScaleCode;
WORD wBadSliceChopping;
} DXVA_SliceInfo, *LPDXVA_SliceInfo;
#define DXVA_NumMV_OBMC_off_BinPBwith4MV_off 4
#define DXVA_NumMV_OBMC_off_BinPBwith4MV_on (4+1)
#define DXVA_NumMV_OBMC_on__BinPB_off (10)
#define DXVA_NumMV_OBMC_on__BinPB_on (11) /* not current standards */
#define DXVA_NumBlocksPerMB_420 (4+2+0)
#define DXVA_NumBlocksPerMB_422 (4+2+2)
#define DXVA_NumBlocksPerMB_444 (4+4+4)
/* Basic form for I pictures */
/* Host Residual Differences */
typedef struct _DXVA_MBctrl_I_HostResidDiff_1 {
WORD wMBaddress;
WORD wMBtype;
DWORD dwMB_SNL;
WORD wPatternCode;
WORD wPC_Overflow; /* zero if not overflow format */
DWORD dwReservedBits2;
} DXVA_MBctrl_I_HostResidDiff_1;
/* Basic form for I pictures */
/* Off-Host IDCT, 4:2:0 sampling */
typedef struct _DXVA_MBctrl_I_OffHostIDCT_1 {
WORD wMBaddress;
WORD wMBtype;
DWORD dwMB_SNL;
WORD wPatternCode;
BYTE bNumCoef[DXVA_NumBlocksPerMB_420];
} DXVA_MBctrl_I_OffHostIDCT_1;
/* Basic form for P and B pictures */
/* Should also be used for concealment MVs in MPEG-2 I pictures */
/* Without OBMC, without BinPB and 4MV together, without MV RPS */
/* Host Residual Differences */
typedef struct _DXVA_MBctrl_P_HostResidDiff_1 {
WORD wMBaddress;
WORD wMBtype;
DWORD dwMB_SNL;
WORD wPatternCode;
WORD wPC_Overflow; /* zero if not overflow format */
DWORD dwReservedBits2;
DXVA_MVvalue MVector[DXVA_NumMV_OBMC_off_BinPBwith4MV_off];
} DXVA_MBctrl_P_HostResidDiff_1;
/* Basic form for P and B pictures */
/* Without OBMC, without BinPB and 4MV together, without MV RPS */
/* Off-Host IDCT, 4:2:0 sampling */
typedef struct _DXVA_MBctrl_P_OffHostIDCT_1 {
WORD wMBaddress;
WORD wMBtype;
DWORD dwMB_SNL;
WORD wPatternCode;
BYTE bNumCoef[DXVA_NumBlocksPerMB_420];
DXVA_MVvalue MVector[DXVA_NumMV_OBMC_off_BinPBwith4MV_off];
} DXVA_MBctrl_P_OffHostIDCT_1;
/* How to load alpha blending graphic data */
typedef struct _DXVA_ConfigAlphaLoad {
// Operation Indicated
DXVA_ConfigQueryOrReplyFunc dwFunction;
// Alignment
DWORD dwReservedBits[3];
BYTE bConfigDataType;
} DXVA_ConfigAlphaLoad, *LPDXVA_ConfigAlphaLoad;
#define DXVA_CONFIG_DATA_TYPE_IA44 0
#define DXVA_CONFIG_DATA_TYPE_AI44 1
#define DXVA_CONFIG_DATA_TYPE_DPXD 2
#define DXVA_CONFIG_DATA_TYPE_AYUV 3
/* How to combine alpha blending graphic data */
typedef struct _DXVA_ConfigAlphaCombine {
// Operation Indicated
DXVA_ConfigQueryOrReplyFunc dwFunction;
// Alignment
DWORD dwReservedBits[3];
BYTE bConfigBlendType;
BYTE bConfigPictureResizing;
BYTE bConfigOnlyUsePicDestRectArea;
BYTE bConfigGraphicResizing;
BYTE bConfigWholePlaneAlpha;
} DXVA_ConfigAlphaCombine, *LPDXVA_ConfigAlphaCombine;
#define DXVA_CONFIG_BLEND_TYPE_FRONT_BUFFER 0
#define DXVA_CONFIG_BLEND_TYPE_BACK_HARDWARE 1
/* AYUV sample for 16-entry YUV palette or graphic surface */
typedef struct _DXVA_AYUVsample {
BYTE bSampleAlpha8, bY_Value, bCbValue, bCrValue;
} DXVA_AYUVsample, *LPDXVA_AYUVsample;
/* Macros for IA44 alpha blending surface samples */
typedef BYTE DXVA_IA44sample, *LPDXVA_IA44sample;
#define readDXVA_IA44index(ptr) (((*(ptr)) & 0xF0) >> 4)
#define readDXVA_IA44alpha(ptr) ((*(ptr)) & 0x0F)
#define writeDXVA_IA44(ptr, idx, alpha) ((*(ptr)) = (((idx) << 4) | (alpha)))
#define setDXVA_IA44index(ptr, idx) ((*(ptr)) |= ((idx) << 4))
#define setDXVA_IA44alpha(ptr, alpha) ((*(ptr)) |= (alpha))
/* Macros for AI44 alpha blending surface samples */
typedef BYTE DXVA_AI44sample, *LPDXVA_AI44sample;
#define readDXVA_AI44index(ptr) ((*(ptr)) & 0x0F)
#define readDXVA_AI44alpha(ptr) (((*(ptr)) & 0xF0) >> 4)
#define writeDXVA_AI44(ptr, idx, alpha) ((*(ptr)) = (((alpha) << 4) | (idx)))
#define setDXVA_AI44index(ptr, idx) ((*(ptr)) |= (idx))
#define setDXVA_AI44alpha(ptr, alpha) ((*(ptr)) |= ((alpha) << 4))
/* Highlight data structure */
typedef struct _DXVA_Highlight {
WORD wHighlightActive;
WORD wHighlightIndices;
WORD wHighlightAlphas;
RECT HighlightRect;
} DXVA_Highlight, *LPDXVA_Highlight;
typedef BYTE DXVA_DPXD, *LPDXVA_DPXD;
typedef WORD DXVA_DCCMD, *LPDXVA_DCCMD;
/* Alpha blend combination */
typedef struct _DXVA_BlendCombination {
WORD wPictureSourceIndex;
WORD wBlendedDestinationIndex;
RECT PictureSourceRect16thPel;
RECT PictureDestinationRect;
RECT GraphicSourceRect;
RECT GraphicDestinationRect;
WORD wBlendDelay;
BYTE bBlendOn;
BYTE bWholePlaneAlpha;
DXVA_AYUVsample OutsideYUVcolor;
} DXVA_BlendCombination, *LPDXVA_BlendCombination;
/* Encryption Protocol #1 Data Structure */
#define DXVA_MAX_URIsize 1024
typedef struct _DXVA_EncryptProt1Data_Sign512_Accel512 {
DXVA_EncryptProtocolHeader header;
DWORD dwSigningModulusSize; /* equal to 64 */
BYTE SigningModulusValue[64];
DWORD dwSigningExponentSize; /* equal to 64 */
BYTE SigningExponentValue[64];
DWORD dwAccelModulusSize; /* equal to 64 */
BYTE AccelModulusValue[64];
DWORD dwAccelExponentSize; /* equal to 64 */
BYTE AccelExponentValue[64];
DWORD dwEncryptionFrequency;
DWORD dwURIsize;
WCHAR URIstring[DXVA_MAX_URIsize];
BYTE Signature[64];
} DXVA_EncryptProt1Data_Sign512_Accel512,
*LPDXVA_EncryptProt1Data_Sign512_Accel512;
#pragma pack(push, 16)
typedef DXVA_MBctrl_I_HostResidDiff_1 *
LPDXVA_MBctrl_I_HostResidDiff_1;
typedef DXVA_MBctrl_I_OffHostIDCT_1 *
LPDXVA_MBctrl_I_OffHostIDCT_1;
typedef DXVA_MBctrl_P_HostResidDiff_1 *
LPDXVA_MBctrl_P_HostResidDiff_1;
typedef DXVA_MBctrl_P_OffHostIDCT_1 *
LPDXVA_MBctrl_P_OffHostIDCT_1;
#pragma pack(pop)
/*
* Other forms of pictures are constructed in the obvious way
* from the above by adjusting the number of residual difference
* blocks, the number of motion vectors per macroblock, etc.
*/
#define readDXVA_MBskipsFollowing(ptr) (((ptr)->dwMB_SNL & 0xFF000000) >> 24)
#define readDXVA_MBdataLocation(ptr) (((ptr)->dwMB_SNL & 0x00FFFFFF))
#define writeDXVA_MB_SNL(ptr, skips, dloc) ((ptr)->dwMB_SNL = (((skips) << 24) | (dloc)))
#define setDXVA_MBskipsFollowing(ptr, skips) ((ptr)->dwMB_SNL |= ((skips) << 24))
#define setDXVA_MBdataLocation(ptr, dloc) ((ptr)->dwMB_SNL |= (dloc))
#define readDXVA_MvertFieldSel_3(ptr) (((ptr)->wMBtype & 0x8000) >> 15)
#define readDXVA_MvertFieldSel_2(ptr) (((ptr)->wMBtype & 0x4000) >> 14)
#define readDXVA_MvertFieldSel_1(ptr) (((ptr)->wMBtype & 0x2000) >> 13)
#define readDXVA_MvertFieldSel_0(ptr) (((ptr)->wMBtype & 0x1000) >> 12)
#define readDXVA_ReservedBits(ptr) (((ptr)->wMBtype & 0x0800) >> 11)
#define readDXVA_HostResidDiff(ptr) (((ptr)->wMBtype & 0x0400) >> 10)
#define readDXVA_MotionType(ptr) (((ptr)->wMBtype & 0x0300) >> 8)
#define readDXVA_MBscanMethod(ptr) (((ptr)->wMBtype & 0x00C0) >> 6)
#define readDXVA_FieldResidual(ptr) (((ptr)->wMBtype & 0x0020) >> 5)
#define readDXVA_H261LoopFilter(ptr) (((ptr)->wMBtype & 0x0010) >> 4)
#define readDXVA_Motion4MV(ptr) (((ptr)->wMBtype & 0x0008) >> 3)
#define readDXVA_MotionBackward(ptr) (((ptr)->wMBtype & 0x0004) >> 2)
#define readDXVA_MotionForward(ptr) (((ptr)->wMBtype & 0x0002) >> 1)
#define readDXVA_IntraMacroblock(ptr) (((ptr)->wMBtype & 0x0001))
#define setDXVA_MvertFieldSel_3(ptr) ((ptr)->wMBtype |= 0x8000)
#define setDXVA_MvertFieldSel_2(ptr) ((ptr)->wMBtype |= 0x4000)
#define setDXVA_MvertFieldSel_1(ptr) ((ptr)->wMBtype |= 0x2000)
#define setDXVA_MvertFieldSel_0(ptr) ((ptr)->wMBtype |= 0x1000)
#define setDXVA_ReservedBits(ptr) ((ptr)->wMBtype |= 0x0800)
#define setDXVA_HostResidDiff(ptr) ((ptr)->wMBtype |= 0x0400)
#define setDXVA_MotionType(ptr, value) ((ptr)->wMBtype |= ((value) << 8))
#define setDXVA_MBscanMethod(ptr, value) ((ptr)->wMBtype |= ((value) << 6))
#define setDXVA_FieldResidual(ptr) ((ptr)->wMBtype |= 0x0020)
#define setDXVA_H261LoopFilter(ptr) ((ptr)->wMBtype |= 0x0010)
#define setDXVA_Motion4MV(ptr) ((ptr)->wMBtype |= 0x0008)
#define setDXVA_MotionBackward(ptr) ((ptr)->wMBtype |= 0x0004)
#define setDXVA_MotionForward(ptr) ((ptr)->wMBtype |= 0x0002)
#define setDXVA_IntraMacroblock(ptr) ((ptr)->wMBtype |= 0x0001)
#define readDXVA_Y___0coded(ptr) (((ptr)->wPatternCode & 0x0800) >> 11)
#define readDXVA_Y___1coded(ptr) (((ptr)->wPatternCode & 0x0400) >> 10)
#define readDXVA_Y___2coded(ptr) (((ptr)->wPatternCode & 0x0200) >> 9)
#define readDXVA_Y___3coded(ptr) (((ptr)->wPatternCode & 0x0100) >> 8)
#define readDXVA_Cb__4coded(ptr) (((ptr)->wPatternCode & 0x0080) >> 7)
#define readDXVA_Cr__5coded(ptr) (((ptr)->wPatternCode & 0x0040) >> 6)
#define readDXVA_Cb__6coded(ptr) (((ptr)->wPatternCode & 0x0020) >> 5)
#define readDXVA_Cr__7coded(ptr) (((ptr)->wPatternCode & 0x0010) >> 4)
#define readDXVA_Cb__8coded(ptr) (((ptr)->wPatternCode & 0x0008) >> 3)
#define readDXVA_Cb__9coded(ptr) (((ptr)->wPatternCode & 0x0004) >> 2)
#define readDXVA_Cr_10coded(ptr) (((ptr)->wPatternCode & 0x0002) >> 1)
#define readDXVA_Cr_11coded(ptr) (((ptr)->wPatternCode & 0x0001))
#define readDXVA_Y___0oflow(ptr) (((ptr)->wPC_Overflow & 0x0800) >> 11)
#define readDXVA_Y___1oflow(ptr) (((ptr)->wPC_Overflow & 0x0400) >> 10)
#define readDXVA_Y___2oflow(ptr) (((ptr)->wPC_Overflow & 0x0200) >> 9)
#define readDXVA_Y___3oflow(ptr) (((ptr)->wPC_Overflow & 0x0100) >> 8)
#define readDXVA_Cb__4oflow(ptr) (((ptr)->wPC_Overflow & 0x0080) >> 7)
#define readDXVA_Cr__5oflow(ptr) (((ptr)->wPC_Overflow & 0x0040) >> 6)
#define readDXVA_Cb__6oflow(ptr) (((ptr)->wPC_Overflow & 0x0020) >> 5)
#define readDXVA_Cr__7oflow(ptr) (((ptr)->wPC_Overflow & 0x0010) >> 4)
#define readDXVA_Cb__8oflow(ptr) (((ptr)->wPC_Overflow & 0x0008) >> 3)
#define readDXVA_Cb__9oflow(ptr) (((ptr)->wPC_Overflow & 0x0004) >> 2)
#define readDXVA_Cr_10oflow(ptr) (((ptr)->wPC_Overflow & 0x0002) >> 1)
#define readDXVA_Cr_11oflow(ptr) (((ptr)->wPC_Overflow & 0x0001))
#pragma pack(pop, BeforeDXVApacking)
#ifdef __cplusplus
}
#endif
#endif /* __DIRECTX_VA__ */

47
lib/directx8/errors.h Executable file
View File

@ -0,0 +1,47 @@
//------------------------------------------------------------------------------
// File: Errors.h
//
// Desc: ActiveMovie error defines.
//
// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __ERRORS__
#define __ERRORS__
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
#ifndef _AMOVIE_
#define AMOVIEAPI DECLSPEC_IMPORT
#else
#define AMOVIEAPI
#endif
// codes 0-01ff are reserved for OLE
#define VFW_FIRST_CODE 0x200
#define MAX_ERROR_TEXT_LEN 160
#include <VFWMSGS.H> // includes all message definitions
typedef BOOL (WINAPI* AMGETERRORTEXTPROCA)(HRESULT, char *, DWORD);
typedef BOOL (WINAPI* AMGETERRORTEXTPROCW)(HRESULT, WCHAR *, DWORD);
AMOVIEAPI DWORD WINAPI AMGetErrorTextA( HRESULT hr , char *pbuffer , DWORD MaxLen);
AMOVIEAPI DWORD WINAPI AMGetErrorTextW( HRESULT hr , WCHAR *pbuffer , DWORD MaxLen);
#ifdef UNICODE
#define AMGetErrorText AMGetErrorTextW
typedef AMGETERRORTEXTPROCW AMGETERRORTEXTPROC;
#else
#define AMGetErrorText AMGetErrorTextA
typedef AMGETERRORTEXTPROCA AMGETERRORTEXTPROC;
#endif
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // __ERRORS__

342
lib/directx8/evcode.h Executable file
View File

@ -0,0 +1,342 @@
//------------------------------------------------------------------------------
// File: EvCode.h
//
// Desc: List of standard Quartz event codes and the expected params.
//
// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
// Event codes are broken into two groups
// -- system event codes
// -- extension event codes
// All system event codes are below EC_USER
#define EC_SYSTEMBASE 0x00
#define EC_USER 0x8000
// System-defined event codes
// ==========================
//
// There are three types of system-defined event codes:
//
// 1. Those which are always passed through to the application
// (To be collected by calls to GetEvent or within WaitForCompletion.)
// (e.g. EC_ERRORABORT, EC_USERABORT.)
//
// 2. Those which are pure internal and will never be passed to
// the application. (e.g. EC_SHUTDOWN)
//
// 3. Those which have default handling. Default handing implies that
// the event is not passed to the application. However, default
// handling may be canceled by calling
// IMediaEvent::CancelDefaultHandling. If the default handling is
// cancelled in this way, then the message will be delivered to the
// application and the application must action it appropriately.
// Default handling can be restored by calling RestoreDefaultHandling.
//
// We will refer to these events as application, internal and defaulted
// events respectively.
//
// System-defined events may have interface pointers, BSTR's, etc passed
// as parameters. It is therefore essential that, for any message
// retrieved using GetEvent, a matching call to FreeEventParams is made
// to ensure that relevant interfaces are released and storage freed.
// Failure to call FreeEventParams will result in memory leaks, if not
// worse.
//
// Filters sending these messages to the filter graph should not AddRef()
// any interfaces that they may pass as parameters. The filter graph
// manager will AddRef them if required. E.g. if the event is to be queued
// for the application or queued to a worker thread.
// Each event listed below is immediately followed by a parameter list
// detailing the types of the parameters associated with the message,
// and an indication of whether the message is an application, internal
// or defaulted message. This is then followed by a short description.
// The use of "void" in the parameter list implies that the parameter is not
// used. Such parameters should be zero.
// Other defined EC_ regions:
// DVD event codes 0x0100 - 0x0150 (dvdevcod.h)
// audio device event codes 0x0200 - 0x0250 (audevcod.h)
// WindowsMedia SDK-originated events 0x0251 - 0x0300 (see below)
#define EC_COMPLETE 0x01
// ( HRESULT, void ) : defaulted (special)
// Signals the completed playback of a stream within the graph. This message
// is sent by renderers when they receive end-of-stream. The default handling
// of this message results in a _SINGLE_ EC_COMPLETE being sent to the
// application when ALL of the individual renderers have signaled EC_COMPLETE
// to the filter graph. If the default handing is canceled, the application
// will see all of the individual EC_COMPLETEs.
#define EC_USERABORT 0x02
// ( void, void ) : application
// In some sense, the user has requested that playback be terminated.
// This message is typically sent by renderers that render into a
// window if the user closes the window into which it was rendering.
// It is up to the application to decide if playback should actually
// be stopped.
#define EC_ERRORABORT 0x03
// ( HRESULT, void ) : application
// Operation aborted because of error
#define EC_TIME 0x04
// ( DWORD, DWORD ) : application
// The requested reference time occurred. (This event is currently not used).
// lParam1 is low dword of ref time, lParam2 is high dword of reftime.
#define EC_REPAINT 0x05
// ( IPin * (could be NULL), void ) : defaulted
// A repaint is required - lParam1 contains the (IPin *) that needs the data
// to be sent again. Default handling is: if the output pin which the IPin is
// attached to supports the IMediaEventSink interface then it will be called
// with the EC_REPAINT first. If that fails then normal repaint processing is
// done by the filter graph.
// Stream error notifications
#define EC_STREAM_ERROR_STOPPED 0x06
#define EC_STREAM_ERROR_STILLPLAYING 0x07
// ( HRESULT, DWORD ) : application
// lParam 1 is major code, lParam2 is minor code, either may be zero.
#define EC_ERROR_STILLPLAYING 0x08
// ( HRESULT, void ) : application
// The filter graph manager may issue Run's to the graph asynchronously.
// If such a Run fails, EC_ERROR_STILLPLAYING is issued to notify the
// application of the failure. The state of the underlying filters
// at such a time will be indeterminate - they will all have been asked
// to run, but some are almost certainly not.
#define EC_PALETTE_CHANGED 0x09
// ( void, void ) : application
// notify application that the video palette has changed
#define EC_VIDEO_SIZE_CHANGED 0x0A
// ( DWORD, void ) : application
// Sent by video renderers.
// Notifies the application that the native video size has changed.
// LOWORD of the DWORD is the new width, HIWORD is the new height.
#define EC_QUALITY_CHANGE 0x0B
// ( void, void ) : application
// Notify application that playback degradation has occurred
#define EC_SHUTTING_DOWN 0x0C
// ( void, void ) : internal
// This message is sent by the filter graph manager to any plug-in
// distributors which support IMediaEventSink to notify them that
// the filter graph is starting to shutdown.
#define EC_CLOCK_CHANGED 0x0D
// ( void, void ) : application
// Notify application that the clock has changed.
// (i.e. SetSyncSource has been called on the filter graph and has been
// distributed successfully to the filters in the graph.)
#define EC_PAUSED 0x0E
// ( HRESULT, void ) : application
// Notify application the previous pause request has completed
#define EC_OPENING_FILE 0x10
#define EC_BUFFERING_DATA 0x11
// ( BOOL, void ) : application
// lParam1 == 1 --> starting to open file or buffer data
// lParam1 == 0 --> not opening or buffering any more
// (This event does not appear to be used by ActiveMovie.)
#define EC_FULLSCREEN_LOST 0x12
// ( void, IBaseFilter * ) : application
// Sent by full screen renderers when switched away from full screen.
// IBaseFilter may be NULL.
#define EC_ACTIVATE 0x13
// ( BOOL, IBaseFilter * ) : internal
// Sent by video renderers when they lose or gain activation.
// lParam1 is set to 1 if gained or 0 if lost
// lParam2 is the IBaseFilter* for the filter that is sending the message
// Used for sound follows focus and full-screen switching
#define EC_NEED_RESTART 0x14
// ( void, void ) : defaulted
// Sent by renderers when they regain a resource (e.g. audio renderer).
// Causes a restart by Pause/put_Current/Run (if running).
#define EC_WINDOW_DESTROYED 0x15
// ( IBaseFilter *, void ) : internal
// Sent by video renderers when the window has been destroyed. Handled
// by the filter graph / distributor telling the resource manager.
// lParam1 is the IBaseFilter* of the filter whose window is being destroyed
#define EC_DISPLAY_CHANGED 0x16
// ( IPin *, void ) : internal
// Sent by renderers when they detect a display change. the filter graph
// will arrange for the graph to be stopped and the pin send in lParam1
// to be reconnected. by being reconnected it allows a renderer to reset
// and connect with a more appropriate format for the new display mode
// lParam1 contains an (IPin *) that should be reconnected by the graph
#define EC_STARVATION 0x17
// ( void, void ) : defaulted
// Sent by a filter when it detects starvation. Default handling (only when
// running) is for the graph to be paused until all filters enter the
// paused state and then run. Normally this would be sent by a parser or source
// filter when too little data is arriving.
#define EC_OLE_EVENT 0x18
// ( BSTR, BSTR ) : application
// Sent by a filter to pass a text string to the application.
// Conventionally, the first string is a type, and the second a parameter.
#define EC_NOTIFY_WINDOW 0x19
// ( HWND, void ) : internal
// Pass the window handle around during pin connection.
#define EC_STREAM_CONTROL_STOPPED 0x1A
// ( IPin * pSender, DWORD dwCookie )
// Notification that an earlier call to IAMStreamControl::StopAt
// has now take effect. Calls to the method can be marked
// with a cookie which is passed back in the second parameter,
// allowing applications to easily tie together request
// and completion notifications.
//
// NB: IPin will point to the pin that actioned the Stop. This
// may not be the pin that the StopAt was sent to.
#define EC_STREAM_CONTROL_STARTED 0x1B
// ( IPin * pSender, DWORD dwCookie )
// Notification that an earlier call to IAMStreamControl::StartAt
// has now take effect. Calls to the method can be marked
// with a cookie which is passed back in the second parameter,
// allowing applications to easily tie together request
// and completion notifications.
//
// NB: IPin will point to the pin that actioned the Start. This
// may not be the pin that the StartAt was sent to.
#define EC_END_OF_SEGMENT 0x1C
//
// ( const REFERENCE_TIME *pStreamTimeAtEndOfSegment, DWORD dwSegmentNumber )
//
// pStreamTimeAtEndOfSegment
// pointer to the accumulated stream clock
// time since the start of the segment - this is directly computable
// as the sum of the previous and current segment durations (Stop - Start)
// and the rate applied to each segment
// The source add this time to the time within each segment to get
// a total elapsed time
//
// dwSegmentNumber
// Segment number - starts at 0
//
// Notifies that a segment end has been reached when the
// AM_SEEKING_Segment flags was set for IMediaSeeking::SetPositions
// Passes in an IMediaSeeking interface to allow the next segment
// to be defined by the application
#define EC_SEGMENT_STARTED 0x1D
//
// ( const REFERENCE_TIME *pStreamTimeAtStartOfSegment, DWORD dwSegmentNumber)
//
// pStreamTimeAtStartOfSegment
// pointer to the accumulated stream clock
// time since the start of the segment - this is directly computable
// as the sum of the previous segment durations (Stop - Start)
// and the rate applied to each segment
//
// dwSegmentNumber
// Segment number - starts at 0
//
// Notifies that a new segment has been started.
// This is sent synchronously by any entity that will issue
// EC_END_OF_SEGMENT when a new segment is started
// (See IMediaSeeking::SetPositions - AM_SEEKING_Segment flag)
// It is used to compute how many EC_END_OF_SEGMENT notifications
// to expect at the end of a segment and as a consitency check
#define EC_LENGTH_CHANGED 0x1E
// (void, void)
// sent to indicate that the length of the "file" has changed
#define EC_DEVICE_LOST 0x1f
// (IUnknown, 0)
//
// request window notification when the device is available again
// (through WM_DEVICECHANGED messages registered with
// RegisterDeviceNotification; see IAMDeviceRemoval interface)
#define EC_STEP_COMPLETE 0x24
// (BOOL bCacelled, void)
// Step request complete
// if bCancelled is TRUE the step was cancelled. This can happen
// if the application issued some control request or because there
// was a mode change etc etc
#define EC_SKIP_FRAMES 0x25
// ( nFramesToSkip, void ) : internal
// Get the filter graph to seek accuratley.
#define EC_TIMECODE_AVAILABLE 0x30
// Sent by filter supporting timecode
// Param1 has a pointer to the sending object
// Param2 has the device ID of the sending object
#define EC_EXTDEVICE_MODE_CHANGE 0x31
// Sent by filter supporting IAMExtDevice
// Param1 has the new mode
// Param2 has the device ID of the sending object
#define EC_GRAPH_CHANGED 0x50
// Sent by filter to notify interesting graph changes
#define EC_CLOCK_UNSET 0x51
// ( void, void ) : application
// Used to notify the filter graph to unset the current graph clock.
// Has the affect of forcing the filter graph to reestablish the graph clock
// on the next Pause/Run (note that this is only used by ksproxy, when the pin
// of a clock providing filter is disconnected)
//------------------------------------------
//
// WindowsMedia SDK filter-specific events:
//
#define EC_WMT_EVENT_BASE 0x0251
//
#define EC_WMT_INDEX_EVENT EC_WMT_EVENT_BASE
// WindowsMedia SDK-originated file indexing status, sent by WMSDK-based filters
//
// lParam1 is one of the enum WMT_STATUS messages listed below, sent by the WindowsMedia SDK
// lParam2 is specific to the lParam event
//
// the following WMT_STATUS messages are sent for this event:
// WMT_STARTED - lParam2 is 0
// WMT_CLOSED - lParam2 is 0
// WMT_INDEX_PROGRESS - lParam2 is a DWORD containing the progress percent complete
//
// end WMSDK-originated events
//-----------------------------------------

112
lib/directx8/il21dec.h Executable file
View File

@ -0,0 +1,112 @@
//------------------------------------------------------------------------------
// File: IL21Dec.h
//
// Desc: Line 21 Decoder related definitions and interfaces for ActiveMovie.
//
// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __IL21DEC__
#define __IL21DEC__
//
// Some enum data types used as line 21 decoder params by the interface
//
typedef enum _AM_LINE21_CCLEVEL { // should we use TC1, TC2 in stead?
AM_L21_CCLEVEL_TC2 = 0
} AM_LINE21_CCLEVEL, *PAM_LINE21_CCLEVEL ;
typedef enum _AM_LINE21_CCSERVICE {
AM_L21_CCSERVICE_None = 0,
AM_L21_CCSERVICE_Caption1,
AM_L21_CCSERVICE_Caption2,
AM_L21_CCSERVICE_Text1,
AM_L21_CCSERVICE_Text2,
AM_L21_CCSERVICE_XDS,
AM_L21_CCSERVICE_DefChannel = 10,
AM_L21_CCSERVICE_Invalid
} AM_LINE21_CCSERVICE, *PAM_LINE21_CCSERVICE ;
typedef enum _AM_LINE21_CCSTATE {
AM_L21_CCSTATE_Off = 0,
AM_L21_CCSTATE_On
} AM_LINE21_CCSTATE, *PAM_LINE21_CCSTATE ;
typedef enum _AM_LINE21_CCSTYLE {
AM_L21_CCSTYLE_None = 0,
AM_L21_CCSTYLE_PopOn,
AM_L21_CCSTYLE_PaintOn,
AM_L21_CCSTYLE_RollUp
} AM_LINE21_CCSTYLE, *PAM_LINE21_CCSTYLE ;
typedef enum _AM_LINE21_DRAWBGMODE {
AM_L21_DRAWBGMODE_Opaque,
AM_L21_DRAWBGMODE_Transparent
} AM_LINE21_DRAWBGMODE, *PAM_LINE21_DRAWBGMODE ;
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
//
// Line 21 Decoder standard COM interface
//
DECLARE_INTERFACE_(IAMLine21Decoder, IUnknown)
{
public:
//
// Decoder options to be used by apps
//
// What is the decoder's level
STDMETHOD(GetDecoderLevel)(THIS_ AM_LINE21_CCLEVEL *lpLevel) PURE ;
// supported level value is AM_L21Level_TC2 only
// skipping the SetDecoderLevel( )
// Which of the services is being currently used
STDMETHOD(GetCurrentService)(THIS_ AM_LINE21_CCSERVICE *lpService) PURE ;
STDMETHOD(SetCurrentService)(THIS_ AM_LINE21_CCSERVICE Service) PURE ;
// supported service values are AM_L21Service_Caption1,
// AM_L21Service_Caption2, AM_L21Service_Text1, AM_L21Service_Text2,
// AM_L21Service_XDS, AM_L21Service_None)
// Query/Set the service state (On/Off)
// supported state values are AM_L21State_On and AM_L21State_Off
STDMETHOD(GetServiceState)(THIS_ AM_LINE21_CCSTATE *lpState) PURE ;
STDMETHOD(SetServiceState)(THIS_ AM_LINE21_CCSTATE State) PURE ;
//
// Output options to be used by downstream filters
//
// What size, bitdepth etc should the output video be
STDMETHOD(GetOutputFormat)(THIS_ LPBITMAPINFOHEADER lpbmih) PURE ;
// GetOutputFormat() method, if successful, returns
// 1. S_FALSE if no output format has so far been defined by downstream filters
// 2. S_OK if an output format has already been defined by downstream filters
STDMETHOD(SetOutputFormat)(THIS_ LPBITMAPINFO lpbmi) PURE ;
// Specify physical color to be used in colorkeying the background
// for overlay mixing
STDMETHOD(GetBackgroundColor)(THIS_ DWORD *pdwPhysColor) PURE ;
STDMETHOD(SetBackgroundColor)(THIS_ DWORD dwPhysColor) PURE ;
// Specify if whole output bitmap should be redrawn for each sample
STDMETHOD(GetRedrawAlways)(THIS_ LPBOOL lpbOption) PURE ;
STDMETHOD(SetRedrawAlways)(THIS_ BOOL bOption) PURE ;
// Specify if the caption text background should be opaque/transparent
STDMETHOD(GetDrawBackgroundMode)(THIS_ AM_LINE21_DRAWBGMODE *lpMode) PURE ;
STDMETHOD(SetDrawBackgroundMode)(THIS_ AM_LINE21_DRAWBGMODE Mode) PURE ;
// supported mode values are AM_L21_DrawBGMode_Opaque and
// AM_L21_DrawBGMode_Transparent
} ;
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // __IL21DEC__

5633
lib/directx8/ks.h Executable file

File diff suppressed because it is too large Load Diff

29
lib/directx8/ksguid.h Executable file
View File

@ -0,0 +1,29 @@
/*++
Copyright (C) Microsoft Corporation, 1996 - 1999
Module Name:
ksguid.h
Abstract:
Define guids for non-C++.
--*/
#define INITGUID
#include <guiddef.h>
#if defined( DEFINE_GUIDEX )
#undef DEFINE_GUIDEX
#endif
#define DEFINE_GUIDEX(name) EXTERN_C const CDECL GUID __declspec(selectany) name = { STATICGUIDOF(name) }
#ifndef STATICGUIDOF
#define STATICGUIDOF(guid) STATIC_##guid
#endif // !defined(STATICGUIDOF)
#if !defined( DEFINE_WAVEFORMATEX_GUID )
#define DEFINE_WAVEFORMATEX_GUID(x) (USHORT)(x), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71
#endif

4446
lib/directx8/ksmedia.h Executable file

File diff suppressed because it is too large Load Diff

845
lib/directx8/ksproxy.h Executable file
View File

@ -0,0 +1,845 @@
/*++
Copyright (C) Microsoft Corporation, 1996 - 1999
Module Name:
ksproxy.h
Abstract:
Interface definitions for WDM-CSA proxy filters.
--*/
#ifndef __KSPROXY__
#define __KSPROXY__
#ifdef __cplusplus
extern "C" {
#endif
#undef KSDDKAPI
#ifdef _KSDDK_
#define KSDDKAPI
#else // !_KSDDK_
#define KSDDKAPI DECLSPEC_IMPORT
#endif // _KSDDK_
#define STATIC_IID_IKsObject\
0x423c13a2L, 0x2070, 0x11d0, 0x9e, 0xf7, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1
#define STATIC_IID_IKsPinEx\
0x7bb38260L, 0xd19c, 0x11d2, 0xb3, 0x8a, 0x00, 0xa0, 0xc9, 0x5e, 0xc2, 0x2e
#define STATIC_IID_IKsPin\
0xb61178d1L, 0xa2d9, 0x11cf, 0x9e, 0x53, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1
#define STATIC_IID_IKsPinPipe\
0xe539cd90L, 0xa8b4, 0x11d1, 0x81, 0x89, 0x00, 0xa0, 0xc9, 0x06, 0x28, 0x02
#define STATIC_IID_IKsDataTypeHandler\
0x5ffbaa02L, 0x49a3, 0x11d0, 0x9f, 0x36, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1
#define STATIC_IID_IKsDataTypeCompletion\
0x827D1A0EL, 0x0F73, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
#define STATIC_IID_IKsInterfaceHandler\
0xD3ABC7E0L, 0x9A61, 0x11D0, 0xA4, 0x0D, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
#define STATIC_IID_IKsClockPropertySet\
0x5C5CBD84L, 0xE755, 0x11D0, 0xAC, 0x18, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
#define STATIC_IID_IKsAllocator\
0x8da64899L, 0xc0d9, 0x11d0, 0x84, 0x13, 0x00, 0x00, 0xf8, 0x22, 0xfe, 0x8a
#define STATIC_IID_IKsAllocatorEx\
0x091bb63aL, 0x603f, 0x11d1, 0xb0, 0x67, 0x00, 0xa0, 0xc9, 0x06, 0x28, 0x02
#ifndef STATIC_IID_IKsPropertySet
#define STATIC_IID_IKsPropertySet\
0x31EFAC30L, 0x515C, 0x11d0, 0xA9, 0xAA, 0x00, 0xAA, 0x00, 0x61, 0xBE, 0x93
#endif // STATIC_IID_IKsPropertySet
#define STATIC_IID_IKsTopology\
0x28F54683L, 0x06FD, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
#ifndef STATIC_IID_IKsControl
#define STATIC_IID_IKsControl\
0x28F54685L, 0x06FD, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
#endif // STATIC_IID_IKsControl
#define STATIC_IID_IKsAggregateControl\
0x7F40EAC0L, 0x3947, 0x11D2, 0x87, 0x4E, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
#define STATIC_CLSID_Proxy \
0x17CCA71BL, 0xECD7, 0x11D0, 0xB9, 0x08, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
#ifdef _KS_
#if !defined(__cplusplus) || _MSC_VER < 1100
DEFINE_GUIDEX(IID_IKsObject);
DEFINE_GUIDEX(IID_IKsPin);
DEFINE_GUIDEX(IID_IKsPinEx);
DEFINE_GUIDEX(IID_IKsPinPipe);
DEFINE_GUIDEX(IID_IKsDataTypeHandler);
DEFINE_GUIDEX(IID_IKsDataTypeCompletion);
DEFINE_GUIDEX(IID_IKsInterfaceHandler);
DEFINE_GUIDEX(IID_IKsClockPropertySet);
DEFINE_GUIDEX(IID_IKsAllocator);
DEFINE_GUIDEX(IID_IKsAllocatorEx);
#define IID_IKsQualityForwarder KSCATEGORY_QUALITY
#endif // !defined(__cplusplus) || _MSC_VER < 1100
#define STATIC_IID_IKsQualityForwarder STATIC_KSCATEGORY_QUALITY
typedef enum {
KsAllocatorMode_User,
KsAllocatorMode_Kernel
} KSALLOCATORMODE;
typedef enum {
FramingProp_Uninitialized,
FramingProp_None,
FramingProp_Old,
FramingProp_Ex
} FRAMING_PROP;
typedef FRAMING_PROP *PFRAMING_PROP;
typedef enum {
Framing_Cache_Update, // request to bypass cache when read/write
Framing_Cache_ReadLast,
Framing_Cache_ReadOrig,
Framing_Cache_Write
} FRAMING_CACHE_OPS;
typedef struct {
LONGLONG MinTotalNominator;
LONGLONG MaxTotalNominator;
LONGLONG TotalDenominator;
} OPTIMAL_WEIGHT_TOTALS;
// forward declaration
typedef struct IPin IPin;
typedef struct IKsPin IKsPin;
typedef struct IKsAllocator IKsAllocator;
typedef struct IKsAllocatorEx IKsAllocatorEx;
//
// allocators strategy is defined by graph manager
//
#define AllocatorStrategy_DontCare 0
//
// what to optimize
//
#define AllocatorStrategy_MinimizeNumberOfFrames 0x00000001
#define AllocatorStrategy_MinimizeFrameSize 0x00000002
#define AllocatorStrategy_MinimizeNumberOfAllocators 0x00000004
#define AllocatorStrategy_MaximizeSpeed 0x00000008
//
// factors (flags) defining the Pipes properties
//
#define PipeFactor_None 0
#define PipeFactor_UserModeUpstream 0x00000001
#define PipeFactor_UserModeDownstream 0x00000002
#define PipeFactor_MemoryTypes 0x00000004
#define PipeFactor_Flags 0x00000008
#define PipeFactor_PhysicalRanges 0x00000010
#define PipeFactor_OptimalRanges 0x00000020
#define PipeFactor_FixedCompression 0x00000040
#define PipeFactor_UnknownCompression 0x00000080
#define PipeFactor_Buffers 0x00000100
#define PipeFactor_Align 0x00000200
#define PipeFactor_PhysicalEnd 0x00000400
#define PipeFactor_LogicalEnd 0x00000800
typedef enum {
PipeState_DontCare,
PipeState_RangeNotFixed,
PipeState_RangeFixed,
PipeState_CompressionUnknown,
PipeState_Finalized
} PIPE_STATE;
//
// pipe dimensions relative to BeginPin.
//
typedef struct _PIPE_DIMENSIONS {
KS_COMPRESSION AllocatorPin;
KS_COMPRESSION MaxExpansionPin;
KS_COMPRESSION EndPin;
} PIPE_DIMENSIONS, *PPIPE_DIMENSIONS;
typedef enum {
Pipe_Allocator_None,
Pipe_Allocator_FirstPin,
Pipe_Allocator_LastPin,
Pipe_Allocator_MiddlePin
} PIPE_ALLOCATOR_PLACE;
typedef PIPE_ALLOCATOR_PLACE *PPIPE_ALLOCATOR_PLACE;
typedef enum {
KS_MemoryTypeDontCare = 0,
KS_MemoryTypeKernelPaged,
KS_MemoryTypeKernelNonPaged,
KS_MemoryTypeDeviceHostMapped,
KS_MemoryTypeDeviceSpecific,
KS_MemoryTypeUser,
KS_MemoryTypeAnyHost
} KS_LogicalMemoryType;
typedef KS_LogicalMemoryType *PKS_LogicalMemoryType;
typedef struct _PIPE_TERMINATION {
ULONG Flags;
ULONG OutsideFactors;
ULONG Weigth; // outside weight
KS_FRAMING_RANGE PhysicalRange;
KS_FRAMING_RANGE_WEIGHTED OptimalRange;
KS_COMPRESSION Compression; // relative to the connected pin on a neighboring filter.
} PIPE_TERMINATION;
//
// extended allocator properties
//
typedef struct _ALLOCATOR_PROPERTIES_EX
{
long cBuffers;
long cbBuffer;
long cbAlign;
long cbPrefix;
// new part
GUID MemoryType;
GUID BusType; // one of the buses this pipe is using
PIPE_STATE State;
PIPE_TERMINATION Input;
PIPE_TERMINATION Output;
ULONG Strategy;
ULONG Flags;
ULONG Weight;
KS_LogicalMemoryType LogicalMemoryType;
PIPE_ALLOCATOR_PLACE AllocatorPlace;
PIPE_DIMENSIONS Dimensions;
KS_FRAMING_RANGE PhysicalRange; // on allocator pin
IKsAllocatorEx* PrevSegment; // doubly-linked list of KS allocators
ULONG CountNextSegments; // possible multiple dependent pipes
IKsAllocatorEx** NextSegments;
ULONG InsideFactors; // existing factors (different from "don't care")
ULONG NumberPins;
} ALLOCATOR_PROPERTIES_EX;
typedef ALLOCATOR_PROPERTIES_EX *PALLOCATOR_PROPERTIES_EX;
#ifdef __STREAMS__
struct DECLSPEC_UUID("5C5CBD84-E755-11D0-AC18-00A0C9223196") IKsClockPropertySet;
#undef INTERFACE
#define INTERFACE IKsClockPropertySet
DECLARE_INTERFACE_(IKsClockPropertySet, IUnknown)
{
STDMETHOD(KsGetTime)(
THIS_
LONGLONG* Time
) PURE;
STDMETHOD(KsSetTime)(
THIS_
LONGLONG Time
) PURE;
STDMETHOD(KsGetPhysicalTime)(
THIS_
LONGLONG* Time
) PURE;
STDMETHOD(KsSetPhysicalTime)(
THIS_
LONGLONG Time
) PURE;
STDMETHOD(KsGetCorrelatedTime)(
THIS_
KSCORRELATED_TIME* CorrelatedTime
) PURE;
STDMETHOD(KsSetCorrelatedTime)(
THIS_
KSCORRELATED_TIME* CorrelatedTime
) PURE;
STDMETHOD(KsGetCorrelatedPhysicalTime)(
THIS_
KSCORRELATED_TIME* CorrelatedTime
) PURE;
STDMETHOD(KsSetCorrelatedPhysicalTime)(
THIS_
KSCORRELATED_TIME* CorrelatedTime
) PURE;
STDMETHOD(KsGetResolution)(
THIS_
KSRESOLUTION* Resolution
) PURE;
STDMETHOD(KsGetState)(
THIS_
KSSTATE* State
) PURE;
};
interface DECLSPEC_UUID("8da64899-c0d9-11d0-8413-0000f822fe8a") IKsAllocator;
#undef INTERFACE
#define INTERFACE IKsAllocator
DECLARE_INTERFACE_(IKsAllocator, IUnknown)
{
STDMETHOD_(HANDLE, KsGetAllocatorHandle)(
THIS
) PURE;
STDMETHOD_(KSALLOCATORMODE, KsGetAllocatorMode)(
THIS
) PURE;
STDMETHOD(KsGetAllocatorStatus)(
THIS_
PKSSTREAMALLOCATOR_STATUS AllocatorStatus
) PURE;
STDMETHOD_(VOID, KsSetAllocatorMode)(
THIS_
KSALLOCATORMODE Mode
) PURE;
};
interface DECLSPEC_UUID("091bb63a-603f-11d1-b067-00a0c9062802") IKsAllocatorEx;
#undef INTERFACE
#define INTERFACE IKsAllocatorEx
DECLARE_INTERFACE_(IKsAllocatorEx, IKsAllocator)
{
STDMETHOD_(PALLOCATOR_PROPERTIES_EX, KsGetProperties)(
THIS
) PURE;
STDMETHOD_(VOID, KsSetProperties)(
THIS_
PALLOCATOR_PROPERTIES_EX
) PURE;
STDMETHOD_(VOID, KsSetAllocatorHandle)(
THIS_
HANDLE AllocatorHandle
) PURE;
STDMETHOD_(HANDLE, KsCreateAllocatorAndGetHandle)(
THIS_
IKsPin* KsPin
) PURE;
};
typedef enum {
KsPeekOperation_PeekOnly,
KsPeekOperation_AddRef
} KSPEEKOPERATION;
typedef struct _KSSTREAM_SEGMENT *PKSSTREAM_SEGMENT;
interface DECLSPEC_UUID("b61178d1-a2d9-11cf-9e53-00aa00a216a1") IKsPin;
#undef INTERFACE
#define INTERFACE IKsPin
DECLARE_INTERFACE_(IKsPin, IUnknown)
{
STDMETHOD(KsQueryMediums)(
THIS_
PKSMULTIPLE_ITEM* MediumList
) PURE;
STDMETHOD(KsQueryInterfaces)(
THIS_
PKSMULTIPLE_ITEM* InterfaceList
) PURE;
STDMETHOD(KsCreateSinkPinHandle)(
THIS_
KSPIN_INTERFACE& Interface,
KSPIN_MEDIUM& Medium
) PURE;
STDMETHOD(KsGetCurrentCommunication)(
THIS_
KSPIN_COMMUNICATION *Communication,
KSPIN_INTERFACE *Interface,
KSPIN_MEDIUM *Medium
) PURE;
STDMETHOD(KsPropagateAcquire)(
THIS
) PURE;
STDMETHOD(KsDeliver)(
THIS_
IMediaSample* Sample,
ULONG Flags
) PURE;
STDMETHOD(KsMediaSamplesCompleted)(
THIS_
PKSSTREAM_SEGMENT StreamSegment
) PURE;
STDMETHOD_(IMemAllocator *, KsPeekAllocator)(
THIS_
KSPEEKOPERATION Operation
) PURE;
STDMETHOD(KsReceiveAllocator)(
THIS_
IMemAllocator *MemAllocator
) PURE;
STDMETHOD(KsRenegotiateAllocator)(
THIS
) PURE;
STDMETHOD_(LONG, KsIncrementPendingIoCount)(
THIS
) PURE;
STDMETHOD_(LONG, KsDecrementPendingIoCount)(
THIS
) PURE;
STDMETHOD(KsQualityNotify)(
THIS_
ULONG Proportion,
REFERENCE_TIME TimeDelta
) PURE;
};
interface DECLSPEC_UUID("7bb38260-d19c-11d2-b38a-00a0c95ec22e") IKsPinEx;
#undef INTERFACE
#define INTERFACE IKsPinEx
DECLARE_INTERFACE_(IKsPinEx, IKsPin)
{
STDMETHOD_(VOID, KsNotifyError)(
THIS_
IMediaSample* Sample,
HRESULT hr
) PURE;
};
interface DECLSPEC_UUID("e539cd90-a8b4-11d1-8189-00a0c9062802") IKsPinPipe;
#undef INTERFACE
#define INTERFACE IKsPinPipe
DECLARE_INTERFACE_(IKsPinPipe, IUnknown)
{
STDMETHOD(KsGetPinFramingCache)(
THIS_
PKSALLOCATOR_FRAMING_EX *FramingEx,
PFRAMING_PROP FramingProp,
FRAMING_CACHE_OPS Option
) PURE;
STDMETHOD(KsSetPinFramingCache)(
THIS_
PKSALLOCATOR_FRAMING_EX FramingEx,
PFRAMING_PROP FramingProp,
FRAMING_CACHE_OPS Option
) PURE;
STDMETHOD_(IPin*, KsGetConnectedPin)(
THIS
) PURE;
STDMETHOD_(IKsAllocatorEx*, KsGetPipe)(
THIS_
KSPEEKOPERATION Operation
) PURE;
STDMETHOD(KsSetPipe)(
THIS_
IKsAllocatorEx *KsAllocator
) PURE;
STDMETHOD_(ULONG, KsGetPipeAllocatorFlag)(
THIS
) PURE;
STDMETHOD(KsSetPipeAllocatorFlag)(
THIS_
ULONG Flag
) PURE;
STDMETHOD_(GUID, KsGetPinBusCache)(
THIS
) PURE;
STDMETHOD(KsSetPinBusCache)(
THIS_
GUID Bus
) PURE;
//
// very useful methods for tracing.
//
STDMETHOD_(PWCHAR, KsGetPinName)(
THIS
) PURE;
STDMETHOD_(PWCHAR, KsGetFilterName)(
THIS
) PURE;
};
interface DECLSPEC_UUID("CD5EBE6B-8B6E-11D1-8AE0-00A0C9223196") IKsPinFactory;
#undef INTERFACE
#define INTERFACE IKsPinFactory
DECLARE_INTERFACE_(IKsPinFactory, IUnknown)
{
STDMETHOD(KsPinFactory)(
THIS_
ULONG* PinFactory
) PURE;
};
typedef enum {
KsIoOperation_Write,
KsIoOperation_Read
} KSIOOPERATION;
interface DECLSPEC_UUID("5ffbaa02-49a3-11d0-9f36-00aa00a216a1") IKsDataTypeHandler;
#undef INTERFACE
#define INTERFACE IKsDataTypeHandler
DECLARE_INTERFACE_(IKsDataTypeHandler, IUnknown)
{
STDMETHOD(KsCompleteIoOperation)(
THIS_
IMediaSample *Sample,
PVOID StreamHeader,
KSIOOPERATION IoOperation,
BOOL Cancelled
) PURE;
STDMETHOD(KsIsMediaTypeInRanges)(
THIS_
PVOID DataRanges
) PURE;
STDMETHOD(KsPrepareIoOperation)(
THIS_
IMediaSample *Sample,
PVOID StreamHeader,
KSIOOPERATION IoOperation
) PURE;
STDMETHOD(KsQueryExtendedSize)(
THIS_
ULONG* ExtendedSize
) PURE;
STDMETHOD(KsSetMediaType)(
THIS_
const AM_MEDIA_TYPE* AmMediaType
) PURE;
};
interface DECLSPEC_UUID("827D1A0E-0F73-11D2-B27A-00A0C9223196") IKsDataTypeCompletion;
#undef INTERFACE
#define INTERFACE IKsDataTypeCompletion
DECLARE_INTERFACE_(IKsDataTypeCompletion, IUnknown)
{
STDMETHOD(KsCompleteMediaType)(
THIS_
HANDLE FilterHandle,
ULONG PinFactoryId,
AM_MEDIA_TYPE* AmMediaType
) PURE;
};
interface DECLSPEC_UUID("D3ABC7E0-9A61-11d0-A40D-00A0C9223196") IKsInterfaceHandler;
#undef INTERFACE
#define INTERFACE IKsInterfaceHandler
DECLARE_INTERFACE_(IKsInterfaceHandler, IUnknown)
{
STDMETHOD(KsSetPin)(
THIS_
IKsPin *KsPin
) PURE;
STDMETHOD(KsProcessMediaSamples)(
THIS_
IKsDataTypeHandler *KsDataTypeHandler,
IMediaSample** SampleList,
PLONG SampleCount,
KSIOOPERATION IoOperation,
PKSSTREAM_SEGMENT *StreamSegment
) PURE;
STDMETHOD(KsCompleteIo)(
THIS_
PKSSTREAM_SEGMENT StreamSegment
) PURE;
};
//
// This structure definition is the common header required by the proxy to
// dispatch the stream segment to the interface handler. Interface handlers
// will create extended structures to include other information such as
// media samples, extended header size and so on.
//
typedef struct _KSSTREAM_SEGMENT {
IKsInterfaceHandler *KsInterfaceHandler;
IKsDataTypeHandler *KsDataTypeHandler;
KSIOOPERATION IoOperation;
HANDLE CompletionEvent;
} KSSTREAM_SEGMENT;
interface DECLSPEC_UUID("423c13a2-2070-11d0-9ef7-00aa00a216a1") IKsObject;
#undef INTERFACE
#define INTERFACE IKsObject
DECLARE_INTERFACE_(IKsObject, IUnknown)
{
STDMETHOD_(HANDLE, KsGetObjectHandle)(
THIS
) PURE;
};
interface DECLSPEC_UUID("97ebaacb-95bd-11d0-a3ea-00a0c9223196") IKsQualityForwarder;
#undef INTERFACE
#define INTERFACE IKsQualityForwarder
DECLARE_INTERFACE_(IKsQualityForwarder, IKsObject)
{
STDMETHOD_(VOID, KsFlushClient)(
THIS_
IKsPin* Pin
) PURE;
};
KSDDKAPI
HRESULT
WINAPI
KsResolveRequiredAttributes(
PKSDATARANGE DataRange,
PKSMULTIPLE_ITEM Attributes OPTIONAL
);
KSDDKAPI
HRESULT
WINAPI
KsOpenDefaultDevice(
REFGUID Category,
ACCESS_MASK Access,
PHANDLE DeviceHandle
);
KSDDKAPI
HRESULT
WINAPI
KsSynchronousDeviceControl(
HANDLE Handle,
ULONG IoControl,
PVOID InBuffer,
ULONG InLength,
PVOID OutBuffer,
ULONG OutLength,
PULONG BytesReturned
);
KSDDKAPI
HRESULT
WINAPI
KsGetMultiplePinFactoryItems(
HANDLE FilterHandle,
ULONG PinFactoryId,
ULONG PropertyId,
PVOID* Items
);
KSDDKAPI
HRESULT
WINAPI
KsGetMediaTypeCount(
HANDLE FilterHandle,
ULONG PinFactoryId,
ULONG* MediaTypeCount
);
KSDDKAPI
HRESULT
WINAPI
KsGetMediaType(
int Position,
AM_MEDIA_TYPE* AmMediaType,
HANDLE FilterHandle,
ULONG PinFactoryId
);
#endif // __STREAMS__
#ifndef _IKsPropertySet_
#if !defined(__cplusplus) || _MSC_VER < 1100
DEFINE_GUIDEX(IID_IKsPropertySet);
#endif // !defined(__cplusplus) || _MSC_VER < 1100
#endif // _IKsPropertySet_
#ifndef _IKsControl_
#if !defined(__cplusplus) || _MSC_VER < 1100
DEFINE_GUIDEX(IID_IKsControl);
#endif // !defined(__cplusplus) || _MSC_VER < 1100
#endif // _IKsControl_
#if !defined(__cplusplus) || _MSC_VER < 1100
DEFINE_GUIDEX(IID_IKsAggregateControl);
#endif // !defined(__cplusplus) || _MSC_VER < 1100
#ifndef _IKsTopology_
#if !defined(__cplusplus) || _MSC_VER < 1100
DEFINE_GUIDEX(IID_IKsTopology);
#endif // !defined(__cplusplus) || _MSC_VER < 1100
#endif // _IKsTopology_
DEFINE_GUIDSTRUCT("17CCA71B-ECD7-11D0-B908-00A0C9223196", CLSID_Proxy);
#define CLSID_Proxy DEFINE_GUIDNAMED(CLSID_Proxy)
#else // !_KS_
#ifndef _IKsPropertySet_
#if !defined(__cplusplus) || _MSC_VER < 1100
DEFINE_GUID(IID_IKsPropertySet, STATIC_IID_IKsPropertySet);
#endif // !defined(__cplusplus) || _MSC_VER < 1100
#endif // _IKsPropertySet_
#if !defined(__cplusplus) || _MSC_VER < 1100
DEFINE_GUID(CLSID_Proxy, STATIC_CLSID_Proxy);
#else // defined(__cplusplus) && _MSC_VER >= 1100
DECLSPEC_UUID("17CCA71B-ECD7-11D0-B908-00A0C9223196") CLSID_Proxy;
#endif // defined(__cplusplus) && _MSC_VER >= 1100
#endif // !_KS_
#ifndef _IKsPropertySet_
#define _IKsPropertySet_
#define KSPROPERTY_SUPPORT_GET 1
#define KSPROPERTY_SUPPORT_SET 2
#ifdef DECLARE_INTERFACE_
interface DECLSPEC_UUID("31EFAC30-515C-11d0-A9AA-00aa0061be93") IKsPropertySet;
#undef INTERFACE
#define INTERFACE IKsPropertySet
DECLARE_INTERFACE_(IKsPropertySet, IUnknown)
{
STDMETHOD(Set)(
THIS_
IN REFGUID PropSet,
IN ULONG Id,
IN LPVOID InstanceData,
IN ULONG InstanceLength,
IN LPVOID PropertyData,
IN ULONG DataLength
) PURE;
STDMETHOD(Get)(
THIS_
IN REFGUID PropSet,
IN ULONG Id,
IN LPVOID InstanceData,
IN ULONG InstanceLength,
OUT LPVOID PropertyData,
IN ULONG DataLength,
OUT ULONG* BytesReturned
) PURE;
STDMETHOD(QuerySupported)(
THIS_
IN REFGUID PropSet,
IN ULONG Id,
OUT ULONG* TypeSupport
) PURE;
};
#endif // DECLARE_INTERFACE_
#endif // _IKsPropertySet_
#ifndef _IKsControl_
#define _IKsControl_
#ifdef DECLARE_INTERFACE_
interface DECLSPEC_UUID("28F54685-06FD-11D2-B27A-00A0C9223196") IKsControl;
#undef INTERFACE
#define INTERFACE IKsControl
DECLARE_INTERFACE_(IKsControl, IUnknown)
{
STDMETHOD(KsProperty)(
THIS_
IN PKSPROPERTY Property,
IN ULONG PropertyLength,
IN OUT LPVOID PropertyData,
IN ULONG DataLength,
OUT ULONG* BytesReturned
) PURE;
STDMETHOD(KsMethod)(
THIS_
IN PKSMETHOD Method,
IN ULONG MethodLength,
IN OUT LPVOID MethodData,
IN ULONG DataLength,
OUT ULONG* BytesReturned
) PURE;
STDMETHOD(KsEvent)(
THIS_
IN PKSEVENT Event OPTIONAL,
IN ULONG EventLength,
IN OUT LPVOID EventData,
IN ULONG DataLength,
OUT ULONG* BytesReturned
) PURE;
};
#endif // DECLARE_INTERFACE_
#endif // _IKsControl_
#ifdef DECLARE_INTERFACE_
interface DECLSPEC_UUID("7F40EAC0-3947-11D2-874E-00A0C9223196") IKsAggregateControl;
#undef INTERFACE
#define INTERFACE IKsAggregateControl
DECLARE_INTERFACE_(IKsAggregateControl, IUnknown)
{
STDMETHOD(KsAddAggregate)(
THIS_
IN REFGUID AggregateClass
) PURE;
STDMETHOD(KsRemoveAggregate)(
THIS_
IN REFGUID AggregateClass
) PURE;
};
#endif // DECLARE_INTERFACE_
#ifndef _IKsTopology_
#define _IKsTopology_
#ifdef DECLARE_INTERFACE_
interface DECLSPEC_UUID("28F54683-06FD-11D2-B27A-00A0C9223196") IKsTopology;
#undef INTERFACE
#define INTERFACE IKsTopology
DECLARE_INTERFACE_(IKsTopology, IUnknown)
{
STDMETHOD(CreateNodeInstance)(
THIS_
IN ULONG NodeId,
IN ULONG Flags,
IN ACCESS_MASK DesiredAccess,
IN IUnknown* UnkOuter OPTIONAL,
IN REFGUID InterfaceId,
OUT LPVOID* Interface
) PURE;
};
#endif // DECLARE_INTERFACE_
#endif // _IKsTopology_
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // __KSPROXY__

224
lib/directx8/ksuuids.h Executable file
View File

@ -0,0 +1,224 @@
//------------------------------------------------------------------------------
// File: ksuuids.h
//
// Desc: Contains the GUIDs for the MediaType type, subtype fields and format
// types for DVD/MPEG2 media types.
//
// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
//
// --- MPEG 2 definitions ---
//
// 36523B13-8EE5-11d1-8CA3-0060B057664A
OUR_GUID_ENTRY(MEDIATYPE_MPEG2_PACK,
0x36523B13, 0x8EE5, 0x11d1, 0x8C, 0xA3, 0x00, 0x60, 0xB0, 0x57, 0x66, 0x4A)
// e06d8020-db46-11cf-b4d1-00805f6cbbea
OUR_GUID_ENTRY(MEDIATYPE_MPEG2_PES,
0xe06d8020, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea)
#if 0
DEFINE_GUID(MEDIATYPE_CONTROL,
0xe06d8021, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea);
#endif // #if 0
// e06d8026-db46-11cf-b4d1-00805f6cbbea
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_VIDEO,
0xe06d8026, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea)
// use MPEG2VIDEOINFO (defined below) with FORMAT_MPEG2_VIDEO
// e06d80e3-db46-11cf-b4d1-00805f6cbbea
OUR_GUID_ENTRY(FORMAT_MPEG2_VIDEO,
0xe06d80e3, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea)
// F72A76A0-EB0A-11d0-ACE4-0000C0CC16BA (FORMAT_VideoInfo2)
OUR_GUID_ENTRY(FORMAT_VIDEOINFO2,
0xf72a76A0L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba)
// MPEG2 Other subtypes
// e06d8022-db46-11cf-b4d1-00805f6cbbea
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_PROGRAM,
0xe06d8022, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea)
// e06d8023-db46-11cf-b4d1-00805f6cbbea
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_TRANSPORT,
0xe06d8023, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea)
// e06d802b-db46-11cf-b4d1-00805f6cbbea
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_AUDIO,
0xe06d802b, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea)
// e06d802c-db46-11cf-b4d1-00805f6cbbea
OUR_GUID_ENTRY(MEDIASUBTYPE_DOLBY_AC3,
0xe06d802c, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea)
// e06d802d-db46-11cf-b4d1-00805f6cbbea
OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_SUBPICTURE,
0xe06d802d, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea)
// e06d8032-db46-11cf-b4d1-00805f6cbbea
OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_LPCM_AUDIO,
0xe06d8032, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea)
// e06d8033-db46-11cf-b4d1-00805f6cbbea
OUR_GUID_ENTRY(MEDIASUBTYPE_DTS,
0xe06d8033, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea)
// e06d8034-db46-11cf-b4d1-00805f6cbbea
OUR_GUID_ENTRY(MEDIASUBTYPE_SDDS,
0xe06d8034, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea)
// DVD-related mediatypes
// ED0B916A-044D-11d1-AA78-00C04FC31D60
OUR_GUID_ENTRY(MEDIATYPE_DVD_ENCRYPTED_PACK,
0xed0b916a, 0x044d, 0x11d1, 0xaa, 0x78, 0x00, 0xc0, 0x04f, 0xc3, 0x1d, 0x60)
// e06d802e-db46-11cf-b4d1-00805f6cbbea
OUR_GUID_ENTRY(MEDIATYPE_DVD_NAVIGATION,
0xe06d802e, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea)
// e06d802f-db46-11cf-b4d1-00805f6cbbea
OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_NAVIGATION_PCI,
0xe06d802f, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea)
// e06d8030-db46-11cf-b4d1-00805f6cbbea
OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_NAVIGATION_DSI,
0xe06d8030, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea)
// e06d8031-db46-11cf-b4d1-00805f6cbbea
OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_NAVIGATION_PROVIDER,
0xe06d8031, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea)
//
// DVD - MPEG2/AC3-related Formats
//
// e06d80e3-db46-11cf-b4d1-00805f6cbbea
OUR_GUID_ENTRY(FORMAT_MPEG2Video,
0xe06d80e3, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea)
// e06d80e4-db46-11cf-b4d1-00805f6cbbea
OUR_GUID_ENTRY(FORMAT_DolbyAC3,
0xe06d80e4, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea)
// e06d80e5-db46-11cf-b4d1-00805f6cbbea
OUR_GUID_ENTRY(FORMAT_MPEG2Audio,
0xe06d80e5, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea)
// e06d80e6-db46-11cf-b4d1-00805f6cbbea
OUR_GUID_ENTRY(FORMAT_DVD_LPCMAudio,
0xe06d80e6, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea)
//
// KS Property Set Id (to communicate with the WDM Proxy filter) -- from
// ksmedia.h of WDM DDK.
//
// BFABE720-6E1F-11D0-BCF2-444553540000
OUR_GUID_ENTRY(AM_KSPROPSETID_AC3,
0xBFABE720, 0x6E1F, 0x11D0, 0xBC, 0xF2, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00)
// ac390460-43af-11d0-bd6a-003505c103a9
OUR_GUID_ENTRY(AM_KSPROPSETID_DvdSubPic,
0xac390460, 0x43af, 0x11d0, 0xbd, 0x6a, 0x00, 0x35, 0x05, 0xc1, 0x03, 0xa9)
// 0E8A0A40L-6AEF-11D0-9ED0-00A024CA19B3
OUR_GUID_ENTRY(AM_KSPROPSETID_CopyProt,
0x0E8A0A40, 0x6AEF, 0x11D0, 0x9E, 0xD0, 0x00, 0xA0, 0x24, 0xCA, 0x19, 0xB3)
// A503C5C0-1D1D-11d1-AD80-444553540000
OUR_GUID_ENTRY(AM_KSPROPSETID_TSRateChange,
0xa503c5c0, 0x1d1d, 0x11d1, 0xad, 0x80, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0)
// 3577EB09-9582-477f-B29C-B0C452A4FF9A
OUR_GUID_ENTRY(AM_KSPROPSETID_DVD_RateChange,
0x3577eb09, 0x9582, 0x477f, 0xb2, 0x9c, 0xb0, 0xc4, 0x52, 0xa4, 0xff, 0x9a)
// ae4720ae-aa71-42d8-b82a-fffdf58b76fd
OUR_GUID_ENTRY(AM_KSPROPSETID_DvdKaraoke,
0xae4720ae, 0xaa71, 0x42d8, 0xb8, 0x2a, 0xff, 0xfd, 0xf5, 0x8b, 0x76, 0xfd)
// c830acbd-ab07-492f-8852-45b6987c2979
OUR_GUID_ENTRY(AM_KSPROPSETID_FrameStep,
0xc830acbd, 0xab07, 0x492f, 0x88, 0x52, 0x45, 0xb6, 0x98, 0x7c, 0x29, 0x79)
//
// KS categories from ks.h and ksmedia.h
//
//
// 65E8773D-8F56-11D0-A3B9-00A0C9223196
OUR_GUID_ENTRY(AM_KSCATEGORY_CAPTURE,
0x65E8773DL, 0x8F56, 0x11D0, 0xA3, 0xB9, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96)
// 65E8773E-8F56-11D0-A3B9-00A0C9223196
OUR_GUID_ENTRY(AM_KSCATEGORY_RENDER,
0x65E8773EL, 0x8F56, 0x11D0, 0xA3, 0xB9, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96)
// 1E84C900-7E70-11D0-A5D6-28DB04C10000
OUR_GUID_ENTRY(AM_KSCATEGORY_DATACOMPRESSOR,
0x1E84C900L, 0x7E70, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00)
// 6994AD04-93EF-11D0-A3CC-00A0C9223196
OUR_GUID_ENTRY(AM_KSCATEGORY_AUDIO,
0x6994AD04L, 0x93EF, 0x11D0, 0xA3, 0xCC, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96)
// 6994AD05-93EF-11D0-A3CC-00A0C9223196
OUR_GUID_ENTRY(AM_KSCATEGORY_VIDEO,
0x6994AD05L, 0x93EF, 0x11D0, 0xA3, 0xCC, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96)
// a799a800-a46d-11d0-a18c-00a02401dcd4
OUR_GUID_ENTRY(AM_KSCATEGORY_TVTUNER,
0xa799a800L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4)
// a799a801-a46d-11d0-a18c-00a02401dcd4
OUR_GUID_ENTRY(AM_KSCATEGORY_CROSSBAR,
0xa799a801L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4)
// a799a802-a46d-11d0-a18c-00a02401dcd4
OUR_GUID_ENTRY(AM_KSCATEGORY_TVAUDIO,
0xa799a802L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4)
// 07dad660L-22f1-11d1-a9f4-00c04fbbde8f
OUR_GUID_ENTRY(AM_KSCATEGORY_VBICODEC,
0x07dad660L, 0x22f1, 0x11d1, 0xa9, 0xf4, 0x00, 0xc0, 0x4f, 0xbb, 0xde, 0x8f)
// 0A4252A0L-7E70-11D0-A5D6-28DB04C10000
OUR_GUID_ENTRY(AM_KSCATEGORY_SPLITTER,
0x0A4252A0L, 0x7E70, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00)
//
// guids needed to support IKsPin interface
//
// d3abc7e0l-9a61-11d0-a40d00a0c9223196
OUR_GUID_ENTRY(IID_IKsInterfaceHandler,
0xD3ABC7E0L, 0x9A61, 0x11D0, 0xA4, 0x0D, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96)
// 5ffbaa02l-49a3-11d0-9f3600aa00a216a1
OUR_GUID_ENTRY(IID_IKsDataTypeHandler,
0x5FFBAA02L, 0x49A3, 0x11D0, 0x9F, 0x36, 0x00, 0xAA, 0x00, 0xA2, 0x16, 0xA1)
// b61178d1-a2d9-11cf-9e53-00aa00a216a1
OUR_GUID_ENTRY(IID_IKsPin,
0xb61178d1L, 0xa2d9, 0x11cf, 0x9e, 0x53, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1)
// 28F54685-06FD-11D2-B27A-00A0C9223196
OUR_GUID_ENTRY(IID_IKsControl,
0x28F54685L, 0x06FD, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96)
// CD5EBE6B-8B6E-11D1-8AE0-00A0C9223196
OUR_GUID_ENTRY(IID_IKsPinFactory,
0xCD5EBE6BL, 0x8B6E, 0x11D1, 0x8A, 0xE0, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96)
// 1A8766A0-62CE-11CF-A5D6-28DB04C10000
OUR_GUID_ENTRY(AM_INTERFACESETID_Standard,
0x1A8766A0L, 0x62CE, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00)

20
lib/directx8/mediaerr.h Executable file
View File

@ -0,0 +1,20 @@
//------------------------------------------------------------------------------
// File: MediaErr.h
//
// Desc: Shell error codes
//
// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#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
#endif _MEDIAERR_H_

1574
lib/directx8/mediaobj.h Executable file

File diff suppressed because it is too large Load Diff

581
lib/directx8/medparam.h Executable file
View File

@ -0,0 +1,581 @@
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 6.00.0338 */
/* Compiler settings for medparam.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
//@@MIDL_FILE_HEADING( )
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __medparam_h__
#define __medparam_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __IMediaParamInfo_FWD_DEFINED__
#define __IMediaParamInfo_FWD_DEFINED__
typedef interface IMediaParamInfo IMediaParamInfo;
#endif /* __IMediaParamInfo_FWD_DEFINED__ */
#ifndef __IMediaParams_FWD_DEFINED__
#define __IMediaParams_FWD_DEFINED__
typedef interface IMediaParams IMediaParams;
#endif /* __IMediaParams_FWD_DEFINED__ */
/* header files for imported files */
#include "oaidl.h"
#include "ocidl.h"
#include "strmif.h"
#ifdef __cplusplus
extern "C"{
#endif
void * __RPC_USER MIDL_user_allocate(size_t);
void __RPC_USER MIDL_user_free( void * );
/* interface __MIDL_itf_medparam_0000 */
/* [local] */
typedef float MP_DATA;
typedef
enum _MP_Type
{ MPT_INT = 0,
MPT_FLOAT = MPT_INT + 1,
MPT_BOOL = MPT_FLOAT + 1,
MPT_ENUM = MPT_BOOL + 1,
MPT_MAX = MPT_ENUM + 1
} MP_TYPE;
#define MPBOOL_TRUE ( 1 )
#define MPBOOL_FALSE ( 0 )
typedef
enum _MP_CURVE_TYPE
{ MP_CURVE_JUMP = 0x1,
MP_CURVE_LINEAR = 0x2,
MP_CURVE_SQUARE = 0x4,
MP_CURVE_INVSQUARE = 0x8,
MP_CURVE_SINE = 0x10
} MP_CURVE_TYPE;
typedef DWORD MP_CAPS;
#define MP_CAPS_CURVE_JUMP ( MP_CURVE_JUMP )
#define MP_CAPS_CURVE_LINEAR ( MP_CURVE_LINEAR )
#define MP_CAPS_CURVE_SQUARE ( MP_CURVE_SQUARE )
#define MP_CAPS_CURVE_INVSQUARE ( MP_CURVE_INVSQUARE )
#define MP_CAPS_CURVE_SINE ( MP_CURVE_SINE )
typedef struct _MP_PARAMINFO
{
MP_TYPE mpType;
MP_CAPS mopCaps;
MP_DATA mpdMinValue;
MP_DATA mpdMaxValue;
MP_DATA mpdNeutralValue;
WCHAR szUnitText[ 32 ];
WCHAR szLabel[ 32 ];
} MP_PARAMINFO;
typedef DWORD DWORD;
#define DWORD_ALLPARAMS ( -1 )
typedef DWORD MP_TIMEDATA;
DEFINE_GUID(GUID_TIME_REFERENCE,
0x93ad712b, 0xdaa0, 0x4ffe, 0xbc, 0x81, 0xb0, 0xce, 0x50, 0xf, 0xcd, 0xd9);
DEFINE_GUID(GUID_TIME_MUSIC,
0x574c49d, 0x5b04, 0x4b15, 0xa5, 0x42, 0xae, 0x28, 0x20, 0x30, 0x11, 0x7b);
DEFINE_GUID(GUID_TIME_SAMPLES,
0xa8593d05, 0xc43, 0x4984, 0x9a, 0x63, 0x97, 0xaf, 0x9e, 0x2, 0xc4, 0xc0);
typedef DWORD MP_FLAGS;
#define MPF_ENVLP_STANDARD ( 0 )
#define MPF_ENVLP_BEGIN_CURRENTVAL ( 0x1 )
#define MPF_ENVLP_BEGIN_NEUTRALVAL ( 0x2 )
typedef struct _MP_ENVELOPE_SEGMENT
{
REFERENCE_TIME rtStart;
REFERENCE_TIME rtEnd;
MP_DATA valStart;
MP_DATA valEnd;
MP_CURVE_TYPE iCurve;
MP_FLAGS flags;
} MP_ENVELOPE_SEGMENT;
#define MPF_PUNCHIN_REFTIME ( 0 )
#define MPF_PUNCHIN_NOW ( 0x1 )
#define MPF_PUNCHIN_STOPPED ( 0x2 )
extern RPC_IF_HANDLE __MIDL_itf_medparam_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_medparam_0000_v0_0_s_ifspec;
#ifndef __IMediaParamInfo_INTERFACE_DEFINED__
#define __IMediaParamInfo_INTERFACE_DEFINED__
/* interface IMediaParamInfo */
/* [version][uuid][object] */
EXTERN_C const IID IID_IMediaParamInfo;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("6d6cbb60-a223-44aa-842f-a2f06750be6d")
IMediaParamInfo : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetParamCount(
/* [out] */ DWORD *pdwParams) = 0;
virtual HRESULT STDMETHODCALLTYPE GetParamInfo(
/* [in] */ DWORD dwParamIndex,
/* [out] */ MP_PARAMINFO *pInfo) = 0;
virtual HRESULT STDMETHODCALLTYPE GetParamText(
/* [in] */ DWORD dwParamIndex,
/* [out] */ WCHAR **ppwchText) = 0;
virtual HRESULT STDMETHODCALLTYPE GetNumTimeFormats(
/* [out] */ DWORD *pdwNumTimeFormats) = 0;
virtual HRESULT STDMETHODCALLTYPE GetSupportedTimeFormat(
/* [in] */ DWORD dwFormatIndex,
/* [out] */ GUID *pguidTimeFormat) = 0;
virtual HRESULT STDMETHODCALLTYPE GetCurrentTimeFormat(
/* [out] */ GUID *pguidTimeFormat,
/* [out] */ MP_TIMEDATA *pTimeData) = 0;
};
#else /* C style interface */
typedef struct IMediaParamInfoVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IMediaParamInfo * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IMediaParamInfo * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IMediaParamInfo * This);
HRESULT ( STDMETHODCALLTYPE *GetParamCount )(
IMediaParamInfo * This,
/* [out] */ DWORD *pdwParams);
HRESULT ( STDMETHODCALLTYPE *GetParamInfo )(
IMediaParamInfo * This,
/* [in] */ DWORD dwParamIndex,
/* [out] */ MP_PARAMINFO *pInfo);
HRESULT ( STDMETHODCALLTYPE *GetParamText )(
IMediaParamInfo * This,
/* [in] */ DWORD dwParamIndex,
/* [out] */ WCHAR **ppwchText);
HRESULT ( STDMETHODCALLTYPE *GetNumTimeFormats )(
IMediaParamInfo * This,
/* [out] */ DWORD *pdwNumTimeFormats);
HRESULT ( STDMETHODCALLTYPE *GetSupportedTimeFormat )(
IMediaParamInfo * This,
/* [in] */ DWORD dwFormatIndex,
/* [out] */ GUID *pguidTimeFormat);
HRESULT ( STDMETHODCALLTYPE *GetCurrentTimeFormat )(
IMediaParamInfo * This,
/* [out] */ GUID *pguidTimeFormat,
/* [out] */ MP_TIMEDATA *pTimeData);
END_INTERFACE
} IMediaParamInfoVtbl;
interface IMediaParamInfo
{
CONST_VTBL struct IMediaParamInfoVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IMediaParamInfo_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IMediaParamInfo_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IMediaParamInfo_Release(This) \
(This)->lpVtbl -> Release(This)
#define IMediaParamInfo_GetParamCount(This,pdwParams) \
(This)->lpVtbl -> GetParamCount(This,pdwParams)
#define IMediaParamInfo_GetParamInfo(This,dwParamIndex,pInfo) \
(This)->lpVtbl -> GetParamInfo(This,dwParamIndex,pInfo)
#define IMediaParamInfo_GetParamText(This,dwParamIndex,ppwchText) \
(This)->lpVtbl -> GetParamText(This,dwParamIndex,ppwchText)
#define IMediaParamInfo_GetNumTimeFormats(This,pdwNumTimeFormats) \
(This)->lpVtbl -> GetNumTimeFormats(This,pdwNumTimeFormats)
#define IMediaParamInfo_GetSupportedTimeFormat(This,dwFormatIndex,pguidTimeFormat) \
(This)->lpVtbl -> GetSupportedTimeFormat(This,dwFormatIndex,pguidTimeFormat)
#define IMediaParamInfo_GetCurrentTimeFormat(This,pguidTimeFormat,pTimeData) \
(This)->lpVtbl -> GetCurrentTimeFormat(This,pguidTimeFormat,pTimeData)
#endif /* COBJMACROS */
#endif /* C style interface */
HRESULT STDMETHODCALLTYPE IMediaParamInfo_GetParamCount_Proxy(
IMediaParamInfo * This,
/* [out] */ DWORD *pdwParams);
void __RPC_STUB IMediaParamInfo_GetParamCount_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMediaParamInfo_GetParamInfo_Proxy(
IMediaParamInfo * This,
/* [in] */ DWORD dwParamIndex,
/* [out] */ MP_PARAMINFO *pInfo);
void __RPC_STUB IMediaParamInfo_GetParamInfo_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMediaParamInfo_GetParamText_Proxy(
IMediaParamInfo * This,
/* [in] */ DWORD dwParamIndex,
/* [out] */ WCHAR **ppwchText);
void __RPC_STUB IMediaParamInfo_GetParamText_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMediaParamInfo_GetNumTimeFormats_Proxy(
IMediaParamInfo * This,
/* [out] */ DWORD *pdwNumTimeFormats);
void __RPC_STUB IMediaParamInfo_GetNumTimeFormats_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMediaParamInfo_GetSupportedTimeFormat_Proxy(
IMediaParamInfo * This,
/* [in] */ DWORD dwFormatIndex,
/* [out] */ GUID *pguidTimeFormat);
void __RPC_STUB IMediaParamInfo_GetSupportedTimeFormat_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMediaParamInfo_GetCurrentTimeFormat_Proxy(
IMediaParamInfo * This,
/* [out] */ GUID *pguidTimeFormat,
/* [out] */ MP_TIMEDATA *pTimeData);
void __RPC_STUB IMediaParamInfo_GetCurrentTimeFormat_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IMediaParamInfo_INTERFACE_DEFINED__ */
#ifndef __IMediaParams_INTERFACE_DEFINED__
#define __IMediaParams_INTERFACE_DEFINED__
/* interface IMediaParams */
/* [version][uuid][object] */
EXTERN_C const IID IID_IMediaParams;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("6d6cbb61-a223-44aa-842f-a2f06750be6e")
IMediaParams : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetParam(
/* [in] */ DWORD dwParamIndex,
/* [out] */ MP_DATA *pValue) = 0;
virtual HRESULT STDMETHODCALLTYPE SetParam(
/* [in] */ DWORD dwParamIndex,
/* [in] */ MP_DATA value) = 0;
virtual HRESULT STDMETHODCALLTYPE AddEnvelope(
/* [in] */ DWORD dwParamIndex,
/* [in] */ DWORD cSegments,
/* [in] */ MP_ENVELOPE_SEGMENT *pEnvelopeSegments) = 0;
virtual HRESULT STDMETHODCALLTYPE FlushEnvelope(
/* [in] */ DWORD dwParamIndex,
/* [in] */ REFERENCE_TIME refTimeStart,
/* [in] */ REFERENCE_TIME refTimeEnd) = 0;
virtual HRESULT STDMETHODCALLTYPE SetTimeFormat(
/* [in] */ GUID guidTimeFormat,
/* [in] */ MP_TIMEDATA mpTimeData) = 0;
};
#else /* C style interface */
typedef struct IMediaParamsVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IMediaParams * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IMediaParams * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IMediaParams * This);
HRESULT ( STDMETHODCALLTYPE *GetParam )(
IMediaParams * This,
/* [in] */ DWORD dwParamIndex,
/* [out] */ MP_DATA *pValue);
HRESULT ( STDMETHODCALLTYPE *SetParam )(
IMediaParams * This,
/* [in] */ DWORD dwParamIndex,
/* [in] */ MP_DATA value);
HRESULT ( STDMETHODCALLTYPE *AddEnvelope )(
IMediaParams * This,
/* [in] */ DWORD dwParamIndex,
/* [in] */ DWORD cSegments,
/* [in] */ MP_ENVELOPE_SEGMENT *pEnvelopeSegments);
HRESULT ( STDMETHODCALLTYPE *FlushEnvelope )(
IMediaParams * This,
/* [in] */ DWORD dwParamIndex,
/* [in] */ REFERENCE_TIME refTimeStart,
/* [in] */ REFERENCE_TIME refTimeEnd);
HRESULT ( STDMETHODCALLTYPE *SetTimeFormat )(
IMediaParams * This,
/* [in] */ GUID guidTimeFormat,
/* [in] */ MP_TIMEDATA mpTimeData);
END_INTERFACE
} IMediaParamsVtbl;
interface IMediaParams
{
CONST_VTBL struct IMediaParamsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IMediaParams_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IMediaParams_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IMediaParams_Release(This) \
(This)->lpVtbl -> Release(This)
#define IMediaParams_GetParam(This,dwParamIndex,pValue) \
(This)->lpVtbl -> GetParam(This,dwParamIndex,pValue)
#define IMediaParams_SetParam(This,dwParamIndex,value) \
(This)->lpVtbl -> SetParam(This,dwParamIndex,value)
#define IMediaParams_AddEnvelope(This,dwParamIndex,cSegments,pEnvelopeSegments) \
(This)->lpVtbl -> AddEnvelope(This,dwParamIndex,cSegments,pEnvelopeSegments)
#define IMediaParams_FlushEnvelope(This,dwParamIndex,refTimeStart,refTimeEnd) \
(This)->lpVtbl -> FlushEnvelope(This,dwParamIndex,refTimeStart,refTimeEnd)
#define IMediaParams_SetTimeFormat(This,guidTimeFormat,mpTimeData) \
(This)->lpVtbl -> SetTimeFormat(This,guidTimeFormat,mpTimeData)
#endif /* COBJMACROS */
#endif /* C style interface */
HRESULT STDMETHODCALLTYPE IMediaParams_GetParam_Proxy(
IMediaParams * This,
/* [in] */ DWORD dwParamIndex,
/* [out] */ MP_DATA *pValue);
void __RPC_STUB IMediaParams_GetParam_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMediaParams_SetParam_Proxy(
IMediaParams * This,
/* [in] */ DWORD dwParamIndex,
/* [in] */ MP_DATA value);
void __RPC_STUB IMediaParams_SetParam_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMediaParams_AddEnvelope_Proxy(
IMediaParams * This,
/* [in] */ DWORD dwParamIndex,
/* [in] */ DWORD cSegments,
/* [in] */ MP_ENVELOPE_SEGMENT *pEnvelopeSegments);
void __RPC_STUB IMediaParams_AddEnvelope_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMediaParams_FlushEnvelope_Proxy(
IMediaParams * This,
/* [in] */ DWORD dwParamIndex,
/* [in] */ REFERENCE_TIME refTimeStart,
/* [in] */ REFERENCE_TIME refTimeEnd);
void __RPC_STUB IMediaParams_FlushEnvelope_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMediaParams_SetTimeFormat_Proxy(
IMediaParams * This,
/* [in] */ GUID guidTimeFormat,
/* [in] */ MP_TIMEDATA mpTimeData);
void __RPC_STUB IMediaParams_SetTimeFormat_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IMediaParams_INTERFACE_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

846
lib/directx8/mmstream.h Executable file
View File

@ -0,0 +1,846 @@
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 6.00.0338 */
/* Compiler settings for mmstream.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
protocol : dce , ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
//@@MIDL_FILE_HEADING( )
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 440
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __mmstream_h__
#define __mmstream_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __IMultiMediaStream_FWD_DEFINED__
#define __IMultiMediaStream_FWD_DEFINED__
typedef interface IMultiMediaStream IMultiMediaStream;
#endif /* __IMultiMediaStream_FWD_DEFINED__ */
#ifndef __IMediaStream_FWD_DEFINED__
#define __IMediaStream_FWD_DEFINED__
typedef interface IMediaStream IMediaStream;
#endif /* __IMediaStream_FWD_DEFINED__ */
#ifndef __IStreamSample_FWD_DEFINED__
#define __IStreamSample_FWD_DEFINED__
typedef interface IStreamSample IStreamSample;
#endif /* __IStreamSample_FWD_DEFINED__ */
/* header files for imported files */
#include "unknwn.h"
#ifdef __cplusplus
extern "C"{
#endif
void * __RPC_USER MIDL_user_allocate(size_t);
void __RPC_USER MIDL_user_free( void * );
/* interface __MIDL_itf_mmstream_0000 */
/* [local] */
#define MS_ERROR_CODE(x) MAKE_HRESULT(1, FACILITY_ITF, (x) + 0x400)
#define MS_SUCCESS_CODE(x) MAKE_HRESULT(0, FACILITY_ITF, x)
#define MS_S_PENDING MS_SUCCESS_CODE(1)
#define MS_S_NOUPDATE MS_SUCCESS_CODE(2)
#define MS_S_ENDOFSTREAM MS_SUCCESS_CODE(3)
#define MS_E_SAMPLEALLOC MS_ERROR_CODE(1)
#define MS_E_PURPOSEID MS_ERROR_CODE(2)
#define MS_E_NOSTREAM MS_ERROR_CODE(3)
#define MS_E_NOSEEKING MS_ERROR_CODE(4)
#define MS_E_INCOMPATIBLE MS_ERROR_CODE(5)
#define MS_E_BUSY MS_ERROR_CODE(6)
#define MS_E_NOTINIT MS_ERROR_CODE(7)
#define MS_E_SOURCEALREADYDEFINED MS_ERROR_CODE(8)
#define MS_E_INVALIDSTREAMTYPE MS_ERROR_CODE(9)
#define MS_E_NOTRUNNING MS_ERROR_CODE(10)
// {A35FF56A-9FDA-11d0-8FDF-00C04FD9189D}
DEFINE_GUID(MSPID_PrimaryVideo,
0xa35ff56a, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
// {A35FF56B-9FDA-11d0-8FDF-00C04FD9189D}
DEFINE_GUID(MSPID_PrimaryAudio,
0xa35ff56b, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
#if(_WIN32_WINNT < 0x0400)
typedef void ( __stdcall *PAPCFUNC )(
DWORD_PTR dwParam);
#endif
typedef LONGLONG STREAM_TIME;
typedef GUID MSPID;
typedef REFGUID REFMSPID;
typedef /* [public][public][public] */
enum __MIDL___MIDL_itf_mmstream_0000_0001
{ STREAMTYPE_READ = 0,
STREAMTYPE_WRITE = 1,
STREAMTYPE_TRANSFORM = 2
} STREAM_TYPE;
typedef /* [public][public][public] */
enum __MIDL___MIDL_itf_mmstream_0000_0002
{ STREAMSTATE_STOP = 0,
STREAMSTATE_RUN = 1
} STREAM_STATE;
typedef /* [public] */
enum __MIDL___MIDL_itf_mmstream_0000_0003
{ COMPSTAT_NOUPDATEOK = 0x1,
COMPSTAT_WAIT = 0x2,
COMPSTAT_ABORT = 0x4
} COMPLETION_STATUS_FLAGS;
enum __MIDL___MIDL_itf_mmstream_0000_0004
{ MMSSF_HASCLOCK = 0x1,
MMSSF_SUPPORTSEEK = 0x2,
MMSSF_ASYNCHRONOUS = 0x4
} ;
enum __MIDL___MIDL_itf_mmstream_0000_0005
{ SSUPDATE_ASYNC = 0x1,
SSUPDATE_CONTINUOUS = 0x2
} ;
extern RPC_IF_HANDLE __MIDL_itf_mmstream_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_mmstream_0000_v0_0_s_ifspec;
#ifndef __IMultiMediaStream_INTERFACE_DEFINED__
#define __IMultiMediaStream_INTERFACE_DEFINED__
/* interface IMultiMediaStream */
/* [unique][uuid][local][object] */
EXTERN_C const IID IID_IMultiMediaStream;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("B502D1BC-9A57-11d0-8FDE-00C04FD9189D")
IMultiMediaStream : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetInformation(
/* [out] */ DWORD *pdwFlags,
/* [out] */ STREAM_TYPE *pStreamType) = 0;
virtual HRESULT STDMETHODCALLTYPE GetMediaStream(
/* [in] */ REFMSPID idPurpose,
/* [out] */ IMediaStream **ppMediaStream) = 0;
virtual HRESULT STDMETHODCALLTYPE EnumMediaStreams(
/* [in] */ long Index,
/* [out] */ IMediaStream **ppMediaStream) = 0;
virtual HRESULT STDMETHODCALLTYPE GetState(
/* [out] */ STREAM_STATE *pCurrentState) = 0;
virtual HRESULT STDMETHODCALLTYPE SetState(
/* [in] */ STREAM_STATE NewState) = 0;
virtual HRESULT STDMETHODCALLTYPE GetTime(
/* [out] */ STREAM_TIME *pCurrentTime) = 0;
virtual HRESULT STDMETHODCALLTYPE GetDuration(
/* [out] */ STREAM_TIME *pDuration) = 0;
virtual HRESULT STDMETHODCALLTYPE Seek(
/* [in] */ STREAM_TIME SeekTime) = 0;
virtual HRESULT STDMETHODCALLTYPE GetEndOfStreamEventHandle(
/* [out] */ HANDLE *phEOS) = 0;
};
#else /* C style interface */
typedef struct IMultiMediaStreamVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IMultiMediaStream * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IMultiMediaStream * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IMultiMediaStream * This);
HRESULT ( STDMETHODCALLTYPE *GetInformation )(
IMultiMediaStream * This,
/* [out] */ DWORD *pdwFlags,
/* [out] */ STREAM_TYPE *pStreamType);
HRESULT ( STDMETHODCALLTYPE *GetMediaStream )(
IMultiMediaStream * This,
/* [in] */ REFMSPID idPurpose,
/* [out] */ IMediaStream **ppMediaStream);
HRESULT ( STDMETHODCALLTYPE *EnumMediaStreams )(
IMultiMediaStream * This,
/* [in] */ long Index,
/* [out] */ IMediaStream **ppMediaStream);
HRESULT ( STDMETHODCALLTYPE *GetState )(
IMultiMediaStream * This,
/* [out] */ STREAM_STATE *pCurrentState);
HRESULT ( STDMETHODCALLTYPE *SetState )(
IMultiMediaStream * This,
/* [in] */ STREAM_STATE NewState);
HRESULT ( STDMETHODCALLTYPE *GetTime )(
IMultiMediaStream * This,
/* [out] */ STREAM_TIME *pCurrentTime);
HRESULT ( STDMETHODCALLTYPE *GetDuration )(
IMultiMediaStream * This,
/* [out] */ STREAM_TIME *pDuration);
HRESULT ( STDMETHODCALLTYPE *Seek )(
IMultiMediaStream * This,
/* [in] */ STREAM_TIME SeekTime);
HRESULT ( STDMETHODCALLTYPE *GetEndOfStreamEventHandle )(
IMultiMediaStream * This,
/* [out] */ HANDLE *phEOS);
END_INTERFACE
} IMultiMediaStreamVtbl;
interface IMultiMediaStream
{
CONST_VTBL struct IMultiMediaStreamVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IMultiMediaStream_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IMultiMediaStream_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IMultiMediaStream_Release(This) \
(This)->lpVtbl -> Release(This)
#define IMultiMediaStream_GetInformation(This,pdwFlags,pStreamType) \
(This)->lpVtbl -> GetInformation(This,pdwFlags,pStreamType)
#define IMultiMediaStream_GetMediaStream(This,idPurpose,ppMediaStream) \
(This)->lpVtbl -> GetMediaStream(This,idPurpose,ppMediaStream)
#define IMultiMediaStream_EnumMediaStreams(This,Index,ppMediaStream) \
(This)->lpVtbl -> EnumMediaStreams(This,Index,ppMediaStream)
#define IMultiMediaStream_GetState(This,pCurrentState) \
(This)->lpVtbl -> GetState(This,pCurrentState)
#define IMultiMediaStream_SetState(This,NewState) \
(This)->lpVtbl -> SetState(This,NewState)
#define IMultiMediaStream_GetTime(This,pCurrentTime) \
(This)->lpVtbl -> GetTime(This,pCurrentTime)
#define IMultiMediaStream_GetDuration(This,pDuration) \
(This)->lpVtbl -> GetDuration(This,pDuration)
#define IMultiMediaStream_Seek(This,SeekTime) \
(This)->lpVtbl -> Seek(This,SeekTime)
#define IMultiMediaStream_GetEndOfStreamEventHandle(This,phEOS) \
(This)->lpVtbl -> GetEndOfStreamEventHandle(This,phEOS)
#endif /* COBJMACROS */
#endif /* C style interface */
HRESULT STDMETHODCALLTYPE IMultiMediaStream_GetInformation_Proxy(
IMultiMediaStream * This,
/* [out] */ DWORD *pdwFlags,
/* [out] */ STREAM_TYPE *pStreamType);
void __RPC_STUB IMultiMediaStream_GetInformation_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMultiMediaStream_GetMediaStream_Proxy(
IMultiMediaStream * This,
/* [in] */ REFMSPID idPurpose,
/* [out] */ IMediaStream **ppMediaStream);
void __RPC_STUB IMultiMediaStream_GetMediaStream_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMultiMediaStream_EnumMediaStreams_Proxy(
IMultiMediaStream * This,
/* [in] */ long Index,
/* [out] */ IMediaStream **ppMediaStream);
void __RPC_STUB IMultiMediaStream_EnumMediaStreams_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMultiMediaStream_GetState_Proxy(
IMultiMediaStream * This,
/* [out] */ STREAM_STATE *pCurrentState);
void __RPC_STUB IMultiMediaStream_GetState_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMultiMediaStream_SetState_Proxy(
IMultiMediaStream * This,
/* [in] */ STREAM_STATE NewState);
void __RPC_STUB IMultiMediaStream_SetState_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMultiMediaStream_GetTime_Proxy(
IMultiMediaStream * This,
/* [out] */ STREAM_TIME *pCurrentTime);
void __RPC_STUB IMultiMediaStream_GetTime_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMultiMediaStream_GetDuration_Proxy(
IMultiMediaStream * This,
/* [out] */ STREAM_TIME *pDuration);
void __RPC_STUB IMultiMediaStream_GetDuration_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMultiMediaStream_Seek_Proxy(
IMultiMediaStream * This,
/* [in] */ STREAM_TIME SeekTime);
void __RPC_STUB IMultiMediaStream_Seek_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMultiMediaStream_GetEndOfStreamEventHandle_Proxy(
IMultiMediaStream * This,
/* [out] */ HANDLE *phEOS);
void __RPC_STUB IMultiMediaStream_GetEndOfStreamEventHandle_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IMultiMediaStream_INTERFACE_DEFINED__ */
#ifndef __IMediaStream_INTERFACE_DEFINED__
#define __IMediaStream_INTERFACE_DEFINED__
/* interface IMediaStream */
/* [unique][uuid][object] */
EXTERN_C const IID IID_IMediaStream;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("B502D1BD-9A57-11d0-8FDE-00C04FD9189D")
IMediaStream : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetMultiMediaStream(
/* [out] */ IMultiMediaStream **ppMultiMediaStream) = 0;
virtual HRESULT STDMETHODCALLTYPE GetInformation(
/* [out] */ MSPID *pPurposeId,
/* [out] */ STREAM_TYPE *pType) = 0;
virtual HRESULT STDMETHODCALLTYPE SetSameFormat(
/* [in] */ IMediaStream *pStreamThatHasDesiredFormat,
/* [in] */ DWORD dwFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE AllocateSample(
/* [in] */ DWORD dwFlags,
/* [out] */ IStreamSample **ppSample) = 0;
virtual HRESULT STDMETHODCALLTYPE CreateSharedSample(
/* [in] */ IStreamSample *pExistingSample,
/* [in] */ DWORD dwFlags,
/* [out] */ IStreamSample **ppNewSample) = 0;
virtual HRESULT STDMETHODCALLTYPE SendEndOfStream(
DWORD dwFlags) = 0;
};
#else /* C style interface */
typedef struct IMediaStreamVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IMediaStream * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IMediaStream * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IMediaStream * This);
HRESULT ( STDMETHODCALLTYPE *GetMultiMediaStream )(
IMediaStream * This,
/* [out] */ IMultiMediaStream **ppMultiMediaStream);
HRESULT ( STDMETHODCALLTYPE *GetInformation )(
IMediaStream * This,
/* [out] */ MSPID *pPurposeId,
/* [out] */ STREAM_TYPE *pType);
HRESULT ( STDMETHODCALLTYPE *SetSameFormat )(
IMediaStream * This,
/* [in] */ IMediaStream *pStreamThatHasDesiredFormat,
/* [in] */ DWORD dwFlags);
HRESULT ( STDMETHODCALLTYPE *AllocateSample )(
IMediaStream * This,
/* [in] */ DWORD dwFlags,
/* [out] */ IStreamSample **ppSample);
HRESULT ( STDMETHODCALLTYPE *CreateSharedSample )(
IMediaStream * This,
/* [in] */ IStreamSample *pExistingSample,
/* [in] */ DWORD dwFlags,
/* [out] */ IStreamSample **ppNewSample);
HRESULT ( STDMETHODCALLTYPE *SendEndOfStream )(
IMediaStream * This,
DWORD dwFlags);
END_INTERFACE
} IMediaStreamVtbl;
interface IMediaStream
{
CONST_VTBL struct IMediaStreamVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IMediaStream_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IMediaStream_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IMediaStream_Release(This) \
(This)->lpVtbl -> Release(This)
#define IMediaStream_GetMultiMediaStream(This,ppMultiMediaStream) \
(This)->lpVtbl -> GetMultiMediaStream(This,ppMultiMediaStream)
#define IMediaStream_GetInformation(This,pPurposeId,pType) \
(This)->lpVtbl -> GetInformation(This,pPurposeId,pType)
#define IMediaStream_SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags) \
(This)->lpVtbl -> SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags)
#define IMediaStream_AllocateSample(This,dwFlags,ppSample) \
(This)->lpVtbl -> AllocateSample(This,dwFlags,ppSample)
#define IMediaStream_CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample) \
(This)->lpVtbl -> CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample)
#define IMediaStream_SendEndOfStream(This,dwFlags) \
(This)->lpVtbl -> SendEndOfStream(This,dwFlags)
#endif /* COBJMACROS */
#endif /* C style interface */
HRESULT STDMETHODCALLTYPE IMediaStream_GetMultiMediaStream_Proxy(
IMediaStream * This,
/* [out] */ IMultiMediaStream **ppMultiMediaStream);
void __RPC_STUB IMediaStream_GetMultiMediaStream_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMediaStream_GetInformation_Proxy(
IMediaStream * This,
/* [out] */ MSPID *pPurposeId,
/* [out] */ STREAM_TYPE *pType);
void __RPC_STUB IMediaStream_GetInformation_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMediaStream_SetSameFormat_Proxy(
IMediaStream * This,
/* [in] */ IMediaStream *pStreamThatHasDesiredFormat,
/* [in] */ DWORD dwFlags);
void __RPC_STUB IMediaStream_SetSameFormat_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMediaStream_AllocateSample_Proxy(
IMediaStream * This,
/* [in] */ DWORD dwFlags,
/* [out] */ IStreamSample **ppSample);
void __RPC_STUB IMediaStream_AllocateSample_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMediaStream_CreateSharedSample_Proxy(
IMediaStream * This,
/* [in] */ IStreamSample *pExistingSample,
/* [in] */ DWORD dwFlags,
/* [out] */ IStreamSample **ppNewSample);
void __RPC_STUB IMediaStream_CreateSharedSample_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMediaStream_SendEndOfStream_Proxy(
IMediaStream * This,
DWORD dwFlags);
void __RPC_STUB IMediaStream_SendEndOfStream_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IMediaStream_INTERFACE_DEFINED__ */
#ifndef __IStreamSample_INTERFACE_DEFINED__
#define __IStreamSample_INTERFACE_DEFINED__
/* interface IStreamSample */
/* [unique][uuid][local][object] */
EXTERN_C const IID IID_IStreamSample;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("B502D1BE-9A57-11d0-8FDE-00C04FD9189D")
IStreamSample : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetMediaStream(
/* [in] */ IMediaStream **ppMediaStream) = 0;
virtual HRESULT STDMETHODCALLTYPE GetSampleTimes(
/* [out] */ STREAM_TIME *pStartTime,
/* [out] */ STREAM_TIME *pEndTime,
/* [out] */ STREAM_TIME *pCurrentTime) = 0;
virtual HRESULT STDMETHODCALLTYPE SetSampleTimes(
/* [in] */ const STREAM_TIME *pStartTime,
/* [in] */ const STREAM_TIME *pEndTime) = 0;
virtual HRESULT STDMETHODCALLTYPE Update(
/* [in] */ DWORD dwFlags,
/* [in] */ HANDLE hEvent,
/* [in] */ PAPCFUNC pfnAPC,
/* [in] */ DWORD_PTR dwAPCData) = 0;
virtual HRESULT STDMETHODCALLTYPE CompletionStatus(
/* [in] */ DWORD dwFlags,
/* [in] */ DWORD dwMilliseconds) = 0;
};
#else /* C style interface */
typedef struct IStreamSampleVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IStreamSample * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IStreamSample * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IStreamSample * This);
HRESULT ( STDMETHODCALLTYPE *GetMediaStream )(
IStreamSample * This,
/* [in] */ IMediaStream **ppMediaStream);
HRESULT ( STDMETHODCALLTYPE *GetSampleTimes )(
IStreamSample * This,
/* [out] */ STREAM_TIME *pStartTime,
/* [out] */ STREAM_TIME *pEndTime,
/* [out] */ STREAM_TIME *pCurrentTime);
HRESULT ( STDMETHODCALLTYPE *SetSampleTimes )(
IStreamSample * This,
/* [in] */ const STREAM_TIME *pStartTime,
/* [in] */ const STREAM_TIME *pEndTime);
HRESULT ( STDMETHODCALLTYPE *Update )(
IStreamSample * This,
/* [in] */ DWORD dwFlags,
/* [in] */ HANDLE hEvent,
/* [in] */ PAPCFUNC pfnAPC,
/* [in] */ DWORD_PTR dwAPCData);
HRESULT ( STDMETHODCALLTYPE *CompletionStatus )(
IStreamSample * This,
/* [in] */ DWORD dwFlags,
/* [in] */ DWORD dwMilliseconds);
END_INTERFACE
} IStreamSampleVtbl;
interface IStreamSample
{
CONST_VTBL struct IStreamSampleVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IStreamSample_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IStreamSample_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IStreamSample_Release(This) \
(This)->lpVtbl -> Release(This)
#define IStreamSample_GetMediaStream(This,ppMediaStream) \
(This)->lpVtbl -> GetMediaStream(This,ppMediaStream)
#define IStreamSample_GetSampleTimes(This,pStartTime,pEndTime,pCurrentTime) \
(This)->lpVtbl -> GetSampleTimes(This,pStartTime,pEndTime,pCurrentTime)
#define IStreamSample_SetSampleTimes(This,pStartTime,pEndTime) \
(This)->lpVtbl -> SetSampleTimes(This,pStartTime,pEndTime)
#define IStreamSample_Update(This,dwFlags,hEvent,pfnAPC,dwAPCData) \
(This)->lpVtbl -> Update(This,dwFlags,hEvent,pfnAPC,dwAPCData)
#define IStreamSample_CompletionStatus(This,dwFlags,dwMilliseconds) \
(This)->lpVtbl -> CompletionStatus(This,dwFlags,dwMilliseconds)
#endif /* COBJMACROS */
#endif /* C style interface */
HRESULT STDMETHODCALLTYPE IStreamSample_GetMediaStream_Proxy(
IStreamSample * This,
/* [in] */ IMediaStream **ppMediaStream);
void __RPC_STUB IStreamSample_GetMediaStream_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IStreamSample_GetSampleTimes_Proxy(
IStreamSample * This,
/* [out] */ STREAM_TIME *pStartTime,
/* [out] */ STREAM_TIME *pEndTime,
/* [out] */ STREAM_TIME *pCurrentTime);
void __RPC_STUB IStreamSample_GetSampleTimes_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IStreamSample_SetSampleTimes_Proxy(
IStreamSample * This,
/* [in] */ const STREAM_TIME *pStartTime,
/* [in] */ const STREAM_TIME *pEndTime);
void __RPC_STUB IStreamSample_SetSampleTimes_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IStreamSample_Update_Proxy(
IStreamSample * This,
/* [in] */ DWORD dwFlags,
/* [in] */ HANDLE hEvent,
/* [in] */ PAPCFUNC pfnAPC,
/* [in] */ DWORD_PTR dwAPCData);
void __RPC_STUB IStreamSample_Update_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IStreamSample_CompletionStatus_Proxy(
IStreamSample * This,
/* [in] */ DWORD dwFlags,
/* [in] */ DWORD dwMilliseconds);
void __RPC_STUB IStreamSample_CompletionStatus_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IStreamSample_INTERFACE_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

144
lib/directx8/mpconfig.h Executable file
View File

@ -0,0 +1,144 @@
//------------------------------------------------------------------------------
// File: MPConfig.h
//
// Desc:
//
// Copyright (c) 1997 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __IMPConfig__
#define __IMPConfig__
#ifdef __cplusplus
extern "C" {
#endif
typedef enum _AM_ASPECT_RATIO_MODE
{
AM_ARMODE_STRETCHED, // don't do any aspect ratio correction
AM_ARMODE_LETTER_BOX, // letter box the video, paint background color in the excess region
AM_ARMODE_CROP, // crop the video to the right aspect ratio
AM_ARMODE_STRETCHED_AS_PRIMARY // follow whatever the primary stream does (in terms of the mode as well as pict-aspect-ratio values)
} AM_ASPECT_RATIO_MODE;
DECLARE_INTERFACE_(IMixerPinConfig, IUnknown)
{
// this function sets the position of the stream in the display window, assuming
// that the window coordinates are {0, 0, 10000, 10000}. Thus giving arguments
// (0, 0, 5000, 5000) will put the stream in the top-left quarter. Any value greater
// than 10000 is invalid.
STDMETHOD (SetRelativePosition)(THIS_
IN DWORD dwLeft,
IN DWORD dwTop,
IN DWORD dwRight,
IN DWORD dwBottom
) PURE;
// this function gets the position of the stream in the display window, assuming
// that the window coordinates are {0, 0, 10000, 10000}. Thus if the values returned
// are (0, 0, 5000, 5000), then it means that the stream is in the top-left quarter.
STDMETHOD (GetRelativePosition)(THIS_
OUT DWORD *pdwLeft,
OUT DWORD *pdwTop,
OUT DWORD *pdwRight,
OUT DWORD *pdwBottom
) PURE;
// this function sets the ZOrder of the stream. The ZOrder of 0 is the closest
// to the eyes of the user, and increasing values imply greater distance.
STDMETHOD (SetZOrder)(THIS_
IN DWORD dwZOrder
) PURE;
// this function gets the ZOrder of the stream. The ZOrder of 0 is the closest
// to the eyes of the user, and increasing values imply greater distance.
STDMETHOD (GetZOrder)(THIS_
OUT DWORD *pdwZOrder
) PURE;
// this function sets the colorkey being used by the stream. Setting this value on the
// primary stream sets the destination colorkey being used by the overlay surface. Setting
// this value on the secondary pin makes sense only if the stream is transparent. By default
// the destination colorkey is used as the colorkey for all transparent (secondary) streams.
STDMETHOD (SetColorKey)(THIS_
IN COLORKEY *pColorKey
) PURE;
// this function gets the colorkey being used by the stream. Getting this value on the
// primary stream gets the destination colorkey being used by the overlay surface. Getting
// this value on the secondary pin returns the colorkey being used by that particular stream.
// When using this method, you are allowed to pass NULL for either pColorKey or pColor but
// not both.
STDMETHOD (GetColorKey)(THIS_
OUT COLORKEY *pColorKey,
OUT DWORD *pColor
) PURE;
// this function sets the blending parameter which in turn defines, how the secondary stream
// is going to be blended with the primary stream. A value of 0 makes the secondary stream
// invisible, a value of 255 makes the primary stream invisible (in that region only ofcourse),
// and any value inbetween, say x, blends the secondary and primary streams in the ratio x : (255-x).
// If no value is set, the default is 255.
// Any value less than 0 or greater than 255 is invalid. Calling this function on the primary
// stream would result in a return value of E_UNEXPECTED.
STDMETHOD (SetBlendingParameter)(THIS_
IN DWORD dwBlendingParameter
) PURE;
// this function gets the blending parameter which in turn defines, how the secondary stream
// is currently being blended with the primary stream.
STDMETHOD (GetBlendingParameter)(THIS_
OUT DWORD *pdwBlendingParameter
) PURE;
// this function is used to set the Aspect Ratio Correction mode on the pin.
// If the mode is set to letter box, black color is painted on the excess region
STDMETHOD (SetAspectRatioMode)(THIS_
IN AM_ASPECT_RATIO_MODE amAspectRatioMode
) PURE;
// this function is used to get the Aspect Ratio Correction mode on the pin.
STDMETHOD (GetAspectRatioMode)(THIS_
OUT AM_ASPECT_RATIO_MODE* pamAspectRatioMode
) PURE;
// this function sets the stream to be transparent. That means that the stream is not going
// to occupy the whole of the rectangle (specified by SetRelativePosition), some of the region
// is going to be transparent i.e. the stream underneath, is going to see through.
// Calling this function on the primary stream would result in a return value of E_UNEXPECTED.
STDMETHOD (SetStreamTransparent)(THIS_
IN BOOL bStreamTransparent
) PURE;
// this function is used to tell whether the stream is transparent or not.
STDMETHOD (GetStreamTransparent)(THIS_
OUT BOOL *pbStreamTransparent
) PURE;
};
DECLARE_INTERFACE_(IMixerPinConfig2, IMixerPinConfig)
{
// this functions sets the color-controls, if the vga chip supports it.
STDMETHOD (SetOverlaySurfaceColorControls)(THIS_
IN LPDDCOLORCONTROL pColorControl
) PURE;
// this functions gets the color-controls. It also returns the capability of the vga hardware
// in the dwFlags value of the struct.
STDMETHOD (GetOverlaySurfaceColorControls)(THIS_
OUT LPDDCOLORCONTROL pColorControl
) PURE;
};
#ifdef __cplusplus
}
#endif
#endif // #define __IMPConfig__

119
lib/directx8/mpegtype.h Executable file
View File

@ -0,0 +1,119 @@
//------------------------------------------------------------------------------
// File: MPEGType.h
//
// Desc: MPEG system stream compound type definition
//
// Copyright (c) 1996 - 2000, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __MPEGTYPE__
#define __MPEGTYPE__
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
//
// AM_MPEGSYSTEMTYPE defines the format block contents for
// data of type MEDIATYPE_MPEG1System when the format
// block GUID is FORMAT_MPEG1System
//
// The format block consists of elements of type
// AM_MPEGSYSTEMTYPE up to the length of the format block
// Each format block is 8-byte aligned from the start of
// the format block
//
typedef struct tagAM_MPEGSTREAMTYPE
{
DWORD dwStreamId; // Stream id of stream to process
DWORD dwReserved; // 8-byte alignment
AM_MEDIA_TYPE mt; // Type for substream - pbFormat is NULL
BYTE bFormat[1]; // Format data
} AM_MPEGSTREAMTYPE;
typedef struct tagAM_MPEGSYSTEMTYPE
{
DWORD dwBitRate; // Bits per second
DWORD cStreams; // Number of streams
AM_MPEGSTREAMTYPE Streams[1];
} AM_MPEGSYSTEMTYPE;
//
// Helper macros for AM_MPEGSTREAMTYPE
//
#define AM_MPEGSTREAMTYPE_ELEMENTLENGTH(pStreamType) \
FIELD_OFFSET(AM_MPEGSTREAMTYPE, bFormat[(pStreamType)->mt.cbFormat])
#define AM_MPEGSTREAMTYPE_NEXT(pStreamType) \
((AM_MPEGSTREAMTYPE *)((PBYTE)(pStreamType) + \
((AM_MPEGSTREAMTYPE_ELEMENTLENGTH(pStreamType) + 7) & ~7)))
//
// IMpegAudioDecoder
//
// Values for DualMode
#define AM_MPEG_AUDIO_DUAL_MERGE 0
#define AM_MPEG_AUDIO_DUAL_LEFT 1
#define AM_MPEG_AUDIO_DUAL_RIGHT 2
DECLARE_INTERFACE_(IMpegAudioDecoder, IUnknown) {
STDMETHOD(get_FrequencyDivider) (THIS_
unsigned long *pDivider /* [out] */
) PURE;
STDMETHOD(put_FrequencyDivider) (THIS_
unsigned long Divider /* [in] */
) PURE;
STDMETHOD(get_DecoderAccuracy) (THIS_
unsigned long *pAccuracy /* [out] */
) PURE;
STDMETHOD(put_DecoderAccuracy) (THIS_
unsigned long Accuracy /* [in] */
) PURE;
STDMETHOD(get_Stereo) (THIS_
unsigned long *pStereo /* [out] */
) PURE;
STDMETHOD(put_Stereo) (THIS_
unsigned long Stereo /* [in] */
) PURE;
STDMETHOD(get_DecoderWordSize) (THIS_
unsigned long *pWordSize /* [out] */
) PURE;
STDMETHOD(put_DecoderWordSize) (THIS_
unsigned long WordSize /* [in] */
) PURE;
STDMETHOD(get_IntegerDecode) (THIS_
unsigned long *pIntDecode /* [out] */
) PURE;
STDMETHOD(put_IntegerDecode) (THIS_
unsigned long IntDecode /* [in] */
) PURE;
STDMETHOD(get_DualMode) (THIS_
unsigned long *pIntDecode /* [out] */
) PURE;
STDMETHOD(put_DualMode) (THIS_
unsigned long IntDecode /* [in] */
) PURE;
STDMETHOD(get_AudioFormat) (THIS_
MPEG1WAVEFORMAT *lpFmt /* [out] */
) PURE;
};
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // __MPEGTYPE__

Some files were not shown because too many files have changed in this diff Show More