summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-08-29 15:09:32 +0000
committersr55 <[email protected]>2010-08-29 15:09:32 +0000
commit3010221f63e61b7da51d3870712365d0518b6f72 (patch)
tree78fb1959eaea096389cd674e3c64981d75a18ce5 /win
parent8bcfcfa28c98665eab1eae9920f975ce803a0392 (diff)
WinGui:
- Update the Interop Code. - Update Growl Libary to 2.0.4.1 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3500 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/C#/interop/Converters.cs32
-rw-r--r--win/C#/interop/DisplayStringAttribute.cs14
-rw-r--r--win/C#/interop/EncodeCompletedEventArgs.cs12
-rw-r--r--win/C#/interop/EncodeProgressEventArgs.cs36
-rw-r--r--win/C#/interop/HandBrakeInstance.cs106
-rw-r--r--win/C#/interop/HandBrakeInterop.csproj9
-rw-r--r--win/C#/interop/HbLib.cs300
-rw-r--r--win/C#/interop/InteropUtilities.cs13
-rw-r--r--win/C#/interop/Language.cs16
-rw-r--r--win/C#/interop/LanguageCodes.cs14
-rw-r--r--win/C#/interop/MessageLoggedEventArgs.cs14
-rw-r--r--win/C#/interop/Model/Cropping.cs32
-rw-r--r--win/C#/interop/Model/EncodeJob.cs69
-rw-r--r--win/C#/interop/Model/Encoding/Anamorphic.cs17
-rw-r--r--win/C#/interop/Model/Encoding/AudioEncoder.cs18
-rw-r--r--win/C#/interop/Model/Encoding/AudioEncoding.cs40
-rw-r--r--win/C#/interop/Model/Encoding/Decomb.cs17
-rw-r--r--win/C#/interop/Model/Encoding/Deinterlace.cs17
-rw-r--r--win/C#/interop/Model/Encoding/Denoise.cs17
-rw-r--r--win/C#/interop/Model/Encoding/Detelecine.cs17
-rw-r--r--win/C#/interop/Model/Encoding/EncodingProfile.cs26
-rw-r--r--win/C#/interop/Model/Encoding/Mixdown.cs17
-rw-r--r--win/C#/interop/Model/Encoding/OutputExtension.cs17
-rw-r--r--win/C#/interop/Model/Encoding/OutputFormat.cs18
-rw-r--r--win/C#/interop/Model/Encoding/VideoEncodeRateType.cs17
-rw-r--r--win/C#/interop/Model/Encoding/VideoEncoder.cs17
-rw-r--r--win/C#/interop/Model/Size.cs19
-rw-r--r--win/C#/interop/Model/SourceSubtitle.cs35
-rw-r--r--win/C#/interop/Model/SourceType.cs29
-rw-r--r--win/C#/interop/Model/SrtSubtitle.cs42
-rw-r--r--win/C#/interop/Model/Subtitles.cs26
-rw-r--r--win/C#/interop/NativeList.cs13
-rw-r--r--win/C#/interop/Properties/AssemblyInfo.cs8
-rw-r--r--win/C#/interop/ScanProgressEventArgs.cs24
-rw-r--r--win/C#/interop/SourceData/AudioTrack.cs58
-rw-r--r--win/C#/interop/SourceData/Chapter.cs26
-rw-r--r--win/C#/interop/SourceData/Subtitle.cs49
-rw-r--r--win/C#/interop/SourceData/SubtitleType.cs26
-rw-r--r--win/C#/interop/SourceData/Title.cs94
-rw-r--r--win/C#/libraries/Growl.Connector.dllbin61440 -> 61440 bytes
-rw-r--r--win/C#/libraries/Growl.CoreLibrary.dllbin24576 -> 28672 bytes
41 files changed, 557 insertions, 814 deletions
diff --git a/win/C#/interop/Converters.cs b/win/C#/interop/Converters.cs
new file mode 100644
index 000000000..e5491995b
--- /dev/null
+++ b/win/C#/interop/Converters.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HandBrake.Interop
+{
+ public static class Converters
+ {
+ private static Dictionary<double, int> vrates = new Dictionary<double, int>
+ {
+ {5, 5400000},
+ {10, 2700000},
+ {12, 2250000},
+ {15, 1800000},
+ {23.976, 1126125},
+ {24, 1125000},
+ {25, 1080000},
+ {29.97, 900900}
+ };
+
+ public static int FramerateToVrate(double framerate)
+ {
+ if (!vrates.ContainsKey(framerate))
+ {
+ throw new ArgumentException("Framerate not recognized.", "framerate");
+ }
+
+ return vrates[framerate];
+ }
+ }
+}
diff --git a/win/C#/interop/DisplayStringAttribute.cs b/win/C#/interop/DisplayStringAttribute.cs
index 1d1c7e425..3f7e62d87 100644
--- a/win/C#/interop/DisplayStringAttribute.cs
+++ b/win/C#/interop/DisplayStringAttribute.cs
@@ -1,16 +1,10 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="DisplayStringAttribute.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 DisplayStringAttribute type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
namespace HandBrake.Interop
{
- using System;
-
[AttributeUsage(AttributeTargets.Field)]
public sealed class DisplayStringAttribute : Attribute
{
diff --git a/win/C#/interop/EncodeCompletedEventArgs.cs b/win/C#/interop/EncodeCompletedEventArgs.cs
new file mode 100644
index 000000000..a96afa2d6
--- /dev/null
+++ b/win/C#/interop/EncodeCompletedEventArgs.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HandBrake.Interop
+{
+ public class EncodeCompletedEventArgs : EventArgs
+ {
+ public bool Error { get; set; }
+ }
+}
diff --git a/win/C#/interop/EncodeProgressEventArgs.cs b/win/C#/interop/EncodeProgressEventArgs.cs
index 7241104ba..7f08595a7 100644
--- a/win/C#/interop/EncodeProgressEventArgs.cs
+++ b/win/C#/interop/EncodeProgressEventArgs.cs
@@ -1,44 +1,16 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="EncodeProgressEventArgs.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// Defines the EncodeProgressEventArgs type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
namespace HandBrake.Interop
{
- using System;
-
- /// <summary>
- /// Encode Progress Event Arguments
- /// </summary>
public class EncodeProgressEventArgs : EventArgs
{
- /// <summary>
- /// Gets or sets FractionComplete.
- /// </summary>
public float FractionComplete { get; set; }
-
- /// <summary>
- /// Gets or sets CurrentFrameRate.
- /// </summary>
public float CurrentFrameRate { get; set; }
-
- /// <summary>
- /// Gets or sets AverageFrameRate.
- /// </summary>
public float AverageFrameRate { get; set; }
-
- /// <summary>
- /// Gets or sets EstimatedTimeLeft.
- /// </summary>
public TimeSpan EstimatedTimeLeft { get; set; }
-
- /// <summary>
- /// Gets or sets Pass.
- /// </summary>
public int Pass { get; set; }
}
}
diff --git a/win/C#/interop/HandBrakeInstance.cs b/win/C#/interop/HandBrakeInstance.cs
index 26ab99413..38c4c926c 100644
--- a/win/C#/interop/HandBrakeInstance.cs
+++ b/win/C#/interop/HandBrakeInstance.cs
@@ -1,25 +1,16 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="HandBrakeInstance.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// A wrapper for a HandBrake instance.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-using System.Drawing;
-
-namespace HandBrake.Interop
+namespace HandBrake.Interop
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
+ using System.Text;
+ using System.Timers;
+ using System.Threading;
using System.Windows.Media.Imaging;
- using Model;
- using Model.Encoding;
- using SourceData;
+ using HandBrake.SourceData;
+ using HandBrake.Interop;
/// <summary>
/// A wrapper for a HandBrake instance.
@@ -67,6 +58,11 @@ namespace HandBrake.Interop
private List<Title> titles;
/// <summary>
+ /// The index of the default title.
+ /// </summary>
+ private int featureTitle;
+
+ /// <summary>
/// A list of native memory locations allocated by this instance.
/// </summary>
private List<IntPtr> encodeAllocatedMemory;
@@ -99,7 +95,7 @@ namespace HandBrake.Interop
/// <summary>
/// Fires when an encode has completed.
/// </summary>
- public event EventHandler<EventArgs> EncodeCompleted;
+ public event EventHandler<EncodeCompletedEventArgs> EncodeCompleted;
/// <summary>
/// Fires when HandBrake has logged a message.
@@ -131,6 +127,17 @@ namespace HandBrake.Interop
}
/// <summary>
+ /// Gets the index of the default title.
+ /// </summary>
+ public int FeatureTitle
+ {
+ get
+ {
+ return this.featureTitle;
+ }
+ }
+
+ /// <summary>
/// Initializes this instance.
/// </summary>
/// <param name="verbosity"></param>
@@ -146,7 +153,7 @@ namespace HandBrake.Interop
HbLib.hb_register_error_handler(errorCallback);
}
- this.hbHandle = HbLib.hb_init(verbosity, 0);
+ this.hbHandle = HbLib.hb_init(verbosity, update_check: 0);
}
/// <summary>
@@ -261,7 +268,7 @@ namespace HandBrake.Interop
for (int i = 0; i < nativeJob.height; i++)
{
Marshal.Copy(managedBuffer, i * nativeJob.width * 4, ptr, nativeJob.width * 4);
- ptr = AddOffset(ptr, bitmapData.Stride);
+ ptr = IntPtr.Add(ptr, bitmapData.Stride);
}
bitmap.UnlockBits(bitmapData);
@@ -282,11 +289,6 @@ namespace HandBrake.Interop
}
}
- public static IntPtr AddOffset(IntPtr src, int offset)
- {
- return new IntPtr(src.ToInt64() + offset);
- }
-
/// <summary>
/// Starts an encode with the given job.
/// </summary>
@@ -485,6 +487,16 @@ namespace HandBrake.Interop
this.titles.Add(newTitle);
}
+ if (this.originalTitles.Count > 0)
+ {
+ hb_job_s nativeJob = InteropUtilities.ReadStructure<hb_job_s>(this.originalTitles[0].job);
+ this.featureTitle = nativeJob.feature;
+ }
+ else
+ {
+ this.featureTitle = 0;
+ }
+
this.scanPollTimer.Stop();
if (this.ScanCompleted != null)
@@ -529,7 +541,7 @@ namespace HandBrake.Interop
if (this.EncodeCompleted != null)
{
- this.EncodeCompleted(this, new EventArgs());
+ this.EncodeCompleted(this, new EncodeCompletedEventArgs { Error = state.param.workdone.error > 0 });
}
}
}
@@ -614,7 +626,6 @@ namespace HandBrake.Interop
}
this.AddFilter(filterList, NativeConstants.HB_FILTER_DEINTERLACE, settings, allocatedMemory);
- //filterList.Add(HbLib.hb_get_filter_object(NativeConstants.HB_FILTER_DEINTERLACE, settings));
}
else
{
@@ -630,7 +641,6 @@ namespace HandBrake.Interop
}
this.AddFilter(filterList, NativeConstants.HB_FILTER_DETELECINE, settings, allocatedMemory);
- //filterList.Add(HbLib.hb_get_filter_object(NativeConstants.HB_FILTER_DETELECINE, settings));
}
if (profile.Decomb != Decomb.Off)
@@ -642,13 +652,11 @@ namespace HandBrake.Interop
}
this.AddFilter(filterList, NativeConstants.HB_FILTER_DECOMB, settings, allocatedMemory);
- //filterList.Add(HbLib.hb_get_filter_object(NativeConstants.HB_FILTER_DECOMB, settings));
}
if (profile.Deblock > 0)
{
this.AddFilter(filterList, NativeConstants.HB_FILTER_DEBLOCK, profile.Deblock.ToString(), allocatedMemory);
- //filterList.Add(HbLib.hb_get_filter_object(NativeConstants.HB_FILTER_DEBLOCK, profile.Deblock.ToString()));
}
if (profile.Denoise != Denoise.Off)
@@ -673,7 +681,6 @@ namespace HandBrake.Interop
}
this.AddFilter(filterList, NativeConstants.HB_FILTER_DENOISE, settings, allocatedMemory);
- //filterList.Add(HbLib.hb_get_filter_object(NativeConstants.HB_FILTER_DENOISE, settings));
}
NativeList filterListNative = InteropUtilities.CreateIntPtrList(filterList);
@@ -778,21 +785,26 @@ namespace HandBrake.Interop
break;
}
- if (profile.VideoEncodeRateType == VideoEncodeRateType.ConstantQuality)
+ if (profile.Framerate == 0)
{
- nativeJob.vquality = (float)profile.Quality;
- nativeJob.vbitrate = 0;
+ nativeJob.cfr = 0;
}
- else if (profile.VideoEncodeRateType == VideoEncodeRateType.AverageBitrate)
+ else
{
- nativeJob.vquality = -1;
- nativeJob.vbitrate = profile.VideoBitrate;
+ if (profile.PeakFramerate)
+ {
+ nativeJob.cfr = 2;
+ }
+ else
+ {
+ nativeJob.cfr = 1;
+ }
+
+ nativeJob.vrate = 27000000;
+ nativeJob.vrate_base = Converters.FramerateToVrate(profile.Framerate);
}
- // vrate
- // vrate_base
// vfr
- // cfr
// areBframes
// color_matrix
List<hb_audio_s> titleAudio = InteropUtilities.ConvertList<hb_audio_s>(originalTitle.list_audio);
@@ -933,6 +945,24 @@ namespace HandBrake.Interop
nativeJob.angle = job.Angle;
}
+ switch (profile.VideoEncodeRateType)
+ {
+ case VideoEncodeRateType.ConstantQuality:
+ nativeJob.vquality = (float)profile.Quality;
+ nativeJob.vbitrate = 0;
+ break;
+ case VideoEncodeRateType.AverageBitrate:
+ nativeJob.vquality = -1;
+ nativeJob.vbitrate = profile.VideoBitrate;
+ break;
+ case VideoEncodeRateType.TargetSize:
+ nativeJob.vquality = -1;
+ nativeJob.vbitrate = HbLib.hb_calc_bitrate(ref nativeJob, profile.TargetSize);
+ break;
+ default:
+ break;
+ }
+
// frames_to_skip
return allocatedMemory;
diff --git a/win/C#/interop/HandBrakeInterop.csproj b/win/C#/interop/HandBrakeInterop.csproj
index 1379139db..fd35b975a 100644
--- a/win/C#/interop/HandBrakeInterop.csproj
+++ b/win/C#/interop/HandBrakeInterop.csproj
@@ -3,14 +3,14 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
+ <ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>HandBrake.Interop</RootNamespace>
<AssemblyName>HandBrakeInterop</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
@@ -64,6 +64,7 @@
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Drawing" />
+ <Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
@@ -77,7 +78,9 @@
</Reference>
</ItemGroup>
<ItemGroup>
+ <Compile Include="Converters.cs" />
<Compile Include="DisplayStringAttribute.cs" />
+ <Compile Include="EncodeCompletedEventArgs.cs" />
<Compile Include="EncodeProgressEventArgs.cs" />
<Compile Include="HandBrakeInstance.cs" />
<Compile Include="HbLib.cs" />
@@ -100,6 +103,7 @@
<Compile Include="Model\Encoding\OutputFormat.cs" />
<Compile Include="Model\Encoding\VideoEncoder.cs" />
<Compile Include="Model\Encoding\VideoEncodeRateType.cs" />
+ <Compile Include="Model\Size.cs" />
<Compile Include="Model\SourceSubtitle.cs" />
<Compile Include="Model\SourceType.cs" />
<Compile Include="Model\SrtSubtitle.cs" />
@@ -131,7 +135,6 @@
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <Import Project="$(ProgramFiles)\MSBuild\Microsoft\StyleCop\v4.3\Microsoft.StyleCop.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
diff --git a/win/C#/interop/HbLib.cs b/win/C#/interop/HbLib.cs
index 80a52efdf..9d2220783 100644
--- a/win/C#/interop/HbLib.cs
+++ b/win/C#/interop/HbLib.cs
@@ -1,51 +1,46 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="HbLib.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 NativeConstants type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Runtime.InteropServices;
namespace HandBrake.Interop
{
- using System;
- using System.Runtime.InteropServices;
- internal partial class NativeConstants
+ public partial class NativeConstants
{
- public const int HB_ACODEC_MASK = 0x00FF00;
- public const int HB_ACODEC_FAAC = 0x000100;
- public const int HB_ACODEC_LAME = 0x000200;
+ public const int HB_ACODEC_MASK = 0x00FF00;
+ public const int HB_ACODEC_FAAC = 0x000100;
+ public const int HB_ACODEC_LAME = 0x000200;
public const int HB_ACODEC_VORBIS = 0x000400;
- public const int HB_ACODEC_AC3 = 0x000800;
- public const int HB_ACODEC_MPGA = 0x001000;
- public const int HB_ACODEC_LPCM = 0x002000;
- public const int HB_ACODEC_DCA = 0x004000;
+ public const int HB_ACODEC_AC3 = 0x000800;
+ public const int HB_ACODEC_MPGA = 0x001000;
+ public const int HB_ACODEC_LPCM = 0x002000;
+ public const int HB_ACODEC_DCA = 0x004000;
public const int HB_ACODEC_FFMPEG = 0x008000;
public const int HB_ACODEC_CA_AAC = 0x010000;
- public const int HB_AMIXDOWN_DCA_FORMAT_MASK = 0x00FFF000;
- public const int HB_AMIXDOWN_A52_FORMAT_MASK = 0x00000FF0;
- public const int HB_AMIXDOWN_DISCRETE_CHANNEL_COUNT_MASK = 0x0000000F;
- public const int HB_AMIXDOWN_MONO = 0x01000001;
- public const int HB_AMIXDOWN_STEREO = 0x02002022;
- public const int HB_AMIXDOWN_DOLBY = 0x042070A2;
- public const int HB_AMIXDOWN_DOLBYPLII = 0x084094A2;
- public const int HB_AMIXDOWN_6CH = 0x10089176;
+ public const int HB_AMIXDOWN_DCA_FORMAT_MASK = 0x00FFF000;
+ public const int HB_AMIXDOWN_A52_FORMAT_MASK = 0x00000FF0;
+ public const int HB_AMIXDOWN_DISCRETE_CHANNEL_COUNT_MASK = 0x0000000F;
+ public const int HB_AMIXDOWN_MONO = 0x01000001;
+ public const int HB_AMIXDOWN_STEREO = 0x02002022;
+ public const int HB_AMIXDOWN_DOLBY = 0x042070A2;
+ public const int HB_AMIXDOWN_DOLBYPLII = 0x084094A2;
+ public const int HB_AMIXDOWN_6CH = 0x10089176;
- public const int HB_VCODEC_MASK = 0x0000FF;
+ public const int HB_VCODEC_MASK = 0x0000FF;
public const int HB_VCODEC_FFMPEG = 0x000001;
- public const int HB_VCODEC_X264 = 0x000002;
+ public const int HB_VCODEC_X264 = 0x000002;
public const int HB_VCODEC_THEORA = 0x000004;
- public const int HB_MUX_MASK = 0xFF0000;
- public const int HB_MUX_MP4 = 0x010000;
- public const int HB_MUX_PSP = 0x020000;
- public const int HB_MUX_AVI = 0x040000;
- public const int HB_MUX_OGM = 0x080000;
- public const int HB_MUX_IPOD = 0x100000;
- public const int HB_MUX_MKV = 0x200000;
+ public const int HB_MUX_MASK = 0xFF0000;
+ public const int HB_MUX_MP4 = 0x010000;
+ public const int HB_MUX_PSP = 0x020000;
+ public const int HB_MUX_AVI = 0x040000;
+ public const int HB_MUX_OGM = 0x080000;
+ public const int HB_MUX_IPOD = 0x100000;
+ public const int HB_MUX_MKV = 0x200000;
public const int HBTF_NO_IDR = 1 << 0;
@@ -63,14 +58,14 @@ namespace HandBrake.Interop
public const int AUDIO_F_DOLBY = 1 << 31;
- public const int HB_FRAME_IDR = 0x01;
- public const int HB_FRAME_I = 0x02;
- public const int HB_FRAME_AUDIO = 0x04;
- public const int HB_FRAME_P = 0x10;
- public const int HB_FRAME_B = 0x20;
- public const int HB_FRAME_BREF = 0x40;
- public const int HB_FRAME_KEY = 0x0F;
- public const int HB_FRAME_REF = 0xF0;
+ public const int HB_FRAME_IDR = 0x01;
+ public const int HB_FRAME_I = 0x02;
+ public const int HB_FRAME_AUDIO = 0x04;
+ public const int HB_FRAME_P = 0x10;
+ public const int HB_FRAME_B = 0x20;
+ public const int HB_FRAME_BREF = 0x40;
+ public const int HB_FRAME_KEY = 0x0F;
+ public const int HB_FRAME_REF = 0xF0;
public const int HB_CONFIG_MAX_SIZE = 8192;
@@ -83,7 +78,7 @@ namespace HandBrake.Interop
}
[StructLayout(LayoutKind.Sequential)]
- internal struct hb_anamorphic_substruct
+ public struct hb_anamorphic_substruct
{
/// int
public int mode;
@@ -108,7 +103,7 @@ namespace HandBrake.Interop
}
[StructLayout(LayoutKind.Sequential)]
- internal struct hb_job_s
+ public struct hb_job_s
{
/// int
public int sequence_id;
@@ -128,7 +123,8 @@ namespace HandBrake.Interop
public int chapter_markers;
/// int[4]
- [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I4)] public int[] crop;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I4)]
+ public int[] crop;
/// int
public int deinterlace;
@@ -191,6 +187,7 @@ namespace HandBrake.Interop
/// char*
//[MarshalAs(UnmanagedType.LPStr)]
//public string x264opts;
+
public IntPtr x264opts;
/// int
@@ -209,7 +206,8 @@ namespace HandBrake.Interop
public int mux;
/// char*
- [MarshalAs(UnmanagedType.LPStr)] public string file;
+ [MarshalAs(UnmanagedType.LPStr)]
+ public string file;
/// int
public int largeFileSize;
@@ -249,11 +247,12 @@ namespace HandBrake.Interop
public uint frames_to_skip;
// Padding for the part of the struct we don't care about marshaling.
- [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24644, ArraySubType = UnmanagedType.U1)] public byte[] padding;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24644, ArraySubType = UnmanagedType.U1)]
+ public byte[] padding;
}
[StructLayout(LayoutKind.Sequential)]
- internal struct hb_list_s
+ public struct hb_list_s
{
/// void**
public IntPtr items;
@@ -266,17 +265,18 @@ namespace HandBrake.Interop
}
[StructLayout(LayoutKind.Sequential)]
- internal struct hb_rate_s
+ public struct hb_rate_s
{
/// char*
- [MarshalAs(UnmanagedType.LPStr)] public string @string;
+ [MarshalAs(UnmanagedType.LPStr)]
+ public string @string;
/// int
public int rate;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- internal struct hb_handle_s
+ public struct hb_handle_s
{
public int id;
@@ -284,7 +284,8 @@ namespace HandBrake.Interop
public int build;
/// char[32]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string version;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
+ public string version;
/// hb_thread_t*
public IntPtr update_thread;
@@ -348,7 +349,7 @@ namespace HandBrake.Interop
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- internal struct hb_chapter_s
+ public struct hb_chapter_s
{
/// int
public int index;
@@ -387,17 +388,18 @@ namespace HandBrake.Interop
public ulong duration;
/// char[1024]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)] public string title;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
+ public string title;
}
- internal enum hb_subtitle_s_subtype
+ public enum hb_subtitle_s_subtype
{
PICTURESUB,
TEXTSUB,
}
- internal enum hb_subtitle_s_subsource
+ public enum hb_subtitle_s_subsource
{
VOBSUB,
@@ -409,11 +411,13 @@ namespace HandBrake.Interop
UTF8SUB,
- TX3GSUB
+ TX3GSUB,
+
+ SSASUB
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- internal struct hb_subtitle_s
+ public struct hb_subtitle_s
{
/// int
public int id;
@@ -431,15 +435,18 @@ namespace HandBrake.Interop
public hb_subtitle_s_subsource source;
/// char[1024]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)] public string lang;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
+ public string lang;
/// char[4]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)] public string iso639_2;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
+ public string iso639_2;
/// uint8_t->unsigned char
public byte type;
- [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.U4)] public uint[] palette;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.U4)]
+ public uint[] palette;
public int width;
@@ -468,28 +475,35 @@ namespace HandBrake.Interop
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- internal struct hb_metadata_s
+ public struct hb_metadata_s
{
/// char[255]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)] public string name;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
+ public string name;
/// char[255]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)] public string artist;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
+ public string artist;
/// char[255]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)] public string composer;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
+ public string composer;
/// char[255]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)] public string release_date;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
+ public string release_date;
/// char[1024]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)] public string comment;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
+ public string comment;
/// char[255]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)] public string album;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
+ public string album;
/// char[255]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)] public string genre;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
+ public string genre;
/// uint32_t->unsigned int
public uint coverart_size;
@@ -498,14 +512,14 @@ namespace HandBrake.Interop
public IntPtr coverart;
}
- internal enum Anonymous_990d28ea_6cf3_4fbc_8143_4df9513e9550
+ public enum Anonymous_990d28ea_6cf3_4fbc_8143_4df9513e9550
{
HB_DVD_TYPE,
HB_STREAM_TYPE,
}
- internal enum Anonymous_618ebeca_0ad9_4a71_9a49_18e50ac2e9db
+ public enum Anonymous_618ebeca_0ad9_4a71_9a49_18e50ac2e9db
{
/// HB_MPEG2_PS_DEMUXER -> 0
HB_MPEG2_PS_DEMUXER = 0,
@@ -516,16 +530,18 @@ namespace HandBrake.Interop
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- internal struct hb_title_s
+ public struct hb_title_s
{
/// Anonymous_990d28ea_6cf3_4fbc_8143_4df9513e9550
public Anonymous_990d28ea_6cf3_4fbc_8143_4df9513e9550 type;
/// char[1024]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)] public string dvd;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
+ public string dvd;
/// char[1024]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)] public string name;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
+ public string name;
//public fixed byte dvd[1024];
@@ -595,7 +611,8 @@ namespace HandBrake.Interop
public int rate_base;
/// int[4]
- [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I4)] public int[] crop;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I4)]
+ public int[] crop;
//public fixed int crop[4];
@@ -646,7 +663,7 @@ namespace HandBrake.Interop
}
[StructLayout(LayoutKind.Sequential)]
- internal struct hb_state_scanning_s
+ public struct hb_state_scanning_s
{
/// int
public int title_cur;
@@ -656,7 +673,7 @@ namespace HandBrake.Interop
}
[StructLayout(LayoutKind.Sequential)]
- internal struct hb_state_working_s
+ public struct hb_state_working_s
{
/// float
public float progress;
@@ -687,42 +704,46 @@ namespace HandBrake.Interop
}
[StructLayout(LayoutKind.Sequential)]
- internal struct hb_state_workdone_s
+ public struct hb_state_workdone_s
{
/// int
public int error;
}
[StructLayout(LayoutKind.Sequential)]
- internal struct hb_state_muxing_s
+ public struct hb_state_muxing_s
{
/// float
public float progress;
}
[StructLayout(LayoutKind.Explicit)]
- internal struct hb_state_param_u
+ public struct hb_state_param_u
{
- [FieldOffset(0)] public hb_state_scanning_s scanning;
+ [FieldOffset(0)]
+ public hb_state_scanning_s scanning;
- [FieldOffset(0)] public hb_state_working_s working;
+ [FieldOffset(0)]
+ public hb_state_working_s working;
- [FieldOffset(0)] public hb_state_workdone_s workdone;
+ [FieldOffset(0)]
+ public hb_state_workdone_s workdone;
- [FieldOffset(0)] public hb_state_muxing_s muxing;
+ [FieldOffset(0)]
+ public hb_state_muxing_s muxing;
}
[StructLayout(LayoutKind.Sequential)]
- internal struct hb_state_s
+ public struct hb_state_s
{
+
/// int
public int state;
-
public hb_state_param_u param;
}
[StructLayout(LayoutKind.Sequential)]
- internal struct hb_audio_s
+ public struct hb_audio_s
{
/// int
public int id;
@@ -731,14 +752,15 @@ namespace HandBrake.Interop
public hb_audio_config_s config;
// Padding for the part of the struct we don't care about marshaling.
- [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24600, ArraySubType = UnmanagedType.U1)] public byte[] padding;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24600, ArraySubType = UnmanagedType.U1)]
+ public byte[] padding;
/// Anonymous_e6c7b779_b5a3_4e80_9fa8_13619d14f545
//public Anonymous_e6c7b779_b5a3_4e80_9fa8_13619d14f545 priv;
}
[StructLayout(LayoutKind.Sequential)]
- internal struct hb_audio_config_s
+ public struct hb_audio_config_s
{
public hb_audio_config_output_s output;
public hb_audio_config_input_s input;
@@ -750,7 +772,7 @@ namespace HandBrake.Interop
}
[StructLayout(LayoutKind.Sequential)]
- internal struct hb_audio_config_output_s
+ public struct hb_audio_config_output_s
{
/// int
public int track;
@@ -771,11 +793,12 @@ namespace HandBrake.Interop
public double dynamic_range_compression;
/// char*
- [MarshalAs(UnmanagedType.LPStr)] public string name;
+ [MarshalAs(UnmanagedType.LPStr)]
+ public string name;
}
[StructLayout(LayoutKind.Sequential)]
- internal struct hb_audio_config_input_s
+ public struct hb_audio_config_input_s
{
/// int
public int track;
@@ -803,48 +826,56 @@ namespace HandBrake.Interop
}
[StructLayout(LayoutKind.Explicit)]
- internal struct Anonymous_a0a59d69_d9a4_4003_a198_f7c51511e31d
+ public struct Anonymous_a0a59d69_d9a4_4003_a198_f7c51511e31d
{
/// int
- [FieldOffset(0)] public int ac3;
+ [FieldOffset(0)]
+ public int ac3;
/// int
- [FieldOffset(0)] public int dca;
+ [FieldOffset(0)]
+ public int dca;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- internal struct hb_audio_config_lang_s
+ public struct hb_audio_config_lang_s
{
/// char[1024]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)] public string description;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
+ public string description;
/// char[1024]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)] public string simple;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
+ public string simple;
/// char[4]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)] public string iso639_2;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
+ public string iso639_2;
/// uint8_t->unsigned char
public byte type;
}
[StructLayout(LayoutKind.Sequential)]
- internal struct hb_mixdown_s
+ public struct hb_mixdown_s
{
/// char*
- [MarshalAs(UnmanagedType.LPStr)] public string human_readable_name;
+ [MarshalAs(UnmanagedType.LPStr)]
+ public string human_readable_name;
/// char*
- [MarshalAs(UnmanagedType.LPStr)] public string internal_name;
+ [MarshalAs(UnmanagedType.LPStr)]
+ public string internal_name;
/// char*
- [MarshalAs(UnmanagedType.LPStr)] public string short_name;
+ [MarshalAs(UnmanagedType.LPStr)]
+ public string short_name;
/// int
public int amixdown;
}
- internal enum hb_subtitle_config_s_subdest
+ public enum hb_subtitle_config_s_subdest
{
RENDERSUB,
@@ -852,7 +883,7 @@ namespace HandBrake.Interop
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- internal struct hb_subtitle_config_s
+ public struct hb_subtitle_config_s
{
/// hb_subtitle_config_s_subdest
public hb_subtitle_config_s_subdest dest;
@@ -864,17 +895,19 @@ namespace HandBrake.Interop
public int default_track;
/// char[128]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string src_filename;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
+ public string src_filename;
/// char[40]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)] public string src_codeset;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
+ public string src_codeset;
/// int64_t->int
public long offset;
}
[StructLayout(LayoutKind.Sequential)]
- internal struct hb_fifo_s
+ public struct hb_fifo_s
{
/// hb_lock_t*
public IntPtr @lock;
@@ -896,12 +929,12 @@ namespace HandBrake.Interop
}
[StructLayout(LayoutKind.Sequential)]
- internal struct hb_lock_s
+ public struct hb_lock_s
{
}
[StructLayout(LayoutKind.Sequential)]
- internal struct hb_buffer_s
+ public struct hb_buffer_s
{
/// int
public int size;
@@ -910,7 +943,8 @@ namespace HandBrake.Interop
public int alloc;
/// uint8_t*
- [MarshalAs(UnmanagedType.LPStr)] public string data;
+ [MarshalAs(UnmanagedType.LPStr)]
+ public string data;
/// int
public int cur;
@@ -959,7 +993,7 @@ namespace HandBrake.Interop
}
[StructLayout(LayoutKind.Sequential)]
- internal struct hb_mux_data_s
+ public struct hb_mux_data_s
{
/// MP4TrackId->uint32_t->unsigned int
public uint track;
@@ -975,7 +1009,7 @@ namespace HandBrake.Interop
}
[StructLayout(LayoutKind.Sequential)]
- internal struct hb_interjob_s
+ public struct hb_interjob_s
{
/// int
public int last_job;
@@ -1001,13 +1035,14 @@ namespace HandBrake.Interop
/// Return Type: void
///param0: void*
- internal delegate void hb_thread_s_function(IntPtr param0);
+ public delegate void hb_thread_s_function(IntPtr param0);
[StructLayout(LayoutKind.Sequential)]
- internal struct hb_thread_s
+ public struct hb_thread_s
{
/// char*
- [MarshalAs(UnmanagedType.LPStr)] public string name;
+ [MarshalAs(UnmanagedType.LPStr)]
+ public string name;
/// int
public int priority;
@@ -1029,7 +1064,7 @@ namespace HandBrake.Interop
}
[StructLayout(LayoutKind.Sequential)]
- internal struct ptw32_handle_t
+ public struct ptw32_handle_t
{
/// void*
public IntPtr p;
@@ -1039,10 +1074,13 @@ namespace HandBrake.Interop
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void LoggingCallback(string message);
+ public delegate void LoggingCallback(string message);
- internal partial class HbLib
+ public partial class HbLib
{
+ [DllImport("hb.dll", EntryPoint = "hb_calc_bitrate", CallingConvention = CallingConvention.Cdecl)]
+ public static extern int hb_calc_bitrate(ref hb_job_s job, int size);
+
[DllImport("hb.dll", EntryPoint = "hb_register_logger", CallingConvention = CallingConvention.Cdecl)]
public static extern void hb_register_logger(LoggingCallback callback);
@@ -1108,8 +1146,7 @@ namespace HandBrake.Interop
///preview_count: int
///store_previews: int
[DllImport("hb.dll", EntryPoint = "hb_scan", CallingConvention = CallingConvention.Cdecl)]
- public static extern void hb_scan(IntPtr hbHandle, [In] [MarshalAs(UnmanagedType.LPStr)] string path,
- int title_index, int preview_count, int store_previews);
+ public static extern void hb_scan(IntPtr hbHandle, [In] [MarshalAs(UnmanagedType.LPStr)] string path, int title_index, int preview_count, int store_previews);
/// Return Type: hb_list_t*
@@ -1129,9 +1166,7 @@ namespace HandBrake.Interop
///prog_diff: int
///prog_threshold: int
[DllImport("hb.dll", EntryPoint = "hb_detect_comb", CallingConvention = CallingConvention.Cdecl)]
- public static extern int hb_detect_comb(ref hb_buffer_s buf, int width, int height, int color_equal,
- int color_diff, int threshold, int prog_equal, int prog_diff,
- int prog_threshold);
+ public static extern int hb_detect_comb(ref hb_buffer_s buf, int width, int height, int color_equal, int color_diff, int threshold, int prog_equal, int prog_diff, int prog_threshold);
[DllImport("hb.dll", EntryPoint = "hb_get_preview_by_index", CallingConvention = CallingConvention.Cdecl)]
public static extern void hb_get_preview_by_index(IntPtr hbHandle, int title_index, int picture, IntPtr buffer);
@@ -1152,11 +1187,8 @@ namespace HandBrake.Interop
[DllImport("hb.dll", EntryPoint = "hb_set_size", CallingConvention = CallingConvention.Cdecl)]
public static extern void hb_set_size(ref hb_job_s param0, double ratio, int pixels);
- [DllImport("hb.dll", EntryPoint = "hb_set_anamorphic_size_by_index", CallingConvention = CallingConvention.Cdecl
- )]
- public static extern void hb_set_anamorphic_size_by_index(IntPtr hbHandle, int title_index, ref int output_width,
- ref int output_height, ref int output_par_width,
- ref int output_par_height);
+ [DllImport("hb.dll", EntryPoint = "hb_set_anamorphic_size_by_index", CallingConvention = CallingConvention.Cdecl)]
+ public static extern void hb_set_anamorphic_size_by_index(IntPtr hbHandle, int title_index, ref int output_width, ref int output_height, ref int output_par_width, ref int output_par_height);
/// Return Type: void
///param0: hb_job_t*
@@ -1165,8 +1197,7 @@ namespace HandBrake.Interop
///output_par_width: int*
///output_par_height: int*
[DllImport("hb.dll", EntryPoint = "hb_set_anamorphic_size", CallingConvention = CallingConvention.Cdecl)]
- public static extern void hb_set_anamorphic_size(ref hb_job_s job, ref int output_width, ref int output_height,
- ref int output_par_width, ref int output_par_height);
+ public static extern void hb_set_anamorphic_size(ref hb_job_s job, ref int output_width, ref int output_height, ref int output_par_width, ref int output_par_height);
/// Return Type: int
@@ -1182,8 +1213,7 @@ namespace HandBrake.Interop
public static extern IntPtr hb_job(IntPtr hbHandle, int jobIndex);
[DllImport("hb.dll", EntryPoint = "hb_set_chapter_name", CallingConvention = CallingConvention.Cdecl)]
- public static extern void hb_set_chapter_name(IntPtr hbHandle, int title_index, int chapter_index,
- [In] [MarshalAs(UnmanagedType.LPStr)] string chapter_name);
+ public static extern void hb_set_chapter_name(IntPtr hbHandle, int title_index, int chapter_index, [In] [MarshalAs(UnmanagedType.LPStr)] string chapter_name);
[DllImport("hb.dll", EntryPoint = "hb_set_job", CallingConvention = CallingConvention.Cdecl)]
public static extern void hb_set_job(IntPtr hbHandle, int title_index, ref hb_job_s job);
@@ -1257,4 +1287,4 @@ namespace HandBrake.Interop
[DllImport("hb.dll", EntryPoint = "hb_global_close", CallingConvention = CallingConvention.Cdecl)]
public static extern void hb_global_close();
}
-} \ No newline at end of file
+}
diff --git a/win/C#/interop/InteropUtilities.cs b/win/C#/interop/InteropUtilities.cs
index c845933e5..d53c68883 100644
--- a/win/C#/interop/InteropUtilities.cs
+++ b/win/C#/interop/InteropUtilities.cs
@@ -1,16 +1,9 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="InteropUtilities.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>
-// Helper utilities for native interop.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrake.Interop
+namespace HandBrake.Interop
{
using System;
using System.Collections.Generic;
+ using System.Linq;
+ using System.Text;
using System.Runtime.InteropServices;
/// <summary>
diff --git a/win/C#/interop/Language.cs b/win/C#/interop/Language.cs
index f16f80c2b..609a4ec64 100644
--- a/win/C#/interop/Language.cs
+++ b/win/C#/interop/Language.cs
@@ -1,14 +1,10 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="Language.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>
-// Represents a language.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrake.Interop
+namespace HandBrake.Interop
{
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Text;
+
/// <summary>
/// Represents a language.
/// </summary>
diff --git a/win/C#/interop/LanguageCodes.cs b/win/C#/interop/LanguageCodes.cs
index 11e935e3b..0d45cc1da 100644
--- a/win/C#/interop/LanguageCodes.cs
+++ b/win/C#/interop/LanguageCodes.cs
@@ -1,15 +1,9 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="LanguageCodes.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>
-// Contains utilities for converting language codes.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrake.Interop
+namespace HandBrake.Interop
{
+ using System;
using System.Collections.Generic;
+ using System.Linq;
+ using System.Text;
/// <summary>
/// Contains utilities for converting language codes.
diff --git a/win/C#/interop/MessageLoggedEventArgs.cs b/win/C#/interop/MessageLoggedEventArgs.cs
index 81b77ed0e..a73b5ca0b 100644
--- a/win/C#/interop/MessageLoggedEventArgs.cs
+++ b/win/C#/interop/MessageLoggedEventArgs.cs
@@ -1,16 +1,10 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="MessageLoggedEventArgs.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 MessageLoggedEventArgs type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
namespace HandBrake.Interop
{
- using System;
-
public class MessageLoggedEventArgs : EventArgs
{
public string Message { get; set; }
diff --git a/win/C#/interop/Model/Cropping.cs b/win/C#/interop/Model/Cropping.cs
index e0a08061d..1ba0e8ee1 100644
--- a/win/C#/interop/Model/Cropping.cs
+++ b/win/C#/interop/Model/Cropping.cs
@@ -1,37 +1,15 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="Cropping.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 Cropping type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
-namespace HandBrake.Interop.Model
+namespace HandBrake.Interop
{
- /// <summary>
- /// Cropping T B L R
- /// </summary>
public class Cropping
{
- /// <summary>
- /// Gets or sets Top.
- /// </summary>
public int Top { get; set; }
-
- /// <summary>
- /// Gets or sets Bottom.
- /// </summary>
public int Bottom { get; set; }
-
- /// <summary>
- /// Gets or sets Left.
- /// </summary>
public int Left { get; set; }
-
- /// <summary>
- /// Gets or sets Right.
- /// </summary>
public int Right { get; set; }
}
}
diff --git a/win/C#/interop/Model/EncodeJob.cs b/win/C#/interop/Model/EncodeJob.cs
index d454c6b30..53058a921 100644
--- a/win/C#/interop/Model/EncodeJob.cs
+++ b/win/C#/interop/Model/EncodeJob.cs
@@ -1,32 +1,14 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="EncodeJob.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 EncodeJob type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Xml.Serialization;
-namespace HandBrake.Interop.Model
+namespace HandBrake.Interop
{
- using System;
- using System.Collections.Generic;
- using System.Xml.Serialization;
- using Encoding;
-
- /// <summary>
- /// An Encode Job
- /// </summary>
public class EncodeJob
{
- /// <summary>
- /// Gets or sets SourceType.
- /// </summary>
public SourceType SourceType { get; set; }
-
- /// <summary>
- /// Gets or sets SourcePath.
- /// </summary>
public string SourcePath { get; set; }
/// <summary>
@@ -38,56 +20,25 @@ namespace HandBrake.Interop.Model
/// Gets or sets the angle to encode. 0 for default, 1+ for specified angle.
/// </summary>
public int Angle { get; set; }
-
- /// <summary>
- /// Gets or sets ChapterStart.
- /// </summary>
public int ChapterStart { get; set; }
-
- /// <summary>
- /// Gets or sets ChapterEnd.
- /// </summary>
public int ChapterEnd { get; set; }
/// <summary>
/// Gets or sets the list of chosen audio tracks (1-based)
/// </summary>
public List<int> ChosenAudioTracks { get; set; }
-
- /// <summary>
- /// Gets or sets Subtitles.
- /// </summary>
public Subtitles Subtitles { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether UseDefaultChapterNames.
- /// </summary>
public bool UseDefaultChapterNames { get; set; }
-
- /// <summary>
- /// Gets or sets CustomChapterNames.
- /// </summary>
public List<string> CustomChapterNames { get; set; }
- /// <summary>
- /// Gets or sets OutputPath.
- /// </summary>
public string OutputPath { get; set; }
- /// <summary>
- /// Gets or sets EncodingProfile.
- /// </summary>
public EncodingProfile EncodingProfile { get; set; }
- /// <summary>
- /// The length of video to encode.
- /// </summary>
+ // The length of video to encode.
[XmlIgnore]
public TimeSpan Length { get; set; }
- /// <summary>
- /// Gets or sets XmlLength.
- /// </summary>
[XmlElement("Length")]
public string XmlLength
{
@@ -95,12 +46,6 @@ namespace HandBrake.Interop.Model
set { this.Length = TimeSpan.Parse(value); }
}
- /// <summary>
- /// Clone the Encode Job
- /// </summary>
- /// <returns>
- /// An EncodeJob Ojbect
- /// </returns>
public EncodeJob Clone()
{
EncodeJob clone = new EncodeJob
diff --git a/win/C#/interop/Model/Encoding/Anamorphic.cs b/win/C#/interop/Model/Encoding/Anamorphic.cs
index 1a7302d4e..65a7f2352 100644
--- a/win/C#/interop/Model/Encoding/Anamorphic.cs
+++ b/win/C#/interop/Model/Encoding/Anamorphic.cs
@@ -1,17 +1,10 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="Anamorphic.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 Anamorphic type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
-namespace HandBrake.Interop.Model.Encoding
+namespace HandBrake.Interop
{
- /// <summary>
- /// Anamorphic Modes
- /// </summary>
public enum Anamorphic
{
[DisplayString("None")]
diff --git a/win/C#/interop/Model/Encoding/AudioEncoder.cs b/win/C#/interop/Model/Encoding/AudioEncoder.cs
index a9efed80f..b4eee5249 100644
--- a/win/C#/interop/Model/Encoding/AudioEncoder.cs
+++ b/win/C#/interop/Model/Encoding/AudioEncoder.cs
@@ -1,16 +1,10 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <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
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HandBrake.Interop
{
- /// <summary>
- /// Audio Encoder
- /// </summary>
public enum AudioEncoder
{
[DisplayString("AAC (faac)")]
diff --git a/win/C#/interop/Model/Encoding/AudioEncoding.cs b/win/C#/interop/Model/Encoding/AudioEncoding.cs
index a957e2397..8ff112c35 100644
--- a/win/C#/interop/Model/Encoding/AudioEncoding.cs
+++ b/win/C#/interop/Model/Encoding/AudioEncoding.cs
@@ -1,47 +1,17 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="AudioEncoding.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 AudioEncoding type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
-namespace HandBrake.Interop.Model.Encoding
+namespace HandBrake.Interop
{
- /// <summary>
- /// Audio Encoding
- /// </summary>
public class AudioEncoding
{
- /// <summary>
- /// Gets or sets InputNumber.
- /// </summary>
public int InputNumber { get; set; }
-
- /// <summary>
- /// Gets or sets Encoder.
- /// </summary>
public AudioEncoder Encoder { get; set; }
-
- /// <summary>
- /// Gets or sets Bitrate.
- /// </summary>
public int Bitrate { get; set; }
-
- /// <summary>
- /// Gets or sets Mixdown.
- /// </summary>
public Mixdown Mixdown { get; set; }
-
- /// <summary>
- /// Gets or sets SampleRate.
- /// </summary>
public string SampleRate { get; set; }
-
- /// <summary>
- /// Gets or sets Drc.
- /// </summary>
public double Drc { get; set; }
}
}
diff --git a/win/C#/interop/Model/Encoding/Decomb.cs b/win/C#/interop/Model/Encoding/Decomb.cs
index 966a2c164..9060b01eb 100644
--- a/win/C#/interop/Model/Encoding/Decomb.cs
+++ b/win/C#/interop/Model/Encoding/Decomb.cs
@@ -1,17 +1,10 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="Decomb.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 Decomb type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
-namespace HandBrake.Interop.Model.Encoding
+namespace HandBrake.Interop
{
- /// <summary>
- /// Decomb Mode. Off, Default or Custom
- /// </summary>
public enum Decomb
{
Off = 0,
diff --git a/win/C#/interop/Model/Encoding/Deinterlace.cs b/win/C#/interop/Model/Encoding/Deinterlace.cs
index 1ef4acb7c..365f6003c 100644
--- a/win/C#/interop/Model/Encoding/Deinterlace.cs
+++ b/win/C#/interop/Model/Encoding/Deinterlace.cs
@@ -1,17 +1,10 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="Deinterlace.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 Deinterlace type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
-namespace HandBrake.Interop.Model.Encoding
+namespace HandBrake.Interop
{
- /// <summary>
- /// Delinterlace Mode
- /// </summary>
public enum Deinterlace
{
Off = 0,
diff --git a/win/C#/interop/Model/Encoding/Denoise.cs b/win/C#/interop/Model/Encoding/Denoise.cs
index 526d37d39..146cbfd6f 100644
--- a/win/C#/interop/Model/Encoding/Denoise.cs
+++ b/win/C#/interop/Model/Encoding/Denoise.cs
@@ -1,17 +1,10 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="Denoise.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 Denoise type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
-namespace HandBrake.Interop.Model.Encoding
+namespace HandBrake.Interop
{
- /// <summary>
- /// Denose Mode
- /// </summary>
public enum Denoise
{
Off = 0,
diff --git a/win/C#/interop/Model/Encoding/Detelecine.cs b/win/C#/interop/Model/Encoding/Detelecine.cs
index 7380a94eb..028abf44b 100644
--- a/win/C#/interop/Model/Encoding/Detelecine.cs
+++ b/win/C#/interop/Model/Encoding/Detelecine.cs
@@ -1,17 +1,10 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="Detelecine.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 Detelecine type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
-namespace HandBrake.Interop.Model.Encoding
+namespace HandBrake.Interop
{
- /// <summary>
- /// Detelecine Modes
- /// </summary>
public enum Detelecine
{
Off = 0,
diff --git a/win/C#/interop/Model/Encoding/EncodingProfile.cs b/win/C#/interop/Model/Encoding/EncodingProfile.cs
index e7d4e81a8..af287a7e6 100644
--- a/win/C#/interop/Model/Encoding/EncodingProfile.cs
+++ b/win/C#/interop/Model/Encoding/EncodingProfile.cs
@@ -1,18 +1,10 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="EncodingProfile.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 EncodingProfile type.
-// </summary>
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
-namespace HandBrake.Interop.Model.Encoding
+namespace HandBrake.Interop
{
- using System.Collections.Generic;
-
- /// <summary>
- /// Encode Profiles
- /// </summary>
public class EncodingProfile
{
public EncodingProfile()
@@ -61,15 +53,10 @@ namespace HandBrake.Interop.Model.Encoding
public bool TwoPass { get; set; }
public bool TurboFirstPass { get; set; }
public double Framerate { get; set; }
+ public bool PeakFramerate { get; set; }
public List<AudioEncoding> AudioEncodings { get; set; }
- /// <summary>
- /// Clone this encode profile
- /// </summary>
- /// <returns>
- /// An Encode Profile Object
- /// </returns>
public EncodingProfile Clone()
{
EncodingProfile profile = new EncodingProfile
@@ -115,6 +102,7 @@ namespace HandBrake.Interop.Model.Encoding
TwoPass = this.TwoPass,
TurboFirstPass = this.TurboFirstPass,
Framerate = this.Framerate,
+ PeakFramerate = this.PeakFramerate,
AudioEncodings = new List<AudioEncoding>(this.AudioEncodings)
};
diff --git a/win/C#/interop/Model/Encoding/Mixdown.cs b/win/C#/interop/Model/Encoding/Mixdown.cs
index a4df6a196..2049d0921 100644
--- a/win/C#/interop/Model/Encoding/Mixdown.cs
+++ b/win/C#/interop/Model/Encoding/Mixdown.cs
@@ -1,17 +1,10 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="Mixdown.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 Mixdown type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
-namespace HandBrake.Interop.Model.Encoding
+namespace HandBrake.Interop
{
- /// <summary>
- /// The Mixdown mode
- /// </summary>
public enum Mixdown
{
[DisplayString("Dolby Pro Logic II")]
diff --git a/win/C#/interop/Model/Encoding/OutputExtension.cs b/win/C#/interop/Model/Encoding/OutputExtension.cs
index c3e352444..bcf709576 100644
--- a/win/C#/interop/Model/Encoding/OutputExtension.cs
+++ b/win/C#/interop/Model/Encoding/OutputExtension.cs
@@ -1,17 +1,10 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="OutputExtension.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 OutputExtension type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
-namespace HandBrake.Interop.Model.Encoding
+namespace HandBrake.Interop
{
- /// <summary>
- /// Output File Extension
- /// </summary>
public enum OutputExtension
{
Mp4,
diff --git a/win/C#/interop/Model/Encoding/OutputFormat.cs b/win/C#/interop/Model/Encoding/OutputFormat.cs
index e0b0e8d1a..52549e763 100644
--- a/win/C#/interop/Model/Encoding/OutputFormat.cs
+++ b/win/C#/interop/Model/Encoding/OutputFormat.cs
@@ -1,17 +1,11 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="OutputFormat.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// Defines the OutputFormat type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.ComponentModel;
-namespace HandBrake.Interop.Model.Encoding
+namespace HandBrake.Interop
{
- /// <summary>
- /// Output File Format
- /// </summary>
public enum OutputFormat
{
[DisplayString("MP4")]
diff --git a/win/C#/interop/Model/Encoding/VideoEncodeRateType.cs b/win/C#/interop/Model/Encoding/VideoEncodeRateType.cs
index b111da811..6c39e54d6 100644
--- a/win/C#/interop/Model/Encoding/VideoEncodeRateType.cs
+++ b/win/C#/interop/Model/Encoding/VideoEncodeRateType.cs
@@ -1,17 +1,10 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="VideoEncodeRateType.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 VideoEncodeRateType type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
-namespace HandBrake.Interop.Model.Encoding
+namespace HandBrake.Interop
{
- /// <summary>
- /// Video Encoder Encode Mode
- /// </summary>
public enum VideoEncodeRateType
{
TargetSize = 0,
diff --git a/win/C#/interop/Model/Encoding/VideoEncoder.cs b/win/C#/interop/Model/Encoding/VideoEncoder.cs
index b5c23048c..912117b48 100644
--- a/win/C#/interop/Model/Encoding/VideoEncoder.cs
+++ b/win/C#/interop/Model/Encoding/VideoEncoder.cs
@@ -1,17 +1,10 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <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>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
-namespace HandBrake.Interop.Model.Encoding
+namespace HandBrake.Interop
{
- /// <summary>
- /// Video Encoder
- /// </summary>
public enum VideoEncoder
{
[DisplayString("H.264 (x264)")]
diff --git a/win/C#/interop/Model/Size.cs b/win/C#/interop/Model/Size.cs
new file mode 100644
index 000000000..f94cbd2fa
--- /dev/null
+++ b/win/C#/interop/Model/Size.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HandBrake.Interop
+{
+ public class Size
+ {
+ public Size(int width, int height)
+ {
+ this.Width = width;
+ this.Height = height;
+ }
+
+ public int Width { get; set; }
+ public int Height { get; set; }
+ }
+}
diff --git a/win/C#/interop/Model/SourceSubtitle.cs b/win/C#/interop/Model/SourceSubtitle.cs
index b90212013..edfb68bf7 100644
--- a/win/C#/interop/Model/SourceSubtitle.cs
+++ b/win/C#/interop/Model/SourceSubtitle.cs
@@ -1,45 +1,20 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="SourceSubtitle.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 SourceSubtitle type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
-namespace HandBrake.Interop.Model
+namespace HandBrake.Interop
{
- /// <summary>
- /// A Source Subtitle
- /// </summary>
public class SourceSubtitle
{
/// <summary>
/// Gets or sets the 1-based subtitle track number. 0 means foriegn audio search.
/// </summary>
public int TrackNumber { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether the subtitle is Default.
- /// </summary>
public bool Default { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether the subtitle is Forced.
- /// </summary>
public bool Forced { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether the subtitle is BurnedIn.
- /// </summary>
public bool BurnedIn { get; set; }
- /// <summary>
- /// Clone the Source Subtitle
- /// </summary>
- /// <returns>
- /// A Source Subtitle
- /// </returns>
public SourceSubtitle Clone()
{
return new SourceSubtitle
diff --git a/win/C#/interop/Model/SourceType.cs b/win/C#/interop/Model/SourceType.cs
index f15639cbc..1a53aab32 100644
--- a/win/C#/interop/Model/SourceType.cs
+++ b/win/C#/interop/Model/SourceType.cs
@@ -1,37 +1,10 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="SourceType.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 SourceType type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrake.Interop.Model
+namespace HandBrake.Interop
{
- /// <summary>
- /// The Source Type. (File, Folder, DVD)
- /// </summary>
public enum SourceType
{
- /// <summary>
- /// None
- /// </summary>
None = 0,
-
- /// <summary>
- /// File
- /// </summary>
File,
-
- /// <summary>
- /// Video Folder
- /// </summary>
VideoFolder,
-
- /// <summary>
- /// DVD
- /// </summary>
Dvd
}
} \ No newline at end of file
diff --git a/win/C#/interop/Model/SrtSubtitle.cs b/win/C#/interop/Model/SrtSubtitle.cs
index e6cb2f152..199fe6ac6 100644
--- a/win/C#/interop/Model/SrtSubtitle.cs
+++ b/win/C#/interop/Model/SrtSubtitle.cs
@@ -1,50 +1,18 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="SrtSubtitle.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 SrtSubtitle type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
-namespace HandBrake.Interop.Model
+namespace HandBrake.Interop
{
- /// <summary>
- /// A Srt Subtitle
- /// </summary>
public class SrtSubtitle
{
- /// <summary>
- /// Gets or sets a value indicating whether Default.
- /// </summary>
public bool Default { get; set; }
-
- /// <summary>
- /// Gets or sets FileName.
- /// </summary>
public string FileName { get; set; }
-
- /// <summary>
- /// Gets or sets LanguageCode.
- /// </summary>
public string LanguageCode { get; set; }
-
- /// <summary>
- /// Gets or sets CharacterCode.
- /// </summary>
public string CharacterCode { get; set; }
-
- /// <summary>
- /// Gets or sets Offset.
- /// </summary>
public int Offset { get; set; }
- /// <summary>
- /// Close the SRT Subtitle object
- /// </summary>
- /// <returns>
- /// a SrtSubtitle
- /// </returns>
public SrtSubtitle Clone()
{
return new SrtSubtitle
diff --git a/win/C#/interop/Model/Subtitles.cs b/win/C#/interop/Model/Subtitles.cs
index ace470280..1fab7354e 100644
--- a/win/C#/interop/Model/Subtitles.cs
+++ b/win/C#/interop/Model/Subtitles.cs
@@ -1,29 +1,13 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="Subtitles.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 Subtitles type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
-namespace HandBrake.Interop.Model
+namespace HandBrake.Interop
{
- using System.Collections.Generic;
-
- /// <summary>
- /// Subtitles
- /// </summary>
public class Subtitles
{
- /// <summary>
- /// Gets or sets SrtSubtitles.
- /// </summary>
public List<SrtSubtitle> SrtSubtitles { get; set; }
-
- /// <summary>
- /// Gets or sets SourceSubtitles.
- /// </summary>
public List<SourceSubtitle> SourceSubtitles { get; set; }
}
}
diff --git a/win/C#/interop/NativeList.cs b/win/C#/interop/NativeList.cs
index 934803b55..c16c09950 100644
--- a/win/C#/interop/NativeList.cs
+++ b/win/C#/interop/NativeList.cs
@@ -1,16 +1,9 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="NativeList.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>
-// Represents a HandBrake style native list.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrake.Interop
+namespace HandBrake.Interop
{
using System;
using System.Collections.Generic;
+ using System.Linq;
+ using System.Text;
/// <summary>
/// Represents a HandBrake style native list.
diff --git a/win/C#/interop/Properties/AssemblyInfo.cs b/win/C#/interop/Properties/AssemblyInfo.cs
index 7e4107e12..228f27c5c 100644
--- a/win/C#/interop/Properties/AssemblyInfo.cs
+++ b/win/C#/interop/Properties/AssemblyInfo.cs
@@ -8,9 +8,9 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTitle("HandBrakeInterop")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("HandBrake Team")]
+[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("HandBrakeInterop")]
-[assembly: AssemblyCopyright("Copyright © HandBrake Team")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.3.0.0")]
-[assembly: AssemblyFileVersion("1.3.0.0")]
+[assembly: AssemblyVersion("1.5.0.0")]
+[assembly: AssemblyFileVersion("1.5.0.0")]
diff --git a/win/C#/interop/ScanProgressEventArgs.cs b/win/C#/interop/ScanProgressEventArgs.cs
index 2087e1d11..f7e3a0f67 100644
--- a/win/C#/interop/ScanProgressEventArgs.cs
+++ b/win/C#/interop/ScanProgressEventArgs.cs
@@ -1,29 +1,13 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="ScanProgressEventArgs.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// Defines the ScanProgressEventArgs type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
namespace HandBrake.Interop
{
- using System;
-
- /// <summary>
- /// Scan Progress Event Arugments
- /// </summary>
public class ScanProgressEventArgs : EventArgs
{
- /// <summary>
- /// Gets or sets CurrentTitle.
- /// </summary>
public int CurrentTitle { get; set; }
-
- /// <summary>
- /// Gets or sets Titles.
- /// </summary>
public int Titles { get; set; }
}
}
diff --git a/win/C#/interop/SourceData/AudioTrack.cs b/win/C#/interop/SourceData/AudioTrack.cs
index 76de1b65a..735ddd965 100644
--- a/win/C#/interop/SourceData/AudioTrack.cs
+++ b/win/C#/interop/SourceData/AudioTrack.cs
@@ -1,13 +1,15 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="AudioTrack.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// An object represending an AudioTrack associated with a Title, in a DVD
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+/* AudioTrack.cs $
+
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
-namespace HandBrake.Interop.SourceData
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text.RegularExpressions;
+
+namespace HandBrake.SourceData
{
/// <summary>
/// An object represending an AudioTrack associated with a Title, in a DVD
@@ -15,38 +17,29 @@ namespace HandBrake.Interop.SourceData
public class AudioTrack
{
/// <summary>
- /// Gets or sets the track number of this Audio Track
+ /// The track number of this Audio Track
/// </summary>
public int TrackNumber { get; set; }
/// <summary>
- /// Gets or sets the language (if detected) of this Audio Track
+ /// The language (if detected) of this Audio Track
/// </summary>
public string Language { get; set; }
- /// <summary>
- /// Gets or sets LanguageCode.
- /// </summary>
public string LanguageCode { get; set; }
- /// <summary>
- /// Gets or sets Description.
- /// </summary>
public string Description { get; set; }
/// <summary>
- /// Gets or sets the frequency (in MHz) of this Audio Track
+ /// The frequency (in MHz) of this Audio Track
/// </summary>
public int SampleRate { get; set; }
/// <summary>
- /// Gets or sets the bitrate (in kbps) of this Audio Track
+ /// The bitrate (in kbps) of this Audio Track
/// </summary>
public int Bitrate { get; set; }
- /// <summary>
- /// Gets Display.
- /// </summary>
public string Display
{
get
@@ -55,9 +48,6 @@ namespace HandBrake.Interop.SourceData
}
}
- /// <summary>
- /// Gets NoTrackDisplay.
- /// </summary>
public string NoTrackDisplay
{
get
@@ -75,18 +65,16 @@ namespace HandBrake.Interop.SourceData
return this.GetDisplayString(true);
}
- /// <summary>
- /// Get the Display String
- /// </summary>
- /// <param name="includeTrackNumber">
- /// The include track number.
- /// </param>
- /// <returns>
- /// A String
- /// </returns>
private string GetDisplayString(bool includeTrackNumber)
{
- return includeTrackNumber ? (this.TrackNumber + " " + this.Description) : this.Description;
+ if (includeTrackNumber)
+ {
+ return this.TrackNumber + " " + this.Description;
+ }
+ else
+ {
+ return this.Description;
+ }
}
}
} \ No newline at end of file
diff --git a/win/C#/interop/SourceData/Chapter.cs b/win/C#/interop/SourceData/Chapter.cs
index 0c3077f7d..8e41282c4 100644
--- a/win/C#/interop/SourceData/Chapter.cs
+++ b/win/C#/interop/SourceData/Chapter.cs
@@ -1,28 +1,28 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="Chapter.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// An object representing a Chapter aosciated with a Title, in a DVD
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+/* Chapter.cs $
+
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
-namespace HandBrake.Interop.SourceData
-{
- using System;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text.RegularExpressions;
+namespace HandBrake.SourceData
+{
/// <summary>
/// An object representing a Chapter aosciated with a Title, in a DVD
/// </summary>
public class Chapter
{
/// <summary>
- /// Gets or sets the number of this Chapter, in regards to its parent Title
+ /// The number of this Chapter, in regards to its parent Title
/// </summary>
public int ChapterNumber { get; set; }
/// <summary>
- /// Gets or sets the length in time this Chapter spans
+ /// The length in time this Chapter spans
/// </summary>
public TimeSpan Duration { get; set; }
diff --git a/win/C#/interop/SourceData/Subtitle.cs b/win/C#/interop/SourceData/Subtitle.cs
index f460b16c2..bf5d4e548 100644
--- a/win/C#/interop/SourceData/Subtitle.cs
+++ b/win/C#/interop/SourceData/Subtitle.cs
@@ -1,13 +1,14 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="Subtitle.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// An object that represents a subtitle associated with a Title, in a DVD
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrake.Interop.SourceData
+/* Subtitle.cs $
+
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
+
+using System.Collections.Generic;
+using System.IO;
+using System.Text.RegularExpressions;
+
+namespace HandBrake.SourceData
{
/// <summary>
/// An object that represents a subtitle associated with a Title, in a DVD
@@ -15,33 +16,37 @@ namespace HandBrake.Interop.SourceData
public class Subtitle
{
/// <summary>
- /// Gets or sets the track number of this Subtitle
+ /// The track number of this Subtitle
/// </summary>
public int TrackNumber { get; set; }
/// <summary>
- /// Gets or sets the language (if detected) of this Subtitle
+ /// The language (if detected) of this Subtitle
/// </summary>
public string Language { get; set; }
/// <summary>
- /// Gets or sets Langauage Code
+ /// Langauage Code
/// </summary>
public string LanguageCode { get; set; }
- /// <summary>
- /// Gets or sets SubtitleType.
- /// </summary>
public SubtitleType SubtitleType { get; set; }
/// <summary>
- /// Gets Subtitle Type
+ /// Subtitle Type
/// </summary>
public string TypeString
{
get
{
- return this.SubtitleType == SubtitleType.Picture ? "Bitmap" : "Text";
+ if (this.SubtitleType == SubtitleType.Picture)
+ {
+ return "Bitmap";
+ }
+ else
+ {
+ return "Text";
+ }
}
}
@@ -53,5 +58,13 @@ namespace HandBrake.Interop.SourceData
{
return string.Format("{0} {1} ({2})", this.TrackNumber, this.Language, this.TypeString);
}
+
+ public string Display
+ {
+ get
+ {
+ return this.ToString();
+ }
+ }
}
} \ No newline at end of file
diff --git a/win/C#/interop/SourceData/SubtitleType.cs b/win/C#/interop/SourceData/SubtitleType.cs
index 5bbe5abc0..68904fed4 100644
--- a/win/C#/interop/SourceData/SubtitleType.cs
+++ b/win/C#/interop/SourceData/SubtitleType.cs
@@ -1,29 +1,13 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="SubtitleType.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// Defines the SubtitleType type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
-namespace HandBrake.Interop.SourceData
+namespace HandBrake.SourceData
{
- /// <summary>
- /// Subtitle Type.
- /// 0: Picture
- /// 1: Text
- /// </summary>
public enum SubtitleType
{
- /// <summary>
- /// Picture Subtitle
- /// </summary>
Picture,
-
- /// <summary>
- /// Text Subtitle
- /// </summary>
Text
}
}
diff --git a/win/C#/interop/SourceData/Title.cs b/win/C#/interop/SourceData/Title.cs
index 049977991..8d69494ef 100644
--- a/win/C#/interop/SourceData/Title.cs
+++ b/win/C#/interop/SourceData/Title.cs
@@ -1,82 +1,91 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="Title.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// An object that represents a single Title of a DVD
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
+/* Title.cs $
+
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
-using System.Drawing;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Text.RegularExpressions;
+using HandBrake.Interop;
-namespace HandBrake.Interop.SourceData
+namespace HandBrake.SourceData
{
- using System;
- using System.Collections.Generic;
- using Model;
-
/// <summary>
/// An object that represents a single Title of a DVD
/// </summary>
public class Title
{
+ private static readonly CultureInfo Culture = new CultureInfo("en-US", false);
+ private readonly List<AudioTrack> audioTracks;
+ private readonly List<Chapter> chapters;
+ private readonly List<Subtitle> subtitles;
+
/// <summary>
- /// Initializes a new instance of the <see cref="Title"/> class.
+ /// The constructor for this object
/// </summary>
public Title()
{
- this.AudioTracks = new List<AudioTrack>();
- this.Chapters = new List<Chapter>();
- this.Subtitles = new List<Subtitle>();
+ this.audioTracks = new List<AudioTrack>();
+ this.chapters = new List<Chapter>();
+ this.subtitles = new List<Subtitle>();
}
/// <summary>
- /// Gets Collection of chapters in this Title
+ /// Collection of chapters in this Title
/// </summary>
- public List<Chapter> Chapters { get; private set; }
+ public List<Chapter> Chapters
+ {
+ get { return this.chapters; }
+ }
/// <summary>
- /// Gets Collection of audio tracks associated with this Title
+ /// Collection of audio tracks associated with this Title
/// </summary>
- public List<AudioTrack> AudioTracks { get; private set; }
+ public List<AudioTrack> AudioTracks
+ {
+ get { return this.audioTracks; }
+ }
/// <summary>
- /// Gets Collection of subtitles associated with this Title
+ /// Collection of subtitles associated with this Title
/// </summary>
- public List<Subtitle> Subtitles { get; private set; }
+ public List<Subtitle> Subtitles
+ {
+ get { return this.subtitles; }
+ }
/// <summary>
- /// Gets or sets The track number of this Title (1-based).
+ /// The track number of this Title (1-based).
/// </summary>
public int TitleNumber { get; set; }
/// <summary>
- /// Gets or sets The length in time of this Title
+ /// The length in time of this Title
/// </summary>
public TimeSpan Duration { get; set; }
/// <summary>
- /// Gets or sets The resolution (width/height) of this Title
+ /// The resolution (width/height) of this Title
/// </summary>
public Size Resolution { get; set; }
/// <summary>
- /// Gets or sets The aspect ratio of this Title
+ /// The aspect ratio of this Title
/// </summary>
public double AspectRatio { get; set; }
- /// <summary>
- /// Gets or sets AngleCount.
- /// </summary>
public int AngleCount { get; set; }
/// <summary>
- /// Gets or sets Par Value
+ /// Par Value
/// </summary>
public Size ParVal { get; set; }
/// <summary>
- /// Gets or sets the automatically detected crop region for this Title.
+ /// The automatically detected crop region for this Title.
/// This is an int array with 4 items in it as so:
/// 0:
/// 1:
@@ -84,17 +93,6 @@ namespace HandBrake.Interop.SourceData
/// 3:
/// </summary>
public Cropping AutoCropDimensions { get; set; }
-
- /// <summary>
- /// Gets Display.
- /// </summary>
- public string Display
- {
- get
- {
- return this.ToString();
- }
- }
/// <summary>
/// Override of the ToString method to provide an easy way to use this object in the UI
@@ -105,5 +103,13 @@ namespace HandBrake.Interop.SourceData
return string.Format("{0} ({1:00}:{2:00}:{3:00})", this.TitleNumber, this.Duration.Hours,
this.Duration.Minutes, this.Duration.Seconds);
}
+
+ public string Display
+ {
+ get
+ {
+ return this.ToString();
+ }
+ }
}
} \ No newline at end of file
diff --git a/win/C#/libraries/Growl.Connector.dll b/win/C#/libraries/Growl.Connector.dll
index 62958a834..01c0c59f6 100644
--- a/win/C#/libraries/Growl.Connector.dll
+++ b/win/C#/libraries/Growl.Connector.dll
Binary files differ
diff --git a/win/C#/libraries/Growl.CoreLibrary.dll b/win/C#/libraries/Growl.CoreLibrary.dll
index 06429c0c9..ca1545cff 100644
--- a/win/C#/libraries/Growl.CoreLibrary.dll
+++ b/win/C#/libraries/Growl.CoreLibrary.dll
Binary files differ