Exemple #1
0
 public void Dispose()
 {
     if (_mlCharGen != null)
     {
         _mplaylist.PluginsRemove(_mlCharGen);
         Marshal.ReleaseComObject(_mlCharGen);
         _mlCharGen = null;
     }
 }
Exemple #2
0
        public sealed override void Detach(object obj, string id)
        {
            CoMLCharGen charGen = obj as CoMLCharGen;

            if (charGen == null)
            {
                throw new ArgumentException();
            }

            this.Detach(charGen, id);
        }
Exemple #3
0
        public sealed override string Attach(object obj)
        {
            CoMLCharGen charGen = obj as CoMLCharGen;

            if (charGen == null)
            {
                throw new ArgumentException();
            }

            var id = Guid.NewGuid().ToString("N");

            this.Attach(charGen, id);
            return(id);
        }
Exemple #4
0
        private void Form1_Load(object sender, EventArgs e)
        {
            m_objFile = new MFileClass();
            m_objLive = new MLiveClass();

            m_objLive.PreviewWindowSet("", panel1.Handle.ToInt32());
            m_objLive.PreviewEnable("", 0, 1);

            m_objLive.DeviceSet("video", "Medialooks DXGI/DX11 ScreenCapture", "");
            m_objLive.ObjectStart(null);

            UpdateList();

            m_objCharGen = new MLCHARGENLib.CoMLCharGen();
            m_objLive.PluginsAdd(m_objCharGen, 0);


            // Frames counter
            string strID = "";

            m_objCharGen.AddNewItem("<text type=counter size=4.0>XXXXXX</text>", 0.1, 0.2, 1, 1, ref strID);
        }
Exemple #5
0
 public CGManager(MPlaylistClass mplaylist)
 {
     this._mplaylist = mplaylist;
     _mlCharGen      = new CoMLCharGen();
     mplaylist.PluginsAdd(_mlCharGen, 0);
 }
 protected override void Attach(CoMLCharGen charGen, string id)
 {
     charGen.AddNewItem(this.FileNameOrItemDesc, this.X, this.Y, Convert.ToInt32(this.IsRelative), Convert.ToInt32(this.Visible), ref id);
 }
Exemple #7
0
 protected override void Attach(CoMLCharGen charGen, string id)
 {
     charGen.TickerAddNew("<ticker type='ticker-horz-1'/>", this.X, this.Y, this.Width, this.Height,
                          Convert.ToInt32(this.IsRelative), Convert.ToInt32(this.Visible), ref id);
     charGen.TickerAddContent(id, this.Text, string.Empty);
 }
Exemple #8
0
 protected virtual void Detach(CoMLCharGen charGen, string id)
 {
     charGen.RemoveItem(id, 0);
 }
Exemple #9
0
 protected abstract void Attach(CoMLCharGen charGen, string id);
Exemple #10
0
 protected override void Attach(CoMLCharGen charGen, string id)
 {
     charGen.AddNewTextItem(ref _textProps, this.X, this.Y,
                            Convert.ToInt32(this.IsRelative), Convert.ToInt32(this.Visible), ref id);
 }