📄 capturebuf.h
字号:
/********************************************************************
*
* =-----------------------------------------------------------------=
* = ____ _________ =
* = / _ \ \___ __/ =
* = / /_/ / ____ / / =
* = / _ \ ● / _ \ / / =
* = / /_/ // // / / // / =
* = \______//_//_/ /_//_/ =
* = =
* = Copyright (c) BIN Technology studio,2004 =
* = LET'Z BT =
* =-----------------------------------------------------------------=
*
* FileName : CaptureBuf.h CaptureBuf.cpp
* Description : 捕捉卡数据缓冲,完成对采集卡的初始化和数据流获取
*
* Author : 风间苍月(TuQbasic)
* Email : tuqbasic@sohu.com
*
* Create : 2004.04.10
* LastChange : 2004.04.12
*
* History :
********************************************************************/
#pragma once
#include "Capture\DSStream.h"
#include "Engine\hGraphic2D.h"
typedef struct _sCaptureParam
{
int cap_card;
int cap_pin;
unsigned int cap_width;
unsigned int cap_height;
HWND cap_hwnd;
bool cap_show;
_sCaptureParam(void)
{
cap_card= 0;
cap_pin= 1;
cap_width= 320;
cap_height= 240;
cap_hwnd= NULL;
cap_show= false;
}
}CAPTUREPARAM;
HRESULT InitCaptureCard(CAPTUREPARAM param);
void ReleaseCard(CAPTUREPARAM param);
// 保存采集卡的位图流,并将其扫描线置为正常顺序
class CCaptureBuf
{
public:
CCaptureBuf(void);
~CCaptureBuf(void);
// 分配所需的内存空间
bool Alloc(int cap_card);
// 释放内存
void Free(void);
// 从采集卡数据流中更新缓冲区数据
bool UpdateBuffer(int cap_card);
bool UpdateBuffer(LPI_DXSURFACE ps);
void Bitmap2Surface(LPI_DXSURFACE ps);
inline const BITMAPINFOHEADER * const GetBitmapInfo(void) { return m_phdr;}
private:
BITMAPINFOHEADER *m_phdr;
long m_size;
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -