<AssemblyName>Handbrake</AssemblyName>\r
<ApplicationIcon>handbrakepineapple.ico</ApplicationIcon>\r
<StartupObject>Handbrake.Program</StartupObject>\r
+ <TargetZone>LocalIntranet</TargetZone>\r
+ <GenerateManifests>false</GenerateManifests>\r
</PropertyGroup>\r
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
<DebugSymbols>true</DebugSymbols>\r
<DebugType>full</DebugType>\r
- <Optimize>false</Optimize>\r
+ <Optimize>true</Optimize>\r
<OutputPath>bin\Debug\</OutputPath>\r
<DefineConstants>DEBUG;TRACE</DefineConstants>\r
<ErrorReport>prompt</ErrorReport>\r
<WarningLevel>4</WarningLevel>\r
+ <LangVersion>default</LangVersion>\r
+ <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>\r
+ <NoStdLib>false</NoStdLib>\r
</PropertyGroup>\r
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
<DebugType>pdbonly</DebugType>\r
</ItemGroup>\r
<ItemGroup>\r
<Content Include="handbrakepineapple.ico" />\r
+ <BaseApplicationManifest Include="Properties\app.manifest" />\r
<None Include="Resources\Remove.png" />\r
<None Include="Resources\Movies.png" />\r
<None Include="Resources\info.png" />\r
public static DVD Parse(StreamReader output)\r
{\r
DVD thisDVD = new DVD();\r
- while (!output.EndOfStream)\r
+ try\r
{\r
- if ((char)output.Peek() == '+')\r
+ while (!output.EndOfStream)\r
{\r
- string testb = output.ReadToEnd();\r
- thisDVD.m_titles.AddRange(Title.ParseList(testb));\r
- }\r
- else\r
- {\r
- output.ReadLine();\r
+ if ((char)output.Peek() == '+')\r
+ {\r
+ thisDVD.m_titles.AddRange(Title.ParseList(output.ReadToEnd()));\r
+ }\r
+ else\r
+ {\r
+ output.ReadLine();\r
+ }\r
}\r
}\r
+ catch (Exception exc)\r
+ {\r
+ MessageBox.Show("DVD.CS - Parse" + exc.ToString());\r
+ }\r
return thisDVD;\r
}\r
}\r
using System.Text;\r
using System.IO;\r
using System.Text.RegularExpressions;\r
+using System.Windows.Forms;\r
\r
namespace Handbrake.Parsing\r
{\r
public override string ReadLine()\r
{\r
string tmp = base.ReadLine();\r
- this.m_buffer += tmp;\r
- Match m = Regex.Match(tmp, "^Scanning title ([0-9]*) of ([0-9]*)");\r
- if (OnReadLine != null)\r
+ try\r
{\r
- OnReadLine(this, tmp);\r
- }\r
- if (m.Success && OnScanProgress != null)\r
- {\r
- OnScanProgress(this, int.Parse(m.Groups[1].Value), int.Parse(m.Groups[2].Value));\r
- }\r
- m = Regex.Match(tmp, @"^Encoding: task ([0-9]*) of ([0-9]*), ([0-9]*\.[0-9]*) %( \(([0-9]*\.[0-9]*) fps, avg ([0-9]*\.[0-9]*) fps, ETA ([0-9]{2})h([0-9]{2})m([0-9]{2})s\))?");\r
- if (m.Success && OnEncodeProgress != null)\r
- {\r
- int currentTask = int.Parse(m.Groups[1].Value);\r
- int totalTasks = int.Parse(m.Groups[2].Value);\r
- float percent = float.Parse(m.Groups[3].Value);\r
- float currentFps = m.Groups[5].Value == string.Empty ? 0.0F : float.Parse(m.Groups[5].Value);\r
- float avgFps = m.Groups[6].Value == string.Empty ? 0.0F : float.Parse(m.Groups[6].Value);\r
- TimeSpan remaining = TimeSpan.Zero;\r
- if (m.Groups[7].Value != string.Empty)\r
+ \r
+ this.m_buffer += tmp;\r
+ Match m = Regex.Match(tmp, "^Scanning title ([0-9]*) of ([0-9]*)");\r
+ if (OnReadLine != null)\r
+ {\r
+ OnReadLine(this, tmp);\r
+ }\r
+ if (m.Success && OnScanProgress != null)\r
+ {\r
+ OnScanProgress(this, int.Parse(m.Groups[1].Value), int.Parse(m.Groups[2].Value));\r
+ }\r
+ m = Regex.Match(tmp, @"^Encoding: task ([0-9]*) of ([0-9]*), ([0-9]*\.[0-9]*) %( \(([0-9]*\.[0-9]*) fps, avg ([0-9]*\.[0-9]*) fps, ETA ([0-9]{2})h([0-9]{2})m([0-9]{2})s\))?");\r
+ if (m.Success && OnEncodeProgress != null)\r
{\r
- remaining = TimeSpan.Parse(m.Groups[7].Value + ":" + m.Groups[8].Value + ":" + m.Groups[9].Value);\r
+ int currentTask = int.Parse(m.Groups[1].Value);\r
+ int totalTasks = int.Parse(m.Groups[2].Value);\r
+ float percent = float.Parse(m.Groups[3].Value);\r
+ float currentFps = m.Groups[5].Value == string.Empty ? 0.0F : float.Parse(m.Groups[5].Value);\r
+ float avgFps = m.Groups[6].Value == string.Empty ? 0.0F : float.Parse(m.Groups[6].Value);\r
+ TimeSpan remaining = TimeSpan.Zero;\r
+ if (m.Groups[7].Value != string.Empty)\r
+ {\r
+ remaining = TimeSpan.Parse(m.Groups[7].Value + ":" + m.Groups[8].Value + ":" + m.Groups[9].Value);\r
+ }\r
+ OnEncodeProgress(this, currentTask, totalTasks, percent, currentFps, avgFps, remaining);\r
}\r
- OnEncodeProgress(this, currentTask, totalTasks, percent, currentFps, avgFps, remaining);\r
+ }\r
+ catch (Exception exc)\r
+ {\r
+ MessageBox.Show("Parser.cs - ReadLine " + exc.ToString());\r
}\r
return tmp;\r
}\r
public override string ReadToEnd()\r
{\r
string tmp = base.ReadToEnd();\r
- this.m_buffer += tmp;\r
- if (OnReadToEnd != null)\r
+ try\r
+ {\r
+ \r
+ this.m_buffer += tmp;\r
+ if (OnReadToEnd != null)\r
+ {\r
+ OnReadToEnd(this, tmp);\r
+ }\r
+ }\r
+ catch (Exception exc)\r
{\r
- OnReadToEnd(this, tmp);\r
+ MessageBox.Show("Parser.cs - ReadToEnd " + exc.ToString());\r
}\r
return tmp;\r
}\r
public static Title Parse(StringReader output)\r
{\r
Title thisTitle = new Title();\r
-\r
- // Match track number for this title\r
try\r
{\r
-\r
+ // Match track number for this title\r
Match m = Regex.Match(output.ReadLine(), @"^\+ title ([0-9]*):");\r
if (m.Success)\r
{\r
output.ReadLine();\r
\r
// Get duration for this title\r
+\r
m = Regex.Match(output.ReadLine(), @"^ \+ duration: ([0-9]{2}:[0-9]{2}:[0-9]{2})");\r
if (m.Success)\r
{\r
thisTitle.m_duration = TimeSpan.Parse(m.Groups[1].Value);\r
}\r
\r
+\r
// Get resolution, aspect ratio and FPS for this title\r
m = Regex.Match(output.ReadLine(), @"^ \+ size: ([0-9]*)x([0-9]*), aspect: ([0-9]*\.[0-9]*), ([0-9]*\.[0-9]*) fps");\r
if (m.Success)\r
{\r
thisTitle.m_resolution = new Size(int.Parse(m.Groups[1].Value), int.Parse(m.Groups[2].Value));\r
- thisTitle.m_aspectRatio = m.Groups[3].ToString(); // Converted to a String for French Lanuage based systems. Some weird exception thrown\r
- // when trying to parse it as a float\r
- // we don't need FPS right now\r
+ thisTitle.m_aspectRatio = m.Groups[3].ToString(); // Converted to a String from float. Caused issue on french systems\r
+ // French system floats are 1,78 not 1.78 and the CLI always outputs a . \r
}\r
\r
// Get autocrop region for this title\r
}\r
catch (Exception exc)\r
{\r
- MessageBox.Show(exc.ToString());\r
+ MessageBox.Show("Title.cs - Parse " + exc.ToString());\r
}\r
+ \r
+ \r
return thisTitle;\r
}\r
\r
public static Title[] ParseList(string output)\r
{\r
List<Title> titles = new List<Title>();\r
- StringReader sr = new StringReader(output);\r
- while ((char)sr.Peek() == '+')\r
+ try\r
+ {\r
+ StringReader sr = new StringReader(output);\r
+ while ((char)sr.Peek() == '+')\r
+ {\r
+ titles.Add(Title.Parse(sr));\r
+ }\r
+ }\r
+ catch (Exception exc)\r
{\r
- titles.Add(Title.Parse(sr));\r
+ MessageBox.Show("Title.cs - ParseList " + exc.ToString());\r
}\r
return titles.ToArray();\r
}\r
using System.Reflection;\r
using System.Runtime.CompilerServices;\r
using System.Runtime.InteropServices;\r
+using System.Resources;\r
\r
// General Information about an assembly is controlled through the following \r
// set of attributes. Change these attribute values to modify the information\r
// associated with an assembly.\r
[assembly: AssemblyTitle("Handbrake")]\r
-[assembly: AssemblyDescription("")]\r
+[assembly: AssemblyDescription("DVD to MPEG-4 converter")]\r
[assembly: AssemblyConfiguration("")]\r
-[assembly: AssemblyCompany("")]\r
+[assembly: AssemblyCompany("Handbrake")]\r
[assembly: AssemblyProduct("Handbrake")]\r
[assembly: AssemblyCopyright("Copyright © 2007")]\r
[assembly: AssemblyTrademark("")]\r
// Build Number\r
// Revision\r
//\r
-[assembly: AssemblyVersion("2.4.0.0")]\r
-[assembly: AssemblyFileVersion("20.4.0.0")]\r
+[assembly: AssemblyVersion("2.4.0.1")]\r
+[assembly: AssemblyFileVersion("2.4.0.1")]\r
+[assembly: NeutralResourcesLanguageAttribute("en-GB")]\r
CheckPixelRatio.CheckState = CheckState.Unchecked;\r
text_width.Text = "368";\r
text_height.Text = "208";\r
- drp_videoEncoder.Text = "H.264";\r
+ drp_videoEncoder.Text = "Mpeg 4";\r
text_bitrate.Text = "1024";\r
text_filesize.Text = "";\r
slider_videoQuality.Value = 0;\r
}\r
catch(Exception exc)\r
{\r
- MessageBox.Show(exc.ToString());\r
+ MessageBox.Show("frmReadDVD.cs - btn_ok_Click " + exc.ToString());\r
}\r
}\r
\r
}\r
catch(Exception exc)\r
{\r
- MessageBox.Show(exc.ToString());\r
+ MessageBox.Show("frmReadDVD.cs - updateUIElements " + exc.ToString());\r
}\r
}\r
\r
}\r
catch (Exception exc)\r
{\r
- MessageBox.Show(exc.ToString());\r
+ MessageBox.Show("frmReadDVD.cs - startProc " + exc.ToString());\r
}\r
\r
}\r