[This is preliminary documentation and subject to change.]
To tune to a channel number within a specific tuning space, such as the tuning space for analog cable TV, your application performs the following process.
First, it must obtain the number that identifies the tuning space. You obtain such a tuning space number from the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\TV Services\Tuning Spaces
To obtain the description of a tuning space in the registry to determine if it is the one you want, click the tuning space number to select it. Details about the tuning space then appear in the right section of the registry's window.
Your application can obtain a number for a specific tuning space by using functions from the Microsoft® Win32® application programming interface (API) to retrieve data from the registry. To do so, your application can open the Tuning Spaces key, enumerate the subkeys of this key, and then retrieve data from the values associated with each subkey until finding a subkey that has data defining the specific tuning space. The subkeys of the Tuning Spaces key are the tuning space numbers.
Once your application has the tuning space number, your application can then determine if the user's computer contains a tuner supporting that tuning space. To do so, your application should call the BPCVid object's TSDeviceCount method and specify the tuning space number. If this method returns a number greater than zero meaning that the specified tuning space has at least one tuner available, your application can then call the BPCVid object's Tune method. When calling Tune, your application should specify the tuning space number, the channel number to tune to, and the default values for the video and audio subchannels. As shown in the video sample applications, the default value for both subchannels is –1, which allows the tuner to choose an appropriate subchannel.
To locate more information on the registry and retrieving data from it, see Further Information on Development Tasks in Broadcast Architecture.