[MPlayer-dev-eng] [PATCH] Disable vo_macosx on machines without QuartzExtreme

Tim Wojtulewicz timwoj at ieee.org
Sun Jul 9 18:49:21 CEST 2006


Hi.

On Jul 9, 2006, at 9:28 AM, Chris Roccati wrote:

> Hello,
>
> On 9 Jul 2006, at 06:52 , Tim Wojtulewicz wrote:
>> This patch causes vo_macosx to not be built on machines that don't  
>> support OpenGL acceleration in CoreGraphics (i.e. QuartzExtreme).   
>> By default, those machines should only build vo_quartz since  
>> vo_macosx just displays a black video window.
>
> I'd suggest a runtime check.
> If, for some reason a runtime check is deemed inappropriate there  
> should a way to force the build of the module...
> (runtime check patch follows. makes the preinit of vo_macosx fail  
> if hardware acceleration is not available)
>
> --- mplayer/libvo/vo_macosx.m	2006-07-04 12:52:09.000000000 +0200
> +++ mplayer_patch/libvo/vo_macosx.m	2006-07-09 18:24:45.000000000  
> +0200
> @@ -279,6 +279,11 @@
>          }
>      }
> +	if(!CGDisplayUsesOpenGLAcceleration((CGDirectDisplayID)screen_id)) {
> +		mp_msg(MSGT_VO, MSGL_FATAL, "This video output module is not  
> supported on this hardware.\n");
> +		return 1;
> +	}
> +
> 	NSApplicationLoad();
> 	autoreleasepool = [[NSAutoreleasePool alloc] init];
> 	NSApp = [NSApplication sharedApplication];

I had actually considered that originally, but debated whether it  
should even be built at all if it's guaranteed not to work.  I agree  
about an option to force building the module though.

Tim



More information about the MPlayer-dev-eng mailing list