Fastest way to do screen captures on OSX ?
Fastest way to do screen captures on OSX ?
- Subject: Fastest way to do screen captures on OSX ?
- From: Mauritz Jameson <email@hidden>
- Date: Wed, 09 Oct 2013 23:16:49 -0400
I have created a function to do screen captures on OSX.
Since I'm new to OSX, Xcode and the SDKs on OSX, I've asked for a code
review of the screen capture function here:
http://codereview.stackexchange.com/questions/32466/reviewing-c-function-which-captures-the-screen
The function is a bit messy since it's a prototype. I would be very happy
if you could tell me how I can optimize the code I've posted in the link
above.
The screen capture function is being called every 100ms approximately and
these frequent function calls seems to slow everything else down. After my
program has run for a little while, the desktop and mouse pointer becomes
very laggy/non-responsive. The mouse pointer icon periodically changes to
that spinning circle (equivalent to the hour glass on Windows). Opening
other apps while my program is running is also a problem. After my program
has run for 30 seconds or so, opening up a browser takes more than a
minute. Eventually everything just hangs and I have to reboot.
I'm wondering if it's the screen capture method itself (i.e. using the Core
Graphics API) which isn't ideal for this type of application or if there's
something in the screen capture code which is causing the above mentioned
problems.
If I comment out the code in the screen capture function and run my
program, I don't get the same laggy behavior. So the bottleneck/problem
definitely seems to have something to do with the way I capture the screen.
Any suggestions, comments, questions etc. are highly appreciated.
Thank you!!
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden