]> granicus.if.org Git - handbrake/commitdiff
WinGui: Refactor the scan model namespace in preparation for json api impl
authorsr55 <sr55.hb@outlook.com>
Sat, 20 Dec 2014 13:20:27 +0000 (13:20 +0000)
committersr55 <sr55.hb@outlook.com>
Sat, 20 Dec 2014 13:20:27 +0000 (13:20 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6621 b64f7644-9d1e-0410-96f1-a4d463321fa5

15 files changed:
win/CS/HandBrake.ApplicationServices/Services/Scan/LibScan.cs
win/CS/HandBrake.Interop/HandBrakeInterop/Converters/Converters.cs
win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs
win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj
win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs
win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs
win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs
win/CS/HandBrake.Interop/HandBrakeInterop/Model/Scan/AudioCodec.cs [moved from win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/AudioCodec.cs with 93% similarity]
win/CS/HandBrake.Interop/HandBrakeInterop/Model/Scan/AudioTrack.cs [moved from win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/AudioTrack.cs with 94% similarity]
win/CS/HandBrake.Interop/HandBrakeInterop/Model/Scan/Chapter.cs [moved from win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Chapter.cs with 94% similarity]
win/CS/HandBrake.Interop/HandBrakeInterop/Model/Scan/InputType.cs [moved from win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/InputType.cs with 92% similarity]
win/CS/HandBrake.Interop/HandBrakeInterop/Model/Scan/Subtitle.cs [moved from win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Subtitle.cs with 93% similarity]
win/CS/HandBrake.Interop/HandBrakeInterop/Model/Scan/SubtitleSource.cs [moved from win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/SubtitleSource.cs with 91% similarity]
win/CS/HandBrake.Interop/HandBrakeInterop/Model/Scan/SubtitleType.cs [moved from win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/SubtitleType.cs with 91% similarity]
win/CS/HandBrake.Interop/HandBrakeInterop/Model/Scan/Title.cs [moved from win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Title.cs with 93% similarity]

index 6311c79e300caee6b30c28f50f2405716efe85fa..3a17e093a6cbe6f9658c3c72cbf1fe7a0f23e497 100644 (file)
@@ -24,7 +24,7 @@ namespace HandBrake.ApplicationServices.Services.Scan
     using HandBrake.Interop.EventArgs;\r
     using HandBrake.Interop.Interfaces;\r
     using HandBrake.Interop.Model;\r
-    using HandBrake.Interop.SourceData;\r
+    using HandBrake.Interop.Model.Scan;\r
 \r
     using Chapter = HandBrake.ApplicationServices.Services.Scan.Model.Chapter;\r
     using ScanProgressEventArgs = HandBrake.Interop.EventArgs.ScanProgressEventArgs;\r
@@ -466,10 +466,10 @@ namespace HandBrake.ApplicationServices.Services.Scan
         /// <returns>\r
         /// The convert titles.\r
         /// </returns>\r
-        private static List<Title> ConvertTitles(IEnumerable<Interop.SourceData.Title> titles, int featureTitle)\r
+        private static List<Title> ConvertTitles(IEnumerable<Interop.Model.Scan.Title> titles, int featureTitle)\r
         {\r
             List<Title> titleList = new List<Title>();\r
-            foreach (Interop.SourceData.Title title in titles)\r
+            foreach (Interop.Model.Scan.Title title in titles)\r
             {\r
                 Title converted = new Title\r
                     {\r
@@ -486,45 +486,45 @@ namespace HandBrake.ApplicationServices.Services.Scan
                         Playlist = title.InputType == InputType.Bluray ? string.Format(" {0:d5}.MPLS", title.Playlist).Trim() : null\r
                     };\r
 \r
-                foreach (Interop.SourceData.Chapter chapter in title.Chapters)\r
+                foreach (Interop.Model.Scan.Chapter chapter in title.Chapters)\r
                 {\r
                     string chapterName = !string.IsNullOrEmpty(chapter.Name) ? chapter.Name : string.Empty;\r
                     converted.Chapters.Add(new Chapter(chapter.ChapterNumber, chapterName, chapter.Duration));\r
                 }\r
 \r
-                foreach (Interop.SourceData.AudioTrack track in title.AudioTracks)\r
+                foreach (AudioTrack track in title.AudioTracks)\r
                 {\r
                     converted.AudioTracks.Add(new Audio(track.TrackNumber, track.Language, track.LanguageCode, track.Description, string.Empty, track.SampleRate, track.Bitrate));\r
                 }\r
 \r
-                foreach (Interop.SourceData.Subtitle track in title.Subtitles)\r
+                foreach (Interop.Model.Scan.Subtitle track in title.Subtitles)\r
                 {\r
                     SubtitleType convertedType = new SubtitleType();\r
 \r
                     switch (track.SubtitleSource)\r
                     {\r
-                        case Interop.SourceData.SubtitleSource.VobSub:\r
+                        case SubtitleSource.VobSub:\r
                             convertedType = SubtitleType.VobSub;\r
                             break;\r
-                        case Interop.SourceData.SubtitleSource.UTF8:\r
+                        case SubtitleSource.UTF8:\r
                             convertedType = SubtitleType.UTF8Sub;\r
                             break;\r
-                        case Interop.SourceData.SubtitleSource.TX3G:\r
+                        case SubtitleSource.TX3G:\r
                             convertedType = SubtitleType.TX3G;\r
                             break;\r
-                        case Interop.SourceData.SubtitleSource.SSA:\r
+                        case SubtitleSource.SSA:\r
                             convertedType = SubtitleType.SSA;\r
                             break;\r
-                        case Interop.SourceData.SubtitleSource.SRT:\r
+                        case SubtitleSource.SRT:\r
                             convertedType = SubtitleType.SRT;\r
                             break;\r
-                        case Interop.SourceData.SubtitleSource.CC608:\r
+                        case SubtitleSource.CC608:\r
                             convertedType = SubtitleType.CC;\r
                             break;\r
-                        case Interop.SourceData.SubtitleSource.CC708:\r
+                        case SubtitleSource.CC708:\r
                             convertedType = SubtitleType.CC;\r
                             break;\r
-                        case Interop.SourceData.SubtitleSource.PGS:\r
+                        case SubtitleSource.PGS:\r
                             convertedType = SubtitleType.PGS;\r
                             break;\r
                     }\r
index d0468ec272411dcc55bfd42a56265b8ed39a2f49..a5c2be460977aba7bbc1d940dce318efe1668114 100644 (file)
@@ -17,7 +17,7 @@ namespace HandBrake.Interop.Converters
     using HandBrake.Interop.Helpers;\r
     using HandBrake.Interop.Model;\r
     using HandBrake.Interop.Model.Encoding;\r
-    using HandBrake.Interop.SourceData;\r
+    using HandBrake.Interop.Model.Scan;\r
 \r
     /// <summary>\r
        /// Converters for various encoding values.\r
index 95590c71bbb9fb0734bf496bc99b3f3623848b85..b51b6d470ec7aacebb5b8c82eae17bc81f7e301c 100644 (file)
@@ -26,7 +26,7 @@ namespace HandBrake.Interop
     using HandBrake.Interop.Interfaces;\r
     using HandBrake.Interop.Model;\r
     using HandBrake.Interop.Model.Encoding;\r
-    using HandBrake.Interop.SourceData;\r
+    using HandBrake.Interop.Model.Scan;\r
 \r
     /// <summary>\r
     /// A wrapper for a HandBrake instance.\r
index 650361e5f81eb3a458b00559bceed917e8cb205d..a9b72db13cdd5ec6a8584463f5237d37cba6101e 100644 (file)
     <Compile Include="Helpers\NativeList.cs" />\r
     <Compile Include="Properties\AssemblyInfo.cs" />\r
     <Compile Include="EventArgs\ScanProgressEventArgs.cs" />\r
-    <Compile Include="SourceData\AudioCodec.cs" />\r
-    <Compile Include="SourceData\AudioTrack.cs" />\r
-    <Compile Include="SourceData\Chapter.cs" />\r
-    <Compile Include="SourceData\InputType.cs" />\r
-    <Compile Include="SourceData\Subtitle.cs" />\r
-    <Compile Include="SourceData\SubtitleSource.cs" />\r
-    <Compile Include="SourceData\SubtitleType.cs" />\r
-    <Compile Include="SourceData\Title.cs" />\r
+    <Compile Include="Model\Scan\AudioCodec.cs" />\r
+    <Compile Include="Model\Scan\AudioTrack.cs" />\r
+    <Compile Include="Model\Scan\Chapter.cs" />\r
+    <Compile Include="Model\Scan\InputType.cs" />\r
+    <Compile Include="Model\Scan\Subtitle.cs" />\r
+    <Compile Include="Model\Scan\SubtitleSource.cs" />\r
+    <Compile Include="Model\Scan\SubtitleType.cs" />\r
+    <Compile Include="Model\Scan\Title.cs" />\r
     <Compile Include="Helpers\Utilities.cs" />\r
   </ItemGroup>\r
   <ItemGroup>\r
       <Install>true</Install>\r
     </BootstrapperPackage>\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <Folder Include="SourceData\" />\r
+  </ItemGroup>\r
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
        Other similar extension points exist, see Microsoft.Common.targets.\r
index 0a82fb980c93bee3e1915f4973d21a1f755f1188..4070d880265f77ec952c71d8014ce7a6d1527fde 100644 (file)
@@ -17,7 +17,7 @@ namespace HandBrake.Interop
     using HandBrake.Interop.HbLib;\r
     using HandBrake.Interop.Model;\r
     using HandBrake.Interop.Model.Encoding;\r
-    using HandBrake.Interop.SourceData;\r
+    using HandBrake.Interop.Model.Scan;\r
 \r
     /// <summary>\r
     /// HandBrake Interop Utilities\r
index 3123a667187eda0588825e5054081ea96af4746e..ea86eb85c75a341b0e3e78a7ef1adddbdd544688 100644 (file)
@@ -15,7 +15,7 @@ namespace HandBrake.Interop.Interfaces
 \r
     using HandBrake.Interop.EventArgs;\r
     using HandBrake.Interop.Model;\r
-    using HandBrake.Interop.SourceData;\r
+    using HandBrake.Interop.Model.Scan;\r
 \r
     /// <summary>\r
     /// The Interface for HandBrakeInstance\r
index 295586c8f955264dd7d76c123912a930c2b54830..036617ce093379a71d2c6e0b72ef06977f1972fa 100644 (file)
@@ -17,9 +17,9 @@ namespace HandBrake.Interop.Model
        using HandBrake.Interop.HbLib;\r
        using HandBrake.Interop.Helpers;\r
        using HandBrake.Interop.Model.Encoding;\r
-       using HandBrake.Interop.SourceData;\r
+       using HandBrake.Interop.Model.Scan;\r
 \r
-       /// <summary>\r
+    /// <summary>\r
        /// The encoders.\r
        /// </summary>\r
        public static class Encoders\r
similarity index 93%
rename from win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/AudioCodec.cs
rename to win/CS/HandBrake.Interop/HandBrakeInterop/Model/Scan/AudioCodec.cs
index d24c9998bc8799f6ae5d725add7f528b4fad4fdf..41b363dac6aaadb37372ebdf009ac0b3acb45458 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>\r
 // --------------------------------------------------------------------------------------------------------------------\r
 \r
-namespace HandBrake.Interop.SourceData\r
+namespace HandBrake.Interop.Model.Scan\r
 {\r
     /// <summary>\r
     /// The audio codec.\r
similarity index 94%
rename from win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/AudioTrack.cs
rename to win/CS/HandBrake.Interop/HandBrakeInterop/Model/Scan/AudioTrack.cs
index 4c4e64fd7e7a24bab9034232dd70c7163bcb02b0..2bf275fdd243abfd62efba8c299dba6db6354427 100644 (file)
@@ -7,9 +7,9 @@
 // </summary>\r
 // --------------------------------------------------------------------------------------------------------------------\r
 \r
-namespace HandBrake.Interop.SourceData\r
+namespace HandBrake.Interop.Model.Scan\r
 {\r
-       /// <summary>\r
+    /// <summary>\r
        /// An object represending an AudioTrack associated with a Title, in a DVD\r
        /// </summary>\r
        public class AudioTrack\r
similarity index 94%
rename from win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Chapter.cs
rename to win/CS/HandBrake.Interop/HandBrakeInterop/Model/Scan/Chapter.cs
index 25d5b811b75f3f3b6612335ec34f776a88f85a40..70e35e6f3f7d8383971ffda752c4c9c900c4ba3b 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>\r
 // --------------------------------------------------------------------------------------------------------------------\r
 \r
-namespace HandBrake.Interop.SourceData\r
+namespace HandBrake.Interop.Model.Scan\r
 {\r
     using System;\r
     using System.Globalization;\r
similarity index 92%
rename from win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/InputType.cs
rename to win/CS/HandBrake.Interop/HandBrakeInterop/Model/Scan/InputType.cs
index aec1945337c176a131e9c14f08b79259740e2798..e3156ea8e819346848df008d574e5882f4f50217 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>\r
 // --------------------------------------------------------------------------------------------------------------------\r
 \r
-namespace HandBrake.Interop.SourceData\r
+namespace HandBrake.Interop.Model.Scan\r
 {\r
     using System.ComponentModel.DataAnnotations;\r
 \r
similarity index 93%
rename from win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Subtitle.cs
rename to win/CS/HandBrake.Interop/HandBrakeInterop/Model/Scan/Subtitle.cs
index fbb08402f8dfc49007895acf3ab76b237a477ce7..fda0dbb6c1d1bade7dcf33a659ac86dc35c6a8f4 100644 (file)
@@ -7,11 +7,11 @@
 // </summary>\r
 // --------------------------------------------------------------------------------------------------------------------\r
 \r
-namespace HandBrake.Interop.SourceData\r
+namespace HandBrake.Interop.Model.Scan\r
 {\r
-       using HandBrake.Interop.HbLib;\r
+    using HandBrake.Interop.HbLib;\r
 \r
-       /// <summary>\r
+    /// <summary>\r
        /// An object that represents a subtitle associated with a Title, in a DVD\r
        /// </summary>\r
        public class Subtitle\r
similarity index 91%
rename from win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/SubtitleSource.cs
rename to win/CS/HandBrake.Interop/HandBrakeInterop/Model/Scan/SubtitleSource.cs
index e169e8882eb27f2323492b960b1b246bc92137cc..51702593416ae8efca7dca0acd575c57511119fb 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>\r
 // --------------------------------------------------------------------------------------------------------------------\r
 \r
-namespace HandBrake.Interop.SourceData\r
+namespace HandBrake.Interop.Model.Scan\r
 {\r
     /// <summary>\r
     /// The subtitle source.\r
similarity index 91%
rename from win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/SubtitleType.cs
rename to win/CS/HandBrake.Interop/HandBrakeInterop/Model/Scan/SubtitleType.cs
index 422f9001dac213ca565030bc03739db660f86cec..4486e029d8e9f0b0b87932ed54524b1a653b116b 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>\r
 // --------------------------------------------------------------------------------------------------------------------\r
 \r
-namespace HandBrake.Interop.SourceData\r
+namespace HandBrake.Interop.Model.Scan\r
 {\r
     /// <summary>\r
     /// The subtitle type.\r
similarity index 93%
rename from win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Title.cs
rename to win/CS/HandBrake.Interop/HandBrakeInterop/Model/Scan/Title.cs
index 6137199d8ee4c49385841ffa624af3edf9bc9968..fb2a67b648d131ff9ea0e911b3625ae9d72b7908 100644 (file)
@@ -7,14 +7,14 @@
 // </summary>\r
 // --------------------------------------------------------------------------------------------------------------------\r
 \r
-namespace HandBrake.Interop.SourceData\r
+namespace HandBrake.Interop.Model.Scan\r
 {\r
-       using System;\r
-       using System.Collections.Generic;\r
+    using System;\r
+    using System.Collections.Generic;\r
 \r
-       using HandBrake.Interop.Model;\r
+    using HandBrake.Interop.Model;\r
 \r
-       /// <summary>\r
+    /// <summary>\r
        /// An object that represents a single Title of a DVD\r
        /// </summary>\r
        public class Title\r