Setting an Input Device

[This is preliminary documentation and subject to change.]

In order to display a video stream, your application must first set an input device or source for that stream. Your application does this by setting the BPCVid.Input property of the Video control equal to one of the available devices in the BPCDevices collection.

There are many different types of input devices. Your application must ensure that any device it selects as an input device supports the operations that it is trying to perform. To do so, your application can use properties of the form HasXxxx, which indicate whether the current device supports the property Xxxx.

For example, the BPCDeviceBase.HasChannel indicates whether the device supports channels and can be tuned by calling BPCDeviceBase.Channel. The HasChannel property of a television tuner card is True.

If there are multiple tuners available on a broadcast client, your application can use the BPCDeviceBase.ChannelAvailable method to determine whether a device can tune to the specified channel.

Once your application has selected a device that supports the intended video stream from BPCDevices, your application can set that device as the input device. This process is illustrated in the following example:

'Search the collection for a device that 
'supports channels. When one is found, set the 
'that device as the input device.
 
For Each Device In vid.Devices
  If Device.HasChannel Then
    vid.Input = Device
    Exit For
  End If
Next