Video capturing tutorial (VC + VFW)

Source: Internet
Author: User

For more information about VFW, see ~~~~~~

 

Http://www.diybl.com/course/3_program/c++/cppjs/20090409/164675.html

 

Http://blog.csdn.net/xilyu/archive/2008/02/17/2100636.aspx

 

Http://www.yuanma.org/data/2006/0730/article_1264.htm

 

Http://blog.csdn.net/wang_cww/archive/2008/02/26/2122300.aspx

 

 

Hwndc = capcreatecapturewindow (
(Lpstr) "My capture window", // window name if Pop-up
Ws_child | ws_visible, // window style
0, 0,160,120, // window position and dimensions
(Hwnd) This-> m_hwnd,
(INT) 1/* child id */); // create a video window

// Fok = sendmessage (hwndc, wm_cap_driver_connect, 0, 0l );
: Sendmessage (hwndc, wm_cap_driver_connect, 0, 0l); // connect to the driver
: Sendmessage (hwndc, wm_cap_driver_get_caps, sizeof (capdrivercaps), (long) (lpvoid) & capdrvcaps); // get the capture capability of the driver

// Or, use the macro to connect to the msvideo DRIVER:
// (Capdriverconnect (hwndc, 0) // use a macro to connect to the driver, the same below

// Capdrivergetcaps (hwndc, & capdrvcaps, sizeof (capdrivercaps ));

Cappreviewrate (hwndc, 66); // rate, in milliseconds, set the Capture Rate
Cappreview (hwndc, true); // starts preview, preview

 

The above code can be used to display videos of USB cameras. For other settings, see the above URL.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.