Am 08.11.12 14:43, schrieb Achim Breidenbach:
Hi Christophe,
I don't know for the network things, but I sure that you have to do this line
differently:
[sendBuffer appendData:[NSData dataWithBytes:imgData length:[imgData
length]] ];
imgData is just a point to an Object and NOT the pointer to your data. You have
to use [NSData bytes] to get the pointer :
[sendBuffer appendData:[NSData dataWithBytes:[imgData bytes] length:[imgData
length]] ];
Hi Achim,
I appreciate your input. As you can tell, I am slowly starting with
objective-c.
I welcome any improvement you might have.
Why do you have this line?
if(counter % 100 == 0)
this means that only every 100th render cycle get sent, right? if so you can
abort much earlier your process of fetching images and so one, if you won't
send it anyways.
Yes, I know, this is just for debugging purposes right now.
Eventually, this line will be deleted.
You have lots of [NSData dataWithData:] in your code, causing lots of copis of
all your data. In my opinion, mostly they are obsolete. e.g. [endString
dataUsingEncoding:NSASCIIStringEncoding] is already returning an NSData object
and you don't need to put it in another NSData object by wrapping it with
[NSData dataWithData:]
Thanks again, this is good to know - I simply wasn't aware of this, as I
got no source code to read or learn from.
Will change it - if you got more suggestions, please keep them coming.
Vielen Dank,
--
Christophe Leske
multimedial.de
----------------------------------------
www.multimedial.de - i...@multimedial.de
Hohler Strasse 17 - 51645 Gummersbach
+49(0)2261-99824540 // +49(0)177-2497031
----------------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list (Quartzcomposer-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com