summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions
diff options
context:
space:
mode:
authorsr55 <[email protected]>2007-12-07 12:58:43 +0000
committersr55 <[email protected]>2007-12-07 12:58:43 +0000
commit175cd14da19623ac43e63667db39b03c91ff8389 (patch)
treea1ecd5a81b84b4e5534a6ffeed98d30adfee4cf5 /win/C#/Functions
parent55bc09575e71972777116cb35fc92b20ab6061f4 (diff)
WinGui:
- Update check on start-up moved onto a separate thread. Start-up should now be significantly faster. It will no longer stall if the server is slow responding. - Sparkle style Updater now appears on start-up if an update exists rather than just a text label. - Main form frmMain has been re-arranged slightly. Resolution boxes and Aspect ratio have been moved onto the picture settings tab. (Allows for more space on the tabbed portion of the window. Audio Tab has been re-arranged. - Picture cropping text boxes have been changed to numeric boxes. - Support for 2nd Audio track has been added. - Support for Forced Subtitles has been added. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1102 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions')
-rw-r--r--win/C#/Functions/QueryParser.cs42
-rw-r--r--win/C#/Functions/RssReader.cs2
2 files changed, 40 insertions, 4 deletions
diff --git a/win/C#/Functions/QueryParser.cs b/win/C#/Functions/QueryParser.cs
index 174f92218..00ae96655 100644
--- a/win/C#/Functions/QueryParser.cs
+++ b/win/C#/Functions/QueryParser.cs
@@ -471,6 +471,18 @@ namespace Handbrake.Functions
}
}
+ private string q_audioTrack2;
+ /// <summary>
+ /// Returns a string with the First selected Audio track
+ /// </summary>
+ public string AudioTrack2
+ {
+ get
+ {
+ return this.q_audioTrack2;
+ }
+ }
+
private string q_audioTrackMix;
/// <summary>
/// Returns a string with the First selected Audio track Mix
@@ -495,6 +507,18 @@ namespace Handbrake.Functions
}
}
+ private Boolean q_forcedSubs;
+ /// <summary>
+ /// Returns a string with the selected subtitle track
+ /// </summary>
+ public Boolean ForcedSubtitles
+ {
+ get
+ {
+ return this.q_forcedSubs;
+ }
+ }
+
private string q_h264;
/// <summary>
/// Returns a string with the Advanced H264 query string
@@ -569,7 +593,9 @@ namespace Handbrake.Functions
Match audioBitrate = Regex.Match(input, @"-B ([0-9]*)");
Match audioSampleRate = Regex.Match(input, @"-R ([0-9.]*)");
Match audioChannelsMix = Regex.Match(input, @"-6 ([0-9a-z0-9]*)"); // 1 -6 dpl2 // Broken
- Match audioChannel = Regex.Match(input, @"-a ([0-9]*)");
+ Match audioTrack1 = Regex.Match(input, @"-a ([0-9]*)");
+ Match audioTrack2 = Regex.Match(input, @"-a ([0-9]*),([0-9]*)");
+ Match forcedSubtitles = Regex.Match(input, @"-F");
//H264 Tab
Match x264 = Regex.Match(input, @"-x ([,a-zA-Z0-9=:-]*)");
@@ -781,11 +807,19 @@ namespace Handbrake.Functions
if (audioSampleRate.Success != false)
thisQuery.q_audioSamplerate = audioSampleRate.ToString().Replace("-R ", "");
- if (audioChannel.Success != false)
- thisQuery.q_audioTrack1 = audioChannel.ToString().Replace("-a ", "");
+ if (audioTrack1.Success != false)
+ thisQuery.q_audioTrack1 = audioTrack1.ToString().Replace("-a ", "");
else
thisQuery.q_audioTrack1 = "Automatic";
+ if (audioTrack2.Success != false)
+ {
+ string[] audioChan = audioTrack2.ToString().Split(',');
+ thisQuery.q_audioTrack2 = audioChan[1];
+ }
+ else
+ thisQuery.q_audioTrack2 = "None";
+
thisQuery.q_audioTrackMix = "Automatic";
if (audioChannelsMix.Success != false)
{
@@ -817,6 +851,8 @@ namespace Handbrake.Functions
else
thisQuery.q_subtitles = "None";
+ thisQuery.q_forcedSubs = forcedSubtitles.Success;
+
#endregion
//
diff --git a/win/C#/Functions/RssReader.cs b/win/C#/Functions/RssReader.cs
index d564eeeb5..36d105d8d 100644
--- a/win/C#/Functions/RssReader.cs
+++ b/win/C#/Functions/RssReader.cs
@@ -22,7 +22,7 @@ namespace Handbrake.Functions
private string readRss()
{
- rssReader = new XmlTextReader("http://download.m0k.org/handbrake/appcast.xml");
+ rssReader = new XmlTextReader("http://handbrake.m0k.org/appcast.xml");
rssDoc = new XmlDocument();
rssDoc.Load(rssReader);