Exemple #1
0
 public CasparItem(string clipname, Transition transition)
 {
     clipname_ = clipname;
     if (transition != null)
     {
         transition_.Type = transition.Type;
         transition_.Duration = transition.Duration;
     }
 }
Exemple #2
0
 public CasparItem(int videoLayer, string clipname, Transition transition)
 {
     videoLayer_ = videoLayer;
     clipname_ = clipname;
     if (transition != null)
     {
         transition_.Type = transition.Type;
         transition_.Duration = transition.Duration;
     }
 }
Exemple #3
0
        public void ReadXml(System.Xml.XmlReader reader)
        {
            reader.MoveToContent();
            string clipname = reader["clipname"];
            if (!string.IsNullOrEmpty(clipname))
                Clipname = clipname;
            else
                Clipname = "";

            string videoLayer = reader["videoLayer"];
            if (!string.IsNullOrEmpty(videoLayer))
                VideoLayer = Int32.Parse(videoLayer);

            string seek = reader["seek"];
            if (!string.IsNullOrEmpty(seek))
                Seek = Int32.Parse(seek);

            string length = reader["length"];
            if (!string.IsNullOrEmpty(length))
                Length = Int32.Parse(length);

            string loop = reader["loop"];
            bool bLoop = false;
            Boolean.TryParse(loop, out bLoop);
            Loop = bLoop;

            reader.ReadStartElement();
            if (reader.Name == "transition")
            {
                int duration = 0;

                string typeString = reader["type"];
                string durationString = reader["duration"];
                if (Int32.TryParse(durationString, out duration) && Enum.IsDefined(typeof(TransitionType), typeString.ToUpper()))
                {
                    transition_ = new Transition((TransitionType)Enum.Parse(typeof(TransitionType), typeString.ToUpper()), duration);
                }
                else
                    transition_ = new Transition();
            }
        }