Microsoft DirectX 9.0

StillCap Sample

Description

Video capture application that writes still images to bitmap files.

Path

Source: (SDK root)\Samples\C++\DirectShow\Editing\StillCap

Executable: (SDK root)\Samples\C++\DirectShow\Bin\StillCap.exe

User's Guide

This application uses the ISampleGrabber interface to capture still images from a live capture stream to a bitmap file. It demonstrates how to put the Sample Grabber filter into a filter graph, and how to retrieve sample data in real time through a callback function.

The application builds a capture graph using the first video capture device it finds. To capture a still image, click the Snap Still button. By default, the bitmap is saved with the file name StillCap0000.bmp. If you select the check box labeled Increment filename after each capture?, the application saves each image under a new file name. Otherwise, the previous image is overwritten when you capture a new image.

This application also can capture video files. Click Video Capture in the Capture Type area; video capture starts automatically. To end the capture session, click Start Playback. The recorded file automatically plays back.

For simplicity, this sample uses 24-bit RGB format. If your video driver is set to 16-bit color, you might notice flicker when the application runs. To resolve this problem, set the bit depth of your display to 24 bits or 32 bits.