summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions
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#/Functions
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#/Functions')
-rw-r--r--win/C#/Functions/Encode.cs8
-rw-r--r--win/C#/Functions/QueryGenerator.cs17
-rw-r--r--win/C#/Functions/QueryParser.cs12
3 files changed, 25 insertions, 12 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)";
}
}
}