Platform SDK: Broadcast Architecture |
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 named in the format HasXxxx, which indicate whether the current device supports the property Xxxx.
For example, the BPCDeviceBase.HasChannel property indicates whether a device supports channels and thus can be tuned to a channel by calling the BPCDeviceBase.Channel method. 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. For example, if your application needs to tune the Video control to channel 16, it can query each tuning device until it finds one that receives channel 16.
Once your application has selected a device from BPCDevices that supports the intended video stream, 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