Fix some warnings

This commit is contained in:
Zakk 2018-01-25 04:55:49 -05:00
parent dbaf43ae59
commit c4c7fc4e0b
19 changed files with 23 additions and 57 deletions

View file

@ -247,7 +247,6 @@
av_samples_fill_arrays((uint8_t **)&arrBuf, &dst_linesize, dBuf, 2, (int)dst_nb_samples, AV_SAMPLE_FMT_FLTP, 1);
av_samples_set_silence((uint8_t **)&arrBuf, 0, (int)dst_nb_samples, 2, AV_SAMPLE_FMT_FLTP);
swr_convert(_swr_ctx, (uint8_t **)&arrBuf, (int)dst_nb_samples, (const uint8_t **)recv_frame->extended_data, recv_frame->nb_samples);
int bufferCnt = asbd->mFormatFlags & kAudioFormatFlagIsNonInterleaved ? asbd->mChannelsPerFrame : 1;
av_frame_unref(recv_frame);
av_frame_free(&recv_frame);

View file

@ -84,7 +84,6 @@
3441269C1E6C86400051DA06 /* CSLayoutSwitcherWithPreviewWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3441269A1E6C86400051DA06 /* CSLayoutSwitcherWithPreviewWindowController.xib */; };
3441269F1E6D0C4C0051DA06 /* CSLayoutSwitcherHostingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3441269E1E6D0C4C0051DA06 /* CSLayoutSwitcherHostingView.m */; };
344126A21E6DBBEE0051DA06 /* CSLayoutSwitcherView.m in Sources */ = {isa = PBXBuildFile; fileRef = 344126A11E6DBBEE0051DA06 /* CSLayoutSwitcherView.m */; };
34414E522019C06B00CD9DCE /* CSCaptureBaseInternal.h in Sources */ = {isa = PBXBuildFile; fileRef = 34414E512019C06B00CD9DCE /* CSCaptureBaseInternal.h */; };
3444D8E819A0CDE8000DC46B /* Quartz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3444D8E719A0CDE8000DC46B /* Quartz.framework */; };
344825D21B2536EA00AF9EAC /* CAMultiAudioMatrixView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 344825D11B2536EA00AF9EAC /* CAMultiAudioMatrixView.xib */; };
344825E61B253D6900AF9EAC /* CAMultiAudioMatrixCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 344825E51B253D6900AF9EAC /* CAMultiAudioMatrixCell.m */; };
@ -180,9 +179,7 @@
34A629451FBB6DC500B4E16A /* CSJSAnimationDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 34A629441FBB6DC500B4E16A /* CSJSAnimationDelegate.m */; };
34A64A2F165EFE4C00A68428 /* PreviewView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34A64A2E165EFE4B00A68428 /* PreviewView.m */; };
34A64A37165F208800A68428 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34A64A36165F208800A68428 /* QuartzCore.framework */; };
34A77455201449450036F8B5 /* CSStreamServiceBase.h in Sources */ = {isa = PBXBuildFile; fileRef = 34A77454201449450036F8B5 /* CSStreamServiceBase.h */; };
34A77457201449C30036F8B5 /* CSStreamServiceBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 34A77456201449C30036F8B5 /* CSStreamServiceBase.m */; };
34A77459201466C30036F8B5 /* CSLavfOutput.h in Sources */ = {isa = PBXBuildFile; fileRef = 34A77458201466C30036F8B5 /* CSLavfOutput.h */; };
34A7745B201466F10036F8B5 /* CSOutputBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 34A7745A201466F10036F8B5 /* CSOutputBase.m */; };
34A7ADB81C01EF1400685044 /* CompressionSettingsPanelController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34A7ADB71C01EF1400685044 /* CompressionSettingsPanelController.m */; };
34A7C1AD19B9A57600BC6882 /* CSLayoutSwitcherExtraPlugin.bundle in Copy Files */ = {isa = PBXBuildFile; fileRef = 34A7C1A119B9A41A00BC6882 /* CSLayoutSwitcherExtraPlugin.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
@ -794,7 +791,6 @@
345F8B7B1A184FBC009A81E3 /* CAMultiAudioMixingProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CAMultiAudioMixingProtocol.h; sourceTree = "<group>"; };
3460E5871AC764500080358E /* rotate.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = rotate.py; sourceTree = "<group>"; };
346395042018483300556407 /* CSPcmPlayer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CSPcmPlayer.m; sourceTree = "<group>"; };
3463950920189AA800556407 /* CSCaptureSourceProtocolPrivate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CSCaptureSourceProtocolPrivate.h; sourceTree = "<group>"; };
3463F99D1AD0DC7100F3B5C8 /* movement.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = movement.py; sourceTree = "<group>"; };
346544DA1FC22CF0003B9991 /* CSNSButtonCellThemed.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CSNSButtonCellThemed.h; path = Interface/CSNSButtonCellThemed.h; sourceTree = "<group>"; };
346544DB1FC22CF0003B9991 /* CSNSButtonCellThemed.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CSNSButtonCellThemed.m; path = Interface/CSNSButtonCellThemed.m; sourceTree = "<group>"; };
@ -1436,7 +1432,6 @@
34A77458201466C30036F8B5 /* CSLavfOutput.h */,
34A7745A201466F10036F8B5 /* CSOutputBase.m */,
346395042018483300556407 /* CSPcmPlayer.m */,
3463950920189AA800556407 /* CSCaptureSourceProtocolPrivate.h */,
34414E512019C06B00CD9DCE /* CSCaptureBaseInternal.h */,
3457BCC52019C3F600B8DF5D /* CSCaptureBaseInputFrameTickProtocol.h */,
);
@ -2790,7 +2785,6 @@
3498D94A1A94685000906532 /* CSAudioSwitchCell.m in Sources */,
34AB1C311B944F48003F2C03 /* CSPreviewOverlayView.m in Sources */,
345F8B051A1060D6009A81E3 /* CSAacEncoder.m in Sources */,
34A77459201466C30036F8B5 /* CSLavfOutput.h in Sources */,
342346BE15F6103D00C8C77E /* CSLavfOutput.m in Sources */,
345F8B3D1A15F3BD009A81E3 /* CAMultiAudioPCM.m in Sources */,
34ED8C9F1B07371C002C0674 /* MIKMIDISequence.m in Sources */,
@ -2823,7 +2817,6 @@
34938EE81AE4A7E500F3B1CF /* CSCIFilterConfigProxy.m in Sources */,
34210B3E1606001200362FC8 /* OutputDestination.m in Sources */,
34ED8C9B1B07371C002C0674 /* MIKMIDIPrivateUtilities.m in Sources */,
34414E522019C06B00CD9DCE /* CSCaptureBaseInternal.h in Sources */,
345F8B391A15D850009A81E3 /* CAMultiAudioDefaultOutput.m in Sources */,
34ED8CA51B07371C002C0674 /* MIKMIDISystemExclusiveCommand.m in Sources */,
3473D29A1D4C3D0E00842EEE /* CSAddOutputPopupViewController.m in Sources */,
@ -2901,7 +2894,6 @@
34A7ADB81C01EF1400685044 /* CompressionSettingsPanelController.m in Sources */,
34DC2FB01B512362008F12A2 /* CSCaptureBase+TimerDelegate.m in Sources */,
34ED8C791B07371C002C0674 /* MIKMIDIMetaEvent.m in Sources */,
34A77455201449450036F8B5 /* CSStreamServiceBase.h in Sources */,
34F52A2B1BC1E0F900662911 /* CSLayoutButton.m in Sources */,
34576C7819AFCA1B007BAD90 /* CSPluginLoader.m in Sources */,
34FDD6F21A215268009A7413 /* CSPluginServices.m in Sources */,
@ -3119,7 +3111,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "zakk.lol.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = CocoaSplit;
PROVISIONING_PROFILE = "";
SDKROOT = macosx10.13;
SDKROOT = macosx10.12;
STRIP_STYLE = debugging;
WRAPPER_EXTENSION = app;
};
@ -3170,7 +3162,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "zakk.lol.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = CocoaSplit;
PROVISIONING_PROFILE = "";
SDKROOT = macosx10.13;
SDKROOT = macosx10.12;
STRIP_STYLE = debugging;
WRAPPER_EXTENSION = app;
};

