]> granicus.if.org Git - handbrake/commitdiff
WinGui: Tabs -> Spaces.
authorsr55 <sr55.hb@outlook.com>
Sat, 28 Feb 2015 20:37:38 +0000 (20:37 +0000)
committersr55 <sr55.hb@outlook.com>
Sat, 28 Feb 2015 20:37:38 +0000 (20:37 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6952 b64f7644-9d1e-0410-96f1-a4d463321fa5

51 files changed:
win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeCompletedEventArgs.cs
win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeProgressEventArgs.cs
win/CS/HandBrake.ApplicationServices/Interop/EventArgs/MessageLoggedEventArgs.cs
win/CS/HandBrake.ApplicationServices/Interop/EventArgs/ScanProgressEventArgs.cs
win/CS/HandBrake.ApplicationServices/Interop/HandBrakeEncoderHelpers.cs
win/CS/HandBrake.ApplicationServices/Interop/HandBrakeLanguagesHelper.cs
win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUnitConversionHelpers.cs
win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUtils.cs
win/CS/HandBrake.ApplicationServices/Interop/HbLib/HBDelegates.cs
win/CS/HandBrake.ApplicationServices/Interop/HbLib/HbFunctions.cs
win/CS/HandBrake.ApplicationServices/Interop/HbLib/NativeConstants.cs
win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_container_s.cs
win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_encoder_s.cs
win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_error_code.cs
win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_filter_ids.cs
win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_mixdown_s.cs
win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_rate_s.cs
win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_subtitle.cs
win/CS/HandBrake.ApplicationServices/Interop/HbLib/iso639_lang_t.cs
win/CS/HandBrake.ApplicationServices/Interop/Helpers/InteropUtilities.cs
win/CS/HandBrake.ApplicationServices/Interop/Helpers/NativeList.cs
win/CS/HandBrake.ApplicationServices/Interop/Helpers/Utilities.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/BitrateLimits.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Cropping.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/EncodeJob.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Anamorphic.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/AudioEncodeRateType.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/AudioEncoding.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Container.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Decomb.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Deinterlace.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Denoise.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Detelecine.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/HBRate.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/HBVideoEncoder.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Mixdown.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/OutputExtension.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/PictureRotation.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/ScaleMethod.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/VideoEncodeRateType.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/VideoEncoder.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Language.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Scan/AudioTrack.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Scan/Chapter.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Scan/InputType.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Scan/Subtitle.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Scan/SubtitleSource.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Scan/Title.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/SrtSubtitle.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/VideoQualityLimits.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/VideoRangeType.cs

index 26d9b4f67bfeca5bb1a39555a2c2d2a55998e6f4..fa1ea14c37bb52d9cbbd2c50b35763ea9d51e78d 100644 (file)
@@ -15,10 +15,10 @@ namespace HandBrake.ApplicationServices.Interop.EventArgs
     /// Encode Completed Event Args\r
     /// </summary>\r
     public class EncodeCompletedEventArgs : EventArgs\r
-       {\r
-           /// <summary>\r
-           /// Gets or sets a value indicating whether an error occurred during the encode.\r
-           /// </summary>\r
-           public bool Error { get; set; }\r
-       }\r
+    {\r
+        /// <summary>\r
+        /// Gets or sets a value indicating whether an error occurred during the encode.\r
+        /// </summary>\r
+        public bool Error { get; set; }\r
+    }\r
 }\r
index 245132016f80425311851e50da89933b88110fb3..4e8d15b06d73a514c785c722ac7eb906f8433095 100644 (file)
@@ -15,30 +15,30 @@ namespace HandBrake.ApplicationServices.Interop.EventArgs
     /// Encode Progress Event Args\r
     /// </summary>\r
     public class EncodeProgressEventArgs : EventArgs\r
-       {\r
-           /// <summary>\r
-           /// Gets or sets FractionComplete.\r
-           /// </summary>\r
+    {\r
+        /// <summary>\r
+        /// Gets or sets FractionComplete.\r
+        /// </summary>\r
         public double FractionComplete { get; set; }\r
 \r
-           /// <summary>\r
-           /// Gets or sets CurrentFrameRate.\r
-           /// </summary>\r
+        /// <summary>\r
+        /// Gets or sets CurrentFrameRate.\r
+        /// </summary>\r
         public double CurrentFrameRate { get; set; }\r
 \r
-           /// <summary>\r
-           /// Gets or sets AverageFrameRate.\r
-           /// </summary>\r
+        /// <summary>\r
+        /// Gets or sets AverageFrameRate.\r
+        /// </summary>\r
         public double AverageFrameRate { get; set; }\r
 \r
-           /// <summary>\r
-           /// Gets or sets EstimatedTimeLeft.\r
-           /// </summary>\r
-           public TimeSpan EstimatedTimeLeft { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets EstimatedTimeLeft.\r
+        /// </summary>\r
+        public TimeSpan EstimatedTimeLeft { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the current encoding pass. (-1: subtitle scan, 1: first pass, 2: second pass)\r
-               /// </summary>\r
-               public int Pass { get; set; }\r
-       }\r
+        /// <summary>\r
+        /// Gets or sets the current encoding pass. (-1: subtitle scan, 1: first pass, 2: second pass)\r
+        /// </summary>\r
+        public int Pass { get; set; }\r
+    }\r
 }\r
index 432b1da5958cd4eb8d959bb19fb6c464e9d0ef53..e547a2fe898bb6c41d4a5184b99f4be51d8c8fdb 100644 (file)
@@ -12,13 +12,13 @@ namespace HandBrake.ApplicationServices.Interop.EventArgs
     using System;\r
 \r
     /// <summary>\r
-       /// The Message Logged Event Args\r
-       /// </summary>\r
-       public class MessageLoggedEventArgs : EventArgs\r
-       {\r
-               /// <summary>\r
-               /// Gets or sets Message.\r
-               /// </summary>\r
-               public string Message { get; set; }\r
-       }\r
+    /// The Message Logged Event Args\r
+    /// </summary>\r
+    public class MessageLoggedEventArgs : EventArgs\r
+    {\r
+        /// <summary>\r
+        /// Gets or sets Message.\r
+        /// </summary>\r
+        public string Message { get; set; }\r
+    }\r
 }\r
