⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basesurf.h

📁 linux下的一款播放器
💻 H
📖 第 1 页 / 共 2 页
字号:
        UINT32   ulFlags;        UINT32   dwDDFlags;        UCHAR    *pImageData;        BOOL     bAlpha;        HXxRect  rcSrc;        HXxRect  rcDst;        HXBitmapInfoHeader bmi;        INT32    count;        AlphaStruct* pAlphaList;    } tFrameElement;    //Color Access Functions/    ColorFuncAccess*        zm_pColorAcc;    CYUVInputFormatMngr*    m_pyuvInputMngr;    CHWMemObj*              m_pHwMemObj;    //Scroll bar support    double        m_fScrollBarZoom;    //Support for Alpha Blending.....    UCHAR*              m_pucLastImage;    HXBitmapInfoHeader m_bmiLastImage;    HXBitmapInfoHeader m_bmiLastBlt;    UINT32              m_ulLastBlendTime;public:        CHXMapPtrToPtr m_YUVAImageList; //Maps site to YUVA image.    CHXSimpleList  m_imageBlocks;   //List of YUV blended images to paint.    CHXBaseSite* GetSite()  {return m_pSite;}protected:    CHXSimpleList  m_LinkedSites;       HXREGION*        m_pAdditionalColorKey;    BOOL           m_bYUVBlending;    BOOL           m_bVideoSurface2;    BOOL           m_bOptimalVideoScheduler;        //XXXgfw I am assuming now that I can use the below scaling for    //XXXgfw my YUV optimized alphablending...    double m_scaleFactorX;    double m_scaleFactorY;        HXxRect* m_paSrcRects;    HXxRect* m_paDestRects;        //paSrcRects and paDestRects need to be HX_FREEed when you are done    //with them. internally a realloc is done so don't free then until    //you are sure you are done or want to reclaim the memory.    void _ConstructRects(HXxRect&  rSrcRectCopy,                         HXxRect&  rDestRectCopy,                         BOOL      bDoAlpha,                         int&      nNumRects,                         HXxRect** paSrcRects,                          HXxRect** paDestRects,                         HXREGION*   pAdditionalRegion = NULL                         );    //This determines what is the best way to ask for system memory to    //be filled in by rvrend under VidSurf2.  You must delete the    //returned region.    HXREGION* _DetermineBestRegion();public:        //Returns if any blending is going to happen or not.    BOOL _SetUpBlendRects( HXBitmapInfoHeader* pBitmapInfo = NULL,                           UCHAR* pImageData = NULL);protected:        BOOL _RecursiveYUVBlend( Image* pImage,                             HXxRect boundingRect,                             CBaseSurface* pSurface,                             INT32 lXOffset,                             INT32 lYOffset);            //blends the rects and put the results into m_imageBlocks.    BOOL _BlendYUVRects( AlphaStruct* pList, int nCount, UINT32 ulDestFourCC);    BOOL _DoYUVRectsIntersect();        void _RemoveYUVImageLists();    CHXBaseSite* _SearchForYUV(CHXBaseSite* pSite);    BOOL _AlphaSetupAndBlending(HXBitmapInfoHeader* pBitmapInfo,                                UCHAR*               pImageData,                                HXxRect&             rSrcRect,                                HXxRect&             rDestRect                                );       void _AlphaBlend( HXREGION*              pRegionToBlend,    //window coords                       UCHAR*               pBottomImage,                      HXBitmapInfoHeader* pbmiBottomImageInfo,                      HXxPoint*            pBottomPosition,   //window coords                      UCHAR*               pTopImage,                      HXBitmapInfoHeader* pbmiTopImageInfo,                      HXxPoint*            pTopPosition      //window coords                      );       //Returns whether or not this graphics device allows the shrinking of    //overlays.    virtual BOOL _AllowsOverlayShrinking();    virtual void _WaitForFlush();    BOOL m_bImageBlocksGood;    void         AlignRect(HXxRect *pRect, int nMaxWidth, int nMaxHeight);    virtual void CreateColorAccess(IUnknown* pUnk) {zm_pColorAcc = new ColorFuncAccess(pUnk);}    virtual void CreateYuvInputMngr();    BOOL    m_bAllocHook;   // Are we tracing mem allocs   public:       //To test if a pixel is transparent or not.    BOOL IsPixelTransparent(HXxPoint& point, INT32 alpha );    HXBitmapInfo* GetLastBMI() { return (HXBitmapInfo*)&m_bmiLastBlt; }    void InitSurface(IUnknown* pUnk);          //Virtual Functions which must me implemented by each OS.    /************************************************************************     *  Method:     *      _ReleaseSurface     *  Purpose:     *      Destroys pSurface     */    virtual void      _ReleaseSurface(CBaseRootSurface* pSurface) = 0;    /************************************************************************     *  Method:     *      _DrawBlack     *  Purpose:     *      Fill the entire region with black     */    virtual void      _DrawBlack(void* pWindow) = 0;    /************************************************************************     *  Method:     *      _BltToPrimary     *  Purpose:     *      Transfer data from offscreen memory to the primary surface.     *      This may not be applicable on some platforms.     */    virtual HX_RESULT _BltToPrimary(REF(HXxRect) rDestRect, REF(HXxRect) rSrcRect) = 0;    /************************************************************************     *  Method:     *      _CreateBuffer     *  Purpose:     *      Create an offscreen (non-overlay) video buffer.  This is used     *      when overlay is not available .     *      This may not be applicable on some platforms.     */    virtual void      _CreateBuffer() = 0;    /************************************************************************     *  Method:     *      _GetCaps     *  Purpose:     *      Query the current display device's drawing capabilities.  See     *      the list of display caps at the top of this file.     */    virtual HX_RESULT _GetCaps(UINT32 *pfSurfaceCaps) = 0;    /************************************************************************     *  Method:     *      _CreateOverlay     *  Purpose:     *      Create a video surface of type cid at dimenstions x,y.  If     *      bOverlay is TRUE, the surface must be overlay.     */    virtual HX_RESULT _CreateOverlay(BOOL bOverlay, int cid, int x, int y) = 0;     /************************************************************************     *  Method:     *      _LockInternalSurface     *  Purpose:     *      Obtain a writable pointer to the allocated video surface and     *      prepare to write to it.     */    virtual HX_RESULT _LockInternalSurface(UCHAR** ppSurfPtr, LONG32* pnSurfPitch, REF(HXxSize) srcSize) = 0;    /************************************************************************     *  Method:     *      _UnlockInternalSurface     *  Purpose:     *      Inform the video surface that you are finished writing to it.     */    virtual HX_RESULT _UnlockInternalSurface(UCHAR* pSurfPtr) = 0;        /************************************************************************     *  Method:     *      _SetupDCObjects     *  Purpose:     *      Set the current display context with a specific brush and pen.     *      This may not be applicable on some platforms.     */    virtual void      _SetupDCObjects(HXxDC hxxDC,                                      void** phOldBrush,                                      void** phOldPen) = 0;    /************************************************************************     *  Method:     *      _FillRectangle     *  Purpose:     *      Fill the specified rectangle with the current brush.     */    virtual void      _FillRectangle(HXxDC hxxDC,                                     UINT32 left,                                     UINT32 top,                                     UINT32 right,                                     UINT32 bottom) = 0;        /************************************************************************     *  Method:     *      _RestoreDCObjects     *  Purpose:     *      Restore the default pen and brush of the display context.     *      This may not be applicable on some platforms.     */    virtual void  _RestoreDCObjects(HXxDC hxxDC, void* hOldBrush, void* hOldPen) = 0;    /************************************************************************     *  Method:     *      _GetCompositionSurfaceHXxDC     *  Purpose:     *      Get the display context of the composition surface.     *      This may not be applicable on some platforms.     */    virtual void  _GetCompositionSurfaceHXxDC(HXxDC *hdc) = 0;    /************************************************************************     *  Method:     *      _ReleaseCompositionSurfaceHXxDC     *  Purpose:     *      Release the display context of the composition surface.     *      This may not be applicable on some platforms.     */    virtual void  _ReleaseCompositionSurfaceHXxDC(HXxDC hdc) = 0;    /************************************************************************     *  Method:     *      _InsureColorMatch     *  Purpose:     *      Match inColor with that of the current display device.     *      This may not be applicable on some platforms.     */    virtual INT32 _InsureColorMatch(INT32 InColor) = 0;    /************************************************************************     *  Method:     *      _SetColorKey     *  Purpose:     *      Set the color of the overlay's colorkey.     *      This may not be applicable on some platforms.     */    virtual void  _SetColorKey(INT32 nColorSpaceLowValue, INT32 nColorSpaceHighValue) = 0;    /************************************************************************     *  Method:     *      _UpdateOverlay     *  Purpose:     *      Update the position, size, and mode of the overaly.     *      This may not be applicable on some platforms.     */    virtual void  _UpdateOverlay(HXxRect* src, HXxRect* dest, INT32 inFlags) = 0;    /************************************************************************     *  Method:     *      _IsSurfaceVisible     *  Purpose:     *      Is the current video surface visible.     */    virtual BOOL  _IsSurfaceVisible() = 0;    /************************************************************************     *  Method:     *      _ReleaseSurface     *  Purpose:     *      Destroys the allocated video surface     */    virtual void  _ReleaseSurface() = 0;    /************************************************************************     *  Method:     *      _GetDC     *  Purpose:     *      Get the display context for the site that owns this surface.     *      This may not be applicable on some platforms.     */    virtual HXxDC _GetDC(HXxWindow*) = 0;    /************************************************************************     *  Method:     *      _ReleaseDC     *  Purpose:     *      Release the display context for the site that owns this surface.     *      This may not be applicable on some platforms.     */    virtual void  _ReleaseDC(HXxWindow*, HXxDC) = 0;        virtual void  _ColorWindows();    virtual BOOL  UsingOverlay();    virtual void _LockBlitter() {};    virtual void _UnlockBlitter() {};    virtual void _FlushSurfaces() {};    virtual void _WaitForQueuedFrames() {};    virtual HX_RESULT _ScheduleFrameForDisplay(void* pOsData,                                               tFrameElement* pItem,                                               UINT32 nResolution);    virtual void CreateHWMemObj(int cid) {};};#endif  /* _BASESURF_H_ */

⌨️ 快捷键说明

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