Ejemplo n.º 1
0
        public void AddItem(string chunkFilename, bool needCrossFade)
        {
            var item = new ProcessingItem { SourceFilename = chunkFilename };
            if (items.Count == 0)
            {
                // beginning of 'part'
                var intro = new ProcessingItem { SourceFilename = String.Format("intro_for_{0}.avi", PartNumber) };
                // doesn't exist, actually. used to build resulting Filename

                intro.Transformations.Add(new Intro { VideoReference = item.SourceFilename, ImageFile = String.Format("intro_for_{0}.png", PartNumber) });  // will generate image with text
                intro.Transformations.Add(new FadeIn());  // apply FadeIn on it
                items.Add(intro);

                item.Transformations.Add(new CrossFade
                {
                    VideoInput = item.SourceFilename,
                    VideoPrev = intro.ResultFilename
                });  // crossFade with intro clip
            }
            else
            {
                // part is not empty, maybe add crossFade?
                if (needCrossFade)
                    item.Transformations.Add(new CrossFade
                    {
                        VideoInput = item.SourceFilename,
                        VideoPrev = items.Last().ResultFilename
                    });
            }

            items.Add(item);
        }
Ejemplo n.º 2
0
        public void AddItem(string chunkFilename, bool needCrossFade)
        {
            var item = new ProcessingItem {
                SourceFilename = chunkFilename
            };

            if (items.Count == 0)
            {
                // beginning of 'part'
                var intro = new ProcessingItem {
                    SourceFilename = String.Format("intro_for_{0}.avi", PartNumber)
                };
                // doesn't exist, actually. used to build resulting Filename

                intro.Transformations.Add(new Intro {
                    VideoReference = item.SourceFilename, ImageFile = String.Format("intro_for_{0}.png", PartNumber)
                });                                       // will generate image with text
                intro.Transformations.Add(new FadeIn());  // apply FadeIn on it
                items.Add(intro);

                item.Transformations.Add(new CrossFade
                {
                    VideoInput = item.SourceFilename,
                    VideoPrev  = intro.ResultFilename
                });  // crossFade with intro clip
            }
            else
            {
                // part is not empty, maybe add crossFade?
                if (needCrossFade)
                {
                    item.Transformations.Add(new CrossFade
                    {
                        VideoInput = item.SourceFilename,
                        VideoPrev  = items.Last().ResultFilename
                    });
                }
            }

            items.Add(item);
        }