1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
/* Init.cs $
This file is part of the HandBrake source code.
Homepage: <http://handbrake.fr>.
It may be used under the terms of the GNU General Public License. */
namespace HandBrake.ApplicationServices
{
using System;
using System.Reflection;
/// <summary>
/// Initialize ApplicationServices
/// </summary>
public class Init
{
/**
* I really dislike this, Need to replace this sooner rather than later.
**/
/// <summary>
/// Setup the Settings used by the applicaiton with this library
/// </summary>
/// <param name="versionString">
/// The version / name of the application that's using this DLL.
/// </param>
/// <param name="instanceId">
/// The Instance ID
/// </param>
/// <param name="completionOption">
/// The completion option.
/// </param>
/// <param name="disableDvdNav">
/// The disable dvd nav.
/// </param>
/// <param name="growlEncode">
/// The growl encode.
/// </param>
/// <param name="growlQueue">
/// The growl queue.
/// </param>
/// <param name="processPriority">
/// The process priority.
/// </param>
/// <param name="saveLogPath">
/// The save log path.
/// </param>
/// <param name="saveLogToSpecifiedPath">
/// The save log to specified path.
/// </param>
/// <param name="saveLogWithVideo">
/// The save log with video.
/// </param>
/// <param name="showCliForInGuiEncodeStatus">
/// The show cli for in gui encode status.
/// </param>
/// <param name="preventSleep">
/// Prevent the system from sleeping
/// </param>
public static void SetupSettings(string versionString, string version, int build, int instanceId, string completionOption, bool disableDvdNav,
bool growlEncode, bool growlQueue, string processPriority, string saveLogPath, bool saveLogToSpecifiedPath,
bool saveLogWithVideo, bool showCliForInGuiEncodeStatus, bool preventSleep)
{
InstanceId = instanceId;
HandBrakeGuiVersionString = versionString;
Version = version;
Build = build;
CompletionOption = completionOption;
DisableDvdNav = disableDvdNav;
GrowlEncode = growlEncode;
GrowlQueue = growlQueue;
ProcessPriority = processPriority;
SaveLogPath = saveLogPath;
SaveLogToSpecifiedPath = saveLogToSpecifiedPath;
SaveLogWithVideo = saveLogWithVideo;
ShowCliForInGuiEncodeStatus = showCliForInGuiEncodeStatus;
PreventSleep = preventSleep;
}
/// <summary>
/// Gets the Assembly version.
/// </summary>
/// <returns>
/// Version data
/// </returns>
public static Version AssemblyVersion()
{
return Assembly.GetExecutingAssembly().GetName().Version;
}
/// <summary>
/// The instance ID used by the Main Applicaiton
/// </summary>
public static int InstanceId;
/// <summary>
/// The Applicaiton that uses this DLL can pass in it's version string.
/// </summary>
public static string HandBrakeGuiVersionString;
/// <summary>
/// HandBrakes Version or Svn revision
/// </summary>
public static string Version;
/// <summary>
/// Handbrakes Build number
/// </summary>
public static int Build;
/// <summary>
/// What to do when the encode completes.
/// </summary>
public static string CompletionOption;
/// <summary>
/// Disable LibDvdNav
/// </summary>
public static bool DisableDvdNav;
/// <summary>
/// Growl when an encode has finished.
/// </summary>
public static bool GrowlEncode;
/// <summary>
/// Growl when a queue has finished.
/// </summary>
public static bool GrowlQueue;
/// <summary>
/// The Process Priority for HandBrakeCLI
/// </summary>
public static string ProcessPriority;
/// <summary>
/// Path to save log files to.
/// </summary>
public static string SaveLogPath;
/// <summary>
/// Copy log files to the SaveLogPath
/// </summary>
public static bool SaveLogToSpecifiedPath;
/// <summary>
/// Save a copy of the log files with the video
/// </summary>
public static bool SaveLogWithVideo;
/// <summary>
/// Show the CLI window when encoding.
/// </summary>
public static bool ShowCliForInGuiEncodeStatus;
/// <summary>
/// Prevent system sleep
/// </summary>
public static bool PreventSleep;
}
}
|