3 This file is part of the HandBrake source code.
4 Homepage: <http://handbrake.fr/>.
5 It may be used under the terms of the GNU General Public License. */
7 #import <Foundation/Foundation.h>
9 NS_ASSUME_NONNULL_BEGIN
11 @interface HBUtilities
: NSObject
14 * Returns a formatted string that contains the application version.
16 + (NSString
*)handBrakeVersion
;
19 * Returns the url of the current <user>/Library/Application Support/HandBrake folder.
21 + (nullable NSURL
*)appSupportURL
;
23 * Writes a message to standard error.
24 * The message will show up in the output panel and in the activity log.
26 * @param format a standard c format string with varargs.
28 + (void)writeToActivityLog
:(const char *)format
, ...;
31 * Generates a file name automatically based on the inputs,
32 * it can be configured with NSUserDefaults.
34 * @param sourceName the name of the source file
35 * @param title the title number
36 * @param chaptersRange the selected chapters range
37 * @param quality the video encoder quality
38 * @param bitrate the video encoder bitrate
39 * @param videoCodec the video encoder type
41 * @return a NSString containing the required info
43 + (NSString
*)automaticNameForSource
:(NSString
*)sourceName
44 title
:(NSUInteger
)title
45 chapters
:(NSRange
)chaptersRange
46 quality
:(double)quality
48 videoCodec
:(uint32_t)codec
;