public bool Add(Svt.Caspar.CasparCGItem item) { if (item != null) { return(Add(item, item.Layer)); } return(false); }
public void Add(CasparCGItem item, bool bPlayOnLoad) { bool bAutoPlay = item.AutoPlay || bPlayOnLoad; if (item.VideoLayer == -1) { Channel.Connection.SendString("CG " + Channel.ID + " ADD " + item.Layer + " \"" + item.TemplateIdentifier + "\" " + (bAutoPlay ? "1" : "0") + " \"" + item.XMLData + "\""); } else { Channel.Connection.SendString("CG " + Channel.ID + "-" + item.VideoLayer + " ADD " + item.Layer + " \"" + item.TemplateIdentifier + "\" " + (bAutoPlay ? "1" : "0") + " \"" + item.XMLData + "\""); } }
public RundownItem() { StaticItem = new Svt.Caspar.CasparItem(string.Empty); StaticItem.Transition.Duration = 12; StaticItem.VideoLayer = -1; CGItem = new Svt.Caspar.CasparCGItem(); CGItem.VideoLayer = -1; IsCG = true; IsControl = false; MultiStep = false; IsStoredData = false; IsDataUpdate = false; IsStarted = false; Color = Color.FromName(Properties.Settings.Default.TemplateColor); Name = Channel = string.Empty; Page = string.Empty; Online = false; }
public void Add(CasparCGItem item, bool bPlayOnLoad) { bool bAutoPlay = item.AutoPlay || bPlayOnLoad; if (item.VideoLayer == -1) Channel.Connection.SendString("CG " + Channel.ID + " ADD " + item.Layer + " \"" + item.TemplateIdentifier + "\" " + (bAutoPlay ? "1" : "0") + " \"" + item.XMLData + "\""); else Channel.Connection.SendString("CG " + Channel.ID + "-" + item.VideoLayer + " ADD " + item.Layer + " \"" + item.TemplateIdentifier + "\" " + (bAutoPlay ? "1" : "0") + " \"" + item.XMLData + "\""); }
public void Add(int videoLayer, int layer, CasparCGItem item, bool bPlayOnLoad) { item.VideoLayer = videoLayer; item.Layer = layer; Add(item, bPlayOnLoad); }
public void Add(int layer, CasparCGItem item) { item.Layer = layer; Add(item, false); }
public void Add(CasparCGItem item) { Add(item, false); }
private void button1_Click(object sender, EventArgs e) { var cg = new CasparCGItem("time", NowNextCgLayer, false); var cgxml = new List<CGDataPair>{new CGDataPair("f0", "Olly Murs"), new CGDataPair("f1", "Dance with me tonight")}; cg.Data.AddRange(cgxml); _casparDevice.Channels[casparServerChannelID].CG.Add(cg, false); _casparDevice.Channels[casparServerChannelID].CG.Play(NowNextCgLayer); }