Skip to content

Commit

Permalink
Introduce the VKLog makro so we don't spam release builds with debug …
Browse files Browse the repository at this point in the history
…messages
  • Loading branch information
fkuehne committed Mar 28, 2013
1 parent 52ecc85 commit c2f8eb6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions MobileVLCKit_Prefix.pch
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Sources/VLCEventManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ - (void)addMessageToHandleOnMainThread:(NSData *)messageAsData;
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'
Expand Down
2 changes: 1 addition & 1 deletion Sources/VLCMediaPlayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions Sources/VLCMediaThumbnailer.m
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ - (void)startFetchingThumbnail
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];
Expand Down Expand Up @@ -179,7 +179,7 @@ - (void)startFetchingThumbnail

- (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];
Expand Down

0 comments on commit c2f8eb6

Please sign in to comment.