private void LoadEditionJob(EditionJob job) { videoEditor = multimediaToolkit.GetVideoEditor(); videoEditor.EncodingSettings = job.EncodingSettings; videoEditor.Progress += OnProgress; foreach (PlayListPlay segment in job.Playlist) { if (!ProcessSegment(segment)) { continue; } } try { videoEditor.Start(); } catch (Exception ex) { videoEditor.Cancel(); job.State = JobState.Error; Log.Exception(ex); Log.Error("Error rendering job: ", job.Name); guiToolkit.ErrorMessage(Catalog.GetString("Error rendering job: ") + ex.Message); } }
public void CancelJob(Job job) { if (currentJob != job) { return; } videoEditor.Progress -= OnProgress; videoEditor.Cancel(); job.State = JobState.Cancelled; RemoveCurrentFromPending(); UpdateJobsStatus(); StartNextJob(); }
void CleanVideoEditor(bool cancel = false) { if (videoEditor == null) { return; } videoEditor.Progress -= OnProgress; videoEditor.Error -= OnError; if (cancel) { videoEditor.Cancel(); } videoEditor = null; }
public void CancelJob(Job job) { if (currentJob != job) { return; } if (job is EditionJob) { videoEditor.Progress -= OnProgress; videoEditor.Cancel(); } else { videoConverter.Progress -= OnProgress; videoConverter.Error -= OnError; videoConverter.Cancel(); } job.State = JobState.Cancelled; RemoveCurrentFromPending(); UpdateJobsStatus(); StartNextJob(); }
private void LoadEditionJob(EditionJob job) { videoEditor = multimediaToolkit.GetVideoEditor(); videoEditor.EncodingSettings = job.EncodingSettings; videoEditor.Progress += OnProgress; videoEditor.Error += OnError; foreach (IPlaylistElement segment in job.Playlist.Elements) { if (segment is PlaylistPlayElement) { ProcessPlay(segment as PlaylistPlayElement); } else if (segment is PlaylistVideo) { ProcessVideo(segment as PlaylistVideo); } else if (segment is PlaylistImage) { ProcessImage(segment as PlaylistImage); } else if (segment is PlaylistDrawing) { ProcessDrawing(segment as PlaylistDrawing); } } try { videoEditor.Start(); } catch (Exception ex) { videoEditor.Cancel(); job.State = JobState.Error; Log.Exception(ex); Log.Error("Error rendering job: ", job.Name); guiToolkit.ErrorMessage(Catalog.GetString("Error rendering job: ") + ex.Message); } }
private void LoadEditionJob(EditionJob job) { videoEditor = multimediaToolkit.GetVideoEditor (); videoEditor.EncodingSettings = job.EncodingSettings; videoEditor.Progress += OnProgress; videoEditor.Error += OnError; foreach (IPlaylistElement segment in job.Playlist.Elements) { if (segment is PlaylistPlayElement) { ProcessPlay (segment as PlaylistPlayElement); } else if (segment is PlaylistVideo) { ProcessVideo (segment as PlaylistVideo); } else if (segment is PlaylistImage) { ProcessImage (segment as PlaylistImage); } else if (segment is PlaylistDrawing) { ProcessDrawing (segment as PlaylistDrawing); } } try { videoEditor.Start (); } catch (Exception ex) { videoEditor.Cancel (); job.State = JobState.Error; Log.Exception (ex); Log.Error ("Error rendering job: ", job.Name); guiToolkit.ErrorMessage (Catalog.GetString ("Error rendering job: ") + ex.Message); } }