OSDN Git Service

remove crf flag and all uses of it
[handbrake-jp/handbrake-jp-git.git] / win / C# / Functions / QueryParser.cs
index 0b7c2a3..7230ad9 100644 (file)
@@ -18,70 +18,71 @@ namespace Handbrake.Functions
 \r
         #region Varibles\r
 \r
-        #region Source\r
-        public int DVDTitle { get; private set; }\r
-        public int DVDChapterStart { get; private set; }\r
-        public int DVDChapterFinish { get; private set; }\r
-        #endregion\r
-\r
-        #region Output Settings\r
-        public string Format { get; private set; }\r
-        public Boolean LargeMP4 { get; private set; }\r
-        public Boolean IpodAtom { get; private set; }\r
-        public Boolean OptimizeMP4 { get; private set; }\r
-        #endregion\r
-\r
-        #region Picture Settings\r
-        public int Width { get; private set; }\r
-        public int Height { get; private set; }\r
-        public int MaxWidth { get; private set; }\r
-        public int MaxHeight { get; private set; }\r
-        public string CropValues { get; private set; }\r
-        public string CropTop { get; private set; }\r
-        public string CropBottom { get; private set; }\r
-        public string CropLeft { get; private set; }\r
-        public string CropRight { get; private set; }\r
-        public int AnamorphicMode { get; private set; }\r
-        public Boolean keepDisplayAsect { get; private set; }\r
-        public double displayWidthValue { get; private set; }\r
-        public int pixelAspectWidth { get; private set; }\r
-        public int pixelAspectHeight { get; private set; }\r
-        public int AnamorphicModulus { get; private set; }\r
-        #endregion\r
-\r
-        #region Video Filters\r
-        public string DeTelecine { get; private set; }\r
-        public int DeBlock { get; private set; }\r
-        public string DeInterlace { get; private set; }\r
-        public string DeNoise { get; private set; }\r
-        public string Decomb { get; private set; }\r
-        #endregion\r
-\r
-        #region Video Settings\r
-        public string VideoEncoder { get; private set; }\r
-        public Boolean Grayscale { get; private set; }\r
-        public Boolean TwoPass { get; private set; }\r
-        public Boolean TurboFirstPass { get; private set; }\r
-        public string VideoFramerate { get; private set; }\r
-        public string AverageVideoBitrate { get; private set; }\r
-        public string VideoTargetSize { get; private set; }\r
-        public float VideoQuality { get; private set; }\r
-        #endregion\r
-\r
-        #region Audio Settings\r
-        public ArrayList AudioInformation { get; private set; }\r
-        public string Subtitles { get; private set; }\r
-        public Boolean ForcedSubtitles { get; private set; }\r
-        #endregion\r
-\r
-        #region Chapter Markers\r
-        public Boolean ChapterMarkers { get; private set; }\r
-        #endregion\r
-\r
-        #region Other\r
-        public string H264Query { get; private set; }\r
-        public Boolean Verbose { get; private set; }\r
-        #endregion\r
+        // Source\r
+        public int DVDTitle { get; set; }\r
+        public int DVDChapterStart { get; set; }\r
+        public int DVDChapterFinish { get; set; }\r
+\r
+        // Output Settings\r
+        public string Format { get; set; }\r
+        public Boolean LargeMP4 { get; set; }\r
+        public Boolean IpodAtom { get; set; }\r
+        public Boolean OptimizeMP4 { get; set; }\r
+\r
+        // Picture Settings\r
+        public int Width { get; set; }\r
+        public int Height { get; set; }\r
+        public int MaxWidth { get; set; }\r
+        public int MaxHeight { get; set; }\r
+        public string CropValues { get; set; }\r
+        public string CropTop { get; set; }\r
+        public string CropBottom { get; set; }\r
+        public string CropLeft { get; set; }\r
+        public string CropRight { get; set; }\r
+        public int AnamorphicMode { get; set; }\r
+        public Boolean keepDisplayAsect { get; set; }\r
+        public double displayWidthValue { get; set; }\r
+        public int pixelAspectWidth { get; set; }\r
+        public int pixelAspectHeight { get; set; }\r
+        public int AnamorphicModulus { get; set; }\r
+\r
+        // Video Filters\r
+        public string DeTelecine { get; set; }\r
+        public int DeBlock { get; set; }\r
+        public string DeInterlace { get; set; }\r
+        public string DeNoise { get; set; }\r
+        public string Decomb { get; set; }\r
+\r
+        // Video Settings\r
+        public string VideoEncoder { get; set; }\r
+        public Boolean Grayscale { get; set; }\r
+        public Boolean TwoPass { get; set; }\r
+        public Boolean TurboFirstPass { get; set; }\r
+        public string VideoFramerate { get; set; }\r
+        public string AverageVideoBitrate { get; set; }\r
+        public string VideoTargetSize { get; set; }\r
+        public float VideoQuality { get; set; }\r
+\r
+        // Audio Settings\r
+        public ArrayList AudioInformation { get; set; }\r
+        public string Subtitles { get; set; }\r
+        public Boolean ForcedSubtitles { get; set; }\r
+\r
+        // Chapter Markers\r
+        public Boolean ChapterMarkers { get; set; }\r
+\r
+        // Other\r
+        public string H264Query { get; set; }\r
+        public Boolean Verbose { get; set; }\r
+\r
+        // Preset Information\r
+        public int PresetBuildNumber { get; set; }\r
+        public string PresetDescription { get; set; }\r
+        public string PresetName { get; set; }\r
+        public string Type { get; set; }\r
+        public Boolean UsesMaxPictureSettings { get; set; }\r
+        public Boolean UsesPictureFilters { get; set; }\r
+        public Boolean UsesPictureSettings { get; set; }\r
 \r
         #endregion\r
 \r
