StreamsAdd Method (MComposerClass)
stream ID
reference to external object (for example, live source)
path to source
additional parameters of element (“Live” to add live source, “Playlist” to add playlist). If you add file, you can set file properties here (like in FileNameSet), see MFile object: properties.
the new mixer stream
time interval for changes in seconds
Adds a new mixer stream (file, live or playlist) or replaces the existing one with transition smoothly during the time interval.
Syntax
Public Overridable Sub StreamsAdd( _
   ByVal _bsStreamID As String, _
   ByVal _pExternOrRef As Object, _
   ByVal _bsPath As String, _
   ByVal _bsParam As String, _
   ByRef _ppItem As MItem, _
   ByVal _dblTimeForChange As Double _
) 
public procedure StreamsAdd( 
    _bsStreamID: String;
    _pExternOrRef: TObject;
    _bsPath: String;
    _bsParam: String;
   Out  _ppItem: MItem;
    _dblTimeForChange: Double
); virtual; 
public: virtual void StreamsAdd( 
   BSTR* _bsStreamID,
   IUnknown* _pExternOrRef,
   BSTR* _bsPath,
   BSTR* _bsParam,
   [PARAMFLAG::Out] MItem* _ppItem,
   double _dblTimeForChange
) 

Parameters

_bsStreamID
stream ID
_pExternOrRef
reference to external object (for example, live source)
_bsPath
path to source
_bsParam
additional parameters of element (“Live” to add live source, “Playlist” to add playlist). If you add file, you can set file properties here (like in FileNameSet), see MFile object: properties.
_ppItem
the new mixer stream
_dblTimeForChange
time interval for changes in seconds
Example

Here is example of how to add a stream to the mixer:

'initialize a mixer
Dim m_objMixer As New MMixerClass()
m_objMixer.ObjectStart(Nothing)
m_objMixer.FilePlayStart()
'add stream to the mixer
Dim pItem As MItem
m_objMixer.StreamsAdd("", Nothing, "C:\myFile.wmv", "", pItem, 1.0)
//initialize a mixer
MMixerClass m_objMixer = new MMixerClass();
m_objMixer.ObjectStart(null);
m_objMixer.FilePlayStart();
//add stream to the mixer
MItem pItem;
m_objMixer.StreamsAdd("", null, @"C:\myFile.wmv", "", out pItem, 1.00);
var
myItem: MItem;
myMixer: MMixer;
myFile: IMfile;
myObject: IMObject;
myStreams: IMstreams;
begin
//initialize a mixer
myMixer:= CreateComObject(CLASS_MMixer) as MMixer;
myStreams:= myMixer as IMStreams;
myFile:= myMixer as IMFile;
myObject:= myMixer as IMobject;
myObject.ObjectStart(nil);
myFile.FilePlayStart();
//add stream to the mixer
myStreams.StreamsAdd('', nil, 'C:\myFile.wmv', '', myItem, 2.0);
end;
See Also

Reference

MComposerClass Class
MComposerClass Members