• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

githubのコードからのfolk


Commit MetaInfo

Revision8f9fd4bd6c7d02e786877f7fc3e6e19c0e06588a (tree)
Time2011-02-18 03:39:47
Authorsr55 <sr55@b64f...>
Commitersr55

Log Message

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

Change Summary

Incremental Difference

--- a/win/C#/Functions/PresetLoader.cs
+++ b/win/C#/Functions/PresetLoader.cs
@@ -203,12 +203,6 @@ namespace Handbrake.Functions
203203 mainWindow.text_bitrate.Text = presetQuery.VideoBitrate.ToString();
204204 }
205205
206- if (presetQuery.TargetSize != null)
207- {
208- mainWindow.radio_targetFilesize.Checked = true;
209- mainWindow.text_filesize.Text = presetQuery.TargetSize.ToString();
210- }
211-
212206 // Quality
213207 if (presetQuery.Quality != null)
214208 {
--- a/win/C#/Functions/QueryGenerator.cs
+++ b/win/C#/Functions/QueryGenerator.cs
@@ -307,9 +307,6 @@ namespace Handbrake.Functions
307307 if (mainWindow.radio_avgBitrate.Checked)
308308 query += " -b " + mainWindow.text_bitrate.Text;
309309
310- if (mainWindow.radio_targetFilesize.Checked)
311- query += " -S " + mainWindow.text_filesize.Text;
312-
313310 // Video Quality Setting
314311 if (mainWindow.radio_cq.Checked)
315312 {
--- a/win/C#/HandBrake.ApplicationServices/Model/EncodeTask.cs
+++ b/win/C#/HandBrake.ApplicationServices/Model/EncodeTask.cs
@@ -224,11 +224,6 @@ namespace HandBrake.ApplicationServices.Model
224224 public double? Quality { get; set; }
225225
226226 /// <summary>
227- /// Gets or sets TargetSize.
228- /// </summary>
229- public int? TargetSize { get; set; }
230-
231- /// <summary>
232227 /// Gets or sets VideoBitrate.
233228 /// </summary>
234229 public int? VideoBitrate { get; set; }
--- a/win/C#/HandBrake.ApplicationServices/Utilities/PlistUtility.cs
+++ b/win/C#/HandBrake.ApplicationServices/Utilities/PlistUtility.cs
@@ -240,9 +240,6 @@ namespace HandBrake.ApplicationServices.Utilities
240240 case "VideoQualityType": // The Type of Quality Mode used
241241 qualityMode = value;
242242 break;
243- case "VideoTargetSize":
244- parsed.TargetSize = int.Parse(value);
245- break;
246243 case "VideoTurboTwoPass":
247244 parsed.TurboFirstPass = value == "1";
248245 break;
@@ -294,11 +291,9 @@ namespace HandBrake.ApplicationServices.Utilities
294291 break;
295292 case "1": // Avg Bitrate
296293 parsed.Quality = null;
297- parsed.TargetSize = null;
298294 break;
299295 case "2": // CQ
300296 parsed.VideoBitrate = null;
301- parsed.TargetSize = null;
302297 break;
303298 }
304299 #endregion
@@ -544,12 +539,11 @@ namespace HandBrake.ApplicationServices.Utilities
544539 AddEncodeElement(xmlWriter, "VideoQualitySlider", "real", parsed.Quality.ToString());
545540
546541 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;
549543 else if (parsed.Quality != null) videoQualityType = 2;
550544
551545 AddEncodeElement(xmlWriter, "VideoQualityType", "integer", videoQualityType.ToString());
552- AddEncodeElement(xmlWriter, "VideoTargetSize", "string", parsed.TargetSize.ToString());
546+ AddEncodeElement(xmlWriter, "VideoTargetSize", "string", string.Empty);
553547 AddEncodeElement(xmlWriter, "VideoTurboTwoPass", "integer", parsed.TurboFirstPass ? "1" : "0");
554548 AddEncodeElement(xmlWriter, "VideoTwoPass", "integer", parsed.TwoPass ? "1" : "0");
555549
--- a/win/C#/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs
+++ b/win/C#/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs
@@ -83,7 +83,6 @@ namespace HandBrake.ApplicationServices.Utilities
8383 Match videoFramerate = Regex.Match(input, @"-r ([0-9.]*)");
8484 Match videoBitrate = Regex.Match(input, @"-b ([0-9]*)");
8585 Match videoQuality = Regex.Match(input, @"-q ([0-9.]*)");
86- Match videoFilesize = Regex.Match(input, @"-S ([0-9.]*)");
8786 Match twoPass = Regex.Match(input, @" -2");
8887 Match turboFirstPass = Regex.Match(input, @" -T");
8988 Match optimizeMP4 = Regex.Match(input, @" -O");
@@ -314,12 +313,6 @@ namespace HandBrake.ApplicationServices.Utilities
314313 parsed.VideoBitrate = int.Parse(videoBitrate.ToString().Replace("-b ", string.Empty));
315314 }
316315
317- if (videoFilesize.Success)
318- {
319- parsed.VideoEncodeRateType = VideoEncodeRateMode.TargetSize;
320- parsed.TargetSize = int.Parse(videoBitrate.ToString().Replace("-S ", string.Empty));
321- }
322-
323316 if (videoQuality.Success)
324317 {
325318 float quality = float.Parse(videoQuality.ToString().Replace("-q ", string.Empty), Culture);
--- a/win/C#/frmMain.Designer.cs
+++ b/win/C#/frmMain.Designer.cs
@@ -49,7 +49,6 @@ namespace Handbrake
4949 this.check_turbo = new System.Windows.Forms.CheckBox();
5050 this.drp_videoFramerate = new System.Windows.Forms.ComboBox();
5151 this.slider_videoQuality = new System.Windows.Forms.TrackBar();
52- this.text_filesize = new System.Windows.Forms.TextBox();
5352 this.text_bitrate = new System.Windows.Forms.TextBox();
5453 this.btn_setDefault = new System.Windows.Forms.Button();
5554 this.check_optimiseMP4 = new System.Windows.Forms.CheckBox();
@@ -118,7 +117,6 @@ namespace Handbrake
118117 this.checkMaximumFramerate = new System.Windows.Forms.CheckBox();
119118 this.radio_cq = new System.Windows.Forms.RadioButton();
120119 this.radio_avgBitrate = new System.Windows.Forms.RadioButton();
121- this.radio_targetFilesize = new System.Windows.Forms.RadioButton();
122120 this.label25 = new System.Windows.Forms.Label();
123121 this.check_2PassEncode = new System.Windows.Forms.CheckBox();
124122 this.Label2 = new System.Windows.Forms.Label();
@@ -315,7 +313,7 @@ namespace Handbrake
315313 //
316314 this.slider_videoQuality.BackColor = System.Drawing.SystemColors.Window;
317315 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);
319317 this.slider_videoQuality.Margin = new System.Windows.Forms.Padding(0);
320318 this.slider_videoQuality.Maximum = 100;
321319 this.slider_videoQuality.Name = "slider_videoQuality";
@@ -325,18 +323,9 @@ namespace Handbrake
325323 this.ToolTip.SetToolTip(this.slider_videoQuality, "Set the quality level of the video. ");
326324 this.slider_videoQuality.ValueChanged += new System.EventHandler(this.slider_videoQuality_Scroll);
327325 //
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- //
337326 // text_bitrate
338327 //
339- this.text_bitrate.Location = new System.Drawing.Point(511, 63);
328+ this.text_bitrate.Location = new System.Drawing.Point(511, 33);
340329 this.text_bitrate.Name = "text_bitrate";
341330 this.text_bitrate.Size = new System.Drawing.Size(81, 21);
342331 this.text_bitrate.TabIndex = 14;
@@ -961,14 +950,12 @@ namespace Handbrake
961950 this.tab_video.Controls.Add(this.drp_videoFramerate);
962951 this.tab_video.Controls.Add(this.radio_cq);
963952 this.tab_video.Controls.Add(this.radio_avgBitrate);
964- this.tab_video.Controls.Add(this.radio_targetFilesize);
965953 this.tab_video.Controls.Add(this.drp_videoEncoder);
966954 this.tab_video.Controls.Add(this.Label47);
967955 this.tab_video.Controls.Add(this.label25);
968956 this.tab_video.Controls.Add(this.check_turbo);
969957 this.tab_video.Controls.Add(this.check_2PassEncode);
970958 this.tab_video.Controls.Add(this.Label2);
971- this.tab_video.Controls.Add(this.text_filesize);
972959 this.tab_video.Controls.Add(this.slider_videoQuality);
973960 this.tab_video.Controls.Add(this.text_bitrate);
974961 this.tab_video.Controls.Add(this.lbl_SliderValue);
@@ -986,7 +973,7 @@ namespace Handbrake
986973 this.lbl_rfwarn.AutoSize = true;
987974 this.lbl_rfwarn.BackColor = System.Drawing.Color.Transparent;
988975 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);
990977 this.lbl_rfwarn.Name = "lbl_rfwarn";
991978 this.lbl_rfwarn.Size = new System.Drawing.Size(321, 39);
992979 this.lbl_rfwarn.TabIndex = 0;
@@ -1009,7 +996,7 @@ namespace Handbrake
1009996 //
1010997 this.radio_cq.AutoSize = true;
1011998 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);
10131000 this.radio_cq.Name = "radio_cq";
10141001 this.radio_cq.Size = new System.Drawing.Size(105, 17);
10151002 this.radio_cq.TabIndex = 3;
@@ -1022,7 +1009,7 @@ namespace Handbrake
10221009 this.radio_avgBitrate.AutoSize = true;
10231010 this.radio_avgBitrate.BackColor = System.Drawing.Color.Transparent;
10241011 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);
10261013 this.radio_avgBitrate.Name = "radio_avgBitrate";
10271014 this.radio_avgBitrate.Size = new System.Drawing.Size(112, 17);
10281015 this.radio_avgBitrate.TabIndex = 4;
@@ -1031,18 +1018,6 @@ namespace Handbrake
10311018 this.radio_avgBitrate.UseVisualStyleBackColor = false;
10321019 this.radio_avgBitrate.CheckedChanged += new System.EventHandler(this.radio_avgBitrate_CheckedChanged);
10331020 //
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- //
10461021 // label25
10471022 //
10481023 this.label25.AutoSize = true;
@@ -1082,7 +1057,7 @@ namespace Handbrake
10821057 this.lbl_SliderValue.AutoSize = true;
10831058 this.lbl_SliderValue.BackColor = System.Drawing.Color.Transparent;
10841059 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);
10861061 this.lbl_SliderValue.Name = "lbl_SliderValue";
10871062 this.lbl_SliderValue.Size = new System.Drawing.Size(21, 13);
10881063 this.lbl_SliderValue.TabIndex = 15;
@@ -1825,7 +1800,6 @@ namespace Handbrake
18251800 internal System.Windows.Forms.ComboBox drp_videoFramerate;
18261801 internal System.Windows.Forms.CheckBox check_2PassEncode;
18271802 internal System.Windows.Forms.TrackBar slider_videoQuality;
1828- internal System.Windows.Forms.TextBox text_filesize;
18291803 internal System.Windows.Forms.TextBox text_bitrate;
18301804 internal System.Windows.Forms.TabPage tab_picture;
18311805 internal System.Windows.Forms.CheckBox Check_ChapterMarkers;
@@ -1890,7 +1864,6 @@ namespace Handbrake
18901864 private System.Windows.Forms.TabPage tab_filters;
18911865 internal System.Windows.Forms.RadioButton radio_cq;
18921866 internal System.Windows.Forms.RadioButton radio_avgBitrate;
1893- internal System.Windows.Forms.RadioButton radio_targetFilesize;
18941867 internal Handbrake.Controls.x264Panel x264Panel;
18951868 private System.Windows.Forms.ToolStripButton tb_preview;
18961869 private System.Diagnostics.Process hbproc;
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -271,7 +271,6 @@ namespace Handbrake
271271 drp_videoEncoder.SelectedIndexChanged += this.changePresetLabel;
272272 check_2PassEncode.CheckedChanged += this.changePresetLabel;
273273 check_turbo.CheckedChanged += this.changePresetLabel;
274- text_filesize.TextChanged += this.changePresetLabel;
275274 text_bitrate.TextChanged += this.changePresetLabel;
276275 slider_videoQuality.ValueChanged += this.changePresetLabel;
277276
@@ -300,7 +299,6 @@ namespace Handbrake
300299 drp_videoEncoder.SelectedIndexChanged -= this.changePresetLabel;
301300 check_2PassEncode.CheckedChanged -= this.changePresetLabel;
302301 check_turbo.CheckedChanged -= this.changePresetLabel;
303- text_filesize.TextChanged -= this.changePresetLabel;
304302 text_bitrate.TextChanged -= this.changePresetLabel;
305303 slider_videoQuality.ValueChanged -= this.changePresetLabel;
306304
@@ -2006,19 +2004,9 @@ namespace Handbrake
20062004 }
20072005 }
20082006
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-
20182007 private void radio_avgBitrate_CheckedChanged(object sender, EventArgs e)
20192008 {
20202009 text_bitrate.Enabled = true;
2021- text_filesize.Enabled = false;
20222010 slider_videoQuality.Enabled = false;
20232011
20242012 check_2PassEncode.Enabled = true;
@@ -2027,7 +2015,6 @@ namespace Handbrake
20272015 private void radio_cq_CheckedChanged(object sender, EventArgs e)
20282016 {
20292017 text_bitrate.Enabled = false;
2030- text_filesize.Enabled = false;
20312018 slider_videoQuality.Enabled = true;
20322019
20332020 check_2PassEncode.Enabled = false;