MPLATFORMLib Namespace > MComposerClass Class : StreamsBackgroundGet Method |
Public Overridable Sub StreamsBackgroundGet( _ ByRef _pbsPath As String, _ ByRef _ppItemsItem As MItem _ )
public virtual void StreamsBackgroundGet( out string _pbsPath, out MItem _ppItemsItem )
public procedure StreamsBackgroundGet( Out _pbsPath: String; Out _ppItemsItem: MItem ); virtual;
public: virtual void StreamsBackgroundGet( [PARAMFLAG::Out] BSTR* _pbsPath, [PARAMFLAG::Out] MItem* _ppItemsItem )
Here is example of how to obtain mixer background stream:
'initialize a mixer Dim m_objMixer As New MMixerClass() m_objMixer.ObjectStart(Nothing) m_objMixer.FilePlayStart() 'add stream to the mixer Dim myItem As MItem m_objMixer.StreamsAdd("", Nothing, "C:\myFile.wmv", "", pItem, 1.0) 'get the background item and its full path Dim myBackground As MItem Dim myPath As String myMixer.StreamsBackgroundGet(myPath, myBackground) DirectCast(myBackground, IMProps).PropsSet("loop", "true")
//initialize a mixer MMixerClass m_objMixer = new MMixerClass(); m_objMixer.ObjectStart(null); m_objMixer.FilePlayStart(); //add stream to the mixer MItem myItem; m_objMixer.StreamsAdd("", null, @"C:\myFile.wmv", "", out pItem, 1.00); //get the background item and its full path MItem myBackground; string myPath; myMixer.StreamsBackgroundGet(out myPath, out myBackground); ((IMProps)myBackground).PropsSet("loop", "true");
var myItem, myBackground: MItem; myMixer: MMixer; myFile: IMfile; myObject: IMObject; myStreams: IMstreams; myPath: widestring; myBackProps: IMProps; 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); //get the background item and its path myStreams.StreamsBackgroundGet(myPath, myBackground); //set "loop" property to the item myBackProps:= myBackground as IMProps; myBackProps.PropsSet('loop', 'true'); end;