Commit 7010d0c5 authored by Mike JS. Choi's avatar Mike JS. Choi Committed by Carola Nitz

VLCLibrary: Update and check debug logging status (closes #186)

parent 0e96e789
......@@ -71,7 +71,7 @@ static VLCLibrary * sharedLibrary = nil;
return self;
}
- (instancetype)initWithOptions:(NSArray*)options
- (instancetype)initWithOptions:(NSArray *)options
{
if (self = [super init]) {
[self prepareInstanceWithOptions:options];
......@@ -143,6 +143,8 @@ static VLCLibrary * sharedLibrary = nil;
if (!_instance)
return;
_debugLogging = debugLogging;
if (debugLogging) {
libvlc_log_set(_instance, HandleMessage, (__bridge void *)(self));
} else {
......@@ -150,6 +152,18 @@ static VLCLibrary * sharedLibrary = nil;
}
}
- (void)setDebugLoggingLevel:(int)debugLoggingLevel
{
if (debugLoggingLevel >= 0 && debugLoggingLevel <= 4) {
_debugLoggingLevel = debugLoggingLevel;
} else {
VKLog(@"Invalid debugLoggingLevel of %d provided", debugLoggingLevel);
VKLog(@"Please provide a valid debugLoggingLevel between 0 and 4");
VKLog(@"Defaulting debugLoggingLevel to 0 (just errors)");
_debugLoggingLevel = 0;
}
}
- (NSString *)version
{
return @(libvlc_get_version());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment