summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.Interop/HandBrakeInterop/Model
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-10-30 17:58:53 +0000
committersr55 <[email protected]>2011-10-30 17:58:53 +0000
commit8b8ebd1f417c6ef65ab431a36fad0bbf0e2daf58 (patch)
tree37637e767ceac63a4bb48b8a99c17b196128b846 /win/CS/HandBrake.Interop/HandBrakeInterop/Model
parent2f0f372b09897e703a8d01fe9774aa59c936a013 (diff)
Interop: Updates to the Interop Library to use the new methods to get at the Audio/Video encoder information from libhb. Patch by RandomEngy.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4329 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop/Model')
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/BitrateLimits.cs15
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs268
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/Anamorphic.cs4
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncodeRateType.cs19
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoder.cs3
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs28
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/Container.cs22
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/EncodingProfile.cs6
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/HBAudioEncoder.cs53
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/HBMixdown.cs22
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/HBVideoEncoder.cs19
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/VideoEncoder.cs11
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/RangeLimits.cs16
13 files changed, 469 insertions, 17 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/BitrateLimits.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/BitrateLimits.cs
new file mode 100644
index 000000000..8e6a49582
--- /dev/null
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/BitrateLimits.cs
@@ -0,0 +1,15 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="BitrateLimits.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Model
+{
+ public class BitrateLimits
+ {
+ public int Low { get; set; }
+
+ public int High { get; set; }
+ }
+}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs
new file mode 100644
index 000000000..9857bb6ad
--- /dev/null
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs
@@ -0,0 +1,268 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Encoders.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Model
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Runtime.InteropServices;
+ using HandBrake.Interop.HbLib;
+ using HandBrake.Interop.Model.Encoding;
+ using HandBrake.Interop.SourceData;
+
+ public static class Encoders
+ {
+ private static List<HBAudioEncoder> audioEncoders;
+ private static List<HBVideoEncoder> videoEncoders;
+ private static List<HBMixdown> mixdowns;
+ private static List<int> audioBitrates;
+
+ /// <summary>
+ /// Gets a list of supported audio encoders.
+ /// </summary>
+ public static List<HBAudioEncoder> AudioEncoders
+ {
+ get
+ {
+ if (audioEncoders == null)
+ {
+ IntPtr encodersPtr = HBFunctions.hb_get_audio_encoders();
+ int encoderCount = HBFunctions.hb_get_audio_encoders_count();
+
+ audioEncoders = InteropUtilities.ConvertArray<hb_encoder_s>(encodersPtr, encoderCount)
+ .Select(Converters.NativeToAudioEncoder)
+ .ToList();
+ }
+
+ return audioEncoders;
+ }
+ }
+
+ /// <summary>
+ /// Gets a list of supported video encoders.
+ /// </summary>
+ public static List<HBVideoEncoder> VideoEncoders
+ {
+ get
+ {
+ if (videoEncoders == null)
+ {
+ IntPtr encodersPtr = HBFunctions.hb_get_video_encoders();
+ int encoderCount = HBFunctions.hb_get_video_encoders_count();
+
+ videoEncoders = InteropUtilities.ConvertArray<hb_encoder_s>(encodersPtr, encoderCount)
+ .Select(Converters.NativeToVideoEncoder)
+ .ToList();
+ }
+
+ return videoEncoders;
+ }
+ }
+
+ /// <summary>
+ /// Gets a list of supported mixdowns.
+ /// </summary>
+ public static List<HBMixdown> Mixdowns
+ {
+ get
+ {
+ if (mixdowns == null)
+ {
+ IntPtr mixdownsPtr = HBFunctions.hb_get_audio_mixdowns();
+ int mixdownsCount = HBFunctions.hb_get_audio_mixdowns_count();
+
+ mixdowns = InteropUtilities.ConvertArray<hb_mixdown_s>(mixdownsPtr, mixdownsCount)
+ .Select(Converters.NativeToMixdown)
+ .ToList();
+ }
+
+ return mixdowns;
+ }
+ }
+
+ /// <summary>
+ /// Gets a list of supported audio bitrates.
+ /// </summary>
+ public static List<int> AudioBitrates
+ {
+ get
+ {
+ if (audioBitrates == null)
+ {
+ IntPtr audioBitratesPtr = HBFunctions.hb_get_audio_bitrates();
+ int audioBitratesCount = HBFunctions.hb_get_audio_bitrates_count();
+
+ audioBitrates = InteropUtilities.ConvertArray<hb_rate_s>(audioBitratesPtr, audioBitratesCount)
+ .Select(b => b.rate)
+ .ToList();
+ }
+
+ return audioBitrates;
+ }
+ }
+
+ /// <summary>
+ /// Gets the audio encoder with the specified short name.
+ /// </summary>
+ /// <param name="shortName">The name of the audio encoder.</param>
+ /// <returns>The requested audio encoder.</returns>
+ public static HBAudioEncoder GetAudioEncoder(string shortName)
+ {
+ return AudioEncoders.SingleOrDefault(e => e.ShortName == shortName);
+ }
+
+ /// <summary>
+ /// Gets the mixdown with the specified short name.
+ /// </summary>
+ /// <param name="shortName">The name of the mixdown.</param>
+ /// <returns>The requested mixdown.</returns>
+ public static HBMixdown GetMixdown(string shortName)
+ {
+ return Mixdowns.SingleOrDefault(m => m.ShortName == shortName);
+ }
+
+ /// <summary>
+ /// Determines if the given encoder is compatible with the given track.
+ /// </summary>
+ /// <param name="track">The audio track to examine.</param>
+ /// <param name="encoder">The encoder to examine.</param>
+ /// <returns>True if the given encoder is comatible with the given audio track.</returns>
+ /// <remarks>Only works with passthrough encoders.</remarks>
+ public static bool AudioEncoderIsCompatible(AudioTrack track, HBAudioEncoder encoder)
+ {
+ return (track.CodecId & encoder.Id) > 0;
+ }
+
+ /// <summary>
+ /// Finds the highest possible mixdown for a given audio encoder.
+ /// </summary>
+ /// <param name="audioEncoder">The audio encoder in question.</param>
+ /// <returns>The highest possible mixdown for that audio encoder.</returns>
+ public static int GetMaxMixdownIndex(HBAudioEncoder audioEncoder)
+ {
+ // To find best case scenario, pass in highest number of channels and 6 channel discrete mixdown.
+ int maxMixdownId = HBFunctions.hb_get_best_mixdown((uint)audioEncoder.Id, NativeConstants.HB_INPUT_CH_LAYOUT_3F4R, NativeConstants.HB_AMIXDOWN_6CH);
+
+ for (int i = 0; i < Mixdowns.Count; i++)
+ {
+ if (Mixdowns[i].Id == maxMixdownId)
+ {
+ return i;
+ }
+ }
+
+ return -1;
+ }
+
+ /// <summary>
+ /// Sanitizes a mixdown given the output codec and input channel layout.
+ /// </summary>
+ /// <param name="mixdown">The desired mixdown.</param>
+ /// <param name="encoder">The output encoder to be used.</param>
+ /// <param name="layout">The input channel layout.</param>
+ /// <returns>A sanitized mixdown value.</returns>
+ public static HBMixdown SanitizeMixdown(HBMixdown mixdown, HBAudioEncoder encoder, int layout)
+ {
+ int sanitizedMixdown = HBFunctions.hb_get_best_mixdown((uint)encoder.Id, layout, mixdown.Id);
+ return Mixdowns.Single(m => m.Id == sanitizedMixdown);
+ }
+
+ /// <summary>
+ /// Gets the default mixdown for the given audio encoder and channel layout.
+ /// </summary>
+ /// <param name="encoder">The output codec to be used.</param>
+ /// <param name="layout">The input channel layout.</param>
+ /// <returns>The default mixdown for the given codec and channel layout.</returns>
+ public static HBMixdown GetDefaultMixdown(HBAudioEncoder encoder, int layout)
+ {
+ int defaultMixdown = HBFunctions.hb_get_default_mixdown((uint)encoder.Id, layout);
+ return Mixdowns.Single(m => m.Id == defaultMixdown);
+ }
+
+ /// <summary>
+ /// Gets the bitrate limits for the given audio codec, sample rate and mixdown.
+ /// </summary>
+ /// <param name="encoder">The audio encoder used.</param>
+ /// <param name="sampleRate">The sample rate used (Hz).</param>
+ /// <param name="mixdown">The mixdown used.</param>
+ /// <returns>Limits on the audio bitrate for the given settings.</returns>
+ public static BitrateLimits GetBitrateLimits(HBAudioEncoder encoder, int sampleRate, HBMixdown mixdown)
+ {
+ int low = 0;
+ int high = 0;
+
+ HBFunctions.hb_get_audio_bitrate_limits((uint)encoder.Id, sampleRate, mixdown.Id, ref low, ref high);
+
+ return new BitrateLimits { Low = low, High = high };
+ }
+
+ /// <summary>
+ /// Sanitizes an audio bitrate given the output codec, sample rate and mixdown.
+ /// </summary>
+ /// <param name="audioBitrate">The desired audio bitrate.</param>
+ /// <param name="encoder">The output encoder to be used.</param>
+ /// <param name="sampleRate">The output sample rate to be used.</param>
+ /// <param name="mixdown">The mixdown to be used.</param>
+ /// <returns>A sanitized audio bitrate.</returns>
+ public static int SanitizeAudioBitrate(int audioBitrate, HBAudioEncoder encoder, int sampleRate, HBMixdown mixdown)
+ {
+ return HBFunctions.hb_get_best_audio_bitrate((uint)encoder.Id, audioBitrate, sampleRate, mixdown.Id);
+ }
+
+ /// <summary>
+ /// Gets the default audio bitrate for the given parameters.
+ /// </summary>
+ /// <param name="encoder">The encoder to use.</param>
+ /// <param name="sampleRate">The sample rate to use.</param>
+ /// <param name="mixdown">The mixdown to use.</param>
+ /// <returns>The default bitrate for these parameters.</returns>
+ public static int GetDefaultBitrate(HBAudioEncoder encoder, int sampleRate, HBMixdown mixdown)
+ {
+ return HBFunctions.hb_get_default_audio_bitrate((uint) encoder.Id, sampleRate, mixdown.Id);
+ }
+
+ /// <summary>
+ /// Gets limits on audio quality for a given encoder.
+ /// </summary>
+ /// <param name="encoderId">The audio encoder ID.</param>
+ /// <returns>Limits on the audio quality for the given encoder.</returns>
+ internal static RangeLimits GetAudioQualityLimits(int encoderId)
+ {
+ float low = 0, high = 0, granularity = 0;
+ int direction = 0;
+ HBFunctions.hb_get_audio_quality_limits((uint)encoderId, ref low, ref high, ref granularity, ref direction);
+
+ return new RangeLimits
+ {
+ Low = low,
+ High = high,
+ Granularity = granularity,
+ Ascending = direction == 0
+ };
+ }
+
+ /// <summary>
+ /// Gets limits on audio compression for a given encoder.
+ /// </summary>
+ /// <param name="encoderId">The audio encoder ID.</param>
+ /// <returns>Limits on the audio compression for the given encoder.</returns>
+ internal static RangeLimits GetAudioCompressionLimits(int encoderId)
+ {
+ float low = 0, high = 0, granularity = 0;
+ int direction = 0;
+ HBFunctions.hb_get_audio_compression_limits((uint)encoderId, ref low, ref high, ref granularity, ref direction);
+
+ return new RangeLimits
+ {
+ Low = low,
+ High = high,
+ Granularity = granularity,
+ Ascending = direction == 0
+ };
+ }
+ }
+}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/Anamorphic.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/Anamorphic.cs
index 2051c2b63..2d20c4376 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/Anamorphic.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/Anamorphic.cs
@@ -9,9 +9,9 @@
namespace HandBrake.Interop.Model.Encoding
{
- using System.ComponentModel.DataAnnotations;
+ using System.ComponentModel.DataAnnotations;
- public enum Anamorphic
+ public enum Anamorphic
{
[Display(Name = "None")]
None = 0,
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncodeRateType.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncodeRateType.cs
new file mode 100644
index 000000000..ca162a47f
--- /dev/null
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncodeRateType.cs
@@ -0,0 +1,19 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="AudioEncodeRateType.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Model.Encoding
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Text;
+
+ public enum AudioEncodeRateType
+ {
+ Bitrate,
+ Quality
+ }
+}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoder.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoder.cs
index b5ab3b4bc..492d51d9a 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoder.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoder.cs
@@ -2,9 +2,6 @@
// <copyright file="AudioEncoder.cs" company="HandBrake Project (http://handbrake.fr)">
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
// </copyright>
-// <summary>
-// Defines the AudioEncoder type.
-// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.Interop.Model.Encoding
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs
index ea11d182e..c6ac28ea5 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs
@@ -17,6 +17,15 @@ namespace HandBrake.Interop.Model.Encoding
public class AudioEncoding
{
/// <summary>
+ /// Initializes a new instance of the AudioEncoding class.
+ /// </summary>
+ public AudioEncoding()
+ {
+ // Initialize to -1 to differentiate a compression of 0 from uninitialized.
+ this.Compression = -1;
+ }
+
+ /// <summary>
/// Gets or sets the chosen track to apply the encoding to.
/// </summary>
/// <remarks>1-based index. 0 means apply to all tracks.</remarks>
@@ -25,7 +34,12 @@ namespace HandBrake.Interop.Model.Encoding
/// <summary>
/// Gets or sets the encoder to use.
/// </summary>
- public AudioEncoder Encoder { get; set; }
+ public string Encoder { get; set; }
+
+ /// <summary>
+ /// Gets or sets the encode rate type (bitrate or quality).
+ /// </summary>
+ public AudioEncodeRateType EncodeRateType { get; set; }
/// <summary>
/// Gets or sets the bitrate (in kbps) of this track.
@@ -33,9 +47,19 @@ namespace HandBrake.Interop.Model.Encoding
public int Bitrate { get; set; }
/// <summary>
+ /// Gets or sets the target audio quality for this track.
+ /// </summary>
+ public float Quality { get; set; }
+
+ /// <summary>
+ /// Gets or sets the target audio compression for this track.
+ /// </summary>
+ public float Compression { get; set; }
+
+ /// <summary>
/// Gets or sets the mixdown.
/// </summary>
- public Mixdown Mixdown { get; set; }
+ public string Mixdown { get; set; }
/// <summary>
/// Gets or sets the sample rate. Obsolete. Use SampleRateRaw instead.
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/Container.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/Container.cs
new file mode 100644
index 000000000..2a526170e
--- /dev/null
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/Container.cs
@@ -0,0 +1,22 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Container.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Model.Encoding
+{
+ using System;
+ using System.ComponentModel.DataAnnotations;
+
+ [Flags]
+ public enum Container
+ {
+ None = 0x0,
+
+ [Display(Name = "MP4")]
+ Mp4,
+ [Display(Name = "MKV")]
+ Mkv
+ }
+}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/EncodingProfile.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/EncodingProfile.cs
index d4f85ca81..25da728ef 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/EncodingProfile.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/EncodingProfile.cs
@@ -20,7 +20,7 @@ namespace HandBrake.Interop.Model.Encoding
this.Cropping = new Cropping();
}
- public OutputFormat OutputFormat { get; set; }
+ public Container OutputFormat { get; set; }
public OutputExtension PreferredExtension { get; set; }
public bool IncludeChapterMarkers { get; set; }
public bool LargeFile { get; set; }
@@ -52,7 +52,7 @@ namespace HandBrake.Interop.Model.Encoding
public int Deblock { get; set; }
public bool Grayscale { get; set; }
- public VideoEncoder VideoEncoder { get; set; }
+ public string VideoEncoder { get; set; }
public string X264Options { get; set; }
public string X264Profile { get; set; }
public string X264Preset { get; set; }
@@ -67,7 +67,7 @@ namespace HandBrake.Interop.Model.Encoding
public bool PeakFramerate { get; set; }
public List<AudioEncoding> AudioEncodings { get; set; }
- public AudioEncoder AudioEncoderFallback { get; set; }
+ public string AudioEncoderFallback { get; set; }
public EncodingProfile Clone()
{
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/HBAudioEncoder.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/HBAudioEncoder.cs
new file mode 100644
index 000000000..19645a70b
--- /dev/null
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/HBAudioEncoder.cs
@@ -0,0 +1,53 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="HBAudioEncoder.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Model.Encoding
+{
+ using HandBrake.Interop.HbLib;
+
+ public class HBAudioEncoder
+ {
+ public string ShortName { get; set; }
+
+ public string DisplayName { get; set; }
+
+ public int Id { get; set; }
+
+ public Container CompatibleContainers { get; set; }
+
+ public bool SupportsQuality
+ {
+ get
+ {
+ return this.QualityLimits.High >= 0;
+ }
+ }
+
+ public RangeLimits QualityLimits { get; set; }
+
+ public float DefaultQuality { get; set; }
+
+ public bool SupportsCompression
+ {
+ get
+ {
+ return this.CompressionLimits.High >= 0;
+ }
+ }
+
+ public RangeLimits CompressionLimits { get; set; }
+
+ public float DefaultCompression { get; set; }
+
+ public bool IsPassthrough
+ {
+ get
+ {
+ return (this.Id & NativeConstants.HB_ACODEC_PASS_FLAG) > 0;
+ }
+ }
+ }
+}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/HBMixdown.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/HBMixdown.cs
new file mode 100644
index 000000000..493beb9fa
--- /dev/null
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/HBMixdown.cs
@@ -0,0 +1,22 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="HBMixdown.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Model.Encoding
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Text;
+
+ public class HBMixdown
+ {
+ public string ShortName { get; set; }
+
+ public string DisplayName { get; set; }
+
+ public int Id { get; set; }
+ }
+}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/HBVideoEncoder.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/HBVideoEncoder.cs
new file mode 100644
index 000000000..9e04252aa
--- /dev/null
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/HBVideoEncoder.cs
@@ -0,0 +1,19 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="HBVideoEncoder.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Model.Encoding
+{
+ public class HBVideoEncoder
+ {
+ public string ShortName { get; set; }
+
+ public string DisplayName { get; set; }
+
+ public int Id { get; set; }
+
+ public Container CompatibleContainers { get; set; }
+ }
+}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/VideoEncoder.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/VideoEncoder.cs
index 1e7b8005c..31cc3d599 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/VideoEncoder.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/VideoEncoder.cs
@@ -2,16 +2,13 @@
// <copyright file="VideoEncoder.cs" company="HandBrake Project (http://handbrake.fr)">
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
// </copyright>
-// <summary>
-// Defines the VideoEncoder type.
-// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.Interop.Model.Encoding
{
- using System.ComponentModel.DataAnnotations;
+ using System.ComponentModel.DataAnnotations;
- public enum VideoEncoder
+ public enum VideoEncoder
{
[Display(Name = "H.264 (x264)")]
X264 = 0,
@@ -19,8 +16,8 @@ namespace HandBrake.Interop.Model.Encoding
[Display(Name = "MPEG-4 (FFmpeg)")]
FFMpeg,
- [Display(Name = "MPEG-2 (FFmpeg)")]
- FFMpeg2,
+ [Display(Name = "MPEG-2 (FFmpeg)")]
+ FFMpeg2,
[Display(Name = "VP3 (Theora)")]
Theora
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/RangeLimits.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/RangeLimits.cs
new file mode 100644
index 000000000..6055e8eed
--- /dev/null
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/RangeLimits.cs
@@ -0,0 +1,16 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="RangeLimits.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Model
+{
+ public class RangeLimits
+ {
+ public float Low { get; set; }
+ public float High { get; set; }
+ public float Granularity { get; set; }
+ public bool Ascending { get; set; }
+ }
+}