]> granicus.if.org Git - handbrake/commitdiff
WinGui: Switch from using the Interop binary lib, to the source version which is...
authorsr55 <sr55.hb@outlook.com>
Sat, 16 Jul 2011 15:09:30 +0000 (15:09 +0000)
committersr55 <sr55.hb@outlook.com>
Sat, 16 Jul 2011 15:09:30 +0000 (15:09 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4107 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs
win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
win/CS/libraries/HandBrakeInterop.dll [deleted file]
win/CS/libraries/HandBrakeInterop.pdb [deleted file]

index f03d9368891eca1104d222f705274dbb5e3cc06c..8485480fcd331795e5d60b176065dbc96e0186be 100644 (file)
@@ -10,9 +10,9 @@ namespace HandBrake.ApplicationServices.Functions
 \r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Model.Encoding;\r
-    using HandBrake.Interop;\r
+    using HandBrake.Interop.Model;\r
+    using HandBrake.Interop.Model.Encoding;\r
 \r
-    using Cropping = HandBrake.Interop.Cropping;\r
     using Decomb = HandBrake.ApplicationServices.Model.Encoding.Decomb;\r
     using Deinterlace = HandBrake.ApplicationServices.Model.Encoding.Deinterlace;\r
     using Denoise = HandBrake.ApplicationServices.Model.Encoding.Denoise;\r
@@ -58,16 +58,16 @@ namespace HandBrake.ApplicationServices.Functions
             switch (work.Anamorphic)\r
             {\r
                 case Model.Encoding.Anamorphic.Custom:\r
-                    profile.Anamorphic = Interop.Anamorphic.Custom;\r
+                    profile.Anamorphic = Interop.Model.Encoding.Anamorphic.Custom;\r
                     break;\r
                 case Model.Encoding.Anamorphic.Strict:\r
-                    profile.Anamorphic = Interop.Anamorphic.Strict;\r
+                    profile.Anamorphic = Interop.Model.Encoding.Anamorphic.Strict;\r
                     break;\r
                 case Model.Encoding.Anamorphic.Loose:\r
-                    profile.Anamorphic = Interop.Anamorphic.Loose;\r
+                    profile.Anamorphic = Interop.Model.Encoding.Anamorphic.Loose;\r
                     break;\r
                 case Model.Encoding.Anamorphic.None:\r
-                    profile.Anamorphic = Interop.Anamorphic.None;\r
+                    profile.Anamorphic = Interop.Model.Encoding.Anamorphic.None;\r
                     break;\r
             }\r
 \r
@@ -89,7 +89,7 @@ namespace HandBrake.ApplicationServices.Functions
                 profile.AudioEncodings.Add(newTrack);\r
             }\r
 \r
