Skip to content

Commit

Permalink
Merge pull request #135 from SteffeyDev/reciever-refactor
Browse files Browse the repository at this point in the history
New Major Version 3.0.0 - OSCReceiver refactor and new features
  • Loading branch information
SteffeyDev authored Jan 21, 2020
2 parents e48db08 + ba0958c commit 605a402
Show file tree
Hide file tree
Showing 30 changed files with 1,604 additions and 1,234 deletions.
185 changes: 111 additions & 74 deletions README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>19B88</string>
<string>19C57</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
Expand All @@ -27,7 +27,7 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>11C29</string>
<string>11C504</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
Expand All @@ -37,7 +37,7 @@
<key>DTXcode</key>
<string>1130</string>
<key>DTXcodeBuild</key>
<string>11C29</string>
<string>11C504</string>
<key>LSMinimumSystemVersion</key>
<string>10.10</string>
</dict>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<dict>
<key>Resources/Info.plist</key>
<data>
aBL+oY/babUC+/4PXQDuGCTbmIw=
uxEKDA4xNxNzYQMJwxftRXcOP2M=
</data>
<key>Resources/LICENSE</key>
<data>
Expand All @@ -19,11 +19,11 @@
<dict>
<key>hash</key>
<data>
aBL+oY/babUC+/4PXQDuGCTbmIw=
uxEKDA4xNxNzYQMJwxftRXcOP2M=
</data>
<key>hash2</key>
<data>
I3kcVlezeZlWoLli8U0I6OCnnNyQPKeZEthbPS+ES+s=
JtIQ5rzuMY6YYg90jOvb5iAZ4wutfFEj3yExFg+9Q/E=
</data>
</dict>
<key>Resources/LICENSE</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>19B88</string>
<string>19C57</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
Expand All @@ -27,7 +27,7 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>11C29</string>
<string>11C504</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
Expand All @@ -37,7 +37,7 @@
<key>DTXcode</key>
<string>1130</string>
<key>DTXcodeBuild</key>
<string>11C29</string>
<string>11C504</string>
<key>LSMinimumSystemVersion</key>
<string>10.10</string>
</dict>
Expand Down
Binary file modified atemOSC.app/Contents/Frameworks/VVOSC.framework/Versions/A/VVOSC
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<dict>
<key>Resources/Info.plist</key>
<data>
IsW4dK+rcFdi1JzfNodOnrc5F/Y=
mqULvg+wkarUvTMUapHTROcyujM=
</data>
</dict>
<key>files2</key>
Expand All @@ -15,11 +15,11 @@
<dict>
<key>hash</key>
<data>
IsW4dK+rcFdi1JzfNodOnrc5F/Y=
mqULvg+wkarUvTMUapHTROcyujM=
</data>
<key>hash2</key>
<data>
RYrLPHhxjjDUYtKfdyUwNSb4fw5I1TVqQ8VgYW6JBNY=
YIoogBUi8DzA62rHenVRfCuKfeALHv16pllebYunLTY=
</data>
</dict>
</dict>
Expand Down
8 changes: 5 additions & 3 deletions atemOSC.app/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>19B88</string>
<string>19C57</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
Expand All @@ -20,6 +20,8 @@
<string>atemOSC</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
Expand All @@ -31,7 +33,7 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>11C29</string>
<string>11C504</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
Expand All @@ -41,7 +43,7 @@
<key>DTXcode</key>
<string>1130</string>
<key>DTXcodeBuild</key>
<string>11C29</string>
<string>11C504</string>
<key>LSMinimumSystemVersion</key>
<string>10.9</string>
<key>NSMainNibFile</key>
Expand Down
Binary file modified atemOSC.app/Contents/MacOS/atemOSC
Binary file not shown.
Binary file modified atemOSC.app/Contents/Resources/Assets.car
Binary file not shown.
Binary file modified atemOSC.app/Contents/Resources/English.lproj/MainMenu.nib
Binary file not shown.
16 changes: 8 additions & 8 deletions atemOSC.app/Contents/_CodeSignature/CodeResources
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</data>
<key>Resources/Assets.car</key>
<data>
9gmHOetLoTsB+b0r87t6MoQuORc=
b6iNnrhvUAfxRlrhCZbpnJgvRho=
</data>
<key>Resources/English.lproj/InfoPlist.strings</key>
<dict>
Expand All @@ -25,7 +25,7 @@
<dict>
<key>hash</key>
<data>
V+dzOHGDjeHhBzzBXteotCCe+gc=
wBuaKUn4VZeFg2mKnDZt4E//u8M=
</data>
<key>optional</key>
<true/>
Expand All @@ -41,7 +41,7 @@
<dict>
<key>cdhash</key>
<data>
n3+ahAsOMfbLU+FvA8mFDklLWvY=
VnUyxGww9kziBAKkzjrSQUs1Nnk=
</data>
<key>requirement</key>
<string>identifier "com.yourcompany.VVBasics" and anchor apple generic and certificate leaf[subject.CN] = "Apple Development: Ken Steffey (649CFX9WPE)" and certificate 1[field.1.2.840.113635.100.6.2.1] /* exists */</string>
Expand All @@ -50,7 +50,7 @@
<dict>
<key>cdhash</key>
<data>
4rqnrWBG8OshBChmyX5Yx8jesuA=
XFVVMK3iviuw2KR4y+2msv0xias=
</data>
<key>requirement</key>
<string>identifier "com.yourcompany.VVOSC" and anchor apple generic and certificate leaf[subject.CN] = "Apple Development: Ken Steffey (649CFX9WPE)" and certificate 1[field.1.2.840.113635.100.6.2.1] /* exists */</string>
Expand All @@ -70,11 +70,11 @@
<dict>
<key>hash</key>
<data>
9gmHOetLoTsB+b0r87t6MoQuORc=
b6iNnrhvUAfxRlrhCZbpnJgvRho=
</data>
<key>hash2</key>
<data>
oxvdPooL+X1LHZZzaZyTDJ/kHpUx4C2RLtRvjbSEMvs=
WlH2b62MgYZ9yW2C0fu9CkGN6RKRzC8m6nISEYMQM3Q=
</data>
</dict>
<key>Resources/English.lproj/InfoPlist.strings</key>
Expand All @@ -94,11 +94,11 @@
<dict>
<key>hash</key>
<data>
V+dzOHGDjeHhBzzBXteotCCe+gc=
wBuaKUn4VZeFg2mKnDZt4E//u8M=
</data>
<key>hash2</key>
<data>
/zb8JN1gbA8IBmz7W6Z6gq5on6+sgO1ad+gqZMK+I/I=
2yOOtP93uzCJP0oVdMX9JJmAmC3+1tIBHx2urhDwi0s=
</data>
<key>optional</key>
<true/>
Expand Down
Binary file removed atemOSC.jpg
Binary file not shown.
3 changes: 3 additions & 0 deletions atemOSC/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#import <Cocoa/Cocoa.h>

