Share via


Camera and DirectShow Graph Integration Test (Compact 7)

3/12/2014

The Graph Building Tests test building a graph with all components and building graphs with single components. Some single components of the Graph Building Tests test are VCF, still image, VMR, video encoder etc.

The Graph State Tests verify that running, stopping, and pausing of the graph works correctly. The Graph State Tests verify the transition of states works correctly for a graph with all components and tests single components such as VCF only, still image only, VMR, etc.

The Camera Preview Verification Tests verify that the preview window is working correctly under various preview conditions such as with or without rotation. These tests also verify the preview window works correctly with supported formats.

The Still Verification Tests verify that the still image is captured and its contents are correct. These tests also verify how fast images can be captured and that they are immediately able to be deleted.

The Camera Writing tests first start a stream capture then verify that the captured file was created successfully. The tests cover audio and video capturing, pausing and resuming capture, and static and dynamic rotation.

The Camera Timed Stream Capture Tests verify successful audio and video capture using predetermined, timed increments.

The Camera Find Interface Tests verify the ability to retrieve various interfaces from the capture graph. These interfaces include the "builder" interface and the "capture filter" interface.

The Camera Find Pin Tests verify the ability to find the correct individual pins from the built capture graph.

The Camera Control Tests query the capture graph for the possible ranges of various properties of the graph. The tests validate that these ranges are consistent. The test then validates the ability to set the values of individual properties. These properties tested include pan, tilt, roll, zoom, exposure, focus, flash, and auto focus.

The Camera Video Processing Tests test the ability to control the different properties of video processing, such as brightness, contrast, hue, saturation, sharpness, color enable, and backlight compensation.

The Camera Capability Query Tests test the ability to query and set various video control modes and capabilities.

Test Prerequisites

Your device must meet the following requirements before you run this test.

The following tables show the hardware requirements for the Camera and DirectShow Integration Test.

Requirements Description

Camera functionality

The device must have camera functionality.

The following tables show the software requirements for the Camera and DirectShow Integration Test.

Requirements Description

Tux.exe

Required for executing the test

Kato.dll

Required for logging test data

CameraGraphTests.dll

Library containing the test

CameraGrabber.dll

Filter required by many command line parameters to track and output information about media samples

SYSGEN_DSHOW_CAPTURE (DirectShow capture) is also required. SYSGEN_CAMERA_NULL is to be set only when the device doesn’t have camera functionality. This would include a sample camera driver.

Subtests

The table below lists the subtests included in this test.

SubTest ID Description

100-114

Tests in this range check combinations of the DirectShow graph, see test title for a description of the graph layout

200-216

Tests in this range check graph states for various graph layouts, see test title for a description of the graph layout

300-311

Tests in this range check preview functionality for various graph layouts, see test title for a description of the graph layout

400-409

Tests in this range check still image functionality for various graph layouts, see test title for a description of the graph layout

500-519

Tests in this range check video capture via starting and stopping the capture. See test title for a description of the scenario

600-607

Tests in this range check video capture via indicating a start and stop time.

700-722

Tests in this range are exercising the DirectShow FindPin and FindInterface methods.

800-808

Tests in this range exercise camera properties such as flash and focus

900-908

Tests in this range exercise camera video properties such as brightness and contrast

1000-1005

Tests in this range check the video capture control APIs.

Setting Up the Test

There must be a DirectShow-based camera driver exposing the DEVCLASS_CAMERA_GUID as defined in camera.h in the driver SDK.

Running the Test

If there are multiple camera drivers in the system, see the command-line options documentation for more information on how to select which driver to test.

If third-party video and audio encoders are in the system, see the command-line options documentation for more information.

Command line documentation:

/? outputs this message

/CommandLineFile <test command line stored in a file> - reads in test command line options from a file.

The file is just a standard text file containing the command line

on a single line within the file.

Camera driver selection

/UseMonoCam - sets the framework to use the monolithic camera driver (nullcam.dll), tests fail if unavailable. WARNING:

This can overwrite PIN registry key settings used by other monolithic camera drivers causing them to fail.

/UseTestCam - sets the framework to use the test camera driver, tests fail if unavailable.

/CamDriver <legacy name (CAM1:)> - sets the framework to use the camera driver with the legacy device name specified

if no driver is specified and the test camera driver is available it will be used

if no driver is specified and the test camera driver is unavailable the first enumerated driver will be used.

/TestCamXML <xml path and name> - sets the registry keys for the test camera driver to use the xml file specified

/TestCamProfile <profile id from the file> - sets the registry keys for the test camera driver to use the profile specified

Pluggable component modification

/VideoEncoderCLSID {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx} - sets the framework to use the encoder dmo with the CLSID specified.

/AudioEncoderCLSID {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx} - sets the framework to use the encoder dmo with the CLSID specified.

/MuxCLSID {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx} - sets the framework to use the MUX with the CLSID specified.

/UseGSM - sets the framework to use the GSM encoder through the audio capture filter.

