DirectShow Sample Application: Video Cropping

The CropVideo sample application demonstrates how to configure a MontiVision DirectShow Filter during the load process of a filter graph configuration. The output format of some filters such as MV Rotate90 or MV Crop  often depends directly on its parameters. Configurations containing filters like these need to be rebuilt when these "critical" parameters change. The MV Smart Control contains various events which are called during the load process of a project file using IMVSCFilterGraph::LoadConfig. These events allow you to set up an event handler where you can modify the filter parameters before the actual filter connections are made.

This and other sample applications can be found in the MV Development Kit installation directory. .

 

Filter Graph Summary

The filter graph contains a live video source and the MontiVision DirectShow filters MV Rotate90 and MV Crop. The filters are configured during the load process of the filter graph.

The Application

This sample application contains a  MV Smart Control to display the video stream of the selected video source. On every change of the "Rotation Angle" or "Display Window", the application reloads the filter configuration and modifies the filter parameters to the appropriate values.