コード例 #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);
        }
コード例 #2
0
ファイル: CasparItem.cs プロジェクト: umarbakrie/libdotnet
        public static CasparItem Create(System.Xml.XmlReader reader)
        {
            CasparItem item = new CasparItem();

            item.ReadXml(reader);
            return(item);
        }
コード例 #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);
        }