• 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: Drawing on top of QTCaptureView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing on top of QTCaptureView


  • Subject: Re: Drawing on top of QTCaptureView
  • From: Bengt Nilsson <email@hidden>
  • Date: Sun, 3 Jan 2010 17:09:57 +0100
  • Auth-sender: email@hidden

Hi again,

1 jan 2010 kl. 13.13 skrev Mike Abdullah:

> QTCaptureView is almost certainly internally using something along the lines of OpenGL internally to draw onscreen with acceptable performance. This means you can't draw on top of it with standard Cocoa drawing techniques. The options:
>
> A) Use an overlay window

I tried it starting from the "Movie Overlay" sample code and it might work. However, copying this solution directly from the sample code adds a haze over my video.
How can I avoid this?

>
> B) Implement the -view:willDisplayImage: delegate method and return a new image that will draw with the crosshairs

This would require that I go from a CIImage to a NSImage, draw into it,  and back again to CIImage. True?
Will it affect fps performance?

>
> C) Place the capture view in a layer-backed view hierarchy and add an overlay view – I don't know if QTCaptureView supports being layer-backed, or if an overlay view will then work.

> D) Switch to QTCaptureLayer. Add an overlay layer for the crosshairs.

I really did try to google for sample code on QTCaptureLayer, but I found none. Any links on this would be appreciated.

>
> On 31 Dec 2009, at 16:14, Bengt Nilsson wrote:
>
>> I need to draw a cross-hair on top of a QTCaptureView with a video preview from a USB camera.
>> For this app, I am starting from the sample project QTRecorder.
>> I create the cross-hair line in the Interface Builder.
>> Problem is that the video is always on top, overwriting the cross-hair lines.
>> Is there a way to let the cross-hair lines be drawn in front of the video, by some property setting in IB for the lines?
>> I tried different settings, like "move to front", defining "parent", etc., but nothing seems to help.
>> Or do they need to be drawn programatically?
>>
>> BN
>>
>> _______________________________________________
>>
>> 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
>

_______________________________________________

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

References: 
 >Re: Drawing on top of QTCaptureView (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: How do I bind custom view properties to an NSCollectionViewItem?
  • Next by Date: Re: NS_INLINE and obj = nil;?
  • Previous by thread: Re: Drawing on top of QTCaptureView
  • Next by thread: Re: Drawing on top of QTCaptureView
  • Index(es):
    • Date
    • Thread