summaryrefslogtreecommitdiffstats
path: root/win/C#/frmReadDVD.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2007-07-30 17:46:01 +0000
committersr55 <[email protected]>2007-07-30 17:46:01 +0000
commitac49c5787b8409495f513f58179e479ebc78f94e (patch)
treeef1a0c7641eda8692c948a1ce2aaf4e29409ebee /win/C#/frmReadDVD.cs
parent4cd7a98940d50d371f62ba36dcb361623550c4a3 (diff)
WinGui:
- Initial tempory workaround for the hbcli issue with the parser. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@762 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmReadDVD.cs')
-rw-r--r--win/C#/frmReadDVD.cs38
1 files changed, 30 insertions, 8 deletions
diff --git a/win/C#/frmReadDVD.cs b/win/C#/frmReadDVD.cs
index 0a7108893..92c3a4751 100644
--- a/win/C#/frmReadDVD.cs
+++ b/win/C#/frmReadDVD.cs
@@ -61,18 +61,40 @@ namespace Handbrake
Functions.CLI process = new Functions.CLI();
private void startProc(object state)
{
- string query = "-i " + '"' + inputFile + '"' + " -t0";
-
-
- hbProc = process.runCli(this, query, true, true, false, true);
+ //string query = "-i " + '"' + inputFile + '"' + " -t0";
+ // hbProc = process.runCli(this, query, true, true, false, true);
+
+ //*********************************************************************************************************************************************
+ /*
+ * Quick and Dirty hack to get around the stderr crashes of hbcli. Lets try feeding brians parser text straight from a text file.
+ */
+ string appPath = Application.StartupPath.ToString();
+ appPath = appPath + "\\";
+ string strCmdLine = "cmd /c " + '"' + '"' + appPath + "\\hbcli.exe" + '"' + " -i" + '"' + inputFile + '"' + " -t0 >" + '"'+ appPath + "\\dvdinfo.dat" + '"' + " 2>&1" + '"';
+ Process hbproc = Process.Start("CMD.exe", strCmdLine);
+ hbproc.WaitForExit();
+
+
+ StreamReader sr = new StreamReader(appPath + "dvdinfo.dat");
+
+ thisDvd = Parsing.DVD.Parse(sr);
+ sr.Close();
+ Console.ReadLine();
+ updateUIElements();
+ //*********************************************************************************************************************************************
+
+ /*
+ * This has been temporily disabled due to the stderr issue
+ *
+ *
Parsing.Parser readData = new Parsing.Parser(hbProc.StandardError.BaseStream);
readData.OnScanProgress += Parser_OnScanProgress;
readData.OnReadLine += dvdInfo.HandleParsedData;
readData.OnReadToEnd += dvdInfo.HandleParsedData;
// Setup the parser
- thisDvd = Parsing.DVD.Parse(readData);
+
if (cancel != 1)
{
@@ -80,6 +102,7 @@ namespace Handbrake
process.killCLI();
process.closeCLI();
}
+ */
}
private void Parser_OnScanProgress(object Sender, int CurrentTitle, int TitleCount)
@@ -99,10 +122,9 @@ namespace Handbrake
private void btn_skip_Click(object sender, EventArgs e)
{
- process.killCLI();
+ //process.killCLI();
this.Close();
- cancel = 1;
-
+ cancel = 1;
}
}