summaryrefslogtreecommitdiffstats
path: root/macosx/HBCore.m
diff options
context:
space:
mode:
authorritsuka <[email protected]>2015-04-09 19:43:33 +0000
committerritsuka <[email protected]>2015-04-09 19:43:33 +0000
commitf360714523e5f1f78ced2ae8691f3087b80eef65 (patch)
tree026c25eeba6d089a53ee1f73aed7329a318088cd /macosx/HBCore.m
parentf0cc63a21d2e4510f911c4cde75d051aec3e5635 (diff)
MacGui: run the Xcode "convert to modern objective-c" on the entire project.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7075 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBCore.m')
-rw-r--r--macosx/HBCore.m25
1 files changed, 13 insertions, 12 deletions
diff --git a/macosx/HBCore.m b/macosx/HBCore.m
index 13590aa8a..998dcd022 100644
--- a/macosx/HBCore.m
+++ b/macosx/HBCore.m
@@ -81,21 +81,12 @@ static void hb_error_handler(const char *errmsg)
hb_register_error_handler(&hb_error_handler);
}
-/**
- * Initializes HBCore.
- */
- (instancetype)init
{
- return [self initWithLoggingLevel:0];
+ return [self initWithLogLevel:0];
}
-/**
- * Opens low level HandBrake library. This should be called once before other
- * functions HBCore are used.
- *
- * @param debugMode If set to YES, libhb will print verbose debug output.
- */
-- (instancetype)initWithLoggingLevel:(int)loggingLevel
+- (instancetype)initWithLogLevel:(int)level
{
self = [super init];
if (self)
@@ -105,7 +96,7 @@ static void hb_error_handler(const char *errmsg)
_updateTimerQueue = dispatch_queue_create("fr.handbrake.coreQueue", DISPATCH_QUEUE_SERIAL);
_hb_state = malloc(sizeof(struct hb_state_s));
- _hb_handle = hb_init(loggingLevel, 0);
+ _hb_handle = hb_init(level, 0);
if (!_hb_handle)
{
return nil;
@@ -115,6 +106,16 @@ static void hb_error_handler(const char *errmsg)
return self;
}
+- (instancetype)initWithLogLevel:(int)level name:(NSString *)name
+{
+ self = [self initWithLogLevel:level];
+ if (self)
+ {
+ _name = [name copy];
+ }
+ return self;
+}
+
/**
* Releases resources.
*/