MPLATFORMLib Namespace > MMixerClass Class : StreamsBackgroundSet Method |
Public Overridable Sub StreamsBackgroundSet( _ ByVal _pExternOrRef As Object, _ ByVal _bsPath As String, _ ByVal _bsParam As String, _ ByRef _ppItemsItem As MItem, _ ByVal _dblTimeForChange As Double _ )
public virtual void StreamsBackgroundSet( object _pExternOrRef, string _bsPath, string _bsParam, out MItem _ppItemsItem, double _dblTimeForChange )
public procedure StreamsBackgroundSet( _pExternOrRef: TObject; _bsPath: String; _bsParam: String; Out _ppItemsItem: MItem; _dblTimeForChange: Double ); virtual;
public: virtual void StreamsBackgroundSet( IUnknown* _pExternOrRef, BSTR* _bsPath, BSTR* _bsParam, [PARAMFLAG::Out] MItem* _ppItemsItem, double _dblTimeForChange )
Here is example of how to set your custom file to background of your 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) et your file to the background Dim myBackground As MItem myMixer.StreamsBackgroundSet(Nothing, "c:\myBack.avi", "", myBackground, 2.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); //set your file to the background MItem myBackground; myMixer.StreamsBackgroundSet(null, @"c:\myBack.avi", "", out myBackground, 2.0);
var myItem, myBackground: MItem; myMixer: MMixer; myFile: IMfile; myObject: IMObject; myStreams: IMstreams; myPath: widestring; 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.StreamsBackgroundSet(nil, 'c:\myBack.avi', '', myBackground, 2.0); end;