StreamsBackgroundSet Method (MMixerClass)
reference to external object (for example, live source)
path to source.
Possible values:
parameters for adding
the background item
time interval for changes in seconds
Sets the background for mixer.
Syntax
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
) 

Parameters

_pExternOrRef
reference to external object (for example, live source)
_bsPath
path to source.
Possible values:
  • color name ("red") or #RRGGBB color code;
  • "transparent" for transparent background;
  • path to media file or playlist.
  • empty string to be able to see the last frame of playlist.
_bsParam
parameters for adding
_ppItemsItem
the background item
_dblTimeForChange
time interval for changes in seconds
Example

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;
See Also

Reference

MMixerClass Class
MMixerClass Members