From bec7d3d5986a4845fd5c7cccf88de40e4b6e2c74 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 16 May 2015 20:36:53 +0000 Subject: WinGui: Update the libhb preset stubs. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7198 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../Interop/HandBrakeInstanceManager.cs | 29 +++ .../Interop/HandBrakePresetService.cs | 2 +- .../Interop/Json/Encode/Chapter.cs | 28 +-- .../Interop/Json/Encode/SubtitleTrack.cs | 88 ++++---- .../Interop/Json/Encode/Subtitles.cs | 10 +- .../Interop/Json/Presets/AudioList.cs | 32 ++- .../Interop/Json/Presets/Preset.cs | 240 +++++++++++++++------ .../Interop/Json/Presets/PresetCategory.cs | 7 +- win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs | 2 +- 9 files changed, 301 insertions(+), 137 deletions(-) (limited to 'win/CS') diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstanceManager.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstanceManager.cs index 7a2e93d1b..aee941447 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstanceManager.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstanceManager.cs @@ -21,6 +21,24 @@ namespace HandBrake.ApplicationServices.Interop { private static HandBrakeInstance scanInstance; private static HandBrakeInstance encodeInstance; + private static HandBrakeInstance masterInstance; + + /// + /// Initializes static members of the class. + /// + static HandBrakeInstanceManager() + { + masterInstance = new HandBrakeInstance(); + masterInstance.Initialize(2); + } + + /// + /// The init. + /// + public static void Init() + { + // Nothing to do. Triggers static constructor. + } /// /// Gets the scanInstance. @@ -70,6 +88,17 @@ namespace HandBrake.ApplicationServices.Interop return encodeInstance; } + /// + /// Gets the master instance. + /// + public static IHandBrakeInstance MasterInstance + { + get + { + return masterInstance; + } + } + /// /// Gets the last scan scan instance. /// diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs index d49d789c8..0fdf95211 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs @@ -30,7 +30,7 @@ namespace HandBrake.ApplicationServices.Interop /// static HandBrakePresetService() { - HBFunctions.hb_presets_builtin_init(); + HandBrakeInstanceManager.Init(); } /// diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Chapter.cs b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Chapter.cs index 567d0e7a3..95eeb0057 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Chapter.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Chapter.cs @@ -5,18 +5,18 @@ // // Represents a chapter to encode. // -// -------------------------------------------------------------------------------------------------------------------- - -namespace HandBrake.ApplicationServices.Interop.Json.Encode -{ - /// - /// Represents a chapter to encode. - /// - public class Chapter - { - /// - /// Gets or sets the name. - /// - public string Name { get; set; } - } +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrake.ApplicationServices.Interop.Json.Encode +{ + /// + /// Represents a chapter to encode. + /// + public class Chapter + { + /// + /// Gets or sets the name. + /// + public string Name { get; set; } + } } \ No newline at end of file diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/SubtitleTrack.cs b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/SubtitleTrack.cs index af4ece97e..929c001d0 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/SubtitleTrack.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/SubtitleTrack.cs @@ -5,48 +5,48 @@ // // Represents a subtitle track to encode. // -// -------------------------------------------------------------------------------------------------------------------- - -namespace HandBrake.ApplicationServices.Interop.Json.Encode -{ - /// - /// Represents a subtitle track to encode. - /// - public class SubtitleTrack - { - /// - /// Gets or sets a value indicating whether burn. - /// - public bool Burn { get; set; } - - /// - /// Gets or sets a value indicating whether default. - /// - public bool Default { get; set; } - - /// - /// Gets or sets a value indicating whether force. - /// - public bool Forced { get; set; } - - /// - /// Gets or sets the id. - /// - public int ID { get; set; } - - /// - /// Gets or sets the offset. - /// - public int Offset { get; set; } - - /// - /// Gets or sets the track. - /// - public int Track { get; set; } - - /// - /// Gets or sets the srt. - /// - public SRT SRT { get; set; } - } +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrake.ApplicationServices.Interop.Json.Encode +{ + /// + /// Represents a subtitle track to encode. + /// + public class SubtitleTrack + { + /// + /// Gets or sets a value indicating whether burn. + /// + public bool Burn { get; set; } + + /// + /// Gets or sets a value indicating whether default. + /// + public bool Default { get; set; } + + /// + /// Gets or sets a value indicating whether force. + /// + public bool Forced { get; set; } + + /// + /// Gets or sets the id. + /// + public int ID { get; set; } + + /// + /// Gets or sets the offset. + /// + public int Offset { get; set; } + + /// + /// Gets or sets the track. + /// + public int Track { get; set; } + + /// + /// Gets or sets the srt. + /// + public SRT SRT { get; set; } + } } \ No newline at end of file diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Subtitles.cs b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Subtitles.cs index 13439eaa7..248801789 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Subtitles.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Subtitles.cs @@ -21,9 +21,9 @@ namespace HandBrake.ApplicationServices.Interop.Json.Encode /// public SubtitleSearch Search { get; set; } - /// - /// Gets or sets the subtitle list. - /// - public List SubtitleList { get; set; } - } + /// + /// Gets or sets the subtitle list. + /// + public List SubtitleList { get; set; } + } } \ No newline at end of file diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/AudioList.cs b/win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/AudioList.cs index 8f4670ba5..d77825fa6 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/AudioList.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/AudioList.cs @@ -17,7 +17,17 @@ namespace HandBrake.ApplicationServices.Interop.Json.Presets /// /// Gets or sets the audio bitrate. /// - public string AudioBitrate { get; set; } + public int AudioBitrate { get; set; } + + /// + /// Gets or sets the audio compression level. + /// + public double AudioCompressionLevel { get; set; } + + /// + /// Gets or sets the audio dither method. + /// + public string AudioDitherMethod { get; set; } /// /// Gets or sets the audio encoder. @@ -29,24 +39,34 @@ namespace HandBrake.ApplicationServices.Interop.Json.Presets /// public string AudioMixdown { get; set; } + /// + /// Gets or sets a value indicating whether audio normalize mix level. + /// + public bool AudioNormalizeMixLevel { get; set; } + /// /// Gets or sets the audio samplerate. /// public string AudioSamplerate { get; set; } /// - /// Gets or sets the audio track. + /// Gets or sets a value indicating whether audio track quality enable. /// - public int AudioTrack { get; set; } + public bool AudioTrackQualityEnable { get; set; } /// - /// Gets or sets the audio track drc slider. + /// Gets or sets the audio track quality. /// - public double AudioTrackDRCSlider { get; set; } + public double AudioTrackQuality { get; set; } /// /// Gets or sets the audio track gain slider. /// public double AudioTrackGainSlider { get; set; } + + /// + /// Gets or sets the audio track drc slider. + /// + public double AudioTrackDRCSlider { get; set; } } -} +} \ No newline at end of file diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/Preset.cs b/win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/Preset.cs index a90410c54..8d19d0ae3 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/Preset.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/Preset.cs @@ -12,54 +12,54 @@ namespace HandBrake.ApplicationServices.Interop.Json.Presets using System.Collections.Generic; /// - /// The preset. + /// The preset. /// public class Preset { /// - /// Gets or sets the audio allow aac pass. + /// Gets or sets the audio copy mask. /// - public int AudioAllowAACPass { get; set; } + public List AudioCopyMask { get; set; } /// - /// Gets or sets the audio allow a c 3 pass. + /// Gets or sets the audio encoder fallback. /// - public int AudioAllowAC3Pass { get; set; } + public string AudioEncoderFallback { get; set; } /// - /// Gets or sets the audio allow dtshd pass. + /// Gets or sets the audio language list. /// - public int AudioAllowDTSHDPass { get; set; } + public List AudioLanguageList { get; set; } /// - /// Gets or sets the audio allow dts pass. + /// Gets or sets the audio list. /// - public int AudioAllowDTSPass { get; set; } + public List AudioList { get; set; } /// - /// Gets or sets the audio allow m p 3 pass. + /// Gets or sets a value indicating whether audio secondary encoder mode. /// - public int AudioAllowMP3Pass { get; set; } + public bool AudioSecondaryEncoderMode { get; set; } /// - /// Gets or sets the audio encoder fallback. + /// Gets or sets the audio track selection behavior. /// - public string AudioEncoderFallback { get; set; } + public string AudioTrackSelectionBehavior { get; set; } /// - /// Gets or sets the audio list. + /// Gets or sets a value indicating whether chapter markers. /// - public List AudioList { get; set; } + public bool ChapterMarkers { get; set; } /// - /// Gets or sets the chapter markers. + /// Gets or sets the children array. /// - public int ChapterMarkers { get; set; } + public List ChildrenArray { get; set; } /// - /// Gets or sets the default. + /// Gets or sets a value indicating whether default. /// - public int Default { get; set; } + public bool Default { get; set; } /// /// Gets or sets the file format. @@ -72,25 +72,50 @@ namespace HandBrake.ApplicationServices.Interop.Json.Presets public bool Folder { get; set; } /// - /// Gets or sets the mp 4 http optimize. + /// Gets or sets a value indicating whether folder open. + /// + public bool FolderOpen { get; set; } + + /// + /// Gets or sets a value indicating whether mp 4 http optimize. /// - public int Mp4HttpOptimize { get; set; } + public bool Mp4HttpOptimize { get; set; } /// - /// Gets or sets the mp 4 i pod compatible. + /// Gets or sets a value indicating whether mp 4 i pod compatible. /// - public int Mp4iPodCompatible { get; set; } + public bool Mp4iPodCompatible { get; set; } /// - /// Gets or sets the picture auto crop. + /// Gets or sets a value indicating whether picture auto crop. /// - public int PictureAutoCrop { get; set; } + public bool PictureAutoCrop { get; set; } /// /// Gets or sets the picture bottom crop. /// public int PictureBottomCrop { get; set; } + /// + /// Gets or sets the picture left crop. + /// + public int PictureLeftCrop { get; set; } + + /// + /// Gets or sets the picture right crop. + /// + public int PictureRightCrop { get; set; } + + /// + /// Gets or sets the picture top crop. + /// + public int PictureTopCrop { get; set; } + + /// + /// Gets or sets the picture dar width. + /// + public int PictureDARWidth { get; set; } + /// /// Gets or sets the picture deblock. /// @@ -99,7 +124,7 @@ namespace HandBrake.ApplicationServices.Interop.Json.Presets /// /// Gets or sets the picture decomb. /// - public int PictureDecomb { get; set; } + public string PictureDecomb { get; set; } /// /// Gets or sets the picture decomb custom. @@ -107,14 +132,14 @@ namespace HandBrake.ApplicationServices.Interop.Json.Presets public string PictureDecombCustom { get; set; } /// - /// Gets or sets the picture decomb deinterlace. + /// Gets or sets a value indicating whether picture decomb deinterlace. /// - public int PictureDecombDeinterlace { get; set; } + public bool PictureDecombDeinterlace { get; set; } /// /// Gets or sets the picture deinterlace. /// - public int PictureDeinterlace { get; set; } + public string PictureDeinterlace { get; set; } /// /// Gets or sets the picture deinterlace custom. @@ -131,10 +156,20 @@ namespace HandBrake.ApplicationServices.Interop.Json.Presets /// public string PictureDenoiseFilter { get; set; } + /// + /// Gets or sets the picture denoise preset. + /// + public string PictureDenoisePreset { get; set; } + + /// + /// Gets or sets the picture denoise tune. + /// + public string PictureDenoiseTune { get; set; } + /// /// Gets or sets the picture detelecine. /// - public int PictureDetelecine { get; set; } + public string PictureDetelecine { get; set; } /// /// Gets or sets the picture detelecine custom. @@ -142,19 +177,19 @@ namespace HandBrake.ApplicationServices.Interop.Json.Presets public string PictureDetelecineCustom { get; set; } /// - /// Gets or sets the picture height. + /// Gets or sets a value indicating whether picture itu par. /// - public int PictureHeight { get; set; } + public bool PictureItuPAR { get; set; } /// - /// Gets or sets the picture keep ratio. + /// Gets or sets a value indicating whether picture keep ratio. /// - public int PictureKeepRatio { get; set; } + public bool PictureKeepRatio { get; set; } /// - /// Gets or sets the picture left crop. + /// Gets or sets a value indicating whether picture loose crop. /// - public int PictureLeftCrop { get; set; } + public bool PictureLooseCrop { get; set; } /// /// Gets or sets the picture modulus. @@ -167,20 +202,40 @@ namespace HandBrake.ApplicationServices.Interop.Json.Presets public string PicturePAR { get; set; } /// - /// Gets or sets the picture right crop. + /// Gets or sets the picture par width. /// - public int PictureRightCrop { get; set; } + public int PicturePARWidth { get; set; } /// - /// Gets or sets the picture top crop. + /// Gets or sets the picture par height. /// - public int PictureTopCrop { get; set; } + public int PicturePARHeight { get; set; } + + /// + /// Gets or sets the picture rotate. + /// + public int PictureRotate { get; set; } /// /// Gets or sets the picture width. /// public int PictureWidth { get; set; } + /// + /// Gets or sets the picture height. + /// + public int PictureHeight { get; set; } + + /// + /// Gets or sets the picture force height. + /// + public int PictureForceHeight { get; set; } + + /// + /// Gets or sets the picture force width. + /// + public int PictureForceWidth { get; set; } + /// /// Gets or sets the preset description. /// @@ -197,19 +252,64 @@ namespace HandBrake.ApplicationServices.Interop.Json.Presets public int Type { get; set; } /// - /// Gets or sets the uses picture filters. + /// Gets or sets a value indicating whether uses picture filters. /// - public int UsesPictureFilters { get; set; } + public bool UsesPictureFilters { get; set; } /// /// Gets or sets the uses picture settings. /// public int UsesPictureSettings { get; set; } + /// + /// Gets or sets a value indicating whether subtitle add cc. + /// + public bool SubtitleAddCC { get; set; } + + /// + /// Gets or sets a value indicating whether subtitle add foreign audio search. + /// + public bool SubtitleAddForeignAudioSearch { get; set; } + + /// + /// Gets or sets a value indicating whether subtitle add foreign audio subtitle. + /// + public bool SubtitleAddForeignAudioSubtitle { get; set; } + + /// + /// Gets or sets the subtitle burn behavior. + /// + public string SubtitleBurnBehavior { get; set; } + + /// + /// Gets or sets a value indicating whether subtitle burn bd sub. + /// + public bool SubtitleBurnBDSub { get; set; } + + /// + /// Gets or sets a value indicating whether subtitle burn dvd sub. + /// + public bool SubtitleBurnDVDSub { get; set; } + + /// + /// Gets or sets the subtitle language list. + /// + public List SubtitleLanguageList { get; set; } + + /// + /// Gets or sets the subtitle track selection behavior. + /// + public string SubtitleTrackSelectionBehavior { get; set; } + /// /// Gets or sets the video avg bitrate. /// - public string VideoAvgBitrate { get; set; } + public int VideoAvgBitrate { get; set; } + + /// + /// Gets or sets the video color matrix code. + /// + public int VideoColorMatrixCode { get; set; } /// /// Gets or sets the video encoder. @@ -227,34 +327,44 @@ namespace HandBrake.ApplicationServices.Interop.Json.Presets public string VideoFramerateMode { get; set; } /// - /// Gets or sets the video gray scale. + /// Gets or sets a value indicating whether video gray scale. /// - public int VideoGrayScale { get; set; } + public bool VideoGrayScale { get; set; } /// - /// Gets or sets the video level. + /// Gets or sets a value indicating whether video hw decode. /// - public string VideoLevel { get; set; } + public bool VideoHWDecode { get; set; } /// - /// Gets or sets the video option extra. + /// Gets or sets the video scaler. /// - public string VideoOptionExtra { get; set; } + public string VideoScaler { get; set; } /// /// Gets or sets the video preset. /// public string VideoPreset { get; set; } + /// + /// Gets or sets the video tune. + /// + public string VideoTune { get; set; } + /// /// Gets or sets the video profile. /// public string VideoProfile { get; set; } /// - /// Gets or sets the video quality slider. + /// Gets or sets the video level. /// - public double VideoQualitySlider { get; set; } + public string VideoLevel { get; set; } + + /// + /// Gets or sets the video option extra. + /// + public string VideoOptionExtra { get; set; } /// /// Gets or sets the video quality type. @@ -262,19 +372,29 @@ namespace HandBrake.ApplicationServices.Interop.Json.Presets public int VideoQualityType { get; set; } /// - /// Gets or sets the video tune. + /// Gets or sets the video quality slider. /// - public string VideoTune { get; set; } + public double VideoQualitySlider { get; set; } + + /// + /// Gets or sets a value indicating whether video qsv decode. + /// + public bool VideoQSVDecode { get; set; } + + /// + /// Gets or sets the video qsv async depth. + /// + public int VideoQSVAsyncDepth { get; set; } /// - /// Gets or sets the video turbo two pass. + /// Gets or sets a value indicating whether video two pass. /// - public int VideoTurboTwoPass { get; set; } + public bool VideoTwoPass { get; set; } /// - /// Gets or sets the video two pass. + /// Gets or sets a value indicating whether video turbo two pass. /// - public int VideoTwoPass { get; set; } + public bool VideoTurboTwoPass { get; set; } /// /// Gets or sets the x 264 option. @@ -282,8 +402,8 @@ namespace HandBrake.ApplicationServices.Interop.Json.Presets public string x264Option { get; set; } /// - /// Gets or sets the x 264 use advanced options. + /// Gets or sets a value indicating whether x 264 use advanced options. /// - public int x264UseAdvancedOptions { get; set; } + public bool x264UseAdvancedOptions { get; set; } } -} +} \ No newline at end of file diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/PresetCategory.cs b/win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/PresetCategory.cs index be31e888e..6700c0a84 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/PresetCategory.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/PresetCategory.cs @@ -21,11 +21,6 @@ namespace HandBrake.ApplicationServices.Interop.Json.Presets /// public List ChildrenArray { get; set; } - /// - /// Gets or sets the default. - /// - public int Default { get; set; } - /// /// Gets or sets a value indicating whether folder. /// @@ -41,4 +36,4 @@ namespace HandBrake.ApplicationServices.Interop.Json.Presets /// public int Type { get; set; } } -} +} \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index 6252f53f3..47cc4f6a3 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -40,7 +40,7 @@ namespace HandBrakeWPF.ViewModels public class VideoViewModel : ViewModelBase, IVideoViewModel { /* - * Hard Code "None" in the Models for Tune.t + * Hard Code "None" in the Models for Tune. * Test Everything */ #region Constants and Fields -- cgit v1.2.3