📄 vmr9.idl
字号:
///////////////////////////////////////////////////////////////////////////////
//
// Public Interfaces for the DX9 Video Mixing Renderer DShow filter
//
// Copyright (c) 1999 - 2002, Microsoft Corporation. All rights reserved.
///////////////////////////////////////////////////////////////////////////////
import "unknwn.idl";
cpp_quote("#if 0")
// This is temporary work around to persuade
// MIDL to allow forward declarations.
typedef DWORD IDirect3DDevice9;
typedef DWORD IDirect3DSurface9;
typedef DWORD D3DFORMAT;
typedef DWORD D3DCOLOR;
typedef DWORD D3DPOOL;
typedef LONGLONG REFERENCE_TIME;
typedef DWORD* HMONITOR;
typedef struct {DWORD dw1; DWORD dw2;} AM_MEDIA_TYPE;
cpp_quote ("#endif")
// public interfaces supported by the VMR9
interface IVMRSurface9;
interface IVMRSurfaceAllocator9;
interface IVMRSurfaceAllocatorNotify9;
interface IVMRImagePresenter9;
interface IVMRImagePresenterConfig9;
interface IVMRMonitorConfig9;
interface IVMRWindowlessControl9;
interface IVMRMixerControl9;
interface IVMRImageCompositor9;
interface IVMRMixerBitmap9;
interface IVMRFilterConfig9;
interface IVMRAspectRatioControl9;
interface IVMRVideoStreamControl9;
///////////////////////////////////////////////////////////////////////////////
//
// Allocator Presenter interfaces
//
///////////////////////////////////////////////////////////////////////////////
//=====================================================================
//
// IVMRImagePresenter9
//
//=====================================================================
typedef enum {
VMR9Sample_SyncPoint = 0x00000001,
VMR9Sample_Preroll = 0x00000002,
VMR9Sample_Discontinuity = 0x00000004,
VMR9Sample_TimeValid = 0x00000008,
} VMR9PresentationFlags;
typedef struct _VMR9PresentationInfo {
DWORD dwFlags;
IDirect3DSurface9* lpSurf;
REFERENCE_TIME rtStart;
REFERENCE_TIME rtEnd;
SIZE szAspectRatio;
RECT rcSrc;
RECT rcDst;
DWORD dwReserved1;
DWORD dwReserved2;
} VMR9PresentationInfo;
[
local,
object,
local,
uuid(69188c61-12a3-40f0-8ffc-342e7b433fd7),
helpstring("IVMRImagePresenter9 Interface"),
pointer_default(unique)
]
interface IVMRImagePresenter9 : IUnknown
{
HRESULT StartPresenting(
[in] DWORD_PTR dwUserID
);
HRESULT StopPresenting(
[in] DWORD_PTR dwUserID
);
HRESULT PresentImage(
[in] DWORD_PTR dwUserID,
[in] VMR9PresentationInfo* lpPresInfo
);
};
//=====================================================================
//
// IVMRSurfaceAllocator
//
//=====================================================================
typedef enum {
// surface types/usage
VMR9AllocFlag_3DRenderTarget = 0x0001,
VMR9AllocFlag_DXVATarget = 0x0002,
//
// VMR9AllocFlag_TextureSurface can be combined with
// DXVATarget and 3DRenderTarget
//
VMR9AllocFlag_TextureSurface = 0x0004,
VMR9AllocFlag_OffscreenSurface = 0x0008,
VMR9AllocFlag_UsageReserved = 0x00F0,
VMR9AllocFlag_UsageMask = 0x00FF
// surface
} VMR9SurfaceAllocationFlags;
typedef struct _VMR9AllocationInfo {
DWORD dwFlags; // see VMR9SurfaceAllocationFlags
DWORD dwWidth;
DWORD dwHeight;
D3DFORMAT Format; // 0 means use a format compatible with the display
D3DPOOL Pool;
DWORD MinBuffers;
SIZE szAspectRatio;
SIZE szNativeSize;
} VMR9AllocationInfo;
[
local,
object,
local,
uuid(8d5148ea-3f5d-46cf-9df1-d1b896eedb1f),
helpstring("IVMRSurfaceAllocator9 Interface"),
pointer_default(unique)
]
interface IVMRSurfaceAllocator9 : IUnknown
{
HRESULT InitializeDevice(
[in] DWORD_PTR dwUserID,
[in] VMR9AllocationInfo* lpAllocInfo,
[in, out] DWORD* lpNumBuffers
);
HRESULT TerminateDevice(
[in] DWORD_PTR dwID
);
HRESULT GetSurface(
[in] DWORD_PTR dwUserID,
[in] DWORD SurfaceIndex,
[in] DWORD SurfaceFlags,
[out] IDirect3DSurface9** lplpSurface
);
HRESULT AdviseNotify(
[in] IVMRSurfaceAllocatorNotify9* lpIVMRSurfAllocNotify
);
};
//=====================================================================
//
// IVMRSurfaceAllocatorNotify9
//
//=====================================================================
[
local,
object,
local,
uuid(dca3f5df-bb3a-4d03-bd81-84614bfbfa0c),
helpstring("IVMRSurfaceAllocatorNotify9 Interface"),
pointer_default(unique)
]
interface IVMRSurfaceAllocatorNotify9 : IUnknown
{
HRESULT AdviseSurfaceAllocator(
[in] DWORD_PTR dwUserID,
[in] IVMRSurfaceAllocator9* lpIVRMSurfaceAllocator
);
HRESULT SetD3DDevice(
[in] IDirect3DDevice9* lpD3DDevice,
[in] HMONITOR hMonitor
);
HRESULT ChangeD3DDevice(
[in] IDirect3DDevice9* lpD3DDevice,
[in] HMONITOR hMonitor
);
HRESULT AllocateSurfaceHelper(
[in] VMR9AllocationInfo* lpAllocInfo,
[in, out] DWORD* lpNumBuffers,
[out] IDirect3DSurface9** lplpSurface
);
HRESULT NotifyEvent(
[in] LONG EventCode,
[in] LONG_PTR Param1,
[in] LONG_PTR Param2
);
};
///////////////////////////////////////////////////////////////////////////////
//
// Application control and configuration interfaces
//
///////////////////////////////////////////////////////////////////////////////
//=====================================================================
//
// IVMRWindowlessControl9
//
//=====================================================================
typedef enum {
VMR9ARMode_None,
VMR9ARMode_LetterBox
} VMR9AspectRatioMode;
[
local,
object,
local,
uuid(8f537d09-f85e-4414-b23b-502e54c79927),
helpstring("IVMRWindowlessControl Interface"),
pointer_default(unique)
]
interface IVMRWindowlessControl9 : IUnknown
{
//
//////////////////////////////////////////////////////////
// Video size and position information
//////////////////////////////////////////////////////////
//
HRESULT GetNativeVideoSize(
[out] LONG* lpWidth,
[out] LONG* lpHeight,
[out] LONG* lpARWidth,
[out] LONG* lpARHeight
);
HRESULT GetMinIdealVideoSize(
[out] LONG* lpWidth,
[out] LONG* lpHeight
);
HRESULT GetMaxIdealVideoSize(
[out] LONG* lpWidth,
[out] LONG* lpHeight
);
HRESULT SetVideoPosition(
[in] const LPRECT lpSRCRect,
[in] const LPRECT lpDSTRect
);
HRESULT GetVideoPosition(
[out] LPRECT lpSRCRect,
[out] LPRECT lpDSTRect
);
HRESULT GetAspectRatioMode(
[out] DWORD* lpAspectRatioMode
);
HRESULT SetAspectRatioMode(
[in] DWORD AspectRatioMode
);
//
//////////////////////////////////////////////////////////
// Display and clipping management
//////////////////////////////////////////////////////////
//
HRESULT SetVideoClippingWindow(
[in] HWND hwnd
);
HRESULT RepaintVideo(
[in] HWND hwnd,
[in] HDC hdc
);
HRESULT DisplayModeChanged();
//
//////////////////////////////////////////////////////////
// GetCurrentImage
//
// Returns the current image being displayed. This images
// is returned in the form of packed Windows DIB.
//
// GetCurrentImage can be called at any time, also
// the caller is responsible for free the returned memory
// by calling CoTaskMemFree.
//
// Excessive use of this function will degrade video
// playback performed.
//////////////////////////////////////////////////////////
//
HRESULT GetCurrentImage(
[out] BYTE** lpDib
);
//
//////////////////////////////////////////////////////////
// Border Color control
//
// The border color is color used to fill any area of the
// the destination rectangle that does not contain video.
// It is typically used in two instances. When the video
// straddles two monitors and when the VMR is trying
// to maintain the aspect ratio of the movies by letter
// boxing the video to fit within the specified destination
// rectangle. See SetAspectRatioMode above.
//////////////////////////////////////////////////////////
//
HRESULT SetBorderColor(
[in] COLORREF Clr
);
HRESULT GetBorderColor(
[out] COLORREF* lpClr
);
};
//=====================================================================
//
// IVMRMixerControl9
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -