OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 5 Feb 2011 21:39:09 +0000 (21:39 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 5 Feb 2011 21:39:09 +0000 (21:39 +0000)
- Updates to the WinForms app for the library changes.

git-svn-id: svn://localhost/HandBrake/trunk@3782 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/Controls/AudioPanel.cs
win/C#/Controls/Filters.cs
win/C#/Functions/PresetLoader.cs
win/C#/HandBrake10.5.1.ReSharper
win/C#/frmMain.cs
win/C#/frmQueue.cs

index ba9c179..ed56bf3 100644 (file)
@@ -7,6 +7,7 @@ namespace Handbrake.Controls
 {\r
     using System;\r
     using System.Collections;\r
+    using System.Collections.Generic;\r
     using System.Globalization;\r
     using System.Linq;\r
     using System.Windows.Forms;\r
@@ -105,7 +106,7 @@ namespace Handbrake.Controls
         /// Load an arraylist of AudioTrack items into the list.\r
         /// </summary>\r
         /// <param name="audioTracks">List of audio tracks</param>\r
-        public void LoadTracks(ArrayList audioTracks)\r
+        public void LoadTracks(List<AudioTrack> audioTracks)\r
         {\r
             ClearAudioList();\r
 \r
@@ -152,8 +153,8 @@ namespace Handbrake.Controls
             // Add any tracks the preset has, if there is a preset and no audio tracks in the list currently\r
             if (audioList.Rows.Count == 0 && preset != null)\r
             {\r
-                QueryParserUtility parsed = QueryParserUtility.Parse(preset.Query);\r
-                foreach (AudioTrack audioTrack in parsed.AudioInformation)\r
+                EncodeTask parsed = QueryParserUtility.Parse(preset.Query);\r
+                foreach (AudioTrack audioTrack in parsed.AudioTracks)\r
                 {\r
                     DataGridViewRow newTrack = new DataGridViewRow();\r
                     newTrack.CreateCells(audioList);\r
index dda8c95..0f47b4b 100644 (file)
@@ -8,6 +8,8 @@ namespace Handbrake.Controls
     using System;\r
     using System.Windows.Forms;\r
 \r
+    using HandBrake.ApplicationServices.Model.Encoding;\r
+\r
     /// <summary>\r
     /// The Filters Panel\r
     /// </summary>\r
@@ -129,22 +131,27 @@ namespace Handbrake.Controls
         /// <summary>\r
         /// Set the Detelecine control\r
         /// </summary>\r
-        /// <param name="value">The value part of the CLI string</param>\r
-        public void SetDeTelecine(string value)\r
+        /// <param name="value">\r
+        /// The value part of the CLI string\r
+        /// </param>\r
+        /// <param name="custom">\r
+        /// The Custom Detelecine setting\r
+        /// </param>\r
+        public void SetDeTelecine(Detelecine value, string custom)\r
         {\r
             text_customDT.Text = string.Empty;\r
             text_customDT.Visible = false;\r
             switch (value)\r
             {\r
-                case "Off":\r
+                case Detelecine.Off:\r
                     drop_detelecine.SelectedIndex = 0;\r
                     break;\r
-                case "Default":\r
+                case Detelecine.Default:\r
                     drop_detelecine.SelectedIndex = 2;\r
                     break;\r
                 default:\r
                     drop_detelecine.SelectedIndex = 1;\r
-                    text_customDT.Text = value;\r
+                    text_customDT.Text = custom;\r
                     text_customDT.Visible = true;\r
                     break;\r
             }\r
@@ -153,28 +160,33 @@ namespace Handbrake.Controls
         /// <summary>\r
         /// Set the Denoise control\r
         /// </summary>\r
-        /// <param name="value">The value part of the CLI string</param>\r
-        public void SetDeNoise(string value)\r
+        /// <param name="value">\r
+        /// The value part of the CLI string\r
+        /// </param>\r
+        /// <param name="custom">\r
+        /// The custom denoise setting.\r
+        /// </param>\r
+        public void SetDeNoise(Denoise value, string custom)\r
         {\r
             text_customDN.Text = string.Empty;\r
             text_customDN.Visible = false;\r
             switch (value)\r
             {\r
-                case "Off":\r
+                case Denoise.Off:\r
                     drop_denoise.SelectedIndex = 0;\r
                     break;\r
-                case "Weak":\r
+                case Denoise.Weak:\r
                     drop_denoise.SelectedIndex = 2;\r
                     break;\r
-                case "Medium":\r
+                case Denoise.Medium:\r
                     drop_denoise.SelectedIndex = 3;\r
                     break;\r
-                case "Strong":\r
+                case Denoise.Strong:\r
                     drop_denoise.SelectedIndex = 4;\r
                     break;\r
                 default:\r
                     drop_denoise.SelectedIndex = 1;\r
-                    text_customDN.Text = value;\r
+                    text_customDN.Text = custom;\r
                     text_customDN.Visible = true;\r
                     break;\r
             }\r
@@ -183,29 +195,34 @@ namespace Handbrake.Controls
         /// <summary>\r
         /// Set the Deinterlace Control\r
         /// </summary>\r
-        /// <param name="value">The value part of the CLI string</param>\r
-        public void SetDeInterlace(string value)\r
+        /// <param name="value">\r
+        /// The value part of the CLI string\r
+        /// </param>\r
+        /// <param name="custom">\r
+        /// The Custom Detinerlace Settings\r
+        /// </param>\r
+        public void SetDeInterlace(Deinterlace value, string custom)\r
         {\r
             text_customDI.Text = string.Empty;\r
             text_customDI.Visible = false;\r
             switch (value)\r
             {\r
-                case "Off":\r
+                case Deinterlace.Off:\r
                     drop_deinterlace.SelectedIndex = 0;\r
                     break;\r
-                case "Fast":\r
+                case Deinterlace.Fast:\r
                     drop_deinterlace.SelectedIndex = 2;\r
                     break;\r
-                case "Slow":\r
+                case Deinterlace.Slow:\r
                     drop_deinterlace.SelectedIndex = 3;\r
                     break;\r
-                case "Slower":\r
+                case Deinterlace.Slower:\r
                     drop_deinterlace.SelectedIndex = 4;\r
 \r
                     break;\r
                 default:\r
                     drop_deinterlace.SelectedIndex = 1;\r
-                    text_customDI.Text = value;\r
+                    text_customDI.Text = custom;\r
                     text_customDI.Visible = true;\r
                     break;\r
             }\r
@@ -214,22 +231,27 @@ namespace Handbrake.Controls
         /// <summary>\r
         /// Set the Decomb Control\r
         /// </summary>\r
-        /// <param name="value">The value part of the CLI string</param>\r
-        public void SetDecomb(string value)\r
+        /// <param name="value">\r
+        /// The value part of the CLI string\r
+        /// </param>\r
+        /// <param name="custom">\r
+        /// The custom option string\r
+        /// </param>\r
+        public void SetDecomb(Decomb value, string custom)\r
         {\r
             text_customDC.Text = string.Empty;\r
             text_customDC.Visible = false;\r
             switch (value)\r
             {\r
-                case "Off":\r
+                case Decomb.Off:\r
                     drop_decomb.SelectedIndex = 0;\r
                     break;\r
-                case "Default":\r
+                case Decomb.Default:\r
                     drop_decomb.SelectedIndex = 2;\r
                     break;\r
                 default:\r
                     drop_decomb.SelectedIndex = 1;\r
-                    text_customDC.Text = value;\r
+                    text_customDC.Text = custom;\r
                     text_customDC.Visible = true;\r
                     break;\r
             }\r
index f15389e..64e153e 100644 (file)
@@ -8,7 +8,8 @@ namespace Handbrake.Functions
     using System.Drawing;\r
     using System.Windows.Forms;\r
 \r
-    using HandBrake.ApplicationServices.Utilities;\r
+    using HandBrake.ApplicationServices.Model;\r
+    using HandBrake.ApplicationServices.Model.Encoding;\r
 \r
     /// <summary>\r
     /// Load a preset into the main Window\r
@@ -28,7 +29,7 @@ namespace Handbrake.Functions
         /// <param name="name">\r
         /// Name of the preset\r
         /// </param>\r
-        public static void LoadPreset(frmMain mainWindow, QueryParserUtility presetQuery, string name)\r
+        public static void LoadPreset(frmMain mainWindow, EncodeTask presetQuery, string name)\r
         {\r
             #region Source\r
 \r
@@ -36,44 +37,46 @@ namespace Handbrake.Functions
             mainWindow.check_iPodAtom.CheckState = CheckState.Unchecked;\r
 \r
             // Now load all the new settings onto the main window\r
-            if (presetQuery.Format != null)\r
-            {\r
-                string destination = mainWindow.text_destination.Text;\r
-                destination = destination.Replace(".mp4", "." + presetQuery.Format);\r
-                destination = destination.Replace(".m4v", "." + presetQuery.Format);\r
-                destination = destination.Replace(".mkv", "." + presetQuery.Format);\r
-                mainWindow.text_destination.Text = destination;\r
-            }\r
+            string destination = mainWindow.text_destination.Text;\r
+            destination = destination.Replace(".mp4", "." + presetQuery.OutputFormat);\r
+            destination = destination.Replace(".m4v", "." + presetQuery.OutputFormat);\r
+            destination = destination.Replace(".mkv", "." + presetQuery.OutputFormat);\r
+            mainWindow.text_destination.Text = destination;\r
 \r
             #endregion\r
 \r
             #region Destination and Output Settings\r
 \r
-            if (presetQuery.Format != null)\r
+            if (presetQuery.OutputFormat == OutputFormat.Mp4 || presetQuery.OutputFormat == OutputFormat.M4V)\r
             {\r
-                if (presetQuery.Format == "mp4" || presetQuery.Format == "m4v")\r
+                if (mainWindow.drop_format.SelectedIndex == 0)\r
                 {\r
-                    if (mainWindow.drop_format.SelectedIndex == 0)\r
-                        mainWindow.SetExtension(".mp4");\r
-                    else\r
-                        mainWindow.drop_format.SelectedIndex = 0;\r
+                    mainWindow.SetExtension(".mp4");\r
                 }\r
-                else if (presetQuery.Format == "mkv")\r
+                else\r
                 {\r
-                    if (mainWindow.drop_format.SelectedIndex == 1)\r
-                        mainWindow.SetExtension(".mkv");\r
-                    else\r
-                        mainWindow.drop_format.SelectedIndex = 1;\r
+                    mainWindow.drop_format.SelectedIndex = 0;\r
+                }\r
+            }\r
+            else if (presetQuery.OutputFormat == OutputFormat.Mkv)\r
+            {\r
+                if (mainWindow.drop_format.SelectedIndex == 1)\r
+                {\r
+                    mainWindow.SetExtension(".mkv");\r
+                }\r
+                else\r
+                {\r
+                    mainWindow.drop_format.SelectedIndex = 1;\r
                 }\r
             }\r
 \r
-            mainWindow.check_iPodAtom.CheckState = presetQuery.IpodAtom ? CheckState.Checked : CheckState.Unchecked;\r
+            mainWindow.check_iPodAtom.CheckState = presetQuery.IPod5GSupport ? CheckState.Checked : CheckState.Unchecked;\r
 \r
             mainWindow.check_optimiseMP4.CheckState = presetQuery.OptimizeMP4\r
                                                           ? CheckState.Checked\r
                                                           : CheckState.Unchecked;\r
 \r
-            mainWindow.check_largeFile.CheckState = presetQuery.LargeMP4 ? CheckState.Checked : CheckState.Unchecked;\r
+            mainWindow.check_largeFile.CheckState = presetQuery.LargeFile ? CheckState.Checked : CheckState.Unchecked;\r
 \r
             mainWindow.setContainerOpts(); // select the container options according to the selected format\r
 \r
@@ -82,104 +85,150 @@ namespace Handbrake.Functions
             #region Picture\r
 \r
             mainWindow.PictureSettings.check_autoCrop.Checked = true;\r
-            if (presetQuery.CropValues != null)\r
+            if (presetQuery.IsCustomCropping)\r
             {\r
-                int top, bottom, left, right;\r
-                int.TryParse(presetQuery.CropTop, out top);\r
-                int.TryParse(presetQuery.CropBottom, out bottom);\r
-                int.TryParse(presetQuery.CropLeft, out left);\r
-                int.TryParse(presetQuery.CropRight, out right);\r
-\r
                 mainWindow.PictureSettings.check_customCrop.Checked = true;\r
-                mainWindow.PictureSettings.crop_top.Value = top;\r
-                mainWindow.PictureSettings.crop_bottom.Value = bottom;\r
-                mainWindow.PictureSettings.crop_left.Value = left;\r
-                mainWindow.PictureSettings.crop_right.Value = right;\r
+                mainWindow.PictureSettings.crop_top.Value = presetQuery.Cropping.Top;\r
+                mainWindow.PictureSettings.crop_bottom.Value = presetQuery.Cropping.Bottom;\r
+                mainWindow.PictureSettings.crop_left.Value = presetQuery.Cropping.Left;\r
+                mainWindow.PictureSettings.crop_right.Value = presetQuery.Cropping.Right;\r
             }\r
 \r
             // Set the anamorphic mode 0,1,2,3\r
-            mainWindow.PictureSettings.drp_anamorphic.SelectedIndex = presetQuery.AnamorphicMode;\r
+\r
+            switch (presetQuery.Anamorphic)\r
+            {\r
+                case Anamorphic.None:\r
+                    mainWindow.PictureSettings.drp_anamorphic.SelectedIndex = 0;\r
+                    break;\r
+                case Anamorphic.Strict:\r
+                    mainWindow.PictureSettings.drp_anamorphic.SelectedIndex = 1;\r
+                    break;\r
+                case Anamorphic.Loose:\r
+                    mainWindow.PictureSettings.drp_anamorphic.SelectedIndex = 2;\r
+                    break;\r
+                case Anamorphic.Custom:\r
+                    mainWindow.PictureSettings.drp_anamorphic.SelectedIndex = 3;\r
+                    break;\r
+            }\r
 \r
             // Keep Aspect Ration Anamorphic Setting.\r
-            mainWindow.PictureSettings.check_KeepAR.CheckState = presetQuery.KeepDisplayAsect\r
+            mainWindow.PictureSettings.check_KeepAR.CheckState = presetQuery.KeepDisplayAspect\r
                                                                      ? CheckState.Checked\r
                                                                      : CheckState.Unchecked;\r
 \r
             // Set the Width and height as Required.\r
             if (presetQuery.Width != 0)\r
+            {\r
                 mainWindow.PictureSettings.text_width.Value = presetQuery.Width;\r
+            }\r
 \r
             if (presetQuery.Height != 0)\r
+            {\r
                 mainWindow.PictureSettings.text_height.Value = presetQuery.Height;\r
+            }\r
 \r
             // Max Width/Height override Width/Height\r
             if (presetQuery.MaxWidth != 0)\r
+            {\r
                 mainWindow.PictureSettings.text_width.Value = presetQuery.MaxWidth;\r
+            }\r
 \r
             if (presetQuery.MaxHeight != 0)\r
+            {\r
                 mainWindow.PictureSettings.text_height.Value = presetQuery.MaxHeight;\r
+            }\r
 \r
             mainWindow.PictureSettings.PresetMaximumResolution = new Size(presetQuery.MaxWidth, presetQuery.MaxHeight);\r
 \r
             // Case where both height and max height are 0 - For built-in presets\r
             if (presetQuery.MaxHeight == 0 && presetQuery.Height == 0)\r
+            {\r
                 mainWindow.PictureSettings.text_height.Value = 0;\r
+            }\r
 \r
             if (presetQuery.MaxWidth == 0 && presetQuery.Width == 0)\r
+            {\r
                 if (mainWindow.selectedTitle != null && mainWindow.selectedTitle.Resolution.Width != 0)\r
+                {\r
                     mainWindow.PictureSettings.text_width.Value = mainWindow.selectedTitle.Resolution.Width;\r
+                }\r
+            }\r
 \r
             // Aspect Ratio for non anamorphic sources\r
-            if (presetQuery.AnamorphicMode == 0)\r
+            if (presetQuery.Anamorphic == Anamorphic.None)\r
+            {\r
                 mainWindow.PictureSettings.check_KeepAR.CheckState = presetQuery.Height == 0\r
                                                                          ? CheckState.Checked\r
                                                                          : CheckState.Unchecked;\r
+            }\r
 \r
             // Custom Anamorphic Controls\r
-            mainWindow.PictureSettings.updownDisplayWidth.Text = presetQuery.DisplayWidthValue.ToString();\r
-            mainWindow.PictureSettings.updownParHeight.Text = presetQuery.PixelAspectHeight.ToString();\r
-            mainWindow.PictureSettings.updownParWidth.Text = presetQuery.PixelAspectWidth.ToString();\r
-            mainWindow.PictureSettings.drp_modulus.SelectedItem = presetQuery.AnamorphicModulus.ToString();\r
+            mainWindow.PictureSettings.updownDisplayWidth.Text = presetQuery.DisplayWidth.ToString();\r
+            mainWindow.PictureSettings.updownParHeight.Text = presetQuery.PixelAspectY.ToString();\r
+            mainWindow.PictureSettings.updownParWidth.Text = presetQuery.PixelAspectX.ToString();\r
+            mainWindow.PictureSettings.drp_modulus.SelectedItem = presetQuery.Modulus.ToString();\r
 \r
             #endregion\r
 \r
             #region Filters\r
 \r
-            mainWindow.Filters.SetDecomb(presetQuery.Decomb);\r
-            mainWindow.Filters.SetDeInterlace(presetQuery.DeInterlace);\r
-            mainWindow.Filters.SetDeNoise(presetQuery.DeNoise);\r
-            mainWindow.Filters.SetDeTelecine(presetQuery.DeTelecine);\r
-            mainWindow.Filters.SetDeBlock(presetQuery.DeBlock);\r
+            mainWindow.Filters.SetDecomb(presetQuery.Decomb, presetQuery.CustomDecomb);\r
+            mainWindow.Filters.SetDeInterlace(presetQuery.Deinterlace, presetQuery.CustomDeinterlace);\r
+            mainWindow.Filters.SetDeNoise(presetQuery.Denoise, presetQuery.CustomDenoise);\r
+            mainWindow.Filters.SetDeTelecine(presetQuery.Detelecine, presetQuery.CustomDetelecine);\r
+            mainWindow.Filters.SetDeBlock(presetQuery.Deblock);\r
             mainWindow.Filters.SetGrayScale(presetQuery.Grayscale);\r
 \r
             #endregion\r
 \r
             #region Video\r
 \r
-            mainWindow.drp_videoEncoder.Text = presetQuery.VideoEncoder;\r
+            switch (presetQuery.VideoEncoder)\r
+            {\r
+                case VideoEncoder.X264:\r
+                    mainWindow.drp_videoEncoder.SelectedIndex = 1;\r
+                    break;\r
+                case VideoEncoder.FFMpeg:\r
+                    mainWindow.drp_videoEncoder.SelectedIndex = 0;\r
+                    break;\r
+                case VideoEncoder.Theora:\r
+                    mainWindow.drp_videoEncoder.SelectedIndex = 2;\r
+                    break;\r
+            }\r
 \r
-            if (presetQuery.AverageVideoBitrate != null)\r
+            if (presetQuery.VideoBitrate != null)\r
             {\r
                 mainWindow.radio_avgBitrate.Checked = true;\r
-                mainWindow.text_bitrate.Text = presetQuery.AverageVideoBitrate;\r
+                mainWindow.text_bitrate.Text = presetQuery.VideoBitrate.ToString();\r
             }\r
-            if (presetQuery.VideoTargetSize != null)\r
+\r
+            if (presetQuery.TargetSize != null)\r
             {\r
                 mainWindow.radio_targetFilesize.Checked = true;\r
-                mainWindow.text_filesize.Text = presetQuery.VideoTargetSize;\r
+                mainWindow.text_filesize.Text = presetQuery.TargetSize.ToString();\r
             }\r
 \r
             // Quality\r
-            if (presetQuery.VideoQuality != -1)\r
+            if (presetQuery.Quality != null)\r
             {\r
                 mainWindow.radio_cq.Checked = true;\r
-                mainWindow.slider_videoQuality.Value = QualityToSliderValue(presetQuery.VideoEncoder, presetQuery.VideoQuality);\r
+                mainWindow.slider_videoQuality.Value = QualityToSliderValue(\r
+                    presetQuery.VideoEncoder, presetQuery.Quality);\r
             }\r
 \r
             mainWindow.check_2PassEncode.CheckState = presetQuery.TwoPass ? CheckState.Checked : CheckState.Unchecked;\r
 \r
-            mainWindow.drp_videoFramerate.Text = presetQuery.VideoFramerate;\r
-            mainWindow.checkMaximumFramerate.Checked = presetQuery.Pfr;\r
+            if (presetQuery.Framerate != null)\r
+            {\r
+                mainWindow.drp_videoFramerate.Text = presetQuery.Framerate.ToString();\r
+            }\r
+            else\r
+            {\r
+                mainWindow.drp_videoFramerate.SelectedIndex = 0;\r
+            }\r
+\r
+            mainWindow.checkMaximumFramerate.Checked = presetQuery.FramerateMode == FramerateMode.PFR;\r
 \r
             mainWindow.check_turbo.CheckState = presetQuery.TurboFirstPass ? CheckState.Checked : CheckState.Unchecked;\r
 \r
@@ -187,25 +236,27 @@ namespace Handbrake.Functions
 \r
             #region Chapter Markers\r
 \r
-            if (presetQuery.ChapterMarkers)\r
+            if (presetQuery.IncludeChapterMarkers)\r
             {\r
                 mainWindow.Check_ChapterMarkers.CheckState = CheckState.Checked;\r
                 mainWindow.Check_ChapterMarkers.Enabled = true;\r
             }\r
             else\r
+            {\r
                 mainWindow.Check_ChapterMarkers.CheckState = CheckState.Unchecked;\r
+            }\r
 \r
             #endregion\r
 \r
             #region Audio\r
 \r
-            mainWindow.AudioSettings.LoadTracks(presetQuery.AudioInformation);\r
+            mainWindow.AudioSettings.LoadTracks(presetQuery.AudioTracks);\r
 \r
             #endregion\r
 \r
             #region Other\r
 \r
-            mainWindow.x264Panel.X264Query = presetQuery.H264Query;\r
+            mainWindow.x264Panel.X264Query = presetQuery.X264Options;\r
 \r
             // Set the preset name\r
             mainWindow.labelPreset.Text = "Output Settings (Preset: " + name + ")";\r
@@ -219,19 +270,25 @@ namespace Handbrake.Functions
         /// <param name="videoEncoder">The selected video encoder</param>\r
         /// <param name="value">The Quality value</param>\r
         /// <returns>The position on the video quality slider</returns>\r
-        private static int QualityToSliderValue(string videoEncoder, float value)\r
+        private static int QualityToSliderValue(VideoEncoder videoEncoder, double? value)\r
         {\r
+            if (!value.HasValue)\r
+            {\r
+                // Default to a sensible level.\r
+                return 20;\r
+            }\r
+\r
             int sliderValue = 0;\r
             switch (videoEncoder)\r
             {\r
-                case "MPEG-4 (FFmpeg)":\r
+                case VideoEncoder.FFMpeg:\r
                     sliderValue = 32 - (int)value;\r
                     break;\r
-                case "H.264 (x264)":\r
+                case VideoEncoder.X264:\r
                     double cqStep = Properties.Settings.Default.x264cqstep;\r
                     sliderValue = (int)((51.0 / cqStep) - (value / cqStep));\r
                     break;\r
-                case "VP3 (Theora)":\r
+                case VideoEncoder.Theora:\r
                     sliderValue = (int)value;\r
                     break;\r
             }\r
index 70de471..da45302 100644 (file)
@@ -89,6 +89,7 @@
         <Abbreviation Text="CLI" />\r
         <Abbreviation Text="MP" />\r
         <Abbreviation Text="II" />\r
+        <Abbreviation Text="GUI" />\r
       </Naming2>\r
       <CustomMemberReorderingPatterns><![CDATA[<?xml version="1.0" encoding="utf-8"?>\r
 <Patterns xmlns="urn:shemas-jetbrains-com:member-reordering-patterns">\r
index 95e7ce7..b9255ee 100644 (file)
@@ -172,7 +172,7 @@ namespace Handbrake
                 {\r
                     x264Panel.Reset2Defaults();\r
 \r
-                    QueryParserUtility presetQuery = QueryParserUtility.Parse(query);\r
+                    EncodeTask presetQuery = QueryParserUtility.Parse(query);\r
                     PresetLoader.LoadPreset(this, presetQuery, Settings.Default.defaultPreset);\r
 \r
                     x264Panel.StandardizeOptString();\r
@@ -900,7 +900,7 @@ namespace Handbrake
                         x264Panel.Reset2Defaults();\r
 \r
                         // Send the query from the file to the Query Parser class\r
-                        QueryParserUtility presetQuery = QueryParserUtility.Parse(query);\r
+                        EncodeTask presetQuery = QueryParserUtility.Parse(query);\r
 \r
                         // Now load the preset\r
                         PresetLoader.LoadPreset(this, presetQuery, presetName);\r
@@ -939,7 +939,7 @@ namespace Handbrake
         {\r
             if (openPreset.ShowDialog() == DialogResult.OK)\r
             {\r
-                QueryParserUtility parsed = PlistPresetHandler.Import(openPreset.FileName);\r
+                EncodeTask parsed = PlistPresetHandler.Import(openPreset.FileName);\r
                 if (presetHandler.CheckIfUserPresetExists(parsed.PresetName + " (Imported)"))\r
                 {\r
                     DialogResult result =\r
@@ -2238,7 +2238,7 @@ namespace Handbrake
                     if (queueEdit.Query != null)\r
                     {\r
                         // Send the query from the file to the Query Parser class\r
-                        QueryParserUtility presetQuery = QueryParserUtility.Parse(queueEdit.Query);\r
+                        EncodeTask presetQuery = QueryParserUtility.Parse(queueEdit.Query);\r
 \r
                         // Now load the preset\r
                         PresetLoader.LoadPreset(this, presetQuery, "Load Back From Queue");\r
index 1ccda81..d715d89 100644 (file)
@@ -324,31 +324,46 @@ namespace Handbrake
             foreach (QueueTask queueItem in theQueue)\r
             {\r
                 string qItem = queueItem.Query;\r
-                QueryParserUtility parsed = QueryParserUtility.Parse(qItem);\r
+                EncodeTask parsed = QueryParserUtility.Parse(qItem);\r
 \r
                 // Get the DVD Title\r
                 string title = parsed.Title == 0 ? "Auto" : parsed.Title.ToString();\r
 \r
                 // Get the DVD Chapters\r
                 string chapters;\r
-                if (parsed.ChapterStart == 0)\r
+                if (parsed.StartPoint == 0)\r
                     chapters = "Auto";\r
                 else\r
                 {\r
-                    chapters = parsed.ChapterStart.ToString();\r
-                    if (parsed.ChapterFinish != 0)\r
-                        chapters = chapters + " - " + parsed.ChapterFinish;\r
+                    chapters = parsed.StartPoint.ToString();\r
+                    if (parsed.EndPoint != 0)\r
+                        chapters = chapters + " - " + parsed.EndPoint;\r
                 }\r
 \r
                 ListViewItem item = new ListViewItem { Tag = queueItem, Text = title };\r
                 item.SubItems.Add(chapters); // Chapters\r
                 item.SubItems.Add(queueItem.Source); // Source\r
                 item.SubItems.Add(queueItem.Destination); // Destination\r
-                item.SubItems.Add(parsed.VideoEncoder); // Video\r
+\r
+                switch (parsed.VideoEncoder)\r
+                {\r
+                    case VideoEncoder.FFMpeg:\r
+                        item.SubItems.Add("MPEG-4 (FFmpeg)");\r
+                        break;\r
+                    default:\r
+                    case VideoEncoder.X264:\r
+                        item.SubItems.Add("H.264 (x264)");\r
+                        break;\r
+                    case VideoEncoder.Theora:\r
+                        item.SubItems.Add("VP3 (Theroa)");\r
+                        break;\r
+                }\r
+\r
+                 // Video\r
 \r
                 // Display The Audio Track Information\r
                 string audio = string.Empty;\r
-                foreach (AudioTrack track in parsed.AudioInformation)\r
+                foreach (AudioTrack track in parsed.AudioTracks)\r
                 {\r
                     if (audio != string.Empty)\r
                         audio += ", " + track.Encoder;\r
@@ -388,24 +403,24 @@ namespace Handbrake
                     BeginInvoke(new UpdateHandler(SetCurrentEncodeInformation));\r
                 }\r
 \r
-                QueryParserUtility parsed = QueryParserUtility.Parse(queue.QueueManager.LastProcessedJob.Query);\r
+                EncodeTask parsed = QueryParserUtility.Parse(queue.QueueManager.LastProcessedJob.Query);\r
 \r
                 // Get title and chapters\r
                 string title = parsed.Title == 0 ? "Auto" : parsed.Title.ToString();\r
                 string chapterlbl;\r
-                if (Equals(parsed.ChapterStart, 0))\r
+                if (Equals(parsed.StartPoint, 0))\r
                     chapterlbl = "Auto";\r
                 else\r
                 {\r
-                    string chapters = parsed.ChapterStart.ToString();\r
-                    if (parsed.ChapterFinish != 0)\r
-                        chapters = chapters + " - " + parsed.ChapterFinish;\r
+                    string chapters = parsed.StartPoint.ToString();\r
+                    if (parsed.EndPoint != 0)\r
+                        chapters = chapters + " - " + parsed.EndPoint;\r
                     chapterlbl = chapters;\r
                 }\r
 \r
                 // Get audio information\r
                 string audio = string.Empty;\r
-                foreach (AudioTrack track in parsed.AudioInformation)\r
+                foreach (AudioTrack track in parsed.AudioTracks)\r
                 {\r
                     if (audio != string.Empty) \r
                         audio += ", " + track.Encoder;\r
@@ -418,7 +433,7 @@ namespace Handbrake
                 lbl_source.Text = queue.QueueManager.LastProcessedJob.Source + "(Title: " + title + " Chapters: " + chapterlbl + ")";\r
                 lbl_dest.Text = queue.QueueManager.LastProcessedJob.Destination;\r
                 lbl_encodeOptions.Text = "Video: " + parsed.VideoEncoder + " Audio: " + audio + Environment.NewLine +\r
-                                    "x264 Options: " + parsed.H264Query;\r
+                                    "x264 Options: " + parsed.X264Options;\r
                }\r
             catch (Exception)\r
             {\r