51 lines
1.3 KiB
Markdown
51 lines
1.3 KiB
Markdown
---
|
|
page_type: sample
|
|
languages:
|
|
- cpp
|
|
products:
|
|
- windows-api-win32
|
|
name: SimpleCapture sample
|
|
urlFragment: simpleCapture-sample
|
|
description: Demonstrates how to preview video from a capture device using Media Foundation.
|
|
extendedZipContent:
|
|
- path: LICENSE
|
|
target: LICENSE
|
|
---
|
|
|
|
# SimpleCapture sample
|
|
|
|
Demonstrates how to preview video from a capture device using Media Foundation.
|
|
|
|
|
|
## Sample Language Implementations
|
|
|
|
C++
|
|
|
|
## Files
|
|
|
|
- *Preview.cpp*
|
|
- *Preview.h*
|
|
- *README.md*
|
|
- *resource.h*
|
|
- *SimpleCapture.rc*
|
|
- *SimpleCapture.sln*
|
|
- *SimpleCapture.vcproj*
|
|
- *winmain.cpp*
|
|
|
|
## Build the sample using the command prompt
|
|
|
|
1. Open the Command Prompt window and navigate to the *SimpleCapture* directory.
|
|
1. Type **msbuild SimpleCapture.sln**.
|
|
|
|
## Build the sample using Visual Studio (preferred method):
|
|
|
|
1. Open Windows Explorer and navigate to the *SimpleCapture* directory.
|
|
1. Double-click the icon for the *SimpleCapture.sln* file to open the file in Visual Studio.
|
|
1. In the **Build** menu, select **Build Solution**. The application will be built in the default *\Debug* or *\Release* directory.
|
|
|
|
## Run the sample
|
|
|
|
1. Navigate to the directory that contains the new executable, using the command prompt or Windows Explorer.
|
|
1. Type **SimpleCapture.exe** at the command line, or double-click the icon for *SimpleCapture.exe* to launch it from Windows Explorer.
|
|
|