Multiple Streams Sample

This sample application, written in Microsoft® Visual Basic®, demonstrates how to set up a station and two streams for a multicast by using the API for the Windows Media Station control. it shows how to create a live broadcast in which content from multiple cameras is streamed into a server that is running Windows Media Services. In this way, you can set either stream as the active stream. By default, the source code is located in C:\Program Files\Windows Media Components\SDK\Source\Multicast\TwoStrm.

The Stations variable refers to the Windows Media Station control. It is assumed that the content files, Welcome1.asf and Welcome2.asf, are installed in the Asfroot directory on the C drive of your local server computer, localhost.

To create a Station, invoke the Open method of the Channels collection object. The new Station is named Channel2.

Similarly, to create a Stream, invoke the Open method of the Streams collection object. The streams are named Welcome1_2 and Welcome2_2, respectively.

To start the multicast, activate one of the streams in the station. During the mutlicast, you can activate the other stream.

To remove the station and the stream, invoke the Close method of the Station and the Stream objects, respectively.

Note This sample does not automatically multicast two streams, one after another. When one stream ends or during it is streamed, you must manually activate the other stream.