amvideo.h.svn-base

来自「ffshow源码」· SVN-BASE 代码 · 共 434 行 · 第 1/2 页

SVN-BASE
434
字号
//------------------------------------------------------------------------------// File: AMVideo.h//// Desc: Video related definitions and interfaces for ActiveMovie.//// Copyright (c) 1992-2001, Microsoft Corporation.  All rights reserved.//------------------------------------------------------------------------------#ifndef __AMVIDEO__#define __AMVIDEO__#ifdef __cplusplusextern "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 IDirectDrawVideoDECLARE_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 IQualPropDECLARE_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 IFullScreenVideoDECLARE_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 IFullScreenVideoExDECLARE_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 IBaseVideoMixerDECLARE_INTERFACE_(IBaseVideoMixer, IUnknown){    STDMETHOD(SetLeadPin)(THIS_ int iPin) PURE;    STDMETHOD(GetLeadPin)(THIS_ int *piPin) PURE;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?