FMX.VideoCaptureHD Sample

From Appmethod Code Examples
Jump to: navigation, search

This sample illustrates how to capture a video from a webcam and buffer it on a form, using FireMonkey.

Location

You can find the FireMonkey ImageSpin sample project at:

Description

This application uses TVideoCaptureDevice in order to implement video capture capabilities.

How to Use the Sample

Make sure that you have connected to your station a video capture device (a webcam). When the application starts running, the connected video capture device starts capturing and the image is displayed on the center of the form. In the upper-left corner there is a green ellipse that indicates if the application is capturing video images. Use the stop button from the upper-right side of the form to stop capturing. If the capturing is stopped, the ellipse from the upper-left corner is totally transparent. Save the current displayed frame of the captured video using the Save to Bitmap... button.

  1. Navigate to the location give above, and open VideoCaptureHD.dproj.
  2. Press F9 or choose Run > Run.

Classes

CaptureForm.pas represents the main window unit of the sample. It contains the TForm240 class, which defines the main form and contains:

Implementation

The sample:

  • Requests access to the video capture device.
  • Displays the captured images on the TImage.
  • Implements the actions to be attached to each control that allows to manipulate the capturing process.

Uses

See Also

Personal tools