From e48c6f446c4de708dd9d3b47d3479620208f7430 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Thu, 19 Apr 2012 17:05:50 +0300 Subject: configure: --enable-debug: don't change other compiler flags The --enable-debug and --enable-profile options set their own compiler flags, completely different from normal flag selection. These flags sucked; especially '-W' (an obsolete alias for '-Wextra') generated a huge number of irrelevant warnings. Change configure to only add "-g" or similar to the flags that would be used otherwise. --- configure | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 12f5e9db31..27dde1a754 100755 --- a/configure +++ b/configure @@ -2310,23 +2310,22 @@ fi # if darwin && test "$cc_vendor" = "gnu" ; then # Checking for CFLAGS _install_strip="-s" if test "$_profile" != "" || test "$_debug" != "" ; then - CFLAGS="-O2 $_march $_mcpu $_pipe $_debug $_profile" - WARNFLAGS="-W -Wall" _install_strip= -elif test -z "$CFLAGS" ; then +fi +if test -z "$CFLAGS" ; then if test "$cc_vendor" = "intel" ; then - CFLAGS="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer" + CFLAGS="-O2 $_debug $_profile $_march $_mcpu $_pipe -fomit-frame-pointer" WARNFLAGS="-wd167 -wd556 -wd144" elif test "$cc_vendor" = "sun" ; then - CFLAGS="-O2 $_march $_mcpu $_pipe -xc99 -xregs=frameptr" + CFLAGS="-O2 $_debug $_profile $_march $_mcpu $_pipe -xc99 -xregs=frameptr" elif test "$cc_vendor" = "clang"; then - CFLAGS="-O2 $_march $_pipe" + CFLAGS="-O2 $_debug $_profile $_march $_pipe" WARNFLAGS="-Wall -Wno-switch-enum -Wno-logical-op-parentheses -Wpointer-arith -Wundef -Wno-pointer-sign -Wmissing-prototypes" ERRORFLAGS="-Werror=implicit-function-declaration" elif test "$cc_vendor" != "gnu" ; then - CFLAGS="-O2 $_march $_mcpu $_pipe" + CFLAGS="-O2 $_debug $_profile $_march $_mcpu $_pipe" else - CFLAGS="-O2 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer" + CFLAGS="-O2 $_debug $_profile $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer" WARNFLAGS="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls" ERRORFLAGS="-Werror-implicit-function-declaration" extra_ldflags="$extra_ldflags -ffast-math" @@ -6844,12 +6843,8 @@ $def_yasm #define HAVE_INLINE_ASM 1 -/* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */ -#ifndef MP_DEBUG +/* Use these registers in x86 inline asm. No proper detection yet. */ #define HAVE_EBP_AVAILABLE 1 -#else -#define HAVE_EBP_AVAILABLE 0 -#endif #endif /* MPLAYER_CONFIG_H */ EOF -- cgit v1.2.3 From d12b9b611aa7030047e6556714e859dd2bfd38fc Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 11 Dec 2011 12:26:00 +0100 Subject: vo_corevideo: use cocoa_common to display the window Change vo_corevideo to use cocoa_common to create and manage the window. This doesn't affect external OSX GUIs, since they don't use vo_corevideo window management, but only read the image data from the shared buffer. --- configure | 44 +++++++++++++++++++------------------------- 1 file changed, 19 insertions(+), 25 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 27dde1a754..f9a4bbaafe 100755 --- a/configure +++ b/configure @@ -4187,21 +4187,35 @@ else fi echores $quicktime -echocheck "CoreVideo" -if test "$_corevideo" = auto ; then +echocheck "Cocoa" +if test "$_cocoa" = auto ; then cat > $TMPC < #include #include +int main(void) { + NSApplicationLoad(); +} +EOF + _cocoa=no + cc_check -framework Cocoa -framework OpenGL && _cocoa=yes +fi +if test "$_cocoa" = yes ; then + libs_mplayer="$libs_mplayer -framework Cocoa -framework OpenGL" +fi +echores "$_cocoa" + +echocheck "CoreVideo" +if test "$_cocoa" = yes && test "$_corevideo" = auto ; then + cat > $TMPC < int main(void) { return 0; } EOF _corevideo=no - cc_check -framework Carbon -framework Cocoa -framework QuartzCore -framework OpenGL && _corevideo=yes + cc_check -framework Cocoa -framework QuartzCore -framework OpenGL && _corevideo=yes fi if test "$_corevideo" = yes ; then vomodules="corevideo $vomodules" - libs_mplayer="$libs_mplayer -framework Carbon -framework Cocoa -framework QuartzCore -framework OpenGL" + libs_mplayer="$libs_mplayer -framework QuartzCore" def_corevideo='#define CONFIG_COREVIDEO 1' else novomodules="corevideo $novomodules" @@ -4209,26 +4223,6 @@ else fi echores "$_corevideo" -echocheck "Cocoa" -if test "$_gl" = no ; then - # if _gl is not enabled there is no point to add potentially unused linker flags - _cocoa=no -fi -if test "$_cocoa" = auto ; then - cat > $TMPC < -#include -#include -int main(void) { return 0; } -EOF - _cocoa=no - cc_check -framework Cocoa -framework QuartzCore -framework OpenGL && _cocoa=yes -fi -if test "$_cocoa" = yes ; then - libs_mplayer="$libs_mplayer -framework Cocoa -framework QuartzCore -framework OpenGL" -fi -echores "$_cocoa" - fi #if darwin -- cgit v1.2.3 From 9646208cc671721fce2253a3c5d40b1961810a87 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 23 Mar 2012 19:14:32 +0100 Subject: vo_sharedbuffer: add this video output This OSX video output is replaces the previous shared_buffer mode of vo_corevideo. It manages a shared buffer and a Cocoa distributed object to communicate with GUIs. Splitting this code into a separate VO allows to get rid of harmful code coupling, performance inefficiencies (useless image memory copies) and ugly code (big if-else conditionals). --- configure | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'configure') diff --git a/configure b/configure index f9a4bbaafe..22926751e9 100755 --- a/configure +++ b/configure @@ -435,6 +435,7 @@ Video output: --disable-yuv4mpeg disable yuv4mpeg video output [enable] --disable-corevideo disable CoreVideo video output [autodetect] --disable-cocoa disable Cocoa OpenGL backend [autodetect] + --disable-sharedbuffer disable OSX shared buffer video output [autodetect] Audio output: --disable-alsa disable ALSA audio output [autodetect] @@ -691,6 +692,7 @@ _qtx=auto _coreaudio=auto _corevideo=auto _cocoa=auto +_sharedbuffer=auto quicktime=auto _macosx_finder=no _macosx_bundle=auto @@ -1120,6 +1122,8 @@ for ac_option do --disable-corevideo) _corevideo=no ;; --enable-cocoa) _cocoa=yes ;; --disable-cocoa) _cocoa=no ;; + --enable-sharedbuffer) _sharedbuffer=yes ;; + --disable-sharedbuffer) _sharedbuffer=no ;; --enable-macosx-finder) _macosx_finder=yes ;; --disable-macosx-finder) _macosx_finder=no ;; --enable-macosx-bundle) _macosx_bundle=yes ;; @@ -4223,6 +4227,26 @@ else fi echores "$_corevideo" +echocheck "SharedBuffer" +if test "$_sharedbuffer" = auto ; then + cat > $TMPC < Date: Tue, 3 Apr 2012 08:13:12 +0200 Subject: OSX, input: implement wakeup in response to Cocoa events Add code to wake up the select() call in input.c when an OSX event is available and a Cocoa OpenGL backend is initialized. Fixes the slow response to input or other events in Cocoa-based VOs during long select() sleeps (e.g., when mplayer2 is paused) introduced by commit 7040968. --- configure | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 22926751e9..4a6e209d3a 100755 --- a/configure +++ b/configure @@ -4205,6 +4205,9 @@ EOF fi if test "$_cocoa" = yes ; then libs_mplayer="$libs_mplayer -framework Cocoa -framework OpenGL" + def_cocoa='#define CONFIG_COCOA 1' +else + def_cocoa='#undef CONFIG_COCOA' fi echores "$_cocoa" @@ -6383,6 +6386,7 @@ BL = $_bl CACA = $_caca CDDA = $_cdda CDDB = $_cddb +COCOA = $_cocoa COREAUDIO = $_coreaudio COREVIDEO = $_corevideo SHAREDBUFFER = $_sharedbuffer @@ -6785,6 +6789,7 @@ $def_aa $def_bl $def_caca $def_corevideo +$def_cocoa $def_sharedbuffer $def_dga $def_dga1 -- cgit v1.2.3 From d3da92aea4e865b72194ecc76e0eab6e2a1179a3 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 14 Apr 2012 15:02:28 +0200 Subject: cocoa_common, gl_common: add OSX specific getProcAddress Run dlopen on the OpenGL dynamic library instead of on the binary. This should prevent crashes due to function conflicts when X11/lGL is linked. Remove mutual exclusion of the X11 and Cocoa backends. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 4a6e209d3a..7b99766d2d 100755 --- a/configure +++ b/configure @@ -4544,7 +4544,7 @@ int main(int argc, char *argv[]) { EOF _gl=no for _ld_tmp in "" -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do - if test "$_cocoa" != yes && cc_check $_ld_tmp $_ld_lm ; then + if cc_check $_ld_tmp $_ld_lm ; then _gl=yes _gl_x11=yes libs_mplayer="$libs_mplayer $_ld_tmp $_ld_dl" -- cgit v1.2.3 From 3862d469ae7f22d10f1d51d7056c75782fec2283 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 16 Apr 2012 08:33:42 +0200 Subject: configure: OSX: check for X11 header conflict with corevideo Check that headers from ApplicationServices and X11 do not conflict before enabling X11 support on OSX. Both headers would be included in vo_corevideo.m (through QuartzCore/QuartzCore.h and gl_common.h). The conflict exists on versions of Mac OSX prior to 10.7, where ApplicationServices includes the deprecated QuickDraw framework, resulting in a clash on the Cursor type definition. --- configure | 173 ++++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 95 insertions(+), 78 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 7b99766d2d..71dbecab68 100755 --- a/configure +++ b/configure @@ -3796,6 +3796,87 @@ fi echores "$_directfb" +if darwin; then + +echocheck "QuickTime" +if test "$quicktime" = auto ; then + quicktime=no + statement_check QuickTime/QuickTime.h 'ImageDescription *desc; EnterMovies(); ExitMovies()' -framework QuickTime && quicktime=yes +fi +if test "$quicktime" = yes ; then + extra_ldflags="$extra_ldflags -framework QuickTime" + def_quicktime='#define CONFIG_QUICKTIME 1' +else + def_quicktime='#undef CONFIG_QUICKTIME' +fi +echores $quicktime + +echocheck "Cocoa" +if test "$_cocoa" = auto ; then + cat > $TMPC < +#include +int main(void) { + NSApplicationLoad(); +} +EOF + _cocoa=no + cc_check -framework Cocoa -framework OpenGL && _cocoa=yes +fi +if test "$_cocoa" = yes ; then + libs_mplayer="$libs_mplayer -framework Cocoa -framework OpenGL" + def_cocoa='#define CONFIG_COCOA 1' +else + def_cocoa='#undef CONFIG_COCOA' +fi +echores "$_cocoa" + +echocheck "CoreVideo" +if test "$_cocoa" = yes && test "$_corevideo" = auto ; then + cat > $TMPC < +int main(void) { return 0; } +EOF + _corevideo=no + cc_check -framework Cocoa -framework QuartzCore -framework OpenGL && _corevideo=yes +fi +if test "$_corevideo" = yes ; then + vomodules="corevideo $vomodules" + libs_mplayer="$libs_mplayer -framework QuartzCore" + def_corevideo='#define CONFIG_COREVIDEO 1' +else + novomodules="corevideo $novomodules" + def_corevideo='#undef CONFIG_COREVIDEO' +fi +echores "$_corevideo" + +echocheck "SharedBuffer" +if test "$_sharedbuffer" = auto ; then + cat > $TMPC < $TMPC < -#include -int main(void) { - NSApplicationLoad(); -} -EOF - _cocoa=no - cc_check -framework Cocoa -framework OpenGL && _cocoa=yes -fi -if test "$_cocoa" = yes ; then - libs_mplayer="$libs_mplayer -framework Cocoa -framework OpenGL" - def_cocoa='#define CONFIG_COCOA 1' -else - def_cocoa='#undef CONFIG_COCOA' -fi -echores "$_cocoa" - -echocheck "CoreVideo" -if test "$_cocoa" = yes && test "$_corevideo" = auto ; then - cat > $TMPC < -int main(void) { return 0; } -EOF - _corevideo=no - cc_check -framework Cocoa -framework QuartzCore -framework OpenGL && _corevideo=yes -fi -if test "$_corevideo" = yes ; then - vomodules="corevideo $vomodules" - libs_mplayer="$libs_mplayer -framework QuartzCore" - def_corevideo='#define CONFIG_COREVIDEO 1' -else - novomodules="corevideo $novomodules" - def_corevideo='#undef CONFIG_COREVIDEO' -fi -echores "$_corevideo" - -echocheck "SharedBuffer" -if test "$_sharedbuffer" = auto ; then - cat > $TMPC < Date: Wed, 21 Mar 2012 00:57:58 +0100 Subject: configure, stream_cdda: remove libcdparanoia support libcdparanoia is barely developed anymore, while libcdio is still quite active. --- configure | 54 +++++++++--------------------------------------------- 1 file changed, 9 insertions(+), 45 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 71dbecab68..aca6a6e61c 100755 --- a/configure +++ b/configure @@ -343,7 +343,6 @@ Optional features: --disable-dvdread disable libdvdread [autodetect] --disable-dvdread-internal disable internal libdvdread [autodetect] --disable-libdvdcss-internal disable internal libdvdcss [autodetect] - --disable-cdparanoia disable cdparanoia [autodetect] --disable-cddb disable cddb [autodetect] --disable-bitmap-font disable bitmap font support [enable] --disable-freetype disable FreeType 2 font rendering [autodetect] @@ -682,7 +681,7 @@ _charset="UTF-8" _crash_debug=no _sighandler=yes _libdv=auto -_cdparanoia=auto +_cdda=auto _cddb=auto _big_endian=auto _bitmap_font=yes @@ -1067,8 +1066,6 @@ for ac_option do --disable-shm) _shm=no ;; --enable-select) _select=yes ;; --disable-select) _select=no ;; - --enable-cdparanoia) _cdparanoia=yes ;; - --disable-cdparanoia) _cdparanoia=no ;; --enable-cddb) _cddb=yes ;; --disable-cddb) _cddb=no ;; --enable-big-endian) _big_endian=yes ;; @@ -5170,57 +5167,25 @@ fi echores "$_libdvdcss_internal" -echocheck "cdparanoia" -if test "$_cdparanoia" = auto ; then - cat > $TMPC < -#include -// This need a better test. How ? -int main(void) { void *test = cdda_verbose_set; return test == (void *)1; } -EOF - _cdparanoia=no - for _inc_tmp in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do - cc_check $_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && - _cdparanoia=yes && extra_cflags="$extra_cflags $_inc_tmp" && break - done -fi -if test "$_cdparanoia" = yes ; then - _cdda='yes' - extra_ldflags="$extra_ldflags -lcdda_interface -lcdda_paranoia" - openbsd && extra_ldflags="$extra_ldflags -lutil" -fi -echores "$_cdparanoia" - - echocheck "libcdio" -if test "$_libcdio" = auto && test "$_cdparanoia" = no ; then +if test "$_libcdio" = auto ; then _libcdio=no if pkg_config_add libcdio_paranoia ; then _libcdio=yes fi fi -if test "$_libcdio" = yes && test "$_cdparanoia" = no ; then +if test "$_libcdio" = yes ; then _cdda='yes' - def_libcdio='#define CONFIG_LIBCDIO 1' - def_havelibcdio='yes' -else - _libcdio=no - if test "$_cdparanoia" = yes ; then - res_comment="using cdparanoia" - fi - def_libcdio='#undef CONFIG_LIBCDIO' - def_havelibcdio='no' -fi -echores "$_libcdio" - -if test "$_cdda" = yes ; then + def_cdda='#define CONFIG_CDDA 1' test $_cddb = auto && test $networking = yes && _cddb=yes - def_cdparanoia='#define CONFIG_CDDA 1' inputmodules="cdda $inputmodules" else - def_cdparanoia='#undef CONFIG_CDDA' + _libcdio=no + _cdda='no' + def_cdda='#undef CONFIG_CDDA' noinputmodules="cdda $noinputmodules" fi +echores "$_libcdio" if test "$_cddb" = yes ; then def_cddb='#define CONFIG_CDDB 1' @@ -6683,9 +6648,9 @@ $(ff_config_enable "$cpuexts_all" "$cpuexts" "HAVE") #define DEFAULT_DVD_DEVICE "$default_dvd_device" $def_bluray $def_bsdi_dvd +$def_cdda $def_cddb $def_cdio -$def_cdparanoia $def_cdrom $def_dvd $def_dvd_bsd @@ -6696,7 +6661,6 @@ $def_dvdio $def_dvdnav $def_dvdread $def_hpux_scsi_h -$def_libcdio $def_sol_scsi_h $def_vcd -- cgit v1.2.3