1.9 imports were sometimes causing the live layout to be a reference to one of the 'normal' layouts, which broke preview/edits. Detect this condition and make a copy instead

This commit is contained in:
Zakk 2015-11-28 05:53:32 -05:00
parent 1ef44b9f84
commit d13a237af9
15 changed files with 31 additions and 696 deletions

View file

@ -187,7 +187,6 @@
34C67B8E1A2E69F60012DC1B /* CSHitboxStreamServicePlugin.bundle in Copy Files */ = {isa = PBXBuildFile; fileRef = 34C67B781A2D7B6A0012DC1B /* CSHitboxStreamServicePlugin.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
34C680A119DD06E800413468 /* CSSyphonInjectExtraPlugin.bundle in Copy Files */ = {isa = PBXBuildFile; fileRef = 34C6808C19DD01C400413468 /* CSSyphonInjectExtraPlugin.bundle */; };
34C6C3BF15FB5B440018A18B /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34C6C3BE15FB5B440018A18B /* OpenGL.framework */; };
34CFE49D18F1459600092C6A /* AudioMixer.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34CFE49C18F1459600092C6A /* AudioMixer.xib */; };
34CFE4A018F154DD00092C6A /* AVFChannelManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 34CFE49F18F154DD00092C6A /* AVFChannelManager.m */; };
34CFE4A118F154DD00092C6A /* AVFChannelManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 34CFE49F18F154DD00092C6A /* AVFChannelManager.m */; };
34CFE4A418F1992A00092C6A /* AVFAudioChannel.m in Sources */ = {isa = PBXBuildFile; fileRef = 34CFE4A318F1992A00092C6A /* AVFAudioChannel.m */; };
@ -197,7 +196,6 @@
34D2D5771A547C35001004E5 /* CSTextCaptureViewControllerBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 34D2D5761A547C35001004E5 /* CSTextCaptureViewControllerBase.m */; };
34D2D5781A547C35001004E5 /* CSTextCaptureViewControllerBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 34D2D5761A547C35001004E5 /* CSTextCaptureViewControllerBase.m */; };
34D2D5B41A548B68001004E5 /* CSNowPlayingPlugin.bundle in Copy Files */ = {isa = PBXBuildFile; fileRef = 34D2D59E1A54857D001004E5 /* CSNowPlayingPlugin.bundle */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
34D4351B198BE3B700266169 /* NewLayoutPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D4351A198BE3B700266169 /* NewLayoutPanel.xib */; };
34D6580219B342E00012E32B /* CSTwitchStreamServicePlugin.bundle in Copy Files */ = {isa = PBXBuildFile; fileRef = 34AFC32B19B0AD360007C07B /* CSTwitchStreamServicePlugin.bundle */; };
34D6580319B342E70012E32B /* CSFileStreamServicePlugin.bundle in Copy Files */ = {isa = PBXBuildFile; fileRef = 34AFC33019B0AD500007C07B /* CSFileStreamServicePlugin.bundle */; };
34D6581819B387DE0012E32B /* AppDelegate+AppDelegate_ScriptingAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 34D6581719B387DE0012E32B /* AppDelegate+AppDelegate_ScriptingAdditions.m */; };
@ -762,7 +760,6 @@
34C67B731A2D7B690012DC1B /* CSHitboxStreamServicePlugin.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CSHitboxStreamServicePlugin.xcodeproj; path = StreamServicePlugins/CSHitboxStreamServicePlugin/CSHitboxStreamServicePlugin.xcodeproj; sourceTree = "<group>"; };
34C6807E19DD01C300413468 /* CSSyphonInjectExtraPlugin.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CSSyphonInjectExtraPlugin.xcodeproj; path = ExtraPlugins/CSSyphonInjectExtraPlugin/CSSyphonInjectExtraPlugin.xcodeproj; sourceTree = "<group>"; };
34C6C3BE15FB5B440018A18B /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
34CFE49C18F1459600092C6A /* AudioMixer.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = AudioMixer.xib; path = Interface/AudioMixer.xib; sourceTree = "<group>"; };
34CFE49E18F154DD00092C6A /* AVFChannelManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AVFChannelManager.h; sourceTree = "<group>"; };
34CFE49F18F154DD00092C6A /* AVFChannelManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AVFChannelManager.m; sourceTree = "<group>"; };
34CFE4A218F1992A00092C6A /* AVFAudioChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AVFAudioChannel.h; sourceTree = "<group>"; };
@ -772,7 +769,6 @@
34D2D5751A547C35001004E5 /* CSTextCaptureViewControllerBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSTextCaptureViewControllerBase.h; path = PluginHeaders/CSTextCaptureViewControllerBase.h; sourceTree = "<group>"; };
34D2D5761A547C35001004E5 /* CSTextCaptureViewControllerBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSTextCaptureViewControllerBase.m; sourceTree = "<group>"; };
34D2D5991A54857C001004E5 /* CSNowPlayingPlugin.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CSNowPlayingPlugin.xcodeproj; path = CapturePlugins/CSNowPlayingPlugin/CSNowPlayingPlugin.xcodeproj; sourceTree = "<group>"; };
34D4351A198BE3B700266169 /* NewLayoutPanel.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = NewLayoutPanel.xib; path = Interface/NewLayoutPanel.xib; sourceTree = "<group>"; };
34D43550198DCE3800266169 /* TextureWrapPlugin.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = TextureWrapPlugin.xcodeproj; path = ImageUnitPlugins/TextureWrapPlugin/TextureWrapPlugin.xcodeproj; sourceTree = "<group>"; };
34D657F519B33DCF0012E32B /* CSPluginFactoryProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSPluginFactoryProtocol.h; path = PluginHeaders/CSPluginFactoryProtocol.h; sourceTree = "<group>"; };
34D6581619B387DE0012E32B /* AppDelegate+AppDelegate_ScriptingAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "AppDelegate+AppDelegate_ScriptingAdditions.h"; path = "ScriptingAddditions/AppDelegate+AppDelegate_ScriptingAdditions.h"; sourceTree = "<group>"; };
@ -1227,7 +1223,6 @@
isa = PBXGroup;
children = (
34ABEF3B17C0C2CB00AA5E62 /* advancedPrefPanel.xib */,
34CFE49C18F1459600092C6A /* AudioMixer.xib */,
344825E41B253D6900AF9EAC /* CAMultiAudioMatrixCell.h */,
344825E51B253D6900AF9EAC /* CAMultiAudioMatrixCell.m */,
34BD1E601B2481C20015CBEC /* CAMultiAudioMatrixMixerWindowController.h */,
@ -1254,7 +1249,6 @@
347B14DB198492D900DC7DF0 /* InputPopupControllerViewController.xib */,
344988121893CF0500044259 /* LogWindow.xib */,
340FE4B615F3417E00E4CE4E /* MainMenu.xib */,
34D4351A198BE3B700266169 /* NewLayoutPanel.xib */,
34348C2919BDBDC000A122C2 /* PluginManagerWindowController.xib */,
349461441AAD73BC00F28883 /* TestView.xib */,
34F52A241BC1CE2700662911 /* CSLayoutCollectionItem.h */,
@ -2070,7 +2064,6 @@
340FE4B215F3417E00E4CE4E /* Credits.rtf in Resources */,
340FE4B815F3417E00E4CE4E /* MainMenu.xib in Resources */,
34DA1D3F1BF823E700132486 /* CSNewOutputWindowController.xib in Resources */,
34D4351B198BE3B700266169 /* NewLayoutPanel.xib in Resources */,
34F1EB931BCCA41F00B38E6C /* CSLayoutEditWindowController.xib in Resources */,
342B33B61980771200492CB7 /* line.vtsh in Resources */,
34938EEF1AE4D24200F3B1CF /* CSFilterChooserWindowController.xib in Resources */,
@ -2078,7 +2071,6 @@
34B5FCE119BF1C3F00F67D19 /* CreateLayoutViewController.xib in Resources */,
3479A9971A9007DD00A524F0 /* CocoaSplit.sdef in Resources */,
340D8C971959C7C100BE5144 /* CompressionSettingsPanel.xib in Resources */,
34CFE49D18F1459600092C6A /* AudioMixer.xib in Resources */,
344988131893CF0500044259 /* LogWindow.xib in Resources */,
34D696FC1871B8F700B50EB6 /* Defaults.plist in Resources */,
34348C2B19BDBDC000A122C2 /* PluginManagerWindowController.xib in Resources */,

