diff options
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs index 8d4f34e9e..fcc6d61da 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs @@ -11,6 +11,7 @@ namespace HandBrake.ApplicationServices.Interop {
using System;
using System.Collections.Generic;
+ using System.IO;
using System.Runtime.InteropServices;
using HandBrake.ApplicationServices.Interop.HbLib;
@@ -65,5 +66,23 @@ namespace HandBrake.ApplicationServices.Interop return preset;
}
+
+ /// <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);
+ using (StreamWriter writer = new StreamWriter(filename))
+ {
+ writer.Write(preset);
+ }
+ }
}
}
|