Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Broadcast to specific ip addresses

  • Loading branch information...
commit 908759a6371b800a3f9073e3438b953f75a2c78a 1 parent eafedba
Jonathan del Strother authored
Showing with 8 additions and 3 deletions.
  1. +1 −0  BBOSCPlugInSender.h
  2. +7 −3 BBOSCPlugInSender.m
View
1  BBOSCPlugInSender.h
@@ -15,6 +15,7 @@
@property (nonatomic, readonly, retain) OSCOutPort *oscPort;
@property (nonatomic, readonly, retain) NSArray* oscParameters;
+@property (nonatomic, readwrite, assign) NSString* inputBroadcastAddress;
@property (nonatomic, readwrite, assign) NSUInteger inputBroadcastPort;
@property (nonatomic, readwrite, assign) NSString* inputBroadcastPath;
View
10 BBOSCPlugInSender.m
@@ -24,7 +24,7 @@ @interface BBOSCPlugInSender ()
@implementation BBOSCPlugInSender
@synthesize oscPort, oscParameters;
-@dynamic inputBroadcastPort, inputBroadcastPath;
+@dynamic inputBroadcastPort, inputBroadcastPath, inputBroadcastAddress;
+ (NSDictionary*) attributes
{
@@ -36,6 +36,10 @@ + (NSDictionary*) attributes
}
+ (NSDictionary*) attributesForPropertyPortWithKey:(NSString*)key {
+ if ([key isEqualToString:@"inputBroadcastAddress"]) {
+ return [NSDictionary dictionaryWithObjectsAndKeys:@"Broadcast Address", QCPortAttributeNameKey,
+ @"0.0.0.0", QCPortAttributeDefaultValueKey, nil];
+ }
if ([key isEqualToString:@"inputBroadcastPort"]) {
return [NSDictionary dictionaryWithObjectsAndKeys:@"Broadcast Port", QCPortAttributeNameKey,
[NSNumber numberWithInt:60000], QCPortAttributeDefaultValueKey, nil];
@@ -160,10 +164,10 @@ Return NO in case of failure during the execution (this will prevent rendering o
BOOL inputsChanged = NO;
- if ([self didValueForInputKeyChange:@"inputBroadcastPort"]) {
+ if ([self didValueForInputKeyChange:@"inputBroadcastAddress"] || [self didValueForInputKeyChange:@"inputBroadcastPort"]) {
if (self.oscPort)
[[BBOSCManager sharedManager] removeOutput:self.oscPort];
- self.oscPort = [[BBOSCManager sharedManager] createNewOutputToAddress:@"0.0.0.0" atPort:self.inputBroadcastPort withLabel:@"BB OSC"];
+ self.oscPort = [[BBOSCManager sharedManager] createNewOutputToAddress:self.inputBroadcastAddress atPort:self.inputBroadcastPort withLabel:@"BB OSC"];
if (!self.oscPort)
NSLog(@"Failed to created output port");
inputsChanged = YES;
Please sign in to comment.
Something went wrong with that request. Please try again.