On Jul 5, 2016, at 05:36 , Jonathan Taylor <jonathan.tay...@glasgow.ac.uk> 
wrote:
> 
> suggestions that might be relevant here

What worries me about the Darwin-level (i.e. Unix-level) API suggestions that 
others have made is that you don’t know how these interact with Cocoa apps. You 
didn’t actually say whether your app is a Cocoa app, but if so …

I think the best modern approach is to route your CPU and IO usage via GCD. 
That is, from the point where some callback gives you raw video, use 
dispatch_async to schedule the processing on a GCD queue, and use the GCD I/O 
primitives to actually do the I/O.

That will allow you to specify a quality of service (“user interactive” is the 
highest), which should interact properly with other apps, e.g. the Finder doing 
a large copy.

That should take care of CPU and IO. For memory, I agree with Jens that you 
should preallocate and reuse memory buffers, rather than re-allocating them, as 
far as possible.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to