• 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
QuickTime, Cocoa, et al
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

QuickTime, Cocoa, et al


  • Subject: QuickTime, Cocoa, et al
  • From: Joseph Kelly <email@hidden>
  • Date: Wed, 7 Jun 2006 15:58:17 -0700

I am considering migrating an application to Cocoa (or maybe Carbon HIView), and I need some information about how well they play with QuickTime.

In particular, I draw some trace information on top of each frame of a Quicktime movie as it plays, and to that end we've had great success with SetMovieDrawingCompleteProc(). I've tried this same approach with QTKit with no luck -- for instance, I've got a custom view that contains a QTMovieView, and when I attach a drawing complete procedure on the Movie, and attempt to draw a big green X through the view, it draws over everything but the movie content:

[self lockFocus];
NSGraphicsContext* pCtx = [NSGraphicsContext graphicsContextWithWindow:[self window]];
NSRect bounds = [self bounds];
NSBezierPath* clip = [NSBezierPath bezierPathWithRect:bounds];
[clip addClip];
[[NSColor greenColor] setStroke];
NSBezierPath* path = [NSBezierPath bezierPath];
[path moveToPoint:NSMakePoint(bounds.origin.x, bounds.origin.y)];
[path lineToPoint:NSMakePoint(bounds.origin.x + bounds.size.width, bounds.origin.y + bounds.size.height)];
[path moveToPoint:NSMakePoint(bounds.origin.x + bounds.size.width, bounds.origin.y)];
[path lineToPoint:NSMakePoint(bounds.origin.x, bounds.origin.y + bounds.size.height)];
[path stroke];
[pCtx flushGraphics];
[self unlockFocus];


Question 1: So is this even possible, or am I doing something the wrong way in my drawing code? I've seen a samplecode example that uses an overlay window, but that won't work for me, which is my segue into:

Question 2: we've got a UI that lets users layer view "objects" on top of each other (including QuickTime movies!) I've read that NSView is absolutely not up to this task -- that it has some z-ordering issues etc. So far, however, I've got a screen full of overlapping NSViews, and they seems to work okay (outside of the quicktime issues) and an occasional z-order glitch. So what's the final verdict on overlapping NSViews? And has anyone found any alternatives to this?

Thanks,

Joe K.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: QuickTime, Cocoa, et al
      • From: "Douglas A. Welton" <email@hidden>
    • Re: QuickTime, Cocoa, et al
      • From: Ricky Sharp <email@hidden>
  • Prev by Date: Re: not seeing NSNotification
  • Next by Date: Re: CoreData and Distinct
  • Previous by thread: Re: inconsistent crash drawing a string in a custom browser cell
  • Next by thread: Re: QuickTime, Cocoa, et al
  • Index(es):
    • Date
    • Thread