• 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
Re: -[CALayer setContents: cvPixelBufferRef ] ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -[CALayer setContents: cvPixelBufferRef ] ?


  • Subject: Re: -[CALayer setContents: cvPixelBufferRef ] ?
  • From: David Duncan <email@hidden>
  • Date: Thu, 3 Apr 2008 12:23:59 -0700

On Apr 3, 2008, at 11:34 AM, Jonathan del Strother wrote:

CALayer says that 'contents' is "typically a CGImageRef, but may be
something else".  I (optimistically) tried assigning the
CVPixelBufferRef directly to the contents, but apparently that's not
included in the mysterious 'something else' list.

Could you point out where it says that? Typically you would set the contents property either as a CGImageRef, or as the value of the contents of another layer (which would cause them to share contents).


The only way I've found of going from CVPixelBufferRef to CGImageRef
is via CIImage, something like the following :


If you have a CVPixelBufferRef, you can use the various functions defined for a CVPixelBuffer to access the base address, row bytes, width, height and other attributes to create a CGImageRef directly from it via CGImageCreate(). You should be able to find more information by consulting the CoreVideo and Quartz references.
--
David Duncan
Apple DTS Animation and Printing
email@hidden




_______________________________________________

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


  • Follow-Ups:
    • Re: -[CALayer setContents: cvPixelBufferRef ] ?
      • From: "Jonathan del Strother" <email@hidden>
References: 
 >-[CALayer setContents: cvPixelBufferRef ] ? (From: "Jonathan del Strother" <email@hidden>)

  • Prev by Date: Re: desktop access
  • Next by Date: Re: -[CALayer setContents: cvPixelBufferRef ] ?
  • Previous by thread: -[CALayer setContents: cvPixelBufferRef ] ?
  • Next by thread: Re: -[CALayer setContents: cvPixelBufferRef ] ?
  • Index(es):
    • Date
    • Thread