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

Diego Biurrun diego at biurrun.de
Thu Nov 13 01:18:08 CET 2008


On Wed, Oct 29, 2008 at 07:26:58PM +0100, Gregor Riepl wrote:
>
> here's the updated patch.

Here is a preliminary review...

> --- configure	(revision 27848)
> +++ configure	(working copy)
> @@ -3521,14 +3521,28 @@
>      else
>  	_macosx=no
>  	_noaomodules="macosx $_noaomodules"
> -	_novomodules="quartz $_novomodules"
> +	_novomodules="macosx quartz $_novomodules"

That is a separate bug fix, committed.

>  if test "$_macosx" = yes ; then
>    cat > $TMPC <<EOF
> +#include <CoreAudio/CoreAudio.h>
> +int main(void) { return 0; }
> +EOF

Just the presence of the header is enough?  Don't you need to call a
function or something?

> +  if cc_check -framework CoreAudio; then
> +    _ld_extra="$_ld_extra -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
> +    _coreaudio=yes
> +    _def_coreaudio='#define CONFIG_COREAUDIO 1'
> +    _aosrc="$_aosrc ao_macosx.c"
> +    _aomodules="macosx $_aomodules"
> +  else
> +    _coreaudio=no
> +    _def_coreaudio='#undef CONFIG_COREAUDIO'
> +    _noaomodules="macosx $_noaomodules"
> +  fi
> +  cat > $TMPC <<EOF
>  #include <Carbon/Carbon.h>
>  #include <QuickTime/QuickTime.h>
> -#include <CoreAudio/CoreAudio.h>
>  int main(void) {

It would be good if this ao_macosx check could be a separate patch.

> @@ -3536,34 +3550,31 @@
> -cat > $TMPC <<EOF
> -#include <Carbon/Carbon.h>
> +  cat > $TMPC <<EOF
> +#include <Cocoa/Cocoa.h>
>  #include <QuartzCore/CoreVideo.h>
> +#include <OpenGL/OpenGL.h>
>  int main(void) { return 0; }
>  EOF
> -	if cc_check -framework Carbon -framework QuartzCore -framework OpenGL; then
> +	_tmp_CFLAGS="$CFLAGS"
> +	CFLAGS="$CFLAGS -x objective-c"

Does the check fail without this?  And why do you use a temporary
variable..

> +	if cc_check -framework Cocoa -framework QuartzCore -framework OpenGL -framework Carbon; then

..when you can just add the flag to the compiler call here?

> --- osdep/macosx_finder_args.c	(revision 27848)
> +++ osdep/macosx_finder_args.c	(working copy)
> @@ -85,7 +85,7 @@
>  
> -	QuitApplicationEventLoop();
> +	//QuitApplicationEventLoop();

Separate patch?  Also, you should add a comment that explains why this
line is commented out or directly remove it.

Diego



More information about the MPlayer-dev-eng mailing list