On Feb 23, 2011, at 5:39 PM, Kyle Sluder wrote:

> On Wed, Feb 23, 2011 at 3:21 PM, Ken Thomases <k...@codeweavers.com> wrote:
>> On Feb 23, 2011, at 4:40 PM, Kyle Sluder wrote:
>> 
>>> On Wed, Feb 23, 2011 at 2:17 PM, eveningnick eveningnick
>>> <eveningn...@gmail.com> wrote:
>>>> i am trying to write a video grabber, CGWindow API seems pretty convenient
>>>> (because it allows to select which window to "grab"), but i am worried 
>>>> about
>>>> the speed, because i need to record the grabbed frames to the video file.
>>> 
>>> http://developer.apple.com/library/mac/#samplecode/OpenGLScreenCapture/Introduction/Intro.html%23//apple_ref/doc/uid/DTS10004445-Intro-DontLinkElementID_2
>> 
>> Actually, I don't think that's an improvement over the CGWindow API that 
>> eveningnick was already using (CGWindowListCreateImage, I assume).  In 
>> general, if a high-level (more abstract) API achieves the desired result, it 
>> will be at least as efficient as the low-level API -- because, if the 
>> low-level approach is faster, the high-level API would just use it.
> 
> Except the high-level APIs are geared around taking a static
> screenshot. Remember, the OP is trying to capture a video.
> 
> The method in the sample project creates multiple pixel buffers and
> asynchronously swaps the framebuffer contents into them. By design,
> the synchronous screen capture APIs cannot be as fast as working at
> this level.

My apologies.  The URL has the name OpenGLScreenCapture in it, even though the 
sample project is actually called OpenGLCaptureToMovie.  I only looked at the 
URL and thought it was for the sample code to capture a single screenshot using 
OpenGL -- there is such a sample that I've looked at previously.  I guess I 
must have been thinking of 
<http://developer.apple.com/library/mac/#samplecode/OpenGLScreenSnapshot/>, 
which has a confusingly similar URL, if not title.

Regards,
Ken

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to