Ejemplo n.º 1
0
        public void CheckAVSFadeout()
        {
            SetUp();
            model.Montage.Chunks.Mark(1000, new bool[] { true, true }, false);
            model.Montage.Chunks.Mark(2000, new bool[] { false, true }, false);
            model.FormPreparedChunks();
            var nodes = serv.GetEpisodesNodes(model)[0] as AvsConcatList;

            Assert.AreEqual(1, nodes.Items.Count);
            Assert.AreEqual(typeof(AvsFadeOut), nodes.Items[0].GetType());
        }
Ejemplo n.º 2
0
        public MakeAll(EditorModel model)
        {
            Name = "Make all for: " + model.RawLocation.Name;
            var videoWork = new AssemblyVideoWork(model);

            Tasks.Add(videoWork);
            var serv     = new AssemblerService(true);
            var episodes = serv.GetEpisodesNodes(model);

            //с эпизодами надо что-то решить, в силу того, что эпизодинфо не знает нужной инфы, другого выхода не вижу
            //мы это уже обсуждали, но так и не пришли ни к чему ((

            for (int episodeNumber = 0; episodeNumber < episodes.Count; episodeNumber++)
            {
                if (model.Montage.Information.Episodes[episodeNumber].OutputType == OutputTypes.None)
                {
                    continue;
                }

                //if (model.Montage.Information.Episodes[episodeNumber].PatchModel != null)
                //{
                //    BeforeWorks.Add(new PatchWork(model.Montage.Information.Episodes[episodeNumber].PatchModel,
                //                                  model.Videotheque.Data.EditorSettings.CrossFadesEnabled,
                //                                  model,
                //                                  true));
                //    var patchedLocation = model.Locations.GetFinalOutputFile(episodeNumber);
                //    AfterWorks.Add(new YoutubeWork(model, episodeNumber, patchedLocation));
                //    continue;
                //}

                var from = model.Locations.GetOutputFile(episodeNumber);
                var to   = model.Locations.GetFinalOutputFile(episodeNumber);

                if (model.Montage.Information.Episodes[episodeNumber].OutputType == OutputTypes.Patch)
                {
                    continue;
                }


                var task        = new MoveFile(from, to, model);
                var youtubeWork = new YoutubeWork(model, episodeNumber, false);

                videoWork.Tasks.Select(x => x as CompositeWork).ElementAt(episodeNumber).Tasks.Add(task);
                videoWork.Tasks.Select(x => x as CompositeWork).ElementAt(episodeNumber).Tasks.Add(youtubeWork);
            }
        }
Ejemplo n.º 3
0
        public AssemblyVideoWork(EditorModel model)
        {
            Model = model;
            Name  = "Assembling video: " + model.RawLocation.Name;
            var service  = new AssemblerService(model.Videotheque.Data.EditorSettings.CrossFadesEnabled);
            var episodes = service.GetEpisodesNodes(Model);

            for (var episodeNumber = 0; episodeNumber < episodes.Count; episodeNumber++)
            {
                if (Model.Montage.Information.Episodes[episodeNumber].OutputType == OutputTypes.None)
                {
                    continue;
                }
                var episodeInfo = model.Montage.Information.Episodes[episodeNumber];
                Tasks.Add(new AssemblyEpisodeWork(model, episodeInfo));
            }
        }