1.15 DirectShow interface 73
1.15 DirectShow interface
Note
DirectShow can only be used in combination with the Microsoft Windows operating system.
Since Windows Vista, Movie Maker does not support capturing from a device registered for DirectShow
anymore.
This is the documentation of the MATRIX VISION DirectShow_acquire interface. A MATRIX VISION specific prop-
erty interface based on the IKsPropertySet has been added. All other features are related to standard DirectShow
programming.
• Supported interfaces (p. 73)
• Logging (p. 75)
• Setting up devices for DirectShow usage (p. 75)
1.15.1 Supported interfaces
• IAMCameraControl
• IAMDroppedFrames
• IAMStreamConfig
• IAMVideoProcAmp
• ISpecifyPropertyPages
• IKsPropertySet (for further information please refer to the Microsoft DirectX 9.0 Programmer's Reference).
Supported property set GUID's:
– AMPROPERTY_PIN_CATEGORY
– DIRECT_SHOW_ACQUIRE_PROPERTYSET
1.15.1.1 C++ example code using the IKsPropertySet interface
This section provides a small C++ code snippet showing how the DirectShow interface could be used e.g. to query
all properties from a device or how to set the value of a certain property
#include <DSImpactAcquire/Include/DirectShowAcquire.h>
//------------------------------------------------------------------------------
// macro for writing the properties, feel free to replace the macros in the code
//------------------------------------------------------------------------------
#define _WRITE_STRING_PROPERTY(iksprop,prop,str)\
if( prop != 0 )\
{\
prop->value.s = str;\
hr = iksprop->Set(DIRECT_SHOW_ACQUIRE_PROPERTYSET, MVPropIDWrite, NULL, 0, prop,
sizeof(MVProperty));\
}
//------------------------------------------------------------------------------
#define _WRITE_FLOAT_PROPERTY(iksprop,prop,fval)\
if( prop != 0 )\
{\
prop->value.f = fval;\
hr = iksprop->Set(DIRECT_SHOW_ACQUIRE_PROPERTYSET, MVPropIDWrite, NULL, 0, prop,
sizeof(MVProperty));\
}
//------------------------------------------------------------------------------
#define _DELETE_POINTER_ARRAY(prop_array,cnt)\
for( unsigned long pr = 0; pr < cnt; pr++ )\
{\
if( prop_array[pr].stringArraySize > 0 )\
MATRIX VISION GmbH