View file

@ -20,7 +20,6 @@
-(instancetype)initWithDevice:(AVCaptureDevice *)avDevice withFormat:(AudioStreamBasicDescription *)withFormat;
-(void)resetFormat:(AudioStreamBasicDescription *)format;
-(const AudioStreamBasicDescription *)deviceAudioDescription;
@end

View file

@ -9,5 +9,7 @@
#import "CSCaptureBase+TimerDelegate.h"
@implementation CSCaptureBase (TimerDelegate)
@dynamic timerDelegateCtx;
@dynamic timerDelegate;
@end

View file

@ -226,7 +226,9 @@
-(CALayer *)createNewLayer
{
return [CALayer layer];
CALayer *newLayer = [CALayer layer];
return newLayer;
}

View file

@ -168,7 +168,6 @@
GLfloat outline_verts[8];
GLfloat snapx_verts[4];
GLfloat snapy_verts[4];

View file

@ -55,27 +55,10 @@ void VideoCompressorReceiveFrame(void *, void *, OSStatus , VTEncodeInfoFlags ,
bool _stagingHidden;
NSArray *_inputIdentifiers;
CIFilter *_compositeFilter;
CIImage *_backgroundImage;
CVDisplayLinkRef _displayLink;
NSRect _stagingFrame;
NSRect _liveFrame;
id _audio_capture_session;
CFAbsoluteTime _lastcvtime;
NSThread *mainThread;
NSTimer *_captureTimer;
NSTimer *_idleTimer;
BOOL _cmdLineInfo;
NSScreen *_fullscreenOn;
@ -102,39 +85,25 @@ void VideoCompressorReceiveFrame(void *, void *, OSStatus , VTEncodeInfoFlags ,
double _frame_time;
double _start_time;
CMSampleBufferRef audioRingBuffer[512];
size_t audioWritePosition;
size_t audioLastReadPosition;
NSMutableArray *audioBuffer;
NSMutableArray *videoBuffer;
dispatch_source_t _log_source;
int _saved_stderr;
bool _last_running_value;
CIFilter *_cifilter;
NSOpenGLContext *_ogl_ctx;
CGLContextObj _cgl_ctx;
float _min_render_time;
float _max_render_time;
float _avg_render_time;
float _render_time_total;
int _renderedFrames;
NSTask *_renderTask;
NSConnection *_remoteConn;
id _renderServer;
NSPopover *_layoutpopOver;
NSPopover *_animatepopOver;
NSMutableArray *_screensCache;
NSMutableArray *_layoutWindows;
}
@ -167,10 +136,6 @@ void VideoCompressorReceiveFrame(void *, void *, OSStatus , VTEncodeInfoFlags ,
@property (strong) CAMultiAudioEngine *multiAudioEngine;
@property (assign) bool renderOnIntegratedGPU;
@property (strong) LayoutPreviewWindowController *layoutPreviewController;
@property (strong) PluginManagerWindowController *pluginManagerController;
@property (strong) CSMidiManagerWindowController *midiManagerController;
@ -178,19 +143,14 @@ void VideoCompressorReceiveFrame(void *, void *, OSStatus , VTEncodeInfoFlags ,
@property (strong) NSString *renderStatsString;
@property (strong) NSString *layoutPanelName;
@property (strong) NSMutableArray *sourceLayouts;
@property (strong) SourceLayout *selectedLayout;
@property (strong) SourceLayout *stagingLayout;
@property (weak) IBOutlet NSView *stagingControls;
@property (weak) IBOutlet NSView *goLiveControls;
@property (weak) IBOutlet NSSplitView *canvasSplitView;
@property (strong) id<h264Compressor> videoCompressor;
@property (strong) AVFAudioCapture *audioCaptureSession;
@property (assign) double captureFPS;
@ -198,15 +158,8 @@ void VideoCompressorReceiveFrame(void *, void *, OSStatus , VTEncodeInfoFlags ,
@property (assign) int audioSamplerate;
@property (assign) double min_delay;
@property (assign) double max_delay;
@property (assign) double avg_delay;
@property (assign) long long compressedFrameCount;
@property (assign) NSMutableArray *streamPanelDestinations;
@property (strong) NSUserDefaults *cmdLineArgs;
@property (assign) double audio_adjust;
@property (assign) CFAbsoluteTime last_dl_time;
@property (weak) IBOutlet NSPopover *editorPopover;
@ -214,9 +167,6 @@ void VideoCompressorReceiveFrame(void *, void *, OSStatus , VTEncodeInfoFlags ,
@property (weak) IBOutlet PreviewView *stagingCtx;
@property (unsafe_unretained) IBOutlet NSObjectController *objectController;
@property (strong) IBOutlet NSObjectController *compressSettingsController;
@property (strong) IBOutlet NSObjectController *outputPanelController;
@property (strong) IBOutlet NSObjectController *layoutPanelController;
@property (readonly) NSArray *layoutSortDescriptors;
@ -257,68 +207,34 @@ void VideoCompressorReceiveFrame(void *, void *, OSStatus , VTEncodeInfoFlags ,
- (bool)deleteLayout:(SourceLayout *)toDelete;
- (IBAction)addStreamingService:(id)sender;
- (IBAction)streamButtonPushed:(id)sender;
- (IBAction)closeAdvancedPrefPanel:(id)sender;
- (IBAction)openAdvancedPrefPanel:(id)sender;
- (IBAction)openCreateSheet:(id)sender;
- (IBAction)openVideoAdvanced:(id)sender;
- (IBAction)closeVideoAdvanced:(id)sender;
- (void)openCompressPanel:(bool)doEdit;
- (IBAction)newCompressPanel;
- (IBAction)editCompressPanel;
-(IBAction)deleteCompressorPanel;
- (IBAction)closeCompressPanel;
- (IBAction)addInputSource:(id)sender;
- (IBAction)openAudioMixerPanel:(id)sender;
- (IBAction)closeAudioMixerPanel:(id)sender;
- (IBAction)closeCreateSheet:(id)sender;
- (IBAction)openLayoutPanel:(id)sender;
@property (strong) NSString *compressTabLabel;
@property (weak) IBOutlet NSDictionaryController *compressController;
@property (strong) id<h264Compressor> editingCompressor;
@property (strong) NSString *editingCompressorKey;
@property (strong) NSMutableDictionary *compressors;
@property (strong) id<h264Compressor> selectedCompressor;
@property (weak) NSString *selectedVideoType;
@property (strong) NSString *selectedCompressorType;
@property (strong) NSArray *videoTypes;
@property (strong) NSArray *compressorTypes;
@property (strong) NSMutableArray *ffmpeg_objects;
@property (weak) NSString *streamingServiceServer;
@property (weak) NSString *streamingServiceKey;
@property (weak) NSString *streamingDestination;
@property (weak) NSString *selectedDestinationType;
@property (weak) IBOutlet NSTabView *compressTabs;
@property (strong) IBOutlet NSWindow *createSheet;
@property (strong) IBOutlet NSWindow *advancedVideoPanel;
@property (strong) IBOutlet NSWindow *compressPanel;
@property (strong) IBOutlet NSWindow *advancedPrefPanel;
@property (strong) IBOutlet NSWindow *logWindow;
@property (strong) IBOutlet NSWindow *audioMixerPanel;
@property (strong) IBOutlet NSWindow *outputEditPanel;
@property (strong) IBOutlet NSWindow *layoutPanel;
@property (strong) CSNewOutputWindowController *addOutputWindowController;
@property (strong) CompressionSettingsPanelController *compressionEditPanelController;
@ -330,27 +246,13 @@ void VideoCompressorReceiveFrame(void *, void *, OSStatus , VTEncodeInfoFlags ,
- (IBAction)openLogWindow:(id)sender;
@property (readonly) NSArray *destinationTypes;
@property (strong) NSMutableArray *captureDestinations;
@property (weak) NSIndexSet *selectedCaptureDestinations;
@property (assign) int selectedTabIndex;
@property (assign) BOOL showPreview;
@property (assign) int captureVideoAverageBitrate;
@property (assign) int captureVideoMaxBitrate;
@property (assign) int captureVideoMaxKeyframeInterval;
@property (strong) NSString *x264tune;
@property (strong) NSString *x264preset;
@property (strong) NSString *x264profile;
@property (assign) int x264crf;
@property (strong) NSMutableArray *x264tunes;
@property (strong) NSMutableArray *x264presets;
@property (strong) NSMutableArray *x264profiles;
@property (strong) NSString *vtcompressor_profile;
@property (assign) BOOL videoCBR;
@property (assign) int maxOutputPending;
@property (assign) int maxOutputDropped;
@ -358,11 +260,6 @@ void VideoCompressorReceiveFrame(void *, void *, OSStatus , VTEncodeInfoFlags ,
@property (assign) BOOL captureRunning;
@property (strong) NSString *resolutionOption;
@property (strong) OutputDestination *editDestination;
@property (assign) int captureHeight;
@property (assign) int captureWidth;
@ -376,18 +273,11 @@ void VideoCompressorReceiveFrame(void *, void *, OSStatus , VTEncodeInfoFlags ,
@property (weak) NSArray *audioCaptureDevices;
@property (strong) FFMpegTask *ffmpeg_obj;
@property (strong) AVAssetWriterInput *video_writer;
@property (strong) AVAssetWriterInput *audio_writer;
@property (weak) CSAbstractCaptureDevice *selectedVideoCapture;
@property (readonly) AVCaptureDevice *selectedAudioCapture;
@property (weak) NSString *ffmpeg_path;
@property NSString *imageDirectory;
@property (strong) NSDictionary *extraSaveData;
@ -417,7 +307,6 @@ void VideoCompressorReceiveFrame(void *, void *, OSStatus , VTEncodeInfoFlags ,
- (void)loadSettings;
- (bool) startStream;
- (void) stopStream;
- (void) loadCmdlineSettings:(NSUserDefaults *)cmdargs;
-(void)setExtraData:(id)saveData forKey:(NSString *)forKey;
-(id)getExtraData:(NSString *)forkey;
-(CVPixelBufferRef)currentFrame;
@ -438,14 +327,11 @@ void VideoCompressorReceiveFrame(void *, void *, OSStatus , VTEncodeInfoFlags ,
-(void)openBuiltinLayoutPopover:(NSView *)sender spawnRect:(NSRect)spawnRect forLayout:(SourceLayout *)layout;
- (IBAction)stagingAnimationSelected:(id)sender;
@property (weak) IBOutlet NSTableView *outputTableView;
- (IBAction)outputEditClicked:(id)sender;
@property (weak) IBOutlet NSArrayController *sourceLayoutsArrayController;
@property (weak) IBOutlet NSTableView *mainSourceLayoutTableView;
@property (weak) IBOutlet NSTableView *stagingSourceLayoutTableView;
-(void)setupLogging;
+(CSAnimationRunnerObj *) sharedAnimationObj;

View file

@ -46,11 +46,6 @@
-(IBAction)mainCopyLayoutClicked:(id)sender
{
[self cloneSelectedSourceLayout:self.mainSourceLayoutTableView];
}
-(void) cloneSelectedSourceLayout:(NSTableView *)fromTable
{
@ -395,68 +390,9 @@
- (IBAction)addInputSource:(id)sender
{
if (self.selectedLayout)
{
InputSource *newSource = [[InputSource alloc] init];
[self.selectedLayout addSource:newSource];
[self.previewCtx spawnInputSettings:newSource atRect:NSZeroRect];
}
}
- (IBAction)openAudioMixerPanel:(id)sender {
if (!self.audioMixerPanel)
{
[[NSBundle mainBundle] loadNibNamed:@"AudioMixer" owner:self topLevelObjects:nil];
[NSApp beginSheet:self.audioMixerPanel modalForWindow:[NSApplication sharedApplication].mainWindow modalDelegate:self didEndSelector:NULL contextInfo:NULL];
}
}
- (IBAction)closeAudioMixerPanel:(id)sender {
[NSApp endSheet:self.audioMixerPanel];
[self.audioMixerPanel close];
self.audioMixerPanel = nil;
}
-(IBAction)openVideoAdvanced:(id)sender
{
NSString *panelName;
if (!self.advancedVideoPanel)
{
panelName = [NSString stringWithFormat:@"%@AdvancedPanel", self.selectedVideoType];
[[NSBundle mainBundle] loadNibNamed:panelName owner:self topLevelObjects:nil];
[NSApp beginSheet:self.advancedVideoPanel modalForWindow:[NSApplication sharedApplication].mainWindow modalDelegate:self didEndSelector:NULL contextInfo:NULL];
}
}
-(IBAction)closeVideoAdvanced:(id)sender
{
[NSApp endSheet:self.advancedVideoPanel];
[self.advancedVideoPanel close];
self.advancedVideoPanel = nil;
}
-(void)openOutputSheet:(OutputDestination *)toEdit
{
self.addOutputWindowController = [[CSNewOutputWindowController alloc] init];
@ -492,70 +428,6 @@
}
-(AVCaptureDevice *)selectedAudioCapture
{
if (self.audioCaptureSession)
{
return self.audioCaptureSession.activeAudioDevice;
}
return nil;
}
-(void) selectedAudioCaptureFromID:(NSString *)uniqueID
{
if (uniqueID)
{
self.audioCaptureSession.activeAudioDevice = [AVCaptureDevice deviceWithUniqueID:uniqueID];
}
}
-(void) createCGLContext
{
NSOpenGLPixelFormatAttribute glAttributes[] = {
NSOpenGLPFANoRecovery,
NSOpenGLPFAAccelerated,
//NSOpenGLPFAAllowOfflineRenderers,
NSOpenGLPFADepthSize, 32,
(NSOpenGLPixelFormatAttribute) 0,0,
(NSOpenGLPixelFormatAttribute) 0
};
if (self.renderOnIntegratedGPU)
{
NSLog(@"RENDERING ON INTELHD!");
glAttributes[5] = NSOpenGLPFARendererID;
glAttributes[6] = kCGLRendererIntelHDID;
}
NSOpenGLPixelFormat *pixelFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:glAttributes];
if (!pixelFormat)
{
return;
}
_ogl_ctx = [[NSOpenGLContext alloc] initWithFormat:pixelFormat shareContext:nil];
if (!_ogl_ctx)
{
return;
}
_cgl_ctx = [_ogl_ctx CGLContextObj];
}
-(void)buildScreensInfo:(NSNotification *)notification
{
@ -825,10 +697,7 @@
audioLastReadPosition = 0;
audioWritePosition = 0;
audioBuffer = [[NSMutableArray alloc] init];
videoBuffer = [[NSMutableArray alloc] init];
@ -850,8 +719,6 @@
self.showPreview = YES;
self.videoTypes = @[@"Desktop", @"AVFoundation", @"QTCapture", @"Syphon", @"Image", @"Text"];
mach_timebase_info(&_mach_timebase);
@ -1105,14 +972,6 @@
}
-(NSArray *)destinationTypes
{
NSMutableDictionary *servicePlugins = [[CSPluginLoader sharedPluginLoader] streamServicePlugins];
return servicePlugins.allKeys;
}
-(void)setAudioSamplerate:(int)audioSamplerate
{
@ -1341,18 +1200,14 @@
[saveRoot setValue: [NSNumber numberWithInt:self.audioBitrate] forKey:@"audioBitrate"];
[saveRoot setValue: [NSNumber numberWithInt:self.audioSamplerate] forKey:@"audioSamplerate"];
[saveRoot setValue: self.selectedVideoType forKey:@"selectedVideoType"];
[saveRoot setValue: self.selectedAudioCapture.uniqueID forKey:@"audioCaptureID"];
[saveRoot setValue: self.captureDestinations forKey:@"captureDestinations"];
[saveRoot setValue:[NSNumber numberWithFloat:self.audioCaptureSession.previewVolume] forKey:@"previewVolume"];
[saveRoot setValue:[NSNumber numberWithInt:self.maxOutputDropped] forKey:@"maxOutputDropped"];
[saveRoot setValue:[NSNumber numberWithInt:self.maxOutputPending] forKey:@"maxOutputPending"];
[saveRoot setValue:self.resolutionOption forKey:@"resolutionOption"];
[saveRoot setValue:[NSNumber numberWithDouble:self.audio_adjust] forKey:@"audioAdjust"];
[saveRoot setValue: [NSNumber numberWithBool:self.useStatusColors] forKey:@"useStatusColors"];
[saveRoot setValue:self.compressors forKey:@"compressors"];
[saveRoot setValue:self.extraSaveData forKey:@"extraSaveData"];
[saveRoot setValue:[NSNumber numberWithBool:self.renderOnIntegratedGPU] forKey:@"renderOnIntegratedGPU"];
@ -1476,28 +1331,12 @@
NSString *audioID = [saveRoot valueForKey:@"audioCaptureID"];
[self selectedAudioCaptureFromID:audioID];
self.audioCaptureSession.previewVolume = [[saveRoot valueForKey:@"previewVolume"] floatValue];
self.captureFPS = [[saveRoot valueForKey:@"captureFPS"] doubleValue];
self.maxOutputDropped = [[saveRoot valueForKey:@"maxOutputDropped"] intValue];
self.maxOutputPending = [[saveRoot valueForKey:@"maxOutputPending"] intValue];
self.audio_adjust = [[saveRoot valueForKey:@"audioAdjust"] doubleValue];
self.resolutionOption = [saveRoot valueForKey:@"resolutionOption"];
if (!self.resolutionOption)
{
self.resolutionOption = @"None";
}
self.renderOnIntegratedGPU = [[saveRoot valueForKey:@"renderOnIntegratedGPU"] boolValue];
[self createCGLContext];
//mainThread = [[NSThread alloc] initWithTarget:self selector:@selector(newFrameTimed) object:nil];
//[mainThread start];
self.stagingPreviewView.controller = self;
self.livePreviewView.controller = self;
@ -1554,15 +1393,20 @@
SourceLayout *tmpLayout = [saveRoot valueForKey:@"selectedLayout"];
if (tmpLayout)
{
self.selectedLayout = tmpLayout;
// [self.selectedLayout mergeSourceLayout:tmpLayout withLayer:nil];
if (tmpLayout == self.stagingLayout || [self.sourceLayouts containsObject:tmpLayout])
{
SourceLayout *tmpCopy = [tmpLayout copy];
self.selectedLayout = tmpCopy;
} else {
self.selectedLayout = tmpLayout;
}
//[self.selectedLayout mergeSourceLayout:tmpLayout withLayer:nil];
}
tmpLayout = [saveRoot valueForKey:@"stagingLayout"];
if (tmpLayout)
{
self.stagingLayout = tmpLayout;
if (tmpLayout == self.selectedLayout)
if (tmpLayout == self.selectedLayout || [self.sourceLayouts containsObject:tmpLayout])
{
SourceLayout *tmpCopy = [tmpLayout copy];
self.stagingLayout = tmpCopy;
@ -1570,7 +1414,7 @@
self.stagingLayout = tmpLayout;
}
// [self.stagingLayout mergeSourceLayout:tmpLayout withLayer:nil];
//[self.stagingLayout mergeSourceLayout:tmpLayout withLayer:nil];
}
self.inputLibrary = [saveRoot valueForKey:@"inputLibrary"];
@ -1767,14 +1611,11 @@
[self.audioCaptureSession setupAudioCompression];
_frameCount = 0;
_firstAudioTime = kCMTimeZero;
_firstFrameTime = 0;
_compressedFrameCount = 0;
_min_delay = _max_delay = _avg_delay = 0;
return YES;
@ -1787,21 +1628,10 @@
{
if (_cmdLineInfo)
{
printf("%s", [[self buildCmdLineInfo] UTF8String]);
[NSApp performSelector:@selector(terminate:) withObject:nil afterDelay:0.0];
return YES;
}
_frameCount = 0;
_firstAudioTime = kCMTimeZero;
_firstFrameTime = 0;
_compressedFrameCount = 0;
_min_delay = _max_delay = _avg_delay = 0;
if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_8)
{
@ -1858,161 +1688,10 @@
-(NSString *) buildCmdLineInfo
{
NSMutableDictionary *infoDict = [[NSMutableDictionary alloc] init];
NSMutableArray *audioArray = [[NSMutableArray alloc] init];
for (AVCaptureDevice *audioDev in self.audioCaptureDevices)
{
[audioArray addObject:@{@"name": audioDev.localizedName, @"uniqueID": audioDev.uniqueID}];
}
[infoDict setValue:audioArray forKey:@"audioDevices"];
NSMutableDictionary *x264dict = [[NSMutableDictionary alloc] init];
[x264dict setValue:self.x264presets forKey:@"presets"];
[x264dict setValue:self.x264tunes forKey:@"tunes"];
[x264dict setValue:self.x264profiles forKey:@"profiles"];
[infoDict setValue:x264dict forKey:@"x264"];
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:infoDict options:0 error:nil];
return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
}
-(id <h264Compressor>) buildCmdlineCompressor:(NSUserDefaults *)cmdargs
{
id <h264Compressor> newCompressor;
if ([self.selectedCompressorType isEqualToString:@"x264"])
{
x264Compressor *tmpCompressor;
tmpCompressor = [[x264Compressor alloc] init];
tmpCompressor.tune = [cmdargs stringForKey:@"x264tune"];
tmpCompressor.profile = [cmdargs stringForKey:@"x264profile"];
tmpCompressor.preset = [cmdargs stringForKey:@"x264preset"];
tmpCompressor.use_cbr = [cmdargs boolForKey:@"videoCBR"];
tmpCompressor.crf = (int)[cmdargs integerForKey:@"x264crf"];
tmpCompressor.vbv_maxrate = (int)[cmdargs integerForKey:@"captureVideoAverageBitrate"];
tmpCompressor.vbv_buffer = (int)[cmdargs integerForKey:@"captureVideoMaxBitrate"];
tmpCompressor.keyframe_interval = (int)[cmdargs integerForKey:@"captureVideoMaxKeyframeInterval"];
newCompressor = tmpCompressor;
} else if ([self.selectedCompressorType isEqualToString:@"AppleVTCompressor"]) {
AppleVTCompressor *tmpCompressor;
tmpCompressor = [[AppleVTCompressor alloc] init];
tmpCompressor.average_bitrate = (int)[cmdargs integerForKey:@"captureVideoAverageBitrate"];
tmpCompressor.max_bitrate = (int)[cmdargs integerForKey:@"captureVideoMaxBitrate"];
tmpCompressor.keyframe_interval = (int)[cmdargs integerForKey:@"captureVideoMaxKeyframeInterval"];
newCompressor = tmpCompressor;
} else {
newCompressor = nil;
}
return newCompressor;
}
-(void) loadCmdlineSettings:(NSUserDefaults *)cmdargs
{
if ([cmdargs objectForKey:@"dumpInfo"])
{
_cmdLineInfo = YES;
} else {
_cmdLineInfo = NO;
}
if ([cmdargs objectForKey:@"captureWidth"])
{
self.captureWidth = (int)[cmdargs integerForKey:@"captureWidth"];
}
if ([cmdargs objectForKey:@"captureHeight"])
{
self.captureHeight = (int)[cmdargs integerForKey:@"captureHeight"];
}
if ([cmdargs objectForKey:@"audioBitrate"])
{
self.audioBitrate = (int)[cmdargs integerForKey:@"audioBitrate"];
}
if ([cmdargs objectForKey:@"audioSamplerate"])
{
self.audioSamplerate = (int)[cmdargs integerForKey:@"audioSamplerate"];
}
if ([cmdargs objectForKey:@"selectedVideoType"])
{
self.selectedVideoType = [cmdargs stringForKey:@"selectedVideoType"];
}
/*
if ([cmdargs objectForKey:@"videoCaptureID"])
{
NSString *videoID = [cmdargs stringForKey:@"videoCaptureID"];
[self selectedVideoCaptureFromID:videoID];
}
*/
if ([cmdargs objectForKey:@"audioCaptureID"])
{
NSString *audioID = [cmdargs stringForKey:@"audioCaptureID"];
[self selectedAudioCaptureFromID:audioID];
}
if ([cmdargs objectForKey:@"captureFPS"])
{
self.captureFPS = [cmdargs doubleForKey:@"captureFPS"];
}
if ([cmdargs objectForKey:@"outputDestinations"])
{
if (!self.captureDestinations)
{
self.captureDestinations = [[NSMutableArray alloc] init];
}
NSArray *outputs = [cmdargs arrayForKey:@"outputDestinations"];
for (NSString *outstr in outputs)
{
OutputDestination *newDest = [[OutputDestination alloc] initWithType:@"file"];
newDest.active = YES;
newDest.destination = outstr;
newDest.settingsController = self;
[[self mutableArrayValueForKey:@"captureDestinations"] addObject:newDest];
}
}
}
- (void)stopStream
{
self.videoCompressor = nil;
self.selectedCompressor = nil;
self.captureRunning = NO;
@ -2045,7 +1724,6 @@
[[NSProcessInfo processInfo] endActivity:_activity_token];
}
//[self.audioCaptureSession stopAudioCompression];
self.multiAudioEngine.encoder = nil;
[[NSNotificationCenter defaultCenter] postNotificationName:CSNotificationStreamStopped object:self userInfo:nil];
@ -2598,7 +2276,7 @@
{
NSUInteger key_idx = [@[@"captureWidth", @"captureHeight", @"captureFPS",
@"captureVideoAverageBitrate", @"audioBitrate", @"audioSamplerate", @"captureVideoMaxBitrate", @"captureVideoMaxKeyframeInterval"] indexOfObject:key];
@"audioBitrate", @"audioSamplerate"] indexOfObject:key];
if (key_idx != NSNotFound)
{
@ -3238,8 +2916,6 @@
[self.canvasSplitView display];
self.stagingControls.hidden = YES;
self.goLiveControls.hidden = YES;
self.livePreviewView.viewOnly = NO;
self.activePreviewView = self.livePreviewView;
_stagingHidden = YES;
@ -3277,8 +2953,6 @@
[self.canvasSplitView adjustSubviews];
[self.canvasSplitView display];
self.stagingControls.hidden = NO;
self.goLiveControls.hidden = NO;
self.livePreviewView.viewOnly = YES;
_stagingHidden = NO;
self.activePreviewView = self.stagingPreviewView;

View file

@ -34,6 +34,12 @@
return self;
}
-(instancetype)copyWithZone:(NSZone *)zone
{
return [[self.class allocWithZone:zone] init];
}
-(bool) validate:(NSError **)therror
{

View file

@ -479,8 +479,7 @@
} else {
//what did we learn today? Don't believe shit you read in forum posts...
//_av_codec_ctx->rc_buffer_size = ((1/self.settingsController.captureFPS)*self.settingsController.captureVideoAverageBitrate)*1000;
_av_codec_ctx->bit_rate = self.vbv_maxrate*1000;

View file

@ -24,18 +24,8 @@
@property (readonly) int audioSamplerate;
@property (assign) BOOL captureRunning;
@property int captureVideoMaxKeyframeInterval;
@property int captureVideoMaxBitrate;
@property int captureVideoAverageBitrate;
@property NSString *x264preset;
@property NSString *x264profile;
@property NSString *x264tune;
@property NSString *vtcompressor_profile;
@property int x264crf;
@property BOOL videoCBR;
@property (assign) int maxOutputPending;
@property (assign) int maxOutputDropped;
@property NSString *imageDirectory;
@property (strong) id <h264Compressor> selectedCompressor;
@property (strong) NSMutableDictionary *compressors;

View file

@ -1,122 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="8191" systemVersion="15B42" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="8191"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="CaptureController">
<connections>
<outlet property="audioMixerPanel" destination="QvC-M9-y7g" id="GGm-fw-9FH"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="QvC-M9-y7g">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="562" height="341"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1057"/>
<view key="contentView" id="EiT-Mj-1SZ">
<rect key="frame" x="0.0" y="0.0" width="562" height="341"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<scrollView autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0Re-18-1Xg">
<rect key="frame" x="20" y="75" width="522" height="246"/>
<clipView key="contentView" id="M7R-Kt-NcY">
<rect key="frame" x="1" y="0.0" width="520" height="245"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" headerView="SUt-C4-6DY" id="SyB-r7-aAt">
<rect key="frame" x="0.0" y="0.0" width="520" height="222"/>
<autoresizingMask key="autoresizingMask"/>
<animations/>
<size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
<tableColumn width="64" minWidth="10" maxWidth="3.4028234663852886e+38" id="I9w-7Q-Mpg">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Mute">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
</tableHeaderCell>
<buttonCell key="dataCell" type="check" bezelStyle="regularSquare" imagePosition="left" inset="2" id="Qo8-We-Azm">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<connections>
<binding destination="Stw-Um-02D" name="value" keyPath="arrangedObjects.enabled" id="fvH-Q3-9jX">
<dictionary key="options">
<string key="NSValueTransformerName">NSNegateBoolean</string>
</dictionary>
</binding>
</connections>
</tableColumn>
<tableColumn width="433" minWidth="40" maxWidth="1000" id="peM-UJ-o5i">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Volume">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/>
</tableHeaderCell>
<sliderCell key="dataCell" state="on" alignment="left" maxValue="2" doubleValue="2" tickMarkPosition="above" sliderType="linear" id="Ekv-mz-1xq"/>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<connections>
<binding destination="Stw-Um-02D" name="value" keyPath="arrangedObjects.volume" id="buw-uT-HZg"/>
</connections>
</tableColumn>
</tableColumns>
<connections>
<binding destination="Stw-Um-02D" name="content" keyPath="arrangedObjects" id="Zfd-w4-xz0"/>
</connections>
</tableView>
</subviews>
<animations/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</clipView>
<animations/>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="JP8-w8-DV3">
<autoresizingMask key="autoresizingMask"/>
<animations/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="UMp-c4-2f9">
<autoresizingMask key="autoresizingMask"/>
<animations/>
</scroller>
<tableHeaderView key="headerView" id="SUt-C4-6DY">
<rect key="frame" x="0.0" y="0.0" width="520" height="23"/>
<autoresizingMask key="autoresizingMask"/>
<animations/>
</tableHeaderView>
</scrollView>
<button verticalHuggingPriority="750" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="cJk-8t-nSw">
<rect key="frame" x="14" y="27" width="58" height="32"/>
<animations/>
<buttonCell key="cell" type="push" title="Ok" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="JE4-oO-A9Z">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="closeAudioMixerPanel:" target="-2" id="toz-5k-9Ma"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstItem="0Re-18-1Xg" firstAttribute="top" secondItem="EiT-Mj-1SZ" secondAttribute="top" constant="20" symbolic="YES" id="0AC-mE-RJU"/>
<constraint firstAttribute="bottom" secondItem="cJk-8t-nSw" secondAttribute="bottom" constant="34" id="3R1-Ha-bEt"/>
<constraint firstAttribute="trailing" secondItem="0Re-18-1Xg" secondAttribute="trailing" constant="20" symbolic="YES" id="ROo-eg-xgE"/>
<constraint firstItem="0Re-18-1Xg" firstAttribute="leading" secondItem="EiT-Mj-1SZ" secondAttribute="leading" constant="20" symbolic="YES" id="Yie-e6-B7c"/>
<constraint firstItem="cJk-8t-nSw" firstAttribute="top" secondItem="0Re-18-1Xg" secondAttribute="bottom" constant="20" symbolic="YES" id="cCD-C2-RvL"/>
<constraint firstItem="cJk-8t-nSw" firstAttribute="leading" secondItem="0Re-18-1Xg" secondAttribute="leading" id="vaX-Jx-D2I"/>
</constraints>
<animations/>
</view>
</window>
<arrayController id="Stw-Um-02D" userLabel="AudioChannelController">
<connections>
<binding destination="-2" name="contentArray" keyPath="self.audioCaptureSession.audioChannelManager.channels" id="i8c-uP-9MR"/>
</connections>
</arrayController>
</objects>
</document>

View file

@ -1,82 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="8191" systemVersion="15B42" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="8191"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="CaptureController">
<connections>
<outlet property="layoutPanel" destination="QvC-M9-y7g" id="gJv-dW-4Bb"/>
<outlet property="layoutPanelController" destination="F7N-NF-YHW" id="bGt-uM-sGH"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="QvC-M9-y7g">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="392" height="189"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1057"/>
<view key="contentView" id="EiT-Mj-1SZ">
<rect key="frame" x="0.0" y="0.0" width="392" height="189"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ggh-3O-7K1">
<rect key="frame" x="18" y="152" width="41" height="17"/>
<animations/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Name" id="e8O-EP-Jf6">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="G20-Fv-PQp">
<rect key="frame" x="65" y="149" width="294" height="22"/>
<animations/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="AvX-Rx-JE7">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="F7N-NF-YHW" name="value" keyPath="selection.layoutPanelName" id="Gl2-zj-08g"/>
</connections>
</textField>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ye6-hm-O6w">
<rect key="frame" x="14" y="13" width="58" height="32"/>
<animations/>
<buttonCell key="cell" type="push" title="Ok" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="zkQ-aP-U8i">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="createNewLayout:" target="-2" id="53t-te-h1V"/>
</connections>
</button>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Ifh-rs-tuj">
<rect key="frame" x="72" y="13" width="82" height="32"/>
<animations/>
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Mzc-dq-VfL">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<string key="keyEquivalent" base64-UTF8="YES">
Gw
</string>
</buttonCell>
<connections>
<action selector="closeLayoutPanel:" target="-2" id="esZ-Y8-1Er"/>
</connections>
</button>
</subviews>
<animations/>
</view>
</window>
<userDefaultsController representsSharedInstance="YES" id="wfq-9F-dZt"/>
<objectController id="F7N-NF-YHW">
<connections>
<binding destination="-2" name="contentObject" keyPath="self" id="uOl-yN-LA0"/>
</connections>
</objectController>
</objects>
</document>

View file

@ -26,7 +26,7 @@
#define LAYOUT_RESOLUTIONS @[@"1280x720@60", @"1280x720@30", @"1920x1080@60", @"1920x1080@30", @"Custom"]
@interface PreviewView : NSView <NSPopoverDelegate, NSWindowDelegate>
@interface PreviewView : NSView <NSPopoverDelegate, NSWindowDelegate, NSMenuDelegate>
{

View file

@ -23,7 +23,6 @@
<connections>
<outlet property="AudioDeviceArrayController" destination="896" id="H2R-qR-lrz"/>
<outlet property="canvasSplitView" destination="EvN-9x-8Di" id="Y7U-Zu-lP3"/>
<outlet property="compressController" destination="gSI-N4-DsK" id="aUZ-rh-IfA"/>
<outlet property="editorPopover" destination="pVG-uK-v8x" id="Z4y-xI-k5M"/>
<outlet property="exportLayoutMenu" destination="Aks-2j-maL" id="SL3-RU-b4a"/>
<outlet property="extrasMenu" destination="wPc-B9-L1T" id="Ysq-1k-pbF"/>
@ -1976,11 +1975,6 @@
<binding destination="816" name="selectionIndexes" keyPath="selectedCaptureDestinations" id="1743"/>
</connections>
</arrayController>
<arrayController id="Ps1-eW-a2A" userLabel="destinationTypesController">
<connections>
<binding destination="816" name="contentArray" keyPath="self.destinationTypes" id="zTx-hV-zxu"/>
</connections>
</arrayController>
<arrayController automaticallyRearrangesObjects="YES" id="TZL-zr-Ssj" userLabel="SourceLayoutsArrayController">
<connections>
<binding destination="816" name="sortDescriptors" keyPath="self.layoutSortDescriptors" id="Ewh-lj-xyI"/>

View file

@ -216,10 +216,6 @@
}
[self.inputSource editorPopoverDidClose];
}
@ -439,7 +435,7 @@
- (IBAction)resetConstraints:(id)sender
{
NSDictionary *oldConstraints = self.inputSource.constraintMap;
NSMutableDictionary *oldConstraints = self.inputSource.constraintMap;
[[self.inputSource.sourceLayout.undoManager prepareWithInvocationTarget:self.inputSource.sourceLayout] modifyUUID:self.inputSource.uuid withBlock:^(InputSource *input) {