@@ -204,7 +205,7 @@ namespace Handbrake.Functions
 \r
                 if (width.Success)\r
                     thisQuery.Width = int.Parse(width.Groups[0].Value.Replace("-w ", ""));\r
-                                                              \r
+\r
                 if (height.Success)\r
                     thisQuery.Height = int.Parse(height.Groups[0].Value.Replace("-l ", ""));\r
 \r
@@ -222,7 +223,7 @@ namespace Handbrake.Functions
                     thisQuery.CropBottom = actCropValues[1];\r
                     thisQuery.CropLeft = actCropValues[2];\r
                     thisQuery.CropRight = actCropValues[3];\r
-                } \r
+                }\r
 \r
                 if (strictAnamorphic.Success)\r
                     thisQuery.AnamorphicMode = 1;\r
@@ -239,10 +240,10 @@ namespace Handbrake.Functions
                     thisQuery.displayWidthValue = double.Parse(displayWidth.Groups[0].Value.Replace("--display-width ", ""));\r
 \r
                 if (pixelAspect.Success)\r
-                    thisQuery.pixelAspectWidth = int.Parse(pixelAspect.Groups[0].Value.Replace("--pixel-aspect ", ""));\r
+                    thisQuery.pixelAspectWidth = int.Parse(pixelAspect.Groups[1].Value.Replace("--pixel-aspect ", ""));\r
 \r
-                if (pixelAspect.Success)\r
-                    thisQuery.pixelAspectHeight = int.Parse(pixelAspect.Groups[1].Value.Replace("--pixel-aspect ", ""));\r
+                if (pixelAspect.Success && pixelAspect.Groups.Count >=3)\r
+                    thisQuery.pixelAspectHeight = int.Parse(pixelAspect.Groups[2].Value.Replace("--pixel-aspect ", ""));\r
 \r
                 if (modulus.Success)\r
                     thisQuery.AnamorphicModulus = int.Parse(modulus.Groups[0].Value.Replace("--modulus ", ""));\r
@@ -260,7 +261,7 @@ namespace Handbrake.Functions
                         thisQuery.Decomb = decombValue.ToString().Replace("--decomb=", "").Replace("\"", "");\r
                 }\r
 \r
-                thisQuery.DeInterlace = "None";\r
+                thisQuery.DeInterlace = "Off";\r
                 if (deinterlace.Success)\r
                 {\r
                     thisQuery.DeInterlace = deinterlace.ToString().Replace("--deinterlace=", "").Replace("\"", "");\r
@@ -268,7 +269,7 @@ namespace Handbrake.Functions
                     thisQuery.DeInterlace = thisQuery.DeInterlace.Replace("slowest", "Slowest");\r
                 }\r
 \r
-                thisQuery.DeNoise = "None";\r
+                thisQuery.DeNoise = "Off";\r
                 if (denoise.Success)\r
                 {\r
                     thisQuery.DeNoise = denoise.ToString().Replace("--denoise=", "").Replace("\"", "");\r