diff options
Diffstat (limited to 'win/C#/Controls')
-rw-r--r-- | win/C#/Controls/AdvancedEncoderOpts.Designer.cs | 100 | ||||
-rw-r--r-- | win/C#/Controls/AdvancedEncoderOpts.cs | 59 | ||||
-rw-r--r-- | win/C#/Controls/AdvancedEncoderOpts.resx | 123 | ||||
-rw-r--r-- | win/C#/Controls/AudioPanel.Designer.cs | 493 | ||||
-rw-r--r-- | win/C#/Controls/AudioPanel.cs | 704 | ||||
-rw-r--r-- | win/C#/Controls/AudioPanel.resx | 147 | ||||
-rw-r--r-- | win/C#/Controls/Filters.Designer.cs | 340 | ||||
-rw-r--r-- | win/C#/Controls/Filters.cs | 336 | ||||
-rw-r--r-- | win/C#/Controls/Filters.resx | 120 | ||||
-rw-r--r-- | win/C#/Controls/PictureSettings.Designer.cs | 688 | ||||
-rw-r--r-- | win/C#/Controls/PictureSettings.cs | 547 | ||||
-rw-r--r-- | win/C#/Controls/PictureSettings.resx | 120 | ||||
-rw-r--r-- | win/C#/Controls/Subtitles.Designer.cs | 487 | ||||
-rw-r--r-- | win/C#/Controls/Subtitles.cs | 734 | ||||
-rw-r--r-- | win/C#/Controls/Subtitles.resx | 132 | ||||
-rw-r--r-- | win/C#/Controls/x264Panel.Designer.cs | 774 | ||||
-rw-r--r-- | win/C#/Controls/x264Panel.cs | 1076 | ||||
-rw-r--r-- | win/C#/Controls/x264Panel.resx | 241 |
18 files changed, 0 insertions, 7221 deletions
diff --git a/win/C#/Controls/AdvancedEncoderOpts.Designer.cs b/win/C#/Controls/AdvancedEncoderOpts.Designer.cs deleted file mode 100644 index 4ee6d85cf..000000000 --- a/win/C#/Controls/AdvancedEncoderOpts.Designer.cs +++ /dev/null @@ -1,100 +0,0 @@ -/* x264Panel.Designer.cs $
-
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
-
-namespace Handbrake.Controls
-{
- partial class AdvancedEncoderOpts
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Component Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- this.label43 = new System.Windows.Forms.Label();
- this.advancedQuery = new System.Windows.Forms.RichTextBox();
- this.ToolTip = new System.Windows.Forms.ToolTip(this.components);
- this.label64 = new System.Windows.Forms.Label();
- this.SuspendLayout();
- //
- // label43
- //
- this.label43.AutoSize = true;
- this.label43.BackColor = System.Drawing.Color.Transparent;
- this.label43.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label43.Location = new System.Drawing.Point(13, 13);
- this.label43.Name = "label43";
- this.label43.Size = new System.Drawing.Size(63, 13);
- this.label43.TabIndex = 49;
- this.label43.Text = "Advanced";
- //
- // advancedQuery
- //
- this.advancedQuery.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.advancedQuery.Location = new System.Drawing.Point(16, 53);
- this.advancedQuery.Name = "advancedQuery";
- this.advancedQuery.Size = new System.Drawing.Size(688, 128);
- this.advancedQuery.TabIndex = 80;
- this.advancedQuery.Text = "";
- //
- // ToolTip
- //
- this.ToolTip.Active = false;
- this.ToolTip.AutomaticDelay = 1000;
- this.ToolTip.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;
- //
- // label64
- //
- this.label64.AutoSize = true;
- this.label64.Location = new System.Drawing.Point(13, 35);
- this.label64.Name = "label64";
- this.label64.Size = new System.Drawing.Size(163, 13);
- this.label64.TabIndex = 81;
- this.label64.Text = "Encoder advanced option string:";
- //
- // x264Panel
- //
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
- this.BackColor = System.Drawing.Color.Transparent;
- this.Controls.Add(this.label64);
- this.Controls.Add(this.advancedQuery);
- this.Controls.Add(this.label43);
- this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Size = new System.Drawing.Size(720, 305);
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- internal System.Windows.Forms.Label label43;
- internal System.Windows.Forms.RichTextBox advancedQuery;
- private System.Windows.Forms.ToolTip ToolTip;
- internal System.Windows.Forms.Label label64;
- }
-}
diff --git a/win/C#/Controls/AdvancedEncoderOpts.cs b/win/C#/Controls/AdvancedEncoderOpts.cs deleted file mode 100644 index 8eb2e8ae7..000000000 --- a/win/C#/Controls/AdvancedEncoderOpts.cs +++ /dev/null @@ -1,59 +0,0 @@ -/* AdvancedEncoderOpts.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
-
-namespace Handbrake.Controls
-{
- using System.Windows.Forms;
-
- /// <summary>
- /// The x264 Panel
- /// </summary>
- public partial class AdvancedEncoderOpts : UserControl
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="AdvancedEncoderOpts"/> class.
- /// </summary>
- public AdvancedEncoderOpts()
- {
- InitializeComponent();
-
- if (Properties.Settings.Default.tooltipEnable)
- ToolTip.Active = true;
- }
-
- /// <summary>
- /// Gets or sets the X264 query string
- /// </summary>
- public string AdavancedQuery
- {
- get
- {
- return advancedQuery.Text;
- }
-
- set
- {
- advancedQuery.Text = value;
- }
- }
-
- public bool IsDisabled
- {
- set
- {
- if (value)
- {
- this.advancedQuery.Enabled = false;
- this.advancedQuery.Text = "Advanced encoder option passthrough is not currently supported for the encoder you have chosen.";
- }
- else
- {
- this.advancedQuery.Enabled = true;
- this.advancedQuery.Text = string.Empty;
- }
- }
- }
- }
-}
\ No newline at end of file diff --git a/win/C#/Controls/AdvancedEncoderOpts.resx b/win/C#/Controls/AdvancedEncoderOpts.resx deleted file mode 100644 index 89a8b3473..000000000 --- a/win/C#/Controls/AdvancedEncoderOpts.resx +++ /dev/null @@ -1,123 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>17, 17</value>
- </metadata>
-</root>
\ No newline at end of file diff --git a/win/C#/Controls/AudioPanel.Designer.cs b/win/C#/Controls/AudioPanel.Designer.cs deleted file mode 100644 index 43e5ba8ec..000000000 --- a/win/C#/Controls/AudioPanel.Designer.cs +++ /dev/null @@ -1,493 +0,0 @@ -/* AudioPanel.Designer.cs $
-
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
-
-namespace Handbrake.Controls
-{
- partial class AudioPanel
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Component Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- 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.btn_RemoveAudioTrack = new System.Windows.Forms.Button();
- this.btn_addAudioTrack = new System.Windows.Forms.Button();
- this.lbl_drc = new System.Windows.Forms.Label();
- this.lbl_drcHeader = new System.Windows.Forms.Label();
- this.tb_drc = new System.Windows.Forms.TrackBar();
- this.label68 = new System.Windows.Forms.Label();
- this.lbl_sampleRate = new System.Windows.Forms.Label();
- this.lbl_bitrate = new System.Windows.Forms.Label();
- this.label65 = new System.Windows.Forms.Label();
- this.lbl_mixdown = new System.Windows.Forms.Label();
- this.drp_audioEncoder = new System.Windows.Forms.ComboBox();
- this.label27 = new System.Windows.Forms.Label();
- this.drp_audioMix = new System.Windows.Forms.ComboBox();
- this.drp_audioTrack = new System.Windows.Forms.ComboBox();
- this.drp_audioBitrate = new System.Windows.Forms.ComboBox();
- this.drp_audioSample = new System.Windows.Forms.ComboBox();
- this.AudioTrackGroup = new System.Windows.Forms.GroupBox();
- this.AudioMenuRowHeightHack = new System.Windows.Forms.ImageList(this.components);
- this.audioList = new System.Windows.Forms.DataGridView();
- this.Track = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.Source = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.AudioCodec = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.Mixdown = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.Samplerate = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.Bitrate = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.DRC = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.audioMenu.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.tb_drc)).BeginInit();
- this.AudioTrackGroup.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.audioList)).BeginInit();
- this.SuspendLayout();
- //
- // 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(139, 76);
- //
- // audioList_moveup
- //
- this.audioList_moveup.Name = "audioList_moveup";
- this.audioList_moveup.Size = new System.Drawing.Size(138, 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(138, 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(135, 6);
- //
- // audioList_remove
- //
- this.audioList_remove.Name = "audioList_remove";
- this.audioList_remove.Size = new System.Drawing.Size(138, 22);
- this.audioList_remove.Text = "Remove";
- this.audioList_remove.Click += new System.EventHandler(this.audioList_remove_Click);
- //
- // btn_RemoveAudioTrack
- //
- this.btn_RemoveAudioTrack.BackColor = System.Drawing.Color.Transparent;
- this.btn_RemoveAudioTrack.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.btn_RemoveAudioTrack.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_RemoveAudioTrack.Location = new System.Drawing.Point(99, 38);
- this.btn_RemoveAudioTrack.Name = "btn_RemoveAudioTrack";
- this.btn_RemoveAudioTrack.Size = new System.Drawing.Size(71, 23);
- this.btn_RemoveAudioTrack.TabIndex = 64;
- this.btn_RemoveAudioTrack.Text = "Remove";
- this.btn_RemoveAudioTrack.UseVisualStyleBackColor = false;
- this.btn_RemoveAudioTrack.Click += new System.EventHandler(this.btn_RemoveAudioTrack_Click);
- //
- // btn_addAudioTrack
- //
- this.btn_addAudioTrack.BackColor = System.Drawing.Color.Transparent;
- this.btn_addAudioTrack.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.btn_addAudioTrack.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_addAudioTrack.Location = new System.Drawing.Point(16, 38);
- this.btn_addAudioTrack.Name = "btn_addAudioTrack";
- this.btn_addAudioTrack.Size = new System.Drawing.Size(77, 23);
- this.btn_addAudioTrack.TabIndex = 63;
- this.btn_addAudioTrack.Text = "Add Track";
- this.btn_addAudioTrack.UseVisualStyleBackColor = false;
- this.btn_addAudioTrack.Click += new System.EventHandler(this.btn_addAudioTrack_Click);
- //
- // lbl_drc
- //
- this.lbl_drc.AutoSize = true;
- this.lbl_drc.BackColor = System.Drawing.Color.Transparent;
- this.lbl_drc.Location = new System.Drawing.Point(658, 37);
- this.lbl_drc.Name = "lbl_drc";
- this.lbl_drc.Size = new System.Drawing.Size(13, 13);
- this.lbl_drc.TabIndex = 62;
- this.lbl_drc.Text = "0";
- //
- // lbl_drcHeader
- //
- this.lbl_drcHeader.AutoSize = true;
- this.lbl_drcHeader.BackColor = System.Drawing.Color.Transparent;
- this.lbl_drcHeader.Location = new System.Drawing.Point(607, 17);
- this.lbl_drcHeader.Name = "lbl_drcHeader";
- this.lbl_drcHeader.Size = new System.Drawing.Size(28, 13);
- this.lbl_drcHeader.TabIndex = 61;
- this.lbl_drcHeader.Text = "DRC";
- //
- // tb_drc
- //
- this.tb_drc.BackColor = System.Drawing.SystemColors.Window;
- this.tb_drc.LargeChange = 0;
- this.tb_drc.Location = new System.Drawing.Point(598, 29);
- this.tb_drc.Margin = new System.Windows.Forms.Padding(0);
- this.tb_drc.Maximum = 31;
- this.tb_drc.Name = "tb_drc";
- this.tb_drc.Size = new System.Drawing.Size(57, 45);
- this.tb_drc.TabIndex = 60;
- this.tb_drc.TickFrequency = 10;
- this.tb_drc.Scroll += new System.EventHandler(this.ControlChanged);
- //
- // label68
- //
- this.label68.AutoSize = true;
- this.label68.BackColor = System.Drawing.Color.Transparent;
- this.label68.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label68.Location = new System.Drawing.Point(13, 13);
- this.label68.Name = "label68";
- this.label68.Size = new System.Drawing.Size(80, 13);
- this.label68.TabIndex = 49;
- this.label68.Text = "Audio Tracks";
- //
- // lbl_sampleRate
- //
- this.lbl_sampleRate.AutoSize = true;
- this.lbl_sampleRate.BackColor = System.Drawing.Color.Transparent;
- this.lbl_sampleRate.Location = new System.Drawing.Point(463, 17);
- this.lbl_sampleRate.Name = "lbl_sampleRate";
- this.lbl_sampleRate.Size = new System.Drawing.Size(61, 13);
- this.lbl_sampleRate.TabIndex = 57;
- this.lbl_sampleRate.Text = "Samplerate";
- //
- // lbl_bitrate
- //
- this.lbl_bitrate.AutoSize = true;
- this.lbl_bitrate.BackColor = System.Drawing.Color.Transparent;
- this.lbl_bitrate.Location = new System.Drawing.Point(538, 17);
- this.lbl_bitrate.Name = "lbl_bitrate";
- this.lbl_bitrate.Size = new System.Drawing.Size(39, 13);
- this.lbl_bitrate.TabIndex = 59;
- this.lbl_bitrate.Text = "Bitrate";
- //
- // label65
- //
- this.label65.AutoSize = true;
- this.label65.BackColor = System.Drawing.Color.Transparent;
- this.label65.Location = new System.Drawing.Point(234, 17);
- this.label65.Name = "label65";
- this.label65.Size = new System.Drawing.Size(67, 13);
- this.label65.TabIndex = 53;
- this.label65.Text = "Audio Codec";
- //
- // lbl_mixdown
- //
- this.lbl_mixdown.AutoSize = true;
- this.lbl_mixdown.BackColor = System.Drawing.Color.Transparent;
- this.lbl_mixdown.Location = new System.Drawing.Point(368, 17);
- this.lbl_mixdown.Name = "lbl_mixdown";
- this.lbl_mixdown.Size = new System.Drawing.Size(49, 13);
- this.lbl_mixdown.TabIndex = 55;
- this.lbl_mixdown.Text = "Mixdown";
- //
- // drp_audioEncoder
- //
- this.drp_audioEncoder.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drp_audioEncoder.FormattingEnabled = true;
- this.drp_audioEncoder.Items.AddRange(new object[] {
- "AAC (faac)",
- "MP3 (lame)",
- "Vorbis (vorbis)",
- "AC3 Passthru",
- "AC3 (ffmpeg)",
- "DTS Passthru"});
- this.drp_audioEncoder.Location = new System.Drawing.Point(215, 34);
- this.drp_audioEncoder.Name = "drp_audioEncoder";
- this.drp_audioEncoder.Size = new System.Drawing.Size(111, 21);
- this.drp_audioEncoder.TabIndex = 52;
- this.drp_audioEncoder.SelectedIndexChanged += new System.EventHandler(this.ControlChanged);
- //
- // label27
- //
- this.label27.AutoSize = true;
- this.label27.BackColor = System.Drawing.Color.Transparent;
- this.label27.Location = new System.Drawing.Point(86, 17);
- this.label27.Name = "label27";
- this.label27.Size = new System.Drawing.Size(40, 13);
- this.label27.TabIndex = 51;
- this.label27.Text = "Source";
- //
- // drp_audioMix
- //
- this.drp_audioMix.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drp_audioMix.FormattingEnabled = true;
- this.drp_audioMix.Items.AddRange(new object[] {
- "Automatic",
- "Mono",
- "Stereo",
- "Dolby Surround",
- "Dolby Pro Logic II",
- "6 Channel Discrete"});
- this.drp_audioMix.Location = new System.Drawing.Point(332, 34);
- this.drp_audioMix.Name = "drp_audioMix";
- this.drp_audioMix.Size = new System.Drawing.Size(129, 21);
- this.drp_audioMix.TabIndex = 54;
- this.drp_audioMix.SelectedIndexChanged += new System.EventHandler(this.ControlChanged);
- //
- // drp_audioTrack
- //
- this.drp_audioTrack.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drp_audioTrack.FormattingEnabled = true;
- this.drp_audioTrack.Items.AddRange(new object[] {
- "Automatic"});
- this.drp_audioTrack.Location = new System.Drawing.Point(15, 34);
- this.drp_audioTrack.Name = "drp_audioTrack";
- this.drp_audioTrack.Size = new System.Drawing.Size(194, 21);
- this.drp_audioTrack.TabIndex = 50;
- this.drp_audioTrack.SelectedIndexChanged += new System.EventHandler(this.ControlChanged);
- //
- // drp_audioBitrate
- //
- this.drp_audioBitrate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drp_audioBitrate.FormattingEnabled = true;
- this.drp_audioBitrate.Items.AddRange(new object[] {
- "32",
- "40",
- "48",
- "56",
- "64",
- "80",
- "96",
- "112",
- "128",
- "160"});
- this.drp_audioBitrate.Location = new System.Drawing.Point(525, 34);
- this.drp_audioBitrate.Name = "drp_audioBitrate";
- this.drp_audioBitrate.Size = new System.Drawing.Size(70, 21);
- this.drp_audioBitrate.TabIndex = 58;
- this.drp_audioBitrate.SelectedIndexChanged += new System.EventHandler(this.ControlChanged);
- //
- // drp_audioSample
- //
- this.drp_audioSample.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drp_audioSample.FormattingEnabled = true;
- this.drp_audioSample.Items.AddRange(new object[] {
- "Auto",
- "48",
- "44.1",
- "32",
- "24",
- "22.05"});
- this.drp_audioSample.Location = new System.Drawing.Point(467, 34);
- this.drp_audioSample.Name = "drp_audioSample";
- this.drp_audioSample.Size = new System.Drawing.Size(55, 21);
- this.drp_audioSample.TabIndex = 56;
- this.drp_audioSample.SelectedIndexChanged += new System.EventHandler(this.ControlChanged);
- //
- // AudioTrackGroup
- //
- this.AudioTrackGroup.BackColor = System.Drawing.Color.Transparent;
- this.AudioTrackGroup.Controls.Add(this.drp_audioTrack);
- this.AudioTrackGroup.Controls.Add(this.drp_audioSample);
- this.AudioTrackGroup.Controls.Add(this.drp_audioBitrate);
- this.AudioTrackGroup.Controls.Add(this.drp_audioMix);
- this.AudioTrackGroup.Controls.Add(this.lbl_drc);
- this.AudioTrackGroup.Controls.Add(this.label27);
- this.AudioTrackGroup.Controls.Add(this.lbl_drcHeader);
- this.AudioTrackGroup.Controls.Add(this.drp_audioEncoder);
- this.AudioTrackGroup.Controls.Add(this.tb_drc);
- this.AudioTrackGroup.Controls.Add(this.lbl_mixdown);
- this.AudioTrackGroup.Controls.Add(this.label65);
- this.AudioTrackGroup.Controls.Add(this.lbl_sampleRate);
- this.AudioTrackGroup.Controls.Add(this.lbl_bitrate);
- this.AudioTrackGroup.Location = new System.Drawing.Point(16, 67);
- this.AudioTrackGroup.Name = "AudioTrackGroup";
- this.AudioTrackGroup.Size = new System.Drawing.Size(685, 77);
- this.AudioTrackGroup.TabIndex = 66;
- this.AudioTrackGroup.TabStop = false;
- this.AudioTrackGroup.Text = "Selected Track: New Track";
- //
- // 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;
- //
- // audioList
- //
- this.audioList.AllowUserToAddRows = false;
- this.audioList.AllowUserToResizeColumns = false;
- this.audioList.AllowUserToResizeRows = false;
- this.audioList.BackgroundColor = System.Drawing.Color.White;
- this.audioList.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
- this.audioList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
- this.audioList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
- this.Track,
- this.Source,
- this.AudioCodec,
- this.Mixdown,
- this.Samplerate,
- this.Bitrate,
- this.DRC});
- this.audioList.ContextMenuStrip = this.audioMenu;
- this.audioList.GridColor = System.Drawing.Color.White;
- this.audioList.Location = new System.Drawing.Point(16, 150);
- this.audioList.Name = "audioList";
- this.audioList.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
- this.audioList.RowHeadersVisible = false;
- this.audioList.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders;
- this.audioList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
- this.audioList.ShowCellErrors = false;
- this.audioList.ShowCellToolTips = false;
- this.audioList.ShowEditingIcon = false;
- this.audioList.ShowRowErrors = false;
- this.audioList.Size = new System.Drawing.Size(685, 140);
- this.audioList.TabIndex = 67;
- this.audioList.SelectionChanged += new System.EventHandler(this.audioList_SelectionChanged);
- //
- // Track
- //
- this.Track.FillWeight = 304.2808F;
- this.Track.HeaderText = "Track";
- this.Track.Name = "Track";
- this.Track.ReadOnly = true;
- this.Track.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- this.Track.Width = 50;
- //
- // Source
- //
- this.Source.FillWeight = 49.69727F;
- this.Source.HeaderText = "Source";
- this.Source.Name = "Source";
- this.Source.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- this.Source.Width = 150;
- //
- // AudioCodec
- //
- this.AudioCodec.HeaderText = "Audio Codec";
- this.AudioCodec.Name = "AudioCodec";
- this.AudioCodec.ReadOnly = true;
- this.AudioCodec.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- //
- // Mixdown
- //
- this.Mixdown.FillWeight = 49.69727F;
- this.Mixdown.HeaderText = "Mixdown";
- this.Mixdown.Name = "Mixdown";
- this.Mixdown.ReadOnly = true;
- this.Mixdown.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- this.Mixdown.Width = 150;
- //
- // Samplerate
- //
- this.Samplerate.FillWeight = 49.69727F;
- this.Samplerate.HeaderText = "Samplerate";
- this.Samplerate.Name = "Samplerate";
- this.Samplerate.ReadOnly = true;
- this.Samplerate.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- this.Samplerate.Width = 75;
- //
- // Bitrate
- //
- this.Bitrate.FillWeight = 49.69727F;
- this.Bitrate.HeaderText = "Bitrate";
- this.Bitrate.Name = "Bitrate";
- this.Bitrate.ReadOnly = true;
- this.Bitrate.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- this.Bitrate.Width = 75;
- //
- // DRC
- //
- this.DRC.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
- this.DRC.FillWeight = 96.36334F;
- this.DRC.HeaderText = "DRC";
- this.DRC.Name = "DRC";
- this.DRC.ReadOnly = true;
- this.DRC.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- //
- // AudioPanel
- //
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
- this.BackColor = System.Drawing.Color.Transparent;
- this.Controls.Add(this.audioList);
- this.Controls.Add(this.label68);
- this.Controls.Add(this.btn_addAudioTrack);
- this.Controls.Add(this.AudioTrackGroup);
- this.Controls.Add(this.btn_RemoveAudioTrack);
- this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Name = "AudioPanel";
- this.Size = new System.Drawing.Size(720, 310);
- this.audioMenu.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.tb_drc)).EndInit();
- this.AudioTrackGroup.ResumeLayout(false);
- this.AudioTrackGroup.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.audioList)).EndInit();
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.Button btn_RemoveAudioTrack;
- private System.Windows.Forms.Button btn_addAudioTrack;
- internal System.Windows.Forms.Label lbl_drc;
- internal System.Windows.Forms.Label lbl_drcHeader;
- internal System.Windows.Forms.TrackBar tb_drc;
- internal System.Windows.Forms.Label label68;
- internal System.Windows.Forms.Label lbl_sampleRate;
- internal System.Windows.Forms.Label lbl_bitrate;
- internal System.Windows.Forms.Label label65;
- internal System.Windows.Forms.Label lbl_mixdown;
- internal System.Windows.Forms.ComboBox drp_audioEncoder;
- internal System.Windows.Forms.Label label27;
- internal System.Windows.Forms.ComboBox drp_audioMix;
- internal System.Windows.Forms.ComboBox drp_audioTrack;
- internal System.Windows.Forms.ComboBox drp_audioSample;
- private System.Windows.Forms.GroupBox AudioTrackGroup;
- private System.Windows.Forms.ImageList AudioMenuRowHeightHack;
- private System.Windows.Forms.ContextMenuStrip audioMenu;
- private System.Windows.Forms.ToolStripMenuItem audioList_moveup;
- private System.Windows.Forms.ToolStripMenuItem audioList_movedown;
- private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
- private System.Windows.Forms.ToolStripMenuItem audioList_remove;
- internal System.Windows.Forms.ComboBox drp_audioBitrate;
- private System.Windows.Forms.DataGridView audioList;
- private System.Windows.Forms.DataGridViewTextBoxColumn Track;
- private System.Windows.Forms.DataGridViewTextBoxColumn Source;
- private System.Windows.Forms.DataGridViewTextBoxColumn AudioCodec;
- private System.Windows.Forms.DataGridViewTextBoxColumn Mixdown;
- private System.Windows.Forms.DataGridViewTextBoxColumn Samplerate;
- private System.Windows.Forms.DataGridViewTextBoxColumn Bitrate;
- private System.Windows.Forms.DataGridViewTextBoxColumn DRC;
- }
-}
diff --git a/win/C#/Controls/AudioPanel.cs b/win/C#/Controls/AudioPanel.cs deleted file mode 100644 index 6aa3fbd3e..000000000 --- a/win/C#/Controls/AudioPanel.cs +++ /dev/null @@ -1,704 +0,0 @@ -/* AudioPanel.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
-
-namespace Handbrake.Controls
-{
- using System;
- using System.Collections.Generic;
- using System.Globalization;
- using System.Linq;
- using System.Windows.Forms;
-
- using HandBrake.ApplicationServices.Model;
- using HandBrake.ApplicationServices.Parsing;
- using HandBrake.ApplicationServices.Utilities;
-
- using AudioTrack = HandBrake.ApplicationServices.Model.Encoding.AudioTrack;
-
- /// <summary>
- /// The AudioPanel Control
- /// </summary>
- public partial class AudioPanel : UserControl
- {
- private static readonly CultureInfo Culture = new CultureInfo("en-US", false);
- private const string AC3Passthru = "AC3 Passthru";
- private const string DTSPassthru = "DTS Passthru";
-
- /// <summary>
- /// Initializes a new instance of the <see cref="AudioPanel"/> class.
- /// Create a new instance of the Audio Panel
- /// </summary>
- public AudioPanel()
- {
- InitializeComponent();
- drp_audioMix.SelectedItem = "Dolby Pro Logic II";
- drp_audioSample.SelectedIndex = 1;
- }
-
- /// <summary>
- /// The audio list has changed
- /// </summary>
- public event EventHandler AudioListChanged;
-
- #region Public Methods
- /// <summary>
- /// Get the audio panel
- /// </summary>
- /// <returns>A listview containing the audio tracks</returns>
- public DataGridView GetAudioPanel()
- {
- return audioList;
- }
-
- /// <summary>
- /// Set the File Container. This funciton is used to limit the available options for each file container.
- /// </summary>
- /// <param name="path">
- /// the file path
- /// </param>
- public void SetContainer(string path)
- {
- string oldval = drp_audioEncoder.Text;
-
- drp_audioEncoder.Items.Clear();
- drp_audioEncoder.Items.Add("AAC (faac)");
- drp_audioEncoder.Items.Add("MP3 (lame)");
- drp_audioEncoder.Items.Add(AC3Passthru);
- drp_audioEncoder.Items.Add("AC3 (ffmpeg)");
-
- if (path.Contains("MKV"))
- {
- drp_audioEncoder.Items.Add(DTSPassthru);
- drp_audioEncoder.Items.Add("Vorbis (vorbis)");
- }
-
- if (!drp_audioEncoder.Text.Contains(oldval))
- drp_audioEncoder.SelectedIndex = 0;
- else
- drp_audioEncoder.SelectedItem = oldval;
-
- // Make sure the table is updated with new audio codecs
- // Defaults to AAC encoding.
- foreach (DataGridViewRow row in audioList.Rows)
- {
- if (!drp_audioEncoder.Items.Contains(row.Cells[2].Value))
- row.Cells[2].Value = drp_audioEncoder.Items[0].ToString();
- }
- }
-
- /// <summary>
- /// Checks if the settings used required the .m4v (rather than .mp4) extension
- /// </summary>
- /// <returns>True if m4v is required</returns>
- public bool RequiresM4V()
- {
- return this.audioList.Rows.Cast<DataGridViewRow>().Any(row => row.Cells[2].Value.ToString().Contains("AC3"));
- }
-
- /// <summary>
- /// Load an arraylist of AudioTrack items into the list.
- /// </summary>
- /// <param name="audioTracks">List of audio tracks</param>
- public void LoadTracks(List<AudioTrack> audioTracks)
- {
- ClearAudioList();
-
- if (audioTracks == null)
- return;
-
- foreach (AudioTrack track in audioTracks)
- {
- DataGridViewRow newTrack = new DataGridViewRow();
- newTrack.CreateCells(audioList);
- newTrack.Cells[0].Value = GetNewID().ToString();
- newTrack.Cells[1].Value = "Automatic";
- newTrack.Cells[2].Value = track.Encoder;
- newTrack.Cells[3].Value = track.MixDown;
- newTrack.Cells[4].Value = track.Encoder.Contains(AC3Passthru) || track.Encoder.Contains(DTSPassthru) ? "Auto" : track.SampleRate;
- newTrack.Cells[5].Value = track.Encoder.Contains(AC3Passthru) || track.Encoder.Contains(DTSPassthru) ? "Auto" : track.Bitrate;
- newTrack.Cells[6].Value = track.Encoder.Contains(AC3Passthru) || track.Encoder.Contains(DTSPassthru) ? string.Empty : track.DRC;
- AddTrackForPreset(newTrack);
- }
-
- this.AutomaticTrackSelection();
- }
-
- /// <summary>
- /// Set the Track list dropdown from the parsed title captured during the scan
- /// </summary>
- /// <param name="selectedTitle">The selected title</param>
- /// <param name="preset">A preset</param>
- public void SetTrackListFromPreset(Title selectedTitle, Preset preset)
- {
- if (selectedTitle.AudioTracks.Count == 0)
- {
- audioList.Rows.Clear();
- drp_audioTrack.Items.Clear();
- drp_audioTrack.Items.Add("None Found");
- drp_audioTrack.SelectedIndex = 0;
- return;
- }
-
- // Setup the Audio track source dropdown with the new audio tracks.
- drp_audioTrack.Items.Clear();
- drp_audioTrack.Items.AddRange(selectedTitle.AudioTracks.ToArray());
-
- // Add any tracks the preset has, if there is a preset and no audio tracks in the list currently
- if (audioList.Rows.Count == 0 && preset != null)
- {
- EncodeTask parsed = QueryParserUtility.Parse(preset.Query);
- foreach (AudioTrack audioTrack in parsed.AudioTracks)
- {
- DataGridViewRow newTrack = new DataGridViewRow();
- newTrack.CreateCells(audioList);
- newTrack.Cells[0].Value = GetNewID().ToString();
- newTrack.Cells[1].Value = (audioTrack.Track);
- newTrack.Cells[2].Value = (audioTrack.Encoder);
- newTrack.Cells[3].Value = (audioTrack.MixDown);
- newTrack.Cells[4].Value = (audioTrack.SampleRate);
- newTrack.Cells[5].Value = (audioTrack.Bitrate);
- newTrack.Cells[6].Value = (audioTrack.DRC);
- audioList.Rows.Add(newTrack);
- }
- }
-
- this.AutomaticTrackSelection();
- }
-
- #endregion
-
- #region Control and ListView
-
- /// <summary>
- /// one of the controls has changed. Event handler
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void ControlChanged(object sender, EventArgs e)
- {
- Control ctl = (Control)sender;
-
- switch (ctl.Name)
- {
- case "drp_audioTrack":
- if (audioList.Rows.Count != 0 && audioList.SelectedRows.Count != 0)
- {
- audioList.SelectedRows[0].Cells[1].Value = drp_audioTrack.Text;
-
- // If the track isn't AC3, and the encoder is, change it.
- if (audioList.SelectedRows[0].Cells[2].Value.ToString().Contains(AC3Passthru) && !audioList.SelectedRows[0].Cells[1].Value.ToString().Contains("(AC3)"))
- {
- // Switch to AAC
- drp_audioEncoder.SelectedIndex = 0;
- }
-
- // If the track isn't DTS, and the encoder is, change it.
- if (audioList.SelectedRows[0].Cells[2].Value.ToString().Contains(DTSPassthru) && !audioList.SelectedRows[0].Cells[1].Value.ToString().Contains("DTS"))
- {
- // Switch to AAC
- drp_audioEncoder.SelectedIndex = 0;
- }
- }
- break;
- case "drp_audioEncoder":
- SetMixDown();
- SetBitrate();
-
- // Configure the widgets with values
- if (drp_audioEncoder.Text.Contains(AC3Passthru) || drp_audioEncoder.Text.Contains(DTSPassthru))
- {
- drp_audioMix.Enabled = drp_audioBitrate.Enabled = drp_audioSample.Enabled = tb_drc.Enabled = false;
- lbl_bitrate.Enabled = lbl_drc.Enabled = lbl_drcHeader.Enabled = lbl_mixdown.Enabled = lbl_sampleRate.Enabled = false;
- }
- else
- {
- drp_audioMix.Enabled = drp_audioBitrate.Enabled = drp_audioSample.Enabled = tb_drc.Enabled = true;
- lbl_bitrate.Enabled = lbl_drc.Enabled = lbl_drcHeader.Enabled = lbl_mixdown.Enabled = lbl_sampleRate.Enabled = true;
- }
-
- // Update an item in the Audio list if required.
- if (audioList.Rows.Count != 0 && audioList.SelectedRows.Count != 0)
- audioList.SelectedRows[0].Cells[2].Value = drp_audioEncoder.Text;
- break;
- case "drp_audioMix":
- SetBitrate();
-
- if (audioList.Rows.Count != 0 && audioList.SelectedRows.Count != 0)
- audioList.SelectedRows[0].Cells[3].Value = drp_audioMix.Text;
- break;
- case "drp_audioSample":
- if (audioList.Rows.Count != 0 && audioList.SelectedRows.Count != 0)
- audioList.SelectedRows[0].Cells[4].Value = drp_audioSample.Text;
- break;
- case "drp_audioBitrate":
- // Update an item in the Audio list if required.
- if (audioList.Rows.Count != 0 && audioList.SelectedRows.Count != 0)
- audioList.SelectedRows[0].Cells[5].Value = drp_audioBitrate.Text;
- break;
- case "tb_drc":
- double value;
- if (tb_drc.Value == 0) value = 0;
- else
- value = ((tb_drc.Value - 1) / 10.0) + 1;
-
- lbl_drc.Text = value.ToString();
-
- // Update an item in the Audio list if required.
- if (audioList.Rows.Count != 0 && audioList.SelectedRows.Count != 0)
- {
- audioList.SelectedRows[0].Cells[6].Value = value.ToString();
- audioList.Select();
- }
- break;
- }
-
- audioList.Select();
- }
-
- /// <summary>
- /// The Audio List selected index changed event handler
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void audioList_SelectionChanged(object sender, EventArgs e)
- {
- // Set the dropdown controls based on the selected item in the Audio List.
- if (audioList.Rows.Count != 0 && audioList.SelectedRows.Count != 0)
- {
- drp_audioTrack.SelectedItem = audioList.SelectedRows[0].Cells[1].Value;
- drp_audioEncoder.SelectedItem = audioList.SelectedRows[0].Cells[2].Value;
- drp_audioMix.SelectedItem = audioList.SelectedRows[0].Cells[3].Value;
- drp_audioSample.SelectedItem = audioList.SelectedRows[0].Cells[4].Value;
- drp_audioBitrate.SelectedItem = audioList.SelectedRows[0].Cells[5].Value;
- double drcValue;
- int drcCalculated;
- double.TryParse(audioList.SelectedRows[0].Cells[6].Value.ToString(), out drcValue);
- if (drcValue != 0)
- drcValue = ((drcValue * 10) + 1) - 10;
- int.TryParse(drcValue.ToString(Culture), out drcCalculated);
- tb_drc.Value = drcCalculated;
- lbl_drc.Text = audioList.SelectedRows[0].Cells[6].Value.ToString();
-
- AudioTrackGroup.Text = "Selected Track: " + audioList.SelectedRows[0].Cells[0].Value;
- }
- else
- AudioTrackGroup.Text = "Selected Track: None (Click \"Add Track\" to add)";
- }
-
- #endregion
-
- #region Track Controls
-
- /// <summary>
- /// The Add Audio Track button event handler
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void btn_addAudioTrack_Click(object sender, EventArgs e)
- {
- if (drp_audioTrack.Text == "None Found")
- {
- MessageBox.Show(
- "Your source appears to have no audio tracks that HandBrake supports.",
- "Warning",
- MessageBoxButtons.OK,
- MessageBoxIcon.Warning);
- return;
- }
-
- double value = 0;
- if (tb_drc.Value != 0)
- value = ((tb_drc.Value - 1) / 10.0) + 1;
-
- // Create a new row for the Audio list based on the currently selected items in the dropdown.
- DataGridViewRow newTrack = new DataGridViewRow();
- newTrack.CreateCells(audioList);
- newTrack.Cells[0].Value = GetNewID().ToString();
- newTrack.Cells[1].Value = drp_audioTrack.Text;
- newTrack.Cells[2].Value = drp_audioEncoder.Text;
- newTrack.Cells[3].Value = drp_audioMix.Text;
- newTrack.Cells[4].Value = drp_audioSample.Text;
- newTrack.Cells[5].Value = drp_audioBitrate.Text;
- newTrack.Cells[6].Value = value.ToString();
- audioList.Rows.Add(newTrack);
-
- // The Audio List has changed to raise the event.
- if (this.AudioListChanged != null)
- this.AudioListChanged(this, new EventArgs());
-
- // Select the newly added track and select the control
- audioList.ClearSelection();
- audioList.Rows[audioList.Rows.Count - 1].Selected = true;
- audioList.Select();
- }
-
- /// <summary>
- /// The Remove Track button event handler
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void btn_RemoveAudioTrack_Click(object sender, EventArgs e)
- {
- RemoveTrack();
- }
-
- #endregion
-
- #region Audio List Menu
-
- /// <summary>
- /// The Audio List Move Up menu item
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void audioList_moveup_Click(object sender, EventArgs e)
- {
- MoveTrack(true);
- }
-
- /// <summary>
- /// The audio list move down menu item
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void audioList_movedown_Click(object sender, EventArgs e)
- {
- MoveTrack(false);
- }
-
- /// <summary>
- /// The audio list remove menu item
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void audioList_remove_Click(object sender, EventArgs e)
- {
- RemoveTrack();
- }
-
- #endregion
-
- #region Private Functions
-
-
- private void AutomaticTrackSelection()
- {
- // Handle Native Language and "Dub Foreign language audio" and "Use Foreign language audio and Subtitles" Options
- if (Properties.Settings.Default.NativeLanguage == "Any")
- {
- drp_audioTrack.SelectedIndex = 0;
- foreach (DataGridViewRow item in audioList.Rows)
- {
- if (this.drp_audioTrack.SelectedItem != null)
- {
- item.Cells[1].Value = this.drp_audioTrack.SelectedItem.ToString();
- }
- }
- }
- else
- {
- int mode = Properties.Settings.Default.DubMode;
- switch (mode)
- {
- case 1:
- case 3:
- // Dub Foreign Language Audio
- // Select the prefered language audio, or the first track if it doesn't exist.
- int i = 0;
- foreach (object item in drp_audioTrack.Items)
- {
- if (item.ToString().Contains(Properties.Settings.Default.NativeLanguage))
- {
- drp_audioTrack.SelectedIndex = i;
- break;
- }
-
- i++;
- }
-
- if (drp_audioTrack.SelectedItem != null)
- foreach (DataGridViewRow item in audioList.Rows)
- item.Cells[1].Value = drp_audioTrack.SelectedItem.ToString();
- else
- {
- drp_audioTrack.SelectedIndex = 0;
- if (drp_audioTrack.SelectedItem != null)
- foreach (DataGridViewRow item in audioList.Rows)
- item.Cells[1].Value = drp_audioTrack.SelectedItem.ToString();
- }
-
- break;
- case 2:
- default:
- // Select the first track which is hopefully the default and foreign track.
- drp_audioTrack.SelectedIndex = 0;
-
- if (drp_audioTrack.SelectedItem != null)
- foreach (DataGridViewRow item in audioList.Rows)
- item.Cells[1].Value = drp_audioTrack.SelectedItem.ToString();
- break;
- }
- }
- }
-
- /// <summary>
- /// Add track for preset
- /// </summary>
- /// <param name="item">
- /// The item.
- /// </param>
- private void AddTrackForPreset(DataGridViewRow item)
- {
- audioList.Rows.Add(item);
- if (this.AudioListChanged != null)
- this.AudioListChanged(this, new EventArgs());
- }
-
- /// <summary>
- /// Clear the audio list
- /// </summary>
- private void ClearAudioList()
- {
- audioList.Rows.Clear();
- if (this.AudioListChanged != null)
- this.AudioListChanged(this, new EventArgs());
- }
-
- /// <summary>
- /// Get a new ID for the next audio track
- /// </summary>
- /// <returns>
- /// an int
- /// </returns>
- private int GetNewID()
- {
- return audioList.Rows.Count + 1;
- }
-
- /// <summary>
- /// Remove an audio track from the list
- /// </summary>
- private void RemoveTrack()
- {
- // Remove the Item and reselect the control if the following conditions are met.
- if (audioList.SelectedRows.Count != 0)
- {
- // The Audio List is about to change so raise the event.
- if (this.AudioListChanged != null)
- this.AudioListChanged(this, new EventArgs());
-
- // Record the current selected index.
- int currentPosition = audioList.SelectedRows[0].Index;
-
- audioList.Rows.Remove(audioList.SelectedRows[0]);
-
- // Now reslect the correct item and give focus to the audio list.
- if (audioList.Rows.Count != 0)
- {
- audioList.ClearSelection();
- if (currentPosition <= (audioList.Rows.Count - 1))
- audioList.Rows[currentPosition].Selected = true;
- else if (currentPosition > (audioList.Rows.Count - 1))
- audioList.Rows[audioList.Rows.Count - 1].Selected = true;
-
- audioList.Select();
- }
- // Regenerate the ID numers
- ReGenerateListIDs();
- }
- }
-
- /// <summary>
- /// Move an audio track up or down the audio list
- /// </summary>
- /// <param name="up">
- /// The up.
- /// </param>
- private void MoveTrack(bool up)
- {
- if (audioList.SelectedRows.Count == 0) return;
-
- DataGridViewRow item = audioList.SelectedRows[0];
- int index = item.Index;
-
- if (up) index--;
- else index++;
-
- if (index < audioList.Rows.Count || (audioList.Rows.Count > index && index >= 0))
- {
- audioList.Rows.Remove(item);
- audioList.Rows.Insert(index, item);
- audioList.ClearSelection();
- item.Selected = true;
- }
- }
-
- /// <summary>
- /// Regenerate all the audio track id's on the audio list
- /// </summary>
- private void ReGenerateListIDs()
- {
- int i = 1;
- foreach (DataGridViewRow item in audioList.Rows)
- {
- item.Cells[0].Value = i.ToString();
- i++;
- }
- }
-
- /// <summary>
- /// Set the bitrate dropdown
- /// </summary>
- private void SetBitrate()
- {
- int max = 0;
- string defaultRate = "160";
-
- // Remove defaults
- drp_audioBitrate.Items.Remove("Auto");
- drp_audioBitrate.Items.Remove("192");
- drp_audioBitrate.Items.Remove("224");
- drp_audioBitrate.Items.Remove("256");
- drp_audioBitrate.Items.Remove("320");
- drp_audioBitrate.Items.Remove("384");
- drp_audioBitrate.Items.Remove("448");
- drp_audioBitrate.Items.Remove("640");
- drp_audioBitrate.Items.Remove("768");
-
- // Find Max and Defaults based on encoders
- switch (drp_audioEncoder.Text)
- {
- case "AAC (faac)":
- max = drp_audioMix.Text.Contains("6 Channel") ? 768 : 320;
- defaultRate = "160";
- break;
- case "MP3 (lame)":
- max = 320;
- defaultRate = "160";
- break;
- case "Vorbis (vorbis)":
- defaultRate = "160";
- max = 384;
- break;
- case "AC3 (ffmpeg)":
- defaultRate = "640";
- max = 640;
- break;
- case AC3Passthru:
- drp_audioBitrate.Items.Add("Auto");
- defaultRate = "Auto";
- drp_audioSample.SelectedItem = "Auto";
- break;
- case DTSPassthru:
- drp_audioBitrate.Items.Add("Auto");
- defaultRate = "Auto";
- drp_audioSample.SelectedItem = "Auto";
- break;
- }
-
- // Re-add appropiate options
- if (max > 160)
- {
- drp_audioBitrate.Items.Add("192");
- drp_audioBitrate.Items.Add("224");
- drp_audioBitrate.Items.Add("256");
- drp_audioBitrate.Items.Add("320");
- }
-
- if (max > 320)
- {
- drp_audioBitrate.Items.Add("384");
- }
-
- if (max >= 640)
- {
- drp_audioBitrate.Items.Add("448");
- drp_audioBitrate.Items.Add("640");
- }
-
- if (max == 768)
- {
- drp_audioBitrate.Items.Add("768");
- }
-
- // Set the default bit-rate
- drp_audioBitrate.SelectedItem = defaultRate;
- }
-
- /// <summary>
- /// Set the mixdown dropdown
- /// </summary>
- private void SetMixDown()
- {
- drp_audioMix.Items.Clear();
- drp_audioMix.Items.Add("Mono");
- drp_audioMix.Items.Add("Stereo");
- drp_audioMix.Items.Add("Dolby Surround");
- drp_audioMix.Items.Add("Dolby Pro Logic II");
- drp_audioMix.Items.Add("6 Channel Discrete");
- drp_audioMix.Items.Add(AC3Passthru);
- drp_audioMix.Items.Add(DTSPassthru);
-
- drp_audioMix.SelectedItem = "Dolby Pro Logic II";
-
- switch (drp_audioEncoder.Text)
- {
- case "AAC (faac)":
- drp_audioMix.Items.Remove(AC3Passthru);
- drp_audioMix.Items.Remove(DTSPassthru);
- break;
- case "MP3 (lame)":
- drp_audioMix.Items.Remove("6 Channel Discrete");
- drp_audioMix.Items.Remove(AC3Passthru);
- drp_audioMix.Items.Remove(DTSPassthru);
- break;
- case "Vorbis (vorbis)":
- drp_audioMix.Items.Remove(AC3Passthru);
- drp_audioMix.Items.Remove(DTSPassthru);
- break;
- case "AC3 (ffmpeg)":
- drp_audioMix.Items.Remove(AC3Passthru);
- drp_audioMix.Items.Remove(DTSPassthru);
- break;
- case "AC3 Passthru":
- drp_audioMix.SelectedItem = AC3Passthru;
- break;
- case "DTS Passthru":
- drp_audioMix.SelectedItem = DTSPassthru;
- break;
- }
- }
-
- #endregion
- }
-}
\ No newline at end of file diff --git a/win/C#/Controls/AudioPanel.resx b/win/C#/Controls/AudioPanel.resx deleted file mode 100644 index ac50d9273..000000000 --- a/win/C#/Controls/AudioPanel.resx +++ /dev/null @@ -1,147 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <metadata name="audioMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>216, 16</value>
- </metadata>
- <metadata name="AudioMenuRowHeightHack.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>35, 17</value>
- </metadata>
- <metadata name="Track.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="Source.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="AudioCodec.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="Mixdown.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="Samplerate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="Bitrate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="DRC.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
-</root>
\ No newline at end of file diff --git a/win/C#/Controls/Filters.Designer.cs b/win/C#/Controls/Filters.Designer.cs deleted file mode 100644 index 33531caa1..000000000 --- a/win/C#/Controls/Filters.Designer.cs +++ /dev/null @@ -1,340 +0,0 @@ -namespace Handbrake.Controls
-{
- partial class Filters
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Component Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.text_customDT = new System.Windows.Forms.TextBox();
- this.label18 = new System.Windows.Forms.Label();
- this.drop_detelecine = new System.Windows.Forms.ComboBox();
- this.text_customDC = new System.Windows.Forms.TextBox();
- this.label1 = new System.Windows.Forms.Label();
- this.drop_decomb = new System.Windows.Forms.ComboBox();
- this.text_customDI = new System.Windows.Forms.TextBox();
- this.label2 = new System.Windows.Forms.Label();
- this.drop_deinterlace = new System.Windows.Forms.ComboBox();
- this.text_customDN = new System.Windows.Forms.TextBox();
- this.label3 = new System.Windows.Forms.Label();
- this.drop_denoise = new System.Windows.Forms.ComboBox();
- this.slider_deblock = new System.Windows.Forms.TrackBar();
- this.check_grayscale = new System.Windows.Forms.CheckBox();
- this.label8 = new System.Windows.Forms.Label();
- this.lbl_deblockVal = new System.Windows.Forms.Label();
- this.label68 = new System.Windows.Forms.Label();
- this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
- ((System.ComponentModel.ISupportInitialize)(this.slider_deblock)).BeginInit();
- this.tableLayoutPanel1.SuspendLayout();
- this.SuspendLayout();
- //
- // text_customDT
- //
- this.text_customDT.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.text_customDT.Location = new System.Drawing.Point(251, 3);
- this.text_customDT.Name = "text_customDT";
- this.text_customDT.Size = new System.Drawing.Size(115, 21);
- this.text_customDT.TabIndex = 47;
- this.text_customDT.Visible = false;
- //
- // label18
- //
- this.label18.Anchor = System.Windows.Forms.AnchorStyles.Left;
- this.label18.AutoSize = true;
- this.label18.BackColor = System.Drawing.Color.Transparent;
- this.label18.Location = new System.Drawing.Point(0, 7);
- this.label18.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
- this.label18.Name = "label18";
- this.label18.Size = new System.Drawing.Size(61, 13);
- this.label18.TabIndex = 46;
- this.label18.Text = "Detelecine:";
- //
- // drop_detelecine
- //
- this.drop_detelecine.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.drop_detelecine.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_detelecine.FormattingEnabled = true;
- this.drop_detelecine.Items.AddRange(new object[] {
- "Off",
- "Custom",
- "Default"});
- this.drop_detelecine.Location = new System.Drawing.Point(71, 3);
- this.drop_detelecine.Name = "drop_detelecine";
- this.drop_detelecine.Size = new System.Drawing.Size(174, 21);
- this.drop_detelecine.TabIndex = 45;
- this.drop_detelecine.SelectedIndexChanged += new System.EventHandler(this.DropDetelecineSelectedIndexChanged);
- //
- // text_customDC
- //
- this.text_customDC.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.text_customDC.Location = new System.Drawing.Point(251, 30);
- this.text_customDC.Name = "text_customDC";
- this.text_customDC.Size = new System.Drawing.Size(115, 21);
- this.text_customDC.TabIndex = 50;
- this.text_customDC.Visible = false;
- //
- // label1
- //
- this.label1.Anchor = System.Windows.Forms.AnchorStyles.Left;
- this.label1.AutoSize = true;
- this.label1.BackColor = System.Drawing.Color.Transparent;
- this.label1.Location = new System.Drawing.Point(0, 34);
- this.label1.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(49, 13);
- this.label1.TabIndex = 49;
- this.label1.Text = "Decomb:";
- //
- // drop_decomb
- //
- this.drop_decomb.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.drop_decomb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_decomb.FormattingEnabled = true;
- this.drop_decomb.Items.AddRange(new object[] {
- "Off",
- "Custom",
- "Default"});
- this.drop_decomb.Location = new System.Drawing.Point(71, 30);
- this.drop_decomb.Name = "drop_decomb";
- this.drop_decomb.Size = new System.Drawing.Size(174, 21);
- this.drop_decomb.TabIndex = 48;
- this.drop_decomb.SelectedIndexChanged += new System.EventHandler(this.DropDecombSelectedIndexChanged);
- //
- // text_customDI
- //
- this.text_customDI.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.text_customDI.Location = new System.Drawing.Point(251, 57);
- this.text_customDI.Name = "text_customDI";
- this.text_customDI.Size = new System.Drawing.Size(115, 21);
- this.text_customDI.TabIndex = 53;
- this.text_customDI.Visible = false;
- //
- // label2
- //
- this.label2.Anchor = System.Windows.Forms.AnchorStyles.Left;
- this.label2.AutoSize = true;
- this.label2.BackColor = System.Drawing.Color.Transparent;
- this.label2.Location = new System.Drawing.Point(0, 61);
- this.label2.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(65, 13);
- this.label2.TabIndex = 52;
- this.label2.Text = "Deinterlace:";
- //
- // drop_deinterlace
- //
- this.drop_deinterlace.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.drop_deinterlace.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_deinterlace.FormattingEnabled = true;
- this.drop_deinterlace.Items.AddRange(new object[] {
- "Off",
- "Custom",
- "Fast",
- "Slow",
- "Slower"});
- this.drop_deinterlace.Location = new System.Drawing.Point(71, 57);
- this.drop_deinterlace.Name = "drop_deinterlace";
- this.drop_deinterlace.Size = new System.Drawing.Size(174, 21);
- this.drop_deinterlace.TabIndex = 51;
- this.drop_deinterlace.SelectedIndexChanged += new System.EventHandler(this.DropDeinterlaceSelectedIndexChanged);
- //
- // text_customDN
- //
- this.text_customDN.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.text_customDN.Location = new System.Drawing.Point(251, 84);
- this.text_customDN.Name = "text_customDN";
- this.text_customDN.Size = new System.Drawing.Size(115, 21);
- this.text_customDN.TabIndex = 56;
- this.text_customDN.Visible = false;
- //
- // label3
- //
- this.label3.Anchor = System.Windows.Forms.AnchorStyles.Left;
- this.label3.AutoSize = true;
- this.label3.BackColor = System.Drawing.Color.Transparent;
- this.label3.Location = new System.Drawing.Point(0, 88);
- this.label3.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(49, 13);
- this.label3.TabIndex = 55;
- this.label3.Text = "Denoise:";
- //
- // drop_denoise
- //
- this.drop_denoise.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.drop_denoise.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_denoise.FormattingEnabled = true;
- this.drop_denoise.Items.AddRange(new object[] {
- "Off",
- "Custom",
- "Weak",
- "Medium",
- "Strong"});
- this.drop_denoise.Location = new System.Drawing.Point(71, 84);
- this.drop_denoise.Name = "drop_denoise";
- this.drop_denoise.Size = new System.Drawing.Size(174, 21);
- this.drop_denoise.TabIndex = 54;
- this.drop_denoise.SelectedIndexChanged += new System.EventHandler(this.DropDenoiseSelectedIndexChanged);
- //
- // slider_deblock
- //
- this.slider_deblock.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.slider_deblock.BackColor = System.Drawing.SystemColors.Window;
- this.slider_deblock.Location = new System.Drawing.Point(71, 111);
- this.slider_deblock.Maximum = 15;
- this.slider_deblock.Minimum = 4;
- this.slider_deblock.Name = "slider_deblock";
- this.slider_deblock.Size = new System.Drawing.Size(174, 45);
- this.slider_deblock.TabIndex = 58;
- this.slider_deblock.Value = 4;
- this.slider_deblock.Scroll += new System.EventHandler(this.SliderDeblockScroll);
- //
- // check_grayscale
- //
- this.check_grayscale.AutoSize = true;
- this.check_grayscale.BackColor = System.Drawing.Color.Transparent;
- this.check_grayscale.Location = new System.Drawing.Point(71, 162);
- this.check_grayscale.Name = "check_grayscale";
- this.check_grayscale.Size = new System.Drawing.Size(119, 17);
- this.check_grayscale.TabIndex = 57;
- this.check_grayscale.Text = "Grayscale Encoding";
- this.check_grayscale.UseVisualStyleBackColor = false;
- //
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.BackColor = System.Drawing.Color.Transparent;
- this.label8.Location = new System.Drawing.Point(0, 115);
- this.label8.Margin = new System.Windows.Forms.Padding(0, 7, 3, 3);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(48, 13);
- this.label8.TabIndex = 60;
- this.label8.Text = "Deblock:";
- //
- // lbl_deblockVal
- //
- this.lbl_deblockVal.AutoSize = true;
- this.lbl_deblockVal.BackColor = System.Drawing.Color.Transparent;
- this.lbl_deblockVal.Location = new System.Drawing.Point(251, 115);
- this.lbl_deblockVal.Margin = new System.Windows.Forms.Padding(3, 7, 3, 3);
- this.lbl_deblockVal.Name = "lbl_deblockVal";
- this.lbl_deblockVal.Size = new System.Drawing.Size(23, 13);
- this.lbl_deblockVal.TabIndex = 59;
- this.lbl_deblockVal.Text = "Off";
- //
- // label68
- //
- this.label68.AutoSize = true;
- this.label68.BackColor = System.Drawing.Color.Transparent;
- this.label68.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label68.Location = new System.Drawing.Point(13, 13);
- this.label68.Name = "label68";
- this.label68.Size = new System.Drawing.Size(42, 13);
- this.label68.TabIndex = 61;
- this.label68.Text = "Filters";
- //
- // tableLayoutPanel1
- //
- this.tableLayoutPanel1.AutoSize = true;
- this.tableLayoutPanel1.ColumnCount = 3;
- this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
- this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
- this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
- this.tableLayoutPanel1.Controls.Add(this.label18, 0, 0);
- this.tableLayoutPanel1.Controls.Add(this.label1, 0, 1);
- this.tableLayoutPanel1.Controls.Add(this.lbl_deblockVal, 2, 4);
- this.tableLayoutPanel1.Controls.Add(this.check_grayscale, 1, 5);
- this.tableLayoutPanel1.Controls.Add(this.text_customDN, 2, 3);
- this.tableLayoutPanel1.Controls.Add(this.slider_deblock, 1, 4);
- this.tableLayoutPanel1.Controls.Add(this.text_customDI, 2, 2);
- this.tableLayoutPanel1.Controls.Add(this.label2, 0, 2);
- this.tableLayoutPanel1.Controls.Add(this.text_customDC, 2, 1);
- this.tableLayoutPanel1.Controls.Add(this.label3, 0, 3);
- this.tableLayoutPanel1.Controls.Add(this.text_customDT, 2, 0);
- this.tableLayoutPanel1.Controls.Add(this.label8, 0, 4);
- this.tableLayoutPanel1.Controls.Add(this.drop_detelecine, 1, 0);
- this.tableLayoutPanel1.Controls.Add(this.drop_denoise, 1, 3);
- this.tableLayoutPanel1.Controls.Add(this.drop_decomb, 1, 1);
- this.tableLayoutPanel1.Controls.Add(this.drop_deinterlace, 1, 2);
- this.tableLayoutPanel1.Location = new System.Drawing.Point(19, 29);
- this.tableLayoutPanel1.Name = "tableLayoutPanel1";
- this.tableLayoutPanel1.RowCount = 6;
- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel1.Size = new System.Drawing.Size(369, 182);
- this.tableLayoutPanel1.TabIndex = 62;
- //
- // Filters
- //
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
- this.BackColor = System.Drawing.Color.Transparent;
- this.Controls.Add(this.tableLayoutPanel1);
- this.Controls.Add(this.label68);
- this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Name = "Filters";
- this.Size = new System.Drawing.Size(592, 270);
- ((System.ComponentModel.ISupportInitialize)(this.slider_deblock)).EndInit();
- this.tableLayoutPanel1.ResumeLayout(false);
- this.tableLayoutPanel1.PerformLayout();
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.TextBox text_customDT;
- private System.Windows.Forms.Label label18;
- internal System.Windows.Forms.ComboBox drop_detelecine;
- private System.Windows.Forms.TextBox text_customDC;
- internal System.Windows.Forms.Label label1;
- internal System.Windows.Forms.ComboBox drop_decomb;
- private System.Windows.Forms.TextBox text_customDI;
- internal System.Windows.Forms.Label label2;
- internal System.Windows.Forms.ComboBox drop_deinterlace;
- private System.Windows.Forms.TextBox text_customDN;
- internal System.Windows.Forms.Label label3;
- internal System.Windows.Forms.ComboBox drop_denoise;
- internal System.Windows.Forms.TrackBar slider_deblock;
- internal System.Windows.Forms.CheckBox check_grayscale;
- internal System.Windows.Forms.Label label8;
- internal System.Windows.Forms.Label lbl_deblockVal;
- internal System.Windows.Forms.Label label68;
- private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
- }
-}
diff --git a/win/C#/Controls/Filters.cs b/win/C#/Controls/Filters.cs deleted file mode 100644 index 0f47b4b75..000000000 --- a/win/C#/Controls/Filters.cs +++ /dev/null @@ -1,336 +0,0 @@ -/* Filters.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
-
-namespace Handbrake.Controls
-{
- using System;
- using System.Windows.Forms;
-
- using HandBrake.ApplicationServices.Model.Encoding;
-
- /// <summary>
- /// The Filters Panel
- /// </summary>
- public partial class Filters : UserControl
- {
- /// <summary>
- /// The Filter settings have changed
- /// </summary>
- public event EventHandler FilterSettingsChanged;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="Filters"/> class.
- /// Creates a new instance of Filters
- /// </summary>
- public Filters()
- {
- InitializeComponent();
- drop_decomb.SelectedIndex = 0;
- drop_deinterlace.SelectedIndex = 0;
- drop_denoise.SelectedIndex = 0;
- drop_detelecine.SelectedIndex = 0;
- }
-
- /// <summary>
- /// Gets the CLI query for the query generator.
- /// </summary>
- public string GetCliQuery
- {
- get
- {
- string query = string.Empty;
-
- switch (drop_detelecine.Text) // DeTelecine
- {
- case "Off":
- query += string.Empty;
- break;
- case "Default":
- query += " --detelecine";
- break;
- case "Custom":
- query += " --detelecine=\"" + text_customDT.Text + "\"";
- break;
- default:
- query += string.Empty;
- break;
- }
-
- switch (drop_decomb.Text) // Decomb
- {
- case "Off":
- query += string.Empty;
- break;
- case "Default":
- query += " --decomb";
- break;
- case "Custom":
- query += " --decomb=\"" + text_customDC.Text + "\"";
- break;
- default:
- query += string.Empty;
- break;
- }
-
- switch (drop_deinterlace.Text) // DeInterlace
- {
- case "None":
- query += string.Empty;
- break;
- case "Fast":
- query += " --deinterlace=\"fast\"";
- break;
- case "Slow":
- query += " --deinterlace=\"slow\"";
- break;
- case "Slower":
- query += " --deinterlace=\"slower\"";
- break;
- case "Custom":
- query += " --deinterlace=\"" + text_customDI.Text + "\"";
- break;
- default:
- query += string.Empty;
- break;
- }
-
- switch (drop_denoise.Text) // Denoise
- {
- case "None":
- query += string.Empty;
- break;
- case "Weak":
- query += " --denoise=\"weak\"";
- break;
- case "Medium":
- query += " --denoise=\"medium\"";
- break;
- case "Strong":
- query += " --denoise=\"strong\"";
- break;
- case "Custom":
- query += " --denoise=\"" + text_customDN.Text + "\"";
- break;
- default:
- query += string.Empty;
- break;
- }
-
- if (slider_deblock.Value != 4)
- query += " --deblock=" + slider_deblock.Value;
-
- if (check_grayscale.Checked)
- query += " -g ";
-
- return query;
- }
- }
-
- /// <summary>
- /// Set the Detelecine control
- /// </summary>
- /// <param name="value">
- /// The value part of the CLI string
- /// </param>
- /// <param name="custom">
- /// The Custom Detelecine setting
- /// </param>
- public void SetDeTelecine(Detelecine value, string custom)
- {
- text_customDT.Text = string.Empty;
- text_customDT.Visible = false;
- switch (value)
- {
- case Detelecine.Off:
- drop_detelecine.SelectedIndex = 0;
- break;
- case Detelecine.Default:
- drop_detelecine.SelectedIndex = 2;
- break;
- default:
- drop_detelecine.SelectedIndex = 1;
- text_customDT.Text = custom;
- text_customDT.Visible = true;
- break;
- }
- }
-
- /// <summary>
- /// Set the Denoise control
- /// </summary>
- /// <param name="value">
- /// The value part of the CLI string
- /// </param>
- /// <param name="custom">
- /// The custom denoise setting.
- /// </param>
- public void SetDeNoise(Denoise value, string custom)
- {
- text_customDN.Text = string.Empty;
- text_customDN.Visible = false;
- switch (value)
- {
- case Denoise.Off:
- drop_denoise.SelectedIndex = 0;
- break;
- case Denoise.Weak:
- drop_denoise.SelectedIndex = 2;
- break;
- case Denoise.Medium:
- drop_denoise.SelectedIndex = 3;
- break;
- case Denoise.Strong:
- drop_denoise.SelectedIndex = 4;
- break;
- default:
- drop_denoise.SelectedIndex = 1;
- text_customDN.Text = custom;
- text_customDN.Visible = true;
- break;
- }
- }
-
- /// <summary>
- /// Set the Deinterlace Control
- /// </summary>
- /// <param name="value">
- /// The value part of the CLI string
- /// </param>
- /// <param name="custom">
- /// The Custom Detinerlace Settings
- /// </param>
- public void SetDeInterlace(Deinterlace value, string custom)
- {
- text_customDI.Text = string.Empty;
- text_customDI.Visible = false;
- switch (value)
- {
- case Deinterlace.Off:
- drop_deinterlace.SelectedIndex = 0;
- break;
- case Deinterlace.Fast:
- drop_deinterlace.SelectedIndex = 2;
- break;
- case Deinterlace.Slow:
- drop_deinterlace.SelectedIndex = 3;
- break;
- case Deinterlace.Slower:
- drop_deinterlace.SelectedIndex = 4;
-
- break;
- default:
- drop_deinterlace.SelectedIndex = 1;
- text_customDI.Text = custom;
- text_customDI.Visible = true;
- break;
- }
- }
-
- /// <summary>
- /// Set the Decomb Control
- /// </summary>
- /// <param name="value">
- /// The value part of the CLI string
- /// </param>
- /// <param name="custom">
- /// The custom option string
- /// </param>
- public void SetDecomb(Decomb value, string custom)
- {
- text_customDC.Text = string.Empty;
- text_customDC.Visible = false;
- switch (value)
- {
- case Decomb.Off:
- drop_decomb.SelectedIndex = 0;
- break;
- case Decomb.Default:
- drop_decomb.SelectedIndex = 2;
- break;
- default:
- drop_decomb.SelectedIndex = 1;
- text_customDC.Text = custom;
- text_customDC.Visible = true;
- break;
- }
- }
-
- /// <summary>
- /// Set the Deblock Control
- /// </summary>
- /// <param name="value">The deblock value</param>
- public void SetDeBlock(int value)
- {
- if (value != 0)
- {
- slider_deblock.Value = value;
- lbl_deblockVal.Text = value.ToString();
- }
- else
- {
- slider_deblock.Value = 4;
- lbl_deblockVal.Text = "Off";
- }
- }
-
- /// <summary>
- /// Set the grayscale control
- /// </summary>
- /// <param name="value">Boolean value</param>
- public void SetGrayScale(bool value)
- {
- check_grayscale.CheckState = value ? CheckState.Checked : CheckState.Unchecked;
- }
-
- // Controls
- private void DropDetelecineSelectedIndexChanged(object sender, EventArgs e)
- {
- text_customDT.Visible = drop_detelecine.Text == "Custom";
- // A Filter has changed so raise a FilterSettingsChanged event.
- if (this.FilterSettingsChanged != null)
- this.FilterSettingsChanged(this, new EventArgs());
- }
-
- private void DropDecombSelectedIndexChanged(object sender, EventArgs e)
- {
- text_customDC.Visible = drop_decomb.Text == "Custom";
- if (drop_decomb.SelectedIndex != 0 && drop_deinterlace.SelectedIndex != 0)
- drop_deinterlace.SelectedIndex = 0;
-
- // A Filter has changed so raise a FilterSettingsChanged event.
- if (this.FilterSettingsChanged != null)
- this.FilterSettingsChanged(this, new EventArgs());
- }
-
- private void DropDeinterlaceSelectedIndexChanged(object sender, EventArgs e)
- {
- text_customDI.Visible = drop_deinterlace.Text == "Custom";
- if (drop_decomb.SelectedIndex != 0 && drop_deinterlace.SelectedIndex != 0)
- drop_decomb.SelectedIndex = 0;
-
- // A Filter has changed so raise a FilterSettingsChanged event.
- if (this.FilterSettingsChanged != null)
- this.FilterSettingsChanged(this, new EventArgs());
- }
-
- private void DropDenoiseSelectedIndexChanged(object sender, EventArgs e)
- {
- text_customDN.Visible = drop_denoise.Text == "Custom";
-
- // A Filter has changed so raise a FilterSettingsChanged event.
- if (this.FilterSettingsChanged != null)
- this.FilterSettingsChanged(this, new EventArgs());
- }
-
- private void SliderDeblockScroll(object sender, EventArgs e)
- {
- lbl_deblockVal.Text = slider_deblock.Value == 4 ? "Off" : slider_deblock.Value.ToString();
-
- // A Filter has changed so raise a FilterSettingsChanged event.
- if (this.FilterSettingsChanged != null)
- this.FilterSettingsChanged(this, new EventArgs());
- }
- }
-}
\ No newline at end of file diff --git a/win/C#/Controls/Filters.resx b/win/C#/Controls/Filters.resx deleted file mode 100644 index ff31a6db5..000000000 --- a/win/C#/Controls/Filters.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root>
\ No newline at end of file diff --git a/win/C#/Controls/PictureSettings.Designer.cs b/win/C#/Controls/PictureSettings.Designer.cs deleted file mode 100644 index 2dfbd9735..000000000 --- a/win/C#/Controls/PictureSettings.Designer.cs +++ /dev/null @@ -1,688 +0,0 @@ -namespace Handbrake.Controls
-{
- partial class PictureSettings
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Component Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
- this.Label15 = new System.Windows.Forms.Label();
- this.crop_left = new System.Windows.Forms.NumericUpDown();
- this.crop_right = new System.Windows.Forms.NumericUpDown();
- this.check_autoCrop = new System.Windows.Forms.RadioButton();
- this.Label51 = new System.Windows.Forms.Label();
- this.crop_top = new System.Windows.Forms.NumericUpDown();
- this.Label53 = new System.Windows.Forms.Label();
- this.Label52 = new System.Windows.Forms.Label();
- this.crop_bottom = new System.Windows.Forms.NumericUpDown();
- this.check_customCrop = new System.Windows.Forms.RadioButton();
- this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
- this.label7 = new System.Windows.Forms.Label();
- this.lbl_src_res = new System.Windows.Forms.Label();
- this.Label55 = new System.Windows.Forms.Label();
- this.text_width = new System.Windows.Forms.NumericUpDown();
- this.label4 = new System.Windows.Forms.Label();
- this.text_height = new System.Windows.Forms.NumericUpDown();
- this.check_KeepAR = new System.Windows.Forms.CheckBox();
- this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
- this.updownParHeight = new System.Windows.Forms.NumericUpDown();
- this.label6 = new System.Windows.Forms.Label();
- this.labelDisplaySize = new System.Windows.Forms.Label();
- this.lbl_parHeight = new System.Windows.Forms.Label();
- this.labelStaticDisplaySize = new System.Windows.Forms.Label();
- this.updownParWidth = new System.Windows.Forms.NumericUpDown();
- this.drp_anamorphic = new System.Windows.Forms.ComboBox();
- this.lbl_parWidth = new System.Windows.Forms.Label();
- this.updownDisplayWidth = new System.Windows.Forms.NumericUpDown();
- this.lbl_modulus = new System.Windows.Forms.Label();
- this.lbl_displayWidth = new System.Windows.Forms.Label();
- this.drp_modulus = new System.Windows.Forms.ComboBox();
- this.label8 = new System.Windows.Forms.Label();
- this.label26 = new System.Windows.Forms.Label();
- this.lbl_presetCropWarning = new System.Windows.Forms.Label();
- this.tableLayoutPanel3.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.crop_left)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.crop_right)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.crop_top)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.crop_bottom)).BeginInit();
- this.tableLayoutPanel2.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.text_width)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.text_height)).BeginInit();
- this.tableLayoutPanel1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.updownParHeight)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.updownParWidth)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.updownDisplayWidth)).BeginInit();
- this.SuspendLayout();
- //
- // tableLayoutPanel3
- //
- this.tableLayoutPanel3.AutoSize = true;
- this.tableLayoutPanel3.ColumnCount = 5;
- this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
- this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
- this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
- this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
- this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
- this.tableLayoutPanel3.Controls.Add(this.Label15, 0, 4);
- this.tableLayoutPanel3.Controls.Add(this.crop_left, 1, 4);
- this.tableLayoutPanel3.Controls.Add(this.crop_right, 3, 4);
- this.tableLayoutPanel3.Controls.Add(this.check_autoCrop, 0, 0);
- this.tableLayoutPanel3.Controls.Add(this.Label51, 4, 4);
- this.tableLayoutPanel3.Controls.Add(this.crop_top, 2, 3);
- this.tableLayoutPanel3.Controls.Add(this.Label53, 2, 6);
- this.tableLayoutPanel3.Controls.Add(this.Label52, 2, 2);
- this.tableLayoutPanel3.Controls.Add(this.crop_bottom, 2, 5);
- this.tableLayoutPanel3.Controls.Add(this.check_customCrop, 0, 1);
- this.tableLayoutPanel3.Location = new System.Drawing.Point(419, 35);
- this.tableLayoutPanel3.Name = "tableLayoutPanel3";
- this.tableLayoutPanel3.RowCount = 7;
- this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel3.Size = new System.Drawing.Size(217, 165);
- this.tableLayoutPanel3.TabIndex = 117;
- //
- // Label15
- //
- this.Label15.Anchor = System.Windows.Forms.AnchorStyles.Right;
- this.Label15.AutoSize = true;
- this.Label15.BackColor = System.Drawing.Color.Transparent;
- this.Label15.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.Label15.Location = new System.Drawing.Point(0, 99);
- this.Label15.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
- this.Label15.Name = "Label15";
- this.Label15.Size = new System.Drawing.Size(26, 13);
- this.Label15.TabIndex = 97;
- this.Label15.Text = "Left";
- //
- // crop_left
- //
- this.crop_left.Enabled = false;
- this.crop_left.Increment = new decimal(new int[] {
- 2,
- 0,
- 0,
- 0});
- this.crop_left.Location = new System.Drawing.Point(32, 95);
- this.crop_left.Maximum = new decimal(new int[] {
- 128000,
- 0,
- 0,
- 0});
- this.crop_left.Name = "crop_left";
- this.crop_left.Size = new System.Drawing.Size(44, 21);
- this.crop_left.TabIndex = 98;
- this.crop_left.ValueChanged += new System.EventHandler(this.CropValueChanged);
- //
- // crop_right
- //
- this.crop_right.Enabled = false;
- this.crop_right.Increment = new decimal(new int[] {
- 2,
- 0,
- 0,
- 0});
- this.crop_right.Location = new System.Drawing.Point(132, 95);
- this.crop_right.Maximum = new decimal(new int[] {
- 128000,
- 0,
- 0,
- 0});
- this.crop_right.Name = "crop_right";
- this.crop_right.Size = new System.Drawing.Size(44, 21);
- this.crop_right.TabIndex = 101;
- this.crop_right.ValueChanged += new System.EventHandler(this.CropValueChanged);
- //
- // check_autoCrop
- //
- this.check_autoCrop.AutoSize = true;
- this.check_autoCrop.Checked = true;
- this.tableLayoutPanel3.SetColumnSpan(this.check_autoCrop, 5);
- this.check_autoCrop.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.check_autoCrop.Location = new System.Drawing.Point(0, 3);
- this.check_autoCrop.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
- this.check_autoCrop.Name = "check_autoCrop";
- this.check_autoCrop.Size = new System.Drawing.Size(73, 17);
- this.check_autoCrop.TabIndex = 105;
- this.check_autoCrop.TabStop = true;
- this.check_autoCrop.Text = "Automatic";
- this.check_autoCrop.UseVisualStyleBackColor = true;
- this.check_autoCrop.CheckedChanged += new System.EventHandler(this.CheckAutoCropCheckedChanged);
- //
- // Label51
- //
- this.Label51.Anchor = System.Windows.Forms.AnchorStyles.Left;
- this.Label51.AutoSize = true;
- this.Label51.BackColor = System.Drawing.Color.Transparent;
- this.Label51.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.Label51.Location = new System.Drawing.Point(182, 99);
- this.Label51.Margin = new System.Windows.Forms.Padding(3);
- this.Label51.Name = "Label51";
- this.Label51.Size = new System.Drawing.Size(32, 13);
- this.Label51.TabIndex = 102;
- this.Label51.Text = "Right";
- //
- // crop_top
- //
- this.crop_top.Enabled = false;
- this.crop_top.Increment = new decimal(new int[] {
- 2,
- 0,
- 0,
- 0});
- this.crop_top.Location = new System.Drawing.Point(82, 68);
- this.crop_top.Maximum = new decimal(new int[] {
- 128000,
- 0,
- 0,
- 0});
- this.crop_top.Name = "crop_top";
- this.crop_top.Size = new System.Drawing.Size(44, 21);
- this.crop_top.TabIndex = 100;
- this.crop_top.ValueChanged += new System.EventHandler(this.CropValueChanged);
- //
- // Label53
- //
- this.Label53.Anchor = System.Windows.Forms.AnchorStyles.Top;
- this.Label53.AutoSize = true;
- this.Label53.BackColor = System.Drawing.Color.Transparent;
- this.Label53.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.Label53.Location = new System.Drawing.Point(83, 149);
- this.Label53.Margin = new System.Windows.Forms.Padding(3);
- this.Label53.Name = "Label53";
- this.Label53.Size = new System.Drawing.Size(41, 13);
- this.Label53.TabIndex = 104;
- this.Label53.Text = "Bottom";
- //
- // Label52
- //
- this.Label52.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
- this.Label52.AutoSize = true;
- this.Label52.BackColor = System.Drawing.Color.Transparent;
- this.Label52.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.Label52.Location = new System.Drawing.Point(91, 49);
- this.Label52.Margin = new System.Windows.Forms.Padding(3);
- this.Label52.Name = "Label52";
- this.Label52.Size = new System.Drawing.Size(25, 13);
- this.Label52.TabIndex = 99;
- this.Label52.Text = "Top";
- //
- // crop_bottom
- //
- this.crop_bottom.Enabled = false;
- this.crop_bottom.Increment = new decimal(new int[] {
- 2,
- 0,
- 0,
- 0});
- this.crop_bottom.Location = new System.Drawing.Point(82, 122);
- this.crop_bottom.Maximum = new decimal(new int[] {
- 128000,
- 0,
- 0,
- 0});
- this.crop_bottom.Name = "crop_bottom";
- this.crop_bottom.Size = new System.Drawing.Size(44, 21);
- this.crop_bottom.TabIndex = 103;
- this.crop_bottom.ValueChanged += new System.EventHandler(this.CropValueChanged);
- //
- // check_customCrop
- //
- this.check_customCrop.AutoSize = true;
- this.tableLayoutPanel3.SetColumnSpan(this.check_customCrop, 5);
- this.check_customCrop.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.check_customCrop.Location = new System.Drawing.Point(0, 26);
- this.check_customCrop.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
- this.check_customCrop.Name = "check_customCrop";
- this.check_customCrop.Size = new System.Drawing.Size(61, 17);
- this.check_customCrop.TabIndex = 106;
- this.check_customCrop.Text = "Custom";
- this.check_customCrop.UseVisualStyleBackColor = true;
- //
- // tableLayoutPanel2
- //
- this.tableLayoutPanel2.AutoSize = true;
- this.tableLayoutPanel2.ColumnCount = 5;
- this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
- this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
- this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
- this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
- this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
- this.tableLayoutPanel2.Controls.Add(this.label7, 0, 0);
- this.tableLayoutPanel2.Controls.Add(this.lbl_src_res, 1, 0);
- this.tableLayoutPanel2.Controls.Add(this.Label55, 0, 1);
- this.tableLayoutPanel2.Controls.Add(this.text_width, 1, 1);
- this.tableLayoutPanel2.Controls.Add(this.label4, 2, 1);
- this.tableLayoutPanel2.Controls.Add(this.text_height, 3, 1);
- this.tableLayoutPanel2.Controls.Add(this.check_KeepAR, 1, 2);
- this.tableLayoutPanel2.Location = new System.Drawing.Point(16, 35);
- this.tableLayoutPanel2.Name = "tableLayoutPanel2";
- this.tableLayoutPanel2.RowCount = 3;
- this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel2.Size = new System.Drawing.Size(376, 69);
- this.tableLayoutPanel2.TabIndex = 116;
- //
- // label7
- //
- this.label7.Anchor = System.Windows.Forms.AnchorStyles.Left;
- this.label7.AutoSize = true;
- this.label7.BackColor = System.Drawing.Color.Transparent;
- this.label7.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.label7.Location = new System.Drawing.Point(0, 3);
- this.label7.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(44, 13);
- this.label7.TabIndex = 76;
- this.label7.Text = "Source:";
- //
- // lbl_src_res
- //
- this.lbl_src_res.Anchor = System.Windows.Forms.AnchorStyles.Left;
- this.lbl_src_res.AutoSize = true;
- this.lbl_src_res.BackColor = System.Drawing.Color.Transparent;
- this.lbl_src_res.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.lbl_src_res.Location = new System.Drawing.Point(50, 3);
- this.lbl_src_res.Margin = new System.Windows.Forms.Padding(3);
- this.lbl_src_res.Name = "lbl_src_res";
- this.lbl_src_res.Size = new System.Drawing.Size(15, 13);
- this.lbl_src_res.TabIndex = 77;
- this.lbl_src_res.Text = "--";
- //
- // Label55
- //
- this.Label55.Anchor = System.Windows.Forms.AnchorStyles.Left;
- this.Label55.AutoSize = true;
- this.Label55.BackColor = System.Drawing.Color.Transparent;
- this.Label55.ForeColor = System.Drawing.Color.Black;
- this.Label55.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.Label55.Location = new System.Drawing.Point(0, 26);
- this.Label55.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
- this.Label55.Name = "Label55";
- this.Label55.Size = new System.Drawing.Size(39, 13);
- this.Label55.TabIndex = 80;
- this.Label55.Text = "Width:";
- //
- // text_width
- //
- this.text_width.Location = new System.Drawing.Point(50, 22);
- this.text_width.Maximum = new decimal(new int[] {
- 1280000,
- 0,
- 0,
- 0});
- this.text_width.Name = "text_width";
- this.text_width.Size = new System.Drawing.Size(64, 21);
- this.text_width.TabIndex = 85;
- this.text_width.ValueChanged += new System.EventHandler(this.TextWidthValueChanged);
- //
- // label4
- //
- this.label4.Anchor = System.Windows.Forms.AnchorStyles.Left;
- this.label4.AutoSize = true;
- this.label4.BackColor = System.Drawing.Color.Transparent;
- this.label4.ForeColor = System.Drawing.Color.Black;
- this.label4.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.label4.Location = new System.Drawing.Point(120, 26);
- this.label4.Margin = new System.Windows.Forms.Padding(3);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(42, 13);
- this.label4.TabIndex = 84;
- this.label4.Text = "Height:";
- //
- // text_height
- //
- this.text_height.Location = new System.Drawing.Point(168, 22);
- this.text_height.Maximum = new decimal(new int[] {
- 1280000,
- 0,
- 0,
- 0});
- this.text_height.Name = "text_height";
- this.text_height.Size = new System.Drawing.Size(64, 21);
- this.text_height.TabIndex = 86;
- this.text_height.ValueChanged += new System.EventHandler(this.TextHeightValueChanged);
- //
- // check_KeepAR
- //
- this.check_KeepAR.AutoSize = true;
- this.check_KeepAR.Checked = true;
- this.check_KeepAR.CheckState = System.Windows.Forms.CheckState.Checked;
- this.tableLayoutPanel2.SetColumnSpan(this.check_KeepAR, 3);
- this.check_KeepAR.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.check_KeepAR.Location = new System.Drawing.Point(50, 49);
- this.check_KeepAR.Name = "check_KeepAR";
- this.check_KeepAR.Size = new System.Drawing.Size(114, 17);
- this.check_KeepAR.TabIndex = 95;
- this.check_KeepAR.Text = "Keep Aspect Ratio";
- this.check_KeepAR.UseVisualStyleBackColor = true;
- this.check_KeepAR.CheckedChanged += new System.EventHandler(this.CheckKeepArCheckedChanged);
- //
- // tableLayoutPanel1
- //
- this.tableLayoutPanel1.AutoSize = true;
- this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
- this.tableLayoutPanel1.ColumnCount = 2;
- this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
- this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
- this.tableLayoutPanel1.Controls.Add(this.updownParHeight, 1, 4);
- this.tableLayoutPanel1.Controls.Add(this.label6, 0, 0);
- this.tableLayoutPanel1.Controls.Add(this.labelDisplaySize, 1, 5);
- this.tableLayoutPanel1.Controls.Add(this.lbl_parHeight, 0, 4);
- this.tableLayoutPanel1.Controls.Add(this.labelStaticDisplaySize, 0, 5);
- this.tableLayoutPanel1.Controls.Add(this.updownParWidth, 1, 3);
- this.tableLayoutPanel1.Controls.Add(this.drp_anamorphic, 1, 0);
- this.tableLayoutPanel1.Controls.Add(this.lbl_parWidth, 0, 3);
- this.tableLayoutPanel1.Controls.Add(this.updownDisplayWidth, 1, 2);
- this.tableLayoutPanel1.Controls.Add(this.lbl_modulus, 0, 1);
- this.tableLayoutPanel1.Controls.Add(this.lbl_displayWidth, 0, 2);
- this.tableLayoutPanel1.Controls.Add(this.drp_modulus, 1, 1);
- this.tableLayoutPanel1.Location = new System.Drawing.Point(16, 110);
- this.tableLayoutPanel1.Name = "tableLayoutPanel1";
- this.tableLayoutPanel1.RowCount = 6;
- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel1.Size = new System.Drawing.Size(195, 154);
- this.tableLayoutPanel1.TabIndex = 115;
- //
- // updownParHeight
- //
- this.updownParHeight.Location = new System.Drawing.Point(82, 111);
- this.updownParHeight.Maximum = new decimal(new int[] {
- 1280000,
- 0,
- 0,
- 0});
- this.updownParHeight.Name = "updownParHeight";
- this.updownParHeight.Size = new System.Drawing.Size(53, 21);
- this.updownParHeight.TabIndex = 112;
- this.updownParHeight.ValueChanged += new System.EventHandler(this.TextWidthValueChanged);
- //
- // label6
- //
- this.label6.Anchor = System.Windows.Forms.AnchorStyles.Left;
- this.label6.AutoSize = true;
- this.label6.BackColor = System.Drawing.Color.Transparent;
- this.label6.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.label6.Location = new System.Drawing.Point(0, 7);
- this.label6.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(67, 13);
- this.label6.TabIndex = 81;
- this.label6.Text = "Anamorphic:";
- //
- // labelDisplaySize
- //
- this.labelDisplaySize.AutoSize = true;
- this.labelDisplaySize.BackColor = System.Drawing.Color.Transparent;
- this.labelDisplaySize.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.labelDisplaySize.Location = new System.Drawing.Point(82, 138);
- this.labelDisplaySize.Margin = new System.Windows.Forms.Padding(3);
- this.labelDisplaySize.Name = "labelDisplaySize";
- this.labelDisplaySize.Size = new System.Drawing.Size(15, 13);
- this.labelDisplaySize.TabIndex = 108;
- this.labelDisplaySize.Text = "--";
- //
- // lbl_parHeight
- //
- this.lbl_parHeight.Anchor = System.Windows.Forms.AnchorStyles.Left;
- this.lbl_parHeight.AutoSize = true;
- this.lbl_parHeight.BackColor = System.Drawing.Color.Transparent;
- this.lbl_parHeight.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.lbl_parHeight.Location = new System.Drawing.Point(0, 115);
- this.lbl_parHeight.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
- this.lbl_parHeight.Name = "lbl_parHeight";
- this.lbl_parHeight.Size = new System.Drawing.Size(65, 13);
- this.lbl_parHeight.TabIndex = 94;
- this.lbl_parHeight.Text = "PAR Height:";
- //
- // labelStaticDisplaySize
- //
- this.labelStaticDisplaySize.Anchor = System.Windows.Forms.AnchorStyles.Left;
- this.labelStaticDisplaySize.AutoSize = true;
- this.labelStaticDisplaySize.BackColor = System.Drawing.Color.Transparent;
- this.labelStaticDisplaySize.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.labelStaticDisplaySize.Location = new System.Drawing.Point(0, 138);
- this.labelStaticDisplaySize.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
- this.labelStaticDisplaySize.Name = "labelStaticDisplaySize";
- this.labelStaticDisplaySize.Size = new System.Drawing.Size(67, 13);
- this.labelStaticDisplaySize.TabIndex = 107;
- this.labelStaticDisplaySize.Text = "Display Size:";
- //
- // updownParWidth
- //
- this.updownParWidth.Location = new System.Drawing.Point(82, 84);
- this.updownParWidth.Maximum = new decimal(new int[] {
- 1280000,
- 0,
- 0,
- 0});
- this.updownParWidth.Name = "updownParWidth";
- this.updownParWidth.Size = new System.Drawing.Size(53, 21);
- this.updownParWidth.TabIndex = 111;
- this.updownParWidth.ValueChanged += new System.EventHandler(this.TextWidthValueChanged);
- //
- // drp_anamorphic
- //
- this.drp_anamorphic.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drp_anamorphic.FormattingEnabled = true;
- this.drp_anamorphic.Items.AddRange(new object[] {
- "None",
- "Strict",
- "Loose",
- "Custom"});
- this.drp_anamorphic.Location = new System.Drawing.Point(82, 3);
- this.drp_anamorphic.Name = "drp_anamorphic";
- this.drp_anamorphic.Size = new System.Drawing.Size(110, 21);
- this.drp_anamorphic.TabIndex = 82;
- this.drp_anamorphic.SelectedIndexChanged += new System.EventHandler(this.DrpAnamorphicSelectedIndexChanged);
- //
- // lbl_parWidth
- //
- this.lbl_parWidth.Anchor = System.Windows.Forms.AnchorStyles.Left;
- this.lbl_parWidth.AutoSize = true;
- this.lbl_parWidth.BackColor = System.Drawing.Color.Transparent;
- this.lbl_parWidth.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.lbl_parWidth.Location = new System.Drawing.Point(0, 88);
- this.lbl_parWidth.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
- this.lbl_parWidth.Name = "lbl_parWidth";
- this.lbl_parWidth.Size = new System.Drawing.Size(62, 13);
- this.lbl_parWidth.TabIndex = 92;
- this.lbl_parWidth.Text = "PAR Width:";
- //
- // updownDisplayWidth
- //
- this.updownDisplayWidth.Location = new System.Drawing.Point(82, 57);
- this.updownDisplayWidth.Maximum = new decimal(new int[] {
- 1280000,
- 0,
- 0,
- 0});
- this.updownDisplayWidth.Name = "updownDisplayWidth";
- this.updownDisplayWidth.Size = new System.Drawing.Size(53, 21);
- this.updownDisplayWidth.TabIndex = 110;
- this.updownDisplayWidth.ValueChanged += new System.EventHandler(this.UpdownDisplayWidthValueChanged);
- //
- // lbl_modulus
- //
- this.lbl_modulus.Anchor = System.Windows.Forms.AnchorStyles.Left;
- this.lbl_modulus.AutoSize = true;
- this.lbl_modulus.BackColor = System.Drawing.Color.Transparent;
- this.lbl_modulus.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.lbl_modulus.Location = new System.Drawing.Point(0, 34);
- this.lbl_modulus.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
- this.lbl_modulus.Name = "lbl_modulus";
- this.lbl_modulus.Size = new System.Drawing.Size(50, 13);
- this.lbl_modulus.TabIndex = 87;
- this.lbl_modulus.Text = "Modulus:";
- //
- // lbl_displayWidth
- //
- this.lbl_displayWidth.Anchor = System.Windows.Forms.AnchorStyles.Left;
- this.lbl_displayWidth.AutoSize = true;
- this.lbl_displayWidth.BackColor = System.Drawing.Color.Transparent;
- this.lbl_displayWidth.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.lbl_displayWidth.Location = new System.Drawing.Point(0, 61);
- this.lbl_displayWidth.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
- this.lbl_displayWidth.Name = "lbl_displayWidth";
- this.lbl_displayWidth.Size = new System.Drawing.Size(76, 13);
- this.lbl_displayWidth.TabIndex = 90;
- this.lbl_displayWidth.Text = "Display Width:";
- //
- // drp_modulus
- //
- this.drp_modulus.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drp_modulus.FormattingEnabled = true;
- this.drp_modulus.Items.AddRange(new object[] {
- "16",
- "8",
- "4",
- "2"});
- this.drp_modulus.Location = new System.Drawing.Point(82, 30);
- this.drp_modulus.Name = "drp_modulus";
- this.drp_modulus.Size = new System.Drawing.Size(110, 21);
- this.drp_modulus.TabIndex = 88;
- this.drp_modulus.SelectedIndexChanged += new System.EventHandler(this.DrpModulusSelectedIndexChanged);
- //
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.BackColor = System.Drawing.Color.Transparent;
- this.label8.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label8.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.label8.Location = new System.Drawing.Point(416, 13);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(57, 13);
- this.label8.TabIndex = 114;
- this.label8.Text = "Cropping";
- //
- // label26
- //
- this.label26.AutoSize = true;
- this.label26.BackColor = System.Drawing.Color.Transparent;
- this.label26.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label26.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.label26.Location = new System.Drawing.Point(13, 13);
- this.label26.Name = "label26";
- this.label26.Size = new System.Drawing.Size(30, 13);
- this.label26.TabIndex = 113;
- this.label26.Text = "Size";
- //
- // lbl_presetCropWarning
- //
- this.lbl_presetCropWarning.AutoSize = true;
- this.lbl_presetCropWarning.ForeColor = System.Drawing.Color.Black;
- this.lbl_presetCropWarning.Location = new System.Drawing.Point(479, 13);
- this.lbl_presetCropWarning.Name = "lbl_presetCropWarning";
- this.lbl_presetCropWarning.Size = new System.Drawing.Size(140, 13);
- this.lbl_presetCropWarning.TabIndex = 118;
- this.lbl_presetCropWarning.Text = "( Preset values are in use! )";
- //
- // PictureSettings
- //
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
- this.BackColor = System.Drawing.Color.Transparent;
- this.Controls.Add(this.lbl_presetCropWarning);
- this.Controls.Add(this.tableLayoutPanel3);
- this.Controls.Add(this.tableLayoutPanel2);
- this.Controls.Add(this.tableLayoutPanel1);
- this.Controls.Add(this.label8);
- this.Controls.Add(this.label26);
- this.Enabled = false;
- this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Name = "PictureSettings";
- this.Size = new System.Drawing.Size(666, 279);
- this.tableLayoutPanel3.ResumeLayout(false);
- this.tableLayoutPanel3.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.crop_left)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.crop_right)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.crop_top)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.crop_bottom)).EndInit();
- this.tableLayoutPanel2.ResumeLayout(false);
- this.tableLayoutPanel2.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.text_width)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.text_height)).EndInit();
- this.tableLayoutPanel1.ResumeLayout(false);
- this.tableLayoutPanel1.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.updownParHeight)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.updownParWidth)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.updownDisplayWidth)).EndInit();
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
- internal System.Windows.Forms.Label Label15;
- internal System.Windows.Forms.NumericUpDown crop_left;
- internal System.Windows.Forms.NumericUpDown crop_right;
- internal System.Windows.Forms.RadioButton check_autoCrop;
- internal System.Windows.Forms.Label Label51;
- internal System.Windows.Forms.NumericUpDown crop_top;
- internal System.Windows.Forms.Label Label53;
- internal System.Windows.Forms.Label Label52;
- internal System.Windows.Forms.NumericUpDown crop_bottom;
- internal System.Windows.Forms.RadioButton check_customCrop;
- private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
- internal System.Windows.Forms.Label label7;
- internal System.Windows.Forms.Label lbl_src_res;
- internal System.Windows.Forms.Label Label55;
- internal System.Windows.Forms.Label label4;
- internal System.Windows.Forms.CheckBox check_KeepAR;
- private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
- internal System.Windows.Forms.NumericUpDown updownParHeight;
- internal System.Windows.Forms.Label label6;
- internal System.Windows.Forms.Label labelDisplaySize;
- internal System.Windows.Forms.Label lbl_parHeight;
- internal System.Windows.Forms.Label labelStaticDisplaySize;
- internal System.Windows.Forms.NumericUpDown updownParWidth;
- internal System.Windows.Forms.ComboBox drp_anamorphic;
- internal System.Windows.Forms.Label lbl_parWidth;
- internal System.Windows.Forms.NumericUpDown updownDisplayWidth;
- internal System.Windows.Forms.Label lbl_modulus;
- internal System.Windows.Forms.Label lbl_displayWidth;
- internal System.Windows.Forms.ComboBox drp_modulus;
- internal System.Windows.Forms.Label label8;
- internal System.Windows.Forms.Label label26;
- internal System.Windows.Forms.NumericUpDown text_width;
- internal System.Windows.Forms.NumericUpDown text_height;
- private System.Windows.Forms.Label lbl_presetCropWarning;
-
-
-
- }
-}
diff --git a/win/C#/Controls/PictureSettings.cs b/win/C#/Controls/PictureSettings.cs deleted file mode 100644 index c4ae909c0..000000000 --- a/win/C#/Controls/PictureSettings.cs +++ /dev/null @@ -1,547 +0,0 @@ -/* PictureSetting.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
-
-namespace Handbrake.Controls
-{
- using System;
- using System.Drawing;
- using System.Globalization;
- using System.Windows.Forms;
-
- using HandBrake.ApplicationServices.Model;
- using HandBrake.ApplicationServices.Parsing;
-
- /// <summary>
- /// The Picture Settings Panel
- /// </summary>
- public partial class PictureSettings : UserControl
- {
- private readonly CultureInfo culture = new CultureInfo("en-US", false);
- private bool preventChangingWidth;
- private bool preventChangingHeight;
- private bool preventChangingCustom;
- private bool preventChangingDisplayWidth;
- private double cachedDar;
- private Title sourceTitle;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="PictureSettings"/> class.
- /// Creates a new instance of the Picture Settings Class
- /// </summary>
- public PictureSettings()
- {
- InitializeComponent();
-
- drp_anamorphic.SelectedIndex = 1;
- drp_modulus.SelectedIndex = 0;
- }
-
- /// <summary>
- /// Picture Settings Changed Event Handler
- /// </summary>
- public event EventHandler PictureSettingsChanged;
-
- /// <summary>
- /// Gets or sets the source media used by this control.
- /// </summary>
- public Title Source
- {
- private get
- {
- return sourceTitle;
- }
-
- set
- {
- sourceTitle = value;
- Enabled = sourceTitle != null;
- NewSourceSet();
- }
- }
-
- /// <summary>
- /// Gets or sets the currently selected preset.
- /// </summary>
- public Preset CurrentlySelectedPreset { get; set; }
-
- /// <summary>
- /// Gets or sets the maximum allowable size for the encoded resolution. Set a value to
- /// "0" if the maximum does not matter.
- /// </summary>
- public Size PresetMaximumResolution { get; set; }
-
- /// <summary>
- /// Set the Preset Crop Warning Label
- /// </summary>
- /// <param name="selectedPreset">
- /// The Selected preset
- /// </param>
- public void SetPresetCropWarningLabel(Preset selectedPreset)
- {
- if (this.check_customCrop.Checked)
- {
- lbl_presetCropWarning.Visible = true;
- if (selectedPreset != null && selectedPreset.CropSettings == false) lbl_presetCropWarning.Visible = false;
- else if (selectedPreset == null) lbl_presetCropWarning.Visible = false;
- }
- else
- {
- lbl_presetCropWarning.Visible = false;
- }
- }
-
- /// <summary>
- /// Setup the UI. The Source has just changed.
- /// </summary>
- private void NewSourceSet()
- {
- // Set the Aspect Ratio
- lbl_src_res.Text = sourceTitle.Resolution.Width + " x " + sourceTitle.Resolution.Height;
-
- // Set the Recommended Cropping values, but only if a preset doesn't have hard set picture settings.
- if ((CurrentlySelectedPreset != null && CurrentlySelectedPreset.CropSettings == false) || CurrentlySelectedPreset == null)
- {
- crop_top.Value = GetCropMod2Clean(sourceTitle.AutoCropDimensions.Top);
- crop_bottom.Value = GetCropMod2Clean(sourceTitle.AutoCropDimensions.Bottom);
- crop_left.Value = GetCropMod2Clean(sourceTitle.AutoCropDimensions.Left);
- crop_right.Value = GetCropMod2Clean(sourceTitle.AutoCropDimensions.Right);
- }
-
- SetPresetCropWarningLabel(CurrentlySelectedPreset);
-
- // Set the Resolution Boxes
- if (drp_anamorphic.SelectedIndex == 0)
- {
- int width = sourceTitle.Resolution.Width;
-
- if (width > PresetMaximumResolution.Width && PresetMaximumResolution.Width != 0) // If the preset has a Max width set, don't use a width larger than it.
- width = PresetMaximumResolution.Width;
-
- if (text_width.Value == 0 || (text_width.Value > PresetMaximumResolution.Width && PresetMaximumResolution.Width != 0)) // Only update the values if the fields don't already have values.
- text_width.Value = width;
-
- check_KeepAR.Checked = true; // Forces Resolution to be correct.
- }
- else
- {
- int width = sourceTitle.Resolution.Width;
- if (width > PresetMaximumResolution.Width && PresetMaximumResolution.Width != 0) // If the preset has a Max width set, don't use a width larger than it.
- width = PresetMaximumResolution.Width;
-
- int height = sourceTitle.Resolution.Height;
- if (height > PresetMaximumResolution.Height && PresetMaximumResolution.Height != 0) // If the preset has a Max height set, don't use a width larger than it.
- height = PresetMaximumResolution.Height;
-
- text_width.Value = width;
- text_height.Value = height - (int)crop_top.Value - (int)crop_bottom.Value;
-
- labelDisplaySize.Text = CalculateAnamorphicSizes().Width + "x" + CalculateAnamorphicSizes().Height;
- }
-
- updownParWidth.Value = sourceTitle.ParVal.Width;
- updownParHeight.Value = sourceTitle.ParVal.Height;
-
- Size croppedDar = CalculateAnamorphicSizes();
- cachedDar = (double)croppedDar.Width / croppedDar.Height;
- updownDisplayWidth.Value = croppedDar.Width;
- }
-
- // Picture Controls
- private void TextWidthValueChanged(object sender, EventArgs e)
- {
- if (preventChangingWidth)
- return;
-
- // Make sure the new value doesn't exceed the maximum
- if (Source != null)
- if (text_width.Value > Source.Resolution.Width)
- text_width.Value = Source.Resolution.Width;
-
- switch (drp_anamorphic.SelectedIndex)
- {
- case 0:
- if (check_KeepAR.Checked && Source != null)
- {
- preventChangingHeight = true;
-
- int width = (int)text_width.Value;
-
- double crop_width = Source.Resolution.Width - (int)crop_left.Value - (int)crop_right.Value;
- double crop_height = Source.Resolution.Height - (int)crop_top.Value - (int)crop_bottom.Value;
-
- if (SourceAspect.Width == 0 && SourceAspect.Height == 0)
- break;
-
- double newHeight = ((double)width * Source.Resolution.Width * SourceAspect.Height * crop_height) /
- (Source.Resolution.Height * SourceAspect.Width * crop_width);
- text_height.Value = (decimal)GetModulusValue(newHeight);
-
- preventChangingHeight = false;
- }
- break;
- case 3:
- if (check_KeepAR.CheckState == CheckState.Unchecked && Source != null)
- {
- if (preventChangingCustom)
- break;
-
- preventChangingDisplayWidth = true;
- updownDisplayWidth.Value = text_width.Value * updownParWidth.Value / updownParHeight.Value;
- preventChangingDisplayWidth = false;
-
- labelDisplaySize.Text = Math.Truncate(updownDisplayWidth.Value) + "x" + text_height.Value;
- }
-
- if (check_KeepAR.CheckState == CheckState.Checked && Source != null)
- {
- updownParWidth.Value = updownDisplayWidth.Value;
- updownParHeight.Value = text_width.Value;
- }
- break;
- default:
- labelDisplaySize.Text = CalculateAnamorphicSizes().Width + "x" + CalculateAnamorphicSizes().Height;
- break;
- }
-
- preventChangingWidth = false;
- }
-
- private void TextHeightValueChanged(object sender, EventArgs e)
- {
- if (preventChangingHeight)
- return;
-
- if (Source != null)
- if (text_height.Value > Source.Resolution.Height)
- text_height.Value = Source.Resolution.Height;
-
- switch (drp_anamorphic.SelectedIndex)
- {
- case 0:
- if (check_KeepAR.Checked && Source != null)
- {
- preventChangingWidth = true;
-
- double crop_width = Source.Resolution.Width - (int)crop_left.Value - (int)crop_right.Value;
- double crop_height = Source.Resolution.Height - (int)crop_top.Value - (int)crop_bottom.Value;
-
- double new_width = ((double)text_height.Value * Source.Resolution.Height * SourceAspect.Width *
- crop_width) /
- (Source.Resolution.Width * SourceAspect.Height * crop_height);
-
- text_width.Value = (decimal)GetModulusValue(new_width);
-
- preventChangingWidth = false;
- }
- break;
- case 3:
- labelDisplaySize.Text = Math.Truncate(updownDisplayWidth.Value) + "x" + text_height.Value;
-
- if (check_KeepAR.CheckState == CheckState.Checked && Source != null)
- {
- // - Changes DISPLAY WIDTH to keep DAR
- // - Changes PIXEL WIDTH to new DISPLAY WIDTH
- // - Changes PIXEL HEIGHT to STORAGE WIDTH
- // DAR = DISPLAY WIDTH / DISPLAY HEIGHT (cache after every modification)
-
- double rawCalculatedDisplayWidth = (double)text_height.Value * cachedDar;
-
- preventChangingDisplayWidth = true; // Start Guards
- preventChangingWidth = true;
-
- updownDisplayWidth.Value = (decimal)rawCalculatedDisplayWidth;
- updownParWidth.Value = updownDisplayWidth.Value;
- updownParHeight.Value = text_width.Value;
-
- preventChangingWidth = false; // Reset Guards
- preventChangingDisplayWidth = false;
- }
-
- break;
- default:
- labelDisplaySize.Text = CalculateAnamorphicSizes().Width + "x" + CalculateAnamorphicSizes().Height;
- break;
- }
-
- preventChangingHeight = false;
- }
-
- private void CheckKeepArCheckedChanged(object sender, EventArgs e)
- {
- // Force TextWidth to recalc height
- if (check_KeepAR.Checked)
- TextWidthValueChanged(this, new EventArgs());
-
- // Disable the Custom Anamorphic Par Controls if checked.
- if (drp_anamorphic.SelectedIndex == 3)
- {
- updownParWidth.Enabled = !check_KeepAR.Checked;
- updownParHeight.Enabled = !check_KeepAR.Checked;
- }
-
- // Raise the Picture Settings Changed Event
- if (PictureSettingsChanged != null)
- PictureSettingsChanged(this, new EventArgs());
- }
-
- private void UpdownDisplayWidthValueChanged(object sender, EventArgs e)
- {
- if (preventChangingDisplayWidth == false && check_KeepAR.CheckState == CheckState.Unchecked)
- {
- preventChangingCustom = true;
- updownParWidth.Value = updownDisplayWidth.Value;
- updownParHeight.Value = text_width.Value;
- preventChangingCustom = false;
- }
-
- if (preventChangingDisplayWidth == false && check_KeepAR.CheckState == CheckState.Checked)
- {
- // - Changes HEIGHT to keep DAR
- // - Changes PIXEL WIDTH to new DISPLAY WIDTH
- // - Changes PIXEL HEIGHT to STORAGE WIDTH
- // DAR = DISPLAY WIDTH / DISPLAY HEIGHT (cache after every modification)
-
- // Calculate new Height Value
- int modulus;
- if (!int.TryParse(drp_modulus.SelectedItem.ToString(), out modulus))
- modulus = 16;
-
- int rawCalculatedHeight = (int)((int)updownDisplayWidth.Value / cachedDar);
- int modulusHeight = rawCalculatedHeight - (rawCalculatedHeight % modulus);
-
- // Update value
- preventChangingHeight = true;
- text_height.Value = (decimal)modulusHeight;
- updownParWidth.Value = updownDisplayWidth.Value;
- updownParHeight.Value = text_width.Value;
- preventChangingHeight = false;
- }
- }
-
- // Anamorphic Controls
- private void DrpAnamorphicSelectedIndexChanged(object sender, EventArgs e)
- {
- switch (drp_anamorphic.SelectedIndex)
- {
- case 0: // None
- text_width.Enabled = true;
- text_height.Enabled = true;
- check_KeepAR.Enabled = true;
-
- SetCustomAnamorphicOptionsVisible(false);
- labelStaticDisplaySize.Visible = false;
- labelDisplaySize.Visible = false;
- drp_modulus.Visible = true;
- lbl_modulus.Visible = true;
-
- // check_KeepAR.Checked = true;
-
- if (check_KeepAR.Checked)
- TextWidthValueChanged(this, new EventArgs());
- // Don't update display size if we're not using anamorphic
- return;
- case 1: // Strict
- text_width.Enabled = false;
- text_height.Enabled = false;
- check_KeepAR.Enabled = false;
-
- SetCustomAnamorphicOptionsVisible(false);
- labelStaticDisplaySize.Visible = true;
- labelDisplaySize.Visible = true;
-
- check_KeepAR.Checked = true;
- break;
- case 2: // Loose
- text_width.Enabled = true;
- text_height.Enabled = false;
- check_KeepAR.Enabled = false;
-
- SetCustomAnamorphicOptionsVisible(false);
- labelStaticDisplaySize.Visible = true;
- labelDisplaySize.Visible = true;
- drp_modulus.Visible = true;
- lbl_modulus.Visible = true;
-
- check_KeepAR.Checked = true;
- break;
- case 3: // Custom
- text_width.Enabled = true;
- text_height.Enabled = true;
- check_KeepAR.Enabled = true;
-
- SetCustomAnamorphicOptionsVisible(true);
- labelStaticDisplaySize.Visible = true;
- labelDisplaySize.Visible = true;
-
- check_KeepAR.Checked = true;
- updownParWidth.Enabled = !check_KeepAR.Checked;
- updownParHeight.Enabled = !check_KeepAR.Checked;
- break;
- }
-
- labelDisplaySize.Text = CalculateAnamorphicSizes().Width + "x" + CalculateAnamorphicSizes().Height;
-
- if (check_KeepAR.Checked)
- TextWidthValueChanged(this, new EventArgs());
-
- if (PictureSettingsChanged != null)
- PictureSettingsChanged(this, new EventArgs());
- }
-
- private void DrpModulusSelectedIndexChanged(object sender, EventArgs e)
- {
- preventChangingWidth = true;
- preventChangingHeight = true;
-
- text_width.Value = (decimal)GetModulusValue((double)text_width.Value);
- text_height.Value = (decimal)GetModulusValue((double)text_height.Value);
-
- preventChangingWidth = false;
- preventChangingHeight = false;
-
- text_width.Increment = int.Parse(drp_modulus.SelectedItem.ToString());
- text_height.Increment = int.Parse(drp_modulus.SelectedItem.ToString());
-
- if (PictureSettingsChanged != null)
- PictureSettingsChanged(this, new EventArgs());
- }
-
- // Cropping Controls
- private void CheckAutoCropCheckedChanged(object sender, EventArgs e)
- {
- crop_top.Enabled = check_customCrop.Checked;
- crop_bottom.Enabled = check_customCrop.Checked;
- crop_left.Enabled = check_customCrop.Checked;
- crop_right.Enabled = check_customCrop.Checked;
-
- if (Source != null)
- {
- crop_top.Value = Source.AutoCropDimensions.Top;
- crop_bottom.Value = Source.AutoCropDimensions.Bottom;
- crop_left.Value = Source.AutoCropDimensions.Left;
- crop_right.Value = Source.AutoCropDimensions.Right;
- }
- }
-
- private void CropValueChanged(object sender, EventArgs e)
- {
- TextWidthValueChanged(this, new EventArgs());
- }
-
- // GUI Functions
- private void SetCustomAnamorphicOptionsVisible(bool visible)
- {
- lbl_modulus.Visible = visible;
- lbl_displayWidth.Visible = visible;
- lbl_parWidth.Visible = visible;
- lbl_parHeight.Visible = visible;
-
- drp_modulus.Visible = visible;
- updownDisplayWidth.Visible = visible;
- updownParWidth.Visible = visible;
- updownParHeight.Visible = visible;
- }
-
- // Calculation Functions
- private Size SourceAspect
- {
- get
- {
- if (Source != null) // display aspect = (width * par_width) / (height * par_height)
- return new Size((Source.ParVal.Width * Source.Resolution.Width),
- (Source.ParVal.Height * Source.Resolution.Height));
-
- return new Size(0, 0); // Fall over to 16:9 and hope for the best
- }
- }
-
- private Size CalculateAnamorphicSizes()
- {
- if (Source != null)
- {
- /* Set up some variables to make the math easier to follow. */
- int croppedWidth = Source.Resolution.Width - (int)crop_left.Value - (int)crop_right.Value;
- int croppedHeight = Source.Resolution.Height - (int)crop_top.Value - (int)crop_bottom.Value;
- double storageAspect = (double)croppedWidth / croppedHeight;
-
- /* Figure out what width the source would display at. */
- double sourceDisplayWidth = (double)croppedWidth * Source.ParVal.Width / Source.ParVal.Height;
-
- /*
- 3 different ways of deciding output dimensions:
- - 1: Strict anamorphic, preserve source dimensions
- - 2: Loose anamorphic, round to mod16 and preserve storage aspect ratio
- - 3: Power user anamorphic, specify everything
- */
- double width, height;
- switch (drp_anamorphic.SelectedIndex)
- {
- default:
- case 1:
- /* Strict anamorphic */
- double displayWidth = ((double)croppedWidth * Source.ParVal.Width / Source.ParVal.Height);
- displayWidth = Math.Round(displayWidth, 0);
- Size output = new Size((int)displayWidth, croppedHeight);
- return output;
- case 2:
- /* "Loose" anamorphic.
- - Uses mod16-compliant dimensions,
- - Allows users to set the width
- */
- width = (int)text_width.Value;
- width = GetModulusValue(width); /* Time to get picture width that divide cleanly.*/
-
- height = (width / storageAspect) + 0.5;
- height = GetModulusValue(height); /* Time to get picture height that divide cleanly.*/
-
- /* The film AR is the source's display width / cropped source height.
- The output display width is the output height * film AR.
- The output PAR is the output display width / output storage width. */
- double pixelAspectWidth = height * sourceDisplayWidth / croppedHeight;
- double pixelAspectHeight = width;
-
- double disWidthLoose = (width * pixelAspectWidth / pixelAspectHeight);
- if (double.IsNaN(disWidthLoose))
- disWidthLoose = 0;
- return new Size((int)disWidthLoose, (int)height);
- case 3:
-
- // Get the User Interface Values
- double UIdisplayWidth;
- double.TryParse(updownDisplayWidth.Text, out UIdisplayWidth);
-
- /* Anamorphic 3: Power User Jamboree - Set everything based on specified values */
- height = GetModulusValue((double)text_height.Value);
-
- if (check_KeepAR.Checked)
- return new Size((int)Math.Truncate(UIdisplayWidth), (int)height);
-
- return new Size((int)Math.Truncate(UIdisplayWidth), (int)height);
- }
- }
-
- // Return a default value of 0,0 to indicate failure
- return new Size(0, 0);
- }
-
- private double GetModulusValue(double value)
- {
- int mod = int.Parse(drp_modulus.SelectedItem.ToString());
- double remainder = value % mod;
-
- if (remainder == 0)
- return value;
-
- return remainder >= ((double)mod / 2) ? value + (mod - remainder) : value - remainder;
- }
-
- private static int GetCropMod2Clean(int value)
- {
- int remainder = value % 2;
- if (remainder == 0) return value;
- return (value + remainder);
- }
- }
-}
\ No newline at end of file diff --git a/win/C#/Controls/PictureSettings.resx b/win/C#/Controls/PictureSettings.resx deleted file mode 100644 index c7e0d4bdf..000000000 --- a/win/C#/Controls/PictureSettings.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root>
\ No newline at end of file diff --git a/win/C#/Controls/Subtitles.Designer.cs b/win/C#/Controls/Subtitles.Designer.cs deleted file mode 100644 index b38b6e4d5..000000000 --- a/win/C#/Controls/Subtitles.Designer.cs +++ /dev/null @@ -1,487 +0,0 @@ -namespace Handbrake.Controls
-{
- partial class Subtitles
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Component Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- this.btn_addTrack = new System.Windows.Forms.Button();
- this.btn_RemoveSubTrack = new System.Windows.Forms.Button();
- this.lv_subList = new System.Windows.Forms.ListView();
- this.col_Source = new System.Windows.Forms.ColumnHeader();
- this.col_forced = new System.Windows.Forms.ColumnHeader();
- this.col_burned = new System.Windows.Forms.ColumnHeader();
- this.col_defaultTrack = new System.Windows.Forms.ColumnHeader();
- this.col_srtLang = new System.Windows.Forms.ColumnHeader();
- this.col_srtChar = new System.Windows.Forms.ColumnHeader();
- this.col_srtOffset = new System.Windows.Forms.ColumnHeader();
- this.subMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
- this.mnu_moveup = new System.Windows.Forms.ToolStripMenuItem();
- this.mnu_movedown = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
- this.mnu_remove = new System.Windows.Forms.ToolStripMenuItem();
- this.label68 = new System.Windows.Forms.Label();
- this.SubGroupBox = new System.Windows.Forms.GroupBox();
- this.drp_subtitleTracks = new System.Windows.Forms.ComboBox();
- this.label10 = new System.Windows.Forms.Label();
- this.label9 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.srt_offset = new System.Windows.Forms.NumericUpDown();
- this.srt_lang = new System.Windows.Forms.ComboBox();
- this.label8 = new System.Windows.Forms.Label();
- this.srt_charcode = new System.Windows.Forms.ComboBox();
- this.label4 = new System.Windows.Forms.Label();
- this.check_forced = new System.Windows.Forms.CheckBox();
- this.label7 = new System.Windows.Forms.Label();
- this.label3 = new System.Windows.Forms.Label();
- this.check_default = new System.Windows.Forms.CheckBox();
- this.check_burned = new System.Windows.Forms.CheckBox();
- this.btn_srtAdd = new System.Windows.Forms.Button();
- this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
- this.toolTip = new System.Windows.Forms.ToolTip(this.components);
- this.subMenu.SuspendLayout();
- this.SubGroupBox.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.srt_offset)).BeginInit();
- this.SuspendLayout();
- //
- // btn_addTrack
- //
- this.btn_addTrack.BackColor = System.Drawing.Color.Transparent;
- this.btn_addTrack.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.btn_addTrack.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_addTrack.Location = new System.Drawing.Point(16, 38);
- this.btn_addTrack.Name = "btn_addTrack";
- this.btn_addTrack.Size = new System.Drawing.Size(57, 23);
- this.btn_addTrack.TabIndex = 68;
- this.btn_addTrack.Text = "Add";
- this.toolTip.SetToolTip(this.btn_addTrack, "Add a new subtitle track to the list below");
- this.btn_addTrack.UseVisualStyleBackColor = false;
- this.btn_addTrack.Click += new System.EventHandler(this.BtnAddSubTrackClick);
- //
- // btn_RemoveSubTrack
- //
- this.btn_RemoveSubTrack.BackColor = System.Drawing.Color.Transparent;
- this.btn_RemoveSubTrack.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.btn_RemoveSubTrack.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_RemoveSubTrack.Location = new System.Drawing.Point(79, 38);
- this.btn_RemoveSubTrack.Name = "btn_RemoveSubTrack";
- this.btn_RemoveSubTrack.Size = new System.Drawing.Size(73, 23);
- this.btn_RemoveSubTrack.TabIndex = 69;
- this.btn_RemoveSubTrack.Text = "Remove";
- this.btn_RemoveSubTrack.UseVisualStyleBackColor = false;
- this.btn_RemoveSubTrack.Click += new System.EventHandler(this.BtnRemoveSubTrackClick);
- //
- // lv_subList
- //
- this.lv_subList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
- this.col_Source,
- this.col_forced,
- this.col_burned,
- this.col_defaultTrack,
- this.col_srtLang,
- this.col_srtChar,
- this.col_srtOffset});
- this.lv_subList.ContextMenuStrip = this.subMenu;
- this.lv_subList.FullRowSelect = true;
- this.lv_subList.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
- this.lv_subList.HideSelection = false;
- this.lv_subList.LabelWrap = false;
- this.lv_subList.Location = new System.Drawing.Point(16, 146);
- this.lv_subList.MultiSelect = false;
- this.lv_subList.Name = "lv_subList";
- this.lv_subList.Size = new System.Drawing.Size(688, 137);
- this.lv_subList.TabIndex = 70;
- this.lv_subList.UseCompatibleStateImageBehavior = false;
- this.lv_subList.View = System.Windows.Forms.View.Details;
- this.lv_subList.SelectedIndexChanged += new System.EventHandler(this.LbSubListSelectedIndexChanged);
- //
- // col_Source
- //
- this.col_Source.Text = "Track";
- this.col_Source.Width = 139;
- //
- // col_forced
- //
- this.col_forced.Text = "Forced Only";
- this.col_forced.Width = 74;
- //
- // col_burned
- //
- this.col_burned.Text = "Burned In";
- this.col_burned.Width = 64;
- //
- // col_defaultTrack
- //
- this.col_defaultTrack.Text = "Default";
- this.col_defaultTrack.Width = 56;
- //
- // col_srtLang
- //
- this.col_srtLang.Text = "Srt Lang";
- //
- // col_srtChar
- //
- this.col_srtChar.Text = "Srt CharCode";
- this.col_srtChar.Width = 110;
- //
- // col_srtOffset
- //
- this.col_srtOffset.Text = "Srt Offset";
- this.col_srtOffset.Width = 70;
- //
- // subMenu
- //
- this.subMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.mnu_moveup,
- this.mnu_movedown,
- this.toolStripSeparator2,
- this.mnu_remove});
- this.subMenu.Name = "audioMenu";
- this.subMenu.Size = new System.Drawing.Size(139, 76);
- //
- // mnu_moveup
- //
- this.mnu_moveup.Name = "mnu_moveup";
- this.mnu_moveup.Size = new System.Drawing.Size(138, 22);
- this.mnu_moveup.Text = "Move Up";
- this.mnu_moveup.Click += new System.EventHandler(this.MnuMoveupClick);
- //
- // mnu_movedown
- //
- this.mnu_movedown.Name = "mnu_movedown";
- this.mnu_movedown.Size = new System.Drawing.Size(138, 22);
- this.mnu_movedown.Text = "Move Down";
- this.mnu_movedown.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.mnu_movedown.Click += new System.EventHandler(this.MnuMovedownClick);
- //
- // toolStripSeparator2
- //
- this.toolStripSeparator2.Name = "toolStripSeparator2";
- this.toolStripSeparator2.Size = new System.Drawing.Size(135, 6);
- //
- // mnu_remove
- //
- this.mnu_remove.Name = "mnu_remove";
- this.mnu_remove.Size = new System.Drawing.Size(138, 22);
- this.mnu_remove.Text = "Remove";
- this.mnu_remove.Click += new System.EventHandler(this.MnuRemoveClick);
- //
- // label68
- //
- this.label68.AutoSize = true;
- this.label68.BackColor = System.Drawing.Color.Transparent;
- this.label68.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label68.Location = new System.Drawing.Point(13, 13);
- this.label68.Name = "label68";
- this.label68.Size = new System.Drawing.Size(57, 13);
- this.label68.TabIndex = 67;
- this.label68.Text = "Subtitles";
- //
- // SubGroupBox
- //
- this.SubGroupBox.BackColor = System.Drawing.Color.Transparent;
- this.SubGroupBox.Controls.Add(this.drp_subtitleTracks);
- this.SubGroupBox.Controls.Add(this.label10);
- this.SubGroupBox.Controls.Add(this.label9);
- this.SubGroupBox.Controls.Add(this.label2);
- this.SubGroupBox.Controls.Add(this.srt_offset);
- this.SubGroupBox.Controls.Add(this.srt_lang);
- this.SubGroupBox.Controls.Add(this.label8);
- this.SubGroupBox.Controls.Add(this.srt_charcode);
- this.SubGroupBox.Controls.Add(this.label4);
- this.SubGroupBox.Controls.Add(this.check_forced);
- this.SubGroupBox.Controls.Add(this.label7);
- this.SubGroupBox.Controls.Add(this.label3);
- this.SubGroupBox.Controls.Add(this.check_default);
- this.SubGroupBox.Controls.Add(this.check_burned);
- this.SubGroupBox.Location = new System.Drawing.Point(16, 67);
- this.SubGroupBox.Name = "SubGroupBox";
- this.SubGroupBox.Size = new System.Drawing.Size(688, 73);
- this.SubGroupBox.TabIndex = 72;
- this.SubGroupBox.TabStop = false;
- this.SubGroupBox.Text = "Selected Track: New Track";
- //
- // drp_subtitleTracks
- //
- this.drp_subtitleTracks.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drp_subtitleTracks.FormattingEnabled = true;
- this.drp_subtitleTracks.Location = new System.Drawing.Point(6, 35);
- this.drp_subtitleTracks.Name = "drp_subtitleTracks";
- this.drp_subtitleTracks.Size = new System.Drawing.Size(164, 21);
- this.drp_subtitleTracks.TabIndex = 74;
- this.drp_subtitleTracks.SelectedIndexChanged += new System.EventHandler(this.DrpSubtitleTracksSelectedIndexChanged);
- //
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.Location = new System.Drawing.Point(308, 19);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(42, 13);
- this.label10.TabIndex = 81;
- this.label10.Text = "Default";
- //
- // label9
- //
- this.label9.AutoSize = true;
- this.label9.Location = new System.Drawing.Point(248, 19);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(54, 13);
- this.label9.TabIndex = 80;
- this.label9.Text = "Burned In";
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(371, 19);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(71, 13);
- this.label2.TabIndex = 72;
- this.label2.Text = "Srt Language";
- //
- // srt_offset
- //
- this.srt_offset.Enabled = false;
- this.srt_offset.Increment = new decimal(new int[] {
- 10,
- 0,
- 0,
- 0});
- this.srt_offset.Location = new System.Drawing.Point(549, 35);
- this.srt_offset.Maximum = new decimal(new int[] {
- 1000000000,
- 0,
- 0,
- 0});
- this.srt_offset.Minimum = new decimal(new int[] {
- 1000000000,
- 0,
- 0,
- -2147483648});
- this.srt_offset.Name = "srt_offset";
- this.srt_offset.Size = new System.Drawing.Size(58, 21);
- this.srt_offset.TabIndex = 79;
- this.srt_offset.ValueChanged += new System.EventHandler(this.SrtOffsetValueChanged);
- //
- // srt_lang
- //
- this.srt_lang.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.srt_lang.Enabled = false;
- this.srt_lang.FormattingEnabled = true;
- this.srt_lang.Location = new System.Drawing.Point(356, 35);
- this.srt_lang.Name = "srt_lang";
- this.srt_lang.Size = new System.Drawing.Size(103, 21);
- this.srt_lang.TabIndex = 50;
- this.srt_lang.SelectedIndexChanged += new System.EventHandler(this.SrtLangSelectedIndexChanged);
- //
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.Location = new System.Drawing.Point(177, 19);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(65, 13);
- this.label8.TabIndex = 79;
- this.label8.Text = "Forced Only";
- //
- // srt_charcode
- //
- this.srt_charcode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.srt_charcode.Enabled = false;
- this.srt_charcode.FormattingEnabled = true;
- this.srt_charcode.Items.AddRange(new object[] {
- "ANSI_X3.4-1968",
- "ANSI_X3.4-1986",
- "ANSI_X3.4",
- "ANSI_X3.110-1983",
- "ANSI_X3.110",
- "ASCII",
- "ECMA-114",
- "ECMA-118",
- "ECMA-128",
- "ECMA-CYRILLIC",
- "IEC_P27-1",
- "ISO-8859-1",
- "ISO-8859-2",
- "ISO-8859-3",
- "ISO-8859-4",
- "ISO-8859-5",
- "ISO-8859-6",
- "ISO-8859-7",
- "ISO-8859-8",
- "ISO-8859-9",
- "ISO-8859-9E",
- "ISO-8859-10",
- "ISO-8859-11",
- "ISO-8859-13",
- "ISO-8859-14",
- "ISO-8859-15",
- "ISO-8859-16",
- "UTF-7",
- "UTF-8",
- "UTF-16",
- "UTF-32"});
- this.srt_charcode.Location = new System.Drawing.Point(465, 35);
- this.srt_charcode.Name = "srt_charcode";
- this.srt_charcode.Size = new System.Drawing.Size(78, 21);
- this.srt_charcode.TabIndex = 73;
- this.srt_charcode.SelectedIndexChanged += new System.EventHandler(this.SrtCharcodeSelectedIndexChanged);
- //
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(548, 19);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(62, 13);
- this.label4.TabIndex = 76;
- this.label4.Text = "Offset (ms)";
- //
- // check_forced
- //
- this.check_forced.AutoSize = true;
- this.check_forced.Location = new System.Drawing.Point(199, 38);
- this.check_forced.Name = "check_forced";
- this.check_forced.Size = new System.Drawing.Size(15, 14);
- this.check_forced.TabIndex = 75;
- this.check_forced.UseVisualStyleBackColor = true;
- this.check_forced.CheckedChanged += new System.EventHandler(this.CheckForcedCheckedChanged);
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.Location = new System.Drawing.Point(69, 19);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(37, 13);
- this.label7.TabIndex = 78;
- this.label7.Text = "Track:";
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(471, 19);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(58, 13);
- this.label3.TabIndex = 74;
- this.label3.Text = "Char Code";
- //
- // check_default
- //
- this.check_default.AutoSize = true;
- this.check_default.Location = new System.Drawing.Point(320, 38);
- this.check_default.Name = "check_default";
- this.check_default.Size = new System.Drawing.Size(15, 14);
- this.check_default.TabIndex = 77;
- this.check_default.UseVisualStyleBackColor = true;
- this.check_default.CheckedChanged += new System.EventHandler(this.CheckDefaultCheckedChanged);
- //
- // check_burned
- //
- this.check_burned.AutoSize = true;
- this.check_burned.Location = new System.Drawing.Point(260, 38);
- this.check_burned.Name = "check_burned";
- this.check_burned.Size = new System.Drawing.Size(15, 14);
- this.check_burned.TabIndex = 76;
- this.check_burned.UseVisualStyleBackColor = true;
- this.check_burned.CheckedChanged += new System.EventHandler(this.CheckBurnedCheckedChanged);
- //
- // btn_srtAdd
- //
- this.btn_srtAdd.BackColor = System.Drawing.Color.Transparent;
- this.btn_srtAdd.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.btn_srtAdd.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_srtAdd.Location = new System.Drawing.Point(158, 38);
- this.btn_srtAdd.Name = "btn_srtAdd";
- this.btn_srtAdd.Size = new System.Drawing.Size(88, 23);
- this.btn_srtAdd.TabIndex = 73;
- this.btn_srtAdd.Text = "Import SRT";
- this.toolTip.SetToolTip(this.btn_srtAdd, "Add a new SRT file to the \"track\" dropdown menu.");
- this.btn_srtAdd.UseVisualStyleBackColor = false;
- this.btn_srtAdd.Click += new System.EventHandler(this.BtnSrtAddClick);
- //
- // openFileDialog
- //
- this.openFileDialog.DefaultExt = "srt";
- this.openFileDialog.Filter = "SRT Files |*.srt";
- //
- // Subtitles
- //
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
- this.BackColor = System.Drawing.Color.Transparent;
- this.Controls.Add(this.SubGroupBox);
- this.Controls.Add(this.btn_addTrack);
- this.Controls.Add(this.label68);
- this.Controls.Add(this.btn_RemoveSubTrack);
- this.Controls.Add(this.lv_subList);
- this.Controls.Add(this.btn_srtAdd);
- this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Name = "Subtitles";
- this.Size = new System.Drawing.Size(719, 300);
- this.subMenu.ResumeLayout(false);
- this.SubGroupBox.ResumeLayout(false);
- this.SubGroupBox.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.srt_offset)).EndInit();
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.Button btn_RemoveSubTrack;
- private System.Windows.Forms.Button btn_addTrack;
- internal System.Windows.Forms.ListView lv_subList;
- private System.Windows.Forms.ColumnHeader col_Source;
- private System.Windows.Forms.ColumnHeader col_forced;
- private System.Windows.Forms.ColumnHeader col_burned;
- internal System.Windows.Forms.Label label68;
- private System.Windows.Forms.ColumnHeader col_defaultTrack;
- private System.Windows.Forms.ContextMenuStrip subMenu;
- private System.Windows.Forms.ToolStripMenuItem mnu_moveup;
- private System.Windows.Forms.ToolStripMenuItem mnu_movedown;
- private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
- private System.Windows.Forms.ToolStripMenuItem mnu_remove;
- private System.Windows.Forms.Button btn_srtAdd;
- private System.Windows.Forms.ColumnHeader col_srtChar;
- private System.Windows.Forms.ColumnHeader col_srtOffset;
- private System.Windows.Forms.GroupBox SubGroupBox;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.Label label3;
- internal System.Windows.Forms.ComboBox srt_charcode;
- private System.Windows.Forms.Label label2;
- internal System.Windows.Forms.ComboBox srt_lang;
- private System.Windows.Forms.NumericUpDown srt_offset;
- private System.Windows.Forms.OpenFileDialog openFileDialog;
- private System.Windows.Forms.Label label7;
- private System.Windows.Forms.CheckBox check_default;
- private System.Windows.Forms.CheckBox check_burned;
- private System.Windows.Forms.CheckBox check_forced;
- internal System.Windows.Forms.ComboBox drp_subtitleTracks;
- private System.Windows.Forms.Label label8;
- private System.Windows.Forms.Label label9;
- private System.Windows.Forms.Label label10;
- private System.Windows.Forms.ColumnHeader col_srtLang;
- private System.Windows.Forms.ToolTip toolTip;
- }
-}
diff --git a/win/C#/Controls/Subtitles.cs b/win/C#/Controls/Subtitles.cs deleted file mode 100644 index 0a5240955..000000000 --- a/win/C#/Controls/Subtitles.cs +++ /dev/null @@ -1,734 +0,0 @@ -/* Subtitles.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
-
-namespace Handbrake.Controls
-{
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Windows.Forms;
- using Functions;
-
- using HandBrake.ApplicationServices.Model;
- using HandBrake.ApplicationServices.Model.Encoding;
-
- using Model;
-
- /// <summary>
- /// The Subtitles Tab
- /// </summary>
- public partial class Subtitles : UserControl
- {
- #region Priavate Variables and Collections
-
- /// <summary>
- /// Map of languages to language codes
- /// </summary>
- private readonly IDictionary<string, string> langMap = new Dictionary<string, string>();
-
- /// <summary>
- /// A List of SRT Files
- /// </summary>
- private readonly IDictionary<string, string> srtFiles = new Dictionary<string, string>();
-
- /// <summary>
- /// The Subtitle List
- /// </summary>
- private readonly List<SubtitleTrack> subList = new List<SubtitleTrack>();
-
- #endregion
-
- /// <summary>
- /// Initializes a new instance of the <see cref="Subtitles"/> class.
- /// </summary>
- public Subtitles()
- {
- InitializeComponent();
-
- langMap = Main.MapLanguages();
- foreach (string key in langMap.Keys)
- srt_lang.Items.Add(key);
-
- srt_charcode.SelectedIndex = 28;
- srt_lang.SelectedIndex = 40;
- }
-
- #region Public Methods
- /// <summary>
- /// Gets the CLI Query for this panel
- /// </summary>
- /// <returns>A CliQuery string</returns>
- public string GetCliQuery
- {
- get
- {
- string query = string.Empty;
- if (lv_subList.Items.Count != 0) // If we have subtitle tracks
- {
- // BitMap and CC's
- string subtitleTracks = String.Empty;
- string subtitleForced = String.Empty;
- string subtitleBurn = String.Empty;
- string subtitleDefault = String.Empty;
-
- // SRT
- string srtFile = String.Empty;
- string srtCodeset = String.Empty;
- string srtOffset = String.Empty;
- string srtLang = String.Empty;
- string srtDefault = String.Empty;
- int srtCount = 0;
- int subCount = 0;
-
- foreach (SubtitleTrack item in subList)
- {
- string itemToAdd;
-
- if (item.IsSrtSubtitle) // We have an SRT file
- {
- srtCount++; // SRT track id.
-
- srtLang += srtLang == string.Empty ? langMap[item.SrtLang] : "," + langMap[item.SrtLang];
- srtCodeset += srtCodeset == string.Empty ? item.SrtCharCode : "," + item.SrtCharCode;
-
- if (item.Default)
- srtDefault = srtCount.ToString();
-
- itemToAdd = item.SrtPath;
- srtFile += srtFile == string.Empty ? itemToAdd : "," + itemToAdd;
-
- itemToAdd = item.SrtOffset.ToString();
- srtOffset += srtOffset == string.Empty ? itemToAdd : "," + itemToAdd;
- }
- else // We have Bitmap or CC
- {
- subCount++;
-
- // Find --subtitle <string>
- if (item.Track.Contains("Foreign Audio Search"))
- itemToAdd = "scan";
- else
- {
- string[] tempSub = item.Track.Split(' ');
- itemToAdd = tempSub[0];
- }
-
- subtitleTracks += subtitleTracks == string.Empty ? itemToAdd : "," + itemToAdd;
-
- // Find --subtitle-forced
- if (item.Forced)
- subtitleForced += subtitleForced == string.Empty ? subCount.ToString() : "," + subCount;
-
- // Find --subtitle-burn
- if (item.Burned)
- subtitleBurn = subCount.ToString();
-
- // Find --subtitle-default
- if (item.Default)
- subtitleDefault = subCount.ToString();
- }
- }
-
- // Build The CLI Subtitles Query
- if (subtitleTracks != string.Empty)
- {
- query += " --subtitle " + subtitleTracks;
-
- if (subtitleForced != string.Empty)
- query += " --subtitle-forced=" + subtitleForced;
- if (subtitleBurn != string.Empty)
- query += " --subtitle-burn=" + subtitleBurn;
- if (subtitleDefault != string.Empty)
- query += " --subtitle-default=" + subtitleDefault;
- }
-
- if (srtFile != string.Empty) // SRTs
- {
- query += " --srt-file " + "\"" + srtFile + "\"";
-
- if (srtCodeset != string.Empty)
- query += " --srt-codeset " + srtCodeset;
- if (srtOffset != string.Empty)
- query += " --srt-offset " + srtOffset;
- if (srtLang != string.Empty)
- query += " --srt-lang " + srtLang;
- if (srtDefault != string.Empty)
- query += " --srt-default=" + srtDefault;
- }
- }
- return query;
- }
- }
-
- /// <summary>
- /// Checks of the current settings will require the m4v file extension
- /// </summary>
- /// <returns>True if Yes</returns>
- public bool RequiresM4V()
- {
- return this.subList.Any(track => track.SubtitleType != SubtitleType.VobSub);
- }
-
- /// <summary>
- /// Automatically setup the subtitle tracks.
- /// This handles the automatic setup of subitles which the user can control from the program options
- /// </summary>
- /// <param name="subs">List of Subtitles</param>
- public void SetSubtitleTrackAuto(object[] subs)
- {
- drp_subtitleTracks.Items.Clear();
- drp_subtitleTracks.Items.Add("Foreign Audio Search (Bitmap)");
- drp_subtitleTracks.Items.AddRange(subs);
- drp_subtitleTracks.SelectedIndex = 0;
- Clear();
-
- this.AutomaticSubtitleSelection();
- }
-
- /// <summary>
- /// Automatic Subtitle Selection based on user preferences.
- /// </summary>
- public void AutomaticSubtitleSelection()
- {
- // Handle Native Language and "Dub Foreign language audio" and "Use Foreign language audio and Subtitles" Options
- if (Properties.Settings.Default.NativeLanguage != "Any")
- {
- if (Properties.Settings.Default.DubMode != 1) // We need to add a subtitle track if this is false.
- {
- foreach (object item in drp_subtitleTracks.Items)
- {
- if (item.ToString().Contains(Properties.Settings.Default.NativeLanguage))
- {
- drp_subtitleTracks.SelectedItem = item;
- BtnAddSubTrackClick(this, new EventArgs());
- }
- }
-
- if (drp_subtitleTracks.SelectedIndex == 0 && Properties.Settings.Default.useClosedCaption)
- {
- foreach (object item in drp_subtitleTracks.Items)
- {
- if (item.ToString().Contains("Closed"))
- {
- drp_subtitleTracks.SelectedItem = item;
- BtnAddSubTrackClick(this, new EventArgs());
- }
- }
- }
- }
- }
- }
-
- /// <summary>
- /// Clear the Subtitle List
- /// </summary>
- public void Clear()
- {
- lv_subList.Items.Clear();
- subList.Clear();
- }
- #endregion
-
- #region Primary Controls
-
- /// <summary>
- /// Add a Subtitle track.
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void BtnAddSubTrackClick(object sender, EventArgs e)
- {
- // Logic
- string forcedVal = check_forced.CheckState == CheckState.Checked ? "Yes" : "No";
- string defaultSub = check_default.CheckState == CheckState.Checked ? "Yes" : "No";
- string burnedVal = check_burned.CheckState == CheckState.Checked &&
- (drp_subtitleTracks.Text.Contains("(VOBSUB)") || drp_subtitleTracks.Text.Contains("(SSA)"))
- ? "Yes"
- : "No";
- string srtCode = "-", srtLangVal = "-", srtPath = "-", srtFile = "-";
- int srtOffsetMs = 0;
-
- if (drp_subtitleTracks.SelectedItem.ToString().Contains(".srt"))
- {
- srtFiles.TryGetValue(drp_subtitleTracks.SelectedItem.ToString(), out srtPath);
- srtFile = drp_subtitleTracks.SelectedItem.ToString();
- srtLangVal = srt_lang.SelectedItem.ToString();
- srtCode = srt_charcode.SelectedItem.ToString();
- srtOffsetMs = (int)srt_offset.Value;
- if (defaultSub == "Yes") this.SetDefaultToOffForAllSRTTracks();
- }
- else
- {
- if (defaultSub == "Yes") this.SetDefaultToOffForAllTracks();
- if (burnedVal == "Yes") this.SetBurnedToOffForAllTracks();
- }
-
- string trackName = (drp_subtitleTracks.SelectedItem.ToString().Contains(".srt"))
- ? srtLangVal + " (" + srtFile + ")"
- : drp_subtitleTracks.SelectedItem.ToString();
-
- SubtitleTrack track = new SubtitleTrack
- {
- Track = trackName,
- Forced = check_forced.Checked,
- Burned = check_burned.Checked,
- Default = check_default.Checked,
- SrtLang = srtLangVal,
- SrtCharCode = srtCode,
- SrtOffset = srtOffsetMs,
- SrtPath = srtPath,
- SrtFileName = srtFile
- };
-
- lv_subList.Items.Add(track.ListView);
- subList.Add(track);
- }
-
- /// <summary>
- /// Import an SRT Subtitle Track
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void BtnSrtAddClick(object sender, EventArgs e)
- {
- if (openFileDialog.ShowDialog() != DialogResult.OK)
- return;
-
- if (srtFiles.ContainsKey(Path.GetFileName(openFileDialog.FileName)))
- {
- MessageBox.Show(
- "A Subtitle track with the same name has already been imported.",
- "Warning",
- MessageBoxButtons.OK,
- MessageBoxIcon.Warning);
- return;
- }
-
- drp_subtitleTracks.Items.Add(Path.GetFileName(openFileDialog.FileName));
- drp_subtitleTracks.SelectedItem = Path.GetFileName(openFileDialog.FileName);
- srtFiles.Add(Path.GetFileName(openFileDialog.FileName), openFileDialog.FileName);
- }
-
- /// <summary>
- /// Remove a subtitle track
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void BtnRemoveSubTrackClick(object sender, EventArgs e)
- {
- this.RemoveSelectedTrack();
- }
-
- /// <summary>
- /// The Subtitle List selected index has changed
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void LbSubListSelectedIndexChanged(object sender, EventArgs e)
- {
- // Set the dropdown controls based on the selected item in the List.
- if (lv_subList.Items.Count != 0 && lv_subList.SelectedIndices.Count != 0)
- {
- SubtitleTrack track = subList[lv_subList.SelectedIndices[0]];
-
- int c = 0;
- if (lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[0].Text.ToLower().Contains(".srt"))
- // We have an SRT
- {
- foreach (var item in drp_subtitleTracks.Items)
- {
- if (item.ToString() == track.SrtFileName)
- drp_subtitleTracks.SelectedIndex = c;
- c++;
- }
- srt_lang.SelectedItem = track.SrtLang;
- srt_offset.Value = track.SrtOffset;
- srt_charcode.SelectedItem = track.SrtCharCode;
- check_default.CheckState = track.Default ? CheckState.Checked : CheckState.Unchecked;
- SubGroupBox.Text = "Selected Track: " + track.Track;
- }
- else // We have Bitmap/CC
- {
- foreach (var item in drp_subtitleTracks.Items)
- {
- if (item.ToString() == track.Track)
- drp_subtitleTracks.SelectedIndex = c;
- c++;
- }
- check_forced.CheckState = track.Forced ? CheckState.Checked : CheckState.Unchecked;
- check_burned.CheckState = track.Burned ? CheckState.Checked : CheckState.Unchecked;
- check_default.CheckState = track.Default ? CheckState.Checked : CheckState.Unchecked;
- SubGroupBox.Text = "Selected Track: " +
- lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[0].Text;
- }
- }
- else
- SubGroupBox.Text = "Selected Track: None (Click \"Add\" to add another track to the list)";
- }
-
- #endregion
-
- #region Subtitle Controls
-
- /// <summary>
- /// Handle the Subtitle track dropdown changed event
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void DrpSubtitleTracksSelectedIndexChanged(object sender, EventArgs e)
- {
- if (drp_subtitleTracks.SelectedItem.ToString().Contains(".srt"))
- {
- check_forced.Enabled = false;
- check_burned.Enabled = false;
- srt_lang.Enabled = true;
- srt_charcode.Enabled = true;
- srt_offset.Enabled = true;
- }
- else
- {
- check_forced.Enabled = true;
- check_burned.Enabled = true;
- srt_lang.Enabled = false;
- srt_charcode.Enabled = false;
- srt_offset.Enabled = false;
- }
- // Update an item in the list if required.
- if (lv_subList.Items.Count == 0 || lv_subList.SelectedIndices.Count == 0) return;
-
- if (drp_subtitleTracks.SelectedItem.ToString().Contains(".srt"))
- {
- lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[0].Text = srt_lang.SelectedItem + "(" +
- drp_subtitleTracks.SelectedItem + ")";
- lv_subList.Select();
-
- string srtPath;
- srtFiles.TryGetValue(drp_subtitleTracks.SelectedItem.ToString(), out srtPath);
- subList[lv_subList.SelectedIndices[0]].SrtPath = srtPath;
- }
- else
- {
- lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[0].Text =
- drp_subtitleTracks.SelectedItem.ToString();
- lv_subList.Select();
- }
-
- subList[lv_subList.SelectedIndices[0]].Track = drp_subtitleTracks.SelectedItem.ToString();
- }
-
- /// <summary>
- /// Foreced Subtitles checkbox changed
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void CheckForcedCheckedChanged(object sender, EventArgs e)
- {
- if (lv_subList.Items.Count == 0 || lv_subList.SelectedIndices.Count == 0) return;
-
- lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[1].Text = check_forced.Checked ? "Yes" : "No";
- lv_subList.Select();
-
- subList[lv_subList.SelectedIndices[0]].Forced = check_forced.Checked;
- // Update SubList List<SubtitleInfo>
- }
-
- /// <summary>
- /// Burned in subtitles checkbox changed
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void CheckBurnedCheckedChanged(object sender, EventArgs e)
- {
- if (lv_subList.Items.Count == 0 || lv_subList.SelectedIndices.Count == 0) return;
-
- if (check_burned.Checked) // Make sure we only have 1 burned track
- this.SetBurnedToOffForAllTracks();
-
- lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[2].Text = check_burned.Checked ? "Yes" : "No";
- lv_subList.Select();
-
- subList[lv_subList.SelectedIndices[0]].Burned = check_burned.Checked;
- // Update SubList List<SubtitleInfo>
- }
-
- /// <summary>
- /// Default Subitle track check changed
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void CheckDefaultCheckedChanged(object sender, EventArgs e)
- {
- if (lv_subList.Items.Count == 0 || lv_subList.SelectedIndices.Count == 0) return;
-
- if (check_default.Checked) // Make sure we only have 1 default track
- if (lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[0].Text.Contains(".srt"))
- this.SetDefaultToOffForAllSRTTracks();
- else
- this.SetDefaultToOffForAllTracks();
-
- lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[3].Text = check_default.Checked ? "Yes" : "No";
- lv_subList.Select();
-
- subList[lv_subList.SelectedIndices[0]].Default = check_default.Checked;
- // Update SubList List<SubtitleInfo>
- }
-
- /// <summary>
- /// Srt Offset Numeric Control Changed
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void SrtOffsetValueChanged(object sender, EventArgs e)
- {
- // Update an item in the list if required.
- if (lv_subList.Items.Count == 0 || lv_subList.SelectedIndices.Count == 0)
- return;
-
- lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[6].Text = srt_offset.Value.ToString();
- lv_subList.Select();
-
- subList[lv_subList.SelectedIndices[0]].SrtOffset = (int)srt_offset.Value;
- // Update SubList List<SubtitleInfo>
- }
-
- /// <summary>
- /// The SRT Charcode changed
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void SrtCharcodeSelectedIndexChanged(object sender, EventArgs e)
- {
- if (lv_subList.Items.Count == 0 || lv_subList.SelectedIndices.Count == 0) return;
-
- lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[5].Text = srt_charcode.SelectedItem.ToString();
- lv_subList.Select();
-
- subList[lv_subList.SelectedIndices[0]].SrtCharCode = srt_charcode.SelectedItem.ToString();
- // Update SubList List<SubtitleInfo>
- }
-
- /// <summary>
- /// The Srt Language code changed
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void SrtLangSelectedIndexChanged(object sender, EventArgs e)
- {
- if (lv_subList.Items.Count == 0 || lv_subList.SelectedIndices.Count == 0) return;
-
- lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[4].Text = srt_lang.SelectedItem.ToString();
- lv_subList.Select();
-
- subList[lv_subList.SelectedIndices[0]].SrtLang = srt_lang.SelectedItem.ToString();
- // Update SubList List<SubtitleInfo>
- }
-
- #endregion
-
- #region Right Click Menu
-
- /// <summary>
- /// Move an item in the subtitle list up
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void MnuMoveupClick(object sender, EventArgs e)
- {
- if (lv_subList.SelectedIndices.Count != 0)
- {
- ListViewItem item = lv_subList.SelectedItems[0];
- int index = item.Index;
- index--;
-
- if (lv_subList.Items.Count > index && index >= 0)
- {
- lv_subList.Items.Remove(item);
- lv_subList.Items.Insert(index, item);
- item.Selected = true;
- lv_subList.Focus();
- }
- }
- }
-
- /// <summary>
- /// Move an item in the subtitle list down
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void MnuMovedownClick(object sender, EventArgs e)
- {
- if (lv_subList.SelectedIndices.Count != 0)
- {
- ListViewItem item = lv_subList.SelectedItems[0];
- int index = item.Index;
- index++;
-
- if (index < lv_subList.Items.Count)
- {
- lv_subList.Items.Remove(item);
- lv_subList.Items.Insert(index, item);
- item.Selected = true;
- lv_subList.Focus();
- }
- }
- }
-
- /// <summary>
- /// Remove a selected subtitle track.
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void MnuRemoveClick(object sender, EventArgs e)
- {
- this.RemoveSelectedTrack();
- }
-
- #endregion
-
- #region Helpers
- /// <summary>
- /// Set all Non SRT tracks to Default = NO
- /// </summary>
- private void SetDefaultToOffForAllTracks()
- {
- int c = 0;
- foreach (ListViewItem item in lv_subList.Items)
- {
- if (subList[c].SrtPath == "-")
- {
- if (item.SubItems[3].Text == "Yes")
- {
- item.SubItems[3].Text = "No";
- subList[c].Default = false;
- }
- }
- c++;
- }
- }
-
- /// <summary>
- /// Set all subtitle tracks so that they have no default.
- /// </summary>
- private void SetDefaultToOffForAllSRTTracks()
- {
- int c = 0;
- foreach (ListViewItem item in lv_subList.Items)
- {
- if (!subList[c].IsSrtSubtitle)
- {
- if (item.SubItems[3].Text == "Yes")
- {
- item.SubItems[3].Text = "No";
- subList[c].Default = false;
- }
- }
- c++;
- }
- }
-
- /// <summary>
- /// Set all tracks to Burned = No
- /// </summary>
- private void SetBurnedToOffForAllTracks()
- {
- int c = 0;
- foreach (ListViewItem item in lv_subList.Items)
- {
- if (item.SubItems[2].Text == "Yes")
- {
- item.SubItems[2].Text = "No";
- subList[c].Burned = false;
- }
- c++;
- }
- }
-
- /// <summary>
- /// Remove a selected track
- /// </summary>
- private void RemoveSelectedTrack()
- {
- // Remove the Item and reselect the control if the following conditions are met.
- if (lv_subList.SelectedItems.Count != 0)
- {
- // Record the current selected index.
- int currentPosition = lv_subList.SelectedIndices[0];
- int selectedInd = lv_subList.SelectedIndices[0];
-
- lv_subList.Items.RemoveAt(selectedInd);
- subList.RemoveAt(selectedInd);
-
- // Now reslect the correct item and give focus to the list.
- if (lv_subList.Items.Count != 0)
- {
- if (currentPosition <= (lv_subList.Items.Count - 1))
- lv_subList.Items[currentPosition].Selected = true;
- else if (currentPosition > (lv_subList.Items.Count - 1))
- lv_subList.Items[lv_subList.Items.Count - 1].Selected = true;
-
- lv_subList.Select();
- }
- }
- }
- #endregion
- }
-}
\ No newline at end of file diff --git a/win/C#/Controls/Subtitles.resx b/win/C#/Controls/Subtitles.resx deleted file mode 100644 index 9be4767af..000000000 --- a/win/C#/Controls/Subtitles.resx +++ /dev/null @@ -1,132 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>237, 17</value>
- </metadata>
- <metadata name="subMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>17, 17</value>
- </metadata>
- <metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>113, 17</value>
- </metadata>
- <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>237, 17</value>
- </metadata>
-</root>
\ No newline at end of file diff --git a/win/C#/Controls/x264Panel.Designer.cs b/win/C#/Controls/x264Panel.Designer.cs deleted file mode 100644 index e445c179b..000000000 --- a/win/C#/Controls/x264Panel.Designer.cs +++ /dev/null @@ -1,774 +0,0 @@ -/* x264Panel.Designer.cs $
-
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
-
-namespace Handbrake.Controls
-{
- partial class x264Panel
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Component Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(x264Panel));
- this.slider_psytrellis = new System.Windows.Forms.TrackBar();
- this.lbl_psytrellis = new System.Windows.Forms.Label();
- this.lbl_psyrd = new System.Windows.Forms.Label();
- this.slider_psyrd = new System.Windows.Forms.TrackBar();
- this.lbl_adaptBFrames = new System.Windows.Forms.Label();
- this.drop_adaptBFrames = new System.Windows.Forms.ComboBox();
- this.label43 = new System.Windows.Forms.Label();
- this.btn_reset = new System.Windows.Forms.Button();
- this.rtf_x264Query = new System.Windows.Forms.RichTextBox();
- this.check_Cabac = new System.Windows.Forms.CheckBox();
- this.check_noDCTDecimate = new System.Windows.Forms.CheckBox();
- this.lbl_trellis = new System.Windows.Forms.Label();
- this.drop_trellis = new System.Windows.Forms.ComboBox();
- this.drop_deblockBeta = new System.Windows.Forms.ComboBox();
- this.label41 = new System.Windows.Forms.Label();
- this.drop_deblockAlpha = new System.Windows.Forms.ComboBox();
- this.check_8x8DCT = new System.Windows.Forms.CheckBox();
- this.label45 = new System.Windows.Forms.Label();
- this.drop_analysis = new System.Windows.Forms.ComboBox();
- this.label48 = new System.Windows.Forms.Label();
- this.drop_subpixelMotionEstimation = new System.Windows.Forms.ComboBox();
- this.lbl_merange = new System.Windows.Forms.Label();
- this.drop_MotionEstimationRange = new System.Windows.Forms.ComboBox();
- this.label54 = new System.Windows.Forms.Label();
- this.drop_MotionEstimationMethod = new System.Windows.Forms.ComboBox();
- this.lbl_direct_prediction = new System.Windows.Forms.Label();
- this.drop_directPrediction = new System.Windows.Forms.ComboBox();
- this.label62 = new System.Windows.Forms.Label();
- this.drop_bFrames = new System.Windows.Forms.ComboBox();
- this.label64 = new System.Windows.Forms.Label();
- this.drop_refFrames = new System.Windows.Forms.ComboBox();
- this.ToolTip = new System.Windows.Forms.ToolTip(this.components);
- this.check_weightp = new System.Windows.Forms.CheckBox();
- this.slider_adaptiveQuantStrength = new System.Windows.Forms.TrackBar();
- this.combo_pyrmidalBFrames = new System.Windows.Forms.ComboBox();
- this.lbl_adaptiveQuantStrength = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.lbl_prymidalBframes = new System.Windows.Forms.Label();
- this.label3 = new System.Windows.Forms.Label();
- ((System.ComponentModel.ISupportInitialize)(this.slider_psytrellis)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.slider_psyrd)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.slider_adaptiveQuantStrength)).BeginInit();
- this.SuspendLayout();
- //
- // slider_psytrellis
- //
- this.slider_psytrellis.BackColor = System.Drawing.SystemColors.Window;
- this.slider_psytrellis.Location = new System.Drawing.Point(427, 231);
- this.slider_psytrellis.Maximum = 20;
- this.slider_psytrellis.Name = "slider_psytrellis";
- this.slider_psytrellis.Size = new System.Drawing.Size(131, 45);
- this.slider_psytrellis.TabIndex = 86;
- this.ToolTip.SetToolTip(this.slider_psytrellis, "Psychovisual Trellis tries to retain more sharpness and detail, but can cause art" +
- "ifacting. \r\nIt is considered experimental, which is why it\'s off by default. Goo" +
- "d values are 0.1 to 0.2.");
- this.slider_psytrellis.Scroll += new System.EventHandler(this.widgetControlChanged);
- //
- // lbl_psytrellis
- //
- this.lbl_psytrellis.AutoSize = true;
- this.lbl_psytrellis.Location = new System.Drawing.Point(309, 231);
- this.lbl_psytrellis.Name = "lbl_psytrellis";
- this.lbl_psytrellis.Size = new System.Drawing.Size(102, 13);
- this.lbl_psytrellis.TabIndex = 85;
- this.lbl_psytrellis.Text = "Psychovisual Trellis:";
- //
- // lbl_psyrd
- //
- this.lbl_psyrd.AutoSize = true;
- this.lbl_psyrd.Location = new System.Drawing.Point(264, 199);
- this.lbl_psyrd.Name = "lbl_psyrd";
- this.lbl_psyrd.Size = new System.Drawing.Size(147, 13);
- this.lbl_psyrd.TabIndex = 84;
- this.lbl_psyrd.Text = "Psychovisual Rate Distortion:";
- //
- // slider_psyrd
- //
- this.slider_psyrd.BackColor = System.Drawing.SystemColors.Window;
- this.slider_psyrd.Location = new System.Drawing.Point(425, 199);
- this.slider_psyrd.Maximum = 20;
- this.slider_psyrd.Name = "slider_psyrd";
- this.slider_psyrd.Size = new System.Drawing.Size(131, 45);
- this.slider_psyrd.TabIndex = 83;
- this.ToolTip.SetToolTip(this.slider_psyrd, resources.GetString("slider_psyrd.ToolTip"));
- this.slider_psyrd.Value = 10;
- this.slider_psyrd.Scroll += new System.EventHandler(this.widgetControlChanged);
- //
- // lbl_adaptBFrames
- //
- this.lbl_adaptBFrames.AutoSize = true;
- this.lbl_adaptBFrames.Location = new System.Drawing.Point(309, 28);
- this.lbl_adaptBFrames.Name = "lbl_adaptBFrames";
- this.lbl_adaptBFrames.Size = new System.Drawing.Size(102, 13);
- this.lbl_adaptBFrames.TabIndex = 81;
- this.lbl_adaptBFrames.Text = "Adaptive B-Frames:";
- //
- // drop_adaptBFrames
- //
- this.drop_adaptBFrames.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_adaptBFrames.FormattingEnabled = true;
- this.drop_adaptBFrames.Items.AddRange(new object[] {
- "Default (Fast)",
- "Off",
- "Fast",
- "Optimal"});
- this.drop_adaptBFrames.Location = new System.Drawing.Point(417, 24);
- this.drop_adaptBFrames.Name = "drop_adaptBFrames";
- this.drop_adaptBFrames.Size = new System.Drawing.Size(106, 21);
- this.drop_adaptBFrames.TabIndex = 82;
- this.ToolTip.SetToolTip(this.drop_adaptBFrames, resources.GetString("drop_adaptBFrames.ToolTip"));
- this.drop_adaptBFrames.SelectedIndexChanged += new System.EventHandler(this.widgetControlChanged);
- //
- // label43
- //
- this.label43.AutoSize = true;
- this.label43.BackColor = System.Drawing.Color.Transparent;
- this.label43.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label43.Location = new System.Drawing.Point(13, 13);
- this.label43.Name = "label43";
- this.label43.Size = new System.Drawing.Size(60, 13);
- this.label43.TabIndex = 49;
- this.label43.Text = "Encoding:";
- //
- // btn_reset
- //
- this.btn_reset.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.btn_reset.ForeColor = System.Drawing.Color.DarkOrange;
- this.btn_reset.Location = new System.Drawing.Point(634, 230);
- this.btn_reset.Name = "btn_reset";
- this.btn_reset.Size = new System.Drawing.Size(75, 23);
- this.btn_reset.TabIndex = 79;
- this.btn_reset.Text = "Reset All";
- this.btn_reset.UseVisualStyleBackColor = true;
- this.btn_reset.Click += new System.EventHandler(this.btn_reset_Click);
- //
- // rtf_x264Query
- //
- this.rtf_x264Query.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.rtf_x264Query.Location = new System.Drawing.Point(16, 259);
- this.rtf_x264Query.Name = "rtf_x264Query";
- this.rtf_x264Query.Size = new System.Drawing.Size(698, 43);
- this.rtf_x264Query.TabIndex = 80;
- this.rtf_x264Query.Text = "";
- this.rtf_x264Query.TextChanged += new System.EventHandler(this.rtf_x264Query_TextChanged);
- //
- // check_Cabac
- //
- this.check_Cabac.AutoSize = true;
- this.check_Cabac.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.check_Cabac.Checked = true;
- this.check_Cabac.CheckState = System.Windows.Forms.CheckState.Checked;
- this.check_Cabac.Location = new System.Drawing.Point(3, 89);
- this.check_Cabac.Name = "check_Cabac";
- this.check_Cabac.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.check_Cabac.Size = new System.Drawing.Size(141, 17);
- this.check_Cabac.TabIndex = 78;
- this.check_Cabac.Text = "CABAC Entropy Coding:";
- this.check_Cabac.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.ToolTip.SetToolTip(this.check_Cabac, resources.GetString("check_Cabac.ToolTip"));
- this.check_Cabac.UseVisualStyleBackColor = true;
- this.check_Cabac.CheckedChanged += new System.EventHandler(this.widgetControlChanged);
- //
- // check_noDCTDecimate
- //
- this.check_noDCTDecimate.AutoSize = true;
- this.check_noDCTDecimate.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.check_noDCTDecimate.Location = new System.Drawing.Point(30, 212);
- this.check_noDCTDecimate.Name = "check_noDCTDecimate";
- this.check_noDCTDecimate.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.check_noDCTDecimate.Size = new System.Drawing.Size(114, 17);
- this.check_noDCTDecimate.TabIndex = 77;
- this.check_noDCTDecimate.Text = "No DCT-Decimate:";
- this.check_noDCTDecimate.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.ToolTip.SetToolTip(this.check_noDCTDecimate, resources.GetString("check_noDCTDecimate.ToolTip"));
- this.check_noDCTDecimate.UseVisualStyleBackColor = true;
- this.check_noDCTDecimate.CheckedChanged += new System.EventHandler(this.widgetControlChanged);
- //
- // lbl_trellis
- //
- this.lbl_trellis.AutoSize = true;
- this.lbl_trellis.Location = new System.Drawing.Point(563, 43);
- this.lbl_trellis.Name = "lbl_trellis";
- this.lbl_trellis.Size = new System.Drawing.Size(38, 13);
- this.lbl_trellis.TabIndex = 67;
- this.lbl_trellis.Text = "Trellis:";
- //
- // drop_trellis
- //
- this.drop_trellis.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_trellis.FormattingEnabled = true;
- this.drop_trellis.Items.AddRange(new object[] {
- "Default (Encode Only)",
- "Off",
- "Encode Only",
- "Always"});
- this.drop_trellis.Location = new System.Drawing.Point(615, 40);
- this.drop_trellis.Name = "drop_trellis";
- this.drop_trellis.Size = new System.Drawing.Size(94, 21);
- this.drop_trellis.TabIndex = 75;
- this.ToolTip.SetToolTip(this.drop_trellis, resources.GetString("drop_trellis.ToolTip"));
- this.drop_trellis.SelectedIndexChanged += new System.EventHandler(this.widgetControlChanged);
- //
- // drop_deblockBeta
- //
- this.drop_deblockBeta.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_deblockBeta.FormattingEnabled = true;
- this.drop_deblockBeta.Items.AddRange(new object[] {
- "Default (0)",
- "-6",
- "-5",
- "-4",
- "-3",
- "-2",
- "-1",
- "0",
- "1",
- "2",
- "3",
- "4",
- "5",
- "6"});
- this.drop_deblockBeta.Location = new System.Drawing.Point(631, 175);
- this.drop_deblockBeta.Name = "drop_deblockBeta";
- this.drop_deblockBeta.Size = new System.Drawing.Size(78, 21);
- this.drop_deblockBeta.TabIndex = 74;
- this.ToolTip.SetToolTip(this.drop_deblockBeta, resources.GetString("drop_deblockBeta.ToolTip"));
- this.drop_deblockBeta.SelectedIndexChanged += new System.EventHandler(this.widgetControlChanged);
- //
- // label41
- //
- this.label41.AutoSize = true;
- this.label41.Location = new System.Drawing.Point(563, 152);
- this.label41.Name = "label41";
- this.label41.Size = new System.Drawing.Size(62, 13);
- this.label41.TabIndex = 66;
- this.label41.Text = "Deblocking:";
- //
- // drop_deblockAlpha
- //
- this.drop_deblockAlpha.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_deblockAlpha.FormattingEnabled = true;
- this.drop_deblockAlpha.Items.AddRange(new object[] {
- "Default (0)",
- "-6",
- "-5",
- "-4",
- "-3",
- "-2",
- "-1",
- "0",
- "1",
- "2",
- "3",
- "4",
- "5",
- "6"});
- this.drop_deblockAlpha.Location = new System.Drawing.Point(631, 149);
- this.drop_deblockAlpha.Name = "drop_deblockAlpha";
- this.drop_deblockAlpha.Size = new System.Drawing.Size(78, 21);
- this.drop_deblockAlpha.TabIndex = 73;
- this.ToolTip.SetToolTip(this.drop_deblockAlpha, resources.GetString("drop_deblockAlpha.ToolTip"));
- this.drop_deblockAlpha.SelectedIndexChanged += new System.EventHandler(this.widgetControlChanged);
- //
- // check_8x8DCT
- //
- this.check_8x8DCT.AutoSize = true;
- this.check_8x8DCT.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.check_8x8DCT.Location = new System.Drawing.Point(44, 111);
- this.check_8x8DCT.Name = "check_8x8DCT";
- this.check_8x8DCT.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.check_8x8DCT.Size = new System.Drawing.Size(100, 17);
- this.check_8x8DCT.TabIndex = 72;
- this.check_8x8DCT.Text = "8x8 Transform:";
- this.check_8x8DCT.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.ToolTip.SetToolTip(this.check_8x8DCT, resources.GetString("check_8x8DCT.ToolTip"));
- this.check_8x8DCT.UseVisualStyleBackColor = true;
- this.check_8x8DCT.CheckedChanged += new System.EventHandler(this.widgetControlChanged);
- //
- // label45
- //
- this.label45.AutoSize = true;
- this.label45.Location = new System.Drawing.Point(563, 16);
- this.label45.Name = "label45";
- this.label45.Size = new System.Drawing.Size(78, 13);
- this.label45.TabIndex = 64;
- this.label45.Text = "Partition Type:";
- //
- // drop_analysis
- //
- this.drop_analysis.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_analysis.FormattingEnabled = true;
- this.drop_analysis.Items.AddRange(new object[] {
- "Default (most)",
- "None",
- "Some",
- "All"});
- this.drop_analysis.Location = new System.Drawing.Point(646, 13);
- this.drop_analysis.Name = "drop_analysis";
- this.drop_analysis.Size = new System.Drawing.Size(63, 21);
- this.drop_analysis.TabIndex = 71;
- this.ToolTip.SetToolTip(this.drop_analysis, resources.GetString("drop_analysis.ToolTip"));
- this.drop_analysis.SelectedIndexChanged += new System.EventHandler(this.widgetControlChanged);
- //
- // label48
- //
- this.label48.AutoSize = true;
- this.label48.Location = new System.Drawing.Point(262, 110);
- this.label48.Name = "label48";
- this.label48.Size = new System.Drawing.Size(149, 13);
- this.label48.TabIndex = 62;
- this.label48.Text = "Subpixel ME && Mode Decision:";
- //
- // drop_subpixelMotionEstimation
- //
- this.drop_subpixelMotionEstimation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_subpixelMotionEstimation.FormattingEnabled = true;
- this.drop_subpixelMotionEstimation.Items.AddRange(new object[] {
- "Default (7)",
- "0: SAD, no subpel (super fast!)",
- "1: SAD, qpel",
- "2: SATD, qpel",
- "3: SATD, multi-qpel",
- "4: SATD, qpel on all",
- "5: SATD, multi-qpel on all",
- "6: RD in I/P-frames",
- "7: RD in all frames",
- "8: RD refine in I/P-frames",
- "9: RD refine in all frames",
- "10: QPRD in all frames"});
- this.drop_subpixelMotionEstimation.Location = new System.Drawing.Point(417, 105);
- this.drop_subpixelMotionEstimation.Name = "drop_subpixelMotionEstimation";
- this.drop_subpixelMotionEstimation.Size = new System.Drawing.Size(139, 21);
- this.drop_subpixelMotionEstimation.TabIndex = 70;
- this.ToolTip.SetToolTip(this.drop_subpixelMotionEstimation, resources.GetString("drop_subpixelMotionEstimation.ToolTip"));
- this.drop_subpixelMotionEstimation.SelectedIndexChanged += new System.EventHandler(this.widgetControlChanged);
- //
- // lbl_merange
- //
- this.lbl_merange.AutoSize = true;
- this.lbl_merange.Location = new System.Drawing.Point(282, 135);
- this.lbl_merange.Name = "lbl_merange";
- this.lbl_merange.Size = new System.Drawing.Size(129, 13);
- this.lbl_merange.TabIndex = 61;
- this.lbl_merange.Text = "Motion Estimation Range:";
- //
- // drop_MotionEstimationRange
- //
- this.drop_MotionEstimationRange.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_MotionEstimationRange.FormattingEnabled = true;
- this.drop_MotionEstimationRange.Items.AddRange(new object[] {
- "Default (16)",
- "4",
- "5",
- "6",
- "7",
- "8",
- "9",
- "10",
- "11",
- "12",
- "13",
- "14",
- "15",
- "16",
- "17",
- "18",
- "19",
- "20",
- "21",
- "22",
- "23",
- "24",
- "25",
- "26",
- "27",
- "28",
- "29",
- "30",
- "31",
- "32",
- "33",
- "34",
- "35",
- "36",
- "37",
- "38",
- "39",
- "40",
- "41",
- "42",
- "43",
- "44",
- "45",
- "46",
- "47",
- "48",
- "49",
- "50",
- "51",
- "52",
- "53",
- "54",
- "55",
- "56",
- "57",
- "58",
- "59",
- "60",
- "61",
- "62",
- "63",
- "64"});
- this.drop_MotionEstimationRange.Location = new System.Drawing.Point(417, 132);
- this.drop_MotionEstimationRange.Name = "drop_MotionEstimationRange";
- this.drop_MotionEstimationRange.Size = new System.Drawing.Size(139, 21);
- this.drop_MotionEstimationRange.TabIndex = 69;
- this.ToolTip.SetToolTip(this.drop_MotionEstimationRange, resources.GetString("drop_MotionEstimationRange.ToolTip"));
- this.drop_MotionEstimationRange.SelectedIndexChanged += new System.EventHandler(this.widgetControlChanged);
- //
- // label54
- //
- this.label54.AutoSize = true;
- this.label54.Location = new System.Drawing.Point(277, 81);
- this.label54.Name = "label54";
- this.label54.Size = new System.Drawing.Size(134, 13);
- this.label54.TabIndex = 60;
- this.label54.Text = "Motion Estimation Method:";
- //
- // drop_MotionEstimationMethod
- //
- this.drop_MotionEstimationMethod.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_MotionEstimationMethod.FormattingEnabled = true;
- this.drop_MotionEstimationMethod.ItemHeight = 13;
- this.drop_MotionEstimationMethod.Items.AddRange(new object[] {
- "Default (Hexagon)",
- "Diamond",
- "Hexagon",
- "Uneven Multi-Hexagon",
- "Exhaustive",
- "Transformed Exhaustive"});
- this.drop_MotionEstimationMethod.Location = new System.Drawing.Point(417, 78);
- this.drop_MotionEstimationMethod.Name = "drop_MotionEstimationMethod";
- this.drop_MotionEstimationMethod.Size = new System.Drawing.Size(139, 21);
- this.drop_MotionEstimationMethod.TabIndex = 68;
- this.ToolTip.SetToolTip(this.drop_MotionEstimationMethod, resources.GetString("drop_MotionEstimationMethod.ToolTip"));
- this.drop_MotionEstimationMethod.SelectedIndexChanged += new System.EventHandler(this.widgetControlChanged);
- //
- // lbl_direct_prediction
- //
- this.lbl_direct_prediction.AutoSize = true;
- this.lbl_direct_prediction.Location = new System.Drawing.Point(297, 54);
- this.lbl_direct_prediction.Name = "lbl_direct_prediction";
- this.lbl_direct_prediction.Size = new System.Drawing.Size(114, 13);
- this.lbl_direct_prediction.TabIndex = 53;
- this.lbl_direct_prediction.Text = "Adaptive Direct Mode:";
- //
- // drop_directPrediction
- //
- this.drop_directPrediction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_directPrediction.FormattingEnabled = true;
- this.drop_directPrediction.Items.AddRange(new object[] {
- "Default (Spatial)",
- "None",
- "Spatial",
- "Temporal",
- "Automatic"});
- this.drop_directPrediction.Location = new System.Drawing.Point(417, 51);
- this.drop_directPrediction.Name = "drop_directPrediction";
- this.drop_directPrediction.Size = new System.Drawing.Size(106, 21);
- this.drop_directPrediction.TabIndex = 57;
- this.ToolTip.SetToolTip(this.drop_directPrediction, resources.GetString("drop_directPrediction.ToolTip"));
- this.drop_directPrediction.SelectedIndexChanged += new System.EventHandler(this.widgetControlChanged);
- //
- // label62
- //
- this.label62.AutoSize = true;
- this.label62.Location = new System.Drawing.Point(21, 64);
- this.label62.Name = "label62";
- this.label62.Size = new System.Drawing.Size(103, 13);
- this.label62.TabIndex = 52;
- this.label62.Text = "Maximum B-Frames:";
- //
- // drop_bFrames
- //
- this.drop_bFrames.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_bFrames.FormattingEnabled = true;
- this.drop_bFrames.Items.AddRange(new object[] {
- "Default (3)",
- "0",
- "1",
- "2",
- "3",
- "4",
- "5",
- "6",
- "7",
- "8",
- "9",
- "10",
- "11",
- "12",
- "13",
- "14",
- "15",
- "16"});
- this.drop_bFrames.Location = new System.Drawing.Point(129, 61);
- this.drop_bFrames.Name = "drop_bFrames";
- this.drop_bFrames.Size = new System.Drawing.Size(106, 21);
- this.drop_bFrames.TabIndex = 56;
- this.ToolTip.SetToolTip(this.drop_bFrames, resources.GetString("drop_bFrames.ToolTip"));
- this.drop_bFrames.SelectedIndexChanged += new System.EventHandler(this.widgetControlChanged);
- //
- // label64
- //
- this.label64.AutoSize = true;
- this.label64.Location = new System.Drawing.Point(25, 38);
- this.label64.Name = "label64";
- this.label64.Size = new System.Drawing.Size(99, 13);
- this.label64.TabIndex = 50;
- this.label64.Text = "Reference Frames:";
- //
- // drop_refFrames
- //
- this.drop_refFrames.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_refFrames.FormattingEnabled = true;
- this.drop_refFrames.Items.AddRange(new object[] {
- "Default (3)",
- "1",
- "2",
- "3",
- "4",
- "5",
- "6",
- "7",
- "8",
- "9",
- "10",
- "11",
- "12",
- "13",
- "14",
- "15",
- "16"});
- this.drop_refFrames.Location = new System.Drawing.Point(129, 35);
- this.drop_refFrames.Name = "drop_refFrames";
- this.drop_refFrames.Size = new System.Drawing.Size(106, 21);
- this.drop_refFrames.TabIndex = 54;
- this.ToolTip.SetToolTip(this.drop_refFrames, resources.GetString("drop_refFrames.ToolTip"));
- this.drop_refFrames.SelectedIndexChanged += new System.EventHandler(this.widgetControlChanged);
- //
- // ToolTip
- //
- this.ToolTip.Active = false;
- this.ToolTip.AutomaticDelay = 1000;
- this.ToolTip.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;
- //
- // check_weightp
- //
- this.check_weightp.AutoSize = true;
- this.check_weightp.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.check_weightp.ForeColor = System.Drawing.SystemColors.ControlText;
- this.check_weightp.Location = new System.Drawing.Point(20, 134);
- this.check_weightp.Name = "check_weightp";
- this.check_weightp.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.check_weightp.Size = new System.Drawing.Size(124, 17);
- this.check_weightp.TabIndex = 87;
- this.check_weightp.Text = "Weighted P-Frames:";
- this.ToolTip.SetToolTip(this.check_weightp, resources.GetString("check_weightp.ToolTip"));
- this.check_weightp.UseVisualStyleBackColor = true;
- this.check_weightp.CheckedChanged += new System.EventHandler(this.widgetControlChanged);
- //
- // slider_adaptiveQuantStrength
- //
- this.slider_adaptiveQuantStrength.BackColor = System.Drawing.SystemColors.Window;
- this.slider_adaptiveQuantStrength.Location = new System.Drawing.Point(425, 167);
- this.slider_adaptiveQuantStrength.Maximum = 20;
- this.slider_adaptiveQuantStrength.Name = "slider_adaptiveQuantStrength";
- this.slider_adaptiveQuantStrength.Size = new System.Drawing.Size(131, 45);
- this.slider_adaptiveQuantStrength.TabIndex = 88;
- this.ToolTip.SetToolTip(this.slider_adaptiveQuantStrength, "Adaptive quantization controls how the encoder distributes bits across the frame." +
- " \r\nHigher values take more bits away from edges and complex areas to improve ar" +
- "eas with finer detail");
- this.slider_adaptiveQuantStrength.Value = 10;
- this.slider_adaptiveQuantStrength.Scroll += new System.EventHandler(this.widgetControlChanged);
- //
- // combo_pyrmidalBFrames
- //
- this.combo_pyrmidalBFrames.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.combo_pyrmidalBFrames.FormattingEnabled = true;
- this.combo_pyrmidalBFrames.Items.AddRange(new object[] {
- "Default (Normal)",
- "Off",
- "Strict"});
- this.combo_pyrmidalBFrames.Location = new System.Drawing.Point(129, 157);
- this.combo_pyrmidalBFrames.Name = "combo_pyrmidalBFrames";
- this.combo_pyrmidalBFrames.Size = new System.Drawing.Size(106, 21);
- this.combo_pyrmidalBFrames.TabIndex = 92;
- this.ToolTip.SetToolTip(this.combo_pyrmidalBFrames, resources.GetString("combo_pyrmidalBFrames.ToolTip"));
- this.combo_pyrmidalBFrames.SelectedIndexChanged += new System.EventHandler(this.widgetControlChanged);
- //
- // lbl_adaptiveQuantStrength
- //
- this.lbl_adaptiveQuantStrength.AutoSize = true;
- this.lbl_adaptiveQuantStrength.Location = new System.Drawing.Point(248, 171);
- this.lbl_adaptiveQuantStrength.Name = "lbl_adaptiveQuantStrength";
- this.lbl_adaptiveQuantStrength.Size = new System.Drawing.Size(163, 13);
- this.lbl_adaptiveQuantStrength.TabIndex = 89;
- this.lbl_adaptiveQuantStrength.Text = "Adaptive Quantization Strength:";
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.BackColor = System.Drawing.Color.Transparent;
- 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(13, 193);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(83, 13);
- this.label1.TabIndex = 90;
- this.label1.Text = "Psychovisual:";
- //
- // lbl_prymidalBframes
- //
- this.lbl_prymidalBframes.AutoSize = true;
- this.lbl_prymidalBframes.Location = new System.Drawing.Point(20, 160);
- this.lbl_prymidalBframes.Name = "lbl_prymidalBframes";
- this.lbl_prymidalBframes.Size = new System.Drawing.Size(105, 13);
- this.lbl_prymidalBframes.TabIndex = 91;
- this.lbl_prymidalBframes.Text = "Pyramidal B-Frames:";
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.BackColor = System.Drawing.Color.Transparent;
- 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(248, 13);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(57, 13);
- this.label3.TabIndex = 93;
- this.label3.Text = "Analysis:";
- //
- // x264Panel
- //
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
- this.BackColor = System.Drawing.Color.Transparent;
- this.Controls.Add(this.label3);
- this.Controls.Add(this.rtf_x264Query);
- this.Controls.Add(this.lbl_prymidalBframes);
- this.Controls.Add(this.combo_pyrmidalBFrames);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.slider_psytrellis);
- this.Controls.Add(this.slider_psyrd);
- this.Controls.Add(this.lbl_adaptiveQuantStrength);
- this.Controls.Add(this.slider_adaptiveQuantStrength);
- this.Controls.Add(this.check_weightp);
- this.Controls.Add(this.lbl_psytrellis);
- this.Controls.Add(this.lbl_psyrd);
- this.Controls.Add(this.lbl_adaptBFrames);
- this.Controls.Add(this.drop_adaptBFrames);
- this.Controls.Add(this.label43);
- this.Controls.Add(this.btn_reset);
- this.Controls.Add(this.check_Cabac);
- this.Controls.Add(this.check_noDCTDecimate);
- this.Controls.Add(this.lbl_trellis);
- this.Controls.Add(this.drop_trellis);
- this.Controls.Add(this.drop_deblockBeta);
- this.Controls.Add(this.label41);
- this.Controls.Add(this.drop_deblockAlpha);
- this.Controls.Add(this.check_8x8DCT);
- this.Controls.Add(this.label45);
- this.Controls.Add(this.drop_analysis);
- this.Controls.Add(this.label48);
- this.Controls.Add(this.drop_subpixelMotionEstimation);
- this.Controls.Add(this.lbl_merange);
- this.Controls.Add(this.drop_MotionEstimationRange);
- this.Controls.Add(this.label54);
- this.Controls.Add(this.drop_MotionEstimationMethod);
- this.Controls.Add(this.lbl_direct_prediction);
- this.Controls.Add(this.drop_directPrediction);
- this.Controls.Add(this.label62);
- this.Controls.Add(this.drop_bFrames);
- this.Controls.Add(this.label64);
- this.Controls.Add(this.drop_refFrames);
- this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Name = "x264Panel";
- this.Size = new System.Drawing.Size(720, 305);
- ((System.ComponentModel.ISupportInitialize)(this.slider_psytrellis)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.slider_psyrd)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.slider_adaptiveQuantStrength)).EndInit();
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- internal System.Windows.Forms.TrackBar slider_psytrellis;
- internal System.Windows.Forms.Label lbl_psytrellis;
- internal System.Windows.Forms.Label lbl_psyrd;
- internal System.Windows.Forms.TrackBar slider_psyrd;
- internal System.Windows.Forms.Label lbl_adaptBFrames;
- internal System.Windows.Forms.ComboBox drop_adaptBFrames;
- internal System.Windows.Forms.Label label43;
- internal System.Windows.Forms.Button btn_reset;
- internal System.Windows.Forms.RichTextBox rtf_x264Query;
- internal System.Windows.Forms.CheckBox check_Cabac;
- internal System.Windows.Forms.CheckBox check_noDCTDecimate;
- internal System.Windows.Forms.Label lbl_trellis;
- internal System.Windows.Forms.ComboBox drop_trellis;
- internal System.Windows.Forms.ComboBox drop_deblockBeta;
- internal System.Windows.Forms.Label label41;
- internal System.Windows.Forms.ComboBox drop_deblockAlpha;
- internal System.Windows.Forms.CheckBox check_8x8DCT;
- internal System.Windows.Forms.Label label45;
- internal System.Windows.Forms.ComboBox drop_analysis;
- internal System.Windows.Forms.Label label48;
- internal System.Windows.Forms.ComboBox drop_subpixelMotionEstimation;
- internal System.Windows.Forms.Label lbl_merange;
- internal System.Windows.Forms.ComboBox drop_MotionEstimationRange;
- internal System.Windows.Forms.Label label54;
- internal System.Windows.Forms.ComboBox drop_MotionEstimationMethod;
- internal System.Windows.Forms.Label lbl_direct_prediction;
- internal System.Windows.Forms.ComboBox drop_directPrediction;
- internal System.Windows.Forms.Label label62;
- internal System.Windows.Forms.ComboBox drop_bFrames;
- internal System.Windows.Forms.Label label64;
- internal System.Windows.Forms.ComboBox drop_refFrames;
- private System.Windows.Forms.ToolTip ToolTip;
- internal System.Windows.Forms.CheckBox check_weightp;
- internal System.Windows.Forms.Label lbl_adaptiveQuantStrength;
- internal System.Windows.Forms.TrackBar slider_adaptiveQuantStrength;
- internal System.Windows.Forms.Label label1;
- internal System.Windows.Forms.Label lbl_prymidalBframes;
- internal System.Windows.Forms.ComboBox combo_pyrmidalBFrames;
- internal System.Windows.Forms.Label label3;
- }
-}
diff --git a/win/C#/Controls/x264Panel.cs b/win/C#/Controls/x264Panel.cs deleted file mode 100644 index 7678539f2..000000000 --- a/win/C#/Controls/x264Panel.cs +++ /dev/null @@ -1,1076 +0,0 @@ -/* x264Panel.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
-
-namespace Handbrake.Controls
-{
- using System;
- using System.Globalization;
- using System.Windows.Forms;
-
- /// <summary>
- /// The x264 Panel
- /// </summary>
- public partial class x264Panel : UserControl
- {
- /*
- * TODO This code was ported from the obj-c MacGUI code. It's really messy and could really do with being cleaned up
- * at some point.
- */
-
- private CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");
-
- /// <summary>
- /// Initializes a new instance of the <see cref="x264Panel"/> class.
- /// Initializes a new instance of the x264 panel user control
- /// </summary>
- public x264Panel()
- {
- InitializeComponent();
-
- if (Properties.Settings.Default.tooltipEnable)
- ToolTip.Active = true;
-
- Reset2Defaults();
- }
-
- /// <summary>
- /// Gets or sets the X264 query string
- /// </summary>
- public string X264Query
- {
- get
- {
- return rtf_x264Query.Text;
- }
- set
- {
- rtf_x264Query.Text = value;
- }
- }
-
- /// <summary>
- /// Reset all components to defaults and clears the x264 rtf box
- /// </summary>
- public void Reset2Defaults()
- {
- check_8x8DCT.CheckState = CheckState.Checked;
- check_Cabac.CheckState = CheckState.Checked;
- check_weightp.CheckState = CheckState.Checked;
- check_noDCTDecimate.CheckState = CheckState.Unchecked;
- combo_pyrmidalBFrames.SelectedIndex = 0;
- drop_analysis.SelectedIndex = 0;
- drop_bFrames.SelectedIndex = 0;
- drop_deblockAlpha.SelectedIndex = 0;
- drop_deblockBeta.SelectedIndex = 0;
- drop_directPrediction.SelectedIndex = 0;
- drop_MotionEstimationMethod.SelectedIndex = 0;
- drop_MotionEstimationRange.SelectedIndex = 0;
- drop_refFrames.SelectedIndex = 0;
- drop_subpixelMotionEstimation.SelectedIndex = 0;
- drop_trellis.SelectedIndex = 0;
- slider_psyrd.Value = 10;
- slider_psytrellis.Value = 0;
- drop_adaptBFrames.SelectedIndex = 0;
- slider_adaptiveQuantStrength.Value = slider_adaptiveQuantStrength.Maximum / 2;
-
- rtf_x264Query.Text = string.Empty;
- }
-
- #region Standardize Option String
- /// <summary>
- /// Iterate over every x264 option, standardize it, write the full string to the x264 rtf box
- /// </summary>
- public void StandardizeOptString()
- {
- /* Set widgets depending on the opt string in field */
- string thisOpt; // The separated option such as "bframes=3"
- string optName; // The option name such as "bframes"
- string optValue; // The option value such as "3"
- string changedOptString = string.Empty;
- string[] currentOptsArray;
-
- /*First, we get an opt string to process */
- string currentOptString = rtf_x264Query.Text;
-
- /*verify there is an opt string to process */
- if (currentOptString.Contains("="))
- {
- /*Put individual options into an array based on the ":" separator for processing, result is "<opt>=<value>"*/
- currentOptsArray = currentOptString.Split(':');
-
- /*iterate through the array and get <opts> and <values*/
- int loopcounter;
- int currentOptsArrayCount = currentOptsArray.Length;
- for (loopcounter = 0; loopcounter < currentOptsArrayCount; loopcounter++)
- {
- thisOpt = currentOptsArray[loopcounter];
- if (currentOptsArray[currentOptsArrayCount - 1] == string.Empty)
- break;
-
- string[] splitOptRange = thisOpt.Split('=');
- if (thisOpt != string.Empty)
- {
- if (thisOpt.Contains("="))
- {
- optName = splitOptRange[0];
- optValue = splitOptRange[1];
-
- /* Standardize the names here depending on whats in the string */
- optName = StandardizeOptName(optName);
- thisOpt = optName + "=" + optValue;
- }
- else // No value given so we use a default of "1"
- {
- optName = thisOpt;
- /* Standardize the names here depending on whats in the string */
- optName = StandardizeOptName(optName);
- thisOpt = optName + "=1";
- }
- }
-
- /* Construct New String for opts here */
- if (thisOpt == string.Empty)
- changedOptString = changedOptString + thisOpt;
- else
- {
- if (changedOptString == string.Empty)
- changedOptString = thisOpt;
- else
- changedOptString = changedOptString + ":" + thisOpt;
- }
- }
- }
-
- /* Change the option string to reflect the new standardized option string */
- if (changedOptString != string.Empty)
- rtf_x264Query.Text = changedOptString;
- }
-
- /// <summary>
- /// Take a single option and standardize it. Returns as a String
- /// Input: String. - Single X264 Option. Name only
- /// Output: String - Single X264 Option. Name only. Changed to standard format
- /// </summary>
- /// <param name="cleanOptNameString">a string of x264 options to clean</param>
- /// <returns>A string containing standardized x264 option names</returns>
- private static string StandardizeOptName(string cleanOptNameString)
- {
- string input = cleanOptNameString;
-
- /* Reference Frames */
- if (input.Equals("ref") || input.Equals("frameref"))
- cleanOptNameString = "ref";
-
- /*No Dict Decimate*/
- if (input.Equals("no-dct-decimate") || input.Equals("no_dct_decimate") || input.Equals("nodct_decimate"))
- cleanOptNameString = "no-dct-decimate";
-
- /*Subme*/
- if (input.Equals("subme"))
- cleanOptNameString = "subq";
-
- /*ME Range*/
- if (input.Equals("me-range") || input.Equals("me_range"))
- cleanOptNameString = "merange";
-
- /*B Pyramid*/
- if (input.Equals("b_pyramid"))
- cleanOptNameString = "b-pyramid";
-
- /*Direct Prediction*/
- if (input.Equals("direct-pred") || input.Equals("direct_pred"))
- cleanOptNameString = "direct";
-
- /*Deblocking*/
- if (input.Equals("filter"))
- cleanOptNameString = "deblock";
-
- /*Analysis*/
- if (input.Equals("partitions"))
- cleanOptNameString = "analyse";
-
- return cleanOptNameString;
- }
- #endregion
-
- /// <summary>
- /// Resets the GUI widgets to the contents of the option string.
- /// </summary>
- public void SetCurrentSettingsInPanel()
- {
- /* Set widgets depending on the opt string in field */
- string thisOpt; // The separated option such as "bframes=3"
- string optName; // The option name such as "bframes"
- string optValue; // The option value such as "3"
- string[] currentOptsArray;
-
- // Set currentOptString to the contents of the text box.
- string currentOptString = rtf_x264Query.Text.Replace("\n", string.Empty);
-
- /*verify there is an opt string to process */
- if (currentOptString.Contains("="))
- {
- /*Put individual options into an array based on the ":" separator for processing, result is "<opt>=<value>"*/
- currentOptsArray = currentOptString.Split(':');
-
- /*iterate through the array and get <opts> and <values*/
- int loopcounter;
- int currentOptsArrayCount = currentOptsArray.Length;
-
- /*iterate through the array and get <opts> and <values*/
- for (loopcounter = 0; loopcounter < currentOptsArrayCount; loopcounter++)
- {
- thisOpt = currentOptsArray[loopcounter];
- string[] splitOptRange = thisOpt.Split('=');
-
- if (thisOpt.Contains("="))
- {
- optName = splitOptRange[0];
- optValue = splitOptRange[1];
-
- /*Run through the available widgets for x264 opts and set them, as you add widgets,
- they need to be added here. This should be moved to its own method probably*/
- switch (optName)
- {
- case "bframes":
- drop_bFrames.SelectedItem = optValue;
- continue;
- case "ref":
- drop_refFrames.SelectedItem = optValue;
- continue;
- case "weightp":
- this.check_weightp.CheckState = optValue == "0" ? CheckState.Unchecked : CheckState.Checked;
- continue;
- case "no-dct-decimate":
- check_noDCTDecimate.CheckState = CheckState.Checked;
- continue;
- case "subq":
- int subqValue;
- if (int.TryParse(optValue, out subqValue))
- {
- drop_subpixelMotionEstimation.SelectedIndex = subqValue + 1;
- }
- continue;
- case "trellis":
- switch (optValue)
- {
- case "0":
- drop_trellis.SelectedIndex = 1;
- break;
- case "1":
- drop_trellis.SelectedIndex = 2;
- break;
- case "2":
- drop_trellis.SelectedIndex = 3;
- break;
- }
- continue;
- case "me":
- if (optValue.Equals("dia"))
- drop_MotionEstimationMethod.SelectedItem = "Diamond";
- else if (optValue.Equals("hex"))
- drop_MotionEstimationMethod.SelectedItem = "Hexagon";
- else if (optValue.Equals("umh"))
- drop_MotionEstimationMethod.SelectedItem = "Uneven Multi-Hexagon";
- else if (optValue.Equals("esa"))
- drop_MotionEstimationMethod.SelectedItem = "Exhaustive";
- else if (optValue.Equals("tesa"))
- drop_MotionEstimationMethod.SelectedItem = "Transformed Exhaustive";
- continue;
- case "merange":
- drop_MotionEstimationRange.SelectedItem = optValue;
- continue;
- case "b-adapt":
- int badapt;
- int.TryParse(optValue, out badapt);
- drop_adaptBFrames.SelectedIndex = (badapt + 1);
- continue;
- case "b-pyramid":
- switch (optValue)
- {
- case "normal":
- combo_pyrmidalBFrames.SelectedIndex = 0;
- break;
- case "strict":
- combo_pyrmidalBFrames.SelectedIndex = 2;
- break;
- case "none":
- combo_pyrmidalBFrames.SelectedIndex = 1;
- break;
- }
- continue;
- case "direct":
- if (optValue == "auto")
- optValue = "Automatic";
-
- if (optValue != string.Empty)
- {
- char[] letters = optValue.ToCharArray();
- letters[0] = Char.ToUpper(letters[0]);
- optValue = new string(letters);
- }
-
- drop_directPrediction.SelectedItem = optValue;
- continue;
- case "deblock":
- string[] splitDeblock = optValue.Split(',');
- string alphaDeblock = splitDeblock[0];
- string betaDeblock = splitDeblock[1];
-
- if (alphaDeblock.Equals("0") && betaDeblock.Replace("\n", string.Empty).Equals("0"))
- {
- drop_deblockAlpha.SelectedItem = "Default (0)";
- drop_deblockBeta.SelectedItem = "Default (0)";
- }
- else
- {
- drop_deblockAlpha.SelectedItem = !alphaDeblock.Equals("0") ? alphaDeblock : "0";
-
- drop_deblockBeta.SelectedItem = !betaDeblock.Replace("\n", string.Empty).Equals("0")
- ? betaDeblock.Replace("\n", string.Empty)
- : "0";
- }
- continue;
- case "analyse":
- if (optValue.Equals("p8x8,b8x8,i8x8,i4x4"))
- drop_analysis.SelectedItem = "Default (most)";
- if (optValue.Equals("none"))
- drop_analysis.SelectedItem = "None";
- if (optValue.Equals("i4x4,i8x8"))
- drop_analysis.SelectedItem = "Some";
- if (optValue.Equals("all"))
- drop_analysis.SelectedItem = "All";
- continue;
- case "8x8dct":
- check_8x8DCT.CheckState = optValue == "1" ? CheckState.Checked : CheckState.Unchecked;
- continue;
- case "aq-strength":
- float value;
- float.TryParse(optValue, NumberStyles.Float, CultureInfo.InvariantCulture, out value);
- int sliderValue;
- int.TryParse((value * 10).ToString(), out sliderValue);
- slider_adaptiveQuantStrength.Value = sliderValue;
- continue;
- case "cabac":
- check_Cabac.CheckState = CheckState.Unchecked;
- continue;
- case "psy-rd":
- string[] x = optValue.Split(',');
-
- double psyrd, psytrellis;
- int val, val2;
-
- // default psy-rd = 1 (10 for the slider)
- psyrd = double.TryParse(x[0], NumberStyles.Float, CultureInfo.InvariantCulture, out psyrd) ? psyrd * 10 : 10.0;
- // default psy-trellis = 0
- psytrellis = double.TryParse(x[1], NumberStyles.Float, CultureInfo.InvariantCulture, out psytrellis) ? psytrellis * 20 : 0.0;
-
- int.TryParse(psyrd.ToString(), out val);
- int.TryParse(psytrellis.ToString(), out val2);
-
- slider_psyrd.Value = val;
- slider_psytrellis.Value = val2;
- continue;
- }
- }
- }
- }
- }
-
- /// <summary>
- /// This function will update the X264 Query when one of the GUI widgets changes.
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- private void OnX264WidgetChange(string sender)
- {
- Animate(sender);
- string optNameToChange = sender;
- string currentOptString = rtf_x264Query.Text;
-
- /*First, we create a pattern to check for ":"optNameToChange"=" to modify the option if the name falls after
- the first character of the opt string (hence the ":") */
- string checkOptNameToChange = ":" + optNameToChange + "=";
- string checkOptNameToChangeBegin = optNameToChange + "=";
-
- // IF the current H264 Option String Contains Multiple Items or Just 1 Item
- if ((currentOptString.Contains(checkOptNameToChange)) || (currentOptString.StartsWith(checkOptNameToChangeBegin)))
- HasOptions(currentOptString, optNameToChange);
- else // IF there is no options in the rich text box!
- HasNoOptions(optNameToChange);
- }
-
- /// <summary>
- /// Called when the current x264 option string contains multiple (or a single) item(s) in it seperated by :
- /// it updates the current option that the widget corrosponds to, if it is already in thes string.
- /// </summary>
- /// <param name="currentOptString">The Current Option String</param>
- /// <param name="optNameToChange">Name of the option to change</param>
- private void HasOptions(string currentOptString, string optNameToChange)
- {
- string thisOpt; // The separated option such as "bframes=3"
- string optName; // The option name such as "bframes"
- string[] currentOptsArray;
-
- /* Create new empty opt string*/
- string changedOptString = string.Empty;
-
- /*Put individual options into an array based on the ":" separator for processing, result is "<opt>=<value>"*/
- currentOptsArray = currentOptString.Split(':');
-
- /*iterate through the array and get <opts> and <values*/
- for (int loopcounter = 0; loopcounter < currentOptsArray.Length; loopcounter++)
- {
- thisOpt = currentOptsArray[loopcounter];
-
- if (thisOpt.Contains("="))
- {
- string[] splitOptRange = thisOpt.Split('=');
-
- optName = splitOptRange[0]; // e.g bframes
-
- /*
- * Run through the available widgets for x264 opts and set them, as you add widgets,
- * they need to be added here. This should be moved to its own method probably
- * If the optNameToChange is found, appropriately change the value or delete it if
- * "unspecified" is set.
- */
- if (optName.Equals(optNameToChange))
- {
- if (optNameToChange.Equals("deblock"))
- {
- string da = drop_deblockAlpha.SelectedItem.ToString();
- string db = drop_deblockBeta.SelectedItem.ToString();
-
- if (((da.Contains("Default")) && (db.Contains("Default"))) ||
- ((da.Contains("0")) && (db.Contains("0"))))
- {
- drop_deblockBeta.SelectedItem = "Default (0)";
- drop_deblockAlpha.SelectedItem = "Default (0)";
- thisOpt = string.Empty;
- }
- else if ((!da.Contains("Default")) && (db.Contains("Default")))
- {
- drop_deblockBeta.SelectedItem = "0";
- thisOpt = "deblock=" + da + ",0";
- }
- else if ((da.Contains("Default")) && (!db.Contains("Default")))
- {
- drop_deblockAlpha.SelectedItem = "0";
- thisOpt = "deblock=0," + db;
- }
- else if ((!da.Contains("Default")) && (!db.Contains("Default")))
- thisOpt = "deblock=" + da + "," + db;
- }
- else if (optNameToChange.Equals("aq-strength"))
- {
- if (slider_adaptiveQuantStrength.Value == 10)
- thisOpt = string.Empty;
- else
- {
- double value = slider_adaptiveQuantStrength.Value * 0.1;
- string aqs = value.ToString("f1", culture);
- thisOpt = "aq-strength=" + aqs;
- }
- }
- else if (optNameToChange.Equals("psy-rd"))
- {
- if (slider_psyrd.Value == 10 && slider_psytrellis.Value == 0)
- thisOpt = string.Empty;
- else
- {
- double psyrd = slider_psyrd.Value * 0.1;
- double psytre = slider_psytrellis.Value * 0.05;
-
- string rd = psyrd.ToString("f2", culture);
- string rt = psytre.ToString("f2", culture);
-
- thisOpt = "psy-rd=" + rd + "," + rt;
- }
- }
- else if (optNameToChange.Equals("b-pyramid"))
- {
- switch (combo_pyrmidalBFrames.SelectedIndex)
- {
- case 0: // Default
- thisOpt = string.Empty;
- break;
- case 1: // Off
- thisOpt = "b-pyramid=none";
- break;
- case 2: // Strict
- thisOpt = "b-pyramid=strict";
- break;
- }
- }
- else if (optNameToChange.Equals("no-dct-decimate"))
- thisOpt = check_noDCTDecimate.CheckState == CheckState.Checked ? "no-dct-decimate=1" : string.Empty;
- else if (optNameToChange.Equals("8x8dct"))
- thisOpt = check_8x8DCT.CheckState == CheckState.Unchecked ? "8x8dct=0" : string.Empty;
- else if (optNameToChange.Equals("cabac"))
- thisOpt = check_Cabac.CheckState == CheckState.Checked ? string.Empty : "cabac=0";
- else if (optNameToChange.Equals("weightp"))
- thisOpt = check_weightp.CheckState == CheckState.Checked ? string.Empty : "weightp=0";
- else if (optNameToChange.Equals("me"))
- {
- switch (drop_MotionEstimationMethod.SelectedIndex)
- {
- case 1:
- thisOpt = "me=dia";
- break;
-
- case 2:
- thisOpt = "me=hex";
- break;
-
- case 3:
- thisOpt = "me=umh";
- break;
-
- case 4:
- thisOpt = "me=esa";
- break;
-
- case 5:
- thisOpt = "me=tesa";
- break;
-
- default:
- thisOpt = string.Empty;
- break;
- }
- }
- else if (optNameToChange.Equals("direct"))
- {
- switch (drop_directPrediction.SelectedIndex)
- {
- case 1:
- thisOpt = "direct=none";
- break;
-
- case 2:
- thisOpt = "direct=spatial";
- break;
-
- case 3:
- thisOpt = "direct=temporal";
- break;
-
- case 4:
- thisOpt = "direct=auto";
- break;
-
- default:
- thisOpt = string.Empty;
- break;
- }
- }
- else if (optNameToChange.Equals("analyse"))
- {
- switch (drop_analysis.SelectedIndex)
- {
- case 1:
- thisOpt = "analyse=none";
- break;
-
- case 2:
- thisOpt = "analyse=some";
- break;
-
- case 3:
- thisOpt = "analyse=all";
- break;
-
- default:
- thisOpt = string.Empty;
- break;
- }
- }
- else if (optNameToChange.Equals("merange"))
- {
- thisOpt = !drop_MotionEstimationRange.SelectedItem.ToString().Contains("Default")
- ? "merange=" + drop_MotionEstimationRange.SelectedItem
- : string.Empty;
- }
- else if (optNameToChange.Equals("b-adapt"))
- {
- thisOpt = !drop_adaptBFrames.SelectedItem.ToString().Contains("Default")
- ? "b-adapt=" + (drop_adaptBFrames.SelectedIndex - 1)
- : string.Empty;
- }
- else if (optNameToChange.Equals("ref"))
- {
- thisOpt = !drop_refFrames.SelectedItem.ToString().Contains("Default")
- ? "ref=" + drop_refFrames.SelectedItem
- : string.Empty;
- }
- else if (optNameToChange.Equals("bframes"))
- {
- string value = drop_bFrames.SelectedItem.ToString();
- thisOpt = !drop_bFrames.SelectedItem.ToString().Contains("Default")
- ? "bframes=" + value
- : string.Empty;
- }
- else if (optNameToChange.Equals("subq"))
- {
- string value = drop_subpixelMotionEstimation.SelectedItem.ToString();
- string[] val = value.Split(':');
- thisOpt = !drop_subpixelMotionEstimation.SelectedItem.ToString().Contains("Default")
- ? "subq=" + val[0]
- : string.Empty;
- }
- else if (optNameToChange.Equals("trellis"))
- {
- switch (drop_trellis.SelectedIndex)
- {
- case 1: // Off
- thisOpt = "trellis=0";
- break;
- case 2: // Encode Only
- thisOpt = "trellis=1";
- break;
- case 3: // Always
- thisOpt = "trellis=2";
- break;
- default:
- thisOpt = string.Empty;
- break;
- }
- }
- }
- }
-
- /* Construct New String for opts here */
- if (!thisOpt.Equals(string.Empty))
- changedOptString = changedOptString.Equals(string.Empty) ? thisOpt : changedOptString + ":" + thisOpt;
- }
-
- /* Change the option string to reflect the new mod settings */
- rtf_x264Query.Text = changedOptString;
- }
-
- /// <summary>
- /// Add's an option to the x264 query string.
- /// Handles 2 cases. 1 Where rtf_x264Query.Text is empty, and one where there is an option with no value,
- /// e.g no-fast-pskip
- /// </summary>
- /// <param name="optNameToChange">The Option Name to Change</param>
- private void HasNoOptions(IEquatable<string> optNameToChange)
- {
- string colon = string.Empty;
- if (rtf_x264Query.Text != string.Empty)
- colon = ":";
-
- string query = rtf_x264Query.Text;
- if (optNameToChange.Equals("me"))
- {
- switch (drop_MotionEstimationMethod.SelectedIndex)
- {
- case 1:
- query = query + colon + "me=dia";
- break;
-
- case 2:
- query = query + colon + "me=hex";
- break;
-
- case 3:
- query = query + colon + "me=umh";
- break;
-
- case 4:
- query = query + colon + "me=esa";
- break;
-
- case 5:
- query = query + colon + "me=tesa";
- break;
-
- default:
- break;
- }
- }
- else if (optNameToChange.Equals("direct"))
- {
- switch (drop_directPrediction.SelectedIndex)
- {
- case 1:
- query = query + colon + "direct=none";
- break;
-
- case 2:
- query = query + colon + "direct=spatial";
- break;
-
- case 3:
- query = query + colon + "direct=temporal";
- break;
-
- case 4:
- query = query + colon + "direct=auto";
- break;
-
- default:
- break;
- }
- }
- else if (optNameToChange.Equals("analyse"))
- {
- switch (drop_analysis.SelectedIndex)
- {
- case 1:
- query = query + colon + "analyse=none";
- break;
-
- case 2:
- query = query + colon + "analyse=some";
- break;
-
- case 3:
- query = query + colon + "analyse=all";
- break;
-
- default:
- break;
- }
- }
- else if (optNameToChange.Equals("merange"))
- {
- int value = drop_MotionEstimationRange.SelectedIndex + 3;
- query = query + colon + "merange=" + value;
- }
- else if (optNameToChange.Equals("b-adapt"))
- {
- int value = drop_adaptBFrames.SelectedIndex - 1;
- query = query + colon + "b-adapt=" + value;
- }
- else if (optNameToChange.Equals("deblock"))
- {
- string da = drop_deblockAlpha.SelectedItem.ToString();
- string db = drop_deblockBeta.Text;
-
- if (((da.Contains("Default")) && (db.Contains("Default"))) || ((da.Contains("0")) && (db.Contains("0"))))
- {
- drop_deblockBeta.SelectedItem = "Default (0)";
- drop_deblockAlpha.SelectedItem = "Default (0)";
- }
- else
- {
- if (db.Contains("Default"))
- db = "0";
-
- if (da.Contains("Default"))
- da = "0";
-
- query = query + colon + "deblock=" + da + "," + db;
- }
- }
- else if (optNameToChange.Equals("aq-strength"))
- {
- if (slider_adaptiveQuantStrength.Value == 10)
- query = string.Empty;
- else
- {
- double value = slider_adaptiveQuantStrength.Value * 0.1;
- string aqs = value.ToString("f1", culture);
- query += colon + "aq-strength=" + aqs;
- }
- }
- else if (optNameToChange.Equals("psy-rd"))
- {
- if (slider_psyrd.Value == 10 && slider_psytrellis.Value == 0)
- query += string.Empty;
- else
- {
- double psyrd = slider_psyrd.Value * 0.1;
- double psytre = slider_psytrellis.Value * 0.05;
-
- string rd = psyrd.ToString("f1", culture);
- string rt = psytre.ToString("f2", culture);
-
- query += colon + "psy-rd=" + rd + "," + rt;
- }
- }
- else if (optNameToChange.Equals("b-pyramid"))
- {
- switch (combo_pyrmidalBFrames.SelectedIndex)
- {
- case 0:
- break;
- case 1:
- query = query + colon + "b-pyramid=none";
- break;
- case 2:
- query = query + colon + "b-pyramid=strict";
- break;
- }
- }
- else if (optNameToChange.Equals("no-dct-decimate"))
- {
- if (check_noDCTDecimate.CheckState == CheckState.Checked)
- query = query + colon + "no-dct-decimate=1";
- }
- else if (optNameToChange.Equals("8x8dct"))
- {
- if (check_8x8DCT.CheckState == CheckState.Unchecked)
- query = query + colon + "8x8dct=0";
- }
- else if (optNameToChange.Equals("cabac"))
- {
- if (check_Cabac.CheckState != CheckState.Checked)
- query = query + colon + "cabac=0";
- }
- else if (optNameToChange.Equals("weightp"))
- {
- if (check_weightp.CheckState == CheckState.Unchecked)
- query = query + colon + "weightp=0";
- }
- else if (optNameToChange.Equals("ref"))
- {
- if (!drop_refFrames.SelectedItem.ToString().Contains("Default"))
- query = query + colon + "ref=" + drop_refFrames.SelectedItem;
- }
- else if (optNameToChange.Equals("bframes"))
- {
- string value = drop_bFrames.SelectedItem.ToString();
- if (!drop_bFrames.SelectedItem.ToString().Contains("Default"))
- query = query + colon + "bframes=" + value;
- }
- else if (optNameToChange.Equals("subq"))
- {
- string value = drop_subpixelMotionEstimation.SelectedItem.ToString();
- if (!drop_subpixelMotionEstimation.SelectedItem.ToString().Contains("Default"))
- {
- string[] val = value.Split(':');
- query = query + colon + "subq=" + val[0];
- }
- }
- else if (optNameToChange.Equals("trellis"))
- {
- switch (drop_trellis.SelectedIndex)
- {
- case 1: // Off
- query = query + colon + "trellis=0";
- break;
- case 2: // Encode Only
- query = query + colon + "trellis=1";
- break;
- case 3: // Always
- query = query + colon + "trellis=2";
- break;
- default:
- break;
- }
- }
-
- rtf_x264Query.Text = query;
- }
-
- /// <summary>
- /// Shows and hides controls based on the values of other controls.
- /// </summary>
- /// <param name="sender">The Sender</param>
- private void Animate(string sender)
- {
- /* Lots of situations to cover.
- - B-frames (when 0 turn of b-frame specific stuff, when < 2 disable b-pyramid)
- - CABAC (when 0 turn off trellis and psy-trel
- - subme (if under 6, turn off psy-rd and psy-trel)
- - trellis (if 0, turn off psy-trel)
- */
-
- switch (sender)
- {
- case "bframes":
- if (drop_bFrames.SelectedIndex == 1)
- {
- /* If the b-frame widget is at 1, the user has chosen
- not to use b-frames at all. So disable the options
- that can only be used when b-frames are enabled. */
- combo_pyrmidalBFrames.Visible = false;
- lbl_prymidalBframes.Visible = false;
- drop_directPrediction.Visible = false;
- lbl_direct_prediction.Visible = false;
-
- combo_pyrmidalBFrames.SelectedIndex = 0;
- drop_directPrediction.SelectedIndex = 0;
-
- drop_adaptBFrames.Visible = false;
- lbl_adaptBFrames.Visible = false;
- drop_adaptBFrames.SelectedIndex = 0;
- }
- else if (drop_bFrames.SelectedIndex == 2)
- {
- /* Only 1 b-frame? Disable b-pyramid. */
- combo_pyrmidalBFrames.Visible = false;
- lbl_prymidalBframes.Visible = false;
- combo_pyrmidalBFrames.SelectedIndex = 0;
-
- drop_directPrediction.Visible = true;
- lbl_direct_prediction.Visible = true;
-
- drop_adaptBFrames.Visible = true;
- lbl_adaptBFrames.Visible = true;
- }
- else
- {
- combo_pyrmidalBFrames.Visible = true;
- lbl_prymidalBframes.Visible = true;
- drop_directPrediction.Visible = true;
- lbl_direct_prediction.Visible = true;
-
- drop_adaptBFrames.Visible = true;
- lbl_adaptBFrames.Visible = true;
- }
- break;
- case "me": // Motion Estimation
- if (drop_MotionEstimationMethod.SelectedIndex < 3)
- {
- drop_MotionEstimationRange.Visible = false;
- lbl_merange.Visible = false;
- drop_MotionEstimationRange.SelectedIndex = 0;
- }
- else
- {
- drop_MotionEstimationRange.Visible = true;
- lbl_merange.Visible = true;
- }
- break;
- case "subq": // subme
- if (drop_subpixelMotionEstimation.SelectedIndex != 0 &&
- drop_subpixelMotionEstimation.SelectedIndex < 7)
- {
- slider_psyrd.Visible = false;
- slider_psyrd.Value = 10;
- lbl_psyrd.Visible = false;
-
- slider_psytrellis.Visible = false;
- slider_psytrellis.Value = 0;
- lbl_psytrellis.Visible = false;
- }
- else
- {
- slider_psyrd.Visible = true;
- lbl_psyrd.Visible = true;
-
- if (drop_trellis.SelectedIndex >= 2 && slider_psytrellis.Visible == false)
- {
- slider_psytrellis.Visible = true;
- lbl_psytrellis.Visible = true;
- }
- }
- break;
- case "trellis": // subme
- if (drop_trellis.SelectedIndex > 0 && drop_trellis.SelectedIndex < 2)
- {
- slider_psytrellis.Visible = false;
- slider_psytrellis.Value = 0;
- lbl_psytrellis.Visible = false;
- }
- else
- {
- if ((drop_subpixelMotionEstimation.SelectedIndex == 0 || drop_subpixelMotionEstimation.SelectedIndex >= 7) && slider_psytrellis.Visible == false)
- {
- slider_psytrellis.Visible = true;
- lbl_psytrellis.Visible = true;
- }
- }
- break;
- }
- }
-
- /* UI Events */
-
- private void widgetControlChanged(object sender, EventArgs e)
- {
- Control changedControlName = (Control) sender;
- string controlName = string.Empty;
-
- switch (changedControlName.Name.Trim())
- {
- case "drop_refFrames":
- controlName = "ref";
- break;
- case "drop_bFrames":
- controlName = "bframes";
- break;
- case "drop_directPrediction":
- controlName = "direct";
- break;
- case "check_weightp":
- controlName = "weightp";
- break;
- case "combo_pyrmidalBFrames":
- controlName = "b-pyramid";
- break;
- case "drop_MotionEstimationMethod":
- controlName = "me";
- break;
- case "drop_MotionEstimationRange":
- controlName = "merange";
- break;
- case "drop_subpixelMotionEstimation":
- controlName = "subq";
- break;
- case "drop_analysis":
- controlName = "analyse";
- break;
- case "check_8x8DCT":
- controlName = "8x8dct";
- break;
- case "drop_deblockAlpha":
- controlName = "deblock";
- break;
- case "drop_deblockBeta":
- controlName = "deblock";
- break;
- case "drop_trellis":
- controlName = "trellis";
- break;
- case "check_noDCTDecimate":
- controlName = "no-dct-decimate";
- break;
- case "check_Cabac":
- controlName = "cabac";
- break;
- case "slider_psyrd":
- controlName = "psy-rd";
- break;
- case "slider_psytrellis":
- controlName = "psy-rd";
- break;
- case "slider_adaptiveQuantStrength":
- controlName = "aq-strength";
- break;
- case "drop_adaptBFrames":
- controlName = "b-adapt";
- break;
- }
- OnX264WidgetChange(controlName);
- }
-
- private void rtf_x264Query_TextChanged(object sender, EventArgs e)
- {
- if (rtf_x264Query.Text.EndsWith("\n"))
- {
- string query = rtf_x264Query.Text.Replace("\n", string.Empty);
- Reset2Defaults();
- rtf_x264Query.Text = query;
- this.StandardizeOptString();
- this.SetCurrentSettingsInPanel();
-
- if (rtf_x264Query.Text == string.Empty)
- Reset2Defaults();
- }
- }
-
- private void btn_reset_Click(object sender, EventArgs e)
- {
- rtf_x264Query.Text = string.Empty;
- Reset2Defaults();
- }
- }
-}
\ No newline at end of file diff --git a/win/C#/Controls/x264Panel.resx b/win/C#/Controls/x264Panel.resx deleted file mode 100644 index 094e31ae0..000000000 --- a/win/C#/Controls/x264Panel.resx +++ /dev/null @@ -1,241 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>17, 17</value>
- </metadata>
- <data name="slider_psyrd.ToolTip" xml:space="preserve">
- <value>Psychovisual Rate Distortion Optimization sure is a mouthful, isn't it? Basically, it means x264 tries to retain detail, for better quality to the human eye,
-as opposed to trying to maximize quality the way a computer understands it, through signal-to-noise ratios that have trouble telling apart fine detail and noise.</value>
- </data>
- <data name="drop_adaptBFrames.ToolTip" xml:space="preserve">
- <value>x264 has a variety of algorithms to decide when to use B-frames and how many to use.
-
-Fast mode takes roughly the same amount of time no matter how many B-frames you specify. However, while fast, its decisions are often suboptimal.
-
-Optimal mode gets slower as the maximum number of B-Frames increases, but makes much more accurate decisions, especially when used with B-pyramid.</value>
- </data>
- <data name="check_Cabac.ToolTip" xml:space="preserve">
- <value>After the encoder has done its work, it has a bunch of data that needs to be compressed losslessly, similar to ZIP or RAR.
-H.264 provides two options for this: CAVLC and CABAC. CABAC decodes a lot slower but compresses significantly better (10-30%), especially at lower bitrates.
-If you're looking to minimize CPU requirements for video playback, disable this option.
-Baseline profile, as required for iPods and similar devices, requires CABAC to be disabled.</value>
- </data>
- <data name="check_noDCTDecimate.ToolTip" xml:space="preserve">
- <value>x264 normally zeroes out nearly-empty data blocks to save bits to be better used for some other purpose in the video.
-However, this can sometimes have slight negative effects on retention of subtle grain and dither.
-Don't touch this unless you're having banding issues or other such cases where you are having trouble keeping fine noise.</value>
- </data>
- <data name="drop_trellis.ToolTip" xml:space="preserve">
- <value>Trellis fine-tunes the rounding of transform coefficients to squeeze out 3-5% more compression at the cost of some speed.
-"Always" uses trellis not only during the main encoding process, but also during analysis, which improves compression even
-more, albeit at great speed cost.
-
-Trellis costs more speed at higher bitrates</value>
- </data>
- <data name="drop_deblockBeta.ToolTip" xml:space="preserve">
- <value>H.264 has a built-in deblocking filter that smooths out blocking artifacts after decoding each frame. This not only improves visual quality, but also helps compression significantly.
-The deblocking filter takes a lot of CPU power, so if you're looking to minimize CPU requirements for video playback, disable it.
-
-The deblocking filter has two adjustable parameters, \"strength\" and \"threshold\".
-The former controls how strong (or weak) the deblocker is, while the latter controls how many (or few) edges it applies to.
-Lower values mean less deblocking, higher values mean more deblocking. The default is 0 (normal strength) for both parameters.</value>
- </data>
- <data name="drop_deblockAlpha.ToolTip" xml:space="preserve">
- <value>H.264 has a built-in deblocking filter that smooths out blocking artifacts after decoding each frame. This not only improves visual quality, but also helps compression significantly.
-The deblocking filter takes a lot of CPU power, so if you're looking to minimize CPU requirements for video playback, disable it.
-
-The deblocking filter has two adjustable parameters, \"strength\" and \"threshold\".
-The former controls how strong (or weak) the deblocker is, while the latter controls how many (or few) edges it applies to.
-Lower values mean less deblocking, higher values mean more deblocking. The default is 0 (normal strength) for both parameters.</value>
- </data>
- <data name="check_8x8DCT.ToolTip" xml:space="preserve">
- <value>The 8x8 transform is the single most useful feature of x264 in terms of compression-per-speed.
-It improves compression by at least 5% at a very small speed cost and may provide an unusually high visual quality benefit compared to its compression gain.
-However, it requires High Profile, which many devices may not support.</value>
- </data>
- <data name="drop_analysis.ToolTip" xml:space="preserve">
- <value>Mode decision picks from a variety of options to make its decision: this option chooses what options those are.
-Fewer partitions to check means faster encoding, at the cost of worse decisions, since the best option might have been one that was turned off.</value>
- </data>
- <data name="drop_subpixelMotionEstimation.ToolTip" xml:space="preserve">
- <value>This setting controls both subpixel-precision motion estimation and mode decision methods.
-
-Subpixel motion estimation is used for refining motion estimates beyond mere pixel accuracy, improving compression.
-
-Mode decision is the method used to choose how to encode each block of the frame: a very important decision.
-
-SAD is the fastest method, followed by SATD, RD, RD refinement, and the slowest, QPRD.
-6 or higher is strongly recommended: Psy-RD, a very powerful psy optimization that helps retain detail, requires RD.
-10, the most powerful and slowest option, requires trellis=2.</value>
- </data>
- <data name="drop_MotionEstimationRange.ToolTip" xml:space="preserve">
- <value>This is the distance x264 searches from its best guess at the motion of a block in order to try to find its actual motion.
-Doesn't apply to Diamond or Hexagon search options.
-The default is fine for most content, but extremely high motion video, especially at HD resolutions, may benefit from higher ranges, albeit at a high speed cost.</value>
- </data>
- <data name="drop_MotionEstimationMethod.ToolTip" xml:space="preserve">
- <value>Controls the motion estimation method. Motion estimation is how the encoder estimates how each block of pixels in a frame has moved.
-A better motion search method improves compression at the cost of speed.
-
-Diamond: performs an extremely fast and simple search using a diamond pattern.
-
-Hexagon: performs a somewhat more effective but slightly slower search using a hexagon pattern.
-
-Uneven Multi-Hex: performs a very wide search using a variety of patterns, more accurately capturing complex motion.
-
-Exhaustive: performs a \"dumb\" search of every pixel in a wide area. Significantly slower for only a small compression gain.
-
-Transformed Exhaustive: Like exhaustive, but makes even more accurate decisions. Accordingly, somewhat slower, also for only a small improvement.</value>
- </data>
- <data name="drop_directPrediction.ToolTip" xml:space="preserve">
- <value>H.264 allows for two different prediction modes, spatial and temporal, in B-frames.
-
-Spatial, the default, is almost always better, but temporal is sometimes useful too.
-
-x264 can, at the cost of a small amount of speed (and accordingly for a small compression gain), adaptively select which is better for each particular frame.</value>
- </data>
- <data name="drop_bFrames.ToolTip" xml:space="preserve">
- <value>Sane values are ~2-5.
-This specifies the maximum number of sequential B-frames that the encoder can use.
- Large numbers generally won't help significantly unless Adaptive B-frames is set to Optimal.
-Cel-animated source material and B-pyramid also significantly increase the usefulness of larger values.
-Baseline profile, as required for iPods and similar devices, requires B-frames to be set to 0 (off).</value>
- </data>
- <data name="drop_refFrames.ToolTip" xml:space="preserve">
- <value>Sane values are ~1-6.
-The more you add, the better the compression, but the slower the encode.
-Cel animation tends to benefit from more reference frames a lot more than film content.
-Note that many hardware devices have limitations on the number of supported reference frames, so if you're encoding for a handheld or standalone player,
-don't touch this unless you're absolutely sure you know what you're doing!</value>
- </data>
- <data name="check_weightp.ToolTip" xml:space="preserve">
- <value>Performs extra analysis to decide upon weighting parameters for each frame.
-This improves overall compression slightly and improves the quality of fades greatly.
-Baseline profile, as required for iPods and similar devices, requires weighted P-frame prediction to be disabled.
-Note that some devices and players, even those that support Main Profile,
-may have problems with Weighted P-frame prediction: the Apple TV is completely incompatible with it, for example.</value>
- </data>
- <data name="combo_pyrmidalBFrames.ToolTip" xml:space="preserve">
- <value>B-pyramid improves compression by creating a pyramidal structure (hence the name) of B-frames, allowing B-frames to
-reference each other to improve compression.
-
-Requires Max B-frames greater than 1; optimal adaptive B-frames is strongly recommended for full compression benefit.</value>
- </data>
-</root>
\ No newline at end of file |