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

Gregor Riepl onitake at gmail.com
Wed Oct 29 19:26:58 CET 2008


> I'm too busy at the moment to really help, but using CG to gain
> fullscreen mode is fairly trivial:
> http://developer.apple.com/documentation/GraphicsImaging/Conceptual/QuartzDisplayServicesConceptual/Articles/DisplayCapture.html
>
> I've done this several times and there's really nothing to it if all
> you want to do is capture the main display.

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)

luckily, in this particular case, apple makes it easy: the code can be  
kept as it is.
a small part of the carbon functions has been left in place, and  
SetSystemUIMode is one of them: http://developer.apple.com/documentation/Carbon/Conceptual/Carbon64BitGuide/HIToolboxChanges/chapter_5_section_3.html
so i put the -framework Carbon back for vo_macosx.

i got ssh access to a 64bit mac running 10.5, and it builds. testing  
wasn't possible though, obviously.

the next task would be fixing liba52:
cc -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after- 
statement -std=gnu99 -mmacosx-version-min=10.5 -isysroot /Developer/ 
SDKs/MacOSX10.5.sdk -arch x86_64 -mdynamic-no-pic -falign-loops=16 - 
shared-libgcc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 - 
D_LARGEFILE64_SOURCE -I.  -I/usr/local/include -I/usr/X11/include -I/ 
usr/X11/include/freetype2 -I/usr/X11/include   -c -o liba52/resample.o  
liba52/resample.c
/var/tmp//ccwLM6D8.s:1177:32-bit absolute addressing is not supported  
for x86-64
/usr/libexec/gcc/i686-apple-darwin9/4.0.1/as: fatal error in /usr/ 
bin/../libexec/gcc/darwin/x86_64/as

here's the updated patch. i also removed QuitApplicationEventLoop from  
osdep/macosx_finder_args.c, as it's gone for 64bit and the docs say  
it's normally not neccessary.
for some reason, there's a regression here, though: the quit menu item  
doesn't work (other menu entries and cmd-q do), but it doesn't work  
with QuitApplicationEventLoop either, so that looks unrelated.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer-svn27848-quartz-quickdraw-deprecated.patch
Type: application/octet-stream
Size: 20036 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20081029/9099d7be/attachment.obj>
-------------- next part --------------



More information about the MPlayer-dev-eng mailing list