StreamsGet Method (MMixerClass)
ID of the stream
index of the stream
stream object
Gets the stream by its StreamID
Syntax
Public Overridable Sub StreamsGet( _
   ByVal _bsStreamID As String, _
   ByRef _pnIndex As Integer, _
   ByRef _ppStream As MItem _
) 
public virtual void StreamsGet( 
   string _bsStreamID,
   out int _pnIndex,
   out MItem _ppStream
)
public procedure StreamsGet( 
    _bsStreamID: String;
   Out  _pnIndex: Integer;
   Out  _ppStream: MItem
); virtual; 
public: virtual void StreamsGet( 
   BSTR* _bsStreamID,
   [PARAMFLAG::Out] int _pnIndex,
   [PARAMFLAG::Out] MItem* _ppStream
) 

Parameters

_bsStreamID
ID of the stream
_pnIndex
index of the stream
_ppStream
stream object
Example

Here is example of how to get a stream by its ID to set "loop" property for it:

'initialize a mixer
Dim m_objMixer As New MMixerClass()
m_objMixer.ObjectStart(Nothing)
m_objMixer.FilePlayStart()
'add streams to the mixer
Dim pItem As MItem
m_objMixer.StreamsAdd("", Nothing, "C:\myFile.wmv", "", pItem, 1.0)
m_objMixer.StreamsAdd("", Nothing, "C:\myFile1.wmv", "", pItem, 1.0)
m_objMixer.StreamsAdd("", Nothing, "C:\myFile2.wmv", "", pItem, 1.0)
'get a stream
Dim myIndex As Integer
myMixer.StreamsGet("stream-001", myIndex, pItem)
DirectCast(pItem, IMProps).PropsSet("loop", "true")
//initialize a mixer
MMixerClass m_objMixer = new MMixerClass();
m_objMixer.ObjectStart(null);
m_objMixer.FilePlayStart();
//add streams to the mixer
MItem pItem;
m_objMixer.StreamsAdd("", null, @"C:\myFile.wmv", "", out pItem, 1.00);
m_objMixer.StreamsAdd("", null, @"C:\myFile1.wmv", "", out pItem, 1.00);
m_objMixer.StreamsAdd("", null, @"C:\myFile2.wmv", "", out pItem, 1.00);
//get a stream
int myIndex;
myMixer.StreamsGet("stream-001", out myIndex, out pItem);
((IMProps)pItem).PropsSet("loop", "true");
var
myItem: MItem;
myProps: IMProps;
myMixer: MMixer;
myFile: IMfile;
myObject: IMObject;
myStreams: IMstreams;
myIndex: integer;
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);
myStreams.StreamsAdd('', nil, 'C:\myFile1.wmv', '', myItem, 2.0);
myStreams.StreamsAdd('', nil, 'C:\myFile2.wmv', '', myItem, 2.0);
//get a stream
myStreams.StreamsGet(tream-001', myIndex, myItem);
myProps :=myItem as IMProps;
myProps.PropsSet('loop', 'true');
end;
See Also

Reference

MMixerClass Class
MMixerClass Members