/ForceColorConversion - Forces the color conversion filter into the graph in front of the renderer, still sink, and encoder.

/VideoCaptureExtension <extension> - changes the default extension (asf) to the user requested extension for video files captured

/StillCaptureExtension <extension> - changes the default extension (jpg) to the user requested extension for still images captured

/FileStorageLocation <path to storage location for files created by the test> - overrides the default location to store captured files (the device root)

Captured video validation

/VideoFileConformanceLibrary <path> - this takes a path to a library (DLL) which exports a function called VerifyVideoFile which takes a single

WCHAR * parameter which indicates a file name to verify. This function should return an HRESULT indicating whether or not the video file is conformant and playable.

if no path is given and the file sink used is the default ASF file sink, asfverify.dll is used.

Failure diagnostics options

/OutputKeyEvents - enables the test to output debugging information for missing events, skip outputting high volume events.

/OutputAllEvents - enables the test to output debugging information for missing events, outputs every event.

/OutputFilterInformation - enables the test to output information about the graph topology.

/OutputPreviewDiagnostics - output preview diagnostics information.

/OutputStillDiagnostics - output still capture diagnostics information.

/OutputCaptureDiagnostics - output video capture diagnostics information.

/OutputAllDiagnostics - output video capture diagnostics information.

/SaveFailures <path> - saves video and still failures to the specified path.

Verifying the Test

Test cases should either be a pass or a skip result. Skipped test cases indicate a feature that is not supported with the camera driver. Because all features are not required, skipped test cases are OK.

Review the CameraControl and VideoProcAmp property tests results to confirm the driver is supporting and declining support for properties correctly. These are tests 800-908.

NOTE: CameraControl_Pan, CameraControl_Tilt, and CameraControl_Roll are all properties for servo actuated cameras and should be skipped if your driver is not servo actuated. These features are commonly misinterpreted to mean panning, tilting, and rolling the image data.

Troubleshooting the Test

The following table shows troubleshooting tips for the Camera and DirectShow Integration Test.

Item Solution

Test cases 100-113 are failing.

These test cases can fail if certain sets of hardware are unavailable (for example, if the device is missing audio support), or if no camera driver is detected. Detailed output is given to assist with troubleshooting.

Test cases 200-216 are failing.

These test cases can fail if the camera driver does not transition states correctly, or from any condition which causes tests 100-113 to fail.

Test cases 300-309 are failing.

These test cases can fail from driver issues preventing preview from running, or from any condition which causes earlier tests to fail.

Test cases 400-405 are failing.

These test cases can fail from driver issues preventing a still image capture, or from any condition which causes earlier tests to fail.

Test cases 500-512 are failing.

These test cases can fail from driver problems when doing video capture.

Test cases 507 and 510 are failing when using the Logo Test Kit (LTK) user interface (UI)

The work-around for these failures is to run these test cases from within the Windows Embedded CE UI instead.

Test cases 600-605 are failing.

These test cases can fail from driver problems when doing video capture.

Test cases 700-711 are failing

.These test cases can fail from problems with the DirectShow filters or components.

Test cases 800-807 or 900-908 or 1000-1005 are failing.

If these tests fail, verify that the driver property tests succeed and that the properties are settable. This test does not verify screen contents, so properties which do nothing will pass.

The other reasons for the failure are mentioned below.

Graph building test failures are usually due to format negotiation problems. Check that the color formats your camera driver exposes are compatible with the other DirectShow filters in the graph.

Graph state test failures are usually due to the camera driver failing a state transition request. If the system stops responding in the graph state tests, it is usually due to a deadlock in the camera driver during state transitions.

Preview test failures are usually due to the driver failing to deliver preview images to DirectShow.

Still image test failures are usually due to the driver failing to deliver still images to DirectShow.

Video capture start and stop tests and timed capture tests:

Failing to retrieve the start event for either audio or video indicates that either the camera driver or audio driver failed to deliver any samples.

Failing to retrieve the stop event for either audio or video indicates that either the camera driver or audio driver stopped delivering samples in the middle of the capture or samples were lost.

If the test fails to find the captured file check that there is sufficient storage space on the device and that the file system is passing testing.

Failures in the FindPin and FindInterface tests these tests are usually due to something going bad in the graph build phase, things such as pins disconnecting or missing pins. Check that the camera driver and audio driver are accepting/declining the correct format negotiations.

Failures in the CameraControl property tests and the VideoProcAmp property tests are usually due to the driver either claiming to support a property it does not, or supporting a property incorrectly.

Failures in the VideoControl interface tests are caused by the driver claiming to support invalid capabilities, frame rates, etc. or not claiming to support required capabilities.

Note: SYSGEN_DSHOW_CAPTURE (DirectShow capture) and SYSGEN_NULLCAM for the sample camera driver are required in the operating system build.

For more troubleshooting help, see Troubleshooting the CTK Tests.

For additional platform specific issues, consult the CTK articles on the TechNet wiki.

See Also

Other Resources

Multimedia - Camera Tests