summaryrefslogtreecommitdiffstats
path: root/win/C#
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-05-07 15:09:33 +0000
committersr55 <[email protected]>2009-05-07 15:09:33 +0000
commit928eba343a9da729368ffb6f161d0d69f637d465 (patch)
tree5f36a6d84311c9dfc22b96d0f224c6c2328e848d /win/C#
parent3625994b759959600fca0cc4cd0c209d74b84de5 (diff)
# New
- DTS support on the audio tab - Angle support added to the source options # Changed - Chapter Markers are not selectable when only 1 chapter is selected or available - Last Encode and scan logs now stored in application data folder. This will make them more persistent. - Option to open the HandBrake log folder from the Activity window right click menu git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2398 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#')
-rw-r--r--win/C#/Functions/Encode.cs8
-rw-r--r--win/C#/Functions/QueryGenerator.cs17
-rw-r--r--win/C#/Functions/QueryParser.cs12
-rw-r--r--win/C#/Parsing/Title.cs21
-rw-r--r--win/C#/frmActivityWindow.Designer.cs17
-rw-r--r--win/C#/frmActivityWindow.cs27
-rw-r--r--win/C#/frmMain.Designer.cs180
-rw-r--r--win/C#/frmMain.cs87
-rw-r--r--win/C#/frmMain.resx6
9 files changed, 239 insertions, 136 deletions
diff --git a/win/C#/Functions/Encode.cs b/win/C#/Functions/Encode.cs
index 1579528a6..870c24a90 100644
--- a/win/C#/Functions/Encode.cs
+++ b/win/C#/Functions/Encode.cs
@@ -32,7 +32,8 @@ namespace Handbrake.Functions
try
{
string handbrakeCLIPath = Path.Combine(Application.StartupPath, "HandBrakeCLI.exe");
- string logPath = Path.Combine(Path.GetTempPath(), "hb_encode_log.dat");
+ string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";
+ string logPath = Path.Combine(logDir, "last_encode_log.txt");
string strCmdLine = String.Format(@" CMD /c """"{0}"" {1} 2>""{2}"" """, handbrakeCLIPath, query, logPath);
@@ -113,7 +114,8 @@ namespace Handbrake.Functions
/// <param name="query"></param>
public void addCLIQueryToLog(string query)
{
- string logPath = Path.Combine(Path.GetTempPath(), "hb_encode_log.dat");
+ string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";
+ string logPath = Path.Combine(logDir, "last_encode_log.txt");
StreamReader reader = new StreamReader(File.Open(logPath, FileMode.Open, FileAccess.Read));
String log = reader.ReadToEnd();
@@ -141,7 +143,7 @@ namespace Handbrake.Functions
try
{
string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";
- string tempLogFile = Path.Combine(Path.GetTempPath(), "hb_encode_log.dat");
+ string tempLogFile = Path.Combine(logDir, "last_encode_log.txt");
string encodeDestinationPath = Path.GetDirectoryName(destination);
String[] destName = destination.Split('\\');
diff --git a/win/C#/Functions/QueryGenerator.cs b/win/C#/Functions/QueryGenerator.cs
index 1a6d1e95c..f2a083afe 100644
--- a/win/C#/Functions/QueryGenerator.cs
+++ b/win/C#/Functions/QueryGenerator.cs
@@ -34,6 +34,9 @@ namespace Handbrake.Functions
query += " -t " + titleInfo[0];
}
+ if (mainWindow.drop_angle.SelectedIndex != 0)
+ query += " --angle " + mainWindow.drop_angle.SelectedItem;
+
if (mainWindow.drop_chapterFinish.Text == mainWindow.drop_chapterStart.Text && mainWindow.drop_chapterStart.Text != "Auto")
query += " -c " + mainWindow.drop_chapterStart.Text;
else if (mainWindow.drop_chapterStart.Text == "Auto" && mainWindow.drop_chapterFinish.Text != "Auto")
@@ -74,6 +77,9 @@ namespace Handbrake.Functions
query += " -t " + titleInfo[0];
}
+ if (mainWindow.drop_angle.SelectedIndex != 0)
+ query += " --angle " + mainWindow.drop_angle.SelectedItem;
+
query += " --start-at-preview " + preview;
query += " --stop-at duration:" + duration + " ";
@@ -305,6 +311,7 @@ namespace Handbrake.Functions
// Audio Codec (-E)
foreach (String item in codecs)
{
+
if (firstLoop)
{
audioItems = item; firstLoop = false;
@@ -473,14 +480,16 @@ namespace Handbrake.Functions
{
switch (selectedEncoder)
{
- case "AAC":
+ case "AAC (faac)":
return "faac";
- case "MP3":
+ case "MP3 (lame)":
return "lame";
- case "Vorbis":
+ case "Vorbis (vorbis)":
return "vorbis";
- case "AC3":
+ case "AC3 Passthru":
return "ac3";
+ case "DTS Passthru":
+ return "dts";
default:
return "";
}
diff --git a/win/C#/Functions/QueryParser.cs b/win/C#/Functions/QueryParser.cs
index 5557b51be..bbdb77b7e 100644
--- a/win/C#/Functions/QueryParser.cs
+++ b/win/C#/Functions/QueryParser.cs
@@ -425,15 +425,17 @@ namespace Handbrake.Functions
switch (audioEnc)
{
case "faac":
- return "AAC";
+ return "AAC (faac)";
case "lame":
- return "MP3";
+ return "MP3 (lame)";
case "vorbis":
- return "Vorbis";
+ return "Vorbis (vorbis)";
case "ac3":
- return "AC3";
+ return "AC3 Passthru";
+ case "dts":
+ return "DTS Passthru";
default:
- return "AAC";
+ return "AAC (faac)";
}
}
}
diff --git a/win/C#/Parsing/Title.cs b/win/C#/Parsing/Title.cs
index 39b8d3cfa..69afe3e90 100644
--- a/win/C#/Parsing/Title.cs
+++ b/win/C#/Parsing/Title.cs
@@ -22,6 +22,7 @@ namespace Handbrake.Parsing
private readonly List<AudioTrack> m_audioTracks;
private readonly List<Chapter> m_chapters;
private readonly List<Subtitle> m_subtitles;
+ private List<String> m_angles = new List<string>();
private float m_aspectRatio;
private int[] m_autoCrop;
private TimeSpan m_duration;
@@ -108,6 +109,14 @@ namespace Handbrake.Parsing
}
/// <summary>
+ /// Collection of Angles in this Title
+ /// </summary>
+ public List<string> Angles
+ {
+ get { return m_angles; }
+ }
+
+ /// <summary>
/// Override of the ToString method to provide an easy way to use this object in the UI
/// </summary>
/// <returns>A string representing this track in the format: {title #} (00:00:00)</returns>
@@ -134,8 +143,16 @@ namespace Handbrake.Parsing
m = Regex.Match(output.ReadLine(), @" \+ angle\(s\) ([0-9,])");
if (m.Success)
{
- // + angle(s) 1
- // Do nothing. Will add this later.
+ String angleList = m.Value.Replace("+ angle(s) ", "").Trim();
+
+ if (angleList.Contains(","))
+ {
+ string[] angles = angleList.Split(',');
+ foreach (string s in angles)
+ thisTitle.m_angles.Add(s);
+ }
+ else
+ thisTitle.m_angles.Add(m.Value.Replace("+ angle(s) ", "").Trim());
}
}
diff --git a/win/C#/frmActivityWindow.Designer.cs b/win/C#/frmActivityWindow.Designer.cs
index cdd7d2d60..11e5c0d3c 100644
--- a/win/C#/frmActivityWindow.Designer.cs
+++ b/win/C#/frmActivityWindow.Designer.cs
@@ -49,6 +49,7 @@ namespace Handbrake
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.lbl_slb = new System.Windows.Forms.ToolStripStatusLabel();
this.txt_log = new System.Windows.Forms.ToolStripStatusLabel();
+ this.mnu_openLogFolder = new System.Windows.Forms.ToolStripMenuItem();
this.rightClickMenu.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.statusStrip1.SuspendLayout();
@@ -70,15 +71,16 @@ namespace Handbrake
// rightClickMenu
//
this.rightClickMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.mnu_copy_log});
+ this.mnu_copy_log,
+ this.mnu_openLogFolder});
this.rightClickMenu.Name = "rightClickMenu";
- this.rightClickMenu.Size = new System.Drawing.Size(111, 26);
+ this.rightClickMenu.Size = new System.Drawing.Size(247, 70);
//
// mnu_copy_log
//
this.mnu_copy_log.Image = global::Handbrake.Properties.Resources.copy;
this.mnu_copy_log.Name = "mnu_copy_log";
- this.mnu_copy_log.Size = new System.Drawing.Size(110, 22);
+ this.mnu_copy_log.Size = new System.Drawing.Size(246, 22);
this.mnu_copy_log.Text = "Copy";
this.mnu_copy_log.Click += new System.EventHandler(this.mnu_copy_log_Click);
//
@@ -172,6 +174,14 @@ namespace Handbrake
this.txt_log.Size = new System.Drawing.Size(74, 17);
this.txt_log.Text = "{selected log}";
//
+ // mnu_openLogFolder
+ //
+ this.mnu_openLogFolder.Image = global::Handbrake.Properties.Resources.folder;
+ this.mnu_openLogFolder.Name = "mnu_openLogFolder";
+ this.mnu_openLogFolder.Size = new System.Drawing.Size(246, 22);
+ this.mnu_openLogFolder.Text = "Open Individual Log File Directory";
+ this.mnu_openLogFolder.Click += new System.EventHandler(this.mnu_openLogFolder_Click);
+ //
// frmActivityWindow
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);
@@ -215,5 +225,6 @@ namespace Handbrake
private System.Windows.Forms.ToolStripStatusLabel lbl_slb;
private System.Windows.Forms.ContextMenuStrip rightClickMenu;
private System.Windows.Forms.ToolStripMenuItem mnu_copy_log;
+ private System.Windows.Forms.ToolStripMenuItem mnu_openLogFolder;
}
} \ No newline at end of file
diff --git a/win/C#/frmActivityWindow.cs b/win/C#/frmActivityWindow.cs
index b1fa0dafe..d2d1ff17a 100644
--- a/win/C#/frmActivityWindow.cs
+++ b/win/C#/frmActivityWindow.cs
@@ -5,7 +5,6 @@
It may be used under the terms of the GNU General Public License. */
using System;
-using System.Collections.Generic;
using System.Windows.Forms;
using System.IO;
using System.Threading;
@@ -22,6 +21,7 @@ namespace Handbrake
Thread monitor;
Queue.QueueHandler encodeQueue;
int position; // Position in the arraylist reached by the current log output in the rtf box.
+ string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";
/// <summary>
/// This window should be used to display the RAW output of the handbrake CLI which is produced during an encode.
@@ -41,9 +41,9 @@ namespace Handbrake
// Print the Log header in the Rich text box.
displayLogHeader();
- if (file == "dvdinfo.dat")
+ if (file == "last_scan_log.txt")
txt_log.Text = "Scan Log";
- else if (file == "hb_encode_log.dat")
+ else if (file == "last_encode_log.txt")
txt_log.Text = "Encode Log";
// Start a new thread which will montior and keep the log window up to date if required/
@@ -80,7 +80,7 @@ namespace Handbrake
{
try
{
- string logFile = Path.Combine(Path.GetTempPath(), file);
+ string logFile = Path.Combine(logDir, file);
if (File.Exists(logFile))
{
// Start a new thread to run the autoUpdate process
@@ -192,10 +192,10 @@ namespace Handbrake
String appendText = String.Empty;
try
{
- // hb_encode_log.dat is the primary log file. Since .NET can't read this file whilst the CLI is outputing to it (Not even in read only mode),
+ // last_encode_log.txt is the primary log file. Since .NET can't read this file whilst the CLI is outputing to it (Not even in read only mode),
// we'll need to make a copy of it.
- string logFile = Path.Combine(Path.GetTempPath(), read_file);
- string logFile2 = Path.Combine(Path.GetTempPath(), "hb_encode_log_AppReadable.dat");
+ string logFile = Path.Combine(logDir, read_file);
+ string logFile2 = Path.Combine(logDir, "tmp_appReadable_log.txt");
// Make sure the application readable log file does not already exist. FileCopy fill fail if it does.
if (File.Exists(logFile2))
@@ -254,6 +254,15 @@ namespace Handbrake
else
Clipboard.SetDataObject(rtf_actLog.Text, true);
}
+ private void mnu_openLogFolder_Click(object sender, EventArgs e)
+ {
+ string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";
+ string windir = Environment.GetEnvironmentVariable("WINDIR");
+ System.Diagnostics.Process prc = new System.Diagnostics.Process();
+ prc.StartInfo.FileName = windir + @"\explorer.exe";
+ prc.StartInfo.Arguments = logDir;
+ prc.Start();
+ }
private void btn_copy_Click(object sender, EventArgs e)
{
if (rtf_actLog.SelectedText != "")
@@ -269,7 +278,7 @@ namespace Handbrake
monitor.Abort();
rtf_actLog.Clear();
- read_file = "dvdinfo.dat";
+ read_file = "last_scan_log.txt";
displayLogHeader();
startLogThread(read_file);
txt_log.Text = "Scan Log";
@@ -282,7 +291,7 @@ namespace Handbrake
monitor.Abort();
rtf_actLog.Clear();
- read_file = "hb_encode_log.dat";
+ read_file = "last_encode_log.txt";
position = 0;
displayLogHeader();
startLogThread(read_file);
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs
index 7a89b0f89..b03d929e2 100644
--- a/win/C#/frmMain.Designer.cs
+++ b/win/C#/frmMain.Designer.cs
@@ -40,7 +40,7 @@ namespace Handbrake
this.components = new System.ComponentModel.Container();
System.Windows.Forms.ContextMenuStrip notifyIconMenu;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.btn_restore = new System.Windows.Forms.ToolStripMenuItem();
this.DVD_Save = new System.Windows.Forms.SaveFileDialog();
this.File_Save = new System.Windows.Forms.SaveFileDialog();
@@ -183,14 +183,9 @@ namespace Handbrake
this.Check_ChapterMarkers = new System.Windows.Forms.CheckBox();
this.tabs_panel = new System.Windows.Forms.TabControl();
this.tab_Filters = new System.Windows.Forms.TabPage();
- this.ctl_deinterlace = new Handbrake.Deinterlace();
- this.ctl_denoise = new Handbrake.Denoise();
- this.ctl_decomb = new Handbrake.Decomb();
- this.ctl_detelecine = new Handbrake.Detelecine();
this.tab_chapters = new System.Windows.Forms.TabPage();
this.label31 = new System.Windows.Forms.Label();
this.h264Tab = new System.Windows.Forms.TabPage();
- this.x264Panel = new Handbrake.Controls.x264Panel();
this.tab_query = new System.Windows.Forms.TabPage();
this.btn_clear = new System.Windows.Forms.Button();
this.label34 = new System.Windows.Forms.Label();
@@ -225,6 +220,13 @@ namespace Handbrake
this.StatusStrip = new System.Windows.Forms.StatusStrip();
this.lbl_encode = new System.Windows.Forms.ToolStripStatusLabel();
this.hbproc = new System.Diagnostics.Process();
+ this.drop_angle = new System.Windows.Forms.ComboBox();
+ this.label4 = new System.Windows.Forms.Label();
+ this.ctl_deinterlace = new Handbrake.Deinterlace();
+ this.ctl_denoise = new Handbrake.Denoise();
+ this.ctl_decomb = new Handbrake.Decomb();
+ this.ctl_detelecine = new Handbrake.Detelecine();
+ this.x264Panel = new Handbrake.Controls.x264Panel();
notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
notifyIconMenu.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).BeginInit();
@@ -293,7 +295,7 @@ namespace Handbrake
//
this.drop_chapterFinish.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.drop_chapterFinish.FormattingEnabled = true;
- this.drop_chapterFinish.Location = new System.Drawing.Point(427, 52);
+ this.drop_chapterFinish.Location = new System.Drawing.Point(503, 52);
this.drop_chapterFinish.Name = "drop_chapterFinish";
this.drop_chapterFinish.Size = new System.Drawing.Size(69, 21);
this.drop_chapterFinish.TabIndex = 10;
@@ -305,7 +307,7 @@ namespace Handbrake
//
this.drop_chapterStart.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.drop_chapterStart.FormattingEnabled = true;
- this.drop_chapterStart.Location = new System.Drawing.Point(295, 52);
+ this.drop_chapterStart.Location = new System.Drawing.Point(371, 52);
this.drop_chapterStart.Name = "drop_chapterStart";
this.drop_chapterStart.Size = new System.Drawing.Size(69, 21);
this.drop_chapterStart.TabIndex = 9;
@@ -319,7 +321,7 @@ namespace Handbrake
this.drp_dvdtitle.FormattingEnabled = true;
this.drp_dvdtitle.Items.AddRange(new object[] {
"Automatic"});
- this.drp_dvdtitle.Location = new System.Drawing.Point(99, 52);
+ this.drp_dvdtitle.Location = new System.Drawing.Point(75, 52);
this.drp_dvdtitle.Name = "drp_dvdtitle";
this.drp_dvdtitle.Size = new System.Drawing.Size(119, 21);
this.drp_dvdtitle.TabIndex = 7;
@@ -332,9 +334,9 @@ namespace Handbrake
// text_destination
//
this.text_destination.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.text_destination.Location = new System.Drawing.Point(99, 19);
+ this.text_destination.Location = new System.Drawing.Point(75, 19);
this.text_destination.Name = "text_destination";
- this.text_destination.Size = new System.Drawing.Size(503, 21);
+ this.text_destination.Size = new System.Drawing.Size(549, 21);
this.text_destination.TabIndex = 1;
this.ToolTip.SetToolTip(this.text_destination, "Location where the encoded file will be saved.");
this.text_destination.TextChanged += new System.EventHandler(this.text_destination_TextChanged);
@@ -598,9 +600,9 @@ namespace Handbrake
//
// number
//
- dataGridViewCellStyle2.Format = "N0";
- dataGridViewCellStyle2.NullValue = null;
- this.number.DefaultCellStyle = dataGridViewCellStyle2;
+ dataGridViewCellStyle1.Format = "N0";
+ dataGridViewCellStyle1.NullValue = null;
+ this.number.DefaultCellStyle = dataGridViewCellStyle1;
this.number.Frozen = true;
this.number.HeaderText = "Chapter Number";
this.number.MaxInputLength = 3;
@@ -649,15 +651,15 @@ namespace Handbrake
this.drp_audenc_1.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.drp_audenc_1.FormattingEnabled = true;
this.drp_audenc_1.Items.AddRange(new object[] {
- "AAC",
- "MP3",
- "Vorbis",
- "AC3"});
+ "AAC (faac)",
+ "MP3 (lame)",
+ "Vorbis (vorbis)",
+ "AC3 Passthru"});
this.drp_audenc_1.Location = new System.Drawing.Point(216, 47);
this.drp_audenc_1.Name = "drp_audenc_1";
this.drp_audenc_1.Size = new System.Drawing.Size(111, 20);
this.drp_audenc_1.TabIndex = 5;
- this.drp_audenc_1.Text = "AAC";
+ this.drp_audenc_1.Text = "AAC (faac)";
this.ToolTip.SetToolTip(this.drp_audenc_1, "Select an audio encoder.");
this.drp_audenc_1.SelectedIndexChanged += new System.EventHandler(this.drp_audenc_1_SelectedIndexChanged);
//
@@ -706,10 +708,10 @@ namespace Handbrake
// text_source
//
this.text_source.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.text_source.Location = new System.Drawing.Point(99, 19);
+ this.text_source.Location = new System.Drawing.Point(75, 19);
this.text_source.Name = "text_source";
this.text_source.ReadOnly = true;
- this.text_source.Size = new System.Drawing.Size(584, 21);
+ this.text_source.Size = new System.Drawing.Size(642, 21);
this.text_source.TabIndex = 1;
this.text_source.Text = "Click \'Source\' to continue";
this.ToolTip.SetToolTip(this.text_source, "Location of the source input file, folder or dvd.");
@@ -730,7 +732,7 @@ namespace Handbrake
this.lbl_duration.AutoSize = true;
this.lbl_duration.BackColor = System.Drawing.Color.Transparent;
this.lbl_duration.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.lbl_duration.Location = new System.Drawing.Point(569, 56);
+ this.lbl_duration.Location = new System.Drawing.Point(645, 56);
this.lbl_duration.Name = "lbl_duration";
this.lbl_duration.Size = new System.Drawing.Size(72, 12);
this.lbl_duration.TabIndex = 43;
@@ -741,7 +743,7 @@ namespace Handbrake
this.label_duration.AutoSize = true;
this.label_duration.BackColor = System.Drawing.Color.Transparent;
this.label_duration.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label_duration.Location = new System.Drawing.Point(502, 55);
+ this.label_duration.Location = new System.Drawing.Point(578, 55);
this.label_duration.Name = "label_duration";
this.label_duration.Size = new System.Drawing.Size(61, 13);
this.label_duration.TabIndex = 42;
@@ -986,6 +988,8 @@ namespace Handbrake
//
// gb_source
//
+ this.gb_source.Controls.Add(this.drop_angle);
+ this.gb_source.Controls.Add(this.label4);
this.gb_source.Controls.Add(this.lbl_duration);
this.gb_source.Controls.Add(this.label_duration);
this.gb_source.Controls.Add(this.Label13);
@@ -1009,7 +1013,7 @@ namespace Handbrake
//
this.Label13.AutoSize = true;
this.Label13.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Label13.Location = new System.Drawing.Point(370, 55);
+ this.Label13.Location = new System.Drawing.Point(446, 55);
this.Label13.Name = "Label13";
this.Label13.Size = new System.Drawing.Size(51, 13);
this.Label13.TabIndex = 10;
@@ -1031,7 +1035,7 @@ namespace Handbrake
this.Label9.AutoSize = true;
this.Label9.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Label9.ForeColor = System.Drawing.Color.Black;
- this.Label9.Location = new System.Drawing.Point(225, 55);
+ this.Label9.Location = new System.Drawing.Point(301, 55);
this.Label9.Name = "Label9";
this.Label9.Size = new System.Drawing.Size(64, 13);
this.Label9.TabIndex = 8;
@@ -1871,48 +1875,6 @@ namespace Handbrake
this.tab_Filters.Text = "Video Filters";
this.tab_Filters.UseVisualStyleBackColor = true;
//
- // ctl_deinterlace
- //
- this.ctl_deinterlace.AutoSize = true;
- this.ctl_deinterlace.Location = new System.Drawing.Point(19, 95);
- this.ctl_deinterlace.Margin = new System.Windows.Forms.Padding(0);
- this.ctl_deinterlace.MaximumSize = new System.Drawing.Size(400, 30);
- this.ctl_deinterlace.Name = "ctl_deinterlace";
- this.ctl_deinterlace.Size = new System.Drawing.Size(275, 28);
- this.ctl_deinterlace.TabIndex = 41;
- this.ctl_deinterlace.onChange += new System.EventHandler(this.ctl_deinterlace_changed);
- //
- // ctl_denoise
- //
- this.ctl_denoise.AutoSize = true;
- this.ctl_denoise.Location = new System.Drawing.Point(19, 123);
- this.ctl_denoise.Margin = new System.Windows.Forms.Padding(0);
- this.ctl_denoise.MaximumSize = new System.Drawing.Size(400, 30);
- this.ctl_denoise.Name = "ctl_denoise";
- this.ctl_denoise.Size = new System.Drawing.Size(275, 28);
- this.ctl_denoise.TabIndex = 40;
- //
- // ctl_decomb
- //
- this.ctl_decomb.AutoSize = true;
- this.ctl_decomb.Location = new System.Drawing.Point(19, 66);
- this.ctl_decomb.Margin = new System.Windows.Forms.Padding(0);
- this.ctl_decomb.MaximumSize = new System.Drawing.Size(400, 30);
- this.ctl_decomb.Name = "ctl_decomb";
- this.ctl_decomb.Size = new System.Drawing.Size(275, 28);
- this.ctl_decomb.TabIndex = 39;
- this.ctl_decomb.onChange += new System.EventHandler(this.ctl_decomb_changed);
- //
- // ctl_detelecine
- //
- this.ctl_detelecine.AutoSize = true;
- this.ctl_detelecine.Location = new System.Drawing.Point(19, 38);
- this.ctl_detelecine.Margin = new System.Windows.Forms.Padding(0);
- this.ctl_detelecine.MaximumSize = new System.Drawing.Size(400, 30);
- this.ctl_detelecine.Name = "ctl_detelecine";
- this.ctl_detelecine.Size = new System.Drawing.Size(275, 28);
- this.ctl_detelecine.TabIndex = 38;
- //
// tab_chapters
//
this.tab_chapters.BackColor = System.Drawing.Color.Transparent;
@@ -1950,14 +1912,6 @@ namespace Handbrake
this.h264Tab.Text = "Advanced";
this.h264Tab.UseVisualStyleBackColor = true;
//
- // x264Panel
- //
- this.x264Panel.Location = new System.Drawing.Point(0, 0);
- this.x264Panel.Name = "x264Panel";
- this.x264Panel.Size = new System.Drawing.Size(720, 306);
- this.x264Panel.TabIndex = 0;
- this.x264Panel.x264Query = "";
- //
// tab_query
//
this.tab_query.Controls.Add(this.btn_clear);
@@ -2045,7 +1999,7 @@ namespace Handbrake
// btn_destBrowse
//
this.btn_destBrowse.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_destBrowse.Location = new System.Drawing.Point(608, 17);
+ this.btn_destBrowse.Location = new System.Drawing.Point(642, 18);
this.btn_destBrowse.Name = "btn_destBrowse";
this.btn_destBrowse.Size = new System.Drawing.Size(75, 23);
this.btn_destBrowse.TabIndex = 13;
@@ -2317,6 +2271,78 @@ namespace Handbrake
this.hbproc.StartInfo.UserName = "";
this.hbproc.SynchronizingObject = this;
//
+ // drop_angle
+ //
+ this.drop_angle.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.drop_angle.FormattingEnabled = true;
+ this.drop_angle.Location = new System.Drawing.Point(250, 52);
+ this.drop_angle.Name = "drop_angle";
+ this.drop_angle.Size = new System.Drawing.Size(45, 21);
+ this.drop_angle.TabIndex = 45;
+ this.drop_angle.Text = "1";
+ this.ToolTip.SetToolTip(this.drop_angle, "Select the chapter range you would like to enocde. (default: All Chapters)");
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label4.ForeColor = System.Drawing.Color.Black;
+ this.label4.Location = new System.Drawing.Point(200, 55);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(44, 13);
+ this.label4.TabIndex = 44;
+ this.label4.Text = "Angle:";
+ //
+ // ctl_deinterlace
+ //
+ this.ctl_deinterlace.AutoSize = true;
+ this.ctl_deinterlace.Location = new System.Drawing.Point(19, 95);
+ this.ctl_deinterlace.Margin = new System.Windows.Forms.Padding(0);
+ this.ctl_deinterlace.MaximumSize = new System.Drawing.Size(400, 30);
+ this.ctl_deinterlace.Name = "ctl_deinterlace";
+ this.ctl_deinterlace.Size = new System.Drawing.Size(275, 28);
+ this.ctl_deinterlace.TabIndex = 41;
+ this.ctl_deinterlace.onChange += new System.EventHandler(this.ctl_deinterlace_changed);
+ //
+ // ctl_denoise
+ //
+ this.ctl_denoise.AutoSize = true;
+ this.ctl_denoise.Location = new System.Drawing.Point(19, 123);
+ this.ctl_denoise.Margin = new System.Windows.Forms.Padding(0);
+ this.ctl_denoise.MaximumSize = new System.Drawing.Size(400, 30);
+ this.ctl_denoise.Name = "ctl_denoise";
+ this.ctl_denoise.Size = new System.Drawing.Size(275, 28);
+ this.ctl_denoise.TabIndex = 40;
+ //
+ // ctl_decomb
+ //
+ this.ctl_decomb.AutoSize = true;
+ this.ctl_decomb.Location = new System.Drawing.Point(19, 66);
+ this.ctl_decomb.Margin = new System.Windows.Forms.Padding(0);
+ this.ctl_decomb.MaximumSize = new System.Drawing.Size(400, 30);
+ this.ctl_decomb.Name = "ctl_decomb";
+ this.ctl_decomb.Size = new System.Drawing.Size(275, 28);
+ this.ctl_decomb.TabIndex = 39;
+ this.ctl_decomb.onChange += new System.EventHandler(this.ctl_decomb_changed);
+ //
+ // ctl_detelecine
+ //
+ this.ctl_detelecine.AutoSize = true;
+ this.ctl_detelecine.Location = new System.Drawing.Point(19, 38);
+ this.ctl_detelecine.Margin = new System.Windows.Forms.Padding(0);
+ this.ctl_detelecine.MaximumSize = new System.Drawing.Size(400, 30);
+ this.ctl_detelecine.Name = "ctl_detelecine";
+ this.ctl_detelecine.Size = new System.Drawing.Size(275, 28);
+ this.ctl_detelecine.TabIndex = 38;
+ //
+ // x264Panel
+ //
+ this.x264Panel.Location = new System.Drawing.Point(0, 0);
+ this.x264Panel.Name = "x264Panel";
+ this.x264Panel.Size = new System.Drawing.Size(720, 306);
+ this.x264Panel.TabIndex = 0;
+ this.x264Panel.x264Query = "";
+ //
// frmMain
//
this.AllowDrop = true;
@@ -2569,6 +2595,8 @@ namespace Handbrake
private System.Windows.Forms.DataGridViewTextBoxColumn name;
internal TextBox text_source;
private System.Diagnostics.Process hbproc;
+ internal ComboBox drop_angle;
+ internal Label label4;
}
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index dddf3fd3b..78074b143 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -246,7 +246,7 @@ namespace Handbrake
private void mnu_encodeLog_Click(object sender, EventArgs e)
{
String file;
- file = lastAction == "scan" ? "dvdinfo.dat" : "hb_encode_log.dat";
+ file = lastAction == "scan" ? "last_scan_log.txt" : "last_encode_log.txt";
frmActivityWindow dvdInfoWindow = new frmActivityWindow(file, encodeQueue);
dvdInfoWindow.Show();
@@ -571,7 +571,7 @@ namespace Handbrake
if (node.Text.Equals("Normal"))
treeView_presets.SelectedNode = treeView_presets.Nodes[treenode.Index].Nodes[0];
}
- }
+ }
}
#endregion
@@ -692,7 +692,7 @@ namespace Handbrake
}
private void btn_ActivityWindow_Click(object sender, EventArgs e)
{
- String file = lastAction == "scan" ? "dvdinfo.dat" : "hb_encode_log.dat";
+ String file = lastAction == "scan" ? "last_scan_log.txt" : "last_encode_log.txt";
frmActivityWindow ActivityWindow = new frmActivityWindow(file, encodeQueue);
ActivityWindow.Show();
@@ -845,6 +845,10 @@ namespace Handbrake
text_left.Text = selectedTitle.AutoCropDimensions[2].ToString();
text_right.Text = selectedTitle.AutoCropDimensions[3].ToString();
+ // Populate the Angles dropdown
+ drop_angle.Items.Clear();
+ drop_angle.Items.AddRange(selectedTitle.Angles.ToArray());
+
// Populate the Start chapter Dropdown
drop_chapterStart.Items.Clear();
drop_chapterStart.Items.AddRange(selectedTitle.Chapters.ToArray());
@@ -885,9 +889,16 @@ namespace Handbrake
}
data_chpt.Rows.Clear();
- DataGridView chapterGridView = Main.chapterNaming(data_chpt, drop_chapterFinish.Text);
- if (chapterGridView != null)
- data_chpt = chapterGridView;
+ if (selectedTitle.Chapters.Count != 1)
+ {
+ DataGridView chapterGridView = Main.chapterNaming(data_chpt, drop_chapterFinish.Text);
+ if (chapterGridView != null)
+ data_chpt = chapterGridView;
+ } else
+ {
+ Check_ChapterMarkers.Checked = false;
+ Check_ChapterMarkers.Enabled = false;
+ }
// Hack to force the redraw of the scrollbars which don't resize properly when the control is disabled.
data_chpt.Columns[0].Width = 166;
@@ -915,6 +926,14 @@ namespace Handbrake
if (Properties.Settings.Default.autoNaming == "Checked")
text_destination.Text = Main.autoName(drp_dvdtitle, drop_chapterStart.Text, drop_chapterFinish.Text, text_source.Text, text_destination.Text, drop_format.SelectedIndex);
+ // Disable chapter markers if only 1 chapter is selected.
+ if (c_start == c_end)
+ {
+ Check_ChapterMarkers.Checked = false;
+ Check_ChapterMarkers.Enabled = false;
+ }
+ else
+ Check_ChapterMarkers.Enabled = true;
}
private void drop_chapterFinish_SelectedIndexChanged(object sender, EventArgs e)
{
@@ -956,6 +975,15 @@ namespace Handbrake
i++;
}
}
+
+ // Disable chapter markers if only 1 chapter is selected.
+ if (c_start == c_end)
+ {
+ Check_ChapterMarkers.Checked = false;
+ Check_ChapterMarkers.Enabled = false;
+ }
+ else
+ Check_ChapterMarkers.Enabled = true;
}
//Destination
@@ -981,25 +1009,25 @@ namespace Handbrake
if (DVD_Save.FileName.StartsWith("\\"))
MessageBox.Show("Sorry, HandBrake does not support UNC file paths. \nTry mounting the share as a network drive in My Computer", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
else
- {
+ {
// Add a file extension manually, as FileDialog.AddExtension has issues with dots in filenames
switch (DVD_Save.FilterIndex)
{
case 1:
if (!Path.GetExtension(DVD_Save.FileName).Equals(".mp4", StringComparison.InvariantCultureIgnoreCase))
- DVD_Save.FileName += ".mp4";
- break;
+ DVD_Save.FileName += ".mp4";
+ break;
case 2:
- if (!Path.GetExtension(DVD_Save.FileName).Equals(".m4v", StringComparison.InvariantCultureIgnoreCase))
- DVD_Save.FileName += ".m4v";
- break;
- case 3:
- if (!Path.GetExtension(DVD_Save.FileName).Equals(".mkv", StringComparison.InvariantCultureIgnoreCase))
- DVD_Save.FileName += ".mkv";
- break;
- default:
+ if (!Path.GetExtension(DVD_Save.FileName).Equals(".m4v", StringComparison.InvariantCultureIgnoreCase))
+ DVD_Save.FileName += ".m4v";
+ break;
+ case 3:
+ if (!Path.GetExtension(DVD_Save.FileName).Equals(".mkv", StringComparison.InvariantCultureIgnoreCase))
+ DVD_Save.FileName += ".mkv";
+ break;
+ default:
//do nothing
- break;
+ break;
}
text_destination.Text = DVD_Save.FileName;
@@ -1334,7 +1362,7 @@ namespace Handbrake
}
private void drp_audenc_1_SelectedIndexChanged(object sender, EventArgs e)
{
- if (drp_audenc_1.Text == "AC3")
+ if (drp_audenc_1.Text == "AC3" || drp_audenc_1.Text == "DTS")
{
drp_audmix_1.Enabled = false;
drp_audbit_1.Enabled = false;
@@ -1607,9 +1635,10 @@ namespace Handbrake
{
string inputFile = (string)state;
string handbrakeCLIPath = Path.Combine(Application.StartupPath, "HandBrakeCLI.exe");
- string dvdInfoPath = Path.Combine(Path.GetTempPath(), "dvdinfo.dat");
+ string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";
+ string dvdInfoPath = Path.Combine(logDir, "last_scan_log.txt");
- // Make we don't pick up a stale hb_encode_log.dat (and that we have rights to the file)
+ // Make we don't pick up a stale last_encode_log.txt (and that we have rights to the file)
if (File.Exists(dvdInfoPath))
File.Delete(dvdInfoPath);
@@ -1627,7 +1656,7 @@ namespace Handbrake
if (!File.Exists(dvdInfoPath))
{
- throw new Exception("Unable to retrieve the DVD Info. dvdinfo.dat is missing. \nExpected location of dvdinfo.dat: \n" + dvdInfoPath);
+ throw new Exception("Unable to retrieve the DVD Info. last_scan_log.txt is missing. \nExpected location of last_scan_log.txt: \n" + dvdInfoPath);
}
using (StreamReader sr = new StreamReader(dvdInfoPath))
@@ -1844,8 +1873,8 @@ namespace Handbrake
{
string oldval = drp_audenc_1.Text;
drp_audenc_1.Items.Clear();
- drp_audenc_1.Items.Add("AAC");
- drp_audenc_1.Items.Add("AC3");
+ drp_audenc_1.Items.Add("AAC (faac)");
+ drp_audenc_1.Items.Add("AC3 Passthru");
if ((oldval != "AAC") && (oldval != "AC3"))
drp_audenc_1.SelectedIndex = 0;
@@ -1853,10 +1882,12 @@ namespace Handbrake
else if (path.Contains("MKV"))
{
drp_audenc_1.Items.Clear();
- drp_audenc_1.Items.Add("AAC");
- drp_audenc_1.Items.Add("MP3");
- drp_audenc_1.Items.Add("AC3");
- drp_audenc_1.Items.Add("Vorbis");
+ drp_audenc_1.Items.Add("AAC (faac)");
+ drp_audenc_1.Items.Add("MP3 (lame)");
+ drp_audenc_1.Items.Add("AC3 Passthru");
+ drp_audenc_1.Items.Add("DTS Passthru");
+ drp_audenc_1.Items.Add("Vorbis (vorbis)");
+
if (drp_audenc_1.Text == string.Empty)
drp_audenc_1.SelectedIndex = 0;
}
diff --git a/win/C#/frmMain.resx b/win/C#/frmMain.resx
index ca7b50f90..f4b7ffbfb 100644
--- a/win/C#/frmMain.resx
+++ b/win/C#/frmMain.resx
@@ -152,12 +152,6 @@ Make sure you have selected a "Title" from the "Source" box above otherwise
the list will not be populated with the correct amount of chapters.
Note: Do not change any of the chapter numbers!</value>
</data>
- <metadata name="number.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="name.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
<metadata name="DVD_Open.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>232, 15</value>
</metadata>