Skip to content

Commit

Permalink
Removed some spammy NSLogs
Browse files Browse the repository at this point in the history
  • Loading branch information
Zakk authored and Zakk committed May 3, 2015
1 parent 2e81011 commit cfb5fe4
Show file tree
Hide file tree
Showing 25 changed files with 0 additions and 154 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ -(bool)setupDisplayStream

if (!self.currentDisplay)
{
NSLog(@"NO DISPLAY");
return NO;
}

Expand Down Expand Up @@ -289,7 +288,6 @@ -(bool)stopDisplayStream

if (_displayStreamRef)
{
NSLog(@"STOP DISPLAY STREAM");
CGDisplayStreamStop(_displayStreamRef);
}

Expand Down Expand Up @@ -387,7 +385,6 @@ -(void)willDelete

-(void)dealloc
{
NSLog(@"DEALLOC DISPLAY STREAM");
[self removeObserver:self forKeyPath:@"propertiesChanged"];
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ -(void)changeAvailableVideoDevices
for(sserv in servers)
{

NSLog(@"Syphon UUID %@", [sserv objectForKey:SyphonServerDescriptionUUIDKey ]);
NSString *sy_name = [NSString stringWithFormat:@"%@ - %@", [sserv objectForKey:SyphonServerDescriptionAppNameKey], [sserv objectForKey:SyphonServerDescriptionNameKey]];

CSAbstractCaptureDevice *newDev;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ -(instancetype)init
if (self = [super init])
{

//NSLog(@"SUPER CLASS IS %@", super);

_nextCaptureTime = 0.0f;
self.captureFPS = 30.0f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,4 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
return self;
}

-(void)dealloc
{
NSLog(@"WINDOW CAPTURE VIEW DEALLOC");

}
@end
1 change: 0 additions & 1 deletion CocoaSplit/AVFAudioCapture.m
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ -(void) setupAudioCompression
_audio_capture_output = [[AVCaptureAudioDataOutput alloc] init];


NSLog(@"AUDIO SAMPLERATE %d BITRATE %d", self.audioSamplerate, self.audioBitrate);
if (self.useAudioEngine)
{

Expand Down
17 changes: 0 additions & 17 deletions CocoaSplit/CAMultiAudio/CAMultiAudioPCMPlayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ -(bool)playPcmBuffer:(CAMultiAudioPCM *)pcmBuffer



//NSLog(@"SCHED SLICE %d", err);

return YES;
}
Expand All @@ -119,8 +118,6 @@ -(void)scheduleBuffer:(CMSampleBufferRef)sampleBuffer
{


//NSLog(@"THE BUFFER %@", sampleBuffer);

//credit to TheAmazingAudioEngine for an illustration of proper audiobufferlist allocation. Google leads to some really really bad allocation code...

AudioBufferList *sampleABL;
Expand All @@ -139,7 +136,6 @@ -(void)scheduleBuffer:(CMSampleBufferRef)sampleBuffer

sampleABL->mNumberBuffers = bufferCnt;

//NSLog(@"BUFFERCNT %d CHANNELCNT %d, SAMPLES %ld, BYTES/FRAME %d", bufferCnt, channelCnt, numSamples, asbd->mBytesPerFrame);

for (int i=0; i<bufferCnt; i++)
{
Expand Down Expand Up @@ -196,25 +192,12 @@ -(void)play
ts.mFlags = kAudioTimeStampSampleTimeValid;
ts.mSampleTime = -1;
err = AudioUnitSetProperty(self.audioUnit, kAudioUnitProperty_ScheduleStartTimeStamp, kAudioUnitScope_Global, 0, &ts, sizeof(ts));




//NSLog(@"PLAYER INPUT rate %f, %d channels, %d bits per channel", asbd.mSampleRate, asbd.mChannelsPerFrame, asbd.mBitsPerChannel);


//NSLog(@"SCHEDULE START %d", err);


}
@end


void BufferCompletedPlaying(void *userData, ScheduledAudioSlice *bufferList)
{
//NSLog(@"BUFFER COMPLETED PLAYING!!!! COMP %d BEGAN %d LATE %d", bufferList->mFlags & kScheduledAudioSliceFlag_Complete, bufferList->mFlags & kScheduledAudioSliceFlag_BeganToRender, bufferList->mFlags & kScheduledAudioSliceFlag_BeganToRenderLate);


CAMultiAudioPCM *pcmObj = (__bridge CAMultiAudioPCM *)(userData);
//maybe put this on a dedicated queue?
//why a queue? don't want to do any sort of memory/managed object operations in an audio callback.
Expand Down
4 changes: 0 additions & 4 deletions CocoaSplit/CAMultiAudio/CAMultiAudioUnit.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ -(instancetype)initWithSubType:(OSType)subType unitType:(OSType)unitType
AudioComponentInstanceNew(comp, &_audioUnit);
OSStatus err;
err = AudioUnitInitialize(_audioUnit);
NSLog(@"AU INIT %d", err);

}


Expand All @@ -51,10 +49,8 @@ -(void)connect:(AudioUnit)toNode

AudioUnitGetProperty(_audioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, 1, &asbd, &asbdSize);

NSLog(@"OUTPUT ASBD SAMPLERATE %f", asbd.mSampleRate);

err = AudioUnitSetProperty(toNode, kAudioUnitProperty_MakeConnection, kAudioUnitScope_Input, 1, &conn, sizeof(conn));
NSLog(@"UNIT SET CONN %d", err);

err = AudioUnitSetProperty(toNode, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 1, &asbd, asbdSize);

Expand Down
12 changes: 0 additions & 12 deletions CocoaSplit/CSAacEncoder.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ -(void)preallocateBufferList:(AudioBufferList *)bufferList

if (bufferSize > self.preallocatedBuffersize)
{
NSLog(@"ALLOCATING FOR %d", bufferSize);
_pcmData = malloc(bufferSize*2); //Assuming deinterleaved 2-ch, so allocate enough space for both channels
self.preallocatedBuffersize = bufferSize;
}
Expand Down Expand Up @@ -64,12 +63,6 @@ -(void) enqueuePCM:(AudioBufferList *)pcmBuffer atTime:(const AudioTimeStamp *)a

//for now assume Float32, 2 channel, non-interleaved. We have to interleave it outselves here.




//NSLog(@"ENCODE BUFFER SIZE %u", (unsigned int)bufsize);


AudioBuffer buffer0 = pcmBuffer->mBuffers[0];
AudioBuffer buffer1 = pcmBuffer->mBuffers[1];
Float32 *data0 = buffer0.mData;
Expand Down Expand Up @@ -298,7 +291,6 @@ -(void) setupEncoder



// NSLog(@"CODEC INIT %d COOKIE SIZE %u MAX %u", err, magicCookie->mMagicCookieSize, cookiestructsize);
outputSampleCount = 0;


Expand All @@ -310,10 +302,6 @@ -(void) setupEncoder
cookiestructsize = sizeof(CFDictionaryRef);

AudioCodecGetProperty(aacCodec, kAudioCodecPropertySettings, &cookiestructsize, &encoderState);
//NSLog(@"ENCODER STATE %@", encoderState);



return;

}
Expand Down
2 changes: 0 additions & 2 deletions CocoaSplit/CSAnimationChooserViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ -(void)loadAnimations
CSAnimationRunnerObj *runner = [CaptureController sharedAnimationObj];


NSLog(@"LOADING ANIMATIONS %@", runner);

NSDictionary *animations = [runner allAnimations];
NSMutableArray *tmpList = [NSMutableArray array];

Expand Down
1 change: 0 additions & 1 deletion CocoaSplit/CSCaptureBase.m
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ -(id) copyWithZone:(NSZone *)zone

NSString *pName = [[NSString alloc] initWithBytes:propName length:strlen(propName) encoding:NSUTF8StringEncoding];
id propertyValue = [self valueForKey:pName];
NSLog(@"SETTING %@ TO %@",pName, propertyValue);

[newCopy setValue:propertyValue forKey:pName];
}
Expand Down
1 change: 0 additions & 1 deletion CocoaSplit/CSTextCaptureViewControllerBase.m
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ -(void)changeAttributes:(id)sender
-(void)dealloc
{

NSLog(@"DEALLOC TEXT CAPTURE BASE!");

NSFontManager *fontManager = [NSFontManager sharedFontManager];

Expand Down
37 changes: 0 additions & 37 deletions CocoaSplit/CaptureController.m
Original file line number Diff line number Diff line change
Expand Up @@ -477,13 +477,6 @@ -(IBAction)saveCompressPanel
NSError *compressError;


if (![self.compressSettingsController commitEditing])
{
NSLog(@"FAILED TO COMMIT EDITING FOR COMPRESS EDIT");
}



if (self.editingCompressor)
{

Expand Down Expand Up @@ -644,7 +637,6 @@ -(IBAction)closeCreateSheet:(id)sender

[self.streamServicePluginViewController.view removeFromSuperview];

NSLog(@"STREAM SERVICE CONFI WINDOW %@", self.streamServiceConfWindow);

[NSApp endSheet:self.streamServiceConfWindow];
[self.streamServiceConfWindow close];
Expand Down Expand Up @@ -1052,11 +1044,8 @@ +(CSAnimationRunnerObj *) sharedAnimationObj
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSString *animationPluginPath = [[NSBundle mainBundle] pathForResource:@"CSAnimationRunner" ofType:@"plugin"];
NSLog(@"ANIM PATH %@", animationPluginPath);
NSBundle *animationBundle = [NSBundle bundleWithPath:animationPluginPath];
NSLog(@"ANIM BUNDLE %@", animationBundle);
Class animationClass = [animationBundle classNamed:@"CSAnimationRunnerObj"];
NSLog(@"ANIM CLASS %@", animationClass);

sharedAnimationObj = [[animationClass alloc] init];

Expand Down Expand Up @@ -1562,15 +1551,6 @@ -(void) loadSettings
}


/*
NSString *animationPluginPath = [[NSBundle mainBundle] pathForResource:@"CSAnimationRunner" ofType:@"plugin"];
NSLog(@"ANIM PATH %@", animationPluginPath);
NSBundle *animationBundle = [NSBundle bundleWithPath:animationPluginPath];
NSLog(@"ANIM BUNDLE %@", animationBundle);
Class animationClass = [animationBundle classNamed:@"CSAnimationRunnerObj"];
NSLog(@"ANIM CLASS %@", animationClass);
//self.animationRunner = [[animationClass alloc] init];
*/
self.extraPluginsSaveData = nil;


Expand Down Expand Up @@ -2153,28 +2133,15 @@ - (void)captureOutputAudio:(id)fromDevice didOutputSampleBuffer:(CMSampleBufferR
{


//NSLog(@"AUDIO BUFFER %@", sampleBuffer);
if (!self.captureRunning)
{
return;
}

/*
if (_firstFrameTime == 0)
{
//Don't start sending audio to the outputs until a video frame has arrived, with AVFoundation this can take 2+ seconds (!?)
//Might need to prime the capture session first...
return;
}
*/
// NSLog(@"AUDIO SAMPLE BUFFER %@", sampleBuffer);


CMTime orig_pts = CMSampleBufferGetPresentationTimeStamp(sampleBuffer);



//NSLog(@"AUDIO PTS %@", CMTimeCopyDescription(kCFAllocatorDefault, orig_pts));

if (CMTIME_COMPARE_INLINE(_firstAudioTime, ==, kCMTimeZero))
{
Expand All @@ -2188,7 +2155,6 @@ - (void)captureOutputAudio:(id)fromDevice didOutputSampleBuffer:(CMSampleBufferR
CMTime pts = CMTimeAdd(real_pts, adjust_pts);


//NSLog(@"AUDIO PTS %@", CMTimeCopyDescription(kCFAllocatorDefault, pts));

CMSampleBufferSetOutputPresentationTimeStamp(sampleBuffer, pts);

Expand Down Expand Up @@ -2339,7 +2305,6 @@ -(void) newFrameTimed

if (![self sleepUntil:(startTime += _frame_interval)])
{
//NSLog(@"SLEEP FAILED");
continue;
}

Expand Down Expand Up @@ -2499,15 +2464,13 @@ -(void)processVideoFrame:(CVPixelBufferRef)videoFrame

CFAbsoluteTime ptsTime = _frame_time - _firstFrameTime;

//NSLog(@"PTS TIME IS %f", ptsTime);


_frameCount++;
_lastFrameTime = _frame_time;


pts = CMTimeMake(ptsTime*1000000, 1000000);
//NSLog(@"PTS TIME IS %@", CMTimeCopyDescription(kCFAllocatorDefault, pts));

duration = CMTimeMake(1000, self.captureFPS*1000);

Expand Down
1 change: 0 additions & 1 deletion CocoaSplit/Compressor/x264Compressor.m
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ - (bool)compressFrame:(CapturedFrameData *)frameData
CVImageBufferRef imageBuffer = frameData.videoFrame;


//NSLog(@"WIDTH INPUT %zd HEIGHT %zd", CVPixelBufferGetWidth(imageBuffer), CVPixelBufferGetHeight(imageBuffer));

src_height = CVPixelBufferGetHeight(imageBuffer);
src_width = CVPixelBufferGetWidth(imageBuffer);
Expand Down
6 changes: 0 additions & 6 deletions CocoaSplit/FFMpegTask.m
Original file line number Diff line number Diff line change
Expand Up @@ -243,16 +243,13 @@ -(void) writeAudioSampleBuffer:(CMSampleBufferRef)theBuffer presentationTimeStam
pkt.destruct = NULL;


//NSLog(@"FFMPEG AUDIO PTS %lld/%d", pts.value, pts.timescale);

pkt.pts = av_rescale_q(pts.value, (AVRational) {1.0, pts.timescale}, _av_audio_stream->time_base);



//pkt.dts = pkt.pts;


// pkt.pts = pts.value;
if (av_interleaved_write_frame(_av_fmt_ctx, &pkt) < 0)
{
NSLog(@"AV WRITE AUDIO failed for %@", self.stream_output);
Expand Down Expand Up @@ -396,7 +393,6 @@ -(bool) createAVFormatOut:(CMSampleBufferRef)theBuffer codec_ctx:(AVCodecContext
if (!(av_out_fmt->flags & AVFMT_NOFILE))
{
int av_err;
NSLog(@"Doing AVIO_OPEN");
if ((av_err = avio_open(&_av_fmt_ctx->pb, [_stream_output UTF8String], AVIO_FLAG_WRITE)) < 0)
{
NSString *open_err = [self av_error_nsstring:av_err ];
Expand Down Expand Up @@ -497,7 +493,6 @@ -(void) writeAVPacket:(CapturedFrameData *)frameData

if ([self resetOutputIfNeeded])
{
NSLog(@"OUTPUT RESET");
return;
}

Expand All @@ -516,7 +511,6 @@ -(void) writeAVPacket:(CapturedFrameData *)frameData

if (!self.active)
{
NSLog(@"NOT ACTIVE");
return;
}

Expand Down
13 changes: 0 additions & 13 deletions CocoaSplit/InputSource.m
Original file line number Diff line number Diff line change
Expand Up @@ -285,20 +285,9 @@ -(id) initWithCoder:(NSCoder *)aDecoder
[self updateRotationTransform];


//[self positionOrigin:x_pos y:y_pos];

//self.layoutPosition = self.layer.frame;
//if (width && height)
// {
// [self updateSize:width height:height];
// }
self.layoutPosition = self.layer.frame;


//self.layoutPosition = self.layer.frame;

//NSLog(@"INIT %f %f %f %f", x_pos, y_pos, width, height);

_selectedVideoType = [aDecoder decodeObjectForKey:@"selectedVideoType"];


Expand Down Expand Up @@ -918,7 +907,6 @@ -(NSArray *)sourceTypes
-(void)dealloc
{

NSLog(@"DEALLOC SOURCE INPUT");
[self deregisterVideoInput:self.videoInput];
for(id vInput in self.videoSources)
{
Expand Down Expand Up @@ -1504,7 +1492,6 @@ -(void) updateOrigin:(CGFloat)x y:(CGFloat)y

if (isnan(x))
{
NSLog(@"HOLY CRAP NaN");
return;
}

Expand Down
Loading

0 comments on commit cfb5fe4

Please sign in to comment.