public OptionsStruct(params Object[] args) { resolution = ResolutionsEnum.p720; density = 1; cellCount = 1; videoQuality = 24; isEncodingCRF = true; encodingPreset = EncodingPreset.medium; pxlFmtIn = PixelFormat.YUV420P; pxlFmtOut = PixelFormat.YUV444P; }
public static ResolutionsEnum FromName(this ResolutionsEnum res, string resolution) { return((ResolutionsEnum)int.Parse(resolution)); /* * switch (pxlFmtString) * { * case "GRAY": return PixelFormat.Gray; * case "RGB24": return PixelFormat.RGB24; * case "YUV420P": * return PixelFormat.YUV420P; * case "YUV444P": * return PixelFormat.YUV444P; * } */ throw new System.ArgumentOutOfRangeException(); }
public static string ToName(this ResolutionsEnum res) { return(((int)res).ToString()); }