Including One Enhancement Stream in Another

[This is preliminary documentation and subject to change.]

You can include pre-existing enhancement streams in the current stream. Doing so causes the entire contents of one stream file to be inserted into another stream. You can use this functionality, for example, to build up a playlist that runs several shows. You do so by including the stream files for all shows in one stream.

To include an enhancement stream, simply specify the include keyword followed by the file name of the stream you want to include. You can specify include either by adding an event to a stream using the EnhEvents.AddText method, or by editing the text of an existing event using the EnhEvent.Text property. In other words, you can add the included stream either as a new event or as part of an existing event.

For example, the following example uses the stream compiler objects to build a playlist that encompasses three shows, Show1, Show2, and Show3.

Dim evs as IEnhEvents
Set evs = New EnhEvents
evs.AddText("0 include ""Show1.str"";")
evs.AddText("30:0.0 include ""Show2.str"";")
evs.AddText("1:00:0.0 include ""Show3.str"";")
 

The times specified in the inserted streams are relative to the time specified in the event that includes them in the existing stream. For example, the events in Show2.str occur relative to 30:0.0, the events in Show3.str relative to 1:00:0.0.

You can also repeatedly include a stream. For example, the following example causes the contents of Stream1.str to be inserted into the current stream every 30 minutes until 3:31, or five times.

evs.AddText("1:30:00.0 include ""Stream1.str"" repeat 30:0.0 until 3:31:00.0;")
 

The timing of the events in Stream1.str is relative to the time specified during the include operation. In the previous example, the start times for each repetition are 1:30:00:00, 2:00:00:00, 2:30:00:00, and so on.

To test whether an event includes a stream file, you can use the EnhEvent.IsInclude property.

To locate additional information on include and other stream compiler syntax, see Further Information on Data Services for the Client.