Ejemplo n.º 1
0
        private bool ProcessSegment(PlayListPlay segment)
        {
            if (!segment.Valid)
            {
                return(false);
            }

            Log.Debug(String.Format("Adding segment with {0} drawings", segment.Drawings.Count));
            if (segment.Drawings.Count >= 1)
            {
                Drawing drawing    = segment.Drawings[0];
                string  image_path = CreateStillImage(segment.MediaFile.FilePath, drawing);

                videoEditor.AddSegment(segment.MediaFile.FilePath,
                                       segment.Start.MSeconds,
                                       drawing.RenderTime - segment.Start.MSeconds,
                                       segment.Rate,
                                       segment.Name,
                                       segment.MediaFile.HasAudio);
                videoEditor.AddImageSegment(image_path,
                                            drawing.RenderTime,
                                            drawing.PauseTime,
                                            segment.Name);
                videoEditor.AddSegment(segment.MediaFile.FilePath,
                                       drawing.RenderTime,
                                       segment.Stop.MSeconds - drawing.RenderTime,
                                       segment.Rate,
                                       segment.Name,
                                       segment.MediaFile.HasAudio);
            }
            else
            {
                videoEditor.AddSegment(segment.MediaFile.FilePath,
                                       segment.Start.MSeconds,
                                       segment.Duration.MSeconds,
                                       segment.Rate,
                                       segment.Name,
                                       segment.MediaFile.HasAudio);
            }
            return(true);
        }
Ejemplo n.º 2
0
 private void LoadJob(Job job)
 {
     foreach (PlayListPlay segment in job.Playlist)
     {
         if (segment.Valid)
         {
             videoEditor.AddSegment(segment.MediaFile.FilePath,
                                    segment.Start.MSeconds,
                                    segment.Duration.MSeconds,
                                    segment.Rate,
                                    segment.Name,
                                    segment.MediaFile.HasAudio);
         }
     }
 }
Ejemplo n.º 3
0
        void LoadConversionJob(ConversionJob job)
        {
            videoEditor = App.Current.MultimediaToolkit.GetVideoEditor();
            videoEditor.EncodingSettings = job.EncodingSettings;
            videoEditor.Progress        += OnProgress;
            videoEditor.Error           += OnError;

            foreach (MediaFile file in job.InputFiles)
            {
                PlaylistVideo video = new PlaylistVideo(file);
                Log.Debug("Convert video " + video.File.FilePath);
                videoEditor.AddSegment(video.File.FilePath, 0, -1, 1, "", video.File.HasAudio, new Area());
            }

            videoEditor.Start();
        }
Ejemplo n.º 4
0
 void ProcessVideo(PlaylistVideo video)
 {
     Log.Debug("Adding external video " + video.File.FilePath);
     videoEditor.AddSegment(video.File.FilePath, 0, video.File.Duration.MSeconds,
                            1, "", video.File.HasAudio, new Area());
 }