diff options
author | sr55 <[email protected]> | 2012-06-14 19:08:34 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-06-14 19:08:34 +0000 |
commit | a53a05ae0921b38cc1c9d3dd3dd5bab09a6c7f5f (patch) | |
tree | 0b967e1f37804b649977a7be327036241e6f7ec9 /win | |
parent | 6b07388d5ea2ee6fdb8613d024913062dbcbd72a (diff) |
WinGui: Code Cleanup
- New file headers for App Services
- Update Interop to include an IWindsorInstaller implementation
- Update Interop Converter (new framerates and fflac)
- Many stylecop warnings fixed.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4734 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
78 files changed, 1209 insertions, 558 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Collections/SerializableDictionary.cs b/win/CS/HandBrake.ApplicationServices/Collections/SerializableDictionary.cs index ad6a56221..15ac8a7c0 100644 --- a/win/CS/HandBrake.ApplicationServices/Collections/SerializableDictionary.cs +++ b/win/CS/HandBrake.ApplicationServices/Collections/SerializableDictionary.cs @@ -1,13 +1,16 @@ -/* SerializableDictionary.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="SerializableDictionary.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// A Serializable Dictionary
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Collections
{
using System.Collections.Generic;
using System.Collections.Specialized;
- using System.Runtime.Serialization;
using System.Xml.Serialization;
/// <summary>
diff --git a/win/CS/HandBrake.ApplicationServices/Converters/EnumToDescConverter.cs b/win/CS/HandBrake.ApplicationServices/Converters/EnumToDescConverter.cs index d66f27a7e..a9cc5410b 100644 --- a/win/CS/HandBrake.ApplicationServices/Converters/EnumToDescConverter.cs +++ b/win/CS/HandBrake.ApplicationServices/Converters/EnumToDescConverter.cs @@ -1,8 +1,11 @@ -/* EnumToDescConveter.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
-
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="EnumToDescConverter.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Enum to Description Converter
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Converters
{
@@ -14,15 +17,15 @@ namespace HandBrake.ApplicationServices.Converters /// <summary>
/// Enum to Description Converter
/// </summary>
- public class EnumToDescConveter : EnumConverter
+ public class EnumToDescConverter : EnumConverter
{
/// <summary>
- /// Initializes a new instance of the <see cref="EnumToDescConveter"/> class.
+ /// Initializes a new instance of the <see cref="EnumToDescConverter"/> class.
/// </summary>
/// <param name="type">
/// The type.
/// </param>
- public EnumToDescConveter(Type type)
+ public EnumToDescConverter(Type type)
: base(type)
{
}
diff --git a/win/CS/HandBrake.ApplicationServices/EventArgs/EncodeCompletedEventArgs.cs b/win/CS/HandBrake.ApplicationServices/EventArgs/EncodeCompletedEventArgs.cs index 2d613f6d5..12f3af2e9 100644 --- a/win/CS/HandBrake.ApplicationServices/EventArgs/EncodeCompletedEventArgs.cs +++ b/win/CS/HandBrake.ApplicationServices/EventArgs/EncodeCompletedEventArgs.cs @@ -1,7 +1,11 @@ -/* EncodeCompletedEventArgs.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="EncodeCompletedEventArgs.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Encode Progress Event Args
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.EventArgs
{
diff --git a/win/CS/HandBrake.ApplicationServices/EventArgs/EncodeProgressEventArgs.cs b/win/CS/HandBrake.ApplicationServices/EventArgs/EncodeProgressEventArgs.cs index 8ef8ceb39..f4c7e9446 100644 --- a/win/CS/HandBrake.ApplicationServices/EventArgs/EncodeProgressEventArgs.cs +++ b/win/CS/HandBrake.ApplicationServices/EventArgs/EncodeProgressEventArgs.cs @@ -1,7 +1,11 @@ -/* EncodeProgressEventArgs.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="EncodeProgressEventArgs.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Encode Progress Event Args
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.EventArgs
{
diff --git a/win/CS/HandBrake.ApplicationServices/EventArgs/QueueProgressEventArgs.cs b/win/CS/HandBrake.ApplicationServices/EventArgs/QueueProgressEventArgs.cs index 8613187bc..016b853fa 100644 --- a/win/CS/HandBrake.ApplicationServices/EventArgs/QueueProgressEventArgs.cs +++ b/win/CS/HandBrake.ApplicationServices/EventArgs/QueueProgressEventArgs.cs @@ -1,7 +1,11 @@ -/* QueueProgressEventArgs.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="QueueProgressEventArgs.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Queue Progress Event Args
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.EventArgs
{
diff --git a/win/CS/HandBrake.ApplicationServices/EventArgs/ScanCompletedEventArgs.cs b/win/CS/HandBrake.ApplicationServices/EventArgs/ScanCompletedEventArgs.cs index 9b0437ac7..7c9ad7ddd 100644 --- a/win/CS/HandBrake.ApplicationServices/EventArgs/ScanCompletedEventArgs.cs +++ b/win/CS/HandBrake.ApplicationServices/EventArgs/ScanCompletedEventArgs.cs @@ -1,7 +1,11 @@ -/* ScanCompletedEventArgs.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="ScanCompletedEventArgs.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Scan Progress Event Args
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.EventArgs
{
diff --git a/win/CS/HandBrake.ApplicationServices/EventArgs/ScanProgressEventArgs.cs b/win/CS/HandBrake.ApplicationServices/EventArgs/ScanProgressEventArgs.cs index 1a6bdb0a1..f8d04afae 100644 --- a/win/CS/HandBrake.ApplicationServices/EventArgs/ScanProgressEventArgs.cs +++ b/win/CS/HandBrake.ApplicationServices/EventArgs/ScanProgressEventArgs.cs @@ -1,7 +1,11 @@ -/* ScanProgressEventArgs.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="ScanProgressEventArgs.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Scan Progress Event Args
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.EventArgs
{
diff --git a/win/CS/HandBrake.ApplicationServices/Exceptions/GeneralApplicationException.cs b/win/CS/HandBrake.ApplicationServices/Exceptions/GeneralApplicationException.cs index 1ee6608ba..59c952a90 100644 --- a/win/CS/HandBrake.ApplicationServices/Exceptions/GeneralApplicationException.cs +++ b/win/CS/HandBrake.ApplicationServices/Exceptions/GeneralApplicationException.cs @@ -1,7 +1,11 @@ -/* GeneralApplicationException.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr/>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="GeneralApplicationException.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The Encode Failure Exception
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Exceptions
{
diff --git a/win/CS/HandBrake.ApplicationServices/Extensions/StringExtensions.cs b/win/CS/HandBrake.ApplicationServices/Extensions/StringExtensions.cs index d420e68c3..bc9deb697 100644 --- a/win/CS/HandBrake.ApplicationServices/Extensions/StringExtensions.cs +++ b/win/CS/HandBrake.ApplicationServices/Extensions/StringExtensions.cs @@ -1,7 +1,11 @@ -/* StringExtensions.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="StringExtensions.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// String Extensions
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Extensions
{
diff --git a/win/CS/HandBrake.ApplicationServices/Functions/Converters.cs b/win/CS/HandBrake.ApplicationServices/Functions/Converters.cs index 2974d4fbc..2f930f30f 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/Converters.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/Converters.cs @@ -1,7 +1,11 @@ -/* Converters.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Converters.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// A class to convert various things to native C# objects
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Functions
{
diff --git a/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs b/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs index 9bbfc30d0..fa1a8df3e 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs @@ -1,7 +1,11 @@ -/* EnumHelper.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="EnumHelper.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Enum Helpers
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Functions
{
diff --git a/win/CS/HandBrake.ApplicationServices/Functions/GrowlCommunicator.cs b/win/CS/HandBrake.ApplicationServices/Functions/GrowlCommunicator.cs index aab8c5f19..ca195c000 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/GrowlCommunicator.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/GrowlCommunicator.cs @@ -1,7 +1,11 @@ -/* GrowlCommunicator.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="GrowlCommunicator.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Provides all functionality for communicating with Growl for Windows.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Functions
{
diff --git a/win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs b/win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs index ec42f9e4f..e58e1a5fe 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs @@ -1,7 +1,11 @@ -/* InteropModelCreator.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="InteropModelCreator.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// A Utility Class to Convert a
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Functions
{
@@ -48,10 +52,6 @@ namespace HandBrake.ApplicationServices.Functions // Which will be converted to this EncodeJob Model.
EncodeJob job = new EncodeJob();
-
-
-
-
EncodingProfile profile = new EncodingProfile();
job.EncodingProfile = profile;
@@ -172,7 +172,6 @@ namespace HandBrake.ApplicationServices.Functions break;
}
-
if (work.PointToPointMode == PointToPointMode.Seconds)
{
job.SecondsEnd = work.EndPoint;
@@ -190,7 +189,6 @@ namespace HandBrake.ApplicationServices.Functions // // TODO
//}
-
return job;
}
diff --git a/win/CS/HandBrake.ApplicationServices/Functions/PlistHelper.cs b/win/CS/HandBrake.ApplicationServices/Functions/PlistHelper.cs index 8ce092dad..478e21b83 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/PlistHelper.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/PlistHelper.cs @@ -1,7 +1,11 @@ -/* PlistHelper.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="PlistHelper.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// A Plist Helper
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Functions
{
diff --git a/win/CS/HandBrake.ApplicationServices/Functions/System.cs b/win/CS/HandBrake.ApplicationServices/Functions/SystemInfo.cs index 9b08a4be2..86a97ca11 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/System.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/SystemInfo.cs @@ -1,7 +1,11 @@ -/* System.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="SystemInfo.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The System Information.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Functions
{
diff --git a/win/CS/HandBrake.ApplicationServices/Functions/Win32.cs b/win/CS/HandBrake.ApplicationServices/Functions/Win32.cs index 94a34f529..f9d031d5c 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/Win32.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/Win32.cs @@ -1,15 +1,16 @@ -/* win32.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Win32.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Win32 API calls
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Functions
{
using System;
- using System.ComponentModel;
- using System.Diagnostics;
using System.Runtime.InteropServices;
- using System.Windows;
using System.Windows.Threading;
/// <summary>
diff --git a/win/CS/HandBrake.ApplicationServices/Functions/Win7.cs b/win/CS/HandBrake.ApplicationServices/Functions/Win7.cs index b2262f147..c12ac56e4 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/Win7.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/Win7.cs @@ -1,11 +1,14 @@ -/* Win7.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Win7.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// A class implimenting Windows 7 Specific features
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Functions
{
- using System;
using Microsoft.WindowsAPICodePack.Taskbar;
/// <summary>
diff --git a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj index 62c5dc916..865a24b9a 100644 --- a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj +++ b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj @@ -105,7 +105,7 @@ <Compile Include="Functions\GrowlCommunicator.cs" />
<Compile Include="Functions\InteropModelCreator.cs" />
<Compile Include="Functions\PlistHelper.cs" />
- <Compile Include="Functions\System.cs" />
+ <Compile Include="Functions\SystemInfo.cs" />
<Compile Include="Functions\Win32.cs" />
<Compile Include="Functions\Win7.cs" />
<Compile Include="Model\DriveInformation.cs" />
@@ -119,7 +119,6 @@ <Compile Include="Model\Encoding\SubtitleTrack.cs" />
<Compile Include="Model\General\UpdateCheckInformation.cs" />
<Compile Include="Model\General\UpdateCheckResult.cs" />
- <Compile Include="Model\ModelBase.cs" />
<Compile Include="Model\Preset.cs" />
<Compile Include="Model\PresetPictureSettingsMode.cs" />
<Compile Include="Model\QueueItemStatus.cs" />
diff --git a/win/CS/HandBrake.ApplicationServices/Model/DriveInformation.cs b/win/CS/HandBrake.ApplicationServices/Model/DriveInformation.cs index 65708cee2..25ff6930b 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/DriveInformation.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/DriveInformation.cs @@ -1,7 +1,11 @@ -/* DriveInformation.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="DriveInformation.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Information about a DVD drive
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Model
{
diff --git a/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs b/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs index f2d5828f5..6ed3bf2e1 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs @@ -1,7 +1,11 @@ -/* EncodeTask.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="EncodeTask.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// An Encode Task
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Model
{
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AllowedPassthru.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AllowedPassthru.cs index 31447355b..7b407f297 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AllowedPassthru.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AllowedPassthru.cs @@ -1,7 +1,11 @@ -/* AllowedPassthru.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="AllowedPassthru.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Allowed Passthru Options
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Model.Encoding
{
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs index a9d42861a..49348048f 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs @@ -13,6 +13,8 @@ namespace HandBrake.ApplicationServices.Model.Encoding using System.ComponentModel;
using System.Globalization;
+ using Caliburn.Micro;
+
using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Parsing;
using HandBrake.Interop.Model.Encoding;
@@ -20,7 +22,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding /// <summary>
/// An Audio Track for the Audio Panel
/// </summary>
- public class AudioTrack : ModelBase
+ public class AudioTrack : PropertyChangedBase
{
#region Constants and Fields
@@ -100,7 +102,6 @@ namespace HandBrake.ApplicationServices.Model.Encoding this.mixDown = track.MixDown;
this.sampleRate = track.SampleRate;
this.scannedTrack = new Audio();
- this.trackName = track.TrackName;
}
#endregion
@@ -159,7 +160,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding set
{
this.bitrate = value;
- this.OnPropertyChanged("Bitrate");
+ this.NotifyOfPropertyChange("Bitrate");
}
}
@@ -178,7 +179,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding if (!object.Equals(value, this.drc))
{
this.drc = value;
- this.OnPropertyChanged("DRC");
+ this.NotifyOfPropertyChange("DRC");
}
}
}
@@ -196,9 +197,9 @@ namespace HandBrake.ApplicationServices.Model.Encoding set
{
this.encoder = value;
- this.OnPropertyChanged("Encoder");
- this.OnPropertyChanged("IsPassthru");
- this.OnPropertyChanged("TrackReference");
+ this.NotifyOfPropertyChange(() => this.Encoder);
+ this.NotifyOfPropertyChange("IsPassthru");
+ this.NotifyOfPropertyChange("TrackReference");
}
}
@@ -217,7 +218,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding if (!object.Equals(value, this.gain))
{
this.gain = value;
- this.OnPropertyChanged("Gain");
+ this.NotifyOfPropertyChange("Gain");
}
}
}
@@ -235,8 +236,8 @@ namespace HandBrake.ApplicationServices.Model.Encoding set
{
this.mixDown = value;
- this.OnPropertyChanged("MixDown");
- this.OnPropertyChanged("TrackReference");
+ this.NotifyOfPropertyChange("MixDown");
+ this.NotifyOfPropertyChange("TrackReference");
}
}
@@ -253,7 +254,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding set
{
this.sampleRate = value;
- this.OnPropertyChanged("SampleRate");
+ this.NotifyOfPropertyChange("SampleRate");
}
}
@@ -295,8 +296,8 @@ namespace HandBrake.ApplicationServices.Model.Encoding set
{
this.scannedTrack = value;
- this.OnPropertyChanged("ScannedTrack");
- this.OnPropertyChanged("TrackDisplay");
+ this.NotifyOfPropertyChange("ScannedTrack");
+ this.NotifyOfPropertyChange("TrackDisplay");
}
}
@@ -317,34 +318,6 @@ namespace HandBrake.ApplicationServices.Model.Encoding }
/// <summary>
- /// Gets the Display Value for this model.
- /// </summary>
- public string TrackDisplay
- {
- get
- {
- return this.ScannedTrack == null ? string.Empty : this.ScannedTrack.ToString();
- }
- }
-
- /// <summary>
- /// Gets or sets TrackName.
- /// </summary>
- public string TrackName
- {
- get
- {
- return this.trackName;
- }
-
- set
- {
- this.trackName = value;
- this.OnPropertyChanged("TrackName");
- }
- }
-
- /// <summary>
/// Gets a value indicating whether IsPassthru.
/// </summary>
public bool IsPassthru
@@ -361,6 +334,9 @@ namespace HandBrake.ApplicationServices.Model.Encoding }
}
+ /// <summary>
+ /// Gets a value indicating whether IsLossless.
+ /// </summary>
public bool IsLossless
{
get
@@ -369,6 +345,9 @@ namespace HandBrake.ApplicationServices.Model.Encoding }
}
+ /// <summary>
+ /// Gets TrackReference.
+ /// </summary>
public AudioTrack TrackReference
{
get { return this; }
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/ChapterMarker.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/ChapterMarker.cs index 0e0eb4b12..db3794151 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/ChapterMarker.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/ChapterMarker.cs @@ -1,7 +1,11 @@ -/* ChapterMarker.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="ChapterMarker.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// A Movie Chapter
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Model.Encoding
{
@@ -30,12 +34,12 @@ namespace HandBrake.ApplicationServices.Model.Encoding /// <param name="number">
/// The number.
/// </param>
- /// <param name="Name">
+ /// <param name="name">
/// The name.
/// </param>
- public ChapterMarker(int number, string Name)
+ public ChapterMarker(int number, string name)
{
- this.ChapterName = Name;
+ this.ChapterName = name;
this.ChapterNumber = number;
}
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/FramerateMode.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/FramerateMode.cs index 508e63ced..6392578a6 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/FramerateMode.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/FramerateMode.cs @@ -1,7 +1,11 @@ -/* VideoEncoderMode.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="FramerateMode.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The Mode of Video Encoding. CFR, VFR, PFR
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Model.Encoding
{
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/OutputFormat.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/OutputFormat.cs index fa5c3225f..813418264 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/OutputFormat.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/OutputFormat.cs @@ -1,7 +1,11 @@ -/* OutputFormat.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="OutputFormat.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The Output format.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Model.Encoding
{
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/PointToPointMode.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/PointToPointMode.cs index 00eac35f0..df0bc437c 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/PointToPointMode.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/PointToPointMode.cs @@ -1,7 +1,11 @@ -/* PointToPoint.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="PointToPointMode.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Point to Point Mode
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Model.Encoding
{
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs index d944dea97..92eb55b73 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs @@ -155,7 +155,6 @@ namespace HandBrake.ApplicationServices.Model.Encoding /// </summary>
public string SrtCharCode { get; set; }
-
/// <summary>
/// Gets or sets the SRT Filename
/// </summary>
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleType.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleType.cs index 5b533f829..64e8f8ff8 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleType.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleType.cs @@ -1,7 +1,11 @@ -/* SubtitleType.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="SubtitleType.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Subtitle Type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Model.Encoding
{
diff --git a/win/CS/HandBrake.ApplicationServices/Model/General/UpdateCheckInformation.cs b/win/CS/HandBrake.ApplicationServices/Model/General/UpdateCheckInformation.cs index 5932aa402..86045c938 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/General/UpdateCheckInformation.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/General/UpdateCheckInformation.cs @@ -1,7 +1,11 @@ -/* UpdateCheckInformation.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="UpdateCheckInformation.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Provides information about an update check.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Model.General
{
diff --git a/win/CS/HandBrake.ApplicationServices/Model/General/UpdateCheckResult.cs b/win/CS/HandBrake.ApplicationServices/Model/General/UpdateCheckResult.cs index 2f7c7e874..f29cc8560 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/General/UpdateCheckResult.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/General/UpdateCheckResult.cs @@ -1,7 +1,11 @@ -/* UpdateCheckResult.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="UpdateCheckResult.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Used in EndUpdateCheck() for update checking and the IAsyncResult design pattern.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Model.General
{
@@ -22,7 +26,7 @@ namespace HandBrake.ApplicationServices.Model.General /// <param name="info">
/// The info.
/// </param>
- public UpdateCheckResult(object asyncState, ApplicationServices.Model.General.UpdateCheckInformation info)
+ public UpdateCheckResult(object asyncState, UpdateCheckInformation info)
{
this.AsyncState = asyncState;
this.Result = info;
@@ -36,12 +40,13 @@ namespace HandBrake.ApplicationServices.Model.General /// <summary>
/// Gets the result of the update check.
/// </summary>
- public ApplicationServices.Model.General.UpdateCheckInformation Result { get; private set; }
+ public UpdateCheckInformation Result { get; private set; }
/// <summary>
/// Gets AsyncWaitHandle.
/// </summary>
/// <exception cref="NotImplementedException">
+ /// This is not implemented as it is not used.
/// </exception>
public WaitHandle AsyncWaitHandle
{
@@ -52,6 +57,7 @@ namespace HandBrake.ApplicationServices.Model.General /// Gets a value indicating whether CompletedSynchronously.
/// </summary>
/// <exception cref="NotImplementedException">
+ /// This is not implemented as it is not used.
/// </exception>
public bool CompletedSynchronously
{
@@ -62,6 +68,7 @@ namespace HandBrake.ApplicationServices.Model.General /// Gets a value indicating whether IsCompleted.
/// </summary>
/// <exception cref="NotImplementedException">
+ /// This is not implemented as it is not used.
/// </exception>
public bool IsCompleted
{
diff --git a/win/CS/HandBrake.ApplicationServices/Model/ModelBase.cs b/win/CS/HandBrake.ApplicationServices/Model/ModelBase.cs deleted file mode 100644 index 041b18eb3..000000000 --- a/win/CS/HandBrake.ApplicationServices/Model/ModelBase.cs +++ /dev/null @@ -1,22 +0,0 @@ -/* ModelBase.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
-
-namespace HandBrake.ApplicationServices.Model
-{
- using System.ComponentModel;
-
- public class ModelBase : INotifyPropertyChanged
- {
- public event PropertyChangedEventHandler PropertyChanged;
-
- protected virtual void OnPropertyChanged(string propertyName)
- {
- if (null != PropertyChanged)
- {
- PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
- }
- }
- }
-}
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Preset.cs b/win/CS/HandBrake.ApplicationServices/Model/Preset.cs index 5d165ae94..2a9a1693e 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Preset.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Preset.cs @@ -1,14 +1,14 @@ -/* Preset.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Preset.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// A Preset for encoding with.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Model
{
- using System;
-
- using Encoding;
-
/// <summary>
/// A Preset for encoding with.
/// </summary>
@@ -29,7 +29,6 @@ namespace HandBrake.ApplicationServices.Model /// </summary>
public string Query { get; set; }
-
/// <summary>
/// Gets or sets The version number which associates this preset with a HB build
/// </summary>
diff --git a/win/CS/HandBrake.ApplicationServices/Model/PresetPictureSettingsMode.cs b/win/CS/HandBrake.ApplicationServices/Model/PresetPictureSettingsMode.cs index fc2798fd1..a79f4b0e3 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/PresetPictureSettingsMode.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/PresetPictureSettingsMode.cs @@ -1,7 +1,11 @@ -/* PresetPictureSettingsMode.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="PresetPictureSettingsMode.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Picture Settings Mode when adding presets
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Model
{
diff --git a/win/CS/HandBrake.ApplicationServices/Model/QueueItemStatus.cs b/win/CS/HandBrake.ApplicationServices/Model/QueueItemStatus.cs index bfaad7eaa..c60945abd 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/QueueItemStatus.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/QueueItemStatus.cs @@ -1,7 +1,11 @@ -/* QueueItemStatus.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="QueueItemStatus.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Queue Item Status
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Model
{
@@ -13,7 +17,7 @@ namespace HandBrake.ApplicationServices.Model /// <summary>
/// Queue Item Status
/// </summary>
- [TypeConverter(typeof(EnumToDescConveter))]
+ [TypeConverter(typeof(EnumToDescConverter))]
public enum QueueItemStatus
{
[Description("Waiting")]
diff --git a/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs b/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs index 0fce6eaeb..a62115109 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs @@ -1,7 +1,11 @@ -/* QueueTask.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="QueueTask.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The QueueTask.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Model
{
diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Audio.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Audio.cs index e4cf6bf4a..0e65a3502 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Audio.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Audio.cs @@ -1,7 +1,11 @@ -/* AudioTrack.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Audio.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// An object represending an AudioTrack associated with a Title, in a DVD
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Parsing
{
diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/AudioHelper.cs b/win/CS/HandBrake.ApplicationServices/Parsing/AudioHelper.cs index 7ed83ca69..43c331337 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/AudioHelper.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/AudioHelper.cs @@ -1,7 +1,11 @@ -/* AudioHelper.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr/>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="AudioHelper.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// An Audio Helper Class
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Parsing
{
diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Chapter.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Chapter.cs index 4ec76fa1c..eb0313317 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Chapter.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Chapter.cs @@ -1,7 +1,11 @@ -/* Chapter.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Chapter.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// An object representing a Chapter aosciated with a Title, in a DVD
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Parsing
{
@@ -28,15 +32,15 @@ namespace HandBrake.ApplicationServices.Parsing /// <param name="number">
/// The number.
/// </param>
- /// <param name="Name">
+ /// <param name="name">
/// The name.
/// </param>
/// <param name="duration">
/// The duration.
/// </param>
- public Chapter(int number, string Name, TimeSpan duration)
+ public Chapter(int number, string name, TimeSpan duration)
{
- this.ChapterName = Name;
+ this.ChapterName = name;
this.ChapterNumber = number;
this.Duration = duration;
}
diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Parser.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Parser.cs index 15e021685..7f79e8aec 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Parser.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Parser.cs @@ -1,7 +1,11 @@ -/* Parser.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Parser.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// A delegate to handle custom events regarding data being parsed from the buffer
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Parsing
{
diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Source.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Source.cs index 696063f0f..c1eaccc7b 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Source.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Source.cs @@ -1,6 +1,11 @@ -/* Source.cs $ This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Source.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// An object representing a scanned DVD
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Parsing
{
diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs index d42cb0c22..a7c7158a6 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs @@ -1,7 +1,11 @@ -/* Subtitle.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Subtitle.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// An object that represents a subtitle associated with a Title, in a DVD
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Parsing
{
diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs index 7bce41669..8b3667271 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs @@ -1,7 +1,11 @@ -/* Title.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Title.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// An object that represents a single Title of a DVD
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Parsing
{
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs index d57f3a51f..537a97d71 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs @@ -1,7 +1,11 @@ -/* EncodeBase.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="EncodeBase.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// A Base Class for the Encode Services.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Services.Base
{
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs index cb920a862..8c04d5a3b 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs @@ -1,7 +1,11 @@ -/* Encode.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr/>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Encode.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Class which handles the CLI
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Services
{
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IEncode.cs index 7ba739617..426cad897 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IEncode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IEncode.cs @@ -1,7 +1,11 @@ -/* IEncode.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr/>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="IEncode.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Encode Progess Status
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Services.Interfaces
{
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IPresetService.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IPresetService.cs index 81eaa6849..63fe25158 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IPresetService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IPresetService.cs @@ -1,7 +1,11 @@ -/* IPresetService.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="IPresetService.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The Preset Service Interface
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Services.Interfaces
{
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueManager.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueManager.cs index b8b162d4f..e86b5fe7c 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueManager.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueManager.cs @@ -1,7 +1,11 @@ -/* IQueueManager.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr/>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="IQueueManager.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The Queue Manager Interface
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Services.Interfaces
{
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueProcessor.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueProcessor.cs index ad2635556..22cf365b0 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueProcessor.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueProcessor.cs @@ -1,7 +1,11 @@ -/* IQueueProcessor.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr/>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="IQueueProcessor.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The Queue Processor
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Services.Interfaces
{
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IScan.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IScan.cs index b992dc8eb..3ad25c583 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IScan.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IScan.cs @@ -1,7 +1,11 @@ -/* IScan.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr/>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="IScan.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Encode Progess Status
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Services.Interfaces
{
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IUserSettingService.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IUserSettingService.cs index c3290f64f..d7bba9550 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IUserSettingService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IUserSettingService.cs @@ -1,8 +1,11 @@ -/* IUserSettingService.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr/>.
- It may be used under the terms of the GNU General Public License. */
-
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="IUserSettingService.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The User Setting Service Interace.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Services.Interfaces
{
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs index d99bdbec8..1fe1845ad 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs @@ -1,7 +1,11 @@ -/* LibEncode.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="LibEncode.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// LibHB Implementation of IEncode
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Services
{
@@ -19,7 +23,7 @@ namespace HandBrake.ApplicationServices.Services using EncodeProgressEventArgs = HandBrake.ApplicationServices.EventArgs.EncodeProgressEventArgs;
/// <summary>
- /// TODO: Update summary.
+ /// LibHB Implementation of IEncode
/// </summary>
public class LibEncode : EncodeBase, IEncode
{
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs index 70a44ca56..8fe7affc6 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs @@ -1,7 +1,11 @@ -/* LibScan.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="LibScan.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Scan a Source
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Services
{
diff --git a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs index 11df7ccb2..a4946278a 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs @@ -1,7 +1,11 @@ -/* PresetService.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="PresetService.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The preset service manages HandBrake's presets
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Services
{
diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs index d80ee0660..0d3a40e7f 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs @@ -1,7 +1,12 @@ -/* QueueManager.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="QueueManager.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The Queue Manager.
+// Thread Safe.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Services
{
diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs index 7e67368e3..fe0675f96 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs @@ -1,7 +1,11 @@ -/* Queue.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr/>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="QueueProcessor.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The HandBrake Queue
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Services
{
@@ -10,8 +14,9 @@ namespace HandBrake.ApplicationServices.Services using System.IO;
using System.Windows.Forms;
+ using Caliburn.Micro;
+
using HandBrake.ApplicationServices.EventArgs;
- using HandBrake.ApplicationServices.Exceptions;
using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services.Interfaces;
@@ -24,7 +29,7 @@ namespace HandBrake.ApplicationServices.Services /// <summary>
/// The User Setting Service
/// </summary>
- private static IUserSettingService userSettingService = ServiceManager.UserSettingService;
+ private static IUserSettingService userSettingService = IoC.Get<IUserSettingService>();
/// <summary>
/// Initializes a new instance of the <see cref="QueueProcessor"/> class.
diff --git a/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs b/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs index a7dffd5fe..0d5118aee 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs @@ -1,7 +1,11 @@ -/* Scan.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="ScanService.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Scan a Source
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Services
{
diff --git a/win/CS/HandBrake.ApplicationServices/Services/UpdateService.cs b/win/CS/HandBrake.ApplicationServices/Services/UpdateService.cs index 02ed05a9d..899a953c4 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/UpdateService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/UpdateService.cs @@ -1,7 +1,11 @@ -/* UpdateService.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="UpdateService.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The Update Service
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Services
{
diff --git a/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs b/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs index 7fe50cd04..042c2487c 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs @@ -1,7 +1,11 @@ -/* UserSettingService.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="UserSettingService.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The User Setting Serivce
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Services
{
diff --git a/win/CS/HandBrake.ApplicationServices/Settings.StyleCop b/win/CS/HandBrake.ApplicationServices/Settings.StyleCop index 5d3a523a0..99c98c116 100644 --- a/win/CS/HandBrake.ApplicationServices/Settings.StyleCop +++ b/win/CS/HandBrake.ApplicationServices/Settings.StyleCop @@ -2,9 +2,39 @@ <Analyzers>
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
<Rules>
- <Rule Name="FileHeaderFileNameDocumentationMustMatchTypeName">
+ <Rule Name="FileMustHaveHeader">
<RuleSettings>
- <BooleanProperty Name="Enabled">False</BooleanProperty>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="FileHeaderMustShowCopyright">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="FileHeaderMustHaveCopyrightText">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="FileHeaderMustContainFileName">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="FileHeaderFileNameDocumentationMustMatchFileName">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="FileHeaderMustHaveSummary">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="FileHeaderMustHaveValidCompanyText">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/AppcastReader.cs b/win/CS/HandBrake.ApplicationServices/Utilities/AppcastReader.cs index 8b0053a86..0a3fac109 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/AppcastReader.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/AppcastReader.cs @@ -1,7 +1,11 @@ -/* AppcastReader.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="AppcastReader.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Appcast Reader - Used for parsing HandBrakes update file
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Utilities
{
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/CharCodesUtilities.cs b/win/CS/HandBrake.ApplicationServices/Utilities/CharCodesUtilities.cs index 9c9801015..8470927f6 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/CharCodesUtilities.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/CharCodesUtilities.cs @@ -1,7 +1,11 @@ -/* AppcastReader.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="CharCodesUtilities.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Char Codes
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Utilities
{
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs b/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs index 99ecd5cd6..34a078a7c 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs @@ -1,7 +1,11 @@ -/* UtilityService.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="GeneralUtilities.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// A Set of Static Utilites
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Utilities
{
@@ -12,9 +16,10 @@ namespace HandBrake.ApplicationServices.Utilities using System.Text;
using System.Windows.Forms;
+ using Caliburn.Micro;
+
using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Model;
- using HandBrake.ApplicationServices.Services;
using HandBrake.ApplicationServices.Services.Interfaces;
/// <summary>
@@ -25,7 +30,7 @@ namespace HandBrake.ApplicationServices.Utilities /// <summary>
/// The User Setting Service
/// </summary>
- private static IUserSettingService userSettingService = ServiceManager.UserSettingService;
+ private static readonly IUserSettingService UserSettingService = IoC.Get<IUserSettingService>();
/// <summary>
/// The Default Log Directory
@@ -113,7 +118,7 @@ namespace HandBrake.ApplicationServices.Utilities {
StringBuilder logHeader = new StringBuilder();
- logHeader.AppendLine(String.Format("HandBrake {0} {1}", userSettingService.GetUserSetting<string>(ASUserSettingConstants.HandBrakeVersion), userSettingService.GetUserSetting<int>(ASUserSettingConstants.HandBrakeBuild)));
+ logHeader.AppendLine(String.Format("HandBrake {0} {1}", UserSettingService.GetUserSetting<string>(ASUserSettingConstants.HandBrakeVersion), UserSettingService.GetUserSetting<int>(ASUserSettingConstants.HandBrakeBuild)));
logHeader.AppendLine(String.Format("OS: {0}", Environment.OSVersion));
logHeader.AppendLine(String.Format("CPU: {0}", SystemInfo.GetCpuCount));
logHeader.Append(String.Format("Ram: {0} MB, ", SystemInfo.TotalPhysicalMemory));
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs index b35a360a2..9f2c70bcf 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs @@ -1,7 +1,11 @@ -/* PlistUtility.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr/>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="PlistUtility.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Plist Preset Converter
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Utilities
{
@@ -22,7 +26,7 @@ namespace HandBrake.ApplicationServices.Utilities /// <summary>
/// Plist Preset Converter
/// </summary>
- public class PlistPresetHandler
+ public class PlistUtility
{
/// <summary>
/// The User Setting Service
@@ -38,6 +42,7 @@ namespace HandBrake.ApplicationServices.Utilities /// The filename.
/// </param>
/// <returns>
+ /// A Preset Object
/// </returns>
public static Preset Import(string filename)
{
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs index a5df48e2a..ec6f74562 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs @@ -1,7 +1,11 @@ -/* QueryGeneratorUtility.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr/>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="QueryGeneratorUtility.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Generate a CLI Query for HandBrakeCLI
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Utilities
{
@@ -10,7 +14,6 @@ namespace HandBrake.ApplicationServices.Utilities using System.Collections.ObjectModel;
using System.Globalization;
using System.IO;
- using System.Text.RegularExpressions;
using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Model;
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs index 5be0b0c83..9824ec44f 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs @@ -1,7 +1,11 @@ -/* QueryParser.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="QueryParserUtility.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Parse a CLI Query
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Utilities
{
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Converters.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Converters.cs index 9a4b175e5..cc12aa514 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Converters.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Converters.cs @@ -4,21 +4,20 @@ // </copyright>
// <summary>
// Defines the Converters type.
-// </summary> -// -------------------------------------------------------------------------------------------------------------------- - -using HandBrake.Interop.Model; - -namespace HandBrake.Interop -{ - using System; +// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop
+{
+ using System;
using System.Collections.Generic;
using HandBrake.Interop.HbLib;
using HandBrake.Interop.Model.Encoding;
using HandBrake.Interop.SourceData;
+ using HandBrake.Interop.Model;
- public static class Converters
+ public static class Converters
{
/// <summary>
/// Video Frame Rates
@@ -32,7 +31,11 @@ namespace HandBrake.Interop {23.976, 1126125},
{24, 1125000},
{25, 1080000},
- {29.97, 900900}
+ {29.97, 900900},
+ {30, 900000},
+ {50, 540000},
+ {59.94, 450450},
+ {60, 450000}
};
/// <summary>
@@ -159,6 +162,8 @@ namespace HandBrake.Interop return NativeConstants.HB_ACODEC_DCA_HD_PASS;
case AudioEncoder.Vorbis:
return NativeConstants.HB_ACODEC_VORBIS;
+ case AudioEncoder.ffflac:
+ return NativeConstants.HB_ACODEC_FFFLAC;
}
return 0;
@@ -191,85 +196,87 @@ namespace HandBrake.Interop case NativeConstants.HB_ACODEC_CA_AAC:
case NativeConstants.HB_ACODEC_CA_HAAC:
return AudioCodec.Aac;
+ case NativeConstants.HB_ACODEC_FFFLAC:
+ return AudioCodec.Flac;
default:
- return AudioCodec.Other; - } - } - - /// <summary> - /// Converts a native HB encoder structure to an Encoder model. - /// </summary> - /// <param name="encoder">The structure to convert.</param> - /// <returns>The converted model.</returns> - public static HBVideoEncoder NativeToVideoEncoder(hb_encoder_s encoder) - { - var result = new HBVideoEncoder - { - Id = encoder.encoder, - ShortName = encoder.short_name, - DisplayName = encoder.human_readable_name, - CompatibleContainers = Container.None - }; - - if ((encoder.muxers & NativeConstants.HB_MUX_MKV) > 0) - { - result.CompatibleContainers = result.CompatibleContainers | Container.Mkv; - } - - if ((encoder.muxers & NativeConstants.HB_MUX_MP4) > 0) - { - result.CompatibleContainers = result.CompatibleContainers | Container.Mp4; - } - - return result; - } - - /// <summary> - /// Converts a native HB encoder structure to an Encoder model. - /// </summary> - /// <param name="encoder">The structure to convert.</param> - /// <returns>The converted model.</returns> - public static HBAudioEncoder NativeToAudioEncoder(hb_encoder_s encoder) - { - var result = new HBAudioEncoder - { - Id = encoder.encoder, - ShortName = encoder.short_name, - DisplayName = encoder.human_readable_name, - CompatibleContainers = Container.None - }; - - if ((encoder.muxers & NativeConstants.HB_MUX_MKV) > 0) - { - result.CompatibleContainers = result.CompatibleContainers | Container.Mkv; - } - - if ((encoder.muxers & NativeConstants.HB_MUX_MP4) > 0) - { - result.CompatibleContainers = result.CompatibleContainers | Container.Mp4; - } - - result.QualityLimits = Encoders.GetAudioQualityLimits(encoder.encoder); - result.DefaultQuality = HBFunctions.hb_get_default_audio_quality((uint)encoder.encoder); - result.CompressionLimits = Encoders.GetAudioCompressionLimits(encoder.encoder); - result.DefaultCompression = HBFunctions.hb_get_default_audio_compression((uint) encoder.encoder); - - return result; - } - - /// <summary> - /// Converts a native HB mixdown structure to a Mixdown model. - /// </summary> - /// <param name="mixdown">The structure to convert.</param> - /// <returns>The converted model.</returns> - public static HBMixdown NativeToMixdown(hb_mixdown_s mixdown) - { - return new HBMixdown - { - Id = mixdown.amixdown, - ShortName = mixdown.short_name, - DisplayName = mixdown.human_readable_name - }; - } - } -} + return AudioCodec.Other;
+ }
+ }
+
+ /// <summary>
+ /// Converts a native HB encoder structure to an Encoder model.
+ /// </summary>
+ /// <param name="encoder">The structure to convert.</param>
+ /// <returns>The converted model.</returns>
+ public static HBVideoEncoder NativeToVideoEncoder(hb_encoder_s encoder)
+ {
+ var result = new HBVideoEncoder
+ {
+ Id = encoder.encoder,
+ ShortName = encoder.short_name,
+ DisplayName = encoder.human_readable_name,
+ CompatibleContainers = Container.None
+ };
+
+ if ((encoder.muxers & NativeConstants.HB_MUX_MKV) > 0)
+ {
+ result.CompatibleContainers = result.CompatibleContainers | Container.Mkv;
+ }
+
+ if ((encoder.muxers & NativeConstants.HB_MUX_MP4) > 0)
+ {
+ result.CompatibleContainers = result.CompatibleContainers | Container.Mp4;
+ }
+
+ return result;
+ }
+
+ /// <summary>
+ /// Converts a native HB encoder structure to an Encoder model.
+ /// </summary>
+ /// <param name="encoder">The structure to convert.</param>
+ /// <returns>The converted model.</returns>
+ public static HBAudioEncoder NativeToAudioEncoder(hb_encoder_s encoder)
+ {
+ var result = new HBAudioEncoder
+ {
+ Id = encoder.encoder,
+ ShortName = encoder.short_name,
+ DisplayName = encoder.human_readable_name,
+ CompatibleContainers = Container.None
+ };
+
+ if ((encoder.muxers & NativeConstants.HB_MUX_MKV) > 0)
+ {
+ result.CompatibleContainers = result.CompatibleContainers | Container.Mkv;
+ }
+
+ if ((encoder.muxers & NativeConstants.HB_MUX_MP4) > 0)
+ {
+ result.CompatibleContainers = result.CompatibleContainers | Container.Mp4;
+ }
+
+ result.QualityLimits = Encoders.GetAudioQualityLimits(encoder.encoder);
+ result.DefaultQuality = HBFunctions.hb_get_default_audio_quality((uint)encoder.encoder);
+ result.CompressionLimits = Encoders.GetAudioCompressionLimits(encoder.encoder);
+ result.DefaultCompression = HBFunctions.hb_get_default_audio_compression((uint) encoder.encoder);
+
+ return result;
+ }
+
+ /// <summary>
+ /// Converts a native HB mixdown structure to a Mixdown model.
+ /// </summary>
+ /// <param name="mixdown">The structure to convert.</param>
+ /// <returns>The converted model.</returns>
+ public static HBMixdown NativeToMixdown(hb_mixdown_s mixdown)
+ {
+ return new HBMixdown
+ {
+ Id = mixdown.amixdown,
+ ShortName = mixdown.short_name,
+ DisplayName = mixdown.human_readable_name
+ };
+ }
+ }
+}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs index d5bae2e97..efcd257e1 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs @@ -17,6 +17,7 @@ namespace HandBrake.Interop using System.Windows.Media.Imaging;
using HandBrake.Interop.HbLib;
+ using HandBrake.Interop.Interfaces;
using HandBrake.Interop.Model;
using HandBrake.Interop.Model.Encoding;
using HandBrake.Interop.SourceData;
@@ -24,7 +25,7 @@ namespace HandBrake.Interop /// <summary>
/// A wrapper for a HandBrake instance.
/// </summary>
- public class HandBrakeInstance : IDisposable
+ public class HandBrakeInstance : IHandBrakeInstance, IDisposable
{
/// <summary>
/// The modulus for picture size when auto-sizing dimensions.
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj index 62b901df8..8155e16f1 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj @@ -101,6 +101,12 @@ <CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
</PropertyGroup>
<ItemGroup>
+ <Reference Include="Castle.Core">
+ <HintPath>..\..\libraries\caliburn\Castle.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="Castle.Windsor">
+ <HintPath>..\..\libraries\caliburn\Castle.Windsor.dll</HintPath>
+ </Reference>
<Reference Include="PresentationCore">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
@@ -138,39 +144,41 @@ <Compile Include="HbLib\hb_job_s.cs" />
<Compile Include="HbLib\hb_title_s.cs" />
<Compile Include="HbLib\NativeConstants.cs" />
+ <Compile Include="Interfaces\IHandBrakeInstance.cs" />
<Compile Include="InteropUtilities.cs" />
+ <Compile Include="InteropWindsorInstaller.cs" />
<Compile Include="Language.cs" />
<Compile Include="LanguageCodes.cs" />
<Compile Include="MarshalingConstants.cs" />
- <Compile Include="MessageLoggedEventArgs.cs" /> - <Compile Include="Model\Cropping.cs" /> - <Compile Include="Model\EncodeJob.cs" /> - <Compile Include="Model\Encoders.cs" /> - <Compile Include="Model\Encoding\Anamorphic.cs" /> - <Compile Include="Model\Encoding\AudioEncodeRateType.cs" /> - <Compile Include="Model\Encoding\HBAudioEncoder.cs" /> - <Compile Include="Model\Encoding\AudioEncoder.cs" /> - <Compile Include="Model\Encoding\AudioEncoding.cs" /> - <Compile Include="Model\Encoding\Decomb.cs" /> + <Compile Include="MessageLoggedEventArgs.cs" />
+ <Compile Include="Model\Cropping.cs" />
+ <Compile Include="Model\EncodeJob.cs" />
+ <Compile Include="Model\Encoders.cs" />
+ <Compile Include="Model\Encoding\Anamorphic.cs" />
+ <Compile Include="Model\Encoding\AudioEncodeRateType.cs" />
+ <Compile Include="Model\Encoding\HBAudioEncoder.cs" />
+ <Compile Include="Model\Encoding\AudioEncoder.cs" />
+ <Compile Include="Model\Encoding\AudioEncoding.cs" />
+ <Compile Include="Model\Encoding\Decomb.cs" />
<Compile Include="Model\Encoding\Deinterlace.cs" />
- <Compile Include="Model\Encoding\Denoise.cs" /> - <Compile Include="Model\Encoding\Detelecine.cs" /> - <Compile Include="Model\Encoding\EncodingProfile.cs" /> - <Compile Include="Model\Encoding\HBMixdown.cs" /> - <Compile Include="Model\Encoding\HBVideoEncoder.cs" /> - <Compile Include="Model\Encoding\Mixdown.cs" /> - <Compile Include="Model\Encoding\OutputExtension.cs" /> - <Compile Include="Model\Encoding\Container.cs" /> - <Compile Include="Model\Encoding\VideoEncoder.cs" /> - <Compile Include="Model\Encoding\VideoEncodeRateType.cs" /> - <Compile Include="Model\Encoding\x264\x264Preset.cs" /> - <Compile Include="Model\Encoding\x264\x264Profile.cs" /> - <Compile Include="Model\Encoding\x264\x264Tune.cs" /> - <Compile Include="Model\BitrateLimits.cs" /> - <Compile Include="Model\RangeLimits.cs" /> - <Compile Include="Model\Size.cs" /> - <Compile Include="Model\SourceSubtitle.cs" /> - <Compile Include="Model\SourceType.cs" /> + <Compile Include="Model\Encoding\Denoise.cs" />
+ <Compile Include="Model\Encoding\Detelecine.cs" />
+ <Compile Include="Model\Encoding\EncodingProfile.cs" />
+ <Compile Include="Model\Encoding\HBMixdown.cs" />
+ <Compile Include="Model\Encoding\HBVideoEncoder.cs" />
+ <Compile Include="Model\Encoding\Mixdown.cs" />
+ <Compile Include="Model\Encoding\OutputExtension.cs" />
+ <Compile Include="Model\Encoding\Container.cs" />
+ <Compile Include="Model\Encoding\VideoEncoder.cs" />
+ <Compile Include="Model\Encoding\VideoEncodeRateType.cs" />
+ <Compile Include="Model\Encoding\x264\x264Preset.cs" />
+ <Compile Include="Model\Encoding\x264\x264Profile.cs" />
+ <Compile Include="Model\Encoding\x264\x264Tune.cs" />
+ <Compile Include="Model\BitrateLimits.cs" />
+ <Compile Include="Model\RangeLimits.cs" />
+ <Compile Include="Model\Size.cs" />
+ <Compile Include="Model\SourceSubtitle.cs" />
+ <Compile Include="Model\SourceType.cs" />
<Compile Include="Model\SrtSubtitle.cs" />
<Compile Include="Model\Subtitles.cs" />
<Compile Include="Model\VideoRangeType.cs" />
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs new file mode 100644 index 000000000..9225acfc5 --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs @@ -0,0 +1,220 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="IHandBrakeInstance.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The Interface for HandBrakeInstance
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interfaces
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Windows.Media.Imaging;
+
+ using HandBrake.Interop.Model;
+ using HandBrake.Interop.SourceData;
+
+ /// <summary>
+ /// The Interface for HandBrakeInstance
+ /// </summary>
+ public interface IHandBrakeInstance
+ {
+ #region Events
+
+ /// <summary>
+ /// Fires when an encode has completed.
+ /// </summary>
+ event EventHandler<EncodeCompletedEventArgs> EncodeCompleted;
+
+ /// <summary>
+ /// Fires for progress updates when encoding.
+ /// </summary>
+ event EventHandler<EncodeProgressEventArgs> EncodeProgress;
+
+ /// <summary>
+ /// Fires when a scan has completed.
+ /// </summary>
+ event EventHandler<EventArgs> ScanCompleted;
+
+ /// <summary>
+ /// Fires for progress updates when scanning.
+ /// </summary>
+ event EventHandler<ScanProgressEventArgs> ScanProgress;
+
+ #endregion
+
+ #region Properties
+
+ /// <summary>
+ /// Gets the index of the default title.
+ /// </summary>
+ int FeatureTitle { get; }
+
+ /// <summary>
+ /// Gets the number of previews created during scan.
+ /// </summary>
+ int PreviewCount { get; }
+
+ /// <summary>
+ /// Gets the list of titles on this instance.
+ /// </summary>
+ List<Title> Titles { get; }
+
+ #endregion
+
+ #region Public Methods
+
+ /// <summary>
+ /// Calculates the video bitrate for the given job and target size.
+ /// </summary>
+ /// <param name="job">
+ /// The encode job.
+ /// </param>
+ /// <param name="sizeMB">
+ /// The target size in MB.
+ /// </param>
+ /// <param name="overallSelectedLengthSeconds">
+ /// The currently selected encode length. Used in preview
+ /// for calculating bitrate when the target size would be wrong.
+ /// </param>
+ /// <returns>
+ /// The video bitrate in kbps.
+ /// </returns>
+ int CalculateBitrate(EncodeJob job, int sizeMB, double overallSelectedLengthSeconds = 0);
+
+ /// <summary>
+ /// Gives estimated file size (in MB) of the given job and video bitrate.
+ /// </summary>
+ /// <param name="job">
+ /// The encode job.
+ /// </param>
+ /// <param name="videoBitrate">
+ /// The video bitrate to be used (kbps).
+ /// </param>
+ /// <returns>
+ /// The estimated file size (in MB) of the given job and video bitrate.
+ /// </returns>
+ double CalculateFileSize(EncodeJob job, int videoBitrate);
+
+ /// <summary>
+ /// Frees any resources associated with this object.
+ /// </summary>
+ void Dispose();
+
+ /// <summary>
+ /// Gets an image for the given job and preview
+ /// </summary>
+ /// <remarks>
+ /// Only incorporates sizing and aspect ratio into preview image.
+ /// </remarks>
+ /// <param name="job">
+ /// The encode job to preview.
+ /// </param>
+ /// <param name="previewNumber">
+ /// The index of the preview to get (0-based).
+ /// </param>
+ /// <returns>
+ /// An image with the requested preview.
+ /// </returns>
+ BitmapImage GetPreview(EncodeJob job, int previewNumber);
+
+ /// <summary>
+ /// Gets the final size for a given encode job.
+ /// </summary>
+ /// <param name="job">
+ /// The encode job to use.
+ /// </param>
+ /// <param name="width">
+ /// The storage width.
+ /// </param>
+ /// <param name="height">
+ /// The storage height.
+ /// </param>
+ /// <param name="parWidth">
+ /// The pixel aspect X number.
+ /// </param>
+ /// <param name="parHeight">
+ /// The pixel aspect Y number.
+ /// </param>
+ void GetSize(EncodeJob job, out int width, out int height, out int parWidth, out int parHeight);
+
+ /// <summary>
+ /// Pauses the current encode.
+ /// </summary>
+ void PauseEncode();
+
+ /// <summary>
+ /// Resumes a paused encode.
+ /// </summary>
+ void ResumeEncode();
+
+ /// <summary>
+ /// Starts an encode with the given job.
+ /// </summary>
+ /// <param name="jobToStart">
+ /// The job to start.
+ /// </param>
+ void StartEncode(EncodeJob jobToStart);
+
+ /// <summary>
+ /// Starts an encode with the given job.
+ /// </summary>
+ /// <param name="job">
+ /// The job to start.
+ /// </param>
+ /// <param name="preview">
+ /// True if this is a preview encode.
+ /// </param>
+ /// <param name="previewNumber">
+ /// The preview number to start the encode at (0-based).
+ /// </param>
+ /// <param name="previewSeconds">
+ /// The number of seconds in the preview.
+ /// </param>
+ /// <param name="overallSelectedLengthSeconds">
+ /// The currently selected encode length. Used in preview
+ /// for calculating bitrate when the target size would be wrong.
+ /// </param>
+ void StartEncode(
+ EncodeJob job, bool preview, int previewNumber, int previewSeconds, double overallSelectedLengthSeconds);
+
+ /// <summary>
+ /// Starts scanning the given path.
+ /// </summary>
+ /// <param name="path">
+ /// The path to the video to scan.
+ /// </param>
+ /// <param name="previewCount">
+ /// The number of preview images to make.
+ /// </param>
+ void StartScan(string path, int previewCount);
+
+ /// <summary>
+ /// Starts a scan of the given path.
+ /// </summary>
+ /// <param name="path">
+ /// The path of the video to scan.
+ /// </param>
+ /// <param name="previewCount">
+ /// The number of previews to make on each title.
+ /// </param>
+ /// <param name="titleIndex">
+ /// The title index to scan (1-based, 0 for all titles).
+ /// </param>
+ void StartScan(string path, int previewCount, int titleIndex);
+
+ /// <summary>
+ /// Stops the current encode.
+ /// </summary>
+ void StopEncode();
+
+ /// <summary>
+ /// Stop any running scans
+ /// </summary>
+ void StopScan();
+
+ #endregion
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/InteropUtilities.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/InteropUtilities.cs index 3a36ddfc9..3a7f1c01e 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/InteropUtilities.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/InteropUtilities.cs @@ -12,13 +12,13 @@ namespace HandBrake.Interop using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
- - using HandBrake.Interop.HbLib; - - /// <summary> - /// Helper utilities for native interop. - /// </summary> - public static class InteropUtilities +
+ using HandBrake.Interop.HbLib;
+
+ /// <summary>
+ /// Helper utilities for native interop.
+ /// </summary>
+ public static class InteropUtilities
{
/// <summary>
/// Reads the given native structure pointer.
@@ -49,35 +49,35 @@ namespace HandBrake.Interop }
return returnList;
- } - - /// <summary> - /// Converts the given native array to a managed collection. - /// </summary> - /// <typeparam name="T">The type of item in the list.</typeparam> - /// <param name="arrayPtr">The pointer to the array.</param> - /// <param name="count">The number of items in the array.</param> - /// <returns>The converted collection.</returns> - public static IEnumerable<T> ConvertArray<T>(IntPtr arrayPtr, int count) - { - IntPtr currentItem = arrayPtr; - - var result = new List<T>(); - for (int i = 0; i < count; i++) - { - T nativeEncoder = ReadStructure<T>(currentItem); - result.Add(nativeEncoder); - - currentItem = IntPtr.Add(currentItem, Marshal.SizeOf(typeof(T))); - } - - return result; - } - - /// <summary> - /// Creats a new, empty native HandBrake list. - /// </summary> - /// <param name="capacity">The capacity of the new list.</param> + }
+
+ /// <summary>
+ /// Converts the given native array to a managed collection.
+ /// </summary>
+ /// <typeparam name="T">The type of item in the list.</typeparam>
+ /// <param name="arrayPtr">The pointer to the array.</param>
+ /// <param name="count">The number of items in the array.</param>
+ /// <returns>The converted collection.</returns>
+ public static IEnumerable<T> ConvertArray<T>(IntPtr arrayPtr, int count)
+ {
+ IntPtr currentItem = arrayPtr;
+
+ var result = new List<T>();
+ for (int i = 0; i < count; i++)
+ {
+ T nativeEncoder = ReadStructure<T>(currentItem);
+ result.Add(nativeEncoder);
+
+ currentItem = IntPtr.Add(currentItem, Marshal.SizeOf(typeof(T)));
+ }
+
+ return result;
+ }
+
+ /// <summary>
+ /// Creats a new, empty native HandBrake list.
+ /// </summary>
+ /// <param name="capacity">The capacity of the new list.</param>
/// <returns>The new native list.</returns>
public static NativeList CreateNativeList(int capacity)
{
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/InteropWindsorInstaller.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/InteropWindsorInstaller.cs new file mode 100644 index 000000000..91383f8b5 --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/InteropWindsorInstaller.cs @@ -0,0 +1,38 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="InteropWindsorInstaller.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// An Implimentation of IWindsorInstaller for this library.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop
+{
+ using Castle.Core;
+ using Castle.MicroKernel.Registration;
+ using Castle.MicroKernel.SubSystems.Configuration;
+ using Castle.Windsor;
+
+ using HandBrake.Interop.Interfaces;
+
+ /// <summary>
+ /// An Implimentation of IWindsorInstaller for this library.
+ /// </summary>
+ public class InteropWindsorInstaller : IWindsorInstaller
+ {
+ /// <summary>
+ /// An Implimentation of IWindsorInstaller for this library.
+ /// </summary>
+ /// <param name="container">
+ /// The container.
+ /// </param>
+ /// <param name="store">
+ /// The store.
+ /// </param>
+ public void Install(IWindsorContainer container, IConfigurationStore store)
+ {
+ container.Register(Component.For<IHandBrakeInstance>().ImplementedBy<HandBrakeInstance>().LifeStyle.Is(LifestyleType.Singleton));
+ }
+ }
+}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/MarshalingConstants.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/MarshalingConstants.cs index 07ebc0810..82948f05a 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/MarshalingConstants.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/MarshalingConstants.cs @@ -9,21 +9,21 @@ namespace HandBrake.Interop
{
- public static class MarshalingConstants - { -#if X64 - public const int JobPaddingBytes = 49264; - public const int AudioPaddingBytes = 49208; -#else - /// <summary> - /// Job Padding Bytes - /// </summary> - public const int JobPaddingBytes = 49216; - - /// <summary> - /// Audio Padding Bytes - /// </summary> - public const int AudioPaddingBytes = 49180; -#endif - } -} + public static class MarshalingConstants
+ {
+#if X64
+ public const int JobPaddingBytes = 49264;
+ public const int AudioPaddingBytes = 49208;
+#else
+ /// <summary>
+ /// Job Padding Bytes
+ /// </summary>
+ public const int JobPaddingBytes = 49216;
+
+ /// <summary>
+ /// Audio Padding Bytes
+ /// </summary>
+ public const int AudioPaddingBytes = 49180;
+#endif
+ }
+}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Settings.StyleCop b/win/CS/HandBrake.Interop/HandBrakeInterop/Settings.StyleCop index 39d8ff868..c4e827f20 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Settings.StyleCop +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Settings.StyleCop @@ -1,14 +1,54 @@ -<StyleCopSettings Version="4.3"> - <Analyzers> - <Analyzer AnalyzerId="Microsoft.StyleCop.CSharp.SpacingRules"> - <Rules> - <Rule Name="TabsMustNotBeUsed"> - <RuleSettings> +<StyleCopSettings Version="105">
+ <Analyzers>
+ <Analyzer AnalyzerId="StyleCop.CSharp.SpacingRules">
+ <Rules>
+ <Rule Name="TabsMustNotBeUsed">
+ <RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
- </Rules> - <AnalyzerSettings /> - </Analyzer> - </Analyzers> -</StyleCopSettings> + </Rules>
+ <AnalyzerSettings />
+ </Analyzer>
+ <Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
+ <Rules>
+ <Rule Name="FileMustHaveHeader">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="FileHeaderMustShowCopyright">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="FileHeaderMustHaveCopyrightText">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="FileHeaderMustContainFileName">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="FileHeaderFileNameDocumentationMustMatchFileName">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="FileHeaderMustHaveSummary">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="FileHeaderMustHaveValidCompanyText">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ </Rules>
+ <AnalyzerSettings />
+ </Analyzer>
+ </Analyzers>
+</StyleCopSettings>
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/AudioCodec.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/AudioCodec.cs index 62bfecf79..ad797c53d 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/AudioCodec.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/AudioCodec.cs @@ -22,6 +22,8 @@ namespace HandBrake.Interop.SourceData Aac,
- Other
+ Other,
+
+ Flac
}
}
diff --git a/win/CS/HandBrakeWPF/Settings.StyleCop b/win/CS/HandBrakeWPF/Settings.StyleCop index 1b0202d91..99c98c116 100644 --- a/win/CS/HandBrakeWPF/Settings.StyleCop +++ b/win/CS/HandBrakeWPF/Settings.StyleCop @@ -32,6 +32,11 @@ <BooleanProperty Name="Enabled">True</BooleanProperty>
</RuleSettings>
</Rule>
+ <Rule Name="FileHeaderMustHaveValidCompanyText">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
+ </RuleSettings>
+ </Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
diff --git a/win/CS/HandBrakeWPF/UserSettingConstants.cs b/win/CS/HandBrakeWPF/UserSettingConstants.cs index 99c31b74a..9397a3e6c 100644 --- a/win/CS/HandBrakeWPF/UserSettingConstants.cs +++ b/win/CS/HandBrakeWPF/UserSettingConstants.cs @@ -14,37 +14,153 @@ namespace HandBrakeWPF /// </summary>
public class UserSettingConstants
{
- public const string UpdateStatus = "updateStatus";
- public const string TooltipEnable = "tooltipEnable";
- public const string Skipversion = "skipversion";
- public const string AutoNaming = "autoNaming";
- public const string AutoNamePath = "autoNamePath";
+ #region Constants and Fields
+
+ /// <summary>
+ /// Add Only One Per Langage
+ /// </summary>
+ public const string AddOnlyOneAudioPerLanguage = "addOnlyOneAudioPerLanguage";
+
+ /// <summary>
+ /// Appcast i686
+ /// </summary>
public const string Appcast_i686 = "appcast_i686";
+
+ /// <summary>
+ /// Appcast 64
+ /// </summary>
public const string Appcast_x64 = "appcast_x64";
+
+ /// <summary>
+ /// Auto name format
+ /// </summary>
public const string AutoNameFormat = "autoNameFormat";
- public const string VLC_Path = "VLC_Path";
- public const string MainWindowMinimize = "MainWindowMinimize";
- public const string PresetNotification = "presetNotification";
- public const string TrayIconAlerts = "trayIconAlerts";
- public const string LastUpdateCheckDate = "lastUpdateCheckDate";
- public const string DaysBetweenUpdateCheck = "daysBetweenUpdateCheck";
- public const string UseM4v = "useM4v";
- public const string NativeLanguage = "NativeLanguage";
- public const string NativeLanguageForSubtitles = "NativeLanguageSubtitles";
- public const string DubMode = "DubMode";
- public const string ClearOldLogs = "clearOldLogs";
- public const string AutoNameTitleCase = "AutoNameTitleCase";
+
+ /// <summary>
+ /// Autoname path
+ /// </summary>
+ public const string AutoNamePath = "autoNamePath";
+
+ /// <summary>
+ /// Auto Name Remove underscore
+ /// </summary>
public const string AutoNameRemoveUnderscore = "AutoNameRemoveUnderscore";
- public const string ActivityWindowLastMode = "ActivityWindowLastMode";
- public const string UseClosedCaption = "useClosedCaption";
- public const string BatchMinDuration = "batchMinDuration";
- public const string BatchMaxDuration = "batchMaxDuration";
+
+ /// <summary>
+ /// Auto Name Title Case
+ /// </summary>
+ public const string AutoNameTitleCase = "AutoNameTitleCase";
+
+ /// <summary>
+ /// Auto Naming
+ /// </summary>
+ public const string AutoNaming = "autoNaming";
+
+ /// <summary>
+ /// Clear old logs
+ /// </summary>
+ public const string ClearOldLogs = "clearOldLogs";
+
+ /// <summary>
+ /// Update check interval
+ /// </summary>
+ public const string DaysBetweenUpdateCheck = "daysBetweenUpdateCheck";
+
+ /// <summary>
+ /// Use Default Player
+ /// </summary>
public const string DefaultPlayer = "defaultPlayer";
- public const string SelectedLanguages = "SelectedLanguages";
+
+ /// <summary>
+ /// Dub mode
+ /// </summary>
+ public const string DubMode = "DubMode";
+
+ /// <summary>
+ /// Dub Mode Audio
+ /// </summary>
public const string DubModeAudio = "DubModeAudio";
+
+ /// <summary>
+ /// Dub Mode Subs
+ /// </summary>
public const string DubModeSubtitle = "DubModeSubtitle";
- public const string AddOnlyOneAudioPerLanguage = "addOnlyOneAudioPerLanguage";
+
+ /// <summary>
+ /// Last Update Check
+ /// </summary>
+ public const string LastUpdateCheckDate = "lastUpdateCheckDate";
+
+ /// <summary>
+ /// Main Window Minimise
+ /// </summary>
+ public const string MainWindowMinimize = "MainWindowMinimize";
+
+ /// <summary>
+ /// Min Title Length
+ /// </summary>
public const string MinTitleLength = "MinTitleLength";
+
+ /// <summary>
+ /// Native Language Audio
+ /// </summary>
+ public const string NativeLanguage = "NativeLanguage";
+
+ /// <summary>
+ /// Native Language Subs
+ /// </summary>
+ public const string NativeLanguageForSubtitles = "NativeLanguageSubtitles";
+
+ /// <summary>
+ /// Preset Notification
+ /// </summary>
+ public const string PresetNotification = "presetNotification";
+
+ /// <summary>
+ /// Selected Languages
+ /// </summary>
+ public const string SelectedLanguages = "SelectedLanguages";
+
+ /// <summary>
+ /// AUudio Passthru
+ /// </summary>
public const string ShowAdvancedAudioPassthruOpts = "ShowAdvancedAudioPassthruOpts";
+
+ /// <summary>
+ /// Skip Version
+ /// </summary>
+ public const string Skipversion = "skipversion";
+
+ /// <summary>
+ /// Tooltip
+ /// </summary>
+ public const string TooltipEnable = "tooltipEnable";
+
+ /// <summary>
+ /// Tray Icon
+ /// </summary>
+ public const string TrayIconAlerts = "trayIconAlerts";
+
+ /// <summary>
+ /// Update Status
+ /// </summary>
+ public const string UpdateStatus = "updateStatus";
+
+ /// <summary>
+ /// Closed Captions
+ /// </summary>
+ public const string UseClosedCaption = "useClosedCaption";
+
+ /// <summary>
+ /// Use m4v
+ /// </summary>
+ public const string UseM4v = "useM4v";
+
+ /// <summary>
+ /// Vlc Path
+ /// </summary>
+ public const string VLC_Path = "VLC_Path";
+
+ #endregion
}
-}
+}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index ff5594975..2e9ec5e64 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1206,7 +1206,7 @@ namespace HandBrakeWPF.ViewModels if (!string.IsNullOrEmpty(filename))
{
- Preset preset = PlistPresetHandler.Import(filename);
+ Preset preset = PlistUtility.Import(filename);
if (this.presetService.CheckIfPresetExists(preset.Name))
{
if (!presetService.CanUpdatePreset(preset.Name))
@@ -1252,7 +1252,7 @@ namespace HandBrakeWPF.ViewModels if (filename != null)
{
- PlistPresetHandler.Export(savefiledialog.FileName, this.selectedPreset);
+ PlistUtility.Export(savefiledialog.FileName, this.selectedPreset);
}
}
else
diff --git a/win/CS/build.xml b/win/CS/build.xml index 928b3da6f..b64c12461 100644 --- a/win/CS/build.xml +++ b/win/CS/build.xml @@ -59,7 +59,7 @@ <Target Name="NightlyPostBuild">
<Exec Command="copy $(ProjectDir)HandBrakeWPF\Installer\MakeNightly.nsi $(ProjectDir)HandBrakeWPF\bin\Release /Y" Condition="$(Platform) == 'x86'" />
<Exec Command="copy $(ProjectDir)HandBrakeWPF\Installer\MakeNightly64.nsi $(ProjectDir)HandBrakeWPF\bin\Release /Y" Condition="$(Platform) == 'x64'" />
- <Exec Command="copy $(ProjectDir)handbrakepineapple.ico $(ProjectDir)HandBrakeWPF\bin\Release /Y" />
+ <Exec Command="copy $(ProjectDir)HandBrakeWPF\handbrakepineapple.ico $(ProjectDir)HandBrakeWPF\bin\Release /Y" />
<Exec Command="xcopy $(ProjectDir)doc $(ProjectDir)HandBrakeWPF\bin\Release\doc /I /Y" />
<Exec Command="makensis $(ProjectDir)HandBrakeWPF\bin\Release\MakeNightly.nsi" Condition="$(Platform) == 'x86'" />
<Exec Command="makensis $(ProjectDir)HandBrakeWPF\bin\Release\MakeNightly64.nsi" Condition="$(Platform) == 'x64'" />
|