Platform SDK: Broadcast Architecture

Setting Video Input

Before your application can display video, it must first assign an input device as a source for the video stream. If no user input is required to do so, your application sets the input device from the array of available devices described in Getting Available Devices. Alternatively, users can select the input device through a list on the user interface.

For your application to set an input device, it must first declare and allocate storage for variables of BPCDevices and BPCDeviceBase object types. Your application then assigns the collection of all the available input and output devices to the BPCDevices variable by using the BPCVid object's Devices property.

Your application next enters a loop to retrieve each BPCDeviceBase object representing an available video device. Your application obtains a string representing the name of each device by using the Name property of the BPCDeviceBase object. It then compares the string to the name of the device selected from the list or array. If the string values are the same, your application can assign the selected device as the input source by using the Input property of the BPCVid object. Before setting the device as the input source, your application should confirm that the selected device can provide video input by using the IsInput property of the BPCDeviceBase object.