• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
renderer CALayer via CARenderer into CGLContext (off screen)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

renderer CALayer via CARenderer into CGLContext (off screen)


  • Subject: renderer CALayer via CARenderer into CGLContext (off screen)
  • From: John Clayton <email@hidden>
  • Date: Thu, 25 Dec 2008 23:58:31 +0100

Hi All,

I've got a question re: CARenderer and rendering. Its probably best to express first what I want to achieve, and then what I'm doing to try and get there - maybe someone has a better idea and can point me in the correct direction.

What I want to achieve:
- render each frame of a CALayer into a pixel buffer so I can feed that into an quicktime ICM quicktime compression session
- the compression session requires CVPixelBuffer instances for each frame


so, the approach I've so far taken is this: have the CALayer render into a CGLContext by using the CARenderer class. I'm stuck here though because I'm not sure where to go from here. I've rendered into the context, but how do I get the image out of the context? I feel I'm missing something - i.e. the connection between a context and the actual image, for example: should I render into a texture or a pixel buffer - in this case, pixel buffer feels like the right answer.

I reckon what I want to achieve is the following (correct me if I'm wrong/crazy though):
1. create a pool of pixel buffer objects (lets say 5 for this example)
2. take a pixel buffer object from the pool and attach it to the CGLContext
3. render a single frame using the CARenderer
4. feed the pixel buffer to ICM
5. goto (2) if there are still some available pixel buffer objects in the pool




Or am I completely missing the point?

Thanks
--
John Clayton
Skype: johncclayton




_______________________________________________

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


  • Prev by Date: Re: Adding items to low level context menus
  • Next by Date: Verify that only one launchd-started process runs at a time
  • Previous by thread: Re: Adding items to low level context menus
  • Next by thread: Verify that only one launchd-started process runs at a time
  • Index(es):
    • Date
    • Thread