WEB开发网
开发学院软件开发VC 点对点视频会议程序:VideoNet 阅读

点对点视频会议程序:VideoNet

 2006-07-23 11:34:04 来源:WEB开发网   
核心提示: 使用VFW(Video For Windows)API进行视频捕获,它提供了通过webcam进行视频捕获,点对点视频会议程序:VideoNet(2), VideoCapture.h 和VideoCapture.cpp包含了处理视频捕获的代码,如下代码说明了如何使用该类:// Create

使用VFW(Video For Windows)API进行视频捕获,它提供了通过webcam进行视频捕获。 VideoCapture.h 和VideoCapture.cpp包含了处理视频捕获的代码。

如下代码说明了如何使用该类:

// Create instance of Class
  vidcap=new VideoCapture();
// This is later used to call display function of the main
// dialog class when the frame is captured...
  vidcap->SetDialog(this);
// This does lot of work, including connecting to the driver
// and setting the desired video format. Returns TRUE if
// successfully connected to videocapture device.
  vidcap->Initialize();
// If successfully connected, you can get the BITMAPINFO
// structure associated with the video format. This is later
// used to display the captured frame...
  this->m_bmpinfo=&vidcap->m_bmpinfo;
// Now you can start the capture....
  vidcap->StartCapture();
// Once capture is started, frames will arrive in the "OnCaptureVideo"
// callback function of the VideoCapture class. Here you call the
// display function to display the frame.
// To stop the capture
  vidcap->StopCapture();
// If your job is over....just destroy it..
  vidcap->Destroy();
要使以上代码通过编译,你应该链接适当的库:

#pragma comment(lib,"vfw32")
#pragma comment(lib,"winmm")

显示捕获的视频帧

上一页  1 2 3 4  下一页

Tags:视频会议 程序 VideoNet

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接