private string OutTypeToStr(OutTypes ot) { switch (ot) { case OutTypes.AVI: return("avi"); case OutTypes.FLV: return("flv"); case OutTypes.MKV: return("mkv"); case OutTypes.MP4: return("mp4"); case OutTypes.VOB: return("vob"); case OutTypes.WMV: return("wmv"); case OutTypes.GIF: return("gif"); case OutTypes.MPG: return("mpg"); default: return("avi"); } }
//End events #endregion public static void OutputAction(string msg, OutTypes type, params object[] args) { switch (type) { case OutTypes.Info: OutputInfo?.Invoke(msg); break; case OutTypes.Error: OutputError?.Invoke(msg); break; case OutTypes.Warning: OutputWarning?.Invoke(msg); break; case OutTypes.Success: OutputSuccess?.Invoke(msg); break; case OutTypes.Debug: OutputDebug?.Invoke(msg); break; default: Output?.Invoke(msg, args); break; } }
//public VideoConverterFFMPEG() //{ // strFFMPEGPath = "C:\\Documents\\VisualStudioProjects\\DirectShowVideoTest\\ffmpeg.exe"; // intStatus = ConvStates.WaitingForParams; //} public VideoConverterFFMPEG(string sourcefile, string destfile, OutTypes outformat, int quality = 0) { strInFile = sourcefile; strOutFile = destfile; OutType = outformat; intQuality = quality; CheckParameter(); }
//Adding outs will automatically track atbats and plate appearances public void AddOut(OutTypes outType) { if (!outsTaken.ContainsKey(outType)) { outsTaken.Add(outType, 0); } outsTaken[outType] += 1; if (outType != OutTypes.CaughtStealing) { plateAppearances += 1; if (outType != OutTypes.Sacrifice) { atBats += 1; } } }