ElementsMediaAdd Method (MMixerClass)
ID of the new element
reference to external object (for example, live source)
path to the source
parameters for adding
the new element
time interval for changes in seconds
Adds new element with media. If such element exists then replace it with new one.
Syntax
Public Overridable Sub ElementsMediaAdd( _
   ByVal _bsNewElementID As String, _
   ByVal _pExternOrRef As Object, _
   ByVal _bsPath As String, _
   ByVal _bsParam As String, _
   ByRef _ppChildElement As MElement, _
   ByVal _dblTimeForChange As Double _
) 
public virtual void ElementsMediaAdd( 
   string _bsNewElementID,
   object _pExternOrRef,
   string _bsPath,
   string _bsParam,
   out MElement _ppChildElement,
   double _dblTimeForChange
)
public procedure ElementsMediaAdd( 
    _bsNewElementID: String;
    _pExternOrRef: TObject;
    _bsPath: String;
    _bsParam: String;
   Out  _ppChildElement: MElement;
    _dblTimeForChange: Double
); virtual; 
public: virtual void ElementsMediaAdd( 
   BSTR* _bsNewElementID,
   IUnknown* _pExternOrRef,
   BSTR* _bsPath,
   BSTR* _bsParam,
   [PARAMFLAG::Out] MElement* _ppChildElement,
   double _dblTimeForChange
) 

Parameters

_bsNewElementID
ID of the new element
_pExternOrRef
reference to external object (for example, live source)
_bsPath
path to the source
_bsParam
parameters for adding
_ppChildElement
the new element
_dblTimeForChange
time interval for changes in seconds
Example
Dim myMixer As New MMixerClass()
myMixer.ScenesActiveGet(mySceneID, myIndex, myScene)
Dim pChild As MElement
myScene.ElementsMediaAdd("element-001", Nothing, "d:\clips\SampleClip1.wmv", "", out myElement, 2.0)
MMixerClass myMixer = new MMixerClass();
myMixer.ScenesActiveGet(out mySceneID, out myIndex, out myScene);
MElement pChild;
myScene.ElementsMediaAdd("element-001", null, @"d:\clips\SampleClip1.wmv", "", out myElement, 2.0);
var
myMixer: MMixer;
myScenes: IMScenes;
myScene: IMElements;
mySceneID: string;
myIndex: integer;
myElement: MElement;
begin
myMixer:= CreateComObject(CLASS_MMixer) as MMixer;
myScenes := myMixer as IMScenes;
myScenes.ScenesActiveGet(mySceneID, myIndex, myScene);
myScene.ElementsMediaAdd("element-001", nil, 'd:\clips\SampleClip1.wmv', '', myElement, 2.0);
end;
See Also

Reference

MMixerClass Class
MMixerClass Members