Index Topic Contents | |||
Previous Topic: C/C++-based Sample Applications Next Topic: PID Sample (Plug-In Distributor Application) |
Visual Basic-based Sample Applications
This article describes the Microsoft® Visual Basic® version 5.0 samples in the Microsoft DirectShow Software Development Kit (SDK).
Contents of this article:
- Visual Basic-Based ActiveX Player
- Visual Basic-Based Filter Graph Builder
- Visual Basic-Based Filter Graph Player
- Visual Basic-Based Player
Visual Basic-Based ActiveX Player
This ActiveX sample, Ocxvb01, demonstrates an application that uses the ActiveMovie Control. It has a form that contains menus and controls to demonstrate the access of various properties of the video control. See Using the ActiveMovie Control in Visual Basic for a detailed description of this sample.
The sample has a menu command that enables you to create the control by opening a video file, and to use Run, Pause, and Stop commands to programmatically control the ActiveMovie Control. All of the ActiveMovie Control Panel features, such as selection controls, position controls, and the trackbar control, can be made visible selectively, and enabled or disabled from menu commands in the sample application. Other properties, such as the rate and current position, can also be changed from the application, and you can set the image in the video control to various sizes such as half, default, double, and full-screen.
Visual Basic-Based Filter Graph Builder
The filter graph builder sample, Builder, demonstrates how a Visual Basic-based application uses the collection interfaces that the filter graph manager exposes to build and connect a custom filter graph. The collection interfaces are composed of the following interfaces.
These interfaces appear as objects in the ActiveMovie Control type library in the Visual Basic development environment and enable the registry to be searched, filters to be added, and pins to be connected, among other things. See Constructing Filter Graphs Using Visual Basic for a detailed description of this sample.
The Builder sample presents a form that enables the user to see a list of filters in the registry and add filters to the filter graph. It also enables the user to examine the names and properties of pins on the filter, the media types on the pins, and to connect the pins. The sample has an additional sample routine, accessed by a menu, that automatically builds a filter graph. The filter graph is built using the collection interface objects, to better demonstrate the more typical use of these objects in a Visual Basic-based application. The sample also enables you run the constructed filter graph.
Visual Basic-Based Filter Graph Player
The filter graph player, VBDemo, demonstrates how to use the DirectShow Visual Basic objects that control the playback of video and that adjust properties of various components. See Controlling Filter Graphs Using Visual Basic for a detailed description of this sample.
The VBDemo sample enables you to open a video file. Use the Play, Pause, and Stop buttons to control the video. It positions the video window as a child window of the main form and displays the movie's length and elapsed time. It also enables you to set the start position and rate. Use two sliders to adjust the audio renderer's volume and balance.
Visual Basic-Based Player
The sample player, Player, is a short Visual Basic-based program that demonstrates the minimum requirements for playing back a DirectShow media file without using the ActiveMovie Control. It uses the same DirectShow object library as the VBDemo sample, but provides only three buttons (Open, Play, and Stop) and a slider for indicating position.
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.