📄 hxvsurf.h
字号:
* "Version" - ULONG32 version number. * "InputFormat" - IHXBuffer containing input HXBitmapInfoHeader * flattened as UCHAR array. * "OutputFormat" - IHXBuffer containing output HXBitmapInfoHeader * flattened as UCHAR array. * Others can obviously be included for specific hook-hook * communications, and more may also be required. ***/ STDMETHOD(GetProperties) (THIS_ REF(IHXValues*) /* Out */ properties) PURE; /*** * IHXVideoHook::HookAddedNotification *** * This method is called by the IHXVideoHookSink for all of its * registered hooks whenever it registers another. This allows * registered hooks to redo their checking of the other hooks whenever * new ones enter the loop. ***/ STDMETHOD(HookAddedNotification) (THIS_ IHXVideoHook* pNewHook) PURE;};/**************************************************************************** * * Interface: * * IHXVideoHookSink * * Purpose: * * Interface for IHXVideoHookSink objects. * * IID_IHXVideoHookSink: * * {00002201-0901-11d1-8B06-00A024406D59} * */DEFINE_GUID(IID_IHXVideoHookSink, 0x00002201, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);#undef INTERFACE#define INTERFACE IHXVideoHookSinkDECLARE_INTERFACE_(IHXVideoHookSink, IUnknown){ /* * IUnknown methods */ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj) PURE; STDMETHOD_(ULONG32,AddRef) (THIS) PURE; STDMETHOD_(ULONG32,Release) (THIS) PURE; /*** * IHXVideoHookSink::AddVideoHook *** * This method is called by an IHXVideoHook object which wishes to * connect to the receiving IHXVideoHookSink object to obtain video * frames immediately prior to blitting. pHook is the object requesting * registry, and pOptions is an IHXValues object containing optional * special flags affecting behavior. pFrameFormat should point to a * pre-allocated HXBitmapInfoHeader struct which on exit is filled in * with the bitmap format in which frame data will be supplied to * OnVideoFrame() and to which it will be expected to conform on exit of * OnVideoFrame(). If this format is inappropriate for input or output * formats, then after registration the IHXVideoHook object should use * the IHXVideoHookSink object's SetInputFormat() and/or * SetOutputFormat() methods to arrive at a mutually acceptable exchange * format, or to determine that none is available and take appropriate * action. *** * pOptions: * "ReceivesEvents" - 0:No, !0:Yes * "ReceivesHookAdded" - 0:No, !0:Yes * "ReceivesFrames" - 0:No, !0:Yes * "TakesAnySize" - 0:No, !0:Yes ***/ STDMETHOD(AddVideoHook) (THIS_ IHXVideoHook* /* In */ pHook, IHXValues* /* I/O */ pOptions, HXBitmapInfoHeader* /* Out */ pFrameFormat) PURE; /*** * IHXVideoHookSink::ForceSurfaceUpdate *** * This method provides a mechanism by which event-driven IHXVideoHook * objects can request that they be given a new image if the mouse is * clicked (for example). The entire frame is "damaged" so that * everything will be redrawn. ***/ STDMETHOD(ForceSurfaceUpdate) (THIS) PURE; /*** * IHXVideoHookSink::SetInputFormat * IHXVideoHookSink::SetOutputFormat *** * These methods provide a way for the IHXVideoHookSink to negotiate * with its registered IHXVideoHook objects about what image formats * they require or return respectively. pHook is the hook object * which is requesting a change in format, pRequested points to an * HXBitmapInfoHeader describing the format which the hook wants (either * to receive or return). * This method returns HXR_FAIL and does not change formats, unless * pRequested matches an acceptable format exactly, that format is * registered for future frame transactions, and HXR_OK is returned. * Should be called immediately after registration. ***/ STDMETHOD(SetInputFormat) (THIS_ IHXVideoHook* pHook, HXBitmapInfoHeader* pRequested) PURE; STDMETHOD(SetOutputFormat) (THIS_ IHXVideoHook* pHook, HXBitmapInfoHeader* pRequested) PURE; /*** * IHXVideoHookSink::GetVideoHookCount *** * This method returns the number of IHXVideoHook objects registered * with this IHXVideoHookSink. This value is only useful in the short * term as order and count may change for IHXVideoHook objects without * notice. Do not use it to store access to a given hook. ***/ STDMETHOD_(UINT16,GetVideoHookCount) (THIS) PURE; /*** * IHXVideoHookSink::GetVideoHook *** * This method provides access to registered IHXVideoHook objects by * index with valid indecies ranging from 0 to n-1 inclusive, where n * is the value returned by GetVideoHookCount(), provided no sources * have been added or removed since it was last called. ***/ STDMETHOD(GetVideoHook) (THIS_ UINT16 nIndex, REF(IUnknown*) pUnknown) PURE;};// $Private:/**************************************************************************** * * Interface: * * IHXRenderTimeLine * * Purpose: * * Provide IHXVideoSurface2 a time line for scheduling its video frames * * IID_IHXRenderTimeLine: * * {00002204-0901-11d1-8B06-00A024406D59} * */DEFINE_GUID(IID_IHXRenderTimeLine, 0x00002204, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59); #undef INTERFACE#define INTERFACE IHXRenderTimeLineDECLARE_INTERFACE_(IHXRenderTimeLine, IUnknown){ /* * IUnknown methods */ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj) PURE; STDMETHOD_(ULONG32,AddRef) (THIS) PURE; STDMETHOD_(ULONG32,Release) (THIS) PURE; /************************************************************************ * Method: * IHXRenderTimeLine::GetTimeLineValue * Purpose: * Get the current presentation time * * Notes: * returns HXR_TIMELINE_SUSPENDED when the time line is suspended */ STDMETHOD (GetTimeLineValue) (THIS_ /*OUT*/ REF(UINT32) ulTime) PURE;};/**************************************************************************** * * Interface: * * IHXVideoSurface2 * * Purpose: * * Provides hardware video buffers to render plugins * * IID_IHXVideoSurface2: * * {00002203-0901-11d1-8B06-00A024406D59} * */DEFINE_GUID(IID_IHXVideoSurface2, 0x00002203, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59); #undef INTERFACE#define INTERFACE IHXVideoSurface2DECLARE_INTERFACE_(IHXVideoSurface2, IUnknown){ /* * IUnknown methods */ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj) PURE; STDMETHOD_(ULONG32,AddRef) (THIS) PURE; STDMETHOD_(ULONG32,Release) (THIS) PURE; /************************************************************************ * Method: * IHXVideoSurface2::SetProperties * Purpose: * Request ulNumBuffers hardware buffers of the format described * in bmi. ulNumBuffers will contain the number of buffers actually * allocated. * pClock is the renderer's clock used for scheduling the video * frames received in the Present call. A NULL clock causes Present * to ignore the timestamp and display synchronously. */ STDMETHOD (SetProperties) (THIS_ /*IN/OUT*/ HXBitmapInfoHeader* bmi, /*IN/OUT*/ REF(UINT32) ulNumBuffers, /*IN*/ IHXRenderTimeLine* pClock) PURE; /************************************************************************ * Method: * IHXVideoSurface2::GetVideoMem * Purpose: * Requests the next available hardware video buffer. * If the presentation contains alpha blending, the blended regions * of the will be requested via VideoMemStruct.pAlphaList. Fill * each AlphaStruct with the subrect of the video frame specified * by AlphaStruct.rcImageRect. IHXVideoSurface2 will then alpha * blend the video with the presentation. * * This call blocks until a video buffer is available. bmi * describes the buffer returned. * * Notes: * The buffer format can change with each call so bmi must be * checked everytime. */ STDMETHOD (GetVideoMem) (THIS_ VideoMemStruct* /*IN/OUT*/ pVidMem, UINT32 ulFlags) PURE; /************************************************************************ * Method: * IHXVideoSurface2::ReleaseVideoMem * Purpose: * Called on a buffer returned from GetVideoMem to discard the * buffer without displaying it. */ STDMETHOD (ReleaseVideoMem) (THIS_ VideoMemStruct* pVidMem) PURE; /************************************************************************ * Method: * IHXVideoSurface2::Present * Purpose: * Called by renderer to put a video image on the screen at absoulte * time lTime. prDestRect and prSrcRect are relative coordinates. * prSrcRect with all zeros defaults to the entire surface dimensions * and prDestRect with all zeros defaults to the entire client widnow. * * Notes: * This is an asynchronous method. */ STDMETHOD (Present) (THIS_ VideoMemStruct* pVidMem, INT32 lTime, UINT32 ulFlags, HXxRect *prDestRect, HXxRect *prSrcRect) PURE; /************************************************************************ * Method: * IHXVideoSurface2::ColorConvert * Purpose: * Called by renderer to transform one video format to another. * It is optimized for writing to hardware memory. */ STDMETHOD (ColorConvert) (THIS_ INT32 fourCCIn, HXxSize *pSrcSize, HXxRect *prSrcRect, SourceInputStruct *pInput, INT32 fourCCOut, UCHAR *pDestBuffer, HXxSize *pDestSize, HXxRect *prDestRect, int nDestPitch) PURE; /************************************************************************ * Method: * IHXVideoSurface2::Flush * Purpose: * Cancel any pending Present calls. */ STDMETHOD_(void, Flush)(THIS) PURE; /************************************************************************ * Method: * IHXVideoSurface2::PresentIfReady * Purpose: * Optional method called by renderer to check the status of the * next Present. If will display the next image if it is time. This * method assists the scheduler that is not getting its time slices * due to OS latency, non-cooperative multi-tasking, or any other * reason. */ STDMETHOD (PresentIfReady) (THIS) PURE;};// $EndPrivate.// $Private:/**************************************************************************** * * Interface: * * IHXSubRectVideoSurface * * Purpose: * * Interface for IHXSubRectVideoSurface objects. * * IID_IHXSubRectVideoSurface: * * {00002205-0901-11d1-8B06-00A024406D59} * */DEFINE_GUID(IID_IHXSubRectVideoSurface, 0x00002205, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);#undef INTERFACE#define INTERFACE IHXSubRectVideoSurfaceDECLARE_INTERFACE_(IHXSubRectVideoSurface, IHXVideoSurface){ STDMETHOD(BltSubRects)( THIS_ UCHAR* /*IN*/ pImageBits, HXBitmapInfoHeader* /*IN*/ pBitmapInfo, HXxBoxRegion* /*IN*/ pDestRects, HXxBoxRegion* /*IN*/ pSrcRects, float fScaleFactorX, float fScaleFactorY ) PURE;};// $EndPrivate.#endif /* _HXVSURF_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -