OSDN Git Service

This patch adds mingw32 cross-compilation support to HandBrake trunk to
[handbrake-jp/handbrake-jp-git.git] / win / C# / Functions / QueryParserTester.cs
1 using System;\r
2 using System.Windows.Forms;\r
3 \r
4 namespace Handbrake.Functions\r
5 {\r
6     public partial class QueryParserTester : Form\r
7     {\r
8         public QueryParserTester()\r
9         {\r
10             InitializeComponent();\r
11 \r
12         }\r
13 \r
14         private void btn_test_Click(object sender, EventArgs e)\r
15         {\r
16             QueryParser parsed = QueryParser.Parse(rtf_query.Text);\r
17 \r
18             rtf_testContent.Clear();\r
19 \r
20             //Source\r
21             rtf_testContent.Text += "## Source " + Environment.NewLine;\r
22             if (parsed.DVDTitle != 0)\r
23                 rtf_testContent.Text += "Title: " + parsed.DVDTitle + Environment.NewLine;\r
24             if (parsed.DVDChapterStart != 0)\r
25                 rtf_testContent.Text += "Start Chapter: " + parsed.DVDChapterStart + Environment.NewLine;\r
26             if (parsed.DVDChapterFinish != 0)\r
27                 rtf_testContent.Text += "End Chapter: " + parsed.DVDChapterFinish + Environment.NewLine;\r
28 \r
29             //Output Settings\r
30             rtf_testContent.Text += Environment.NewLine + "## Output Settings " + Environment.NewLine;\r
31             if (parsed.Format != null)\r
32                 rtf_testContent.Text += "Format: " + parsed.Format + Environment.NewLine;\r
33             if (parsed.LargeMP4)\r
34                 rtf_testContent.Text += "Large File Size: " + parsed.LargeMP4 + Environment.NewLine;\r
35             if (parsed.OptimizeMP4)\r
36                 rtf_testContent.Text += "Web Optimized: " + parsed.OptimizeMP4 + Environment.NewLine;\r
37             if (parsed.IpodAtom)\r
38                 rtf_testContent.Text += "iPod 5G Support " + parsed.IpodAtom + Environment.NewLine;\r
39 \r
40             //Picture Settings\r
41             rtf_testContent.Text += Environment.NewLine + "## Picture Settings " + Environment.NewLine;\r
42             if (parsed.CropValues != null)\r
43                 rtf_testContent.Text += "Cropping: " + parsed.CropValues + Environment.NewLine;\r
44             if (parsed.Width != 0)\r
45                 rtf_testContent.Text += "Width: " + parsed.Width + Environment.NewLine;\r
46             if (parsed.Height != 0)\r
47                 rtf_testContent.Text += "Height: " + parsed.Height + Environment.NewLine;\r
48             if (parsed.MaxWidth != 0)\r
49                 rtf_testContent.Text += "Max Width: " + parsed.MaxWidth + Environment.NewLine;\r
50             if (parsed.MaxHeight != 0)\r
51                 rtf_testContent.Text += "Max Height: " + parsed.MaxHeight + Environment.NewLine;\r
52             if (parsed.Anamorphic)\r
53                 rtf_testContent.Text += "Anamorphic: " + parsed.Anamorphic + Environment.NewLine;\r
54             if (parsed.LooseAnamorphic)\r
55                 rtf_testContent.Text += "Loose Anamorphic: " + parsed.LooseAnamorphic + Environment.NewLine;\r
56 \r
57             //Picture Settings - Filters\r
58             rtf_testContent.Text += Environment.NewLine + "## Filters " + Environment.NewLine;\r
59             rtf_testContent.Text += "Detelecine: " + parsed.DeTelecine + Environment.NewLine;\r
60             rtf_testContent.Text += "Decomb: " + parsed.Decomb + Environment.NewLine;\r
61             rtf_testContent.Text += "Deinterlace: " + parsed.DeInterlace + Environment.NewLine;\r
62             rtf_testContent.Text += "Denoise: " + parsed.DeNoise + Environment.NewLine;\r
63             rtf_testContent.Text += "Deblock: " + parsed.DeBlock + Environment.NewLine;\r
64 \r
65             //Video\r
66             rtf_testContent.Text += Environment.NewLine + "## Video " + Environment.NewLine;\r
67             rtf_testContent.Text += "Video Codec: " + parsed.VideoEncoder + Environment.NewLine;\r
68             rtf_testContent.Text += "Video Framerate: " + parsed.VideoFramerate + Environment.NewLine;\r
69             if (parsed.Grayscale)\r
70                 rtf_testContent.Text += "Grayscale: " + parsed.Grayscale + Environment.NewLine;\r
71             if (parsed.TwoPass)\r
72                 rtf_testContent.Text += "2-Pass Encoding: " + parsed.TwoPass + Environment.NewLine;\r
73             if (parsed.TurboFirstPass)\r
74                 rtf_testContent.Text += "Turbo first pass: " + parsed.TurboFirstPass + Environment.NewLine;\r
75             if (parsed.VideoTargetSize != null)\r
76                 rtf_testContent.Text += "Target Size: " + parsed.VideoTargetSize + Environment.NewLine;\r
77             if (parsed.AverageVideoBitrate != null)\r
78                 rtf_testContent.Text += "Avg Bitrate: " + parsed.AverageVideoBitrate + Environment.NewLine;\r
79             if (parsed.VideoQuality != 0)\r
80                 rtf_testContent.Text += "Constant Quality: " + parsed.VideoQuality + Environment.NewLine;\r
81 \r
82             //Audio\r
83             // TODO\r
84 \r
85             //Chapters\r
86             if (parsed.ChapterMarkers)\r
87             {\r
88                 rtf_testContent.Text += Environment.NewLine + "## Chapers " + Environment.NewLine;\r
89                 rtf_testContent.Text += "Chapters: " + parsed.ChapterMarkers + Environment.NewLine;\r
90             }\r
91 \r
92             //Advanced\r
93             if (parsed.H264Query != null)\r
94             {\r
95                 rtf_testContent.Text += Environment.NewLine + "## x264 " + Environment.NewLine;\r
96                 rtf_testContent.Text += "x264: " + parsed.H264Query + Environment.NewLine;\r
97             }\r
98         }\r
99 \r
100     }\r
101 }\r