summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Services
diff options
context:
space:
mode:
authorsr55 <[email protected]>2017-06-14 22:07:14 +0100
committersr55 <[email protected]>2017-06-14 22:07:14 +0100
commite2aaa9f501ab10d6ca3b01dbd3306b73334c917e (patch)
tree1794ebd3d4eb442fa018a04aff3170a91f01618f /win/CS/HandBrakeWPF/Services
parent0b65b3005312401d0f9aad7acb00aa412cea7376 (diff)
WinGui: Add checkbox for Legacy A/V alignment behaviour for players that don't support MP4 Edit Lists. #778
Diffstat (limited to 'win/CS/HandBrakeWPF/Services')
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs1
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs3
-rw-r--r--win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs2
3 files changed, 6 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs
index 20e4eff14..18021c9bc 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs
@@ -146,6 +146,7 @@ namespace HandBrakeWPF.Services.Encode.Factories
Mp4Optimize = job.OptimizeMP4
},
ChapterMarkers = job.IncludeChapterMarkers,
+ AlignAVStart = job.AlignAVStart,
Mux = HBFunctions.hb_container_get_from_name(job.OutputFormat == OutputFormat.Mp4 ? "av_mp4" : "av_mkv"), // TODO tidy up.
ChapterList = new List<Chapter>()
};
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs b/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs
index 84d1eb7eb..f65cf6891 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs
@@ -87,6 +87,7 @@ namespace HandBrakeWPF.Services.Encode.Model
this.ChapterNames.Add(new ChapterMarker(track));
}
+ this.AlignAVStart = task.AlignAVStart;
this.ChapterMarkersFilePath = task.ChapterMarkersFilePath;
this.Cropping = new Cropping(task.Cropping);
this.CustomDecomb = task.CustomDecomb;
@@ -218,6 +219,8 @@ namespace HandBrakeWPF.Services.Encode.Model
/// </summary>
public bool IPod5GSupport { get; set; }
+ public bool AlignAVStart { get; set; }
+
#endregion
#region Picture
diff --git a/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs b/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs
index 9b252e030..787e5ea46 100644
--- a/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs
+++ b/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs
@@ -72,6 +72,7 @@ namespace HandBrakeWPF.Services.Presets.Factories
preset.Task.OptimizeMP4 = importedPreset.Mp4HttpOptimize;
preset.Task.IPod5GSupport = importedPreset.Mp4iPodCompatible;
preset.Task.OutputFormat = GetFileFormat(importedPreset.FileFormat.Replace("file", string.Empty).Trim()); // TOOD null check.
+ preset.Task.AlignAVStart = importedPreset.AlignAVStart;
/* Picture Settings */
preset.PictureSettingsMode = (PresetPictureSettingsMode)importedPreset.UsesPictureSettings;
@@ -604,6 +605,7 @@ namespace HandBrakeWPF.Services.Presets.Factories
preset.FileFormat = EnumHelper<OutputFormat>.GetShortName(export.Task.OutputFormat);
preset.Mp4HttpOptimize = export.Task.OptimizeMP4;
preset.Mp4iPodCompatible = export.Task.IPod5GSupport;
+ preset.AlignAVStart = export.Task.AlignAVStart;
// Picture Settings
preset.PictureForceHeight = 0; // TODO