Example #1
0
        void RenderPlay(Project project, Play play, MediaFile file)
        {
            PlayList         playlist;
            EncodingSettings settings;
            EditionJob       job;
            string           outputDir, outputFile;

            if (Config.AutoRenderDir == null ||
                !Directory.Exists(Config.AutoRenderDir))
            {
                outputDir = Config.VideosDir;
            }
            else
            {
                outputDir = Config.AutoRenderDir;
            }

            outputFile = String.Format("{0}-{0}.mp4", play.Category.Name, play.Name);
            outputFile = Path.Combine(outputDir, project.Description.Title, outputFile);
            try {
                Directory.CreateDirectory(Path.GetDirectoryName(outputFile));
                settings = EncodingSettings.DefaultRenderingSettings(outputFile);
                playlist = new PlayList();
                playlist.Add(new PlayListPlay(play, file, true));

                job = new EditionJob(playlist, settings);
                renderer.AddJob(job);
            } catch (Exception ex) {
                Log.Exception(ex);
            }
        }
Example #2
0
        void HandleRenderPlaylist(Playlist playlist)
        {
            List <EditionJob> jobs = guiToolkit.ConfigureRenderingJob(playlist);

            if (jobs == null)
            {
                return;
            }
            foreach (Job job in jobs)
            {
                videoRenderer.AddJob(job);
            }
        }
Example #3
0
        protected virtual void OnRenderPlaylistEvent(IPlayList playlist)
        {
            List <EditionJob> jobs = guiToolkit.ConfigureRenderingJob(playlist);

            if (jobs == null)
            {
                return;
            }
            foreach (Job job in jobs)
            {
                videoRenderer.AddJob(job);
            }
        }
Example #4
0
        void RenderPlay(Project project, TimelineEvent play)
        {
            Playlist         playlist;
            EncodingSettings settings;
            EditionJob       job;
            string           outputDir, outputProjectDir, outputFile;

            if (Config.AutoRenderDir == null ||
                !Directory.Exists(Config.AutoRenderDir))
            {
                outputDir = Config.VideosDir;
            }
            else
            {
                outputDir = Config.AutoRenderDir;
            }

            outputProjectDir = Path.Combine(outputDir,
                                            Utils.SanitizePath(project.Description.DateTitle));
            outputFile = String.Format("{0}-{1}.mp4", play.EventType.Name, play.Name);
            outputFile = Utils.SanitizePath(outputFile, ' ');
            outputFile = Path.Combine(outputProjectDir, outputFile);
            try {
                PlaylistPlayElement element;

                Directory.CreateDirectory(outputProjectDir);
                settings = EncodingSettings.DefaultRenderingSettings(outputFile);
                playlist = new Playlist();
                element  = new PlaylistPlayElement(play, project.Description.FileSet);
                playlist.Elements.Add(element);
                job = new EditionJob(playlist, settings);
                renderer.AddJob(job);
            } catch (Exception ex) {
                Log.Exception(ex);
            }
        }