public void Save(double _fPlaybackFrameInterval, double _fSlowmotionPercentage, Int64 _iSelStart, Int64 _iSelEnd, DelegateGetOutputBitmap _DelegateOutputBitmap) { // Let the user select what he wants to save exactly. // Note: _iSelStart, _iSelEnd, _Metadata, should ultimately be taken from local members. formVideoExport fve = new formVideoExport(m_VideoFile.FilePath, m_Metadata, _fSlowmotionPercentage); if (fve.Spawn() == DialogResult.OK) { if (fve.SaveAnalysis) { // Save analysis. m_Metadata.ToXmlFile(fve.Filename); } else { DoSave(fve.Filename, fve.MuxDrawings ? m_Metadata : null, fve.UseSlowMotion ? _fPlaybackFrameInterval : m_VideoFile.Infos.fFrameInterval, _iSelStart, _iSelEnd, fve.BlendDrawings, false, false, _DelegateOutputBitmap); } } // Release configuration form. fve.Dispose(); }
public void Save(double playbackFrameInterval, double slowmotionPercentage, ImageRetriever imageRetriever) { // Let the user select what he wants to save exactly. formVideoExport fve = new formVideoExport(videoReader.FilePath, metadata, slowmotionPercentage); if (fve.Spawn() != DialogResult.OK) { fve.Dispose(); return; } if (!FilesystemHelper.CanWrite(fve.Filename)) { DisplayErrorMessage(ScreenManagerLang.Error_SaveMovie_FileError); fve.Dispose(); return; } if (fve.SaveAnalysis) { MetadataSerializer serializer = new MetadataSerializer(); serializer.SaveToFile(metadata, fve.Filename); metadata.AfterManualExport(); } else { DoSave(fve.Filename, fve.UseSlowMotion ? playbackFrameInterval : metadata.UserInterval, fve.BlendDrawings, false, false, imageRetriever); PreferencesManager.PlayerPreferences.VideoFormat = FilesystemHelper.GetVideoFormat(fve.Filename); PreferencesManager.Save(); } fve.Dispose(); }