View file

@ -174,9 +174,6 @@
self.name = CFBridgingRelease(cName);
}
AUAudioUnit *blah = [[AUAudioUnit alloc] initWithComponentDescription:unitDescr error:nil];
NSLog(@"CHANN %@", blah.channelCapabilities);
NSLog(@"BUS COUNT %d", (unsigned long)blah.inputBusses.count);
if (self.audioUnit && _auClassData)

View file

@ -85,7 +85,7 @@
timeInfo.presentationTimeStamp = ptsTime;
timeInfo.decodeTimeStamp = kCMTimeInvalid;
CMSampleBufferCreate(kCFAllocatorDefault, NULL, NO, NULL, NULL, _pcmFormat, inFrameCnt, 1, &timeInfo, 0, NULL, &pcmSampleBuffer);
OSStatus ret = CMSampleBufferSetDataBufferFromAudioBufferList(pcmSampleBuffer, kCFAllocatorDefault, kCFAllocatorDefault, 0, inBuffer);
CMSampleBufferSetDataBufferFromAudioBufferList(pcmSampleBuffer, kCFAllocatorDefault, kCFAllocatorDefault, 0, inBuffer);
if (self.encodedReceiver)
{
[self.encodedReceiver captureOutputAudio:nil didOutputPCMSampleBuffer:pcmSampleBuffer];

View file

@ -5,7 +5,6 @@
// Created by Zakk on 1/25/18.
//
#import <Foundation/Foundation.h>
#import "InputSource.h"
#import "CSCaptureSourceProtocol.h"
#import "CSPcmPlayer.h"
@ -16,6 +15,8 @@ typedef enum frame_render_behavior_t {
kCSRenderAsync = 2
} frame_render_behavior;
@class InputSource;
@interface CSCaptureBase : NSObject <NSCoding, NSCopying>

View file

@ -1,19 +0,0 @@
//
// CSCaptureSourceProtocolPrivate.h
// CocoaSplit
//
// Created by Zakk on 1/24/18.
//
#import <Foundation/Foundation.h>
#import "CSCaptureSourceProtocol.h"
@class InputSource;
@protocol CSCaptureSourceProtocolPrivate <CSCaptureSourceProtocol>
-(void)activeStatusChangedForInput:(InputSource *)inputSource;
-(void)liveStatusChangedForInput:(InputSource *)inputSource;
@end

View file

@ -532,7 +532,6 @@
NSUInteger audioConsumed = 0;
NSUInteger sampleCount = 0;
NSMutableArray *pendingConsume = [NSMutableArray array];
@synchronized(self)
{

View file

@ -69,7 +69,6 @@
}
@synthesize isReady;
@end

View file

@ -121,7 +121,6 @@ OSStatus VTCompressionSessionCopySupportedPropertyDictionary(VTCompressionSessio
-(void)configureCompressionSession:(VTCompressionSessionRef)session
{
OSStatus status;
VTSessionSetProperty(session, kVTCompressionPropertyKey_AllowFrameReordering, kCFBooleanFalse);
VTSessionSetProperty(session, (__bridge CFStringRef)@"RealTime", kCFBooleanTrue);

View file

@ -9,7 +9,6 @@
#import <QuartzCore/CoreImage.h>
#import <JavaScriptCore/JavaScriptCore.h>
#import "Capture.h"
#import "CSCaptureSourceProtocolPrivate.h"
#import "CSPluginLoader.h"
#import "SourceCache.h"
#import "InputPopupControllerViewController.h"
@ -18,6 +17,7 @@
#import "CSInputSourceProtocol.h"
#import "CSInputSourceBase.h"
#import "CSCaptureBaseInputFrameTickProtocol.h"
#import "CSCaptureBaseInternal.h"
@interface InputSourcePrivateFrameUpdate : NSObject
@ -67,7 +67,7 @@ typedef enum resize_style_t {
@property (assign) float scrollXSpeed;
@property (assign) float scrollYSpeed;
@property (strong) NSObject<CSCaptureSourceProtocolPrivate,CSCaptureBaseInputFrameTickProtocol> *videoInput;
@property (strong) NSObject<CSCaptureSourceProtocol,CSCaptureBaseInputFrameTickProtocol> *videoInput;
@property (assign) float rotationAngle;
@property (assign) float rotationAngleY;
@property (assign) float rotationAngleX;
@ -261,7 +261,7 @@ typedef enum resize_style_t {
-(void)updateLayer:(void (^)(CALayer *layer))updateBlock;
-(void) setDirectVideoInput:(NSObject <CSCaptureSourceProtocolPrivate> *)videoInput;
-(void) setDirectVideoInput:(NSObject <CSCaptureSourceProtocol> *)videoInput;
-(NSViewController *)configurationViewController;
@ -278,7 +278,7 @@ typedef enum resize_style_t {
@property (assign) float scrollXSpeed;
@property (assign) float scrollYSpeed;
@property (strong) NSObject<CSCaptureSourceProtocolPrivate,CSCaptureBaseInputFrameTickProtocol> *videoInput;
@property (strong) CSCaptureBase<CSCaptureSourceProtocol,CSCaptureBaseInputFrameTickProtocol> *videoInput;
@property (assign) float rotationAngle;
@property (assign) float rotationAngleY;
@property (assign) float rotationAngleX;

View file

@ -6,7 +6,6 @@
//
#import "InputSource.h"
#import "CSCaptureSourceProtocolPrivate.h"
#import "SourceLayout.h"
#import "InputPopupControllerViewController.h"
@ -88,7 +87,7 @@ static NSArray *_sourceTypes = nil;
newSource.chromaKeyThreshold = self.chromaKeyThreshold;
newSource.chromaKeySmoothing = self.chromaKeySmoothing;
newSource.videoSources = self.videoSources;
for(NSObject <CSCaptureSourceProtocolPrivate> *vsrc in newSource.videoSources)
for(NSObject <CSCaptureSourceProtocol> *vsrc in newSource.videoSources)
{
[newSource registerVideoInput:vsrc];
}
@ -628,7 +627,7 @@ static NSArray *_sourceTypes = nil;
return [self.sourceLayout.rootLayer convertRect:self.layer.frame fromLayer:self.layer.superlayer];
}
-(void) registerVideoInput:(NSObject<CSCaptureSourceProtocolPrivate> *)forInput
-(void) registerVideoInput:(NSObject<CSCaptureSourceProtocol> *)forInput
{
forInput.inputSource = self;
forInput.isLive = self.is_live;
@ -638,7 +637,7 @@ static NSArray *_sourceTypes = nil;
}
-(void)deregisterVideoInput:(NSObject<CSCaptureSourceProtocolPrivate> *)forInput
-(void)deregisterVideoInput:(NSObject<CSCaptureSourceProtocol> *)forInput
{
if (!forInput)
{
@ -2499,14 +2498,14 @@ static NSArray *_sourceTypes = nil;
}
-(void) setDirectVideoInput:(NSObject <CSCaptureSourceProtocolPrivate> *)videoInput
-(void) setDirectVideoInput:(NSObject <CSCaptureSourceProtocol> *)videoInput
{
if (_videoInput)
{
[self deregisterVideoInput:self.videoInput];
}
_videoInput = (NSObject<CSCaptureSourceProtocolPrivate,CSCaptureBaseInputFrameTickProtocol> *)videoInput;
_videoInput = (CSCaptureBase<CSCaptureSourceProtocol,CSCaptureBaseInputFrameTickProtocol> *)videoInput;
_selectedVideoType = videoInput.instanceLabel;
@ -2530,7 +2529,7 @@ static NSArray *_sourceTypes = nil;
[self deregisterVideoInput:self.videoInput];
}
NSObject <CSCaptureSourceProtocolPrivate,CSCaptureBaseInputFrameTickProtocol> *newCaptureSession;
NSObject <CSCaptureSourceProtocol,CSCaptureBaseInputFrameTickProtocol> *newCaptureSession;
Class captureClass = [pluginMap objectForKey:selectedVideoType];
newCaptureSession = [[captureClass alloc] init];
@ -3531,7 +3530,7 @@ static NSArray *_sourceTypes = nil;
-(void)setClonedFromInput:(InputSource *)clonedFromInput
{
NSObject <CSCaptureSourceProtocolPrivate,CSCaptureBaseInputFrameTickProtocol>*fromInput = clonedFromInput.videoInput;
CSCaptureBase <CSCaptureSourceProtocol, CSCaptureBaseInputFrameTickProtocol>*fromInput = clonedFromInput.videoInput;
if (self.videoInput)
{

View file

@ -225,7 +225,7 @@
[self.previewView stopHighlightingAllSources];
for (NSObject <CSInputSourceProtocol> *src in self.sourceListViewController.selectedObjects)
{
[self.previewView highlightSource:src];
[self.previewView highlightSource:(InputSource *)src];
}
}
}

View file

@ -617,7 +617,7 @@
CFAbsoluteTime time_now = CFAbsoluteTimeGetCurrent();
int f_output_framecnt;
int f_output_bytes;
NSUInteger f_output_bytes;
f_output_framecnt = self.ffmpeg_out.output_framecnt;
f_output_bytes = self.ffmpeg_out.output_bytes;

View file

@ -13,7 +13,7 @@
@property (assign) BOOL errored;
@property (assign) int output_framecnt;
@property (assign) int output_bytes;
@property (assign) NSUInteger output_bytes;
@property (readonly) NSUInteger buffered_frame_count;
@property (assign) NSUInteger buffered_frame_size;
@property (assign) int framerate;

View file

@ -12,7 +12,7 @@
@property (assign) BOOL errored;
@property (assign) int output_framecnt;
@property (assign) int output_bytes;
@property (assign) NSUInteger output_bytes;
@property (readonly) NSUInteger buffered_frame_count;
@property (assign) NSUInteger buffered_frame_size;
@property (assign) int framerate;

View file

@ -18,6 +18,8 @@
+(NSImage *)serviceImage;
-(NSObject<CSOutputWriterProtocol> *)createOutput;
@property (assign) bool isReady;
-(void)prepareForStreamStart;
@end

View file

@ -11,7 +11,7 @@
@protocol CSStreamServiceProtocol <NSObject, NSCoding>
@property bool isReady;
@property (assign) bool isReady;
-(NSViewController *)getConfigurationView;
-(NSString *)getServiceDestination;

View file

@ -18,7 +18,6 @@
}
@property bool isReady;
@property (strong) NSArray *twitchServers;
@property (strong) NSString *streamKey;

View file

@ -18,7 +18,6 @@
}
@property bool isReady;
@property (assign) NSString *streamKey;