diff options
author | sr55 <[email protected]> | 2009-05-11 12:49:29 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-05-11 12:49:29 +0000 |
commit | 1eb2b7d6ddca6483b56c709b6690833170d80c4b (patch) | |
tree | 1f70a02d43be7b51faacd0b915acea3ea01e3e0b /win/C#/Functions/Encode.cs | |
parent | 7dc573fdd16e755123456f03b48b4c13c78a7d84 (diff) |
# Changed
- Initial work for multi-instance support. All CLI processes controled by their process ID, not Name. This prevents a scan from 1 instance killing a CLI encode from another.
# Fixed
- Disable angle dropdown when not using Libdvdnav
- Fixed issue with angle dropdown where first item is not selected. This caused the generate query to break due to "--angle" with no value.
- Fixed issue with the dropdown menu setup on the audio tab not working correctly due to updated encoder names and DTS support.
- Fixed an exception conditon on cancel scan.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2412 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions/Encode.cs')
-rw-r--r-- | win/C#/Functions/Encode.cs | 68 |
1 files changed, 35 insertions, 33 deletions
diff --git a/win/C#/Functions/Encode.cs b/win/C#/Functions/Encode.cs index 870c24a90..044fad359 100644 --- a/win/C#/Functions/Encode.cs +++ b/win/C#/Functions/Encode.cs @@ -41,6 +41,7 @@ namespace Handbrake.Functions if (Properties.Settings.Default.cli_minimized == "Checked")
cliStart.WindowStyle = ProcessWindowStyle.Minimized;
hbProc = Process.Start(cliStart);
+ processID = hbProc.Id;
isEncoding = true;
currentQuery = query;
@@ -137,40 +138,36 @@ namespace Handbrake.Functions /// <param name="destination"></param>
public void copyLog(string destination)
{
- // The user may wish to do something with the log.
- if (Properties.Settings.Default.saveLogToSpecifiedPath == "Checked")
+ try
{
- try
- {
- string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";
- string tempLogFile = Path.Combine(logDir, "last_encode_log.txt");
-
- string encodeDestinationPath = Path.GetDirectoryName(destination);
- String[] destName = destination.Split('\\');
- string destinationFile = destName[destName.Length - 1];
- string encodeLogFile = DateTime.Now.ToString().Replace("/", "-").Replace(":", "-") + " " + destinationFile + ".txt";
-
- // Make sure the log directory exists.
- if (!Directory.Exists(logDir))
- Directory.CreateDirectory(logDir);
-
- // Copy the Log to HandBrakes log folder in the users applciation data folder.
- File.Copy(tempLogFile, Path.Combine(logDir, encodeLogFile));
-
- // Save a copy of the log file in the same location as the enocde.
- if (Properties.Settings.Default.saveLogWithVideo == "Checked")
- File.Copy(tempLogFile, Path.Combine(encodeDestinationPath, encodeLogFile));
-
- // Save a copy of the log file to a user specified location
- if (Directory.Exists(Properties.Settings.Default.saveLogPath))
- if (Properties.Settings.Default.saveLogPath != String.Empty && Properties.Settings.Default.saveLogToSpecifiedPath == "Checked")
- File.Copy(tempLogFile, Path.Combine(Properties.Settings.Default.saveLogPath, encodeLogFile));
- }
- catch (Exception exc)
- {
- MessageBox.Show("Something went a bit wrong trying to copy your log file.\nError Information:\n\n" + exc, "Error",
- MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
+ string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";
+ string tempLogFile = Path.Combine(logDir, "last_encode_log.txt");
+
+ string encodeDestinationPath = Path.GetDirectoryName(destination);
+ String[] destName = destination.Split('\\');
+ string destinationFile = destName[destName.Length - 1];
+ string encodeLogFile = DateTime.Now.ToString().Replace("/", "-").Replace(":", "-") + " " + destinationFile + ".txt";
+
+ // Make sure the log directory exists.
+ if (!Directory.Exists(logDir))
+ Directory.CreateDirectory(logDir);
+
+ // Copy the Log to HandBrakes log folder in the users applciation data folder.
+ File.Copy(tempLogFile, Path.Combine(logDir, encodeLogFile));
+
+ // Save a copy of the log file in the same location as the enocde.
+ if (Properties.Settings.Default.saveLogWithVideo == "Checked")
+ File.Copy(tempLogFile, Path.Combine(encodeDestinationPath, encodeLogFile));
+
+ // Save a copy of the log file to a user specified location
+ if (Directory.Exists(Properties.Settings.Default.saveLogPath))
+ if (Properties.Settings.Default.saveLogPath != String.Empty && Properties.Settings.Default.saveLogToSpecifiedPath == "Checked")
+ File.Copy(tempLogFile, Path.Combine(Properties.Settings.Default.saveLogPath, encodeLogFile));
+ }
+ catch (Exception exc)
+ {
+ MessageBox.Show("Something went a bit wrong trying to copy your log file.\nError Information:\n\n" + exc, "Error",
+ MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
@@ -184,5 +181,10 @@ namespace Handbrake.Functions /// </summary>
public String currentQuery { get; set; }
+ /// <summary>
+ /// Get the process ID of the current encode.
+ /// </summary>
+ public int processID { get; set; }
+
}
}
|