// All the Main Window GUI options\r
#region Varibles\r
\r
+ #region Source\r
private string q_source;\r
/// <summary>\r
/// Returns a String \r
return this.q_source;\r
}\r
}\r
-\r
- private string q_destination;\r
+ private int q_dvdTitle;\r
/// <summary>\r
- /// Returns a String \r
- /// Full path of the destination.\r
+ /// Returns an Integer\r
+ /// DVD Title number.\r
/// </summary>\r
- public string Destination\r
+ public int DVDTitle\r
{\r
get\r
{\r
- return this.q_destination;\r
+ return this.q_dvdTitle;\r
}\r
}\r
\r
- private string q_format;\r
+ private int q_chaptersStart;\r
/// <summary>\r
- /// Returns a String \r
- /// Full path of the destination.\r
+ /// Returns an Int\r
+ /// DVD Chapter number or chapter range.\r
/// </summary>\r
- public string Format\r
+ public int DVDChapterStart\r
{\r
get\r
{\r
- return this.q_format;\r
+ return this.q_chaptersStart;\r
}\r
}\r
\r
- private int q_dvdTitle;\r
+ private int q_chaptersFinish;\r
/// <summary>\r
- /// Returns an Integer\r
- /// DVD Title number.\r
+ /// Returns an Int\r
+ /// DVD Chapter number or chapter range.\r
/// </summary>\r
- public int DVDTitle\r
+ public int DVDChapterFinish\r
{\r
get\r
{\r
- return this.q_dvdTitle;\r
+ return this.q_chaptersFinish;\r
}\r
}\r
+#endregion\r
\r
- private int q_chaptersStart;\r
+ #region Destination\r
+\r
+ private string q_destination;\r
/// <summary>\r
- /// Returns an Int\r
- /// DVD Chapter number or chapter range.\r
+ /// Returns a String \r
+ /// Full path of the destination.\r
/// </summary>\r
- public int DVDChapterStart\r
+ public string Destination\r
{\r
get\r
{\r
- return this.q_chaptersStart;\r
+ return this.q_destination;\r
}\r
}\r
\r
- private int q_chaptersFinish;\r
+ private string q_format;\r
/// <summary>\r
- /// Returns an Int\r
- /// DVD Chapter number or chapter range.\r
+ /// Returns a String \r
+ /// Full path of the destination.\r
/// </summary>\r
- public int DVDChapterFinish\r
+ public string Format\r
{\r
get\r
{\r
- return this.q_chaptersFinish;\r
+ return this.q_format;\r
}\r
}\r
\r
return this.q_audioEncoder;\r
}\r
}\r
+#endregion\r
\r
+ #region Picture Settings\r
private int q_videoWidth;\r
/// <summary>\r
/// Returns an Int\r
return this.q_chapterMarkers;\r
}\r
}\r
+ #endregion\r
\r
+ #region Video Settings\r
private Boolean q_grayscale;\r
/// <summary>\r
/// Returns a boolean to indicate wither Grayscale is on or off.\r
return this.q_crf;\r
}\r
}\r
+ #endregion\r
\r
+ #region Audio Settings\r
private string q_audioBitrate;\r
/// <summary>\r
/// Returns a string with the audio bitrate\r
}\r
}\r
\r
+ private double q_drc;\r
+ /// <summary>\r
+ /// Returns a string with the selected subtitle track\r
+ /// </summary>\r
+ public double DRC\r
+ {\r
+ get\r
+ {\r
+ return this.q_drc;\r
+ }\r
+ }\r
+\r
+\r
private string q_subtitles;\r
/// <summary>\r
/// Returns a string with the selected subtitle track\r
}\r
}\r
\r
+ #endregion\r
+\r
+ #region Other\r
private string q_h264;\r
/// <summary>\r
/// Returns a string with the Advanced H264 query string\r
}\r
#endregion\r
\r
+ #endregion\r
+\r
// Takes in a query which can be in any order and parses it. All varibles are then set so they can be used elsewhere.\r
public static QueryParser Parse(String input)\r
{\r
Match audioTrack1 = Regex.Match(input, @"-a ([0-9]*)");\r
Match audioTrack2 = Regex.Match(input, @"-a ([0-9]*),([0-9]*)");\r
Match forcedSubtitles = Regex.Match(input, @"-F");\r
+ Match drc = Regex.Match(input, @"-D ([0-9.]*)");\r
\r
//H264 Tab\r
Match x264 = Regex.Match(input, @"-x ([,a-zA-Z0-9=:-]*)");\r
thisQuery.q_subtitles = "None";\r
}\r
\r
+ if (drc.Success != false)\r
+ {\r
+ string value = drc.ToString().Replace("-D ", "");\r
+ thisQuery.q_drc = double.Parse(value);\r
+ }\r
+ else\r
+ {\r
+ thisQuery.q_drc = 0;\r
+ }\r
+\r
thisQuery.q_forcedSubs = forcedSubtitles.Success;\r
\r
#endregion\r
this.groupBox_dest = new System.Windows.Forms.GroupBox();\r
this.groupBox2 = new System.Windows.Forms.GroupBox();\r
this.treeView_presets = new System.Windows.Forms.TreeView();\r
+ this.slider_drc = new System.Windows.Forms.TrackBar();\r
+ this.check_drc = new System.Windows.Forms.CheckBox();\r
+ this.lbl_drc = new System.Windows.Forms.Label();\r
Label38 = new System.Windows.Forms.Label();\r
((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).BeginInit();\r
this.frmMainMenu.SuspendLayout();\r
this.advancedOptions.SuspendLayout();\r
this.groupBox_dest.SuspendLayout();\r
this.groupBox2.SuspendLayout();\r
+ ((System.ComponentModel.ISupportInitialize)(this.slider_drc)).BeginInit();\r
this.SuspendLayout();\r
// \r
// Label38\r
"112",\r
"128",\r
"160"});\r
- this.drp_audioBitrate.Location = new System.Drawing.Point(113, 131);\r
+ this.drp_audioBitrate.Location = new System.Drawing.Point(113, 120);\r
this.drp_audioBitrate.Name = "drp_audioBitrate";\r
this.drp_audioBitrate.Size = new System.Drawing.Size(101, 21);\r
this.drp_audioBitrate.TabIndex = 5;\r
"32",\r
"24",\r
"22.05"});\r
- this.drp_audioSampleRate.Location = new System.Drawing.Point(366, 131);\r
+ this.drp_audioSampleRate.Location = new System.Drawing.Point(366, 120);\r
this.drp_audioSampleRate.Name = "drp_audioSampleRate";\r
this.drp_audioSampleRate.Size = new System.Drawing.Size(101, 21);\r
this.drp_audioSampleRate.TabIndex = 6;\r
this.drp_subtitle.Items.AddRange(new object[] {\r
"None",\r
"Autoselect"});\r
- this.drp_subtitle.Location = new System.Drawing.Point(113, 200);\r
+ this.drp_subtitle.Location = new System.Drawing.Point(111, 231);\r
this.drp_subtitle.Name = "drp_subtitle";\r
this.drp_subtitle.Size = new System.Drawing.Size(213, 21);\r
this.drp_subtitle.TabIndex = 12;\r
// TabPage2\r
// \r
this.TabPage2.BackColor = System.Drawing.SystemColors.ControlLight;\r
+ this.TabPage2.Controls.Add(this.lbl_drc);\r
+ this.TabPage2.Controls.Add(this.check_drc);\r
+ this.TabPage2.Controls.Add(this.slider_drc);\r
this.TabPage2.Controls.Add(this.check_forced);\r
this.TabPage2.Controls.Add(this.drp_track2Audio);\r
this.TabPage2.Controls.Add(this.label28);\r
// \r
this.check_forced.AutoSize = true;\r
this.check_forced.Enabled = false;\r
- this.check_forced.Location = new System.Drawing.Point(332, 202);\r
+ this.check_forced.Location = new System.Drawing.Point(330, 233);\r
this.check_forced.Name = "check_forced";\r
this.check_forced.Size = new System.Drawing.Size(147, 17);\r
this.check_forced.TabIndex = 17;\r
this.Label19.AutoSize = true;\r
this.Label19.BackColor = System.Drawing.Color.Transparent;\r
this.Label19.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.Label19.Location = new System.Drawing.Point(13, 170);\r
+ this.Label19.Location = new System.Drawing.Point(11, 210);\r
this.Label19.Name = "Label19";\r
this.Label19.Size = new System.Drawing.Size(64, 13);\r
this.Label19.TabIndex = 10;\r
this.Label20.AutoSize = true;\r
this.Label20.BackColor = System.Drawing.Color.Transparent;\r
this.Label20.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.Label20.Location = new System.Drawing.Point(13, 203);\r
+ this.Label20.Location = new System.Drawing.Point(11, 234);\r
this.Label20.Name = "Label20";\r
this.Label20.Size = new System.Drawing.Size(61, 13);\r
this.Label20.TabIndex = 11;\r
this.Label5.AutoSize = true;\r
this.Label5.BackColor = System.Drawing.Color.Transparent;\r
this.Label5.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.Label5.Location = new System.Drawing.Point(13, 105);\r
+ this.Label5.Location = new System.Drawing.Point(13, 94);\r
this.Label5.Name = "Label5";\r
this.Label5.Size = new System.Drawing.Size(94, 13);\r
this.Label5.TabIndex = 0;\r
this.Label16.AutoSize = true;\r
this.Label16.BackColor = System.Drawing.Color.Transparent;\r
this.Label16.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.Label16.Location = new System.Drawing.Point(13, 134);\r
+ this.Label16.Location = new System.Drawing.Point(13, 123);\r
this.Label16.Name = "Label16";\r
this.Label16.Size = new System.Drawing.Size(91, 13);\r
this.Label16.TabIndex = 1;\r
this.Label18.AutoSize = true;\r
this.Label18.BackColor = System.Drawing.Color.Transparent;\r
this.Label18.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.Label18.Location = new System.Drawing.Point(240, 134);\r
+ this.Label18.Location = new System.Drawing.Point(240, 123);\r
this.Label18.Name = "Label18";\r
this.Label18.Size = new System.Drawing.Size(120, 13);\r
this.Label18.TabIndex = 2;\r
this.treeView_presets.TabIndex = 2;\r
this.treeView_presets.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView_presets_AfterSelect);\r
// \r
+ // slider_drc\r
+ // \r
+ this.slider_drc.Enabled = false;\r
+ this.slider_drc.LargeChange = 1;\r
+ this.slider_drc.Location = new System.Drawing.Point(259, 159);\r
+ this.slider_drc.Maximum = 30;\r
+ this.slider_drc.Name = "slider_drc";\r
+ this.slider_drc.Size = new System.Drawing.Size(167, 42);\r
+ this.slider_drc.TabIndex = 18;\r
+ this.slider_drc.TickFrequency = 2;\r
+ this.ToolTip.SetToolTip(this.slider_drc, "Dynamic Range Compression");\r
+ this.slider_drc.Scroll += new System.EventHandler(this.slider_drc_Scroll);\r
+ // \r
+ // check_drc\r
+ // \r
+ this.check_drc.AutoSize = true;\r
+ this.check_drc.Location = new System.Drawing.Point(16, 163);\r
+ this.check_drc.Name = "check_drc";\r
+ this.check_drc.Size = new System.Drawing.Size(237, 17);\r
+ this.check_drc.TabIndex = 19;\r
+ this.check_drc.Text = "Enable Dynamic Range Compression";\r
+ this.check_drc.UseVisualStyleBackColor = true;\r
+ this.check_drc.CheckedChanged += new System.EventHandler(this.check_drc_CheckedChanged);\r
+ // \r
+ // lbl_drc\r
+ // \r
+ this.lbl_drc.AutoSize = true;\r
+ this.lbl_drc.BackColor = System.Drawing.Color.Transparent;\r
+ this.lbl_drc.Enabled = false;\r
+ this.lbl_drc.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+ this.lbl_drc.Location = new System.Drawing.Point(432, 164);\r
+ this.lbl_drc.Name = "lbl_drc";\r
+ this.lbl_drc.Size = new System.Drawing.Size(56, 13);\r
+ this.lbl_drc.TabIndex = 20;\r
+ this.lbl_drc.Text = "Disabled";\r
+ // \r
// frmMain\r
// \r
this.AllowDrop = true;\r
this.groupBox_dest.ResumeLayout(false);\r
this.groupBox_dest.PerformLayout();\r
this.groupBox2.ResumeLayout(false);\r
+ ((System.ComponentModel.ISupportInitialize)(this.slider_drc)).EndInit();\r
this.ResumeLayout(false);\r
this.PerformLayout();\r
\r
private System.Windows.Forms.CheckBox check_forced;\r
internal System.Windows.Forms.ComboBox drp_track2Audio;\r
internal System.Windows.Forms.Label label28;\r
+ internal System.Windows.Forms.TrackBar slider_drc;\r
+ private System.Windows.Forms.CheckBox check_drc;\r
+ internal System.Windows.Forms.Label lbl_drc;\r
\r
}\r
}
\ No newline at end of file
}\r
}\r
\r
+ private void slider_drc_Scroll(object sender, EventArgs e)\r
+ {\r
+ double value = slider_drc.Value / 10.0;\r
+ value++;\r
+\r
+ lbl_drc.Text = value.ToString();\r
+ }\r
+\r
+ private void check_drc_CheckedChanged(object sender, EventArgs e)\r
+ {\r
+ if (check_drc.CheckState == CheckState.Checked)\r
+ {\r
+ slider_drc.Enabled = true;\r
+ lbl_drc.Enabled = true;\r
+ lbl_drc.Text = "1";\r
+ }\r
+ else\r
+ {\r
+ slider_drc.Enabled = false;\r
+ slider_drc.Value = 0;\r
+ lbl_drc.Enabled = false;\r
+ lbl_drc.Text = "Disabled";\r
+ }\r
+ }\r
+\r
private void drp_subtitle_SelectedIndexChanged(object sender, EventArgs e)\r
{\r
if (drp_subtitle.Text.Contains("None"))\r
// Preset Selection\r
private void treeView_presets_AfterSelect(object sender, TreeViewEventArgs e)\r
{\r
-\r
-\r
string selectedPreset = null;\r
selectedPreset = treeView_presets.SelectedNode.Text;\r
\r
string preset = presetInput.ReadLine().Replace("+ ", "");\r
Regex r = new Regex("(: )"); // Split on hyphens. \r
string[] presetName = r.Split(preset);\r
+ \r
\r
if (selectedPreset == presetName[0])\r
{\r
string subtitles = drp_subtitle.Text;\r
string subScan = "";\r
string forced = "";\r
+ string drc = "";\r
\r
if (audioBitrate != "")\r
audioBitrate = " -B " + audioBitrate;\r
}\r
\r
if (check_forced.Checked)\r
- forced = "-F";\r
+ forced = " -F ";\r
\r
- string queryAudioSettings = audioBitrate + audioSampleRate + audioChannels + SixChannelAudio + subScan + subtitles + forced;\r
+ if (check_drc.Checked)\r
+ {\r
+ double value = slider_drc.Value / 10.0;\r
+ value++;\r
+\r
+ drc = " -D " + value;\r
+ }\r
+\r
+ string queryAudioSettings = audioBitrate + audioSampleRate + drc + audioChannels + SixChannelAudio + subScan + subtitles + forced;\r
#endregion\r
\r
// H264 Tab\r
}\r
else\r
check_forced.CheckState = CheckState.Unchecked;\r
+\r
+ if (presetQuery.DRC != 0)\r
+ {\r
+ check_drc.Checked = true;\r
+ double value = presetQuery.DRC * 10;\r
+ slider_drc.Value = int.Parse(value.ToString());\r
+ lbl_drc.Text = presetQuery.DRC.ToString();\r
+\r
+ }\r
+ else\r
+ check_drc.Checked = false;\r
+\r
#endregion\r
\r
// H264 Tab & Preset Name\r
\r
#endregion\r
\r
-\r
-\r
-\r
-\r
-\r
// This is the END of the road ------------------------------------------------------------------------------\r
}\r
}
\ No newline at end of file