Commit c2f8eb6d authored by Felix Paul Kühne's avatar Felix Paul Kühne

Introduce the VKLog makro so we don't spam release builds with debug messages

parent 52ecc859
......@@ -7,3 +7,9 @@
#import <UIKit/UIKit.h>
#endif
#import <vlc/vlc.h>
#ifndef NDEBUG
#define VKLog(format, ...) NSLog(format, ## __VA_ARGS__)
#else
#define VKLog(format, ...)
#endif
......@@ -86,7 +86,7 @@ static void * EventDispatcherMainLoop(void * user_data)
pthread_cond_wait([self signalData], [self queueLock]);
//if ([[self messageQueue] count] % 100 == 0 || [[self messageQueue] count] < 100)
// NSLog(@"[EVENT_MANAGER] On the stack we have %d elements", [[self messageQueue] count]);
// VKLog(@"[EVENT_MANAGER] On the stack we have %d elements", [[self messageQueue] count]);
/* Get the first object off the queue. */
dataMessage = [[[self messageQueue] lastObject] retain]; // Released in 'call'
......
......@@ -113,7 +113,7 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
else if (event->type == libvlc_MediaPlayerOpening)
newState = VLCMediaPlayerStateOpening;
else {
NSLog(@"%s: Unknown event", __FUNCTION__);
VKLog(@"%s: Unknown event", __FUNCTION__);
return;
}
......
......@@ -134,7 +134,7 @@ void display(void *opaque, void *picture)
unsigned imageHeight = _thumbnailHeight > 0 ? _thumbnailHeight : kDefaultImageHeight;
if (!videoTrack)
NSLog(@"WARNING: Can't find video track info, still attempting to thumbnail in doubt");
VKLog(@"WARNING: Can't find video track info, still attempting to thumbnail in doubt");
else {
int videoHeight = [[videoTrack objectForKey:VLCMediaTracksInformationVideoHeight] intValue];
int videoWidth = [[videoTrack objectForKey:VLCMediaTracksInformationVideoWidth] intValue];
......@@ -179,7 +179,7 @@ void display(void *opaque, void *picture)
- (void)mediaParsingTimedOut
{
NSLog(@"WARNING: media thumbnailer media parsing timed out");
VKLog(@"WARNING: media thumbnailer media parsing timed out");
[_media removeObserver:self forKeyPath:@"parsed"];
[self startFetchingThumbnail];
......
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