drawyuv.h
来自「DRAWYUV程序是用于摄像头的数据回放,用了directshow,可以用在VC」· C头文件 代码 · 共 79 行
H
79 行
/*
* DrawYUV.h
*
* Draw YUV420P raw
*
* DirectDraw YUV420P project
*
* Copyright (c) 2004-2005 for Cyansoft Studio.
* All Rights Reserved.
*
* Contributor(s): ______________________________________.
*
* $Log: DrawYUV.h,v $
* Revision 1.1 2005/01/17 13:43:00 jin.bai
* Initial revision
*
*
*/
#ifndef _DRAW_YUV_INC_
#define _DRAW_YUV_INC_
#ifdef DRAWYUV_EXPORTS
#define DRAWYUV_API __declspec(dllexport)
#else
#define DRAWYUV_API __declspec(dllimport)
#endif
//
// Export functions
//
DRAWYUV_API BOOL DrawYUVCreate(LPVOID *ppControl, LPCTSTR lpszWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hwndParent = NULL, BOOL fOverlay = FALSE);
DRAWYUV_API BOOL DrawYUVSetWindowPos(LPVOID pControl, HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT uFlags);
DRAWYUV_API BOOL DrawYUVDraw(LPVOID pControl, LPBYTE lpBuffer, DWORD dwSize);
DRAWYUV_API BOOL DrawYUVShowWindow(LPVOID pControl, int nCmdShow);
DRAWYUV_API BOOL DrawYUVClose(LPVOID pControl);
DRAWYUV_API BOOL DrawYUVIsClose(LPVOID pControl);
//
// DrawYUV class
//
class DrawYUV
{
public:
DrawYUV();
~DrawYUV();
BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hwndParent = NULL, BOOL fOverlay = FALSE);
BOOL SetWindowPos(HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT uFlags);
BOOL Draw(LPBYTE lpBuffer, DWORD dwSize);
BOOL ShowWindow(int nCmdShow);
BOOL Close();
BOOL IsClose();
protected:
BOOL AreOverlaysSupported();
void memcpy_MMX( void *dest, const void *src, unsigned int nbytes );
private:
DisplayWindow *m_pDisplayWindow;
Converter *m_pConverter;
DWORD m_dwWidth;
DWORD m_dwHeight;
DWORD m_dwBitCount;
// DirectDraw
LPDIRECTDRAW m_lpDD;
LPDIRECTDRAWSURFACE m_lpDDSPrimary;
LPDIRECTDRAWCLIPPER m_lpDDClipper;
LPDIRECTDRAWSURFACE m_lpDDSBack;
LPDIRECTDRAWSURFACE m_lpDDSOverlay;
BOOL m_bClosed;
BOOL m_bIsOverlay;
};
#endif // _DRAW_YUV_INC_
// End of File /////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?