\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
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
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
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
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
{\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
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
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
/// <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
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