Platform SDK: Broadcast Architecture

BPCVBIControl

A BPCVBIControl object provides methods that your application can use to tune a television tuner to a specific channel in order to receive data transmitted over the vertical blanking interval (VBI). BPCVBIControl does not receive or parse VBI data but simply tunes the tuner to the specified channel.

The BPCVBIControl class has the following methods.

Method Description
VBITune Tunes a tuner to the specified channel and tuning space in order to receive VBI data.
VBIStatus Retrieves the current tuner settings for VBI reception and the strength of the VBI signal.

Remarks

Because the tuner is a nonsharable device, only one instance of BPCVBIControl can exist at a time. If you attempt to create a second instance, the second creation attempt fails.

The BPCVBIControl class does not implement a resource conflict mechanism, as the BPCDevices class does with the BPCVid.GotControl and BPCVid.LostControl events. Consequently, applications using BPCVBIControl must do so in a singular, or atomic, fashion. In other words, only one application can access BPCVBIControl at a time, and it is the application's responsibility to ensure that no other applications access BPCVBIControl simultaneously.

In Broadcast Architecture, displaying video is a higher priority operation than tuning to a VBI-data channel. Therefore, if a user is watching video on channel A your application cannot use BPCVBIControl to tune to channel B. Your application can only receive VBI data either when a user is watching the channel that transmits VBI data, or when no user is watching television.

When your application releases the BPCVBIControl object and is no longer receiving VBI data, the tuner tunes to the default settings specified in the VBITS and VBIChan registry values, if any, so that background data applications can collect VBI data. VBITS indicates the default VBI tuning space and VBIChan the default VBI channel. These values are located in this registry key:

HKLM\Software\Microsoft\TV Services

These values are both type REG_DWORD. For more information about VBITS and VBIChan, see Registry Values for the Video Control.

If the VBITS and VBIChan registry values exist, the television tuner automatically tunes to the specified VBI channel whenever the user is not watching television and no other applications are using video. If these values do not exist, the tuner stops the filter graph and releases all devices when no applications are using video.

BPCVBIControl should only be used by applications that need to receive VBI data for limited amounts of time. If your application is intended to run as a constant background process, it should use the default VBI values specified by VBITS and VBIChan. Otherwise, applications that update television programming information in the Guide database cannot run.

If you are writing an application that performs background data collection and VBITS and VBIChan do not exist in the registry, your application can create them. If these values do exist, your application should query the user before it alters these settings.

Your application should query the user because another data collection application may already be installed. In this case, if your application changes the default VBI settings it prevents the previously installed application from collecting VBI data. This problem occurs because the tuner can only be tuned to one channel at a time. To resolve the resource conflict, the user should specify which of the background data collection applications should run.

For more information, see Setting a Tuner to Receive VBI Data.

Note  The BPCSuspend object has higher priority than BPCVBIControl and can preempt it. In other words, your application can suspend the Video Access server even if it is currently being used by BPCVBIControl.

Requirements

  Windows NT/2000: Unsupported.
  Windows 95/98: Requires Windows 98.
  Header: Declared in vidsvr.odl.
  Import Library: Included as a resource in vid.ocx.

See Also

BPCDevices, BPCSuspend, BPCVid.GotControl, BPCVid.LostControl