diff options
author | sr55 <[email protected]> | 2007-07-26 19:15:56 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2007-07-26 19:15:56 +0000 |
commit | 121b5fedcc7a8f91bb7584389c7d1b8c3ebb8bb3 (patch) | |
tree | f077ae2a116e6dd0dced6e00c06063e8d33a7790 /win/C#/frmMain.cs | |
parent | 1ea27fb27287e68b32af6b8e688e96d388bc8f6c (diff) |
WinGui:
- Disabled Encode progress on GUI Window. CLI now allowed to appear and standard error is no longer re-directed. (BUG: Standard error causing video distortions when used)
- If scanning a Source fails, the GUI will now attempt to scan the title a 2nd time automatically. Same issue, Standard error causing hbcli to randomly fail.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@743 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmMain.cs')
-rw-r--r-- | win/C#/frmMain.cs | 55 |
1 files changed, 40 insertions, 15 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index f2471baad..ddb94b184 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -548,6 +548,8 @@ namespace Handbrake String filename ="";
text_source.Text = "";
+
+ int scanTwice = 0;
if (RadioDVD.Checked)
{
@@ -555,9 +557,9 @@ namespace Handbrake filename = DVD_Open.SelectedPath;
if (filename != "")
{
+ Form frmRD = new frmReadDVD(filename, this, dvdInfoWindow);
text_source.Text = filename;
- Form frmReadDVD = new frmReadDVD(filename, this, dvdInfoWindow);
- frmReadDVD.ShowDialog();
+ frmRD.ShowDialog();
}
}
else
@@ -566,18 +568,26 @@ namespace Handbrake filename = ISO_Open.FileName;
if (filename != "")
{
+ Form frmRD = new frmReadDVD(filename, this, dvdInfoWindow);
text_source.Text = filename;
- Form frmReadDVD = new frmReadDVD(filename, this, dvdInfoWindow);
- frmReadDVD.ShowDialog();
+ frmRD.ShowDialog();
}
}
- // Quick check to make sure some titles were found.
+ // Check if there was titles in the dvd title dropdown
+ // If there isn't any, rescan the DVD. hbcli occasionally fails (see bug in encode) with standard error.
if (filename != "")
{
- if (drp_dvdtitle.Items.Count == 0)
+ if (drp_dvdtitle.Items.Count == 0)
{
- MessageBox.Show("No Title(s) found. Please make sure you have selected a valid, non-copy protected source. Please refer to the FAQ for details..", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+ MessageBox.Show(scanTwice.ToString());
+ if (scanTwice == 0)
+ {
+ MessageBox.Show("Scan Failed. Will attempt to scan the source 1 more time.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+ Form frmRD = new frmReadDVD(filename, this, dvdInfoWindow);
+ frmRD.ShowDialog();
+ scanTwice = 1;
+ }
}
}
else
@@ -585,6 +595,11 @@ namespace Handbrake text_source.Text = "Click 'Browse' to continue";
}
+ if (drp_dvdtitle.Items.Count == 0)
+ {
+ MessageBox.Show("No Title(s) found. Please make sure you have selected a valid, non-copy protected source. Please refer to the FAQ for details.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+ }
+
}
private void btn_destBrowse_Click(object sender, EventArgs e)
@@ -665,6 +680,7 @@ namespace Handbrake }
ThreadPool.QueueUserWorkItem(procMonitor, query);
+ lbl_encode.Text = "Encoding Started";
}
private void btn_eCancel_Click(object sender, EventArgs e)
@@ -683,22 +699,30 @@ namespace Handbrake }
else
{
- hbProc = process.runCli(this, (string)state, true, true, false, true);
+ hbProc = process.runCli(this, (string)state, false, false, false, false);
MessageBox.Show("The encode process has now started.", "Status", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
try
{
- Parsing.Parser encode = new Parsing.Parser(hbProc.StandardError.BaseStream);
- encode.OnEncodeProgress += encode_OnEncodeProgress;
- while (!encode.EndOfStream)
- {
- encode.ReadLine();
- }
+
+ //*****************************************************************************************
+ // BUG!
+ // When the below code is used and standard error is set to true, hbcli is outputing a
+ // video stream which has mild corruption issues every few seconds.
+ // Maybe an issue with the Parser cauing the CLI to hickup/pause?
+ //*****************************************************************************************
+
+ //Parsing.Parser encode = new Parsing.Parser(hbProc.StandardError.BaseStream);
+ //encode.OnEncodeProgress += encode_OnEncodeProgress;
+ //while (!encode.EndOfStream)
+ //{
+ // encode.ReadLine();
+ //}
hbProc.WaitForExit();
process.closeCLI();
- hbProc = null;
+
}
catch (Exception)
{
@@ -706,6 +730,7 @@ namespace Handbrake }
MessageBox.Show("The encode process has now ended.", "Status", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
+ hbProc = null;
}
}
|