index f58a04c0b479ee9878af0539c855707a6ebacf61..3928a53e6656a6442d581e67780b1202ab3fa2d4 100644 (file)
@@ -9,36 +9,36 @@
 \r
 namespace HandBrake.ApplicationServices.Interop.EventArgs\r
 {\r
-       using System;\r
+    using System;\r
 \r
-       /// <summary>\r
-       /// The Scan Progress Event Args\r
-       /// </summary>\r
-       public class ScanProgressEventArgs : EventArgs\r
-       {\r
-               /// <summary>\r
-               /// Gets or sets the total progress fraction for the scan.\r
-               /// </summary>\r
-               public double Progress { get; set; }\r
+    /// <summary>\r
+    /// The Scan Progress Event Args\r
+    /// </summary>\r
+    public class ScanProgressEventArgs : EventArgs\r
+    {\r
+        /// <summary>\r
+        /// Gets or sets the total progress fraction for the scan.\r
+        /// </summary>\r
+        public double Progress { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the current preview being processed on the scan.\r
-               /// </summary>\r
-               public int CurrentPreview { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the current preview being processed on the scan.\r
+        /// </summary>\r
+        public int CurrentPreview { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the total number of previews to process.\r
-               /// </summary>\r
-               public int Previews { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the total number of previews to process.\r
+        /// </summary>\r
+        public int Previews { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the current title being processed on the scan.\r
-               /// </summary>\r
-               public int CurrentTitle { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the current title being processed on the scan.\r
+        /// </summary>\r
+        public int CurrentTitle { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the total number of titles to process.\r
-               /// </summary>\r
-               public int Titles { get; set; }\r
-       }\r
+        /// <summary>\r
+        /// Gets or sets the total number of titles to process.\r
+        /// </summary>\r
+        public int Titles { get; set; }\r
+    }\r
 }\r
index c0a4195f9e0504b255f3a9bd0cb10be0d9e22565..35d278a4addbc251b33c695ebba017f4d5f9b36e 100644 (file)
@@ -20,514 +20,514 @@ namespace HandBrake.ApplicationServices.Interop
     using HandBrake.ApplicationServices.Interop.Model.Scan;\r
 \r
     /// <summary>\r
-       /// The encoders.\r
-       /// </summary>\r
-       public static class HandBrakeEncoderHelpers\r
-       {\r
-               /// <summary>\r
-               /// The audio encoders.\r
-               /// </summary>\r
-               private static List<HBAudioEncoder> audioEncoders;\r
-\r
-               /// <summary>\r
-               /// The video encoders.\r
-               /// </summary>\r
-               private static List<HBVideoEncoder> videoEncoders;\r
-\r
-               /// <summary>\r
-               /// Video framerates in pts.\r
-               /// </summary>\r
-               private static List<HBRate> videoFramerates; \r
-\r
-               /// <summary>\r
-               /// List of HandBrake mixdowns.\r
-               /// </summary>\r
-               private static List<HBMixdown> mixdowns;\r
-\r
-               /// <summary>\r
-               /// List of HandBrake containers.\r
-               /// </summary>\r
-               private static List<HBContainer> containers; \r
-\r
-               /// <summary>\r
-               /// The audio bitrates.\r
-               /// </summary>\r
-               private static List<int> audioBitrates;\r
-\r
-               /// <summary>\r
-               /// Audio sample rates in Hz.\r
-               /// </summary>\r
-               private static List<HBRate> audioSampleRates; \r
-\r
-               /// <summary>\r
+    /// The encoders.\r
+    /// </summary>\r
+    public static class HandBrakeEncoderHelpers\r
+    {\r
+        /// <summary>\r
+        /// The audio encoders.\r
+        /// </summary>\r
+        private static List<HBAudioEncoder> audioEncoders;\r
+\r
+        /// <summary>\r
+        /// The video encoders.\r
+        /// </summary>\r
+        private static List<HBVideoEncoder> videoEncoders;\r
+\r
+        /// <summary>\r
+        /// Video framerates in pts.\r
+        /// </summary>\r
+        private static List<HBRate> videoFramerates; \r
+\r
+        /// <summary>\r
+        /// List of HandBrake mixdowns.\r
+        /// </summary>\r
+        private static List<HBMixdown> mixdowns;\r
+\r
+        /// <summary>\r
+        /// List of HandBrake containers.\r
+        /// </summary>\r
+        private static List<HBContainer> containers; \r
+\r
+        /// <summary>\r
+        /// The audio bitrates.\r
+        /// </summary>\r
+        private static List<int> audioBitrates;\r
+\r
+        /// <summary>\r
+        /// Audio sample rates in Hz.\r
+        /// </summary>\r
+        private static List<HBRate> audioSampleRates; \r
+\r
+        /// <summary>\r
         /// Initializes static members of the HandBrakeEncoderHelpers class.\r
-               /// </summary>\r
+        /// </summary>\r
         static HandBrakeEncoderHelpers()\r
-               {\r
-                       HandBrakeUtils.EnsureGlobalInit();\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets a list of supported audio encoders.\r
-               /// </summary>\r
-               public static List<HBAudioEncoder> AudioEncoders\r
-               {\r
-                       get\r
-                       {\r
-                               if (audioEncoders == null)\r
-                               {\r
+        {\r
+            HandBrakeUtils.EnsureGlobalInit();\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets a list of supported audio encoders.\r
+        /// </summary>\r
+        public static List<HBAudioEncoder> AudioEncoders\r
+        {\r
+            get\r
+            {\r
+                if (audioEncoders == null)\r
+                {\r
                     audioEncoders = InteropUtilities.ToListFromIterator<hb_encoder_s, HBAudioEncoder>(HBFunctions.hb_audio_encoder_get_next, HandBrakeUnitConversionHelpers.NativeToAudioEncoder);\r
-                               }\r
-\r
-                               return audioEncoders;\r
-                       }\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets a list of supported video encoders.\r
-               /// </summary>\r
-               public static List<HBVideoEncoder> VideoEncoders\r
-               {\r
-                       get\r
-                       {\r
-                               if (videoEncoders == null)\r
-                               {\r
+                }\r
+\r
+                return audioEncoders;\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets a list of supported video encoders.\r
+        /// </summary>\r
+        public static List<HBVideoEncoder> VideoEncoders\r
+        {\r
+            get\r
+            {\r
+                if (videoEncoders == null)\r
+                {\r
                     videoEncoders = InteropUtilities.ToListFromIterator<hb_encoder_s, HBVideoEncoder>(HBFunctions.hb_video_encoder_get_next, HandBrakeUnitConversionHelpers.NativeToVideoEncoder);\r
-                               }\r
-\r
-                               return videoEncoders;\r
-                       }\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets a list of supported video framerates (in pts).\r
-               /// </summary>\r
-               public static List<HBRate> VideoFramerates\r
-               {\r
-                       get\r
-                       {\r
-                               if (videoFramerates == null)\r
-                               {\r
+                }\r
+\r
+                return videoEncoders;\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets a list of supported video framerates (in pts).\r
+        /// </summary>\r
+        public static List<HBRate> VideoFramerates\r
+        {\r
+            get\r
+            {\r
+                if (videoFramerates == null)\r
+                {\r
                     videoFramerates = InteropUtilities.ToListFromIterator<hb_rate_s, HBRate>(HBFunctions.hb_video_framerate_get_next, HandBrakeUnitConversionHelpers.NativeToRate);\r
-                               }\r
-\r
-                               return videoFramerates;\r
-                       }\r
-               \r
-\r
-               /// <summary>\r
-               /// Gets a list of supported mixdowns.\r
-               /// </summary>\r
-               public static List<HBMixdown> Mixdowns\r
-               {\r
-                       get\r
-                       {\r
-                               if (mixdowns == null)\r
-                               {\r
+                }\r
+\r
+                return videoFramerates;\r
+            }\r
+        } \r
+\r
+        /// <summary>\r
+        /// Gets a list of supported mixdowns.\r
+        /// </summary>\r
+        public static List<HBMixdown> Mixdowns\r
+        {\r
+            get\r
+            {\r
+                if (mixdowns == null)\r
+                {\r
                     mixdowns = InteropUtilities.ToListFromIterator<hb_mixdown_s, HBMixdown>(HBFunctions.hb_mixdown_get_next, HandBrakeUnitConversionHelpers.NativeToMixdown);\r
-                               }\r
-\r
-                               return mixdowns;\r
-                       }\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets a list of supported audio bitrates.\r
-               /// </summary>\r
-               public static List<int> AudioBitrates\r
-               {\r
-                       get\r
-                       {\r
-                               if (audioBitrates == null)\r
-                               {\r
-                                       audioBitrates = InteropUtilities.ToListFromIterator<hb_rate_s, int>(HBFunctions.hb_audio_bitrate_get_next, b => b.rate);\r
-                               }\r
-\r
-                               return audioBitrates;\r
-                       }\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets a list of supported audio sample rates (in Hz).\r
-               /// </summary>\r
-               public static List<HBRate> AudioSampleRates\r
-               {\r
-                       get\r
-                       {\r
-                               if (audioSampleRates == null)\r
-                               {\r
+                }\r
+\r
+                return mixdowns;\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets a list of supported audio bitrates.\r
+        /// </summary>\r
+        public static List<int> AudioBitrates\r
+        {\r
+            get\r
+            {\r
+                if (audioBitrates == null)\r
+                {\r
+                    audioBitrates = InteropUtilities.ToListFromIterator<hb_rate_s, int>(HBFunctions.hb_audio_bitrate_get_next, b => b.rate);\r
+                }\r
+\r
+                return audioBitrates;\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets a list of supported audio sample rates (in Hz).\r
+        /// </summary>\r
+        public static List<HBRate> AudioSampleRates\r
+        {\r
+            get\r
+            {\r
+                if (audioSampleRates == null)\r
+                {\r
                     audioSampleRates = InteropUtilities.ToListFromIterator<hb_rate_s, HBRate>(HBFunctions.hb_audio_samplerate_get_next, HandBrakeUnitConversionHelpers.NativeToRate);\r
-                               }\r
-\r
-                               return audioSampleRates;\r
-                       }\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets a list of supported containers.\r
-               /// </summary>\r
-               public static List<HBContainer> Containers\r
-               {\r
-                       get\r
-                       {\r
-                               if (containers == null)\r
-                               {\r
+                }\r
+\r
+                return audioSampleRates;\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets a list of supported containers.\r
+        /// </summary>\r
+        public static List<HBContainer> Containers\r
+        {\r
+            get\r
+            {\r
+                if (containers == null)\r
+                {\r
                     containers = InteropUtilities.ToListFromIterator<hb_container_s, HBContainer>(HBFunctions.hb_container_get_next, HandBrakeUnitConversionHelpers.NativeToContainer);\r
-                               }\r
-\r
-                               return containers;\r
-                       }\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets a value indicating whether SRT subtitles can be burnt in.\r
-               /// </summary>\r
-               public static bool CanBurnSrt\r
-               {\r
-                       get\r
-                       {\r
-                               return HBFunctions.hb_subtitle_can_burn((int)hb_subtitle_s_subsource.SRTSUB) > 0;\r
-                       }\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets the audio encoder with the specified short name.\r
-               /// </summary>\r
-               /// <param name="shortName">\r
-               /// The name of the audio encoder.\r
-               /// </param>\r
-               /// <returns>\r
-               /// The requested audio encoder.\r
-               /// </returns>\r
-               public static HBAudioEncoder GetAudioEncoder(string shortName)\r
-               {\r
-                       return AudioEncoders.SingleOrDefault(e => e.ShortName == shortName);\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets the audio encoder with the specified codec ID.\r
-               /// </summary>\r
-               /// <param name="codecId">\r
-               /// The ID of the audio encoder.\r
-               /// </param>\r
-               /// <returns>\r
-               /// The requested audio encoder.\r
-               /// </returns>\r
-               public static HBAudioEncoder GetAudioEncoder(int codecId)\r
-               {\r
-                       return AudioEncoders.SingleOrDefault(e => e.Id == codecId);\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets the video encoder with the specified short name.\r
-               /// </summary>\r
-               /// <param name="shortName">\r
-               /// The name of the video encoder.\r
-               /// </param>\r
-               /// <returns>\r
-               /// The requested video encoder.\r
-               /// </returns>\r
-               public static HBVideoEncoder GetVideoEncoder(string shortName)\r
-               {\r
-                       return VideoEncoders.SingleOrDefault(e => e.ShortName == shortName);\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets the mixdown with the specified short name.\r
-               /// </summary>\r
-               /// <param name="shortName">\r
-               /// The name of the mixdown.\r
-               /// </param>\r
-               /// <returns>\r
-               /// The requested mixdown.\r
-               /// </returns>\r
-               public static HBMixdown GetMixdown(string shortName)\r
-               {\r
-                       return Mixdowns.SingleOrDefault(m => m.ShortName == shortName);\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets the container with the specified short name.\r
-               /// </summary>\r
-               /// <param name="shortName">\r
-               /// The name of the container.\r
-               /// </param>\r
-               /// <returns>\r
-               /// The requested container.\r
-               /// </returns>\r
-               public static HBContainer GetContainer(string shortName)\r
-               {\r
-                       return Containers.SingleOrDefault(c => c.ShortName == shortName);\r
-               }\r
-\r
-               /// <summary>\r
-               /// Determines if the given encoder is compatible with the given track.\r
-               /// </summary>\r
-               /// <param name="track">\r
-               /// The audio track to examine.\r
-               /// </param>\r
-               /// <param name="encoder">\r
-               /// The encoder to examine.\r
-               /// </param>\r
-               /// <returns>\r
-               /// True if the given encoder is comatible with the given audio track.\r
-               /// </returns>\r
-               /// <remarks>\r
-               /// Only works with passthrough encoders.\r
-               /// </remarks>\r
-               public static bool AudioEncoderIsCompatible(AudioTrack track, HBAudioEncoder encoder)\r
-               {\r
-                       return (track.CodecId & encoder.Id) > 0;\r
-               }\r
-\r
-               /// <summary>\r
-               /// Determines if the given mixdown supports the given channel layout.\r
-               /// </summary>\r
-               /// <param name="mixdown">\r
-               /// The mixdown to evaluate.\r
-               /// </param>\r
-               /// <param name="layout">\r
-               /// The channel layout to evaluate.\r
-               /// </param>\r
-               /// <returns>\r
-               /// True if the mixdown supports the given channel layout.\r
-               /// </returns>\r
-               public static bool MixdownHasRemixSupport(HBMixdown mixdown, ulong layout)\r
-               {\r
-                       return HBFunctions.hb_mixdown_has_remix_support(mixdown.Id, layout) > 0;\r
-               }\r
-\r
-               /// <summary>\r
-               /// Determines if the given encoder supports the given mixdown.\r
-               /// </summary>\r
-               /// <param name="mixdown">\r
-               /// The mixdown to evaluate.\r
-               /// </param>\r
-               /// <param name="encoder">\r
-               /// The encoder to evaluate.\r
-               /// </param>\r
-               /// <returns>\r
-               /// True if the encoder supports the mixdown.\r
-               /// </returns>\r
-               public static bool MixdownHasCodecSupport(HBMixdown mixdown, HBAudioEncoder encoder)\r
-               {\r
-                       return HBFunctions.hb_mixdown_has_codec_support(mixdown.Id, (uint) encoder.Id) > 0;\r
-               }\r
-\r
-               /// <summary>\r
-               /// Determines if DRC can be applied to the given track with the given encoder.\r
-               /// </summary>\r
-               /// <param name="track">\r
-               /// The track to apply DRC to.\r
-               /// </param>\r
-               /// <param name="encoder">\r
-               /// The encoder to use for DRC.\r
-               /// </param>\r
-               /// <param name="title">\r
-               /// The title.\r
-               /// </param>\r
-               /// <returns>\r
-               /// True if DRC can be applied to the track with the given encoder.\r
-               /// </returns>\r
-               public static bool CanApplyDrc(AudioTrack track, HBAudioEncoder encoder, int title)\r
-               {\r
-                   return HBFunctions.hb_audio_can_apply_drc2(HandBrakeInstanceManager.LastScanHandle, title, track.TrackNumber, encoder.Id) > 0;\r
-               }\r
-\r
-               /// <summary>\r
-               /// Determines if the given input audio codec can be passed through.\r
-               /// </summary>\r
-               /// <param name="codecId">\r
-               /// The input codec to consider.\r
-               /// </param>\r
-               /// <returns>\r
-               /// True if the codec can be passed through.\r
-               /// </returns>\r
-               public static bool CanPassthroughAudio(int codecId)\r
-               {\r
-                       return (codecId & NativeConstants.HB_ACODEC_PASS_MASK) > 0;\r
-               }\r
-\r
-               /// <summary>\r
-               /// Sanitizes a mixdown given the output codec and input channel layout.\r
-               /// </summary>\r
-               /// <param name="mixdown">\r
-               /// The desired mixdown.\r
-               /// </param>\r
-               /// <param name="encoder">\r
-               /// The output encoder to be used.\r
-               /// </param>\r
-               /// <param name="layout">\r
-               /// The input channel layout.\r
-               /// </param>\r
-               /// <returns>\r
-               /// A sanitized mixdown value.\r
-               /// </returns>\r
-               public static HBMixdown SanitizeMixdown(HBMixdown mixdown, HBAudioEncoder encoder, ulong layout)\r
-               {\r
-                       int sanitizedMixdown = HBFunctions.hb_mixdown_get_best((uint)encoder.Id, layout, mixdown.Id);\r
-                       return Mixdowns.Single(m => m.Id == sanitizedMixdown);\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets the default mixdown for the given audio encoder and channel layout.\r
-               /// </summary>\r
-               /// <param name="encoder">\r
-               /// The output codec to be used.\r
-               /// </param>\r
-               /// <param name="layout">\r
-               /// The input channel layout.\r
-               /// </param>\r
-               /// <returns>\r
-               /// The default mixdown for the given codec and channel layout.\r
-               /// </returns>\r
-               public static HBMixdown GetDefaultMixdown(HBAudioEncoder encoder, ulong layout)\r
-               {\r
-                       int defaultMixdown = HBFunctions.hb_mixdown_get_default((uint)encoder.Id, layout);\r
-                       return Mixdowns.Single(m => m.Id == defaultMixdown);\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets the bitrate limits for the given audio codec, sample rate and mixdown.\r
-               /// </summary>\r
-               /// <param name="encoder">\r
-               /// The audio encoder used.\r
-               /// </param>\r
-               /// <param name="sampleRate">\r
-               /// The sample rate used (Hz).\r
-               /// </param>\r
-               /// <param name="mixdown">\r
-               /// The mixdown used.\r
-               /// </param>\r
-               /// <returns>\r
-               /// Limits on the audio bitrate for the given settings.\r
-               /// </returns>\r
-               public static BitrateLimits GetBitrateLimits(HBAudioEncoder encoder, int sampleRate, HBMixdown mixdown)\r
-               {\r
-                       int low = 0;\r
-                       int high = 0;\r
-\r
-                       HBFunctions.hb_audio_bitrate_get_limits((uint)encoder.Id, sampleRate, mixdown.Id, ref low, ref high);\r
-\r
-                       return new BitrateLimits { Low = low, High = high };\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets the video quality limits for the given video codec.\r
-               /// </summary>\r
-               /// <param name="encoder">\r
-               /// The video encoder to check.\r
-               /// </param>\r
-               /// <returns>\r
-               /// Limits on the video quality for the encoder.\r
-               /// </returns>\r
-               public static VideoQualityLimits GetVideoQualityLimits(HBVideoEncoder encoder)\r
-               {\r
-                       float low = 0;\r
-                       float high = 0;\r
-                       float granularity = 0;\r
-                       int direction = 0;\r
-\r
-                       HBFunctions.hb_video_quality_get_limits((uint)encoder.Id, ref low, ref high, ref granularity, ref direction);\r
-\r
-                       return new VideoQualityLimits\r
-                               {\r
-                                       Low = low, \r
-                                       High = high, \r
-                                       Granularity = granularity, \r
-                                       Ascending = direction == 0\r
-                               };\r
-               }\r
-\r
-               /// <summary>\r
-               /// Sanitizes an audio bitrate given the output codec, sample rate and mixdown.\r
-               /// </summary>\r
-               /// <param name="audioBitrate">\r
-               /// The desired audio bitrate.\r
-               /// </param>\r
-               /// <param name="encoder">\r
-               /// The output encoder to be used.\r
-               /// </param>\r
-               /// <param name="sampleRate">\r
-               /// The output sample rate to be used.\r
-               /// </param>\r
-               /// <param name="mixdown">\r
-               /// The mixdown to be used.\r
-               /// </param>\r
-               /// <returns>\r
-               /// A sanitized audio bitrate.\r
-               /// </returns>\r
-               public static int SanitizeAudioBitrate(int audioBitrate, HBAudioEncoder encoder, int sampleRate, HBMixdown mixdown)\r
-               {\r
-                       return HBFunctions.hb_audio_bitrate_get_best((uint)encoder.Id, audioBitrate, sampleRate, mixdown.Id);\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets the default audio bitrate for the given parameters.\r
-               /// </summary>\r
-               /// <param name="encoder">\r
-               /// The encoder to use.\r
-               /// </param>\r
-               /// <param name="sampleRate">\r
-               /// The sample rate to use.\r
-               /// </param>\r
-               /// <param name="mixdown">\r
-               /// The mixdown to use.\r
-               /// </param>\r
-               /// <returns>\r
-               /// The default bitrate for these parameters.\r
-               /// </returns>\r
-               public static int GetDefaultBitrate(HBAudioEncoder encoder, int sampleRate, HBMixdown mixdown)\r
-               {\r
-                       return HBFunctions.hb_audio_bitrate_get_default((uint) encoder.Id, sampleRate, mixdown.Id);\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets limits on audio quality for a given encoder.\r
-               /// </summary>\r
-               /// <param name="encoderId">\r
-               /// The audio encoder ID.\r
-               /// </param>\r
-               /// <returns>\r
-               /// Limits on the audio quality for the given encoder.\r
-               /// </returns>\r
-               internal static RangeLimits GetAudioQualityLimits(int encoderId)\r
-               {\r
-                       float low = 0, high = 0, granularity = 0;\r
-                       int direction = 0;\r
-                       HBFunctions.hb_audio_quality_get_limits((uint)encoderId, ref low, ref high, ref granularity, ref direction);\r
-\r
-                       return new RangeLimits\r
-                       {\r
-                               Low = low, \r
-                               High = high, \r
-                               Granularity = granularity, \r
-                               Ascending = direction == 0\r
-                       };\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets limits on audio compression for a given encoder.\r
-               /// </summary>\r
-               /// <param name="encoderId">\r
-               /// The audio encoder ID.\r
-               /// </param>\r
-               /// <returns>\r
-               /// Limits on the audio compression for the given encoder.\r
-               /// </returns>\r
-               internal static RangeLimits GetAudioCompressionLimits(int encoderId)\r
-               {\r
-                       float low = 0, high = 0, granularity = 0;\r
-                       int direction = 0;\r
-                       HBFunctions.hb_audio_compression_get_limits((uint)encoderId, ref low, ref high, ref granularity, ref direction);\r
-\r
-                       return new RangeLimits\r
-                       {\r
-                               Low = low, \r
-                               High = high, \r
-                               Granularity = granularity, \r
-                               Ascending = direction == 0\r
-                       };\r
-               }\r
-       }\r
+                }\r
+\r
+                return containers;\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets a value indicating whether SRT subtitles can be burnt in.\r
+        /// </summary>\r
+        public static bool CanBurnSrt\r
+        {\r
+            get\r
+            {\r
+                return HBFunctions.hb_subtitle_can_burn((int)hb_subtitle_s_subsource.SRTSUB) > 0;\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets the audio encoder with the specified short name.\r
+        /// </summary>\r
+        /// <param name="shortName">\r
+        /// The name of the audio encoder.\r
+        /// </param>\r
+        /// <returns>\r
+        /// The requested audio encoder.\r
+        /// </returns>\r
+        public static HBAudioEncoder GetAudioEncoder(string shortName)\r
+        {\r
+            return AudioEncoders.SingleOrDefault(e => e.ShortName == shortName);\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets the audio encoder with the specified codec ID.\r
+        /// </summary>\r
+        /// <param name="codecId">\r
+        /// The ID of the audio encoder.\r
+        /// </param>\r
+        /// <returns>\r
+        /// The requested audio encoder.\r
+        /// </returns>\r
+        public static HBAudioEncoder GetAudioEncoder(int codecId)\r
+        {\r
+            return AudioEncoders.SingleOrDefault(e => e.Id == codecId);\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets the video encoder with the specified short name.\r
+        /// </summary>\r
+        /// <param name="shortName">\r
+        /// The name of the video encoder.\r
+        /// </param>\r
+        /// <returns>\r
+        /// The requested video encoder.\r
+        /// </returns>\r
+        public static HBVideoEncoder GetVideoEncoder(string shortName)\r
+        {\r
+            return VideoEncoders.SingleOrDefault(e => e.ShortName == shortName);\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets the mixdown with the specified short name.\r
+        /// </summary>\r
+        /// <param name="shortName">\r
+        /// The name of the mixdown.\r
+        /// </param>\r
+        /// <returns>\r
+        /// The requested mixdown.\r
+        /// </returns>\r
+        public static HBMixdown GetMixdown(string shortName)\r
+        {\r
+            return Mixdowns.SingleOrDefault(m => m.ShortName == shortName);\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets the container with the specified short name.\r
+        /// </summary>\r
+        /// <param name="shortName">\r
+        /// The name of the container.\r
+        /// </param>\r
+        /// <returns>\r
+        /// The requested container.\r
+        /// </returns>\r
+        public static HBContainer GetContainer(string shortName)\r
+        {\r
+            return Containers.SingleOrDefault(c => c.ShortName == shortName);\r
+        }\r
+\r
+        /// <summary>\r
+        /// Determines if the given encoder is compatible with the given track.\r
+        /// </summary>\r
+        /// <param name="track">\r
+        /// The audio track to examine.\r
+        /// </param>\r
+        /// <param name="encoder">\r
+        /// The encoder to examine.\r
+        /// </param>\r
+        /// <returns>\r
+        /// True if the given encoder is comatible with the given audio track.\r
+        /// </returns>\r
+        /// <remarks>\r
+        /// Only works with passthrough encoders.\r
+        /// </remarks>\r
+        public static bool AudioEncoderIsCompatible(AudioTrack track, HBAudioEncoder encoder)\r
+        {\r
+            return (track.CodecId & encoder.Id) > 0;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Determines if the given mixdown supports the given channel layout.\r
+        /// </summary>\r
+        /// <param name="mixdown">\r
+        /// The mixdown to evaluate.\r
+        /// </param>\r
+        /// <param name="layout">\r
+        /// The channel layout to evaluate.\r
+        /// </param>\r
+        /// <returns>\r
+        /// True if the mixdown supports the given channel layout.\r
+        /// </returns>\r
+        public static bool MixdownHasRemixSupport(HBMixdown mixdown, ulong layout)\r
+        {\r
+            return HBFunctions.hb_mixdown_has_remix_support(mixdown.Id, layout) > 0;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Determines if the given encoder supports the given mixdown.\r
+        /// </summary>\r
+        /// <param name="mixdown">\r
+        /// The mixdown to evaluate.\r
+        /// </param>\r
+        /// <param name="encoder">\r
+        /// The encoder to evaluate.\r
+        /// </param>\r
+        /// <returns>\r
+        /// True if the encoder supports the mixdown.\r
+        /// </returns>\r
+        public static bool MixdownHasCodecSupport(HBMixdown mixdown, HBAudioEncoder encoder)\r
+        {\r
+            return HBFunctions.hb_mixdown_has_codec_support(mixdown.Id, (uint) encoder.Id) > 0;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Determines if DRC can be applied to the given track with the given encoder.\r
+        /// </summary>\r
+        /// <param name="track">\r
+        /// The track to apply DRC to.\r
+        /// </param>\r
+        /// <param name="encoder">\r
+        /// The encoder to use for DRC.\r
+        /// </param>\r
+        /// <param name="title">\r
+        /// The title.\r
+        /// </param>\r
+        /// <returns>\r
+        /// True if DRC can be applied to the track with the given encoder.\r
+        /// </returns>\r
+        public static bool CanApplyDrc(AudioTrack track, HBAudioEncoder encoder, int title)\r
+        {\r
+            return HBFunctions.hb_audio_can_apply_drc2(HandBrakeInstanceManager.LastScanHandle, title, track.TrackNumber, encoder.Id) > 0;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Determines if the given input audio codec can be passed through.\r
+        /// </summary>\r
+        /// <param name="codecId">\r
+        /// The input codec to consider.\r
+        /// </param>\r
+        /// <returns>\r
+        /// True if the codec can be passed through.\r
+        /// </returns>\r
+        public static bool CanPassthroughAudio(int codecId)\r
+        {\r
+            return (codecId & NativeConstants.HB_ACODEC_PASS_MASK) > 0;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Sanitizes a mixdown given the output codec and input channel layout.\r
+        /// </summary>\r
+        /// <param name="mixdown">\r
+        /// The desired mixdown.\r
+        /// </param>\r
+        /// <param name="encoder">\r
+        /// The output encoder to be used.\r
+        /// </param>\r
+        /// <param name="layout">\r
+        /// The input channel layout.\r
+        /// </param>\r
+        /// <returns>\r
+        /// A sanitized mixdown value.\r
+        /// </returns>\r
+        public static HBMixdown SanitizeMixdown(HBMixdown mixdown, HBAudioEncoder encoder, ulong layout)\r
+        {\r
+            int sanitizedMixdown = HBFunctions.hb_mixdown_get_best((uint)encoder.Id, layout, mixdown.Id);\r
+            return Mixdowns.Single(m => m.Id == sanitizedMixdown);\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets the default mixdown for the given audio encoder and channel layout.\r
+        /// </summary>\r
+        /// <param name="encoder">\r
+        /// The output codec to be used.\r
+        /// </param>\r
+        /// <param name="layout">\r
+        /// The input channel layout.\r
+        /// </param>\r
+        /// <returns>\r
+        /// The default mixdown for the given codec and channel layout.\r
+        /// </returns>\r
+        public static HBMixdown GetDefaultMixdown(HBAudioEncoder encoder, ulong layout)\r
+        {\r
+            int defaultMixdown = HBFunctions.hb_mixdown_get_default((uint)encoder.Id, layout);\r
+            return Mixdowns.Single(m => m.Id == defaultMixdown);\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets the bitrate limits for the given audio codec, sample rate and mixdown.\r
+        /// </summary>\r
+        /// <param name="encoder">\r
+        /// The audio encoder used.\r
+        /// </param>\r
+        /// <param name="sampleRate">\r
+        /// The sample rate used (Hz).\r
+        /// </param>\r
+        /// <param name="mixdown">\r
+        /// The mixdown used.\r
+        /// </param>\r
+        /// <returns>\r
+        /// Limits on the audio bitrate for the given settings.\r
+        /// </returns>\r
+        public static BitrateLimits GetBitrateLimits(HBAudioEncoder encoder, int sampleRate, HBMixdown mixdown)\r
+        {\r
+            int low = 0;\r
+            int high = 0;\r
+\r
+            HBFunctions.hb_audio_bitrate_get_limits((uint)encoder.Id, sampleRate, mixdown.Id, ref low, ref high);\r
+\r
+            return new BitrateLimits { Low = low, High = high };\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets the video quality limits for the given video codec.\r
+        /// </summary>\r
+        /// <param name="encoder">\r
+        /// The video encoder to check.\r
+        /// </param>\r
+        /// <returns>\r
+        /// Limits on the video quality for the encoder.\r
+        /// </returns>\r
+        public static VideoQualityLimits GetVideoQualityLimits(HBVideoEncoder encoder)\r
+        {\r
+            float low = 0;\r
+            float high = 0;\r
+            float granularity = 0;\r
+            int direction = 0;\r
+\r
+            HBFunctions.hb_video_quality_get_limits((uint)encoder.Id, ref low, ref high, ref granularity, ref direction);\r
+\r
+            return new VideoQualityLimits\r
+                {\r
+                    Low = low, \r
+                    High = high, \r
+                    Granularity = granularity, \r
+                    Ascending = direction == 0\r
+                };\r
+        }\r
+\r
+        /// <summary>\r
+        /// Sanitizes an audio bitrate given the output codec, sample rate and mixdown.\r
+        /// </summary>\r
+        /// <param name="audioBitrate">\r
+        /// The desired audio bitrate.\r
+        /// </param>\r
+        /// <param name="encoder">\r
+        /// The output encoder to be used.\r
+        /// </param>\r
+        /// <param name="sampleRate">\r
+        /// The output sample rate to be used.\r
+        /// </param>\r
+        /// <param name="mixdown">\r
+        /// The mixdown to be used.\r
+        /// </param>\r
+        /// <returns>\r
+        /// A sanitized audio bitrate.\r
+        /// </returns>\r
+        public static int SanitizeAudioBitrate(int audioBitrate, HBAudioEncoder encoder, int sampleRate, HBMixdown mixdown)\r
+        {\r
+            return HBFunctions.hb_audio_bitrate_get_best((uint)encoder.Id, audioBitrate, sampleRate, mixdown.Id);\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets the default audio bitrate for the given parameters.\r
+        /// </summary>\r
+        /// <param name="encoder">\r
+        /// The encoder to use.\r
+        /// </param>\r
+        /// <param name="sampleRate">\r
+        /// The sample rate to use.\r
+        /// </param>\r
+        /// <param name="mixdown">\r
+        /// The mixdown to use.\r
+        /// </param>\r
+        /// <returns>\r
+        /// The default bitrate for these parameters.\r
+        /// </returns>\r
+        public static int GetDefaultBitrate(HBAudioEncoder encoder, int sampleRate, HBMixdown mixdown)\r
+        {\r
+            return HBFunctions.hb_audio_bitrate_get_default((uint) encoder.Id, sampleRate, mixdown.Id);\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets limits on audio quality for a given encoder.\r
+        /// </summary>\r
+        /// <param name="encoderId">\r
+        /// The audio encoder ID.\r
+        /// </param>\r
+        /// <returns>\r
+        /// Limits on the audio quality for the given encoder.\r
+        /// </returns>\r
+        internal static RangeLimits GetAudioQualityLimits(int encoderId)\r
+        {\r
+            float low = 0, high = 0, granularity = 0;\r
+            int direction = 0;\r
+            HBFunctions.hb_audio_quality_get_limits((uint)encoderId, ref low, ref high, ref granularity, ref direction);\r
+\r
+            return new RangeLimits\r
+            {\r
+                Low = low, \r
+                High = high, \r
+                Granularity = granularity, \r
+                Ascending = direction == 0\r
+            };\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets limits on audio compression for a given encoder.\r
+        /// </summary>\r
+        /// <param name="encoderId">\r
+        /// The audio encoder ID.\r
+        /// </param>\r
+        /// <returns>\r
+        /// Limits on the audio compression for the given encoder.\r
+        /// </returns>\r
+        internal static RangeLimits GetAudioCompressionLimits(int encoderId)\r
+        {\r
+            float low = 0, high = 0, granularity = 0;\r
+            int direction = 0;\r
+            HBFunctions.hb_audio_compression_get_limits((uint)encoderId, ref low, ref high, ref granularity, ref direction);\r
+\r
+            return new RangeLimits\r
+            {\r
+                Low = low, \r
+                High = high, \r
+                Granularity = granularity, \r
+                Ascending = direction == 0\r
+            };\r
+        }\r
+    }\r
 }\r
index 7d059f047a8e539f4a8fce521ab25462710ec86a..b77c2b9a650bc822e809689b7c8d1d28bdc68a07 100644 (file)
@@ -16,37 +16,37 @@ namespace HandBrake.ApplicationServices.Interop
     using HandBrake.ApplicationServices.Interop.Model;\r
 \r
     /// <summary>\r
-       /// Contains utilities for converting language codes.\r
-       /// </summary>\r
-       public static class Languages\r
-       {\r
-               /// <summary>\r
-               /// The list of all languages.\r
-               /// </summary>\r
-               private static IList<Language> allLanguages; \r
+    /// Contains utilities for converting language codes.\r
+    /// </summary>\r
+    public static class Languages\r
+    {\r
+        /// <summary>\r
+        /// The list of all languages.\r
+        /// </summary>\r
+        private static IList<Language> allLanguages; \r
 \r
-               /// <summary>\r
-               /// Gets a list of all languages.\r
-               /// </summary>\r
-               public static IList<Language> AllLanguages\r
-               {\r
-                       get\r
-                       {\r
-                           return allLanguages\r
-                                  ?? (allLanguages =\r
+        /// <summary>\r
+        /// Gets a list of all languages.\r
+        /// </summary>\r
+        public static IList<Language> AllLanguages\r
+        {\r
+            get\r
+            {\r
+                return allLanguages\r
+                       ?? (allLanguages =\r
                            InteropUtilities.ToListFromIterator<iso639_lang_t, Language>(HBFunctions.lang_get_next, HandBrakeUnitConversionHelpers.NativeToLanguage));\r
-                       }\r
-               }\r
+            }\r
+        }\r
 \r
-               /// <summary>\r
-               /// Gets the language object for the given code.\r
-               /// </summary>\r
-               /// <param name="code">The ISO-639-2 code for the language.</param>\r
-               /// <returns>Object that describes the language.</returns>\r
-               public static Language Get(string code)\r
-               {\r
-                       iso639_lang_t language = InteropUtilities.ToStructureFromPtr<iso639_lang_t>(HBFunctions.lang_for_code2(code));\r
+        /// <summary>\r
+        /// Gets the language object for the given code.\r
+        /// </summary>\r
+        /// <param name="code">The ISO-639-2 code for the language.</param>\r
+        /// <returns>Object that describes the language.</returns>\r
+        public static Language Get(string code)\r
+        {\r
+            iso639_lang_t language = InteropUtilities.ToStructureFromPtr<iso639_lang_t>(HBFunctions.lang_for_code2(code));\r
             return HandBrakeUnitConversionHelpers.NativeToLanguage(language);\r
-               }\r
-       }\r
+        }\r
+    }\r
 }\r
index ab66617fcd0fc373cacc61fdd1f995c240962dc0..758cfd3026310b0620951d18e21534e94b7074de 100644 (file)
@@ -19,202 +19,202 @@ namespace HandBrake.ApplicationServices.Interop
     using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
 \r
     /// <summary>\r
-       /// Converters for various encoding values.\r
-       /// </summary>\r
+    /// Converters for various encoding values.\r
+    /// </summary>\r
     public static class HandBrakeUnitConversionHelpers\r
-       {\r
-               /// <summary>\r
-               /// Video Frame Rates\r
-               /// </summary>\r
-               private static readonly Dictionary<double, int> VideoRates;\r
+    {\r
+        /// <summary>\r
+        /// Video Frame Rates\r
+        /// </summary>\r
+        private static readonly Dictionary<double, int> VideoRates;\r
 \r
-               /// <summary>\r
+        /// <summary>\r
         /// Initializes static members of the HandBrakeUnitConversionHelpers class.\r
-               /// </summary>\r
+        /// </summary>\r
         static HandBrakeUnitConversionHelpers()\r
-               {\r
-                       HandBrakeUtils.EnsureGlobalInit();\r
+        {\r
+            HandBrakeUtils.EnsureGlobalInit();\r
 \r
-                       VideoRates = new Dictionary<double, int>();\r
+            VideoRates = new Dictionary<double, int>();\r
             foreach (var framerate in HandBrakeEncoderHelpers.VideoFramerates)\r
-                       {\r
-                               VideoRates.Add(double.Parse(framerate.Name, CultureInfo.InvariantCulture), framerate.Rate);\r
-                       }\r
-               }\r
-\r
-               /// <summary>\r
-               /// Convert Framerate to Video Rates\r
-               /// </summary>\r
-               /// <param name="framerate">\r
-               /// The framerate.\r
-               /// </param>\r
-               /// <returns>\r
-               /// The vrate if a valid framerate is passed in.\r
-               /// </returns>\r
-               /// <exception cref="ArgumentException">\r
-               /// Thrown when framerate is invalid.\r
-               /// </exception>\r
-               public static int FramerateToVrate(double framerate)\r
-               {\r
-                       if (!VideoRates.ContainsKey(framerate))\r
-                       {\r
-                               throw new ArgumentException("Framerate not recognized.", "framerate");\r
-                       }\r
-\r
-                       return VideoRates[framerate];\r
-               }\r
-\r
-               /// <summary>\r
-               /// Converts a native HB encoder structure to an Encoder model.\r
-               /// </summary>\r
-               /// <param name="encoder">\r
-               /// The structure to convert.\r
-               /// </param>\r
-               /// <returns>\r
-               /// The converted model.\r
-               /// </returns>\r
-               public static HBVideoEncoder NativeToVideoEncoder(hb_encoder_s encoder)\r
-               {\r
-                       return new HBVideoEncoder\r
-                       {\r
-                               Id = encoder.codec, \r
-                               ShortName = encoder.short_name, \r
-                               DisplayName = encoder.name, \r
-                               CompatibleContainers = encoder.muxers\r
-                       };\r
-               }\r
-\r
-               /// <summary>\r
-               /// Converts a native HB encoder structure to an Encoder model.\r
-               /// </summary>\r
-               /// <param name="encoder">\r
-               /// The structure to convert.\r
-               /// </param>\r
-               /// <returns>\r
-               /// The converted model.\r
-               /// </returns>\r
-               public static HBAudioEncoder NativeToAudioEncoder(hb_encoder_s encoder)\r
-               {\r
-                       var result = new HBAudioEncoder\r
-                                        {\r
-                                            Id = encoder.codec, \r
-                                            ShortName = encoder.short_name, \r
-                                            DisplayName = encoder.name, \r
-                                            CompatibleContainers = encoder.muxers,\r
+            {\r
+                VideoRates.Add(double.Parse(framerate.Name, CultureInfo.InvariantCulture), framerate.Rate);\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Convert Framerate to Video Rates\r
+        /// </summary>\r
+        /// <param name="framerate">\r
+        /// The framerate.\r
+        /// </param>\r
+        /// <returns>\r
+        /// The vrate if a valid framerate is passed in.\r
+        /// </returns>\r
+        /// <exception cref="ArgumentException">\r
+        /// Thrown when framerate is invalid.\r
+        /// </exception>\r
+        public static int FramerateToVrate(double framerate)\r
+        {\r
+            if (!VideoRates.ContainsKey(framerate))\r
+            {\r
+                throw new ArgumentException("Framerate not recognized.", "framerate");\r
+            }\r
+\r
+            return VideoRates[framerate];\r
+        }\r
+\r
+        /// <summary>\r
+        /// Converts a native HB encoder structure to an Encoder model.\r
+        /// </summary>\r
+        /// <param name="encoder">\r
+        /// The structure to convert.\r
+        /// </param>\r
+        /// <returns>\r
+        /// The converted model.\r
+        /// </returns>\r
+        public static HBVideoEncoder NativeToVideoEncoder(hb_encoder_s encoder)\r
+        {\r
+            return new HBVideoEncoder\r
+            {\r
+                Id = encoder.codec, \r
+                ShortName = encoder.short_name, \r
+                DisplayName = encoder.name, \r
+                CompatibleContainers = encoder.muxers\r
+            };\r
+        }\r
+\r
+        /// <summary>\r
+        /// Converts a native HB encoder structure to an Encoder model.\r
+        /// </summary>\r
+        /// <param name="encoder">\r
+        /// The structure to convert.\r
+        /// </param>\r
+        /// <returns>\r
+        /// The converted model.\r
+        /// </returns>\r
+        public static HBAudioEncoder NativeToAudioEncoder(hb_encoder_s encoder)\r
+        {\r
+            var result = new HBAudioEncoder\r
+                             {\r
+                                 Id = encoder.codec, \r
+                                 ShortName = encoder.short_name, \r
+                                 DisplayName = encoder.name, \r
+                                 CompatibleContainers = encoder.muxers,\r
                                  QualityLimits = HandBrakeEncoderHelpers.GetAudioQualityLimits(encoder.codec), \r
-                                            DefaultQuality = HBFunctions.hb_audio_quality_get_default((uint)encoder.codec), \r
-                                            CompressionLimits = HandBrakeEncoderHelpers.GetAudioCompressionLimits(encoder.codec), \r
-                                            DefaultCompression =\r
-                                            HBFunctions.hb_audio_compression_get_default((uint)encoder.codec)\r
-                                        };\r
-\r
-                   return result;\r
-               }\r
-\r
-               /// <summary>\r
-               /// Converts a native HB rate structure to an HBRate object.\r
-               /// </summary>\r
-               /// <param name="rate">\r
-               /// The structure to convert.\r
-               /// </param>\r
-               /// <returns>\r
-               /// The converted rate object.\r
-               /// </returns>\r
-               public static HBRate NativeToRate(hb_rate_s rate)\r
-               {\r
-                       return new HBRate\r
-                               {\r
-                                       Name = rate.name, \r
-                                       Rate = rate.rate\r
-                               };\r
-               }\r
-\r
-               /// <summary>\r
-               /// Converts a native HB mixdown structure to a Mixdown model.\r
-               /// </summary>\r
-               /// <param name="mixdown">\r
-               /// The structure to convert.\r
-               /// </param>\r
-               /// <returns>\r
-               /// The converted model.\r
-               /// </returns>\r
-               public static HBMixdown NativeToMixdown(hb_mixdown_s mixdown)\r
-               {\r
-                       return new HBMixdown\r
-                               {\r
-                                       Id = mixdown.amixdown, \r
-                                       ShortName = mixdown.short_name, \r
-                                       DisplayName = mixdown.name\r
-                               };\r
-               }\r
-\r
-               /// <summary>\r
-               /// Converts a native HB container structure into an HBContainer object.\r
-               /// </summary>\r
-               /// <param name="container">\r
-               /// The structure to convert.\r
-               /// </param>\r
-               /// <returns>\r
-               /// The converted structure.\r
-               /// </returns>\r
-               public static HBContainer NativeToContainer(hb_container_s container)\r
-               {\r
-                       return new HBContainer\r
-                               {\r
-                                       DisplayName = container.name, \r
-                                       ShortName = container.short_name, \r
-                                       DefaultExtension = container.default_extension, \r
-                                       Id = container.format\r
-                               };\r
-               }\r
-\r
-               /// <summary>\r
-               /// Converts a native language structure to a Language object.\r
-               /// </summary>\r
-               /// <param name="language">\r
-               /// The structure to convert.\r
-               /// </param>\r
-               /// <returns>\r
-               /// The converted structure.\r
-               /// </returns>\r
-               public static Language NativeToLanguage(iso639_lang_t language)\r
-               {\r
-                       string englishName = InteropUtilities.ToStringFromUtf8Ptr(language.eng_name);\r
-                       string nativeName = InteropUtilities.ToStringFromUtf8Ptr(language.native_name);\r
-                       return new Language\r
-                               {\r
-                                       Code = language.iso639_2, \r
-                                       EnglishName = englishName, \r
-                                       NativeName = nativeName\r
-                               };\r
-               }\r
-\r
-               /// <summary>\r
-               /// Converts the PTS amount to a TimeSpan. There may be some accuracy loss here.\r
-               /// </summary>\r
-               /// <param name="pts">\r
-               /// The PTS to convert.\r
-               /// </param>\r
-               /// <returns>\r
-               /// The timespan for it.\r
-               /// </returns>\r
-               public static TimeSpan PtsToTimeSpan(ulong pts)\r
-               {\r
-                       return TimeSpan.FromTicks((long)((pts * 10000000) / 90000));\r
-               }\r
-\r
-               /// <summary>\r
-               /// Converts the PTS amount to seconds.\r
-               /// </summary>\r
-               /// <param name="pts">\r
-               /// The PTS to convert.\r
-               /// </param>\r
-               /// <returns>\r
-               /// The corresponding number of seconds.\r
-               /// </returns>\r
-               public static double PtsToSeconds(ulong pts)\r
-               {\r
-                       return (double)pts / 90000;\r
-               }\r
-       }\r
+                                 DefaultQuality = HBFunctions.hb_audio_quality_get_default((uint)encoder.codec), \r
+                                 CompressionLimits = HandBrakeEncoderHelpers.GetAudioCompressionLimits(encoder.codec), \r
+                                 DefaultCompression =\r
+                                 HBFunctions.hb_audio_compression_get_default((uint)encoder.codec)\r
+                             };\r
+\r
+            return result;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Converts a native HB rate structure to an HBRate object.\r
+        /// </summary>\r
+        /// <param name="rate">\r
+        /// The structure to convert.\r
+        /// </param>\r
+        /// <returns>\r
+        /// The converted rate object.\r
+        /// </returns>\r
+        public static HBRate NativeToRate(hb_rate_s rate)\r
+        {\r
+            return new HBRate\r
+                {\r
+                    Name = rate.name, \r
+                    Rate = rate.rate\r
+                };\r
+        }\r
+\r
+        /// <summary>\r
+        /// Converts a native HB mixdown structure to a Mixdown model.\r
+        /// </summary>\r
+        /// <param name="mixdown">\r
+        /// The structure to convert.\r
+        /// </param>\r
+        /// <returns>\r
+        /// The converted model.\r
+        /// </returns>\r
+        public static HBMixdown NativeToMixdown(hb_mixdown_s mixdown)\r
+        {\r
+            return new HBMixdown\r
+                {\r
+                    Id = mixdown.amixdown, \r
+                    ShortName = mixdown.short_name, \r
+                    DisplayName = mixdown.name\r
+                };\r
+        }\r
+\r
+        /// <summary>\r
+        /// Converts a native HB container structure into an HBContainer object.\r
+        /// </summary>\r
+        /// <param name="container">\r
+        /// The structure to convert.\r
+        /// </param>\r
+        /// <returns>\r
+        /// The converted structure.\r
+        /// </returns>\r
+        public static HBContainer NativeToContainer(hb_container_s container)\r
+        {\r
+            return new HBContainer\r
+                {\r
+                    DisplayName = container.name, \r
+                    ShortName = container.short_name, \r
+                    DefaultExtension = container.default_extension, \r
+                    Id = container.format\r
+                };\r
+        }\r
+\r
+        /// <summary>\r
+        /// Converts a native language structure to a Language object.\r
+        /// </summary>\r
+        /// <param name="language">\r
+        /// The structure to convert.\r
+        /// </param>\r
+        /// <returns>\r
+        /// The converted structure.\r
+        /// </returns>\r
+        public static Language NativeToLanguage(iso639_lang_t language)\r
+        {\r
+            string englishName = InteropUtilities.ToStringFromUtf8Ptr(language.eng_name);\r
+            string nativeName = InteropUtilities.ToStringFromUtf8Ptr(language.native_name);\r
+            return new Language\r
+                {\r
+                    Code = language.iso639_2, \r
+                    EnglishName = englishName, \r
+                    NativeName = nativeName\r
+                };\r
+        }\r
+\r
+        /// <summary>\r
+        /// Converts the PTS amount to a TimeSpan. There may be some accuracy loss here.\r
+        /// </summary>\r
+        /// <param name="pts">\r
+        /// The PTS to convert.\r
+        /// </param>\r
+        /// <returns>\r
+        /// The timespan for it.\r
+        /// </returns>\r
+        public static TimeSpan PtsToTimeSpan(ulong pts)\r
+        {\r
+            return TimeSpan.FromTicks((long)((pts * 10000000) / 90000));\r
+        }\r
+\r
+        /// <summary>\r
+        /// Converts the PTS amount to seconds.\r
+        /// </summary>\r
+        /// <param name="pts">\r
+        /// The PTS to convert.\r
+        /// </param>\r
+        /// <returns>\r
+        /// The corresponding number of seconds.\r
+        /// </returns>\r
+        public static double PtsToSeconds(ulong pts)\r
+        {\r
+            return (double)pts / 90000;\r
+        }\r
+    }\r
 }\r
index 2ad727a9e3c05361ec4035a03bd8dac79433ade5..138eed367ee735ee32c6236f77ab32745e021eab 100644 (file)
@@ -168,7 +168,7 @@ namespace HandBrake.ApplicationServices.Interop
             if (!string.IsNullOrEmpty(message))\r
             {\r
                 // These errors happen in normal operations. Log them as messages.\r
-                               if (message == "dvd: ifoOpen failed" || message.Contains("avformat_seek_file failed") || message.Contains("nav_get_title_list"))\r
+                if (message == "dvd: ifoOpen failed" || message.Contains("avformat_seek_file failed") || message.Contains("nav_get_title_list"))\r
                 {\r
                     SendMessageEvent(message);\r
                     return;\r
index 283beb88e519f3ee7dc46b6aede7b752797fcc40..3dff02a9d45c0cc4189207f2de43745d82247384 100644 (file)
@@ -10,8 +10,8 @@
 \r
 namespace HandBrake.ApplicationServices.Interop.HbLib\r
 {\r
-       using System.Runtime.InteropServices;\r
+    using System.Runtime.InteropServices;\r
 \r
-       [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
-       public delegate void LoggingCallback(string message);\r
+    [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
+    public delegate void LoggingCallback(string message);\r
 }\r
index 23f0df750485da47fcc36fe9022f63551244368a..dab5d1bb3c7394404af30f8d599d653c3f2fb39b 100644 (file)
 \r
 namespace HandBrake.ApplicationServices.Interop.HbLib\r
 {\r
-       using System;\r
-       using System.Runtime.InteropServices;\r
+    using System;\r
+    using System.Runtime.InteropServices;\r
 \r
-       /// <summary>\r
-       /// Contains p-invoke function declarations to hblib.\r
-       /// </summary>\r
-       public static class HBFunctions\r
-       {\r
-               [DllImport("hb.dll", EntryPoint = "hb_register_logger", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_register_logger(LoggingCallback callback);\r
+    /// <summary>\r
+    /// Contains p-invoke function declarations to hblib.\r
+    /// </summary>\r
+    public static class HBFunctions\r
+    {\r
+        [DllImport("hb.dll", EntryPoint = "hb_register_logger", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_register_logger(LoggingCallback callback);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_register_error_handler", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_register_error_handler(LoggingCallback callback);\r
+        [DllImport("hb.dll", EntryPoint = "hb_register_error_handler", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_register_error_handler(LoggingCallback callback);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_global_init", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_global_init();\r
+        [DllImport("hb.dll", EntryPoint = "hb_global_init", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_global_init();\r
 \r
-               /// Return Type: hb_handle_t*\r
-               ///verbose: int\r
-               ///update_check: int\r
-               [DllImport("hb.dll", EntryPoint = "hb_init", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_init(int verbose, int update_check);\r
+        /// Return Type: hb_handle_t*\r
+        ///verbose: int\r
+        ///update_check: int\r
+        [DllImport("hb.dll", EntryPoint = "hb_init", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_init(int verbose, int update_check);\r
 \r
 \r
-               /// Return Type: hb_handle_t*\r
-               ///verbose: int\r
-               ///update_check: int\r
-               [DllImport("hb.dll", EntryPoint = "hb_init_dl", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_init_dl(int verbose, int update_check);\r
+        /// Return Type: hb_handle_t*\r
+        ///verbose: int\r
+        ///update_check: int\r
+        [DllImport("hb.dll", EntryPoint = "hb_init_dl", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_init_dl(int verbose, int update_check);\r
 \r
 \r
-               /// Return Type: char*\r
-               ///param0: hb_handle_t*\r
-               [DllImport("hb.dll", EntryPoint = "hb_get_version", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_get_version(IntPtr hbHandle);\r
+        /// Return Type: char*\r
+        ///param0: hb_handle_t*\r
+        [DllImport("hb.dll", EntryPoint = "hb_get_version", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_get_version(IntPtr hbHandle);\r
 \r
 \r
-               /// Return Type: int\r
-               ///param0: hb_handle_t*\r
-               [DllImport("hb.dll", EntryPoint = "hb_get_build", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_get_build(IntPtr hbHandle);\r
+        /// Return Type: int\r
+        ///param0: hb_handle_t*\r
+        [DllImport("hb.dll", EntryPoint = "hb_get_build", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_get_build(IntPtr hbHandle);\r
 \r
 \r
-               /// Return Type: int\r
-               ///h: hb_handle_t*\r
-               ///version: char**\r
-               [DllImport("hb.dll", EntryPoint = "hb_check_update", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_check_update(IntPtr handle, ref IntPtr version);\r
+        /// Return Type: int\r
+        ///h: hb_handle_t*\r
+        ///version: char**\r
+        [DllImport("hb.dll", EntryPoint = "hb_check_update", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_check_update(IntPtr handle, ref IntPtr version);\r
 \r
 \r
-               /// Return Type: char*\r
-               ///path: char*\r
-               [DllImport("hb.dll", EntryPoint = "hb_dvd_name", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_dvd_name(IntPtr path);\r
+        /// Return Type: char*\r
+        ///path: char*\r
+        [DllImport("hb.dll", EntryPoint = "hb_dvd_name", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_dvd_name(IntPtr path);\r
 \r
 \r
-               /// Return Type: void\r
-               ///enable: int\r
-               [DllImport("hb.dll", EntryPoint = "hb_dvd_set_dvdnav", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_dvd_set_dvdnav(int enable);\r
+        /// Return Type: void\r
+        ///enable: int\r
+        [DllImport("hb.dll", EntryPoint = "hb_dvd_set_dvdnav", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_dvd_set_dvdnav(int enable);\r
 \r
 \r
-               /// Return Type: void\r
-               ///param0: hb_handle_t*\r
-               ///path: char*\r
-               ///title_index: int\r
-               ///preview_count: int\r
-               ///store_previews: int\r
-               [DllImport("hb.dll", EntryPoint = "hb_scan", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_scan(IntPtr hbHandle, IntPtr path, int title_index, int preview_count, int store_previews, ulong min_duration);\r
+        /// Return Type: void\r
+        ///param0: hb_handle_t*\r
+        ///path: char*\r
+        ///title_index: int\r
+        ///preview_count: int\r
+        ///store_previews: int\r
+        [DllImport("hb.dll", EntryPoint = "hb_scan", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_scan(IntPtr hbHandle, IntPtr path, int title_index, int preview_count, int store_previews, ulong min_duration);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_scan_stop", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_scan_stop(IntPtr hbHandle);\r
+        [DllImport("hb.dll", EntryPoint = "hb_scan_stop", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_scan_stop(IntPtr hbHandle);\r
 \r
-               /// Return Type: hb_list_t*\r
-               ///param0: hb_handle_t*\r
-               [DllImport("hb.dll", EntryPoint = "hb_get_titles", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_get_titles(IntPtr hbHandle);\r
+        /// Return Type: hb_list_t*\r
+        ///param0: hb_handle_t*\r
+        [DllImport("hb.dll", EntryPoint = "hb_get_titles", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_get_titles(IntPtr hbHandle);\r
 \r
         [DllImport("hb.dll", EntryPoint = "hb_set_anamorphic_size2", CallingConvention = CallingConvention.Cdecl)]\r
         public static extern void hb_set_anamorphic_size2(ref hb_geometry_s sourceGeometry, ref hb_geometry_settings_s uiGeometry, ref hb_geometry_s result);\r
         \r
 \r
-               /// Return Type: int\r
-               ///param0: hb_handle_t*\r
-               [DllImport("hb.dll", EntryPoint = "hb_count", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_count(IntPtr hbHandle);\r
+        /// Return Type: int\r
+        ///param0: hb_handle_t*\r
+        [DllImport("hb.dll", EntryPoint = "hb_count", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_count(IntPtr hbHandle);\r
 \r
 \r
-               /// Return Type: hb_job_t*\r
-               ///param0: hb_handle_t*\r
-               ///param1: int\r
-               [DllImport("hb.dll", EntryPoint = "hb_job", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_job(IntPtr hbHandle, int jobIndex);\r
+        /// Return Type: hb_job_t*\r
+        ///param0: hb_handle_t*\r
+        ///param1: int\r
+        [DllImport("hb.dll", EntryPoint = "hb_job", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_job(IntPtr hbHandle, int jobIndex);\r
 \r
-               /// Return Type: void\r
-               ///param0: hb_handle_t*\r
-               ///param1: hb_job_t*\r
-               [DllImport("hb.dll", EntryPoint = "hb_rem", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_rem(IntPtr hbHandle, IntPtr job);\r
+        /// Return Type: void\r
+        ///param0: hb_handle_t*\r
+        ///param1: hb_job_t*\r
+        [DllImport("hb.dll", EntryPoint = "hb_rem", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_rem(IntPtr hbHandle, IntPtr job);\r
 \r
 \r
-               /// Return Type: void\r
-               ///param0: hb_handle_t*\r
-               [DllImport("hb.dll", EntryPoint = "hb_start", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_start(IntPtr hbHandle);\r
+        /// Return Type: void\r
+        ///param0: hb_handle_t*\r
+        [DllImport("hb.dll", EntryPoint = "hb_start", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_start(IntPtr hbHandle);\r
 \r
 \r
-               /// Return Type: void\r
-               ///param0: hb_handle_t*\r
-               [DllImport("hb.dll", EntryPoint = "hb_pause", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_pause(IntPtr hbHandle);\r
+        /// Return Type: void\r
+        ///param0: hb_handle_t*\r
+        [DllImport("hb.dll", EntryPoint = "hb_pause", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_pause(IntPtr hbHandle);\r
 \r
 \r
-               /// Return Type: void\r
-               ///param0: hb_handle_t*\r
-               [DllImport("hb.dll", EntryPoint = "hb_resume", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_resume(IntPtr hbHandle);\r
+        /// Return Type: void\r
+        ///param0: hb_handle_t*\r
+        [DllImport("hb.dll", EntryPoint = "hb_resume", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_resume(IntPtr hbHandle);\r
 \r
 \r
-               /// Return Type: void\r
-               ///param0: hb_handle_t*\r
-               [DllImport("hb.dll", EntryPoint = "hb_stop", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_stop(IntPtr hbHandle);\r
+        /// Return Type: void\r
+        ///param0: hb_handle_t*\r
+        [DllImport("hb.dll", EntryPoint = "hb_stop", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_stop(IntPtr hbHandle);\r
 \r
 \r
-               /// Return Type: int\r
-               ///param0: hb_handle_t*\r
-               [DllImport("hb.dll", EntryPoint = "hb_get_scancount", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_get_scancount(IntPtr hbHandle);\r
+        /// Return Type: int\r
+        ///param0: hb_handle_t*\r
+        [DllImport("hb.dll", EntryPoint = "hb_get_scancount", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_get_scancount(IntPtr hbHandle);\r
 \r
 \r
-               /// Return Type: void\r
-               ///param0: hb_handle_t**\r
-               [DllImport("hb.dll", EntryPoint = "hb_close", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_close(IntPtr hbHandle);\r
+        /// Return Type: void\r
+        ///param0: hb_handle_t**\r
+        [DllImport("hb.dll", EntryPoint = "hb_close", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_close(IntPtr hbHandle);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_global_close", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_global_close();\r
+        [DllImport("hb.dll", EntryPoint = "hb_global_close", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_global_close();\r
 \r
-               //hb_list_t * hb_list_init();\r
-               [DllImport("hb.dll", EntryPoint = "hb_list_init", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_list_init();\r
+        //hb_list_t * hb_list_init();\r
+        [DllImport("hb.dll", EntryPoint = "hb_list_init", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_list_init();\r
 \r
-               //int         hb_list_count( const hb_list_t * );\r
-               [DllImport("hb.dll", EntryPoint = "hb_list_count", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_list_count(IntPtr listPtr);\r
+        //int         hb_list_count( const hb_list_t * );\r
+        [DllImport("hb.dll", EntryPoint = "hb_list_count", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_list_count(IntPtr listPtr);\r
 \r
-               //void        hb_list_add( hb_list_t *, void * );\r
-               [DllImport("hb.dll", EntryPoint = "hb_list_add", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_list_add(IntPtr listPtr, IntPtr item);\r
+        //void        hb_list_add( hb_list_t *, void * );\r
+        [DllImport("hb.dll", EntryPoint = "hb_list_add", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_list_add(IntPtr listPtr, IntPtr item);\r
 \r
-               //void        hb_list_insert( hb_list_t * l, int pos, void * p );\r
-               [DllImport("hb.dll", EntryPoint = "hb_list_insert", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_list_insert(IntPtr listPtr, int pos, IntPtr item);\r
+        //void        hb_list_insert( hb_list_t * l, int pos, void * p );\r
+        [DllImport("hb.dll", EntryPoint = "hb_list_insert", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_list_insert(IntPtr listPtr, int pos, IntPtr item);\r
 \r
-               //void        hb_list_rem( hb_list_t *, void * );\r
-               [DllImport("hb.dll", EntryPoint = "hb_list_rem", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_list_rem(IntPtr listPtr, IntPtr item);\r
+        //void        hb_list_rem( hb_list_t *, void * );\r
+        [DllImport("hb.dll", EntryPoint = "hb_list_rem", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_list_rem(IntPtr listPtr, IntPtr item);\r
 \r
-               //void      * hb_list_item( const hb_list_t *, int );\r
-               [DllImport("hb.dll", EntryPoint = "hb_list_item", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_list_item(IntPtr listPtr, int itemIndex);\r
+        //void      * hb_list_item( const hb_list_t *, int );\r
+        [DllImport("hb.dll", EntryPoint = "hb_list_item", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_list_item(IntPtr listPtr, int itemIndex);\r
 \r
-               //void        hb_list_close( hb_list_t ** );\r
-               [DllImport("hb.dll", EntryPoint = "hb_list_close", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_list_close(IntPtr listPtrPtr);\r
+        //void        hb_list_close( hb_list_t ** );\r
+        [DllImport("hb.dll", EntryPoint = "hb_list_close", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_list_close(IntPtr listPtrPtr);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_subtitle_can_force", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_subtitle_can_force(int source);\r
+        [DllImport("hb.dll", EntryPoint = "hb_subtitle_can_force", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_subtitle_can_force(int source);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_subtitle_can_burn", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_subtitle_can_burn(int source);\r
+        [DllImport("hb.dll", EntryPoint = "hb_subtitle_can_burn", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_subtitle_can_burn(int source);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_subtitle_can_pass", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_subtitle_can_pass(int source, int mux);\r
+        [DllImport("hb.dll", EntryPoint = "hb_subtitle_can_pass", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_subtitle_can_pass(int source, int mux);\r
 \r
 \r
         // int hb_video_framerate_get_from_name(const char *name)\r
@@ -195,54 +195,54 @@ namespace HandBrake.ApplicationServices.Interop.HbLib
 //const char*      hb_video_framerate_get_name(int framerate);\r
 //const char*      hb_video_framerate_sanitize_name(const char *name);\r
 \r
-               // returns hb_rate_s\r
-               [DllImport("hb.dll", EntryPoint = "hb_video_framerate_get_next", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_video_framerate_get_next(IntPtr last);\r
+        // returns hb_rate_s\r
+        [DllImport("hb.dll", EntryPoint = "hb_video_framerate_get_next", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_video_framerate_get_next(IntPtr last);\r
 \r
 \r
 //int              hb_audio_samplerate_get_best(uint32_t codec, int samplerate, int *sr_shift);\r
 //int              hb_audio_samplerate_get_from_name(const char *name);\r
 //const char*      hb_audio_samplerate_get_name(int samplerate);\r
 \r
-               // returns hb_rate_s\r
-               [DllImport("hb.dll", EntryPoint = "hb_audio_samplerate_get_next", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_audio_samplerate_get_next(IntPtr last);\r
+        // returns hb_rate_s\r
+        [DllImport("hb.dll", EntryPoint = "hb_audio_samplerate_get_next", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_audio_samplerate_get_next(IntPtr last);\r
 \r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_audio_bitrate_get_best", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_audio_bitrate_get_best(uint codec, int bitrate, int samplerate, int mixdown);\r
+        [DllImport("hb.dll", EntryPoint = "hb_audio_bitrate_get_best", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_audio_bitrate_get_best(uint codec, int bitrate, int samplerate, int mixdown);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_audio_bitrate_get_default", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_audio_bitrate_get_default(uint codec, int samplerate, int mixdown);\r
+        [DllImport("hb.dll", EntryPoint = "hb_audio_bitrate_get_default", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_audio_bitrate_get_default(uint codec, int samplerate, int mixdown);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_audio_bitrate_get_limits", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_audio_bitrate_get_limits(uint codec, int samplerate, int mixdown, ref int low, ref int high);\r
+        [DllImport("hb.dll", EntryPoint = "hb_audio_bitrate_get_limits", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_audio_bitrate_get_limits(uint codec, int samplerate, int mixdown, ref int low, ref int high);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_audio_bitrate_get_next", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_audio_bitrate_get_next(IntPtr last);\r
+        [DllImport("hb.dll", EntryPoint = "hb_audio_bitrate_get_next", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_audio_bitrate_get_next(IntPtr last);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_video_quality_get_limits", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_video_quality_get_limits(uint codec, ref float low, ref float high, ref float granularity, ref int direction);\r
+        [DllImport("hb.dll", EntryPoint = "hb_video_quality_get_limits", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_video_quality_get_limits(uint codec, ref float low, ref float high, ref float granularity, ref int direction);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_video_quality_get_name", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_video_quality_get_name(uint codec);\r
+        [DllImport("hb.dll", EntryPoint = "hb_video_quality_get_name", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_video_quality_get_name(uint codec);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_audio_quality_get_limits", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_audio_quality_get_limits(uint codec, ref float low, ref float high, ref float granularity, ref int direction);\r
+        [DllImport("hb.dll", EntryPoint = "hb_audio_quality_get_limits", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_audio_quality_get_limits(uint codec, ref float low, ref float high, ref float granularity, ref int direction);\r
 \r
 //float hb_audio_quality_get_best(uint32_t codec, float quality);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_audio_quality_get_default", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern float hb_audio_quality_get_default(uint codec);\r
+        [DllImport("hb.dll", EntryPoint = "hb_audio_quality_get_default", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern float hb_audio_quality_get_default(uint codec);\r
 \r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_audio_compression_get_limits", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_audio_compression_get_limits(uint codec, ref float low, ref float high, ref float granularity, ref int direction);\r
+        [DllImport("hb.dll", EntryPoint = "hb_audio_compression_get_limits", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_audio_compression_get_limits(uint codec, ref float low, ref float high, ref float granularity, ref int direction);\r
 \r
 //float hb_audio_compression_get_best(uint32_t codec, float compression);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_audio_compression_get_default", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern float hb_audio_compression_get_default(uint codec);\r
+        [DllImport("hb.dll", EntryPoint = "hb_audio_compression_get_default", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern float hb_audio_compression_get_default(uint codec);\r
 \r
 \r
 //int                hb_audio_dither_get_default();\r
@@ -256,31 +256,31 @@ namespace HandBrake.ApplicationServices.Interop.HbLib
         [DllImport("hb.dll", EntryPoint = "hb_audio_can_apply_drc2", CallingConvention = CallingConvention.Cdecl)]\r
         public static extern int hb_audio_can_apply_drc2(IntPtr handle, int title_index, int audio_index, int encoder);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_mixdown_is_supported", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_mixdown_is_supported(int mixdown, uint codec, ulong layout);\r
+        [DllImport("hb.dll", EntryPoint = "hb_mixdown_is_supported", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_mixdown_is_supported(int mixdown, uint codec, ulong layout);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_mixdown_has_codec_support", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_mixdown_has_codec_support(int mixdown, uint codec);\r
+        [DllImport("hb.dll", EntryPoint = "hb_mixdown_has_codec_support", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_mixdown_has_codec_support(int mixdown, uint codec);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_mixdown_has_remix_support", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_mixdown_has_remix_support(int mixdown, ulong layout);\r
+        [DllImport("hb.dll", EntryPoint = "hb_mixdown_has_remix_support", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_mixdown_has_remix_support(int mixdown, ulong layout);\r
 \r
 //int                 hb_mixdown_get_discrete_channel_count(int mixdown);\r
 //int                 hb_mixdown_get_low_freq_channel_count(int mixdown);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_mixdown_get_best", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_mixdown_get_best(uint codec, ulong layout, int mixdown);\r
+        [DllImport("hb.dll", EntryPoint = "hb_mixdown_get_best", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_mixdown_get_best(uint codec, ulong layout, int mixdown);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_mixdown_get_default", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_mixdown_get_default(uint codec, ulong layout);\r
+        [DllImport("hb.dll", EntryPoint = "hb_mixdown_get_default", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_mixdown_get_default(uint codec, ulong layout);\r
 \r
 //int                 hb_mixdown_get_from_name(const char *name);\r
 //const char*         hb_mixdown_get_name(int mixdown);\r
 //const char*         hb_mixdown_get_short_name(int mixdown);\r
 //const char*         hb_mixdown_sanitize_name(const char *name);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_mixdown_get_next", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_mixdown_get_next(IntPtr last);\r
+        [DllImport("hb.dll", EntryPoint = "hb_mixdown_get_next", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_mixdown_get_next(IntPtr last);\r
 \r
 //int                 hb_video_encoder_get_default(int muxer);\r
 //int                 hb_video_encoder_get_from_name(const char *name);\r
@@ -289,8 +289,8 @@ namespace HandBrake.ApplicationServices.Interop.HbLib
 //const char*         hb_video_encoder_get_long_name(int encoder);\r
 //const char*         hb_video_encoder_sanitize_name(const char *name);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_video_encoder_get_next", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_video_encoder_get_next(IntPtr last);\r
+        [DllImport("hb.dll", EntryPoint = "hb_video_encoder_get_next", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_video_encoder_get_next(IntPtr last);\r
 \r
 /*\r
  * hb_audio_encoder_get_fallback_for_passthru() will sanitize a passthru codec\r
@@ -307,8 +307,8 @@ namespace HandBrake.ApplicationServices.Interop.HbLib
 //const char*         hb_audio_encoder_get_long_name(int encoder);\r
 //const char*         hb_audio_encoder_sanitize_name(const char *name);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_audio_encoder_get_next", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_audio_encoder_get_next(IntPtr last);\r
+        [DllImport("hb.dll", EntryPoint = "hb_audio_encoder_get_next", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_audio_encoder_get_next(IntPtr last);\r
 \r
 //int                   hb_container_get_from_name(const char *name);\r
 //int                   hb_container_get_from_extension(const char *extension); // not really a container name\r
@@ -318,87 +318,87 @@ namespace HandBrake.ApplicationServices.Interop.HbLib
 //const char*           hb_container_get_default_extension(int format);\r
 //const char*           hb_container_sanitize_name(const char *name);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_container_get_from_name", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_container_get_from_name([In] [MarshalAs(UnmanagedType.LPStr)] string name);\r
+        [DllImport("hb.dll", EntryPoint = "hb_container_get_from_name", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_container_get_from_name([In] [MarshalAs(UnmanagedType.LPStr)] string name);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_container_get_next", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_container_get_next(IntPtr last);\r
+        [DllImport("hb.dll", EntryPoint = "hb_container_get_next", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_container_get_next(IntPtr last);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_video_encoder_get_presets", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_video_encoder_get_presets(int encoder);\r
+        [DllImport("hb.dll", EntryPoint = "hb_video_encoder_get_presets", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_video_encoder_get_presets(int encoder);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_video_encoder_get_tunes", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_video_encoder_get_tunes(int encoder);\r
+        [DllImport("hb.dll", EntryPoint = "hb_video_encoder_get_tunes", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_video_encoder_get_tunes(int encoder);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_video_encoder_get_profiles", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_video_encoder_get_profiles(int encoder);\r
+        [DllImport("hb.dll", EntryPoint = "hb_video_encoder_get_profiles", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_video_encoder_get_profiles(int encoder);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_video_encoder_get_levels", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_video_encoder_get_levels(int encoder);\r
+        [DllImport("hb.dll", EntryPoint = "hb_video_encoder_get_levels", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_video_encoder_get_levels(int encoder);\r
 \r
 \r
-               [DllImport("hb.dll", EntryPoint = "lang_get_next", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr lang_get_next(IntPtr last);\r
+        [DllImport("hb.dll", EntryPoint = "lang_get_next", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr lang_get_next(IntPtr last);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "lang_for_code2", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr lang_for_code2([In] [MarshalAs(UnmanagedType.LPStr)] string code2);\r
+        [DllImport("hb.dll", EntryPoint = "lang_for_code2", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr lang_for_code2([In] [MarshalAs(UnmanagedType.LPStr)] string code2);\r
 \r
 \r
-               ///hb_title_set_t  * hb_get_title_set( hb_handle_t * );\r
-               [DllImport("hb.dll", EntryPoint = "hb_get_title_set", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_get_title_set(IntPtr hbHandle);\r
+        ///hb_title_set_t  * hb_get_title_set( hb_handle_t * );\r
+        [DllImport("hb.dll", EntryPoint = "hb_get_title_set", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_get_title_set(IntPtr hbHandle);\r
 \r
-               ///hb_job_t * hb_job_init_by_index( hb_handle_t *h, int title_index );\r
-               [DllImport("hb.dll", EntryPoint = "hb_job_init_by_index", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_job_init_by_index(IntPtr hbHandle, int title_index);\r
+        ///hb_job_t * hb_job_init_by_index( hb_handle_t *h, int title_index );\r
+        [DllImport("hb.dll", EntryPoint = "hb_job_init_by_index", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_job_init_by_index(IntPtr hbHandle, int title_index);\r
 \r
-               ///void hb_job_close( hb_job_t ** job );\r
-               [DllImport("hb.dll", EntryPoint = "hb_job_close", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_job_close(IntPtr job);\r
+        ///void hb_job_close( hb_job_t ** job );\r
+        [DllImport("hb.dll", EntryPoint = "hb_job_close", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_job_close(IntPtr job);\r
 \r
-               ///void hb_chapter_set_title(hb_chapter_t *chapter, const char *title);\r
-               [DllImport("hb.dll", EntryPoint = "hb_chapter_set_title", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_chapter_set_title(IntPtr chapter, [In] [MarshalAs(UnmanagedType.LPStr)] string title);\r
+        ///void hb_chapter_set_title(hb_chapter_t *chapter, const char *title);\r
+        [DllImport("hb.dll", EntryPoint = "hb_chapter_set_title", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_chapter_set_title(IntPtr chapter, [In] [MarshalAs(UnmanagedType.LPStr)] string title);\r
 \r
-               ///void hb_chapter_set_title(hb_chapter_t *chapter, const char *title);\r
-               [DllImport("hb.dll", EntryPoint = "hb_chapter_set_title", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern void hb_chapter_set_title__ptr(IntPtr chapter, IntPtr title);\r
+        ///void hb_chapter_set_title(hb_chapter_t *chapter, const char *title);\r
+        [DllImport("hb.dll", EntryPoint = "hb_chapter_set_title", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern void hb_chapter_set_title__ptr(IntPtr chapter, IntPtr title);\r
 \r
-               /// hb_filter_object_t * hb_filter_init( int filter_id );\r
-               [DllImport("hb.dll", EntryPoint = "hb_filter_init", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_filter_init(int filter_id);\r
+        /// hb_filter_object_t * hb_filter_init( int filter_id );\r
+        [DllImport("hb.dll", EntryPoint = "hb_filter_init", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_filter_init(int filter_id);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_generate_filter_settings", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_generate_filter_settings(\r
-                       int filter_id,\r
-                       [In] [MarshalAs(UnmanagedType.LPStr)] string preset,\r
-                       [In] [MarshalAs(UnmanagedType.LPStr)] string tune);\r
+        [DllImport("hb.dll", EntryPoint = "hb_generate_filter_settings", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_generate_filter_settings(\r
+            int filter_id,\r
+            [In] [MarshalAs(UnmanagedType.LPStr)] string preset,\r
+            [In] [MarshalAs(UnmanagedType.LPStr)] string tune);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_x264_encopt_name", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_x264_encopt_name(IntPtr name);\r
+        [DllImport("hb.dll", EntryPoint = "hb_x264_encopt_name", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_x264_encopt_name(IntPtr name);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_check_h264_level", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_check_h264_level([In] [MarshalAs(UnmanagedType.LPStr)] string level, int width, int height, int fps_num, int fps_den, int interlaced, int fake_interlaced);\r
+        [DllImport("hb.dll", EntryPoint = "hb_check_h264_level", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_check_h264_level([In] [MarshalAs(UnmanagedType.LPStr)] string level, int width, int height, int fps_num, int fps_den, int interlaced, int fake_interlaced);\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_x264_param_unparse", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern IntPtr hb_x264_param_unparse(\r
-                       [In] [MarshalAs(UnmanagedType.LPStr)] string x264_preset,\r
-                       [In] [MarshalAs(UnmanagedType.LPStr)] string x264_tune,\r
-                       [In] [MarshalAs(UnmanagedType.LPStr)] string x264_encopts,\r
-                       [In] [MarshalAs(UnmanagedType.LPStr)] string x264_profile,\r
-                       [In] [MarshalAs(UnmanagedType.LPStr)] string h264_level,\r
-                       int width,\r
-                       int height);\r
+        [DllImport("hb.dll", EntryPoint = "hb_x264_param_unparse", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern IntPtr hb_x264_param_unparse(\r
+            [In] [MarshalAs(UnmanagedType.LPStr)] string x264_preset,\r
+            [In] [MarshalAs(UnmanagedType.LPStr)] string x264_tune,\r
+            [In] [MarshalAs(UnmanagedType.LPStr)] string x264_encopts,\r
+            [In] [MarshalAs(UnmanagedType.LPStr)] string x264_profile,\r
+            [In] [MarshalAs(UnmanagedType.LPStr)] string h264_level,\r
+            int width,\r
+            int height);\r
 \r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_get_opencl_env", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_get_opencl_env();\r
+        [DllImport("hb.dll", EntryPoint = "hb_get_opencl_env", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_get_opencl_env();\r
 \r
-               [DllImport("hb.dll", EntryPoint = "hb_qsv_available", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_qsv_available();\r
-               \r
-               [DllImport("hb.dll", EntryPoint = "hb_qsv_info_init", CallingConvention = CallingConvention.Cdecl)]\r
-               public static extern int hb_qsv_info_init();\r
+        [DllImport("hb.dll", EntryPoint = "hb_qsv_available", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_qsv_available();\r
+        \r
+        [DllImport("hb.dll", EntryPoint = "hb_qsv_info_init", CallingConvention = CallingConvention.Cdecl)]\r
+        public static extern int hb_qsv_info_init();\r
 \r
         // hb_image_t* hb_get_preview2(hb_handle_t* h, int title_idx, int picture, hb_geometry_settings_t* geo, int deinterlace);\r
         [DllImport("hb.dll", EntryPoint = "hb_get_preview2", CallingConvention = CallingConvention.Cdecl)]\r
@@ -438,5 +438,5 @@ namespace HandBrake.ApplicationServices.Interop.HbLib
         // char* hb_get_preview_params_json(int title_idx, int preview_idx, int deinterlace, hb_geometry_settings_t *settings)\r
         [DllImport("hb.dll", EntryPoint = "hb_get_preview_params_json", CallingConvention = CallingConvention.Cdecl)]\r
         public static extern IntPtr hb_get_preview_params_json(int title_idx, int preview_idx, int deinterlace, ref hb_geometry_settings_s settings);\r
-       }\r
+    }\r
 }\r
index e4500c86453dd7d536b0c6e05ff1b2b2486fb114..6e4b3038a36543f91a9b40df679a9c374afeb0bc 100644 (file)
 \r
 namespace HandBrake.ApplicationServices.Interop.HbLib\r
 {\r
-       public class NativeConstants\r
-       {\r
-               // Audio encoders\r
-               public const uint HB_ACODEC_MASK = 0x00FFFF00;\r
-               public const uint HB_ACODEC_LAME = 0x00000200;\r
-               public const uint HB_ACODEC_VORBIS = 0x00000400;\r
-               public const uint HB_ACODEC_AC3 = 0x00000800;\r
-               public const uint HB_ACODEC_LPCM = 0x00001000;\r
-               public const uint HB_ACODEC_DCA = 0x00002000;\r
-               public const uint HB_ACODEC_CA_AAC = 0x00004000;\r
-               public const uint HB_ACODEC_CA_HAAC = 0x00008000;\r
-               public const uint HB_ACODEC_FFAAC = 0x00010000;\r
-               public const uint HB_ACODEC_FFMPEG = 0x00020000;\r
-               public const uint HB_ACODEC_DCA_HD = 0x00040000;\r
-               public const uint HB_ACODEC_MP3 = 0x00080000;\r
-               public const uint HB_ACODEC_FFFLAC = 0x00100000;\r
-               public const uint HB_ACODEC_FFFLAC24 = 0x00200000;\r
-               public const uint HB_ACODEC_FDK_AAC = 0x00400000;\r
-               public const uint HB_ACODEC_FDK_HAAC = 0x00800000;\r
-               public const uint HB_ACODEC_FF_MASK = 0x00FF2800;\r
-               public const uint HB_ACODEC_PASS_FLAG = 0x40000000;\r
-               public const uint HB_ACODEC_PASS_MASK = (HB_ACODEC_MP3 | HB_ACODEC_FFAAC | HB_ACODEC_DCA_HD | HB_ACODEC_AC3 | HB_ACODEC_DCA);\r
-               public const uint HB_ACODEC_AUTO_PASS = (HB_ACODEC_PASS_MASK | HB_ACODEC_PASS_FLAG);\r
-               public const uint HB_ACODEC_MP3_PASS = (HB_ACODEC_MP3 | HB_ACODEC_PASS_FLAG);\r
-               public const uint HB_ACODEC_AAC_PASS = (HB_ACODEC_FFAAC | HB_ACODEC_PASS_FLAG);\r
-               public const uint HB_ACODEC_AC3_PASS = (HB_ACODEC_AC3 | HB_ACODEC_PASS_FLAG);\r
-               public const uint HB_ACODEC_DCA_PASS = (HB_ACODEC_DCA | HB_ACODEC_PASS_FLAG);\r
-               public const uint HB_ACODEC_DCA_HD_PASS = (HB_ACODEC_DCA_HD | HB_ACODEC_PASS_FLAG);\r
-               public const uint HB_ACODEC_ANY = (HB_ACODEC_MASK | HB_ACODEC_PASS_FLAG);\r
+    public class NativeConstants\r
+    {\r
+        // Audio encoders\r
+        public const uint HB_ACODEC_MASK = 0x00FFFF00;\r
+        public const uint HB_ACODEC_LAME = 0x00000200;\r
+        public const uint HB_ACODEC_VORBIS = 0x00000400;\r
+        public const uint HB_ACODEC_AC3 = 0x00000800;\r
+        public const uint HB_ACODEC_LPCM = 0x00001000;\r
+        public const uint HB_ACODEC_DCA = 0x00002000;\r
+        public const uint HB_ACODEC_CA_AAC = 0x00004000;\r
+        public const uint HB_ACODEC_CA_HAAC = 0x00008000;\r
+        public const uint HB_ACODEC_FFAAC = 0x00010000;\r
+        public const uint HB_ACODEC_FFMPEG = 0x00020000;\r
+        public const uint HB_ACODEC_DCA_HD = 0x00040000;\r
+        public const uint HB_ACODEC_MP3 = 0x00080000;\r
+        public const uint HB_ACODEC_FFFLAC = 0x00100000;\r
+        public const uint HB_ACODEC_FFFLAC24 = 0x00200000;\r
+        public const uint HB_ACODEC_FDK_AAC = 0x00400000;\r
+        public const uint HB_ACODEC_FDK_HAAC = 0x00800000;\r
+        public const uint HB_ACODEC_FF_MASK = 0x00FF2800;\r
+        public const uint HB_ACODEC_PASS_FLAG = 0x40000000;\r
+        public const uint HB_ACODEC_PASS_MASK = (HB_ACODEC_MP3 | HB_ACODEC_FFAAC | HB_ACODEC_DCA_HD | HB_ACODEC_AC3 | HB_ACODEC_DCA);\r
+        public const uint HB_ACODEC_AUTO_PASS = (HB_ACODEC_PASS_MASK | HB_ACODEC_PASS_FLAG);\r
+        public const uint HB_ACODEC_MP3_PASS = (HB_ACODEC_MP3 | HB_ACODEC_PASS_FLAG);\r
+        public const uint HB_ACODEC_AAC_PASS = (HB_ACODEC_FFAAC | HB_ACODEC_PASS_FLAG);\r
+        public const uint HB_ACODEC_AC3_PASS = (HB_ACODEC_AC3 | HB_ACODEC_PASS_FLAG);\r
+        public const uint HB_ACODEC_DCA_PASS = (HB_ACODEC_DCA | HB_ACODEC_PASS_FLAG);\r
+        public const uint HB_ACODEC_DCA_HD_PASS = (HB_ACODEC_DCA_HD | HB_ACODEC_PASS_FLAG);\r
+        public const uint HB_ACODEC_ANY = (HB_ACODEC_MASK | HB_ACODEC_PASS_FLAG);\r
 \r
-               // Encode state\r
-               public const int HB_STATE_IDLE = 1;\r
-               public const int HB_STATE_SCANNING = 2;\r
-               public const int HB_STATE_SCANDONE = 4;\r
-               public const int HB_STATE_WORKING = 8;\r
-               public const int HB_STATE_PAUSED = 16;\r
-               public const int HB_STATE_WORKDONE = 32;\r
-               public const int HB_STATE_MUXING = 64;\r
-       }\r
+        // Encode state\r
+        public const int HB_STATE_IDLE = 1;\r
+        public const int HB_STATE_SCANNING = 2;\r
+        public const int HB_STATE_SCANDONE = 4;\r
+        public const int HB_STATE_WORKING = 8;\r
+        public const int HB_STATE_PAUSED = 16;\r
+        public const int HB_STATE_WORKDONE = 32;\r
+        public const int HB_STATE_MUXING = 64;\r
+    }\r
 }\r
index b332f25eb3b863c12cc0db7f4c5f6ebf3e623375..b9a8f3255664af87d583cf8bdab175a9e227b481 100644 (file)
@@ -7,23 +7,23 @@
 \r
 namespace HandBrake.ApplicationServices.Interop.HbLib\r
 {\r
-       using System.Runtime.InteropServices;\r
+    using System.Runtime.InteropServices;\r
 \r
-       [StructLayout(LayoutKind.Sequential)]\r
+    [StructLayout(LayoutKind.Sequential)]\r
     public struct hb_container_s\r
-       {\r
-               [MarshalAs(UnmanagedType.LPStr)]\r
-               public string name;\r
+    {\r
+        [MarshalAs(UnmanagedType.LPStr)]\r
+        public string name;\r
 \r
-               [MarshalAs(UnmanagedType.LPStr)]\r
-               public string short_name;\r
+        [MarshalAs(UnmanagedType.LPStr)]\r
+        public string short_name;\r
 \r
-               [MarshalAs(UnmanagedType.LPStr)]\r
-               public string long_name;\r
+        [MarshalAs(UnmanagedType.LPStr)]\r
+        public string long_name;\r
 \r
-               [MarshalAs(UnmanagedType.LPStr)]\r
-               public string default_extension;\r
+        [MarshalAs(UnmanagedType.LPStr)]\r
+        public string default_extension;\r
 \r
-               public int format;\r
-       }\r
+        public int format;\r
+    }\r
 }\r
index a4ac0f8e9ea0c33034f1342f4e5391d02342b686..9491cb16074ae86417f99339bdd61fc04d84487f 100644 (file)
@@ -7,22 +7,22 @@
 \r
 namespace HandBrake.ApplicationServices.Interop.HbLib\r
 {\r
-       using System.Runtime.InteropServices;\r
+    using System.Runtime.InteropServices;\r
 \r
-       [StructLayout(LayoutKind.Sequential)]\r
+    [StructLayout(LayoutKind.Sequential)]\r
     public struct hb_encoder_s\r
-       {\r
-               [MarshalAs(UnmanagedType.LPStr)]\r
-               public string name;\r
+    {\r
+        [MarshalAs(UnmanagedType.LPStr)]\r
+        public string name;\r
 \r
-               [MarshalAs(UnmanagedType.LPStr)]\r
-               public string short_name;\r
+        [MarshalAs(UnmanagedType.LPStr)]\r
+        public string short_name;\r
 \r
-               [MarshalAs(UnmanagedType.LPStr)]\r
-               public string long_name;\r
+        [MarshalAs(UnmanagedType.LPStr)]\r
+        public string long_name;\r
 \r
-               public int codec;\r
+        public int codec;\r
 \r
-               public int muxers;\r
-       }\r
+        public int muxers;\r
+    }\r
 }\r
index ac8a9159234bcd88a292e7c4a37c99236a32fcf7..e9f2b3524837ef90a1af9930213cb7e2aebe1774 100644 (file)
@@ -13,11 +13,11 @@ namespace HandBrake.ApplicationServices.Interop.HbLib
     /// The hb_error_code.\r
     /// </summary>\r
     internal enum hb_error_code\r
-       {\r
-               HB_ERROR_NONE = 0,\r
-               HB_ERROR_CANCELED,\r
-               HB_ERROR_WRONG_INPUT,\r
-               HB_ERROR_INIT,\r
-               HB_ERROR_UNKNOWN\r
-       }\r
+    {\r
+        HB_ERROR_NONE = 0,\r
+        HB_ERROR_CANCELED,\r
+        HB_ERROR_WRONG_INPUT,\r
+        HB_ERROR_INIT,\r
+        HB_ERROR_UNKNOWN\r
+    }\r
 }\r
index 67803b5b26c5871938cf881190df81a270bb5322..4ae61ad65483bcf56f7826d5f18aeaf07ea971b7 100644 (file)
@@ -8,23 +8,23 @@
 namespace HandBrake.ApplicationServices.Interop.HbLib\r
 {\r
     internal enum hb_filter_ids\r
-       {\r
-               HB_FILTER_QSV_PRE = 1, // for QSV - important to have before other filters \r
-               // First, filters that may change the framerate (drop or dup frames)\r
-               HB_FILTER_DETELECINE,\r
-               HB_FILTER_DECOMB,\r
-               HB_FILTER_DEINTERLACE,\r
-               HB_FILTER_VFR,\r
-               // Filters that must operate on the original source image are next\r
-               HB_FILTER_DEBLOCK,\r
-               HB_FILTER_HQDN3D,\r
-               HB_FILTER_NLMEANS,\r
-               HB_FILTER_RENDER_SUB,\r
-               HB_FILTER_CROP_SCALE,\r
-               // Finally filters that don't care what order they are in,\r
-               // except that they must be after the above filters\r
-               HB_FILTER_ROTATE,\r
-               HB_FILTER_QSV_POST, // for QSV - important to have as a last one \r
-               HB_FILTER_QSV,  // default MSDK VPP filter \r
-       }\r
+    {\r
+        HB_FILTER_QSV_PRE = 1, // for QSV - important to have before other filters \r
+        // First, filters that may change the framerate (drop or dup frames)\r
+        HB_FILTER_DETELECINE,\r
+        HB_FILTER_DECOMB,\r
+        HB_FILTER_DEINTERLACE,\r
+        HB_FILTER_VFR,\r
+        // Filters that must operate on the original source image are next\r
+        HB_FILTER_DEBLOCK,\r
+        HB_FILTER_HQDN3D,\r
+        HB_FILTER_NLMEANS,\r
+        HB_FILTER_RENDER_SUB,\r
+        HB_FILTER_CROP_SCALE,\r
+        // Finally filters that don't care what order they are in,\r
+        // except that they must be after the above filters\r
+        HB_FILTER_ROTATE,\r
+        HB_FILTER_QSV_POST, // for QSV - important to have as a last one \r
+        HB_FILTER_QSV,  // default MSDK VPP filter \r
+    }\r
 }\r
index 3d6654daf87d24968f53ddcfecf08ee387a494ca..768ec31892362a429706c759cb63dfec84781e7d 100644 (file)
@@ -7,19 +7,19 @@
 \r
 namespace HandBrake.ApplicationServices.Interop.HbLib\r
 {\r
-       using System.Runtime.InteropServices;\r
+    using System.Runtime.InteropServices;\r
 \r
-       [StructLayout(LayoutKind.Sequential)]\r
-       public struct hb_mixdown_s\r
-       {\r
-               [MarshalAs(UnmanagedType.LPStr)]\r
-               public string name;\r
+    [StructLayout(LayoutKind.Sequential)]\r
+    public struct hb_mixdown_s\r
+    {\r
+        [MarshalAs(UnmanagedType.LPStr)]\r
+        public string name;\r
 \r
-               /// char*\r
-               [MarshalAs(UnmanagedType.LPStr)]\r
-               public string short_name;\r
+        /// char*\r
+        [MarshalAs(UnmanagedType.LPStr)]\r
+        public string short_name;\r
 \r
-               /// int\r
-               public int amixdown;\r
-       }\r
+        /// int\r
+        public int amixdown;\r
+    }\r
 }\r
index 9c365eac972cc8604680b413aa11ef8e7918d7fd..bebeccb7f28ba63a87dbe7e4aa5fc03bc2b15a3a 100644 (file)
@@ -7,16 +7,16 @@
 \r
 namespace HandBrake.ApplicationServices.Interop.HbLib\r
 {\r
-       using System.Runtime.InteropServices;\r
+    using System.Runtime.InteropServices;\r
 \r
-       [StructLayout(LayoutKind.Sequential)]\r
-       public struct hb_rate_s\r
-       {\r
-               /// char*\r
-               [MarshalAs(UnmanagedType.LPStr)]\r
-               public string name;\r
+    [StructLayout(LayoutKind.Sequential)]\r
+    public struct hb_rate_s\r
+    {\r
+        /// char*\r
+        [MarshalAs(UnmanagedType.LPStr)]\r
+        public string name;\r
 \r
-               /// int\r
-               public int rate;\r
-       }\r
+        /// int\r
+        public int rate;\r
+    }\r
 }\r
index ac2a7e80b17de03547397b873d33e382c0aabb59..4d0351814d19cd5b9cdfde1bf19ca06925b89a9b 100644 (file)
@@ -7,22 +7,22 @@
 \r
 namespace HandBrake.ApplicationServices.Interop.HbLib\r
 {\r
-       public enum hb_subtitle_s_subsource\r
-       {\r
-               VOBSUB,\r
+    public enum hb_subtitle_s_subsource\r
+    {\r
+        VOBSUB,\r
 \r
-               SRTSUB,\r
+        SRTSUB,\r
 \r
-               CC608SUB,\r
+        CC608SUB,\r
 \r
-               CC708SUB,\r
+        CC708SUB,\r
 \r
-               UTF8SUB,\r
+        UTF8SUB,\r
 \r
-               TX3GSUB,\r
+        TX3GSUB,\r
 \r
-               SSASUB,\r
+        SSASUB,\r
 \r
-               PGSSUB\r
-       }\r
+        PGSSUB\r
+    }\r
 }\r
index e99b79c9ac21b3998fa8360bca72e0dca80d810c..1a4780ab22405420d87446e1e013766b20fde186 100644 (file)
@@ -7,23 +7,23 @@
 \r
 namespace HandBrake.ApplicationServices.Interop.HbLib\r
 {\r
-       using System;\r
-       using System.Runtime.InteropServices;\r
+    using System;\r
+    using System.Runtime.InteropServices;\r
 \r
-       [StructLayout(LayoutKind.Sequential)]\r
-       public struct iso639_lang_t\r
-       {\r
-               public IntPtr eng_name;\r
+    [StructLayout(LayoutKind.Sequential)]\r
+    public struct iso639_lang_t\r
+    {\r
+        public IntPtr eng_name;\r
 \r
-               public IntPtr native_name;\r
+        public IntPtr native_name;\r
 \r
-               [MarshalAs(UnmanagedType.LPStr)]\r
-               public string iso639_1;\r
+        [MarshalAs(UnmanagedType.LPStr)]\r
+        public string iso639_1;\r
 \r
-               [MarshalAs(UnmanagedType.LPStr)]\r
-               public string iso639_2;\r
+        [MarshalAs(UnmanagedType.LPStr)]\r
+        public string iso639_2;\r
 \r
-               [MarshalAs(UnmanagedType.LPStr)]\r
-               public string iso639_2b;\r
-       }\r
+        [MarshalAs(UnmanagedType.LPStr)]\r
+        public string iso639_2b;\r
+    }\r
 }\r
index ad8f3576286892770d81325bf783957d4588a64f..2b62de4d85becaba9ee4bb64712135501a6acf74 100644 (file)
@@ -18,266 +18,266 @@ namespace HandBrake.ApplicationServices.Interop.Helpers
     using HandBrake.ApplicationServices.Interop.HbLib;\r
 \r
     /// <summary>\r
-       /// Helper utilities for native interop.\r
-       /// </summary>\r
-       internal static class InteropUtilities\r
-       {\r
-               /// <summary>\r
-               /// Reads the given native structure pointer.\r
-               /// </summary>\r
-               /// <typeparam name="T">The type to convert the structure to.</typeparam>\r
-               /// <param name="structPtr">The pointer to the native structure.</param>\r
-               /// <returns>The converted structure.</returns>\r
-               public static T ToStructureFromPtr<T>(IntPtr structPtr)\r
-               {\r
-                       return (T)Marshal.PtrToStructure(structPtr, typeof(T));\r
-               }\r
-\r
-               /// <summary>\r
-               /// Reads the given native UTF-8 string.\r
-               /// </summary>\r
-               /// <param name="stringPtr">The pointer to the string.</param>\r
-               /// <returns>The resulting string.</returns>\r
-               public static string ToStringFromUtf8Ptr(IntPtr stringPtr)\r
-               {\r
-                       var data = new List<byte>();\r
-                       var ptr = stringPtr;\r
-                       var offset = 0;\r
-                       while (true)\r
-                       {\r
-                               byte ch = Marshal.ReadByte(ptr, offset++);\r
-                               if (ch == 0)\r
-                               {\r
-                                       break;\r
-                               }\r
-\r
-                               data.Add(ch);\r
-                       }\r
-\r
-                       return Encoding.UTF8.GetString(data.ToArray());\r
-               }\r
-\r
-               /// <summary>\r
-               /// Creates a pointer to a UTF-8 null-terminated string.\r
-               /// </summary>\r
-               /// <param name="str">\r
-               /// The string to encode.\r
-               /// </param>\r
-               /// <returns>\r
-               /// The <see cref="IntPtr"/>.\r
-               /// </returns>\r
-               public static IntPtr ToUtf8PtrFromString(string str)\r
-               {\r
-                       byte[] bytes = Encoding.UTF8.GetBytes(str);\r
-                       IntPtr stringPtr = Marshal.AllocHGlobal(bytes.Length + 1);\r
-                       var offset = 0;\r
-                       foreach (byte b in bytes)\r
-                       {\r
-                               Marshal.WriteByte(stringPtr, offset, b);\r
-                               offset++;\r
-                       }\r
-\r
-                       Marshal.WriteByte(stringPtr, offset, 0);\r
-                       return stringPtr;\r
-               }\r
-\r
-               /// <summary>\r
-               /// Converts the given native HandBrake list to a managed list.\r
-               /// </summary>\r
-               /// <typeparam name="T">The type of structure in the list.</typeparam>\r
-               /// <param name="listPtr">The pointer to the native list.</param>\r
-               /// <returns>The converted managed list.</returns>\r
-               public static List<T> ToListFromHandBrakeList<T>(this IntPtr listPtr)\r
-               {\r
-                       List<T> returnList = new List<T>();\r
-                       NativeList nativeList = new NativeList(listPtr);\r
-\r
-                       for (int i = 0; i < nativeList.Count; i++)\r
-                       {\r
-                               IntPtr itemPtr = nativeList[i];\r
-                               returnList.Add(ToStructureFromPtr<T>(itemPtr));\r
-                       }\r
-\r
-                       return returnList;\r
-               }\r
-\r
-               /// <summary>\r
-               /// Converts the HB list to a managed list of pointers.\r
-               /// </summary>\r
-               /// <param name="listPtr">The list to convert.</param>\r
-               /// <returns>The managed list of pointers.</returns>\r
-               public static List<IntPtr> ToIntPtrList(this IntPtr listPtr)\r
-               {\r
-                       var returnList = new List<IntPtr>();\r
-                       NativeList nativeList = new NativeList(listPtr);\r
-\r
-                       for (int i = 0; i < nativeList.Count; i++)\r
-                       {\r
-                               IntPtr itemPtr = nativeList[i];\r
-                               returnList.Add(itemPtr);\r
-                       }\r
-\r
-                       return returnList;\r
-               }\r
-\r
-               /// <summary>\r
-               /// Converts the given native array to a managed collection.\r
-               /// </summary>\r
-               /// <typeparam name="T">The type of item in the list.</typeparam>\r
-               /// <param name="arrayPtr">The pointer to the array.</param>\r
-               /// <param name="count">The number of items in the array.</param>\r
-               /// <returns>The converted collection.</returns>\r
-               public static List<T> ToListFromNativeArray<T>(IntPtr arrayPtr, int count)\r
-               {\r
-                       IntPtr currentItem = arrayPtr;\r
-\r
-                       var result = new List<T>();\r
-                       for (int i = 0; i < count; i++)\r
-                       {\r
-                               T nativeEncoder = ToStructureFromPtr<T>(currentItem);\r
-                               result.Add(nativeEncoder);\r
-\r
-                               currentItem = IntPtr.Add(currentItem, Marshal.SizeOf(typeof(T)));\r
-                       }\r
-\r
-                       return result;\r
-               }\r
-\r
-               /// <summary>\r
-               /// Takes an array pointer and converts it into a list of strings.\r
-               /// </summary>\r
-               /// <param name="arrayPtr">A pointer to a raw list of strings.</param>\r
-               /// <returns>The list of strings.</returns>\r
-           public static List<string> ToStringListFromArrayPtr(IntPtr arrayPtr)\r
-               {\r
-                       if (arrayPtr == IntPtr.Zero)\r
-                       {\r
-                               return null;\r
-                       }\r
-\r
-                       return ToPtrListFromPtr(arrayPtr).Select(ptr => Marshal.PtrToStringAnsi(ptr)).ToList();\r
-               }\r
-\r
-           /// <summary>\r
-               /// Finds all the pointers starting at the given location and puts them in a list. Stops when it finds zero for a pointer.\r
-               /// </summary>\r
-               /// <param name="arrayPtr">The address of the list of pointers.</param>\r
-               /// <returns>The list of pointers.</returns>\r
-           public static List<IntPtr> ToPtrListFromPtr(IntPtr arrayPtr)\r
-           {\r
-                   var result = new List<IntPtr>();\r
-                   int ptrSize = Marshal.SizeOf(typeof(IntPtr));\r
-                   IntPtr currentPtr = Marshal.ReadIntPtr(arrayPtr);\r
-                       for (int i = 0; currentPtr != IntPtr.Zero; i++)\r
-                       {\r
-                               result.Add(currentPtr);\r
-                           currentPtr = Marshal.ReadIntPtr(arrayPtr, (i + 1) * ptrSize);\r
-                   }\r
-\r
-                   return result;\r
-           }\r
-\r
-               /// <summary>\r
-               /// Creates a native HandBrake list from the given managed list of pointers.\r
-               /// </summary>\r
-               /// <param name="list">The managed list to convert.</param>\r
-               /// <returns>The converted native list.</returns>\r
-               public static NativeList ToHandBrakeListFromPtrList(List<IntPtr> list)\r
-               {\r
-                       NativeList returnList = NativeList.CreateList();\r
-\r
-                       foreach (IntPtr ptr in list)\r
-                       {\r
-                               returnList.Add(ptr);\r
-                       }\r
-\r
-                       return returnList;\r
-               }\r
-\r
-               /// <summary>\r
-               /// Creates a native HandBrake list from the given managed list of structures.\r
-               /// </summary>\r
-               /// <typeparam name="T">The type of structures in the list.</typeparam>\r
-               /// <param name="list">The managed list to convert.</param>\r
-               /// <returns>The converted native list.</returns>\r
-               public static NativeList ToHandBrakeListFromList<T>(List<T> list)\r
-               {\r
-                       NativeList returnList = NativeList.CreateList();\r
-                       foreach (T item in list)\r
-                       {\r
-                               IntPtr itemPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(T)));\r
-                               returnList.AllocatedMemory.Add(itemPtr);\r
-                               Marshal.StructureToPtr(item, itemPtr, false);\r
-\r
-                               returnList.Add(itemPtr);\r
-                       }\r
-\r
-                       return returnList;\r
-               }\r
-\r
-               /// <summary>\r
-               /// Reads in a list of objects given an interator and a conversion function.\r
-               /// </summary>\r
-               /// <typeparam name="T1">The type of the struct given by the iterator.</typeparam>\r
-               /// <typeparam name="T2">The object type to convert to.</typeparam>\r
-               /// <param name="iterator">The iterator to use to build the list.</param>\r
-               /// <param name="converter">The converter to convert from the struct to the object.</param>\r
-               /// <returns>The list of objects.</returns>\r
-               public static List<T2> ToListFromIterator<T1, T2>(Func<IntPtr, IntPtr> iterator, Func<T1, T2> converter)\r
-               {\r
-                       return ToListFromIterator<T1>(iterator).Select(converter).ToList();\r
-               \r
-\r
-               /// <summary>\r
-               /// Reads in a list of structs given an iterator.\r
-               /// </summary>\r
-               /// <typeparam name="T">The type of the struct.</typeparam>\r
-               /// <param name="iterator">The iterator to use to build the list.</param>\r
-               /// <returns>The list of structs.</returns>\r
-               public static List<T> ToListFromIterator<T>(Func<IntPtr, IntPtr> iterator)\r
-               {\r
-                       var structureList = new List<T>();\r
-                       IntPtr current = IntPtr.Zero;\r
-\r
-                       current = iterator(current);\r
-                       while (current != IntPtr.Zero)\r
-                       {\r
-                               T encoder = ToStructureFromPtr<T>(current);\r
-                               structureList.Add(encoder);\r
-\r
-                               current = iterator(current);\r
-                       }\r
-\r
-                       return structureList;\r
-               }\r
-\r
-               /// <summary>\r
-               /// Closes the given job.\r
-               /// </summary>\r
-               /// <param name="nativeJobPtr">The pointer to the job.</param>\r
-               public static void CloseJob(IntPtr nativeJobPtr)\r
-               {\r
-                       // Create a point to the job pointer first.\r
-                       IntPtr nativeJobPtrPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IntPtr)));\r
-\r
-                       // Assign the new pointer to the job pointer and tell HB to clean the job up.\r
-                       Marshal.WriteIntPtr(nativeJobPtrPtr, nativeJobPtr);\r
-                       HBFunctions.hb_job_close(nativeJobPtrPtr);\r
-\r
-                       // Free the pointer we used.\r
-                       Marshal.FreeHGlobal(nativeJobPtrPtr);\r
-               }\r
-\r
-               /// <summary>\r
-               /// Frees all the memory locations in the given list.\r
-               /// </summary>\r
-               /// <param name="memoryList">The list of memory locations to free.</param>\r
-               public static void FreeMemory(List<IntPtr> memoryList)\r
-               {\r
-                       foreach (IntPtr memoryLocation in memoryList)\r
-                       {\r
-                               Marshal.FreeHGlobal(memoryLocation);\r
-                       }\r
-               }\r
-       }\r
+    /// Helper utilities for native interop.\r
+    /// </summary>\r
+    internal static class InteropUtilities\r
+    {\r
+        /// <summary>\r
+        /// Reads the given native structure pointer.\r
+        /// </summary>\r
+        /// <typeparam name="T">The type to convert the structure to.</typeparam>\r
+        /// <param name="structPtr">The pointer to the native structure.</param>\r
+        /// <returns>The converted structure.</returns>\r
+        public static T ToStructureFromPtr<T>(IntPtr structPtr)\r
+        {\r
+            return (T)Marshal.PtrToStructure(structPtr, typeof(T));\r
+        }\r
+\r
+        /// <summary>\r
+        /// Reads the given native UTF-8 string.\r
+        /// </summary>\r
+        /// <param name="stringPtr">The pointer to the string.</param>\r
+        /// <returns>The resulting string.</returns>\r
+        public static string ToStringFromUtf8Ptr(IntPtr stringPtr)\r
+        {\r
+            var data = new List<byte>();\r
+            var ptr = stringPtr;\r
+            var offset = 0;\r
+            while (true)\r
+            {\r
+                byte ch = Marshal.ReadByte(ptr, offset++);\r
+                if (ch == 0)\r
+                {\r
+                    break;\r
+                }\r
+\r
+                data.Add(ch);\r
+            }\r
+\r
+            return Encoding.UTF8.GetString(data.ToArray());\r
+        }\r
+\r
+        /// <summary>\r
+        /// Creates a pointer to a UTF-8 null-terminated string.\r
+        /// </summary>\r
+        /// <param name="str">\r
+        /// The string to encode.\r
+        /// </param>\r
+        /// <returns>\r
+        /// The <see cref="IntPtr"/>.\r
+        /// </returns>\r
+        public static IntPtr ToUtf8PtrFromString(string str)\r
+        {\r
+            byte[] bytes = Encoding.UTF8.GetBytes(str);\r
+            IntPtr stringPtr = Marshal.AllocHGlobal(bytes.Length + 1);\r
+            var offset = 0;\r
+            foreach (byte b in bytes)\r
+            {\r
+                Marshal.WriteByte(stringPtr, offset, b);\r
+                offset++;\r
+            }\r
+\r
+            Marshal.WriteByte(stringPtr, offset, 0);\r
+            return stringPtr;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Converts the given native HandBrake list to a managed list.\r
+        /// </summary>\r
+        /// <typeparam name="T">The type of structure in the list.</typeparam>\r
+        /// <param name="listPtr">The pointer to the native list.</param>\r
+        /// <returns>The converted managed list.</returns>\r
+        public static List<T> ToListFromHandBrakeList<T>(this IntPtr listPtr)\r
+        {\r
+            List<T> returnList = new List<T>();\r
+            NativeList nativeList = new NativeList(listPtr);\r
+\r
+            for (int i = 0; i < nativeList.Count; i++)\r
+            {\r
+                IntPtr itemPtr = nativeList[i];\r
+                returnList.Add(ToStructureFromPtr<T>(itemPtr));\r
+            }\r
+\r
+            return returnList;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Converts the HB list to a managed list of pointers.\r
+        /// </summary>\r
+        /// <param name="listPtr">The list to convert.</param>\r
+        /// <returns>The managed list of pointers.</returns>\r
+        public static List<IntPtr> ToIntPtrList(this IntPtr listPtr)\r
+        {\r
+            var returnList = new List<IntPtr>();\r
+            NativeList nativeList = new NativeList(listPtr);\r
+\r
+            for (int i = 0; i < nativeList.Count; i++)\r
+            {\r
+                IntPtr itemPtr = nativeList[i];\r
+                returnList.Add(itemPtr);\r
+            }\r
+\r
+            return returnList;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Converts the given native array to a managed collection.\r
+        /// </summary>\r
+        /// <typeparam name="T">The type of item in the list.</typeparam>\r
+        /// <param name="arrayPtr">The pointer to the array.</param>\r
+        /// <param name="count">The number of items in the array.</param>\r
+        /// <returns>The converted collection.</returns>\r
+        public static List<T> ToListFromNativeArray<T>(IntPtr arrayPtr, int count)\r
+        {\r
+            IntPtr currentItem = arrayPtr;\r
+\r
+            var result = new List<T>();\r
+            for (int i = 0; i < count; i++)\r
+            {\r
+                T nativeEncoder = ToStructureFromPtr<T>(currentItem);\r
+                result.Add(nativeEncoder);\r
+\r
+                currentItem = IntPtr.Add(currentItem, Marshal.SizeOf(typeof(T)));\r
+            }\r
+\r
+            return result;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Takes an array pointer and converts it into a list of strings.\r
+        /// </summary>\r
+        /// <param name="arrayPtr">A pointer to a raw list of strings.</param>\r
+        /// <returns>The list of strings.</returns>\r
+        public static List<string> ToStringListFromArrayPtr(IntPtr arrayPtr)\r
+        {\r
+            if (arrayPtr == IntPtr.Zero)\r
+            {\r
+                return null;\r
+            }\r
+\r
+            return ToPtrListFromPtr(arrayPtr).Select(ptr => Marshal.PtrToStringAnsi(ptr)).ToList();\r
+        }\r
+\r
+        /// <summary>\r
+        /// Finds all the pointers starting at the given location and puts them in a list. Stops when it finds zero for a pointer.\r
+        /// </summary>\r
+        /// <param name="arrayPtr">The address of the list of pointers.</param>\r
+        /// <returns>The list of pointers.</returns>\r
+        public static List<IntPtr> ToPtrListFromPtr(IntPtr arrayPtr)\r
+        {\r
+            var result = new List<IntPtr>();\r
+            int ptrSize = Marshal.SizeOf(typeof(IntPtr));\r
+            IntPtr currentPtr = Marshal.ReadIntPtr(arrayPtr);\r
+            for (int i = 0; currentPtr != IntPtr.Zero; i++)\r
+            {\r
+                result.Add(currentPtr);\r
+                currentPtr = Marshal.ReadIntPtr(arrayPtr, (i + 1) * ptrSize);\r
+            }\r
+\r
+            return result;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Creates a native HandBrake list from the given managed list of pointers.\r
+        /// </summary>\r
+        /// <param name="list">The managed list to convert.</param>\r
+        /// <returns>The converted native list.</returns>\r
+        public static NativeList ToHandBrakeListFromPtrList(List<IntPtr> list)\r
+        {\r
+            NativeList returnList = NativeList.CreateList();\r
+\r
+            foreach (IntPtr ptr in list)\r
+            {\r
+                returnList.Add(ptr);\r
+            }\r
+\r
+            return returnList;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Creates a native HandBrake list from the given managed list of structures.\r
+        /// </summary>\r
+        /// <typeparam name="T">The type of structures in the list.</typeparam>\r
+        /// <param name="list">The managed list to convert.</param>\r
+        /// <returns>The converted native list.</returns>\r
+        public static NativeList ToHandBrakeListFromList<T>(List<T> list)\r
+        {\r
+            NativeList returnList = NativeList.CreateList();\r
+            foreach (T item in list)\r
+            {\r
+                IntPtr itemPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(T)));\r
+                returnList.AllocatedMemory.Add(itemPtr);\r
+                Marshal.StructureToPtr(item, itemPtr, false);\r
+\r
+                returnList.Add(itemPtr);\r
+            }\r
+\r
+            return returnList;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Reads in a list of objects given an interator and a conversion function.\r
+        /// </summary>\r
+        /// <typeparam name="T1">The type of the struct given by the iterator.</typeparam>\r
+        /// <typeparam name="T2">The object type to convert to.</typeparam>\r
+        /// <param name="iterator">The iterator to use to build the list.</param>\r
+        /// <param name="converter">The converter to convert from the struct to the object.</param>\r
+        /// <returns>The list of objects.</returns>\r
+        public static List<T2> ToListFromIterator<T1, T2>(Func<IntPtr, IntPtr> iterator, Func<T1, T2> converter)\r
+        {\r
+            return ToListFromIterator<T1>(iterator).Select(converter).ToList();\r
+        } \r
+\r
+        /// <summary>\r
+        /// Reads in a list of structs given an iterator.\r
+        /// </summary>\r
+        /// <typeparam name="T">The type of the struct.</typeparam>\r
+        /// <param name="iterator">The iterator to use to build the list.</param>\r
+        /// <returns>The list of structs.</returns>\r
+        public static List<T> ToListFromIterator<T>(Func<IntPtr, IntPtr> iterator)\r
+        {\r
+            var structureList = new List<T>();\r
+            IntPtr current = IntPtr.Zero;\r
+\r
+            current = iterator(current);\r
+            while (current != IntPtr.Zero)\r
+            {\r
+                T encoder = ToStructureFromPtr<T>(current);\r
+                structureList.Add(encoder);\r
+\r
+                current = iterator(current);\r
+            }\r
+\r
+            return structureList;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Closes the given job.\r
+        /// </summary>\r
+        /// <param name="nativeJobPtr">The pointer to the job.</param>\r
+        public static void CloseJob(IntPtr nativeJobPtr)\r
+        {\r
+            // Create a point to the job pointer first.\r
+            IntPtr nativeJobPtrPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IntPtr)));\r
+\r
+            // Assign the new pointer to the job pointer and tell HB to clean the job up.\r
+            Marshal.WriteIntPtr(nativeJobPtrPtr, nativeJobPtr);\r
+            HBFunctions.hb_job_close(nativeJobPtrPtr);\r
+\r
+            // Free the pointer we used.\r
+            Marshal.FreeHGlobal(nativeJobPtrPtr);\r
+        }\r
+\r
+        /// <summary>\r
+        /// Frees all the memory locations in the given list.\r
+        /// </summary>\r
+        /// <param name="memoryList">The list of memory locations to free.</param>\r
+        public static void FreeMemory(List<IntPtr> memoryList)\r
+        {\r
+            foreach (IntPtr memoryLocation in memoryList)\r
+            {\r
+                Marshal.FreeHGlobal(memoryLocation);\r
+            }\r
+        }\r
+    }\r
 }\r
index 0731bd3311adaf606a480c82929d463c60ac75b6..a692b6c756ca783be1fb22ac77f07483af8b67fe 100644 (file)
@@ -17,111 +17,111 @@ namespace HandBrake.ApplicationServices.Interop.Helpers
     using HandBrake.ApplicationServices.Interop.HbLib;\r
 \r
     /// <summary>\r
-       /// Represents a HandBrake style native list.\r
-       /// </summary>\r
-       internal class NativeList : IDisposable\r
-       {\r
-               /// <summary>\r
-               /// Initializes a new instance of the NativeList class.\r
-               /// </summary>\r
-               /// <param name="listPtr">The pointer to use for the list.</param>\r
-               public NativeList(IntPtr listPtr)\r
-               {\r
-                       this.Ptr = listPtr;\r
-               }\r
+    /// Represents a HandBrake style native list.\r
+    /// </summary>\r
+    internal class NativeList : IDisposable\r
+    {\r
+        /// <summary>\r
+        /// Initializes a new instance of the NativeList class.\r
+        /// </summary>\r
+        /// <param name="listPtr">The pointer to use for the list.</param>\r
+        public NativeList(IntPtr listPtr)\r
+        {\r
+            this.Ptr = listPtr;\r
+        }\r
 \r
-               /// <summary>\r
-               /// The list of native memory locations allocated for this list.\r
-               /// </summary>\r
-               private readonly List<IntPtr> allocatedMemory = new List<IntPtr>();\r
+        /// <summary>\r
+        /// The list of native memory locations allocated for this list.\r
+        /// </summary>\r
+        private readonly List<IntPtr> allocatedMemory = new List<IntPtr>();\r
 \r
-               /// <summary>\r
-               /// Gets the pointer to the native list.\r
-               /// </summary>\r
-               public IntPtr Ptr { get; private set; }\r
+        /// <summary>\r
+        /// Gets the pointer to the native list.\r
+        /// </summary>\r
+        public IntPtr Ptr { get; private set; }\r
 \r
-               /// <summary>\r
-               /// Gets the number of items in the list.\r
-               /// </summary>\r
-               public int Count\r
-               {\r
-                       get\r
+        /// <summary>\r
+        /// Gets the number of items in the list.\r
+        /// </summary>\r
+        public int Count\r
+        {\r
+            get\r
             {\r
                 Debug.WriteLine("Got a Zero Pointer in the NativeList");\r
                 return this.Ptr == IntPtr.Zero ? 0 : HBFunctions.hb_list_count(this.Ptr);\r
-                       }\r
-               }\r
+            }\r
+        }\r
 \r
-               /// <summary>\r
-               /// Gets the list of native memory locations allocated for this list.\r
-               /// </summary>\r
-               public List<IntPtr> AllocatedMemory\r
-               {\r
-                       get\r
-                       {\r
-                               return this.allocatedMemory;\r
-                       }\r
-               }\r
+        /// <summary>\r
+        /// Gets the list of native memory locations allocated for this list.\r
+        /// </summary>\r
+        public List<IntPtr> AllocatedMemory\r
+        {\r
+            get\r
+            {\r
+                return this.allocatedMemory;\r
+            }\r
+        }\r
 \r
-               /// <summary>\r
-               /// Adds an item to the end of the list.\r
-               /// </summary>\r
-               /// <param name="item">The item to add.</param>\r
-               public void Add(IntPtr item)\r
-               {\r
-                       HBFunctions.hb_list_add(this.Ptr, item);\r
-               }\r
+        /// <summary>\r
+        /// Adds an item to the end of the list.\r
+        /// </summary>\r
+        /// <param name="item">The item to add.</param>\r
+        public void Add(IntPtr item)\r
+        {\r
+            HBFunctions.hb_list_add(this.Ptr, item);\r
+        }\r
 \r
-               /// <summary>\r
-               /// Inserts an item into the list.\r
-               /// </summary>\r
-               /// <param name="position">The index to insert the item at.</param>\r
-               /// <param name="item">The item to insert.</param>\r
-               public void Insert(int position, IntPtr item)\r
-               {\r
-                       HBFunctions.hb_list_insert(this.Ptr, position, item);\r
-               }\r
+        /// <summary>\r
+        /// Inserts an item into the list.\r
+        /// </summary>\r
+        /// <param name="position">The index to insert the item at.</param>\r
+        /// <param name="item">The item to insert.</param>\r
+        public void Insert(int position, IntPtr item)\r
+        {\r
+            HBFunctions.hb_list_insert(this.Ptr, position, item);\r
+        }\r
 \r
-               /// <summary>\r
-               /// Removes an item from the list.\r
-               /// </summary>\r
-               /// <param name="item">The item to remove.</param>\r
-               public void Remove(IntPtr item)\r
-               {\r
-                       HBFunctions.hb_list_rem(this.Ptr, item);\r
-               }\r
+        /// <summary>\r
+        /// Removes an item from the list.\r
+        /// </summary>\r
+        /// <param name="item">The item to remove.</param>\r
+        public void Remove(IntPtr item)\r
+        {\r
+            HBFunctions.hb_list_rem(this.Ptr, item);\r
+        }\r
 \r
-               /// <summary>\r
-               /// Gets an item out of the list.\r
-               /// </summary>\r
-               /// <param name="i">Index in the list.</param>\r
-               /// <returns>The item at that index in the list.</returns>\r
-               public IntPtr this[int i]\r
-               {\r
-                       get\r
-                       {\r
-                               return HBFunctions.hb_list_item(this.Ptr, i);\r
-                       }\r
-               }\r
+        /// <summary>\r
+        /// Gets an item out of the list.\r
+        /// </summary>\r
+        /// <param name="i">Index in the list.</param>\r
+        /// <returns>The item at that index in the list.</returns>\r
+        public IntPtr this[int i]\r
+        {\r
+            get\r
+            {\r
+                return HBFunctions.hb_list_item(this.Ptr, i);\r
+            }\r
+        }\r
 \r
-               /// <summary>\r
-               /// Disposes resources associated with this object.\r
-               /// </summary>\r
-               public void Dispose()\r
-               {\r
-                       IntPtr listPtrPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IntPtr)));\r
-                       Marshal.WriteIntPtr(listPtrPtr, this.Ptr);\r
-                       HBFunctions.hb_list_close(listPtrPtr);\r
-                       Marshal.FreeHGlobal(listPtrPtr);\r
-               }\r
+        /// <summary>\r
+        /// Disposes resources associated with this object.\r
+        /// </summary>\r
+        public void Dispose()\r
+        {\r
+            IntPtr listPtrPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IntPtr)));\r
+            Marshal.WriteIntPtr(listPtrPtr, this.Ptr);\r
+            HBFunctions.hb_list_close(listPtrPtr);\r
+            Marshal.FreeHGlobal(listPtrPtr);\r
+        }\r
 \r
-               /// <summary>\r
-               /// Creates a new list in unmanaged memory.\r
-               /// </summary>\r
-               /// <returns>The created list.</returns>\r
-               public static NativeList CreateList()\r
-               {\r
-                       return new NativeList(HBFunctions.hb_list_init());\r
-               }\r
-       }\r
+        /// <summary>\r
+        /// Creates a new list in unmanaged memory.\r
+        /// </summary>\r
+        /// <returns>The created list.</returns>\r
+        public static NativeList CreateList()\r
+        {\r
+            return new NativeList(HBFunctions.hb_list_init());\r
+        }\r
+    }\r
 }\r
index cd44e12d854448d8c9e8ab1db35734ffe3f8946c..eba89bcaa5ff759e2b1c81d5466e9fac855f8d89 100644 (file)
@@ -13,7 +13,7 @@ namespace HandBrake.ApplicationServices.Interop.Helpers
     /// The utilities.\r
     /// </summary>\r
     internal static class Utilities\r
-       {\r
+    {\r
         /// <summary>\r
         /// Get the Greatest Common Factor\r
         /// </summary>\r
@@ -27,23 +27,23 @@ namespace HandBrake.ApplicationServices.Interop.Helpers
         /// The greatest common factor\r
         /// </returns>\r
         public static int GreatestCommonFactor(int a, int b)\r
-               {\r
-                       if (a == 0)\r
-                       {\r
-                               return b;\r
-                       }\r
+        {\r
+            if (a == 0)\r
+            {\r
+                return b;\r
+            }\r
 \r
-                       if (b == 0)\r
-                       {\r
-                               return a;\r
-                       }\r
+            if (b == 0)\r
+            {\r
+                return a;\r
+            }\r
 \r
-                       if (a > b)\r
-                       {\r
-                               return GreatestCommonFactor(a % b, b);\r
-                       }\r
+            if (a > b)\r
+            {\r
+                return GreatestCommonFactor(a % b, b);\r
+            }\r
             \r
             return GreatestCommonFactor(a, b % a);\r
-               }\r
-       }\r
+        }\r
+    }\r
 }\r
index 0cc7257a0856a7818adb4d64fa8626a83370f79d..a748fc99e64262da8842b9e2ae0dae10bb448d29 100644 (file)
@@ -9,19 +9,19 @@
 \r
 namespace HandBrake.ApplicationServices.Interop.Model\r
 {\r
-       /// <summary>\r
-       /// Represents bitrate limits as a range.\r
-       /// </summary>\r
-       public class BitrateLimits\r
-       {\r
-               /// <summary>\r
-               /// The inclusive lower limit for the bitrate.\r
-               /// </summary>\r
-               public int Low { get; set; }\r
+    /// <summary>\r
+    /// Represents bitrate limits as a range.\r
+    /// </summary>\r
+    public class BitrateLimits\r
+    {\r
+        /// <summary>\r
+        /// The inclusive lower limit for the bitrate.\r
+        /// </summary>\r
+        public int Low { get; set; }\r
 \r
-               /// <summary>\r
-               /// The inclusive upper limit for the bitrate.\r
-               /// </summary>\r
-               public int High { get; set; }\r
-       }\r
+        /// <summary>\r
+        /// The inclusive upper limit for the bitrate.\r
+        /// </summary>\r
+        public int High { get; set; }\r
+    }\r
 }\r
index 0c320115501e4778c1f8e8d30b19036fee3e9c3e..52c9e64d59798b3ef473298ee2675cd2055e3740 100644 (file)
@@ -13,7 +13,7 @@ namespace HandBrake.ApplicationServices.Interop.Model
     /// The Cropping Model\r
     /// </summary>\r
     public class Cropping\r
-       {\r
+    {\r
         /// <summary>\r
         /// Initializes a new instance of the <see cref="Cropping"/> class. \r
         /// </summary>\r
@@ -86,14 +86,14 @@ namespace HandBrake.ApplicationServices.Interop.Model
         /// A Cloned copy\r
         /// </returns>\r
         public Cropping Clone()\r
-               {\r
-                       return new Cropping\r
-                       {\r
-                               Top = this.Top,\r
-                               Bottom = this.Bottom,\r
-                               Left = this.Left,\r
-                               Right = this.Right\r
-                       };\r
-               }\r
-       }\r
+        {\r
+            return new Cropping\r
+            {\r
+                Top = this.Top,\r
+                Bottom = this.Bottom,\r
+                Left = this.Left,\r
+                Right = this.Right\r
+            };\r
+        }\r
+    }\r
 }\r
index 73eb17ad4218def2c773b167762808d6943e2004..9357e21a35e143d244d424d7c4a6268eefffa2ae 100644 (file)
@@ -14,17 +14,17 @@ namespace HandBrake.ApplicationServices.Interop.Model
     using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
 \r
     /// <summary>\r
-       /// The encode job.\r
-       /// </summary>\r
-       public class EncodeJob\r
-       {\r
-           /// <summary>\r
-           /// Initializes a new instance of the <see cref="EncodeJob"/> class.\r
-           /// </summary>\r
-           public EncodeJob()\r
-           {\r
+    /// The encode job.\r
+    /// </summary>\r
+    public class EncodeJob\r
+    {\r
+        /// <summary>\r
+        /// Initializes a new instance of the <see cref="EncodeJob"/> class.\r
+        /// </summary>\r
+        public EncodeJob()\r
+        {\r
             this.Cropping = new Cropping();\r
-           }\r
+        }\r
 \r
         #region Source\r
 \r
@@ -415,30 +415,30 @@ namespace HandBrake.ApplicationServices.Interop.Model
         #region Public Methods\r
 \r
         /// <summary>\r
-               /// The clone.\r
-               /// </summary>\r
-               /// <returns>\r
-               /// The <see cref="EncodeJob"/>.\r
-               /// </returns>\r
-               public EncodeJob Clone()\r
-               {\r
-                       var clone = new EncodeJob\r
-                                                       {\r
-                                                               SourceType = this.SourceType, \r
-                                                               SourcePath = this.SourcePath, \r
-                                                               Title = this.Title, \r
-                                                               Angle = this.Angle, \r
-                                                               RangeType = this.RangeType, \r
-                                                               ChapterStart = this.ChapterStart, \r
-                                                               ChapterEnd = this.ChapterEnd, \r
-                                                               SecondsStart = this.SecondsStart, \r
-                                                               SecondsEnd = this.SecondsEnd, \r
-                                                               FramesStart = this.FramesStart, \r
-                                                               FramesEnd = this.FramesEnd, \r
-                                                               Subtitles = this.Subtitles, \r
-                                                               UseDefaultChapterNames = this.UseDefaultChapterNames, \r
-                                                               DxvaDecoding = this.DxvaDecoding, \r
-                                                               OutputPath = this.OutputPath, \r
+        /// The clone.\r
+        /// </summary>\r
+        /// <returns>\r
+        /// The <see cref="EncodeJob"/>.\r
+        /// </returns>\r
+        public EncodeJob Clone()\r
+        {\r
+            var clone = new EncodeJob\r
+                            {\r
+                                SourceType = this.SourceType, \r
+                                SourcePath = this.SourcePath, \r
+                                Title = this.Title, \r
+                                Angle = this.Angle, \r
+                                RangeType = this.RangeType, \r
+                                ChapterStart = this.ChapterStart, \r
+                                ChapterEnd = this.ChapterEnd, \r
+                                SecondsStart = this.SecondsStart, \r
+                                SecondsEnd = this.SecondsEnd, \r
+                                FramesStart = this.FramesStart, \r
+                                FramesEnd = this.FramesEnd, \r
+                                Subtitles = this.Subtitles, \r
+                                UseDefaultChapterNames = this.UseDefaultChapterNames, \r
+                                DxvaDecoding = this.DxvaDecoding, \r
+                                OutputPath = this.OutputPath, \r
 \r
                                 ContainerName = this.ContainerName, \r
                                 PreferredExtension = this.PreferredExtension, \r
@@ -495,11 +495,11 @@ namespace HandBrake.ApplicationServices.Interop.Model
 \r
                                 AudioEncodings = new List<AudioEncoding>(this.AudioEncodings), \r
                                 AudioEncoderFallback = this.AudioEncoderFallback\r
-                                                       };\r
+                            };\r
 \r
-                       return clone;\r
-               }\r
+            return clone;\r
+        }\r
 \r
-               #endregion\r
-       }\r
+        #endregion\r
+    }\r
 }
\ No newline at end of file
index 1b77203f424ed53479eb261623fcc42005df6f77..1fe67db0b06c17cbb6e3f706614176fbc165118e 100644 (file)
@@ -9,20 +9,20 @@
 \r
 namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
 {\r
-       using System.ComponentModel.DataAnnotations;\r
+    using System.ComponentModel.DataAnnotations;\r
 \r
     /// <summary>\r
     /// The anamorphic.\r
     /// </summary>\r
     public enum Anamorphic\r
-       {\r
-               [Display(Name = "None")]\r
-               None = 0,\r
-               [Display(Name = "Strict")]\r
-               Strict = 1,\r
-               [Display(Name = "Loose")]\r
-               Loose = 2,\r
-               [Display(Name = "Custom")]\r
-               Custom = 3\r
-       }\r
+    {\r
+        [Display(Name = "None")]\r
+        None = 0,\r
+        [Display(Name = "Strict")]\r
+        Strict = 1,\r
+        [Display(Name = "Loose")]\r
+        Loose = 2,\r
+        [Display(Name = "Custom")]\r
+        Custom = 3\r
+    }\r
 }
\ No newline at end of file
index 031c89b119972f29aa7b3f9a003e235c4d89fdb9..4fe209ccb9637696fea7ca75c200744cfcd0b865 100644 (file)
@@ -13,9 +13,9 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding
     /// The audio encode rate type.\r
     /// </summary>\r
     public enum AudioEncodeRateType\r
-       {\r
-               Bitrate,\r
-               Quality,\r
+    {\r
+        Bitrate,\r
+        Quality,\r
         Compression\r
-       }\r
+    }\r
 }\r
index 381e9d2c03adb508ad92870164d1d1d4b1978dec..96adc79ddef832f3e06a1416a29966cdb1a01b27 100644 (file)
@@ -9,81 +9,81 @@
 \r
 namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
 {\r
-       using System;\r
+    using System;\r
 \r
-       /// <summary>\r
-       /// The Audio Encoding Model\r
-       /// </summary>\r
-       public class AudioEncoding\r
-       {\r
-               /// <summary>\r
-               /// Initializes a new instance of the AudioEncoding class.\r
-               /// </summary>\r
-               public AudioEncoding()\r
-               {\r
-                       // Initialize to -1 to differentiate a compression of 0 from uninitialized.\r
-                       this.Compression = -1;\r
-               }\r
+    /// <summary>\r
+    /// The Audio Encoding Model\r
+    /// </summary>\r
+    public class AudioEncoding\r
+    {\r
+        /// <summary>\r
+        /// Initializes a new instance of the AudioEncoding class.\r
+        /// </summary>\r
+        public AudioEncoding()\r
+        {\r
+            // Initialize to -1 to differentiate a compression of 0 from uninitialized.\r
+            this.Compression = -1;\r
+        }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the chosen track to apply the encoding to.\r
-               /// </summary>\r
-               /// <remarks>1-based index. 0 means apply to all tracks.</remarks>\r
-               public int InputNumber { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the chosen track to apply the encoding to.\r
+        /// </summary>\r
+        /// <remarks>1-based index. 0 means apply to all tracks.</remarks>\r
+        public int InputNumber { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the encoder to use.\r
-               /// </summary>\r
-               public string Encoder { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the encoder to use.\r
+        /// </summary>\r
+        public string Encoder { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the encode rate type (bitrate or quality).\r
-               /// </summary>\r
-               public AudioEncodeRateType EncodeRateType { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the encode rate type (bitrate or quality).\r
+        /// </summary>\r
+        public AudioEncodeRateType EncodeRateType { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the bitrate (in kbps) of this track.\r
-               /// </summary>\r
-               public int Bitrate { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the bitrate (in kbps) of this track.\r
+        /// </summary>\r
+        public int Bitrate { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the target audio quality for this track.\r
-               /// </summary>\r
-               public float Quality { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the target audio quality for this track.\r
+        /// </summary>\r
+        public float Quality { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the target audio compression for this track.\r
-               /// </summary>\r
-               public float Compression { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the target audio compression for this track.\r
+        /// </summary>\r
+        public float Compression { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the mixdown.\r
-               /// </summary>\r
-               public string Mixdown { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the mixdown.\r
+        /// </summary>\r
+        public string Mixdown { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the sample rate in Hz.\r
-               /// </summary>\r
-               public int SampleRateRaw { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the sample rate in Hz.\r
+        /// </summary>\r
+        public int SampleRateRaw { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets Gain.\r
-               /// </summary>\r
-               public int Gain { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets Gain.\r
+        /// </summary>\r
+        public int Gain { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets Drc.\r
-               /// </summary>\r
-               public double Drc { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets Drc.\r
+        /// </summary>\r
+        public double Drc { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets Name.\r
-               /// </summary>\r
-               public string Name { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets Name.\r
+        /// </summary>\r
+        public string Name { get; set; }\r
 \r
-           /// <summary>\r
-           /// Gets or sets a value indicating whether is passthru.\r
-           /// </summary>\r
-           public bool IsPassthru { get; set; }\r
-       }\r
+        /// <summary>\r
+        /// Gets or sets a value indicating whether is passthru.\r
+        /// </summary>\r
+        public bool IsPassthru { get; set; }\r
+    }\r
 }\r
index ec59a6dbf9ef4d08be45d88617a5f4f62cdee395..0140c5678ca7431721a2516c0e0e4046be401534 100644 (file)
@@ -9,20 +9,20 @@
 \r
 namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
 {\r
-       using System;\r
-       using System.ComponentModel.DataAnnotations;\r
+    using System;\r
+    using System.ComponentModel.DataAnnotations;\r
 \r
     /// <summary>\r
     /// The container.\r
     /// </summary>\r
     [Flags]\r
-       public enum Container\r
-       {\r
-               None = 0x0,\r
+    public enum Container\r
+    {\r
+        None = 0x0,\r
 \r
-               [Display(Name = "MP4")]\r
-               MP4,\r
-               [Display(Name = "MKV")]\r
-               MKV\r
-       }\r
+        [Display(Name = "MP4")]\r
+        MP4,\r
+        [Display(Name = "MKV")]\r
+        MKV\r
+    }\r
 }\r
index a633751432faaa3b9ba25b94f7a3f92351475385..f49ccffc769684b7d3604b96c6e26876fe2478d9 100644 (file)
@@ -13,11 +13,11 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding
     /// The decomb.\r
     /// </summary>\r
     public enum Decomb\r
-       {\r
-               Off = 0,\r
-               Default = 2,\r
-               Fast = 3,\r
-               Bob = 4,\r
-               Custom = 1\r
-       }\r
+    {\r
+        Off = 0,\r
+        Default = 2,\r
+        Fast = 3,\r
+        Bob = 4,\r
+        Custom = 1\r
+    }\r
 }\r
index 1ed41419f8fc1c5884b5dc36b908013d7319fb42..f5f76b71e72f666a3807e5e337c9d8a3d6b3bc4b 100644 (file)
@@ -13,12 +13,12 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding
     /// The deinterlace.\r
     /// </summary>\r
     public enum Deinterlace\r
-       {\r
-               Off = 0,\r
-               Fast = 2,\r
-               Slow = 3,\r
-               Slower = 4,\r
-               Bob = 5,\r
-               Custom = 1\r
-       }\r
+    {\r
+        Off = 0,\r
+        Fast = 2,\r
+        Slow = 3,\r
+        Slower = 4,\r
+        Bob = 5,\r
+        Custom = 1\r
+    }\r
 }\r
index 2f24251ef3a796dadc8fd56385f676aa9dbbffdc..1bb510c29bd325a1d30e03ba67fdcd0dd5dfddca 100644 (file)
@@ -13,9 +13,9 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding
     /// The denoise.\r
     /// </summary>\r
     public enum Denoise\r
-       {\r
-               Off = 0,\r
+    {\r
+        Off = 0,\r
         hqdn3d = 1,\r
-               NLMeans = 2,\r
-       }\r
+        NLMeans = 2,\r
+    }\r
 }\r
index d16075af4ed9f0e95dd8ef6195aa278a39c1e7f7..ff26a394d1ed28f36e2ee074e1ae5fbc7b3c7c1d 100644 (file)
@@ -13,9 +13,9 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding
     /// The detelecine.\r
     /// </summary>\r
     public enum Detelecine\r
-       {\r
-               Off = 0,\r
-               Default = 2,\r
-               Custom = 1\r
-       }\r
+    {\r
+        Off = 0,\r
+        Default = 2,\r
+        Custom = 1\r
+    }\r
 }\r
index edae8f29a4841e8e93f49e0fb7441e26d52406ad..e3315878dbb0e02203d3201f786513fc15eaab8c 100644 (file)
@@ -9,19 +9,19 @@
 \r
 namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
 {\r
-       /// <summary>\r
-       /// Represents a rate in HandBrake: audio sample rate or video framerate.\r
-       /// </summary>\r
-       public class HBRate\r
-       {\r
-               /// <summary>\r
-               /// Gets or sets the name to use for this rate.\r
-               /// </summary>\r
-               public string Name { get; set; }\r
+    /// <summary>\r
+    /// Represents a rate in HandBrake: audio sample rate or video framerate.\r
+    /// </summary>\r
+    public class HBRate\r
+    {\r
+        /// <summary>\r
+        /// Gets or sets the name to use for this rate.\r
+        /// </summary>\r
+        public string Name { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the raw rate.\r
-               /// </summary>\r
-               public int Rate { get; set; }\r
-       }\r
+        /// <summary>\r
+        /// Gets or sets the raw rate.\r
+        /// </summary>\r
+        public int Rate { get; set; }\r
+    }\r
 }\r
index dd09452a1e718d10311e8b8aa3a087aa63342edf..a764f76b36aed51bd5ec4586092a4953cf448e69 100644 (file)
@@ -9,12 +9,12 @@
 \r
 namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
 {\r
-       using System.Collections.Generic;\r
+    using System.Collections.Generic;\r
 \r
-       using HandBrake.ApplicationServices.Interop.HbLib;\r
-       using HandBrake.ApplicationServices.Interop.Helpers;\r
+    using HandBrake.ApplicationServices.Interop.HbLib;\r
+    using HandBrake.ApplicationServices.Interop.Helpers;\r
 \r
-       /// <summary>\r
+    /// <summary>\r
     /// The hb video encoder.\r
     /// </summary>\r
     public class HBVideoEncoder\r
@@ -39,48 +39,48 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding
         /// </summary>\r
         public string ShortName { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets the list of presets this encoder supports. (null if the encoder doesn't support presets)\r
-               /// </summary>\r
-               public List<string> Presets\r
-               {\r
-                       get\r
-                       {\r
-                               return InteropUtilities.ToStringListFromArrayPtr(HBFunctions.hb_video_encoder_get_presets(this.Id));\r
-                       }\r
-               }\r
+        /// <summary>\r
+        /// Gets the list of presets this encoder supports. (null if the encoder doesn't support presets)\r
+        /// </summary>\r
+        public List<string> Presets\r
+        {\r
+            get\r
+            {\r
+                return InteropUtilities.ToStringListFromArrayPtr(HBFunctions.hb_video_encoder_get_presets(this.Id));\r
+            }\r
+        }\r
 \r
-               /// <summary>\r
-               /// Gets the list of tunes this encoder supports. (null if the encoder doesn't support tunes)\r
-               /// </summary>\r
-               public List<string> Tunes\r
-               {\r
-                       get\r
-                       {\r
-                               return InteropUtilities.ToStringListFromArrayPtr(HBFunctions.hb_video_encoder_get_tunes(this.Id));\r
-                       }\r
-               }\r
+        /// <summary>\r
+        /// Gets the list of tunes this encoder supports. (null if the encoder doesn't support tunes)\r
+        /// </summary>\r
+        public List<string> Tunes\r
+        {\r
+            get\r
+            {\r
+                return InteropUtilities.ToStringListFromArrayPtr(HBFunctions.hb_video_encoder_get_tunes(this.Id));\r
+            }\r
+        }\r
 \r
-               /// <summary>\r
-               /// Gets the list of profiles this encoder supports. (null if the encoder doesn't support profiles)\r
-               /// </summary>\r
-               public List<string> Profiles\r
-               {\r
-                       get\r
-                       {\r
-                               return InteropUtilities.ToStringListFromArrayPtr(HBFunctions.hb_video_encoder_get_profiles(this.Id));\r
-                       }\r
-               }\r
+        /// <summary>\r
+        /// Gets the list of profiles this encoder supports. (null if the encoder doesn't support profiles)\r
+        /// </summary>\r
+        public List<string> Profiles\r
+        {\r
+            get\r
+            {\r
+                return InteropUtilities.ToStringListFromArrayPtr(HBFunctions.hb_video_encoder_get_profiles(this.Id));\r
+            }\r
+        }\r
 \r
-               /// <summary>\r
-               /// Gets the list of levels this encoder supports. (null if the encoder doesn't support levels)\r
-               /// </summary>\r
-               public List<string> Levels\r
-               {\r
-                       get\r
-                       {\r
-                               return InteropUtilities.ToStringListFromArrayPtr(HBFunctions.hb_video_encoder_get_levels(this.Id));\r
-                       }\r
-               \r
+        /// <summary>\r
+        /// Gets the list of levels this encoder supports. (null if the encoder doesn't support levels)\r
+        /// </summary>\r
+        public List<string> Levels\r
+        {\r
+            get\r
+            {\r
+                return InteropUtilities.ToStringListFromArrayPtr(HBFunctions.hb_video_encoder_get_levels(this.Id));\r
+            }\r
+        } \r
     }\r
 }
\ No newline at end of file
index 4ca750adba03d10199c0696cff764cdc51a7d007..53e4f87e2f7539f5bb9f854e9b4708154a17e310 100644 (file)
@@ -9,24 +9,24 @@
 \r
 namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
 {\r
-       using System.ComponentModel.DataAnnotations;\r
+    using System.ComponentModel.DataAnnotations;\r
 \r
-       /// <summary>\r
-       /// The Audio Mixdown Enumeration\r
-       /// </summary>\r
-       public enum Mixdown\r
-       {\r
-               [Display(Name = "Dolby Pro Logic II")]\r
-               DolbyProLogicII = 0,\r
+    /// <summary>\r
+    /// The Audio Mixdown Enumeration\r
+    /// </summary>\r
+    public enum Mixdown\r
+    {\r
+        [Display(Name = "Dolby Pro Logic II")]\r
+        DolbyProLogicII = 0,\r
 \r
         [Display(Name = "None")]\r
         None,\r
 \r
-               [Display(Name = "Automatic")]\r
-               Auto,\r
+        [Display(Name = "Automatic")]\r
+        Auto,\r
 \r
-               [Display(Name = "Mono")]\r
-               Mono,\r
+        [Display(Name = "Mono")]\r
+        Mono,\r
 \r
         [Display(Name = "Mono (Left Only)")]\r
         LeftOnly,\r
@@ -34,14 +34,14 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding
         [Display(Name = "Mono (Right Only)")]\r
         RightOnly,\r
 \r
-               [Display(Name = "Stereo")]\r
-               Stereo,\r
+        [Display(Name = "Stereo")]\r
+        Stereo,\r
 \r
-               [Display(Name = "Dolby Surround")]\r
-               DolbySurround,\r
+        [Display(Name = "Dolby Surround")]\r
+        DolbySurround,\r
 \r
-               [Display(Name = "5.1 Channels")]\r
-               FivePoint1Channels,\r
+        [Display(Name = "5.1 Channels")]\r
+        FivePoint1Channels,\r
 \r
         [Display(Name = "6.1 Channels")]\r
         SixPoint1Channels,\r
@@ -51,5 +51,5 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding
 \r
         [Display(Name = "7.1 (5F/2R/LFE)")]\r
         Five_2_LFE,\r
-       }\r
+    }\r
 }\r
index 08534fd19b7ba29d9e46f63becd68e1729cb583d..5154eb58e31beeffd91511ab703573e4424e0fa7 100644 (file)
@@ -13,8 +13,8 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding
     /// The output extension.\r
     /// </summary>\r
     public enum OutputExtension\r
-       {\r
-               Mp4,\r
-               M4v\r
-       }\r
+    {\r
+        Mp4,\r
+        M4v\r
+    }\r
 }\r
index 38fc68980d7ff3b58a717f9e14b6f8219da6bcc6..76dc2846b583b956a7ef29332e1be19adbc93326 100644 (file)
@@ -9,14 +9,14 @@
 \r
 namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
 {\r
-       /// <summary>\r
-       /// Possible picture rotations.\r
-       /// </summary>\r
-       public enum PictureRotation\r
-       {\r
-               None = 0,\r
-               Clockwise90,\r
-               Clockwise180,\r
-               Clockwise270\r
-       }\r
+    /// <summary>\r
+    /// Possible picture rotations.\r
+    /// </summary>\r
+    public enum PictureRotation\r
+    {\r
+        None = 0,\r
+        Clockwise90,\r
+        Clockwise180,\r
+        Clockwise270\r
+    }\r
 }\r
index 203b5a5831ac376187e9aaff45d613158610a280..5d49ec2ae01e751bef5b6e97d3cf135369502810 100644 (file)
@@ -9,19 +9,19 @@
 \r
 namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
 {\r
-       /// <summary>\r
-       /// Enumeration of rescaling algorithms.\r
-       /// </summary>\r
-       public enum ScaleMethod\r
-       {\r
-               /// <summary>\r
-               /// Standard software scaling. Highest quality.\r
-               /// </summary>\r
-               Lanczos = 0,\r
+    /// <summary>\r
+    /// Enumeration of rescaling algorithms.\r
+    /// </summary>\r
+    public enum ScaleMethod\r
+    {\r
+        /// <summary>\r
+        /// Standard software scaling. Highest quality.\r
+        /// </summary>\r
+        Lanczos = 0,\r
 \r
-               /// <summary>\r
-               /// OpenCL-assisted bicubic scaling.\r
-               /// </summary>\r
-               Bicubic = 1\r
-       }\r
+        /// <summary>\r
+        /// OpenCL-assisted bicubic scaling.\r
+        /// </summary>\r
+        Bicubic = 1\r
+    }\r
 }\r
index 3fca0466a8d1559de5b69e638b52131bebb22dc0..beb5ca949d47acef7b133af1ff0e82d5b4627846 100644 (file)
@@ -13,9 +13,9 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding
     /// The video encode rate type.\r
     /// </summary>\r
     public enum VideoEncodeRateType\r
-       {\r
-               TargetSize = 0,\r
-               AverageBitrate = 1,\r
-               ConstantQuality = 2\r
-       }\r
+    {\r
+        TargetSize = 0,\r
+        AverageBitrate = 1,\r
+        ConstantQuality = 2\r
+    }\r
 }\r
index ce88223bba03f493c31fb29aa38a50c02ba1df06..0752b1277bca6f7e9db1f59cf04a16fdff678a00 100644 (file)
@@ -9,34 +9,34 @@
 \r
 namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
 {\r
-       using System.ComponentModel.DataAnnotations;\r
+    using System.ComponentModel.DataAnnotations;\r
 \r
-       using HandBrake.ApplicationServices.Interop.Attributes;\r
+    using HandBrake.ApplicationServices.Interop.Attributes;\r
 \r
     /// <summary>\r
     /// The video encoder.\r
     /// </summary>\r
     public enum VideoEncoder\r
-       {\r
-               [Display(Name = "H.264 (x264)")]\r
+    {\r
+        [Display(Name = "H.264 (x264)")]\r
         [ShortName("x264")]\r
-               X264 = 0,\r
+        X264 = 0,\r
 \r
         [Display(Name = "H.264 (Intel QSV)")]\r
         [ShortName("qsv_h264")]\r
         QuickSync,\r
 \r
-               [Display(Name = "MPEG-4")]\r
+        [Display(Name = "MPEG-4")]\r
         [ShortName("mpeg4")]\r
-               FFMpeg,\r
+        FFMpeg,\r
 \r
-               [Display(Name = "MPEG-2")]\r
+        [Display(Name = "MPEG-2")]\r
         [ShortName("mpeg2")]\r
-               FFMpeg2,\r
+        FFMpeg2,\r
 \r
-               [Display(Name = "Theora")]\r
+        [Display(Name = "Theora")]\r
         [ShortName("theora")]\r
-               Theora,\r
+        Theora,\r
 \r
         [Display(Name = "H.265 (x265)")]\r
         [ShortName("x265")]\r
@@ -45,5 +45,5 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding
         [Display(Name = "VP8")]\r
         [ShortName("vp8")]\r
         VP8\r
-       }\r
+    }\r
 }\r
index b6a0d61b4a5344518caad87349a6c843d97be0f8..89e997ef83232fe732bcb5c1e13b1cd089b2ddd3 100644 (file)
@@ -9,40 +9,40 @@
 \r
 namespace HandBrake.ApplicationServices.Interop.Model\r
 {\r
-       /// <summary>\r
-       /// Represents a language.\r
-       /// </summary>\r
-       public class Language\r
-       {\r
-               /// <summary>\r
-               /// Gets or sets the english name of the language.\r
-               /// </summary>\r
-               public string EnglishName { get; set; }\r
+    /// <summary>\r
+    /// Represents a language.\r
+    /// </summary>\r
+    public class Language\r
+    {\r
+        /// <summary>\r
+        /// Gets or sets the english name of the language.\r
+        /// </summary>\r
+        public string EnglishName { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the native name of the language.\r
-               /// </summary>\r
-               public string NativeName { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the native name of the language.\r
+        /// </summary>\r
+        public string NativeName { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the language code.\r
-               /// </summary>\r
-               public string Code { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the language code.\r
+        /// </summary>\r
+        public string Code { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets the display string for the language.\r
-               /// </summary>\r
-               public string Display\r
-               {\r
-                       get\r
-                       {\r
-                               if (!string.IsNullOrEmpty(this.NativeName) && this.NativeName != this.EnglishName)\r
-                               {\r
-                                       return this.EnglishName + " (" + this.NativeName + ")";\r
-                               }\r
+        /// <summary>\r
+        /// Gets the display string for the language.\r
+        /// </summary>\r
+        public string Display\r
+        {\r
+            get\r
+            {\r
+                if (!string.IsNullOrEmpty(this.NativeName) && this.NativeName != this.EnglishName)\r
+                {\r
+                    return this.EnglishName + " (" + this.NativeName + ")";\r
+                }\r
 \r
-                               return this.EnglishName;\r
-                       }\r
-               }\r
-       }\r
+                return this.EnglishName;\r
+            }\r
+        }\r
+    }\r
 }\r
index 4a7fe21a4c1b5285c994b2259178d17d31c1d974..527b3c4f6d20e52d0732b59f2868cab44d9b3c69 100644 (file)
 namespace HandBrake.ApplicationServices.Interop.Model.Scan\r
 {\r
     /// <summary>\r
-       /// An object represending an AudioTrack associated with a Title, in a DVD\r
-       /// </summary>\r
-       public class AudioTrack\r
-       {\r
-               /// <summary>\r
-               /// Gets or sets the track number of this Audio Track\r
-               /// </summary>\r
-               public int TrackNumber { get; set; }\r
+    /// An object represending an AudioTrack associated with a Title, in a DVD\r
+    /// </summary>\r
+    public class AudioTrack\r
+    {\r
+        /// <summary>\r
+        /// Gets or sets the track number of this Audio Track\r
+        /// </summary>\r
+        public int TrackNumber { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the audio codec ID for this track.\r
-               /// </summary>\r
-               public uint CodecId { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the audio codec ID for this track.\r
+        /// </summary>\r
+        public uint CodecId { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the language (if detected) of this Audio Track\r
-               /// </summary>\r
-               public string Language { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the language (if detected) of this Audio Track\r
+        /// </summary>\r
+        public string Language { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the language code for this audio track.\r
-               /// </summary>\r
-               public string LanguageCode { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the language code for this audio track.\r
+        /// </summary>\r
+        public string LanguageCode { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the description for this audio track.\r
-               /// </summary>\r
-               public string Description { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the description for this audio track.\r
+        /// </summary>\r
+        public string Description { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the channel layout of this Audio Track.\r
-               /// </summary>\r
-               public ulong ChannelLayout { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the channel layout of this Audio Track.\r
+        /// </summary>\r
+        public ulong ChannelLayout { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the frequency (in Hz) of this Audio Track\r
-               /// </summary>\r
-               public int SampleRate { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the frequency (in Hz) of this Audio Track\r
+        /// </summary>\r
+        public int SampleRate { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the bitrate (in bits/sec) of this Audio Track.\r
-               /// </summary>\r
-               public int Bitrate { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the bitrate (in bits/sec) of this Audio Track.\r
+        /// </summary>\r
+        public int Bitrate { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets the display string for this audio track.\r
-               /// </summary>\r
-               public string Display\r
-               {\r
-                       get\r
-                       {\r
-                               return this.GetDisplayString(true);\r
-                       }\r
-               }\r
+        /// <summary>\r
+        /// Gets the display string for this audio track.\r
+        /// </summary>\r
+        public string Display\r
+        {\r
+            get\r
+            {\r
+                return this.GetDisplayString(true);\r
+            }\r
+        }\r
 \r
-               /// <summary>\r
-               /// Gets the display string for this audio track (not including track number)\r
-               /// </summary>\r
-               public string NoTrackDisplay\r
-               {\r
-                       get\r
-                       {\r
-                               return this.GetDisplayString(false);\r
-                       }\r
-               }\r
+        /// <summary>\r
+        /// Gets the display string for this audio track (not including track number)\r
+        /// </summary>\r
+        public string NoTrackDisplay\r
+        {\r
+            get\r
+            {\r
+                return this.GetDisplayString(false);\r
+            }\r
+        }\r
 \r
-               /// <summary>\r
-               /// Override of the ToString method to make this object easier to use in the UI\r
-               /// </summary>\r
-               /// <returns>A string formatted as: {track #} {language} ({format}) ({sub-format})</returns>\r
-               public override string ToString()\r
-               {\r
-                       return this.GetDisplayString(true);\r
-               }\r
+        /// <summary>\r
+        /// Override of the ToString method to make this object easier to use in the UI\r
+        /// </summary>\r
+        /// <returns>A string formatted as: {track #} {language} ({format}) ({sub-format})</returns>\r
+        public override string ToString()\r
+        {\r
+            return this.GetDisplayString(true);\r
+        }\r
 \r
-           /// <summary>\r
-           /// The get display string.\r
-           /// </summary>\r
-           /// <param name="includeTrackNumber">\r
-           /// The include track number.\r
-           /// </param>\r
-           /// <returns>\r
-           /// The <see cref="string"/>.\r
-           /// </returns>\r
-           private string GetDisplayString(bool includeTrackNumber)\r
-           {\r
-               if (includeTrackNumber)\r
-                       {\r
-                               return this.TrackNumber + " " + this.Description;\r
-                       }\r
-               \r
+        /// <summary>\r
+        /// The get display string.\r
+        /// </summary>\r
+        /// <param name="includeTrackNumber">\r
+        /// The include track number.\r
+        /// </param>\r
+        /// <returns>\r
+        /// The <see cref="string"/>.\r
+        /// </returns>\r
+        private string GetDisplayString(bool includeTrackNumber)\r
+        {\r
+            if (includeTrackNumber)\r
+            {\r
+                return this.TrackNumber + " " + this.Description;\r
+            }\r
+            \r
             return this.Description;\r
-           }\r
-       }\r
+        }\r
+    }\r
 }
\ No newline at end of file
index f0e63ba3ef1781cb55c57b24d160dbc9d681ad4a..720906059726aa604729f3f76b5f80540754c49e 100644 (file)
@@ -13,32 +13,32 @@ namespace HandBrake.ApplicationServices.Interop.Model.Scan
     using System.Globalization;\r
 \r
     /// <summary>\r
-       /// An object representing a Chapter aosciated with a Title, in a DVD\r
-       /// </summary>\r
-       public class Chapter\r
-       {\r
+    /// An object representing a Chapter aosciated with a Title, in a DVD\r
+    /// </summary>\r
+    public class Chapter\r
+    {\r
         /// <summary>\r
         /// Gets or sets the name.\r
         /// </summary>\r
         public string Name { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the number of this Chapter, in regards to its parent Title\r
-               /// </summary>\r
-               public int ChapterNumber { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the number of this Chapter, in regards to its parent Title\r
+        /// </summary>\r
+        public int ChapterNumber { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the duration of this chapter.\r
-               /// </summary>\r
-               public TimeSpan Duration { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the duration of this chapter.\r
+        /// </summary>\r
+        public TimeSpan Duration { get; set; }\r
 \r
-               /// <summary>\r
-               /// Override of the ToString method to make this object easier to use in the UI\r
-               /// </summary>\r
-               /// <returns>A string formatted as: {chapter #}</returns>\r
-               public override string ToString()\r
-               {\r
-                       return this.ChapterNumber.ToString(CultureInfo.InvariantCulture);\r
-               }\r
-       }\r
+        /// <summary>\r
+        /// Override of the ToString method to make this object easier to use in the UI\r
+        /// </summary>\r
+        /// <returns>A string formatted as: {chapter #}</returns>\r
+        public override string ToString()\r
+        {\r
+            return this.ChapterNumber.ToString(CultureInfo.InvariantCulture);\r
+        }\r
+    }\r
 }
\ No newline at end of file
index 892d681166123bdeee783eabee6dca61c5f6c23f..4366d5a74c565e3da1de701e9347f35cf2e5710a 100644 (file)
@@ -15,17 +15,17 @@ namespace HandBrake.ApplicationServices.Interop.Model.Scan
     /// The input type.\r
     /// </summary>\r
     public enum InputType\r
-       {\r
-               [Display(Name = "File")]\r
-               Stream,\r
+    {\r
+        [Display(Name = "File")]\r
+        Stream,\r
 \r
-               [Display(Name = "DVD")]\r
-               Dvd,\r
+        [Display(Name = "DVD")]\r
+        Dvd,\r
 \r
-               [Display(Name = "Blu-ray")]\r
-               Bluray,\r
+        [Display(Name = "Blu-ray")]\r
+        Bluray,\r
 \r
         [Display(Name = "File")]\r
         FFStream\r
-       }\r
+    }\r
 }\r
index 7e09d21c5e893d2e37fee0397ec853be91faad48..6f8a5b027890aeaed4d12ab4adc1e797f87a5df5 100644 (file)
@@ -12,85 +12,85 @@ namespace HandBrake.ApplicationServices.Interop.Model.Scan
     using HandBrake.ApplicationServices.Interop.HbLib;\r
 \r
     /// <summary>\r
-       /// An object that represents a subtitle associated with a Title, in a DVD\r
-       /// </summary>\r
-       public class Subtitle\r
-       {\r
-               /// <summary>\r
-               /// Gets or sets the track number of this Subtitle\r
-               /// </summary>\r
-               public int TrackNumber { get; set; }\r
+    /// An object that represents a subtitle associated with a Title, in a DVD\r
+    /// </summary>\r
+    public class Subtitle\r
+    {\r
+        /// <summary>\r
+        /// Gets or sets the track number of this Subtitle\r
+        /// </summary>\r
+        public int TrackNumber { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the language (if detected) of this Subtitle\r
-               /// </summary>\r
-               public string Language { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the language (if detected) of this Subtitle\r
+        /// </summary>\r
+        public string Language { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the Langauage Code.\r
-               /// </summary>\r
-               public string LanguageCode { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the Langauage Code.\r
+        /// </summary>\r
+        public string LanguageCode { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the subtitle source.\r
-               /// </summary>\r
-               public SubtitleSource SubtitleSource { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the subtitle source.\r
+        /// </summary>\r
+        public SubtitleSource SubtitleSource { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the subtitle source raw integer.\r
-               /// </summary>\r
-               public int SubtitleSourceInt { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the subtitle source raw integer.\r
+        /// </summary>\r
+        public int SubtitleSourceInt { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets a value indicating whether the "forced only" flag can be set on this subtitle.\r
-               /// </summary>\r
-               public bool CanSetForcedOnly\r
-               {\r
-                       get\r
-                       {\r
-                               return HBFunctions.hb_subtitle_can_force(this.SubtitleSourceInt) > 0;\r
-                       }\r
-               }\r
+        /// <summary>\r
+        /// Gets a value indicating whether the "forced only" flag can be set on this subtitle.\r
+        /// </summary>\r
+        public bool CanSetForcedOnly\r
+        {\r
+            get\r
+            {\r
+                return HBFunctions.hb_subtitle_can_force(this.SubtitleSourceInt) > 0;\r
+            }\r
+        }\r
 \r
-               /// <summary>\r
-               /// Gets a value indicating whether this subtitle can be burned into the picture.\r
-               /// </summary>\r
-               public bool CanBurn\r
-               {\r
-                       get\r
-                       {\r
-                               return HBFunctions.hb_subtitle_can_burn(this.SubtitleSourceInt) > 0;\r
-                       }\r
-               }\r
+        /// <summary>\r
+        /// Gets a value indicating whether this subtitle can be burned into the picture.\r
+        /// </summary>\r
+        public bool CanBurn\r
+        {\r
+            get\r
+            {\r
+                return HBFunctions.hb_subtitle_can_burn(this.SubtitleSourceInt) > 0;\r
+            }\r
+        }\r
 \r
-               /// <summary>\r
-               /// Returns true if the subtitle can be passed through using the given muxer.\r
-               /// </summary>\r
-               /// <param name="muxer">The muxer ID.</param>\r
-               /// <returns>True if the subtitle can be passed through.</returns>\r
-               public bool CanPass(int muxer)\r
-               {\r
-                       return HBFunctions.hb_subtitle_can_pass(this.SubtitleSourceInt, muxer) > 0;\r
-               }\r
+        /// <summary>\r
+        /// Returns true if the subtitle can be passed through using the given muxer.\r
+        /// </summary>\r
+        /// <param name="muxer">The muxer ID.</param>\r
+        /// <returns>True if the subtitle can be passed through.</returns>\r
+        public bool CanPass(int muxer)\r
+        {\r
+            return HBFunctions.hb_subtitle_can_pass(this.SubtitleSourceInt, muxer) > 0;\r
+        }\r
 \r
-               /// <summary>\r
-               /// Override of the ToString method to make this object easier to use in the UI\r
-               /// </summary>\r
-               /// <returns>A string formatted as: {track #} {language}</returns>\r
-               public override string ToString()\r
-               {\r
-                       return string.Format("{0} {1} ({2})", this.TrackNumber, this.Language, this.SubtitleSource);\r
-               }\r
+        /// <summary>\r
+        /// Override of the ToString method to make this object easier to use in the UI\r
+        /// </summary>\r
+        /// <returns>A string formatted as: {track #} {language}</returns>\r
+        public override string ToString()\r
+        {\r
+            return string.Format("{0} {1} ({2})", this.TrackNumber, this.Language, this.SubtitleSource);\r
+        }\r
 \r
-               /// <summary>\r
-               /// Gets the display.\r
-               /// </summary>\r
-               public string Display\r
-               {\r
-                       get\r
-                       {\r
-                               return this.ToString();\r
-                       }\r
-               }\r
-       }\r
+        /// <summary>\r
+        /// Gets the display.\r
+        /// </summary>\r
+        public string Display\r
+        {\r
+            get\r
+            {\r
+                return this.ToString();\r
+            }\r
+        }\r
+    }\r
 }
\ No newline at end of file
index e29a1a4137032c16c67c377512df0d28992941e7..d51ff4ef6def197297560809184b061476f24902 100644 (file)
@@ -13,14 +13,14 @@ namespace HandBrake.ApplicationServices.Interop.Model.Scan
     /// The subtitle source.\r
     /// </summary>\r
     public enum SubtitleSource\r
-       {\r
-               VobSub,\r
-               SRT,\r
-               CC608,\r
-               CC708,\r
-               UTF8,\r
-               TX3G,\r
-               SSA,\r
-               PGS\r
-       }\r
+    {\r
+        VobSub,\r
+        SRT,\r
+        CC608,\r
+        CC708,\r
+        UTF8,\r
+        TX3G,\r
+        SSA,\r
+        PGS\r
+    }\r
 }\r
index fc8f6ea07ee1387799c90c6ba6ccb6ae678a3987..37013ac483ae333f30e8c69dcdb9189556814cd9 100644 (file)
@@ -15,170 +15,170 @@ namespace HandBrake.ApplicationServices.Interop.Model.Scan
     using HandBrake.ApplicationServices.Interop.Model;\r
 \r
     /// <summary>\r
-       /// An object that represents a single Title of a DVD\r
-       /// </summary>\r
-       public class Title\r
-       {\r
-           /// <summary>\r
-           /// The audio tracks.\r
-           /// </summary>\r
-           private readonly List<AudioTrack> audioTracks;\r
-\r
-           /// <summary>\r
-           /// The chapters.\r
-           /// </summary>\r
-           private readonly List<Chapter> chapters;\r
-\r
-           /// <summary>\r
-           /// The subtitles.\r
-           /// </summary>\r
-           private readonly List<Subtitle> subtitles;\r
-               \r
-               /// <summary>\r
-               /// Initializes a new instance of the Title class.\r
-               /// </summary>\r
-               public Title()\r
-               {\r
-                       this.audioTracks = new List<AudioTrack>();\r
-                       this.chapters = new List<Chapter>();\r
-                       this.subtitles = new List<Subtitle>();\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets or sets the input type of this title.\r
-               /// </summary>\r
-               public InputType InputType { get; set; }\r
-\r
-               /// <summary>\r
-               /// Gets a collection of chapters in this Title\r
-               /// </summary>\r
-               public List<Chapter> Chapters\r
-               {\r
-                       get { return this.chapters; }\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets a collection of audio tracks associated with this Title\r
-               /// </summary>\r
-               public List<AudioTrack> AudioTracks\r
-               {\r
-                       get { return this.audioTracks; }\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets a collection of subtitles associated with this Title\r
-               /// </summary>\r
-               public List<Subtitle> Subtitles\r
-               {\r
-                       get { return this.subtitles; }\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets or sets the track number of this Title (1-based).\r
-               /// </summary>\r
-               public int TitleNumber { get; set; }\r
-\r
-               /// <summary>\r
-               /// Gets or sets the playlist number this title came from.\r
-               /// </summary>\r
-               public int Playlist { get; set; }\r
-\r
-               /// <summary>\r
-               /// Gets or sets the duration of this title.\r
-               /// </summary>\r
-               public TimeSpan Duration { get; set; }\r
-\r
-               /// <summary>\r
-               /// Gets or sets the resolution (width/height) of this Title\r
-               /// </summary>\r
-               public Size Resolution { get; set; }\r
-\r
-               /// <summary>\r
-               /// Gets or sets the number of angles on the title.\r
-               /// </summary>\r
-               public int AngleCount { get; set; }\r
-\r
-               /// <summary>\r
-               /// Gets or sets the pixel aspect ratio.\r
-               /// </summary>\r
-               public Size ParVal { get; set; }\r
-\r
-               /// <summary>\r
-               /// Gets or sets the automatically detected crop region for this Title.\r
-               /// </summary>\r
-               public Cropping AutoCropDimensions { get; set; }\r
-\r
-               /// <summary>\r
-               /// Gets or sets the name of the video codec for this title.\r
-               /// </summary>\r
-               public string VideoCodecName { get; set; }\r
-\r
-               /// <summary>\r
-               /// Gets or sets the video frame rate for this title.\r
-               /// </summary>\r
-               public double Framerate { get; set; }\r
-\r
-               /// <summary>\r
-               /// Gets or sets the video frame rate numerator.\r
-               /// </summary>\r
-               public int FramerateNumerator { get; set; }\r
-\r
-               /// <summary>\r
-               /// Gets or sets the video frame rate denominator.\r
-               /// </summary>\r
-               public int FramerateDenominator { get; set; }\r
-\r
-               /// <summary>\r
-               /// Gets the total number of frames in this title.\r
-               /// </summary>\r
-               public int Frames\r
-               {\r
-                       get\r
-                       {\r
-                               return (int)Math.Ceiling(this.Duration.TotalSeconds * this.Framerate);\r
-                       }\r
-               }\r
-\r
-           /// <summary>\r
-           /// Gets or sets the path.\r
-           /// </summary>\r
-           public string Path { get; set; }\r
-\r
-               /// <summary>\r
-               /// Override of the ToString method to provide an easy way to use this object in the UI\r
-               /// </summary>\r
-               /// <returns>A string representing this track in the format: {title #}[ {playlist source}] (00:00:00)</returns>\r
-               public override string ToString()\r
-               {\r
-                       string playlistPortion = string.Empty;\r
-                       if (this.InputType == InputType.Bluray)\r
-                       {\r
-                               playlistPortion = string.Format(" {0:d5}.MPLS", this.Playlist);\r
-                       }\r
-\r
-                       return string.Format(\r
-                               "{0}{1} ({2:00}:{3:00}:{4:00})", \r
-                               this.TitleNumber, \r
-                               playlistPortion,\r
-                               this.Duration.Hours,\r
-                               this.Duration.Minutes, \r
-                               this.Duration.Seconds);\r
-               }\r
-\r
-               /// <summary>\r
-               /// Gets the display string for this title.\r
-               /// </summary>\r
-               public string Display\r
-               {\r
-                       get\r
-                       {\r
-                               return this.ToString();\r
-                       }\r
-               }\r
+    /// An object that represents a single Title of a DVD\r
+    /// </summary>\r
+    public class Title\r
+    {\r
+        /// <summary>\r
+        /// The audio tracks.\r
+        /// </summary>\r
+        private readonly List<AudioTrack> audioTracks;\r
+\r
+        /// <summary>\r
+        /// The chapters.\r
+        /// </summary>\r
+        private readonly List<Chapter> chapters;\r
+\r
+        /// <summary>\r
+        /// The subtitles.\r
+        /// </summary>\r
+        private readonly List<Subtitle> subtitles;\r
+        \r
+        /// <summary>\r
+        /// Initializes a new instance of the Title class.\r
+        /// </summary>\r
+        public Title()\r
+        {\r
+            this.audioTracks = new List<AudioTrack>();\r
+            this.chapters = new List<Chapter>();\r
+            this.subtitles = new List<Subtitle>();\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets or sets the input type of this title.\r
+        /// </summary>\r
+        public InputType InputType { get; set; }\r
+\r
+        /// <summary>\r
+        /// Gets a collection of chapters in this Title\r
+        /// </summary>\r
+        public List<Chapter> Chapters\r
+        {\r
+            get { return this.chapters; }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets a collection of audio tracks associated with this Title\r
+        /// </summary>\r
+        public List<AudioTrack> AudioTracks\r
+        {\r
+            get { return this.audioTracks; }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets a collection of subtitles associated with this Title\r
+        /// </summary>\r
+        public List<Subtitle> Subtitles\r
+        {\r
+            get { return this.subtitles; }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets or sets the track number of this Title (1-based).\r
+        /// </summary>\r
+        public int TitleNumber { get; set; }\r
+\r
+        /// <summary>\r
+        /// Gets or sets the playlist number this title came from.\r
+        /// </summary>\r
+        public int Playlist { get; set; }\r
+\r
+        /// <summary>\r
+        /// Gets or sets the duration of this title.\r
+        /// </summary>\r
+        public TimeSpan Duration { get; set; }\r
+\r
+        /// <summary>\r
+        /// Gets or sets the resolution (width/height) of this Title\r
+        /// </summary>\r
+        public Size Resolution { get; set; }\r
+\r
+        /// <summary>\r
+        /// Gets or sets the number of angles on the title.\r
+        /// </summary>\r
+        public int AngleCount { get; set; }\r
+\r
+        /// <summary>\r
+        /// Gets or sets the pixel aspect ratio.\r
+        /// </summary>\r
+        public Size ParVal { get; set; }\r
+\r
+        /// <summary>\r
+        /// Gets or sets the automatically detected crop region for this Title.\r
+        /// </summary>\r
+        public Cropping AutoCropDimensions { get; set; }\r
+\r
+        /// <summary>\r
+        /// Gets or sets the name of the video codec for this title.\r
+        /// </summary>\r
+        public string VideoCodecName { get; set; }\r
+\r
+        /// <summary>\r
+        /// Gets or sets the video frame rate for this title.\r
+        /// </summary>\r
+        public double Framerate { get; set; }\r
+\r
+        /// <summary>\r
+        /// Gets or sets the video frame rate numerator.\r
+        /// </summary>\r
+        public int FramerateNumerator { get; set; }\r
+\r
+        /// <summary>\r
+        /// Gets or sets the video frame rate denominator.\r
+        /// </summary>\r
+        public int FramerateDenominator { get; set; }\r
+\r
+        /// <summary>\r
+        /// Gets the total number of frames in this title.\r
+        /// </summary>\r
+        public int Frames\r
+        {\r
+            get\r
+            {\r
+                return (int)Math.Ceiling(this.Duration.TotalSeconds * this.Framerate);\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets or sets the path.\r
+        /// </summary>\r
+        public string Path { get; set; }\r
+\r
+        /// <summary>\r
+        /// Override of the ToString method to provide an easy way to use this object in the UI\r
+        /// </summary>\r
+        /// <returns>A string representing this track in the format: {title #}[ {playlist source}] (00:00:00)</returns>\r
+        public override string ToString()\r
+        {\r
+            string playlistPortion = string.Empty;\r
+            if (this.InputType == InputType.Bluray)\r
+            {\r
+                playlistPortion = string.Format(" {0:d5}.MPLS", this.Playlist);\r
+            }\r
+\r
+            return string.Format(\r
+                "{0}{1} ({2:00}:{3:00}:{4:00})", \r
+                this.TitleNumber, \r
+                playlistPortion,\r
+                this.Duration.Hours,\r
+                this.Duration.Minutes, \r
+                this.Duration.Seconds);\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets the display string for this title.\r
+        /// </summary>\r
+        public string Display\r
+        {\r
+            get\r
+            {\r
+                return this.ToString();\r
+            }\r
+        }\r
 \r
         /// <summary>\r
         /// Gets or sets a value indicating whether is main feature.\r
         /// </summary>\r
         public bool IsMainFeature { get; set; }\r
-       }\r
+    }\r
 }
\ No newline at end of file
index 98c9e8d089547cca7c8adb273d4029e5f58c2f58..c81c07ea597e76f7e9bef357fd406c1bce306285 100644 (file)
@@ -24,10 +24,10 @@ namespace HandBrake.ApplicationServices.Interop.Model
         /// </summary>\r
         public bool Default { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets a value indicating whether the subtitle track should be burned in.\r
-               /// </summary>\r
-               public bool BurnedIn { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets a value indicating whether the subtitle track should be burned in.\r
+        /// </summary>\r
+        public bool BurnedIn { get; set; }\r
 \r
         /// <summary>\r
         /// Gets or sets the file name.\r
@@ -55,7 +55,7 @@ namespace HandBrake.ApplicationServices.Interop.Model
             return new SrtSubtitle\r
                        {\r
                            Default = this.Default,\r
-                                                  BurnedIn = this.BurnedIn,\r
+                           BurnedIn = this.BurnedIn,\r
                            FileName = this.FileName, \r
                            LanguageCode = this.LanguageCode, \r
                            CharacterCode = this.CharacterCode, \r
index 821d58e9af3509c917da24238df5d301b0db40e4..bd9c1f5d478c2102011a3bf1671666d33bab9cf1 100644 (file)
@@ -9,29 +9,29 @@
 \r
 namespace HandBrake.ApplicationServices.Interop.Model\r
 {\r
-       /// <summary>\r
-       /// Represents limits on video quality for a particular encoder.\r
-       /// </summary>\r
-       public class VideoQualityLimits\r
-       {\r
-               /// <summary>\r
-               /// Gets or sets the inclusive lower limit for the quality.\r
-               /// </summary>\r
-               public float Low { get; set; }\r
+    /// <summary>\r
+    /// Represents limits on video quality for a particular encoder.\r
+    /// </summary>\r
+    public class VideoQualityLimits\r
+    {\r
+        /// <summary>\r
+        /// Gets or sets the inclusive lower limit for the quality.\r
+        /// </summary>\r
+        public float Low { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the inclusive upper limit for the quality.\r
-               /// </summary>\r
-               public float High { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the inclusive upper limit for the quality.\r
+        /// </summary>\r
+        public float High { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets the granularity for the quality.\r
-               /// </summary>\r
-               public float Granularity { get; set; }\r
+        /// <summary>\r
+        /// Gets or sets the granularity for the quality.\r
+        /// </summary>\r
+        public float Granularity { get; set; }\r
 \r
-               /// <summary>\r
-               /// Gets or sets a value indicating whether the quality increases as the number increases.\r
-               /// </summary>\r
-               public bool Ascending { get; set; }\r
-       }\r
+        /// <summary>\r
+        /// Gets or sets a value indicating whether the quality increases as the number increases.\r
+        /// </summary>\r
+        public bool Ascending { get; set; }\r
+    }\r
 }\r
index 89e0f3af46675f9cebd6ccbc126e179816e03b8d..3b38de793c653c2baf93c82ddf637f51b282a498 100644 (file)
@@ -9,35 +9,35 @@
 \r
 namespace HandBrake.ApplicationServices.Interop.Model\r
 {\r
-       using System.ComponentModel.DataAnnotations;\r
+    using System.ComponentModel.DataAnnotations;\r
 \r
-       /// <summary>\r
-       /// The video range type.\r
-       /// </summary>\r
-       public enum VideoRangeType\r
-       {\r
-               /// <summary>\r
-               /// The entire title.\r
-               /// </summary>\r
-               [Display(Name = "Preview")]\r
-               Preview,\r
+    /// <summary>\r
+    /// The video range type.\r
+    /// </summary>\r
+    public enum VideoRangeType\r
+    {\r
+        /// <summary>\r
+        /// The entire title.\r
+        /// </summary>\r
+        [Display(Name = "Preview")]\r
+        Preview,\r
 \r
-               /// <summary>\r
-               /// A chapter range.\r
-               /// </summary>\r
-               [Display(Name = "Chapters")]\r
-               Chapters, \r
+        /// <summary>\r
+        /// A chapter range.\r
+        /// </summary>\r
+        [Display(Name = "Chapters")]\r
+        Chapters, \r
 \r
-               /// <summary>\r
-               /// A timespan range in seconds.\r
-               /// </summary>\r
-               [Display(Name = "Seconds")]\r
-               Seconds, \r
+        /// <summary>\r
+        /// A timespan range in seconds.\r
+        /// </summary>\r
+        [Display(Name = "Seconds")]\r
+        Seconds, \r
 \r
-               /// <summary>\r
-               /// A frame range.\r
-               /// </summary>\r
-               [Display(Name = "Frames")]\r
-               Frames\r
-       }\r
+        /// <summary>\r
+        /// A frame range.\r
+        /// </summary>\r
+        [Display(Name = "Frames")]\r
+        Frames\r
+    }\r
 }
\ No newline at end of file