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

📄 videocapture.h

📁 VC++6开发指南的源代码第24章-第25章
💻 H
字号:
// VideoCapture.h: interface for the VideoCapture class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_VIDEOCAPTURE_H__5C825E61_611A_11D6_889B_000B2B0F84B6__INCLUDED_)
#define AFX_VIDEOCAPTURE_H__5C825E61_611A_11D6_889B_000B2B0F84B6__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000



#include<vfw.h>
#include<afxmt.h>
//#include<afxole.h>

/****************************   NOTE **************************/
//  If the parameters below are changed then change following
//  > cdata & cbuffer_size in PTPHelpDlg.cpp
//  > rgbdata & buffersize in PTPHelpDlg.cpp
//  > update CPARAMS structure before compression
//  > computation of local_wnd_x para in OnInitDialog()
//
////////////////////////////////////////////////////////////////

#define QCIF_WIDTH  176
#define QCIF_HEIGHT 144

#define IMAGE_WIDTH       QCIF_WIDTH
#define IMAGE_HEIGHT      QCIF_HEIGHT
    

class VideoCapture  
{
public:
	
	HWND m_capwnd;
	CStdioFile log;
	CAPDRIVERCAPS caps;
	CMutex protectframe;
	int avgaudiosize;
	BOOL isOver;
	CDialog *dlg;
	BITMAPINFOHEADER m_bmpheader;
	BITMAPINFO m_bmpinfo;

	VideoCapture();
	virtual ~VideoCapture();
	void SetDialog(CDialog *dlg);
	BOOL Initialize();
	BOOL SetCapturePara();
	void Destroy();
	void GetDriverCaps();
	void SetAudioFormat();
	int AllocateMemory(PBITMAPINFO &bmpinfo);
	int getFormatSize(BITMAPINFO bmp);
    int getImageSize(BITMAPINFO bmp);

	BOOL StartCapture();
	BOOL StopCapture();

    friend LRESULT CALLBACK OnCaptureVideo(HWND hWnd, LPVIDEOHDR lpheader) ;


};


#endif // !defined(AFX_VIDEOCAPTURE_H__5C825E61_611A_11D6_889B_000B2B0F84B6__INCLUDED_)

⌨️ 快捷键说明

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