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

Guillaume POIRIER poirierg at gmail.com
Wed Oct 29 22:52:11 CET 2008


Hello,

On Wed, Oct 29, 2008 at 7:26 PM, Gregor Riepl <onitake at gmail.com> wrote:
>> 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.

Tested on may MacBookPro running OSX 10.5.5, and it works wonderfully
if I run configure as follows:
CC="gcc -arch x86_64" ./configure --disable-liba52-internal --disable-qtx


> 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

I ran into the same problem, but I honestly don't know what causes
this problem. The same code builds fine on Linux/x86_64... When I look
at the assembly code, it looks quite fine. Maybe it's a bug in Apple's
fork of GAS?


> 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.

works fine, outstanding work.

Guillaume
-- 
One should not give up hope on imbeciles. With a little training, you
can make them into soldiers.
 -- Pierre Desproges



More information about the MPlayer-dev-eng mailing list