#import "FeedbackMonitors.h"
#import "OSCEndpoint.h"

@class OSCAddressPanel;
@class OSCReceiver;
Expand Down Expand Up @@ -87,6 +88,8 @@
@property (strong) IBOutlet NSWindow* window;
@property (strong) id activity;

@property(nonatomic, retain) NSMutableArray<OSCEndpoint *> *endpoints;

- (void)connectBMD;
- (void)portChanged:(int)inPortValue out:(int)outPortValue ip:(NSString *)outIpStr;
- (IBAction)githubPageButtonPressed:(id)sender;
Expand Down
43 changes: 27 additions & 16 deletions atemOSC/AppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <libkern/OSAtomic.h>
#import "OSCAddressPanel.h"
#import "SettingsWindow.h"
#import "OSCReceiver.h"

@implementation AppDelegate

Expand Down Expand Up @@ -58,6 +59,7 @@ @implementation AppDelegate
@synthesize mSwitcher;
@synthesize mHyperdecks;
@synthesize mHyperdeckMonitors;
@synthesize endpoints;

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
Expand All @@ -76,6 +78,7 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
mMacroPool = NULL;
isConnectedToATEM = NO;

endpoints = [[NSMutableArray alloc] init];
mOscReceiver = [[OSCReceiver alloc] initWithDelegate:self];

mSwitcherMonitor = new SwitcherMonitor(self);
Expand Down Expand Up @@ -111,8 +114,8 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
[self switcherDisconnected]; // start with switcher disconnected

// make an osc manager- i'm using a custom in-port to record a bunch of extra conversion for the display, but you can just make a "normal" manager
manager = [[OSCManager alloc] init];
[manager setDelegate:mOscReceiver];

NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];

Expand Down Expand Up @@ -158,17 +161,20 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification

- (void)portChanged:(int)inPortValue out:(int)outPortValue ip:(NSString *)outIpStr
{
[manager removeInput:inPort];

if (outIpStr != nil)
{
[manager removeOutput:outPort];
if (inPort == nil)
inPort = [manager createNewInputForPort:inPortValue withLabel:@"atemOSC"];
else if (inPortValue != [inPort port])
[inPort setPort:inPortValue];

if (outPort == nil)
outPort = [manager createNewOutputToAddress:outIpStr atPort:outPortValue withLabel:@"atemOSC"];
else
{
if (![outIpStr isEqualToString: [outPort addressString]])
[outPort setAddressString:outIpStr];
if (outPortValue != [outPort port])
[outPort setPort:outPortValue];
}

inPort = [manager createNewInputForPort:inPortValue withLabel:@"atemOSC"];

[manager setDelegate:mOscReceiver];
}

- (void)applicationWillTerminate:(NSNotification*)aNotification
Expand Down Expand Up @@ -508,12 +514,16 @@ - (void)switcherDisconnected

self.activity = nil;

OSCMessage *newMsg = [OSCMessage createWithAddress:@"/atem/led/green"];
[newMsg addFloat:0.0];
[outPort sendThisMessage:newMsg];
newMsg = [OSCMessage createWithAddress:@"/atem/led/red"];
[newMsg addFloat:1.0];
[outPort sendThisMessage:newMsg];
if (outPort != nil)
{
OSCMessage *newMsg = [OSCMessage createWithAddress:@"/atem/led/green"];
[newMsg addFloat:0.0];
[outPort sendThisMessage:newMsg];
newMsg = [OSCMessage createWithAddress:@"/atem/led/red"];
[newMsg addFloat:1.0];
[outPort sendThisMessage:newMsg];
}


[(SettingsWindow *)window showSwitcherDisconnected];

Expand Down Expand Up @@ -656,6 +666,7 @@ - (void)logMessage:(NSString *)message
if (message) {
dispatch_async(dispatch_get_main_queue(), ^{
[self appendMessage:message];
[(SettingsWindow *)window updateLogLabel:message];
});
NSLog(@"%@", message);
}
Expand Down
Loading

0 comments on commit 605a402

Please sign in to comment.