Search code examples
cocoavideoexternalquicktimeqtkit

Using external video hardware - beginner needs directions


I have a little application here which deals with QuickTime video using QTKit. This is my first Cocoa app, so I'm still pretty new to programming for OS X.

As the main stuff is now working, I was wondering how I could use and support external video hardware? I just don't have a clue how to get started as I have never worked with external hardware before.

So, if there is a BlackMagic card installed in the machine the program is running on for example, how would I get to know that and how would I possibly have my QuickTime movie played out on this card instead of a QTMovieView on the computer monitor?

Would be glad if someone could point me a direction! Thank you very much.


Solution

  • The kind of graphics cards you have installed shouldn't matter to QTKit when it comes to playing things back (it might look smoother and sexier to you, but to what you call in the operating system it doesn't matter).

    To display content on a second monitor (or "external hardware", as you call it), you can get information on the various screens hooked to your Macintosh by calling [NSScreen screens]. Take a look at the rest of the NSScreen reference, too.

    And once you get the hang of that, you can decide if you want to do full screen on the deepest screen (presumably the one with your expensive graphics card), or if you want to render on the largest screen (which you can determine from NSScreen's "frame" method), or the screen that isn't the "main screen" with the menu bar.

    There's also lower level stuff available for you to use in Quartz. Here is Apple's "Quartz Display Services Reference" guide. I'd only recommend going this route when you feel sufficiently smart with Macintosh program to go deeper.

    Hope this helps you out!