\r
public static class Converters\r
{\r
- private static Dictionary<double, int> vrates = new Dictionary<double, int>\r
+ /// <summary>\r
+ /// Video Frame Rates\r
+ /// </summary>\r
+ private static Dictionary<double, int> vrates = new Dictionary<double, int>\r
{\r
{5, 5400000},\r
{10, 2700000},\r
{29.97, 900900}\r
};\r
\r
- public static int FramerateToVrate(double framerate)\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 (!vrates.ContainsKey(framerate))\r
{\r
return vrates[framerate];\r
}\r
\r
- public static int MixdownToNative(Mixdown mixdown)\r
+ /// <summary>\r
+ /// Convert a Mixdown object to HandBrakes native mixdown constant.\r
+ /// </summary>\r
+ /// <param name="mixdown">\r
+ /// The mixdown.\r
+ /// </param>\r
+ /// <returns>\r
+ /// NativeContstant that represents the mixdown.\r
+ /// </returns>\r
+ /// <exception cref="ArgumentException">\r
+ /// Thrown for an invalid mixodown.\r
+ /// </exception>\r
+ public static int MixdownToNative(Mixdown mixdown)\r
{\r
if (mixdown == Mixdown.Auto)\r
{\r
return 0;\r
}\r
\r
- public static Mixdown NativeToMixdown(int mixdown)\r
+ /// <summary>\r
+ /// Convert an native internal handbrake mixdown to a local mixdown enum.\r
+ /// </summary>\r
+ /// <param name="mixdown">\r
+ /// The mixdown.\r
+ /// </param>\r
+ /// <returns>\r
+ /// A mixdown object.\r
+ /// </returns>\r
+ /// <exception cref="ArgumentException">\r
+ /// thrown when mixdown is invalid.\r
+ /// </exception>\r
+ public static Mixdown NativeToMixdown(int mixdown)\r
{\r
switch (mixdown)\r
{\r
return 0;\r
}\r
\r
- public static AudioCodec NativeToAudioCodec(uint codec)\r
+ /// <summary>\r
+ /// Convert Native HB Internal Audio int to a AudioCodec model.\r
+ /// </summary>\r
+ /// <param name="codec">\r
+ /// The codec.\r
+ /// </param>\r
+ /// <returns>\r
+ /// An AudioCodec object.\r
+ /// </returns>\r
+ public static AudioCodec NativeToAudioCodec(uint codec)\r
{\r
switch (codec)\r
{\r
{\r
using System;\r
\r
- public class EncodeCompletedEventArgs : EventArgs\r
+ /// <summary>\r
+ /// Encode Completed Event Args\r
+ /// </summary>\r
+ public class EncodeCompletedEventArgs : EventArgs\r
{\r
- public bool Error { get; set; }\r
+ /// <summary>\r
+ /// Gets or sets a value indicating whether Error.\r
+ /// </summary>\r
+ public bool Error { get; set; }\r
}\r
}\r
{\r
using System;\r
\r
- public class EncodeProgressEventArgs : EventArgs\r
+ /// <summary>\r
+ /// Encode Progress Event Args\r
+ /// </summary>\r
+ public class EncodeProgressEventArgs : EventArgs\r
{\r
- public float FractionComplete { get; set; }\r
- public float CurrentFrameRate { get; set; }\r
- public float AverageFrameRate { get; set; }\r
- public TimeSpan EstimatedTimeLeft { get; set; }\r
+ /// <summary>\r
+ /// Gets or sets FractionComplete.\r
+ /// </summary>\r
+ public float FractionComplete { get; set; }\r
+\r
+ /// <summary>\r
+ /// Gets or sets CurrentFrameRate.\r
+ /// </summary>\r
+ public float CurrentFrameRate { get; set; }\r
+\r
+ /// <summary>\r
+ /// Gets or sets AverageFrameRate.\r
+ /// </summary>\r
+ public float AverageFrameRate { get; set; }\r
+\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
private const int PictureAutoSizeModulus = 2;\r
\r
- /// <summary>\r
- /// Modulus used for picture size when using non-anamorphic.\r
- /// </summary>\r
- private const int NonAnamorphicAutoSizeModulus = 16;\r
-\r
/// <summary>\r
/// The number of MS between status polls when scanning.\r
/// </summary>\r
using HandBrake.Interop.Model.Encoding;\r
using HandBrake.Interop.SourceData;\r
\r
- public static class HandBrakeUtils\r
+ /// <summary>\r
+ /// HandBrake Interop Utilities\r
+ /// </summary>\r
+ public static class HandBrakeUtils\r
{\r
/// <summary>\r
/// Estimated overhead in bytes for each frame in output container.\r
/// </summary>\r
public static event EventHandler<MessageLoggedEventArgs> ErrorLogged;\r
\r
- public static void RegisterLogger()\r
+ /// <summary>\r
+ /// Register the logger.\r
+ /// </summary>\r
+ public static void RegisterLogger()\r
{\r
// Register the logger if we have not already\r
if (loggingCallback == null)\r
public const int JobPaddingBytes = 24688;\r
public const int AudioPaddingBytes = 24632;\r
#else\r
- public const int JobPaddingBytes = 24640;\r
- public const int AudioPaddingBytes = 24604;\r
+ /// <summary>\r
+ /// Job Padding Bytes\r
+ /// </summary>\r
+ public const int JobPaddingBytes = 24640;\r
+\r
+ /// <summary>\r
+ /// Audio Padding Bytes\r
+ /// </summary>\r
+ public const int AudioPaddingBytes = 24604;\r
#endif\r
}\r
}\r
{\r
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
}\r
using System;\r
using System.Collections.Generic;\r
\r
- /// <summary>\r
+ /// <summary>\r
/// Represents a HandBrake style native list.\r
/// </summary>\r
public class NativeList\r
{\r
using System;\r
\r
- public class ScanProgressEventArgs : EventArgs\r
+ /// <summary>\r
+ /// The Scan Progress Event Args\r
+ /// </summary>\r
+ public class ScanProgressEventArgs : EventArgs\r
{\r
- public int CurrentTitle { get; set; }\r
- public int Titles { get; set; }\r
+ /// <summary>\r
+ /// Gets or sets CurrentTitle.\r
+ /// </summary>\r
+ public int CurrentTitle { get; set; }\r
+\r
+ /// <summary>\r
+ /// Gets or sets Titles.\r
+ /// </summary>\r
+ public int Titles { get; set; }\r
}\r
}\r