ElementsAdd Method (MMixerClass)
ID of new element
type of the element
properties of the element
new element
time interval for changes
Adds new element. If such element exists then replace it with new one.
Syntax
Public Overridable Sub ElementsAdd( _
   ByVal _bsNewElementID As String, _
   ByVal _bsElementType As String, _
   ByVal _bsElementProps As String, _
   ByRef _ppChildElement As MElement, _
   ByVal _dblTimeForChange As Double _
) 
public procedure ElementsAdd( 
    _bsNewElementID: String;
    _bsElementType: String;
    _bsElementProps: String;
   Out  _ppChildElement: MElement;
    _dblTimeForChange: Double
); virtual; 
public: virtual void ElementsAdd( 
   BSTR* _bsNewElementID,
   BSTR* _bsElementType,
   BSTR* _bsElementProps,
   [PARAMFLAG::Out] MElement* _ppChildElement,
   double _dblTimeForChange
) 

Parameters

_bsNewElementID
ID of new element
_bsElementType
type of the element
_bsElementProps
properties of the element
_ppChildElement
new element
_dblTimeForChange
time interval for changes
Example
Dim myMixer As New MMixerClass()
myMixer.ScenesActiveGet(mySceneID, myIndex, myScene)
Dim pChild As MElement
Dim pRoot As MElement
m_objMixer.ElementsGetByIndex(0, pRoot)
Dim elem As MElement
DirectCast(pRoot, IMElements).ElementsAdd("newElem", "video", "stream_idx=0 h=0.5 w=0.5 show=1", pChild, 2.0)
MMixerClass myMixer = new MMixerClass();
myMixer.ScenesActiveGet(out mySceneID, out myIndex, out myScene);
MElement pChild;
MElement pRoot;
m_objMixer.ElementsGetByIndex(0, out pRoot);
MElement elem;
((IMElements)pRoot).ElementsAdd("newElem", "video", "stream_idx=0 h=0.5 w=0.5 show=1", out pChild, 2.0);
var
myMixer: MMixer;
myScenes: IMScenes;
myScene, myRooter: IMElements;
mySceneID: string;
myIndex: integer;
myElement, myRoot: MElement;
begin
myMixer:= CreateComObject(CLASS_MMixer) as MMixer;
myScenes := myMixer as IMScenes;
myScenes.ScenesActiveGet(mySceneID, myIndex, myScene);
myScene.ElementsGetByIndex(0, myRoot);
myRooter:=myRoot as IMElements;
myRooter.ElementsAdd('newElem', 'video', tream_idx=0 h=0.5 w=0.5 show=1', myElement, 2.0);
end;
See Also

Reference

MMixerClass Class
MMixerClass Members