-            profile.Cropping = new Cropping\r
+            profile.Cropping = new HandBrake.Interop.Model.Cropping\r
                 {\r
                     Top = work.Cropping.Top,\r
                     Bottom = work.Cropping.Bottom,\r
@@ -106,35 +106,35 @@ namespace HandBrake.ApplicationServices.Functions
             switch (work.Decomb)\r
             {\r
                 case Decomb.Default:\r
-                    profile.Decomb = Interop.Decomb.Default;\r
+                    profile.Decomb = Interop.Model.Encoding.Decomb.Default;\r
                     break;\r
                 case Decomb.Custom:\r
-                    profile.Decomb = Interop.Decomb.Custom;\r
+                    profile.Decomb = Interop.Model.Encoding.Decomb.Custom;\r
                     break;\r
                 case Decomb.Off:\r
-                    profile.Decomb = Interop.Decomb.Off;\r
+                    profile.Decomb = Interop.Model.Encoding.Decomb.Off;\r
                     break;\r
             }\r
 \r
             switch (work.Deinterlace)\r
             {\r
                 case Deinterlace.Fast:\r
-                    profile.Deinterlace = Interop.Deinterlace.Fast;\r
+                    profile.Deinterlace = Interop.Model.Encoding.Deinterlace.Fast;\r
                     break;\r
                 case Deinterlace.Slow:\r
-                    profile.Deinterlace = Interop.Deinterlace.Slow;\r
+                    profile.Deinterlace = Interop.Model.Encoding.Deinterlace.Slow;\r
                     break;\r
                 case Deinterlace.Slower:\r
-                    profile.Deinterlace = Interop.Deinterlace.Slower;\r
+                    profile.Deinterlace = Interop.Model.Encoding.Deinterlace.Slower;\r
                     break;\r
                 case Deinterlace.Slowest:\r
-                    profile.Deinterlace = Interop.Deinterlace.Slower;\r
+                    profile.Deinterlace = Interop.Model.Encoding.Deinterlace.Slower;\r
                     break;\r
                 case Deinterlace.Custom:\r
-                    profile.Deinterlace = Interop.Deinterlace.Custom;\r
+                    profile.Deinterlace = Interop.Model.Encoding.Deinterlace.Custom;\r
                     break;\r
                 case Deinterlace.Off:\r
-                    profile.Deinterlace = Interop.Deinterlace.Off;\r
+                    profile.Deinterlace = Interop.Model.Encoding.Deinterlace.Off;\r
                     break;\r
             }\r
 \r
@@ -142,32 +142,32 @@ namespace HandBrake.ApplicationServices.Functions
             switch (work.Denoise)\r
             {\r
                 case Denoise.Off:\r
-                    profile.Denoise = Interop.Denoise.Off;\r
+                    profile.Denoise = Interop.Model.Encoding.Denoise.Off;\r
                     break;\r
                 case Denoise.Custom:\r
-                    profile.Denoise = Interop.Denoise.Custom;\r
+                    profile.Denoise = Interop.Model.Encoding.Denoise.Custom;\r
                     break;\r
                 case Denoise.Strong:\r
-                    profile.Denoise = Interop.Denoise.Strong;\r
+                    profile.Denoise = Interop.Model.Encoding.Denoise.Strong;\r
                     break;\r
                 case Denoise.Medium:\r
-                    profile.Denoise = Interop.Denoise.Medium;\r
+                    profile.Denoise = Interop.Model.Encoding.Denoise.Medium;\r
                     break;\r
                 case Denoise.Weak:\r
-                    profile.Denoise = Interop.Denoise.Weak;\r
+                    profile.Denoise = Interop.Model.Encoding.Denoise.Weak;\r
                     break;\r
             }\r
 \r
             switch (work.Detelecine)\r
             {\r
                 case Detelecine.Default:\r
-                    profile.Detelecine = Interop.Detelecine.Default;\r
+                    profile.Detelecine = Interop.Model.Encoding.Detelecine.Default;\r
                     break;\r
                 case Detelecine.Custom:\r
-                    profile.Detelecine = Interop.Detelecine.Custom;\r
+                    profile.Detelecine = Interop.Model.Encoding.Detelecine.Custom;\r
                     break;\r
                 case Detelecine.Off:\r
-                    profile.Detelecine = Interop.Detelecine.Off;\r
+                    profile.Detelecine = Interop.Model.Encoding.Detelecine.Off;\r
                     break;\r
             }\r
 \r
@@ -189,10 +189,10 @@ namespace HandBrake.ApplicationServices.Functions
             {\r
                 case OutputFormat.Mp4:\r
                 case OutputFormat.M4V:\r
-                    profile.OutputFormat = Interop.OutputFormat.Mp4;\r
+                    profile.OutputFormat = Interop.Model.Encoding.OutputFormat.Mp4;\r
                     break;\r
                 case OutputFormat.Mkv:\r
-                    profile.OutputFormat = Interop.OutputFormat.Mkv;\r
+                    profile.OutputFormat = Interop.Model.Encoding.OutputFormat.Mkv;\r
                     break;\r
             }\r
             profile.PeakFramerate = work.FramerateMode == FramerateMode.PFR;\r
@@ -202,10 +202,10 @@ namespace HandBrake.ApplicationServices.Functions
             switch (work.OutputFormat)\r
             {\r
                 case OutputFormat.Mp4:\r
-                    profile.PreferredExtension = Interop.OutputExtension.Mp4;\r
+                    profile.PreferredExtension = Interop.Model.Encoding.OutputExtension.Mp4;\r
                     break;\r
                 case OutputFormat.M4V:\r
-                    profile.PreferredExtension = Interop.OutputExtension.M4v;\r
+                    profile.PreferredExtension = Interop.Model.Encoding.OutputExtension.M4v;\r
                     break;\r
             }\r
             profile.Quality = work.Quality.HasValue ? work.Quality.Value : 0;\r
@@ -225,16 +225,16 @@ namespace HandBrake.ApplicationServices.Functions
             switch (work.VideoEncoder)\r
             {\r
                 case VideoEncoder.X264:\r
-                    profile.VideoEncoder = Interop.VideoEncoder.X264;\r
+                    profile.VideoEncoder = Interop.Model.Encoding.VideoEncoder.X264;\r
                     break;\r
                 case VideoEncoder.FFMpeg:\r
-                    profile.VideoEncoder = Interop.VideoEncoder.FFMpeg;\r
+                    profile.VideoEncoder = Interop.Model.Encoding.VideoEncoder.FFMpeg;\r
                     break;\r
                 case VideoEncoder.FFMpeg2:\r
-                    profile.VideoEncoder = Interop.VideoEncoder.FFMpeg; // TODO Fix This.\r
+                    profile.VideoEncoder = Interop.Model.Encoding.VideoEncoder.FFMpeg; // TODO Fix This.\r
                     break;\r
                 case VideoEncoder.Theora:\r
-                    profile.VideoEncoder = Interop.VideoEncoder.Theora;\r
+                    profile.VideoEncoder = Interop.Model.Encoding.VideoEncoder.Theora;\r
                     break;\r
 \r
             }\r
index b88becd39c3e539909796bfb1856f93187d5c98f..c84e3d40b14d827ad1aaf8fe0c60cc47452db771 100644 (file)
@@ -53,9 +53,6 @@
       <SpecificVersion>False</SpecificVersion>\r
       <HintPath>..\libraries\Growl.CoreLibrary.dll</HintPath>\r
     </Reference>\r
-    <Reference Include="HandBrakeInterop">\r
-      <HintPath>..\libraries\HandBrakeInterop.dll</HintPath>\r
-    </Reference>\r
     <Reference Include="Microsoft.WindowsAPICodePack, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">\r
       <SpecificVersion>False</SpecificVersion>\r
       <HintPath>..\libraries\Microsoft.WindowsAPICodePack.dll</HintPath>\r
     </None>\r
     <None Include="Resources\logo64.png" />\r
   </ItemGroup>\r
-  <ItemGroup />\r
+  <ItemGroup>\r
+    <ProjectReference Include="..\HandBrake.Interop\HandBrakeInterop\HandBrakeInterop.csproj">\r
+      <Project>{F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}</Project>\r
+      <Name>HandBrakeInterop</Name>\r
+    </ProjectReference>\r
+  </ItemGroup>\r
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
   <Import Project="$(ProgramFiles)\MSBuild\StyleCop\v4.5\StyleCop.targets" />\r
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
index d8a951d514ff4ac3d99437f0acae70fc5ff33569..d7af9b22477b122535e1fccbb5afa01a20079623 100644 (file)
@@ -15,6 +15,7 @@ namespace HandBrake.ApplicationServices.Services
     using HandBrake.ApplicationServices.Services.Base;\r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
     using HandBrake.Interop;\r
+    using HandBrake.Interop.Model;\r
 \r
     using EncodeCompletedEventArgs = HandBrake.ApplicationServices.EventArgs.EncodeCompletedEventArgs;\r
     using EncodeProgressEventArgs = HandBrake.ApplicationServices.EventArgs.EncodeProgressEventArgs;\r
index 5022763eb6eac56d602d13c35e3ce3aff0a3ef92..2ee0c172e17f30b0bf0c2894ec0f9177d9fc4f8b 100644 (file)
@@ -270,10 +270,10 @@ namespace HandBrake.ApplicationServices.Services
         /// <returns>\r
         /// The convert titles.\r
         /// </returns>\r
-        private static List<Title> ConvertTitles(IEnumerable<SourceData.Title> titles)\r
+        private static List<Title> ConvertTitles(IEnumerable<Interop.SourceData.Title> titles)\r
         {\r
             List<Title> titleList = new List<Title>();\r
-            foreach (SourceData.Title title in titles)\r
+            foreach (Interop.SourceData.Title title in titles)\r
             {\r
                 Title converted = new Title\r
                     {\r
@@ -292,41 +292,41 @@ namespace HandBrake.ApplicationServices.Services
                         Fps = title.Framerate\r
                     };\r
 \r
-                foreach (SourceData.Chapter chapter in title.Chapters)\r
+                foreach (Interop.SourceData.Chapter chapter in title.Chapters)\r
                 {\r
                     converted.Chapters.Add(new Chapter(chapter.ChapterNumber, string.Empty, chapter.Duration));\r
                 }\r
 \r
-                foreach (SourceData.AudioTrack track in title.AudioTracks)\r
+                foreach (Interop.SourceData.AudioTrack track in title.AudioTracks)\r
                 {\r
                     converted.AudioTracks.Add(new AudioTrack(track.TrackNumber, track.Language, track.LanguageCode, track.Description, string.Empty, track.SampleRate, track.Bitrate));\r
                 }\r
 \r
-                foreach (SourceData.Subtitle track in title.Subtitles)\r
+                foreach (Interop.SourceData.Subtitle track in title.Subtitles)\r
                 {\r
                     SubtitleType convertedType = new SubtitleType();\r
 \r
                     switch (track.SubtitleSource)\r
                     {\r
-                        case SourceData.SubtitleSource.VobSub:\r
+                        case Interop.SourceData.SubtitleSource.VobSub:\r
                             convertedType = SubtitleType.VobSub;\r
                             break;\r
-                        case SourceData.SubtitleSource.UTF8:\r
+                        case Interop.SourceData.SubtitleSource.UTF8:\r
                             convertedType = SubtitleType.UTF8Sub;\r
                             break;\r
-                        case SourceData.SubtitleSource.TX3G:\r
+                        case Interop.SourceData.SubtitleSource.TX3G:\r
                             convertedType = SubtitleType.TX3G;\r
                             break;\r
-                        case SourceData.SubtitleSource.SSA:\r
+                        case Interop.SourceData.SubtitleSource.SSA:\r
                             convertedType = SubtitleType.SSA;\r
                             break;\r
-                        case SourceData.SubtitleSource.SRT:\r
+                        case Interop.SourceData.SubtitleSource.SRT:\r
                             convertedType = SubtitleType.SRT;\r
                             break;\r
-                        case SourceData.SubtitleSource.CC608:\r
+                        case Interop.SourceData.SubtitleSource.CC608:\r
                             convertedType = SubtitleType.CC;\r
                             break;\r
-                        case SourceData.SubtitleSource.CC708:\r
+                        case Interop.SourceData.SubtitleSource.CC708:\r
                             convertedType = SubtitleType.CC;\r
                             break;\r
                     }\r
diff --git a/win/CS/libraries/HandBrakeInterop.dll b/win/CS/libraries/HandBrakeInterop.dll
deleted file mode 100644 (file)
index 7f7a604..0000000
Binary files a/win/CS/libraries/HandBrakeInterop.dll and /dev/null differ
diff --git a/win/CS/libraries/HandBrakeInterop.pdb b/win/CS/libraries/HandBrakeInterop.pdb
deleted file mode 100644 (file)
index 80ecd2f..0000000
Binary files a/win/CS/libraries/HandBrakeInterop.pdb and /dev/null differ