[MPlayer-dev-eng] [PATCH] Replaced deprecated QuickDraw calls in vo_quartz

David DeHaven dave at sagetv.com
Wed Oct 29 21:30:35 CET 2008


>> unfortunately, it's not that simple.
>> CGDisplayCapture could be used allright - but then you'll end up  
>> with a black screen because the opengl view that displays the  
>> frames is contained in a window and that window will stop rendering  
>> when the display is captured.
>> for corevideo/opengl rendering to work in fullscreen mode, there  
>> are two options:
>> - capture the display and create a fullscreen opengl rendering  
>> context
>> - scale the output window to fullscreen size and disable titlebar  
>> and dock (this is what vo_macosx currently does, but with a carbon  
>> function)
>
> There's also this page in the Apple docs that explains how to do
> fullscreen windows in Cocoa with Quartz fullscreen capture:
> http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaDrawingGuide/AdvancedDrawing/chapter_9_section_4.html#/ 
> /apple_ref/doc/uid/TP40003290-CH207-SW18
>
> Basically, the screen is captured wit Quartz, a frameless window is
> created with NSBorderlessWindowMask in Cocoa and placed above the
> shielding window with CGShieldingWindowLevel.
> Combine this with how MPlayerOSX does fullscreen by creating a second
> window and switching the OpenGLContext's view between the two windows.

That's exactly how I've done it... I use OpenGL with two or more UI  
layers on top of the gl window. I've had issues with drawing directly  
to the shielding window (seems to be system dependent), so I just  
create new borderless windows above it to render into. Works like a  
charm :)

-DrD-




More information about the MPlayer-dev-eng mailing list