Microsoft DirectX 8.1 (C++)

Activating Video Control Features

This topic applies to Windows XP Home Edition and Windows XP Professional only.

Applications work with two separate collections of features. One contains the features available, and the other contains the features that are currently active. The "features available" collection is read-only and is obtained through the FeaturesAvailable property on the MSVidCtl object. It always contains the three features listed in the table below. The application enumerates through those features and populates a new collection of its own creation that contains the features that will be active. It then passes this collection to the Video Control in the FeaturesActive property. The Video Control will use this collection to create a new filter graph or to modify an existing one. There is no need to create a FeaturesActive collection unless an application actually requires the features. As mentioned previously, the Conditional Access feature is always enabled by default and cannot be disabled.

The FeaturesActive collection remains in effect even when you change inputs. Features are identified by their class ID strings, which are listed in the following table. The friendly name string is the string that is returned from the IMSVidDevice.Name property.

Feature Class ID String Friendly Name String
Data Services {334125C0-77E5-11D3-B653-00C04F79498E} BDA IPSink
Conditional Access {1600F101-6666-4F66-B1E2-BF3C9FBB9BA6} Conditional Access
Closed Captioning {7F9CB14D-48E4-43B6-9346-1AEBC39C64D3} Line 21 Decoder

The following code shows one way to create an ActiveFeatures collection and use it to configure the Video Control:

' Create variables with easy-to-remember names to hold the GUIDs.
strDS = "{334125C0-77E5-11D3-B653-00C04F79498E}"
strCA = "{1600F101-6666-4F66-B1E2-BF3C9FBB9BA6}"
strCC = "{7F9CB14D-48E4-43B6-9346-1AEBC39C64D3}"

' Create our two "features" collections.
Dim colFeaturesActive
Set colFeaturesActive = CreateObject("MSVidCtl.MSVidFeatures")
Dim colFeaturesAvailable
Set colFeaturesAvailable = objVidCtl.FeaturesAvailable

' Here we specify Data Services
For Each MSVidFeature in colFeaturesAvailable 
    If (MSVidFeature.ClassID = strDS)Then
       colFeaturesActive.Add MSVidFeature
    End if
Next

objVidCtl.FeaturesActive = colFeaturesActive