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