📄 vmrender.idl
字号:
);
};
///////////////////////////////////////////////////////////////////////////////
//
// VMR Multimon configuration interface
//
///////////////////////////////////////////////////////////////////////////////
typedef struct tagVMRGUID {
GUID* pGUID; // is NULL if the default DDraw device
GUID GUID; // otherwise points to this GUID
} VMRGUID;
#define VMRDEVICENAMELEN 32
#define VMRDEVICEDESCRIPTIONLEN 256
typedef struct tagVMRMONITORINFO {
VMRGUID guid;
RECT rcMonitor;
HMONITOR hMon;
DWORD dwFlags; // described in MONITORINFOEX, currently only MONITORINFOF_PRIMARY
wchar_t szDevice[VMRDEVICENAMELEN];
wchar_t szDescription[VMRDEVICEDESCRIPTIONLEN];
LARGE_INTEGER liDriverVersion;
DWORD dwVendorId;
DWORD dwDeviceId;
DWORD dwSubSysId;
DWORD dwRevision;
// find out the DDCAPS using DDrawCreate on the monitor GUID
} VMRMONITORINFO;
[
object,
local,
uuid(9cf0b1b6-fbaa-4b7f-88cf-cf1f130a0dce),
helpstring("IVMRMonitorConfig Interface"),
pointer_default(unique)
]
interface IVMRMonitorConfig : IUnknown
{
// Use this method on a Multi-Monitor system to specify to the
// mixer filter which Direct Draw driver should be used when connecting
// to an upstream decoder filter.
//
HRESULT SetMonitor(
[in] const VMRGUID *pGUID
);
// Use this method to determine the direct draw object that will be used when
// connecting the mixer filter to an upstream decoder filter.
//
HRESULT GetMonitor(
[out] VMRGUID *pGUID
);
// Use this method on a multi-monitor system to specify to the
// mixer filter the default Direct Draw device to use when
// connecting to an upstream filter. The default direct draw device
// can be overriden for a particular connection by SetMonitor method
// described above.
//
HRESULT SetDefaultMonitor(
[in] const VMRGUID *pGUID
);
// Use this method on a multi-monitor system to determine which
// is the default direct draw device the overlay mixer filter
// will use when connecting to an upstream filter.
//
HRESULT GetDefaultMonitor(
[out] VMRGUID *pGUID
);
// Use this method to get a list of Direct Draw device GUIDs and thier
// associated monitor information that the mixer can use when
// connecting to an upstream decoder filter. Passing down a NULL pInfo
// parameter allows the app to determine the required array size (returned
// in pdwNumDevices). Otherwise, dwNumDevices returns the actual
// number of devices retrieved.
//
HRESULT GetAvailableMonitors(
[out, size_is(dwMaxInfoArraySize)] VMRMONITORINFO* pInfo,
[in] DWORD dwMaxInfoArraySize, // in array members
[out] DWORD* pdwNumDevices // actual number of devices retrieved
);
};
///////////////////////////////////////////////////////////////////////////////
//
// VMR Filter configuration interfaces
//
///////////////////////////////////////////////////////////////////////////////
typedef enum {
RenderPrefs_ForceOffscreen = 0x00000001,
RenderPrefs_ForceOverlays = 0x00000002, // fail if no overlays
RenderPrefs_AllowOverlays = 0x00000000, // overlay used by default
RenderPrefs_AllowOffscreen = 0x00000000, // offscreen used if no overlay
RenderPrefs_DoNotRenderColorKeyAndBorder = 0x00000008, // app paints color keys
RenderPrefs_RestrictToInitialMonitor = 0x00000010, // output only to initial monitor
RenderPrefs_PreferAGPMemWhenMixing = 0x00000020, // try agp mem when allocating textures
RenderPrefs_Mask = 0x0000003f, // OR of all above flags
} VMRRenderPrefs;
typedef enum {
VMRMode_Windowed = 0x00000001,
VMRMode_Windowless = 0x00000002,
VMRMode_Renderless = 0x00000004,
// not a valid value to pass to SetRenderMode
VMRMode_Mask = 0x00000007, // OR of all above flags
} VMRMode;
enum {
MAX_NUMBER_OF_STREAMS = 16
};
[
object,
local,
uuid(9e5530c5-7034-48b4-bb46-0b8a6efc8e36),
helpstring("IVMRFilterConfig Interface"),
pointer_default(unique)
]
interface IVMRFilterConfig : IUnknown
{
HRESULT SetImageCompositor(
[in] IVMRImageCompositor* lpVMRImgCompositor
);
HRESULT SetNumberOfStreams(
[in] DWORD dwMaxStreams
);
HRESULT GetNumberOfStreams(
[out] DWORD* pdwMaxStreams
);
HRESULT SetRenderingPrefs(
[in] DWORD dwRenderFlags // a combination of VMRRenderingPrefFlags
);
HRESULT GetRenderingPrefs(
[out] DWORD* pdwRenderFlags
);
HRESULT SetRenderingMode(
[in] DWORD Mode // a combination of VMRMode
);
HRESULT GetRenderingMode(
[out] DWORD* pMode
);
}
//=====================================================================
//
// IVMRMixerBitmap
//
//=====================================================================
typedef struct _VMRALPHABITMAP
{
DWORD dwFlags; // flags word
HDC hdc; // DC for the bitmap to copy
LPDIRECTDRAWSURFACE7 pDDS; // DirectDraw surface to copy
RECT rSrc; // rectangle to copy from the DC/DDS
NORMALIZEDRECT rDest; // output rectangle in composition space
FLOAT fAlpha; // opacity of the bitmap
COLORREF clrSrcKey; // src color key
} VMRALPHABITMAP, *PVMRALPHABITMAP;
// Disable the alpha bitmap for now
cpp_quote("#define VMRBITMAP_DISABLE 0x00000001")
// Take the bitmap from the HDC rather than the DirectDraw surface
cpp_quote("#define VMRBITMAP_HDC 0x00000002")
// Take the entire DDraw surface - rSrc is ignored
cpp_quote("#define VMRBITMAP_ENTIREDDS 0x00000004")
// Indicates that the clrTrans value is valid and should be
// used when blending
cpp_quote("#define VMRBITMAP_SRCCOLORKEY 0x00000008")
// Indicates that the rSrc rectangle is valid and specifies a
// sub-rectangle of the of original app image to be blended.
// Use of this parameter enables "Image Strips"
cpp_quote("#define VMRBITMAP_SRCRECT 0x00000010")
[
object,
local,
uuid(1E673275-0257-40aa-AF20-7C608D4A0428),
helpstring("IVMRMixerBitmap Interface"),
pointer_default(unique)
]
interface IVMRMixerBitmap : IUnknown
{
// Set bitmap, location to blend it, and blending value
HRESULT SetAlphaBitmap(
[in] const VMRALPHABITMAP *pBmpParms
);
// Change bitmap location, size and blending value,
// graph must be running for change to take effect.
HRESULT UpdateAlphaBitmapParameters(
[in] PVMRALPHABITMAP pBmpParms
);
// Get bitmap, location to blend it, and blending value
HRESULT GetAlphaBitmapParameters(
[out] PVMRALPHABITMAP pBmpParms
);
};
//=====================================================================
//
// IVMRImageCompositor
//
//=====================================================================
typedef struct _VMRVIDEOSTREAMINFO {
LPDIRECTDRAWSURFACE7 pddsVideoSurface;
DWORD dwWidth, dwHeight;
DWORD dwStrmID;
FLOAT fAlpha;
DDCOLORKEY ddClrKey;
NORMALIZEDRECT rNormal;
} VMRVIDEOSTREAMINFO;
[
local,
object,
local,
uuid(7a4fb5af-479f-4074-bb40-ce6722e43c82),
helpstring("IVMRImageCompositor Interface"),
pointer_default(unique)
]
interface IVMRImageCompositor : IUnknown
{
HRESULT InitCompositionTarget(
[in] IUnknown* pD3DDevice,
[in] LPDIRECTDRAWSURFACE7 pddsRenderTarget
);
HRESULT TermCompositionTarget(
[in] IUnknown* pD3DDevice,
[in] LPDIRECTDRAWSURFACE7 pddsRenderTarget
);
HRESULT SetStreamMediaType(
[in] DWORD dwStrmID,
[in] AM_MEDIA_TYPE* pmt,
[in] BOOL fTexture
);
HRESULT CompositeImage(
[in] IUnknown* pD3DDevice,
[in] LPDIRECTDRAWSURFACE7 pddsRenderTarget,
[in] AM_MEDIA_TYPE* pmtRenderTarget,
[in] REFERENCE_TIME rtStart,
[in] REFERENCE_TIME rtEnd,
[in] DWORD dwClrBkGnd,
[in] VMRVIDEOSTREAMINFO* pVideoStreamInfo,
[in] UINT cStreams
);
};
//=====================================================================
//
// IVMRVideoStreamControl
//
//=====================================================================
[
object,
local,
uuid(058d1f11-2a54-4bef-bd54-df706626b727),
helpstring("IVMRMixerStreamConfig Interface"),
pointer_default(unique)
]
interface IVMRVideoStreamControl: IUnknown
{
HRESULT SetColorKey(
[in] LPDDCOLORKEY lpClrKey // Source color key, set to 0xFFFFFFFF to disable
);
HRESULT GetColorKey(
[out] LPDDCOLORKEY lpClrKey
);
HRESULT SetStreamActiveState(
[in] BOOL fActive
);
HRESULT GetStreamActiveState(
[out] BOOL* lpfActive
);
};
//=====================================================================
//
// IVMRSurface
//
//=====================================================================
[
local,
object,
local,
uuid(a9849bbe-9ec8-4263-b764-62730f0d15d0),
helpstring("IVMRSurface Interface"),
pointer_default(unique)
]
interface IVMRSurface : IUnknown
{
HRESULT IsSurfaceLocked();
HRESULT LockSurface(
[out] BYTE** lpSurface
);
HRESULT UnlockSurface();
HRESULT GetSurface(
[out] LPDIRECTDRAWSURFACE7 *lplpSurface
);
};
//=====================================================================
//
// IID_IVMRImagePresenterConfig - this interface allows applications
// to configure the default Microsoft provided allocator-presenter
// inorder to simplify the implementation of their own
// allocator-presenter plug-in.
//
//=====================================================================
[
local,
object,
local,
uuid(9f3a1c85-8555-49ba-935f-be5b5b29d178),
helpstring("IVMRImagePresenterConfig Interface"),
pointer_default(unique)
]
interface IVMRImagePresenterConfig : IUnknown
{
HRESULT SetRenderingPrefs(
[in] DWORD dwRenderFlags // see VMRRenderPrefs for valid flags
);
HRESULT GetRenderingPrefs(
[out] DWORD* dwRenderFlags // see VMRRenderPrefs for valid flags
);
}
//=====================================================================
//
// IID_IVMRImagePresenterExclModeConfig - this interface allows applications
// to configure the DDraw exclusive mode allocator-presenter. This
// interface extends the IVMRImagePresenterConfig interface defined
// above and is only implemented by the CLSID_AllocPresenterDDXclMode
// allocator-presenter object.
//
//=====================================================================
[
local,
object,
local,
uuid(e6f7ce40-4673-44f1-8f77-5499d68cb4ea),
helpstring("IVMRImagePresenterExclModeConfig Interface"),
pointer_default(unique)
]
interface IVMRImagePresenterExclModeConfig : IVMRImagePresenterConfig
{
HRESULT SetXlcModeDDObjAndPrimarySurface(
[in] LPDIRECTDRAW7 lpDDObj,
[in] LPDIRECTDRAWSURFACE7 lpPrimarySurf
);
HRESULT GetXlcModeDDObjAndPrimarySurface(
[out] LPDIRECTDRAW7* lpDDObj,
[out] LPDIRECTDRAWSURFACE7* lpPrimarySurf
);
}
//=====================================================================
//
// IVPManager
//
//=====================================================================
[
local,
object,
local,
uuid(aac18c18-e186-46d2-825d-a1f8dc8e395a),
helpstring("IVPManager Interface"),
pointer_default(unique)
]
interface IVPManager : IUnknown
{
// Use this method on a Multi-Monitor system to specify to the
// video port manager filter which videoport index is used
// to an upstream decoder filter.
//
HRESULT SetVideoPortIndex(
[in] DWORD dwVideoPortIndex // the video port number that this is connected to
);
// This method returns the current video port index being used by the VPM.
//
HRESULT GetVideoPortIndex(
[out] DWORD* pdwVideoPortIndex // the video port number that this is connected to
);
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -