UDP?

yoki's picture

hello.. i am about to write my first custom plugin.. i want to make an UDP-reciever-plugin to be able to send video-streams to quartz from other applications.. is this a difficult task to achieve in obj-c? (i am a fairly good java/c++ programmer). do you people know of any good example code dealing with network+quartz?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

cwright's picture
API

before you begin, I suggest you consider long and hard some API issues.

This wouldn't be difficult for anyone experienced with Network stuff and obj-c. a bit different from java/c++, but nothing too crazy.

Why I consider thinking long and hard:

QC 3 actually has this built in. (yes, I just said it). It's not currently exposed very well (the OSC patches sort of do this in a limited sense), but there are ready-made, functional object classes that allow you to send bytes arbitrarily over UDP Right Now. (one of my many secret projects includes making a Spooky Patch on steroids that uses this class ;).

With the unofficial API, using this class is trivial, and a working alpha/beta could be done in a day or two, time permitting. With the official API this would take a lot more work, since you'd have to do it all from scratch. I wouldn't recommend that, since it's already done...

yoki's picture
unofficial?

i have never understood what this unofficial api is really :) does any documentation/info for it exist anywhere?

cwright's picture
unofficial api

I guess you could look here: Unofficial API (just created, for just this question ;)

yoki's picture
hmmm..

okay so i installed the kineme xcode package.. is the documentation for the skanky sdk = the actual headerfiles in the xcode project? :)

being quite a noob regarding native mac coding it seems that the only way to learn the benefits of the unofficial api is to learn how to code my app in the official api and then get some kind of "you could have done it much easier with the skanky api"-experience if i ever have the guts to go through the .h-files and compare what the difference really is between the api:s..

i think it would be a great idea if you put up the sources to the kineme-patches on a public svn so that people like me who are educated programmers but don't really have the guts to invent the wheel from the beginning can get a quick-start into coding patches using the unofficial api. i think this will boost the creativity of the community quite a lot and probably the output of interesting patches would increase..

cwright's picture
source

We've had the template released for over a year now, and we offer the source to many of our patches (ideally, all of them, but since many people here aren't programmers it's usually not worth the effort unless someone asks...)

Unfortunately, as you mentioned, there isn't any formal documentation -- perhaps someday :) But for now, the header files alone fill in the picture pretty well (though the headers are somewhat incomplete, since we didn't include everything we could have). It's a bit different (I too used to be a linux coder until learning Cocoa/objective-C about a year ago), but pretty straightforward after a bit of bravery. We've got some handy nuggets scattered around the site that we're trying to consolidate too -- if you run into anything specific, feel free to ask :)