📄 vmrender.idl
字号:
MixerPref_PointFiltering = 0x00000020, // use point filtering
MixerPref_FilteringMask = 0x000000F0, // OR of all above flags
MixerPref_RenderTargetRGB = 0x00000100,
MixerPref_RenderTargetYUV420 = 0x00000200,
MixerPref_RenderTargetYUV422 = 0x00000400,
MixerPref_RenderTargetYUV444 = 0x00000800, // AYUV render target.
MixerPref_RenderTargetReserved = 0x0000F000, // 4 bits reserved for future use.
MixerPref_RenderTargetMask = 0x0000FF00, // OR of all above flags
} VMRMixerPrefs;
//
// Normalized relative rectangle
// Coordinate ranges: x=[0...1) y=[0...1)
// Where the output window goes from 0,0 (closed inclusive lower bound)
// to 1,1 (open exclusive upper bound)
//
typedef struct _NORMALIZEDRECT
{
float left;
float top;
float right;
float bottom;
} NORMALIZEDRECT, *PNORMALIZEDRECT;
[
local,
object,
local,
uuid(1c1a17b0-bed0-415d-974b-dc6696131599),
helpstring("IVMRMixerControl Interface"),
pointer_default(unique)
]
interface IVMRMixerControl : IUnknown
{
HRESULT SetAlpha(
[in] DWORD dwStreamID,
[in] float Alpha // Source alpha premultication factor (global alpha for source)
);
HRESULT GetAlpha(
[in] DWORD dwStreamID,
[out] float* pAlpha
);
HRESULT SetZOrder(
[in] DWORD dwStreamID,
[in] DWORD dwZ
);
HRESULT GetZOrder(
[in] DWORD dwStreamID,
[out] DWORD* pZ
);
HRESULT SetOutputRect(
[in] DWORD dwStreamID,
[in] const NORMALIZEDRECT *pRect
);
HRESULT GetOutputRect(
[in] DWORD dwStreamID,
[out] NORMALIZEDRECT *pRect
);
HRESULT SetBackgroundClr(
[in] COLORREF ClrBkg
);
HRESULT GetBackgroundClr(
[in] COLORREF* lpClrBkg
);
HRESULT SetMixingPrefs(
[in] DWORD dwMixerPrefs // a combination of VMRMixingPrefFlags
);
HRESULT GetMixingPrefs(
[out] DWORD* pdwMixerPrefs
);
};
///////////////////////////////////////////////////////////////////////////////
//
// 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_RestrictToInitialMonitor = 0x00000000, // not implemented do not use
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_Reserved = 0x00000010, // note: used to be RestrictToInitialMonitor
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
);
}
//=====================================================================
//
// IVMRAspectRatioControl
//
//=====================================================================
[
object,
local,
uuid(ede80b5c-bad6-4623-b537-65586c9f8dfd),
helpstring("IVMRAspectRatioControl Interface"),
pointer_default(unique)
]
interface IVMRAspectRatioControl : IUnknown
{
HRESULT GetAspectRatioMode(
[out] LPDWORD lpdwARMode
);
HRESULT SetAspectRatioMode(
[in] DWORD dwARMode
);
}
//=====================================================================
//
// IVMRDeinterlaceControl
//
// New interfaced introduced into the WindowsXP SP1 release of the VMR.
// This interface allows applications to control the DX-VA deinterlacing
// support provided by the VMR.
//
// The VMR needs to be set into "mixing" mode for this interface to work.
//
// SetDeinterlaceMode is only effective for new connections made to the
// VMR. It should be noted that the graphics device driver may refuse
// to use the specified deinterlace mode, in which case 3 fallback
// policies are offered by the VMR, these being:
//
// 1. Fallback to the next best mode offered by the driver.
// 2. Fallback to the BOB deinterlace mode.
// 3. Fallback to the WEAVE deinterlace mode (ie. turn deinterlacing off).
//
//=====================================================================
typedef enum {
DeinterlacePref_NextBest = 0x01,
DeinterlacePref_BOB = 0x02,
DeinterlacePref_Weave = 0x04,
DeinterlacePref_Mask = 0x07
} VMRDeinterlacePrefs;
typedef enum {
// the algorithm is unknown or proprietary
DeinterlaceTech_Unknown = 0x0000,
// the algorithm creates the missing lines by repeating
// the line either above or below it - this method will look very jaggy and
// isn't recommended
DeinterlaceTech_BOBLineReplicate = 0x0001,
// the algorithm creates the missing lines by vertically stretching each
// video field by a factor of two, for example by averaging two lines or
// using a [-1, 9, 9, -1]/16 filter across four lines.
// Slight vertical adjustments are made to ensure that the resulting image
// does not "bob" up and down.
DeinterlaceTech_BOBVerticalStretch = 0x0002,
// the pixels in the missing line are recreated by a median filtering operation
DeinterlaceTech_MedianFiltering = 0x0004,
// the pixels in the missing line are recreated by an edge filter.
// In this process, spatial directional filters are applied to determine
// the orientation of edges in the picture content, and missing
// pixels are created by filtering along (rather than across) the
// detected edges.
DeinterlaceTech_EdgeFiltering = 0x0010,
// the pixels in the missing line are recreated by switching on a field by
// field basis between using either spatial or temporal interpolation
// depending on the amount of motion.
DeinterlaceTech_FieldAdaptive = 0x0020,
// the pixels in the missing line are recreated by switching on a pixel by pixel
// basis between using either spatial or temporal interpolation depending on
// the amount of motion..
DeinterlaceTech_PixelAdaptive = 0x0040,
// Motion Vector Steering identifies objects within a sequence of video
// fields. The missing pixels are recreated after first aligning the
// movement axes of the individual objects in the scene to make them
// parallel with the time axis.
DeinterlaceTech_MotionVectorSteered = 0x0080
} VMRDeinterlaceTech;
typedef struct _VMRFrequency {
DWORD dwNumerator;
DWORD dwDenominator;
} VMRFrequency;
typedef struct _VMRVideoDesc {
DWORD dwSize;
DWORD dwSampleWidth;
DWORD dwSampleHeight;
BOOL SingleFieldPerSample;
DWORD dwFourCC;
VMRFrequency InputSampleFreq;
VMRFrequency OutputFrameFreq;
} VMRVideoDesc;
typedef struct _VMRDeinterlaceCaps {
DWORD dwSize;
DWORD dwNumPreviousOutputFrames;
DWORD dwNumForwardRefSamples;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -