diff options
author | sr55 <[email protected]> | 2008-12-30 21:04:29 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2008-12-30 21:04:29 +0000 |
commit | ff08bb6bfb4a05e5f07161b83aae7dd87e528689 (patch) | |
tree | 38cb251af850fdfcba4957e1b2cc75d2583c249b /win | |
parent | 46e700237d3d1e0ee519606e856bc016b1c46de6 (diff) |
WinGui:
- Preview Video setup for Encodes for any of the 10 previews that you'd find in the mac gui, for durations from 5 to 60 seconds.
- Removed some old code
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2050 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r-- | win/C#/frmGenPreview.Designer.cs | 55 | ||||
-rw-r--r-- | win/C#/frmGenPreview.cs | 3 | ||||
-rw-r--r-- | win/C#/frmMain.Designer.cs | 112 | ||||
-rw-r--r-- | win/C#/frmMain.cs | 17 | ||||
-rw-r--r-- | win/C#/frmMain.resx | 6 | ||||
-rw-r--r-- | win/C#/frmMain/QueryGenerator.cs | 5 |
6 files changed, 109 insertions, 89 deletions
diff --git a/win/C#/frmGenPreview.Designer.cs b/win/C#/frmGenPreview.Designer.cs index eefe1362d..4aeca12b4 100644 --- a/win/C#/frmGenPreview.Designer.cs +++ b/win/C#/frmGenPreview.Designer.cs @@ -37,6 +37,8 @@ this.lbl_status = new System.Windows.Forms.Label();
this.cb_duration = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.cb_preview = new System.Windows.Forms.ComboBox();
this.toolBar.SuspendLayout();
this.SuspendLayout();
//
@@ -50,7 +52,7 @@ this.toolBar.Location = new System.Drawing.Point(0, 0);
this.toolBar.Name = "toolBar";
this.toolBar.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
- this.toolBar.Size = new System.Drawing.Size(340, 39);
+ this.toolBar.Size = new System.Drawing.Size(377, 39);
this.toolBar.TabIndex = 38;
this.toolBar.Text = "toolStrip1";
//
@@ -60,7 +62,7 @@ this.btn_encode.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.btn_encode.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btn_encode.Name = "btn_encode";
- this.btn_encode.Size = new System.Drawing.Size(127, 36);
+ this.btn_encode.Size = new System.Drawing.Size(115, 36);
this.btn_encode.Text = "Encode Sample";
this.btn_encode.Click += new System.EventHandler(this.btn_encode_Click);
//
@@ -76,7 +78,7 @@ this.btn_play.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.btn_play.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btn_play.Name = "btn_play";
- this.btn_play.Size = new System.Drawing.Size(64, 36);
+ this.btn_play.Size = new System.Drawing.Size(63, 36);
this.btn_play.Text = "Play";
this.btn_play.Visible = false;
this.btn_play.Click += new System.EventHandler(this.btn_play_Click);
@@ -85,7 +87,7 @@ //
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label1.Location = new System.Drawing.Point(12, 77);
+ this.label1.Location = new System.Drawing.Point(12, 79);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(47, 13);
this.label1.TabIndex = 39;
@@ -95,7 +97,7 @@ //
this.lbl_status.AutoSize = true;
this.lbl_status.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.lbl_status.Location = new System.Drawing.Point(133, 77);
+ this.lbl_status.Location = new System.Drawing.Point(117, 79);
this.lbl_status.Name = "lbl_status";
this.lbl_status.Size = new System.Drawing.Size(111, 13);
this.lbl_status.TabIndex = 40;
@@ -119,7 +121,7 @@ "50",
"55",
"60"});
- this.cb_duration.Location = new System.Drawing.Point(136, 46);
+ this.cb_duration.Location = new System.Drawing.Point(304, 47);
this.cb_duration.MaxLength = 2;
this.cb_duration.Name = "cb_duration";
this.cb_duration.Size = new System.Drawing.Size(46, 21);
@@ -129,18 +131,53 @@ //
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label2.Location = new System.Drawing.Point(12, 49);
+ this.label2.Location = new System.Drawing.Point(180, 50);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(118, 13);
this.label2.TabIndex = 42;
this.label2.Text = "Duration (seconds):";
this.label2.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label3.Location = new System.Drawing.Point(12, 50);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(102, 13);
+ this.label3.TabIndex = 44;
+ this.label3.Text = "Start at preview:";
+ this.label3.TextAlign = System.Drawing.ContentAlignment.TopCenter;
+ //
+ // cb_preview
+ //
+ this.cb_preview.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.cb_preview.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.cb_preview.FormattingEnabled = true;
+ this.cb_preview.Items.AddRange(new object[] {
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9",
+ "10"});
+ this.cb_preview.Location = new System.Drawing.Point(120, 47);
+ this.cb_preview.MaxLength = 2;
+ this.cb_preview.Name = "cb_preview";
+ this.cb_preview.Size = new System.Drawing.Size(46, 21);
+ this.cb_preview.TabIndex = 43;
+ //
// frmGenPreview
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(340, 102);
+ this.ClientSize = new System.Drawing.Size(377, 104);
+ this.Controls.Add(this.label3);
+ this.Controls.Add(this.cb_preview);
this.Controls.Add(this.label2);
this.Controls.Add(this.cb_duration);
this.Controls.Add(this.lbl_status);
@@ -166,5 +203,7 @@ private System.Windows.Forms.Label lbl_status;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox cb_duration;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.ComboBox cb_preview;
}
}
\ No newline at end of file diff --git a/win/C#/frmGenPreview.cs b/win/C#/frmGenPreview.cs index b522187c5..0bc59e0d7 100644 --- a/win/C#/frmGenPreview.cs +++ b/win/C#/frmGenPreview.cs @@ -24,6 +24,7 @@ namespace Handbrake InitializeComponent();
this.mainWindow = mw;
cb_duration.SelectedIndex = 0;
+ cb_preview.SelectedIndex = 0;
}
private void btn_play_Click(object sender, EventArgs e)
@@ -54,7 +55,7 @@ namespace Handbrake private void btn_encode_Click(object sender, EventArgs e)
{
- String query = queryGen.GeneratePreviewQuery(mainWindow, cb_duration.Text);
+ String query = queryGen.GeneratePreviewQuery(mainWindow, cb_duration.Text, cb_preview.Text);
ThreadPool.QueueUserWorkItem(procMonitor, query);
}
private void procMonitor(object state)
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index 94ee4ce3e..7893e7198 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -38,7 +38,7 @@ namespace Handbrake System.Windows.Forms.Label Label38;
System.Windows.Forms.ContextMenuStrip notifyIconMenu;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.btn_restore = new System.Windows.Forms.ToolStripMenuItem();
this.DVD_Save = new System.Windows.Forms.SaveFileDialog();
this.File_Save = new System.Windows.Forms.SaveFileDialog();
@@ -137,6 +137,12 @@ namespace Handbrake this.col_samplerate = new System.Windows.Forms.ColumnHeader();
this.col_bitrate = new System.Windows.Forms.ColumnHeader();
this.col_drc = new System.Windows.Forms.ColumnHeader();
+ this.audioMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.audioList_moveup = new System.Windows.Forms.ToolStripMenuItem();
+ this.audioList_movedown = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
+ this.audioList_remove = new System.Windows.Forms.ToolStripMenuItem();
+ this.AudioMenuRowHeightHack = new System.Windows.Forms.ImageList(this.components);
this.btn_RemoveAudioTrack = new System.Windows.Forms.Button();
this.btn_addAudioTrack = new System.Windows.Forms.Button();
this.lbl_drc = new System.Windows.Forms.Label();
@@ -243,12 +249,6 @@ namespace Handbrake this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
this.StatusStrip = new System.Windows.Forms.StatusStrip();
this.lbl_encode = new System.Windows.Forms.ToolStripStatusLabel();
- this.audioMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
- this.audioList_movedown = new System.Windows.Forms.ToolStripMenuItem();
- this.audioList_moveup = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
- this.audioList_remove = new System.Windows.Forms.ToolStripMenuItem();
- this.AudioMenuRowHeightHack = new System.Windows.Forms.ImageList(this.components);
Label38 = new System.Windows.Forms.Label();
notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
notifyIconMenu.SuspendLayout();
@@ -258,6 +258,7 @@ namespace Handbrake this.GroupBox1.SuspendLayout();
this.groupBox_output.SuspendLayout();
this.TabPage2.SuspendLayout();
+ this.audioMenu.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tb_drc)).BeginInit();
this.TabPage3.SuspendLayout();
this.TabPage1.SuspendLayout();
@@ -278,7 +279,6 @@ namespace Handbrake this.presets_menu.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.StatusStrip.SuspendLayout();
- this.audioMenu.SuspendLayout();
this.SuspendLayout();
//
// Label38
@@ -642,9 +642,9 @@ namespace Handbrake //
// number
//
- dataGridViewCellStyle6.Format = "N0";
- dataGridViewCellStyle6.NullValue = null;
- this.number.DefaultCellStyle = dataGridViewCellStyle6;
+ dataGridViewCellStyle1.Format = "N0";
+ dataGridViewCellStyle1.NullValue = null;
+ this.number.DefaultCellStyle = dataGridViewCellStyle1;
this.number.HeaderText = "Chapter Number";
this.number.MaxInputLength = 3;
this.number.Name = "number";
@@ -1597,6 +1597,49 @@ namespace Handbrake //
this.col_drc.Text = "DRC";
//
+ // audioMenu
+ //
+ this.audioMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.audioList_moveup,
+ this.audioList_movedown,
+ this.toolStripSeparator2,
+ this.audioList_remove});
+ this.audioMenu.Name = "audioMenu";
+ this.audioMenu.Size = new System.Drawing.Size(142, 76);
+ //
+ // audioList_moveup
+ //
+ this.audioList_moveup.Name = "audioList_moveup";
+ this.audioList_moveup.Size = new System.Drawing.Size(141, 22);
+ this.audioList_moveup.Text = "Move Up";
+ this.audioList_moveup.Click += new System.EventHandler(this.audioList_moveup_Click);
+ //
+ // audioList_movedown
+ //
+ this.audioList_movedown.Name = "audioList_movedown";
+ this.audioList_movedown.Size = new System.Drawing.Size(141, 22);
+ this.audioList_movedown.Text = "Move Down";
+ this.audioList_movedown.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.audioList_movedown.Click += new System.EventHandler(this.audioList_movedown_Click);
+ //
+ // toolStripSeparator2
+ //
+ this.toolStripSeparator2.Name = "toolStripSeparator2";
+ this.toolStripSeparator2.Size = new System.Drawing.Size(138, 6);
+ //
+ // audioList_remove
+ //
+ this.audioList_remove.Name = "audioList_remove";
+ this.audioList_remove.Size = new System.Drawing.Size(141, 22);
+ this.audioList_remove.Text = "Remove";
+ this.audioList_remove.Click += new System.EventHandler(this.audioList_remove_Click);
+ //
+ // AudioMenuRowHeightHack
+ //
+ this.AudioMenuRowHeightHack.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
+ this.AudioMenuRowHeightHack.ImageSize = new System.Drawing.Size(1, 18);
+ this.AudioMenuRowHeightHack.TransparentColor = System.Drawing.Color.Transparent;
+ //
// btn_RemoveAudioTrack
//
this.btn_RemoveAudioTrack.BackColor = System.Drawing.SystemColors.Control;
@@ -2848,53 +2891,11 @@ namespace Handbrake this.lbl_encode.Size = new System.Drawing.Size(31, 17);
this.lbl_encode.Text = "{0}";
//
- // audioMenu
- //
- this.audioMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.audioList_moveup,
- this.audioList_movedown,
- this.toolStripSeparator2,
- this.audioList_remove});
- this.audioMenu.Name = "audioMenu";
- this.audioMenu.Size = new System.Drawing.Size(142, 76);
- //
- // audioList_movedown
- //
- this.audioList_movedown.Name = "audioList_movedown";
- this.audioList_movedown.Size = new System.Drawing.Size(141, 22);
- this.audioList_movedown.Text = "Move Down";
- this.audioList_movedown.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.audioList_movedown.Click += new System.EventHandler(this.audioList_movedown_Click);
- //
- // audioList_moveup
- //
- this.audioList_moveup.Name = "audioList_moveup";
- this.audioList_moveup.Size = new System.Drawing.Size(141, 22);
- this.audioList_moveup.Text = "Move Up";
- this.audioList_moveup.Click += new System.EventHandler(this.audioList_moveup_Click);
- //
- // toolStripSeparator2
- //
- this.toolStripSeparator2.Name = "toolStripSeparator2";
- this.toolStripSeparator2.Size = new System.Drawing.Size(138, 6);
- //
- // audioList_remove
- //
- this.audioList_remove.Name = "audioList_remove";
- this.audioList_remove.Size = new System.Drawing.Size(141, 22);
- this.audioList_remove.Text = "Remove";
- this.audioList_remove.Click += new System.EventHandler(this.audioList_remove_Click);
- //
- // AudioMenuRowHeightHack
- //
- this.AudioMenuRowHeightHack.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
- this.AudioMenuRowHeightHack.ImageSize = new System.Drawing.Size(1, 18);
- this.AudioMenuRowHeightHack.TransparentColor = System.Drawing.Color.Transparent;
- //
// frmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoScroll = true;
this.ClientSize = new System.Drawing.Size(992, 649);
this.Controls.Add(this.GroupBox1);
this.Controls.Add(this.groupBox_dest);
@@ -2906,7 +2907,6 @@ namespace Handbrake this.Controls.Add(this.StatusStrip);
this.DoubleBuffered = true;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
- this.MinimumSize = new System.Drawing.Size(1000, 668);
this.Name = "frmMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "HandBrake";
@@ -2921,6 +2921,7 @@ namespace Handbrake this.groupBox_output.PerformLayout();
this.TabPage2.ResumeLayout(false);
this.TabPage2.PerformLayout();
+ this.audioMenu.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.tb_drc)).EndInit();
this.TabPage3.ResumeLayout(false);
this.TabPage3.PerformLayout();
@@ -2949,7 +2950,6 @@ namespace Handbrake this.toolStrip1.PerformLayout();
this.StatusStrip.ResumeLayout(false);
this.StatusStrip.PerformLayout();
- this.audioMenu.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index aee2f2b5c..c8753d184 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -312,7 +312,7 @@ namespace Handbrake nodeStatus.Add(true);
// Now add the new preset
- Form preset = new frmAddPreset(this, queryGen.GenerateTheQuery(this), presetHandler);
+ Form preset = new frmAddPreset(this, queryGen.generateTabbedComponentsQuery(this), presetHandler);
preset.ShowDialog();
// Now reload the TreeView states
@@ -760,21 +760,6 @@ namespace Handbrake drp_track1Audio.Items.AddRange(selectedTitle.AudioTracks.ToArray());
drp_track1Audio.SelectedIndex = 0;
- /*drp_track2Audio.Items.Clear();
- drp_track2Audio.Items.Add("None");
- drp_track2Audio.Items.AddRange(selectedTitle.AudioTracks.ToArray());
- drp_track2Audio.SelectedIndex = 0;
-
- drp_track3Audio.Items.Clear();
- drp_track3Audio.Items.Add("None");
- drp_track3Audio.Items.AddRange(selectedTitle.AudioTracks.ToArray());
- drp_track3Audio.SelectedIndex = 0;
-
- drp_track4Audio.Items.Clear();
- drp_track4Audio.Items.Add("None");
- drp_track4Audio.Items.AddRange(selectedTitle.AudioTracks.ToArray());
- drp_track4Audio.SelectedIndex = 0;*/
-
// Populate the Subtitles dropdown
drp_subtitle.Items.Clear();
drp_subtitle.Items.Add("None");
diff --git a/win/C#/frmMain.resx b/win/C#/frmMain.resx index 0039ebd87..d6bf08e3e 100644 --- a/win/C#/frmMain.resx +++ b/win/C#/frmMain.resx @@ -155,12 +155,6 @@ Make sure you have selected a "Title" from the "Source" box above otherwise the list will not be populated with the correct amount of chapters.
Note: Do not change any of the chapter numbers!</value>
</data>
- <metadata name="number.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="name.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
<data name="check_Cabac.ToolTip" xml:space="preserve">
<value>CABAC, or context adaptive binary arithmetic coding, is used by x264 to reduce the bitrate needed for a given quality by 15%.
This makes it very cool and very useful, and it should be left on whenever possible. However, it is incompatible with the iPod 5.5G, and makes the AppleTV struggle.
diff --git a/win/C#/frmMain/QueryGenerator.cs b/win/C#/frmMain/QueryGenerator.cs index c10d3b10a..d7a4900fc 100644 --- a/win/C#/frmMain/QueryGenerator.cs +++ b/win/C#/frmMain/QueryGenerator.cs @@ -50,7 +50,7 @@ namespace Handbrake /// </summary>
/// <param name="mainWindow"></param>
/// <returns>Returns a CLI query String.</returns>
- public string GeneratePreviewQuery(frmMain mainWindow, string duration)
+ public string GeneratePreviewQuery(frmMain mainWindow, string duration, string preview)
{
int seconds = 0;
int.TryParse(duration, out seconds);
@@ -67,7 +67,8 @@ namespace Handbrake query += " -t " + titleInfo[0];
}
- query += " -c 2";
+ query += " --start-at-preview " + preview;
+ query += " --stop-at-duration " + duration + " ";
// Destination tab
if (mainWindow.text_destination.Text != "")
|