summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-01-14 18:46:17 +0000
committersr55 <[email protected]>2012-01-14 18:46:17 +0000
commit01c8ab3532c0c30748fd3e7a0376e3f32928c72f (patch)
tree84778f7508a83d66ee229d142f5478f29a6d25a7 /win
parente5d16119f267eca2d9e294541aa6e9307c021d19 (diff)
WinGui: Add an option to hide the Allowed Passthru checkboxes. (Hidden by default). Fixed an issue where the ScannedTrack was getting overwritten when switching between presets.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4407 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/CS/Controls/AudioPanel.Designer.cs202
-rw-r--r--win/CS/Controls/AudioPanel.cs26
-rw-r--r--win/CS/Controls/AudioPanel.resx14
-rw-r--r--win/CS/Functions/QueryGenerator.cs51
-rw-r--r--win/CS/HandBrakeWPF/UserSettingConstants.cs1
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs23
-rw-r--r--win/CS/HandBrakeWPF/Views/OptionsView.xaml9
-rw-r--r--win/CS/HandBrakeWPF/defaultsettings.xml8
-rw-r--r--win/CS/UserSettingConstants.cs1
-rw-r--r--win/CS/defaultsettings.xml8
-rw-r--r--win/CS/frmOptions.Designer.cs48
-rw-r--r--win/CS/frmOptions.cs10
12 files changed, 266 insertions, 135 deletions
diff --git a/win/CS/Controls/AudioPanel.Designer.cs b/win/CS/Controls/AudioPanel.Designer.cs
index 69c990dee..a9c8e56e1 100644
--- a/win/CS/Controls/AudioPanel.Designer.cs
+++ b/win/CS/Controls/AudioPanel.Designer.cs
@@ -60,6 +60,13 @@ namespace Handbrake.Controls
this.Gain = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ToolTips = new System.Windows.Forms.ToolTip(this.components);
this.drp_passthruFallback = new System.Windows.Forms.ComboBox();
+ this.gb_autoPassthru = new System.Windows.Forms.GroupBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.check_dtshd = new System.Windows.Forms.CheckBox();
+ this.check_dts = new System.Windows.Forms.CheckBox();
+ this.check_ac3 = new System.Windows.Forms.CheckBox();
+ this.check_aac = new System.Windows.Forms.CheckBox();
+ this.check_mp3 = new System.Windows.Forms.CheckBox();
this.btn_AdvancedAudio = new System.Windows.Forms.Button();
this.btn_addAudioTrack = new wyDay.Controls.SplitButton();
this.AddTrackMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
@@ -67,18 +74,11 @@ namespace Handbrake.Controls
this.btn_RemoveTrack = new wyDay.Controls.SplitButton();
this.RemoveTrackMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.mnu_ClearAll = new System.Windows.Forms.ToolStripMenuItem();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.label1 = new System.Windows.Forms.Label();
- this.check_dtshd = new System.Windows.Forms.CheckBox();
- this.check_dts = new System.Windows.Forms.CheckBox();
- this.check_ac3 = new System.Windows.Forms.CheckBox();
- this.check_aac = new System.Windows.Forms.CheckBox();
- this.check_mp3 = new System.Windows.Forms.CheckBox();
this.audioMenu.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.audioList)).BeginInit();
+ this.gb_autoPassthru.SuspendLayout();
this.AddTrackMenu.SuspendLayout();
this.RemoveTrackMenu.SuspendLayout();
- this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// audioMenu
@@ -362,95 +362,23 @@ namespace Handbrake.Controls
this.ToolTips.SetToolTip(this.drp_passthruFallback, "The Audio Encoder that will be used, if there is no suitable passthru option.");
this.drp_passthruFallback.SelectedIndexChanged += new System.EventHandler(this.drp_passthruFallback_SelectedIndexChanged);
//
- // btn_AdvancedAudio
- //
- this.btn_AdvancedAudio.BackColor = System.Drawing.Color.Transparent;
- this.btn_AdvancedAudio.Enabled = false;
- this.btn_AdvancedAudio.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.btn_AdvancedAudio.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_AdvancedAudio.Location = new System.Drawing.Point(607, 65);
- this.btn_AdvancedAudio.Name = "btn_AdvancedAudio";
- this.btn_AdvancedAudio.Size = new System.Drawing.Size(94, 23);
- this.btn_AdvancedAudio.TabIndex = 70;
- this.btn_AdvancedAudio.Text = "Advanced";
- this.btn_AdvancedAudio.UseVisualStyleBackColor = false;
- this.btn_AdvancedAudio.Click += new System.EventHandler(this.btn_AdvancedAudio_Click);
- //
- // btn_addAudioTrack
- //
- this.btn_addAudioTrack.AutoSize = true;
- this.btn_addAudioTrack.ContextMenuStrip = this.AddTrackMenu;
- 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.DarkOrange;
- this.btn_addAudioTrack.Location = new System.Drawing.Point(16, 37);
- this.btn_addAudioTrack.Name = "btn_addAudioTrack";
- this.btn_addAudioTrack.Size = new System.Drawing.Size(92, 23);
- this.btn_addAudioTrack.SplitMenuStrip = this.AddTrackMenu;
- this.btn_addAudioTrack.TabIndex = 72;
- this.btn_addAudioTrack.Text = "Add Track";
- this.btn_addAudioTrack.UseVisualStyleBackColor = true;
- this.btn_addAudioTrack.Click += new System.EventHandler(this.AddAudioTrack_Click);
- //
- // AddTrackMenu
- //
- this.AddTrackMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.mnu_AddAll});
- this.AddTrackMenu.Name = "audioMenu";
- this.AddTrackMenu.Size = new System.Drawing.Size(114, 26);
- //
- // mnu_AddAll
- //
- this.mnu_AddAll.Name = "mnu_AddAll";
- this.mnu_AddAll.Size = new System.Drawing.Size(113, 22);
- this.mnu_AddAll.Text = "Add All";
- this.mnu_AddAll.Click += new System.EventHandler(this.mnu_AddAll_Click);
- //
- // btn_RemoveTrack
- //
- this.btn_RemoveTrack.AutoSize = true;
- this.btn_RemoveTrack.ContextMenuStrip = this.RemoveTrackMenu;
- this.btn_RemoveTrack.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.btn_RemoveTrack.ForeColor = System.Drawing.Color.DarkOrange;
- this.btn_RemoveTrack.Location = new System.Drawing.Point(114, 37);
- this.btn_RemoveTrack.Name = "btn_RemoveTrack";
- this.btn_RemoveTrack.Size = new System.Drawing.Size(82, 23);
- this.btn_RemoveTrack.SplitMenuStrip = this.RemoveTrackMenu;
- this.btn_RemoveTrack.TabIndex = 73;
- this.btn_RemoveTrack.Text = "Remove";
- this.btn_RemoveTrack.UseVisualStyleBackColor = true;
- this.btn_RemoveTrack.Click += new System.EventHandler(this.Btn_remove_track_click);
- //
- // RemoveTrackMenu
- //
- this.RemoveTrackMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.mnu_ClearAll});
- this.RemoveTrackMenu.Name = "audioMenu";
- this.RemoveTrackMenu.Size = new System.Drawing.Size(119, 26);
- //
- // mnu_ClearAll
- //
- this.mnu_ClearAll.Name = "mnu_ClearAll";
- this.mnu_ClearAll.Size = new System.Drawing.Size(118, 22);
- this.mnu_ClearAll.Text = "Clear All";
- this.mnu_ClearAll.Click += new System.EventHandler(this.Mnu_clear_all_click);
- //
- // groupBox1
- //
- this.groupBox1.Controls.Add(this.label1);
- this.groupBox1.Controls.Add(this.drp_passthruFallback);
- this.groupBox1.Controls.Add(this.check_dtshd);
- this.groupBox1.Controls.Add(this.check_dts);
- this.groupBox1.Controls.Add(this.check_ac3);
- this.groupBox1.Controls.Add(this.check_aac);
- this.groupBox1.Controls.Add(this.check_mp3);
- this.groupBox1.Font = new System.Drawing.Font("Tahoma", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.groupBox1.Location = new System.Drawing.Point(256, 19);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(445, 40);
- this.groupBox1.TabIndex = 74;
- this.groupBox1.TabStop = false;
- this.groupBox1.Text = "Auto Passthru";
- this.ToolTips.SetToolTip(this.groupBox1, resources.GetString("groupBox1.ToolTip"));
+ // gb_autoPassthru
+ //
+ this.gb_autoPassthru.Controls.Add(this.label1);
+ this.gb_autoPassthru.Controls.Add(this.drp_passthruFallback);
+ this.gb_autoPassthru.Controls.Add(this.check_dtshd);
+ this.gb_autoPassthru.Controls.Add(this.check_dts);
+ this.gb_autoPassthru.Controls.Add(this.check_ac3);
+ this.gb_autoPassthru.Controls.Add(this.check_aac);
+ this.gb_autoPassthru.Controls.Add(this.check_mp3);
+ this.gb_autoPassthru.Font = new System.Drawing.Font("Tahoma", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.gb_autoPassthru.Location = new System.Drawing.Point(256, 19);
+ this.gb_autoPassthru.Name = "gb_autoPassthru";
+ this.gb_autoPassthru.Size = new System.Drawing.Size(445, 40);
+ this.gb_autoPassthru.TabIndex = 74;
+ this.gb_autoPassthru.TabStop = false;
+ this.gb_autoPassthru.Text = "Auto Passthru";
+ this.ToolTips.SetToolTip(this.gb_autoPassthru, resources.GetString("gb_autoPassthru.ToolTip"));
//
// label1
//
@@ -527,11 +455,83 @@ namespace Handbrake.Controls
this.check_mp3.UseVisualStyleBackColor = true;
this.check_mp3.CheckedChanged += new System.EventHandler(this.autoPassthru_CheckedChanged);
//
+ // btn_AdvancedAudio
+ //
+ this.btn_AdvancedAudio.BackColor = System.Drawing.Color.Transparent;
+ this.btn_AdvancedAudio.Enabled = false;
+ this.btn_AdvancedAudio.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btn_AdvancedAudio.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
+ this.btn_AdvancedAudio.Location = new System.Drawing.Point(607, 65);
+ this.btn_AdvancedAudio.Name = "btn_AdvancedAudio";
+ this.btn_AdvancedAudio.Size = new System.Drawing.Size(94, 23);
+ this.btn_AdvancedAudio.TabIndex = 70;
+ this.btn_AdvancedAudio.Text = "Advanced";
+ this.btn_AdvancedAudio.UseVisualStyleBackColor = false;
+ this.btn_AdvancedAudio.Click += new System.EventHandler(this.btn_AdvancedAudio_Click);
+ //
+ // btn_addAudioTrack
+ //
+ this.btn_addAudioTrack.AutoSize = true;
+ this.btn_addAudioTrack.ContextMenuStrip = this.AddTrackMenu;
+ 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.DarkOrange;
+ this.btn_addAudioTrack.Location = new System.Drawing.Point(16, 37);
+ this.btn_addAudioTrack.Name = "btn_addAudioTrack";
+ this.btn_addAudioTrack.Size = new System.Drawing.Size(92, 23);
+ this.btn_addAudioTrack.SplitMenuStrip = this.AddTrackMenu;
+ this.btn_addAudioTrack.TabIndex = 72;
+ this.btn_addAudioTrack.Text = "Add Track";
+ this.btn_addAudioTrack.UseVisualStyleBackColor = true;
+ this.btn_addAudioTrack.Click += new System.EventHandler(this.AddAudioTrack_Click);
+ //
+ // AddTrackMenu
+ //
+ this.AddTrackMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.mnu_AddAll});
+ this.AddTrackMenu.Name = "audioMenu";
+ this.AddTrackMenu.Size = new System.Drawing.Size(114, 26);
+ //
+ // mnu_AddAll
+ //
+ this.mnu_AddAll.Name = "mnu_AddAll";
+ this.mnu_AddAll.Size = new System.Drawing.Size(113, 22);
+ this.mnu_AddAll.Text = "Add All";
+ this.mnu_AddAll.Click += new System.EventHandler(this.mnu_AddAll_Click);
+ //
+ // btn_RemoveTrack
+ //
+ this.btn_RemoveTrack.AutoSize = true;
+ this.btn_RemoveTrack.ContextMenuStrip = this.RemoveTrackMenu;
+ this.btn_RemoveTrack.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btn_RemoveTrack.ForeColor = System.Drawing.Color.DarkOrange;
+ this.btn_RemoveTrack.Location = new System.Drawing.Point(114, 37);
+ this.btn_RemoveTrack.Name = "btn_RemoveTrack";
+ this.btn_RemoveTrack.Size = new System.Drawing.Size(82, 23);
+ this.btn_RemoveTrack.SplitMenuStrip = this.RemoveTrackMenu;
+ this.btn_RemoveTrack.TabIndex = 73;
+ this.btn_RemoveTrack.Text = "Remove";
+ this.btn_RemoveTrack.UseVisualStyleBackColor = true;
+ this.btn_RemoveTrack.Click += new System.EventHandler(this.Btn_remove_track_click);
+ //
+ // RemoveTrackMenu
+ //
+ this.RemoveTrackMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.mnu_ClearAll});
+ this.RemoveTrackMenu.Name = "audioMenu";
+ this.RemoveTrackMenu.Size = new System.Drawing.Size(119, 26);
+ //
+ // mnu_ClearAll
+ //
+ this.mnu_ClearAll.Name = "mnu_ClearAll";
+ this.mnu_ClearAll.Size = new System.Drawing.Size(118, 22);
+ this.mnu_ClearAll.Text = "Clear All";
+ this.mnu_ClearAll.Click += new System.EventHandler(this.Mnu_clear_all_click);
+ //
// AudioPanel
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.BackColor = System.Drawing.Color.Transparent;
- this.Controls.Add(this.groupBox1);
+ this.Controls.Add(this.gb_autoPassthru);
this.Controls.Add(this.drp_audioTrack);
this.Controls.Add(this.btn_AdvancedAudio);
this.Controls.Add(this.drp_audioSample);
@@ -547,10 +547,10 @@ namespace Handbrake.Controls
this.Size = new System.Drawing.Size(720, 310);
this.audioMenu.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.audioList)).EndInit();
+ this.gb_autoPassthru.ResumeLayout(false);
+ this.gb_autoPassthru.PerformLayout();
this.AddTrackMenu.ResumeLayout(false);
this.RemoveTrackMenu.ResumeLayout(false);
- this.groupBox1.ResumeLayout(false);
- this.groupBox1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@@ -588,7 +588,7 @@ namespace Handbrake.Controls
private System.Windows.Forms.DataGridViewTextBoxColumn Bitrate;
private System.Windows.Forms.DataGridViewTextBoxColumn DRC;
private System.Windows.Forms.DataGridViewTextBoxColumn Gain;
- private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.GroupBox gb_autoPassthru;
private System.Windows.Forms.CheckBox check_dtshd;
private System.Windows.Forms.CheckBox check_dts;
private System.Windows.Forms.CheckBox check_ac3;
diff --git a/win/CS/Controls/AudioPanel.cs b/win/CS/Controls/AudioPanel.cs
index c7a055c9f..2d7b3df7c 100644
--- a/win/CS/Controls/AudioPanel.cs
+++ b/win/CS/Controls/AudioPanel.cs
@@ -82,6 +82,7 @@ namespace Handbrake.Controls
// Setup Auto-Passthru Settings
this.PassthruSettings = new AllowedPassthru();
this.SetPassthruSettings(this.PassthruSettings);
+ this.gb_autoPassthru.Visible = this.UserSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAdvancedAudioPassthruOpts);
}
/// <summary>
@@ -155,7 +156,6 @@ namespace Handbrake.Controls
drp_passthruFallback.Items.Add(EnumHelper<AudioEncoder>.GetDisplay(AudioEncoder.ffflac));
}
-
if (!drp_audioEncoder.Items.Contains(oldval))
drp_audioEncoder.SelectedIndex = 0;
else
@@ -190,19 +190,29 @@ namespace Handbrake.Controls
this.PassthruSettings = preset.AudioPassthruSettings != null ? new AllowedPassthru(preset.AudioPassthruSettings) : new AllowedPassthru(false);
this.SetPassthruSettings(this.PassthruSettings);
- if (tracks == null || (drp_audioTrack.SelectedItem != null && drp_audioTrack.SelectedItem.ToString() == AudioHelper.NoneFound.Description))
+ if (this.drp_audioTrack.SelectedItem != null && this.drp_audioTrack.SelectedItem.ToString() == AudioHelper.NoneFound.Description)
return;
foreach (AudioTrack track in tracks)
{
+ AudioTrack audioTrack = new AudioTrack
+ {
+ Encoder = track.Encoder,
+ MixDown = track.MixDown,
+ SampleRate = track.SampleRate,
+ Bitrate = track.Bitrate,
+ Gain = track.Gain,
+ DRC = track.DRC,
+ };
+
if (track.Encoder == AudioEncoder.Ac3Passthrough || track.Encoder == AudioEncoder.DtsPassthrough ||
track.Encoder == AudioEncoder.DtsHDPassthrough || track.Encoder == AudioEncoder.AacPassthru || track.Encoder == AudioEncoder.Mp3Passthru)
{
- track.MixDown = HandBrake.Interop.Model.Encoding.Mixdown.None;
- track.Bitrate = 0;
+ audioTrack.MixDown = HandBrake.Interop.Model.Encoding.Mixdown.None;
+ audioTrack.Bitrate = 0;
}
- this.audioTracks.Add(track);
+ this.audioTracks.Add(audioTrack);
}
// It's a Preset, if the TrackNumber is 0, so allow the Automatic Track Selection to run after we've setup the presets audio settings.
@@ -530,12 +540,6 @@ namespace Handbrake.Controls
private void Btn_remove_track_click(object sender, EventArgs e)
{
RemoveTrack();
-
- //if (this.AudioTracks.Count == 0)
- //{
- // drp_audioMix.Enabled =
- // drp_audioBitrate.Enabled = drp_audioSample.Enabled = btn_AdvancedAudio.Enabled = true;
- //}
}
/// <summary>
diff --git a/win/CS/Controls/AudioPanel.resx b/win/CS/Controls/AudioPanel.resx
index 2bb8ba780..085fa5c90 100644
--- a/win/CS/Controls/AudioPanel.resx
+++ b/win/CS/Controls/AudioPanel.resx
@@ -155,13 +155,7 @@ Note: When a track is selected on this grid, the dropdown controls above will al
If you want to add multiple tracks, you can hit the add button several times, then select each track
and alter its settings after adding them.</value>
</data>
- <metadata name="AddTrackMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>427, 16</value>
- </metadata>
- <metadata name="RemoveTrackMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>561, 16</value>
- </metadata>
- <data name="groupBox1.ToolTip" xml:space="preserve">
+ <data name="gb_autoPassthru.ToolTip" xml:space="preserve">
<value>Controls the behaviour of the Audio Codec dropdown when passthru options are selected.
When an incorrect passthru option is selected, it will try to fall back to the correct one if the
@@ -172,4 +166,10 @@ If there is no suitable passthru option, it will use the "Fallkback" encoder.
These settings are global to all Audio Tracks.
These settings are stored in the presets.</value>
</data>
+ <metadata name="AddTrackMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>427, 16</value>
+ </metadata>
+ <metadata name="RemoveTrackMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>561, 16</value>
+ </metadata>
</root> \ No newline at end of file
diff --git a/win/CS/Functions/QueryGenerator.cs b/win/CS/Functions/QueryGenerator.cs
index 85640c3bd..8ffdb888e 100644
--- a/win/CS/Functions/QueryGenerator.cs
+++ b/win/CS/Functions/QueryGenerator.cs
@@ -6,7 +6,6 @@
namespace Handbrake.Functions
{
using System;
- using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Globalization;
using System.IO;
@@ -17,7 +16,6 @@ namespace Handbrake.Functions
using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
- using HandBrake.ApplicationServices.Services;
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.Interop.Model;
using HandBrake.Interop.Model.Encoding;
@@ -25,13 +23,15 @@ namespace Handbrake.Functions
using Handbrake.Model;
using OutputFormat = HandBrake.ApplicationServices.Model.Encoding.OutputFormat;
- using UserSettingConstants = Handbrake.UserSettingConstants;
/// <summary>
/// Generate a CLI Query for HandBrakeCLI
/// </summary>
public class QueryGenerator
{
+ /// <summary>
+ /// Backing field for the user setting service.
+ /// </summary>
private static readonly IUserSettingService UserSettingService = ServiceManager.UserSettingService;
/// <summary>
@@ -39,6 +39,27 @@ namespace Handbrake.Functions
/// </summary>
private static readonly CultureInfo Culture = new CultureInfo("en-US", false);
+ /// <summary>
+ /// Generate a CLI Query (Usable by the preset system)
+ /// </summary>
+ /// <param name="mainWindow">
+ /// The main window.
+ /// </param>
+ /// <param name="mode">
+ /// The mode.
+ /// </param>
+ /// <param name="filters">
+ /// The filters.
+ /// </param>
+ /// <param name="width">
+ /// The width.
+ /// </param>
+ /// <param name="height">
+ /// The height.
+ /// </param>
+ /// <returns>
+ /// A CLI Query as a string.
+ /// </returns>
public static string GenerateQueryForPreset(frmMain mainWindow, QueryPictureSettingsMode mode, bool filters, int width, int height)
{
string query = string.Empty;
@@ -48,6 +69,21 @@ namespace Handbrake.Functions
return query;
}
+ /// <summary>
+ /// Generate a CLI Query for a preview.
+ /// </summary>
+ /// <param name="mainWindow">
+ /// The main window.
+ /// </param>
+ /// <param name="duration">
+ /// The duration.
+ /// </param>
+ /// <param name="preview">
+ /// The preview.
+ /// </param>
+ /// <returns>
+ /// Preview CLI Query
+ /// </returns>
public static string GeneratePreviewQuery(frmMain mainWindow, int duration, string preview)
{
string query = string.Empty;
@@ -61,6 +97,15 @@ namespace Handbrake.Functions
return query;
}
+ /// <summary>
+ /// Generate a QueueTask ready for Queuing.
+ /// </summary>
+ /// <param name="mainWindow">
+ /// The main window
+ /// </param>
+ /// <returns>
+ /// A QueueTask object.
+ /// </returns>
public static QueueTask GenerateFullQuery(frmMain mainWindow)
{
// Create the CLI Query
diff --git a/win/CS/HandBrakeWPF/UserSettingConstants.cs b/win/CS/HandBrakeWPF/UserSettingConstants.cs
index 067a3e367..ae3e35245 100644
--- a/win/CS/HandBrakeWPF/UserSettingConstants.cs
+++ b/win/CS/HandBrakeWPF/UserSettingConstants.cs
@@ -48,5 +48,6 @@ namespace HandBrakeWPF
public const string DubModeSubtitle = "DubModeSubtitle";
public const string AddOnlyOneAudioPerLanguage = "addOnlyOneAudioPerLanguage";
public const string MinTitleLength = "MinTitleLength";
+ public const string ShowAdvancedAudioPassthruOpts = "ShowAdvancedAudioPassthruOpts";
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
index dc536855e..4a9dd8aa4 100644
--- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
@@ -304,6 +304,11 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
private BindingList<string> selectedLangauges = new BindingList<string>();
+ /// <summary>
+ /// The backing field for show advanced passthru options for Audio
+ /// </summary>
+ private bool showAdvancedPassthruOpts;
+
#endregion
#region Constructors and Destructors
@@ -875,6 +880,22 @@ namespace HandBrakeWPF.ViewModels
}
}
+ /// <summary>
+ /// Gets or sets a value indicating whether ShowAdvancedPassthruOpts.
+ /// </summary>
+ public bool ShowAdvancedPassthruOpts
+ {
+ get
+ {
+ return this.showAdvancedPassthruOpts;
+ }
+ set
+ {
+ this.showAdvancedPassthruOpts = value;
+ this.NotifyOfPropertyChange(() => this.ShowAdvancedPassthruOpts);
+ }
+ }
+
#endregion
#region System and Logging
@@ -1375,6 +1396,7 @@ namespace HandBrakeWPF.ViewModels
this.addOnlyOneAudioTrackPerLanguage = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.AddOnlyOneAudioPerLanguage);
this.addClosedCaptions = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.UseClosedCaption);
+ this.showAdvancedPassthruOpts = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAdvancedAudioPassthruOpts);
// #############################
// CLI
@@ -1640,6 +1662,7 @@ namespace HandBrakeWPF.ViewModels
this.userSettingService.SetUserSetting(UserSettingConstants.UseClosedCaption, this.AddClosedCaptions);
this.userSettingService.SetUserSetting(UserSettingConstants.DubModeAudio, this.SelectedAddAudioMode);
this.userSettingService.SetUserSetting(UserSettingConstants.DubModeSubtitle, this.SelectedAddSubtitleMode);
+ this.userSettingService.SetUserSetting(UserSettingConstants.ShowAdvancedAudioPassthruOpts, this.ShowAdvancedPassthruOpts);
/* System and Logging */
userSettingService.SetUserSetting(ASUserSettingConstants.ProcessPriority, this.SelectedPriority);
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
index 5b19d1c0e..006b6e1ab 100644
--- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml
+++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
@@ -1,7 +1,7 @@
<Window x:Class="HandBrakeWPF.Views.OptionsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:cal="http://www.caliburnproject.org"
- xmlns:Helpers="clr-namespace:HandBrakeWPF.Helpers" Title="{Binding Title}" MinWidth="620" MinHeight="550" Width="620" Height="550">
+ xmlns:Helpers="clr-namespace:HandBrakeWPF.Helpers" Title="{Binding Title}" MinWidth="620" MinHeight="600" Width="620" Height="600">
<Window.Resources>
<Style TargetType="Button">
@@ -35,7 +35,7 @@
</StackPanel>
<!-- Options Panel-->
- <TabControl Margin="10,10,10,10" Height="410">
+ <TabControl Margin="10,10,10,10" Height="460">
<TabItem Header="General">
<StackPanel Orientation="Vertical">
<Grid Margin="10,10,0,10">
@@ -242,6 +242,11 @@
</StackPanel>
</GroupBox>
+ <StackPanel Orientation="Vertical">
+ <Label Content="Audio Tab Options" FontWeight="Bold" />
+ <CheckBox IsChecked="{Binding ShowAdvancedPassthruOpts}" Content="Show advanced audio passthru options. (Requires Restart)"
+ Margin="5,0,0,0" />
+ </StackPanel>
</StackPanel>
</TabItem>
diff --git a/win/CS/HandBrakeWPF/defaultsettings.xml b/win/CS/HandBrakeWPF/defaultsettings.xml
index bff3307a4..eeaa60865 100644
--- a/win/CS/HandBrakeWPF/defaultsettings.xml
+++ b/win/CS/HandBrakeWPF/defaultsettings.xml
@@ -416,4 +416,12 @@
<anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">RQuM6TVXbXkdih1PmGTf+h178Ho=</anyType>
</value>
</item>
+ <item>
+ <key>
+ <string>ShowAdvancedAudioPassthruOpts</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
+ </value>
+ </item>
</dictionary> \ No newline at end of file
diff --git a/win/CS/UserSettingConstants.cs b/win/CS/UserSettingConstants.cs
index a8a057f0d..87b2f631b 100644
--- a/win/CS/UserSettingConstants.cs
+++ b/win/CS/UserSettingConstants.cs
@@ -44,5 +44,6 @@ namespace Handbrake
public const string DubModeSubtitle = "DubModeSubtitle";
public const string AddOnlyOneAudioPerLanguage = "addOnlyOneAudioPerLanguage";
public const string MinTitleLength = "MinTitleLength";
+ public const string ShowAdvancedAudioPassthruOpts = "ShowAdvancedAudioPassthruOpts";
}
}
diff --git a/win/CS/defaultsettings.xml b/win/CS/defaultsettings.xml
index bff3307a4..eeaa60865 100644
--- a/win/CS/defaultsettings.xml
+++ b/win/CS/defaultsettings.xml
@@ -416,4 +416,12 @@
<anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">RQuM6TVXbXkdih1PmGTf+h178Ho=</anyType>
</value>
</item>
+ <item>
+ <key>
+ <string>ShowAdvancedAudioPassthruOpts</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
+ </value>
+ </item>
</dictionary> \ No newline at end of file
diff --git a/win/CS/frmOptions.Designer.cs b/win/CS/frmOptions.Designer.cs
index 1fa8af07f..d24fc8b95 100644
--- a/win/CS/frmOptions.Designer.cs
+++ b/win/CS/frmOptions.Designer.cs
@@ -71,6 +71,8 @@ namespace Handbrake
this.txt_vlcPath = new System.Windows.Forms.TextBox();
this.label36 = new System.Windows.Forms.Label();
this.tab_audio_sub = new System.Windows.Forms.TabPage();
+ this.check_advPassthruOpts = new System.Windows.Forms.CheckBox();
+ this.label49 = new System.Windows.Forms.Label();
this.label48 = new System.Windows.Forms.Label();
this.drop_preferredLangSubtitles = new System.Windows.Forms.ComboBox();
this.label39 = new System.Windows.Forms.Label();
@@ -188,7 +190,7 @@ namespace Handbrake
this.btn_close.FlatAppearance.BorderColor = System.Drawing.Color.Black;
this.btn_close.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_close.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_close.Location = new System.Drawing.Point(527, 456);
+ this.btn_close.Location = new System.Drawing.Point(527, 503);
this.btn_close.Name = "btn_close";
this.btn_close.Size = new System.Drawing.Size(72, 22);
this.btn_close.TabIndex = 53;
@@ -226,7 +228,7 @@ namespace Handbrake
this.tab_options.Location = new System.Drawing.Point(12, 74);
this.tab_options.Name = "tab_options";
this.tab_options.SelectedIndex = 0;
- this.tab_options.Size = new System.Drawing.Size(588, 375);
+ this.tab_options.Size = new System.Drawing.Size(588, 423);
this.tab_options.TabIndex = 58;
//
// tab_general
@@ -247,7 +249,7 @@ namespace Handbrake
this.tab_general.Location = new System.Drawing.Point(4, 22);
this.tab_general.Name = "tab_general";
this.tab_general.Padding = new System.Windows.Forms.Padding(10);
- this.tab_general.Size = new System.Drawing.Size(580, 349);
+ this.tab_general.Size = new System.Drawing.Size(580, 397);
this.tab_general.TabIndex = 3;
this.tab_general.Text = "General";
this.tab_general.UseVisualStyleBackColor = true;
@@ -417,7 +419,7 @@ namespace Handbrake
this.tab_outputFiles.Location = new System.Drawing.Point(4, 22);
this.tab_outputFiles.Name = "tab_outputFiles";
this.tab_outputFiles.Padding = new System.Windows.Forms.Padding(3);
- this.tab_outputFiles.Size = new System.Drawing.Size(580, 349);
+ this.tab_outputFiles.Size = new System.Drawing.Size(580, 397);
this.tab_outputFiles.TabIndex = 7;
this.tab_outputFiles.Text = "Output Files";
this.tab_outputFiles.UseVisualStyleBackColor = true;
@@ -575,7 +577,7 @@ namespace Handbrake
this.tab_picture.Location = new System.Drawing.Point(4, 22);
this.tab_picture.Name = "tab_picture";
this.tab_picture.Padding = new System.Windows.Forms.Padding(10);
- this.tab_picture.Size = new System.Drawing.Size(580, 349);
+ this.tab_picture.Size = new System.Drawing.Size(580, 397);
this.tab_picture.TabIndex = 5;
this.tab_picture.Text = "Preview";
this.tab_picture.UseVisualStyleBackColor = true;
@@ -628,6 +630,8 @@ namespace Handbrake
//
// tab_audio_sub
//
+ this.tab_audio_sub.Controls.Add(this.check_advPassthruOpts);
+ this.tab_audio_sub.Controls.Add(this.label49);
this.tab_audio_sub.Controls.Add(this.label48);
this.tab_audio_sub.Controls.Add(this.drop_preferredLangSubtitles);
this.tab_audio_sub.Controls.Add(this.label39);
@@ -640,11 +644,35 @@ namespace Handbrake
this.tab_audio_sub.Location = new System.Drawing.Point(4, 22);
this.tab_audio_sub.Name = "tab_audio_sub";
this.tab_audio_sub.Padding = new System.Windows.Forms.Padding(3);
- this.tab_audio_sub.Size = new System.Drawing.Size(580, 349);
+ this.tab_audio_sub.Size = new System.Drawing.Size(580, 397);
this.tab_audio_sub.TabIndex = 6;
this.tab_audio_sub.Text = "Audio and Subtitles";
this.tab_audio_sub.UseVisualStyleBackColor = true;
//
+ // check_advPassthruOpts
+ //
+ this.check_advPassthruOpts.AutoSize = true;
+ this.check_advPassthruOpts.Location = new System.Drawing.Point(9, 365);
+ this.check_advPassthruOpts.Name = "check_advPassthruOpts";
+ this.check_advPassthruOpts.Size = new System.Drawing.Size(310, 17);
+ this.check_advPassthruOpts.TabIndex = 110;
+ this.check_advPassthruOpts.Text = "Show advanced audio passthru options. (Requires Restart)\r\n";
+ this.ToolTip.SetToolTip(this.check_advPassthruOpts, "Show advanced audio passthru options");
+ this.check_advPassthruOpts.UseVisualStyleBackColor = true;
+ this.check_advPassthruOpts.CheckedChanged += new System.EventHandler(this.check_advPassthruOpts_CheckedChanged);
+ //
+ // label49
+ //
+ this.label49.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.label49.AutoSize = true;
+ this.label49.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label49.Location = new System.Drawing.Point(6, 346);
+ this.label49.Margin = new System.Windows.Forms.Padding(3, 5, 3, 0);
+ this.label49.Name = "label49";
+ this.label49.Size = new System.Drawing.Size(109, 13);
+ this.label49.TabIndex = 112;
+ this.label49.Text = "Audio Tab Options";
+ //
// label48
//
this.label48.AutoSize = true;
@@ -962,7 +990,7 @@ namespace Handbrake
this.tab_cli.Location = new System.Drawing.Point(4, 22);
this.tab_cli.Name = "tab_cli";
this.tab_cli.Padding = new System.Windows.Forms.Padding(10);
- this.tab_cli.Size = new System.Drawing.Size(580, 349);
+ this.tab_cli.Size = new System.Drawing.Size(580, 397);
this.tab_cli.TabIndex = 2;
this.tab_cli.Text = "System and Logging";
this.tab_cli.UseVisualStyleBackColor = true;
@@ -1195,7 +1223,7 @@ namespace Handbrake
this.tab_advanced.Location = new System.Drawing.Point(4, 22);
this.tab_advanced.Name = "tab_advanced";
this.tab_advanced.Padding = new System.Windows.Forms.Padding(10);
- this.tab_advanced.Size = new System.Drawing.Size(580, 349);
+ this.tab_advanced.Size = new System.Drawing.Size(580, 397);
this.tab_advanced.TabIndex = 4;
this.tab_advanced.Text = "Advanced";
this.tab_advanced.UseVisualStyleBackColor = true;
@@ -1812,7 +1840,7 @@ namespace Handbrake
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.AutoSize = true;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
- this.ClientSize = new System.Drawing.Size(614, 488);
+ this.ClientSize = new System.Drawing.Size(614, 535);
this.Controls.Add(this.panel1);
this.Controls.Add(this.btn_close);
this.Controls.Add(this.tab_options);
@@ -1985,5 +2013,7 @@ namespace Handbrake
private System.Windows.Forms.Label label40;
private System.Windows.Forms.Label label48;
internal System.Windows.Forms.ComboBox drop_preferredLangSubtitles;
+ private System.Windows.Forms.CheckBox check_advPassthruOpts;
+ private System.Windows.Forms.Label label49;
}
} \ No newline at end of file
diff --git a/win/CS/frmOptions.cs b/win/CS/frmOptions.cs
index 7e6c60683..399e2d594 100644
--- a/win/CS/frmOptions.cs
+++ b/win/CS/frmOptions.cs
@@ -175,6 +175,9 @@ namespace Handbrake
check_AddCCTracks.Checked = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.UseClosedCaption);
+ check_advPassthruOpts.Checked =
+ this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAdvancedAudioPassthruOpts);
+
// #############################
// CLI
// #############################
@@ -573,6 +576,11 @@ namespace Handbrake
this.userSettingService.SetUserSetting(UserSettingConstants.DubModeSubtitle, cb_subtitleMode.SelectedIndex);
}
+ private void check_advPassthruOpts_CheckedChanged(object sender, EventArgs e)
+ {
+ this.userSettingService.SetUserSetting(UserSettingConstants.ShowAdvancedAudioPassthruOpts, check_advPassthruOpts.Checked);
+ }
+
#endregion
#region CLI
@@ -723,7 +731,5 @@ namespace Handbrake
{
this.Close();
}
-
-
}
} \ No newline at end of file