githubのコードからのfolk
Revision | 8f9fd4bd6c7d02e786877f7fc3e6e19c0e06588a (tree) |
---|---|
Time | 2011-02-18 03:39:47 |
Author | sr55 <sr55@b64f...> |
Commiter | sr55 |
WinGui:
- Remove target file size option. This feature is being mis-used, doesn't really work well and is generally causing far too much confusion.
git-svn-id: svn://localhost/HandBrake/trunk@3798 b64f7644-9d1e-0410-96f1-a4d463321fa5
@@ -203,12 +203,6 @@ namespace Handbrake.Functions | ||
203 | 203 | mainWindow.text_bitrate.Text = presetQuery.VideoBitrate.ToString(); |
204 | 204 | } |
205 | 205 | |
206 | - if (presetQuery.TargetSize != null) | |
207 | - { | |
208 | - mainWindow.radio_targetFilesize.Checked = true; | |
209 | - mainWindow.text_filesize.Text = presetQuery.TargetSize.ToString(); | |
210 | - } | |
211 | - | |
212 | 206 | // Quality |
213 | 207 | if (presetQuery.Quality != null) |
214 | 208 | { |
@@ -307,9 +307,6 @@ namespace Handbrake.Functions | ||
307 | 307 | if (mainWindow.radio_avgBitrate.Checked) |
308 | 308 | query += " -b " + mainWindow.text_bitrate.Text; |
309 | 309 | |
310 | - if (mainWindow.radio_targetFilesize.Checked) | |
311 | - query += " -S " + mainWindow.text_filesize.Text; | |
312 | - | |
313 | 310 | // Video Quality Setting |
314 | 311 | if (mainWindow.radio_cq.Checked) |
315 | 312 | { |
@@ -224,11 +224,6 @@ namespace HandBrake.ApplicationServices.Model | ||
224 | 224 | public double? Quality { get; set; } |
225 | 225 | |
226 | 226 | /// <summary> |
227 | - /// Gets or sets TargetSize. | |
228 | - /// </summary> | |
229 | - public int? TargetSize { get; set; } | |
230 | - | |
231 | - /// <summary> | |
232 | 227 | /// Gets or sets VideoBitrate. |
233 | 228 | /// </summary> |
234 | 229 | public int? VideoBitrate { get; set; } |
@@ -240,9 +240,6 @@ namespace HandBrake.ApplicationServices.Utilities | ||
240 | 240 | case "VideoQualityType": // The Type of Quality Mode used |
241 | 241 | qualityMode = value; |
242 | 242 | break; |
243 | - case "VideoTargetSize": | |
244 | - parsed.TargetSize = int.Parse(value); | |
245 | - break; | |
246 | 243 | case "VideoTurboTwoPass": |
247 | 244 | parsed.TurboFirstPass = value == "1"; |
248 | 245 | break; |
@@ -294,11 +291,9 @@ namespace HandBrake.ApplicationServices.Utilities | ||
294 | 291 | break; |
295 | 292 | case "1": // Avg Bitrate |
296 | 293 | parsed.Quality = null; |
297 | - parsed.TargetSize = null; | |
298 | 294 | break; |
299 | 295 | case "2": // CQ |
300 | 296 | parsed.VideoBitrate = null; |
301 | - parsed.TargetSize = null; | |
302 | 297 | break; |
303 | 298 | } |
304 | 299 | #endregion |
@@ -544,12 +539,11 @@ namespace HandBrake.ApplicationServices.Utilities | ||
544 | 539 | AddEncodeElement(xmlWriter, "VideoQualitySlider", "real", parsed.Quality.ToString()); |
545 | 540 | |
546 | 541 | int videoQualityType = 0; |
547 | - if (parsed.TargetSize != null) videoQualityType = 0; | |
548 | - else if (parsed.VideoBitrate != null) videoQualityType = 1; | |
542 | + if (parsed.VideoBitrate != null) videoQualityType = 1; | |
549 | 543 | else if (parsed.Quality != null) videoQualityType = 2; |
550 | 544 | |
551 | 545 | AddEncodeElement(xmlWriter, "VideoQualityType", "integer", videoQualityType.ToString()); |
552 | - AddEncodeElement(xmlWriter, "VideoTargetSize", "string", parsed.TargetSize.ToString()); | |
546 | + AddEncodeElement(xmlWriter, "VideoTargetSize", "string", string.Empty); | |
553 | 547 | AddEncodeElement(xmlWriter, "VideoTurboTwoPass", "integer", parsed.TurboFirstPass ? "1" : "0"); |
554 | 548 | AddEncodeElement(xmlWriter, "VideoTwoPass", "integer", parsed.TwoPass ? "1" : "0"); |
555 | 549 |
@@ -83,7 +83,6 @@ namespace HandBrake.ApplicationServices.Utilities | ||
83 | 83 | Match videoFramerate = Regex.Match(input, @"-r ([0-9.]*)"); |
84 | 84 | Match videoBitrate = Regex.Match(input, @"-b ([0-9]*)"); |
85 | 85 | Match videoQuality = Regex.Match(input, @"-q ([0-9.]*)"); |
86 | - Match videoFilesize = Regex.Match(input, @"-S ([0-9.]*)"); | |
87 | 86 | Match twoPass = Regex.Match(input, @" -2"); |
88 | 87 | Match turboFirstPass = Regex.Match(input, @" -T"); |
89 | 88 | Match optimizeMP4 = Regex.Match(input, @" -O"); |
@@ -314,12 +313,6 @@ namespace HandBrake.ApplicationServices.Utilities | ||
314 | 313 | parsed.VideoBitrate = int.Parse(videoBitrate.ToString().Replace("-b ", string.Empty)); |
315 | 314 | } |
316 | 315 | |
317 | - if (videoFilesize.Success) | |
318 | - { | |
319 | - parsed.VideoEncodeRateType = VideoEncodeRateMode.TargetSize; | |
320 | - parsed.TargetSize = int.Parse(videoBitrate.ToString().Replace("-S ", string.Empty)); | |
321 | - } | |
322 | - | |
323 | 316 | if (videoQuality.Success) |
324 | 317 | { |
325 | 318 | float quality = float.Parse(videoQuality.ToString().Replace("-q ", string.Empty), Culture); |
@@ -49,7 +49,6 @@ namespace Handbrake | ||
49 | 49 | this.check_turbo = new System.Windows.Forms.CheckBox(); |
50 | 50 | this.drp_videoFramerate = new System.Windows.Forms.ComboBox(); |
51 | 51 | this.slider_videoQuality = new System.Windows.Forms.TrackBar(); |
52 | - this.text_filesize = new System.Windows.Forms.TextBox(); | |
53 | 52 | this.text_bitrate = new System.Windows.Forms.TextBox(); |
54 | 53 | this.btn_setDefault = new System.Windows.Forms.Button(); |
55 | 54 | this.check_optimiseMP4 = new System.Windows.Forms.CheckBox(); |
@@ -118,7 +117,6 @@ namespace Handbrake | ||
118 | 117 | this.checkMaximumFramerate = new System.Windows.Forms.CheckBox(); |
119 | 118 | this.radio_cq = new System.Windows.Forms.RadioButton(); |
120 | 119 | this.radio_avgBitrate = new System.Windows.Forms.RadioButton(); |
121 | - this.radio_targetFilesize = new System.Windows.Forms.RadioButton(); | |
122 | 120 | this.label25 = new System.Windows.Forms.Label(); |
123 | 121 | this.check_2PassEncode = new System.Windows.Forms.CheckBox(); |
124 | 122 | this.Label2 = new System.Windows.Forms.Label(); |
@@ -315,7 +313,7 @@ namespace Handbrake | ||
315 | 313 | // |
316 | 314 | this.slider_videoQuality.BackColor = System.Drawing.SystemColors.Window; |
317 | 315 | this.slider_videoQuality.Enabled = false; |
318 | - this.slider_videoQuality.Location = new System.Drawing.Point(376, 120); | |
316 | + this.slider_videoQuality.Location = new System.Drawing.Point(376, 90); | |
319 | 317 | this.slider_videoQuality.Margin = new System.Windows.Forms.Padding(0); |
320 | 318 | this.slider_videoQuality.Maximum = 100; |
321 | 319 | this.slider_videoQuality.Name = "slider_videoQuality"; |
@@ -325,18 +323,9 @@ namespace Handbrake | ||
325 | 323 | this.ToolTip.SetToolTip(this.slider_videoQuality, "Set the quality level of the video. "); |
326 | 324 | this.slider_videoQuality.ValueChanged += new System.EventHandler(this.slider_videoQuality_Scroll); |
327 | 325 | // |
328 | - // text_filesize | |
329 | - // | |
330 | - this.text_filesize.Enabled = false; | |
331 | - this.text_filesize.Location = new System.Drawing.Point(511, 36); | |
332 | - this.text_filesize.Name = "text_filesize"; | |
333 | - this.text_filesize.Size = new System.Drawing.Size(81, 21); | |
334 | - this.text_filesize.TabIndex = 12; | |
335 | - this.ToolTip.SetToolTip(this.text_filesize, "Set the file size you wish the encoded file to be."); | |
336 | - // | |
337 | 326 | // text_bitrate |
338 | 327 | // |
339 | - this.text_bitrate.Location = new System.Drawing.Point(511, 63); | |
328 | + this.text_bitrate.Location = new System.Drawing.Point(511, 33); | |
340 | 329 | this.text_bitrate.Name = "text_bitrate"; |
341 | 330 | this.text_bitrate.Size = new System.Drawing.Size(81, 21); |
342 | 331 | this.text_bitrate.TabIndex = 14; |
@@ -961,14 +950,12 @@ namespace Handbrake | ||
961 | 950 | this.tab_video.Controls.Add(this.drp_videoFramerate); |
962 | 951 | this.tab_video.Controls.Add(this.radio_cq); |
963 | 952 | this.tab_video.Controls.Add(this.radio_avgBitrate); |
964 | - this.tab_video.Controls.Add(this.radio_targetFilesize); | |
965 | 953 | this.tab_video.Controls.Add(this.drp_videoEncoder); |
966 | 954 | this.tab_video.Controls.Add(this.Label47); |
967 | 955 | this.tab_video.Controls.Add(this.label25); |
968 | 956 | this.tab_video.Controls.Add(this.check_turbo); |
969 | 957 | this.tab_video.Controls.Add(this.check_2PassEncode); |
970 | 958 | this.tab_video.Controls.Add(this.Label2); |
971 | - this.tab_video.Controls.Add(this.text_filesize); | |
972 | 959 | this.tab_video.Controls.Add(this.slider_videoQuality); |
973 | 960 | this.tab_video.Controls.Add(this.text_bitrate); |
974 | 961 | this.tab_video.Controls.Add(this.lbl_SliderValue); |
@@ -986,7 +973,7 @@ namespace Handbrake | ||
986 | 973 | this.lbl_rfwarn.AutoSize = true; |
987 | 974 | this.lbl_rfwarn.BackColor = System.Drawing.Color.Transparent; |
988 | 975 | this.lbl_rfwarn.ForeColor = System.Drawing.Color.Red; |
989 | - this.lbl_rfwarn.Location = new System.Drawing.Point(385, 165); | |
976 | + this.lbl_rfwarn.Location = new System.Drawing.Point(385, 135); | |
990 | 977 | this.lbl_rfwarn.Name = "lbl_rfwarn"; |
991 | 978 | this.lbl_rfwarn.Size = new System.Drawing.Size(321, 39); |
992 | 979 | this.lbl_rfwarn.TabIndex = 0; |
@@ -1009,7 +996,7 @@ namespace Handbrake | ||
1009 | 996 | // |
1010 | 997 | this.radio_cq.AutoSize = true; |
1011 | 998 | this.radio_cq.BackColor = System.Drawing.Color.Transparent; |
1012 | - this.radio_cq.Location = new System.Drawing.Point(365, 97); | |
999 | + this.radio_cq.Location = new System.Drawing.Point(365, 67); | |
1013 | 1000 | this.radio_cq.Name = "radio_cq"; |
1014 | 1001 | this.radio_cq.Size = new System.Drawing.Size(105, 17); |
1015 | 1002 | this.radio_cq.TabIndex = 3; |
@@ -1022,7 +1009,7 @@ namespace Handbrake | ||
1022 | 1009 | this.radio_avgBitrate.AutoSize = true; |
1023 | 1010 | this.radio_avgBitrate.BackColor = System.Drawing.Color.Transparent; |
1024 | 1011 | this.radio_avgBitrate.Checked = true; |
1025 | - this.radio_avgBitrate.Location = new System.Drawing.Point(365, 64); | |
1012 | + this.radio_avgBitrate.Location = new System.Drawing.Point(365, 34); | |
1026 | 1013 | this.radio_avgBitrate.Name = "radio_avgBitrate"; |
1027 | 1014 | this.radio_avgBitrate.Size = new System.Drawing.Size(112, 17); |
1028 | 1015 | this.radio_avgBitrate.TabIndex = 4; |
@@ -1031,18 +1018,6 @@ namespace Handbrake | ||
1031 | 1018 | this.radio_avgBitrate.UseVisualStyleBackColor = false; |
1032 | 1019 | this.radio_avgBitrate.CheckedChanged += new System.EventHandler(this.radio_avgBitrate_CheckedChanged); |
1033 | 1020 | // |
1034 | - // radio_targetFilesize | |
1035 | - // | |
1036 | - this.radio_targetFilesize.AutoSize = true; | |
1037 | - this.radio_targetFilesize.BackColor = System.Drawing.Color.Transparent; | |
1038 | - this.radio_targetFilesize.Location = new System.Drawing.Point(365, 37); | |
1039 | - this.radio_targetFilesize.Name = "radio_targetFilesize"; | |
1040 | - this.radio_targetFilesize.Size = new System.Drawing.Size(107, 17); | |
1041 | - this.radio_targetFilesize.TabIndex = 5; | |
1042 | - this.radio_targetFilesize.Text = "Target Size (MB):"; | |
1043 | - this.radio_targetFilesize.UseVisualStyleBackColor = false; | |
1044 | - this.radio_targetFilesize.CheckedChanged += new System.EventHandler(this.radio_targetFilesize_CheckedChanged); | |
1045 | - // | |
1046 | 1021 | // label25 |
1047 | 1022 | // |
1048 | 1023 | this.label25.AutoSize = true; |
@@ -1082,7 +1057,7 @@ namespace Handbrake | ||
1082 | 1057 | this.lbl_SliderValue.AutoSize = true; |
1083 | 1058 | this.lbl_SliderValue.BackColor = System.Drawing.Color.Transparent; |
1084 | 1059 | this.lbl_SliderValue.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
1085 | - this.lbl_SliderValue.Location = new System.Drawing.Point(509, 100); | |
1060 | + this.lbl_SliderValue.Location = new System.Drawing.Point(509, 70); | |
1086 | 1061 | this.lbl_SliderValue.Name = "lbl_SliderValue"; |
1087 | 1062 | this.lbl_SliderValue.Size = new System.Drawing.Size(21, 13); |
1088 | 1063 | this.lbl_SliderValue.TabIndex = 15; |
@@ -1825,7 +1800,6 @@ namespace Handbrake | ||
1825 | 1800 | internal System.Windows.Forms.ComboBox drp_videoFramerate; |
1826 | 1801 | internal System.Windows.Forms.CheckBox check_2PassEncode; |
1827 | 1802 | internal System.Windows.Forms.TrackBar slider_videoQuality; |
1828 | - internal System.Windows.Forms.TextBox text_filesize; | |
1829 | 1803 | internal System.Windows.Forms.TextBox text_bitrate; |
1830 | 1804 | internal System.Windows.Forms.TabPage tab_picture; |
1831 | 1805 | internal System.Windows.Forms.CheckBox Check_ChapterMarkers; |
@@ -1890,7 +1864,6 @@ namespace Handbrake | ||
1890 | 1864 | private System.Windows.Forms.TabPage tab_filters; |
1891 | 1865 | internal System.Windows.Forms.RadioButton radio_cq; |
1892 | 1866 | internal System.Windows.Forms.RadioButton radio_avgBitrate; |
1893 | - internal System.Windows.Forms.RadioButton radio_targetFilesize; | |
1894 | 1867 | internal Handbrake.Controls.x264Panel x264Panel; |
1895 | 1868 | private System.Windows.Forms.ToolStripButton tb_preview; |
1896 | 1869 | private System.Diagnostics.Process hbproc; |
@@ -271,7 +271,6 @@ namespace Handbrake | ||
271 | 271 | drp_videoEncoder.SelectedIndexChanged += this.changePresetLabel; |
272 | 272 | check_2PassEncode.CheckedChanged += this.changePresetLabel; |
273 | 273 | check_turbo.CheckedChanged += this.changePresetLabel; |
274 | - text_filesize.TextChanged += this.changePresetLabel; | |
275 | 274 | text_bitrate.TextChanged += this.changePresetLabel; |
276 | 275 | slider_videoQuality.ValueChanged += this.changePresetLabel; |
277 | 276 |
@@ -300,7 +299,6 @@ namespace Handbrake | ||
300 | 299 | drp_videoEncoder.SelectedIndexChanged -= this.changePresetLabel; |
301 | 300 | check_2PassEncode.CheckedChanged -= this.changePresetLabel; |
302 | 301 | check_turbo.CheckedChanged -= this.changePresetLabel; |
303 | - text_filesize.TextChanged -= this.changePresetLabel; | |
304 | 302 | text_bitrate.TextChanged -= this.changePresetLabel; |
305 | 303 | slider_videoQuality.ValueChanged -= this.changePresetLabel; |
306 | 304 |
@@ -2006,19 +2004,9 @@ namespace Handbrake | ||
2006 | 2004 | } |
2007 | 2005 | } |
2008 | 2006 | |
2009 | - private void radio_targetFilesize_CheckedChanged(object sender, EventArgs e) | |
2010 | - { | |
2011 | - text_bitrate.Enabled = false; | |
2012 | - text_filesize.Enabled = true; | |
2013 | - slider_videoQuality.Enabled = false; | |
2014 | - | |
2015 | - check_2PassEncode.Enabled = true; | |
2016 | - } | |
2017 | - | |
2018 | 2007 | private void radio_avgBitrate_CheckedChanged(object sender, EventArgs e) |
2019 | 2008 | { |
2020 | 2009 | text_bitrate.Enabled = true; |
2021 | - text_filesize.Enabled = false; | |
2022 | 2010 | slider_videoQuality.Enabled = false; |
2023 | 2011 | |
2024 | 2012 | check_2PassEncode.Enabled = true; |
@@ -2027,7 +2015,6 @@ namespace Handbrake | ||
2027 | 2015 | private void radio_cq_CheckedChanged(object sender, EventArgs e) |
2028 | 2016 | { |
2029 | 2017 | text_bitrate.Enabled = false; |
2030 | - text_filesize.Enabled = false; | |
2031 | 2018 | slider_videoQuality.Enabled = true; |
2032 | 2019 | |
2033 | 2020 | check_2PassEncode.Enabled = false; |