Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

veetian

macrumors newbie
Original poster
May 31, 2010
1
0
Hello all,

I am a Windows developer trying to port an application over to Mac OS X. I need to achieve a few things and after some studying, I am stuck at a juncture where I am not sure which methods would serve my purpose best.

This is what I want to achieve:

To capture the desktop screen at a fastest possible rate.

I came across a sample that performs screen capture from Quartz:
imageContext = (CGContextRef)[[NSGraphicsContext currentContext]
graphicsPort];

The speed is what I'm looking for, however, it doesn't come with the Mouse Cursor. So, I'm figuring that I would need to fetch the mouse's location coordinates and mouse image data, and stitch onto the output image.

If this achievable? I don't need the sample code, just a nudge in the correct direction will do. :)


Alternatively, I've also explored the possibility to trigger the capturescreen terminal tool from my Cocoa application, this method works (as in it actually captures the mouse image) but it is much slower, and I am required to use the NSPasteboard to store the captured image, and subsequently processing it from my Cocoa application, in which the flow might be disrupted if the user chooses to copy his own data onto the pasteboard... so, I think this approach doesn't make sense.


Thanks!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.