WinGui: Rename HandBrake.ApplicationServices back to HandBrake.Interop. It's moving...
authorsr55 <sr55.hb@outlook.com>
Tue, 5 Jun 2018 20:52:23 +0000 (21:52 +0100)
committersr55 <sr55.hb@outlook.com>
Tue, 5 Jun 2018 20:52:23 +0000 (21:52 +0100)
205 files changed:
win/CS/HandBrake.ApplicationServices/Docs/Readme.txt [deleted file]
win/CS/HandBrake.Interop/Attributes/DisplayName.cs [moved from win/CS/HandBrake.ApplicationServices/Attributes/DisplayName.cs with 95% similarity]
win/CS/HandBrake.Interop/Attributes/ShortName.cs [moved from win/CS/HandBrake.ApplicationServices/Attributes/ShortName.cs with 92% similarity]
win/CS/HandBrake.Interop/HandBrake.Interop.csproj [moved from win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj with 96% similarity]
win/CS/HandBrake.Interop/HandBrake.Interop.nuspec [moved from win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.nuspec with 89% similarity]
win/CS/HandBrake.Interop/Interop/EventArgs/EncodeCompletedEventArgs.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeCompletedEventArgs.cs with 92% similarity]
win/CS/HandBrake.Interop/Interop/EventArgs/EncodeProgressEventArgs.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeProgressEventArgs.cs with 95% similarity]
win/CS/HandBrake.Interop/Interop/EventArgs/MessageLoggedEventArgs.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/EventArgs/MessageLoggedEventArgs.cs with 92% similarity]
win/CS/HandBrake.Interop/Interop/EventArgs/ScanProgressEventArgs.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/EventArgs/ScanProgressEventArgs.cs with 94% similarity]
win/CS/HandBrake.Interop/Interop/Factories/AnamorphicFactory.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Factories/AnamorphicFactory.cs with 88% similarity]
win/CS/HandBrake.Interop/Interop/HandBrakeEncoderHelpers.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HandBrakeEncoderHelpers.cs with 95% similarity]
win/CS/HandBrake.Interop/Interop/HandBrakeFilterHelpers.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HandBrakeFilterHelpers.cs with 90% similarity]
win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs with 93% similarity]
win/CS/HandBrake.Interop/Interop/HandBrakeInstanceManager.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstanceManager.cs with 94% similarity]
win/CS/HandBrake.Interop/Interop/HandBrakeLanguagesHelper.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HandBrakeLanguagesHelper.cs with 87% similarity]
win/CS/HandBrake.Interop/Interop/HandBrakePresetService.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs with 90% similarity]
win/CS/HandBrake.Interop/Interop/HandBrakeUnitConversionHelpers.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUnitConversionHelpers.cs with 93% similarity]
win/CS/HandBrake.Interop/Interop/HandBrakeUtils.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUtils.cs with 94% similarity]
win/CS/HandBrake.Interop/Interop/HbLib/HBDelegates.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HbLib/HBDelegates.cs with 91% similarity]
win/CS/HandBrake.Interop/Interop/HbLib/HbFunctions.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HbLib/HbFunctions.cs with 98% similarity]
win/CS/HandBrake.Interop/Interop/HbLib/NativeConstants.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HbLib/NativeConstants.cs with 96% similarity]
win/CS/HandBrake.Interop/Interop/HbLib/hb_anamorphic_mode_t.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_anamorphic_mode_t.cs with 91% similarity]
win/CS/HandBrake.Interop/Interop/HbLib/hb_container_s.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_container_s.cs with 92% similarity]
win/CS/HandBrake.Interop/Interop/HbLib/hb_encoder_s.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_encoder_s.cs with 92% similarity]
win/CS/HandBrake.Interop/Interop/HbLib/hb_error_code.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_error_code.cs with 91% similarity]
win/CS/HandBrake.Interop/Interop/HbLib/hb_filter_ids.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_filter_ids.cs with 94% similarity]
win/CS/HandBrake.Interop/Interop/HbLib/hb_geometry.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_geometry.cs with 94% similarity]
win/CS/HandBrake.Interop/Interop/HbLib/hb_image_s.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_image_s.cs with 92% similarity]
win/CS/HandBrake.Interop/Interop/HbLib/hb_mixdown_s.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_mixdown_s.cs with 91% similarity]
win/CS/HandBrake.Interop/Interop/HbLib/hb_rate_s.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_rate_s.cs with 91% similarity]
win/CS/HandBrake.Interop/Interop/HbLib/hb_subtitle.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_subtitle.cs with 90% similarity]
win/CS/HandBrake.Interop/Interop/HbLib/iso639_lang_t.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/HbLib/iso639_lang_t.cs with 92% similarity]
win/CS/HandBrake.Interop/Interop/Helpers/InteropUtilities.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Helpers/InteropUtilities.cs with 96% similarity]
win/CS/HandBrake.Interop/Interop/Helpers/NativeList.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Helpers/NativeList.cs with 94% similarity]
win/CS/HandBrake.Interop/Interop/Helpers/Utilities.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Helpers/Utilities.cs with 92% similarity]
win/CS/HandBrake.Interop/Interop/Interfaces/IHandBrakeInstance.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Interfaces/IHandBrakeInstance.cs with 90% similarity]
win/CS/HandBrake.Interop/Interop/Json/Anamorphic/AnamorphicGeometry.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Anamorphic/AnamorphicGeometry.cs with 85% similarity]
win/CS/HandBrake.Interop/Interop/Json/Anamorphic/DestSettings.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Anamorphic/DestSettings.cs with 91% similarity]
win/CS/HandBrake.Interop/Interop/Json/Encode/Audio.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Audio.cs with 91% similarity]
win/CS/HandBrake.Interop/Interop/Json/Encode/AudioTrack.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/AudioTrack.cs with 94% similarity]
win/CS/HandBrake.Interop/Interop/Json/Encode/Chapter.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Chapter.cs with 90% similarity]
win/CS/HandBrake.Interop/Interop/Json/Encode/Destination.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Destination.cs with 93% similarity]
win/CS/HandBrake.Interop/Interop/Json/Encode/Filter.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Filter.cs with 90% similarity]
win/CS/HandBrake.Interop/Interop/Json/Encode/Filters.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Filters.cs with 90% similarity]
win/CS/HandBrake.Interop/Interop/Json/Encode/JsonEncodeObject.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/JsonEncodeObject.cs with 90% similarity]
win/CS/HandBrake.Interop/Interop/Json/Encode/Metadata.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/MetaData.cs with 93% similarity]
win/CS/HandBrake.Interop/Interop/Json/Encode/Mp4Options.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Mp4Options.cs with 91% similarity]
win/CS/HandBrake.Interop/Interop/Json/Encode/QSV.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/QSV.cs with 90% similarity]
win/CS/HandBrake.Interop/Interop/Json/Encode/Range.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Range.cs with 92% similarity]
win/CS/HandBrake.Interop/Interop/Json/Encode/SRT.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/SRT.cs with 91% similarity]
win/CS/HandBrake.Interop/Interop/Json/Encode/Source.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Source.cs with 91% similarity]
win/CS/HandBrake.Interop/Interop/Json/Encode/SubtitleSearch.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/SubtitleSearch.cs with 92% similarity]
win/CS/HandBrake.Interop/Interop/Json/Encode/SubtitleTrack.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/SubtitleTrack.cs with 93% similarity]
win/CS/HandBrake.Interop/Interop/Json/Encode/Subtitles.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Subtitles.cs with 91% similarity]
win/CS/HandBrake.Interop/Interop/Json/Encode/Video.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Video.cs with 94% similarity]
win/CS/HandBrake.Interop/Interop/Json/Filters/PresetTune.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Filters/PresetTune.cs with 93% similarity]
win/CS/HandBrake.Interop/Interop/Json/Presets/AudioList.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/AudioList.cs with 94% similarity]
win/CS/HandBrake.Interop/Interop/Json/Presets/HBPreset.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/HBPreset.cs with 96% similarity]
win/CS/HandBrake.Interop/Interop/Json/Presets/PresetCategory.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/PresetCategory.cs with 92% similarity]
win/CS/HandBrake.Interop/Interop/Json/Presets/PresetTransportContainer.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/PresetTransportContainer.cs with 94% similarity]
win/CS/HandBrake.Interop/Interop/Json/Queue/Task.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Queue/Task.cs with 85% similarity]
win/CS/HandBrake.Interop/Interop/Json/Scan/AudioAttributes.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/AudioAttributes.cs with 93% similarity]
win/CS/HandBrake.Interop/Interop/Json/Scan/Color.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/Color.cs with 91% similarity]
win/CS/HandBrake.Interop/Interop/Json/Scan/Duration.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/Duration.cs with 92% similarity]
win/CS/HandBrake.Interop/Interop/Json/Scan/FrameRate.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/FrameRate.cs with 90% similarity]
win/CS/HandBrake.Interop/Interop/Json/Scan/JsonScanObject.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/JsonScanObject.cs with 91% similarity]
win/CS/HandBrake.Interop/Interop/Json/Scan/SourceAudioTrack.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/SourceAudioTrack.cs with 93% similarity]
win/CS/HandBrake.Interop/Interop/Json/Scan/SourceChapter.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/SourceChapter.cs with 91% similarity]
win/CS/HandBrake.Interop/Interop/Json/Scan/SourceMetadata.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/SourceMetadata.cs with 91% similarity]
win/CS/HandBrake.Interop/Interop/Json/Scan/SourceSubtitleTrack.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/SourceSubtitleTrack.cs with 95% similarity]
win/CS/HandBrake.Interop/Interop/Json/Scan/SourceTitle.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/SourceTitle.cs with 93% similarity]
win/CS/HandBrake.Interop/Interop/Json/Scan/SubtitleAttributes.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/SubtitleAttributes.cs with 95% similarity]
win/CS/HandBrake.Interop/Interop/Json/Shared/Geometry.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Shared/Geometry.cs with 91% similarity]
win/CS/HandBrake.Interop/Interop/Json/Shared/PAR.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/Shared/PAR.cs with 90% similarity]
win/CS/HandBrake.Interop/Interop/Json/State/JsonState.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/State/JsonState.cs with 92% similarity]
win/CS/HandBrake.Interop/Interop/Json/State/Scanning.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/State/Scanning.cs with 92% similarity]
win/CS/HandBrake.Interop/Interop/Json/State/TaskState.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/State/TaskState.cs with 97% similarity]
win/CS/HandBrake.Interop/Interop/Json/State/WorkDone.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/State/WorkDone.cs with 90% similarity]
win/CS/HandBrake.Interop/Interop/Json/State/Working.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Json/State/Working.cs with 93% similarity]
win/CS/HandBrake.Interop/Interop/Model/BitrateLimits.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/BitrateLimits.cs with 93% similarity]
win/CS/HandBrake.Interop/Interop/Model/Cropping.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Cropping.cs with 94% similarity]
win/CS/HandBrake.Interop/Interop/Model/Encoding/Anamorphic.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Anamorphic.cs with 86% similarity]
win/CS/HandBrake.Interop/Interop/Model/Encoding/CombDetect.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/CombDetect.cs with 88% similarity]
win/CS/HandBrake.Interop/Interop/Model/Encoding/Container.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Container.cs with 84% similarity]
win/CS/HandBrake.Interop/Interop/Model/Encoding/Decomb.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Decomb.cs with 85% similarity]
win/CS/HandBrake.Interop/Interop/Model/Encoding/Deinterlace.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Deinterlace.cs with 85% similarity]
win/CS/HandBrake.Interop/Interop/Model/Encoding/DeinterlaceFilter.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/DeinterlaceFilter.cs with 87% similarity]
win/CS/HandBrake.Interop/Interop/Model/Encoding/Denoise.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Denoise.cs with 84% similarity]
win/CS/HandBrake.Interop/Interop/Model/Encoding/Detelecine.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Detelecine.cs with 84% similarity]
win/CS/HandBrake.Interop/Interop/Model/Encoding/HBAudioEncoder.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/HBAudioEncoder.cs with 94% similarity]
win/CS/HandBrake.Interop/Interop/Model/Encoding/HBContainer.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/HBContainer.cs with 93% similarity]
win/CS/HandBrake.Interop/Interop/Model/Encoding/HBMixdown.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/HBMixdown.cs with 93% similarity]
win/CS/HandBrake.Interop/Interop/Model/Encoding/HBPresetTune.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/HBPresetTune.cs with 95% similarity]
win/CS/HandBrake.Interop/Interop/Model/Encoding/HBRate.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/HBRate.cs with 92% similarity]
win/CS/HandBrake.Interop/Interop/Model/Encoding/HBVideoEncoder.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/HBVideoEncoder.cs with 92% similarity]
win/CS/HandBrake.Interop/Interop/Model/Encoding/PictureRotation.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/PictureRotation.cs with 89% similarity]
win/CS/HandBrake.Interop/Interop/Model/Encoding/ScaleMethod.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/ScaleMethod.cs with 90% similarity]
win/CS/HandBrake.Interop/Interop/Model/Encoding/Sharpen.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Sharpen.cs with 86% similarity]
win/CS/HandBrake.Interop/Interop/Model/Encoding/VideoEncodeRateType.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/VideoEncodeRateType.cs with 89% similarity]
win/CS/HandBrake.Interop/Interop/Model/Encoding/VideoEncoder.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/VideoEncoder.cs with 90% similarity]
win/CS/HandBrake.Interop/Interop/Model/Language.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Language.cs with 94% similarity]
win/CS/HandBrake.Interop/Interop/Model/Preview/PreviewSettings.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Preview/PreviewSettings.cs with 94% similarity]
win/CS/HandBrake.Interop/Interop/Model/Preview/RawPreviewData.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Preview/RawPreviewData.cs with 94% similarity]
win/CS/HandBrake.Interop/Interop/Model/RangeLimits.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/RangeLimits.cs with 94% similarity]
win/CS/HandBrake.Interop/Interop/Model/Size.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/Size.cs with 93% similarity]
win/CS/HandBrake.Interop/Interop/Model/SourceVideoInfo.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/SourceVideoInfo.cs with 93% similarity]
win/CS/HandBrake.Interop/Interop/Model/VideoQualityLimits.cs [moved from win/CS/HandBrake.ApplicationServices/Interop/Model/VideoQualityLimits.cs with 94% similarity]
win/CS/HandBrake.Interop/Model/HBConfiguration.cs [moved from win/CS/HandBrake.ApplicationServices/Model/HBConfiguration.cs with 95% similarity]
win/CS/HandBrake.Interop/Model/VideoScaler.cs [moved from win/CS/HandBrake.ApplicationServices/Model/VideoScaler.cs with 86% similarity]
win/CS/HandBrake.Interop/Properties/AssemblyInfo.cs [moved from win/CS/HandBrake.ApplicationServices/Properties/AssemblyInfo.cs with 95% similarity]
win/CS/HandBrake.Interop/Properties/Resources.Designer.cs [moved from win/CS/HandBrake.ApplicationServices/Properties/Resources.Designer.cs with 91% similarity]
win/CS/HandBrake.Interop/Properties/Resources.resx [moved from win/CS/HandBrake.ApplicationServices/Properties/Resources.resx with 97% similarity]
win/CS/HandBrake.Interop/Utilities/CharCodesUtilities.cs [moved from win/CS/HandBrake.ApplicationServices/Utilities/CharCodesUtilities.cs with 94% similarity]
win/CS/HandBrake.Interop/Utilities/LanguageUtilities.cs [moved from win/CS/HandBrake.ApplicationServices/Utilities/LanguageUtilities.cs with 96% similarity]
win/CS/HandBrake.Interop/Utilities/SystemInfo.cs [moved from win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs with 95% similarity]
win/CS/HandBrake.Interop/Utilities/VersionHelper.cs [moved from win/CS/HandBrake.ApplicationServices/Utilities/VersionHelper.cs with 89% similarity]
win/CS/HandBrake.Interop/app.config [moved from win/CS/HandBrake.ApplicationServices/app.config with 96% similarity]
win/CS/HandBrake.Interop/packages.config [moved from win/CS/HandBrake.ApplicationServices/packages.config with 100% similarity]
win/CS/HandBrake.sln
win/CS/HandBrakeAppX/HandBrakeAppX.jsproj
win/CS/HandBrakeCS.csproj
win/CS/HandBrakeWPF/Converters/Audio/AudioBehaviourConverter.cs
win/CS/HandBrakeWPF/Converters/Audio/AudioEncoderConverter.cs
win/CS/HandBrakeWPF/Converters/Audio/AudioMixdownConverter.cs
win/CS/HandBrakeWPF/Converters/Audio/AudioMixdownListConverter.cs
win/CS/HandBrakeWPF/Converters/Audio/AudioQueueDisplayConverter.cs
win/CS/HandBrakeWPF/Converters/Audio/AudioRateTypeConverter.cs
win/CS/HandBrakeWPF/Converters/Audio/AudioTrackDefaultBehaviourConverter.cs
win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs
win/CS/HandBrakeWPF/Converters/Filters/DenoisePresetConverter.cs
win/CS/HandBrakeWPF/Converters/Filters/SharpenPresetConverter.cs
win/CS/HandBrakeWPF/Converters/Filters/SharpenTuneConverter.cs
win/CS/HandBrakeWPF/Converters/Options/OptionsTabNameConverter.cs
win/CS/HandBrakeWPF/Converters/Queue/PictureSettingsDescConveter.cs
win/CS/HandBrakeWPF/Converters/Subtitles/SubtitleBehaviourConverter.cs
win/CS/HandBrakeWPF/Converters/Video/EncoderOptionsTooltipConverter.cs
win/CS/HandBrakeWPF/Converters/Video/ScalingConverter.cs
win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs
win/CS/HandBrakeWPF/Converters/Video/VideoOptionsTooltipConverter.cs
win/CS/HandBrakeWPF/EventArgs/QueueProgressEventArgs.cs
win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs
win/CS/HandBrakeWPF/HandBrakeWPF.csproj
win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs
win/CS/HandBrakeWPF/Helpers/LogManager.cs
win/CS/HandBrakeWPF/Helpers/PictureSize.cs
win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs
win/CS/HandBrakeWPF/Model/Audio/AudioBehaviourModes.cs
win/CS/HandBrakeWPF/Model/Audio/AudioBehaviourTrack.cs
win/CS/HandBrakeWPF/Model/Audio/AudioTrackDefaultsMode.cs
win/CS/HandBrakeWPF/Model/Filters/FilterPreset.cs
win/CS/HandBrakeWPF/Model/Filters/FilterTune.cs
win/CS/HandBrakeWPF/Model/OptionsTab.cs
win/CS/HandBrakeWPF/Model/Picture/PresetPictureSettingsMode.cs
win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviourModes.cs
win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBurnInBehaviourModes.cs
win/CS/HandBrakeWPF/Services/Encode/EncodeBase.cs
win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs
win/CS/HandBrakeWPF/Services/Encode/Factories/QueueFactory.cs
win/CS/HandBrakeWPF/Services/Encode/Interfaces/IEncode.cs
win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs
win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs
win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioEncoder.cs
win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioEncoderRateType.cs
win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs
win/CS/HandBrakeWPF/Services/Encode/Model/Models/DenoisePreset.cs
win/CS/HandBrakeWPF/Services/Encode/Model/Models/DenoiseTune.cs
win/CS/HandBrakeWPF/Services/Encode/Model/Models/FramerateMode.cs
win/CS/HandBrakeWPF/Services/Encode/Model/Models/OutputFormat.cs
win/CS/HandBrakeWPF/Services/Encode/Model/Models/PointToPointMode.cs
win/CS/HandBrakeWPF/Services/Encode/Model/Models/SubtitleTrack.cs
win/CS/HandBrakeWPF/Services/Logging/LogService.cs
win/CS/HandBrakeWPF/Services/PrePostActionService.cs
win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs
win/CS/HandBrakeWPF/Services/Presets/Interfaces/IPresetService.cs
win/CS/HandBrakeWPF/Services/Presets/PresetService.cs
win/CS/HandBrakeWPF/Services/Queue/Model/QueueItemStatus.cs
win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs
win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs
win/CS/HandBrakeWPF/Services/Scan/Interfaces/IScan.cs
win/CS/HandBrakeWPF/Services/Scan/LibScan.cs
win/CS/HandBrakeWPF/Services/Scan/Model/Subtitle.cs
win/CS/HandBrakeWPF/Services/Scan/Model/Title.cs
win/CS/HandBrakeWPF/Services/UpdateService.cs
win/CS/HandBrakeWPF/Services/UserSettingService.cs
win/CS/HandBrakeWPF/Utilities/BitmapUtilities.cs
win/CS/HandBrakeWPF/Utilities/EnumHelper.cs
win/CS/HandBrakeWPF/Utilities/GeneralUtilities.cs
win/CS/HandBrakeWPF/Utilities/HandBrakeApp.cs
win/CS/HandBrakeWPF/Utilities/SystemInfo.cs
win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs
win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs
win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs
win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs
win/CS/HandBrakeWPF/ViewModels/Interfaces/IX264ViewModel.cs
win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs
win/CS/HandBrakeWPF/ViewModels/SubtitlesDefaultsViewModel.cs
win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs
win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs
win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
win/CS/HandBrakeWPF/ViewModels/X264ViewModel.cs
win/CS/build.xml

diff --git a/win/CS/HandBrake.ApplicationServices/Docs/Readme.txt b/win/CS/HandBrake.ApplicationServices/Docs/Readme.txt
deleted file mode 100644 (file)
index 69d4b85..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Library: HandBrake.ApplicationServices.dll
-Description: A C# Wrapper library around LibHB. This wrapper library exposes the main scan and encode functions of the JSON API and many helper functions.
-Usage: See the IHandBrakeInstance interface.
\ No newline at end of file
similarity index 95%
rename from win/CS/HandBrake.ApplicationServices/Attributes/DisplayName.cs
rename to win/CS/HandBrake.Interop/Attributes/DisplayName.cs
index e96c9ab73c5c3d158c778964724b7492cb6168e1..a890d97f182b8822873bd94e44c1a8b74fcc42ad 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>
 // --------------------------------------------------------------------------------------------------------------------
 
-namespace HandBrake.ApplicationServices.Attributes
+namespace HandBrake.Interop.Attributes
 {
     using System;
 
similarity index 92%
rename from win/CS/HandBrake.ApplicationServices/Attributes/ShortName.cs
rename to win/CS/HandBrake.Interop/Attributes/ShortName.cs
index ba70fdf955440e45a1770bf709577005083b542e..1f5ef670094281722656aa5953b16d415fddddae 100644 (file)
@@ -1,35 +1,35 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="ShortName.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   A Short Name for an enum value\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Attributes\r
-{\r
-    using System;\r
-\r
-    /// <summary>\r
-    ///  A Short Name for an enum value\r
-    /// </summary>\r
-    public class ShortName : Attribute\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="ShortName"/> class.\r
-        /// </summary>\r
-        /// <param name="shortName">\r
-        /// The short name.\r
-        /// </param>\r
-        public ShortName(string shortName)\r
-        {\r
-            this.Name = shortName;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the short name.\r
-        /// </summary>\r
-        public string Name { get; private set; }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="ShortName.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 Short Name for an enum value
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Attributes
+{
+    using System;
+
+    /// <summary>
+    ///  A Short Name for an enum value
+    /// </summary>
+    public class ShortName : Attribute
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="ShortName"/> class.
+        /// </summary>
+        /// <param name="shortName">
+        /// The short name.
+        /// </param>
+        public ShortName(string shortName)
+        {
+            this.Name = shortName;
+        }
+
+        /// <summary>
+        /// Gets the short name.
+        /// </summary>
+        public string Name { get; private set; }
+    }
+}
similarity index 96%
rename from win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
rename to win/CS/HandBrake.Interop/HandBrake.Interop.csproj
index e55e0e039beb64df62fb6607bcf19e01f8a9d815..09e73d0f5487416a510df5325ce6f0129e295ffa 100644 (file)
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-  <PropertyGroup>\r
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
-    <Platform Condition=" '$(Platform)' == '' ">x64</Platform>\r
-    <ProjectGuid>{087A2BA8-BAC2-4577-A46F-07FF9D420016}</ProjectGuid>\r
-    <OutputType>Library</OutputType>\r
-    <AppDesignerFolder>Properties</AppDesignerFolder>\r
-    <RootNamespace>HandBrake.ApplicationServices</RootNamespace>\r
-    <AssemblyName>HandBrake.ApplicationServices</AssemblyName>\r
-    <TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>\r
-    <FileAlignment>512</FileAlignment>\r
-    <FileUpgradeFlags>\r
-    </FileUpgradeFlags>\r
-    <UpgradeBackupLocation />\r
-    <TargetFrameworkProfile>\r
-    </TargetFrameworkProfile>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">\r
-    <PlatformTarget>x64</PlatformTarget>\r
-    <OutputPath>bin\Debug\</OutputPath>\r
-    <DefineConstants>TRACE;DEBUG</DefineConstants>\r
-    <UseVSHostingProcess>true</UseVSHostingProcess>\r
-    <Prefer32Bit>false</Prefer32Bit>\r
-    <CodeAnalysisRuleSet>..\HandBrake.ruleset</CodeAnalysisRuleSet>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">\r
-    <PlatformTarget>AnyCPU</PlatformTarget>\r
-    <OutputPath>bin\Release\</OutputPath>\r
-    <DefineConstants>DEBUG;TRACE</DefineConstants>\r
-    <Optimize>true</Optimize>\r
-    <DebugType>pdbonly</DebugType>\r
-    <DebugSymbols>true</DebugSymbols>\r
-    <Prefer32Bit>false</Prefer32Bit>\r
-  </PropertyGroup>\r
-  <ItemGroup>\r
-    <Reference Include="Microsoft.CSharp" />\r
-    <Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">\r
-      <HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>\r
-    </Reference>\r
-    <Reference Include="System" />\r
-    <Reference Include="System.Core">\r
-      <RequiredTargetFramework>3.5</RequiredTargetFramework>\r
-    </Reference>\r
-    <Reference Include="System.Xml.Linq">\r
-      <RequiredTargetFramework>3.5</RequiredTargetFramework>\r
-    </Reference>\r
-    <Reference Include="System.Data" />\r
-    <Reference Include="System.Xml" />\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <Compile Include="Attributes\DisplayName.cs" />\r
-    <Compile Include="Attributes\ShortName.cs" />\r
-    <Compile Include="Interop\EventArgs\EncodeCompletedEventArgs.cs" />\r
-    <Compile Include="Interop\EventArgs\EncodeProgressEventArgs.cs" />\r
-    <Compile Include="Interop\EventArgs\MessageLoggedEventArgs.cs" />\r
-    <Compile Include="Interop\EventArgs\ScanProgressEventArgs.cs" />\r
-    <Compile Include="Interop\HandBrakeEncoderHelpers.cs" />\r
-    <Compile Include="Interop\HandBrakeFilterHelpers.cs" />\r
-    <Compile Include="Interop\HandBrakeInstance.cs" />\r
-    <Compile Include="Interop\HandBrakeInstanceManager.cs" />\r
-    <Compile Include="Interop\HandBrakeLanguagesHelper.cs" />\r
-    <Compile Include="Interop\HandBrakePresetService.cs" />\r
-    <Compile Include="Interop\HandBrakeUnitConversionHelpers.cs" />\r
-    <Compile Include="Interop\HandBrakeUtils.cs" />\r
-    <Compile Include="Interop\HbLib\HBDelegates.cs" />\r
-    <Compile Include="Interop\HbLib\HbFunctions.cs" />\r
-    <Compile Include="Interop\HbLib\hb_anamorphic_mode_t.cs" />\r
-    <Compile Include="Interop\HbLib\hb_container_s.cs" />\r
-    <Compile Include="Interop\HbLib\hb_encoder_s.cs" />\r
-    <Compile Include="Interop\HbLib\hb_error_code.cs" />\r
-    <Compile Include="Interop\HbLib\hb_filter_ids.cs" />\r
-    <Compile Include="Interop\HbLib\hb_geometry.cs" />\r
-    <Compile Include="Interop\HbLib\hb_image_s.cs" />\r
-    <Compile Include="Interop\HbLib\hb_mixdown_s.cs" />\r
-    <Compile Include="Interop\HbLib\hb_rate_s.cs" />\r
-    <Compile Include="Interop\HbLib\hb_subtitle.cs" />\r
-    <Compile Include="Interop\HbLib\iso639_lang_t.cs" />\r
-    <Compile Include="Interop\HbLib\NativeConstants.cs" />\r
-    <Compile Include="Interop\Helpers\InteropUtilities.cs" />\r
-    <Compile Include="Interop\Helpers\NativeList.cs" />\r
-    <Compile Include="Interop\Helpers\Utilities.cs" />\r
-    <Compile Include="Interop\Interfaces\IHandBrakeInstance.cs" />\r
-    <Compile Include="Interop\Json\Anamorphic\AnamorphicGeometry.cs" />\r
-    <Compile Include="Interop\Json\Anamorphic\DestSettings.cs" />\r
-    <Compile Include="Interop\Json\Encode\QSV.cs" />\r
-    <Compile Include="Interop\Json\Filters\PresetTune.cs" />\r
-    <Compile Include="Interop\Json\Presets\AudioList.cs" />\r
-    <Compile Include="Interop\Json\Presets\HBPreset.cs" />\r
-    <Compile Include="Interop\Json\Presets\PresetCategory.cs" />\r
-    <Compile Include="Interop\Json\Presets\PresetTransportContainer.cs" />\r
-    <Compile Include="Interop\Json\Queue\Task.cs" />\r
-    <Compile Include="Interop\Json\Scan\AudioAttributes.cs" />\r
-    <Compile Include="Interop\Json\Scan\SubtitleAttributes.cs" />\r
-    <Compile Include="Interop\Json\Shared\PAR.cs" />\r
-    <Compile Include="Interop\Json\Encode\Audio.cs" />\r
-    <Compile Include="Interop\Json\Encode\AudioTrack.cs" />\r
-    <Compile Include="Interop\Json\Encode\Chapter.cs" />\r
-    <Compile Include="Interop\Json\Encode\Destination.cs" />\r
-    <Compile Include="Interop\Json\Encode\Filters.cs" />\r
-    <Compile Include="Interop\Json\Encode\Filter.cs" />\r
-    <Compile Include="Interop\Json\Encode\JsonEncodeObject.cs" />\r
-    <Compile Include="Interop\Json\Encode\Metadata.cs" />\r
-    <Compile Include="Interop\Json\Encode\Mp4Options.cs" />\r
-    <Compile Include="Interop\Json\Encode\Range.cs" />\r
-    <Compile Include="Interop\Json\Encode\SubtitleSearch.cs" />\r
-    <Compile Include="Interop\Json\Encode\Source.cs" />\r
-    <Compile Include="Interop\Json\Encode\SRT.cs" />\r
-    <Compile Include="Interop\Json\Encode\Subtitles.cs" />\r
-    <Compile Include="Interop\Json\Encode\SubtitleTrack.cs" />\r
-    <Compile Include="Interop\Json\Encode\Video.cs" />\r
-    <Compile Include="Interop\Factories\AnamorphicFactory.cs" />\r
-    <Compile Include="Interop\Json\State\TaskState.cs" />\r
-    <Compile Include="Interop\Model\Encoding\CombDetect.cs" />\r
-    <Compile Include="Interop\Model\Encoding\DeinterlaceFilter.cs" />\r
-    <Compile Include="Interop\Model\Encoding\HBPresetTune.cs" />\r
-    <Compile Include="Interop\Model\Encoding\Sharpen.cs" />\r
-    <Compile Include="Interop\Model\Preview\RawPreviewData.cs" />\r
-    <Compile Include="Properties\AssemblyInfo.cs" />\r
-    <Compile Include="Interop\Json\Scan\SourceAudioTrack.cs" />\r
-    <Compile Include="Interop\Json\Scan\SourceChapter.cs" />\r
-    <Compile Include="Interop\Json\Scan\Color.cs" />\r
-    <Compile Include="Interop\Json\Scan\Duration.cs" />\r
-    <Compile Include="Interop\Json\Scan\FrameRate.cs" />\r
-    <Compile Include="Interop\Json\Shared\Geometry.cs" />\r
-    <Compile Include="Interop\Json\Scan\JsonScanObject.cs" />\r
-    <Compile Include="Interop\Json\Scan\SourceMetadata.cs" />\r
-    <Compile Include="Interop\Json\Scan\SourceSubtitleTrack.cs" />\r
-    <Compile Include="Interop\Json\Scan\SourceTitle.cs" />\r
-    <Compile Include="Interop\Json\State\JsonState.cs" />\r
-    <Compile Include="Interop\Json\State\Scanning.cs" />\r
-    <Compile Include="Interop\Json\State\WorkDone.cs" />\r
-    <Compile Include="Interop\Json\State\Working.cs" />\r
-    <Compile Include="Interop\Model\BitrateLimits.cs" />\r
-    <Compile Include="Interop\Model\Cropping.cs" />\r
-    <Compile Include="Interop\Model\Encoding\Anamorphic.cs" />\r
-    <Compile Include="Interop\Model\Encoding\Container.cs" />\r
-    <Compile Include="Interop\Model\Encoding\Decomb.cs" />\r
-    <Compile Include="Interop\Model\Encoding\Deinterlace.cs" />\r
-    <Compile Include="Interop\Model\Encoding\Denoise.cs" />\r
-    <Compile Include="Interop\Model\Encoding\Detelecine.cs" />\r
-    <Compile Include="Interop\Model\Encoding\HBAudioEncoder.cs" />\r
-    <Compile Include="Interop\Model\Encoding\HBContainer.cs" />\r
-    <Compile Include="Interop\Model\Encoding\HBMixdown.cs" />\r
-    <Compile Include="Interop\Model\Encoding\HBRate.cs" />\r
-    <Compile Include="Interop\Model\Encoding\HBVideoEncoder.cs" />\r
-    <Compile Include="Interop\Model\Encoding\PictureRotation.cs" />\r
-    <Compile Include="Interop\Model\Encoding\ScaleMethod.cs" />\r
-    <Compile Include="Interop\Model\Encoding\VideoEncoder.cs" />\r
-    <Compile Include="Interop\Model\Encoding\VideoEncodeRateType.cs" />\r
-    <Compile Include="Interop\Model\Language.cs" />\r
-    <Compile Include="Interop\Model\Preview\PreviewSettings.cs" />\r
-    <Compile Include="Interop\Model\RangeLimits.cs" />\r
-    <Compile Include="Interop\Model\Size.cs" />\r
-    <Compile Include="Interop\Model\SourceVideoInfo.cs" />\r
-    <Compile Include="Interop\Model\VideoQualityLimits.cs" />\r
-    <Compile Include="Model\HBConfiguration.cs" />\r
-    <Compile Include="Model\VideoScaler.cs" />\r
-    <Compile Include="Utilities\SystemInfo.cs" />\r
-    <Compile Include="Utilities\VersionHelper.cs" />\r
-    <Compile Include="Properties\Resources.Designer.cs">\r
-      <AutoGen>True</AutoGen>\r
-      <DesignTime>True</DesignTime>\r
-      <DependentUpon>Resources.resx</DependentUpon>\r
-    </Compile>\r
-    <Compile Include="Utilities\CharCodesUtilities.cs" />\r
-    <Compile Include="Utilities\LanguageUtilities.cs" />\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <AdditionalFiles Include="..\stylecop.json">\r
-      <Link>stylecop.json</Link>\r
-    </AdditionalFiles>\r
-    <None Include="app.config" />\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <None Include="HandBrake.ApplicationServices.nuspec" />\r
-    <None Include="packages.config" />\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <EmbeddedResource Include="Properties\Resources.resx">\r
-      <Generator>ResXFileCodeGenerator</Generator>\r
-      <LastGenOutput>Resources.Designer.cs</LastGenOutput>\r
-      <SubType>Designer</SubType>\r
-    </EmbeddedResource>\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
-  <Target Name="BeforeBuild">\r
-  </Target>\r
-  <Target Name="AfterBuild">\r
-  </Target>\r
-  -->\r
-  <PropertyGroup>\r
-    <PreBuildEvent>\r
-    </PreBuildEvent>\r
-  </PropertyGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x64</Platform>
+    <ProjectGuid>{087A2BA8-BAC2-4577-A46F-07FF9D420016}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HandBrake.Interop</RootNamespace>
+    <AssemblyName>HandBrake.Interop</AssemblyName>
+    <TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <UpgradeBackupLocation />
+    <TargetFrameworkProfile>
+    </TargetFrameworkProfile>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+    <PlatformTarget>x64</PlatformTarget>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>TRACE;DEBUG</DefineConstants>
+    <UseVSHostingProcess>true</UseVSHostingProcess>
+    <Prefer32Bit>false</Prefer32Bit>
+    <CodeAnalysisRuleSet>..\HandBrake.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <DebugSymbols>true</DebugSymbols>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Attributes\DisplayName.cs" />
+    <Compile Include="Attributes\ShortName.cs" />
+    <Compile Include="Interop\EventArgs\EncodeCompletedEventArgs.cs" />
+    <Compile Include="Interop\EventArgs\EncodeProgressEventArgs.cs" />
+    <Compile Include="Interop\EventArgs\MessageLoggedEventArgs.cs" />
+    <Compile Include="Interop\EventArgs\ScanProgressEventArgs.cs" />
+    <Compile Include="Interop\HandBrakeEncoderHelpers.cs" />
+    <Compile Include="Interop\HandBrakeFilterHelpers.cs" />
+    <Compile Include="Interop\HandBrakeInstance.cs" />
+    <Compile Include="Interop\HandBrakeInstanceManager.cs" />
+    <Compile Include="Interop\HandBrakeLanguagesHelper.cs" />
+    <Compile Include="Interop\HandBrakePresetService.cs" />
+    <Compile Include="Interop\HandBrakeUnitConversionHelpers.cs" />
+    <Compile Include="Interop\HandBrakeUtils.cs" />
+    <Compile Include="Interop\HbLib\HBDelegates.cs" />
+    <Compile Include="Interop\HbLib\HbFunctions.cs" />
+    <Compile Include="Interop\HbLib\hb_anamorphic_mode_t.cs" />
+    <Compile Include="Interop\HbLib\hb_container_s.cs" />
+    <Compile Include="Interop\HbLib\hb_encoder_s.cs" />
+    <Compile Include="Interop\HbLib\hb_error_code.cs" />
+    <Compile Include="Interop\HbLib\hb_filter_ids.cs" />
+    <Compile Include="Interop\HbLib\hb_geometry.cs" />
+    <Compile Include="Interop\HbLib\hb_image_s.cs" />
+    <Compile Include="Interop\HbLib\hb_mixdown_s.cs" />
+    <Compile Include="Interop\HbLib\hb_rate_s.cs" />
+    <Compile Include="Interop\HbLib\hb_subtitle.cs" />
+    <Compile Include="Interop\HbLib\iso639_lang_t.cs" />
+    <Compile Include="Interop\HbLib\NativeConstants.cs" />
+    <Compile Include="Interop\Helpers\InteropUtilities.cs" />
+    <Compile Include="Interop\Helpers\NativeList.cs" />
+    <Compile Include="Interop\Helpers\Utilities.cs" />
+    <Compile Include="Interop\Interfaces\IHandBrakeInstance.cs" />
+    <Compile Include="Interop\Json\Anamorphic\AnamorphicGeometry.cs" />
+    <Compile Include="Interop\Json\Anamorphic\DestSettings.cs" />
+    <Compile Include="Interop\Json\Encode\QSV.cs" />
+    <Compile Include="Interop\Json\Filters\PresetTune.cs" />
+    <Compile Include="Interop\Json\Presets\AudioList.cs" />
+    <Compile Include="Interop\Json\Presets\HBPreset.cs" />
+    <Compile Include="Interop\Json\Presets\PresetCategory.cs" />
+    <Compile Include="Interop\Json\Presets\PresetTransportContainer.cs" />
+    <Compile Include="Interop\Json\Queue\Task.cs" />
+    <Compile Include="Interop\Json\Scan\AudioAttributes.cs" />
+    <Compile Include="Interop\Json\Scan\SubtitleAttributes.cs" />
+    <Compile Include="Interop\Json\Shared\PAR.cs" />
+    <Compile Include="Interop\Json\Encode\Audio.cs" />
+    <Compile Include="Interop\Json\Encode\AudioTrack.cs" />
+    <Compile Include="Interop\Json\Encode\Chapter.cs" />
+    <Compile Include="Interop\Json\Encode\Destination.cs" />
+    <Compile Include="Interop\Json\Encode\Filters.cs" />
+    <Compile Include="Interop\Json\Encode\Filter.cs" />
+    <Compile Include="Interop\Json\Encode\JsonEncodeObject.cs" />
+    <Compile Include="Interop\Json\Encode\Metadata.cs" />
+    <Compile Include="Interop\Json\Encode\Mp4Options.cs" />
+    <Compile Include="Interop\Json\Encode\Range.cs" />
+    <Compile Include="Interop\Json\Encode\SubtitleSearch.cs" />
+    <Compile Include="Interop\Json\Encode\Source.cs" />
+    <Compile Include="Interop\Json\Encode\SRT.cs" />
+    <Compile Include="Interop\Json\Encode\Subtitles.cs" />
+    <Compile Include="Interop\Json\Encode\SubtitleTrack.cs" />
+    <Compile Include="Interop\Json\Encode\Video.cs" />
+    <Compile Include="Interop\Factories\AnamorphicFactory.cs" />
+    <Compile Include="Interop\Json\State\TaskState.cs" />
+    <Compile Include="Interop\Model\Encoding\CombDetect.cs" />
+    <Compile Include="Interop\Model\Encoding\DeinterlaceFilter.cs" />
+    <Compile Include="Interop\Model\Encoding\HBPresetTune.cs" />
+    <Compile Include="Interop\Model\Encoding\Sharpen.cs" />
+    <Compile Include="Interop\Model\Preview\RawPreviewData.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Interop\Json\Scan\SourceAudioTrack.cs" />
+    <Compile Include="Interop\Json\Scan\SourceChapter.cs" />
+    <Compile Include="Interop\Json\Scan\Color.cs" />
+    <Compile Include="Interop\Json\Scan\Duration.cs" />
+    <Compile Include="Interop\Json\Scan\FrameRate.cs" />
+    <Compile Include="Interop\Json\Shared\Geometry.cs" />
+    <Compile Include="Interop\Json\Scan\JsonScanObject.cs" />
+    <Compile Include="Interop\Json\Scan\SourceMetadata.cs" />
+    <Compile Include="Interop\Json\Scan\SourceSubtitleTrack.cs" />
+    <Compile Include="Interop\Json\Scan\SourceTitle.cs" />
+    <Compile Include="Interop\Json\State\JsonState.cs" />
+    <Compile Include="Interop\Json\State\Scanning.cs" />
+    <Compile Include="Interop\Json\State\WorkDone.cs" />
+    <Compile Include="Interop\Json\State\Working.cs" />
+    <Compile Include="Interop\Model\BitrateLimits.cs" />
+    <Compile Include="Interop\Model\Cropping.cs" />
+    <Compile Include="Interop\Model\Encoding\Anamorphic.cs" />
+    <Compile Include="Interop\Model\Encoding\Container.cs" />
+    <Compile Include="Interop\Model\Encoding\Decomb.cs" />
+    <Compile Include="Interop\Model\Encoding\Deinterlace.cs" />
+    <Compile Include="Interop\Model\Encoding\Denoise.cs" />
+    <Compile Include="Interop\Model\Encoding\Detelecine.cs" />
+    <Compile Include="Interop\Model\Encoding\HBAudioEncoder.cs" />
+    <Compile Include="Interop\Model\Encoding\HBContainer.cs" />
+    <Compile Include="Interop\Model\Encoding\HBMixdown.cs" />
+    <Compile Include="Interop\Model\Encoding\HBRate.cs" />
+    <Compile Include="Interop\Model\Encoding\HBVideoEncoder.cs" />
+    <Compile Include="Interop\Model\Encoding\PictureRotation.cs" />
+    <Compile Include="Interop\Model\Encoding\ScaleMethod.cs" />
+    <Compile Include="Interop\Model\Encoding\VideoEncoder.cs" />
+    <Compile Include="Interop\Model\Encoding\VideoEncodeRateType.cs" />
+    <Compile Include="Interop\Model\Language.cs" />
+    <Compile Include="Interop\Model\Preview\PreviewSettings.cs" />
+    <Compile Include="Interop\Model\RangeLimits.cs" />
+    <Compile Include="Interop\Model\Size.cs" />
+    <Compile Include="Interop\Model\SourceVideoInfo.cs" />
+    <Compile Include="Interop\Model\VideoQualityLimits.cs" />
+    <Compile Include="Model\HBConfiguration.cs" />
+    <Compile Include="Model\VideoScaler.cs" />
+    <Compile Include="Utilities\SystemInfo.cs" />
+    <Compile Include="Utilities\VersionHelper.cs" />
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="Utilities\CharCodesUtilities.cs" />
+    <Compile Include="Utilities\LanguageUtilities.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <AdditionalFiles Include="..\stylecop.json">
+      <Link>stylecop.json</Link>
+    </AdditionalFiles>
+    <None Include="app.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HandBrake.Interop.nuspec" />
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent>
+    </PreBuildEvent>
+  </PropertyGroup>
 </Project>
\ No newline at end of file
similarity index 89%
rename from win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.nuspec
rename to win/CS/HandBrake.Interop/HandBrake.Interop.nuspec
index 4e7eb56f709c9065e382f8461c40cb6c05b01540..42a383f9f2d3c36a94339497002d37b2d69efdd5 100644 (file)
@@ -20,6 +20,6 @@
   </metadata>
 
   <files>
-    <file src="bin\Release\HandBrake.ApplicationServices.pdb" target="lib\net471" />
+    <file src="bin\Release\HandBrake.Interop.pdb" target="lib\net471" />
   </files>
 </package>
\ No newline at end of file
similarity index 92%
rename from win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeCompletedEventArgs.cs
rename to win/CS/HandBrake.Interop/Interop/EventArgs/EncodeCompletedEventArgs.cs
index 52b5719feb12049130ec6960cc5c286fb7c5eedd..ea54e1d1c4a2c2fde5af993186408bc11f34d1d4 100644 (file)
@@ -1,35 +1,35 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="EncodeCompletedEventArgs.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the EncodeCompletedEventArgs type.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.EventArgs\r
-{\r
-    using System;\r
-\r
-    /// <summary>\r
-    /// Encode Completed Event Args\r
-    /// </summary>\r
-    public class EncodeCompletedEventArgs : EventArgs\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="EncodeCompletedEventArgs"/> class.\r
-        /// </summary>\r
-        /// <param name="error">\r
-        /// The error.\r
-        /// </param>\r
-        public EncodeCompletedEventArgs(bool error)\r
-        {\r
-            this.Error = error;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets a value indicating whether an error occurred during the encode.\r
-        /// </summary>\r
-        public bool Error { get; private set; }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="EncodeCompletedEventArgs.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 EncodeCompletedEventArgs type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.EventArgs
+{
+    using System;
+
+    /// <summary>
+    /// Encode Completed Event Args
+    /// </summary>
+    public class EncodeCompletedEventArgs : EventArgs
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="EncodeCompletedEventArgs"/> class.
+        /// </summary>
+        /// <param name="error">
+        /// The error.
+        /// </param>
+        public EncodeCompletedEventArgs(bool error)
+        {
+            this.Error = error;
+        }
+
+        /// <summary>
+        /// Gets a value indicating whether an error occurred during the encode.
+        /// </summary>
+        public bool Error { get; private set; }
+    }
+}
similarity index 95%
rename from win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeProgressEventArgs.cs
rename to win/CS/HandBrake.Interop/Interop/EventArgs/EncodeProgressEventArgs.cs
index c43ac42d971df9a32463dd5cc90d24fd06b34f9e..30399519410b79c949db8f18883a64f81881ee8d 100644 (file)
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="EncodeProgressEventArgs.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the EncodeProgressEventArgs type.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.EventArgs\r
-{\r
-    using System;\r
-\r
-    /// <summary>s\r
-    /// Encode Progress Event Args\r
-    /// </summary>\r
-    public class EncodeProgressEventArgs : EventArgs\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="EncodeProgressEventArgs"/> class.\r
-        /// </summary>\r
-        /// <param name="fractionComplete">\r
-        /// The fraction complete.\r
-        /// </param>\r
-        /// <param name="currentFrameRate">\r
-        /// The current frame rate.\r
-        /// </param>\r
-        /// <param name="averageFrameRate">\r
-        /// The average frame rate.\r
-        /// </param>\r
-        /// <param name="estimatedTimeLeft">\r
-        /// The estimated time left.\r
-        /// </param>\r
-        /// <param name="passId">\r
-        /// The pass id.\r
-        /// </param>\r
-        /// <param name="pass">\r
-        /// The pass.\r
-        /// </param>\r
-        /// <param name="passCount">\r
-        /// The pass count.\r
-        /// </param>\r
-        /// <param name="stateCode">\r
-        /// The code for the state the encode process is in.\r
-        /// </param>\r
-        public EncodeProgressEventArgs(double fractionComplete, double currentFrameRate, double averageFrameRate, TimeSpan estimatedTimeLeft, int passId, int pass, int passCount, string stateCode)\r
-        {\r
-            this.FractionComplete = fractionComplete;\r
-            this.CurrentFrameRate = currentFrameRate;\r
-            this.AverageFrameRate = averageFrameRate;\r
-            this.EstimatedTimeLeft = estimatedTimeLeft;\r
-            this.PassId = passId;\r
-            this.Pass = pass;\r
-            this.PassCount = passCount;\r
-            this.StateCode = stateCode;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the % Complete.\r
-        /// </summary>\r
-        public double FractionComplete { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the Current FrameRate.\r
-        /// </summary>\r
-        public double CurrentFrameRate { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the Average FrameRate.\r
-        /// </summary>\r
-        public double AverageFrameRate { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the Estimated Time Left.\r
-        /// </summary>\r
-        public TimeSpan EstimatedTimeLeft { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the pass ID.\r
-        /// </summary>\r
-        /// <remarks>\r
-        /// -1: Subtitle scan\r
-        ///  0: Encode\r
-        ///  1: Encode first pass\r
-        ///  2: Encode second pass\r
-        /// </remarks>\r
-        public int PassId { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the current encoding pass. (1-based)\r
-        /// </summary>\r
-        public int Pass { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the pass count.\r
-        /// </summary>\r
-        public int PassCount { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the state code of the encode process.\r
-        /// </summary>\r
-        public string StateCode { get; }\r
-\r
-        /// <summary>\r
-        /// Gets a value indicating that we are doing a subtitle scan pass.\r
-        /// </summary>\r
-        public bool IsSubtitleScan\r
-        {\r
-            get\r
-            {\r
-                if (this.PassId == -1)\r
-                {\r
-                    return true;\r
-                }\r
-\r
-                return false;\r
-            }\r
-        }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <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>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.EventArgs
+{
+    using System;
+
+    /// <summary>s
+    /// Encode Progress Event Args
+    /// </summary>
+    public class EncodeProgressEventArgs : EventArgs
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="EncodeProgressEventArgs"/> class.
+        /// </summary>
+        /// <param name="fractionComplete">
+        /// The fraction complete.
+        /// </param>
+        /// <param name="currentFrameRate">
+        /// The current frame rate.
+        /// </param>
+        /// <param name="averageFrameRate">
+        /// The average frame rate.
+        /// </param>
+        /// <param name="estimatedTimeLeft">
+        /// The estimated time left.
+        /// </param>
+        /// <param name="passId">
+        /// The pass id.
+        /// </param>
+        /// <param name="pass">
+        /// The pass.
+        /// </param>
+        /// <param name="passCount">
+        /// The pass count.
+        /// </param>
+        /// <param name="stateCode">
+        /// The code for the state the encode process is in.
+        /// </param>
+        public EncodeProgressEventArgs(double fractionComplete, double currentFrameRate, double averageFrameRate, TimeSpan estimatedTimeLeft, int passId, int pass, int passCount, string stateCode)
+        {
+            this.FractionComplete = fractionComplete;
+            this.CurrentFrameRate = currentFrameRate;
+            this.AverageFrameRate = averageFrameRate;
+            this.EstimatedTimeLeft = estimatedTimeLeft;
+            this.PassId = passId;
+            this.Pass = pass;
+            this.PassCount = passCount;
+            this.StateCode = stateCode;
+        }
+
+        /// <summary>
+        /// Gets the % Complete.
+        /// </summary>
+        public double FractionComplete { get; private set; }
+
+        /// <summary>
+        /// Gets the Current FrameRate.
+        /// </summary>
+        public double CurrentFrameRate { get; private set; }
+
+        /// <summary>
+        /// Gets the Average FrameRate.
+        /// </summary>
+        public double AverageFrameRate { get; private set; }
+
+        /// <summary>
+        /// Gets the Estimated Time Left.
+        /// </summary>
+        public TimeSpan EstimatedTimeLeft { get; private set; }
+
+        /// <summary>
+        /// Gets the pass ID.
+        /// </summary>
+        /// <remarks>
+        /// -1: Subtitle scan
+        ///  0: Encode
+        ///  1: Encode first pass
+        ///  2: Encode second pass
+        /// </remarks>
+        public int PassId { get; private set; }
+
+        /// <summary>
+        /// Gets the current encoding pass. (1-based)
+        /// </summary>
+        public int Pass { get; private set; }
+
+        /// <summary>
+        /// Gets the pass count.
+        /// </summary>
+        public int PassCount { get; private set; }
+
+        /// <summary>
+        /// Gets the state code of the encode process.
+        /// </summary>
+        public string StateCode { get; }
+
+        /// <summary>
+        /// Gets a value indicating that we are doing a subtitle scan pass.
+        /// </summary>
+        public bool IsSubtitleScan
+        {
+            get
+            {
+                if (this.PassId == -1)
+                {
+                    return true;
+                }
+
+                return false;
+            }
+        }
+    }
+}
similarity index 92%
rename from win/CS/HandBrake.ApplicationServices/Interop/EventArgs/MessageLoggedEventArgs.cs
rename to win/CS/HandBrake.Interop/Interop/EventArgs/MessageLoggedEventArgs.cs
index 610ab0a77a4788393671349fba8470ba9565b5d4..2359fff5dc5ef8dda6dac0307394b79bf5b0f313 100644 (file)
@@ -1,35 +1,35 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="MessageLoggedEventArgs.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the MessageLoggedEventArgs type.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.EventArgs\r
-{\r
-    using System;\r
-\r
-    /// <summary>\r
-    /// The Message Logged Event Args\r
-    /// </summary>\r
-    public class MessageLoggedEventArgs : EventArgs\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="MessageLoggedEventArgs"/> class.\r
-        /// </summary>\r
-        /// <param name="message">\r
-        /// The message.\r
-        /// </param>\r
-        public MessageLoggedEventArgs(string message)\r
-        {\r
-            this.Message = message;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the Message.\r
-        /// </summary>\r
-        public string Message { get; private set; }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <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>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.EventArgs
+{
+    using System;
+
+    /// <summary>
+    /// The Message Logged Event Args
+    /// </summary>
+    public class MessageLoggedEventArgs : EventArgs
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="MessageLoggedEventArgs"/> class.
+        /// </summary>
+        /// <param name="message">
+        /// The message.
+        /// </param>
+        public MessageLoggedEventArgs(string message)
+        {
+            this.Message = message;
+        }
+
+        /// <summary>
+        /// Gets the Message.
+        /// </summary>
+        public string Message { get; private set; }
+    }
+}
similarity index 94%
rename from win/CS/HandBrake.ApplicationServices/Interop/EventArgs/ScanProgressEventArgs.cs
rename to win/CS/HandBrake.Interop/Interop/EventArgs/ScanProgressEventArgs.cs
index 78737943e1b7ebdb027aa9d14ea9bb394175748c..8e87552a2917aa51e3f8a30913107bfb003adba2 100644 (file)
@@ -1,71 +1,71 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="ScanProgressEventArgs.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the ScanProgressEventArgs type.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.EventArgs\r
-{\r
-    using System;\r
-\r
-    /// <summary>\r
-    /// The Scan Progress Event Args\r
-    /// </summary>\r
-    public class ScanProgressEventArgs : EventArgs\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="ScanProgressEventArgs"/> class.\r
-        /// </summary>\r
-        /// <param name="progress">\r
-        /// The progress.\r
-        /// </param>\r
-        /// <param name="currentPreview">\r
-        /// The current preview.\r
-        /// </param>\r
-        /// <param name="previews">\r
-        /// The previews.\r
-        /// </param>\r
-        /// <param name="currentTitle">\r
-        /// The current title.\r
-        /// </param>\r
-        /// <param name="titles">\r
-        /// The titles.\r
-        /// </param>\r
-        public ScanProgressEventArgs(double progress, int currentPreview, int previews, int currentTitle, int titles)\r
-        {\r
-            this.Progress = progress;\r
-            this.CurrentPreview = currentPreview;\r
-            this.Previews = previews;\r
-            this.CurrentTitle = currentTitle;\r
-            this.Titles = titles;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the total progress fraction for the scan.\r
-        /// </summary>\r
-        public double Progress { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the current preview being processed on the scan.\r
-        /// </summary>\r
-        public int CurrentPreview { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the total number of previews to process.\r
-        /// </summary>\r
-        public int Previews { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the current title being processed on the scan.\r
-        /// </summary>\r
-        public int CurrentTitle { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the total number of titles to process.\r
-        /// </summary>\r
-        public int Titles { get; private set; }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <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>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.EventArgs
+{
+    using System;
+
+    /// <summary>
+    /// The Scan Progress Event Args
+    /// </summary>
+    public class ScanProgressEventArgs : EventArgs
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="ScanProgressEventArgs"/> class.
+        /// </summary>
+        /// <param name="progress">
+        /// The progress.
+        /// </param>
+        /// <param name="currentPreview">
+        /// The current preview.
+        /// </param>
+        /// <param name="previews">
+        /// The previews.
+        /// </param>
+        /// <param name="currentTitle">
+        /// The current title.
+        /// </param>
+        /// <param name="titles">
+        /// The titles.
+        /// </param>
+        public ScanProgressEventArgs(double progress, int currentPreview, int previews, int currentTitle, int titles)
+        {
+            this.Progress = progress;
+            this.CurrentPreview = currentPreview;
+            this.Previews = previews;
+            this.CurrentTitle = currentTitle;
+            this.Titles = titles;
+        }
+
+        /// <summary>
+        /// Gets the total progress fraction for the scan.
+        /// </summary>
+        public double Progress { get; private set; }
+
+        /// <summary>
+        /// Gets the current preview being processed on the scan.
+        /// </summary>
+        public int CurrentPreview { get; private set; }
+
+        /// <summary>
+        /// Gets the total number of previews to process.
+        /// </summary>
+        public int Previews { get; private set; }
+
+        /// <summary>
+        /// Gets the current title being processed on the scan.
+        /// </summary>
+        public int CurrentTitle { get; private set; }
+
+        /// <summary>
+        /// Gets the total number of titles to process.
+        /// </summary>
+        public int Titles { get; private set; }
+    }
+}
similarity index 88%
rename from win/CS/HandBrake.ApplicationServices/Interop/Factories/AnamorphicFactory.cs
rename to win/CS/HandBrake.Interop/Interop/Factories/AnamorphicFactory.cs
index 5d095cc2caf849626ff5207390544832b4e6c61b..a1d0207f38f919bf27d5b8a5a26b92afbc1cb4d0 100644 (file)
@@ -1,94 +1,94 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="AnamorphicFactory.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The Anamorphic factory.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Factories\r
-{\r
-    using System.Collections.Generic;\r
-\r
-    using HandBrake.ApplicationServices.Interop.Json.Anamorphic;\r
-    using HandBrake.ApplicationServices.Interop.Json.Shared;\r
-    using HandBrake.ApplicationServices.Interop.Model;\r
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
-    using HandBrake.ApplicationServices.Interop.Model.Preview;\r
-\r
-    /// <summary>\r
-    /// The anamorphic factory.\r
-    /// </summary>\r
-    public class AnamorphicFactory\r
-    {\r
-        /// <summary>\r
-        /// The keep setting.\r
-        /// </summary>\r
-        public enum KeepSetting\r
-        {\r
-            HB_KEEP_WIDTH = 0x01, \r
-            HB_KEEP_HEIGHT = 0x02, \r
-            HB_KEEP_DISPLAY_ASPECT = 0x04\r
-        }\r
-\r
-        /// <summary>\r
-        /// Finds output geometry for the given preview settings and title.\r
-        /// </summary>\r
-        /// <param name="settings">\r
-        /// The preview settings.\r
-        /// </param>\r
-        /// <param name="title">\r
-        /// Information on the title to consider.\r
-        /// </param>\r
-        /// <returns>\r
-        /// Geometry Information\r
-        /// </returns>\r
-        public static Geometry CreateGeometry(PreviewSettings settings, SourceVideoInfo title)\r
-        {\r
-            int settingMode = settings.KeepDisplayAspect ? 0x04 : 0;\r
-\r
-            // Sanitize the Geometry First.\r
-            AnamorphicGeometry anamorphicGeometry = new AnamorphicGeometry\r
-            {\r
-                SourceGeometry = new Geometry\r
-                {\r
-                    Width = title.Resolution.Width, \r
-                    Height = title.Resolution.Height, \r
-                    PAR = new PAR { Num = title.ParVal.Width, Den = title.ParVal.Height }\r
-                }, \r
-                DestSettings = new DestSettings\r
-                {\r
-                    AnamorphicMode = (int)settings.Anamorphic, \r
-                    Geometry =\r
-                    {\r
-                        Width = settings.Width, \r
-                        Height = settings.Height, \r
-                        PAR = new PAR\r
-                        {\r
-                            Num = settings.Anamorphic != Anamorphic.Custom ? title.ParVal.Width : settings.PixelAspectX, \r
-                            Den = settings.Anamorphic != Anamorphic.Custom ? title.ParVal.Height : settings.PixelAspectY, \r
-                        }\r
-                    }, \r
-                    Keep = settingMode, \r
-                    Crop = new List<int> { settings.Cropping.Top, settings.Cropping.Bottom, settings.Cropping.Left, settings.Cropping.Right }, \r
-                    Modulus = settings.Modulus ?? 16, \r
-                    MaxWidth = settings.MaxWidth, \r
-                    MaxHeight = settings.MaxHeight, \r
-                    ItuPAR = false\r
-                }\r
-            };\r
-\r
-            if (settings.Anamorphic == Anamorphic.Custom)\r
-            {\r
-                anamorphicGeometry.DestSettings.Geometry.PAR = new PAR { Num = settings.PixelAspectX, Den = settings.PixelAspectY };\r
-            }\r
-            else\r
-            {\r
-                anamorphicGeometry.DestSettings.Geometry.PAR = new PAR { Num = title.ParVal.Width, Den = title.ParVal.Height };\r
-            }\r
-\r
-            return HandBrakeUtils.GetAnamorphicSize(anamorphicGeometry);\r
-        }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="AnamorphicFactory.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>
+//   The Anamorphic factory.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Factories
+{
+    using System.Collections.Generic;
+
+    using HandBrake.Interop.Interop.Json.Anamorphic;
+    using HandBrake.Interop.Interop.Json.Shared;
+    using HandBrake.Interop.Interop.Model;
+    using HandBrake.Interop.Interop.Model.Encoding;
+    using HandBrake.Interop.Interop.Model.Preview;
+
+    /// <summary>
+    /// The anamorphic factory.
+    /// </summary>
+    public class AnamorphicFactory
+    {
+        /// <summary>
+        /// The keep setting.
+        /// </summary>
+        public enum KeepSetting
+        {
+            HB_KEEP_WIDTH = 0x01, 
+            HB_KEEP_HEIGHT = 0x02, 
+            HB_KEEP_DISPLAY_ASPECT = 0x04
+        }
+
+        /// <summary>
+        /// Finds output geometry for the given preview settings and title.
+        /// </summary>
+        /// <param name="settings">
+        /// The preview settings.
+        /// </param>
+        /// <param name="title">
+        /// Information on the title to consider.
+        /// </param>
+        /// <returns>
+        /// Geometry Information
+        /// </returns>
+        public static Geometry CreateGeometry(PreviewSettings settings, SourceVideoInfo title)
+        {
+            int settingMode = settings.KeepDisplayAspect ? 0x04 : 0;
+
+            // Sanitize the Geometry First.
+            AnamorphicGeometry anamorphicGeometry = new AnamorphicGeometry
+            {
+                SourceGeometry = new Geometry
+                {
+                    Width = title.Resolution.Width, 
+                    Height = title.Resolution.Height, 
+                    PAR = new PAR { Num = title.ParVal.Width, Den = title.ParVal.Height }
+                }, 
+                DestSettings = new DestSettings
+                {
+                    AnamorphicMode = (int)settings.Anamorphic, 
+                    Geometry =
+                    {
+                        Width = settings.Width, 
+                        Height = settings.Height, 
+                        PAR = new PAR
+                        {
+                            Num = settings.Anamorphic != Anamorphic.Custom ? title.ParVal.Width : settings.PixelAspectX, 
+                            Den = settings.Anamorphic != Anamorphic.Custom ? title.ParVal.Height : settings.PixelAspectY, 
+                        }
+                    }, 
+                    Keep = settingMode, 
+                    Crop = new List<int> { settings.Cropping.Top, settings.Cropping.Bottom, settings.Cropping.Left, settings.Cropping.Right }, 
+                    Modulus = settings.Modulus ?? 16, 
+                    MaxWidth = settings.MaxWidth, 
+                    MaxHeight = settings.MaxHeight, 
+                    ItuPAR = false
+                }
+            };
+
+            if (settings.Anamorphic == Anamorphic.Custom)
+            {
+                anamorphicGeometry.DestSettings.Geometry.PAR = new PAR { Num = settings.PixelAspectX, Den = settings.PixelAspectY };
+            }
+            else
+            {
+                anamorphicGeometry.DestSettings.Geometry.PAR = new PAR { Num = title.ParVal.Width, Den = title.ParVal.Height };
+            }
+
+            return HandBrakeUtils.GetAnamorphicSize(anamorphicGeometry);
+        }
+    }
+}
similarity index 95%
rename from win/CS/HandBrake.ApplicationServices/Interop/HandBrakeEncoderHelpers.cs
rename to win/CS/HandBrake.Interop/Interop/HandBrakeEncoderHelpers.cs
index 125c0444909744f37fdf0b1620d63140f49d0d6f..db5744315d3c0f1367f9866a2f03e4fc6f898a99 100644 (file)
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="HandBrakeEncoderHelpers.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The encoders.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop\r
-{\r
-    using System.Collections.Generic;\r
-    using System.Linq;\r
-\r
-    using HandBrake.ApplicationServices.Interop.HbLib;\r
-    using HandBrake.ApplicationServices.Interop.Helpers;\r
-    using HandBrake.ApplicationServices.Interop.Model;\r
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
-\r
-    /// <summary>\r
-    /// The encoders.\r
-    /// </summary>\r
-    public static class HandBrakeEncoderHelpers\r
-    {\r
-        /// <summary>\r
-        /// The audio encoders.\r
-        /// </summary>\r
-        private static List<HBAudioEncoder> audioEncoders;\r
-\r
-        /// <summary>\r
-        /// The video encoders.\r
-        /// </summary>\r
-        private static List<HBVideoEncoder> videoEncoders;\r
-\r
-        /// <summary>\r
-        /// Video framerates in pts.\r
-        /// </summary>\r
-        private static List<HBRate> videoFramerates;\r
-\r
-        /// <summary>\r
-        /// List of HandBrake mixdowns.\r
-        /// </summary>\r
-        private static List<HBMixdown> mixdowns;\r
-\r
-        /// <summary>\r
-        /// List of HandBrake containers.\r
-        /// </summary> \r
-        private static List<HBContainer> containers;\r
-\r
-        /// <summary>\r
-        /// The audio bitrates.\r
-        /// </summary>\r
-        private static List<int> audioBitrates;\r
-\r
-        /// <summary>\r
-        /// Audio sample rates in Hz.\r
-        /// </summary>\r
-        private static List<HBRate> audioSampleRates;\r
-\r
-        /// <summary>\r
-        /// Initializes static members of the HandBrakeEncoderHelpers class.\r
-        /// </summary>\r
-        static HandBrakeEncoderHelpers()\r
-        {\r
-            HandBrakeUtils.EnsureGlobalInit();\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets a list of supported audio encoders.\r
-        /// </summary>\r
-        public static List<HBAudioEncoder> AudioEncoders\r
-        {\r
-            get\r
-            {\r
-                if (audioEncoders == null)\r
-                {\r
-                    audioEncoders = InteropUtilities.ToListFromIterator<hb_encoder_s, HBAudioEncoder>(HBFunctions.hb_audio_encoder_get_next, HandBrakeUnitConversionHelpers.NativeToAudioEncoder);\r
-                }\r
-\r
-                return audioEncoders;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets a list of supported video encoders.\r
-        /// </summary>\r
-        public static List<HBVideoEncoder> VideoEncoders\r
-        {\r
-            get\r
-            {\r
-                if (videoEncoders == null)\r
-                {\r
-                    videoEncoders = InteropUtilities.ToListFromIterator<hb_encoder_s, HBVideoEncoder>(HBFunctions.hb_video_encoder_get_next, HandBrakeUnitConversionHelpers.NativeToVideoEncoder);\r
-                }\r
-\r
-                return videoEncoders;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets a list of supported video framerates (in pts).\r
-        /// </summary>\r
-        public static List<HBRate> VideoFramerates\r
-        {\r
-            get\r
-            {\r
-                if (videoFramerates == null)\r
-                {\r
-                    videoFramerates = InteropUtilities.ToListFromIterator<hb_rate_s, HBRate>(HBFunctions.hb_video_framerate_get_next, HandBrakeUnitConversionHelpers.NativeToRate);\r
-                }\r
-\r
-                return videoFramerates;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets a list of supported mixdowns.\r
-        /// </summary>\r
-        public static List<HBMixdown> Mixdowns\r
-        {\r
-            get\r
-            {\r
-                if (mixdowns == null)\r
-                {\r
-                    mixdowns = InteropUtilities.ToListFromIterator<hb_mixdown_s, HBMixdown>(HBFunctions.hb_mixdown_get_next, HandBrakeUnitConversionHelpers.NativeToMixdown);\r
-                }\r
-\r
-                return mixdowns;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets a list of supported audio bitrates.\r
-        /// </summary>\r
-        public static List<int> AudioBitrates\r
-        {\r
-            get\r
-            {\r
-                if (audioBitrates == null)\r
-                {\r
-                    audioBitrates = InteropUtilities.ToListFromIterator<hb_rate_s, int>(HBFunctions.hb_audio_bitrate_get_next, b => b.rate);\r
-                }\r
-\r
-                return audioBitrates;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets a list of supported audio sample rates (in Hz).\r
-        /// </summary>\r
-        public static List<HBRate> AudioSampleRates\r
-        {\r
-            get\r
-            {\r
-                if (audioSampleRates == null)\r
-                {\r
-                    audioSampleRates = InteropUtilities.ToListFromIterator<hb_rate_s, HBRate>(HBFunctions.hb_audio_samplerate_get_next, HandBrakeUnitConversionHelpers.NativeToRate);\r
-                }\r
-\r
-                return audioSampleRates;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets a list of supported containers.\r
-        /// </summary>\r
-        public static List<HBContainer> Containers\r
-        {\r
-            get\r
-            {\r
-                if (containers == null)\r
-                {\r
-                    containers = InteropUtilities.ToListFromIterator<hb_container_s, HBContainer>(HBFunctions.hb_container_get_next, HandBrakeUnitConversionHelpers.NativeToContainer);\r
-                }\r
-\r
-                return containers;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets a value indicating whether SRT subtitles can be burnt in.\r
-        /// </summary>\r
-        public static bool CanBurnSrt\r
-        {\r
-            get\r
-            {\r
-                return HBFunctions.hb_subtitle_can_burn((int)hb_subtitle_s_subsource.SRTSUB) > 0;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the audio encoder with the specified short name.\r
-        /// </summary>\r
-        /// <param name="shortName">\r
-        /// The name of the audio encoder.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The requested audio encoder.\r
-        /// </returns>\r
-        public static HBAudioEncoder GetAudioEncoder(string shortName)\r
-        {\r
-            return AudioEncoders.SingleOrDefault(e => e.ShortName == shortName);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the audio encoder with the specified codec ID.\r
-        /// </summary>\r
-        /// <param name="codecId">\r
-        /// The ID of the audio encoder.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The requested audio encoder.\r
-        /// </returns>\r
-        public static HBAudioEncoder GetAudioEncoder(int codecId)\r
-        {\r
-            return AudioEncoders.SingleOrDefault(e => e.Id == codecId);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the video encoder with the specified short name.\r
-        /// </summary>\r
-        /// <param name="shortName">\r
-        /// The name of the video encoder.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The requested video encoder.\r
-        /// </returns>\r
-        public static HBVideoEncoder GetVideoEncoder(string shortName)\r
-        {\r
-            return VideoEncoders.SingleOrDefault(e => e.ShortName == shortName);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the mixdown with the specified short name.\r
-        /// </summary>\r
-        /// <param name="shortName">\r
-        /// The name of the mixdown.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The requested mixdown.\r
-        /// </returns>\r
-        public static HBMixdown GetMixdown(string shortName)\r
-        {\r
-            return Mixdowns.SingleOrDefault(m => m.ShortName == shortName);\r
-        }\r
-\r
-               /// <summary>\r
-               /// Gets the mixdown with the specified ID.\r
-               /// </summary>\r
-               /// <param name="id">The mixdown ID.</param>\r
-               /// <returns>The requested mixdown.</returns>\r
-           public static HBMixdown GetMixdown(int id)\r
-           {\r
-                   return Mixdowns.SingleOrDefault(m => m.Id == id);\r
-           }\r
-\r
-        /// <summary>\r
-        /// Gets the container with the specified short name.\r
-        /// </summary>\r
-        /// <param name="shortName">\r
-        /// The name of the container.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The requested container.\r
-        /// </returns>\r
-        public static HBContainer GetContainer(string shortName)\r
-        {\r
-            return Containers.SingleOrDefault(c => c.ShortName == shortName);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Returns true if the subtitle source type can be set to forced only.\r
-        /// </summary>\r
-        /// <param name="source">\r
-        /// The subtitle source type (SSA, VobSub, etc)\r
-        /// </param>\r
-        /// <returns>\r
-        /// True if the subtitle source type can be set to forced only.\r
-        /// </returns>\r
-        public static bool SubtitleCanSetForcedOnly(int source)\r
-        {\r
-            return HBFunctions.hb_subtitle_can_force(source) > 0;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Returns true if the subtitle source type can be burned in.\r
-        /// </summary>\r
-        /// <param name="source">\r
-        /// The subtitle source type (SSA, VobSub, etc)\r
-        /// </param>\r
-        /// <returns>\r
-        /// True if the subtitle source type can be burned in.\r
-        /// </returns>\r
-        public static bool SubtitleCanBurn(int source)\r
-        {\r
-            return HBFunctions.hb_subtitle_can_burn(source) > 0;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Returns true if the subtitle type can be passed through using the given muxer.\r
-        /// </summary>\r
-        /// <param name="subtitleSourceType">\r
-        /// The subtitle source type (SSA, VobSub, etc)\r
-        /// </param>\r
-        /// <param name="muxer">\r
-        /// The ID of the muxer.\r
-        /// </param>\r
-        /// <returns>\r
-        /// True if the subtitle type can be passed through with the given muxer.\r
-        /// </returns>\r
-        public static bool SubtitleCanPassthrough(int subtitleSourceType, int muxer)\r
-        {\r
-            return HBFunctions.hb_subtitle_can_pass(subtitleSourceType, muxer) > 0;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the subtitle source type's name.\r
-        /// </summary>\r
-        /// <param name="source">\r
-        /// The subtitle source type (SSA, VobSub, etc).\r
-        /// </param>\r
-        /// <returns>\r
-        /// The name of the subtitle source.\r
-        /// </returns>\r
-        public static string GetSubtitleSourceName(int source)\r
-        {\r
-            switch ((hb_subtitle_s_subsource)source)\r
-            {\r
-                case hb_subtitle_s_subsource.CC608SUB:\r
-                    return "CC608";\r
-                case hb_subtitle_s_subsource.CC708SUB:\r
-                    return "CC708";\r
-                case hb_subtitle_s_subsource.SRTSUB:\r
-                    return "SRT";\r
-                case hb_subtitle_s_subsource.SSASUB:\r
-                    return "SSA";\r
-                case hb_subtitle_s_subsource.TX3GSUB:\r
-                    return "TX3G";\r
-                case hb_subtitle_s_subsource.UTF8SUB:\r
-                    return "UTF8";\r
-                case hb_subtitle_s_subsource.VOBSUB:\r
-                    return "VobSub";\r
-                case hb_subtitle_s_subsource.PGSSUB:\r
-                    return "PGS";\r
-                default:\r
-                    return string.Empty;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Determines if the given encoder is compatible with the given track.\r
-        /// </summary>\r
-        /// <param name="codecId">\r
-        /// The codec Id.\r
-        /// </param>\r
-        /// <param name="encoder">\r
-        /// The encoder to examine.\r
-        /// </param>\r
-        /// <returns>\r
-        /// True if the given encoder is comatible with the given audio track.\r
-        /// </returns>\r
-        /// <remarks>\r
-        /// Only works with passthrough encoders.\r
-        /// </remarks>\r
-        public static bool AudioEncoderIsCompatible(int codecId, HBAudioEncoder encoder)\r
-        {\r
-            return (codecId & encoder.Id) > 0;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Determines if the given mixdown supports the given channel layout.\r
-        /// </summary>\r
-        /// <param name="mixdown">\r
-        /// The mixdown to evaluate.\r
-        /// </param>\r
-        /// <param name="layout">\r
-        /// The channel layout to evaluate.\r
-        /// </param>\r
-        /// <returns>\r
-        /// True if the mixdown supports the given channel layout.\r
-        /// </returns>\r
-        public static bool MixdownHasRemixSupport(HBMixdown mixdown, ulong layout)\r
-        {\r
-            return HBFunctions.hb_mixdown_has_remix_support(mixdown.Id, layout) > 0;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Determines if the given encoder supports the given mixdown.\r
-        /// </summary>\r
-        /// <param name="mixdown">\r
-        /// The mixdown to evaluate.\r
-        /// </param>\r
-        /// <param name="encoder">\r
-        /// The encoder to evaluate.\r
-        /// </param>\r
-        /// <returns>\r
-        /// True if the encoder supports the mixdown.\r
-        /// </returns>\r
-        public static bool MixdownHasCodecSupport(HBMixdown mixdown, HBAudioEncoder encoder)\r
-        {\r
-            return HBFunctions.hb_mixdown_has_codec_support(mixdown.Id, (uint)encoder.Id) > 0;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Determines if a mixdown is available for a given track and encoder.\r
-        /// </summary>\r
-        /// <param name="mixdown">\r
-        /// The mixdown to evaluate.\r
-        /// </param>\r
-        /// <param name="encoder">\r
-        /// The encoder to evaluate.\r
-        /// </param>\r
-        /// <param name="channelLayout">channel layout of the source track</param>\r
-        /// <returns>True if available.</returns>\r
-        public static bool MixdownIsSupported(HBMixdown mixdown, HBAudioEncoder encoder, long channelLayout)\r
-        {\r
-            return HBFunctions.hb_mixdown_is_supported(mixdown.Id, (uint)encoder.Id, (uint)channelLayout) > 0;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Determines if DRC can be applied to the given track with the given encoder.\r
-        /// </summary>\r
-        /// <param name="trackNumber">\r
-        /// The track Number.\r
-        /// </param>\r
-        /// <param name="encoder">\r
-        /// The encoder to use for DRC.\r
-        /// </param>\r
-        /// <param name="title">\r
-        /// The title.\r
-        /// </param>\r
-        /// <returns>\r
-        /// True if DRC can be applied to the track with the given encoder.\r
-        /// </returns>\r
-        public static bool CanApplyDrc(int trackNumber, HBAudioEncoder encoder, int title)\r
-        {\r
-            return HBFunctions.hb_audio_can_apply_drc2(HandBrakeInstanceManager.LastScanHandle, title, trackNumber, encoder.Id) > 0;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Determines if the given input audio codec can be passed through.\r
-        /// </summary>\r
-        /// <param name="codecId">\r
-        /// The input codec to consider.\r
-        /// </param>\r
-        /// <returns>\r
-        /// True if the codec can be passed through.\r
-        /// </returns>\r
-        public static bool CanPassthroughAudio(int codecId)\r
-        {\r
-            return (codecId & NativeConstants.HB_ACODEC_PASS_MASK) > 0;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Sanitizes a mixdown given the output codec and input channel layout.\r
-        /// </summary>\r
-        /// <param name="mixdown">\r
-        /// The desired mixdown.\r
-        /// </param>\r
-        /// <param name="encoder">\r
-        /// The output encoder to be used.\r
-        /// </param>\r
-        /// <param name="layout">\r
-        /// The input channel layout.\r
-        /// </param>\r
-        /// <returns>\r
-        /// A sanitized mixdown value.\r
-        /// </returns>\r
-        public static HBMixdown SanitizeMixdown(HBMixdown mixdown, HBAudioEncoder encoder, ulong layout)\r
-        {\r
-            if (mixdown == null)\r
-            {\r
-                return null;\r
-            }\r
-\r
-            int sanitizedMixdown = HBFunctions.hb_mixdown_get_best((uint)encoder.Id, layout, mixdown.Id);\r
-            if (sanitizedMixdown != -1)\r
-            {\r
-                return Mixdowns.Single(m => m.Id == sanitizedMixdown);\r
-            }\r
-            return Mixdowns.FirstOrDefault(); // "none"\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the default mixdown for the given audio encoder and channel layout.\r
-        /// </summary>\r
-        /// <param name="encoder">\r
-        /// The output codec to be used.\r
-        /// </param>\r
-        /// <param name="layout">\r
-        /// The input channel layout.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The default mixdown for the given codec and channel layout.\r
-        /// </returns>\r
-        public static HBMixdown GetDefaultMixdown(HBAudioEncoder encoder, ulong layout)\r
-        {\r
-            int defaultMixdown = HBFunctions.hb_mixdown_get_default((uint)encoder.Id, layout);\r
-            return Mixdowns.Single(m => m.Id == defaultMixdown);\r
-        }\r
-\r
-               /// <summary>\r
-               /// Sanitizes the given sample rate for the given encoder.\r
-               /// </summary>\r
-               /// <param name="encoder">The encoder.</param>\r
-               /// <param name="sampleRate">The sample rate to sanitize.</param>\r
-               /// <returns>The sanitized sample rate.</returns>\r
-           public static int SanitizeSampleRate(HBAudioEncoder encoder, int sampleRate)\r
-           {\r
-                   return HBFunctions.hb_audio_samplerate_find_closest(sampleRate, (uint)encoder.Id);\r
-           }\r
-\r
-        /// <summary>\r
-        /// Gets the bitrate limits for the given audio codec, sample rate and mixdown.\r
-        /// </summary>\r
-        /// <param name="encoder">\r
-        /// The audio encoder used.\r
-        /// </param>\r
-        /// <param name="sampleRate">\r
-        /// The sample rate used (Hz).\r
-        /// </param>\r
-        /// <param name="mixdown">\r
-        /// The mixdown used.\r
-        /// </param>\r
-        /// <returns>\r
-        /// Limits on the audio bitrate for the given settings.\r
-        /// </returns>\r
-        public static BitrateLimits GetBitrateLimits(HBAudioEncoder encoder, int sampleRate, HBMixdown mixdown)\r
-        {\r
-            int low = 0;\r
-            int high = 0;\r
-\r
-            HBFunctions.hb_audio_bitrate_get_limits((uint)encoder.Id, sampleRate, mixdown.Id, ref low, ref high);\r
-\r
-            return new BitrateLimits(low, high);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the video quality limits for the given video codec.\r
-        /// </summary>\r
-        /// <param name="encoder">\r
-        /// The video encoder to check.\r
-        /// </param>\r
-        /// <returns>\r
-        /// Limits on the video quality for the encoder.\r
-        /// </returns>\r
-        public static VideoQualityLimits GetVideoQualityLimits(HBVideoEncoder encoder)\r
-        {\r
-            float low = 0;\r
-            float high = 0;\r
-            float granularity = 0;\r
-            int direction = 0;\r
-\r
-            HBFunctions.hb_video_quality_get_limits((uint)encoder.Id, ref low, ref high, ref granularity, ref direction);\r
-\r
-            return new VideoQualityLimits(low, high, granularity, direction == 0);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Sanitizes an audio bitrate given the output codec, sample rate and mixdown.\r
-        /// </summary>\r
-        /// <param name="audioBitrate">\r
-        /// The desired audio bitrate.\r
-        /// </param>\r
-        /// <param name="encoder">\r
-        /// The output encoder to be used.\r
-        /// </param>\r
-        /// <param name="sampleRate">\r
-        /// The output sample rate to be used.\r
-        /// </param>\r
-        /// <param name="mixdown">\r
-        /// The mixdown to be used.\r
-        /// </param>\r
-        /// <returns>\r
-        /// A sanitized audio bitrate.\r
-        /// </returns>\r
-        public static int SanitizeAudioBitrate(int audioBitrate, HBAudioEncoder encoder, int sampleRate, HBMixdown mixdown)\r
-        {\r
-            return HBFunctions.hb_audio_bitrate_get_best((uint)encoder.Id, audioBitrate, sampleRate, mixdown.Id);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the default audio bitrate for the given parameters.\r
-        /// </summary>\r
-        /// <param name="encoder">\r
-        /// The encoder to use.\r
-        /// </param>\r
-        /// <param name="sampleRate">\r
-        /// The sample rate to use.\r
-        /// </param>\r
-        /// <param name="mixdown">\r
-        /// The mixdown to use.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The default bitrate for these parameters.\r
-        /// </returns>\r
-        public static int GetDefaultBitrate(HBAudioEncoder encoder, int sampleRate, HBMixdown mixdown)\r
-        {\r
-            return HBFunctions.hb_audio_bitrate_get_default((uint)encoder.Id, sampleRate, mixdown.Id);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets limits on audio quality for a given encoder.\r
-        /// </summary>\r
-        /// <param name="encoderId">\r
-        /// The audio encoder ID.\r
-        /// </param>\r
-        /// <returns>\r
-        /// Limits on the audio quality for the given encoder.\r
-        /// </returns>\r
-        public static RangeLimits GetAudioQualityLimits(int encoderId)\r
-        {\r
-            float low = 0, high = 0, granularity = 0;\r
-            int direction = 0;\r
-            HBFunctions.hb_audio_quality_get_limits((uint)encoderId, ref low, ref high, ref granularity, ref direction);\r
-\r
-            return new RangeLimits(direction == 0, granularity, high, low);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets limits on audio compression for a given encoder.\r
-        /// </summary>\r
-        /// <param name="encoderId">\r
-        /// The audio encoder ID.\r
-        /// </param>\r
-        /// <returns>\r
-        /// Limits on the audio compression for the given encoder.\r
-        /// </returns>\r
-        public static RangeLimits GetAudioCompressionLimits(int encoderId)\r
-        {\r
-            float low = 0, high = 0, granularity = 0;\r
-            int direction = 0;\r
-            HBFunctions.hb_audio_compression_get_limits((uint)encoderId, ref low, ref high, ref granularity, ref direction);\r
-\r
-            return new RangeLimits(direction == 0, granularity, high, low);\r
-        }\r
-\r
-        /// <summary>\r
-        /// The get default quality.\r
-        /// </summary>\r
-        /// <param name="encoder">\r
-        /// The encoder.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The <see cref="double"/>.\r
-        /// </returns>\r
-        public static double GetDefaultQuality(HBAudioEncoder encoder)\r
-        {\r
-           return HBFunctions.hb_audio_quality_get_default((uint)encoder.Id);\r
-        }\r
-\r
-        /// <summary>\r
-        /// The get default audio compression.\r
-        /// </summary>\r
-        /// <param name="encoder">\r
-        /// The encoder.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The <see cref="double"/>.\r
-        /// </returns>\r
-        public static double GetDefaultAudioCompression(HBAudioEncoder encoder)\r
-        {\r
-            return HBFunctions.hb_audio_compression_get_default((uint)encoder.Id);\r
-        }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="HandBrakeEncoderHelpers.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>
+//   The encoders.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop
+{
+    using System.Collections.Generic;
+    using System.Linq;
+
+    using HandBrake.Interop.Interop.HbLib;
+    using HandBrake.Interop.Interop.Helpers;
+    using HandBrake.Interop.Interop.Model;
+    using HandBrake.Interop.Interop.Model.Encoding;
+
+    /// <summary>
+    /// The encoders.
+    /// </summary>
+    public static class HandBrakeEncoderHelpers
+    {
+        /// <summary>
+        /// The audio encoders.
+        /// </summary>
+        private static List<HBAudioEncoder> audioEncoders;
+
+        /// <summary>
+        /// The video encoders.
+        /// </summary>
+        private static List<HBVideoEncoder> videoEncoders;
+
+        /// <summary>
+        /// Video framerates in pts.
+        /// </summary>
+        private static List<HBRate> videoFramerates;
+
+        /// <summary>
+        /// List of HandBrake mixdowns.
+        /// </summary>
+        private static List<HBMixdown> mixdowns;
+
+        /// <summary>
+        /// List of HandBrake containers.
+        /// </summary> 
+        private static List<HBContainer> containers;
+
+        /// <summary>
+        /// The audio bitrates.
+        /// </summary>
+        private static List<int> audioBitrates;
+
+        /// <summary>
+        /// Audio sample rates in Hz.
+        /// </summary>
+        private static List<HBRate> audioSampleRates;
+
+        /// <summary>
+        /// Initializes static members of the HandBrakeEncoderHelpers class.
+        /// </summary>
+        static HandBrakeEncoderHelpers()
+        {
+            HandBrakeUtils.EnsureGlobalInit();
+        }
+
+        /// <summary>
+        /// Gets a list of supported audio encoders.
+        /// </summary>
+        public static List<HBAudioEncoder> AudioEncoders
+        {
+            get
+            {
+                if (audioEncoders == null)
+                {
+                    audioEncoders = InteropUtilities.ToListFromIterator<hb_encoder_s, HBAudioEncoder>(HBFunctions.hb_audio_encoder_get_next, HandBrakeUnitConversionHelpers.NativeToAudioEncoder);
+                }
+
+                return audioEncoders;
+            }
+        }
+
+        /// <summary>
+        /// Gets a list of supported video encoders.
+        /// </summary>
+        public static List<HBVideoEncoder> VideoEncoders
+        {
+            get
+            {
+                if (videoEncoders == null)
+                {
+                    videoEncoders = InteropUtilities.ToListFromIterator<hb_encoder_s, HBVideoEncoder>(HBFunctions.hb_video_encoder_get_next, HandBrakeUnitConversionHelpers.NativeToVideoEncoder);
+                }
+
+                return videoEncoders;
+            }
+        }
+
+        /// <summary>
+        /// Gets a list of supported video framerates (in pts).
+        /// </summary>
+        public static List<HBRate> VideoFramerates
+        {
+            get
+            {
+                if (videoFramerates == null)
+                {
+                    videoFramerates = InteropUtilities.ToListFromIterator<hb_rate_s, HBRate>(HBFunctions.hb_video_framerate_get_next, HandBrakeUnitConversionHelpers.NativeToRate);
+                }
+
+                return videoFramerates;
+            }
+        }
+
+        /// <summary>
+        /// Gets a list of supported mixdowns.
+        /// </summary>
+        public static List<HBMixdown> Mixdowns
+        {
+            get
+            {
+                if (mixdowns == null)
+                {
+                    mixdowns = InteropUtilities.ToListFromIterator<hb_mixdown_s, HBMixdown>(HBFunctions.hb_mixdown_get_next, HandBrakeUnitConversionHelpers.NativeToMixdown);
+                }
+
+                return mixdowns;
+            }
+        }
+
+        /// <summary>
+        /// Gets a list of supported audio bitrates.
+        /// </summary>
+        public static List<int> AudioBitrates
+        {
+            get
+            {
+                if (audioBitrates == null)
+                {
+                    audioBitrates = InteropUtilities.ToListFromIterator<hb_rate_s, int>(HBFunctions.hb_audio_bitrate_get_next, b => b.rate);
+                }
+
+                return audioBitrates;
+            }
+        }
+
+        /// <summary>
+        /// Gets a list of supported audio sample rates (in Hz).
+        /// </summary>
+        public static List<HBRate> AudioSampleRates
+        {
+            get
+            {
+                if (audioSampleRates == null)
+                {
+                    audioSampleRates = InteropUtilities.ToListFromIterator<hb_rate_s, HBRate>(HBFunctions.hb_audio_samplerate_get_next, HandBrakeUnitConversionHelpers.NativeToRate);
+                }
+
+                return audioSampleRates;
+            }
+        }
+
+        /// <summary>
+        /// Gets a list of supported containers.
+        /// </summary>
+        public static List<HBContainer> Containers
+        {
+            get
+            {
+                if (containers == null)
+                {
+                    containers = InteropUtilities.ToListFromIterator<hb_container_s, HBContainer>(HBFunctions.hb_container_get_next, HandBrakeUnitConversionHelpers.NativeToContainer);
+                }
+
+                return containers;
+            }
+        }
+
+        /// <summary>
+        /// Gets a value indicating whether SRT subtitles can be burnt in.
+        /// </summary>
+        public static bool CanBurnSrt
+        {
+            get
+            {
+                return HBFunctions.hb_subtitle_can_burn((int)hb_subtitle_s_subsource.SRTSUB) > 0;
+            }
+        }
+
+        /// <summary>
+        /// Gets the audio encoder with the specified short name.
+        /// </summary>
+        /// <param name="shortName">
+        /// The name of the audio encoder.
+        /// </param>
+        /// <returns>
+        /// The requested audio encoder.
+        /// </returns>
+        public static HBAudioEncoder GetAudioEncoder(string shortName)
+        {
+            return AudioEncoders.SingleOrDefault(e => e.ShortName == shortName);
+        }
+
+        /// <summary>
+        /// Gets the audio encoder with the specified codec ID.
+        /// </summary>
+        /// <param name="codecId">
+        /// The ID of the audio encoder.
+        /// </param>
+        /// <returns>
+        /// The requested audio encoder.
+        /// </returns>
+        public static HBAudioEncoder GetAudioEncoder(int codecId)
+        {
+            return AudioEncoders.SingleOrDefault(e => e.Id == codecId);
+        }
+
+        /// <summary>
+        /// Gets the video encoder with the specified short name.
+        /// </summary>
+        /// <param name="shortName">
+        /// The name of the video encoder.
+        /// </param>
+        /// <returns>
+        /// The requested video encoder.
+        /// </returns>
+        public static HBVideoEncoder GetVideoEncoder(string shortName)
+        {
+            return VideoEncoders.SingleOrDefault(e => e.ShortName == shortName);
+        }
+
+        /// <summary>
+        /// Gets the mixdown with the specified short name.
+        /// </summary>
+        /// <param name="shortName">
+        /// The name of the mixdown.
+        /// </param>
+        /// <returns>
+        /// The requested mixdown.
+        /// </returns>
+        public static HBMixdown GetMixdown(string shortName)
+        {
+            return Mixdowns.SingleOrDefault(m => m.ShortName == shortName);
+        }
+
+               /// <summary>
+               /// Gets the mixdown with the specified ID.
+               /// </summary>
+               /// <param name="id">The mixdown ID.</param>
+               /// <returns>The requested mixdown.</returns>
+           public static HBMixdown GetMixdown(int id)
+           {
+                   return Mixdowns.SingleOrDefault(m => m.Id == id);
+           }
+
+        /// <summary>
+        /// Gets the container with the specified short name.
+        /// </summary>
+        /// <param name="shortName">
+        /// The name of the container.
+        /// </param>
+        /// <returns>
+        /// The requested container.
+        /// </returns>
+        public static HBContainer GetContainer(string shortName)
+        {
+            return Containers.SingleOrDefault(c => c.ShortName == shortName);
+        }
+
+        /// <summary>
+        /// Returns true if the subtitle source type can be set to forced only.
+        /// </summary>
+        /// <param name="source">
+        /// The subtitle source type (SSA, VobSub, etc)
+        /// </param>
+        /// <returns>
+        /// True if the subtitle source type can be set to forced only.
+        /// </returns>
+        public static bool SubtitleCanSetForcedOnly(int source)
+        {
+            return HBFunctions.hb_subtitle_can_force(source) > 0;
+        }
+
+        /// <summary>
+        /// Returns true if the subtitle source type can be burned in.
+        /// </summary>
+        /// <param name="source">
+        /// The subtitle source type (SSA, VobSub, etc)
+        /// </param>
+        /// <returns>
+        /// True if the subtitle source type can be burned in.
+        /// </returns>
+        public static bool SubtitleCanBurn(int source)
+        {
+            return HBFunctions.hb_subtitle_can_burn(source) > 0;
+        }
+
+        /// <summary>
+        /// Returns true if the subtitle type can be passed through using the given muxer.
+        /// </summary>
+        /// <param name="subtitleSourceType">
+        /// The subtitle source type (SSA, VobSub, etc)
+        /// </param>
+        /// <param name="muxer">
+        /// The ID of the muxer.
+        /// </param>
+        /// <returns>
+        /// True if the subtitle type can be passed through with the given muxer.
+        /// </returns>
+        public static bool SubtitleCanPassthrough(int subtitleSourceType, int muxer)
+        {
+            return HBFunctions.hb_subtitle_can_pass(subtitleSourceType, muxer) > 0;
+        }
+
+        /// <summary>
+        /// Gets the subtitle source type's name.
+        /// </summary>
+        /// <param name="source">
+        /// The subtitle source type (SSA, VobSub, etc).
+        /// </param>
+        /// <returns>
+        /// The name of the subtitle source.
+        /// </returns>
+        public static string GetSubtitleSourceName(int source)
+        {
+            switch ((hb_subtitle_s_subsource)source)
+            {
+                case hb_subtitle_s_subsource.CC608SUB:
+                    return "CC608";
+                case hb_subtitle_s_subsource.CC708SUB:
+                    return "CC708";
+                case hb_subtitle_s_subsource.SRTSUB:
+                    return "SRT";
+                case hb_subtitle_s_subsource.SSASUB:
+                    return "SSA";
+                case hb_subtitle_s_subsource.TX3GSUB:
+                    return "TX3G";
+                case hb_subtitle_s_subsource.UTF8SUB:
+                    return "UTF8";
+                case hb_subtitle_s_subsource.VOBSUB:
+                    return "VobSub";
+                case hb_subtitle_s_subsource.PGSSUB:
+                    return "PGS";
+                default:
+                    return string.Empty;
+            }
+        }
+
+        /// <summary>
+        /// Determines if the given encoder is compatible with the given track.
+        /// </summary>
+        /// <param name="codecId">
+        /// The codec Id.
+        /// </param>
+        /// <param name="encoder">
+        /// The encoder to examine.
+        /// </param>
+        /// <returns>
+        /// True if the given encoder is comatible with the given audio track.
+        /// </returns>
+        /// <remarks>
+        /// Only works with passthrough encoders.
+        /// </remarks>
+        public static bool AudioEncoderIsCompatible(int codecId, HBAudioEncoder encoder)
+        {
+            return (codecId & encoder.Id) > 0;
+        }
+
+        /// <summary>
+        /// Determines if the given mixdown supports the given channel layout.
+        /// </summary>
+        /// <param name="mixdown">
+        /// The mixdown to evaluate.
+        /// </param>
+        /// <param name="layout">
+        /// The channel layout to evaluate.
+        /// </param>
+        /// <returns>
+        /// True if the mixdown supports the given channel layout.
+        /// </returns>
+        public static bool MixdownHasRemixSupport(HBMixdown mixdown, ulong layout)
+        {
+            return HBFunctions.hb_mixdown_has_remix_support(mixdown.Id, layout) > 0;
+        }
+
+        /// <summary>
+        /// Determines if the given encoder supports the given mixdown.
+        /// </summary>
+        /// <param name="mixdown">
+        /// The mixdown to evaluate.
+        /// </param>
+        /// <param name="encoder">
+        /// The encoder to evaluate.
+        /// </param>
+        /// <returns>
+        /// True if the encoder supports the mixdown.
+        /// </returns>
+        public static bool MixdownHasCodecSupport(HBMixdown mixdown, HBAudioEncoder encoder)
+        {
+            return HBFunctions.hb_mixdown_has_codec_support(mixdown.Id, (uint)encoder.Id) > 0;
+        }
+
+        /// <summary>
+        /// Determines if a mixdown is available for a given track and encoder.
+        /// </summary>
+        /// <param name="mixdown">
+        /// The mixdown to evaluate.
+        /// </param>
+        /// <param name="encoder">
+        /// The encoder to evaluate.
+        /// </param>
+        /// <param name="channelLayout">channel layout of the source track</param>
+        /// <returns>True if available.</returns>
+        public static bool MixdownIsSupported(HBMixdown mixdown, HBAudioEncoder encoder, long channelLayout)
+        {
+            return HBFunctions.hb_mixdown_is_supported(mixdown.Id, (uint)encoder.Id, (uint)channelLayout) > 0;
+        }
+
+        /// <summary>
+        /// Determines if DRC can be applied to the given track with the given encoder.
+        /// </summary>
+        /// <param name="trackNumber">
+        /// The track Number.
+        /// </param>
+        /// <param name="encoder">
+        /// The encoder to use for DRC.
+        /// </param>
+        /// <param name="title">
+        /// The title.
+        /// </param>
+        /// <returns>
+        /// True if DRC can be applied to the track with the given encoder.
+        /// </returns>
+        public static bool CanApplyDrc(int trackNumber, HBAudioEncoder encoder, int title)
+        {
+            return HBFunctions.hb_audio_can_apply_drc2(HandBrakeInstanceManager.LastScanHandle, title, trackNumber, encoder.Id) > 0;
+        }
+
+        /// <summary>
+        /// Determines if the given input audio codec can be passed through.
+        /// </summary>
+        /// <param name="codecId">
+        /// The input codec to consider.
+        /// </param>
+        /// <returns>
+        /// True if the codec can be passed through.
+        /// </returns>
+        public static bool CanPassthroughAudio(int codecId)
+        {
+            return (codecId & NativeConstants.HB_ACODEC_PASS_MASK) > 0;
+        }
+
+        /// <summary>
+        /// Sanitizes a mixdown given the output codec and input channel layout.
+        /// </summary>
+        /// <param name="mixdown">
+        /// The desired mixdown.
+        /// </param>
+        /// <param name="encoder">
+        /// The output encoder to be used.
+        /// </param>
+        /// <param name="layout">
+        /// The input channel layout.
+        /// </param>
+        /// <returns>
+        /// A sanitized mixdown value.
+        /// </returns>
+        public static HBMixdown SanitizeMixdown(HBMixdown mixdown, HBAudioEncoder encoder, ulong layout)
+        {
+            if (mixdown == null)
+            {
+                return null;
+            }
+
+            int sanitizedMixdown = HBFunctions.hb_mixdown_get_best((uint)encoder.Id, layout, mixdown.Id);
+            if (sanitizedMixdown != -1)
+            {
+                return Mixdowns.Single(m => m.Id == sanitizedMixdown);
+            }
+            return Mixdowns.FirstOrDefault(); // "none"
+        }
+
+        /// <summary>
+        /// Gets the default mixdown for the given audio encoder and channel layout.
+        /// </summary>
+        /// <param name="encoder">
+        /// The output codec to be used.
+        /// </param>
+        /// <param name="layout">
+        /// The input channel layout.
+        /// </param>
+        /// <returns>
+        /// The default mixdown for the given codec and channel layout.
+        /// </returns>
+        public static HBMixdown GetDefaultMixdown(HBAudioEncoder encoder, ulong layout)
+        {
+            int defaultMixdown = HBFunctions.hb_mixdown_get_default((uint)encoder.Id, layout);
+            return Mixdowns.Single(m => m.Id == defaultMixdown);
+        }
+
+               /// <summary>
+               /// Sanitizes the given sample rate for the given encoder.
+               /// </summary>
+               /// <param name="encoder">The encoder.</param>
+               /// <param name="sampleRate">The sample rate to sanitize.</param>
+               /// <returns>The sanitized sample rate.</returns>
+           public static int SanitizeSampleRate(HBAudioEncoder encoder, int sampleRate)
+           {
+                   return HBFunctions.hb_audio_samplerate_find_closest(sampleRate, (uint)encoder.Id);
+           }
+
+        /// <summary>
+        /// Gets the bitrate limits for the given audio codec, sample rate and mixdown.
+        /// </summary>
+        /// <param name="encoder">
+        /// The audio encoder used.
+        /// </param>
+        /// <param name="sampleRate">
+        /// The sample rate used (Hz).
+        /// </param>
+        /// <param name="mixdown">
+        /// The mixdown used.
+        /// </param>
+        /// <returns>
+        /// Limits on the audio bitrate for the given settings.
+        /// </returns>
+        public static BitrateLimits GetBitrateLimits(HBAudioEncoder encoder, int sampleRate, HBMixdown mixdown)
+        {
+            int low = 0;
+            int high = 0;
+
+            HBFunctions.hb_audio_bitrate_get_limits((uint)encoder.Id, sampleRate, mixdown.Id, ref low, ref high);
+
+            return new BitrateLimits(low, high);
+        }
+
+        /// <summary>
+        /// Gets the video quality limits for the given video codec.
+        /// </summary>
+        /// <param name="encoder">
+        /// The video encoder to check.
+        /// </param>
+        /// <returns>
+        /// Limits on the video quality for the encoder.
+        /// </returns>
+        public static VideoQualityLimits GetVideoQualityLimits(HBVideoEncoder encoder)
+        {
+            float low = 0;
+            float high = 0;
+            float granularity = 0;
+            int direction = 0;
+
+            HBFunctions.hb_video_quality_get_limits((uint)encoder.Id, ref low, ref high, ref granularity, ref direction);
+
+            return new VideoQualityLimits(low, high, granularity, direction == 0);
+        }
+
+        /// <summary>
+        /// Sanitizes an audio bitrate given the output codec, sample rate and mixdown.
+        /// </summary>
+        /// <param name="audioBitrate">
+        /// The desired audio bitrate.
+        /// </param>
+        /// <param name="encoder">
+        /// The output encoder to be used.
+        /// </param>
+        /// <param name="sampleRate">
+        /// The output sample rate to be used.
+        /// </param>
+        /// <param name="mixdown">
+        /// The mixdown to be used.
+        /// </param>
+        /// <returns>
+        /// A sanitized audio bitrate.
+        /// </returns>
+        public static int SanitizeAudioBitrate(int audioBitrate, HBAudioEncoder encoder, int sampleRate, HBMixdown mixdown)
+        {
+            return HBFunctions.hb_audio_bitrate_get_best((uint)encoder.Id, audioBitrate, sampleRate, mixdown.Id);
+        }
+
+        /// <summary>
+        /// Gets the default audio bitrate for the given parameters.
+        /// </summary>
+        /// <param name="encoder">
+        /// The encoder to use.
+        /// </param>
+        /// <param name="sampleRate">
+        /// The sample rate to use.
+        /// </param>
+        /// <param name="mixdown">
+        /// The mixdown to use.
+        /// </param>
+        /// <returns>
+        /// The default bitrate for these parameters.
+        /// </returns>
+        public static int GetDefaultBitrate(HBAudioEncoder encoder, int sampleRate, HBMixdown mixdown)
+        {
+            return HBFunctions.hb_audio_bitrate_get_default((uint)encoder.Id, sampleRate, mixdown.Id);
+        }
+
+        /// <summary>
+        /// Gets limits on audio quality for a given encoder.
+        /// </summary>
+        /// <param name="encoderId">
+        /// The audio encoder ID.
+        /// </param>
+        /// <returns>
+        /// Limits on the audio quality for the given encoder.
+        /// </returns>
+        public static RangeLimits GetAudioQualityLimits(int encoderId)
+        {
+            float low = 0, high = 0, granularity = 0;
+            int direction = 0;
+            HBFunctions.hb_audio_quality_get_limits((uint)encoderId, ref low, ref high, ref granularity, ref direction);
+
+            return new RangeLimits(direction == 0, granularity, high, low);
+        }
+
+        /// <summary>
+        /// Gets limits on audio compression for a given encoder.
+        /// </summary>
+        /// <param name="encoderId">
+        /// The audio encoder ID.
+        /// </param>
+        /// <returns>
+        /// Limits on the audio compression for the given encoder.
+        /// </returns>
+        public static RangeLimits GetAudioCompressionLimits(int encoderId)
+        {
+            float low = 0, high = 0, granularity = 0;
+            int direction = 0;
+            HBFunctions.hb_audio_compression_get_limits((uint)encoderId, ref low, ref high, ref granularity, ref direction);
+
+            return new RangeLimits(direction == 0, granularity, high, low);
+        }
+
+        /// <summary>
+        /// The get default quality.
+        /// </summary>
+        /// <param name="encoder">
+        /// The encoder.
+        /// </param>
+        /// <returns>
+        /// The <see cref="double"/>.
+        /// </returns>
+        public static double GetDefaultQuality(HBAudioEncoder encoder)
+        {
+           return HBFunctions.hb_audio_quality_get_default((uint)encoder.Id);
+        }
+
+        /// <summary>
+        /// The get default audio compression.
+        /// </summary>
+        /// <param name="encoder">
+        /// The encoder.
+        /// </param>
+        /// <returns>
+        /// The <see cref="double"/>.
+        /// </returns>
+        public static double GetDefaultAudioCompression(HBAudioEncoder encoder)
+        {
+            return HBFunctions.hb_audio_compression_get_default((uint)encoder.Id);
+        }
+    }
+}
similarity index 90%
rename from win/CS/HandBrake.ApplicationServices/Interop/HandBrakeFilterHelpers.cs
rename to win/CS/HandBrake.Interop/Interop/HandBrakeFilterHelpers.cs
index 0db9f4f37fc633728f081fc024eb38e3bab80021..e8d7f5f3107396984a838d1273b85f08e65efcf6 100644 (file)
@@ -7,17 +7,17 @@
 // </summary>
 // --------------------------------------------------------------------------------------------------------------------
 
-namespace HandBrake.ApplicationServices.Interop
+namespace HandBrake.Interop.Interop
 {
     using System;
     using System.Collections.Generic;
     using System.Linq;
     using System.Runtime.InteropServices;
 
-    using HandBrake.ApplicationServices.Interop.HbLib;
-    using HandBrake.ApplicationServices.Interop.Helpers;
-    using HandBrake.ApplicationServices.Interop.Json.Filters;
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;
+    using HandBrake.Interop.Interop.HbLib;
+    using HandBrake.Interop.Interop.Helpers;
+    using HandBrake.Interop.Interop.Json.Filters;
+    using HandBrake.Interop.Interop.Model.Encoding;
 
     using Newtonsoft.Json;
 
@@ -33,7 +33,7 @@ namespace HandBrake.ApplicationServices.Interop
         /// The filter.
         /// </param>
         /// <returns>
-        /// The <see cref="List"/>.
+        /// The <see cref="List{T}"/>.
         /// </returns>
         public static List<HBPresetTune> GetFilterPresets(int filter)
         {
@@ -51,7 +51,7 @@ namespace HandBrake.ApplicationServices.Interop
         /// The filter.
         /// </param>
         /// <returns>
-        /// The <see cref="List"/>.
+        /// The <see cref="List{T}"/>.
         /// </returns>
         public static List<HBPresetTune> GetFilterTunes(int filter)
         {
similarity index 93%
rename from win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
rename to win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs
index 7fe52a899802a9df8d11c15b5e9ad68398cf4f84..9f5420d3fa666c1abaca5fadcc7443a54f5becf3 100644 (file)
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="HandBrakeInstance.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   A wrapper for a HandBrake instance.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop\r
-{\r
-    using System;\r
-    using System.Collections.Generic;\r
-    using System.Diagnostics;\r
-    using System.Linq;\r
-    using System.Runtime.ExceptionServices;\r
-    using System.Runtime.InteropServices;\r
-    using System.Timers;\r
-\r
-    using HandBrake.ApplicationServices.Interop.EventArgs;\r
-    using HandBrake.ApplicationServices.Interop.Factories;\r
-    using HandBrake.ApplicationServices.Interop.HbLib;\r
-    using HandBrake.ApplicationServices.Interop.Helpers;\r
-    using HandBrake.ApplicationServices.Interop.Interfaces;\r
-    using HandBrake.ApplicationServices.Interop.Json.Encode;\r
-    using HandBrake.ApplicationServices.Interop.Json.Scan;\r
-    using HandBrake.ApplicationServices.Interop.Json.State;\r
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
-    using HandBrake.ApplicationServices.Interop.Model.Preview;\r
-\r
-    using Newtonsoft.Json;\r
-\r
-    /// <summary>\r
-    /// A wrapper for a HandBrake instance.\r
-    /// </summary>\r
-    public class HandBrakeInstance : IHandBrakeInstance, IDisposable\r
-    {\r
-        /// <summary>\r
-        /// The number of MS between status polls when scanning.\r
-        /// </summary>\r
-        private const double ScanPollIntervalMs = 250;\r
-\r
-        /// <summary>\r
-        /// The number of MS between status polls when encoding.\r
-        /// </summary>\r
-        private const double EncodePollIntervalMs = 250;\r
-\r
-        /// <summary>\r
-        /// The native handle to the HandBrake instance.\r
-        /// </summary>\r
-        private IntPtr hbHandle;\r
-\r
-        /// <summary>\r
-        /// The number of previews created during scan.\r
-        /// </summary>\r
-        private int previewCount;\r
-\r
-        /// <summary>\r
-        /// The timer to poll for scan status.\r
-        /// </summary>\r
-        private Timer scanPollTimer;\r
-\r
-        /// <summary>\r
-        /// The timer to poll for encode status.\r
-        /// </summary>\r
-        private Timer encodePollTimer;\r
-\r
-        /// <summary>\r
-        /// The list of titles on this instance.\r
-        /// </summary>\r
-        private JsonScanObject titles;\r
-\r
-        /// <summary>\r
-        /// The raw JSON for the titles list.\r
-        /// </summary>\r
-        private string titlesJson;\r
-\r
-        /// <summary>\r
-        /// The index of the default title.\r
-        /// </summary>\r
-        private int featureTitle;\r
-\r
-        /// <summary>\r
-        /// A value indicating whether this object has been disposed or not.\r
-        /// </summary>\r
-        private bool disposed;\r
-\r
-        /// <summary>\r
-        /// Finalizes an instance of the HandBrakeInstance class.\r
-        /// </summary>\r
-        ~HandBrakeInstance()\r
-        {\r
-            this.Dispose(false);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Fires for progress updates when scanning.\r
-        /// </summary>\r
-        public event EventHandler<ScanProgressEventArgs> ScanProgress;\r
-\r
-        /// <summary>\r
-        /// Fires when a scan has completed.\r
-        /// </summary>\r
-        public event EventHandler<System.EventArgs> ScanCompleted;\r
-\r
-        /// <summary>\r
-        /// Fires for progress updates when encoding.\r
-        /// </summary>\r
-        public event EventHandler<EncodeProgressEventArgs> EncodeProgress;\r
-\r
-        /// <summary>\r
-        /// Fires when an encode has completed.\r
-        /// </summary>\r
-        public event EventHandler<EncodeCompletedEventArgs> EncodeCompleted;\r
-\r
-        /// <summary>\r
-        /// Gets the handle.\r
-        /// </summary>\r
-        internal IntPtr Handle\r
-        {\r
-            get\r
-            {\r
-                return this.hbHandle;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the number of previews created during scan.\r
-        /// </summary>\r
-        public int PreviewCount\r
-        {\r
-            get\r
-            {\r
-                return this.previewCount;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the list of titles on this instance.\r
-        /// </summary>\r
-        public JsonScanObject Titles\r
-        {\r
-            get\r
-            {\r
-                return this.titles;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the raw JSON for the list of titles on this instance.\r
-        /// </summary>\r
-        public string TitlesJson\r
-        {\r
-            get\r
-            {\r
-                return this.titlesJson;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the index of the default title.\r
-        /// </summary>\r
-        public int FeatureTitle\r
-        {\r
-            get\r
-            {\r
-                return this.featureTitle;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the HandBrake version string.\r
-        /// </summary>\r
-        public string Version\r
-        {\r
-            get\r
-            {\r
-                var versionPtr = HBFunctions.hb_get_version(this.hbHandle);\r
-                return Marshal.PtrToStringAnsi(versionPtr);\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the HandBrake build number.\r
-        /// </summary>\r
-        public int Build\r
-        {\r
-            get\r
-            {\r
-                return HBFunctions.hb_get_build(this.hbHandle);\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Initializes this instance.\r
-        /// </summary>\r
-        /// <param name="verbosity">\r
-        /// The code for the logging verbosity to use.\r
-        /// </param>\r
-        public void Initialize(int verbosity)\r
-        {\r
-            HandBrakeUtils.EnsureGlobalInit();\r
-\r
-            HandBrakeUtils.RegisterLogger();\r
-            this.hbHandle = HBFunctions.hb_init(verbosity, update_check: 0);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Starts a scan of the given path.\r
-        /// </summary>\r
-        /// <param name="path">\r
-        /// The path of the video to scan.\r
-        /// </param>\r
-        /// <param name="previewCount">\r
-        /// The number of previews to make on each title.\r
-        /// </param>\r
-        /// <param name="minDuration">\r
-        /// The minimum duration of a title to show up on the scan.\r
-        /// </param>\r
-        /// <param name="titleIndex">\r
-        /// The title index to scan (1-based, 0 for all titles).\r
-        /// </param>\r
-        public void StartScan(string path, int previewCount, TimeSpan minDuration, int titleIndex)\r
-        {\r
-            this.previewCount = previewCount;\r
-\r
-            IntPtr pathPtr = InteropUtilities.ToUtf8PtrFromString(path);\r
-            HBFunctions.hb_scan(this.hbHandle, pathPtr, titleIndex, previewCount, 1, (ulong)(minDuration.TotalSeconds * 90000));\r
-            Marshal.FreeHGlobal(pathPtr);\r
-\r
-            this.scanPollTimer = new Timer();\r
-            this.scanPollTimer.Interval = ScanPollIntervalMs;\r
-\r
-            // Lambda notation used to make sure we can view any JIT exceptions the method throws\r
-            this.scanPollTimer.Elapsed += (o, e) =>\r
-            {\r
-                try\r
-                {\r
-                    this.PollScanProgress();\r
-                }\r
-                catch (Exception exc)\r
-                {\r
-                    Debug.WriteLine(exc);\r
-                    HandBrakeUtils.SendErrorEvent(exc.ToString());\r
-                }\r
-            };\r
-            this.scanPollTimer.Start();\r
-        }\r
-\r
-        /// <summary>\r
-        /// Stops an ongoing scan.\r
-        /// </summary>\r
-        [HandleProcessCorruptedStateExceptions]\r
-        public void StopScan()\r
-        {\r
-            HBFunctions.hb_scan_stop(this.hbHandle);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets an image for the given job and preview\r
-        /// </summary>\r
-        /// <remarks>\r
-        /// Only incorporates sizing and aspect ratio into preview image.\r
-        /// </remarks>\r
-        /// <param name="settings">\r
-        /// The encode job to preview.\r
-        /// </param>\r
-        /// <param name="previewNumber">\r
-        /// The index of the preview to get (0-based).\r
-        /// </param>\r
-        /// <param name="deinterlace">\r
-        /// True to enable basic deinterlace of preview images.\r
-        /// </param>\r
-        /// <returns>\r
-        /// An image with the requested preview.\r
-        /// </returns>\r
-        [HandleProcessCorruptedStateExceptions]\r
-        public RawPreviewData GetPreview(PreviewSettings settings, int previewNumber, bool deinterlace)\r
-        {\r
-            SourceTitle title = this.Titles.TitleList.FirstOrDefault(t => t.Index == settings.TitleNumber);\r
-\r
-            // Create the Expected Output Geometry details for libhb.\r
-            hb_geometry_settings_s uiGeometry = new hb_geometry_settings_s\r
-            {\r
-                crop = new[] { settings.Cropping.Top, settings.Cropping.Bottom, settings.Cropping.Left, settings.Cropping.Right },\r
-                itu_par = 0,\r
-                keep = (int)AnamorphicFactory.KeepSetting.HB_KEEP_WIDTH + (settings.KeepDisplayAspect ? 0x04 : 0), // TODO Keep Width?\r
-                maxWidth = settings.MaxWidth,\r
-                maxHeight = settings.MaxHeight,\r
-                mode = (int)(hb_anamorphic_mode_t)settings.Anamorphic,\r
-                modulus = settings.Modulus ?? 16,\r
-                geometry = new hb_geometry_s\r
-                {\r
-                    height = settings.Height,\r
-                    width = settings.Width,\r
-                    par = settings.Anamorphic != Anamorphic.Custom && settings.Anamorphic != Anamorphic.Automatic\r
-                        ? new hb_rational_t { den = title.Geometry.PAR.Den, num = title.Geometry.PAR.Num }\r
-                        : new hb_rational_t { den = settings.PixelAspectY, num = settings.PixelAspectX }\r
-                }\r
-            };\r
-\r
-            // Fetch the image data from LibHb\r
-            IntPtr resultingImageStuct = HBFunctions.hb_get_preview2(this.hbHandle, settings.TitleNumber, previewNumber, ref uiGeometry, deinterlace ? 1 : 0);\r
-            hb_image_s image = InteropUtilities.ToStructureFromPtr<hb_image_s>(resultingImageStuct);\r
-\r
-            // Copy the filled image buffer to a managed array.\r
-            int stride_width = image.plane[0].stride;\r
-            int stride_height = image.plane[0].height_stride;\r
-            int imageBufferSize = stride_width * stride_height;  // int imageBufferSize = outputWidth * outputHeight * 4;\r
-\r
-            byte[] managedBuffer = new byte[imageBufferSize];\r
-            Marshal.Copy(image.plane[0].data, managedBuffer, 0, imageBufferSize);\r
-\r
-            RawPreviewData preview = new RawPreviewData(managedBuffer, stride_width, stride_height, image.width, image.height);\r
-\r
-            // Close the image so we don't leak memory.\r
-            IntPtr nativeJobPtrPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IntPtr)));\r
-            Marshal.WriteIntPtr(nativeJobPtrPtr, resultingImageStuct);\r
-            HBFunctions.hb_image_close(nativeJobPtrPtr);\r
-            Marshal.FreeHGlobal(nativeJobPtrPtr);\r
-\r
-            return preview;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Determines if DRC can be applied to the given track with the given encoder.\r
-        /// </summary>\r
-        /// <param name="trackNumber">The track Number.</param>\r
-        /// <param name="encoder">The encoder to use for DRC.</param>\r
-        /// <param name="title">The title.</param>\r
-        /// <returns>True if DRC can be applied to the track with the given encoder.</returns>\r
-        public bool CanApplyDrc(int trackNumber, HBAudioEncoder encoder, int title)\r
-        {\r
-            return HBFunctions.hb_audio_can_apply_drc2(this.hbHandle, title, trackNumber, encoder.Id) > 0;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Starts an encode with the given job.\r
-        /// </summary>\r
-        /// <param name="encodeObject">\r
-        /// The encode Object.\r
-        /// </param>\r
-        [HandleProcessCorruptedStateExceptions]\r
-        public void StartEncode(JsonEncodeObject encodeObject)\r
-        {\r
-            JsonSerializerSettings settings = new JsonSerializerSettings\r
-            {\r
-                NullValueHandling = NullValueHandling.Ignore,\r
-            };\r
-\r
-            string encode = JsonConvert.SerializeObject(encodeObject, Formatting.Indented, settings);\r
-            this.StartEncode(encode);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Starts an encode with the given job JSON.\r
-        /// </summary>\r
-        /// <param name="encodeJson">The JSON for the job to start.</param>\r
-        [HandleProcessCorruptedStateExceptions]\r
-        public void StartEncode(string encodeJson)\r
-        {\r
-            HBFunctions.hb_add_json(this.hbHandle, InteropUtilities.ToUtf8PtrFromString(encodeJson));\r
-            HBFunctions.hb_start(this.hbHandle);\r
-\r
-            this.encodePollTimer = new Timer();\r
-            this.encodePollTimer.Interval = EncodePollIntervalMs;\r
-\r
-            this.encodePollTimer.Elapsed += (o, e) =>\r
-            {\r
-                try\r
-                {\r
-                    this.PollEncodeProgress();\r
-                }\r
-                catch (Exception exc)\r
-                {\r
-                    Debug.WriteLine(exc);\r
-                }\r
-            };\r
-            this.encodePollTimer.Start();\r
-        }\r
-\r
-        /// <summary>\r
-        /// Pauses the current encode.\r
-        /// </summary>\r
-        [HandleProcessCorruptedStateExceptions]\r
-        public void PauseEncode()\r
-        {\r
-            HBFunctions.hb_pause(this.hbHandle);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Resumes a paused encode.\r
-        /// </summary>\r
-        [HandleProcessCorruptedStateExceptions]\r
-        public void ResumeEncode()\r
-        {\r
-            HBFunctions.hb_resume(this.hbHandle);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Stops the current encode.\r
-        /// </summary>\r
-        [HandleProcessCorruptedStateExceptions]\r
-        public void StopEncode()\r
-        {\r
-            HBFunctions.hb_stop(this.hbHandle);\r
-\r
-            // Also remove all jobs from the queue (in case we stopped a 2-pass encode)\r
-            var currentJobs = new List<IntPtr>();\r
-\r
-            int jobs = HBFunctions.hb_count(this.hbHandle);\r
-            for (int i = 0; i < jobs; i++)\r
-            {\r
-                currentJobs.Add(HBFunctions.hb_job(this.hbHandle, 0));\r
-            }\r
-\r
-            foreach (IntPtr job in currentJobs)\r
-            {\r
-                HBFunctions.hb_rem(this.hbHandle, job);\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Frees any resources associated with this object.\r
-        /// </summary>\r
-        public void Dispose()\r
-        {\r
-            if (this.disposed)\r
-            {\r
-                return;\r
-            }\r
-\r
-            this.Dispose(true);\r
-            GC.SuppressFinalize(this);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets a value indicating whether the object is disposed.\r
-        /// </summary>\r
-        public bool IsDisposed\r
-        {\r
-            get\r
-            {\r
-                return this.disposed;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Frees any resources associated with this object.\r
-        /// </summary>\r
-        /// <param name="disposing">\r
-        /// True if managed objects as well as unmanaged should be disposed.\r
-        /// </param>\r
-        protected virtual void Dispose(bool disposing)\r
-        {\r
-            if (disposing)\r
-            {\r
-                // Free other state (managed objects).\r
-            }\r
-\r
-            // Free unmanaged objects.\r
-            IntPtr handlePtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IntPtr)));\r
-            Marshal.WriteIntPtr(handlePtr, this.hbHandle);\r
-            HBFunctions.hb_close(handlePtr);\r
-            Marshal.FreeHGlobal(handlePtr);\r
-\r
-            this.disposed = true;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Checks the status of the ongoing scan.\r
-        /// </summary>\r
-        [HandleProcessCorruptedStateExceptions]\r
-        private void PollScanProgress()\r
-        {\r
-            IntPtr json = HBFunctions.hb_get_state_json(this.hbHandle);\r
-            string statusJson = Marshal.PtrToStringAnsi(json);\r
-            JsonState state = null;\r
-            if (!string.IsNullOrEmpty(statusJson))\r
-            {\r
-                state = JsonConvert.DeserializeObject<JsonState>(statusJson);\r
-            }\r
-\r
-            TaskState taskState = state != null ? TaskState.FromRepositoryValue(state.State) : null;\r
-\r
-            if (taskState != null && (taskState == TaskState.Scanning || taskState == TaskState.Searching))\r
-            {\r
-                if (this.ScanProgress != null && state.Scanning != null)\r
-                {\r
-                    this.ScanProgress(this, new ScanProgressEventArgs(state.Scanning.Progress, state.Scanning.Preview, state.Scanning.PreviewCount, state.Scanning.Title, state.Scanning.TitleCount));\r
-                }\r
-            }\r
-            else if (taskState != null && taskState == TaskState.ScanDone)\r
-            {\r
-                this.scanPollTimer.Stop();\r
-\r
-                var jsonMsg = HBFunctions.hb_get_title_set_json(this.hbHandle);\r
-                this.titlesJson = InteropUtilities.ToStringFromUtf8Ptr(jsonMsg);\r
-\r
-                if (!string.IsNullOrEmpty(this.titlesJson))\r
-                { \r
-                    this.titles = JsonConvert.DeserializeObject<JsonScanObject>(this.titlesJson);\r
-                    if (this.titles != null)\r
-                    {\r
-                        this.featureTitle = this.titles.MainFeature;\r
-                    }\r
-                }\r
-\r
-                if (this.ScanCompleted != null)\r
-                {\r
-                    this.ScanCompleted(this, new System.EventArgs());\r
-                }\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Checks the status of the ongoing encode.\r
-        /// </summary>\r
-        [HandleProcessCorruptedStateExceptions]\r
-        private void PollEncodeProgress()\r
-        {\r
-            IntPtr json = HBFunctions.hb_get_state_json(this.hbHandle);\r
-            string statusJson = Marshal.PtrToStringAnsi(json);\r
-\r
-            JsonState state = JsonConvert.DeserializeObject<JsonState>(statusJson);\r
-\r
-            TaskState taskState = state != null ? TaskState.FromRepositoryValue(state.State) : null;\r
-\r
-            if (taskState != null && (taskState == TaskState.Working || taskState == TaskState.Muxing || taskState == TaskState.Searching))\r
-            {\r
-                if (this.EncodeProgress != null)\r
-                {\r
-                    var progressEventArgs = new EncodeProgressEventArgs(state.Working.Progress, state.Working.Rate, state.Working.RateAvg, new TimeSpan(state.Working.Hours, state.Working.Minutes, state.Working.Seconds),\r
-                        state.Working.PassID, state.Working.Pass, state.Working.PassCount, taskState.Code);\r
-\r
-                    this.EncodeProgress(this, progressEventArgs);\r
-                }\r
-            }\r
-            else if (taskState != null && taskState == TaskState.WorkDone)\r
-            {\r
-                this.encodePollTimer.Stop();\r
-\r
-                if (this.EncodeCompleted != null)\r
-                {\r
-                    this.EncodeCompleted(\r
-                        this,\r
-                        new EncodeCompletedEventArgs(state.WorkDone.Error != (int)hb_error_code.HB_ERROR_NONE));\r
-                }\r
-            }\r
-        }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <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>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop
+{
+    using System;
+    using System.Collections.Generic;
+    using System.Diagnostics;
+    using System.Linq;
+    using System.Runtime.ExceptionServices;
+    using System.Runtime.InteropServices;
+    using System.Timers;
+
+    using HandBrake.Interop.Interop.EventArgs;
+    using HandBrake.Interop.Interop.Factories;
+    using HandBrake.Interop.Interop.HbLib;
+    using HandBrake.Interop.Interop.Helpers;
+    using HandBrake.Interop.Interop.Interfaces;
+    using HandBrake.Interop.Interop.Json.Encode;
+    using HandBrake.Interop.Interop.Json.Scan;
+    using HandBrake.Interop.Interop.Json.State;
+    using HandBrake.Interop.Interop.Model.Encoding;
+    using HandBrake.Interop.Interop.Model.Preview;
+
+    using Newtonsoft.Json;
+
+    /// <summary>
+    /// A wrapper for a HandBrake instance.
+    /// </summary>
+    public class HandBrakeInstance : IHandBrakeInstance, IDisposable
+    {
+        /// <summary>
+        /// The number of MS between status polls when scanning.
+        /// </summary>
+        private const double ScanPollIntervalMs = 250;
+
+        /// <summary>
+        /// The number of MS between status polls when encoding.
+        /// </summary>
+        private const double EncodePollIntervalMs = 250;
+
+        /// <summary>
+        /// The native handle to the HandBrake instance.
+        /// </summary>
+        private IntPtr hbHandle;
+
+        /// <summary>
+        /// The number of previews created during scan.
+        /// </summary>
+        private int previewCount;
+
+        /// <summary>
+        /// The timer to poll for scan status.
+        /// </summary>
+        private Timer scanPollTimer;
+
+        /// <summary>
+        /// The timer to poll for encode status.
+        /// </summary>
+        private Timer encodePollTimer;
+
+        /// <summary>
+        /// The list of titles on this instance.
+        /// </summary>
+        private JsonScanObject titles;
+
+        /// <summary>
+        /// The raw JSON for the titles list.
+        /// </summary>
+        private string titlesJson;
+
+        /// <summary>
+        /// The index of the default title.
+        /// </summary>
+        private int featureTitle;
+
+        /// <summary>
+        /// A value indicating whether this object has been disposed or not.
+        /// </summary>
+        private bool disposed;
+
+        /// <summary>
+        /// Finalizes an instance of the HandBrakeInstance class.
+        /// </summary>
+        ~HandBrakeInstance()
+        {
+            this.Dispose(false);
+        }
+
+        /// <summary>
+        /// Fires for progress updates when scanning.
+        /// </summary>
+        public event EventHandler<ScanProgressEventArgs> ScanProgress;
+
+        /// <summary>
+        /// Fires when a scan has completed.
+        /// </summary>
+        public event EventHandler<System.EventArgs> ScanCompleted;
+
+        /// <summary>
+        /// Fires for progress updates when encoding.
+        /// </summary>
+        public event EventHandler<EncodeProgressEventArgs> EncodeProgress;
+
+        /// <summary>
+        /// Fires when an encode has completed.
+        /// </summary>
+        public event EventHandler<EncodeCompletedEventArgs> EncodeCompleted;
+
+        /// <summary>
+        /// Gets the handle.
+        /// </summary>
+        internal IntPtr Handle
+        {
+            get
+            {
+                return this.hbHandle;
+            }
+        }
+
+        /// <summary>
+        /// Gets the number of previews created during scan.
+        /// </summary>
+        public int PreviewCount
+        {
+            get
+            {
+                return this.previewCount;
+            }
+        }
+
+        /// <summary>
+        /// Gets the list of titles on this instance.
+        /// </summary>
+        public JsonScanObject Titles
+        {
+            get
+            {
+                return this.titles;
+            }
+        }
+
+        /// <summary>
+        /// Gets the raw JSON for the list of titles on this instance.
+        /// </summary>
+        public string TitlesJson
+        {
+            get
+            {
+                return this.titlesJson;
+            }
+        }
+
+        /// <summary>
+        /// Gets the index of the default title.
+        /// </summary>
+        public int FeatureTitle
+        {
+            get
+            {
+                return this.featureTitle;
+            }
+        }
+
+        /// <summary>
+        /// Gets the HandBrake version string.
+        /// </summary>
+        public string Version
+        {
+            get
+            {
+                var versionPtr = HBFunctions.hb_get_version(this.hbHandle);
+                return Marshal.PtrToStringAnsi(versionPtr);
+            }
+        }
+
+        /// <summary>
+        /// Gets the HandBrake build number.
+        /// </summary>
+        public int Build
+        {
+            get
+            {
+                return HBFunctions.hb_get_build(this.hbHandle);
+            }
+        }
+
+        /// <summary>
+        /// Initializes this instance.
+        /// </summary>
+        /// <param name="verbosity">
+        /// The code for the logging verbosity to use.
+        /// </param>
+        public void Initialize(int verbosity)
+        {
+            HandBrakeUtils.EnsureGlobalInit();
+
+            HandBrakeUtils.RegisterLogger();
+            this.hbHandle = HBFunctions.hb_init(verbosity, update_check: 0);
+        }
+
+        /// <summary>
+        /// Starts a scan of the given path.
+        /// </summary>
+        /// <param name="path">
+        /// The path of the video to scan.
+        /// </param>
+        /// <param name="previewCount">
+        /// The number of previews to make on each title.
+        /// </param>
+        /// <param name="minDuration">
+        /// The minimum duration of a title to show up on the scan.
+        /// </param>
+        /// <param name="titleIndex">
+        /// The title index to scan (1-based, 0 for all titles).
+        /// </param>
+        public void StartScan(string path, int previewCount, TimeSpan minDuration, int titleIndex)
+        {
+            this.previewCount = previewCount;
+
+            IntPtr pathPtr = InteropUtilities.ToUtf8PtrFromString(path);
+            HBFunctions.hb_scan(this.hbHandle, pathPtr, titleIndex, previewCount, 1, (ulong)(minDuration.TotalSeconds * 90000));
+            Marshal.FreeHGlobal(pathPtr);
+
+            this.scanPollTimer = new Timer();
+            this.scanPollTimer.Interval = ScanPollIntervalMs;
+
+            // Lambda notation used to make sure we can view any JIT exceptions the method throws
+            this.scanPollTimer.Elapsed += (o, e) =>
+            {
+                try
+                {
+                    this.PollScanProgress();
+                }
+                catch (Exception exc)
+                {
+                    Debug.WriteLine(exc);
+                    HandBrakeUtils.SendErrorEvent(exc.ToString());
+                }
+            };
+            this.scanPollTimer.Start();
+        }
+
+        /// <summary>
+        /// Stops an ongoing scan.
+        /// </summary>
+        [HandleProcessCorruptedStateExceptions]
+        public void StopScan()
+        {
+            HBFunctions.hb_scan_stop(this.hbHandle);
+        }
+
+        /// <summary>
+        /// Gets an image for the given job and preview
+        /// </summary>
+        /// <remarks>
+        /// Only incorporates sizing and aspect ratio into preview image.
+        /// </remarks>
+        /// <param name="settings">
+        /// The encode job to preview.
+        /// </param>
+        /// <param name="previewNumber">
+        /// The index of the preview to get (0-based).
+        /// </param>
+        /// <param name="deinterlace">
+        /// True to enable basic deinterlace of preview images.
+        /// </param>
+        /// <returns>
+        /// An image with the requested preview.
+        /// </returns>
+        [HandleProcessCorruptedStateExceptions]
+        public RawPreviewData GetPreview(PreviewSettings settings, int previewNumber, bool deinterlace)
+        {
+            SourceTitle title = this.Titles.TitleList.FirstOrDefault(t => t.Index == settings.TitleNumber);
+
+            // Create the Expected Output Geometry details for libhb.
+            hb_geometry_settings_s uiGeometry = new hb_geometry_settings_s
+            {
+                crop = new[] { settings.Cropping.Top, settings.Cropping.Bottom, settings.Cropping.Left, settings.Cropping.Right },
+                itu_par = 0,
+                keep = (int)AnamorphicFactory.KeepSetting.HB_KEEP_WIDTH + (settings.KeepDisplayAspect ? 0x04 : 0), // TODO Keep Width?
+                maxWidth = settings.MaxWidth,
+                maxHeight = settings.MaxHeight,
+                mode = (int)(hb_anamorphic_mode_t)settings.Anamorphic,
+                modulus = settings.Modulus ?? 16,
+                geometry = new hb_geometry_s
+                {
+                    height = settings.Height,
+                    width = settings.Width,
+                    par = settings.Anamorphic != Anamorphic.Custom && settings.Anamorphic != Anamorphic.Automatic
+                        ? new hb_rational_t { den = title.Geometry.PAR.Den, num = title.Geometry.PAR.Num }
+                        : new hb_rational_t { den = settings.PixelAspectY, num = settings.PixelAspectX }
+                }
+            };
+
+            // Fetch the image data from LibHb
+            IntPtr resultingImageStuct = HBFunctions.hb_get_preview2(this.hbHandle, settings.TitleNumber, previewNumber, ref uiGeometry, deinterlace ? 1 : 0);
+            hb_image_s image = InteropUtilities.ToStructureFromPtr<hb_image_s>(resultingImageStuct);
+
+            // Copy the filled image buffer to a managed array.
+            int stride_width = image.plane[0].stride;
+            int stride_height = image.plane[0].height_stride;
+            int imageBufferSize = stride_width * stride_height;  // int imageBufferSize = outputWidth * outputHeight * 4;
+
+            byte[] managedBuffer = new byte[imageBufferSize];
+            Marshal.Copy(image.plane[0].data, managedBuffer, 0, imageBufferSize);
+
+            RawPreviewData preview = new RawPreviewData(managedBuffer, stride_width, stride_height, image.width, image.height);
+
+            // Close the image so we don't leak memory.
+            IntPtr nativeJobPtrPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IntPtr)));
+            Marshal.WriteIntPtr(nativeJobPtrPtr, resultingImageStuct);
+            HBFunctions.hb_image_close(nativeJobPtrPtr);
+            Marshal.FreeHGlobal(nativeJobPtrPtr);
+
+            return preview;
+        }
+
+        /// <summary>
+        /// Determines if DRC can be applied to the given track with the given encoder.
+        /// </summary>
+        /// <param name="trackNumber">The track Number.</param>
+        /// <param name="encoder">The encoder to use for DRC.</param>
+        /// <param name="title">The title.</param>
+        /// <returns>True if DRC can be applied to the track with the given encoder.</returns>
+        public bool CanApplyDrc(int trackNumber, HBAudioEncoder encoder, int title)
+        {
+            return HBFunctions.hb_audio_can_apply_drc2(this.hbHandle, title, trackNumber, encoder.Id) > 0;
+        }
+
+        /// <summary>
+        /// Starts an encode with the given job.
+        /// </summary>
+        /// <param name="encodeObject">
+        /// The encode Object.
+        /// </param>
+        [HandleProcessCorruptedStateExceptions]
+        public void StartEncode(JsonEncodeObject encodeObject)
+        {
+            JsonSerializerSettings settings = new JsonSerializerSettings
+            {
+                NullValueHandling = NullValueHandling.Ignore,
+            };
+
+            string encode = JsonConvert.SerializeObject(encodeObject, Formatting.Indented, settings);
+            this.StartEncode(encode);
+        }
+
+        /// <summary>
+        /// Starts an encode with the given job JSON.
+        /// </summary>
+        /// <param name="encodeJson">The JSON for the job to start.</param>
+        [HandleProcessCorruptedStateExceptions]
+        public void StartEncode(string encodeJson)
+        {
+            HBFunctions.hb_add_json(this.hbHandle, InteropUtilities.ToUtf8PtrFromString(encodeJson));
+            HBFunctions.hb_start(this.hbHandle);
+
+            this.encodePollTimer = new Timer();
+            this.encodePollTimer.Interval = EncodePollIntervalMs;
+
+            this.encodePollTimer.Elapsed += (o, e) =>
+            {
+                try
+                {
+                    this.PollEncodeProgress();
+                }
+                catch (Exception exc)
+                {
+                    Debug.WriteLine(exc);
+                }
+            };
+            this.encodePollTimer.Start();
+        }
+
+        /// <summary>
+        /// Pauses the current encode.
+        /// </summary>
+        [HandleProcessCorruptedStateExceptions]
+        public void PauseEncode()
+        {
+            HBFunctions.hb_pause(this.hbHandle);
+        }
+
+        /// <summary>
+        /// Resumes a paused encode.
+        /// </summary>
+        [HandleProcessCorruptedStateExceptions]
+        public void ResumeEncode()
+        {
+            HBFunctions.hb_resume(this.hbHandle);
+        }
+
+        /// <summary>
+        /// Stops the current encode.
+        /// </summary>
+        [HandleProcessCorruptedStateExceptions]
+        public void StopEncode()
+        {
+            HBFunctions.hb_stop(this.hbHandle);
+
+            // Also remove all jobs from the queue (in case we stopped a 2-pass encode)
+            var currentJobs = new List<IntPtr>();
+
+            int jobs = HBFunctions.hb_count(this.hbHandle);
+            for (int i = 0; i < jobs; i++)
+            {
+                currentJobs.Add(HBFunctions.hb_job(this.hbHandle, 0));
+            }
+
+            foreach (IntPtr job in currentJobs)
+            {
+                HBFunctions.hb_rem(this.hbHandle, job);
+            }
+        }
+
+        /// <summary>
+        /// Frees any resources associated with this object.
+        /// </summary>
+        public void Dispose()
+        {
+            if (this.disposed)
+            {
+                return;
+            }
+
+            this.Dispose(true);
+            GC.SuppressFinalize(this);
+        }
+
+        /// <summary>
+        /// Gets a value indicating whether the object is disposed.
+        /// </summary>
+        public bool IsDisposed
+        {
+            get
+            {
+                return this.disposed;
+            }
+        }
+
+        /// <summary>
+        /// Frees any resources associated with this object.
+        /// </summary>
+        /// <param name="disposing">
+        /// True if managed objects as well as unmanaged should be disposed.
+        /// </param>
+        protected virtual void Dispose(bool disposing)
+        {
+            if (disposing)
+            {
+                // Free other state (managed objects).
+            }
+
+            // Free unmanaged objects.
+            IntPtr handlePtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IntPtr)));
+            Marshal.WriteIntPtr(handlePtr, this.hbHandle);
+            HBFunctions.hb_close(handlePtr);
+            Marshal.FreeHGlobal(handlePtr);
+
+            this.disposed = true;
+        }
+
+        /// <summary>
+        /// Checks the status of the ongoing scan.
+        /// </summary>
+        [HandleProcessCorruptedStateExceptions]
+        private void PollScanProgress()
+        {
+            IntPtr json = HBFunctions.hb_get_state_json(this.hbHandle);
+            string statusJson = Marshal.PtrToStringAnsi(json);
+            JsonState state = null;
+            if (!string.IsNullOrEmpty(statusJson))
+            {
+                state = JsonConvert.DeserializeObject<JsonState>(statusJson);
+            }
+
+            TaskState taskState = state != null ? TaskState.FromRepositoryValue(state.State) : null;
+
+            if (taskState != null && (taskState == TaskState.Scanning || taskState == TaskState.Searching))
+            {
+                if (this.ScanProgress != null && state.Scanning != null)
+                {
+                    this.ScanProgress(this, new ScanProgressEventArgs(state.Scanning.Progress, state.Scanning.Preview, state.Scanning.PreviewCount, state.Scanning.Title, state.Scanning.TitleCount));
+                }
+            }
+            else if (taskState != null && taskState == TaskState.ScanDone)
+            {
+                this.scanPollTimer.Stop();
+
+                var jsonMsg = HBFunctions.hb_get_title_set_json(this.hbHandle);
+                this.titlesJson = InteropUtilities.ToStringFromUtf8Ptr(jsonMsg);
+
+                if (!string.IsNullOrEmpty(this.titlesJson))
+                { 
+                    this.titles = JsonConvert.DeserializeObject<JsonScanObject>(this.titlesJson);
+                    if (this.titles != null)
+                    {
+                        this.featureTitle = this.titles.MainFeature;
+                    }
+                }
+
+                if (this.ScanCompleted != null)
+                {
+                    this.ScanCompleted(this, new System.EventArgs());
+                }
+            }
+        }
+
+        /// <summary>
+        /// Checks the status of the ongoing encode.
+        /// </summary>
+        [HandleProcessCorruptedStateExceptions]
+        private void PollEncodeProgress()
+        {
+            IntPtr json = HBFunctions.hb_get_state_json(this.hbHandle);
+            string statusJson = Marshal.PtrToStringAnsi(json);
+
+            JsonState state = JsonConvert.DeserializeObject<JsonState>(statusJson);
+
+            TaskState taskState = state != null ? TaskState.FromRepositoryValue(state.State) : null;
+
+            if (taskState != null && (taskState == TaskState.Working || taskState == TaskState.Muxing || taskState == TaskState.Searching))
+            {
+                if (this.EncodeProgress != null)
+                {
+                    var progressEventArgs = new EncodeProgressEventArgs(state.Working.Progress, state.Working.Rate, state.Working.RateAvg, new TimeSpan(state.Working.Hours, state.Working.Minutes, state.Working.Seconds),
+                        state.Working.PassID, state.Working.Pass, state.Working.PassCount, taskState.Code);
+
+                    this.EncodeProgress(this, progressEventArgs);
+                }
+            }
+            else if (taskState != null && taskState == TaskState.WorkDone)
+            {
+                this.encodePollTimer.Stop();
+
+                if (this.EncodeCompleted != null)
+                {
+                    this.EncodeCompleted(
+                        this,
+                        new EncodeCompletedEventArgs(state.WorkDone.Error != (int)hb_error_code.HB_ERROR_NONE));
+                }
+            }
+        }
+    }
+}
similarity index 94%
rename from win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstanceManager.cs
rename to win/CS/HandBrake.Interop/Interop/HandBrakeInstanceManager.cs
index 5ceb70bdc3b98cab61553e1270983fb350d1f5a9..07ddb8a15598e165dbacee60971520423b2829ed 100644 (file)
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="HandBrakeInstanceManager.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The hand brake instance manager.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop\r
-{\r
-    using System;\r
-\r
-    using HandBrake.ApplicationServices.Interop.Interfaces;\r
-\r
-    /// <summary>\r
-    /// The HandBrake Instance manager.\r
-    /// Only supports scanning right now.\r
-    /// </summary>\r
-    public static class HandBrakeInstanceManager\r
-    {\r
-        private static HandBrakeInstance scanInstance;\r
-        private static HandBrakeInstance encodeInstance;\r
-        private static HandBrakeInstance previewInstance;\r
-        private static HandBrakeInstance masterInstance;\r
-\r
-        /// <summary>\r
-        /// Initializes static members of the <see cref="HandBrakeInstanceManager"/> class.\r
-        /// </summary>\r
-        static HandBrakeInstanceManager()\r
-        {\r
-            masterInstance = new HandBrakeInstance();\r
-            masterInstance.Initialize(2);\r
-        }\r
-\r
-        /// <summary>\r
-        /// The init.\r
-        /// </summary>\r
-        public static void Init()\r
-        {\r
-            // Nothing to do. Triggers static constructor.\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the scanInstance.\r
-        /// </summary>\r
-        /// <param name="verbosity">\r
-        /// The verbosity.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The <see cref="IHandBrakeInstance"/>.\r
-        /// </returns>\r
-        public static IHandBrakeInstance GetScanInstance(int verbosity)\r
-        {\r
-            if (scanInstance != null)\r
-            {\r
-                scanInstance.Dispose();\r
-                scanInstance = null;\r
-            }\r
-\r
-            HandBrakeInstance newInstance = new HandBrakeInstance();\r
-            newInstance.Initialize(verbosity);\r
-            scanInstance = newInstance;\r
-\r
-            return scanInstance;\r
-        }\r
-\r
-        /// <summary>\r
-        /// The get encode instance.\r
-        /// </summary>\r
-        /// <param name="verbosity">\r
-        /// The verbosity.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The <see cref="IHandBrakeInstance"/>.\r
-        /// </returns>\r
-        public static IHandBrakeInstance GetEncodeInstance(int verbosity)\r
-        {\r
-            if (encodeInstance != null)\r
-            {\r
-                encodeInstance.Dispose();\r
-                encodeInstance = null;\r
-            }\r
-\r
-            HandBrakeInstance newInstance = new HandBrakeInstance();\r
-            newInstance.Initialize(verbosity);\r
-            encodeInstance = newInstance;\r
-\r
-            return encodeInstance;\r
-        }\r
-\r
-        /// <summary>\r
-        /// The get encode instance.\r
-        /// </summary>\r
-        /// <param name="verbosity">\r
-        /// The verbosity.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The <see cref="IHandBrakeInstance"/>.\r
-        /// </returns>\r
-        public static IHandBrakeInstance GetPreviewInstance(int verbosity)\r
-        {\r
-            if (previewInstance != null)\r
-            {\r
-                previewInstance.Dispose();\r
-                previewInstance = null;\r
-            }\r
-\r
-            HandBrakeInstance newInstance = new HandBrakeInstance();\r
-            newInstance.Initialize(verbosity);\r
-            previewInstance = newInstance;\r
-\r
-            return previewInstance;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the master instance.\r
-        /// </summary>\r
-        internal static IHandBrakeInstance MasterInstance\r
-        {\r
-            get\r
-            {\r
-                return masterInstance;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the last scan scan instance.\r
-        /// </summary>\r
-        internal static IHandBrakeInstance LastScanScanInstance\r
-        {\r
-            get\r
-            {\r
-                return scanInstance;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the handle.\r
-        /// </summary>\r
-        internal static IntPtr LastScanHandle \r
-        {\r
-            get\r
-            {\r
-                return scanInstance.Handle;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the last encode scan instance.\r
-        /// </summary>\r
-        internal static IHandBrakeInstance LastEncodeScanInstance\r
-        {\r
-            get\r
-            {\r
-                return encodeInstance;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the encode handle.\r
-        /// </summary>\r
-        internal static IntPtr LastEncodeHandle\r
-        {\r
-            get\r
-            {\r
-                return encodeInstance.Handle;\r
-            }\r
-        }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="HandBrakeInstanceManager.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>
+//   The hand brake instance manager.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop
+{
+    using System;
+
+    using HandBrake.Interop.Interop.Interfaces;
+
+    /// <summary>
+    /// The HandBrake Instance manager.
+    /// Only supports scanning right now.
+    /// </summary>
+    public static class HandBrakeInstanceManager
+    {
+        private static HandBrakeInstance scanInstance;
+        private static HandBrakeInstance encodeInstance;
+        private static HandBrakeInstance previewInstance;
+        private static HandBrakeInstance masterInstance;
+
+        /// <summary>
+        /// Initializes static members of the <see cref="HandBrakeInstanceManager"/> class.
+        /// </summary>
+        static HandBrakeInstanceManager()
+        {
+            masterInstance = new HandBrakeInstance();
+            masterInstance.Initialize(2);
+        }
+
+        /// <summary>
+        /// The init.
+        /// </summary>
+        public static void Init()
+        {
+            // Nothing to do. Triggers static constructor.
+        }
+
+        /// <summary>
+        /// Gets the scanInstance.
+        /// </summary>
+        /// <param name="verbosity">
+        /// The verbosity.
+        /// </param>
+        /// <returns>
+        /// The <see cref="IHandBrakeInstance"/>.
+        /// </returns>
+        public static IHandBrakeInstance GetScanInstance(int verbosity)
+        {
+            if (scanInstance != null)
+            {
+                scanInstance.Dispose();
+                scanInstance = null;
+            }
+
+            HandBrakeInstance newInstance = new HandBrakeInstance();
+            newInstance.Initialize(verbosity);
+            scanInstance = newInstance;
+
+            return scanInstance;
+        }
+
+        /// <summary>
+        /// The get encode instance.
+        /// </summary>
+        /// <param name="verbosity">
+        /// The verbosity.
+        /// </param>
+        /// <returns>
+        /// The <see cref="IHandBrakeInstance"/>.
+        /// </returns>
+        public static IHandBrakeInstance GetEncodeInstance(int verbosity)
+        {
+            if (encodeInstance != null)
+            {
+                encodeInstance.Dispose();
+                encodeInstance = null;
+            }
+
+            HandBrakeInstance newInstance = new HandBrakeInstance();
+            newInstance.Initialize(verbosity);
+            encodeInstance = newInstance;
+
+            return encodeInstance;
+        }
+
+        /// <summary>
+        /// The get encode instance.
+        /// </summary>
+        /// <param name="verbosity">
+        /// The verbosity.
+        /// </param>
+        /// <returns>
+        /// The <see cref="IHandBrakeInstance"/>.
+        /// </returns>
+        public static IHandBrakeInstance GetPreviewInstance(int verbosity)
+        {
+            if (previewInstance != null)
+            {
+                previewInstance.Dispose();
+                previewInstance = null;
+            }
+
+            HandBrakeInstance newInstance = new HandBrakeInstance();
+            newInstance.Initialize(verbosity);
+            previewInstance = newInstance;
+
+            return previewInstance;
+        }
+
+        /// <summary>
+        /// Gets the master instance.
+        /// </summary>
+        internal static IHandBrakeInstance MasterInstance
+        {
+            get
+            {
+                return masterInstance;
+            }
+        }
+
+        /// <summary>
+        /// Gets the last scan scan instance.
+        /// </summary>
+        internal static IHandBrakeInstance LastScanScanInstance
+        {
+            get
+            {
+                return scanInstance;
+            }
+        }
+
+        /// <summary>
+        /// Gets the handle.
+        /// </summary>
+        internal static IntPtr LastScanHandle 
+        {
+            get
+            {
+                return scanInstance.Handle;
+            }
+        }
+
+        /// <summary>
+        /// Gets the last encode scan instance.
+        /// </summary>
+        internal static IHandBrakeInstance LastEncodeScanInstance
+        {
+            get
+            {
+                return encodeInstance;
+            }
+        }
+
+        /// <summary>
+        /// Gets the encode handle.
+        /// </summary>
+        internal static IntPtr LastEncodeHandle
+        {
+            get
+            {
+                return encodeInstance.Handle;
+            }
+        }
+    }
+}
similarity index 87%
rename from win/CS/HandBrake.ApplicationServices/Interop/HandBrakeLanguagesHelper.cs
rename to win/CS/HandBrake.Interop/Interop/HandBrakeLanguagesHelper.cs
index 34328003115f9eecbe3039d4a0920283eb48b16a..36b7a19e14f326ff0ddeb2cfef9ff49130747473 100644 (file)
@@ -1,52 +1,52 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="HandBrakeLanguagesHelper.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Contains utilities for converting language codes.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop\r
-{\r
-    using System.Collections.Generic;\r
-\r
-    using HandBrake.ApplicationServices.Interop.HbLib;\r
-    using HandBrake.ApplicationServices.Interop.Helpers;\r
-    using HandBrake.ApplicationServices.Interop.Model;\r
-\r
-    /// <summary>\r
-    /// Contains utilities for converting language codes.\r
-    /// </summary>\r
-    public static class HandBrakeLanguagesHelper\r
-    {\r
-        /// <summary>\r
-        /// The list of all languages.\r
-        /// </summary>\r
-        private static IList<Language> allLanguages; \r
-\r
-        /// <summary>\r
-        /// Gets a list of all languages.\r
-        /// </summary>\r
-        public static IList<Language> AllLanguages\r
-        {\r
-            get\r
-            {\r
-                return allLanguages\r
-                       ?? (allLanguages =\r
-                           InteropUtilities.ToListFromIterator<iso639_lang_t, Language>(HBFunctions.lang_get_next, HandBrakeUnitConversionHelpers.NativeToLanguage));\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the language object for the given code.\r
-        /// </summary>\r
-        /// <param name="code">The ISO-639-2 code for the language.</param>\r
-        /// <returns>Object that describes the language.</returns>\r
-        public static Language Get(string code)\r
-        {\r
-            iso639_lang_t language = InteropUtilities.ToStructureFromPtr<iso639_lang_t>(HBFunctions.lang_for_code2(code));\r
-            return HandBrakeUnitConversionHelpers.NativeToLanguage(language);\r
-        }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="HandBrakeLanguagesHelper.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.Interop
+{
+    using System.Collections.Generic;
+
+    using HandBrake.Interop.Interop.HbLib;
+    using HandBrake.Interop.Interop.Helpers;
+    using HandBrake.Interop.Interop.Model;
+
+    /// <summary>
+    /// Contains utilities for converting language codes.
+    /// </summary>
+    public static class HandBrakeLanguagesHelper
+    {
+        /// <summary>
+        /// The list of all languages.
+        /// </summary>
+        private static IList<Language> allLanguages; 
+
+        /// <summary>
+        /// Gets a list of all languages.
+        /// </summary>
+        public static IList<Language> AllLanguages
+        {
+            get
+            {
+                return allLanguages
+                       ?? (allLanguages =
+                           InteropUtilities.ToListFromIterator<iso639_lang_t, Language>(HBFunctions.lang_get_next, HandBrakeUnitConversionHelpers.NativeToLanguage));
+            }
+        }
+
+        /// <summary>
+        /// Gets the language object for the given code.
+        /// </summary>
+        /// <param name="code">The ISO-639-2 code for the language.</param>
+        /// <returns>Object that describes the language.</returns>
+        public static Language Get(string code)
+        {
+            iso639_lang_t language = InteropUtilities.ToStructureFromPtr<iso639_lang_t>(HBFunctions.lang_for_code2(code));
+            return HandBrakeUnitConversionHelpers.NativeToLanguage(language);
+        }
+    }
+}
similarity index 90%
rename from win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs
rename to win/CS/HandBrake.Interop/Interop/HandBrakePresetService.cs
index e3667a966b0bd7e857fb8039e6fd0793e8e2f5af..a51a44fd1ee2cf29b3c9af113c34c68feb34d156 100644 (file)
@@ -1,92 +1,92 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="HandBrakePresetService.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The hand brake preset service.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop\r
-{\r
-    using System;\r
-    using System.Collections.Generic;\r
-    using System.IO;\r
-    using System.Runtime.InteropServices;\r
-\r
-    using HandBrake.ApplicationServices.Interop.HbLib;\r
-    using HandBrake.ApplicationServices.Interop.Helpers;\r
-    using HandBrake.ApplicationServices.Interop.Json.Presets;\r
-\r
-    using Newtonsoft.Json;\r
-\r
-    /// <summary>\r
-    /// The hand brake preset service.\r
-    /// </summary>\r
-    public class HandBrakePresetService\r
-    {\r
-        /// <summary>\r
-        /// The get built in presets.\r
-        /// Requires an hb_init to have been invoked.\r
-        /// </summary>\r
-        /// <returns>\r
-        /// The <see cref="string"/>.\r
-        /// </returns>\r
-        public static IList<PresetCategory> GetBuiltInPresets()\r
-        {\r
-            IntPtr presets = HBFunctions.hb_presets_builtin_get_json();\r
-            string presetJson = Marshal.PtrToStringAnsi(presets);\r
-            IList<PresetCategory> presetList = JsonConvert.DeserializeObject<IList<PresetCategory>>(presetJson);\r
-\r
-            return presetList;\r
-        }\r
-\r
-        /// <summary>\r
-        /// The get preset from file.\r
-        /// </summary>\r
-        /// <param name="filename">\r
-        /// The filename.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The <see cref="PresetCategory"/>.\r
-        /// </returns>\r
-        public static PresetTransportContainer GetPresetFromFile(string filename)\r
-        {\r
-            IntPtr presetStringPointer = HBFunctions.hb_presets_read_file_json(InteropUtilities.ToUtf8PtrFromString(filename));\r
-            string presetJson = Marshal.PtrToStringAnsi(presetStringPointer);\r
-\r
-            if (!string.IsNullOrEmpty(presetJson))\r
-            {\r
-                // Check to see if we have a list of presets.\r
-                if (presetJson.StartsWith("["))\r
-                {\r
-                    presetJson = "{ \"PresetList\":" + presetJson + " } ";\r
-                }\r
-\r
-                PresetTransportContainer preset = JsonConvert.DeserializeObject<PresetTransportContainer>(presetJson);\r
-\r
-                return preset;\r
-            }\r
-\r
-            return null;\r
-        }\r
-\r
-        /// <summary>\r
-        /// The export preset.\r
-        /// </summary>\r
-        /// <param name="filename">\r
-        /// The filename.\r
-        /// </param>\r
-        /// <param name="container">\r
-        /// The container.\r
-        /// </param>\r
-        public static void ExportPreset(string filename, PresetTransportContainer container)\r
-        {\r
-            string preset = JsonConvert.SerializeObject(container, Formatting.Indented, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore });\r
-            using (StreamWriter writer = new StreamWriter(filename))\r
-            {\r
-                writer.Write(preset);\r
-            }\r
-        }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="HandBrakePresetService.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>
+//   The hand brake preset service.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop
+{
+    using System;
+    using System.Collections.Generic;
+    using System.IO;
+    using System.Runtime.InteropServices;
+
+    using HandBrake.Interop.Interop.HbLib;
+    using HandBrake.Interop.Interop.Helpers;
+    using HandBrake.Interop.Interop.Json.Presets;
+
+    using Newtonsoft.Json;
+
+    /// <summary>
+    /// The hand brake preset service.
+    /// </summary>
+    public class HandBrakePresetService
+    {
+        /// <summary>
+        /// The get built in presets.
+        /// Requires an hb_init to have been invoked.
+        /// </summary>
+        /// <returns>
+        /// The <see cref="string"/>.
+        /// </returns>
+        public static IList<PresetCategory> GetBuiltInPresets()
+        {
+            IntPtr presets = HBFunctions.hb_presets_builtin_get_json();
+            string presetJson = Marshal.PtrToStringAnsi(presets);
+            IList<PresetCategory> presetList = JsonConvert.DeserializeObject<IList<PresetCategory>>(presetJson);
+
+            return presetList;
+        }
+
+        /// <summary>
+        /// The get preset from file.
+        /// </summary>
+        /// <param name="filename">
+        /// The filename.
+        /// </param>
+        /// <returns>
+        /// The <see cref="PresetCategory"/>.
+        /// </returns>
+        public static PresetTransportContainer GetPresetFromFile(string filename)
+        {
+            IntPtr presetStringPointer = HBFunctions.hb_presets_read_file_json(InteropUtilities.ToUtf8PtrFromString(filename));
+            string presetJson = Marshal.PtrToStringAnsi(presetStringPointer);
+
+            if (!string.IsNullOrEmpty(presetJson))
+            {
+                // Check to see if we have a list of presets.
+                if (presetJson.StartsWith("["))
+                {
+                    presetJson = "{ \"PresetList\":" + presetJson + " } ";
+                }
+
+                PresetTransportContainer preset = JsonConvert.DeserializeObject<PresetTransportContainer>(presetJson);
+
+                return preset;
+            }
+
+            return null;
+        }
+
+        /// <summary>
+        /// The export preset.
+        /// </summary>
+        /// <param name="filename">
+        /// The filename.
+        /// </param>
+        /// <param name="container">
+        /// The container.
+        /// </param>
+        public static void ExportPreset(string filename, PresetTransportContainer container)
+        {
+            string preset = JsonConvert.SerializeObject(container, Formatting.Indented, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore });
+            using (StreamWriter writer = new StreamWriter(filename))
+            {
+                writer.Write(preset);
+            }
+        }
+    }
+}
similarity index 93%
rename from win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUnitConversionHelpers.cs
rename to win/CS/HandBrake.Interop/Interop/HandBrakeUnitConversionHelpers.cs
index 5140ddba42701286e2187003a28d9f07e136908e..93cc0fc0c5e754f3085a5af656834b8524491c2d 100644 (file)
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="HandBrakeUnitConversionHelpers.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the HandrakeUnitConversionHelpers type.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop\r
-{\r
-    using System;\r
-    using System.Collections.Generic;\r
-    using System.Globalization;\r
-\r
-    using HandBrake.ApplicationServices.Interop.HbLib;\r
-    using HandBrake.ApplicationServices.Interop.Helpers;\r
-    using HandBrake.ApplicationServices.Interop.Model;\r
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
-\r
-    /// <summary>\r
-    /// Converters for various encoding values.\r
-    /// </summary>\r
-    public static class HandBrakeUnitConversionHelpers\r
-    {\r
-        /// <summary>\r
-        /// Video Frame Rates\r
-        /// </summary>\r
-        private static readonly Dictionary<double, int> VideoRates;\r
-\r
-        /// <summary>\r
-        /// Initializes static members of the HandBrakeUnitConversionHelpers class.\r
-        /// </summary>\r
-        static HandBrakeUnitConversionHelpers()\r
-        {\r
-            HandBrakeUtils.EnsureGlobalInit();\r
-\r
-            VideoRates = new Dictionary<double, int>();\r
-            foreach (var framerate in HandBrakeEncoderHelpers.VideoFramerates)\r
-            {\r
-                VideoRates.Add(double.Parse(framerate.Name, CultureInfo.InvariantCulture), framerate.Rate);\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Convert Framerate to Video Rates\r
-        /// </summary>\r
-        /// <param name="framerate">\r
-        /// The framerate.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The vrate if a valid framerate is passed in.\r
-        /// </returns>\r
-        /// <exception cref="ArgumentException">\r
-        /// Thrown when framerate is invalid.\r
-        /// </exception>\r
-        public static int FramerateToVrate(double framerate)\r
-        {\r
-            if (!VideoRates.ContainsKey(framerate))\r
-            {\r
-                throw new ArgumentException("Framerate not recognized.", "framerate");\r
-            }\r
-\r
-            return VideoRates[framerate];\r
-        }\r
-\r
-        /// <summary>\r
-        /// Converts a native HB encoder structure to an Encoder model.\r
-        /// </summary>\r
-        /// <param name="encoder">\r
-        /// The structure to convert.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The converted model.\r
-        /// </returns>\r
-        internal static HBVideoEncoder NativeToVideoEncoder(hb_encoder_s encoder)\r
-        {\r
-            return new HBVideoEncoder(encoder.muxers, encoder.name, encoder.codec, encoder.short_name);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Converts a native HB encoder structure to an Encoder model.\r
-        /// </summary>\r
-        /// <param name="encoder">\r
-        /// The structure to convert.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The converted model.\r
-        /// </returns>\r
-        internal static HBAudioEncoder NativeToAudioEncoder(hb_encoder_s encoder)\r
-        {\r
-            var result = new HBAudioEncoder(\r
-                encoder.muxers,\r
-                HandBrakeEncoderHelpers.GetAudioCompressionLimits(encoder.codec),\r
-                HBFunctions.hb_audio_compression_get_default((uint)encoder.codec),\r
-                HBFunctions.hb_audio_quality_get_default((uint)encoder.codec),\r
-                encoder.name,\r
-                encoder.codec,\r
-                HandBrakeEncoderHelpers.GetAudioQualityLimits(encoder.codec),\r
-                encoder.short_name);\r
-\r
-            return result;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Converts a native HB rate structure to an HBRate object.\r
-        /// </summary>\r
-        /// <param name="rate">\r
-        /// The structure to convert.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The converted rate object.\r
-        /// </returns>\r
-        internal static HBRate NativeToRate(hb_rate_s rate)\r
-        {\r
-            return new HBRate(rate.name, rate.rate);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Converts a native HB mixdown structure to a Mixdown model.\r
-        /// </summary>\r
-        /// <param name="mixdown">\r
-        /// The structure to convert.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The converted model.\r
-        /// </returns>\r
-        internal static HBMixdown NativeToMixdown(hb_mixdown_s mixdown)\r
-        {\r
-            return new HBMixdown(mixdown.name, mixdown.amixdown, mixdown.short_name);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Converts a native HB container structure into an HBContainer object.\r
-        /// </summary>\r
-        /// <param name="container">\r
-        /// The structure to convert.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The converted structure.\r
-        /// </returns>\r
-        internal static HBContainer NativeToContainer(hb_container_s container)\r
-        {\r
-            return new HBContainer(container.default_extension, container.name, container.format, container.short_name);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Converts a native language structure to a Language object.\r
-        /// </summary>\r
-        /// <param name="language">\r
-        /// The structure to convert.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The converted structure.\r
-        /// </returns>\r
-        internal static Language NativeToLanguage(iso639_lang_t language)\r
-        {\r
-            string englishName = InteropUtilities.ToStringFromUtf8Ptr(language.eng_name);\r
-            string nativeName = InteropUtilities.ToStringFromUtf8Ptr(language.native_name);\r
-            return new Language(englishName, nativeName, language.iso639_2);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Converts the PTS amount to a TimeSpan. There may be some accuracy loss here.\r
-        /// </summary>\r
-        /// <param name="pts">\r
-        /// The PTS to convert.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The timespan for it.\r
-        /// </returns>\r
-        public static TimeSpan PtsToTimeSpan(ulong pts)\r
-        {\r
-            return TimeSpan.FromTicks((long)((pts * 10000000) / 90000));\r
-        }\r
-\r
-        /// <summary>\r
-        /// Converts the PTS amount to seconds.\r
-        /// </summary>\r
-        /// <param name="pts">\r
-        /// The PTS to convert.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The corresponding number of seconds.\r
-        /// </returns>\r
-        public static double PtsToSeconds(ulong pts)\r
-        {\r
-            return (double)pts / 90000;\r
-        }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="HandBrakeUnitConversionHelpers.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 HandrakeUnitConversionHelpers type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop
+{
+    using System;
+    using System.Collections.Generic;
+    using System.Globalization;
+
+    using HandBrake.Interop.Interop.HbLib;
+    using HandBrake.Interop.Interop.Helpers;
+    using HandBrake.Interop.Interop.Model;
+    using HandBrake.Interop.Interop.Model.Encoding;
+
+    /// <summary>
+    /// Converters for various encoding values.
+    /// </summary>
+    public static class HandBrakeUnitConversionHelpers
+    {
+        /// <summary>
+        /// Video Frame Rates
+        /// </summary>
+        private static readonly Dictionary<double, int> VideoRates;
+
+        /// <summary>
+        /// Initializes static members of the HandBrakeUnitConversionHelpers class.
+        /// </summary>
+        static HandBrakeUnitConversionHelpers()
+        {
+            HandBrakeUtils.EnsureGlobalInit();
+
+            VideoRates = new Dictionary<double, int>();
+            foreach (var framerate in HandBrakeEncoderHelpers.VideoFramerates)
+            {
+                VideoRates.Add(double.Parse(framerate.Name, CultureInfo.InvariantCulture), framerate.Rate);
+            }
+        }
+
+        /// <summary>
+        /// Convert Framerate to Video Rates
+        /// </summary>
+        /// <param name="framerate">
+        /// The framerate.
+        /// </param>
+        /// <returns>
+        /// The vrate if a valid framerate is passed in.
+        /// </returns>
+        /// <exception cref="ArgumentException">
+        /// Thrown when framerate is invalid.
+        /// </exception>
+        public static int FramerateToVrate(double framerate)
+        {
+            if (!VideoRates.ContainsKey(framerate))
+            {
+                throw new ArgumentException("Framerate not recognized.", "framerate");
+            }
+
+            return VideoRates[framerate];
+        }
+
+        /// <summary>
+        /// Converts a native HB encoder structure to an Encoder model.
+        /// </summary>
+        /// <param name="encoder">
+        /// The structure to convert.
+        /// </param>
+        /// <returns>
+        /// The converted model.
+        /// </returns>
+        internal static HBVideoEncoder NativeToVideoEncoder(hb_encoder_s encoder)
+        {
+            return new HBVideoEncoder(encoder.muxers, encoder.name, encoder.codec, encoder.short_name);
+        }
+
+        /// <summary>
+        /// Converts a native HB encoder structure to an Encoder model.
+        /// </summary>
+        /// <param name="encoder">
+        /// The structure to convert.
+        /// </param>
+        /// <returns>
+        /// The converted model.
+        /// </returns>
+        internal static HBAudioEncoder NativeToAudioEncoder(hb_encoder_s encoder)
+        {
+            var result = new HBAudioEncoder(
+                encoder.muxers,
+                HandBrakeEncoderHelpers.GetAudioCompressionLimits(encoder.codec),
+                HBFunctions.hb_audio_compression_get_default((uint)encoder.codec),
+                HBFunctions.hb_audio_quality_get_default((uint)encoder.codec),
+                encoder.name,
+                encoder.codec,
+                HandBrakeEncoderHelpers.GetAudioQualityLimits(encoder.codec),
+                encoder.short_name);
+
+            return result;
+        }
+
+        /// <summary>
+        /// Converts a native HB rate structure to an HBRate object.
+        /// </summary>
+        /// <param name="rate">
+        /// The structure to convert.
+        /// </param>
+        /// <returns>
+        /// The converted rate object.
+        /// </returns>
+        internal static HBRate NativeToRate(hb_rate_s rate)
+        {
+            return new HBRate(rate.name, rate.rate);
+        }
+
+        /// <summary>
+        /// Converts a native HB mixdown structure to a Mixdown model.
+        /// </summary>
+        /// <param name="mixdown">
+        /// The structure to convert.
+        /// </param>
+        /// <returns>
+        /// The converted model.
+        /// </returns>
+        internal static HBMixdown NativeToMixdown(hb_mixdown_s mixdown)
+        {
+            return new HBMixdown(mixdown.name, mixdown.amixdown, mixdown.short_name);
+        }
+
+        /// <summary>
+        /// Converts a native HB container structure into an HBContainer object.
+        /// </summary>
+        /// <param name="container">
+        /// The structure to convert.
+        /// </param>
+        /// <returns>
+        /// The converted structure.
+        /// </returns>
+        internal static HBContainer NativeToContainer(hb_container_s container)
+        {
+            return new HBContainer(container.default_extension, container.name, container.format, container.short_name);
+        }
+
+        /// <summary>
+        /// Converts a native language structure to a Language object.
+        /// </summary>
+        /// <param name="language">
+        /// The structure to convert.
+        /// </param>
+        /// <returns>
+        /// The converted structure.
+        /// </returns>
+        internal static Language NativeToLanguage(iso639_lang_t language)
+        {
+            string englishName = InteropUtilities.ToStringFromUtf8Ptr(language.eng_name);
+            string nativeName = InteropUtilities.ToStringFromUtf8Ptr(language.native_name);
+            return new Language(englishName, nativeName, language.iso639_2);
+        }
+
+        /// <summary>
+        /// Converts the PTS amount to a TimeSpan. There may be some accuracy loss here.
+        /// </summary>
+        /// <param name="pts">
+        /// The PTS to convert.
+        /// </param>
+        /// <returns>
+        /// The timespan for it.
+        /// </returns>
+        public static TimeSpan PtsToTimeSpan(ulong pts)
+        {
+            return TimeSpan.FromTicks((long)((pts * 10000000) / 90000));
+        }
+
+        /// <summary>
+        /// Converts the PTS amount to seconds.
+        /// </summary>
+        /// <param name="pts">
+        /// The PTS to convert.
+        /// </param>
+        /// <returns>
+        /// The corresponding number of seconds.
+        /// </returns>
+        public static double PtsToSeconds(ulong pts)
+        {
+            return (double)pts / 90000;
+        }
+    }
+}
similarity index 94%
rename from win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUtils.cs
rename to win/CS/HandBrake.Interop/Interop/HandBrakeUtils.cs
index a30f43133497efb02a9176d54073eaf00a0b230e..bd8630911080a2e85459f6e2c19a6841fc36c8e2 100644 (file)
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="HandBrakeUtils.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the HandBrakeUtils type.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop\r
-{\r
-    using System;\r
-    using System.Collections.Generic;\r
-    using System.Runtime.InteropServices;\r
-\r
-    using HandBrake.ApplicationServices.Interop.EventArgs;\r
-    using HandBrake.ApplicationServices.Interop.HbLib;\r
-    using HandBrake.ApplicationServices.Interop.Json.Anamorphic;\r
-    using HandBrake.ApplicationServices.Interop.Json.Shared;\r
-\r
-    using Newtonsoft.Json;\r
-\r
-    /// <summary>\r
-    /// HandBrake Interop Utilities\r
-    /// </summary>\r
-    public static class HandBrakeUtils\r
-    {\r
-        /// <summary>\r
-        /// The callback for log messages from HandBrake.\r
-        /// </summary>\r
-        private static LoggingCallback loggingCallback;\r
-\r
-        /// <summary>\r
-        /// The callback for error messages from HandBrake.\r
-        /// </summary>\r
-        private static LoggingCallback errorCallback;\r
-\r
-        /// <summary>\r
-        /// True if the global initialize function has been called.\r
-        /// </summary>\r
-        private static bool globalInitialized;\r
-\r
-        /// <summary>\r
-        /// Fires when HandBrake has logged a message.\r
-        /// </summary>\r
-        public static event EventHandler<MessageLoggedEventArgs> MessageLogged;\r
-\r
-        /// <summary>\r
-        /// Fires when HandBrake has logged an error.\r
-        /// </summary>\r
-        public static event EventHandler<MessageLoggedEventArgs> ErrorLogged;\r
-\r
-        /// <summary>\r
-        /// Initializes static members of the HandBrakeUtils class.\r
-        /// </summary>\r
-        static HandBrakeUtils()\r
-        {\r
-            if (!globalInitialized)\r
-            {\r
-                if (HBFunctions.hb_global_init() == -1)\r
-                {\r
-                    throw new InvalidOperationException("HB global init failed.");\r
-                }\r
-\r
-                globalInitialized = true;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the HandBrake version string.\r
-        /// </summary>\r
-        public static string Version\r
-        {\r
-            get\r
-            {\r
-                var versionPtr = HBFunctions.hb_get_version(IntPtr.Zero); // Pointer isn't actually used.\r
-                return Marshal.PtrToStringAnsi(versionPtr);\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the HandBrake build number.\r
-        /// </summary>\r
-        public static int Build\r
-        {\r
-            get\r
-            {\r
-                return HBFunctions.hb_get_build(IntPtr.Zero);\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Ensures the HB global initialize method has been called.\r
-        /// </summary>\r
-        public static void EnsureGlobalInit()\r
-        {\r
-            // Does nothing, but invokes static ctor.\r
-        }\r
-\r
-        /// <summary>\r
-        /// Enables or disables LibDVDNav. If disabled libdvdread will be used instead.\r
-        /// </summary>\r
-        /// <param name="enableDvdNav">\r
-        /// True to enable LibDVDNav.\r
-        /// </param>\r
-        public static void SetDvdNav(bool enableDvdNav)\r
-        {\r
-            HBFunctions.hb_dvd_set_dvdnav(enableDvdNav ? 1 : 0);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Call before app shutdown. Performs global cleanup.\r
-        /// </summary>\r
-        public static void DisposeGlobal()\r
-        {\r
-            HBFunctions.hb_global_close();\r
-        }\r
-\r
-        /// <summary>\r
-        /// Register the logger.\r
-        /// </summary>\r
-        public static void RegisterLogger()\r
-        {\r
-            // Register the logger if we have not already\r
-            if (loggingCallback == null)\r
-            {\r
-                // Keep the callback as a member to prevent it from being garbage collected.\r
-                loggingCallback = LoggingHandler;\r
-                errorCallback = ErrorHandler;\r
-                HBFunctions.hb_register_logger(loggingCallback);\r
-                HBFunctions.hb_register_error_handler(errorCallback);\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Handles log messages from HandBrake.\r
-        /// </summary>\r
-        /// <param name="message">\r
-        /// The log message (including newline).\r
-        /// </param>\r
-        public static void LoggingHandler(string message)\r
-        {\r
-            message = message.TrimEnd();\r
-            if (!string.IsNullOrEmpty(message))\r
-            {\r
-                SendMessageEvent(message);\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Handles errors from HandBrake.\r
-        /// </summary>\r
-        /// <param name="message">\r
-        /// The error message.\r
-        /// </param>\r
-        public static void ErrorHandler(string message)\r
-        {\r
-            if (!string.IsNullOrEmpty(message))\r
-            {\r
-                // These errors happen in normal operations. Log them as messages.\r
-                if (message == "dvd: ifoOpen failed" || message.Contains("avformat_seek_file failed") || message.Contains("nav_get_title_list"))\r
-                {\r
-                    SendMessageEvent(message);\r
-                    return;\r
-                }\r
-\r
-                SendErrorEvent(message);\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the standard x264 option name given the starting point.\r
-        /// </summary>\r
-        /// <param name="name">\r
-        /// The name.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The standard x264 option name.\r
-        /// </returns>\r
-        public static string SanitizeX264OptName(string name)\r
-        {\r
-            IntPtr namePtr = Marshal.StringToHGlobalAnsi(name);\r
-            string sanitizedName = Marshal.PtrToStringAnsi(HBFunctions.hb_x264_encopt_name(namePtr));\r
-            Marshal.FreeHGlobal(namePtr);\r
-            return sanitizedName;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Checks to see if the given H.264 level is valid given the inputs.\r
-        /// </summary>\r
-        /// <param name="level">\r
-        /// The level to check.\r
-        /// </param>\r
-        /// <param name="width">\r
-        /// The output picture width.\r
-        /// </param>\r
-        /// <param name="height">\r
-        /// The output picture height.\r
-        /// </param>\r
-        /// <param name="fpsNumerator">\r
-        /// The rate numerator.\r
-        /// </param>\r
-        /// <param name="fpsDenominator">\r
-        /// The rate denominator.\r
-        /// </param>\r
-        /// <param name="interlaced">\r
-        /// True if x264 interlaced output is enabled.\r
-        /// </param>\r
-        /// <param name="fakeInterlaced">\r
-        /// True if x264 fake interlacing is enabled.\r
-        /// </param>\r
-        /// <returns>\r
-        /// True if the level is valid.\r
-        /// </returns>\r
-        public static bool IsH264LevelValid(string level, int width, int height, int fpsNumerator, int fpsDenominator, bool interlaced, bool fakeInterlaced)\r
-        {\r
-            return HBFunctions.hb_check_h264_level(\r
-                level,\r
-                width,\r
-                height,\r
-                fpsNumerator,\r
-                fpsDenominator,\r
-                interlaced ? 1 : 0,\r
-                fakeInterlaced ? 1 : 0) == 0;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Creates an X264 options string from the given settings.\r
-        /// </summary>\r
-        /// <param name="preset">\r
-        /// The x264 preset.\r
-        /// </param>\r
-        /// <param name="tunes">\r
-        /// The x264 tunes being used.\r
-        /// </param>\r
-        /// <param name="extraOptions">\r
-        /// The extra options string.\r
-        /// </param>\r
-        /// <param name="profile">\r
-        /// The H.264 profile.\r
-        /// </param>\r
-        /// <param name="level">\r
-        /// The H.264 level.\r
-        /// </param>\r
-        /// <param name="width">\r
-        /// The width of the final picture.\r
-        /// </param>\r
-        /// <param name="height">\r
-        /// The height of the final picture.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The full x264 options string from the given inputs.\r
-        /// </returns>\r
-        public static string CreateX264OptionsString(\r
-            string preset,\r
-            IList<string> tunes,\r
-            string extraOptions,\r
-            string profile,\r
-            string level,\r
-            int width,\r
-            int height)\r
-        {\r
-            if (width <= 0)\r
-            {\r
-                throw new ArgumentException("width must be positive.");\r
-            }\r
-\r
-            if (height <= 0)\r
-            {\r
-                throw new ArgumentException("height must be positive.");\r
-            }\r
-\r
-            IntPtr ptr = HBFunctions.hb_x264_param_unparse(\r
-                8,\r
-                preset,\r
-                string.Join(",", tunes),\r
-                extraOptions,\r
-                profile,\r
-                level,\r
-                width,\r
-                height); // TODO add bit-depth support.\r
-\r
-            string x264Settings = Marshal.PtrToStringAnsi(ptr);\r
-\r
-            return x264Settings;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the final size and PAR of the video, given anamorphic inputs.\r
-        /// </summary>\r
-        /// <param name="anamorphicGeometry">Anamorphic inputs.</param>\r
-        /// <returns>The final size and PAR of the video.</returns>\r
-        public static Geometry GetAnamorphicSize(AnamorphicGeometry anamorphicGeometry)\r
-        {\r
-            string encode = JsonConvert.SerializeObject(anamorphicGeometry, Formatting.Indented, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore });\r
-            IntPtr json = HBFunctions.hb_set_anamorphic_size_json(Marshal.StringToHGlobalAnsi(encode));\r
-            string result = Marshal.PtrToStringAnsi(json);\r
-            return JsonConvert.DeserializeObject<Geometry>(result);\r
-        }\r
-\r
-        public static void Reduce(long den, long num, out long x, out long y)\r
-        {\r
-            // find the greatest common divisor of num & den by Euclid's algorithm\r
-            long n = num, d = den;\r
-            while (d > 0)\r
-            {\r
-                long t = d;\r
-                d = n % d;\r
-                n = t;\r
-            }\r
-\r
-            // at this point n is the gcd. if it's non-zero remove it from num\r
-            // and den. Otherwise just return the original values.\r
-            if (n > 0)\r
-            {\r
-                num /= n;\r
-                den /= n;\r
-            }\r
-\r
-            x = num;\r
-            y = den;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Sends the message logged event to any registered listeners.\r
-        /// </summary>\r
-        /// <param name="message">\r
-        /// The message to send.\r
-        /// </param>\r
-        public static void SendMessageEvent(string message)\r
-        {\r
-            MessageLogged?.Invoke(null, new MessageLoggedEventArgs(message));\r
-        }\r
-\r
-        /// <summary>\r
-        /// Sends the error logged event to any registered listeners.\r
-        /// </summary>\r
-        /// <param name="message">\r
-        /// The message to send\r
-        /// </param>\r
-        public static void SendErrorEvent(string message)\r
-        {\r
-            ErrorLogged?.Invoke(null, new MessageLoggedEventArgs(message));\r
-        }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="HandBrakeUtils.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 HandBrakeUtils type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop
+{
+    using System;
+    using System.Collections.Generic;
+    using System.Runtime.InteropServices;
+
+    using HandBrake.Interop.Interop.EventArgs;
+    using HandBrake.Interop.Interop.HbLib;
+    using HandBrake.Interop.Interop.Json.Anamorphic;
+    using HandBrake.Interop.Interop.Json.Shared;
+
+    using Newtonsoft.Json;
+
+    /// <summary>
+    /// HandBrake Interop Utilities
+    /// </summary>
+    public static class HandBrakeUtils
+    {
+        /// <summary>
+        /// The callback for log messages from HandBrake.
+        /// </summary>
+        private static LoggingCallback loggingCallback;
+
+        /// <summary>
+        /// The callback for error messages from HandBrake.
+        /// </summary>
+        private static LoggingCallback errorCallback;
+
+        /// <summary>
+        /// True if the global initialize function has been called.
+        /// </summary>
+        private static bool globalInitialized;
+
+        /// <summary>
+        /// Fires when HandBrake has logged a message.
+        /// </summary>
+        public static event EventHandler<MessageLoggedEventArgs> MessageLogged;
+
+        /// <summary>
+        /// Fires when HandBrake has logged an error.
+        /// </summary>
+        public static event EventHandler<MessageLoggedEventArgs> ErrorLogged;
+
+        /// <summary>
+        /// Initializes static members of the HandBrakeUtils class.
+        /// </summary>
+        static HandBrakeUtils()
+        {
+            if (!globalInitialized)
+            {
+                if (HBFunctions.hb_global_init() == -1)
+                {
+                    throw new InvalidOperationException("HB global init failed.");
+                }
+
+                globalInitialized = true;
+            }
+        }
+
+        /// <summary>
+        /// Gets the HandBrake version string.
+        /// </summary>
+        public static string Version
+        {
+            get
+            {
+                var versionPtr = HBFunctions.hb_get_version(IntPtr.Zero); // Pointer isn't actually used.
+                return Marshal.PtrToStringAnsi(versionPtr);
+            }
+        }
+
+        /// <summary>
+        /// Gets the HandBrake build number.
+        /// </summary>
+        public static int Build
+        {
+            get
+            {
+                return HBFunctions.hb_get_build(IntPtr.Zero);
+            }
+        }
+
+        /// <summary>
+        /// Ensures the HB global initialize method has been called.
+        /// </summary>
+        public static void EnsureGlobalInit()
+        {
+            // Does nothing, but invokes static ctor.
+        }
+
+        /// <summary>
+        /// Enables or disables LibDVDNav. If disabled libdvdread will be used instead.
+        /// </summary>
+        /// <param name="enableDvdNav">
+        /// True to enable LibDVDNav.
+        /// </param>
+        public static void SetDvdNav(bool enableDvdNav)
+        {
+            HBFunctions.hb_dvd_set_dvdnav(enableDvdNav ? 1 : 0);
+        }
+
+        /// <summary>
+        /// Call before app shutdown. Performs global cleanup.
+        /// </summary>
+        public static void DisposeGlobal()
+        {
+            HBFunctions.hb_global_close();
+        }
+
+        /// <summary>
+        /// Register the logger.
+        /// </summary>
+        public static void RegisterLogger()
+        {
+            // Register the logger if we have not already
+            if (loggingCallback == null)
+            {
+                // Keep the callback as a member to prevent it from being garbage collected.
+                loggingCallback = LoggingHandler;
+                errorCallback = ErrorHandler;
+                HBFunctions.hb_register_logger(loggingCallback);
+                HBFunctions.hb_register_error_handler(errorCallback);
+            }
+        }
+
+        /// <summary>
+        /// Handles log messages from HandBrake.
+        /// </summary>
+        /// <param name="message">
+        /// The log message (including newline).
+        /// </param>
+        public static void LoggingHandler(string message)
+        {
+            message = message.TrimEnd();
+            if (!string.IsNullOrEmpty(message))
+            {
+                SendMessageEvent(message);
+            }
+        }
+
+        /// <summary>
+        /// Handles errors from HandBrake.
+        /// </summary>
+        /// <param name="message">
+        /// The error message.
+        /// </param>
+        public static void ErrorHandler(string message)
+        {
+            if (!string.IsNullOrEmpty(message))
+            {
+                // These errors happen in normal operations. Log them as messages.
+                if (message == "dvd: ifoOpen failed" || message.Contains("avformat_seek_file failed") || message.Contains("nav_get_title_list"))
+                {
+                    SendMessageEvent(message);
+                    return;
+                }
+
+                SendErrorEvent(message);
+            }
+        }
+
+        /// <summary>
+        /// Gets the standard x264 option name given the starting point.
+        /// </summary>
+        /// <param name="name">
+        /// The name.
+        /// </param>
+        /// <returns>
+        /// The standard x264 option name.
+        /// </returns>
+        public static string SanitizeX264OptName(string name)
+        {
+            IntPtr namePtr = Marshal.StringToHGlobalAnsi(name);
+            string sanitizedName = Marshal.PtrToStringAnsi(HBFunctions.hb_x264_encopt_name(namePtr));
+            Marshal.FreeHGlobal(namePtr);
+            return sanitizedName;
+        }
+
+        /// <summary>
+        /// Checks to see if the given H.264 level is valid given the inputs.
+        /// </summary>
+        /// <param name="level">
+        /// The level to check.
+        /// </param>
+        /// <param name="width">
+        /// The output picture width.
+        /// </param>
+        /// <param name="height">
+        /// The output picture height.
+        /// </param>
+        /// <param name="fpsNumerator">
+        /// The rate numerator.
+        /// </param>
+        /// <param name="fpsDenominator">
+        /// The rate denominator.
+        /// </param>
+        /// <param name="interlaced">
+        /// True if x264 interlaced output is enabled.
+        /// </param>
+        /// <param name="fakeInterlaced">
+        /// True if x264 fake interlacing is enabled.
+        /// </param>
+        /// <returns>
+        /// True if the level is valid.
+        /// </returns>
+        public static bool IsH264LevelValid(string level, int width, int height, int fpsNumerator, int fpsDenominator, bool interlaced, bool fakeInterlaced)
+        {
+            return HBFunctions.hb_check_h264_level(
+                level,
+                width,
+                height,
+                fpsNumerator,
+                fpsDenominator,
+                interlaced ? 1 : 0,
+                fakeInterlaced ? 1 : 0) == 0;
+        }
+
+        /// <summary>
+        /// Creates an X264 options string from the given settings.
+        /// </summary>
+        /// <param name="preset">
+        /// The x264 preset.
+        /// </param>
+        /// <param name="tunes">
+        /// The x264 tunes being used.
+        /// </param>
+        /// <param name="extraOptions">
+        /// The extra options string.
+        /// </param>
+        /// <param name="profile">
+        /// The H.264 profile.
+        /// </param>
+        /// <param name="level">
+        /// The H.264 level.
+        /// </param>
+        /// <param name="width">
+        /// The width of the final picture.
+        /// </param>
+        /// <param name="height">
+        /// The height of the final picture.
+        /// </param>
+        /// <returns>
+        /// The full x264 options string from the given inputs.
+        /// </returns>
+        public static string CreateX264OptionsString(
+            string preset,
+            IList<string> tunes,
+            string extraOptions,
+            string profile,
+            string level,
+            int width,
+            int height)
+        {
+            if (width <= 0)
+            {
+                throw new ArgumentException("width must be positive.");
+            }
+
+            if (height <= 0)
+            {
+                throw new ArgumentException("height must be positive.");
+            }
+
+            IntPtr ptr = HBFunctions.hb_x264_param_unparse(
+                8,
+                preset,
+                string.Join(",", tunes),
+                extraOptions,
+                profile,
+                level,
+                width,
+                height); // TODO add bit-depth support.
+
+            string x264Settings = Marshal.PtrToStringAnsi(ptr);
+
+            return x264Settings;
+        }
+
+        /// <summary>
+        /// Gets the final size and PAR of the video, given anamorphic inputs.
+        /// </summary>
+        /// <param name="anamorphicGeometry">Anamorphic inputs.</param>
+        /// <returns>The final size and PAR of the video.</returns>
+        public static Geometry GetAnamorphicSize(AnamorphicGeometry anamorphicGeometry)
+        {
+            string encode = JsonConvert.SerializeObject(anamorphicGeometry, Formatting.Indented, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore });
+            IntPtr json = HBFunctions.hb_set_anamorphic_size_json(Marshal.StringToHGlobalAnsi(encode));
+            string result = Marshal.PtrToStringAnsi(json);
+            return JsonConvert.DeserializeObject<Geometry>(result);
+        }
+
+        public static void Reduce(long den, long num, out long x, out long y)
+        {
+            // find the greatest common divisor of num & den by Euclid's algorithm
+            long n = num, d = den;
+            while (d > 0)
+            {
+                long t = d;
+                d = n % d;
+                n = t;
+            }
+
+            // at this point n is the gcd. if it's non-zero remove it from num
+            // and den. Otherwise just return the original values.
+            if (n > 0)
+            {
+                num /= n;
+                den /= n;
+            }
+
+            x = num;
+            y = den;
+        }
+
+        /// <summary>
+        /// Sends the message logged event to any registered listeners.
+        /// </summary>
+        /// <param name="message">
+        /// The message to send.
+        /// </param>
+        public static void SendMessageEvent(string message)
+        {
+            MessageLogged?.Invoke(null, new MessageLoggedEventArgs(message));
+        }
+
+        /// <summary>
+        /// Sends the error logged event to any registered listeners.
+        /// </summary>
+        /// <param name="message">
+        /// The message to send
+        /// </param>
+        public static void SendErrorEvent(string message)
+        {
+            ErrorLogged?.Invoke(null, new MessageLoggedEventArgs(message));
+        }
+    }
+}
similarity index 91%
rename from win/CS/HandBrake.ApplicationServices/Interop/HbLib/HBDelegates.cs
rename to win/CS/HandBrake.Interop/Interop/HbLib/HBDelegates.cs
index 3dff02a9d45c0cc4189207f2de43745d82247384..33d3f0bca9ae97f168c4a7ad8aa65ff28fe612e1 100644 (file)
@@ -1,17 +1,17 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="HBDelegates.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Contains delegates for HandBrake interop.\r
-// </summary>\r
-// <auto-generated> Disable Stylecop Warnings for this file  </auto-generated>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.HbLib\r
-{\r
-    using System.Runtime.InteropServices;\r
-\r
-    [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
-    public delegate void LoggingCallback(string message);\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="HBDelegates.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 delegates for HandBrake interop.
+// </summary>
+// <auto-generated> Disable Stylecop Warnings for this file  </auto-generated>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.HbLib
+{
+    using System.Runtime.InteropServices;
+
+    [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+    public delegate void LoggingCallback(string message);
+}
similarity index 98%
rename from win/CS/HandBrake.ApplicationServices/Interop/HbLib/HbFunctions.cs
rename to win/CS/HandBrake.Interop/Interop/HbLib/HbFunctions.cs
index 63eac34684c37375550cfc67385d80c7ffd8838f..c55c8a927d2ab79326bafe5a0d9eb12f696951e1 100644 (file)
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="HBFunctions.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the HBFunctions type.\r
-// </summary>\r
-// <auto-generated> Disable Stylecop Warnings for this file  </auto-generated>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.HbLib\r
-{\r
-    using System;\r
-    using System.Runtime.InteropServices;\r
-\r
-    /// <summary>\r
-    /// Contains p-invoke function declarations to hblib.\r
-    /// </summary>\r
-    public static class HBFunctions\r
-    {\r
-        [DllImport("hb", EntryPoint = "hb_register_logger", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_register_logger(LoggingCallback callback);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_register_error_handler", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_register_error_handler(LoggingCallback callback);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_global_init", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_global_init();\r
-\r
-        /// Return Type: hb_handle_t*\r
-        ///verbose: int\r
-        ///update_check: int\r
-        [DllImport("hb", EntryPoint = "hb_init", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_init(int verbose, int update_check);\r
-\r
-\r
-        /// Return Type: hb_handle_t*\r
-        ///verbose: int\r
-        ///update_check: int\r
-        [DllImport("hb", EntryPoint = "hb_init_dl", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_init_dl(int verbose, int update_check);\r
-\r
-\r
-        /// Return Type: char*\r
-        ///param0: hb_handle_t*\r
-        [DllImport("hb", EntryPoint = "hb_get_version", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_get_version(IntPtr hbHandle);\r
-\r
-\r
-        /// Return Type: int\r
-        ///param0: hb_handle_t*\r
-        [DllImport("hb", EntryPoint = "hb_get_build", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_get_build(IntPtr hbHandle);\r
-\r
-\r
-        /// Return Type: int\r
-        ///h: hb_handle_t*\r
-        ///version: char**\r
-        [DllImport("hb", EntryPoint = "hb_check_update", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_check_update(IntPtr handle, ref IntPtr version);\r
-\r
-\r
-        /// Return Type: char*\r
-        ///path: char*\r
-        [DllImport("hb", EntryPoint = "hb_dvd_name", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_dvd_name(IntPtr path);\r
-\r
-\r
-        /// Return Type: void\r
-        ///enable: int\r
-        [DllImport("hb", EntryPoint = "hb_dvd_set_dvdnav", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_dvd_set_dvdnav(int enable);\r
-\r
-        /// Return Type: void\r
-        ///param0: hb_handle_t*\r
-        ///path: char*\r
-        ///title_index: int\r
-        ///preview_count: int\r
-        ///store_previews: int\r
-        [DllImport("hb", EntryPoint = "hb_scan", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_scan(IntPtr hbHandle, IntPtr path, int title_index, int preview_count, int store_previews, ulong min_duration);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_scan_stop", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_scan_stop(IntPtr hbHandle);\r
-\r
-        /// Return Type: hb_list_t*\r
-        ///param0: hb_handle_t*\r
-        [DllImport("hb", EntryPoint = "hb_get_titles", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_get_titles(IntPtr hbHandle);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_set_anamorphic_size2", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_set_anamorphic_size2(ref hb_geometry_s sourceGeometry, ref hb_geometry_settings_s uiGeometry, ref hb_geometry_s result);\r
-        \r
-\r
-        /// Return Type: int\r
-        ///param0: hb_handle_t*\r
-        [DllImport("hb", EntryPoint = "hb_count", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_count(IntPtr hbHandle);\r
-\r
-\r
-        /// Return Type: hb_job_t*\r
-        ///param0: hb_handle_t*\r
-        ///param1: int\r
-        [DllImport("hb", EntryPoint = "hb_job", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_job(IntPtr hbHandle, int jobIndex);\r
-\r
-        /// Return Type: void\r
-        ///param0: hb_handle_t*\r
-        ///param1: hb_job_t*\r
-        [DllImport("hb", EntryPoint = "hb_rem", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_rem(IntPtr hbHandle, IntPtr job);\r
-\r
-\r
-        /// Return Type: void\r
-        ///param0: hb_handle_t*\r
-        [DllImport("hb", EntryPoint = "hb_start", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_start(IntPtr hbHandle);\r
-\r
-\r
-        /// Return Type: void\r
-        ///param0: hb_handle_t*\r
-        [DllImport("hb", EntryPoint = "hb_pause", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_pause(IntPtr hbHandle);\r
-\r
-\r
-        /// Return Type: void\r
-        ///param0: hb_handle_t*\r
-        [DllImport("hb", EntryPoint = "hb_resume", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_resume(IntPtr hbHandle);\r
-\r
-\r
-        /// Return Type: void\r
-        ///param0: hb_handle_t*\r
-        [DllImport("hb", EntryPoint = "hb_stop", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_stop(IntPtr hbHandle);\r
-\r
-\r
-        /// Return Type: void\r
-        ///param0: hb_handle_t**\r
-        [DllImport("hb", EntryPoint = "hb_close", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_close(IntPtr hbHandle);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_global_close", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_global_close();\r
-\r
-        //hb_list_t * hb_list_init();\r
-        [DllImport("hb", EntryPoint = "hb_list_init", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_list_init();\r
-\r
-        //int         hb_list_count( const hb_list_t * );\r
-        [DllImport("hb", EntryPoint = "hb_list_count", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_list_count(IntPtr listPtr);\r
-\r
-        //void        hb_list_add( hb_list_t *, void * );\r
-        [DllImport("hb", EntryPoint = "hb_list_add", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_list_add(IntPtr listPtr, IntPtr item);\r
-\r
-        //void        hb_list_insert( hb_list_t * l, int pos, void * p );\r
-        [DllImport("hb", EntryPoint = "hb_list_insert", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_list_insert(IntPtr listPtr, int pos, IntPtr item);\r
-\r
-        //void        hb_list_rem( hb_list_t *, void * );\r
-        [DllImport("hb", EntryPoint = "hb_list_rem", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_list_rem(IntPtr listPtr, IntPtr item);\r
-\r
-        //void      * hb_list_item( const hb_list_t *, int );\r
-        [DllImport("hb", EntryPoint = "hb_list_item", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_list_item(IntPtr listPtr, int itemIndex);\r
-\r
-        //void        hb_list_close( hb_list_t ** );\r
-        [DllImport("hb", EntryPoint = "hb_list_close", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_list_close(IntPtr listPtrPtr);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_subtitle_can_force", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_subtitle_can_force(int source);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_subtitle_can_burn", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_subtitle_can_burn(int source);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_subtitle_can_pass", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_subtitle_can_pass(int source, int mux);\r
-\r
-\r
-        // int hb_video_framerate_get_from_name(const char *name)\r
-        [DllImport("hb", EntryPoint = "hb_video_framerate_get_from_name", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_video_framerate_get_from_name(IntPtr name);\r
-\r
-//const char*      hb_video_framerate_get_name(int framerate);\r
-//const char*      hb_video_framerate_sanitize_name(const char *name);\r
-\r
-        // returns hb_rate_s\r
-        [DllImport("hb", EntryPoint = "hb_video_framerate_get_next", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_video_framerate_get_next(IntPtr last);\r
-\r
-\r
-//int              hb_audio_samplerate_get_best(uint32_t codec, int samplerate, int *sr_shift);\r
-//int              hb_audio_samplerate_get_from_name(const char *name);\r
-//const char*      hb_audio_samplerate_get_name(int samplerate);\r
-\r
-        // returns hb_rate_s\r
-        [DllImport("hb", EntryPoint = "hb_audio_samplerate_get_next", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_audio_samplerate_get_next(IntPtr last);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_audio_samplerate_find_closest", CallingConvention = CallingConvention.Cdecl)]\r
-           public static extern int hb_audio_samplerate_find_closest(int samplerate, uint codec);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_audio_bitrate_get_best", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_audio_bitrate_get_best(uint codec, int bitrate, int samplerate, int mixdown);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_audio_bitrate_get_default", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_audio_bitrate_get_default(uint codec, int samplerate, int mixdown);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_audio_bitrate_get_limits", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_audio_bitrate_get_limits(uint codec, int samplerate, int mixdown, ref int low, ref int high);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_audio_bitrate_get_next", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_audio_bitrate_get_next(IntPtr last);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_video_quality_get_limits", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_video_quality_get_limits(uint codec, ref float low, ref float high, ref float granularity, ref int direction);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_video_quality_get_name", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_video_quality_get_name(uint codec);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_audio_quality_get_limits", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_audio_quality_get_limits(uint codec, ref float low, ref float high, ref float granularity, ref int direction);\r
-\r
-//float hb_audio_quality_get_best(uint32_t codec, float quality);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_audio_quality_get_default", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern float hb_audio_quality_get_default(uint codec);\r
-\r
-\r
-        [DllImport("hb", EntryPoint = "hb_audio_compression_get_limits", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_audio_compression_get_limits(uint codec, ref float low, ref float high, ref float granularity, ref int direction);\r
-\r
-//float hb_audio_compression_get_best(uint32_t codec, float compression);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_audio_compression_get_default", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern float hb_audio_compression_get_default(uint codec);\r
-\r
-\r
-//int                hb_audio_dither_get_default();\r
-//int                hb_audio_dither_get_default_method(); // default method, if enabled && supported\r
-//int                hb_audio_dither_is_supported(uint32_t codec);\r
-//int                hb_audio_dither_get_from_name(const char *name);\r
-//const char*        hb_audio_dither_get_description(int method);\r
-//const hb_dither_t* hb_audio_dither_get_next(const hb_dither_t *last);\r
-\r
-        // hb_audio_can_apply_drc2(hb_handle_t *h, int title_idx, int audio_idx, int encoder)\r
-        [DllImport("hb", EntryPoint = "hb_audio_can_apply_drc2", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_audio_can_apply_drc2(IntPtr handle, int title_index, int audio_index, int encoder);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_mixdown_is_supported", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_mixdown_is_supported(int mixdown, uint codec, ulong layout);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_mixdown_has_codec_support", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_mixdown_has_codec_support(int mixdown, uint codec);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_mixdown_has_remix_support", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_mixdown_has_remix_support(int mixdown, ulong layout);\r
-\r
-//int                 hb_mixdown_get_discrete_channel_count(int mixdown);\r
-//int                 hb_mixdown_get_low_freq_channel_count(int mixdown);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_mixdown_get_best", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_mixdown_get_best(uint codec, ulong layout, int mixdown);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_mixdown_get_default", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_mixdown_get_default(uint codec, ulong layout);\r
-\r
-//int                 hb_mixdown_get_from_name(const char *name);\r
-//const char*         hb_mixdown_get_name(int mixdown);\r
-//const char*         hb_mixdown_get_short_name(int mixdown);\r
-//const char*         hb_mixdown_sanitize_name(const char *name);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_mixdown_get_next", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_mixdown_get_next(IntPtr last);\r
-\r
-//int                 hb_video_encoder_get_default(int muxer);\r
-//int                 hb_video_encoder_get_from_name(const char *name);\r
-//const char*         hb_video_encoder_get_name(int encoder);\r
-//const char*         hb_video_encoder_get_short_name(int encoder);\r
-//const char*         hb_video_encoder_get_long_name(int encoder);\r
-//const char*         hb_video_encoder_sanitize_name(const char *name);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_video_encoder_get_next", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_video_encoder_get_next(IntPtr last);\r
-\r
-/*\r
- * hb_audio_encoder_get_fallback_for_passthru() will sanitize a passthru codec\r
- * to the matching audio encoder (if any is available).\r
- *\r
- * hb_audio_encoder_get_from_name(), hb_audio_encoder_sanitize_name() will\r
- * sanitize legacy encoder names, but won't convert passthru to an encoder.\r
- */\r
-//int                 hb_audio_encoder_get_fallback_for_passthru(int passthru);\r
-//int                 hb_audio_encoder_get_default(int muxer);\r
-//int                 hb_audio_encoder_get_from_name(const char *name);\r
-//const char*         hb_audio_encoder_get_name(int encoder);\r
-//const char*         hb_audio_encoder_get_short_name(int encoder);\r
-//const char*         hb_audio_encoder_get_long_name(int encoder);\r
-//const char*         hb_audio_encoder_sanitize_name(const char *name);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_audio_encoder_get_next", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_audio_encoder_get_next(IntPtr last);\r
-\r
-//int                   hb_container_get_from_name(const char *name);\r
-//int                   hb_container_get_from_extension(const char *extension); // not really a container name\r
-//const char*           hb_container_get_name(int format);\r
-//const char*           hb_container_get_short_name(int format);\r
-//const char*           hb_container_get_long_name(int format);\r
-//const char*           hb_container_get_default_extension(int format);\r
-//const char*           hb_container_sanitize_name(const char *name);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_container_get_from_name", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_container_get_from_name([In] [MarshalAs(UnmanagedType.LPStr)] string name);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_container_get_next", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_container_get_next(IntPtr last);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_video_encoder_get_presets", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_video_encoder_get_presets(int encoder);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_video_encoder_get_tunes", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_video_encoder_get_tunes(int encoder);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_video_encoder_get_profiles", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_video_encoder_get_profiles(int encoder);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_video_encoder_get_levels", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_video_encoder_get_levels(int encoder);\r
-\r
-\r
-        [DllImport("hb", EntryPoint = "lang_get_next", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr lang_get_next(IntPtr last);\r
-\r
-        [DllImport("hb", EntryPoint = "lang_for_code2", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr lang_for_code2([In] [MarshalAs(UnmanagedType.LPStr)] string code2);\r
-\r
-\r
-        ///hb_title_set_t  * hb_get_title_set( hb_handle_t * );\r
-        [DllImport("hb", EntryPoint = "hb_get_title_set", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_get_title_set(IntPtr hbHandle);\r
-\r
-        ///hb_job_t * hb_job_init_by_index( hb_handle_t *h, int title_index );\r
-        [DllImport("hb", EntryPoint = "hb_job_init_by_index", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_job_init_by_index(IntPtr hbHandle, int title_index);\r
-\r
-        ///void hb_job_close( hb_job_t ** job );\r
-        [DllImport("hb", EntryPoint = "hb_job_close", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_job_close(IntPtr job);\r
-\r
-        ///void hb_chapter_set_title(hb_chapter_t *chapter, const char *title);\r
-        [DllImport("hb", EntryPoint = "hb_chapter_set_title", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_chapter_set_title(IntPtr chapter, [In] [MarshalAs(UnmanagedType.LPStr)] string title);\r
-\r
-        ///void hb_chapter_set_title(hb_chapter_t *chapter, const char *title);\r
-        [DllImport("hb", EntryPoint = "hb_chapter_set_title", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_chapter_set_title__ptr(IntPtr chapter, IntPtr title);\r
-\r
-        /// hb_filter_object_t * hb_filter_init( int filter_id );\r
-        [DllImport("hb", EntryPoint = "hb_filter_init", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_filter_init(int filter_id);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_generate_filter_settings_json", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_generate_filter_settings_json(\r
-            int filter_id,\r
-            [In] [MarshalAs(UnmanagedType.LPStr)] string preset,\r
-            [In] [MarshalAs(UnmanagedType.LPStr)] string tune,\r
-            [In] [MarshalAs(UnmanagedType.LPStr)] string custom);\r
-\r
-        /// char* hb_filter_get_presets_json(int filter_id);\r
-        [DllImport("hb", EntryPoint = "hb_filter_get_presets_json", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_filter_get_presets_json(int filter_id);\r
-\r
-        /// char* hb_filter_get_tuness_json(int filter_id);\r
-        [DllImport("hb", EntryPoint = "hb_filter_get_tunes_json", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_filter_get_tunes_json(int filter_id);\r
-\r
-        // char ** hb_filter_get_keys(int filter_id);\r
-        [DllImport("hb", EntryPoint = "hb_filter_get_keys", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_filter_get_keys(int filter_id);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_x264_encopt_name", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_x264_encopt_name(IntPtr name);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_check_h264_level", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_check_h264_level([In] [MarshalAs(UnmanagedType.LPStr)] string level, int width, int height, int fps_num, int fps_den, int interlaced, int fake_interlaced);\r
-\r
-        [DllImport("hb", EntryPoint = "hb_x264_param_unparse", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_x264_param_unparse(\r
-            int bit_depth,\r
-            [In] [MarshalAs(UnmanagedType.LPStr)] string x264_preset,\r
-            [In] [MarshalAs(UnmanagedType.LPStr)] string x264_tune,\r
-            [In] [MarshalAs(UnmanagedType.LPStr)] string x264_encopts,\r
-            [In] [MarshalAs(UnmanagedType.LPStr)] string x264_profile,\r
-            [In] [MarshalAs(UnmanagedType.LPStr)] string h264_level,\r
-            int width,\r
-            int height);\r
-\r
-\r
-        [DllImport("hb", EntryPoint = "hb_get_opencl_env", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_get_opencl_env();\r
-\r
-        [DllImport("hb", EntryPoint = "hb_qsv_available", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_qsv_available();\r
-        \r
-        [DllImport("hb", EntryPoint = "hb_qsv_info_init", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_qsv_info_init();\r
-\r
-        // hb_image_t* hb_get_preview2(hb_handle_t* h, int title_idx, int picture, hb_geometry_settings_t* geo, int deinterlace);\r
-        [DllImport("hb", EntryPoint = "hb_get_preview2", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_get_preview2(IntPtr hbHandle, int title_idx, int preview_idx,  ref hb_geometry_settings_s geo, int deinterlace);\r
-\r
-        // void hb_image_close(hb_image_t **_image);\r
-        [DllImport("hb", EntryPoint = "hb_image_close", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_image_close(IntPtr image);\r
-\r
-        /* JSON API */\r
-\r
-        // char     * hb_get_title_set_json(hb_handle_t * h);\r
-        [DllImport("hb", EntryPoint = "hb_get_title_set_json", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_get_title_set_json(IntPtr hbHandle);\r
-\r
-        // char     * hb_job_init_json(hb_handle_t *h, int title_index);\r
-        [DllImport("hb", EntryPoint = "hb_job_init_json", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_job_init_json(IntPtr hbHandle, int title_index);\r
-\r
-        // hb_job_t * hb_json_to_job(hb_handle_t * h, const char * json_job);\r
-        [DllImport("hb", EntryPoint = "hb_json_to_job", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_json_to_job(IntPtr hbHandle, IntPtr json_job);\r
-\r
-        // int           hb_add_json( hb_handle_t *, const char * ) \r
-        [DllImport("hb", EntryPoint = "hb_add_json", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern int hb_add_json(IntPtr hbHandle, IntPtr json_job);\r
-\r
-        //char     * hb_set_anamorphic_size_json(const char * json_param);\r
-        [DllImport("hb", EntryPoint = "hb_set_anamorphic_size_json", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_set_anamorphic_size_json(IntPtr json_param);\r
-\r
-        // char     * hb_get_state_json(hb_handle_t * h);\r
-        [DllImport("hb", EntryPoint = "hb_get_state_json", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_get_state_json(IntPtr hbHandle);\r
-\r
-        // char* hb_get_preview_params_json(int title_idx, int preview_idx, int deinterlace, hb_geometry_settings_t *settings)\r
-        [DllImport("hb", EntryPoint = "hb_get_preview_params_json", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_get_preview_params_json(int title_idx, int preview_idx, int deinterlace, ref hb_geometry_settings_s settings);\r
-        \r
-        //void         hb_presets_builtin_init(void);\r
-        [DllImport("hb", EntryPoint = "hb_presets_builtin_init", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern void hb_presets_builtin_init();\r
-\r
-        // char       * hb_presets_builtin_get_json(void); // Get list of HandBrake builtin presets as json string\r
-        [DllImport("hb", EntryPoint = "hb_presets_builtin_get_json", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_presets_builtin_get_json();\r
-\r
-        //     char       * hb_presets_read_file_json(const char *filename);\r
-        [DllImport("hb", EntryPoint = "hb_presets_read_file_json", CallingConvention = CallingConvention.Cdecl)]\r
-        public static extern IntPtr hb_presets_read_file_json(IntPtr filename);\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="HBFunctions.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 HBFunctions type.
+// </summary>
+// <auto-generated> Disable Stylecop Warnings for this file  </auto-generated>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.HbLib
+{
+    using System;
+    using System.Runtime.InteropServices;
+
+    /// <summary>
+    /// Contains p-invoke function declarations to hblib.
+    /// </summary>
+    public static class HBFunctions
+    {
+        [DllImport("hb", EntryPoint = "hb_register_logger", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_register_logger(LoggingCallback callback);
+
+        [DllImport("hb", EntryPoint = "hb_register_error_handler", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_register_error_handler(LoggingCallback callback);
+
+        [DllImport("hb", EntryPoint = "hb_global_init", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_global_init();
+
+        /// Return Type: hb_handle_t*
+        ///verbose: int
+        ///update_check: int
+        [DllImport("hb", EntryPoint = "hb_init", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_init(int verbose, int update_check);
+
+
+        /// Return Type: hb_handle_t*
+        ///verbose: int
+        ///update_check: int
+        [DllImport("hb", EntryPoint = "hb_init_dl", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_init_dl(int verbose, int update_check);
+
+
+        /// Return Type: char*
+        ///param0: hb_handle_t*
+        [DllImport("hb", EntryPoint = "hb_get_version", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_get_version(IntPtr hbHandle);
+
+
+        /// Return Type: int
+        ///param0: hb_handle_t*
+        [DllImport("hb", EntryPoint = "hb_get_build", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_get_build(IntPtr hbHandle);
+
+
+        /// Return Type: int
+        ///h: hb_handle_t*
+        ///version: char**
+        [DllImport("hb", EntryPoint = "hb_check_update", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_check_update(IntPtr handle, ref IntPtr version);
+
+
+        /// Return Type: char*
+        ///path: char*
+        [DllImport("hb", EntryPoint = "hb_dvd_name", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_dvd_name(IntPtr path);
+
+
+        /// Return Type: void
+        ///enable: int
+        [DllImport("hb", EntryPoint = "hb_dvd_set_dvdnav", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_dvd_set_dvdnav(int enable);
+
+        /// Return Type: void
+        ///param0: hb_handle_t*
+        ///path: char*
+        ///title_index: int
+        ///preview_count: int
+        ///store_previews: int
+        [DllImport("hb", EntryPoint = "hb_scan", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_scan(IntPtr hbHandle, IntPtr path, int title_index, int preview_count, int store_previews, ulong min_duration);
+
+        [DllImport("hb", EntryPoint = "hb_scan_stop", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_scan_stop(IntPtr hbHandle);
+
+        /// Return Type: hb_list_t*
+        ///param0: hb_handle_t*
+        [DllImport("hb", EntryPoint = "hb_get_titles", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_get_titles(IntPtr hbHandle);
+
+        [DllImport("hb", EntryPoint = "hb_set_anamorphic_size2", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_set_anamorphic_size2(ref hb_geometry_s sourceGeometry, ref hb_geometry_settings_s uiGeometry, ref hb_geometry_s result);
+        
+
+        /// Return Type: int
+        ///param0: hb_handle_t*
+        [DllImport("hb", EntryPoint = "hb_count", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_count(IntPtr hbHandle);
+
+
+        /// Return Type: hb_job_t*
+        ///param0: hb_handle_t*
+        ///param1: int
+        [DllImport("hb", EntryPoint = "hb_job", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_job(IntPtr hbHandle, int jobIndex);
+
+        /// Return Type: void
+        ///param0: hb_handle_t*
+        ///param1: hb_job_t*
+        [DllImport("hb", EntryPoint = "hb_rem", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_rem(IntPtr hbHandle, IntPtr job);
+
+
+        /// Return Type: void
+        ///param0: hb_handle_t*
+        [DllImport("hb", EntryPoint = "hb_start", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_start(IntPtr hbHandle);
+
+
+        /// Return Type: void
+        ///param0: hb_handle_t*
+        [DllImport("hb", EntryPoint = "hb_pause", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_pause(IntPtr hbHandle);
+
+
+        /// Return Type: void
+        ///param0: hb_handle_t*
+        [DllImport("hb", EntryPoint = "hb_resume", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_resume(IntPtr hbHandle);
+
+
+        /// Return Type: void
+        ///param0: hb_handle_t*
+        [DllImport("hb", EntryPoint = "hb_stop", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_stop(IntPtr hbHandle);
+
+
+        /// Return Type: void
+        ///param0: hb_handle_t**
+        [DllImport("hb", EntryPoint = "hb_close", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_close(IntPtr hbHandle);
+
+        [DllImport("hb", EntryPoint = "hb_global_close", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_global_close();
+
+        //hb_list_t * hb_list_init();
+        [DllImport("hb", EntryPoint = "hb_list_init", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_list_init();
+
+        //int         hb_list_count( const hb_list_t * );
+        [DllImport("hb", EntryPoint = "hb_list_count", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_list_count(IntPtr listPtr);
+
+        //void        hb_list_add( hb_list_t *, void * );
+        [DllImport("hb", EntryPoint = "hb_list_add", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_list_add(IntPtr listPtr, IntPtr item);
+
+        //void        hb_list_insert( hb_list_t * l, int pos, void * p );
+        [DllImport("hb", EntryPoint = "hb_list_insert", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_list_insert(IntPtr listPtr, int pos, IntPtr item);
+
+        //void        hb_list_rem( hb_list_t *, void * );
+        [DllImport("hb", EntryPoint = "hb_list_rem", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_list_rem(IntPtr listPtr, IntPtr item);
+
+        //void      * hb_list_item( const hb_list_t *, int );
+        [DllImport("hb", EntryPoint = "hb_list_item", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_list_item(IntPtr listPtr, int itemIndex);
+
+        //void        hb_list_close( hb_list_t ** );
+        [DllImport("hb", EntryPoint = "hb_list_close", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_list_close(IntPtr listPtrPtr);
+
+        [DllImport("hb", EntryPoint = "hb_subtitle_can_force", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_subtitle_can_force(int source);
+
+        [DllImport("hb", EntryPoint = "hb_subtitle_can_burn", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_subtitle_can_burn(int source);
+
+        [DllImport("hb", EntryPoint = "hb_subtitle_can_pass", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_subtitle_can_pass(int source, int mux);
+
+
+        // int hb_video_framerate_get_from_name(const char *name)
+        [DllImport("hb", EntryPoint = "hb_video_framerate_get_from_name", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_video_framerate_get_from_name(IntPtr name);
+
+//const char*      hb_video_framerate_get_name(int framerate);
+//const char*      hb_video_framerate_sanitize_name(const char *name);
+
+        // returns hb_rate_s
+        [DllImport("hb", EntryPoint = "hb_video_framerate_get_next", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_video_framerate_get_next(IntPtr last);
+
+
+//int              hb_audio_samplerate_get_best(uint32_t codec, int samplerate, int *sr_shift);
+//int              hb_audio_samplerate_get_from_name(const char *name);
+//const char*      hb_audio_samplerate_get_name(int samplerate);
+
+        // returns hb_rate_s
+        [DllImport("hb", EntryPoint = "hb_audio_samplerate_get_next", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_audio_samplerate_get_next(IntPtr last);
+
+        [DllImport("hb", EntryPoint = "hb_audio_samplerate_find_closest", CallingConvention = CallingConvention.Cdecl)]
+           public static extern int hb_audio_samplerate_find_closest(int samplerate, uint codec);
+
+        [DllImport("hb", EntryPoint = "hb_audio_bitrate_get_best", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_audio_bitrate_get_best(uint codec, int bitrate, int samplerate, int mixdown);
+
+        [DllImport("hb", EntryPoint = "hb_audio_bitrate_get_default", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_audio_bitrate_get_default(uint codec, int samplerate, int mixdown);
+
+        [DllImport("hb", EntryPoint = "hb_audio_bitrate_get_limits", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_audio_bitrate_get_limits(uint codec, int samplerate, int mixdown, ref int low, ref int high);
+
+        [DllImport("hb", EntryPoint = "hb_audio_bitrate_get_next", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_audio_bitrate_get_next(IntPtr last);
+
+        [DllImport("hb", EntryPoint = "hb_video_quality_get_limits", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_video_quality_get_limits(uint codec, ref float low, ref float high, ref float granularity, ref int direction);
+
+        [DllImport("hb", EntryPoint = "hb_video_quality_get_name", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_video_quality_get_name(uint codec);
+
+        [DllImport("hb", EntryPoint = "hb_audio_quality_get_limits", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_audio_quality_get_limits(uint codec, ref float low, ref float high, ref float granularity, ref int direction);
+
+//float hb_audio_quality_get_best(uint32_t codec, float quality);
+
+        [DllImport("hb", EntryPoint = "hb_audio_quality_get_default", CallingConvention = CallingConvention.Cdecl)]
+        public static extern float hb_audio_quality_get_default(uint codec);
+
+
+        [DllImport("hb", EntryPoint = "hb_audio_compression_get_limits", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_audio_compression_get_limits(uint codec, ref float low, ref float high, ref float granularity, ref int direction);
+
+//float hb_audio_compression_get_best(uint32_t codec, float compression);
+
+        [DllImport("hb", EntryPoint = "hb_audio_compression_get_default", CallingConvention = CallingConvention.Cdecl)]
+        public static extern float hb_audio_compression_get_default(uint codec);
+
+
+//int                hb_audio_dither_get_default();
+//int                hb_audio_dither_get_default_method(); // default method, if enabled && supported
+//int                hb_audio_dither_is_supported(uint32_t codec);
+//int                hb_audio_dither_get_from_name(const char *name);
+//const char*        hb_audio_dither_get_description(int method);
+//const hb_dither_t* hb_audio_dither_get_next(const hb_dither_t *last);
+
+        // hb_audio_can_apply_drc2(hb_handle_t *h, int title_idx, int audio_idx, int encoder)
+        [DllImport("hb", EntryPoint = "hb_audio_can_apply_drc2", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_audio_can_apply_drc2(IntPtr handle, int title_index, int audio_index, int encoder);
+
+        [DllImport("hb", EntryPoint = "hb_mixdown_is_supported", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_mixdown_is_supported(int mixdown, uint codec, ulong layout);
+
+        [DllImport("hb", EntryPoint = "hb_mixdown_has_codec_support", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_mixdown_has_codec_support(int mixdown, uint codec);
+
+        [DllImport("hb", EntryPoint = "hb_mixdown_has_remix_support", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_mixdown_has_remix_support(int mixdown, ulong layout);
+
+//int                 hb_mixdown_get_discrete_channel_count(int mixdown);
+//int                 hb_mixdown_get_low_freq_channel_count(int mixdown);
+
+        [DllImport("hb", EntryPoint = "hb_mixdown_get_best", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_mixdown_get_best(uint codec, ulong layout, int mixdown);
+
+        [DllImport("hb", EntryPoint = "hb_mixdown_get_default", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_mixdown_get_default(uint codec, ulong layout);
+
+//int                 hb_mixdown_get_from_name(const char *name);
+//const char*         hb_mixdown_get_name(int mixdown);
+//const char*         hb_mixdown_get_short_name(int mixdown);
+//const char*         hb_mixdown_sanitize_name(const char *name);
+
+        [DllImport("hb", EntryPoint = "hb_mixdown_get_next", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_mixdown_get_next(IntPtr last);
+
+//int                 hb_video_encoder_get_default(int muxer);
+//int                 hb_video_encoder_get_from_name(const char *name);
+//const char*         hb_video_encoder_get_name(int encoder);
+//const char*         hb_video_encoder_get_short_name(int encoder);
+//const char*         hb_video_encoder_get_long_name(int encoder);
+//const char*         hb_video_encoder_sanitize_name(const char *name);
+
+        [DllImport("hb", EntryPoint = "hb_video_encoder_get_next", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_video_encoder_get_next(IntPtr last);
+
+/*
+ * hb_audio_encoder_get_fallback_for_passthru() will sanitize a passthru codec
+ * to the matching audio encoder (if any is available).
+ *
+ * hb_audio_encoder_get_from_name(), hb_audio_encoder_sanitize_name() will
+ * sanitize legacy encoder names, but won't convert passthru to an encoder.
+ */
+//int                 hb_audio_encoder_get_fallback_for_passthru(int passthru);
+//int                 hb_audio_encoder_get_default(int muxer);
+//int                 hb_audio_encoder_get_from_name(const char *name);
+//const char*         hb_audio_encoder_get_name(int encoder);
+//const char*         hb_audio_encoder_get_short_name(int encoder);
+//const char*         hb_audio_encoder_get_long_name(int encoder);
+//const char*         hb_audio_encoder_sanitize_name(const char *name);
+
+        [DllImport("hb", EntryPoint = "hb_audio_encoder_get_next", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_audio_encoder_get_next(IntPtr last);
+
+//int                   hb_container_get_from_name(const char *name);
+//int                   hb_container_get_from_extension(const char *extension); // not really a container name
+//const char*           hb_container_get_name(int format);
+//const char*           hb_container_get_short_name(int format);
+//const char*           hb_container_get_long_name(int format);
+//const char*           hb_container_get_default_extension(int format);
+//const char*           hb_container_sanitize_name(const char *name);
+
+        [DllImport("hb", EntryPoint = "hb_container_get_from_name", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_container_get_from_name([In] [MarshalAs(UnmanagedType.LPStr)] string name);
+
+        [DllImport("hb", EntryPoint = "hb_container_get_next", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_container_get_next(IntPtr last);
+
+        [DllImport("hb", EntryPoint = "hb_video_encoder_get_presets", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_video_encoder_get_presets(int encoder);
+
+        [DllImport("hb", EntryPoint = "hb_video_encoder_get_tunes", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_video_encoder_get_tunes(int encoder);
+
+        [DllImport("hb", EntryPoint = "hb_video_encoder_get_profiles", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_video_encoder_get_profiles(int encoder);
+
+        [DllImport("hb", EntryPoint = "hb_video_encoder_get_levels", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_video_encoder_get_levels(int encoder);
+
+
+        [DllImport("hb", EntryPoint = "lang_get_next", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr lang_get_next(IntPtr last);
+
+        [DllImport("hb", EntryPoint = "lang_for_code2", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr lang_for_code2([In] [MarshalAs(UnmanagedType.LPStr)] string code2);
+
+
+        ///hb_title_set_t  * hb_get_title_set( hb_handle_t * );
+        [DllImport("hb", EntryPoint = "hb_get_title_set", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_get_title_set(IntPtr hbHandle);
+
+        ///hb_job_t * hb_job_init_by_index( hb_handle_t *h, int title_index );
+        [DllImport("hb", EntryPoint = "hb_job_init_by_index", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_job_init_by_index(IntPtr hbHandle, int title_index);
+
+        ///void hb_job_close( hb_job_t ** job );
+        [DllImport("hb", EntryPoint = "hb_job_close", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_job_close(IntPtr job);
+
+        ///void hb_chapter_set_title(hb_chapter_t *chapter, const char *title);
+        [DllImport("hb", EntryPoint = "hb_chapter_set_title", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_chapter_set_title(IntPtr chapter, [In] [MarshalAs(UnmanagedType.LPStr)] string title);
+
+        ///void hb_chapter_set_title(hb_chapter_t *chapter, const char *title);
+        [DllImport("hb", EntryPoint = "hb_chapter_set_title", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_chapter_set_title__ptr(IntPtr chapter, IntPtr title);
+
+        /// hb_filter_object_t * hb_filter_init( int filter_id );
+        [DllImport("hb", EntryPoint = "hb_filter_init", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_filter_init(int filter_id);
+
+        [DllImport("hb", EntryPoint = "hb_generate_filter_settings_json", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_generate_filter_settings_json(
+            int filter_id,
+            [In] [MarshalAs(UnmanagedType.LPStr)] string preset,
+            [In] [MarshalAs(UnmanagedType.LPStr)] string tune,
+            [In] [MarshalAs(UnmanagedType.LPStr)] string custom);
+
+        /// char* hb_filter_get_presets_json(int filter_id);
+        [DllImport("hb", EntryPoint = "hb_filter_get_presets_json", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_filter_get_presets_json(int filter_id);
+
+        /// char* hb_filter_get_tuness_json(int filter_id);
+        [DllImport("hb", EntryPoint = "hb_filter_get_tunes_json", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_filter_get_tunes_json(int filter_id);
+
+        // char ** hb_filter_get_keys(int filter_id);
+        [DllImport("hb", EntryPoint = "hb_filter_get_keys", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_filter_get_keys(int filter_id);
+
+        [DllImport("hb", EntryPoint = "hb_x264_encopt_name", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_x264_encopt_name(IntPtr name);
+
+        [DllImport("hb", EntryPoint = "hb_check_h264_level", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_check_h264_level([In] [MarshalAs(UnmanagedType.LPStr)] string level, int width, int height, int fps_num, int fps_den, int interlaced, int fake_interlaced);
+
+        [DllImport("hb", EntryPoint = "hb_x264_param_unparse", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_x264_param_unparse(
+            int bit_depth,
+            [In] [MarshalAs(UnmanagedType.LPStr)] string x264_preset,
+            [In] [MarshalAs(UnmanagedType.LPStr)] string x264_tune,
+            [In] [MarshalAs(UnmanagedType.LPStr)] string x264_encopts,
+            [In] [MarshalAs(UnmanagedType.LPStr)] string x264_profile,
+            [In] [MarshalAs(UnmanagedType.LPStr)] string h264_level,
+            int width,
+            int height);
+
+
+        [DllImport("hb", EntryPoint = "hb_get_opencl_env", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_get_opencl_env();
+
+        [DllImport("hb", EntryPoint = "hb_qsv_available", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_qsv_available();
+        
+        [DllImport("hb", EntryPoint = "hb_qsv_info_init", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_qsv_info_init();
+
+        // hb_image_t* hb_get_preview2(hb_handle_t* h, int title_idx, int picture, hb_geometry_settings_t* geo, int deinterlace);
+        [DllImport("hb", EntryPoint = "hb_get_preview2", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_get_preview2(IntPtr hbHandle, int title_idx, int preview_idx,  ref hb_geometry_settings_s geo, int deinterlace);
+
+        // void hb_image_close(hb_image_t **_image);
+        [DllImport("hb", EntryPoint = "hb_image_close", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_image_close(IntPtr image);
+
+        /* JSON API */
+
+        // char     * hb_get_title_set_json(hb_handle_t * h);
+        [DllImport("hb", EntryPoint = "hb_get_title_set_json", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_get_title_set_json(IntPtr hbHandle);
+
+        // char     * hb_job_init_json(hb_handle_t *h, int title_index);
+        [DllImport("hb", EntryPoint = "hb_job_init_json", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_job_init_json(IntPtr hbHandle, int title_index);
+
+        // hb_job_t * hb_json_to_job(hb_handle_t * h, const char * json_job);
+        [DllImport("hb", EntryPoint = "hb_json_to_job", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_json_to_job(IntPtr hbHandle, IntPtr json_job);
+
+        // int           hb_add_json( hb_handle_t *, const char * ) 
+        [DllImport("hb", EntryPoint = "hb_add_json", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int hb_add_json(IntPtr hbHandle, IntPtr json_job);
+
+        //char     * hb_set_anamorphic_size_json(const char * json_param);
+        [DllImport("hb", EntryPoint = "hb_set_anamorphic_size_json", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_set_anamorphic_size_json(IntPtr json_param);
+
+        // char     * hb_get_state_json(hb_handle_t * h);
+        [DllImport("hb", EntryPoint = "hb_get_state_json", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_get_state_json(IntPtr hbHandle);
+
+        // char* hb_get_preview_params_json(int title_idx, int preview_idx, int deinterlace, hb_geometry_settings_t *settings)
+        [DllImport("hb", EntryPoint = "hb_get_preview_params_json", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_get_preview_params_json(int title_idx, int preview_idx, int deinterlace, ref hb_geometry_settings_s settings);
+        
+        //void         hb_presets_builtin_init(void);
+        [DllImport("hb", EntryPoint = "hb_presets_builtin_init", CallingConvention = CallingConvention.Cdecl)]
+        public static extern void hb_presets_builtin_init();
+
+        // char       * hb_presets_builtin_get_json(void); // Get list of HandBrake builtin presets as json string
+        [DllImport("hb", EntryPoint = "hb_presets_builtin_get_json", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_presets_builtin_get_json();
+
+        //     char       * hb_presets_read_file_json(const char *filename);
+        [DllImport("hb", EntryPoint = "hb_presets_read_file_json", CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr hb_presets_read_file_json(IntPtr filename);
+    }
+}
similarity index 96%
rename from win/CS/HandBrake.ApplicationServices/Interop/HbLib/NativeConstants.cs
rename to win/CS/HandBrake.Interop/Interop/HbLib/NativeConstants.cs
index 9f4615bbf5e706a062627308836c697601cf4624..aacec1bcf34f7524da67db23159b0604362c0f87 100644 (file)
@@ -1,69 +1,69 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="NativeConstants.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the NativeConstants type.\r
-// </summary>\r
-// <auto-generated> Disable Stylecop Warnings for this file  </auto-generated>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.HbLib\r
-{\r
-    public class NativeConstants\r
-    {\r
-        // Audio encoders\r
-        public const uint HB_ACODEC_MASK = 0x03FFFF00;\r
-        public const uint HB_ACODEC_LAME = 0x00000200;\r
-        public const uint HB_ACODEC_VORBIS = 0x00000400;\r
-        public const uint HB_ACODEC_AC3 = 0x00000800;\r
-        public const uint HB_ACODEC_LPCM = 0x00001000;\r
-        public const uint HB_ACODEC_DCA = 0x00002000;\r
-        public const uint HB_ACODEC_CA_AAC = 0x00004000;\r
-        public const uint HB_ACODEC_CA_HAAC = 0x00008000;\r
-        public const uint HB_ACODEC_FFAAC = 0x00010000;\r
-        public const uint HB_ACODEC_FFMPEG = 0x00020000;\r
-        public const uint HB_ACODEC_DCA_HD = 0x00040000;\r
-        public const uint HB_ACODEC_MP3 = 0x00080000;\r
-        public const uint HB_ACODEC_FFFLAC = 0x00100000;\r
-        public const uint HB_ACODEC_FFFLAC24 = 0x00200000;\r
-        public const uint HB_ACODEC_FDK_AAC = 0x00400000;\r
-        public const uint HB_ACODEC_FDK_HAAC = 0x00800000;\r
-        public const uint HB_ACODEC_FFEAC3 = 0x01000000;\r
-        public const uint HB_ACODEC_FFTRUEHD = 0x02000000;\r
-        public const uint HB_ACODEC_FF_MASK = 0x03FF2800;\r
-        public const uint HB_ACODEC_PASS_FLAG = 0x40000000;\r
-        public const uint HB_ACODEC_PASS_MASK = (HB_ACODEC_AC3 | HB_ACODEC_DCA | HB_ACODEC_DCA_HD | HB_ACODEC_FFAAC | HB_ACODEC_FFEAC3 | HB_ACODEC_FFFLAC | HB_ACODEC_MP3 | HB_ACODEC_FFTRUEHD);\r
-        public const uint HB_ACODEC_AUTO_PASS = (HB_ACODEC_PASS_MASK | HB_ACODEC_PASS_FLAG);\r
-        public const uint HB_ACODEC_MP3_PASS = (HB_ACODEC_MP3 | HB_ACODEC_PASS_FLAG);\r
-        public const uint HB_ACODEC_AAC_PASS = (HB_ACODEC_FFAAC | HB_ACODEC_PASS_FLAG);\r
-        public const uint HB_ACODEC_AC3_PASS = (HB_ACODEC_AC3 | HB_ACODEC_PASS_FLAG);\r
-        public const uint HB_ACODEC_DCA_PASS = (HB_ACODEC_DCA | HB_ACODEC_PASS_FLAG);\r
-        public const uint HB_ACODEC_DCA_HD_PASS = (HB_ACODEC_DCA_HD | HB_ACODEC_PASS_FLAG);\r
-        public const uint HB_ACODEC_EAC3_PASS = (HB_ACODEC_PASS_FLAG | HB_ACODEC_FFEAC3);\r
-        public const uint HB_ACODEC_FLAC_PASS = (HB_ACODEC_PASS_FLAG | HB_ACODEC_FFFLAC);\r
-        public const uint HB_ACODEC_ANY = (HB_ACODEC_MASK | HB_ACODEC_PASS_FLAG);\r
-        public const uint HB_ACODEC_TRUEHD_PASS = (HB_ACODEC_PASS_FLAG | HB_ACODEC_FFTRUEHD);\r
-\r
-        // VideoEncoders\r
-        public const uint HB_VCODEC_QSV_H264 = 0x0000100;\r
-        public const uint HB_VCODEC_QSV_H265 = 0x0000200;\r
-        public const uint HB_VCODEC_QSV_H265_10BIT = 0x0000400;\r
-        public const uint HB_VCODEC_QSV_MASK = 0x0000F00;\r
-\r
-        // Encode state\r
-        public const int HB_STATE_IDLE = 1;\r
-        public const int HB_STATE_SCANNING = 2;\r
-        public const int HB_STATE_SCANDONE = 4;\r
-        public const int HB_STATE_WORKING = 8;\r
-        public const int HB_STATE_PAUSED = 16;\r
-        public const int HB_STATE_WORKDONE = 32;\r
-        public const int HB_STATE_MUXING = 64;\r
-        public const int HB_STATE_SEARCHING = 128;\r
-\r
-        // Keep aspect ratio values\r
-        public const int HB_KEEP_WIDTH = 0x01;\r
-        public const int HB_KEEP_HEIGHT = 0x02;\r
-        public const int HB_KEEP_DISPLAY_ASPECT = 0x04;\r
-       }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="NativeConstants.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>
+// <auto-generated> Disable Stylecop Warnings for this file  </auto-generated>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.HbLib
+{
+    public class NativeConstants
+    {
+        // Audio encoders
+        public const uint HB_ACODEC_MASK = 0x03FFFF00;
+        public const uint HB_ACODEC_LAME = 0x00000200;
+        public const uint HB_ACODEC_VORBIS = 0x00000400;
+        public const uint HB_ACODEC_AC3 = 0x00000800;
+        public const uint HB_ACODEC_LPCM = 0x00001000;
+        public const uint HB_ACODEC_DCA = 0x00002000;
+        public const uint HB_ACODEC_CA_AAC = 0x00004000;
+        public const uint HB_ACODEC_CA_HAAC = 0x00008000;
+        public const uint HB_ACODEC_FFAAC = 0x00010000;
+        public const uint HB_ACODEC_FFMPEG = 0x00020000;
+        public const uint HB_ACODEC_DCA_HD = 0x00040000;
+        public const uint HB_ACODEC_MP3 = 0x00080000;
+        public const uint HB_ACODEC_FFFLAC = 0x00100000;
+        public const uint HB_ACODEC_FFFLAC24 = 0x00200000;
+        public const uint HB_ACODEC_FDK_AAC = 0x00400000;
+        public const uint HB_ACODEC_FDK_HAAC = 0x00800000;
+        public const uint HB_ACODEC_FFEAC3 = 0x01000000;
+        public const uint HB_ACODEC_FFTRUEHD = 0x02000000;
+        public const uint HB_ACODEC_FF_MASK = 0x03FF2800;
+        public const uint HB_ACODEC_PASS_FLAG = 0x40000000;
+        public const uint HB_ACODEC_PASS_MASK = (HB_ACODEC_AC3 | HB_ACODEC_DCA | HB_ACODEC_DCA_HD | HB_ACODEC_FFAAC | HB_ACODEC_FFEAC3 | HB_ACODEC_FFFLAC | HB_ACODEC_MP3 | HB_ACODEC_FFTRUEHD);
+        public const uint HB_ACODEC_AUTO_PASS = (HB_ACODEC_PASS_MASK | HB_ACODEC_PASS_FLAG);
+        public const uint HB_ACODEC_MP3_PASS = (HB_ACODEC_MP3 | HB_ACODEC_PASS_FLAG);
+        public const uint HB_ACODEC_AAC_PASS = (HB_ACODEC_FFAAC | HB_ACODEC_PASS_FLAG);
+        public const uint HB_ACODEC_AC3_PASS = (HB_ACODEC_AC3 | HB_ACODEC_PASS_FLAG);
+        public const uint HB_ACODEC_DCA_PASS = (HB_ACODEC_DCA | HB_ACODEC_PASS_FLAG);
+        public const uint HB_ACODEC_DCA_HD_PASS = (HB_ACODEC_DCA_HD | HB_ACODEC_PASS_FLAG);
+        public const uint HB_ACODEC_EAC3_PASS = (HB_ACODEC_PASS_FLAG | HB_ACODEC_FFEAC3);
+        public const uint HB_ACODEC_FLAC_PASS = (HB_ACODEC_PASS_FLAG | HB_ACODEC_FFFLAC);
+        public const uint HB_ACODEC_ANY = (HB_ACODEC_MASK | HB_ACODEC_PASS_FLAG);
+        public const uint HB_ACODEC_TRUEHD_PASS = (HB_ACODEC_PASS_FLAG | HB_ACODEC_FFTRUEHD);
+
+        // VideoEncoders
+        public const uint HB_VCODEC_QSV_H264 = 0x0000100;
+        public const uint HB_VCODEC_QSV_H265 = 0x0000200;
+        public const uint HB_VCODEC_QSV_H265_10BIT = 0x0000400;
+        public const uint HB_VCODEC_QSV_MASK = 0x0000F00;
+
+        // Encode state
+        public const int HB_STATE_IDLE = 1;
+        public const int HB_STATE_SCANNING = 2;
+        public const int HB_STATE_SCANDONE = 4;
+        public const int HB_STATE_WORKING = 8;
+        public const int HB_STATE_PAUSED = 16;
+        public const int HB_STATE_WORKDONE = 32;
+        public const int HB_STATE_MUXING = 64;
+        public const int HB_STATE_SEARCHING = 128;
+
+        // Keep aspect ratio values
+        public const int HB_KEEP_WIDTH = 0x01;
+        public const int HB_KEEP_HEIGHT = 0x02;
+        public const int HB_KEEP_DISPLAY_ASPECT = 0x04;
+       }
+}
similarity index 91%
rename from win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_anamorphic_mode_t.cs
rename to win/CS/HandBrake.Interop/Interop/HbLib/hb_anamorphic_mode_t.cs
index ba379c3adf6bd3129b78e8e75f6fd797be6ff54c..949f7d694089a07247305e7f4a0cc7f0f506e94e 100644 (file)
@@ -1,21 +1,21 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="hb_job_s.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the hb_job_s type.\r
-// </summary>\r
-// <auto-generated> Disable Stylecop Warnings for this file  </auto-generated>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.HbLib\r
-{\r
-    internal enum hb_anamorphic_mode_t\r
-    {\r
-        HB_ANAMORPHIC_NONE,\r
-        HB_ANAMORPHIC_STRICT,\r
-        HB_ANAMORPHIC_LOOSE,\r
-        HB_ANAMORPHIC_CUSTOM,\r
-        HB_ANAMORPHIC_AUTO\r
-    } ;\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="hb_job_s.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 hb_job_s type.
+// </summary>
+// <auto-generated> Disable Stylecop Warnings for this file  </auto-generated>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.HbLib
+{
+    internal enum hb_anamorphic_mode_t
+    {
+        HB_ANAMORPHIC_NONE,
+        HB_ANAMORPHIC_STRICT,
+        HB_ANAMORPHIC_LOOSE,
+        HB_ANAMORPHIC_CUSTOM,
+        HB_ANAMORPHIC_AUTO
+    } ;
+}
similarity index 92%
rename from win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_container_s.cs
rename to win/CS/HandBrake.Interop/Interop/HbLib/hb_container_s.cs
index 156bc75540b2161f47aaf20ce6981c34dbbf78d1..2611cab470d535cb0d0985d144e64026f81f33d2 100644 (file)
@@ -1,29 +1,29 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="hb_container_s.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <auto-generated>Disable Stylecop Warnings for this file</auto-generated>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.HbLib\r
-{\r
-    using System.Runtime.InteropServices;\r
-\r
-    [StructLayout(LayoutKind.Sequential)]\r
-    internal struct hb_container_s\r
-    {\r
-        [MarshalAs(UnmanagedType.LPStr)]\r
-        public string name;\r
-\r
-        [MarshalAs(UnmanagedType.LPStr)]\r
-        public string short_name;\r
-\r
-        [MarshalAs(UnmanagedType.LPStr)]\r
-        public string long_name;\r
-\r
-        [MarshalAs(UnmanagedType.LPStr)]\r
-        public string default_extension;\r
-\r
-        public int format;\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="hb_container_s.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>
+// <auto-generated>Disable Stylecop Warnings for this file</auto-generated>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.HbLib
+{
+    using System.Runtime.InteropServices;
+
+    [StructLayout(LayoutKind.Sequential)]
+    internal struct hb_container_s
+    {
+        [MarshalAs(UnmanagedType.LPStr)]
+        public string name;
+
+        [MarshalAs(UnmanagedType.LPStr)]
+        public string short_name;
+
+        [MarshalAs(UnmanagedType.LPStr)]
+        public string long_name;
+
+        [MarshalAs(UnmanagedType.LPStr)]
+        public string default_extension;
+
+        public int format;
+    }
+}
similarity index 92%
rename from win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_encoder_s.cs
rename to win/CS/HandBrake.Interop/Interop/HbLib/hb_encoder_s.cs
index 6fddc1827bfbd74ddebfe10d740394b948fc0960..54c5b182f181ceaadff3e48f17229b43f72b8537 100644 (file)
@@ -1,28 +1,28 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="hb_encoder_s.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <auto-generated>Disable Stylecop Warnings for this file</auto-generated>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.HbLib\r
-{\r
-    using System.Runtime.InteropServices;\r
-\r
-    [StructLayout(LayoutKind.Sequential)]\r
-    internal struct hb_encoder_s\r
-    {\r
-        [MarshalAs(UnmanagedType.LPStr)]\r
-        public string name;\r
-\r
-        [MarshalAs(UnmanagedType.LPStr)]\r
-        public string short_name;\r
-\r
-        [MarshalAs(UnmanagedType.LPStr)]\r
-        public string long_name;\r
-\r
-        public int codec;\r
-\r
-        public int muxers;\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="hb_encoder_s.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>
+// <auto-generated>Disable Stylecop Warnings for this file</auto-generated>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.HbLib
+{
+    using System.Runtime.InteropServices;
+
+    [StructLayout(LayoutKind.Sequential)]
+    internal struct hb_encoder_s
+    {
+        [MarshalAs(UnmanagedType.LPStr)]
+        public string name;
+
+        [MarshalAs(UnmanagedType.LPStr)]
+        public string short_name;
+
+        [MarshalAs(UnmanagedType.LPStr)]
+        public string long_name;
+
+        public int codec;
+
+        public int muxers;
+    }
+}
similarity index 91%
rename from win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_error_code.cs
rename to win/CS/HandBrake.Interop/Interop/HbLib/hb_error_code.cs
index 96a6fbe000b2722fc2e5ef010bd80fd5bd4fe6b9..f0c996ca8695a7d4220d4acc6164b4ee7aabcb5d 100644 (file)
@@ -1,24 +1,24 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="hb_error_code.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the hb_error_code type.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.HbLib\r
-{\r
-    /// <summary>\r
-    /// The hb_error_code.\r
-    /// </summary>\r
-    internal enum hb_error_code\r
-    {\r
-        HB_ERROR_NONE = 0,\r
-        HB_ERROR_CANCELED,\r
-        HB_ERROR_WRONG_INPUT,\r
-        HB_ERROR_INIT,\r
-        HB_ERROR_UNKNOWN,\r
-        HB_ERROR_READ\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="hb_error_code.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 hb_error_code type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.HbLib
+{
+    /// <summary>
+    /// The hb_error_code.
+    /// </summary>
+    internal enum hb_error_code
+    {
+        HB_ERROR_NONE = 0,
+        HB_ERROR_CANCELED,
+        HB_ERROR_WRONG_INPUT,
+        HB_ERROR_INIT,
+        HB_ERROR_UNKNOWN,
+        HB_ERROR_READ
+    }
+}
similarity index 94%
rename from win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_filter_ids.cs
rename to win/CS/HandBrake.Interop/Interop/HbLib/hb_filter_ids.cs
index 63e279410c8b3dfe289dedfd1b2f9ad001f59f41..62b0889cb76ba130e768d1846fa330c35e36be41 100644 (file)
@@ -1,46 +1,46 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="hb_filter_ids.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <auto-generated> Disable Stylecop Warnings for this file  </auto-generated>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.HbLib\r
-{\r
-    public enum hb_filter_ids\r
-    {\r
-        HB_FILTER_INVALID = 0,\r
-        // for QSV - important to have before other filters\r
-        HB_FILTER_FIRST = 1,\r
-        HB_FILTER_QSV_PRE = 1,\r
-\r
-        // First, filters that may change the framerate (drop or dup frames)\r
-        HB_FILTER_DETELECINE,\r
-        HB_FILTER_COMB_DETECT,\r
-        HB_FILTER_DECOMB,\r
-        HB_FILTER_DEINTERLACE,\r
-        HB_FILTER_VFR,\r
-        // Filters that must operate on the original source image are next\r
-        HB_FILTER_DEBLOCK,\r
-        HB_FILTER_DENOISE,\r
-        HB_FILTER_HQDN3D = HB_FILTER_DENOISE,\r
-        HB_FILTER_NLMEANS,\r
-        HB_FILTER_RENDER_SUB,\r
-        HB_FILTER_CROP_SCALE,\r
-        HB_FILTER_LAPSHARP,\r
-        HB_FILTER_UNSHARP,\r
-        HB_FILTER_ROTATE,\r
-        HB_FILTER_GRAYSCALE,\r
-        HB_FILTER_PAD,\r
-\r
-        // Finally filters that don't care what order they are in,\r
-        // except that they must be after the above filters\r
-        HB_FILTER_AVFILTER,\r
-\r
-        // for QSV - important to have as a last one\r
-        HB_FILTER_QSV_POST,\r
-        // default MSDK VPP filter\r
-        HB_FILTER_QSV,\r
-        HB_FILTER_LAST = HB_FILTER_QSV\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="hb_filter_ids.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>
+// <auto-generated> Disable Stylecop Warnings for this file  </auto-generated>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.HbLib
+{
+    public enum hb_filter_ids
+    {
+        HB_FILTER_INVALID = 0,
+        // for QSV - important to have before other filters
+        HB_FILTER_FIRST = 1,
+        HB_FILTER_QSV_PRE = 1,
+
+        // First, filters that may change the framerate (drop or dup frames)
+        HB_FILTER_DETELECINE,
+        HB_FILTER_COMB_DETECT,
+        HB_FILTER_DECOMB,
+        HB_FILTER_DEINTERLACE,
+        HB_FILTER_VFR,
+        // Filters that must operate on the original source image are next
+        HB_FILTER_DEBLOCK,
+        HB_FILTER_DENOISE,
+        HB_FILTER_HQDN3D = HB_FILTER_DENOISE,
+        HB_FILTER_NLMEANS,
+        HB_FILTER_RENDER_SUB,
+        HB_FILTER_CROP_SCALE,
+        HB_FILTER_LAPSHARP,
+        HB_FILTER_UNSHARP,
+        HB_FILTER_ROTATE,
+        HB_FILTER_GRAYSCALE,
+        HB_FILTER_PAD,
+
+        // Finally filters that don't care what order they are in,
+        // except that they must be after the above filters
+        HB_FILTER_AVFILTER,
+
+        // for QSV - important to have as a last one
+        HB_FILTER_QSV_POST,
+        // default MSDK VPP filter
+        HB_FILTER_QSV,
+        HB_FILTER_LAST = HB_FILTER_QSV
+    }
+}
similarity index 94%
rename from win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_geometry.cs
rename to win/CS/HandBrake.Interop/Interop/HbLib/hb_geometry.cs
index 8a6cfa3e69f9ec64ebb51eed7730ab02277cffb1..c665a5306597749f481b01a2e682b5bab2d3c595 100644 (file)
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="hb_geometry.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the hb_geometry type.\r
-// </summary>\r
-// <auto-generated>Disable Stylecop Warnings for this file</auto-generated>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.HbLib\r
-{\r
-    using System.Runtime.InteropServices;\r
-\r
-    /// <summary>\r
-    /// The hb_geometry_s.\r
-    /// </summary>\r
-    [StructLayout(LayoutKind.Sequential)]\r
-    public struct hb_geometry_s\r
-    {\r
-        /// <summary>\r
-        /// The width.\r
-        /// </summary>\r
-        public int width;\r
-\r
-        /// <summary>\r
-        /// The height.\r
-        /// </summary>\r
-        public int height;\r
-\r
-        /// <summary>\r
-        /// The par.\r
-        /// </summary>\r
-        public hb_rational_t par;\r
-    }\r
-\r
-    /// <summary>\r
-    /// The hb_ui_geometry_s.\r
-    /// </summary>\r
-    [StructLayout(LayoutKind.Sequential)]\r
-    public struct hb_geometry_settings_s\r
-    {\r
-        /// <summary>\r
-        ///  Anamorphic mode, see job struct anamorphic\r
-        /// </summary>\r
-        public int mode;\r
-\r
-        /// <summary>\r
-        ///  Specifies settings that shouldn't be changed\r
-        /// </summary>\r
-        public int keep; \r
-\r
-        /// <summary>\r
-        /// use dvd dimensions to determine PAR\r
-        /// </summary>\r
-        public int itu_par; \r
-\r
-        /// <summary>\r
-        /// pixel alignment for loose anamorphic\r
-        /// </summary>\r
-        public int modulus; \r
-\r
-        /// <summary>\r
-        /// Cropping\r
-        /// </summary>\r
-        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I4)]\r
-        public int[] crop;\r
-\r
-        /// <summary>\r
-        /// max destination storage width\r
-        /// </summary>\r
-        public int maxWidth; \r
-\r
-        /// <summary>\r
-        ///  max destination storage height\r
-        /// </summary>\r
-        public int maxHeight;\r
-\r
-        /// <summary>\r
-        /// Pixel aspect used in custom anamorphic\r
-        /// </summary>\r
-        public hb_geometry_s geometry; \r
-    }\r
-\r
-    /// <summary>\r
-    /// The hb_rational_t.\r
-    /// </summary>\r
-    [StructLayout(LayoutKind.Sequential)]\r
-    public struct hb_rational_t\r
-    {\r
-        /// <summary>\r
-        /// The num. W\r
-        /// </summary>\r
-        public int num;\r
-\r
-        /// <summary>\r
-        /// The den. H\r
-        /// </summary>\r
-        public int den;\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="hb_geometry.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 hb_geometry type.
+// </summary>
+// <auto-generated>Disable Stylecop Warnings for this file</auto-generated>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.HbLib
+{
+    using System.Runtime.InteropServices;
+
+    /// <summary>
+    /// The hb_geometry_s.
+    /// </summary>
+    [StructLayout(LayoutKind.Sequential)]
+    public struct hb_geometry_s
+    {
+        /// <summary>
+        /// The width.
+        /// </summary>
+        public int width;
+
+        /// <summary>
+        /// The height.
+        /// </summary>
+        public int height;
+
+        /// <summary>
+        /// The par.
+        /// </summary>
+        public hb_rational_t par;
+    }
+
+    /// <summary>
+    /// The hb_ui_geometry_s.
+    /// </summary>
+    [StructLayout(LayoutKind.Sequential)]
+    public struct hb_geometry_settings_s
+    {
+        /// <summary>
+        ///  Anamorphic mode, see job struct anamorphic
+        /// </summary>
+        public int mode;
+
+        /// <summary>
+        ///  Specifies settings that shouldn't be changed
+        /// </summary>
+        public int keep; 
+
+        /// <summary>
+        /// use dvd dimensions to determine PAR
+        /// </summary>
+        public int itu_par; 
+
+        /// <summary>
+        /// pixel alignment for loose anamorphic
+        /// </summary>
+        public int modulus; 
+
+        /// <summary>
+        /// Cropping
+        /// </summary>
+        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I4)]
+        public int[] crop;
+
+        /// <summary>
+        /// max destination storage width
+        /// </summary>
+        public int maxWidth; 
+
+        /// <summary>
+        ///  max destination storage height
+        /// </summary>
+        public int maxHeight;
+
+        /// <summary>
+        /// Pixel aspect used in custom anamorphic
+        /// </summary>
+        public hb_geometry_s geometry; 
+    }
+
+    /// <summary>
+    /// The hb_rational_t.
+    /// </summary>
+    [StructLayout(LayoutKind.Sequential)]
+    public struct hb_rational_t
+    {
+        /// <summary>
+        /// The num. W
+        /// </summary>
+        public int num;
+
+        /// <summary>
+        /// The den. H
+        /// </summary>
+        public int den;
+    }
 }
\ No newline at end of file
similarity index 92%
rename from win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_image_s.cs
rename to win/CS/HandBrake.Interop/Interop/HbLib/hb_image_s.cs
index 764a3ea43611dbc343a3a76a5ca5a25065b6bbfb..2d2632622e49408a5022402d75f59ca176c8f9cb 100644 (file)
@@ -1,41 +1,41 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="hb_image_s.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the hb_image_s type.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.HbLib\r
-{\r
-    using System;\r
-    using System.Runtime.InteropServices;\r
-\r
-    /// <summary>\r
-    /// The hb_image_s.\r
-    /// </summary>\r
-    internal struct hb_image_s\r
-    {\r
-        public int format;\r
-        public int width;\r
-        public int height;\r
-        public IntPtr data;\r
-\r
-        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I4)]\r
-        public image_plane[] plane;\r
-    }\r
-\r
-    /// <summary>\r
-    /// The image_plane.\r
-    /// </summary>\r
-    internal struct image_plane\r
-    {\r
-        public IntPtr data;\r
-        public int width;\r
-        public int height;\r
-        public int stride;\r
-        public int height_stride;\r
-        public int size;\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="hb_image_s.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 hb_image_s type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.HbLib
+{
+    using System;
+    using System.Runtime.InteropServices;
+
+    /// <summary>
+    /// The hb_image_s.
+    /// </summary>
+    internal struct hb_image_s
+    {
+        public int format;
+        public int width;
+        public int height;
+        public IntPtr data;
+
+        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I4)]
+        public image_plane[] plane;
+    }
+
+    /// <summary>
+    /// The image_plane.
+    /// </summary>
+    internal struct image_plane
+    {
+        public IntPtr data;
+        public int width;
+        public int height;
+        public int stride;
+        public int height_stride;
+        public int size;
+    }
+}
similarity index 91%
rename from win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_mixdown_s.cs
rename to win/CS/HandBrake.Interop/Interop/HbLib/hb_mixdown_s.cs
index 726ebf226fbf5c6472b7110a6f46ed080d2dab2d..06fb6af6b9557306e40de56cae8d57ec8b6f214e 100644 (file)
@@ -1,25 +1,25 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="hb_mixdown_s.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <auto-generated>Disable Stylecop Warnings for this file</auto-generated>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.HbLib\r
-{\r
-    using System.Runtime.InteropServices;\r
-\r
-    [StructLayout(LayoutKind.Sequential)]\r
-    internal struct hb_mixdown_s\r
-    {\r
-        [MarshalAs(UnmanagedType.LPStr)]\r
-        public string name;\r
-\r
-        /// char*\r
-        [MarshalAs(UnmanagedType.LPStr)]\r
-        public string short_name;\r
-\r
-        /// int\r
-        public int amixdown;\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="hb_mixdown_s.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>
+// <auto-generated>Disable Stylecop Warnings for this file</auto-generated>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.HbLib
+{
+    using System.Runtime.InteropServices;
+
+    [StructLayout(LayoutKind.Sequential)]
+    internal struct hb_mixdown_s
+    {
+        [MarshalAs(UnmanagedType.LPStr)]
+        public string name;
+
+        /// char*
+        [MarshalAs(UnmanagedType.LPStr)]
+        public string short_name;
+
+        /// int
+        public int amixdown;
+    }
+}
similarity index 91%
rename from win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_rate_s.cs
rename to win/CS/HandBrake.Interop/Interop/HbLib/hb_rate_s.cs
index 5a4f48b4adc52890e1f8ad616570960af0a772dd..f10c320ce2aeff1c996ec41fadd92b17683ab01a 100644 (file)
@@ -1,22 +1,22 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="hb_rate_s.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <auto-generated>Disable Stylecop Warnings for this file</auto-generated>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.HbLib\r
-{\r
-    using System.Runtime.InteropServices;\r
-\r
-    [StructLayout(LayoutKind.Sequential)]\r
-    internal struct hb_rate_s\r
-    {\r
-        /// char*\r
-        [MarshalAs(UnmanagedType.LPStr)]\r
-        public string name;\r
-\r
-        /// int\r
-        public int rate;\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="hb_rate_s.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>
+// <auto-generated>Disable Stylecop Warnings for this file</auto-generated>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.HbLib
+{
+    using System.Runtime.InteropServices;
+
+    [StructLayout(LayoutKind.Sequential)]
+    internal struct hb_rate_s
+    {
+        /// char*
+        [MarshalAs(UnmanagedType.LPStr)]
+        public string name;
+
+        /// int
+        public int rate;
+    }
+}
similarity index 90%
rename from win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_subtitle.cs
rename to win/CS/HandBrake.Interop/Interop/HbLib/hb_subtitle.cs
index 4d0351814d19cd5b9cdfde1bf19ca06925b89a9b..0cfb0038bcceb8e89fe92fb5afd7839ef8e5de9e 100644 (file)
@@ -1,28 +1,28 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="hb_subtitle.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <auto-generated> Disable Stylecop Warnings for this file  </auto-generated>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.HbLib\r
-{\r
-    public enum hb_subtitle_s_subsource\r
-    {\r
-        VOBSUB,\r
-\r
-        SRTSUB,\r
-\r
-        CC608SUB,\r
-\r
-        CC708SUB,\r
-\r
-        UTF8SUB,\r
-\r
-        TX3GSUB,\r
-\r
-        SSASUB,\r
-\r
-        PGSSUB\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="hb_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>
+// <auto-generated> Disable Stylecop Warnings for this file  </auto-generated>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.HbLib
+{
+    public enum hb_subtitle_s_subsource
+    {
+        VOBSUB,
+
+        SRTSUB,
+
+        CC608SUB,
+
+        CC708SUB,
+
+        UTF8SUB,
+
+        TX3GSUB,
+
+        SSASUB,
+
+        PGSSUB
+    }
+}
similarity index 92%
rename from win/CS/HandBrake.ApplicationServices/Interop/HbLib/iso639_lang_t.cs
rename to win/CS/HandBrake.Interop/Interop/HbLib/iso639_lang_t.cs
index 86aa71dd832c432e951bc5f8053e954a74705fdb..8a9d8ab6417be63ca63f423204da3bae8781fbda 100644 (file)
@@ -1,29 +1,29 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="iso639_lang_t.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <auto-generated>Disable Stylecop Warnings for this file</auto-generated>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.HbLib\r
-{\r
-    using System;\r
-    using System.Runtime.InteropServices;\r
-\r
-    [StructLayout(LayoutKind.Sequential)]\r
-    internal struct iso639_lang_t\r
-    {\r
-        public IntPtr eng_name;\r
-\r
-        public IntPtr native_name;\r
-\r
-        [MarshalAs(UnmanagedType.LPStr)]\r
-        public string iso639_1;\r
-\r
-        [MarshalAs(UnmanagedType.LPStr)]\r
-        public string iso639_2;\r
-\r
-        [MarshalAs(UnmanagedType.LPStr)]\r
-        public string iso639_2b;\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="iso639_lang_t.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>
+// <auto-generated>Disable Stylecop Warnings for this file</auto-generated>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.HbLib
+{
+    using System;
+    using System.Runtime.InteropServices;
+
+    [StructLayout(LayoutKind.Sequential)]
+    internal struct iso639_lang_t
+    {
+        public IntPtr eng_name;
+
+        public IntPtr native_name;
+
+        [MarshalAs(UnmanagedType.LPStr)]
+        public string iso639_1;
+
+        [MarshalAs(UnmanagedType.LPStr)]
+        public string iso639_2;
+
+        [MarshalAs(UnmanagedType.LPStr)]
+        public string iso639_2b;
+    }
+}
similarity index 96%
rename from win/CS/HandBrake.ApplicationServices/Interop/Helpers/InteropUtilities.cs
rename to win/CS/HandBrake.Interop/Interop/Helpers/InteropUtilities.cs
index 95c43aee8c8805b79a71663e655ef42972288162..c63fde3267540fe4d774dcfae6b930939c5337b6 100644 (file)
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="InteropUtilities.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Helper utilities for native interop.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Helpers\r
-{\r
-    using System;\r
-    using System.Collections.Generic;\r
-    using System.Linq;\r
-    using System.Runtime.InteropServices;\r
-    using System.Text;\r
-\r
-    using HandBrake.ApplicationServices.Interop.HbLib;\r
-\r
-    /// <summary>\r
-    /// Helper utilities for native interop.\r
-    /// </summary>\r
-    internal static class InteropUtilities\r
-    {\r
-        /// <summary>\r
-        /// Reads the given native structure pointer.\r
-        /// </summary>\r
-        /// <typeparam name="T">The type to convert the structure to.</typeparam>\r
-        /// <param name="structPtr">The pointer to the native structure.</param>\r
-        /// <returns>The converted structure.</returns>\r
-        public static T ToStructureFromPtr<T>(IntPtr structPtr)\r
-        {\r
-            return (T)Marshal.PtrToStructure(structPtr, typeof(T));\r
-        }\r
-\r
-        /// <summary>\r
-        /// Reads the given native UTF-8 string.\r
-        /// </summary>\r
-        /// <param name="stringPtr">The pointer to the string.</param>\r
-        /// <returns>The resulting string.</returns>\r
-        public static string ToStringFromUtf8Ptr(IntPtr stringPtr)\r
-        {\r
-            var data = new List<byte>();\r
-            var ptr = stringPtr;\r
-            var offset = 0;\r
-            while (true)\r
-            {\r
-                byte ch = Marshal.ReadByte(ptr, offset++);\r
-                if (ch == 0)\r
-                {\r
-                    break;\r
-                }\r
-\r
-                data.Add(ch);\r
-            }\r
-\r
-            return Encoding.UTF8.GetString(data.ToArray());\r
-        }\r
-\r
-        /// <summary>\r
-        /// Creates a pointer to a UTF-8 null-terminated string.\r
-        /// </summary>\r
-        /// <param name="str">\r
-        /// The string to encode.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The <see cref="IntPtr"/>.\r
-        /// </returns>\r
-        public static IntPtr ToUtf8PtrFromString(string str)\r
-        {\r
-            byte[] bytes = Encoding.UTF8.GetBytes(str);\r
-            IntPtr stringPtr = Marshal.AllocHGlobal(bytes.Length + 1);\r
-            var offset = 0;\r
-            foreach (byte b in bytes)\r
-            {\r
-                Marshal.WriteByte(stringPtr, offset, b);\r
-                offset++;\r
-            }\r
-\r
-            Marshal.WriteByte(stringPtr, offset, 0);\r
-            return stringPtr;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Converts the given native HandBrake list to a managed list.\r
-        /// </summary>\r
-        /// <typeparam name="T">The type of structure in the list.</typeparam>\r
-        /// <param name="listPtr">The pointer to the native list.</param>\r
-        /// <returns>The converted managed list.</returns>\r
-        public static List<T> ToListFromHandBrakeList<T>(this IntPtr listPtr)\r
-        {\r
-            List<T> returnList = new List<T>();\r
-            NativeList nativeList = new NativeList(listPtr);\r
-\r
-            for (int i = 0; i < nativeList.Count; i++)\r
-            {\r
-                IntPtr itemPtr = nativeList[i];\r
-                returnList.Add(ToStructureFromPtr<T>(itemPtr));\r
-            }\r
-\r
-            return returnList;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Converts the HB list to a managed list of pointers.\r
-        /// </summary>\r
-        /// <param name="listPtr">The list to convert.</param>\r
-        /// <returns>The managed list of pointers.</returns>\r
-        public static List<IntPtr> ToIntPtrList(this IntPtr listPtr)\r
-        {\r
-            var returnList = new List<IntPtr>();\r
-            NativeList nativeList = new NativeList(listPtr);\r
-\r
-            for (int i = 0; i < nativeList.Count; i++)\r
-            {\r
-                IntPtr itemPtr = nativeList[i];\r
-                returnList.Add(itemPtr);\r
-            }\r
-\r
-            return returnList;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Converts the given native array to a managed collection.\r
-        /// </summary>\r
-        /// <typeparam name="T">The type of item in the list.</typeparam>\r
-        /// <param name="arrayPtr">The pointer to the array.</param>\r
-        /// <param name="count">The number of items in the array.</param>\r
-        /// <returns>The converted collection.</returns>\r
-        public static List<T> ToListFromNativeArray<T>(IntPtr arrayPtr, int count)\r
-        {\r
-            IntPtr currentItem = arrayPtr;\r
-\r
-            var result = new List<T>();\r
-            for (int i = 0; i < count; i++)\r
-            {\r
-                T nativeEncoder = ToStructureFromPtr<T>(currentItem);\r
-                result.Add(nativeEncoder);\r
-\r
-                currentItem = IntPtr.Add(currentItem, Marshal.SizeOf(typeof(T)));\r
-            }\r
-\r
-            return result;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Takes an array pointer and converts it into a list of strings.\r
-        /// </summary>\r
-        /// <param name="arrayPtr">A pointer to a raw list of strings.</param>\r
-        /// <returns>The list of strings.</returns>\r
-        public static List<string> ToStringListFromArrayPtr(IntPtr arrayPtr)\r
-        {\r
-            if (arrayPtr == IntPtr.Zero)\r
-            {\r
-                return null;\r
-            }\r
-\r
-            return ToPtrListFromPtr(arrayPtr).Select(ptr => Marshal.PtrToStringAnsi(ptr)).ToList();\r
-        }\r
-\r
-        /// <summary>\r
-        /// Finds all the pointers starting at the given location and puts them in a list. Stops when it finds zero for a pointer.\r
-        /// </summary>\r
-        /// <param name="arrayPtr">The address of the list of pointers.</param>\r
-        /// <returns>The list of pointers.</returns>\r
-        public static List<IntPtr> ToPtrListFromPtr(IntPtr arrayPtr)\r
-        {\r
-            var result = new List<IntPtr>();\r
-            int ptrSize = Marshal.SizeOf(typeof(IntPtr));\r
-            IntPtr currentPtr = Marshal.ReadIntPtr(arrayPtr);\r
-            for (int i = 0; currentPtr != IntPtr.Zero; i++)\r
-            {\r
-                result.Add(currentPtr);\r
-                currentPtr = Marshal.ReadIntPtr(arrayPtr, (i + 1) * ptrSize);\r
-            }\r
-\r
-            return result;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Creates a native HandBrake list from the given managed list of pointers.\r
-        /// </summary>\r
-        /// <param name="list">The managed list to convert.</param>\r
-        /// <returns>The converted native list.</returns>\r
-        public static NativeList ToHandBrakeListFromPtrList(List<IntPtr> list)\r
-        {\r
-            NativeList returnList = NativeList.CreateList();\r
-\r
-            foreach (IntPtr ptr in list)\r
-            {\r
-                returnList.Add(ptr);\r
-            }\r
-\r
-            return returnList;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Creates a native HandBrake list from the given managed list of structures.\r
-        /// </summary>\r
-        /// <typeparam name="T">The type of structures in the list.</typeparam>\r
-        /// <param name="list">The managed list to convert.</param>\r
-        /// <returns>The converted native list.</returns>\r
-        public static NativeList ToHandBrakeListFromList<T>(List<T> list)\r
-        {\r
-            NativeList returnList = NativeList.CreateList();\r
-            foreach (T item in list)\r
-            {\r
-                IntPtr itemPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(T)));\r
-                returnList.AllocatedMemory.Add(itemPtr);\r
-                Marshal.StructureToPtr(item, itemPtr, false);\r
-\r
-                returnList.Add(itemPtr);\r
-            }\r
-\r
-            return returnList;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Reads in a list of objects given an iterator and a conversion function.\r
-        /// </summary>\r
-        /// <typeparam name="T1">The type of the struct given by the iterator.</typeparam>\r
-        /// <typeparam name="T2">The object type to convert to.</typeparam>\r
-        /// <param name="iterator">The iterator to use to build the list.</param>\r
-        /// <param name="converter">The converter to convert from the struct to the object.</param>\r
-        /// <returns>The list of objects.</returns>\r
-        public static List<T2> ToListFromIterator<T1, T2>(Func<IntPtr, IntPtr> iterator, Func<T1, T2> converter)\r
-        {\r
-            return ToListFromIterator<T1>(iterator).Select(converter).ToList();\r
-        } \r
-\r
-        /// <summary>\r
-        /// Reads in a list of structs given an iterator.\r
-        /// </summary>\r
-        /// <typeparam name="T">The type of the struct.</typeparam>\r
-        /// <param name="iterator">The iterator to use to build the list.</param>\r
-        /// <returns>The list of structs.</returns>\r
-        public static List<T> ToListFromIterator<T>(Func<IntPtr, IntPtr> iterator)\r
-        {\r
-            var structureList = new List<T>();\r
-            IntPtr current = IntPtr.Zero;\r
-\r
-            current = iterator(current);\r
-            while (current != IntPtr.Zero)\r
-            {\r
-                T encoder = ToStructureFromPtr<T>(current);\r
-                structureList.Add(encoder);\r
-\r
-                current = iterator(current);\r
-            }\r
-\r
-            return structureList;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Closes the given job.\r
-        /// </summary>\r
-        /// <param name="nativeJobPtr">The pointer to the job.</param>\r
-        public static void CloseJob(IntPtr nativeJobPtr)\r
-        {\r
-            // Create a point to the job pointer first.\r
-            IntPtr nativeJobPtrPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IntPtr)));\r
-\r
-            // Assign the new pointer to the job pointer and tell HB to clean the job up.\r
-            Marshal.WriteIntPtr(nativeJobPtrPtr, nativeJobPtr);\r
-            HBFunctions.hb_job_close(nativeJobPtrPtr);\r
-\r
-            // Free the pointer we used.\r
-            Marshal.FreeHGlobal(nativeJobPtrPtr);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Frees all the memory locations in the given list.\r
-        /// </summary>\r
-        /// <param name="memoryList">The list of memory locations to free.</param>\r
-        public static void FreeMemory(List<IntPtr> memoryList)\r
-        {\r
-            foreach (IntPtr memoryLocation in memoryList)\r
-            {\r
-                Marshal.FreeHGlobal(memoryLocation);\r
-            }\r
-        }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <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.Interop.Helpers
+{
+    using System;
+    using System.Collections.Generic;
+    using System.Linq;
+    using System.Runtime.InteropServices;
+    using System.Text;
+
+    using HandBrake.Interop.Interop.HbLib;
+
+    /// <summary>
+    /// Helper utilities for native interop.
+    /// </summary>
+    internal static class InteropUtilities
+    {
+        /// <summary>
+        /// Reads the given native structure pointer.
+        /// </summary>
+        /// <typeparam name="T">The type to convert the structure to.</typeparam>
+        /// <param name="structPtr">The pointer to the native structure.</param>
+        /// <returns>The converted structure.</returns>
+        public static T ToStructureFromPtr<T>(IntPtr structPtr)
+        {
+            return (T)Marshal.PtrToStructure(structPtr, typeof(T));
+        }
+
+        /// <summary>
+        /// Reads the given native UTF-8 string.
+        /// </summary>
+        /// <param name="stringPtr">The pointer to the string.</param>
+        /// <returns>The resulting string.</returns>
+        public static string ToStringFromUtf8Ptr(IntPtr stringPtr)
+        {
+            var data = new List<byte>();
+            var ptr = stringPtr;
+            var offset = 0;
+            while (true)
+            {
+                byte ch = Marshal.ReadByte(ptr, offset++);
+                if (ch == 0)
+                {
+                    break;
+                }
+
+                data.Add(ch);
+            }
+
+            return Encoding.UTF8.GetString(data.ToArray());
+        }
+
+        /// <summary>
+        /// Creates a pointer to a UTF-8 null-terminated string.
+        /// </summary>
+        /// <param name="str">
+        /// The string to encode.
+        /// </param>
+        /// <returns>
+        /// The <see cref="IntPtr"/>.
+        /// </returns>
+        public static IntPtr ToUtf8PtrFromString(string str)
+        {
+            byte[] bytes = Encoding.UTF8.GetBytes(str);
+            IntPtr stringPtr = Marshal.AllocHGlobal(bytes.Length + 1);
+            var offset = 0;
+            foreach (byte b in bytes)
+            {
+                Marshal.WriteByte(stringPtr, offset, b);
+                offset++;
+            }
+
+            Marshal.WriteByte(stringPtr, offset, 0);
+            return stringPtr;
+        }
+
+        /// <summary>
+        /// Converts the given native HandBrake list to a managed list.
+        /// </summary>
+        /// <typeparam name="T">The type of structure in the list.</typeparam>
+        /// <param name="listPtr">The pointer to the native list.</param>
+        /// <returns>The converted managed list.</returns>
+        public static List<T> ToListFromHandBrakeList<T>(this IntPtr listPtr)
+        {
+            List<T> returnList = new List<T>();
+            NativeList nativeList = new NativeList(listPtr);
+
+            for (int i = 0; i < nativeList.Count; i++)
+            {
+                IntPtr itemPtr = nativeList[i];
+                returnList.Add(ToStructureFromPtr<T>(itemPtr));
+            }
+
+            return returnList;
+        }
+
+        /// <summary>
+        /// Converts the HB list to a managed list of pointers.
+        /// </summary>
+        /// <param name="listPtr">The list to convert.</param>
+        /// <returns>The managed list of pointers.</returns>
+        public static List<IntPtr> ToIntPtrList(this IntPtr listPtr)
+        {
+            var returnList = new List<IntPtr>();
+            NativeList nativeList = new NativeList(listPtr);
+
+            for (int i = 0; i < nativeList.Count; i++)
+            {
+                IntPtr itemPtr = nativeList[i];
+                returnList.Add(itemPtr);
+            }
+
+            return returnList;
+        }
+
+        /// <summary>
+        /// Converts the given native array to a managed collection.
+        /// </summary>
+        /// <typeparam name="T">The type of item in the list.</typeparam>
+        /// <param name="arrayPtr">The pointer to the array.</param>
+        /// <param name="count">The number of items in the array.</param>
+        /// <returns>The converted collection.</returns>
+        public static List<T> ToListFromNativeArray<T>(IntPtr arrayPtr, int count)
+        {
+            IntPtr currentItem = arrayPtr;
+
+            var result = new List<T>();
+            for (int i = 0; i < count; i++)
+            {
+                T nativeEncoder = ToStructureFromPtr<T>(currentItem);
+                result.Add(nativeEncoder);
+
+                currentItem = IntPtr.Add(currentItem, Marshal.SizeOf(typeof(T)));
+            }
+
+            return result;
+        }
+
+        /// <summary>
+        /// Takes an array pointer and converts it into a list of strings.
+        /// </summary>
+        /// <param name="arrayPtr">A pointer to a raw list of strings.</param>
+        /// <returns>The list of strings.</returns>
+        public static List<string> ToStringListFromArrayPtr(IntPtr arrayPtr)
+        {
+            if (arrayPtr == IntPtr.Zero)
+            {
+                return null;
+            }
+
+            return ToPtrListFromPtr(arrayPtr).Select(ptr => Marshal.PtrToStringAnsi(ptr)).ToList();
+        }
+
+        /// <summary>
+        /// Finds all the pointers starting at the given location and puts them in a list. Stops when it finds zero for a pointer.
+        /// </summary>
+        /// <param name="arrayPtr">The address of the list of pointers.</param>
+        /// <returns>The list of pointers.</returns>
+        public static List<IntPtr> ToPtrListFromPtr(IntPtr arrayPtr)
+        {
+            var result = new List<IntPtr>();
+            int ptrSize = Marshal.SizeOf(typeof(IntPtr));
+            IntPtr currentPtr = Marshal.ReadIntPtr(arrayPtr);
+            for (int i = 0; currentPtr != IntPtr.Zero; i++)
+            {
+                result.Add(currentPtr);
+                currentPtr = Marshal.ReadIntPtr(arrayPtr, (i + 1) * ptrSize);
+            }
+
+            return result;
+        }
+
+        /// <summary>
+        /// Creates a native HandBrake list from the given managed list of pointers.
+        /// </summary>
+        /// <param name="list">The managed list to convert.</param>
+        /// <returns>The converted native list.</returns>
+        public static NativeList ToHandBrakeListFromPtrList(List<IntPtr> list)
+        {
+            NativeList returnList = NativeList.CreateList();
+
+            foreach (IntPtr ptr in list)
+            {
+                returnList.Add(ptr);
+            }
+
+            return returnList;
+        }
+
+        /// <summary>
+        /// Creates a native HandBrake list from the given managed list of structures.
+        /// </summary>
+        /// <typeparam name="T">The type of structures in the list.</typeparam>
+        /// <param name="list">The managed list to convert.</param>
+        /// <returns>The converted native list.</returns>
+        public static NativeList ToHandBrakeListFromList<T>(List<T> list)
+        {
+            NativeList returnList = NativeList.CreateList();
+            foreach (T item in list)
+            {
+                IntPtr itemPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(T)));
+                returnList.AllocatedMemory.Add(itemPtr);
+                Marshal.StructureToPtr(item, itemPtr, false);
+
+                returnList.Add(itemPtr);
+            }
+
+            return returnList;
+        }
+
+        /// <summary>
+        /// Reads in a list of objects given an iterator and a conversion function.
+        /// </summary>
+        /// <typeparam name="T1">The type of the struct given by the iterator.</typeparam>
+        /// <typeparam name="T2">The object type to convert to.</typeparam>
+        /// <param name="iterator">The iterator to use to build the list.</param>
+        /// <param name="converter">The converter to convert from the struct to the object.</param>
+        /// <returns>The list of objects.</returns>
+        public static List<T2> ToListFromIterator<T1, T2>(Func<IntPtr, IntPtr> iterator, Func<T1, T2> converter)
+        {
+            return ToListFromIterator<T1>(iterator).Select(converter).ToList();
+        } 
+
+        /// <summary>
+        /// Reads in a list of structs given an iterator.
+        /// </summary>
+        /// <typeparam name="T">The type of the struct.</typeparam>
+        /// <param name="iterator">The iterator to use to build the list.</param>
+        /// <returns>The list of structs.</returns>
+        public static List<T> ToListFromIterator<T>(Func<IntPtr, IntPtr> iterator)
+        {
+            var structureList = new List<T>();
+            IntPtr current = IntPtr.Zero;
+
+            current = iterator(current);
+            while (current != IntPtr.Zero)
+            {
+                T encoder = ToStructureFromPtr<T>(current);
+                structureList.Add(encoder);
+
+                current = iterator(current);
+            }
+
+            return structureList;
+        }
+
+        /// <summary>
+        /// Closes the given job.
+        /// </summary>
+        /// <param name="nativeJobPtr">The pointer to the job.</param>
+        public static void CloseJob(IntPtr nativeJobPtr)
+        {
+            // Create a point to the job pointer first.
+            IntPtr nativeJobPtrPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IntPtr)));
+
+            // Assign the new pointer to the job pointer and tell HB to clean the job up.
+            Marshal.WriteIntPtr(nativeJobPtrPtr, nativeJobPtr);
+            HBFunctions.hb_job_close(nativeJobPtrPtr);
+
+            // Free the pointer we used.
+            Marshal.FreeHGlobal(nativeJobPtrPtr);
+        }
+
+        /// <summary>
+        /// Frees all the memory locations in the given list.
+        /// </summary>
+        /// <param name="memoryList">The list of memory locations to free.</param>
+        public static void FreeMemory(List<IntPtr> memoryList)
+        {
+            foreach (IntPtr memoryLocation in memoryList)
+            {
+                Marshal.FreeHGlobal(memoryLocation);
+            }
+        }
+    }
+}
similarity index 94%
rename from win/CS/HandBrake.ApplicationServices/Interop/Helpers/NativeList.cs
rename to win/CS/HandBrake.Interop/Interop/Helpers/NativeList.cs
index a692b6c756ca783be1fb22ac77f07483af8b67fe..dc0f9c3db772d48d22a33afdda88bb4323d44502 100644 (file)
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="NativeList.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Represents a HandBrake style native list.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Helpers\r
-{\r
-    using System;\r
-    using System.Collections.Generic;\r
-    using System.Diagnostics;\r
-    using System.Runtime.InteropServices;\r
-\r
-    using HandBrake.ApplicationServices.Interop.HbLib;\r
-\r
-    /// <summary>\r
-    /// Represents a HandBrake style native list.\r
-    /// </summary>\r
-    internal class NativeList : IDisposable\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the NativeList class.\r
-        /// </summary>\r
-        /// <param name="listPtr">The pointer to use for the list.</param>\r
-        public NativeList(IntPtr listPtr)\r
-        {\r
-            this.Ptr = listPtr;\r
-        }\r
-\r
-        /// <summary>\r
-        /// The list of native memory locations allocated for this list.\r
-        /// </summary>\r
-        private readonly List<IntPtr> allocatedMemory = new List<IntPtr>();\r
-\r
-        /// <summary>\r
-        /// Gets the pointer to the native list.\r
-        /// </summary>\r
-        public IntPtr Ptr { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the number of items in the list.\r
-        /// </summary>\r
-        public int Count\r
-        {\r
-            get\r
-            {\r
-                Debug.WriteLine("Got a Zero Pointer in the NativeList");\r
-                return this.Ptr == IntPtr.Zero ? 0 : HBFunctions.hb_list_count(this.Ptr);\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the list of native memory locations allocated for this list.\r
-        /// </summary>\r
-        public List<IntPtr> AllocatedMemory\r
-        {\r
-            get\r
-            {\r
-                return this.allocatedMemory;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Adds an item to the end of the list.\r
-        /// </summary>\r
-        /// <param name="item">The item to add.</param>\r
-        public void Add(IntPtr item)\r
-        {\r
-            HBFunctions.hb_list_add(this.Ptr, item);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Inserts an item into the list.\r
-        /// </summary>\r
-        /// <param name="position">The index to insert the item at.</param>\r
-        /// <param name="item">The item to insert.</param>\r
-        public void Insert(int position, IntPtr item)\r
-        {\r
-            HBFunctions.hb_list_insert(this.Ptr, position, item);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Removes an item from the list.\r
-        /// </summary>\r
-        /// <param name="item">The item to remove.</param>\r
-        public void Remove(IntPtr item)\r
-        {\r
-            HBFunctions.hb_list_rem(this.Ptr, item);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets an item out of the list.\r
-        /// </summary>\r
-        /// <param name="i">Index in the list.</param>\r
-        /// <returns>The item at that index in the list.</returns>\r
-        public IntPtr this[int i]\r
-        {\r
-            get\r
-            {\r
-                return HBFunctions.hb_list_item(this.Ptr, i);\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Disposes resources associated with this object.\r
-        /// </summary>\r
-        public void Dispose()\r
-        {\r
-            IntPtr listPtrPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IntPtr)));\r
-            Marshal.WriteIntPtr(listPtrPtr, this.Ptr);\r
-            HBFunctions.hb_list_close(listPtrPtr);\r
-            Marshal.FreeHGlobal(listPtrPtr);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Creates a new list in unmanaged memory.\r
-        /// </summary>\r
-        /// <returns>The created list.</returns>\r
-        public static NativeList CreateList()\r
-        {\r
-            return new NativeList(HBFunctions.hb_list_init());\r
-        }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <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.Interop.Helpers
+{
+    using System;
+    using System.Collections.Generic;
+    using System.Diagnostics;
+    using System.Runtime.InteropServices;
+
+    using HandBrake.Interop.Interop.HbLib;
+
+    /// <summary>
+    /// Represents a HandBrake style native list.
+    /// </summary>
+    internal class NativeList : IDisposable
+    {
+        /// <summary>
+        /// Initializes a new instance of the NativeList class.
+        /// </summary>
+        /// <param name="listPtr">The pointer to use for the list.</param>
+        public NativeList(IntPtr listPtr)
+        {
+            this.Ptr = listPtr;
+        }
+
+        /// <summary>
+        /// The list of native memory locations allocated for this list.
+        /// </summary>
+        private readonly List<IntPtr> allocatedMemory = new List<IntPtr>();
+
+        /// <summary>
+        /// Gets the pointer to the native list.
+        /// </summary>
+        public IntPtr Ptr { get; private set; }
+
+        /// <summary>
+        /// Gets the number of items in the list.
+        /// </summary>
+        public int Count
+        {
+            get
+            {
+                Debug.WriteLine("Got a Zero Pointer in the NativeList");
+                return this.Ptr == IntPtr.Zero ? 0 : HBFunctions.hb_list_count(this.Ptr);
+            }
+        }
+
+        /// <summary>
+        /// Gets the list of native memory locations allocated for this list.
+        /// </summary>
+        public List<IntPtr> AllocatedMemory
+        {
+            get
+            {
+                return this.allocatedMemory;
+            }
+        }
+
+        /// <summary>
+        /// Adds an item to the end of the list.
+        /// </summary>
+        /// <param name="item">The item to add.</param>
+        public void Add(IntPtr item)
+        {
+            HBFunctions.hb_list_add(this.Ptr, item);
+        }
+
+        /// <summary>
+        /// Inserts an item into the list.
+        /// </summary>
+        /// <param name="position">The index to insert the item at.</param>
+        /// <param name="item">The item to insert.</param>
+        public void Insert(int position, IntPtr item)
+        {
+            HBFunctions.hb_list_insert(this.Ptr, position, item);
+        }
+
+        /// <summary>
+        /// Removes an item from the list.
+        /// </summary>
+        /// <param name="item">The item to remove.</param>
+        public void Remove(IntPtr item)
+        {
+            HBFunctions.hb_list_rem(this.Ptr, item);
+        }
+
+        /// <summary>
+        /// Gets an item out of the list.
+        /// </summary>
+        /// <param name="i">Index in the list.</param>
+        /// <returns>The item at that index in the list.</returns>
+        public IntPtr this[int i]
+        {
+            get
+            {
+                return HBFunctions.hb_list_item(this.Ptr, i);
+            }
+        }
+
+        /// <summary>
+        /// Disposes resources associated with this object.
+        /// </summary>
+        public void Dispose()
+        {
+            IntPtr listPtrPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IntPtr)));
+            Marshal.WriteIntPtr(listPtrPtr, this.Ptr);
+            HBFunctions.hb_list_close(listPtrPtr);
+            Marshal.FreeHGlobal(listPtrPtr);
+        }
+
+        /// <summary>
+        /// Creates a new list in unmanaged memory.
+        /// </summary>
+        /// <returns>The created list.</returns>
+        public static NativeList CreateList()
+        {
+            return new NativeList(HBFunctions.hb_list_init());
+        }
+    }
+}
similarity index 92%
rename from win/CS/HandBrake.ApplicationServices/Interop/Helpers/Utilities.cs
rename to win/CS/HandBrake.Interop/Interop/Helpers/Utilities.cs
index eba89bcaa5ff759e2b1c81d5466e9fac855f8d89..36921602379b55b58a8b9cc020c9c38e5eeaacd6 100644 (file)
@@ -1,49 +1,49 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Utilities.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the Utilities type.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Helpers\r
-{\r
-    /// <summary>\r
-    /// The utilities.\r
-    /// </summary>\r
-    internal static class Utilities\r
-    {\r
-        /// <summary>\r
-        /// Get the Greatest Common Factor\r
-        /// </summary>\r
-        /// <param name="a">\r
-        /// The a.\r
-        /// </param>\r
-        /// <param name="b">\r
-        /// The b.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The greatest common factor\r
-        /// </returns>\r
-        public static int GreatestCommonFactor(int a, int b)\r
-        {\r
-            if (a == 0)\r
-            {\r
-                return b;\r
-            }\r
-\r
-            if (b == 0)\r
-            {\r
-                return a;\r
-            }\r
-\r
-            if (a > b)\r
-            {\r
-                return GreatestCommonFactor(a % b, b);\r
-            }\r
-            \r
-            return GreatestCommonFactor(a, b % a);\r
-        }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Utilities.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 Utilities type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Helpers
+{
+    /// <summary>
+    /// The utilities.
+    /// </summary>
+    internal static class Utilities
+    {
+        /// <summary>
+        /// Get the Greatest Common Factor
+        /// </summary>
+        /// <param name="a">
+        /// The a.
+        /// </param>
+        /// <param name="b">
+        /// The b.
+        /// </param>
+        /// <returns>
+        /// The greatest common factor
+        /// </returns>
+        public static int GreatestCommonFactor(int a, int b)
+        {
+            if (a == 0)
+            {
+                return b;
+            }
+
+            if (b == 0)
+            {
+                return a;
+            }
+
+            if (a > b)
+            {
+                return GreatestCommonFactor(a % b, b);
+            }
+            
+            return GreatestCommonFactor(a, b % a);
+        }
+    }
+}
similarity index 90%
rename from win/CS/HandBrake.ApplicationServices/Interop/Interfaces/IHandBrakeInstance.cs
rename to win/CS/HandBrake.Interop/Interop/Interfaces/IHandBrakeInstance.cs
index 3f61499b94079452dd9b7824b8ab67235c530a53..7714e5222b4acfce28a5d2baa28c6d939ace7b0d 100644 (file)
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="IHandBrakeInstance.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The Interface for HandBrakeInstance\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Interfaces\r
-{\r
-    using System;\r
-\r
-    using HandBrake.ApplicationServices.Interop.EventArgs;\r
-    using HandBrake.ApplicationServices.Interop.Json.Encode;\r
-    using HandBrake.ApplicationServices.Interop.Json.Scan;\r
-    using HandBrake.ApplicationServices.Interop.Model.Preview;\r
-\r
-    /// <summary>\r
-    /// The Interface for HandBrakeInstance\r
-    /// </summary>\r
-    public interface IHandBrakeInstance\r
-    {\r
-        #region Events\r
-\r
-        /// <summary>\r
-        /// Fires when an encode has completed.\r
-        /// </summary>\r
-        event EventHandler<EncodeCompletedEventArgs> EncodeCompleted;\r
-\r
-        /// <summary>\r
-        /// Fires for progress updates when encoding.\r
-        /// </summary>\r
-        event EventHandler<EncodeProgressEventArgs> EncodeProgress;\r
-\r
-        /// <summary>\r
-        /// Fires when a scan has completed.\r
-        /// </summary>\r
-        event EventHandler<EventArgs> ScanCompleted;\r
-\r
-        /// <summary>\r
-        /// Fires for progress updates when scanning.\r
-        /// </summary>\r
-        event EventHandler<ScanProgressEventArgs> ScanProgress;\r
-\r
-        #endregion\r
-\r
-        #region Properties\r
-\r
-        /// <summary>\r
-        /// Gets the index of the default title.\r
-        /// </summary>\r
-        int FeatureTitle { get; }\r
-\r
-        /// <summary>\r
-        /// Gets the list of titles on this instance.\r
-        /// </summary>\r
-        JsonScanObject Titles { get; }\r
-\r
-        /// <summary>\r
-        /// Gets the HandBrake version string.\r
-        /// </summary>\r
-        string Version { get; }\r
-\r
-        /// <summary>\r
-        /// Gets the HandBrake build number.\r
-        /// </summary>\r
-        int Build { get; }\r
-\r
-        #endregion\r
-\r
-        #region Public Methods\r
-\r
-        /// <summary>\r
-        /// Initializes this instance.\r
-        /// </summary>\r
-        /// <param name="verbosity">\r
-        /// The code for the logging verbosity to use.\r
-        /// </param>\r
-        void Initialize(int verbosity);\r
-\r
-        /// <summary>\r
-        /// Frees any resources associated with this object.\r
-        /// </summary>\r
-        void Dispose();\r
-\r
-        /// <summary>\r
-        /// Gets an image for the given job and preview\r
-        /// </summary>\r
-        /// <remarks>\r
-        /// Only incorporates sizing and aspect ratio into preview image.\r
-        /// </remarks>\r
-        /// <param name="job">\r
-        /// The encode job to preview.\r
-        /// </param>\r
-        /// <param name="previewNumber">\r
-        /// The index of the preview to get (0-based).\r
-        /// </param>\r
-        /// <param name="deinterlace">\r
-        /// True to enable basic deinterlace of preview images.\r
-        /// </param>\r
-        /// <returns>\r
-        /// An image with the requested preview.\r
-        /// </returns>\r
-        RawPreviewData GetPreview(PreviewSettings job, int previewNumber, bool deinterlace);\r
-\r
-        /// <summary>\r
-        /// Pauses the current encode.\r
-        /// </summary>\r
-        void PauseEncode();\r
-\r
-        /// <summary>\r
-        /// Resumes a paused encode.\r
-        /// </summary>\r
-        void ResumeEncode();\r
-\r
-        /// <summary>\r
-        /// Starts an encode with the given job.\r
-        /// </summary>\r
-        /// <param name="jobToStart">\r
-        /// The job to start.\r
-        /// </param>\r
-        void StartEncode(JsonEncodeObject jobToStart);\r
-\r
-        /// <summary>\r
-        /// Starts a scan of the given path.\r
-        /// </summary>\r
-        /// <param name="path">\r
-        /// The path of the video to scan.\r
-        /// </param>\r
-        /// <param name="previewCount">\r
-        /// The number of previews to make on each title.\r
-        /// </param>\r
-        /// <param name="minDuration">\r
-        /// The min Duration.\r
-        /// </param>\r
-        void StartScan(string path, int previewCount, TimeSpan minDuration, int titleIndex);\r
-\r
-        /// <summary>\r
-        /// Stops the current encode.\r
-        /// </summary>\r
-        void StopEncode();\r
-\r
-        /// <summary>\r
-        /// Stop any running scans\r
-        /// </summary>\r
-        void StopScan();\r
-\r
-        #endregion\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="IHandBrakeInstance.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>
+//   The Interface for HandBrakeInstance
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Interfaces
+{
+    using System;
+
+    using HandBrake.Interop.Interop.EventArgs;
+    using HandBrake.Interop.Interop.Json.Encode;
+    using HandBrake.Interop.Interop.Json.Scan;
+    using HandBrake.Interop.Interop.Model.Preview;
+
+    /// <summary>
+    /// The Interface for HandBrakeInstance
+    /// </summary>
+    public interface IHandBrakeInstance
+    {
+        #region Events
+
+        /// <summary>
+        /// Fires when an encode has completed.
+        /// </summary>
+        event EventHandler<EncodeCompletedEventArgs> EncodeCompleted;
+
+        /// <summary>
+        /// Fires for progress updates when encoding.
+        /// </summary>
+        event EventHandler<EncodeProgressEventArgs> EncodeProgress;
+
+        /// <summary>
+        /// Fires when a scan has completed.
+        /// </summary>
+        event EventHandler<EventArgs> ScanCompleted;
+
+        /// <summary>
+        /// Fires for progress updates when scanning.
+        /// </summary>
+        event EventHandler<ScanProgressEventArgs> ScanProgress;
+
+        #endregion
+
+        #region Properties
+
+        /// <summary>
+        /// Gets the index of the default title.
+        /// </summary>
+        int FeatureTitle { get; }
+
+        /// <summary>
+        /// Gets the list of titles on this instance.
+        /// </summary>
+        JsonScanObject Titles { get; }
+
+        /// <summary>
+        /// Gets the HandBrake version string.
+        /// </summary>
+        string Version { get; }
+
+        /// <summary>
+        /// Gets the HandBrake build number.
+        /// </summary>
+        int Build { get; }
+
+        #endregion
+
+        #region Public Methods
+
+        /// <summary>
+        /// Initializes this instance.
+        /// </summary>
+        /// <param name="verbosity">
+        /// The code for the logging verbosity to use.
+        /// </param>
+        void Initialize(int verbosity);
+
+        /// <summary>
+        /// Frees any resources associated with this object.
+        /// </summary>
+        void Dispose();
+
+        /// <summary>
+        /// Gets an image for the given job and preview
+        /// </summary>
+        /// <remarks>
+        /// Only incorporates sizing and aspect ratio into preview image.
+        /// </remarks>
+        /// <param name="job">
+        /// The encode job to preview.
+        /// </param>
+        /// <param name="previewNumber">
+        /// The index of the preview to get (0-based).
+        /// </param>
+        /// <param name="deinterlace">
+        /// True to enable basic deinterlace of preview images.
+        /// </param>
+        /// <returns>
+        /// An image with the requested preview.
+        /// </returns>
+        RawPreviewData GetPreview(PreviewSettings job, int previewNumber, bool deinterlace);
+
+        /// <summary>
+        /// Pauses the current encode.
+        /// </summary>
+        void PauseEncode();
+
+        /// <summary>
+        /// Resumes a paused encode.
+        /// </summary>
+        void ResumeEncode();
+
+        /// <summary>
+        /// Starts an encode with the given job.
+        /// </summary>
+        /// <param name="jobToStart">
+        /// The job to start.
+        /// </param>
+        void StartEncode(JsonEncodeObject jobToStart);
+
+        /// <summary>
+        /// Starts a scan of the given path.
+        /// </summary>
+        /// <param name="path">
+        /// The path of the video to scan.
+        /// </param>
+        /// <param name="previewCount">
+        /// The number of previews to make on each title.
+        /// </param>
+        /// <param name="minDuration">
+        /// The min Duration.
+        /// </param>
+        void StartScan(string path, int previewCount, TimeSpan minDuration, int titleIndex);
+
+        /// <summary>
+        /// Stops the current encode.
+        /// </summary>
+        void StopEncode();
+
+        /// <summary>
+        /// Stop any running scans
+        /// </summary>
+        void StopScan();
+
+        #endregion
+    }
 }
\ No newline at end of file
similarity index 85%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Anamorphic/AnamorphicGeometry.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Anamorphic/AnamorphicGeometry.cs
index 96e257b5799eb31e7e730d1b32aa4e37eda841e7..6f6714caa155c9a281b427cb940612df4c4ef704 100644 (file)
@@ -1,29 +1,29 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="AnamorphicGeometry.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The geometry.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Anamorphic\r
-{\r
-    using HandBrake.ApplicationServices.Interop.Json.Shared;\r
-\r
-    /// <summary>\r
-    /// The geometry.\r
-    /// </summary>\r
-    public class AnamorphicGeometry\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the dest geometry.\r
-        /// </summary>\r
-        public DestSettings DestSettings { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the source geometry.\r
-        /// </summary>\r
-        public Geometry SourceGeometry { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="AnamorphicGeometry.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>
+//   The geometry.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Anamorphic
+{
+    using HandBrake.Interop.Interop.Json.Shared;
+
+    /// <summary>
+    /// The geometry.
+    /// </summary>
+    public class AnamorphicGeometry
+    {
+        /// <summary>
+        /// Gets or sets the dest geometry.
+        /// </summary>
+        public DestSettings DestSettings { get; set; }
+
+        /// <summary>
+        /// Gets or sets the source geometry.
+        /// </summary>
+        public Geometry SourceGeometry { get; set; }
+    }
 }
\ No newline at end of file
similarity index 91%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Anamorphic/DestSettings.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Anamorphic/DestSettings.cs
index 28971308beff8dc42f1c1c55c2a1641a2535ab37..99f38439bd5352e86e4de02b6cd9f0c43c5c757e 100644 (file)
@@ -1,69 +1,69 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="DestSettings.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The dest geometry.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Anamorphic\r
-{\r
-    using System.Collections.Generic;\r
-\r
-    using HandBrake.ApplicationServices.Interop.Json.Shared;\r
-\r
-    /// <summary>\r
-    /// The dest geometry.\r
-    /// </summary>\r
-    public class DestSettings\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="DestSettings"/> class.\r
-        /// </summary>\r
-        public DestSettings()\r
-        {\r
-            this.Geometry = new Geometry();\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the anamorphic mode.\r
-        /// </summary>\r
-        public int AnamorphicMode { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the crop.\r
-        /// </summary>\r
-        public List<int> Crop { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the Geometry\r
-        /// </summary>\r
-        public Geometry Geometry { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether itu par.\r
-        /// </summary>\r
-        public bool ItuPAR { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether keep display aspect.\r
-        /// </summary>\r
-        public int Keep { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the max height.\r
-        /// </summary>\r
-        public int MaxHeight { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the max width.\r
-        /// </summary>\r
-        public int MaxWidth { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the modulus.\r
-        /// </summary>\r
-        public int Modulus { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="DestSettings.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>
+//   The dest geometry.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Anamorphic
+{
+    using System.Collections.Generic;
+
+    using HandBrake.Interop.Interop.Json.Shared;
+
+    /// <summary>
+    /// The dest geometry.
+    /// </summary>
+    public class DestSettings
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="DestSettings"/> class.
+        /// </summary>
+        public DestSettings()
+        {
+            this.Geometry = new Geometry();
+        }
+
+        /// <summary>
+        /// Gets or sets the anamorphic mode.
+        /// </summary>
+        public int AnamorphicMode { get; set; }
+
+        /// <summary>
+        /// Gets or sets the crop.
+        /// </summary>
+        public List<int> Crop { get; set; }
+
+        /// <summary>
+        /// Gets or sets the Geometry
+        /// </summary>
+        public Geometry Geometry { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether itu par.
+        /// </summary>
+        public bool ItuPAR { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether keep display aspect.
+        /// </summary>
+        public int Keep { get; set; }
+
+        /// <summary>
+        /// Gets or sets the max height.
+        /// </summary>
+        public int MaxHeight { get; set; }
+
+        /// <summary>
+        /// Gets or sets the max width.
+        /// </summary>
+        public int MaxWidth { get; set; }
+
+        /// <summary>
+        /// Gets or sets the modulus.
+        /// </summary>
+        public int Modulus { get; set; }
+    }
 }
\ No newline at end of file
similarity index 91%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Audio.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Encode/Audio.cs
index 4e4b61d6b9460d1eaea09fcb81a4c15ab45c4550..924185f50918e3b6eab049a78c1704d91259642a 100644 (file)
@@ -1,34 +1,34 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Audio.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The audio.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Encode\r
-{\r
-    using System.Collections.Generic;\r
-\r
-    /// <summary>\r
-    /// The audio.\r
-    /// </summary>\r
-    public class Audio\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the audio list.\r
-        /// </summary>\r
-        public List<AudioTrack> AudioList { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the copy mask.\r
-        /// </summary>\r
-        public uint[] CopyMask { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the fallback encoder.\r
-        /// </summary>\r
-        public int FallbackEncoder { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Audio.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>
+//   The audio.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Encode
+{
+    using System.Collections.Generic;
+
+    /// <summary>
+    /// The audio.
+    /// </summary>
+    public class Audio
+    {
+        /// <summary>
+        /// Gets or sets the audio list.
+        /// </summary>
+        public List<AudioTrack> AudioList { get; set; }
+
+        /// <summary>
+        /// Gets or sets the copy mask.
+        /// </summary>
+        public uint[] CopyMask { get; set; }
+
+        /// <summary>
+        /// Gets or sets the fallback encoder.
+        /// </summary>
+        public int FallbackEncoder { get; set; }
+    }
 }
\ No newline at end of file
similarity index 94%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/AudioTrack.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Encode/AudioTrack.cs
index 2bde4cca401a6944bec78d580374ad8b7552aa51..64ef94fd7c018958b8d1c589b1dcddda6ef1bde9 100644 (file)
@@ -1,77 +1,77 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="AudioTrack.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Represents an audio track to encode.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Encode\r
-{\r
-    /// <summary>\r
-    /// Represents an audio track to encode.\r
-    /// </summary>\r
-    public class AudioTrack\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the bitrate.\r
-        /// </summary>\r
-        public int? Bitrate { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the compression level.\r
-        /// </summary>\r
-        public double? CompressionLevel { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the drc.\r
-        /// </summary>\r
-        public double DRC { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the encoder.\r
-        /// </summary>\r
-        public int Encoder { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the gain.\r
-        /// </summary>\r
-        public double Gain { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the mixdown.\r
-        /// </summary>\r
-        public int Mixdown { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether normalize mix level.\r
-        /// </summary>\r
-        public bool NormalizeMixLevel { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the quality.\r
-        /// </summary>\r
-        public double? Quality { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the samplerate.\r
-        /// </summary>\r
-        public int Samplerate { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the Name of the audio track.\r
-        /// </summary>\r
-        public string Name { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the track.\r
-        /// </summary>\r
-        public int Track { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the dither method.\r
-        /// </summary>\r
-        public int DitherMethod { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <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>
+//   Represents an audio track to encode.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Encode
+{
+    /// <summary>
+    /// Represents an audio track to encode.
+    /// </summary>
+    public class AudioTrack
+    {
+        /// <summary>
+        /// Gets or sets the bitrate.
+        /// </summary>
+        public int? Bitrate { get; set; }
+
+        /// <summary>
+        /// Gets or sets the compression level.
+        /// </summary>
+        public double? CompressionLevel { get; set; }
+
+        /// <summary>
+        /// Gets or sets the drc.
+        /// </summary>
+        public double DRC { get; set; }
+
+        /// <summary>
+        /// Gets or sets the encoder.
+        /// </summary>
+        public int Encoder { get; set; }
+
+        /// <summary>
+        /// Gets or sets the gain.
+        /// </summary>
+        public double Gain { get; set; }
+
+        /// <summary>
+        /// Gets or sets the mixdown.
+        /// </summary>
+        public int Mixdown { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether normalize mix level.
+        /// </summary>
+        public bool NormalizeMixLevel { get; set; }
+
+        /// <summary>
+        /// Gets or sets the quality.
+        /// </summary>
+        public double? Quality { get; set; }
+
+        /// <summary>
+        /// Gets or sets the samplerate.
+        /// </summary>
+        public int Samplerate { get; set; }
+
+        /// <summary>
+        /// Gets or sets the Name of the audio track.
+        /// </summary>
+        public string Name { get; set; }
+
+        /// <summary>
+        /// Gets or sets the track.
+        /// </summary>
+        public int Track { get; set; }
+
+        /// <summary>
+        /// Gets or sets the dither method.
+        /// </summary>
+        public int DitherMethod { get; set; }
+    }
 }
\ No newline at end of file
similarity index 90%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Chapter.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Encode/Chapter.cs
index 95eeb005797597f0ac84c9d99d1962fffc605c39..ae8924e5d644b92578f17867f7077b33263c9231 100644 (file)
@@ -1,22 +1,22 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Chapter.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Represents a chapter to encode.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Encode\r
-{\r
-    /// <summary>\r
-    /// Represents a chapter to encode.\r
-    /// </summary>\r
-    public class Chapter\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the name.\r
-        /// </summary>\r
-        public string Name { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <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>
+//   Represents a chapter to encode.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Encode
+{
+    /// <summary>
+    /// Represents a chapter to encode.
+    /// </summary>
+    public class Chapter
+    {
+        /// <summary>
+        /// Gets or sets the name.
+        /// </summary>
+        public string Name { get; set; }
+    }
 }
\ No newline at end of file
similarity index 93%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Destination.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Encode/Destination.cs
index 910a541ca1fb6f22e4702c11913eea8af76d8878..0d8b2daebc059322cf95c28dea1045bff0fa5151 100644 (file)
@@ -1,49 +1,49 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Destination.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The destination.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Encode\r
-{\r
-    using System.Collections.Generic;\r
-\r
-    /// <summary>\r
-    /// The destination.\r
-    /// </summary>\r
-    public class Destination\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the chapter list.\r
-        /// </summary>\r
-        public List<Chapter> ChapterList { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether chapter markers.\r
-        /// </summary>\r
-        public bool ChapterMarkers { get; set; }\r
-\r
-        /// <summary>\r
-        /// Use Legacy A/V Alignment rather than Edit Lists.\r
-        /// </summary>\r
-        public bool AlignAVStart { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the file.\r
-        /// </summary>\r
-        public string File { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the mp 4 options.\r
-        /// </summary>\r
-        public Mp4Options Mp4Options { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the mux.\r
-        /// </summary>\r
-        public int Mux { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Destination.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>
+//   The destination.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Encode
+{
+    using System.Collections.Generic;
+
+    /// <summary>
+    /// The destination.
+    /// </summary>
+    public class Destination
+    {
+        /// <summary>
+        /// Gets or sets the chapter list.
+        /// </summary>
+        public List<Chapter> ChapterList { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether chapter markers.
+        /// </summary>
+        public bool ChapterMarkers { get; set; }
+
+        /// <summary>
+        /// Use Legacy A/V Alignment rather than Edit Lists.
+        /// </summary>
+        public bool AlignAVStart { get; set; }
+
+        /// <summary>
+        /// Gets or sets the file.
+        /// </summary>
+        public string File { get; set; }
+
+        /// <summary>
+        /// Gets or sets the mp 4 options.
+        /// </summary>
+        public Mp4Options Mp4Options { get; set; }
+
+        /// <summary>
+        /// Gets or sets the mux.
+        /// </summary>
+        public int Mux { get; set; }
+    }
 }
\ No newline at end of file
similarity index 90%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Filter.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Encode/Filter.cs
index 4479f5d77bc6cc2019cf540d470c8274059c7b44..9cd5161acdf0a26e19f8bcce680640d1424eee7c 100644 (file)
@@ -1,29 +1,29 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Filter.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The filter list.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Encode\r
-{\r
-    using Newtonsoft.Json.Linq;\r
-\r
-    /// <summary>\r
-    /// The filter list.\r
-    /// </summary>\r
-    public class Filter\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the id.\r
-        /// </summary>\r
-        public int ID { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the settings.\r
-        /// </summary>\r
-        public JToken Settings { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Filter.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>
+//   The filter list.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Encode
+{
+    using Newtonsoft.Json.Linq;
+
+    /// <summary>
+    /// The filter list.
+    /// </summary>
+    public class Filter
+    {
+        /// <summary>
+        /// Gets or sets the id.
+        /// </summary>
+        public int ID { get; set; }
+
+        /// <summary>
+        /// Gets or sets the settings.
+        /// </summary>
+        public JToken Settings { get; set; }
+    }
 }
\ No newline at end of file
similarity index 90%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Filters.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Encode/Filters.cs
index 2e767b18a840152b0bcb919efbc6aef0b8f7fa1e..9c664cfa5c76b7cf1906d6e7fd559998f63fa50c 100644 (file)
@@ -1,24 +1,24 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Filters.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The filter.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Encode\r
-{\r
-    using System.Collections.Generic;\r
-\r
-    /// <summary>\r
-    /// The filter.\r
-    /// </summary>\r
-    public class Filters\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the filter list.\r
-        /// </summary>\r
-        public List<Filter> FilterList { get; set; }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Filters.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>
+//   The filter.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Encode
+{
+    using System.Collections.Generic;
+
+    /// <summary>
+    /// The filter.
+    /// </summary>
+    public class Filters
+    {
+        /// <summary>
+        /// Gets or sets the filter list.
+        /// </summary>
+        public List<Filter> FilterList { get; set; }
+    }
+}
similarity index 90%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/JsonEncodeObject.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Encode/JsonEncodeObject.cs
index 68baffcb4860cb52b0c8e6cf9a0a0cf49fc09101..fa3d26c26802678cfa877d3c0a564892996dc2ee 100644 (file)
@@ -1,64 +1,64 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="JsonEncodeObject.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The root object.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Encode\r
-{\r
-    using HandBrake.ApplicationServices.Interop.Json.Shared;\r
-\r
-    /// <summary>\r
-    /// The root object.\r
-    /// </summary>\r
-    public class JsonEncodeObject\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the audio.\r
-        /// </summary>\r
-        public Audio Audio { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the destination.\r
-        /// </summary>\r
-        public Destination Destination { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the filter.\r
-        /// </summary>\r
-        public Filters Filters { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the PAR\r
-        /// </summary>\r
-        public PAR PAR { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the meta data.\r
-        /// </summary>\r
-        public Metadata Metadata { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the sequence id.\r
-        /// </summary>\r
-        public int SequenceID { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the source.\r
-        /// </summary>\r
-        public Source Source { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the subtitle.\r
-        /// </summary>\r
-        public Subtitles Subtitle { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the video.\r
-        /// </summary>\r
-        public Video Video { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="JsonEncodeObject.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>
+//   The root object.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Encode
+{
+    using HandBrake.Interop.Interop.Json.Shared;
+
+    /// <summary>
+    /// The root object.
+    /// </summary>
+    public class JsonEncodeObject
+    {
+        /// <summary>
+        /// Gets or sets the audio.
+        /// </summary>
+        public Audio Audio { get; set; }
+
+        /// <summary>
+        /// Gets or sets the destination.
+        /// </summary>
+        public Destination Destination { get; set; }
+
+        /// <summary>
+        /// Gets or sets the filter.
+        /// </summary>
+        public Filters Filters { get; set; }
+
+        /// <summary>
+        /// Gets or sets the PAR
+        /// </summary>
+        public PAR PAR { get; set; }
+
+        /// <summary>
+        /// Gets or sets the meta data.
+        /// </summary>
+        public Metadata Metadata { get; set; }
+
+        /// <summary>
+        /// Gets or sets the sequence id.
+        /// </summary>
+        public int SequenceID { get; set; }
+
+        /// <summary>
+        /// Gets or sets the source.
+        /// </summary>
+        public Source Source { get; set; }
+
+        /// <summary>
+        /// Gets or sets the subtitle.
+        /// </summary>
+        public Subtitles Subtitle { get; set; }
+
+        /// <summary>
+        /// Gets or sets the video.
+        /// </summary>
+        public Video Video { get; set; }
+    }
 }
\ No newline at end of file
similarity index 93%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/MetaData.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Encode/Metadata.cs
index c193527eb5931cf70bc6e28d3dfc96cb33cdf673..adf82c09ce16187135f1146b81b2ffad8bb12a66 100644 (file)
@@ -1,62 +1,62 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Metadata.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The meta data.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Encode\r
-{\r
-    /// <summary>\r
-    ///     The meta data.\r
-    /// </summary>\r
-    public class Metadata\r
-    {\r
-        /// <summary>\r
-        ///     Gets or sets the album artist.\r
-        /// </summary>\r
-        public string AlbumArtist { get; set; }\r
-\r
-        /// <summary>\r
-        ///     Gets or sets the artist.\r
-        /// </summary>\r
-        public string Artist { get; set; }\r
-\r
-        /// <summary>\r
-        ///     Gets or sets the comment.\r
-        /// </summary>\r
-        public string Comment { get; set; }\r
-\r
-        /// <summary>\r
-        ///     Gets or sets the composer.\r
-        /// </summary>\r
-        public string Composer { get; set; }\r
-\r
-        /// <summary>\r
-        ///     Gets or sets the description.\r
-        /// </summary>\r
-        public string Description { get; set; }\r
-\r
-        /// <summary>\r
-        ///     Gets or sets the genre.\r
-        /// </summary>\r
-        public string Genre { get; set; }\r
-\r
-        /// <summary>\r
-        ///     Gets or sets the long description.\r
-        /// </summary>\r
-        public string LongDescription { get; set; }\r
-\r
-        /// <summary>\r
-        ///     Gets or sets the name.\r
-        /// </summary>\r
-        public string Name { get; set; }\r
-\r
-        /// <summary>\r
-        ///     Gets or sets the release date.\r
-        /// </summary>\r
-        public string ReleaseDate { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Metadata.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>
+//   The meta data.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Encode
+{
+    /// <summary>
+    ///     The meta data.
+    /// </summary>
+    public class Metadata
+    {
+        /// <summary>
+        ///     Gets or sets the album artist.
+        /// </summary>
+        public string AlbumArtist { get; set; }
+
+        /// <summary>
+        ///     Gets or sets the artist.
+        /// </summary>
+        public string Artist { get; set; }
+
+        /// <summary>
+        ///     Gets or sets the comment.
+        /// </summary>
+        public string Comment { get; set; }
+
+        /// <summary>
+        ///     Gets or sets the composer.
+        /// </summary>
+        public string Composer { get; set; }
+
+        /// <summary>
+        ///     Gets or sets the description.
+        /// </summary>
+        public string Description { get; set; }
+
+        /// <summary>
+        ///     Gets or sets the genre.
+        /// </summary>
+        public string Genre { get; set; }
+
+        /// <summary>
+        ///     Gets or sets the long description.
+        /// </summary>
+        public string LongDescription { get; set; }
+
+        /// <summary>
+        ///     Gets or sets the name.
+        /// </summary>
+        public string Name { get; set; }
+
+        /// <summary>
+        ///     Gets or sets the release date.
+        /// </summary>
+        public string ReleaseDate { get; set; }
+    }
 }
\ No newline at end of file
similarity index 91%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Mp4Options.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Encode/Mp4Options.cs
index ad12e4e697763fa134c95e765ea61fd3c4326c00..2dc8333753e4228e4667a1731d4251212906c567 100644 (file)
@@ -1,27 +1,27 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Mp4Options.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The mp 4 options.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Encode\r
-{\r
-    /// <summary>\r
-    /// The mp 4 options.\r
-    /// </summary>\r
-    public class Mp4Options\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether ipod atom.\r
-        /// </summary>\r
-        public bool IpodAtom { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether mp 4 optimize.\r
-        /// </summary>\r
-        public bool Mp4Optimize { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Mp4Options.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>
+//   The mp 4 options.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Encode
+{
+    /// <summary>
+    /// The mp 4 options.
+    /// </summary>
+    public class Mp4Options
+    {
+        /// <summary>
+        /// Gets or sets a value indicating whether ipod atom.
+        /// </summary>
+        public bool IpodAtom { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether mp 4 optimize.
+        /// </summary>
+        public bool Mp4Optimize { get; set; }
+    }
 }
\ No newline at end of file
similarity index 90%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/QSV.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Encode/QSV.cs
index 0ca12064338b16f6267e51ca9831374866c0eafc..64286ab282d04e56d08199437b22bffb08bba284 100644 (file)
@@ -1,27 +1,27 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="QSV.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The qsv.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Encode\r
-{\r
-    /// <summary>\r
-    /// The qsv.\r
-    /// </summary>\r
-    public class QSV\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether decode.\r
-        /// </summary>\r
-        public bool Decode { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the async depth.\r
-        /// </summary>\r
-        public int AsyncDepth { get; set; }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="QSV.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>
+//   The qsv.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Encode
+{
+    /// <summary>
+    /// The qsv.
+    /// </summary>
+    public class QSV
+    {
+        /// <summary>
+        /// Gets or sets a value indicating whether decode.
+        /// </summary>
+        public bool Decode { get; set; }
+
+        /// <summary>
+        /// Gets or sets the async depth.
+        /// </summary>
+        public int AsyncDepth { get; set; }
+    }
+}
similarity index 92%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Range.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Encode/Range.cs
index f4b3724d294a9b76f2fe0276f0ba957c0f2e2619..2327e359f8ec76ef2f964c45f91393ea4cc608c6 100644 (file)
@@ -1,38 +1,38 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Range.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The range.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Encode\r
-{\r
-    /// <summary>\r
-    /// The range.\r
-    /// </summary>\r
-    public class Range\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the chapter end.\r
-        /// Type is "chapter", "time", "frame", or "preview".\r
-        /// </summary>\r
-        public string Type { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the chapter start.\r
-        /// </summary>\r
-        public long? Start { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the frame to start.\r
-        /// </summary>\r
-        public long? End { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the seek points.\r
-        /// </summary>\r
-        public long? SeekPoints { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Range.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>
+//   The range.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Encode
+{
+    /// <summary>
+    /// The range.
+    /// </summary>
+    public class Range
+    {
+        /// <summary>
+        /// Gets or sets the chapter end.
+        /// Type is "chapter", "time", "frame", or "preview".
+        /// </summary>
+        public string Type { get; set; }
+
+        /// <summary>
+        /// Gets or sets the chapter start.
+        /// </summary>
+        public long? Start { get; set; }
+
+        /// <summary>
+        /// Gets or sets the frame to start.
+        /// </summary>
+        public long? End { get; set; }
+
+        /// <summary>
+        /// Gets or sets the seek points.
+        /// </summary>
+        public long? SeekPoints { get; set; }
+    }
 }
\ No newline at end of file
similarity index 91%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/SRT.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Encode/SRT.cs
index 94229c97b1366b70feec4294c21d4a75b6b72e5a..96f42a52fab5ae9b20b93a1ccfebdad9023d7997 100644 (file)
@@ -1,32 +1,32 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="SRT.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The srt.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Encode\r
-{\r
-    /// <summary>\r
-    /// The srt.\r
-    /// </summary>\r
-    public class SRT\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the codeset.\r
-        /// </summary>\r
-        public string Codeset { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the filename.\r
-        /// </summary>\r
-        public string Filename { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the language.\r
-        /// </summary>\r
-        public string Language { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="SRT.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>
+//   The srt.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Encode
+{
+    /// <summary>
+    /// The srt.
+    /// </summary>
+    public class SRT
+    {
+        /// <summary>
+        /// Gets or sets the codeset.
+        /// </summary>
+        public string Codeset { get; set; }
+
+        /// <summary>
+        /// Gets or sets the filename.
+        /// </summary>
+        public string Filename { get; set; }
+
+        /// <summary>
+        /// Gets or sets the language.
+        /// </summary>
+        public string Language { get; set; }
+    }
 }
\ No newline at end of file
similarity index 91%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Source.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Encode/Source.cs
index 27a746c36c0e34de1a305f6fd1b0190bc8c61b68..7f156c0c6e170ab7e281fedeca5a7ee9be0ae4ad 100644 (file)
@@ -1,37 +1,37 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Source.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The source.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Encode\r
-{\r
-    /// <summary>\r
-    /// The source.\r
-    /// </summary>\r
-    public class Source\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the angle.\r
-        /// </summary>\r
-        public int Angle { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the range.\r
-        /// </summary>\r
-        public Range Range { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the title.\r
-        /// </summary>\r
-        public int Title { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the path.\r
-        /// </summary>\r
-        public string Path { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Source.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>
+//   The source.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Encode
+{
+    /// <summary>
+    /// The source.
+    /// </summary>
+    public class Source
+    {
+        /// <summary>
+        /// Gets or sets the angle.
+        /// </summary>
+        public int Angle { get; set; }
+
+        /// <summary>
+        /// Gets or sets the range.
+        /// </summary>
+        public Range Range { get; set; }
+
+        /// <summary>
+        /// Gets or sets the title.
+        /// </summary>
+        public int Title { get; set; }
+
+        /// <summary>
+        /// Gets or sets the path.
+        /// </summary>
+        public string Path { get; set; }
+    }
 }
\ No newline at end of file
similarity index 92%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/SubtitleSearch.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Encode/SubtitleSearch.cs
index b6c5cbd63afa7e9ca477b7f1dc60eb658b5b9dd7..28558f48b8816374c10b06381cb3804457deaf8f 100644 (file)
@@ -1,37 +1,37 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="SubtitleSearch.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The search.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Encode\r
-{\r
-    /// <summary>\r
-    /// The search.\r
-    /// </summary>\r
-    public class SubtitleSearch\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether burn.\r
-        /// </summary>\r
-        public bool Burn { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether default.\r
-        /// </summary>\r
-        public bool Default { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether enable.\r
-        /// </summary>\r
-        public bool Enable { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether forced.\r
-        /// </summary>\r
-        public bool Forced { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="SubtitleSearch.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>
+//   The search.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Encode
+{
+    /// <summary>
+    /// The search.
+    /// </summary>
+    public class SubtitleSearch
+    {
+        /// <summary>
+        /// Gets or sets a value indicating whether burn.
+        /// </summary>
+        public bool Burn { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether default.
+        /// </summary>
+        public bool Default { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether enable.
+        /// </summary>
+        public bool Enable { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether forced.
+        /// </summary>
+        public bool Forced { get; set; }
+    }
 }
\ No newline at end of file
similarity index 93%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/SubtitleTrack.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Encode/SubtitleTrack.cs
index 929c001d01813bc27fc6223bd0a555082af1e02c..ab51a1db96a2b6f1db7eb7d82e16850d489de847 100644 (file)
@@ -1,52 +1,52 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="SubtitleTrack.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Represents a subtitle track to encode.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Encode\r
-{\r
-    /// <summary>\r
-    /// Represents a subtitle track to encode.\r
-    /// </summary>\r
-    public class SubtitleTrack\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether burn.\r
-        /// </summary>\r
-        public bool Burn { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether default.\r
-        /// </summary>\r
-        public bool Default { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether force.\r
-        /// </summary>\r
-        public bool Forced { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the id.\r
-        /// </summary>\r
-        public int ID { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the offset.\r
-        /// </summary>\r
-        public int Offset { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the track.\r
-        /// </summary>\r
-        public int Track { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the srt.\r
-        /// </summary>\r
-        public SRT SRT { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="SubtitleTrack.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 subtitle track to encode.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Encode
+{
+    /// <summary>
+    /// Represents a subtitle track to encode.
+    /// </summary>
+    public class SubtitleTrack
+    {
+        /// <summary>
+        /// Gets or sets a value indicating whether burn.
+        /// </summary>
+        public bool Burn { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether default.
+        /// </summary>
+        public bool Default { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether force.
+        /// </summary>
+        public bool Forced { get; set; }
+
+        /// <summary>
+        /// Gets or sets the id.
+        /// </summary>
+        public int ID { get; set; }
+
+        /// <summary>
+        /// Gets or sets the offset.
+        /// </summary>
+        public int Offset { get; set; }
+
+        /// <summary>
+        /// Gets or sets the track.
+        /// </summary>
+        public int Track { get; set; }
+
+        /// <summary>
+        /// Gets or sets the srt.
+        /// </summary>
+        public SRT SRT { get; set; }
+    }
 }
\ No newline at end of file
similarity index 91%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Subtitles.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Encode/Subtitles.cs
index 2488017898c53be171d71ebbdc1346fcd4694d2b..8c565d1858be93cbdb233ef8aaaac0edbf6170e3 100644 (file)
@@ -1,29 +1,29 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Subtitles.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The subtitle.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Encode\r
-{\r
-    using System.Collections.Generic;\r
-\r
-    /// <summary>\r
-    /// The subtitle.\r
-    /// </summary>\r
-    public class Subtitles\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the search.\r
-        /// </summary>\r
-        public SubtitleSearch Search { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the subtitle list.\r
-        /// </summary>\r
-        public List<SubtitleTrack> SubtitleList { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <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>
+//   The subtitle.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Encode
+{
+    using System.Collections.Generic;
+
+    /// <summary>
+    /// The subtitle.
+    /// </summary>
+    public class Subtitles
+    {
+        /// <summary>
+        /// Gets or sets the search.
+        /// </summary>
+        public SubtitleSearch Search { get; set; }
+
+        /// <summary>
+        /// Gets or sets the subtitle list.
+        /// </summary>
+        public List<SubtitleTrack> SubtitleList { get; set; }
+    }
 }
\ No newline at end of file
similarity index 94%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Video.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Encode/Video.cs
index b229107683622fbe613d5e4e8f6ae0eb8f689447..f77c0d3350e5979c66d6d587f0abcde6f9d24458 100644 (file)
@@ -1,90 +1,90 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Video.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The video.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Encode\r
-{\r
-    /// <summary>\r
-    /// The video.\r
-    /// </summary>\r
-    public class Video\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="Video"/> class.\r
-        /// </summary>\r
-        public Video()\r
-        {\r
-            this.QSV = new QSV();\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the codec.\r
-        /// </summary>\r
-        public int Encoder { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the level.\r
-        /// </summary>\r
-        public string Level { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the bitrate for the encode.\r
-        /// </summary>\r
-        public int? Bitrate { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether two pass.\r
-        /// </summary>\r
-        public bool TwoPass { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether Turbo First Pass. For x264/5\r
-        /// </summary>\r
-        public bool Turbo { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the Colour Matrix Code\r
-        /// </summary>\r
-        public int ColorMatrixCode { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the options.\r
-        /// </summary>\r
-        public string Options { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the preset.\r
-        /// </summary>\r
-        public string Preset { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the profile.\r
-        /// </summary>\r
-        public string Profile { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the quality.\r
-        /// </summary>\r
-        public double? Quality { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the tune.\r
-        /// </summary>\r
-        public string Tune { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether hw decode.\r
-        /// </summary>\r
-        public bool HWDecode { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the qsv.\r
-        /// </summary>\r
-        public QSV QSV { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Video.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>
+//   The video.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Encode
+{
+    /// <summary>
+    /// The video.
+    /// </summary>
+    public class Video
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Video"/> class.
+        /// </summary>
+        public Video()
+        {
+            this.QSV = new QSV();
+        }
+
+        /// <summary>
+        /// Gets or sets the codec.
+        /// </summary>
+        public int Encoder { get; set; }
+
+        /// <summary>
+        /// Gets or sets the level.
+        /// </summary>
+        public string Level { get; set; }
+
+        /// <summary>
+        /// Gets or sets the bitrate for the encode.
+        /// </summary>
+        public int? Bitrate { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether two pass.
+        /// </summary>
+        public bool TwoPass { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether Turbo First Pass. For x264/5
+        /// </summary>
+        public bool Turbo { get; set; }
+
+        /// <summary>
+        /// Gets or sets the Colour Matrix Code
+        /// </summary>
+        public int ColorMatrixCode { get; set; }
+
+        /// <summary>
+        /// Gets or sets the options.
+        /// </summary>
+        public string Options { get; set; }
+
+        /// <summary>
+        /// Gets or sets the preset.
+        /// </summary>
+        public string Preset { get; set; }
+
+        /// <summary>
+        /// Gets or sets the profile.
+        /// </summary>
+        public string Profile { get; set; }
+
+        /// <summary>
+        /// Gets or sets the quality.
+        /// </summary>
+        public double? Quality { get; set; }
+
+        /// <summary>
+        /// Gets or sets the tune.
+        /// </summary>
+        public string Tune { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether hw decode.
+        /// </summary>
+        public bool HWDecode { get; set; }
+
+        /// <summary>
+        /// Gets or sets the qsv.
+        /// </summary>
+        public QSV QSV { get; set; }
+    }
 }
\ No newline at end of file
similarity index 93%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Filters/PresetTune.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Filters/PresetTune.cs
index f69cec099d45379f34a8c69b0dfd470c983b9c24..ad76489014f87584a2363faad6bcfcd1676b50bf 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>
 // --------------------------------------------------------------------------------------------------------------------
 
-namespace HandBrake.ApplicationServices.Interop.Json.Filters
+namespace HandBrake.Interop.Interop.Json.Filters
 {
     /// <summary>
     /// The preset tune.
similarity index 94%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/AudioList.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Presets/AudioList.cs
index 8ad95d173becd856dbbbb4de8482758f5bfce5db..49f875de9ec3639bf5b9955940d2540680f64965 100644 (file)
@@ -1,72 +1,72 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="AudioList.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The audio list.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Presets\r
-{\r
-    /// <summary>\r
-    /// The audio list.\r
-    /// </summary>\r
-    public class AudioList\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the audio bitrate.\r
-        /// </summary>\r
-        public int AudioBitrate { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the audio compression level.\r
-        /// </summary>\r
-        public double AudioCompressionLevel { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the audio dither method.\r
-        /// </summary>\r
-        public string AudioDitherMethod { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the audio encoder.\r
-        /// </summary>\r
-        public string AudioEncoder { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the audio mixdown. (ShortName)\r
-        /// </summary>\r
-        public string AudioMixdown { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether audio normalize mix level.\r
-        /// </summary>\r
-        public bool AudioNormalizeMixLevel { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the audio samplerate.\r
-        /// </summary>\r
-        public string AudioSamplerate { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether audio track quality enable.\r
-        /// </summary>\r
-        public bool AudioTrackQualityEnable { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the audio track quality.\r
-        /// </summary>\r
-        public double AudioTrackQuality { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the audio track gain slider.\r
-        /// </summary>\r
-        public double AudioTrackGainSlider { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the audio track drc slider.\r
-        /// </summary>\r
-        public double AudioTrackDRCSlider { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="AudioList.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>
+//   The audio list.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Presets
+{
+    /// <summary>
+    /// The audio list.
+    /// </summary>
+    public class AudioList
+    {
+        /// <summary>
+        /// Gets or sets the audio bitrate.
+        /// </summary>
+        public int AudioBitrate { get; set; }
+
+        /// <summary>
+        /// Gets or sets the audio compression level.
+        /// </summary>
+        public double AudioCompressionLevel { get; set; }
+
+        /// <summary>
+        /// Gets or sets the audio dither method.
+        /// </summary>
+        public string AudioDitherMethod { get; set; }
+
+        /// <summary>
+        /// Gets or sets the audio encoder.
+        /// </summary>
+        public string AudioEncoder { get; set; }
+
+        /// <summary>
+        /// Gets or sets the audio mixdown. (ShortName)
+        /// </summary>
+        public string AudioMixdown { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether audio normalize mix level.
+        /// </summary>
+        public bool AudioNormalizeMixLevel { get; set; }
+
+        /// <summary>
+        /// Gets or sets the audio samplerate.
+        /// </summary>
+        public string AudioSamplerate { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether audio track quality enable.
+        /// </summary>
+        public bool AudioTrackQualityEnable { get; set; }
+
+        /// <summary>
+        /// Gets or sets the audio track quality.
+        /// </summary>
+        public double AudioTrackQuality { get; set; }
+
+        /// <summary>
+        /// Gets or sets the audio track gain slider.
+        /// </summary>
+        public double AudioTrackGainSlider { get; set; }
+
+        /// <summary>
+        /// Gets or sets the audio track drc slider.
+        /// </summary>
+        public double AudioTrackDRCSlider { get; set; }
+    }
 }
\ No newline at end of file
similarity index 96%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/HBPreset.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Presets/HBPreset.cs
index 118b5cbf75b2add1a1fc0404973c127fcbd64bbd..2ea758d5d6fa9ea90731ce6e332022e11875db27 100644 (file)
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="HBPreset.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The preset.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Presets\r
-{\r
-    using System.Collections.Generic;\r
-\r
-    /// <summary>\r
-    ///     The preset.\r
-    /// </summary>\r
-    public class HBPreset\r
-    {\r
-        public bool AlignAVStart { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the audio copy mask.\r
-        /// </summary>\r
-        public List<string> AudioCopyMask { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the audio encoder fallback.\r
-        /// </summary>\r
-        public string AudioEncoderFallback { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the audio language list.\r
-        /// </summary>\r
-        public List<string> AudioLanguageList { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the audio list.\r
-        /// </summary>\r
-        public List<AudioList> AudioList { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether audio secondary encoder mode.\r
-        /// </summary>\r
-        public bool AudioSecondaryEncoderMode { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the audio track selection behavior.\r
-        /// </summary>\r
-        public string AudioTrackSelectionBehavior { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether chapter markers.\r
-        /// </summary>\r
-        public bool ChapterMarkers { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the children array.\r
-        /// </summary>\r
-        public List<object> ChildrenArray { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether default.\r
-        /// </summary>\r
-        public bool Default { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the file format.\r
-        /// </summary>\r
-        public string FileFormat { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether folder.\r
-        /// </summary>\r
-        public bool Folder { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether folder open.\r
-        /// </summary>\r
-        public bool FolderOpen { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether mp 4 http optimize.\r
-        /// </summary>\r
-        public bool Mp4HttpOptimize { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether mp 4 i pod compatible.\r
-        /// </summary>\r
-        public bool Mp4iPodCompatible { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether picture auto crop.\r
-        /// </summary>\r
-        public bool PictureAutoCrop { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture bottom crop.\r
-        /// </summary>\r
-        public int PictureBottomCrop { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture left crop.\r
-        /// </summary>\r
-        public int PictureLeftCrop { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture right crop.\r
-        /// </summary>\r
-        public int PictureRightCrop { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture top crop.\r
-        /// </summary>\r
-        public int PictureTopCrop { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture dar width.\r
-        /// </summary>\r
-        public int PictureDARWidth { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture deblock.\r
-        /// </summary>\r
-        public int PictureDeblock { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether picture decomb deinterlace.\r
-        /// </summary>\r
-        public string PictureDeinterlaceFilter { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture comb detect preset.\r
-        /// </summary>\r
-        public string PictureCombDetectPreset { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture comb detect custom.\r
-        /// </summary>\r
-        public string PictureCombDetectCustom { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture deinterlace preset.\r
-        /// </summary>\r
-        public string PictureDeinterlacePreset { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture deinterlace custom.\r
-        /// </summary>\r
-        public string PictureDeinterlaceCustom { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture denoise custom.\r
-        /// </summary>\r
-        public string PictureDenoiseCustom { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture denoise filter.\r
-        /// </summary>\r
-        public string PictureDenoiseFilter { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture denoise preset.\r
-        /// </summary>\r
-        public string PictureDenoisePreset { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture denoise tune.\r
-        /// </summary>\r
-        public string PictureDenoiseTune { get; set; }\r
-\r
-        public string PictureSharpenCustom { get; set; }\r
-        public string PictureSharpenFilter { get; set; }\r
-        public string PictureSharpenPreset { get; set; }\r
-        public string PictureSharpenTune { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture detelecine.\r
-        /// </summary>\r
-        public string PictureDetelecine { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture detelecine custom.\r
-        /// </summary>\r
-        public string PictureDetelecineCustom { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether picture itu par.\r
-        /// </summary>\r
-        public bool PictureItuPAR { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether picture keep ratio.\r
-        /// </summary>\r
-        public bool PictureKeepRatio { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether picture loose crop.\r
-        /// </summary>\r
-        public bool PictureLooseCrop { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture modulus.\r
-        /// </summary>\r
-        public int PictureModulus { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture par.\r
-        /// </summary>\r
-        public string PicturePAR { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture par width.\r
-        /// </summary>\r
-        public int PicturePARWidth { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture par height.\r
-        /// </summary>\r
-        public int PicturePARHeight { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture rotate.\r
-        /// </summary>\r
-        public string PictureRotate { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture width.\r
-        /// </summary>\r
-        public int? PictureWidth { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture height.\r
-        /// </summary>\r
-        public int? PictureHeight { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture force height.\r
-        /// </summary>\r
-        public int PictureForceHeight { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the picture force width.\r
-        /// </summary>\r
-        public int PictureForceWidth { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the preset description.\r
-        /// </summary>\r
-        public string PresetDescription { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the preset name.\r
-        /// </summary>\r
-        public string PresetName { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the type.\r
-        /// </summary>\r
-        public int Type { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether uses picture filters.\r
-        /// </summary>\r
-        public bool UsesPictureFilters { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the uses picture settings.\r
-        /// </summary>\r
-        public int UsesPictureSettings { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether subtitle add cc.\r
-        /// </summary>\r
-        public bool SubtitleAddCC { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether subtitle add foreign audio search.\r
-        /// </summary>\r
-        public bool SubtitleAddForeignAudioSearch { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether subtitle add foreign audio subtitle.\r
-        /// </summary>\r
-        public bool SubtitleAddForeignAudioSubtitle { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the subtitle burn behavior.\r
-        /// </summary>\r
-        public string SubtitleBurnBehavior { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether subtitle burn bd sub.\r
-        /// </summary>\r
-        public bool SubtitleBurnBDSub { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether subtitle burn dvd sub.\r
-        /// </summary>\r
-        public bool SubtitleBurnDVDSub { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the subtitle language list.\r
-        /// </summary>\r
-        public List<string> SubtitleLanguageList { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the subtitle track selection behavior.\r
-        /// </summary>\r
-        public string SubtitleTrackSelectionBehavior { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the video avg bitrate.\r
-        /// </summary>\r
-        public int? VideoAvgBitrate { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the video color matrix code.\r
-        /// </summary>\r
-        public int VideoColorMatrixCode { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the video encoder.\r
-        /// </summary>\r
-        public string VideoEncoder { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the video framerate.\r
-        /// </summary>\r
-        public string VideoFramerate { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the video framerate mode.\r
-        /// </summary>\r
-        public string VideoFramerateMode { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether video gray scale.\r
-        /// </summary>\r
-        public bool VideoGrayScale { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether video hw decode.\r
-        /// </summary>\r
-        public bool VideoHWDecode { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the video scaler.\r
-        /// </summary>\r
-        public string VideoScaler { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the video preset.\r
-        /// </summary>\r
-        public string VideoPreset { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the video tune.\r
-        /// </summary>\r
-        public string VideoTune { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the video profile.\r
-        /// </summary>\r
-        public string VideoProfile { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the video level.\r
-        /// </summary>\r
-        public string VideoLevel { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the video option extra.\r
-        /// </summary>\r
-        public string VideoOptionExtra { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the video quality type.\r
-        /// </summary>\r
-        public int VideoQualityType { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the video quality slider.\r
-        /// </summary>\r
-        public double VideoQualitySlider { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether video qsv decode.\r
-        /// </summary>\r
-        public bool VideoQSVDecode { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the video qsv async depth.\r
-        /// </summary>\r
-        public int VideoQSVAsyncDepth { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether video two pass.\r
-        /// </summary>\r
-        public bool VideoTwoPass { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether video turbo two pass.\r
-        /// </summary>\r
-        public bool VideoTurboTwoPass { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the x 264 option.\r
-        /// </summary>\r
-        public string x264Option { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether x 264 use advanced options.\r
-        /// </summary>\r
-        public bool x264UseAdvancedOptions { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="HBPreset.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>
+//   The preset.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Presets
+{
+    using System.Collections.Generic;
+
+    /// <summary>
+    ///     The preset.
+    /// </summary>
+    public class HBPreset
+    {
+        public bool AlignAVStart { get; set; }
+
+        /// <summary>
+        /// Gets or sets the audio copy mask.
+        /// </summary>
+        public List<string> AudioCopyMask { get; set; }
+
+        /// <summary>
+        /// Gets or sets the audio encoder fallback.
+        /// </summary>
+        public string AudioEncoderFallback { get; set; }
+
+        /// <summary>
+        /// Gets or sets the audio language list.
+        /// </summary>
+        public List<string> AudioLanguageList { get; set; }
+
+        /// <summary>
+        /// Gets or sets the audio list.
+        /// </summary>
+        public List<AudioList> AudioList { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether audio secondary encoder mode.
+        /// </summary>
+        public bool AudioSecondaryEncoderMode { get; set; }
+
+        /// <summary>
+        /// Gets or sets the audio track selection behavior.
+        /// </summary>
+        public string AudioTrackSelectionBehavior { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether chapter markers.
+        /// </summary>
+        public bool ChapterMarkers { get; set; }
+
+        /// <summary>
+        /// Gets or sets the children array.
+        /// </summary>
+        public List<object> ChildrenArray { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether default.
+        /// </summary>
+        public bool Default { get; set; }
+
+        /// <summary>
+        /// Gets or sets the file format.
+        /// </summary>
+        public string FileFormat { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether folder.
+        /// </summary>
+        public bool Folder { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether folder open.
+        /// </summary>
+        public bool FolderOpen { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether mp 4 http optimize.
+        /// </summary>
+        public bool Mp4HttpOptimize { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether mp 4 i pod compatible.
+        /// </summary>
+        public bool Mp4iPodCompatible { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether picture auto crop.
+        /// </summary>
+        public bool PictureAutoCrop { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture bottom crop.
+        /// </summary>
+        public int PictureBottomCrop { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture left crop.
+        /// </summary>
+        public int PictureLeftCrop { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture right crop.
+        /// </summary>
+        public int PictureRightCrop { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture top crop.
+        /// </summary>
+        public int PictureTopCrop { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture dar width.
+        /// </summary>
+        public int PictureDARWidth { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture deblock.
+        /// </summary>
+        public int PictureDeblock { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether picture decomb deinterlace.
+        /// </summary>
+        public string PictureDeinterlaceFilter { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture comb detect preset.
+        /// </summary>
+        public string PictureCombDetectPreset { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture comb detect custom.
+        /// </summary>
+        public string PictureCombDetectCustom { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture deinterlace preset.
+        /// </summary>
+        public string PictureDeinterlacePreset { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture deinterlace custom.
+        /// </summary>
+        public string PictureDeinterlaceCustom { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture denoise custom.
+        /// </summary>
+        public string PictureDenoiseCustom { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture denoise filter.
+        /// </summary>
+        public string PictureDenoiseFilter { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture denoise preset.
+        /// </summary>
+        public string PictureDenoisePreset { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture denoise tune.
+        /// </summary>
+        public string PictureDenoiseTune { get; set; }
+
+        public string PictureSharpenCustom { get; set; }
+        public string PictureSharpenFilter { get; set; }
+        public string PictureSharpenPreset { get; set; }
+        public string PictureSharpenTune { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture detelecine.
+        /// </summary>
+        public string PictureDetelecine { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture detelecine custom.
+        /// </summary>
+        public string PictureDetelecineCustom { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether picture itu par.
+        /// </summary>
+        public bool PictureItuPAR { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether picture keep ratio.
+        /// </summary>
+        public bool PictureKeepRatio { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether picture loose crop.
+        /// </summary>
+        public bool PictureLooseCrop { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture modulus.
+        /// </summary>
+        public int PictureModulus { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture par.
+        /// </summary>
+        public string PicturePAR { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture par width.
+        /// </summary>
+        public int PicturePARWidth { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture par height.
+        /// </summary>
+        public int PicturePARHeight { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture rotate.
+        /// </summary>
+        public string PictureRotate { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture width.
+        /// </summary>
+        public int? PictureWidth { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture height.
+        /// </summary>
+        public int? PictureHeight { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture force height.
+        /// </summary>
+        public int PictureForceHeight { get; set; }
+
+        /// <summary>
+        /// Gets or sets the picture force width.
+        /// </summary>
+        public int PictureForceWidth { get; set; }
+
+        /// <summary>
+        /// Gets or sets the preset description.
+        /// </summary>
+        public string PresetDescription { get; set; }
+
+        /// <summary>
+        /// Gets or sets the preset name.
+        /// </summary>
+        public string PresetName { get; set; }
+
+        /// <summary>
+        /// Gets or sets the type.
+        /// </summary>
+        public int Type { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether uses picture filters.
+        /// </summary>
+        public bool UsesPictureFilters { get; set; }
+
+        /// <summary>
+        /// Gets or sets the uses picture settings.
+        /// </summary>
+        public int UsesPictureSettings { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether subtitle add cc.
+        /// </summary>
+        public bool SubtitleAddCC { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether subtitle add foreign audio search.
+        /// </summary>
+        public bool SubtitleAddForeignAudioSearch { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether subtitle add foreign audio subtitle.
+        /// </summary>
+        public bool SubtitleAddForeignAudioSubtitle { get; set; }
+
+        /// <summary>
+        /// Gets or sets the subtitle burn behavior.
+        /// </summary>
+        public string SubtitleBurnBehavior { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether subtitle burn bd sub.
+        /// </summary>
+        public bool SubtitleBurnBDSub { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether subtitle burn dvd sub.
+        /// </summary>
+        public bool SubtitleBurnDVDSub { get; set; }
+
+        /// <summary>
+        /// Gets or sets the subtitle language list.
+        /// </summary>
+        public List<string> SubtitleLanguageList { get; set; }
+
+        /// <summary>
+        /// Gets or sets the subtitle track selection behavior.
+        /// </summary>
+        public string SubtitleTrackSelectionBehavior { get; set; }
+
+        /// <summary>
+        /// Gets or sets the video avg bitrate.
+        /// </summary>
+        public int? VideoAvgBitrate { get; set; }
+
+        /// <summary>
+        /// Gets or sets the video color matrix code.
+        /// </summary>
+        public int VideoColorMatrixCode { get; set; }
+
+        /// <summary>
+        /// Gets or sets the video encoder.
+        /// </summary>
+        public string VideoEncoder { get; set; }
+
+        /// <summary>
+        /// Gets or sets the video framerate.
+        /// </summary>
+        public string VideoFramerate { get; set; }
+
+        /// <summary>
+        /// Gets or sets the video framerate mode.
+        /// </summary>
+        public string VideoFramerateMode { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether video gray scale.
+        /// </summary>
+        public bool VideoGrayScale { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether video hw decode.
+        /// </summary>
+        public bool VideoHWDecode { get; set; }
+
+        /// <summary>
+        /// Gets or sets the video scaler.
+        /// </summary>
+        public string VideoScaler { get; set; }
+
+        /// <summary>
+        /// Gets or sets the video preset.
+        /// </summary>
+        public string VideoPreset { get; set; }
+
+        /// <summary>
+        /// Gets or sets the video tune.
+        /// </summary>
+        public string VideoTune { get; set; }
+
+        /// <summary>
+        /// Gets or sets the video profile.
+        /// </summary>
+        public string VideoProfile { get; set; }
+
+        /// <summary>
+        /// Gets or sets the video level.
+        /// </summary>
+        public string VideoLevel { get; set; }
+
+        /// <summary>
+        /// Gets or sets the video option extra.
+        /// </summary>
+        public string VideoOptionExtra { get; set; }
+
+        /// <summary>
+        /// Gets or sets the video quality type.
+        /// </summary>
+        public int VideoQualityType { get; set; }
+
+        /// <summary>
+        /// Gets or sets the video quality slider.
+        /// </summary>
+        public double VideoQualitySlider { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether video qsv decode.
+        /// </summary>
+        public bool VideoQSVDecode { get; set; }
+
+        /// <summary>
+        /// Gets or sets the video qsv async depth.
+        /// </summary>
+        public int VideoQSVAsyncDepth { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether video two pass.
+        /// </summary>
+        public bool VideoTwoPass { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether video turbo two pass.
+        /// </summary>
+        public bool VideoTurboTwoPass { get; set; }
+
+        /// <summary>
+        /// Gets or sets the x 264 option.
+        /// </summary>
+        public string x264Option { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether x 264 use advanced options.
+        /// </summary>
+        public bool x264UseAdvancedOptions { get; set; }
+    }
 }
\ No newline at end of file
similarity index 92%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/PresetCategory.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Presets/PresetCategory.cs
index 182772106f9c7715cf5cdd17eacce8677f6286f1..2cab7d25d09dffd0ca44a6e49afce424f468fc2e 100644 (file)
@@ -1,44 +1,44 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="PresetCategory.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The preset category.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Presets\r
-{\r
-    using System.Collections.Generic;\r
-\r
-    /// <summary>\r
-    /// The preset category.\r
-    /// </summary>\r
-    public class PresetCategory\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the children array.\r
-        /// </summary>\r
-        public List<HBPreset> ChildrenArray { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether folder.\r
-        /// </summary>\r
-        public bool Folder { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the preset name.\r
-        /// </summary>\r
-        public string PresetName { get; set; }\r
-\r
-        /// <summary>\r
-        /// Description for the preset group.\r
-        /// </summary>\r
-        public string PresetDescription { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the type.\r
-        /// </summary>\r
-        public int Type { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="PresetCategory.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>
+//   The preset category.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Presets
+{
+    using System.Collections.Generic;
+
+    /// <summary>
+    /// The preset category.
+    /// </summary>
+    public class PresetCategory
+    {
+        /// <summary>
+        /// Gets or sets the children array.
+        /// </summary>
+        public List<HBPreset> ChildrenArray { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether folder.
+        /// </summary>
+        public bool Folder { get; set; }
+
+        /// <summary>
+        /// Gets or sets the preset name.
+        /// </summary>
+        public string PresetName { get; set; }
+
+        /// <summary>
+        /// Description for the preset group.
+        /// </summary>
+        public string PresetDescription { get; set; }
+
+        /// <summary>
+        /// Gets or sets the type.
+        /// </summary>
+        public int Type { get; set; }
+    }
 }
\ No newline at end of file
similarity index 94%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/PresetTransportContainer.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Presets/PresetTransportContainer.cs
index 34a7c09965df5ab05b97efba9a22c3b8b6405c64..91ce48de5938597f9fff26574bd911404ca0f8b1 100644 (file)
@@ -1,67 +1,67 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="PresetTransportContainer.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The preset transport container.\r
-//   This is a model for importing the JSON / Plist presets into the GUI.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Presets\r
-{\r
-    using System.Collections.Generic;\r
-\r
-    /// <summary>\r
-    /// The preset transport container.\r
-    /// This is a model for importing the JSON / Plist presets into the GUI.\r
-    /// </summary>\r
-    public class PresetTransportContainer\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="PresetTransportContainer"/> class.\r
-        /// </summary>\r
-        public PresetTransportContainer()\r
-        {\r
-        }\r
-\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="PresetTransportContainer"/> class.\r
-        /// </summary>\r
-        /// <param name="versionMajor">\r
-        /// The version major.\r
-        /// </param>\r
-        /// <param name="versionMinor">\r
-        /// The version minor.\r
-        /// </param>\r
-        /// <param name="versionMicro">\r
-        /// The version micro.\r
-        /// </param>\r
-        public PresetTransportContainer(string versionMajor, string versionMinor, string versionMicro)\r
-        {\r
-            this.VersionMajor = versionMajor;\r
-            this.VersionMicro = versionMicro;\r
-            this.VersionMinor = versionMinor;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the children array.\r
-        /// </summary>\r
-        public List<object> PresetList { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the version major.\r
-        /// </summary>\r
-        public string VersionMajor { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the version micro.\r
-        /// </summary>\r
-        public string VersionMicro { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the version minor.\r
-        /// </summary>\r
-        public string VersionMinor { get; set; }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="PresetTransportContainer.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>
+//   The preset transport container.
+//   This is a model for importing the JSON / Plist presets into the GUI.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Presets
+{
+    using System.Collections.Generic;
+
+    /// <summary>
+    /// The preset transport container.
+    /// This is a model for importing the JSON / Plist presets into the GUI.
+    /// </summary>
+    public class PresetTransportContainer
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="PresetTransportContainer"/> class.
+        /// </summary>
+        public PresetTransportContainer()
+        {
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="PresetTransportContainer"/> class.
+        /// </summary>
+        /// <param name="versionMajor">
+        /// The version major.
+        /// </param>
+        /// <param name="versionMinor">
+        /// The version minor.
+        /// </param>
+        /// <param name="versionMicro">
+        /// The version micro.
+        /// </param>
+        public PresetTransportContainer(string versionMajor, string versionMinor, string versionMicro)
+        {
+            this.VersionMajor = versionMajor;
+            this.VersionMicro = versionMicro;
+            this.VersionMinor = versionMinor;
+        }
+
+        /// <summary>
+        /// Gets or sets the children array.
+        /// </summary>
+        public List<object> PresetList { get; set; }
+
+        /// <summary>
+        /// Gets or sets the version major.
+        /// </summary>
+        public string VersionMajor { get; set; }
+
+        /// <summary>
+        /// Gets or sets the version micro.
+        /// </summary>
+        public string VersionMicro { get; set; }
+
+        /// <summary>
+        /// Gets or sets the version minor.
+        /// </summary>
+        public string VersionMinor { get; set; }
+    }
+}
similarity index 85%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Queue/Task.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Queue/Task.cs
index e1805c3d9a9dcbc797c1dd9d65ec1ce8f65edd63..e7a1da64ec9e4a34b37098eb25e6172f546748a2 100644 (file)
@@ -7,9 +7,9 @@
 // </summary>
 // --------------------------------------------------------------------------------------------------------------------
 
-namespace HandBrake.ApplicationServices.Interop.Json.Queue
+namespace HandBrake.Interop.Interop.Json.Queue
 {
-    using HandBrake.ApplicationServices.Interop.Json.Encode;
+    using HandBrake.Interop.Interop.Json.Encode;
 
     /// <summary>
     /// The task.
similarity index 93%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/AudioAttributes.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Scan/AudioAttributes.cs
index b6a29e194d788a560e0909ed20accc01ab8223ad..96c6b9065bd5e51bb6847ba666a3464e6b50d096 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>
 // --------------------------------------------------------------------------------------------------------------------
 
-namespace HandBrake.ApplicationServices.Interop.Json.Scan
+namespace HandBrake.Interop.Interop.Json.Scan
 {
     public class AudioAttributes
     {
similarity index 91%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/Color.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Scan/Color.cs
index b99495440171897436c908c65354c72e78258566..65af225c78d576729bec449d23485f5af9396e6d 100644 (file)
@@ -1,32 +1,32 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Color.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The color.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Scan\r
-{\r
-    /// <summary>\r
-    /// The color.\r
-    /// </summary>\r
-    public class Color\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the matrix.\r
-        /// </summary>\r
-        public int Matrix { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the primary.\r
-        /// </summary>\r
-        public int Primary { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the transfer.\r
-        /// </summary>\r
-        public int Transfer { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Color.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>
+//   The color.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Scan
+{
+    /// <summary>
+    /// The color.
+    /// </summary>
+    public class Color
+    {
+        /// <summary>
+        /// Gets or sets the matrix.
+        /// </summary>
+        public int Matrix { get; set; }
+
+        /// <summary>
+        /// Gets or sets the primary.
+        /// </summary>
+        public int Primary { get; set; }
+
+        /// <summary>
+        /// Gets or sets the transfer.
+        /// </summary>
+        public int Transfer { get; set; }
+    }
 }
\ No newline at end of file
similarity index 92%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/Duration.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Scan/Duration.cs
index 6ae496901d998a7dd6ae1b8e049431014abc4370..533ec05ae1ef8ff92915733369379670600e9d53 100644 (file)
@@ -1,37 +1,37 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Duration.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The duration.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Scan\r
-{\r
-    /// <summary>\r
-    /// The duration.\r
-    /// </summary>\r
-    public class Duration\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the hours.\r
-        /// </summary>\r
-        public int Hours { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the minutes.\r
-        /// </summary>\r
-        public int Minutes { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the seconds.\r
-        /// </summary>\r
-        public int Seconds { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the ticks.\r
-        /// </summary>\r
-        public long Ticks { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Duration.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>
+//   The duration.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Scan
+{
+    /// <summary>
+    /// The duration.
+    /// </summary>
+    public class Duration
+    {
+        /// <summary>
+        /// Gets or sets the hours.
+        /// </summary>
+        public int Hours { get; set; }
+
+        /// <summary>
+        /// Gets or sets the minutes.
+        /// </summary>
+        public int Minutes { get; set; }
+
+        /// <summary>
+        /// Gets or sets the seconds.
+        /// </summary>
+        public int Seconds { get; set; }
+
+        /// <summary>
+        /// Gets or sets the ticks.
+        /// </summary>
+        public long Ticks { get; set; }
+    }
 }
\ No newline at end of file
similarity index 90%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/FrameRate.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Scan/FrameRate.cs
index a850423207f07be0e687ef7ee561fb10df433005..04fa33c3706ba189c9e7138dcdfb7a0d832eeb95 100644 (file)
@@ -1,27 +1,27 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="FrameRate.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The frame rate.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Scan\r
-{\r
-    /// <summary>\r
-    /// The frame rate.\r
-    /// </summary>\r
-    public class FrameRate\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the den.\r
-        /// </summary>\r
-        public int Den { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the num.\r
-        /// </summary>\r
-        public int Num { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="FrameRate.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>
+//   The frame rate.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Scan
+{
+    /// <summary>
+    /// The frame rate.
+    /// </summary>
+    public class FrameRate
+    {
+        /// <summary>
+        /// Gets or sets the den.
+        /// </summary>
+        public int Den { get; set; }
+
+        /// <summary>
+        /// Gets or sets the num.
+        /// </summary>
+        public int Num { get; set; }
+    }
 }
\ No newline at end of file
similarity index 91%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/JsonScanObject.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Scan/JsonScanObject.cs
index 4232ee49f3104528f9c6c8f02d4cebba7772c87e..cc19e492310861e8b8fffad9ca03f3e8c951e4c1 100644 (file)
@@ -1,29 +1,29 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="JsonScanObject.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The root object.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Scan\r
-{\r
-    using System.Collections.Generic;\r
-\r
-    /// <summary>\r
-    /// The root object.\r
-    /// </summary>\r
-    public class JsonScanObject\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the main feature.\r
-        /// </summary>\r
-        public int MainFeature { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the title list.\r
-        /// </summary>\r
-        public List<SourceTitle> TitleList { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="JsonScanObject.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>
+//   The root object.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Scan
+{
+    using System.Collections.Generic;
+
+    /// <summary>
+    /// The root object.
+    /// </summary>
+    public class JsonScanObject
+    {
+        /// <summary>
+        /// Gets or sets the main feature.
+        /// </summary>
+        public int MainFeature { get; set; }
+
+        /// <summary>
+        /// Gets or sets the title list.
+        /// </summary>
+        public List<SourceTitle> TitleList { get; set; }
+    }
 }
\ No newline at end of file
similarity index 93%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/SourceAudioTrack.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Scan/SourceAudioTrack.cs
index 3cdba57940e4091c70111ac76a2970dd0f0b09b0..e0d9bafd83ac065c06e4faa54a6c501d4ce9c59d 100644 (file)
@@ -1,62 +1,62 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="SourceAudioTrack.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   An audio track from the source video.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Scan\r
-{\r
-    /// <summary>\r
-    /// An audio track from the source video.\r
-    /// </summary>\r
-    public class SourceAudioTrack\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the bit rate.\r
-        /// </summary>\r
-        public int BitRate { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the channel layout.\r
-        /// </summary>\r
-        public long ChannelLayout { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the description.\r
-        /// </summary>\r
-        public string Description { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the language.\r
-        /// </summary>\r
-        public string Language { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the language code.\r
-        /// </summary>\r
-        public string LanguageCode { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the sample rate.\r
-        /// </summary>\r
-        public int SampleRate { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the codec.\r
-        /// </summary>\r
-        public int Codec { get; set; }\r
-\r
-        public string CodecName { get; set; }\r
-\r
-        public long LFECount { get; set; }\r
-\r
-        public string ChannelLayoutName { get; set; }\r
-\r
-        public int ChannelCount { get; set; }\r
-\r
-        public AudioAttributes Attributes { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="SourceAudioTrack.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 audio track from the source video.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Scan
+{
+    /// <summary>
+    /// An audio track from the source video.
+    /// </summary>
+    public class SourceAudioTrack
+    {
+        /// <summary>
+        /// Gets or sets the bit rate.
+        /// </summary>
+        public int BitRate { get; set; }
+
+        /// <summary>
+        /// Gets or sets the channel layout.
+        /// </summary>
+        public long ChannelLayout { get; set; }
+
+        /// <summary>
+        /// Gets or sets the description.
+        /// </summary>
+        public string Description { get; set; }
+
+        /// <summary>
+        /// Gets or sets the language.
+        /// </summary>
+        public string Language { get; set; }
+
+        /// <summary>
+        /// Gets or sets the language code.
+        /// </summary>
+        public string LanguageCode { get; set; }
+
+        /// <summary>
+        /// Gets or sets the sample rate.
+        /// </summary>
+        public int SampleRate { get; set; }
+
+        /// <summary>
+        /// Gets or sets the codec.
+        /// </summary>
+        public int Codec { get; set; }
+
+        public string CodecName { get; set; }
+
+        public long LFECount { get; set; }
+
+        public string ChannelLayoutName { get; set; }
+
+        public int ChannelCount { get; set; }
+
+        public AudioAttributes Attributes { get; set; }
+    }
 }
\ No newline at end of file
similarity index 91%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/SourceChapter.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Scan/SourceChapter.cs
index 93b5e1ce352849c5558b9f5fcccb464bbb6c59d3..02e83fe1d77a255a92084fcc26d7c5d6c4697612 100644 (file)
@@ -1,27 +1,27 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="SourceChapter.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The a chapter from a video source.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Scan\r
-{\r
-    /// <summary>\r
-    /// The a chapter from a video source.\r
-    /// </summary>\r
-    public class SourceChapter\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the duration.\r
-        /// </summary>\r
-        public Duration Duration { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the name.\r
-        /// </summary>\r
-        public string Name { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="SourceChapter.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>
+//   The a chapter from a video source.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Scan
+{
+    /// <summary>
+    /// The a chapter from a video source.
+    /// </summary>
+    public class SourceChapter
+    {
+        /// <summary>
+        /// Gets or sets the duration.
+        /// </summary>
+        public Duration Duration { get; set; }
+
+        /// <summary>
+        /// Gets or sets the name.
+        /// </summary>
+        public string Name { get; set; }
+    }
 }
\ No newline at end of file
similarity index 91%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/SourceMetadata.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Scan/SourceMetadata.cs
index f575dc637ea94c050eca327c3ccb391ee10219c4..240635cc6d66ea4ab5dec630f98741628976480c 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>
 // --------------------------------------------------------------------------------------------------------------------
 
-namespace HandBrake.ApplicationServices.Interop.Json.Scan
+namespace HandBrake.Interop.Interop.Json.Scan
 {
     /// <summary>
     /// The meta data.
similarity index 95%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/SourceSubtitleTrack.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Scan/SourceSubtitleTrack.cs
index 67be629a2218e2efa391e138b7c35729aeaac091..eaeda2a69bec396a00dede9cdc353cf3f130a0e5 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>
 // --------------------------------------------------------------------------------------------------------------------
 
-namespace HandBrake.ApplicationServices.Interop.Json.Scan
+namespace HandBrake.Interop.Interop.Json.Scan
 {
     /// <summary>
     /// The subtitle list.
similarity index 93%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/SourceTitle.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Scan/SourceTitle.cs
index e8f62c8d0a865c516f4dfed26480e526b9e453e7..4fd5232ffba6fb7bb67f6f44f0651bdbf5f1d4cd 100644 (file)
@@ -1,28 +1,28 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="SourceTitle.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The title list.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Scan\r
-{\r
-    using System.Collections.Generic;\r
-\r
-    using HandBrake.ApplicationServices.Interop.Json.Shared;\r
-\r
-    /// <summary>\r
-    /// The title list.\r
-    /// </summary>\r
-    public class SourceTitle\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the angle count.\r
-        /// </summary>\r
-        public int AngleCount { get; set; }\r
-\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="SourceTitle.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>
+//   The title list.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Scan
+{
+    using System.Collections.Generic;
+
+    using HandBrake.Interop.Interop.Json.Shared;
+
+    /// <summary>
+    /// The title list.
+    /// </summary>
+    public class SourceTitle
+    {
+        /// <summary>
+        /// Gets or sets the angle count.
+        /// </summary>
+        public int AngleCount { get; set; }
+
         /// <summary>
         /// Gets or sets the audio list.
         /// </summary>
@@ -35,44 +35,44 @@ namespace HandBrake.ApplicationServices.Interop.Json.Scan
 
         /// <summary>
         /// Gets or sets the color.
-        /// </summary>\r
-        public Color Color { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the input file container.\r
-        /// </summary>\r
-        public string Container { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the cropping values\r
-        /// </summary>\r
-        public List<int> Crop { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the duration.\r
-        /// </summary>\r
-        public Duration Duration { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the frame rate.\r
-        /// </summary>\r
-        public FrameRate FrameRate { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the geometry.\r
-        /// </summary>\r
-        public Geometry Geometry { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the index.\r
-        /// </summary>\r
-        public int Index { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether interlace detected.\r
-        /// </summary>\r
-        public bool InterlaceDetected { get; set; }\r
-\r
+        /// </summary>
+        public Color Color { get; set; }
+
+        /// <summary>
+        /// Gets or sets the input file container.
+        /// </summary>
+        public string Container { get; set; }
+
+        /// <summary>
+        /// Gets or sets the cropping values
+        /// </summary>
+        public List<int> Crop { get; set; }
+
+        /// <summary>
+        /// Gets or sets the duration.
+        /// </summary>
+        public Duration Duration { get; set; }
+
+        /// <summary>
+        /// Gets or sets the frame rate.
+        /// </summary>
+        public FrameRate FrameRate { get; set; }
+
+        /// <summary>
+        /// Gets or sets the geometry.
+        /// </summary>
+        public Geometry Geometry { get; set; }
+
+        /// <summary>
+        /// Gets or sets the index.
+        /// </summary>
+        public int Index { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether interlace detected.
+        /// </summary>
+        public bool InterlaceDetected { get; set; }
+
         /// <summary>
         /// Gets or sets the meta data.
         /// </summary>
@@ -80,19 +80,19 @@ namespace HandBrake.ApplicationServices.Interop.Json.Scan
 
         /// <summary>
         /// Gets or sets the name.
-        /// </summary>\r
-        public string Name { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the path.\r
-        /// </summary>\r
-        public string Path { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the playlist.\r
-        /// </summary>\r
-        public int Playlist { get; set; }\r
-\r
+        /// </summary>
+        public string Name { get; set; }
+
+        /// <summary>
+        /// Gets or sets the path.
+        /// </summary>
+        public string Path { get; set; }
+
+        /// <summary>
+        /// Gets or sets the playlist.
+        /// </summary>
+        public int Playlist { get; set; }
+
         /// <summary>
         /// Gets or sets the subtitle list.
         /// </summary>
@@ -100,13 +100,13 @@ namespace HandBrake.ApplicationServices.Interop.Json.Scan
 
         /// <summary>
         /// Gets or sets the type.
-        ///  HB_DVD_TYPE = 0, HB_BD_TYPE, HB_STREAM_TYPE, HB_FF_STREAM_TYPE\r
-        /// </summary>\r
-        public int Type { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the video codec.\r
-        /// </summary>\r
-        public string VideoCodec { get; set; }\r
-    }\r
+        ///  HB_DVD_TYPE = 0, HB_BD_TYPE, HB_STREAM_TYPE, HB_FF_STREAM_TYPE
+        /// </summary>
+        public int Type { get; set; }
+
+        /// <summary>
+        /// Gets or sets the video codec.
+        /// </summary>
+        public string VideoCodec { get; set; }
+    }
 }
\ No newline at end of file
similarity index 95%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/SubtitleAttributes.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Scan/SubtitleAttributes.cs
index b22a470be599d084c47ef24178eb41f72b43262a..07ac8b0327be8f14c7f401a56bf84885370a836d 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>
 // --------------------------------------------------------------------------------------------------------------------
 
-namespace HandBrake.ApplicationServices.Interop.Json.Scan
+namespace HandBrake.Interop.Interop.Json.Scan
 {
     using Newtonsoft.Json;
 
similarity index 91%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Shared/Geometry.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Shared/Geometry.cs
index 429deb615f1e949732326eea96fb632eeefcc5af..5632b37362c0f1af06cb7b1e62d13bcec04f910b 100644 (file)
@@ -1,32 +1,32 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Geometry.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The geometry.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Shared\r
-{\r
-    /// <summary>\r
-    /// The geometry.\r
-    /// </summary>\r
-    public class Geometry\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the height.\r
-        /// </summary>\r
-        public int Height { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the par.\r
-        /// </summary>\r
-        public PAR PAR { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the width.\r
-        /// </summary>\r
-        public int Width { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Geometry.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>
+//   The geometry.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Shared
+{
+    /// <summary>
+    /// The geometry.
+    /// </summary>
+    public class Geometry
+    {
+        /// <summary>
+        /// Gets or sets the height.
+        /// </summary>
+        public int Height { get; set; }
+
+        /// <summary>
+        /// Gets or sets the par.
+        /// </summary>
+        public PAR PAR { get; set; }
+
+        /// <summary>
+        /// Gets or sets the width.
+        /// </summary>
+        public int Width { get; set; }
+    }
 }
\ No newline at end of file
similarity index 90%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/Shared/PAR.cs
rename to win/CS/HandBrake.Interop/Interop/Json/Shared/PAR.cs
index 503acf2f7f6a24a109aa614f7dfd1915427afc58..075c26672b0a317d7b44277e936ad292fba63deb 100644 (file)
@@ -1,27 +1,27 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="PAR.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The par.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.Shared\r
-{\r
-    /// <summary>\r
-    /// The par.\r
-    /// </summary>\r
-    public class PAR\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the Number.\r
-        /// </summary>\r
-        public int Num { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the Denominator.\r
-        /// </summary>\r
-        public int Den { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="PAR.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>
+//   The par.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.Shared
+{
+    /// <summary>
+    /// The par.
+    /// </summary>
+    public class PAR
+    {
+        /// <summary>
+        /// Gets or sets the Number.
+        /// </summary>
+        public int Num { get; set; }
+
+        /// <summary>
+        /// Gets or sets the Denominator.
+        /// </summary>
+        public int Den { get; set; }
+    }
 }
\ No newline at end of file
similarity index 92%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/State/JsonState.cs
rename to win/CS/HandBrake.Interop/Interop/Json/State/JsonState.cs
index 2309b0d16d24520b82c5cdd2d022d0dd9f422aa0..6f851367151bb6f066ec034b41c5c1c14cd93e5c 100644 (file)
@@ -1,37 +1,37 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="JsonState.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The hand brake state.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.State\r
-{\r
-    /// <summary>\r
-    /// The hand brake state.\r
-    /// </summary>\r
-    public class JsonState\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the scanning.\r
-        /// </summary>\r
-        public Scanning Scanning { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the working.\r
-        /// </summary>\r
-        public Working Working { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the work done.\r
-        /// </summary>\r
-        public WorkDone WorkDone { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the state.\r
-        /// </summary>\r
-        public string State { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="JsonState.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>
+//   The hand brake state.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.State
+{
+    /// <summary>
+    /// The hand brake state.
+    /// </summary>
+    public class JsonState
+    {
+        /// <summary>
+        /// Gets or sets the scanning.
+        /// </summary>
+        public Scanning Scanning { get; set; }
+
+        /// <summary>
+        /// Gets or sets the working.
+        /// </summary>
+        public Working Working { get; set; }
+
+        /// <summary>
+        /// Gets or sets the work done.
+        /// </summary>
+        public WorkDone WorkDone { get; set; }
+
+        /// <summary>
+        /// Gets or sets the state.
+        /// </summary>
+        public string State { get; set; }
+    }
 }
\ No newline at end of file
similarity index 92%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/State/Scanning.cs
rename to win/CS/HandBrake.Interop/Interop/Json/State/Scanning.cs
index 033bef017474b5e3bcfb74c150c27477ee43bd16..4f3cfb22da73eb3bbbe0a7aab649d4039061d74d 100644 (file)
@@ -1,42 +1,42 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Scanning.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The scanning.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.State\r
-{\r
-    /// <summary>\r
-    /// The scanning.\r
-    /// </summary>\r
-    public class Scanning\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the preview.\r
-        /// </summary>\r
-        public int Preview { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the preview count.\r
-        /// </summary>\r
-        public int PreviewCount { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the progress.\r
-        /// </summary>\r
-        public double Progress { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the title.\r
-        /// </summary>\r
-        public int Title { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the title count.\r
-        /// </summary>\r
-        public int TitleCount { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Scanning.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>
+//   The scanning.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.State
+{
+    /// <summary>
+    /// The scanning.
+    /// </summary>
+    public class Scanning
+    {
+        /// <summary>
+        /// Gets or sets the preview.
+        /// </summary>
+        public int Preview { get; set; }
+
+        /// <summary>
+        /// Gets or sets the preview count.
+        /// </summary>
+        public int PreviewCount { get; set; }
+
+        /// <summary>
+        /// Gets or sets the progress.
+        /// </summary>
+        public double Progress { get; set; }
+
+        /// <summary>
+        /// Gets or sets the title.
+        /// </summary>
+        public int Title { get; set; }
+
+        /// <summary>
+        /// Gets or sets the title count.
+        /// </summary>
+        public int TitleCount { get; set; }
+    }
 }
\ No newline at end of file
similarity index 97%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/State/TaskState.cs
rename to win/CS/HandBrake.Interop/Interop/Json/State/TaskState.cs
index 168303e1de7cb54e18b0709970996d66e2ba2127..5d0f5f92f4408b02c94c4869f5aff0a5ab613851 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>
 // --------------------------------------------------------------------------------------------------------------------
 
-namespace HandBrake.ApplicationServices.Interop.Json.State
+namespace HandBrake.Interop.Interop.Json.State
 {
     using System.Collections.Generic;
 
similarity index 90%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/State/WorkDone.cs
rename to win/CS/HandBrake.Interop/Interop/Json/State/WorkDone.cs
index 76f85ba90fa34d5256a41106ad776bea854214a2..aa821f2862e60c562e04d515cc2f26e45a5cd29f 100644 (file)
@@ -1,22 +1,22 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="WorkDone.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The work done.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.State\r
-{\r
-    /// <summary>\r
-    ///     The work done.\r
-    /// </summary>\r
-    public class WorkDone\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the error.\r
-        /// </summary>\r
-        public int Error { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="WorkDone.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>
+//   The work done.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.State
+{
+    /// <summary>
+    ///     The work done.
+    /// </summary>
+    public class WorkDone
+    {
+        /// <summary>
+        /// Gets or sets the error.
+        /// </summary>
+        public int Error { get; set; }
+    }
 }
\ No newline at end of file
similarity index 93%
rename from win/CS/HandBrake.ApplicationServices/Interop/Json/State/Working.cs
rename to win/CS/HandBrake.Interop/Interop/Json/State/Working.cs
index 2347eb4c2b75699cc3d67f2ad43dde06dae3498c..a1b7fb0e58bbe66a1f7fbef2692588ad82422f17 100644 (file)
@@ -1,73 +1,73 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Working.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The working.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Json.State\r
-{\r
-    /// <summary>\r
-    /// The working.\r
-    /// </summary>\r
-    public class Working\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets the hours.\r
-        /// </summary>\r
-        public int Hours { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the Pass ID.\r
-        /// </summary>\r
-        /// <remarks>\r
-        /// -1: Subtitle scan\r
-        ///  0: Encode\r
-        ///  1: Encode first pass\r
-        ///  2: Encode second pass\r
-        /// </remarks>\r
-        public int PassID { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the pass number (1-based).\r
-        /// </summary>\r
-        public int Pass { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the pass count.\r
-        /// </summary>\r
-        public int PassCount { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the minutes.\r
-        /// </summary>\r
-        public int Minutes { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the progress.\r
-        /// </summary>\r
-        public double Progress { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the rate.\r
-        /// </summary>\r
-        public double Rate { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the rate avg.\r
-        /// </summary>\r
-        public double RateAvg { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the seconds.\r
-        /// </summary>\r
-        public int Seconds { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the sequence id.\r
-        /// </summary>\r
-        public int SequenceID { get; set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Working.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>
+//   The working.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Json.State
+{
+    /// <summary>
+    /// The working.
+    /// </summary>
+    public class Working
+    {
+        /// <summary>
+        /// Gets or sets the hours.
+        /// </summary>
+        public int Hours { get; set; }
+
+        /// <summary>
+        /// Gets or sets the Pass ID.
+        /// </summary>
+        /// <remarks>
+        /// -1: Subtitle scan
+        ///  0: Encode
+        ///  1: Encode first pass
+        ///  2: Encode second pass
+        /// </remarks>
+        public int PassID { get; set; }
+
+        /// <summary>
+        /// Gets or sets the pass number (1-based).
+        /// </summary>
+        public int Pass { get; set; }
+
+        /// <summary>
+        /// Gets or sets the pass count.
+        /// </summary>
+        public int PassCount { get; set; }
+
+        /// <summary>
+        /// Gets or sets the minutes.
+        /// </summary>
+        public int Minutes { get; set; }
+
+        /// <summary>
+        /// Gets or sets the progress.
+        /// </summary>
+        public double Progress { get; set; }
+
+        /// <summary>
+        /// Gets or sets the rate.
+        /// </summary>
+        public double Rate { get; set; }
+
+        /// <summary>
+        /// Gets or sets the rate avg.
+        /// </summary>
+        public double RateAvg { get; set; }
+
+        /// <summary>
+        /// Gets or sets the seconds.
+        /// </summary>
+        public int Seconds { get; set; }
+
+        /// <summary>
+        /// Gets or sets the sequence id.
+        /// </summary>
+        public int SequenceID { get; set; }
+    }
 }
\ No newline at end of file
similarity index 93%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/BitrateLimits.cs
rename to win/CS/HandBrake.Interop/Interop/Model/BitrateLimits.cs
index 533c73a5bf79189692604dbecaead4e618771aea..91ee98356baf9608f55ddee234eb5c6a8222ab1d 100644 (file)
@@ -1,42 +1,42 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="BitrateLimits.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the BitrateLimits type.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model\r
-{\r
-    /// <summary>\r
-    /// Represents bitrate limits as a range.\r
-    /// </summary>\r
-    public class BitrateLimits\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="BitrateLimits"/> class.\r
-        /// </summary>\r
-        /// <param name="low">\r
-        /// The low.\r
-        /// </param>\r
-        /// <param name="high">\r
-        /// The high.\r
-        /// </param>\r
-        public BitrateLimits(int low, int high)\r
-        {\r
-            this.Low = low;\r
-            this.High = high;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the inclusive lower limit for the bitrate.\r
-        /// </summary>\r
-        public int Low { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the inclusive upper limit for the bitrate.\r
-        /// </summary>\r
-        public int High { get; private set; }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="BitrateLimits.cs" company="HandBrake Project (http://handbrake.fr)">
+//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+//   Defines the BitrateLimits type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model
+{
+    /// <summary>
+    /// Represents bitrate limits as a range.
+    /// </summary>
+    public class BitrateLimits
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="BitrateLimits"/> class.
+        /// </summary>
+        /// <param name="low">
+        /// The low.
+        /// </param>
+        /// <param name="high">
+        /// The high.
+        /// </param>
+        public BitrateLimits(int low, int high)
+        {
+            this.Low = low;
+            this.High = high;
+        }
+
+        /// <summary>
+        /// Gets the inclusive lower limit for the bitrate.
+        /// </summary>
+        public int Low { get; private set; }
+
+        /// <summary>
+        /// Gets the inclusive upper limit for the bitrate.
+        /// </summary>
+        public int High { get; private set; }
+    }
+}
similarity index 94%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Cropping.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Cropping.cs
index 52c9e64d59798b3ef473298ee2675cd2055e3740..63a1b176ad853985a897483c4be961519c9bd10e 100644 (file)
@@ -1,99 +1,99 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Cropping.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the Cropping type.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model\r
-{\r
-    /// <summary>\r
-    /// The Cropping Model\r
-    /// </summary>\r
-    public class Cropping\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="Cropping"/> class. \r
-        /// </summary>\r
-        public Cropping()\r
-        {\r
-        }\r
-\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="Cropping"/> class.\r
-        /// Copy Constructor\r
-        /// </summary>\r
-        /// <param name="croping">\r
-        /// The croping.\r
-        /// </param>\r
-        public Cropping(Cropping croping)\r
-        {\r
-            this.Top = croping.Top;\r
-            this.Bottom = croping.Bottom;\r
-            this.Left = croping.Left;\r
-            this.Right = croping.Right;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="Cropping"/> class. \r
-        /// </summary>\r
-        /// <param name="top">\r
-        /// The Top Value\r
-        /// </param>\r
-        /// <param name="bottom">\r
-        /// The Bottom Value\r
-        /// </param>\r
-        /// <param name="left">\r
-        /// The Left Value\r
-        /// </param>\r
-        /// <param name="right">\r
-        /// The Right Value\r
-        /// </param>\r
-        public Cropping(int top, int bottom, int left, int right)\r
-        {\r
-            this.Top = top;\r
-            this.Bottom = bottom;\r
-            this.Left = left;\r
-            this.Right = right;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets or sets Top.\r
-        /// </summary>\r
-        public int Top { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets Bottom.\r
-        /// </summary>\r
-        public int Bottom { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets Left.\r
-        /// </summary>\r
-        public int Left { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets Right.\r
-        /// </summary>\r
-        public int Right { get; set; }\r
-\r
-        /// <summary>\r
-        /// Clone this model\r
-        /// </summary>\r
-        /// <returns>\r
-        /// A Cloned copy\r
-        /// </returns>\r
-        public Cropping Clone()\r
-        {\r
-            return new Cropping\r
-            {\r
-                Top = this.Top,\r
-                Bottom = this.Bottom,\r
-                Left = this.Left,\r
-                Right = this.Right\r
-            };\r
-        }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <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>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model
+{
+    /// <summary>
+    /// The Cropping Model
+    /// </summary>
+    public class Cropping
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Cropping"/> class. 
+        /// </summary>
+        public Cropping()
+        {
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Cropping"/> class.
+        /// Copy Constructor
+        /// </summary>
+        /// <param name="croping">
+        /// The croping.
+        /// </param>
+        public Cropping(Cropping croping)
+        {
+            this.Top = croping.Top;
+            this.Bottom = croping.Bottom;
+            this.Left = croping.Left;
+            this.Right = croping.Right;
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Cropping"/> class. 
+        /// </summary>
+        /// <param name="top">
+        /// The Top Value
+        /// </param>
+        /// <param name="bottom">
+        /// The Bottom Value
+        /// </param>
+        /// <param name="left">
+        /// The Left Value
+        /// </param>
+        /// <param name="right">
+        /// The Right Value
+        /// </param>
+        public Cropping(int top, int bottom, int left, int right)
+        {
+            this.Top = top;
+            this.Bottom = bottom;
+            this.Left = left;
+            this.Right = right;
+        }
+
+        /// <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; }
+
+        /// <summary>
+        /// Clone this model
+        /// </summary>
+        /// <returns>
+        /// A Cloned copy
+        /// </returns>
+        public Cropping Clone()
+        {
+            return new Cropping
+            {
+                Top = this.Top,
+                Bottom = this.Bottom,
+                Left = this.Left,
+                Right = this.Right
+            };
+        }
+    }
+}
similarity index 86%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Anamorphic.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Encoding/Anamorphic.cs
index 26ac4883c59618c04825606aeb7db6e1efa4bcc0..f98875a1603b78fb68ee19919457049ba37e2a77 100644 (file)
@@ -1,32 +1,32 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Anamorphic.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the Anamorphic type.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
-{\r
-    using HandBrake.ApplicationServices.Attributes;\r
-\r
-    /// <summary>\r
-    /// The anamorphic.\r
-    /// </summary>\r
-    public enum Anamorphic\r
-    {\r
-        [DisplayName("None")]\r
-        [ShortName("none")]\r
-        None = 0,\r
-        [DisplayName("Automatic")]\r
-        [ShortName("auto")]\r
-        Automatic = 4,\r
-        [DisplayName("Loose")]\r
-        [ShortName("loose")]\r
-        Loose = 2,\r
-        [DisplayName("Custom")]\r
-        [ShortName("custom")]\r
-        Custom = 3\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <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>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model.Encoding
+{
+    using HandBrake.Interop.Attributes;
+
+    /// <summary>
+    /// The anamorphic.
+    /// </summary>
+    public enum Anamorphic
+    {
+        [DisplayName("None")]
+        [ShortName("none")]
+        None = 0,
+        [DisplayName("Automatic")]
+        [ShortName("auto")]
+        Automatic = 4,
+        [DisplayName("Loose")]
+        [ShortName("loose")]
+        Loose = 2,
+        [DisplayName("Custom")]
+        [ShortName("custom")]
+        Custom = 3
+    }
 }
\ No newline at end of file
similarity index 88%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/CombDetect.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Encoding/CombDetect.cs
index d98d0d2ec77d5db913df5365ba82b45ca7939403..922cdbc2465d9c4cbe44f8f8d4638e407797f25d 100644 (file)
@@ -7,9 +7,9 @@
 // </summary>
 // --------------------------------------------------------------------------------------------------------------------
 
-namespace HandBrake.ApplicationServices.Interop.Model.Encoding
+namespace HandBrake.Interop.Interop.Model.Encoding
 {
-    using HandBrake.ApplicationServices.Attributes;
+    using HandBrake.Interop.Attributes;
 
     /// <summary>
     /// The CombDetect Type.
similarity index 84%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Container.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Encoding/Container.cs
index b8eab8dad61cd48d0a96afb9d3ee24240e3d4655..8950d2b92d1460fde81e9ee62cfd4931218d86aa 100644 (file)
@@ -1,29 +1,29 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Container.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the Container type.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
-{\r
-    using System;\r
-\r
-    using HandBrake.ApplicationServices.Attributes;\r
-\r
-    /// <summary>\r
-    /// The container.\r
-    /// </summary>\r
-    [Flags]\r
-    public enum Container\r
-    {\r
-        None = 0x0,\r
-\r
-        [DisplayName("MP4")]\r
-        MP4,\r
-        [DisplayName("MKV")]\r
-        MKV\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Container.cs" company="HandBrake Project (http://handbrake.fr)">
+//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+//   Defines the Container type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model.Encoding
+{
+    using System;
+
+    using HandBrake.Interop.Attributes;
+
+    /// <summary>
+    /// The container.
+    /// </summary>
+    [Flags]
+    public enum Container
+    {
+        None = 0x0,
+
+        [DisplayName("MP4")]
+        MP4,
+        [DisplayName("MKV")]
+        MKV
+    }
+}
similarity index 85%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Decomb.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Encoding/Decomb.cs
index a2b544029f344eb41ccd3819d4ea08a87121079f..1fe70b421ce07a2285613115b73ef73fe219448e 100644 (file)
@@ -1,34 +1,34 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Decomb.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the Decomb type.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
-{\r
-    using HandBrake.ApplicationServices.Attributes;\r
-\r
-    /// <summary>\r
-    /// The decomb.\r
-    /// </summary>\r
-    public enum Decomb\r
-    {\r
-        [ShortName("default")]\r
-        Default,\r
-\r
-        [ShortName("bob")]\r
-        Bob,\r
-\r
-        [ShortName("custom")]\r
-        Custom,\r
-\r
-        [ShortName("eedi2")]\r
-        EEDI2,\r
-\r
-        [ShortName("eedi2bob")]\r
-        EEDI2Bob\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <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>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model.Encoding
+{
+    using HandBrake.Interop.Attributes;
+
+    /// <summary>
+    /// The decomb.
+    /// </summary>
+    public enum Decomb
+    {
+        [ShortName("default")]
+        Default,
+
+        [ShortName("bob")]
+        Bob,
+
+        [ShortName("custom")]
+        Custom,
+
+        [ShortName("eedi2")]
+        EEDI2,
+
+        [ShortName("eedi2bob")]
+        EEDI2Bob
+    }
+}
similarity index 85%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Deinterlace.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Encoding/Deinterlace.cs
index 162400b5d2a1081404ecad9859865cc6c5bd2a8b..07c519a35169d09dec98d3d85f501d2927d34035 100644 (file)
@@ -1,31 +1,31 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Deinterlace.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the Deinterlace type.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
-{\r
-    using HandBrake.ApplicationServices.Attributes;\r
-\r
-    /// <summary>\r
-    /// The deinterlace.\r
-    /// </summary>\r
-    public enum Deinterlace\r
-    {\r
-        [ShortName("custom")]\r
-        Custom,\r
-\r
-        [ShortName("default")]\r
-        Default,\r
-\r
-        [ShortName("skip-spatial")]\r
-        SkipSpatialCheck,\r
-\r
-        [ShortName("bob")]\r
-        Bob\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <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>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model.Encoding
+{
+    using HandBrake.Interop.Attributes;
+
+    /// <summary>
+    /// The deinterlace.
+    /// </summary>
+    public enum Deinterlace
+    {
+        [ShortName("custom")]
+        Custom,
+
+        [ShortName("default")]
+        Default,
+
+        [ShortName("skip-spatial")]
+        SkipSpatialCheck,
+
+        [ShortName("bob")]
+        Bob
+    }
+}
similarity index 87%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/DeinterlaceFilter.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Encoding/DeinterlaceFilter.cs
index 03d7bce60bc3c530bef82ccf62d9fd32bf5f2f8e..1ebc03cc6a8704fa911695f584ddf9b3fb87e40e 100644 (file)
@@ -7,9 +7,9 @@
 // </summary>
 // --------------------------------------------------------------------------------------------------------------------
 
-namespace HandBrake.ApplicationServices.Interop.Model.Encoding
+namespace HandBrake.Interop.Interop.Model.Encoding
 {
-    using HandBrake.ApplicationServices.Attributes;
+    using HandBrake.Interop.Attributes;
 
     /// <summary>
     /// The deinterlace.
similarity index 84%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Denoise.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Encoding/Denoise.cs
index 4374372ff48293e38818fe32a82fc80e8db5d51a..fb6440188a7c727bb0fda55816f10dbe29ae32db 100644 (file)
@@ -1,28 +1,28 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Denoise.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the Denoise type.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
-{\r
-    using HandBrake.ApplicationServices.Attributes;\r
-\r
-    /// <summary>\r
-    /// The denoise.\r
-    /// </summary>\r
-    public enum Denoise\r
-    {\r
-        [ShortName("off")]\r
-        Off = 0,\r
-\r
-        [ShortName("hqdn3d")]\r
-        hqdn3d = 1,\r
-\r
-        [ShortName("nlmeans")]\r
-        NLMeans = 2,\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <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>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model.Encoding
+{
+    using HandBrake.Interop.Attributes;
+
+    /// <summary>
+    /// The denoise.
+    /// </summary>
+    public enum Denoise
+    {
+        [ShortName("off")]
+        Off = 0,
+
+        [ShortName("hqdn3d")]
+        hqdn3d = 1,
+
+        [ShortName("nlmeans")]
+        NLMeans = 2,
+    }
+}
similarity index 84%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Detelecine.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Encoding/Detelecine.cs
index f93c754a4bad5c1d4059c1ea6422e138ed99c01e..0aeebdd7c8c79fa89f7b436fc62bc14e1197619d 100644 (file)
@@ -1,26 +1,26 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Detelecine.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the Detelecine type.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
-{\r
-    using HandBrake.ApplicationServices.Attributes;\r
-\r
-    /// <summary>\r
-    /// The detelecine.\r
-    /// </summary>\r
-    public enum Detelecine\r
-    {\r
-        [ShortName("off")]\r
-        Off = 0,\r
-        [ShortName("default")]\r
-        Default = 2,\r
-        [ShortName("custom")]\r
-        Custom = 1\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <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>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model.Encoding
+{
+    using HandBrake.Interop.Attributes;
+
+    /// <summary>
+    /// The detelecine.
+    /// </summary>
+    public enum Detelecine
+    {
+        [ShortName("off")]
+        Off = 0,
+        [ShortName("default")]
+        Default = 2,
+        [ShortName("custom")]
+        Custom = 1
+    }
+}
similarity index 94%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/HBAudioEncoder.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Encoding/HBAudioEncoder.cs
index 2d2e5b26d2e49f8290124fb82afb305718a2b0ce..4e4f241df1b0d91f43a06b03c5486984a9dc3b84 100644 (file)
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="HBAudioEncoder.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The hb audio encoder.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
-{\r
-    using HandBrake.ApplicationServices.Interop.HbLib;\r
-\r
-    /// <summary>\r
-    /// The hb audio encoder.\r
-    /// </summary>\r
-    public class HBAudioEncoder\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="HBAudioEncoder"/> class.\r
-        /// </summary>\r
-        /// <param name="compatibleContainers">\r
-        /// The compatible containers.\r
-        /// </param>\r
-        /// <param name="compressionLimits">\r
-        /// The compression limits.\r
-        /// </param>\r
-        /// <param name="defaultCompression">\r
-        /// The default compression.\r
-        /// </param>\r
-        /// <param name="defaultQuality">\r
-        /// The default quality.\r
-        /// </param>\r
-        /// <param name="displayName">\r
-        /// The display name.\r
-        /// </param>\r
-        /// <param name="id">\r
-        /// The id.\r
-        /// </param>\r
-        /// <param name="qualityLimits">\r
-        /// The quality limits.\r
-        /// </param>\r
-        /// <param name="shortName">\r
-        /// The short name.\r
-        /// </param>\r
-        public HBAudioEncoder(int compatibleContainers, RangeLimits compressionLimits, float defaultCompression, float defaultQuality, string displayName, int id, RangeLimits qualityLimits, string shortName)\r
-        {\r
-            this.CompatibleContainers = compatibleContainers;\r
-            this.CompressionLimits = compressionLimits;\r
-            this.DefaultCompression = defaultCompression;\r
-            this.DefaultQuality = defaultQuality;\r
-            this.DisplayName = displayName;\r
-            this.Id = id;\r
-            this.QualityLimits = qualityLimits;\r
-            this.ShortName = shortName;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the compatible containers.\r
-        /// </summary>\r
-        public int CompatibleContainers { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the compression limits.\r
-        /// </summary>\r
-        public RangeLimits CompressionLimits { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the default compression.\r
-        /// </summary>\r
-        public float DefaultCompression { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the default quality.\r
-        /// </summary>\r
-        public float DefaultQuality { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the display name.\r
-        /// </summary>\r
-        public string DisplayName { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the id.\r
-        /// </summary>\r
-        public int Id { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets a value indicating whether the encoder is passthrough.\r
-        /// </summary>\r
-        public bool IsPassthrough\r
-        {\r
-            get\r
-            {\r
-                return (this.Id & NativeConstants.HB_ACODEC_PASS_FLAG) > 0;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the quality limits.\r
-        /// </summary>\r
-        public RangeLimits QualityLimits { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the short name.\r
-        /// </summary>\r
-        public string ShortName { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets a value indicating whether the encoder supports compression.\r
-        /// </summary>\r
-        public bool SupportsCompression\r
-        {\r
-            get\r
-            {\r
-                return this.CompressionLimits.High >= 0;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets a value indicating whether the encoder supports quality.\r
-        /// </summary>\r
-        public bool SupportsQuality\r
-        {\r
-            get\r
-            {\r
-                return this.QualityLimits.High >= 0;\r
-            }\r
-        }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="HBAudioEncoder.cs" company="HandBrake Project (http://handbrake.fr)">
+//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+//   The hb audio encoder.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model.Encoding
+{
+    using HandBrake.Interop.Interop.HbLib;
+
+    /// <summary>
+    /// The hb audio encoder.
+    /// </summary>
+    public class HBAudioEncoder
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="HBAudioEncoder"/> class.
+        /// </summary>
+        /// <param name="compatibleContainers">
+        /// The compatible containers.
+        /// </param>
+        /// <param name="compressionLimits">
+        /// The compression limits.
+        /// </param>
+        /// <param name="defaultCompression">
+        /// The default compression.
+        /// </param>
+        /// <param name="defaultQuality">
+        /// The default quality.
+        /// </param>
+        /// <param name="displayName">
+        /// The display name.
+        /// </param>
+        /// <param name="id">
+        /// The id.
+        /// </param>
+        /// <param name="qualityLimits">
+        /// The quality limits.
+        /// </param>
+        /// <param name="shortName">
+        /// The short name.
+        /// </param>
+        public HBAudioEncoder(int compatibleContainers, RangeLimits compressionLimits, float defaultCompression, float defaultQuality, string displayName, int id, RangeLimits qualityLimits, string shortName)
+        {
+            this.CompatibleContainers = compatibleContainers;
+            this.CompressionLimits = compressionLimits;
+            this.DefaultCompression = defaultCompression;
+            this.DefaultQuality = defaultQuality;
+            this.DisplayName = displayName;
+            this.Id = id;
+            this.QualityLimits = qualityLimits;
+            this.ShortName = shortName;
+        }
+
+        /// <summary>
+        /// Gets the compatible containers.
+        /// </summary>
+        public int CompatibleContainers { get; private set; }
+
+        /// <summary>
+        /// Gets the compression limits.
+        /// </summary>
+        public RangeLimits CompressionLimits { get; private set; }
+
+        /// <summary>
+        /// Gets the default compression.
+        /// </summary>
+        public float DefaultCompression { get; private set; }
+
+        /// <summary>
+        /// Gets the default quality.
+        /// </summary>
+        public float DefaultQuality { get; private set; }
+
+        /// <summary>
+        /// Gets the display name.
+        /// </summary>
+        public string DisplayName { get; private set; }
+
+        /// <summary>
+        /// Gets the id.
+        /// </summary>
+        public int Id { get; private set; }
+
+        /// <summary>
+        /// Gets a value indicating whether the encoder is passthrough.
+        /// </summary>
+        public bool IsPassthrough
+        {
+            get
+            {
+                return (this.Id & NativeConstants.HB_ACODEC_PASS_FLAG) > 0;
+            }
+        }
+
+        /// <summary>
+        /// Gets or sets the quality limits.
+        /// </summary>
+        public RangeLimits QualityLimits { get; set; }
+
+        /// <summary>
+        /// Gets or sets the short name.
+        /// </summary>
+        public string ShortName { get; set; }
+
+        /// <summary>
+        /// Gets a value indicating whether the encoder supports compression.
+        /// </summary>
+        public bool SupportsCompression
+        {
+            get
+            {
+                return this.CompressionLimits.High >= 0;
+            }
+        }
+
+        /// <summary>
+        /// Gets a value indicating whether the encoder supports quality.
+        /// </summary>
+        public bool SupportsQuality
+        {
+            get
+            {
+                return this.QualityLimits.High >= 0;
+            }
+        }
+    }
 }
\ No newline at end of file
similarity index 93%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/HBContainer.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Encoding/HBContainer.cs
index 832d3513d85c5cd897206076458a022fd1cac10d..487e9036296b835e208992183289bc887ae2fda8 100644 (file)
@@ -1,60 +1,60 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="HBContainer.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The hb container.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
-{\r
-    /// <summary>\r
-    /// The hb container.\r
-    /// </summary>\r
-    public class HBContainer\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="HBContainer"/> class.\r
-        /// </summary>\r
-        /// <param name="defaultExtension">\r
-        /// The default extension.\r
-        /// </param>\r
-        /// <param name="displayName">\r
-        /// The display name.\r
-        /// </param>\r
-        /// <param name="id">\r
-        /// The id.\r
-        /// </param>\r
-        /// <param name="shortName">\r
-        /// The short name.\r
-        /// </param>\r
-        public HBContainer(string defaultExtension, string displayName, int id, string shortName)\r
-        {\r
-            this.DefaultExtension = defaultExtension;\r
-            this.DisplayName = displayName;\r
-            this.Id = id;\r
-            this.ShortName = shortName;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the default extension.\r
-        /// </summary>\r
-        public string DefaultExtension { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the display name.\r
-        /// </summary>\r
-        public string DisplayName { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the id.\r
-        /// </summary>\r
-        public int Id { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the short name.\r
-        /// </summary>\r
-        public string ShortName { get; private set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="HBContainer.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>
+//   The hb container.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model.Encoding
+{
+    /// <summary>
+    /// The hb container.
+    /// </summary>
+    public class HBContainer
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="HBContainer"/> class.
+        /// </summary>
+        /// <param name="defaultExtension">
+        /// The default extension.
+        /// </param>
+        /// <param name="displayName">
+        /// The display name.
+        /// </param>
+        /// <param name="id">
+        /// The id.
+        /// </param>
+        /// <param name="shortName">
+        /// The short name.
+        /// </param>
+        public HBContainer(string defaultExtension, string displayName, int id, string shortName)
+        {
+            this.DefaultExtension = defaultExtension;
+            this.DisplayName = displayName;
+            this.Id = id;
+            this.ShortName = shortName;
+        }
+
+        /// <summary>
+        /// Gets the default extension.
+        /// </summary>
+        public string DefaultExtension { get; private set; }
+
+        /// <summary>
+        /// Gets the display name.
+        /// </summary>
+        public string DisplayName { get; private set; }
+
+        /// <summary>
+        /// Gets the id.
+        /// </summary>
+        public int Id { get; private set; }
+
+        /// <summary>
+        /// Gets the short name.
+        /// </summary>
+        public string ShortName { get; private set; }
+    }
 }
\ No newline at end of file
similarity index 93%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/HBMixdown.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Encoding/HBMixdown.cs
index 04927b9dd44145452af934f8c7ad05b165ca2614..a96724c3118233830d2959044d3c18764ad4daf3 100644 (file)
@@ -1,51 +1,51 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="HBMixdown.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The hb mixdown.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
-{\r
-    /// <summary>\r
-    /// The hb mixdown.\r
-    /// </summary>\r
-    public class HBMixdown\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="HBMixdown"/> class.\r
-        /// </summary>\r
-        /// <param name="displayName">\r
-        /// The display name.\r
-        /// </param>\r
-        /// <param name="id">\r
-        /// The id.\r
-        /// </param>\r
-        /// <param name="shortName">\r
-        /// The short name.\r
-        /// </param>\r
-        public HBMixdown(string displayName, int id, string shortName)\r
-        {\r
-            this.DisplayName = displayName;\r
-            this.Id = id;\r
-            this.ShortName = shortName;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the display name.\r
-        /// </summary>\r
-        public string DisplayName { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the id.\r
-        /// </summary>\r
-        public int Id { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the short name.\r
-        /// </summary>\r
-        public string ShortName { get; private set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="HBMixdown.cs" company="HandBrake Project (http://handbrake.fr)">
+//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+//   The hb mixdown.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model.Encoding
+{
+    /// <summary>
+    /// The hb mixdown.
+    /// </summary>
+    public class HBMixdown
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="HBMixdown"/> class.
+        /// </summary>
+        /// <param name="displayName">
+        /// The display name.
+        /// </param>
+        /// <param name="id">
+        /// The id.
+        /// </param>
+        /// <param name="shortName">
+        /// The short name.
+        /// </param>
+        public HBMixdown(string displayName, int id, string shortName)
+        {
+            this.DisplayName = displayName;
+            this.Id = id;
+            this.ShortName = shortName;
+        }
+
+        /// <summary>
+        /// Gets the display name.
+        /// </summary>
+        public string DisplayName { get; private set; }
+
+        /// <summary>
+        /// Gets the id.
+        /// </summary>
+        public int Id { get; private set; }
+
+        /// <summary>
+        /// Gets the short name.
+        /// </summary>
+        public string ShortName { get; private set; }
+    }
 }
\ No newline at end of file
similarity index 95%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/HBPresetTune.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Encoding/HBPresetTune.cs
index e3ed4c06a6f47d21facb4899749544285789eeb2..2954128d779115c99950fb24bc66815b00cc306b 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>
 // --------------------------------------------------------------------------------------------------------------------
 
-namespace HandBrake.ApplicationServices.Interop.Model.Encoding
+namespace HandBrake.Interop.Interop.Model.Encoding
 {
     /// <summary>
     /// The hb preset tune.
similarity index 92%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/HBRate.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Encoding/HBRate.cs
index d3287cddbbbb90bd8fed8e2c3335b6dd983f1954..ecebb0526e7a4e2dfb9caeeb81dce06402d415a2 100644 (file)
@@ -1,42 +1,42 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="HBRate.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Represents a rate in HandBrake: audio sample rate or video framerate.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
-{\r
-    /// <summary>\r
-    /// Represents a rate in HandBrake: audio sample rate or video framerate.\r
-    /// </summary>\r
-    public class HBRate\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="HBRate"/> class.\r
-        /// </summary>\r
-        /// <param name="name">\r
-        /// The name.\r
-        /// </param>\r
-        /// <param name="rate">\r
-        /// The rate.\r
-        /// </param>\r
-        public HBRate(string name, int rate)\r
-        {\r
-            this.Name = name;\r
-            this.Rate = rate;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the name to use for this rate.\r
-        /// </summary>\r
-        public string Name { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the raw rate.\r
-        /// </summary>\r
-        public int Rate { get; private set; }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="HBRate.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 rate in HandBrake: audio sample rate or video framerate.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model.Encoding
+{
+    /// <summary>
+    /// Represents a rate in HandBrake: audio sample rate or video framerate.
+    /// </summary>
+    public class HBRate
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="HBRate"/> class.
+        /// </summary>
+        /// <param name="name">
+        /// The name.
+        /// </param>
+        /// <param name="rate">
+        /// The rate.
+        /// </param>
+        public HBRate(string name, int rate)
+        {
+            this.Name = name;
+            this.Rate = rate;
+        }
+
+        /// <summary>
+        /// Gets the name to use for this rate.
+        /// </summary>
+        public string Name { get; private set; }
+
+        /// <summary>
+        /// Gets the raw rate.
+        /// </summary>
+        public int Rate { get; private set; }
+    }
+}
similarity index 92%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/HBVideoEncoder.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Encoding/HBVideoEncoder.cs
index a1e60b2dec9527b5b10ea4fd9a6df57b0a1fb237..2c064b2bec8f45bc91f97cdaee4767f0c908f6c0 100644 (file)
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="HBVideoEncoder.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The hb video encoder.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
-{\r
-    using System.Collections.Generic;\r
-\r
-    using HandBrake.ApplicationServices.Interop.HbLib;\r
-    using HandBrake.ApplicationServices.Interop.Helpers;\r
-\r
-    /// <summary>\r
-    /// The hb video encoder.\r
-    /// </summary>\r
-    public class HBVideoEncoder\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="HBVideoEncoder"/> class.\r
-        /// </summary>\r
-        /// <param name="compatibleContainers">\r
-        /// The compatible containers.\r
-        /// </param>\r
-        /// <param name="displayName">\r
-        /// The display name.\r
-        /// </param>\r
-        /// <param name="id">\r
-        /// The id.\r
-        /// </param>\r
-        /// <param name="shortName">\r
-        /// The short name.\r
-        /// </param>\r
-        public HBVideoEncoder(int compatibleContainers, string displayName, int id, string shortName)\r
-        {\r
-            this.CompatibleContainers = compatibleContainers;\r
-            this.DisplayName = displayName;\r
-            this.Id = id;\r
-            this.ShortName = shortName;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the compatible containers.\r
-        /// </summary>\r
-        public int CompatibleContainers { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the display name.\r
-        /// </summary>\r
-        public string DisplayName { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the id.\r
-        /// </summary>\r
-        public int Id { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the short name.\r
-        /// </summary>\r
-        public string ShortName { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the list of presets this encoder supports. (null if the encoder doesn't support presets)\r
-        /// </summary>\r
-        public List<string> Presets\r
-        {\r
-            get\r
-            {\r
-                return InteropUtilities.ToStringListFromArrayPtr(HBFunctions.hb_video_encoder_get_presets(this.Id));\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the list of tunes this encoder supports. (null if the encoder doesn't support tunes)\r
-        /// </summary>\r
-        public List<string> Tunes\r
-        {\r
-            get\r
-            {\r
-                return InteropUtilities.ToStringListFromArrayPtr(HBFunctions.hb_video_encoder_get_tunes(this.Id));\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the list of profiles this encoder supports. (null if the encoder doesn't support profiles)\r
-        /// </summary>\r
-        public List<string> Profiles\r
-        {\r
-            get\r
-            {\r
-                return InteropUtilities.ToStringListFromArrayPtr(HBFunctions.hb_video_encoder_get_profiles(this.Id));\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the list of levels this encoder supports. (null if the encoder doesn't support levels)\r
-        /// </summary>\r
-        public List<string> Levels\r
-        {\r
-            get\r
-            {\r
-                return InteropUtilities.ToStringListFromArrayPtr(HBFunctions.hb_video_encoder_get_levels(this.Id));\r
-            }\r
-        } \r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="HBVideoEncoder.cs" company="HandBrake Project (http://handbrake.fr)">
+//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+//   The hb video encoder.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model.Encoding
+{
+    using System.Collections.Generic;
+
+    using HandBrake.Interop.Interop.HbLib;
+    using HandBrake.Interop.Interop.Helpers;
+
+    /// <summary>
+    /// The hb video encoder.
+    /// </summary>
+    public class HBVideoEncoder
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="HBVideoEncoder"/> class.
+        /// </summary>
+        /// <param name="compatibleContainers">
+        /// The compatible containers.
+        /// </param>
+        /// <param name="displayName">
+        /// The display name.
+        /// </param>
+        /// <param name="id">
+        /// The id.
+        /// </param>
+        /// <param name="shortName">
+        /// The short name.
+        /// </param>
+        public HBVideoEncoder(int compatibleContainers, string displayName, int id, string shortName)
+        {
+            this.CompatibleContainers = compatibleContainers;
+            this.DisplayName = displayName;
+            this.Id = id;
+            this.ShortName = shortName;
+        }
+
+        /// <summary>
+        /// Gets the compatible containers.
+        /// </summary>
+        public int CompatibleContainers { get; private set; }
+
+        /// <summary>
+        /// Gets the display name.
+        /// </summary>
+        public string DisplayName { get; private set; }
+
+        /// <summary>
+        /// Gets the id.
+        /// </summary>
+        public int Id { get; private set; }
+
+        /// <summary>
+        /// Gets the short name.
+        /// </summary>
+        public string ShortName { get; private set; }
+
+        /// <summary>
+        /// Gets the list of presets this encoder supports. (null if the encoder doesn't support presets)
+        /// </summary>
+        public List<string> Presets
+        {
+            get
+            {
+                return InteropUtilities.ToStringListFromArrayPtr(HBFunctions.hb_video_encoder_get_presets(this.Id));
+            }
+        }
+
+        /// <summary>
+        /// Gets the list of tunes this encoder supports. (null if the encoder doesn't support tunes)
+        /// </summary>
+        public List<string> Tunes
+        {
+            get
+            {
+                return InteropUtilities.ToStringListFromArrayPtr(HBFunctions.hb_video_encoder_get_tunes(this.Id));
+            }
+        }
+
+        /// <summary>
+        /// Gets the list of profiles this encoder supports. (null if the encoder doesn't support profiles)
+        /// </summary>
+        public List<string> Profiles
+        {
+            get
+            {
+                return InteropUtilities.ToStringListFromArrayPtr(HBFunctions.hb_video_encoder_get_profiles(this.Id));
+            }
+        }
+
+        /// <summary>
+        /// Gets the list of levels this encoder supports. (null if the encoder doesn't support levels)
+        /// </summary>
+        public List<string> Levels
+        {
+            get
+            {
+                return InteropUtilities.ToStringListFromArrayPtr(HBFunctions.hb_video_encoder_get_levels(this.Id));
+            }
+        } 
+    }
 }
\ No newline at end of file
similarity index 89%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/PictureRotation.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Encoding/PictureRotation.cs
index 76dc2846b583b956a7ef29332e1be19adbc93326..2c0d85b9dfe3e7243661aa8f95d5c272afba27bf 100644 (file)
@@ -1,22 +1,22 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="PictureRotation.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Possible picture rotations.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
-{\r
-    /// <summary>\r
-    /// Possible picture rotations.\r
-    /// </summary>\r
-    public enum PictureRotation\r
-    {\r
-        None = 0,\r
-        Clockwise90,\r
-        Clockwise180,\r
-        Clockwise270\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="PictureRotation.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>
+//   Possible picture rotations.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model.Encoding
+{
+    /// <summary>
+    /// Possible picture rotations.
+    /// </summary>
+    public enum PictureRotation
+    {
+        None = 0,
+        Clockwise90,
+        Clockwise180,
+        Clockwise270
+    }
+}
similarity index 90%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/ScaleMethod.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Encoding/ScaleMethod.cs
index 5d49ec2ae01e751bef5b6e97d3cf135369502810..8f62f3f22396a0807f52de6dd5b86da6699605f6 100644 (file)
@@ -1,27 +1,27 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="ScaleMethod.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Scaling Method\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
-{\r
-    /// <summary>\r
-    /// Enumeration of rescaling algorithms.\r
-    /// </summary>\r
-    public enum ScaleMethod\r
-    {\r
-        /// <summary>\r
-        /// Standard software scaling. Highest quality.\r
-        /// </summary>\r
-        Lanczos = 0,\r
-\r
-        /// <summary>\r
-        /// OpenCL-assisted bicubic scaling.\r
-        /// </summary>\r
-        Bicubic = 1\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="ScaleMethod.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>
+//   Scaling Method
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model.Encoding
+{
+    /// <summary>
+    /// Enumeration of rescaling algorithms.
+    /// </summary>
+    public enum ScaleMethod
+    {
+        /// <summary>
+        /// Standard software scaling. Highest quality.
+        /// </summary>
+        Lanczos = 0,
+
+        /// <summary>
+        /// OpenCL-assisted bicubic scaling.
+        /// </summary>
+        Bicubic = 1
+    }
+}
similarity index 86%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Sharpen.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Encoding/Sharpen.cs
index 7f5b9e75a1f2ede3f7be128e7863e0147acd6c96..5924604fe54bbd921e7e1cf9daebb72a0ed14143 100644 (file)
@@ -7,9 +7,9 @@
 // </summary>
 // --------------------------------------------------------------------------------------------------------------------
 
-namespace HandBrake.ApplicationServices.Interop.Model.Encoding
+namespace HandBrake.Interop.Interop.Model.Encoding
 {
-    using HandBrake.ApplicationServices.Attributes;
+    using HandBrake.Interop.Attributes;
 
     /// <summary>
     /// The Sharpen.
similarity index 89%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/VideoEncodeRateType.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Encoding/VideoEncodeRateType.cs
index beb5ca949d47acef7b133af1ff0e82d5b4627846..461b3931d8e33be7a3f8e516894cc8205fdd0aa2 100644 (file)
@@ -1,21 +1,21 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="VideoEncodeRateType.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the VideoEncodeRateType type.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
-{\r
-    /// <summary>\r
-    /// The video encode rate type.\r
-    /// </summary>\r
-    public enum VideoEncodeRateType\r
-    {\r
-        TargetSize = 0,\r
-        AverageBitrate = 1,\r
-        ConstantQuality = 2\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <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>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model.Encoding
+{
+    /// <summary>
+    /// The video encode rate type.
+    /// </summary>
+    public enum VideoEncodeRateType
+    {
+        TargetSize = 0,
+        AverageBitrate = 1,
+        ConstantQuality = 2
+    }
+}
similarity index 90%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/VideoEncoder.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Encoding/VideoEncoder.cs
index e2b82db1d02010c034cd7f3a2d17b4c828374689..68c09d0d11ae647391d167b3e758b0ea3f503933 100644 (file)
@@ -1,71 +1,71 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="VideoEncoder.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The video encoder.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model.Encoding\r
-{\r
-    using HandBrake.ApplicationServices.Attributes;\r
-\r
-    /// <summary>\r
-    /// The video encoder.\r
-    /// </summary>\r
-    public enum VideoEncoder\r
-    {\r
-        [DisplayName("H.264 (x264)")]\r
-        [ShortName("x264")]\r
-        X264 = 0,\r
-\r
-        [DisplayName("H.264 10-bit (x264)")]\r
-        [ShortName("x264_10bit")]\r
-        X264_10,\r
-\r
-        [DisplayName("H.264 (Intel QSV)")]\r
-        [ShortName("qsv_h264")]\r
-        QuickSync,\r
-\r
-        [DisplayName("MPEG-4")]\r
-        [ShortName("mpeg4")]\r
-        FFMpeg,\r
-\r
-        [DisplayName("MPEG-2")]\r
-        [ShortName("mpeg2")]\r
-        FFMpeg2,\r
-\r
-        [DisplayName("Theora")]\r
-        [ShortName("theora")]\r
-        Theora,\r
-\r
-        [DisplayName("H.265 (x265)")]\r
-        [ShortName("x265")]\r
-        X265,\r
-\r
-        [DisplayName("H.265 12-bit (x265)")]\r
-        [ShortName("x265_12bit")]\r
-        X265_12,\r
-\r
-        [DisplayName("H.265 10-bit (x265)")]\r
-        [ShortName("x265_10bit")]\r
-        X265_10,\r
-\r
-        [DisplayName("H.265 (Intel QSV)")]\r
-        [ShortName("qsv_h265")]\r
-        QuickSyncH265,\r
-\r
-        [DisplayName("H.265 10-bit (Intel QSV)")]\r
-        [ShortName("qsv_h265_10bit")]\r
-        QuickSyncH26510b,\r
-\r
-        [DisplayName("VP8")]\r
-        [ShortName("VP8")]\r
-        VP8,\r
-\r
-        [DisplayName("VP9")]\r
-        [ShortName("VP9")]\r
-        VP9\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <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>
+//   The video encoder.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model.Encoding
+{
+    using HandBrake.Interop.Attributes;
+
+    /// <summary>
+    /// The video encoder.
+    /// </summary>
+    public enum VideoEncoder
+    {
+        [DisplayName("H.264 (x264)")]
+        [ShortName("x264")]
+        X264 = 0,
+
+        [DisplayName("H.264 10-bit (x264)")]
+        [ShortName("x264_10bit")]
+        X264_10,
+
+        [DisplayName("H.264 (Intel QSV)")]
+        [ShortName("qsv_h264")]
+        QuickSync,
+
+        [DisplayName("MPEG-4")]
+        [ShortName("mpeg4")]
+        FFMpeg,
+
+        [DisplayName("MPEG-2")]
+        [ShortName("mpeg2")]
+        FFMpeg2,
+
+        [DisplayName("Theora")]
+        [ShortName("theora")]
+        Theora,
+
+        [DisplayName("H.265 (x265)")]
+        [ShortName("x265")]
+        X265,
+
+        [DisplayName("H.265 12-bit (x265)")]
+        [ShortName("x265_12bit")]
+        X265_12,
+
+        [DisplayName("H.265 10-bit (x265)")]
+        [ShortName("x265_10bit")]
+        X265_10,
+
+        [DisplayName("H.265 (Intel QSV)")]
+        [ShortName("qsv_h265")]
+        QuickSyncH265,
+
+        [DisplayName("H.265 10-bit (Intel QSV)")]
+        [ShortName("qsv_h265_10bit")]
+        QuickSyncH26510b,
+
+        [DisplayName("VP8")]
+        [ShortName("VP8")]
+        VP8,
+
+        [DisplayName("VP9")]
+        [ShortName("VP9")]
+        VP9
+    }
+}
similarity index 94%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Language.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Language.cs
index a110f2590c160c9a99eb5c47f13396aca28337dc..5564a434e87e79524c5e577d9aaa702956d579b0 100644 (file)
@@ -1,67 +1,67 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Language.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Represents a language.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model\r
-{\r
-    /// <summary>\r
-    /// Represents a language.\r
-    /// </summary>\r
-    public class Language\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="Language"/> class.\r
-        /// </summary>\r
-        /// <param name="englishName">\r
-        /// The english name.\r
-        /// </param>\r
-        /// <param name="nativeName">\r
-        /// The native name.\r
-        /// </param>\r
-        /// <param name="code">\r
-        /// The code.\r
-        /// </param>\r
-        public Language(string englishName, string nativeName, string code)\r
-        {\r
-            this.EnglishName = englishName;\r
-            this.NativeName = nativeName;\r
-            this.Code = code;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the english name of the language.\r
-        /// </summary>\r
-        public string EnglishName { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the native name of the language.\r
-        /// </summary>\r
-        public string NativeName { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the language code.\r
-        /// </summary>\r
-        public string Code { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the display string for the language.\r
-        /// </summary>\r
-        public string Display\r
-        {\r
-            get\r
-            {\r
-                if (!string.IsNullOrEmpty(this.NativeName) && this.NativeName != this.EnglishName)\r
-                {\r
-                    return this.EnglishName + " (" + this.NativeName + ")";\r
-                }\r
-\r
-                return this.EnglishName;\r
-            }\r
-        }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <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.Interop.Model
+{
+    /// <summary>
+    /// Represents a language.
+    /// </summary>
+    public class Language
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Language"/> class.
+        /// </summary>
+        /// <param name="englishName">
+        /// The english name.
+        /// </param>
+        /// <param name="nativeName">
+        /// The native name.
+        /// </param>
+        /// <param name="code">
+        /// The code.
+        /// </param>
+        public Language(string englishName, string nativeName, string code)
+        {
+            this.EnglishName = englishName;
+            this.NativeName = nativeName;
+            this.Code = code;
+        }
+
+        /// <summary>
+        /// Gets the english name of the language.
+        /// </summary>
+        public string EnglishName { get; private set; }
+
+        /// <summary>
+        /// Gets the native name of the language.
+        /// </summary>
+        public string NativeName { get; private set; }
+
+        /// <summary>
+        /// Gets the language code.
+        /// </summary>
+        public string Code { get; private set; }
+
+        /// <summary>
+        /// Gets the display string for the language.
+        /// </summary>
+        public string Display
+        {
+            get
+            {
+                if (!string.IsNullOrEmpty(this.NativeName) && this.NativeName != this.EnglishName)
+                {
+                    return this.EnglishName + " (" + this.NativeName + ")";
+                }
+
+                return this.EnglishName;
+            }
+        }
+    }
+}
similarity index 94%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Preview/PreviewSettings.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Preview/PreviewSettings.cs
index b3c330a7cb3a5fc67b4065f6f8d9eedf1d34cd59..beebc12f5c6bca32c075865f354366428168f386 100644 (file)
@@ -1,81 +1,81 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="PreviewSettings.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The preview settings.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model.Preview\r
-{\r
-    using Encoding;\r
-\r
-    /// <summary>\r
-    /// The preview settings.\r
-    /// </summary>\r
-    public class PreviewSettings\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="PreviewSettings"/> class.\r
-        /// </summary>\r
-        public PreviewSettings()\r
-        {\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the cropping.\r
-        /// </summary>\r
-        public Cropping Cropping { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the max width.\r
-        /// </summary>\r
-        public int MaxWidth { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the max height.\r
-        /// </summary>\r
-        public int MaxHeight { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether keep display aspect.\r
-        /// </summary>\r
-        public bool KeepDisplayAspect { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the title number.\r
-        /// </summary>\r
-        public int TitleNumber { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the anamorphic.\r
-        /// </summary>\r
-        public Anamorphic Anamorphic { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the modulus.\r
-        /// </summary>\r
-        public int? Modulus { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the width.\r
-        /// </summary>\r
-        public int Width { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the height.\r
-        /// </summary>\r
-        public int Height { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the pixel aspect x.\r
-        /// </summary>\r
-        public int PixelAspectX { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the pixel aspect y.\r
-        /// </summary>\r
-        public int PixelAspectY { get; set; }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="PreviewSettings.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>
+//   The preview settings.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model.Preview
+{
+    using Encoding;
+
+    /// <summary>
+    /// The preview settings.
+    /// </summary>
+    public class PreviewSettings
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="PreviewSettings"/> class.
+        /// </summary>
+        public PreviewSettings()
+        {
+        }
+
+        /// <summary>
+        /// Gets or sets the cropping.
+        /// </summary>
+        public Cropping Cropping { get; set; }
+
+        /// <summary>
+        /// Gets or sets the max width.
+        /// </summary>
+        public int MaxWidth { get; set; }
+
+        /// <summary>
+        /// Gets or sets the max height.
+        /// </summary>
+        public int MaxHeight { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether keep display aspect.
+        /// </summary>
+        public bool KeepDisplayAspect { get; set; }
+
+        /// <summary>
+        /// Gets or sets the title number.
+        /// </summary>
+        public int TitleNumber { get; set; }
+
+        /// <summary>
+        /// Gets or sets the anamorphic.
+        /// </summary>
+        public Anamorphic Anamorphic { get; set; }
+
+        /// <summary>
+        /// Gets or sets the modulus.
+        /// </summary>
+        public int? Modulus { get; set; }
+
+        /// <summary>
+        /// Gets or sets the width.
+        /// </summary>
+        public int Width { get; set; }
+
+        /// <summary>
+        /// Gets or sets the height.
+        /// </summary>
+        public int Height { get; set; }
+
+        /// <summary>
+        /// Gets or sets the pixel aspect x.
+        /// </summary>
+        public int PixelAspectX { get; set; }
+
+        /// <summary>
+        /// Gets or sets the pixel aspect y.
+        /// </summary>
+        public int PixelAspectY { get; set; }
+    }
+}
similarity index 94%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Preview/RawPreviewData.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Preview/RawPreviewData.cs
index 2da2dc52d1080cf7feeb1ae90c98ba5471ba07e4..8768d00545b43cef1f6ebc9bc8248fb0e11de4e2 100644 (file)
@@ -4,7 +4,7 @@
 // </copyright>
 // --------------------------------------------------------------------------------------------------------------------
 
-namespace HandBrake.ApplicationServices.Interop.Model.Preview
+namespace HandBrake.Interop.Interop.Model.Preview
 {
     public class RawPreviewData
     {
similarity index 94%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/RangeLimits.cs
rename to win/CS/HandBrake.Interop/Interop/Model/RangeLimits.cs
index b25c610dd84d55066ed284128daa8328b69e3c30..3a05f8e38f3dde6316d3bc0f92b8fd6e91491376 100644 (file)
@@ -1,60 +1,60 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="RangeLimits.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The range limits.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model\r
-{\r
-    /// <summary>\r
-    /// The range limits.\r
-    /// </summary>\r
-    public class RangeLimits\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="RangeLimits"/> class.\r
-        /// </summary>\r
-        /// <param name="ascending">\r
-        /// The ascending.\r
-        /// </param>\r
-        /// <param name="granularity">\r
-        /// The granularity.\r
-        /// </param>\r
-        /// <param name="high">\r
-        /// The high.\r
-        /// </param>\r
-        /// <param name="low">\r
-        /// The low.\r
-        /// </param>\r
-        public RangeLimits(bool @ascending, float granularity, float high, float low)\r
-        {\r
-            this.Ascending = @ascending;\r
-            this.Granularity = granularity;\r
-            this.High = high;\r
-            this.Low = low;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets a value indicating whether ascending.\r
-        /// </summary>\r
-        public bool Ascending { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the granularity.\r
-        /// </summary>\r
-        public float Granularity { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the high.\r
-        /// </summary>\r
-        public float High { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the low.\r
-        /// </summary>\r
-        public float Low { get; private set; }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="RangeLimits.cs" company="HandBrake Project (http://handbrake.fr)">
+//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+//   The range limits.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model
+{
+    /// <summary>
+    /// The range limits.
+    /// </summary>
+    public class RangeLimits
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="RangeLimits"/> class.
+        /// </summary>
+        /// <param name="ascending">
+        /// The ascending.
+        /// </param>
+        /// <param name="granularity">
+        /// The granularity.
+        /// </param>
+        /// <param name="high">
+        /// The high.
+        /// </param>
+        /// <param name="low">
+        /// The low.
+        /// </param>
+        public RangeLimits(bool @ascending, float granularity, float high, float low)
+        {
+            this.Ascending = @ascending;
+            this.Granularity = granularity;
+            this.High = high;
+            this.Low = low;
+        }
+
+        /// <summary>
+        /// Gets a value indicating whether ascending.
+        /// </summary>
+        public bool Ascending { get; private set; }
+
+        /// <summary>
+        /// Gets the granularity.
+        /// </summary>
+        public float Granularity { get; private set; }
+
+        /// <summary>
+        /// Gets the high.
+        /// </summary>
+        public float High { get; private set; }
+
+        /// <summary>
+        /// Gets the low.
+        /// </summary>
+        public float Low { get; private set; }
+    }
 }
\ No newline at end of file
similarity index 93%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/Size.cs
rename to win/CS/HandBrake.Interop/Interop/Model/Size.cs
index 4a4e09d34348479444fb39bb544682b2d056add4..6113b8bcfe38f1ed2aa9f9c9652ddadb2b5652de 100644 (file)
@@ -1,60 +1,60 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="Size.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the Size type.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model\r
-{\r
-    /// <summary>\r
-    /// The size.\r
-    /// </summary>\r
-    public class Size\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="Size"/> class.\r
-        /// </summary>\r
-        /// <param name="width">\r
-        /// The width.\r
-        /// </param>\r
-        /// <param name="height">\r
-        /// The height.\r
-        /// </param>\r
-        public Size(int width, int height)\r
-        {\r
-            this.Width = width;\r
-            this.Height = height;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the height.\r
-        /// </summary>\r
-        public int Height { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the width.\r
-        /// </summary>\r
-        public int Width { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets a value indicating whether is empty.\r
-        /// </summary>\r
-        public bool IsEmpty \r
-        {\r
-            get\r
-            {\r
-                if (this.Width <= 0 && this.Height <= 0)\r
-                {\r
-                    return true;\r
-                }\r
-                else\r
-                {\r
-                    return false;\r
-                }\r
-            }\r
-        }\r
-    }\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Size.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 Size type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model
+{
+    /// <summary>
+    /// The size.
+    /// </summary>
+    public class Size
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Size"/> class.
+        /// </summary>
+        /// <param name="width">
+        /// The width.
+        /// </param>
+        /// <param name="height">
+        /// The height.
+        /// </param>
+        public Size(int width, int height)
+        {
+            this.Width = width;
+            this.Height = height;
+        }
+
+        /// <summary>
+        /// Gets the height.
+        /// </summary>
+        public int Height { get; private set; }
+
+        /// <summary>
+        /// Gets the width.
+        /// </summary>
+        public int Width { get; private set; }
+
+        /// <summary>
+        /// Gets a value indicating whether is empty.
+        /// </summary>
+        public bool IsEmpty 
+        {
+            get
+            {
+                if (this.Width <= 0 && this.Height <= 0)
+                {
+                    return true;
+                }
+                else
+                {
+                    return false;
+                }
+            }
+        }
+    }
 }
\ No newline at end of file
similarity index 93%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/SourceVideoInfo.cs
rename to win/CS/HandBrake.Interop/Interop/Model/SourceVideoInfo.cs
index 4a0ffd2ec0e73a0088515cce47d6491f2afbba13..23b43df79cd46f3066c72eb604e70b847135f9b2 100644 (file)
@@ -1,42 +1,42 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="SourceVideoInfo.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The source framerate info.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model\r
-{\r
-    /// <summary>\r
-    /// The source framerate info.\r
-    /// </summary>\r
-    public class SourceVideoInfo\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="SourceVideoInfo"/> class.\r
-        /// </summary>\r
-        /// <param name="resolution">\r
-        /// The resolution.\r
-        /// </param>\r
-        /// <param name="parVal">\r
-        /// The par val.\r
-        /// </param>\r
-        public SourceVideoInfo(Size resolution, Size parVal)\r
-        {\r
-            this.Resolution = resolution;\r
-            this.ParVal = parVal;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the resolution (width/height) of this Title\r
-        /// </summary>\r
-        public Size Resolution { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the pixel aspect ratio.\r
-        /// </summary>\r
-        public Size ParVal { get; private set; }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="SourceVideoInfo.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>
+//   The source framerate info.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model
+{
+    /// <summary>
+    /// The source framerate info.
+    /// </summary>
+    public class SourceVideoInfo
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="SourceVideoInfo"/> class.
+        /// </summary>
+        /// <param name="resolution">
+        /// The resolution.
+        /// </param>
+        /// <param name="parVal">
+        /// The par val.
+        /// </param>
+        public SourceVideoInfo(Size resolution, Size parVal)
+        {
+            this.Resolution = resolution;
+            this.ParVal = parVal;
+        }
+
+        /// <summary>
+        /// Gets the resolution (width/height) of this Title
+        /// </summary>
+        public Size Resolution { get; private set; }
+
+        /// <summary>
+        /// Gets the pixel aspect ratio.
+        /// </summary>
+        public Size ParVal { get; private set; }
+    }
+}
similarity index 94%
rename from win/CS/HandBrake.ApplicationServices/Interop/Model/VideoQualityLimits.cs
rename to win/CS/HandBrake.Interop/Interop/Model/VideoQualityLimits.cs
index 19a0755af2f9290a176b1d4db4f00cf518bef581..64fbd6f4f29c5225d24e4bbe0079f6ff8cbd7a1e 100644 (file)
@@ -1,60 +1,60 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="VideoQualityLimits.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Defines the VideoQualityLimits type.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Interop.Model\r
-{\r
-    /// <summary>\r
-    /// Represents limits on video quality for a particular encoder.\r
-    /// </summary>\r
-    public class VideoQualityLimits\r
-    {\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="VideoQualityLimits"/> class.\r
-        /// </summary>\r
-        /// <param name="low">\r
-        /// The low.\r
-        /// </param>\r
-        /// <param name="high">\r
-        /// The high.\r
-        /// </param>\r
-        /// <param name="granularity">\r
-        /// The granularity.\r
-        /// </param>\r
-        /// <param name="ascending">\r
-        /// The ascending.\r
-        /// </param>\r
-        public VideoQualityLimits(float low, float high, float granularity, bool @ascending)\r
-        {\r
-            this.Low = low;\r
-            this.High = high;\r
-            this.Granularity = granularity;\r
-            this.Ascending = @ascending;\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the inclusive lower limit for the quality.\r
-        /// </summary>\r
-        public float Low { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the inclusive upper limit for the quality.\r
-        /// </summary>\r
-        public float High { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets the granularity for the quality.\r
-        /// </summary>\r
-        public float Granularity { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets a value indicating whether the quality increases as the number increases.\r
-        /// </summary>\r
-        public bool Ascending { get; private set; }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="VideoQualityLimits.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 VideoQualityLimits type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Interop.Model
+{
+    /// <summary>
+    /// Represents limits on video quality for a particular encoder.
+    /// </summary>
+    public class VideoQualityLimits
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="VideoQualityLimits"/> class.
+        /// </summary>
+        /// <param name="low">
+        /// The low.
+        /// </param>
+        /// <param name="high">
+        /// The high.
+        /// </param>
+        /// <param name="granularity">
+        /// The granularity.
+        /// </param>
+        /// <param name="ascending">
+        /// The ascending.
+        /// </param>
+        public VideoQualityLimits(float low, float high, float granularity, bool @ascending)
+        {
+            this.Low = low;
+            this.High = high;
+            this.Granularity = granularity;
+            this.Ascending = @ascending;
+        }
+
+        /// <summary>
+        /// Gets the inclusive lower limit for the quality.
+        /// </summary>
+        public float Low { get; private set; }
+
+        /// <summary>
+        /// Gets the inclusive upper limit for the quality.
+        /// </summary>
+        public float High { get; private set; }
+
+        /// <summary>
+        /// Gets the granularity for the quality.
+        /// </summary>
+        public float Granularity { get; private set; }
+
+        /// <summary>
+        /// Gets a value indicating whether the quality increases as the number increases.
+        /// </summary>
+        public bool Ascending { get; private set; }
+    }
+}
similarity index 95%
rename from win/CS/HandBrake.ApplicationServices/Model/HBConfiguration.cs
rename to win/CS/HandBrake.Interop/Model/HBConfiguration.cs
index fd8c97ea35d3e6b0af3cb348c1e255db4f2f9cbb..a9c59c8b410d459dc929574332b3fb44fc9b33da 100644 (file)
@@ -1,67 +1,67 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="HBConfiguration.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   HandBrakes Configuration options\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Model\r
-{\r
-    /// <summary>\r
-    /// HandBrakes configuration options\r
-    /// </summary>\r
-    public class HBConfiguration\r
-    {\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether is dvd nav disabled.\r
-        /// </summary>\r
-        public bool IsDvdNavDisabled { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether disable quick sync decoding.\r
-        /// </summary>\r
-        public bool EnableQuickSyncDecoding { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether use qsv decode for non qsv enc.\r
-        /// </summary>\r
-        public bool UseQSVDecodeForNonQSVEnc { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the scaling mode.\r
-        /// </summary>\r
-        public VideoScaler ScalingMode { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the preview scan count.\r
-        /// </summary>\r
-        public int PreviewScanCount { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the verbosity.\r
-        /// </summary>\r
-        public int Verbosity { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the min scan duration.\r
-        /// </summary>\r
-        public int MinScanDuration { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether save log to copy directory.\r
-        /// </summary>\r
-        public bool SaveLogToCopyDirectory { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether save log with video.\r
-        /// </summary>\r
-        public bool SaveLogWithVideo { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the save log copy directory.\r
-        /// </summary>\r
-        public string SaveLogCopyDirectory { get; set; }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="HBConfiguration.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>
+//   HandBrakes Configuration options
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Model
+{
+    /// <summary>
+    /// HandBrakes configuration options
+    /// </summary>
+    public class HBConfiguration
+    {
+        /// <summary>
+        /// Gets or sets a value indicating whether is dvd nav disabled.
+        /// </summary>
+        public bool IsDvdNavDisabled { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether disable quick sync decoding.
+        /// </summary>
+        public bool EnableQuickSyncDecoding { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether use qsv decode for non qsv enc.
+        /// </summary>
+        public bool UseQSVDecodeForNonQSVEnc { get; set; }
+
+        /// <summary>
+        /// Gets or sets the scaling mode.
+        /// </summary>
+        public VideoScaler ScalingMode { get; set; }
+
+        /// <summary>
+        /// Gets or sets the preview scan count.
+        /// </summary>
+        public int PreviewScanCount { get; set; }
+
+        /// <summary>
+        /// Gets or sets the verbosity.
+        /// </summary>
+        public int Verbosity { get; set; }
+
+        /// <summary>
+        /// Gets or sets the min scan duration.
+        /// </summary>
+        public int MinScanDuration { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether save log to copy directory.
+        /// </summary>
+        public bool SaveLogToCopyDirectory { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether save log with video.
+        /// </summary>
+        public bool SaveLogWithVideo { get; set; }
+
+        /// <summary>
+        /// Gets or sets the save log copy directory.
+        /// </summary>
+        public string SaveLogCopyDirectory { get; set; }
+    }
+}
similarity index 86%
rename from win/CS/HandBrake.ApplicationServices/Model/VideoScaler.cs
rename to win/CS/HandBrake.Interop/Model/VideoScaler.cs
index 4f407881cebd2360c8a673236461a53242859337..03a19fcf3bed40e748b622fcf9aa4c048f9e2495 100644 (file)
@@ -1,23 +1,23 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="VideoScaler.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The different scaling modes available in HandBrake\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Model\r
-{\r
-    using HandBrake.ApplicationServices.Attributes;\r
-\r
-    /// <summary>\r
-    ///  The different scaling modes available in HandBrake\r
-    /// </summary>\r
-    public enum VideoScaler\r
-    {\r
-        [DisplayName("Lanczos (default)")]\r
-        [ShortName("swscale")]\r
-        Lanczos = 0,\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="VideoScaler.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>
+//   The different scaling modes available in HandBrake
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Model
+{
+    using HandBrake.Interop.Attributes;
+
+    /// <summary>
+    ///  The different scaling modes available in HandBrake
+    /// </summary>
+    public enum VideoScaler
+    {
+        [DisplayName("Lanczos (default)")]
+        [ShortName("swscale")]
+        Lanczos = 0,
+    }
+}
similarity index 95%
rename from win/CS/HandBrake.ApplicationServices/Properties/AssemblyInfo.cs
rename to win/CS/HandBrake.Interop/Properties/AssemblyInfo.cs
index c147f3bca6a2d4100a183634a1a6334b021b18b1..c15a66b8ab61b03fe77a5295701adeba7badcb63 100644 (file)
@@ -1,47 +1,47 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="AssemblyInfo.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Assembly Info\r
-// </summary>\r
-// <auto-generated/>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-using System.Reflection;\r
-using System.Resources;\r
-using System.Runtime.CompilerServices;\r
-using System.Runtime.InteropServices;\r
-\r
-// General Information about an assembly is controlled through the following \r
-// set of attributes. Change these attribute values to modify the information\r
-// associated with an assembly.\r
-[assembly: AssemblyTitle("HandBrake LibHB Wrapper")]\r
-[assembly: AssemblyDescription("HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder.")]\r
-[assembly: AssemblyConfiguration("")]\r
-[assembly: AssemblyCompany("HandBrake Team")]\r
-[assembly: AssemblyProduct("HandBrake")]\r
-[assembly: AssemblyCopyright("Copyright © 2003-2018 HandBrake Team")]\r
-[assembly: AssemblyTrademark("")]\r
-[assembly: AssemblyCulture("")]\r
-\r
-// Setting ComVisible to false makes the types in this assembly not visible \r
-// to COM components.  If you need to access a type in this assembly from \r
-// COM, set the ComVisible attribute to true on that type.\r
-[assembly: ComVisible(false)]\r
-\r
-// The following GUID is for the ID of the typelib if this project is exposed to COM\r
-[assembly: Guid("5e4e3f97-5252-41f6-aae9-3846f62cbc66")]\r
-\r
-// Version information for an assembly consists of the following four values:\r
-//\r
-//      Major Version\r
-//      Minor Version \r
-//      Build Number\r
-//      Revision\r
-//\r
-// You can specify all the values or you can default the Build and Revision Numbers \r
-// by using the '*' as shown below:\r
-// [assembly: AssemblyVersion("1.0.*")]\r
-[assembly: AssemblyVersion("1.2.0.0")]\r
-[assembly: NeutralResourcesLanguage("")]\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="AssemblyInfo.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>
+//   Assembly Info
+// </summary>
+// <auto-generated/>
+// --------------------------------------------------------------------------------------------------------------------
+
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HandBrake.Interop")]
+[assembly: AssemblyDescription("HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("HandBrake Team")]
+[assembly: AssemblyProduct("HandBrake")]
+[assembly: AssemblyCopyright("Copyright © 2003-2018 HandBrake Team")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("5e4e3f97-5252-41f6-aae9-3846f62cbc66")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// 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.2.0.0")]
+[assembly: NeutralResourcesLanguage("")]
similarity index 91%
rename from win/CS/HandBrake.ApplicationServices/Properties/Resources.Designer.cs
rename to win/CS/HandBrake.Interop/Properties/Resources.Designer.cs
index 32976b8b7ee87c59081bcd2f65a849feeef320d7..c288971f602f070f3f84433e0b221999af495896 100644 (file)
@@ -1,63 +1,63 @@
-//------------------------------------------------------------------------------\r
-// <auto-generated>\r
-//     This code was generated by a tool.\r
-//     Runtime Version:4.0.30319.42000\r
-//\r
-//     Changes to this file may cause incorrect behavior and will be lost if\r
-//     the code is regenerated.\r
-// </auto-generated>\r
-//------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Properties {\r
-    using System;\r
-    \r
-    \r
-    /// <summary>\r
-    ///   A strongly-typed resource class, for looking up localized strings, etc.\r
-    /// </summary>\r
-    // This class was auto-generated by the StronglyTypedResourceBuilder\r
-    // class via a tool like ResGen or Visual Studio.\r
-    // To add or remove a member, edit your .ResX file then rerun ResGen\r
-    // with the /str option, or rebuild your VS project.\r
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]\r
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r
-    internal class Resources {\r
-        \r
-        private static global::System.Resources.ResourceManager resourceMan;\r
-        \r
-        private static global::System.Globalization.CultureInfo resourceCulture;\r
-        \r
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]\r
-        internal Resources() {\r
-        }\r
-        \r
-        /// <summary>\r
-        ///   Returns the cached ResourceManager instance used by this class.\r
-        /// </summary>\r
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r
-        internal static global::System.Resources.ResourceManager ResourceManager {\r
-            get {\r
-                if (object.ReferenceEquals(resourceMan, null)) {\r
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HandBrake.ApplicationServices.Properties.Resources", typeof(Resources).Assembly);\r
-                    resourceMan = temp;\r
-                }\r
-                return resourceMan;\r
-            }\r
-        }\r
-        \r
-        /// <summary>\r
-        ///   Overrides the current thread's CurrentUICulture property for all\r
-        ///   resource lookups using this strongly typed resource class.\r
-        /// </summary>\r
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r
-        internal static global::System.Globalization.CultureInfo Culture {\r
-            get {\r
-                return resourceCulture;\r
-            }\r
-            set {\r
-                resourceCulture = value;\r
-            }\r
-        }\r
-    }\r
-}\r
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Properties {
+    using System;
+    
+    
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources() {
+        }
+        
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HandBrake.Interop.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+    }
+}
similarity index 97%
rename from win/CS/HandBrake.ApplicationServices/Properties/Resources.resx
rename to win/CS/HandBrake.Interop/Properties/Resources.resx
index 29dcb1b3a353ba227f65e11fbe3d6f0766e84292..1af7de150c99c12dd67a509fe57c10d63e4eeb04 100644 (file)
-<?xml version="1.0" encoding="utf-8"?>\r
-<root>\r
-  <!-- \r
-    Microsoft ResX Schema \r
-    \r
-    Version 2.0\r
-    \r
-    The primary goals of this format is to allow a simple XML format \r
-    that is mostly human readable. The generation and parsing of the \r
-    various data types are done through the TypeConverter classes \r
-    associated with the data types.\r
-    \r
-    Example:\r
-    \r
-    ... ado.net/XML headers & schema ...\r
-    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
-    <resheader name="version">2.0</resheader>\r
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
-        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
-    </data>\r
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
-        <comment>This is a comment</comment>\r
-    </data>\r
-                \r
-    There are any number of "resheader" rows that contain simple \r
-    name/value pairs.\r
-    \r
-    Each data row contains a name, and value. The row also contains a \r
-    type or mimetype. Type corresponds to a .NET class that support \r
-    text/value conversion through the TypeConverter architecture. \r
-    Classes that don't support this are serialized and stored with the \r
-    mimetype set.\r
-    \r
-    The mimetype is used for serialized objects, and tells the \r
-    ResXResourceReader how to depersist the object. This is currently not \r
-    extensible. For a given mimetype the value must be set accordingly:\r
-    \r
-    Note - application/x-microsoft.net.object.binary.base64 is the format \r
-    that the ResXResourceWriter will generate, however the reader can \r
-    read any of the formats listed below.\r
-    \r
-    mimetype: application/x-microsoft.net.object.binary.base64\r
-    value   : The object must be serialized with \r
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
-            : and then encoded with base64 encoding.\r
-    \r
-    mimetype: application/x-microsoft.net.object.soap.base64\r
-    value   : The object must be serialized with \r
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
-            : and then encoded with base64 encoding.\r
-\r
-    mimetype: application/x-microsoft.net.object.bytearray.base64\r
-    value   : The object must be serialized into a byte array \r
-            : using a System.ComponentModel.TypeConverter\r
-            : and then encoded with base64 encoding.\r
-    -->\r
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
-    <xsd:element name="root" msdata:IsDataSet="true">\r
-      <xsd:complexType>\r
-        <xsd:choice maxOccurs="unbounded">\r
-          <xsd:element name="metadata">\r
-            <xsd:complexType>\r
-              <xsd:sequence>\r
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
-              </xsd:sequence>\r
-              <xsd:attribute name="name" use="required" type="xsd:string" />\r
-              <xsd:attribute name="type" type="xsd:string" />\r
-              <xsd:attribute name="mimetype" type="xsd:string" />\r
-              <xsd:attribute ref="xml:space" />\r
-            </xsd:complexType>\r
-          </xsd:element>\r
-          <xsd:element name="assembly">\r
-            <xsd:complexType>\r
-              <xsd:attribute name="alias" type="xsd:string" />\r
-              <xsd:attribute name="name" type="xsd:string" />\r
-            </xsd:complexType>\r
-          </xsd:element>\r
-          <xsd:element name="data">\r
-            <xsd:complexType>\r
-              <xsd:sequence>\r
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
-              </xsd:sequence>\r
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
-              <xsd:attribute ref="xml:space" />\r
-            </xsd:complexType>\r
-          </xsd:element>\r
-          <xsd:element name="resheader">\r
-            <xsd:complexType>\r
-              <xsd:sequence>\r
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
-              </xsd:sequence>\r
-              <xsd:attribute name="name" type="xsd:string" use="required" />\r
-            </xsd:complexType>\r
-          </xsd:element>\r
-        </xsd:choice>\r
-      </xsd:complexType>\r
-    </xsd:element>\r
-  </xsd:schema>\r
-  <resheader name="resmimetype">\r
-    <value>text/microsoft-resx</value>\r
-  </resheader>\r
-  <resheader name="version">\r
-    <value>2.0</value>\r
-  </resheader>\r
-  <resheader name="reader">\r
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
-  </resheader>\r
-  <resheader name="writer">\r
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
-  </resheader>\r
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
 </root>
\ No newline at end of file
similarity index 94%
rename from win/CS/HandBrake.ApplicationServices/Utilities/CharCodesUtilities.cs
rename to win/CS/HandBrake.Interop/Utilities/CharCodesUtilities.cs
index 8470927f665c5a274c7fd366148f9afa5465b745..ced240bb7ff3db7ff6ea488f50c53a9a0e5d5424 100644 (file)
@@ -1,63 +1,63 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="CharCodesUtilities.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Char Codes\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Utilities\r
-{\r
-    using System.Collections.Generic;\r
-\r
-    /// <summary>\r
-    /// Char Codes\r
-    /// </summary>\r
-    public class CharCodesUtilities\r
-    {\r
-        /// <summary>\r
-        /// Get a command subset of character codes.\r
-        /// </summary>\r
-        /// <returns>\r
-        /// A String List of Character codes.\r
-        /// </returns>\r
-        public static List<string> GetCharacterCodes()\r
-        {\r
-            return new List<string>\r
-                {\r
-                    "ANSI_X3.4-1968",\r
-                    "ANSI_X3.4-1986",\r
-                    "ANSI_X3.4",\r
-                    "ANSI_X3.110-1983",\r
-                    "ANSI_X3.110",\r
-                    "ASCII",\r
-                    "ECMA-114",\r
-                    "ECMA-118",\r
-                    "ECMA-128",\r
-                    "ECMA-CYRILLIC",\r
-                    "IEC_P27-1",\r
-                    "ISO-8859-1",\r
-                    "ISO-8859-2",\r
-                    "ISO-8859-3",\r
-                    "ISO-8859-4",\r
-                    "ISO-8859-5",\r
-                    "ISO-8859-6",\r
-                    "ISO-8859-7",\r
-                    "ISO-8859-8",\r
-                    "ISO-8859-9",\r
-                    "ISO-8859-9E",\r
-                    "ISO-8859-10",\r
-                    "ISO-8859-11",\r
-                    "ISO-8859-13",\r
-                    "ISO-8859-14",\r
-                    "ISO-8859-15",\r
-                    "ISO-8859-16",\r
-                    "UTF-7",\r
-                    "UTF-8",\r
-                    "UTF-16",\r
-                    "UTF-32"\r
-                };\r
-        }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="CharCodesUtilities.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>
+//   Char Codes
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Utilities
+{
+    using System.Collections.Generic;
+
+    /// <summary>
+    /// Char Codes
+    /// </summary>
+    public class CharCodesUtilities
+    {
+        /// <summary>
+        /// Get a command subset of character codes.
+        /// </summary>
+        /// <returns>
+        /// A String List of Character codes.
+        /// </returns>
+        public static List<string> GetCharacterCodes()
+        {
+            return new List<string>
+                {
+                    "ANSI_X3.4-1968",
+                    "ANSI_X3.4-1986",
+                    "ANSI_X3.4",
+                    "ANSI_X3.110-1983",
+                    "ANSI_X3.110",
+                    "ASCII",
+                    "ECMA-114",
+                    "ECMA-118",
+                    "ECMA-128",
+                    "ECMA-CYRILLIC",
+                    "IEC_P27-1",
+                    "ISO-8859-1",
+                    "ISO-8859-2",
+                    "ISO-8859-3",
+                    "ISO-8859-4",
+                    "ISO-8859-5",
+                    "ISO-8859-6",
+                    "ISO-8859-7",
+                    "ISO-8859-8",
+                    "ISO-8859-9",
+                    "ISO-8859-9E",
+                    "ISO-8859-10",
+                    "ISO-8859-11",
+                    "ISO-8859-13",
+                    "ISO-8859-14",
+                    "ISO-8859-15",
+                    "ISO-8859-16",
+                    "UTF-7",
+                    "UTF-8",
+                    "UTF-16",
+                    "UTF-32"
+                };
+        }
+    }
+}
similarity index 96%
rename from win/CS/HandBrake.ApplicationServices/Utilities/LanguageUtilities.cs
rename to win/CS/HandBrake.Interop/Utilities/LanguageUtilities.cs
index d8a3c08548ec2cae5a372c3932b491def27e8d30..49c16c8183d762ee2101e68ca4aab26a59242507 100644 (file)
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="LanguageUtilities.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Language Utilities\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Utilities\r
-{\r
-    using System.Collections.Generic;\r
-    using System.Linq;\r
-\r
-    /// <summary>\r
-    /// Language Utilities\r
-    /// </summary>\r
-    public class LanguageUtilities\r
-    {\r
-        /// <summary>\r
-        /// The language map.\r
-        /// </summary>\r
-        private static IDictionary<string, string> languageMap;\r
-\r
-        /// <summary>\r
-        /// Map languages and their iso639_2 value into a IDictionary\r
-        /// </summary>\r
-        /// <returns>A Dictionary containing the language and iso code</returns>\r
-        public static IDictionary<string, string> MapLanguages()\r
-        {\r
-            if (languageMap != null)\r
-            {\r
-                return languageMap;\r
-            }\r
-\r
-            languageMap = new Dictionary<string, string>\r
-                          {\r
-                              { "(Any)", "und" },\r
-                              { "Afar", "aar" },\r
-                              { "Abkhazian", "abk" },\r
-                              { "Afrikaans", "afr" },\r
-                              { "Akan", "aka" },\r
-                              { "Albanian", "sqi" },\r
-                              { "Amharic", "amh" },\r
-                              { "Arabic", "ara" },\r
-                              { "Aragonese", "arg" },\r
-                              { "Armenian", "hye" },\r
-                              { "Assamese", "asm" },\r
-                              { "Avaric", "ava" },\r
-                              { "Avestan", "ave" },\r
-                              { "Aymara", "aym" },\r
-                              { "Azerbaijani", "aze" },\r
-                              { "Bashkir", "bak" },\r
-                              { "Bambara", "bam" },\r
-                              { "Basque", "eus" },\r
-                              { "Belarusian", "bel" },\r
-                              { "Bengali", "ben" },\r
-                              { "Bihari", "bih" },\r
-                              { "Bislama", "bis" },\r
-                              { "Bosnian", "bos" },\r
-                              { "Breton", "bre" },\r
-                              { "Bulgarian", "bul" },\r
-                              { "Burmese", "mya" },\r
-                              { "Catalan", "cat" },\r
-                              { "Chamorro", "cha" },\r
-                              { "Chechen", "che" },\r
-                              { "Chinese", "zho" },\r
-                              { "Church Slavic", "chu" },\r
-                              { "Chuvash", "chv" },\r
-                              { "Cornish", "cor" },\r
-                              { "Corsican", "cos" },\r
-                              { "Cree", "cre" },\r
-                              { "Czech", "ces" },\r
-                              { "Dansk", "dan" },\r
-                              { "Divehi", "div" },\r
-                              { "Nederlands", "nld" },\r
-                              { "Dzongkha", "dzo" },\r
-                              { "English", "eng" },\r
-                              { "Esperanto", "epo" },\r
-                              { "Estonian", "est" },\r
-                              { "Ewe", "ewe" },\r
-                              { "Faroese", "fao" },\r
-                              { "Fijian", "fij" },\r
-                              { "Suomi", "fin" },\r
-                              { "Francais", "fra" },\r
-                              { "Western Frisian", "fry" },\r
-                              { "Fulah", "ful" },\r
-                              { "Georgian", "kat" },\r
-                              { "Deutsch", "deu" },\r
-                              { "Gaelic (Scots)", "gla" },\r
-                              { "Irish", "gle" },\r
-                              { "Galician", "glg" },\r
-                              { "Manx", "glv" },\r
-                              { "Greek, Modern", "ell" },\r
-                              { "Guarani", "grn" },\r
-                              { "Gujarati", "guj" },\r
-                              { "Haitian", "hat" },\r
-                              { "Hausa", "hau" },\r
-                              { "Hebrew", "heb" },\r
-                              { "Herero", "her" },\r
-                              { "Hindi", "hin" },\r
-                              { "Hiri Motu", "hmo" },\r
-                              { "Magyar", "hun" },\r
-                              { "Igbo", "ibo" },\r
-                              { "Islenska", "isl" },\r
-                              { "Ido", "ido" },\r
-                              { "Sichuan Yi", "iii" },\r
-                              { "Inuktitut", "iku" },\r
-                              { "Interlingue", "ile" },\r
-                              { "Interlingua", "ina" },\r
-                              { "Indonesian", "ind" },\r
-                              { "Inupiaq", "ipk" },\r
-                              { "Italiano", "ita" },\r
-                              { "Javanese", "jav" },\r
-                              { "Japanese", "jpn" },\r
-                              { "Kalaallisut", "kal" },\r
-                              { "Kannada", "kan" },\r
-                              { "Kashmiri", "kas" },\r
-                              { "Kanuri", "kau" },\r
-                              { "Kazakh", "kaz" },\r
-                              { "Central Khmer", "khm" },\r
-                              { "Kikuyu", "kik" },\r
-                              { "Kinyarwanda", "kin" },\r
-                              { "Kirghiz", "kir" },\r
-                              { "Komi", "kom" },\r
-                              { "Kongo", "kon" },\r
-                              { "Korean", "kor" },\r
-                              { "Kuanyama", "kua" },\r
-                              { "Kurdish", "kur" },\r
-                              { "Lao", "lao" },\r
-                              { "Latin", "lat" },\r
-                              { "Latvian", "lav" },\r
-                              { "Limburgan", "lim" },\r
-                              { "Lingala", "lin" },\r
-                              { "Lithuanian", "lit" },\r
-                              { "Luxembourgish", "ltz" },\r
-                              { "Luba-Katanga", "lub" },\r
-                              { "Ganda", "lug" },\r
-                              { "Macedonian", "mkd" },\r
-                              { "Marshallese", "mah" },\r
-                              { "Malayalam", "mal" },\r
-                              { "Maori", "mri" },\r
-                              { "Marathi", "mar" },\r
-                              { "Malay", "msa" },\r
-                              { "Malagasy", "mlg" },\r
-                              { "Maltese", "mlt" },\r
-                              { "Moldavian", "mol" },\r
-                              { "Mongolian", "mon" },\r
-                              { "Nauru", "nau" },\r
-                              { "Navajo", "nav" },\r
-                              { "Ndebele, South", "nbl" },\r
-                              { "Ndebele, North", "nde" },\r
-                              { "Ndonga", "ndo" },\r
-                              { "Nepali", "nep" },\r
-                              { "Norwegian Nynorsk", "nno" },\r
-                              { "Norwegian Bokmål", "nob" },\r
-                              { "Norsk", "nor" },\r
-                              { "Chichewa; Nyanja", "nya" },\r
-                              { "Occitan", "oci" },\r
-                              { "Ojibwa", "oji" },\r
-                              { "Oriya", "ori" },\r
-                              { "Oromo", "orm" },\r
-                              { "Ossetian", "oss" },\r
-                              { "Panjabi", "pan" },\r
-                              { "Persian", "fas" },\r
-                              { "Pali", "pli" },\r
-                              { "Polish", "pol" },\r
-                              { "Portuguese", "por" },\r
-                              { "Pushto", "pus" },\r
-                              { "Quechua", "que" },\r
-                              { "Romansh", "roh" },\r
-                              { "Romanian", "ron" },\r
-                              { "Rundi", "run" },\r
-                              { "Russian", "rus" },\r
-                              { "Sango", "sag" },\r
-                              { "Sanskrit", "san" },\r
-                              { "Serbian", "srp" },\r
-                              { "Hrvatski", "hrv" },\r
-                              { "Sinhala", "sin" },\r
-                              { "Slovak", "slk" },\r
-                              { "Slovenian", "slv" },\r
-                              { "Northern Sami", "sme" },\r
-                              { "Samoan", "smo" },\r
-                              { "Shona", "sna" },\r
-                              { "Sindhi", "snd" },\r
-                              { "Somali", "som" },\r
-                              { "Sotho Southern", "sot" },\r
-                              { "Espanol", "spa" },\r
-                              { "Sardinian", "srd" },\r
-                              { "Swati", "ssw" },\r
-                              { "Sundanese", "sun" },\r
-                              { "Swahili", "swa" },\r
-                              { "Svenska", "swe" },\r
-                              { "Tahitian", "tah" },\r
-                              { "Tamil", "tam" },\r
-                              { "Tatar", "tat" },\r
-                              { "Telugu", "tel" },\r
-                              { "Tajik", "tgk" },\r
-                              { "Tagalog", "tgl" },\r
-                              { "Thai", "tha" },\r
-                              { "Tibetan", "bod" },\r
-                              { "Tigrinya", "tir" },\r
-                              { "Tonga", "ton" },\r
-                              { "Tswana", "tsn" },\r
-                              { "Tsonga", "tso" },\r
-                              { "Turkmen", "tuk" },\r
-                              { "Turkish", "tur" },\r
-                              { "Twi", "twi" },\r
-                              { "Uighur", "uig" },\r
-                              { "Ukrainian", "ukr" },\r
-                              { "Urdu", "urd" },\r
-                              { "Uzbek", "uzb" },\r
-                              { "Venda", "ven" },\r
-                              { "Vietnamese", "vie" },\r
-                              { "Volapük", "vol" },\r
-                              { "Welsh", "cym" },\r
-                              { "Walloon", "wln" },\r
-                              { "Wolof", "wol" },\r
-                              { "Xhosa", "xho" },\r
-                              { "Yiddish", "yid" },\r
-                              { "Yoruba", "yor" },\r
-                              { "Zhuang", "zha" },\r
-                              { "Zulu", "zul" }\r
-                          };\r
-\r
-            return languageMap;\r
-        }\r
-\r
-        /// <summary>\r
-        /// The get language codes.\r
-        /// </summary>\r
-        /// <param name="userLanguages">\r
-        /// The user languages.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The <see cref="List"/>.\r
-        /// </returns>\r
-        public static List<string> GetLanguageCodes(IEnumerable<string> userLanguages)\r
-        {\r
-            // Translate to Iso Codes\r
-            List<string> iso6392Codes = new List<string>();\r
-            foreach (var item in userLanguages)\r
-            {\r
-                string isoCode;\r
-                if (MapLanguages().TryGetValue(item, out isoCode))\r
-                {\r
-                    iso6392Codes.Add(isoCode);\r
-                }\r
-            }\r
-\r
-            return iso6392Codes;\r
-        }\r
-\r
-        /// <summary>\r
-        /// The get language names.\r
-        /// </summary>\r
-        /// <param name="languageCodes">\r
-        /// The language codes.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The <see cref="List"/>.\r
-        /// </returns>\r
-        public static List<string> GetLanguageNames(IList<string> languageCodes)\r
-        {\r
-            // Translate to Iso Codes\r
-            List<string> names = new List<string>();\r
-            foreach (var item in languageCodes)\r
-            {\r
-                KeyValuePair<string, string> name = MapLanguages().FirstOrDefault(v => v.Value == item);  // Slightly inefficient but small set anyway so not a big issue.\r
-                names.Add(name.Key);\r
-            }\r
-\r
-            return names;\r
-        }\r
-\r
-        /// <summary>\r
-        /// The get iso codes.\r
-        /// </summary>\r
-        /// <returns>\r
-        /// The <see cref="List"/>.\r
-        /// </returns>\r
-        public static List<string> GetIsoCodes()\r
-        {\r
-           return MapLanguages().Values.ToList();\r
-        }\r
-\r
-        /// <summary>\r
-        /// The get language code.\r
-        /// </summary>\r
-        /// <param name="language">\r
-        /// The language.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The <see cref="string"/>.\r
-        /// </returns>\r
-        public static string GetLanguageCode(string language)\r
-        {\r
-            if (string.IsNullOrEmpty(language))\r
-            {\r
-                return null;\r
-            }\r
-\r
-            string isoCode;\r
-            if (MapLanguages().TryGetValue(language, out isoCode))\r
-            {\r
-                return isoCode;\r
-            }\r
-\r
-            return null;\r
-        }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="LanguageUtilities.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>
+//   Language Utilities
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Utilities
+{
+    using System.Collections.Generic;
+    using System.Linq;
+
+    /// <summary>
+    /// Language Utilities
+    /// </summary>
+    public class LanguageUtilities
+    {
+        /// <summary>
+        /// The language map.
+        /// </summary>
+        private static IDictionary<string, string> languageMap;
+
+        /// <summary>
+        /// Map languages and their iso639_2 value into a IDictionary
+        /// </summary>
+        /// <returns>A Dictionary containing the language and iso code</returns>
+        public static IDictionary<string, string> MapLanguages()
+        {
+            if (languageMap != null)
+            {
+                return languageMap;
+            }
+
+            languageMap = new Dictionary<string, string>
+                          {
+                              { "(Any)", "und" },
+                              { "Afar", "aar" },
+                              { "Abkhazian", "abk" },
+                              { "Afrikaans", "afr" },
+                              { "Akan", "aka" },
+                              { "Albanian", "sqi" },
+                              { "Amharic", "amh" },
+                              { "Arabic", "ara" },
+                              { "Aragonese", "arg" },
+                              { "Armenian", "hye" },
+                              { "Assamese", "asm" },
+                              { "Avaric", "ava" },
+                              { "Avestan", "ave" },
+                              { "Aymara", "aym" },
+                              { "Azerbaijani", "aze" },
+                              { "Bashkir", "bak" },
+                              { "Bambara", "bam" },
+                              { "Basque", "eus" },
+                              { "Belarusian", "bel" },
+                              { "Bengali", "ben" },
+                              { "Bihari", "bih" },
+                              { "Bislama", "bis" },
+                              { "Bosnian", "bos" },
+                              { "Breton", "bre" },
+                              { "Bulgarian", "bul" },
+                              { "Burmese", "mya" },
+                              { "Catalan", "cat" },
+                              { "Chamorro", "cha" },
+                              { "Chechen", "che" },
+                              { "Chinese", "zho" },
+                              { "Church Slavic", "chu" },
+                              { "Chuvash", "chv" },
+                              { "Cornish", "cor" },
+                              { "Corsican", "cos" },
+                              { "Cree", "cre" },
+                              { "Czech", "ces" },
+                              { "Dansk", "dan" },
+                              { "Divehi", "div" },
+                              { "Nederlands", "nld" },
+                              { "Dzongkha", "dzo" },
+                              { "English", "eng" },
+                              { "Esperanto", "epo" },
+                              { "Estonian", "est" },
+                              { "Ewe", "ewe" },
+                              { "Faroese", "fao" },
+                              { "Fijian", "fij" },
+                              { "Suomi", "fin" },
+                              { "Francais", "fra" },
+                              { "Western Frisian", "fry" },
+                              { "Fulah", "ful" },
+                              { "Georgian", "kat" },
+                              { "Deutsch", "deu" },
+                              { "Gaelic (Scots)", "gla" },
+                              { "Irish", "gle" },
+                              { "Galician", "glg" },
+                              { "Manx", "glv" },
+                              { "Greek, Modern", "ell" },
+                              { "Guarani", "grn" },
+                              { "Gujarati", "guj" },
+                              { "Haitian", "hat" },
+                              { "Hausa", "hau" },
+                              { "Hebrew", "heb" },
+                              { "Herero", "her" },
+                              { "Hindi", "hin" },
+                              { "Hiri Motu", "hmo" },
+                              { "Magyar", "hun" },
+                              { "Igbo", "ibo" },
+                              { "Islenska", "isl" },
+                              { "Ido", "ido" },
+                              { "Sichuan Yi", "iii" },
+                              { "Inuktitut", "iku" },
+                              { "Interlingue", "ile" },
+                              { "Interlingua", "ina" },
+                              { "Indonesian", "ind" },
+                              { "Inupiaq", "ipk" },
+                              { "Italiano", "ita" },
+                              { "Javanese", "jav" },
+                              { "Japanese", "jpn" },
+                              { "Kalaallisut", "kal" },
+                              { "Kannada", "kan" },
+                              { "Kashmiri", "kas" },
+                              { "Kanuri", "kau" },
+                              { "Kazakh", "kaz" },
+                              { "Central Khmer", "khm" },
+                              { "Kikuyu", "kik" },
+                              { "Kinyarwanda", "kin" },
+                              { "Kirghiz", "kir" },
+                              { "Komi", "kom" },
+                              { "Kongo", "kon" },
+                              { "Korean", "kor" },
+                              { "Kuanyama", "kua" },
+                              { "Kurdish", "kur" },
+                              { "Lao", "lao" },
+                              { "Latin", "lat" },
+                              { "Latvian", "lav" },
+                              { "Limburgan", "lim" },
+                              { "Lingala", "lin" },
+                              { "Lithuanian", "lit" },
+                              { "Luxembourgish", "ltz" },
+                              { "Luba-Katanga", "lub" },
+                              { "Ganda", "lug" },
+                              { "Macedonian", "mkd" },
+                              { "Marshallese", "mah" },
+                              { "Malayalam", "mal" },
+                              { "Maori", "mri" },
+                              { "Marathi", "mar" },
+                              { "Malay", "msa" },
+                              { "Malagasy", "mlg" },
+                              { "Maltese", "mlt" },
+                              { "Moldavian", "mol" },
+                              { "Mongolian", "mon" },
+                              { "Nauru", "nau" },
+                              { "Navajo", "nav" },
+                              { "Ndebele, South", "nbl" },
+                              { "Ndebele, North", "nde" },
+                              { "Ndonga", "ndo" },
+                              { "Nepali", "nep" },
+                              { "Norwegian Nynorsk", "nno" },
+                              { "Norwegian Bokmål", "nob" },
+                              { "Norsk", "nor" },
+                              { "Chichewa; Nyanja", "nya" },
+                              { "Occitan", "oci" },
+                              { "Ojibwa", "oji" },
+                              { "Oriya", "ori" },
+                              { "Oromo", "orm" },
+                              { "Ossetian", "oss" },
+                              { "Panjabi", "pan" },
+                              { "Persian", "fas" },
+                              { "Pali", "pli" },
+                              { "Polish", "pol" },
+                              { "Portuguese", "por" },
+                              { "Pushto", "pus" },
+                              { "Quechua", "que" },
+                              { "Romansh", "roh" },
+                              { "Romanian", "ron" },
+                              { "Rundi", "run" },
+                              { "Russian", "rus" },
+                              { "Sango", "sag" },
+                              { "Sanskrit", "san" },
+                              { "Serbian", "srp" },
+                              { "Hrvatski", "hrv" },
+                              { "Sinhala", "sin" },
+                              { "Slovak", "slk" },
+                              { "Slovenian", "slv" },
+                              { "Northern Sami", "sme" },
+                              { "Samoan", "smo" },
+                              { "Shona", "sna" },
+                              { "Sindhi", "snd" },
+                              { "Somali", "som" },
+                              { "Sotho Southern", "sot" },
+                              { "Espanol", "spa" },
+                              { "Sardinian", "srd" },
+                              { "Swati", "ssw" },
+                              { "Sundanese", "sun" },
+                              { "Swahili", "swa" },
+                              { "Svenska", "swe" },
+                              { "Tahitian", "tah" },
+                              { "Tamil", "tam" },
+                              { "Tatar", "tat" },
+                              { "Telugu", "tel" },
+                              { "Tajik", "tgk" },
+                              { "Tagalog", "tgl" },
+                              { "Thai", "tha" },
+                              { "Tibetan", "bod" },
+                              { "Tigrinya", "tir" },
+                              { "Tonga", "ton" },
+                              { "Tswana", "tsn" },
+                              { "Tsonga", "tso" },
+                              { "Turkmen", "tuk" },
+                              { "Turkish", "tur" },
+                              { "Twi", "twi" },
+                              { "Uighur", "uig" },
+                              { "Ukrainian", "ukr" },
+                              { "Urdu", "urd" },
+                              { "Uzbek", "uzb" },
+                              { "Venda", "ven" },
+                              { "Vietnamese", "vie" },
+                              { "Volapük", "vol" },
+                              { "Welsh", "cym" },
+                              { "Walloon", "wln" },
+                              { "Wolof", "wol" },
+                              { "Xhosa", "xho" },
+                              { "Yiddish", "yid" },
+                              { "Yoruba", "yor" },
+                              { "Zhuang", "zha" },
+                              { "Zulu", "zul" }
+                          };
+
+            return languageMap;
+        }
+
+        /// <summary>
+        /// The get language codes.
+        /// </summary>
+        /// <param name="userLanguages">
+        /// The user languages.
+        /// </param>
+        /// <returns>
+        /// The <see cref="List{T}"/>.
+        /// </returns>
+        public static List<string> GetLanguageCodes(IEnumerable<string> userLanguages)
+        {
+            // Translate to Iso Codes
+            List<string> iso6392Codes = new List<string>();
+            foreach (var item in userLanguages)
+            {
+                string isoCode;
+                if (MapLanguages().TryGetValue(item, out isoCode))
+                {
+                    iso6392Codes.Add(isoCode);
+                }
+            }
+
+            return iso6392Codes;
+        }
+
+        /// <summary>
+        /// The get language names.
+        /// </summary>
+        /// <param name="languageCodes">
+        /// The language codes.
+        /// </param>
+        /// <returns>
+        /// The <see cref="List{T}"/>.
+        /// </returns>
+        public static List<string> GetLanguageNames(IList<string> languageCodes)
+        {
+            // Translate to Iso Codes
+            List<string> names = new List<string>();
+            foreach (var item in languageCodes)
+            {
+                KeyValuePair<string, string> name = MapLanguages().FirstOrDefault(v => v.Value == item);  // Slightly inefficient but small set anyway so not a big issue.
+                names.Add(name.Key);
+            }
+
+            return names;
+        }
+
+        /// <summary>
+        /// The get iso codes.
+        /// </summary>
+        /// <returns>
+        /// The <see cref="List{T}"/>.
+        /// </returns>
+        public static List<string> GetIsoCodes()
+        {
+           return MapLanguages().Values.ToList();
+        }
+
+        /// <summary>
+        /// The get language code.
+        /// </summary>
+        /// <param name="language">
+        /// The language.
+        /// </param>
+        /// <returns>
+        /// The <see cref="string"/>.
+        /// </returns>
+        public static string GetLanguageCode(string language)
+        {
+            if (string.IsNullOrEmpty(language))
+            {
+                return null;
+            }
+
+            string isoCode;
+            if (MapLanguages().TryGetValue(language, out isoCode))
+            {
+                return isoCode;
+            }
+
+            return null;
+        }
+    }
+}
similarity index 95%
rename from win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs
rename to win/CS/HandBrake.Interop/Utilities/SystemInfo.cs
index 8966b5a8f7df490e09b7c69767767c4f44b85fc3..af0c247247c1a0af11e96f3f5d54a8ad21aa2056 100644 (file)
@@ -1,94 +1,94 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="SystemInfo.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   The System Information.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Utilities\r
-{\r
-    using System;\r
-\r
-    using Interop.HbLib;\r
-\r
-    /// <summary>\r
-    /// The System Information.\r
-    /// </summary>\r
-    public class SystemInfo\r
-    {\r
-        /// <summary>\r
-        /// Gets a value indicating whether is qsv available.\r
-        /// </summary>\r
-        public static bool IsQsvAvailable\r
-        {\r
-            get\r
-            {\r
-                try\r
-                {\r
-                    return HBFunctions.hb_qsv_available() != 0;\r
-                }\r
-                catch (Exception)\r
-                {\r
-                    // Silent failure. Typically this means the dll hasn't been built with --enable-qsv\r
-                    return false;\r
-                }\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets a value indicating whether is qsv available.\r
-        /// </summary>\r
-        public static bool IsQsvAvailableH264\r
-        {\r
-            get\r
-            {\r
-                try\r
-                {\r
-                    return (HBFunctions.hb_qsv_available() & NativeConstants.HB_VCODEC_QSV_H264) != 0;\r
-                }\r
-                catch (Exception)\r
-                {\r
-                    // Silent failure. Typically this means the dll hasn't been built with --enable-qsv\r
-                    return false;\r
-                }\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets a value indicating whether is qsv available.\r
-        /// </summary>\r
-        public static bool IsQsvAvailableH265\r
-        {\r
-            get\r
-            {\r
-                try\r
-                {\r
-                    return (HBFunctions.hb_qsv_available() & NativeConstants.HB_VCODEC_QSV_H265) != 0;\r
-                }\r
-                catch (Exception)\r
-                {\r
-                    // Silent failure. Typically this means the dll hasn't been built with --enable-qsv\r
-                    return false;\r
-                }\r
-            }\r
-        }\r
-\r
-        public static bool IsQsvAvailableH26510bit\r
-        {\r
-            get\r
-            {\r
-                try\r
-                {\r
-                    return (HBFunctions.hb_qsv_available() & NativeConstants.HB_VCODEC_QSV_H265_10BIT) != 0;\r
-                }\r
-                catch (Exception)\r
-                {\r
-                    // Silent failure. Typically this means the dll hasn't been built with --enable-qsv\r
-                    return false;\r
-                }\r
-            }\r
-        }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="SystemInfo.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>
+//   The System Information.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Utilities
+{
+    using System;
+
+    using Interop.HbLib;
+
+    /// <summary>
+    /// The System Information.
+    /// </summary>
+    public class SystemInfo
+    {
+        /// <summary>
+        /// Gets a value indicating whether is qsv available.
+        /// </summary>
+        public static bool IsQsvAvailable
+        {
+            get
+            {
+                try
+                {
+                    return HBFunctions.hb_qsv_available() != 0;
+                }
+                catch (Exception)
+                {
+                    // Silent failure. Typically this means the dll hasn't been built with --enable-qsv
+                    return false;
+                }
+            }
+        }
+
+        /// <summary>
+        /// Gets a value indicating whether is qsv available.
+        /// </summary>
+        public static bool IsQsvAvailableH264
+        {
+            get
+            {
+                try
+                {
+                    return (HBFunctions.hb_qsv_available() & NativeConstants.HB_VCODEC_QSV_H264) != 0;
+                }
+                catch (Exception)
+                {
+                    // Silent failure. Typically this means the dll hasn't been built with --enable-qsv
+                    return false;
+                }
+            }
+        }
+
+        /// <summary>
+        /// Gets a value indicating whether is qsv available.
+        /// </summary>
+        public static bool IsQsvAvailableH265
+        {
+            get
+            {
+                try
+                {
+                    return (HBFunctions.hb_qsv_available() & NativeConstants.HB_VCODEC_QSV_H265) != 0;
+                }
+                catch (Exception)
+                {
+                    // Silent failure. Typically this means the dll hasn't been built with --enable-qsv
+                    return false;
+                }
+            }
+        }
+
+        public static bool IsQsvAvailableH26510bit
+        {
+            get
+            {
+                try
+                {
+                    return (HBFunctions.hb_qsv_available() & NativeConstants.HB_VCODEC_QSV_H265_10BIT) != 0;
+                }
+                catch (Exception)
+                {
+                    // Silent failure. Typically this means the dll hasn't been built with --enable-qsv
+                    return false;
+                }
+            }
+        }
+    }
+}
similarity index 89%
rename from win/CS/HandBrake.ApplicationServices/Utilities/VersionHelper.cs
rename to win/CS/HandBrake.Interop/Utilities/VersionHelper.cs
index cc5c903ef76f853cb0d89f0eb8364cfc7f3a9841..2975a4793e485e47623c14089f18bbf75f7e8585 100644 (file)
@@ -1,53 +1,53 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="VersionHelper.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Version Utility\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Utilities\r
-{\r
-    using HandBrake.ApplicationServices.Interop;\r
-    using HandBrake.ApplicationServices.Interop.Interfaces;\r
-\r
-    /// <summary>\r
-    /// Version Utility\r
-    /// </summary>\r
-    public class VersionHelper\r
-    {\r
-        /// <summary>\r
-        /// The get build.\r
-        /// </summary>\r
-        /// <returns>\r
-        /// The <see cref="int"/>.\r
-        /// </returns>\r
-        public static string GetVersion()\r
-        {\r
-            IHandBrakeInstance instance = HandBrakeInstanceManager.MasterInstance;\r
-       \r
-            return IsNightly() ? string.Format("Nightly {0} ({1})", instance.Version, instance.Build) : string.Format("{0} ({1})", instance.Version, instance.Build);\r
-        }\r
-\r
-        public static string GetVersionShort()\r
-        {\r
-            IHandBrakeInstance instance = HandBrakeInstanceManager.MasterInstance;\r
-            return string.Format("{0} {1}", instance.Version, instance.Build);\r
-        }\r
-\r
-        /// <summary>\r
-        /// The is nightly.\r
-        /// </summary>\r
-        /// <returns>\r
-        /// The <see cref="string"/>.\r
-        /// </returns>\r
-        public static bool IsNightly()\r
-        {\r
-            IHandBrakeInstance instance = HandBrakeInstanceManager.MasterInstance;\r
-\r
-            // 01 = Unofficial Builds.  00 = Official Tagged Releases.\r
-            return instance.Build.ToString().EndsWith("01");\r
-        }\r
-    }\r
-}\r
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="VersionHelper.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>
+//   Version Utility
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Utilities
+{
+    using HandBrake.Interop.Interop;
+    using HandBrake.Interop.Interop.Interfaces;
+
+    /// <summary>
+    /// Version Utility
+    /// </summary>
+    public class VersionHelper
+    {
+        /// <summary>
+        /// The get build.
+        /// </summary>
+        /// <returns>
+        /// The <see cref="int"/>.
+        /// </returns>
+        public static string GetVersion()
+        {
+            IHandBrakeInstance instance = HandBrakeInstanceManager.MasterInstance;
+       
+            return IsNightly() ? string.Format("Nightly {0} ({1})", instance.Version, instance.Build) : string.Format("{0} ({1})", instance.Version, instance.Build);
+        }
+
+        public static string GetVersionShort()
+        {
+            IHandBrakeInstance instance = HandBrakeInstanceManager.MasterInstance;
+            return string.Format("{0} {1}", instance.Version, instance.Build);
+        }
+
+        /// <summary>
+        /// The is nightly.
+        /// </summary>
+        /// <returns>
+        /// The <see cref="string"/>.
+        /// </returns>
+        public static bool IsNightly()
+        {
+            IHandBrakeInstance instance = HandBrakeInstanceManager.MasterInstance;
+
+            // 01 = Unofficial Builds.  00 = Official Tagged Releases.
+            return instance.Build.ToString().EndsWith("01");
+        }
+    }
+}
similarity index 96%
rename from win/CS/HandBrake.ApplicationServices/app.config
rename to win/CS/HandBrake.Interop/app.config
index 74b635ee68fa027a15907ce2325ff22c2d633ce5..4a29a96b3daeeddf5ee312efc21996ae8b74147c 100644 (file)
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<configuration>\r
-  <configSections>\r
-  </configSections>\r
-  <startup>\r
-    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1"/>\r
-  </startup>\r
-</configuration>\r
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <configSections>
+  </configSections>
+  <startup>
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1"/>
+  </startup>
+</configuration>
index 0e7f155b4d0192df244d768135484547669a1c5e..7d9ad28ca6fe2bea4c908a4c668fe113c322020f 100644 (file)
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 15\r
 VisualStudioVersion = 15.0.26730.12\r
 MinimumVisualStudioVersion = 10.0.40219.1\r
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandBrake.ApplicationServices", "HandBrake.ApplicationServices\HandBrake.ApplicationServices.csproj", "{087A2BA8-BAC2-4577-A46F-07FF9D420016}"\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandBrake.Interop", "HandBrake.Interop\HandBrake.Interop.csproj", "{087A2BA8-BAC2-4577-A46F-07FF9D420016}"\r
 EndProject\r
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandBrakeWPF", "HandBrakeWPF\HandBrakeWPF.csproj", "{DADE66CB-0E12-4959-ADE5-0ACD31D27C59}"\r
 EndProject\r
index 5631ac3f5a5c97658bcde457dfd2791d0d172089..03133487906afc6b452cfa79895b6848b601320b 100644 (file)
@@ -67,8 +67,8 @@
     <Content Include="win32\Caliburn.Micro.Platform.Core.dll" />
     <Content Include="win32\Caliburn.Micro.Platform.dll" />
     <Content Include="win32\GongSolutions.Wpf.DragDrop.dll" />
-    <Content Include="win32\HandBrake.ApplicationServices.dll" />
-    <Content Include="win32\HandBrake.ApplicationServices.dll.config" />
+    <Content Include="win32\HandBrake.Interop.dll" />
+    <Content Include="win32\HandBrake.Interop.dll.config" />
     <Content Include="win32\HandBrake.exe" />
     <Content Include="win32\HandBrake.exe.config" />
     <Content Include="win32\hb.dll" />
index 947eff2c09be9173bbe2010ae3e94dca286fdd7b..ed044bafaf8481703470e7fe5b522318db53ab82 100644 (file)
     </COMReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <ProjectReference Include="HandBrake.ApplicationServices\HandBrake.ApplicationServices.csproj">\r
+    <ProjectReference Include="HandBrake.Interop\HandBrake.Interop.csproj">\r
       <Project>{087A2BA8-BAC2-4577-A46F-07FF9D420016}</Project>\r
-      <Name>HandBrake.ApplicationServices</Name>\r
-    </ProjectReference>\r
-    <ProjectReference Include="HandBrake.Interop\HandBrakeInterop\HandBrakeInterop.csproj">\r
-      <Project>{F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}</Project>\r
-      <Name>HandBrakeInterop</Name>\r
+      <Name>HandBrake.Interop</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />\r
index 667e372b73a89f4f2d89f3d660791f6a35fd45ef..8263846f2bbba2803f324e15ce34e367ffe5c647 100644 (file)
@@ -15,7 +15,7 @@ namespace HandBrakeWPF.Converters.Audio
     using System.Linq;\r
     using System.Windows.Data;\r
 \r
-    using HandBrake.ApplicationServices.Utilities;\r
+    using HandBrake.Interop.Utilities;\r
 \r
     using HandBrakeWPF.Model.Audio;\r
     using HandBrakeWPF.Utilities;\r
index 350a8e06d78a8bf30f44baa70f5c04b28864823c..ec70119e04a8a5b1b04fe368bca0bd8898cb12be 100644 (file)
@@ -16,8 +16,8 @@ namespace HandBrakeWPF.Converters.Audio
     using System.Windows;\r
     using System.Windows.Data;\r
 \r
-    using HandBrake.ApplicationServices.Interop;\r
-    using HandBrake.ApplicationServices.Utilities;\r
+    using HandBrake.Interop.Interop;\r
+    using HandBrake.Interop.Utilities;\r
 \r
     using HandBrakeWPF.Utilities;\r
 \r
index 0ef315fba5a465e1e6ac6e40483567390e605ee8..8b7a0cd42fbcb73bfb3d035a00482f3acd0adfee 100644 (file)
@@ -12,8 +12,8 @@ namespace HandBrakeWPF.Converters.Audio
     using System;
     using System.Globalization;
     using System.Windows.Data;
-    using HandBrake.ApplicationServices.Interop;
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;
+    using HandBrake.Interop.Interop;
+    using HandBrake.Interop.Interop.Model.Encoding;
 
     /// <summary>
     /// The audio mixdown converter.
index df108d961876a5d655c037c39e8d9fe16c1b96ab..1a085cd73a06ac3263294f2002b996164c4e592f 100644 (file)
@@ -13,8 +13,8 @@ namespace HandBrakeWPF.Converters.Audio
     using System.ComponentModel;
     using System.Globalization;
     using System.Windows.Data;
-    using HandBrake.ApplicationServices.Interop;
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;
+    using HandBrake.Interop.Interop;
+    using HandBrake.Interop.Interop.Model.Encoding;
     using HandBrakeWPF.Services.Encode.Model.Models;
     using HandBrakeWPF.Utilities;
 
index 512fa077460a2efc3a4e035217b73cd938da1efb..400f17ce4a43ae594d1dbb69a612cc57d0a61cf0 100644 (file)
@@ -15,7 +15,7 @@ namespace HandBrakeWPF.Converters.Audio
     using System.Text;\r
     using System.Windows.Data;\r
 \r
-    using HandBrake.ApplicationServices.Utilities;\r
+    using HandBrake.Interop.Utilities;\r
 \r
     using HandBrakeWPF.Utilities;\r
 \r
index 9808cbb58ee0244130d14056e3d1c7feb5e70d2c..e6e458ed98db5ba7020c63fe84738592282d0ecc 100644 (file)
@@ -14,7 +14,7 @@ namespace HandBrakeWPF.Converters.Audio
     using System.Globalization;\r
     using System.Windows.Data;\r
 \r
-    using HandBrake.ApplicationServices.Utilities;\r
+    using HandBrake.Interop.Utilities;\r
 \r
     using HandBrakeWPF.Utilities;\r
 \r
index 297488b65c9ee9c3face8f765751ac3426d625ab..6aa590bbf35031293f69c9701b9157ccfbb0c3be 100644 (file)
@@ -15,7 +15,7 @@ namespace HandBrakeWPF.Converters.Audio
     using System.Linq;\r
     using System.Windows.Data;\r
 \r
-    using HandBrake.ApplicationServices.Utilities;\r
+    using HandBrake.Interop.Utilities;\r
 \r
     using HandBrakeWPF.Model.Audio;\r
     using HandBrakeWPF.Utilities;\r
index c9afb8c14dac678f2c8ab59c959aca1cfb186919..ff6f71156ff7f37055fa7366a070ff3c764fe875 100644 (file)
@@ -13,8 +13,8 @@ namespace HandBrakeWPF.Converters
     using System.Collections.Generic;\r
     using System.Globalization;\r
     using System.Windows.Data;\r
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
-    using HandBrake.ApplicationServices.Model;\r
+    using HandBrake.Interop.Interop.Model.Encoding;\r
+    using HandBrake.Interop.Model;\r
     using HandBrakeWPF.Services.Queue.Model;\r
     using HandBrakeWPF.Utilities;\r
     using OutputFormat = HandBrakeWPF.Services.Encode.Model.Models.OutputFormat;\r
index 5e2b7024ab244e3d4da46c00af407a12bac9e179..accd7bc3bd99edf6b6ae6e56a64fee080e7177e5 100644 (file)
@@ -15,7 +15,7 @@ namespace HandBrakeWPF.Converters.Filters
     using System.Linq;\r
     using System.Windows.Data;\r
 \r
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
+    using HandBrake.Interop.Interop.Model.Encoding;\r
 \r
     using DenoisePreset = HandBrakeWPF.Services.Encode.Model.Models.DenoisePreset;\r
 \r
index 417b0d155cae0b1c20863de4bce1122b6873be44..5e8c4f37bd422e66a41f62c1df43f1164e2eb84e 100644 (file)
@@ -14,9 +14,9 @@ namespace HandBrakeWPF.Converters.Filters
     using System.Globalization;
     using System.Windows.Data;
 
-    using HandBrake.ApplicationServices.Interop;
-    using HandBrake.ApplicationServices.Interop.HbLib;
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;
+    using HandBrake.Interop.Interop;
+    using HandBrake.Interop.Interop.HbLib;
+    using HandBrake.Interop.Interop.Model.Encoding;
 
     using HandBrakeWPF.Model.Filters;
 
index 72d40e3aeeb491f2b8e4608ff027182b01b09f05..e3190d831913c610b456adbe323b0353e2df1807 100644 (file)
@@ -14,9 +14,9 @@ namespace HandBrakeWPF.Converters.Filters
     using System.Globalization;
     using System.Windows.Data;
 
-    using HandBrake.ApplicationServices.Interop;
-    using HandBrake.ApplicationServices.Interop.HbLib;
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;
+    using HandBrake.Interop.Interop;
+    using HandBrake.Interop.Interop.HbLib;
+    using HandBrake.Interop.Interop.Model.Encoding;
 
     using HandBrakeWPF.Model.Filters;
 
index b60e626f6a20dc4607e9c6da9fdbfab980630acb..5c0fb47f05c47d2c75e0515a8c1a58c2ba42b8bd 100644 (file)
@@ -13,7 +13,7 @@ namespace HandBrakeWPF.Converters.Options
     using System.Globalization;\r
     using System.Windows.Data;\r
 \r
-    using HandBrake.ApplicationServices.Utilities;\r
+    using HandBrake.Interop.Utilities;\r
 \r
     using HandBrakeWPF.Model;\r
     using HandBrakeWPF.Utilities;\r
index 782d1698e4ff89a93b4327cb4c7bf01487517d58..f9dacd7c7cdb8f394557678f2109beb3f6aea04b 100644 (file)
@@ -12,7 +12,7 @@ namespace HandBrakeWPF.Converters.Queue
     using System;
     using System.Globalization;
     using System.Windows.Data;
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;
+    using HandBrake.Interop.Interop.Model.Encoding;
     using HandBrakeWPF.Services.Encode.Model;
 
     /// <summary>
index e488d71e865d9357fef1934f7e85a9d95b39acf6..604b86b21d4953d1eb4692debebbdfff5c0a7b1a 100644 (file)
@@ -15,7 +15,7 @@ namespace HandBrakeWPF.Converters.Subtitles
     using System.Linq;\r
     using System.Windows.Data;\r
 \r
-    using HandBrake.ApplicationServices.Utilities;\r
+    using HandBrake.Interop.Utilities;\r
 \r
     using HandBrakeWPF.Model.Subtitles;\r
     using HandBrakeWPF.Utilities;\r
index dce48a4cf24249626a4f457e20c5875793d42a5c..d0486eff90cd0b1908964c2926bff6dca74c5c02 100644 (file)
@@ -14,7 +14,7 @@ namespace HandBrakeWPF.Converters.Video
     using System.Linq;\r
     using System.Windows.Data;\r
 \r
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
+    using HandBrake.Interop.Interop.Model.Encoding;\r
 \r
     using EncodeTask = HandBrakeWPF.Services.Encode.Model.EncodeTask;\r
     using VideoLevel = HandBrakeWPF.Services.Encode.Model.Models.Video.VideoLevel;\r
index 442d525fe035a87952ea34125fb46ab5395f9b3f..f725bb72a34cdabdfa2e8671392d588f8702b929 100644 (file)
@@ -13,8 +13,8 @@ namespace HandBrakeWPF.Converters.Video
     using System.Globalization;\r
     using System.Windows.Data;\r
 \r
-    using HandBrake.ApplicationServices.Model;\r
-    using HandBrake.ApplicationServices.Utilities;\r
+    using HandBrake.Interop.Model;\r
+    using HandBrake.Interop.Utilities;\r
 \r
     using HandBrakeWPF.Model;\r
     using HandBrakeWPF.Utilities;\r
index ca54837b6cf512687b52bb2d6aef87a4ed478fbe..285b1a3732ca432982fa436a00ee161b7247b6c9 100644 (file)
@@ -15,14 +15,14 @@ namespace HandBrakeWPF.Converters.Video
     using System.Linq;\r
     using System.Windows.Data;\r
 \r
-    using HandBrake.ApplicationServices.Interop;\r
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
+    using HandBrake.Interop.Interop;\r
+    using HandBrake.Interop.Interop.Model.Encoding;\r
 \r
     using HandBrakeWPF.Utilities;\r
 \r
     using EncodeTask = HandBrakeWPF.Services.Encode.Model.EncodeTask;\r
     using OutputFormat = HandBrakeWPF.Services.Encode.Model.Models.OutputFormat;\r
-    using SystemInfo = HandBrake.ApplicationServices.Utilities.SystemInfo;\r
+    using SystemInfo = HandBrake.Interop.Utilities.SystemInfo;\r
 \r
     /// <summary>\r
     /// Video Encoder Converter\r
index 4a6c036c43479307226a374bbae4afc4d7f9ba26..7b4ec0fc0079321170fc055eebb5db64b001f4ab 100644 (file)
@@ -13,7 +13,7 @@ namespace HandBrakeWPF.Converters.Video
     using System.Globalization;\r
     using System.Windows.Data;\r
 \r
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
+    using HandBrake.Interop.Interop.Model.Encoding;\r
 \r
     using HandBrakeWPF.Utilities;\r
 \r
index 03155d0b5c886e40a81a99f5885024b4a8e31e57..a3d9918d708720091bdedf377dae43557fb61b64 100644 (file)
@@ -11,7 +11,7 @@ namespace HandBrakeWPF.EventArgs
 {\r
     using System;\r
 \r
-    using HandBrake.ApplicationServices.Model;\r
+    using HandBrake.Interop.Model;\r
 \r
     using HandBrakeWPF.Services.Queue.Model;\r
 \r
index d6ac2f7f58e15afd57079f94d6c50619d3ff7bc8..568f7e390e48f852db48caa2724ffad6c94f0bf4 100644 (file)
@@ -11,7 +11,7 @@ namespace HandBrakeWPF.Factories
 {\r
     using Caliburn.Micro;\r
 \r
-    using HandBrake.ApplicationServices.Model;\r
+    using HandBrake.Interop.Model;\r
 \r
     using HandBrakeWPF.Services.Interfaces;\r
 \r
index 4757f7eec4519a88f8c282fb97456a761ffd87c1..0131e9297e499d74d536e9d7447a1a7eb647d552 100644 (file)
     <Resource Include="Views\Images\AddToQueue_small.png" />\r
     <Resource Include="Views\Images\AddToQueue.png" />\r
   </ItemGroup>\r
-  <ItemGroup>\r
-    <ProjectReference Include="..\HandBrake.ApplicationServices\HandBrake.ApplicationServices.csproj">\r
-      <Project>{087A2BA8-BAC2-4577-A46F-07FF9D420016}</Project>\r
-      <Name>HandBrake.ApplicationServices</Name>\r
-    </ProjectReference>\r
-  </ItemGroup>\r
   <ItemGroup>\r
     <Resource Include="Views\Images\Advanced.png" />\r
   </ItemGroup>\r
   <ItemGroup>\r
     <Resource Include="Views\Images\Presets2.png" />\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <ProjectReference Include="..\HandBrake.Interop\HandBrake.Interop.csproj">\r
+      <Project>{087a2ba8-bac2-4577-a46f-07ff9d420016}</Project>\r
+      <Name>HandBrake.Interop</Name>\r
+    </ProjectReference>\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 3465cfadf4e33ac20a70662594c55a5741e3a966..fb4cd589b1b34886a8cd2cc4ba7c6bb9728b9ad4 100644 (file)
@@ -15,7 +15,7 @@ namespace HandBrakeWPF.Helpers
 \r
     using Caliburn.Micro;\r
 \r
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
+    using HandBrake.Interop.Interop.Model.Encoding;\r
 \r
     using HandBrakeWPF.Extensions;\r
     using HandBrakeWPF.Services.Interfaces;\r
index ec1c11ffcbb819bf7cdecabfb87b6432ebd11a20..6a281fb64b4828ae9e74dae173fb5ae28e708d7a 100644 (file)
@@ -11,7 +11,7 @@ namespace HandBrakeWPF.Helpers
 {
     using System.IO;
 
-    using HandBrake.ApplicationServices.Interop;
+    using HandBrake.Interop.Interop;
 
     using HandBrakeWPF.Utilities;
 
@@ -52,7 +52,7 @@ namespace HandBrakeWPF.Helpers
         /// <param name="e">
         /// The e.
         /// </param>
-        private static void HandBrakeUtils_ErrorLogged(object sender, HandBrake.ApplicationServices.Interop.EventArgs.MessageLoggedEventArgs e)
+        private static void HandBrakeUtils_ErrorLogged(object sender, HandBrake.Interop.Interop.EventArgs.MessageLoggedEventArgs e)
         {
         }
 
@@ -65,7 +65,7 @@ namespace HandBrakeWPF.Helpers
         /// <param name="e">
         /// The e.
         /// </param>
-        private static void HandBrakeUtils_MessageLogged(object sender, HandBrake.ApplicationServices.Interop.EventArgs.MessageLoggedEventArgs e)
+        private static void HandBrakeUtils_MessageLogged(object sender, HandBrake.Interop.Interop.EventArgs.MessageLoggedEventArgs e)
         {
         }
     }
index 896add53e8ba9eaf269d7707c4799d955c3baf4f..8361e35d5613f708c729d5205aa26e0556b6c64d 100644 (file)
@@ -9,9 +9,9 @@
 \r
 namespace HandBrakeWPF.Helpers\r
 {\r
-    using HandBrake.ApplicationServices.Interop.HbLib;\r
-    using HandBrake.ApplicationServices.Interop.Model;\r
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
+    using HandBrake.Interop.Interop.HbLib;\r
+    using HandBrake.Interop.Interop.Model;\r
+    using HandBrake.Interop.Interop.Model.Encoding;\r
 \r
     /// <summary>\r
     /// The picture size Helpers\r
index 4ce79bec23bbe1b0cf819f541d928f3e235a56ad..657062fc08c28e5cf28a2571fe58cdccbe391df3 100644 (file)
@@ -18,7 +18,7 @@ namespace HandBrakeWPF.Helpers
     using System.Windows;\r
     using System.Xml.Serialization;\r
 \r
-    using HandBrake.ApplicationServices.Utilities;\r
+    using HandBrake.Interop.Utilities;\r
 \r
     using HandBrakeWPF.Services.Interfaces;\r
     using HandBrakeWPF.Services.Queue.Model;\r
index 0977334f6bfc9acf13995b549117d2844c4f01d2..7237c7c64c478b6c116632901c9de033d7f6d542 100644 (file)
@@ -9,7 +9,7 @@
 \r
 namespace HandBrakeWPF.Model.Audio\r
 {\r
-    using HandBrake.ApplicationServices.Attributes;\r
+    using HandBrake.Interop.Attributes;\r
 \r
     /// <summary>\r
     /// The audio behaviours.\r
index 0e16f83f131d2da91e5b010d40284b813dd608cd..5342d2454543e6afb039775beba9f89e5f943560 100644 (file)
@@ -16,9 +16,9 @@ namespace HandBrakeWPF.Model.Audio
 
     using Caliburn.Micro;
 
-    using HandBrake.ApplicationServices.Interop;
-    using HandBrake.ApplicationServices.Interop.Model;
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;
+    using HandBrake.Interop.Interop;
+    using HandBrake.Interop.Interop.Model;
+    using HandBrake.Interop.Interop.Model.Encoding;
     using Newtonsoft.Json;
     using Services.Encode.Model.Models;
     using Utilities;
index ffb03fc8a019ffb4e04c215b492b2ba794a2040c..b36a31ec5c3c19342966a282dd14f13b339d034c 100644 (file)
@@ -9,7 +9,7 @@
 \r
 namespace HandBrakeWPF.Model.Audio\r
 {\r
-    using HandBrake.ApplicationServices.Attributes;\r
+    using HandBrake.Interop.Attributes;\r
 \r
     /// <summary>\r
     /// The audio behaviours.\r
index 8745e68f6d8eda82f4d63526f01ff8d700959e04..538a964396968e2c50076b275f9a6ece73198778 100644 (file)
@@ -9,7 +9,7 @@
 
 namespace HandBrakeWPF.Model.Filters
 {
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;
+    using HandBrake.Interop.Interop.Model.Encoding;
 
     public class FilterPreset
     {
index 6f804a55180da7c7922d7d73a35dc6abaa41c203..a14e55f8fd27e2f656acdcb01abe2cccb2e8d1ce 100644 (file)
@@ -9,7 +9,7 @@
 
 namespace HandBrakeWPF.Model.Filters
 {
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;
+    using HandBrake.Interop.Interop.Model.Encoding;
 
     public class FilterTune
     {
index 4a2c6122ad7e4c190608b1983e53beb3e69a3ab6..c5bd358243facf557bd68663e8deceb420ecb0c7 100644 (file)
@@ -9,7 +9,7 @@
 \r
 namespace HandBrakeWPF.Model\r
 {\r
-    using HandBrake.ApplicationServices.Attributes;\r
+    using HandBrake.Interop.Attributes;\r
 \r
     /// <summary>\r
     /// A enum representing each tab on the options screen.\r
index 8ef06399fb6ffe3da7eeeb86a9efee50387af9b9..7db70c79c083aff6ba98f5b842c6089dc9d3e1e6 100644 (file)
@@ -9,7 +9,7 @@
 \r
 namespace HandBrakeWPF.Model.Picture\r
 {\r
-    using HandBrake.ApplicationServices.Attributes;\r
+    using HandBrake.Interop.Attributes;\r
 \r
     /// <summary>\r
     /// Picture Settings Mode when adding presets\r
index 1a3416c8810504f6a8bbb58fb22524e933469582..efdffc2aa123946c69abf25f807949306a9d5403 100644 (file)
@@ -9,7 +9,7 @@
 \r
 namespace HandBrakeWPF.Model.Subtitles\r
 {\r
-    using HandBrake.ApplicationServices.Attributes;\r
+    using HandBrake.Interop.Attributes;\r
 \r
     /// <summary>\r
     /// The subtitle behaviours modes.\r
index d335a6f10f7e50a7fde58c9102978efbe1b13a7a..37088a4cb3fb90ef190783c6a8051ff1d9169d95 100644 (file)
@@ -9,7 +9,7 @@
 \r
 namespace HandBrakeWPF.Model.Subtitles\r
 {\r
-    using HandBrake.ApplicationServices.Attributes;\r
+    using HandBrake.Interop.Attributes;\r
 \r
     /// <summary>\r
     /// The subtitle behaviours modes.\r
index 922a4ceb4de1941db2e2eae4f640569a0cfbfffd..c28b3cebdbb482c3242427d152f7aea121f5d055 100644 (file)
@@ -14,8 +14,8 @@ namespace HandBrakeWPF.Services.Encode
     using System.Globalization;
     using System.IO;
 
-    using HandBrake.ApplicationServices.Interop.EventArgs;
-    using HandBrake.ApplicationServices.Model;
+    using HandBrake.Interop.Interop.EventArgs;
+    using HandBrake.Interop.Model;
 
     using HandBrakeWPF.Services.Encode.Interfaces;
     using HandBrakeWPF.Utilities;
index 115973eace8fec47608471fadaa060a891f9596a..1ee4665defdf1a01238c8f8a7d42937b2c2a429d 100644 (file)
@@ -16,12 +16,12 @@ namespace HandBrakeWPF.Services.Encode.Factories
     using System.Runtime.InteropServices;
     using System.Runtime.InteropServices.ComTypes;
 
-    using HandBrake.ApplicationServices.Interop;
-    using HandBrake.ApplicationServices.Interop.HbLib;
-    using HandBrake.ApplicationServices.Interop.Json.Encode;
-    using HandBrake.ApplicationServices.Interop.Json.Shared;
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;
-    using HandBrake.ApplicationServices.Model;
+    using HandBrake.Interop.Interop;
+    using HandBrake.Interop.Interop.HbLib;
+    using HandBrake.Interop.Interop.Json.Encode;
+    using HandBrake.Interop.Interop.Json.Shared;
+    using HandBrake.Interop.Interop.Model.Encoding;
+    using HandBrake.Interop.Model;
 
     using HandBrakeWPF.Utilities;
 
@@ -35,9 +35,9 @@ namespace HandBrakeWPF.Services.Encode.Factories
     using FramerateMode = HandBrakeWPF.Services.Encode.Model.Models.FramerateMode;
     using OutputFormat = HandBrakeWPF.Services.Encode.Model.Models.OutputFormat;
     using PointToPointMode = HandBrakeWPF.Services.Encode.Model.Models.PointToPointMode;
-    using Subtitle = HandBrake.ApplicationServices.Interop.Json.Encode.Subtitles;
+    using Subtitle = HandBrake.Interop.Interop.Json.Encode.Subtitles;
     using SubtitleTrack = HandBrakeWPF.Services.Encode.Model.Models.SubtitleTrack;
-    using SystemInfo = HandBrake.ApplicationServices.Utilities.SystemInfo;
+    using SystemInfo = HandBrake.Interop.Utilities.SystemInfo;
     using Validate = HandBrakeWPF.Helpers.Validate;
 
     /// <summary>
@@ -184,7 +184,7 @@ namespace HandBrakeWPF.Services.Encode.Factories
         /// The job.
         /// </param>
         /// <returns>
-        /// The <see cref="HandBrake.ApplicationServices.Interop.Json.Encode.Subtitles"/>.
+        /// The <see cref="HandBrake.Interop.Interop.Json.Encode.Subtitles"/>.
         /// </returns>
         private static Subtitle CreateSubtitle(EncodeTask job)
         {
@@ -198,7 +198,7 @@ namespace HandBrakeWPF.Services.Encode.Factories
                             Burn = false,
                             Forced = false
                         },
-                SubtitleList = new List<HandBrake.ApplicationServices.Interop.Json.Encode.SubtitleTrack>()
+                SubtitleList = new List<HandBrake.Interop.Interop.Json.Encode.SubtitleTrack>()
             };
 
             foreach (SubtitleTrack item in job.SubtitleTracks)
@@ -215,7 +215,7 @@ namespace HandBrakeWPF.Services.Encode.Factories
                     }
                     else
                     {
-                        HandBrake.ApplicationServices.Interop.Json.Encode.SubtitleTrack track = new HandBrake.ApplicationServices.Interop.Json.Encode.SubtitleTrack
+                        HandBrake.Interop.Interop.Json.Encode.SubtitleTrack track = new HandBrake.Interop.Interop.Json.Encode.SubtitleTrack
                         {
                             Burn = item.Burned,
                             Default = item.Default,
@@ -229,7 +229,7 @@ namespace HandBrakeWPF.Services.Encode.Factories
                 }
                 else
                 {
-                    HandBrake.ApplicationServices.Interop.Json.Encode.SubtitleTrack track = new HandBrake.ApplicationServices.Interop.Json.Encode.SubtitleTrack
+                    HandBrake.Interop.Interop.Json.Encode.SubtitleTrack track = new HandBrake.Interop.Interop.Json.Encode.SubtitleTrack
                     {
                         Track = -1, // Indicates SRT
                         Default = item.Default,
@@ -341,7 +341,7 @@ namespace HandBrakeWPF.Services.Encode.Factories
             HBAudioEncoder audioEncoder = HandBrakeEncoderHelpers.GetAudioEncoder(EnumHelper<AudioEncoder>.GetShortName(job.AllowedPassthruOptions.AudioEncoderFallback));
             audio.FallbackEncoder = audioEncoder.Id;
 
-            audio.AudioList = new List<HandBrake.ApplicationServices.Interop.Json.Encode.AudioTrack>();
+            audio.AudioList = new List<HandBrake.Interop.Interop.Json.Encode.AudioTrack>();
             foreach (AudioTrack item in job.AudioTracks)
             {
                 HBAudioEncoder encoder = HandBrakeEncoderHelpers.GetAudioEncoder(EnumHelper<AudioEncoder>.GetShortName(item.Encoder));
@@ -357,7 +357,7 @@ namespace HandBrakeWPF.Services.Encode.Factories
 
                 HBRate sampleRate = HandBrakeEncoderHelpers.AudioSampleRates.FirstOrDefault(s => s.Name == item.SampleRate.ToString(CultureInfo.InvariantCulture));
 
-                HandBrake.ApplicationServices.Interop.Json.Encode.AudioTrack audioTrack = new HandBrake.ApplicationServices.Interop.Json.Encode.AudioTrack
+                HandBrake.Interop.Interop.Json.Encode.AudioTrack audioTrack = new HandBrake.Interop.Interop.Json.Encode.AudioTrack
                 {
                     Track = (item.Track.HasValue ? item.Track.Value : 0) - 1,
                     DRC = item.DRC,
index 1046dec4a841f6c71609235d2f353cb77a69d09b..f47b1577678ea865c23e639a9bf6c96f1c509966 100644 (file)
@@ -11,8 +11,8 @@ namespace HandBrakeWPF.Services.Encode.Factories
 {
     using System.Collections.Generic;
 
-    using HandBrake.ApplicationServices.Interop.Json.Queue;
-    using HandBrake.ApplicationServices.Model;
+    using HandBrake.Interop.Interop.Json.Queue;
+    using HandBrake.Interop.Model;
 
     using HandBrakeWPF.Services.Encode.Model;
 
index f60e27f6ce993cd9874cb18745f81c37a213aecf..489f469253e3f2f935352ce2aafcb5e589c784e8 100644 (file)
@@ -11,7 +11,7 @@ namespace HandBrakeWPF.Services.Encode.Interfaces
 {
     using System;
 
-    using HandBrake.ApplicationServices.Model;
+    using HandBrake.Interop.Model;
 
     using EncodeCompletedEventArgs = HandBrakeWPF.Services.Encode.EventArgs.EncodeCompletedEventArgs;
     using EncodeProgressEventArgs = HandBrakeWPF.Services.Encode.EventArgs.EncodeProgressEventArgs;
index 02a361ba6185ff25fdd580c4b84775eaf1cc7211..3d8e6c2903c66d84aecaca568e2e326c078fc0b9 100644 (file)
@@ -13,11 +13,11 @@ namespace HandBrakeWPF.Services.Encode
     using System.Diagnostics;
     using System.IO;
 
-    using HandBrake.ApplicationServices.Interop;
-    using HandBrake.ApplicationServices.Interop.EventArgs;
-    using HandBrake.ApplicationServices.Interop.Interfaces;
-    using HandBrake.ApplicationServices.Interop.Json.State;
-    using HandBrake.ApplicationServices.Model;
+    using HandBrake.Interop.Interop;
+    using HandBrake.Interop.Interop.EventArgs;
+    using HandBrake.Interop.Interop.Interfaces;
+    using HandBrake.Interop.Interop.Json.State;
+    using HandBrake.Interop.Model;
 
     using HandBrakeWPF.Exceptions;
     using HandBrakeWPF.Properties;
index f65cf689143ff94cecb82a484a5a4b4d7733cc7d..e1f18fd22ae88faecea7380fa0622633e121e689 100644 (file)
@@ -14,8 +14,8 @@ namespace HandBrakeWPF.Services.Encode.Model
 
     using Caliburn.Micro;
 
-    using HandBrake.ApplicationServices.Interop.Model;
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;
+    using HandBrake.Interop.Interop.Model;
+    using HandBrake.Interop.Interop.Model.Encoding;
 
     using HandBrakeWPF.Model.Filters;
     using HandBrakeWPF.Services.Encode.Model.Models;
index 3f415e60e5a05a41986608d2211b5378d3d54cf0..6031ce1f35a98b7f67147d0b6d4af55ce03b3d7c 100644 (file)
@@ -9,7 +9,7 @@
 
 namespace HandBrakeWPF.Services.Encode.Model.Models
 {
-    using HandBrake.ApplicationServices.Attributes;
+    using HandBrake.Interop.Attributes;
 
     /// <summary>
     /// The audio encoder.
index 4b28d9f3d03c7a134d3d62170f6aeadf22f61cb2..260a6d20c51d99d26e79e14aa397134dd29c416a 100644 (file)
@@ -9,7 +9,7 @@
 
 namespace HandBrakeWPF.Services.Encode.Model.Models
 {
-    using HandBrake.ApplicationServices.Attributes;
+    using HandBrake.Interop.Attributes;
 
     /// <summary>
     /// The audio encoder rate type.
index fe58ade77aa66155594a53eb4568dccb34d44b48..96a531f34801ed3beb9eb260ede8dfb56913697f 100644 (file)
@@ -17,9 +17,9 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
 
     using Caliburn.Micro;
 
-    using HandBrake.ApplicationServices.Interop;
-    using HandBrake.ApplicationServices.Interop.Model;
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;
+    using HandBrake.Interop.Interop;
+    using HandBrake.Interop.Interop.Model;
+    using HandBrake.Interop.Interop.Model.Encoding;
 
     using HandBrakeWPF.Model.Audio;
     using HandBrakeWPF.Services.Scan.Model;
index 71a7137226c4da9e13ace1808159fbe7c35fe69d..29d8bc4f77c148a9999ed258a7d5a32f165a0062 100644 (file)
@@ -9,7 +9,7 @@
 
 namespace HandBrakeWPF.Services.Encode.Model.Models
 {
-    using HandBrake.ApplicationServices.Attributes;
+    using HandBrake.Interop.Attributes;
 
     /// <summary>
     /// The denoise preset.
index 956ada4c54a16a9491cee168fc05ca560fc80bb4..db75c37bbaff9138df515f3b9a30800a0c213aa9 100644 (file)
@@ -9,7 +9,7 @@
 
 namespace HandBrakeWPF.Services.Encode.Model.Models
 {
-    using HandBrake.ApplicationServices.Attributes;
+    using HandBrake.Interop.Attributes;
 
     /// <summary>
     /// The denoise tune.
index d8eaa20fb53a2f447b348381c4e4c26377173e15..9ac381a7bd43f18957eb7fec8327515f56b4526c 100644 (file)
@@ -9,7 +9,7 @@
 
 namespace HandBrakeWPF.Services.Encode.Model.Models
 {
-    using HandBrake.ApplicationServices.Attributes;
+    using HandBrake.Interop.Attributes;
 
     /// <summary>
     /// The Mode of Video Encoding. CFR, VFR, PFR
index fee3236ec0b9b59e9c7905d941f235228a642357..8c55e45b1daa461ad3773e0280703213b321c3b2 100644 (file)
@@ -9,7 +9,7 @@
 
 namespace HandBrakeWPF.Services.Encode.Model.Models
 {
-    using HandBrake.ApplicationServices.Attributes;
+    using HandBrake.Interop.Attributes;
     
     /// <summary>
     /// The Output format.
index 4e52d1b8d199c33f5399566ab302e409607cc577..2bb60f00d94bf512afb3fb93612ff31a721ffae3 100644 (file)
@@ -9,7 +9,7 @@
 
 namespace HandBrakeWPF.Services.Encode.Model.Models
 {
-    using HandBrake.ApplicationServices.Attributes;
+    using HandBrake.Interop.Attributes;
 
     /// <summary>
     /// Point to Point Mode
index e481907bbdd4efb78ef5b86ca050306235d428eb..9b195152b3890e1c41325dd31457ea48cffb7aab 100644 (file)
@@ -13,7 +13,7 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
 
     using Caliburn.Micro;
 
-    using HandBrake.ApplicationServices.Utilities;
+    using HandBrake.Interop.Utilities;
 
     using HandBrakeWPF.Services.Scan.Model;
 
index 70bea306760e8a9af303c6c280fb1c167da3d631..03f6c100ec6faf1a9420e15b00c5bc0e390829a2 100644 (file)
@@ -19,8 +19,8 @@ namespace HandBrakeWPF.Services.Logging
     using System.Linq;
     using System.Text;
 
-    using HandBrake.ApplicationServices.Interop;
-    using HandBrake.ApplicationServices.Interop.EventArgs;
+    using HandBrake.Interop.Interop;
+    using HandBrake.Interop.Interop.EventArgs;
 
     using ILog = Interfaces.ILog;
     using LogEventArgs = EventArgs.LogEventArgs;
index e4ff54e260d82f91f70107f92a1f121338bbe602..dd4621ba02c0014184e13c92ca7a5c5280335e02 100644 (file)
@@ -17,7 +17,7 @@ namespace HandBrakeWPF.Services
 \r
     using Caliburn.Micro;\r
 \r
-    using HandBrake.ApplicationServices.Utilities;\r
+    using HandBrake.Interop.Utilities;\r
 \r
     using HandBrakeWPF.EventArgs;\r
     using HandBrakeWPF.Services.Interfaces;\r
index 8c173c4d0a60a6935fd9dec765b9226fb2d1d48e..668b23694838cb2b898c41cef50229dceb38001c 100644 (file)
@@ -15,13 +15,13 @@ namespace HandBrakeWPF.Services.Presets.Factories
     using System.Globalization;\r
     using System.Linq;\r
 \r
-    using HandBrake.ApplicationServices.Interop;\r
-    using HandBrake.ApplicationServices.Interop.HbLib;\r
-    using HandBrake.ApplicationServices.Interop.Json.Presets;\r
-    using HandBrake.ApplicationServices.Interop.Model;\r
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
-    using HandBrake.ApplicationServices.Model;\r
-    using HandBrake.ApplicationServices.Utilities;\r
+    using HandBrake.Interop.Interop;\r
+    using HandBrake.Interop.Interop.HbLib;\r
+    using HandBrake.Interop.Interop.Json.Presets;\r
+    using HandBrake.Interop.Interop.Model;\r
+    using HandBrake.Interop.Interop.Model.Encoding;\r
+    using HandBrake.Interop.Model;\r
+    using HandBrake.Interop.Utilities;\r
 \r
     using HandBrakeWPF.Model.Audio;\r
     using HandBrakeWPF.Model.Filters;\r
index 079d9424ac06e7ac221c205b4a8f6c43073c4b61..8c41b728b283838bff9bb3f4ba3ac1b5916ade02 100644 (file)
@@ -12,7 +12,7 @@ namespace HandBrakeWPF.Services.Presets.Interfaces
     using System.Collections.Generic;\r
     using System.Collections.ObjectModel;\r
 \r
-    using HandBrake.ApplicationServices.Model;\r
+    using HandBrake.Interop.Model;\r
 \r
     using HandBrakeWPF.Services.Presets.Model;\r
 \r
index 2182c082d610767fcee3b51d5564cc4e9fa27489..c53eb4f8a8384f75e1589861bca795d8cabdc8a0 100644 (file)
@@ -19,10 +19,10 @@ namespace HandBrakeWPF.Services.Presets
     using System.Linq;\r
     using System.Windows;\r
 \r
-    using HandBrake.ApplicationServices.Interop;\r
-    using HandBrake.ApplicationServices.Interop.Json.Presets;\r
-    using HandBrake.ApplicationServices.Model;\r
-    using HandBrake.ApplicationServices.Utilities;\r
+    using HandBrake.Interop.Interop;\r
+    using HandBrake.Interop.Interop.Json.Presets;\r
+    using HandBrake.Interop.Model;\r
+    using HandBrake.Interop.Utilities;\r
 \r
     using HandBrakeWPF.Factories;\r
     using HandBrakeWPF.Model.Picture;\r
index 38a93ee374e71aa3aa4cde826334dbd71759333c..c398e6a32344f9d6fe19c9e95c04dfae14efd394 100644 (file)
@@ -9,7 +9,7 @@
 \r
 namespace HandBrakeWPF.Services.Queue.Model\r
 {\r
-    using HandBrake.ApplicationServices.Attributes;\r
+    using HandBrake.Interop.Attributes;\r
 \r
     /// <summary>\r
     /// Queue Item Status\r
index eed9069aa98b8eb0eb92b417a74bb769e7966dd1..be4c664fba9456b70f0dade8aca91447502340d7 100644 (file)
@@ -11,7 +11,7 @@ namespace HandBrakeWPF.Services.Queue.Model
 {\r
     using Caliburn.Micro;\r
 \r
-    using HandBrake.ApplicationServices.Model;\r
+    using HandBrake.Interop.Model;\r
 \r
     using HandBrakeWPF.Services.Presets.Model;\r
     using HandBrakeWPF.Utilities;\r
index 9cf9b1320eb1d3c358cef40ac178bba07d7b29b2..5a701045f35e6988313fcde820e20a0ebf4e107e 100644 (file)
@@ -16,8 +16,8 @@ namespace HandBrakeWPF.Services.Queue
     using System.Linq;\r
     using System.Xml.Serialization;\r
 \r
-    using HandBrake.ApplicationServices.Model;\r
-    using HandBrake.ApplicationServices.Utilities;\r
+    using HandBrake.Interop.Model;\r
+    using HandBrake.Interop.Utilities;\r
 \r
     using HandBrakeWPF.Factories;\r
     using HandBrakeWPF.Properties;\r
index 136d9a234899cfa05dba28590c0e8d0a1e1b7295..5458b9d2d544d706794e237339f13618b2d979da 100644 (file)
@@ -12,7 +12,7 @@ namespace HandBrakeWPF.Services.Scan.Interfaces
     using System;
     using System.Windows.Media.Imaging;
 
-    using HandBrake.ApplicationServices.Model;
+    using HandBrake.Interop.Model;
 
     using HandBrakeWPF.Services.Encode.Model;
     using HandBrakeWPF.Services.Scan.EventArgs;
index 14b13d2e449f82c674a232e6d8faaa26ec7a7277..7bcc5531b0bbbc94740cf248498ed972b65539e7 100644 (file)
@@ -14,14 +14,14 @@ namespace HandBrakeWPF.Services.Scan
     using System.Diagnostics;
     using System.Windows.Media.Imaging;
 
-    using HandBrake.ApplicationServices.Interop;
-    using HandBrake.ApplicationServices.Interop.HbLib;
-    using HandBrake.ApplicationServices.Interop.Interfaces;
-    using HandBrake.ApplicationServices.Interop.Json.Scan;
-    using HandBrake.ApplicationServices.Interop.Model;
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;
-    using HandBrake.ApplicationServices.Interop.Model.Preview;
-    using HandBrake.ApplicationServices.Model;
+    using HandBrake.Interop.Interop;
+    using HandBrake.Interop.Interop.HbLib;
+    using HandBrake.Interop.Interop.Interfaces;
+    using HandBrake.Interop.Interop.Json.Scan;
+    using HandBrake.Interop.Interop.Model;
+    using HandBrake.Interop.Interop.Model.Encoding;
+    using HandBrake.Interop.Interop.Model.Preview;
+    using HandBrake.Interop.Model;
 
     using HandBrakeWPF.Services.Encode.Model;
     using HandBrakeWPF.Services.Encode.Model.Models;
@@ -35,7 +35,7 @@ namespace HandBrakeWPF.Services.Scan
     using LogLevel = HandBrakeWPF.Services.Logging.Model.LogLevel;
     using LogMessageType = HandBrakeWPF.Services.Logging.Model.LogMessageType;
     using LogService = HandBrakeWPF.Services.Logging.LogService;
-    using ScanProgressEventArgs = HandBrake.ApplicationServices.Interop.EventArgs.ScanProgressEventArgs;
+    using ScanProgressEventArgs = HandBrake.Interop.Interop.EventArgs.ScanProgressEventArgs;
     using Subtitle = HandBrakeWPF.Services.Scan.Model.Subtitle;
     using Title = HandBrakeWPF.Services.Scan.Model.Title;
 
index c8fc3a1fab0a274191b34a128b292172ef27943c..ce48404a42d3c2fc8faa99a20751f9f56f3d8e46 100644 (file)
@@ -12,7 +12,7 @@ namespace HandBrakeWPF.Services.Scan.Model
     using System;
     using System.Xml.Serialization;
 
-    using HandBrake.ApplicationServices.Utilities;
+    using HandBrake.Interop.Utilities;
 
     using HandBrakeWPF.Services.Encode.Model.Models;
     using HandBrakeWPF.Utilities;
index e60520fa75aaa4d1165b6ca99a572a5321f518b3..31b6a1fe75cfc37ee9b38880163c09ce6b7b3476 100644 (file)
@@ -14,7 +14,7 @@ namespace HandBrakeWPF.Services.Scan.Model
     using System.IO;
     using System.Linq;
 
-    using HandBrake.ApplicationServices.Interop.Model;
+    using HandBrake.Interop.Interop.Model;
 
     using HandBrakeWPF.Model;
     using HandBrakeWPF.Utilities;
index c0a1bcab6b2033e997eaa4a698f580c659fbfebc..d268a06e476bdb8891aeffdf6a06085e860f7fa0 100644 (file)
@@ -16,8 +16,8 @@ namespace HandBrakeWPF.Services
     using System.Reflection;\r
     using System.Security.Cryptography;\r
     using System.Threading;\r
-    using HandBrake.ApplicationServices.Interop;\r
-    using HandBrake.ApplicationServices.Utilities;\r
+    using HandBrake.Interop.Interop;\r
+    using HandBrake.Interop.Utilities;\r
     using HandBrakeWPF.Model;\r
     using HandBrakeWPF.Services.Interfaces;\r
     using HandBrakeWPF.Utilities;\r
index 5b180cd22c1ec21a9933664098c6db382a3350db..b6c3f57248fc7cec4fde34187a65975cc426fb80 100644 (file)
@@ -15,7 +15,7 @@ namespace HandBrakeWPF.Services
     using System.Reflection;\r
     using System.Xml.Serialization;\r
 \r
-    using HandBrake.ApplicationServices.Utilities;\r
+    using HandBrake.Interop.Utilities;\r
 \r
     using HandBrakeWPF.Properties;\r
     using HandBrakeWPF.Services.Interfaces;\r
index 0f5b64d5382294abc3bafe0e3be1d8597485a1c2..88ff54e5c6c8c708f45081295a1e11b2be550942 100644 (file)
@@ -17,7 +17,7 @@ namespace HandBrakeWPF.Utilities
     using System.Runtime.InteropServices;
     using System.Windows.Media.Imaging;
 
-    using HandBrake.ApplicationServices.Interop.Model.Preview;
+    using HandBrake.Interop.Interop.Model.Preview;
 
     /// <summary>
     /// The bitmap utilities.
index 718533aab0ace83e52181aae91ca1494e09776fd..ef8583917041037fc6685956fefacaff535d2186 100644 (file)
@@ -17,7 +17,7 @@ namespace HandBrakeWPF.Utilities
     using System.Linq;
     using System.Reflection;
 
-    using HandBrake.ApplicationServices.Attributes;
+    using HandBrake.Interop.Attributes;
 
     /// <summary>
     /// Enum Helpers
index bed4a01bebe66143a2eacc7cda5815339068c39f..6ce55c8650d5c4454d22c5ec6afb05222474077d 100644 (file)
@@ -17,7 +17,7 @@ namespace HandBrakeWPF.Utilities
     using System.Text;
     using System.Windows.Forms;
 
-    using HandBrake.ApplicationServices.Utilities;
+    using HandBrake.Interop.Utilities;
 
     /// <summary>
     /// A Set of Static Utilities
index 8ea5c522eb98d7c55b3c321e9ff1033e6fe9818d..4d106b839c2e1ae37531d508e56b0db65f1a15d6 100644 (file)
@@ -14,7 +14,7 @@ namespace HandBrakeWPF.Utilities
     using System.IO;\r
     using System.Linq;\r
 \r
-    using HandBrake.ApplicationServices.Utilities;\r
+    using HandBrake.Interop.Utilities;\r
 \r
     /// <summary>\r
     /// A general Helper class for HandBrake GUI\r
index f344cf3d64dc3bc2c45120e0506e95bd3fd5a0a2..57c768fdd881c95530e716778198bc9f1d8cb98b 100644 (file)
@@ -14,7 +14,7 @@ namespace HandBrakeWPF.Utilities
     using System.Management;
     using System.Windows.Forms;
 
-    using HandBrake.ApplicationServices.Interop.HbLib;
+    using HandBrake.Interop.Interop.HbLib;
 
     using Microsoft.Win32;
 
index 8096441b2da4c62cc290c96ec73de46afcf53bfc..471384e568cc2fc75268ab7ac18eb294c41f871d 100644 (file)
@@ -9,7 +9,7 @@
 \r
 namespace HandBrakeWPF.ViewModels\r
 {\r
-    using HandBrake.ApplicationServices.Utilities;\r
+    using HandBrake.Interop.Utilities;\r
 \r
     using HandBrakeWPF.ViewModels.Interfaces;\r
 \r
index 856c3e4bc3590578081c860d7ea3f465ed0f48e2..824b808ae97225615de8aebbda8c62d79c382ed0 100644 (file)
@@ -15,7 +15,7 @@ namespace HandBrakeWPF.ViewModels
 \r
     using Caliburn.Micro;\r
 \r
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
+    using HandBrake.Interop.Interop.Model.Encoding;\r
 \r
     using HandBrakeWPF.Model.Audio;\r
     using HandBrakeWPF.Model.Subtitles;\r
index 3d560ce5bb77094aa1d1134f38a05becb971a72e..289dcb0dec729088a1749c3deeab6519ff901b59 100644 (file)
@@ -14,9 +14,9 @@ namespace HandBrakeWPF.ViewModels
     using System.ComponentModel;
     using System.Linq;
 
-    using HandBrake.ApplicationServices.Interop;
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;
-    using HandBrake.ApplicationServices.Utilities;
+    using HandBrake.Interop.Interop;
+    using HandBrake.Interop.Interop.Model.Encoding;
+    using HandBrake.Interop.Utilities;
 
     using HandBrakeWPF.Model.Audio;
     using HandBrakeWPF.Services.Encode.Model;
index cf1ea6d3cc1a21017b20391f4ea45c8f535412c1..e63e75daee976750f8a391cbf3519b4961f299be 100644 (file)
@@ -17,9 +17,9 @@ namespace HandBrakeWPF.ViewModels
 \r
     using Caliburn.Micro;\r
 \r
-    using HandBrake.ApplicationServices.Interop;\r
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
-    using HandBrake.ApplicationServices.Utilities;\r
+    using HandBrake.Interop.Interop;\r
+    using HandBrake.Interop.Interop.Model.Encoding;\r
+    using HandBrake.Interop.Utilities;\r
 \r
     using HandBrakeWPF.EventArgs;\r
     using HandBrakeWPF.Model.Audio;\r
index f6c46631b4d476dad4efd77ab1c72f1afe106b67..86df91094e46a5c0252ededf52c54f5513773b00 100644 (file)
@@ -17,9 +17,9 @@ namespace HandBrakeWPF.ViewModels
 \r
     using Caliburn.Micro;\r
 \r
-    using HandBrake.ApplicationServices.Interop;\r
-    using HandBrake.ApplicationServices.Interop.HbLib;\r
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
+    using HandBrake.Interop.Interop;\r
+    using HandBrake.Interop.Interop.HbLib;\r
+    using HandBrake.Interop.Interop.Model.Encoding;\r
 \r
     using HandBrakeWPF.EventArgs;\r
     using HandBrakeWPF.Model.Filters;\r
index a9907bdba4b0dce5cbc1bf8354d546987052ced8..eb96e16283192e4eead3aadddfac1b7a354bdbb0 100644 (file)
@@ -9,7 +9,7 @@
 \r
 namespace HandBrakeWPF.ViewModels.Interfaces\r
 {\r
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
+    using HandBrake.Interop.Interop.Model.Encoding;\r
 \r
     /// <summary>\r
     /// The Advanced View Model Interface\r
index 4af305d4709dd32a172fee59dba7b3934c8d2124..70fc5250e7bfadb5c4ed3380569ccccea646c837 100644 (file)
@@ -22,7 +22,7 @@ namespace HandBrakeWPF.ViewModels
 \r
     using Caliburn.Micro;\r
 \r
-    using HandBrake.ApplicationServices.Interop;\r
+    using HandBrake.Interop.Interop;\r
 \r
     using HandBrakeWPF.Commands;\r
     using HandBrakeWPF.Commands.Menu;\r
index c8fb9580a4da22909a49a23f5695396acd00456f..8d542a3b0e009f983a85fcdefa8f19eaf7ccf9ce 100644 (file)
@@ -19,8 +19,8 @@ namespace HandBrakeWPF.ViewModels
 \r
     using Caliburn.Micro;\r
 \r
-    using HandBrake.ApplicationServices.Model;\r
-    using HandBrake.ApplicationServices.Utilities;\r
+    using HandBrake.Interop.Model;\r
+    using HandBrake.Interop.Utilities;\r
 \r
     using HandBrakeWPF.Model;\r
     using HandBrakeWPF.Properties;\r
@@ -33,7 +33,7 @@ namespace HandBrakeWPF.ViewModels
     using Ookii.Dialogs.Wpf;\r
 \r
     using Execute = Caliburn.Micro.Execute;\r
-    using SystemInfo = HandBrake.ApplicationServices.Utilities.SystemInfo;\r
+    using SystemInfo = HandBrake.Interop.Utilities.SystemInfo;\r
 \r
     /// <summary>\r
     /// The Options View Model\r
index 1e733384af353309463e07d4da464d5652c0744a..c45d2e0928ecfafb04a092fbe9dfe540d1531a7d 100644 (file)
@@ -13,9 +13,9 @@ namespace HandBrakeWPF.ViewModels
     using System.Collections.Generic;\r
     using System.Globalization;\r
 \r
-    using HandBrake.ApplicationServices.Interop;\r
-    using HandBrake.ApplicationServices.Interop.Model;\r
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
+    using HandBrake.Interop.Interop;\r
+    using HandBrake.Interop.Interop.Model;\r
+    using HandBrake.Interop.Interop.Model.Encoding;\r
 \r
     using HandBrakeWPF.EventArgs;\r
     using HandBrakeWPF.Helpers;\r
index 6c2bf0ecadb0a57420fa2796e26524ce12139632..f3e9593be10a3ff0453b3da6073e95a0f1b6d3f4 100644 (file)
@@ -20,7 +20,7 @@ namespace HandBrakeWPF.ViewModels
     using System.Windows;\r
     using System.Windows.Media.Imaging;\r
 \r
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
+    using HandBrake.Interop.Interop.Model.Encoding;\r
 \r
     using HandBrakeWPF.Factories;\r
     using HandBrakeWPF.Properties;\r
index 0334d2d1a1abbe8e734feed93c6fba9ed41d9d5e..28a5682636ab167f2db08be44bdf008f57a2c65f 100644 (file)
@@ -13,7 +13,7 @@ namespace HandBrakeWPF.ViewModels
     using System.ComponentModel;
     using System.Linq;
 
-    using HandBrake.ApplicationServices.Utilities;
+    using HandBrake.Interop.Utilities;
 
     using HandBrakeWPF.Model.Subtitles;
     using HandBrakeWPF.Services.Presets.Model;
index cd6d2aa1ecc8f3ddb637fce61bc6b6ae33386b17..0af10cd0e0d0e4982f9bc22a12cfff29a27345e4 100644 (file)
@@ -17,7 +17,7 @@ namespace HandBrakeWPF.ViewModels
 \r
     using Caliburn.Micro;\r
 \r
-    using HandBrake.ApplicationServices.Utilities;\r
+    using HandBrake.Interop.Utilities;\r
 \r
     using HandBrakeWPF.EventArgs;\r
     using HandBrakeWPF.Model.Subtitles;\r
index e2a294009bbb552894474cb0afb46e6c4d874be9..18260ec294df3e7e41e6761d0186fa42441518ab 100644 (file)
@@ -17,8 +17,8 @@ namespace HandBrakeWPF.ViewModels
     using System.Text;
     using System.Windows.Media.Imaging;
 
-    using HandBrake.ApplicationServices.Interop;
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;
+    using HandBrake.Interop.Interop;
+    using HandBrake.Interop.Interop.Model.Encoding;
 
     using HandBrakeWPF.EventArgs;
     using HandBrakeWPF.Factories;
index bf7947f121773e50889dd8f977ca315633793df2..18f07e06d4b3471c56579938016eb92f6811c1b8 100644 (file)
@@ -17,8 +17,8 @@ namespace HandBrakeWPF.ViewModels
 \r
     using Caliburn.Micro;\r
 \r
-    using HandBrake.ApplicationServices.Interop;\r
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
+    using HandBrake.Interop.Interop;\r
+    using HandBrake.Interop.Interop.Model.Encoding;\r
 \r
     using HandBrakeWPF.EventArgs;\r
     using HandBrakeWPF.Properties;\r
index 951db465766944be48dc9102b5687b264301cbac..f0600981fe241b87a387b85a98fb5d1ac86f83a6 100644 (file)
@@ -14,7 +14,7 @@ namespace HandBrakeWPF.ViewModels
     using System.Globalization;\r
     using System.Linq;\r
 \r
-    using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
+    using HandBrake.Interop.Interop.Model.Encoding;\r
 \r
     using HandBrakeWPF.EventArgs;\r
     using HandBrakeWPF.Helpers;\r
index e493e0047c9ef170614b9adf5ee3cfb0d66ebdcf..f45034778ab2dbf3bd91c3e4b1c6442c10e6301a 100644 (file)
@@ -24,7 +24,7 @@
 \r
   <!-- Build all the main cproj files.-->\r
   <ItemGroup>\r
-    <ProjectsToBuild Include="HandBrake.ApplicationServices\*proj" Exclude="$(MSBuildProjectFile)"/>\r
+    <ProjectsToBuild Include="HandBrake.Interop\*proj" Exclude="$(MSBuildProjectFile)"/>\r
     <ProjectsToBuild Include="HandBrakeWPF\HandBrakeWPF.*proj" Exclude="$(MSBuildProjectFile)"/>\r
   </ItemGroup>\r
 \r
@@ -38,7 +38,7 @@
   <Target Name="Nightly" DependsOnTargets="$(NightlyDependsOn)"/>\r
   <Target Name="Release" DependsOnTargets="$(InstallDependsOn)"/>\r
 \r
-  <!-- Build All Components (WPF, ApplicationServices, Interop) -->\r
+  <!-- Build All Components (WPF, Interop, Interop) -->\r
   <Target Name="BuildRelease">\r
     <MSBuild Projects ="@(ProjectsToBuild)"\r
              ContinueOnError ="false"\r