Exemplo n.º 1
0
        public bool LoadBG(CasparItem item)
        {
            string clipname = item.Clipname.Replace("\\", "\\\\");

            if (item.VideoLayer == -1)
            {
                if (item.Seek == -1)
                {
                    Connection.SendString("LOADBG " + ID + " " + clipname + (string)(item.Loop ? " LOOP" : "") + " " + item.Transition);
                }
                else
                {
                    Connection.SendString("LOADBG " + ID + " " + clipname + (string)(item.Loop ? " LOOP" : "") + " " + item.Transition + " SEEK " + item.Seek + " LENGTH " + item.Length);
                }
            }
            else
            {
                if (item.Seek == -1)
                {
                    Connection.SendString("LOADBG " + ID + "-" + item.VideoLayer + " " + clipname + (string)(item.Loop ? " LOOP" : "") + " " + item.Transition);
                }
                else
                {
                    Connection.SendString("LOADBG " + ID + "-" + item.VideoLayer + " " + clipname + (string)(item.Loop ? " LOOP" : "") + " " + item.Transition + " SEEK " + item.Seek + " LENGTH " + item.Length);
                }
            }

            return(true);
        }
Exemplo n.º 2
0
        public static CasparItem Create(System.Xml.XmlReader reader)
        {
            CasparItem item = new CasparItem();

            item.ReadXml(reader);
            return(item);
        }
Exemplo n.º 3
0
        public bool Load(CasparItem item)
        {
            string clipname = item.Clipname.Replace("\\", "\\\\");

            if (item.VideoLayer == -1)
            {
                Connection.SendString("LOAD " + ID + " " + clipname + (string)(item.Loop ? " LOOP" : ""));
            }
            else
            {
                Connection.SendString("LOAD " + ID + "-" + item.VideoLayer + " " + clipname + (string)(item.Loop ? " LOOP" : ""));
            }
            return(true);
        }