From e0b6d5d6c8c553de0b65d60d9d24eb1df97bc2b3 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 9 Apr 2009 09:53:35 +0000 Subject: Change type of first argument of the print_int_array function from int to unsigned int, fixes warnings of the type: codec-cfg.c:1031: warning: pointer targets in passing argument 1 of 'print_int_array' differ in signedness git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29155 b3059339-0415-0410-9bf9-f77b7e298cf2 --- codec-cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codec-cfg.c b/codec-cfg.c index 2ba7fe60de..cfbf3b005b 100644 --- a/codec-cfg.c +++ b/codec-cfg.c @@ -957,7 +957,7 @@ void skiphtml(FILE *f1){ } } -static void print_int_array(const int* a, int size) +static void print_int_array(const unsigned int* a, int size) { printf("{ "); while (size--) -- cgit v1.2.3 From 486ce516255475e6ed70404bc6a75163344d8e4e Mon Sep 17 00:00:00 2001 From: reimar Date: Thu, 9 Apr 2009 14:23:09 +0000 Subject: Add a -indentify message that indicates if the current DVDNAV title is a menu or a video. Patch by Kevin DeKorte [kdekorte gmail com], approved by Nico. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29156 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/stream_dvdnav.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c index 85d86713c2..b8b9dcc397 100644 --- a/stream/stream_dvdnav.c +++ b/stream/stream_dvdnav.c @@ -205,10 +205,13 @@ static int dvdnav_stream_read(dvdnav_priv_t * priv, unsigned char *buf, int *len if(ev->pgc_length) priv->duration = ev->pgc_length/90; - if (dvdnav_is_domain_vts(priv->dvdnav)) + if (dvdnav_is_domain_vts(priv->dvdnav)) { + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "DVDNAV_TITLE_IS_MOVIE\n"); priv->state &= ~NAV_FLAG_VTS_DOMAIN; - else + } else { + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "DVDNAV_TITLE_IS_MENU\n"); priv->state |= NAV_FLAG_VTS_DOMAIN; + } nextstill = dvdnav_get_next_still_flag (priv->dvdnav); if (nextstill) { -- cgit v1.2.3 From a7e4ab04d7e714c572767e58b409a48ed46b862f Mon Sep 17 00:00:00 2001 From: reimar Date: Thu, 9 Apr 2009 20:04:24 +0000 Subject: Make sure waitop always unlocks the mainloop even if the operation could not be created. Patch by Lennart Poettering [lennart poettering net] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29157 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libao2/ao_pulse.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libao2/ao_pulse.c b/libao2/ao_pulse.c index 2d27c85540..66d28aa281 100644 --- a/libao2/ao_pulse.c +++ b/libao2/ao_pulse.c @@ -102,7 +102,10 @@ static void success_cb(pa_stream *s, int success, void *userdata) { */ static int waitop(pa_operation *op) { pa_operation_state_t state; - if (!op) return 0; + if (!op) { + pa_threaded_mainloop_unlock(mainloop); + return 0; + } state = pa_operation_get_state(op); while (state == PA_OPERATION_RUNNING) { pa_threaded_mainloop_wait(mainloop); -- cgit v1.2.3 From d1c4d6c7ef3625d6b2668a44406db832836d525c Mon Sep 17 00:00:00 2001 From: reimar Date: Thu, 9 Apr 2009 20:07:26 +0000 Subject: Also lock the mainloop when doing adjusting the volume for PulseAudio. Patch by Lennart Poettering [lennart poettering net] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29158 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libao2/ao_pulse.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libao2/ao_pulse.c b/libao2/ao_pulse.c index 66d28aa281..83270bbfcf 100644 --- a/libao2/ao_pulse.c +++ b/libao2/ao_pulse.c @@ -392,12 +392,15 @@ static int control(int cmd, void *arg) { volume.values[1] = (pa_volume_t)vol->right*PA_VOLUME_NORM/100; } + pa_threaded_mainloop_lock(mainloop); if (!(o = pa_context_set_sink_input_volume(context, pa_stream_get_index(stream), &volume, NULL, NULL))) { + pa_threaded_mainloop_unlock(mainloop); GENERIC_ERR_MSG(context, "pa_context_set_sink_input_volume() failed"); return CONTROL_ERROR; } /* We don't wait for completion here */ pa_operation_unref(o); + pa_threaded_mainloop_unlock(mainloop); return CONTROL_OK; } -- cgit v1.2.3 From 33645075f14917ed6b233c5c4c29d1e4ed8b4b35 Mon Sep 17 00:00:00 2001 From: reimar Date: Thu, 9 Apr 2009 20:10:35 +0000 Subject: Split oversized of "argument" onto a separate line. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29159 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libao2/ao_pulse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libao2/ao_pulse.c b/libao2/ao_pulse.c index 83270bbfcf..444b85814d 100644 --- a/libao2/ao_pulse.c +++ b/libao2/ao_pulse.c @@ -393,7 +393,8 @@ static int control(int cmd, void *arg) { } pa_threaded_mainloop_lock(mainloop); - if (!(o = pa_context_set_sink_input_volume(context, pa_stream_get_index(stream), &volume, NULL, NULL))) { + o = pa_context_set_sink_input_volume(context, pa_stream_get_index(stream), &volume, NULL, NULL); + if (!o) { pa_threaded_mainloop_unlock(mainloop); GENERIC_ERR_MSG(context, "pa_context_set_sink_input_volume() failed"); return CONTROL_ERROR; -- cgit v1.2.3 From fe9c8d60b435679cc68022b936a9a036b10ea2dc Mon Sep 17 00:00:00 2001 From: reimar Date: Thu, 9 Apr 2009 20:20:00 +0000 Subject: Disable pause-hack from PulseAudio 0.9.15 on, it should be fixed. Patch Lennart Poettering [lennart poettering net] with documentation update by me. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29160 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libao2/ao_pulse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libao2/ao_pulse.c b/libao2/ao_pulse.c index 444b85814d..b2fdcbb175 100644 --- a/libao2/ao_pulse.c +++ b/libao2/ao_pulse.c @@ -153,11 +153,11 @@ static int init(int rate_hz, int channels, int format, int flags) { } broken_pause = 0; - // not sure which versions are affected, assume 0.9.1* + // not sure which versions are affected, assume 0.9.11* to 0.9.14* // known bad: 0.9.14, 0.9.13 - // known good: 0.9.9, 0.9.10 + // known good: 0.9.9, 0.9.10, 0.9.15 // to test: pause, wait ca. 5 seconds framestep and see if MPlayer hangs somewhen - if (strncmp(version, "0.9.1", 5) == 0 && strncmp(version, "0.9.10", 6) != 0) { + if (strncmp(version, "0.9.1", 5) == 0 && version[5] >= '1' && version[5] <= '4') { mp_msg(MSGT_AO, MSGL_WARN, "[pulse] working around probably broken pause functionality,\n" " see http://www.pulseaudio.org/ticket/440\n"); broken_pause = 1; -- cgit v1.2.3 From b6225fc8ae3d70448d0deb15ad960f2dd4df2590 Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 10 Apr 2009 10:13:41 +0000 Subject: Make tvi_v4l2 print -1 as "Current input" if the ioctl to read it failed. Previously it printed (number of inputs + 1) which is needlessly confusing. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29161 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/tvi_v4l2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/stream/tvi_v4l2.c b/stream/tvi_v4l2.c index c890d7a51e..5bd654282e 100644 --- a/stream/tvi_v4l2.c +++ b/stream/tvi_v4l2.c @@ -1313,6 +1313,7 @@ static int init(priv_t *priv) } mp_msg(MSGT_TV, MSGL_INFO, " %d = %s;", i, input.name); } + i = -1; if (ioctl(priv->video_fd, VIDIOC_G_INPUT, &i) < 0) { mp_msg(MSGT_TV, MSGL_ERR, "%s: ioctl get input failed: %s\n", info.short_name, strerror(errno)); -- cgit v1.2.3 From e2023a903771f84c5054505de2fc519395e5eff6 Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 10 Apr 2009 13:09:39 +0000 Subject: gcc <3.1 is unsupported on Darwin, no need to check for this. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29162 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 3 --- 1 file changed, 3 deletions(-) diff --git a/configure b/configure index c3b63513e7..cb1aef07d6 100755 --- a/configure +++ b/configure @@ -8002,9 +8002,6 @@ libs_mplayer=$_ld_tmp ############################################################################# if darwin ; then CFLAGS="$CFLAGS -mdynamic-no-pic -falign-loops=16 -shared-libgcc" - if [ "$_cc_major" = 3 ] && [ "$_cc_minor" -lt 1 ]; then - CFLAGS="$CFLAGS -no-cpp-precomp" - fi fi if amigaos ; then CFLAGS="$CFLAGS -DNEWLIB -D__USE_INLINE__" -- cgit v1.2.3 From 01415637a098666a696056f86dca3330b26dadef Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 10 Apr 2009 13:12:28 +0000 Subject: Move amigaos CFLAG settings to amigaos section at the beginning of configure. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29163 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/configure b/configure index cb1aef07d6..9486422243 100755 --- a/configure +++ b/configure @@ -1466,6 +1466,7 @@ if amigaos ; then _sighandler=no _stream_cache=no def_stream_cache="#undef CONFIG_STREAM_CACHE" + CFLAGS="$CFLAGS -DNEWLIB -D__USE_INLINE__" fi if qnx ; then @@ -8003,9 +8004,6 @@ libs_mplayer=$_ld_tmp if darwin ; then CFLAGS="$CFLAGS -mdynamic-no-pic -falign-loops=16 -shared-libgcc" fi -if amigaos ; then - CFLAGS="$CFLAGS -DNEWLIB -D__USE_INLINE__" -fi # Thread support if linux ; then CFLAGS="$CFLAGS -D_REENTRANT" -- cgit v1.2.3 From b4546308e8787b652b43e8f8763af01b1246544f Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 10 Apr 2009 13:37:59 +0000 Subject: Move darwin CFLAG settings to darwin section at the beginning of configure. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29164 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/configure b/configure index 9486422243..bad4584b61 100755 --- a/configure +++ b/configure @@ -1432,6 +1432,7 @@ fi if darwin; then extra_ldflags="$extra_ldflags -L/usr/local/lib" extra_cflags="$extra_cflags -I/usr/local/include" + CFLAGS="$CFLAGS -mdynamic-no-pic -falign-loops=16 -shared-libgcc" _timer=timer-darwin.c fi @@ -8001,9 +8002,6 @@ libs_mplayer=$_ld_tmp ############################################################################# -if darwin ; then - CFLAGS="$CFLAGS -mdynamic-no-pic -falign-loops=16 -shared-libgcc" -fi # Thread support if linux ; then CFLAGS="$CFLAGS -D_REENTRANT" -- cgit v1.2.3 From 446980680f5e0b372b38de9183dee33c9d3923a6 Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 10 Apr 2009 13:38:57 +0000 Subject: Remove unnecessary Darwin default CFLAGS and LDFLAGS. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29165 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 2 -- 1 file changed, 2 deletions(-) diff --git a/configure b/configure index bad4584b61..d7963b6d4f 100755 --- a/configure +++ b/configure @@ -1430,8 +1430,6 @@ if netbsd || dragonfly ; then fi if darwin; then - extra_ldflags="$extra_ldflags -L/usr/local/lib" - extra_cflags="$extra_cflags -I/usr/local/include" CFLAGS="$CFLAGS -mdynamic-no-pic -falign-loops=16 -shared-libgcc" _timer=timer-darwin.c fi -- cgit v1.2.3 From 690714883e7b83acdf0185df7498064308fb715c Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 10 Apr 2009 14:41:18 +0000 Subject: Simplify: use av_fifo_space git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29166 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libao2/ao_jack.c | 4 ++-- libao2/ao_sdl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libao2/ao_jack.c b/libao2/ao_jack.c index 494d44aa19..8ee5550602 100644 --- a/libao2/ao_jack.c +++ b/libao2/ao_jack.c @@ -82,7 +82,7 @@ static AVFifoBuffer *buffer; * If there is not enough room, the buffer is filled up */ static int write_buffer(unsigned char* data, int len) { - int free = BUFFSIZE - av_fifo_size(buffer); + int free = av_fifo_space(buffer); if (len > free) len = free; return av_fifo_generic_write(buffer, data, len, NULL); } @@ -337,7 +337,7 @@ static void audio_resume(void) { } static int get_space(void) { - return BUFFSIZE - av_fifo_size(buffer); + return av_fifo_space(buffer); } /** diff --git a/libao2/ao_sdl.c b/libao2/ao_sdl.c index d5652ccf09..28279abc87 100644 --- a/libao2/ao_sdl.c +++ b/libao2/ao_sdl.c @@ -67,7 +67,7 @@ static unsigned char volume=SDL_MIX_MAXVOLUME; #endif static int write_buffer(unsigned char* data,int len){ - int free = BUFFSIZE - av_fifo_size(buffer); + int free = av_fifo_space(buffer); if (len > free) len = free; return av_fifo_generic_write(buffer, data, len, NULL); } @@ -280,7 +280,7 @@ static void audio_resume(void) // return: how many bytes can be played without blocking static int get_space(void){ - return BUFFSIZE - av_fifo_size(buffer); + return av_fifo_space(buffer); } // plays 'len' bytes of 'data' -- cgit v1.2.3 From c1fb3499ac18d9b94f7fa9258908cf682cba67c5 Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 10 Apr 2009 15:55:38 +0000 Subject: some updates about translation maintenance git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29167 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/tech/MAINTAINERS | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/DOCS/tech/MAINTAINERS b/DOCS/tech/MAINTAINERS index 68b0768bc4..4686b58294 100644 --- a/DOCS/tech/MAINTAINERS +++ b/DOCS/tech/MAINTAINERS @@ -43,9 +43,7 @@ Man page translations: * Italian: Daniele Forghieri * Polish: Waclaw Schiller * Spanish: Reynaldo H. Verdejo Pinochet (outdated) - * Chinese: unmaintained, outdated - * Swedish: unmaintained, outdated, incomplete - * Russian: Vladimir Voroshilov (incomplete) + * Russian: Vladimir Voroshilov Documentation translations: * Czech: Jiri Heryan @@ -55,8 +53,8 @@ Documentation translations: * Italian: Paolo Tresoldi * Polish: Waclaw Schiller * Spanish: Reynaldo H. Verdejo Pinochet (outdated) - * Chinese (simplified): unmaintained, outdated, still HTML - * Italian: unmaintained, outdated, still HTML + * Chinese (simplified): unmaintained, outdated + * Italian: unmaintained, outdated * Russian: Vladimir Voroshilov Platforms/ports: -- cgit v1.2.3 From 465abf0b8d77680a88c0e8e09a052e5e52e997bf Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 10 Apr 2009 17:39:44 +0000 Subject: Move thread-related CFLAGS settings into pthread test. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29168 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/configure b/configure index d7963b6d4f..b8a4477424 100755 --- a/configure +++ b/configure @@ -3288,6 +3288,11 @@ echores "$_dynamic_plugins" def_threads='#define HAVE_THREADS 0' echocheck "pthread" +if linux ; then + THREAD_CFLAGS=-D_REENTRANT +elif freebsd || netbsd || openbsd || bsdos ; then + THREAD_CFLAGS=-D_THREAD_SAFE +fi if test "$_pthreads" = auto ; then cat > $TMPC << EOF #include @@ -3298,7 +3303,7 @@ _pthreads=no if ! hpux ; then for _ld_tmp in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do # for crosscompilation, we cannot execute the program, be happy if we can link statically - cc_check $_ld_tmp && (tmp_run || test "$_ld_static") && _ld_pthread="$_ld_tmp" && _pthreads=yes && break + cc_check $THREAD_CFLAGS $_ld_tmp && (tmp_run || test "$_ld_static") && _ld_pthread="$_ld_tmp" && _pthreads=yes && break done fi fi @@ -3306,6 +3311,7 @@ if test "$_pthreads" = yes ; then test $_ld_pthread && _res_comment="using $_ld_pthread" def_pthreads='#define HAVE_PTHREADS 1' def_threads='#define HAVE_THREADS 1' + extra_cflags="$extra_cflags $THREAD_CFLAGS" else _res_comment="v4l, v4l2, ao_nas, win32 loader disabled" def_pthreads='#undef HAVE_PTHREADS' @@ -8000,13 +8006,6 @@ libs_mplayer=$_ld_tmp ############################################################################# -# Thread support -if linux ; then - CFLAGS="$CFLAGS -D_REENTRANT" -elif freebsd || netbsd || openbsd || bsdos ; then - # FIXME bsd needs this so maybe other OS'es - CFLAGS="$CFLAGS -D_THREAD_SAFE" -fi # 64 bit file offsets? if test "$_largefiles" = yes || freebsd ; then CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" -- cgit v1.2.3 From 3818abb4aef50d3122925a3d731904124ec1e9cc Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 10 Apr 2009 18:29:01 +0000 Subject: Move all CFLAGS checks together at the beginning of configure. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29169 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/configure b/configure index b8a4477424..5cdff8855d 100755 --- a/configure +++ b/configure @@ -2416,6 +2416,23 @@ elif test -z "$CFLAGS" ; then else _warn_CFLAGS=yes fi + +cat > $TMPC << EOF +int main(void) { return 0; } +EOF +if test "$cc_vendor" = "gnu" ; then + cc_check -std=gnu99 && CFLAGS="-std=gnu99 $CFLAGS" + cc_check -Wdeclaration-after-statement && CFLAGS="-Wdeclaration-after-statement $CFLAGS" + cc_check -Wno-pointer-sign && CFLAGS="-Wno-pointer-sign $CFLAGS" + cc_check -Wdisabled-optimization && CFLAGS="-Wdisabled-optimization $CFLAGS" + cc_check -Wundef && CFLAGS="-Wundef $CFLAGS" +else + CFLAGS="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS" +fi + +cc_check -mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer="-mno-omit-leaf-frame-pointer" + + if test -n "$LDFLAGS" ; then extra_ldflags="$extra_ldflags $LDFLAGS" _warn_CFLAGS=yes @@ -8017,21 +8034,6 @@ fi CXXFLAGS=" $CFLAGS -D__STDC_LIMIT_MACROS" -cat > $TMPC << EOF -int main(void) { return 0; } -EOF -if test "$cc_vendor" = "gnu" ; then - cc_check -std=gnu99 && CFLAGS="-std=gnu99 $CFLAGS" - cc_check -Wdeclaration-after-statement && CFLAGS="-Wdeclaration-after-statement $CFLAGS" - cc_check -Wno-pointer-sign && CFLAGS="-Wno-pointer-sign $CFLAGS" - cc_check -Wdisabled-optimization && CFLAGS="-Wdisabled-optimization $CFLAGS" - cc_check -Wundef && CFLAGS="-Wundef $CFLAGS" -else - CFLAGS="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS" -fi - -cc_check -mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer="-mno-omit-leaf-frame-pointer" - # This must be the last test to be performed. Any other tests following it # could fail due to linker errors. libdvdnavmini is intentionally not linked # against libdvdread (to permit MPlayer to use its own copy of the library). -- cgit v1.2.3 From 4567425051667ca3dd06749ca7b86e78b6073d6f Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 11 Apr 2009 13:51:02 +0000 Subject: Reemit the ID_AID_x_LANG for the track. This allows the identification of the audio track by language code (en or es) rather than by ID (128 or 129). patch by Kevin DeKorte, kdekorte gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29170 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/stream_dvdnav.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c index b8b9dcc397..adb0fcb54c 100644 --- a/stream/stream_dvdnav.c +++ b/stream/stream_dvdnav.c @@ -74,6 +74,7 @@ static const struct m_struct_st stream_opts = { }; static int seek(stream_t *s, off_t newpos); +static void show_audio_subs_languages(dvdnav_t *nav); static dvdnav_priv_t * new_dvdnav_stream(char * filename) { const char * title_str; @@ -343,6 +344,7 @@ static int fill_buffer(stream_t *s, char *but, int len) priv->state &= ~NAV_FLAG_WAIT; s->end_pos = 0; update_title_len(s); + show_audio_subs_languages(priv->dvdnav); if (priv->state & NAV_FLAG_WAIT_READ_AUTO) priv->state |= NAV_FLAG_WAIT_READ; if(dvdnav_current_title_info(priv->dvdnav, &tit, &part) == DVDNAV_STATUS_OK) { @@ -538,8 +540,12 @@ static void show_audio_subs_languages(dvdnav_t *nav) if(format == 0xFFFF || format > 6) format = 1; //unknown id = i + base[format]; - mp_msg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDaudioStreamInfo, i, - dvd_audio_stream_types[format], dvd_audio_stream_channels[channels], tmp, id); + if (lang != 0xFFFF) { + mp_msg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDaudioStreamInfo, i, + dvd_audio_stream_types[format], dvd_audio_stream_channels[channels], tmp, id); + if(lang && tmp[0]) + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AID_%d_LANG=%s\n", id, tmp); + } } for(i=0; i<32; i++) @@ -555,7 +561,8 @@ static void show_audio_subs_languages(dvdnav_t *nav) tmp[1] = lang & 0xFF; } tmp[2] = 0; - mp_msg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDsubtitleLanguage, i+0x20, tmp); + if (lang != 0xFFFF) + mp_msg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDsubtitleLanguage, i+0x20, tmp); } } -- cgit v1.2.3 From a5eaafc1798c32361c72e1e672c905376e6bf7db Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 12 Apr 2009 17:07:30 +0000 Subject: Use extra_cflags variable instead of CFLAGS to add system-specific CFLAGS. Otherwise the CFLAGS warning gets triggered and necessary CFLAGS are not set. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29171 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 5cdff8855d..fa09962c77 100755 --- a/configure +++ b/configure @@ -1430,7 +1430,7 @@ if netbsd || dragonfly ; then fi if darwin; then - CFLAGS="$CFLAGS -mdynamic-no-pic -falign-loops=16 -shared-libgcc" + extra_cflags="-mdynamic-no-pic -falign-loops=16 -shared-libgcc $extra_cflags" _timer=timer-darwin.c fi @@ -1465,7 +1465,7 @@ if amigaos ; then _sighandler=no _stream_cache=no def_stream_cache="#undef CONFIG_STREAM_CACHE" - CFLAGS="$CFLAGS -DNEWLIB -D__USE_INLINE__" + extra_cflags="-DNEWLIB -D__USE_INLINE__ $extra_cflags" fi if qnx ; then -- cgit v1.2.3 From a19db0165d357bfbfba259924407f4bb6138767f Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 12 Apr 2009 20:44:20 +0000 Subject: Reduce subtitle parsing verbosity. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29172 b3059339-0415-0410-9bf9-f77b7e298cf2 --- subreader.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/subreader.c b/subreader.c index 72e050380f..4e15c1ce1e 100644 --- a/subreader.c +++ b/subreader.c @@ -1261,7 +1261,7 @@ static void adjust_subs_time(subtitle* sub, float subtime, float fps, int block, sub = nextsub; m = 0; } - if (n) mp_msg(MSGT_SUBREADER,MSGL_INFO,"SUB: Adjusted %d subtitle(s).\n", n); + if (n) mp_msg(MSGT_SUBREADER,MSGL_V,"SUB: Adjusted %d subtitle(s).\n", n); } struct subreader { @@ -1364,7 +1364,7 @@ sub_data* sub_read_file (char *filename, float fps) { mpsub_multiplier = (uses_time ? 100.0 : 1.0); if (sub_format==SUB_INVALID) {mp_msg(MSGT_SUBREADER,MSGL_WARN,"SUB: Could not determine file format\n");return NULL;} srp=sr+sub_format; - mp_msg(MSGT_SUBREADER,MSGL_INFO,"SUB: Detected subtitle file format: %s\n", srp->name); + mp_msg(MSGT_SUBREADER, MSGL_V, "SUB: Detected subtitle file format: %s\n", srp->name); stream_reset(fd); stream_seek(fd,0); @@ -1479,9 +1479,8 @@ sub_data* sub_read_file (char *filename, float fps) { #endif // printf ("SUB: Subtitle format %s time.\n", uses_time?"uses":"doesn't use"); - mp_msg(MSGT_SUBREADER,MSGL_INFO,"SUB: Read %i subtitles", sub_num); - if (sub_errs) mp_msg(MSGT_SUBREADER,MSGL_INFO,", %i bad line(s).\n", sub_errs); - else mp_msg(MSGT_SUBREADER,MSGL_INFO,".\n"); + mp_msg(MSGT_SUBREADER, MSGL_V,"SUB: Read %i subtitles, %i bad line(s).\n", + sub_num, sub_errs); if(sub_num<=0){ free(first); -- cgit v1.2.3 From 77546eb75456e83a9140139e89fecbca051da36b Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 12 Apr 2009 21:28:45 +0000 Subject: Fix E-AC-3 channel ordering. E-AC-3 needs to use the same ordering as AC-3, not the standard ordering. patch by Andrew de Quincey, adq_dvb lidskialf net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29173 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/ad_ffmpeg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libmpcodecs/ad_ffmpeg.c b/libmpcodecs/ad_ffmpeg.c index 32a9fc2789..d1de98e09f 100644 --- a/libmpcodecs/ad_ffmpeg.c +++ b/libmpcodecs/ad_ffmpeg.c @@ -175,7 +175,8 @@ static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int m if (((AVCodecContext *)sh_audio->context)->channels >= 5) { int src_ch_layout = AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT; const char *codec=((AVCodecContext*)sh_audio->context)->codec->name; - if (!strcasecmp(codec, "ac3")) + if (!strcasecmp(codec, "ac3") + || !strcasecmp(codec, "eac3")) src_ch_layout = AF_CHANNEL_LAYOUT_LAVC_AC3_DEFAULT; else if (!strcasecmp(codec, "dca")) src_ch_layout = AF_CHANNEL_LAYOUT_LAVC_DCA_DEFAULT; -- cgit v1.2.3 From 0160ed61b358ef872d5106ff69937cf6ce19dd7c Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 12 Apr 2009 22:43:03 +0000 Subject: whitespace cosmetics: Reindent a few lines and break a few excessively long lines. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29174 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale_internal.h | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index 070161900b..4b16381001 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -54,8 +54,9 @@ struct SwsContext; -typedef int (*SwsFunc)(struct SwsContext *context, uint8_t* src[], int srcStride[], int srcSliceY, - int srcSliceH, uint8_t* dst[], int dstStride[]); +typedef int (*SwsFunc)(struct SwsContext *context, uint8_t* src[], + int srcStride[], int srcSliceY, int srcSliceH, + uint8_t* dst[], int dstStride[]); /* This struct should be aligned on at least a 32-byte boundary. */ typedef struct SwsContext{ @@ -183,7 +184,6 @@ typedef struct SwsContext{ int32_t alpMmxFilter[4*MAX_FILTER_SIZE]; #if HAVE_ALTIVEC - vector signed short CY; vector signed short CRV; vector signed short CBU; @@ -192,10 +192,8 @@ typedef struct SwsContext{ vector signed short OY; vector unsigned short CSHIFT; vector signed short *vYCoeffsBank, *vCCoeffsBank; - #endif - #if ARCH_BFIN uint32_t oy __attribute__((aligned(4))); uint32_t oc __attribute__((aligned(4))); @@ -260,18 +258,23 @@ typedef struct SwsContext{ const uint8_t *src, int srcW, int xInc); void (*hcscale_fast)(struct SwsContext *c, int16_t *dst, int dstWidth, - const uint8_t *src1, const uint8_t *src2, int srcW, int xInc); + const uint8_t *src1, const uint8_t *src2, + int srcW, int xInc); void (*hScale)(int16_t *dst, int dstW, const uint8_t *src, int srcW, - int xInc, const int16_t *filter, const int16_t *filterPos, long filterSize); + int xInc, const int16_t *filter, const int16_t *filterPos, + long filterSize); } SwsContext; //FIXME check init (where 0) SwsFunc ff_yuv2rgb_get_func_ptr(SwsContext *c); -int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], int fullRange, int brightness, int contrast, int saturation); +int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], + int fullRange, int brightness, + int contrast, int saturation); -void ff_yuv2rgb_init_tables_altivec(SwsContext *c, const int inv_table[4], int brightness, int contrast, int saturation); +void ff_yuv2rgb_init_tables_altivec(SwsContext *c, const int inv_table[4], + int brightness, int contrast, int saturation); SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c); SwsFunc ff_yuv2rgb_init_vis(SwsContext *c); SwsFunc ff_yuv2rgb_init_mlib(SwsContext *c); @@ -279,9 +282,9 @@ SwsFunc ff_yuv2rgb_init_altivec(SwsContext *c); SwsFunc ff_yuv2rgb_get_func_ptr_bfin(SwsContext *c); void ff_bfin_get_unscaled_swscale(SwsContext *c); void ff_yuv2packedX_altivec(SwsContext *c, - int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize, - int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize, - uint8_t *dest, int dstW, int dstY); + int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize, + int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize, + uint8_t *dest, int dstW, int dstY); const char *sws_format_name(int format); -- cgit v1.2.3 From e72dc59c77e576ee344d041b054539225f55e4ed Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 12 Apr 2009 22:49:58 +0000 Subject: Move addition of MMX-OBJS to OBJS into common.mak instead of duplicating it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29175 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/libswscale/Makefile b/libswscale/Makefile index ce0f7cebc1..c209ad8984 100644 --- a/libswscale/Makefile +++ b/libswscale/Makefile @@ -16,8 +16,6 @@ OBJS-$(HAVE_VIS) += sparc/yuv2rgb_vis.o MMX-OBJS-$(CONFIG_GPL) += x86/yuv2rgb_mmx.o \ -OBJS-$(HAVE_MMX) += $(MMX-OBJS-yes) - EXAMPLES = swscale TESTPROGS = colorspace -- cgit v1.2.3 From f71347e0f34e91407571edd6c60bb6af3825782e Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 13 Apr 2009 08:55:20 +0000 Subject: Sync with latest FFmpeg changes. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29176 b3059339-0415-0410-9bf9-f77b7e298cf2 --- common.mak | 67 +++++++++++++++++++------------------------------------------- subdir.mak | 34 +++++++++++++++++++++++++++++-- 2 files changed, 52 insertions(+), 49 deletions(-) diff --git a/common.mak b/common.mak index 4be056c876..23907af9f2 100644 --- a/common.mak +++ b/common.mak @@ -5,9 +5,9 @@ all: # make "all" default target ifndef SUBDIR -vpath %.c $(SRC_DIR) -vpath %.h $(SRC_DIR) -vpath %.S $(SRC_DIR) +vpath %.c $(SRC_DIR) +vpath %.h $(SRC_DIR) +vpath %.S $(SRC_DIR) vpath %.asm $(SRC_DIR) ifeq ($(SRC_DIR),$(SRC_PATH_BARE)) @@ -18,14 +18,13 @@ endif ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale -CFLAGS := -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ - -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(OPTFLAGS) +CFLAGS := -DHAVE_AV_CONFIG_H -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(OPTFLAGS) %.o: %.c $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< %.o: %.S - $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< + $(AS) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< %.ho: %.h $(CC) $(CFLAGS) $(LIBOBJFLAGS) -Wno-unused -c -o $@ -x c $< @@ -48,28 +47,31 @@ ifeq ($(wildcard $(SVN_ENTRIES)),$(SVN_ENTRIES)) $(BUILD_ROOT_REL)/version.h: $(SVN_ENTRIES) endif -$(BUILD_ROOT_REL)/version.h: $(SRC_PATH_BARE)/version.sh +$(BUILD_ROOT_REL)/version.h: $(SRC_PATH_BARE)/version.sh config.mak $< $(SRC_PATH) $@ $(EXTRA_VERSION) install: install-libs install-headers uninstall: uninstall-libs uninstall-headers -.PHONY: all depend dep clean distclean install* uninstall* tests +.PHONY: all depend dep *clean install* uninstall* examples testprogs endif -CFLAGS += $(CFLAGS-yes) -OBJS += $(OBJS-yes) -FFLIBS := $(FFLIBS-yes) $(FFLIBS) -TESTS += $(TESTS-yes) +OBJS-$(HAVE_MMX) += $(MMX-OBJS-yes) + +CFLAGS += $(CFLAGS-yes) +OBJS += $(OBJS-yes) +FFLIBS := $(FFLIBS-yes) $(FFLIBS) +TESTPROGS += $(TESTPROGS-yes) FFEXTRALIBS := $(addprefix -l,$(addsuffix $(BUILDSUF),$(FFLIBS))) $(EXTRALIBS) -FFLDFLAGS := $(addprefix -L$(BUILD_ROOT)/lib,$(FFLIBS)) $(LDFLAGS) +FFLDFLAGS := $(addprefix -L$(BUILD_ROOT)/lib,$(ALLFFLIBS)) $(LDFLAGS) -OBJS := $(addprefix $(SUBDIR),$(OBJS)) -TESTS := $(addprefix $(SUBDIR),$(TESTS)) +EXAMPLES := $(addprefix $(SUBDIR),$(addsuffix -example$(EXESUF),$(EXAMPLES))) +OBJS := $(addprefix $(SUBDIR),$(OBJS)) +TESTPROGS := $(addprefix $(SUBDIR),$(addsuffix -test$(EXESUF),$(TESTPROGS))) -DEP_LIBS:=$(foreach NAME,$(FFLIBS),lib$(NAME)/$($(BUILD_SHARED:yes=S)LIBNAME)) +DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(BUILD_SHARED:yes=S)LIBNAME)) ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h)) checkheaders: $(filter-out %_template.ho,$(ALLHEADERS:.h=.ho)) @@ -77,37 +79,8 @@ checkheaders: $(filter-out %_template.ho,$(ALLHEADERS:.h=.ho)) DEPS := $(OBJS:.o=.d) depend dep: $(DEPS) -CLEANSUFFIXES = *.o *~ *.ho -LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp *.map +CLEANSUFFIXES = *.o *~ *.ho DISTCLEANSUFFIXES = *.d *.pc - -define RULES -$(SUBDIR)%$(EXESUF): $(SUBDIR)%.o - $(CC) $(FFLDFLAGS) -o $$@ $$^ $(SUBDIR)$(LIBNAME) $(FFEXTRALIBS) - -$(SUBDIR)%-test.o: $(SUBDIR)%.c - $(CC) $(CFLAGS) -DTEST -c -o $$@ $$^ - -$(SUBDIR)%-test.o: $(SUBDIR)%-test.c - $(CC) $(CFLAGS) -DTEST -c -o $$@ $$^ - -$(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm - $(YASM) $(YASMFLAGS) -I $$( $$@ - -clean:: - rm -f $(TESTS) $(addprefix $(SUBDIR),$(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \ - $(addprefix $(SUBDIR), $(foreach suffix,$(CLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS)))) - -distclean:: clean - rm -f $(addprefix $(SUBDIR),$(DISTCLEANSUFFIXES)) \ - $(addprefix $(SUBDIR), $(foreach suffix,$(DISTCLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS)))) -endef - -$(eval $(RULES)) - -tests: $(TESTS) +LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp *.map -include $(DEPS) diff --git a/subdir.mak b/subdir.mak index df5bb8a09a..7148ce6fcd 100644 --- a/subdir.mak +++ b/subdir.mak @@ -18,7 +18,32 @@ endif INCINSTDIR := $(INCDIR)/lib$(NAME) +THIS_LIB := $(SUBDIR)$($(BUILD_SHARED:yes=S)LIBNAME) + define RULES +$(SUBDIR)%$(EXESUF): $(SUBDIR)%.o + $(CC) $(FFLDFLAGS) -o $$@ $$^ -l$(FULLNAME) $(FFEXTRALIBS) $$(ELIBS) + +$(SUBDIR)%-test.o: $(SUBDIR)%.c + $(CC) $(CFLAGS) -DTEST -c -o $$@ $$^ + +$(SUBDIR)%-test.o: $(SUBDIR)%-test.c + $(CC) $(CFLAGS) -DTEST -c -o $$@ $$^ + +$(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm + $(YASM) $(YASMFLAGS) -I $$( $$@ + +clean:: + rm -f $(EXAMPLES) $(addprefix $(SUBDIR),*-test$(EXESUF) $(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \ + $(addprefix $(SUBDIR), $(foreach suffix,$(CLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS)))) + +distclean:: clean + rm -f $(addprefix $(SUBDIR),$(DISTCLEANSUFFIXES)) \ + $(addprefix $(SUBDIR), $(foreach suffix,$(DISTCLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS)))) + ifdef BUILD_SHARED all: $(SUBDIR)$(SLIBNAME) @@ -39,7 +64,7 @@ endif install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME) install -d "$(SHLIBDIR)" - install -m 755 $(SUBDIR)$(SLIBNAME) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)" + install -m 755 $$< "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)" $(STRIP) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)" cd "$(SHLIBDIR)" && \ $(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME_WITH_MAJOR) @@ -49,7 +74,7 @@ install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME) install-lib$(NAME)-static: $(SUBDIR)$(LIBNAME) install -d "$(LIBDIR)" - install -m 644 $(SUBDIR)$(LIBNAME) "$(LIBDIR)" + install -m 644 $$< "$(LIBDIR)" $(LIB_INSTALL_EXTRA_CMD) install-headers:: @@ -72,3 +97,8 @@ uninstall-headers:: endef $(eval $(RULES)) + +$(EXAMPLES) $(TESTPROGS): $(THIS_LIB) $(DEP_LIBS) + +examples: $(EXAMPLES) +testprogs: $(TESTPROGS) -- cgit v1.2.3 From d9e794a24f0a13668d747ced3f02b462c2426767 Mon Sep 17 00:00:00 2001 From: gpoirier Date: Mon, 13 Apr 2009 20:07:03 +0000 Subject: fix a memory leak leading to ~80 bytes being leaked at each call to flip_page. Patch by Alexander Strange %astrange A ithinksw.com% Original thread: date: Thu, Apr 9, 2009 at 4:47 AM git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29177 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_macosx.m | 1 + 1 file changed, 1 insertion(+) diff --git a/libvo/vo_macosx.m b/libvo/vo_macosx.m index 8a238191c7..ea4e0ebb7c 100644 --- a/libvo/vo_macosx.m +++ b/libvo/vo_macosx.m @@ -835,6 +835,7 @@ static int control(uint32_t request, void *data, ...) { CVReturn error = kCVReturnSuccess; + CVOpenGLTextureRelease(texture); error = CVOpenGLTextureCacheCreateTextureFromImage(NULL, textureCache, frameBuffers[image_page], 0, &texture); if(error != kCVReturnSuccess) mp_msg(MSGT_VO, MSGL_ERR,"Failed to create OpenGL texture(%d)\n", error); -- cgit v1.2.3 From a0bd74f06d73491f7a38e8e8f2bec007d8995d7c Mon Sep 17 00:00:00 2001 From: rik Date: Mon, 13 Apr 2009 21:43:57 +0000 Subject: follow renaming of pbBufPtr() to put_bits_ptr() by stefano git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29178 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf_zrmjpeg.c | 2 +- libvo/jpeg_enc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libmpcodecs/vf_zrmjpeg.c b/libmpcodecs/vf_zrmjpeg.c index 0d45666aa4..71beb90433 100644 --- a/libmpcodecs/vf_zrmjpeg.c +++ b/libmpcodecs/vf_zrmjpeg.c @@ -620,7 +620,7 @@ static int jpeg_enc_frame(jpeg_enc_t *j, uint8_t *y_data, //if (j->s->mjpeg_write_tables == 1) // j->s->mjpeg_write_tables = 0; - return pbBufPtr(&(j->s->pb)) - j->s->pb.buf; + return put_bits_ptr(&(j->s->pb)) - j->s->pb.buf; } /// the real uninit routine diff --git a/libvo/jpeg_enc.c b/libvo/jpeg_enc.c index a0f76ee6d2..6cf00f7e56 100644 --- a/libvo/jpeg_enc.c +++ b/libvo/jpeg_enc.c @@ -484,7 +484,7 @@ int jpeg_enc_frame(jpeg_enc_t *j, unsigned char *y_data, //if (j->s->mjpeg_write_tables == 1) // j->s->mjpeg_write_tables = 0; - return pbBufPtr(&(j->s->pb)) - j->s->pb.buf; + return put_bits_ptr(&(j->s->pb)) - j->s->pb.buf; } void jpeg_enc_uninit(jpeg_enc_t *j) { -- cgit v1.2.3 From d323bf61358b4f2309db5c33bce66a382f2859aa Mon Sep 17 00:00:00 2001 From: sdrik Date: Tue, 14 Apr 2009 14:11:57 +0000 Subject: Do not use abgrToA for both luma and alpha channel in hyscale. This fixes RGB32 (et al.) scaling. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29179 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale_internal.h | 2 ++ libswscale/swscale_template.c | 19 +++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index 4b16381001..564d060a3d 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -250,6 +250,8 @@ typedef struct SwsContext{ void (*hyscale_internal)(uint8_t *dst, const uint8_t *src, long width, uint32_t *pal); + void (*hascale_internal)(uint8_t *dst, const uint8_t *src, + long width, uint32_t *pal); void (*hcscale_internal)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *pal); diff --git a/libswscale/swscale_template.c b/libswscale/swscale_template.c index 49ce0d32d5..a5bd2f5e46 100644 --- a/libswscale/swscale_template.c +++ b/libswscale/swscale_template.c @@ -2272,6 +2272,7 @@ static inline void RENAME(hyscale)(SwsContext *c, uint16_t *dst, long dstWidth, int16_t *mmx2Filter = c->lumMmx2Filter; int canMMX2BeUsed = c->canMMX2BeUsed; void *funnyYCode = c->funnyYCode; + void (*internal_func)(uint8_t *, const uint8_t *, long, uint32_t *) = isAlpha ? c->hascale_internal : c->hyscale_internal; if (isAlpha) { if (srcFormat == PIX_FMT_RGB32 || srcFormat == PIX_FMT_BGR32 ) @@ -2281,8 +2282,8 @@ static inline void RENAME(hyscale)(SwsContext *c, uint16_t *dst, long dstWidth, src += ALT32_CORR; } - if (c->hyscale_internal) { - c->hyscale_internal(formatConvBuffer, src, srcW, pal); + if (internal_func) { + internal_func(formatConvBuffer, src, srcW, pal); src= formatConvBuffer; } @@ -3114,6 +3115,7 @@ static void RENAME(sws_init_swScale)(SwsContext *c) } c->hyscale_internal = NULL; + c->hascale_internal = NULL; switch (srcFormat) { case PIX_FMT_YUYV422 : case PIX_FMT_GRAY16BE : c->hyscale_internal = RENAME(yuy2ToY); break; @@ -3132,20 +3134,17 @@ static void RENAME(sws_init_swScale)(SwsContext *c) case PIX_FMT_RGB4_BYTE: c->hyscale_internal = RENAME(palToY); break; case PIX_FMT_MONOBLACK: c->hyscale_internal = RENAME(monoblack2Y); break; case PIX_FMT_MONOWHITE: c->hyscale_internal = RENAME(monowhite2Y); break; + case PIX_FMT_RGB32 : + case PIX_FMT_RGB32_1: c->hyscale_internal = RENAME(bgr32ToY); break; + case PIX_FMT_BGR32 : + case PIX_FMT_BGR32_1: c->hyscale_internal = RENAME(rgb32ToY); break; } if (c->alpPixBuf) { switch (srcFormat) { case PIX_FMT_RGB32 : case PIX_FMT_RGB32_1: case PIX_FMT_BGR32 : - case PIX_FMT_BGR32_1: c->hyscale_internal = RENAME(abgrToA); break; - } - } else { - switch (srcFormat) { - case PIX_FMT_RGB32 : - case PIX_FMT_RGB32_1: c->hyscale_internal = RENAME(bgr32ToY); break; - case PIX_FMT_BGR32 : - case PIX_FMT_BGR32_1: c->hyscale_internal = RENAME(rgb32ToY); break; + case PIX_FMT_BGR32_1: c->hascale_internal = RENAME(abgrToA); break; } } } -- cgit v1.2.3 From f97bdd7504c6e68641ed9669ecef8df500ac8f78 Mon Sep 17 00:00:00 2001 From: diego Date: Tue, 14 Apr 2009 14:39:04 +0000 Subject: whitespace cosmetics: Break some overly long lines. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29180 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale.h | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/libswscale/swscale.h b/libswscale/swscale.h index 6efd90fcda..522824831b 100644 --- a/libswscale/swscale.h +++ b/libswscale/swscale.h @@ -127,8 +127,10 @@ void sws_freeContext(struct SwsContext *swsContext); * @param flags specify which algorithm and options to use for rescaling * @return a pointer to an allocated context, or NULL in case of error */ -struct SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int dstW, int dstH, enum PixelFormat dstFormat, int flags, - SwsFilter *srcFilter, SwsFilter *dstFilter, double *param); +struct SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, + int dstW, int dstH, enum PixelFormat dstFormat, + int flags, SwsFilter *srcFilter, + SwsFilter *dstFilter, double *param); /** * Scales the image slice in \p srcSlice and puts the resulting scaled @@ -152,19 +154,24 @@ struct SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat * the destination image * @return the height of the output slice */ -int sws_scale(struct SwsContext *context, uint8_t* srcSlice[], int srcStride[], int srcSliceY, - int srcSliceH, uint8_t* dst[], int dstStride[]); +int sws_scale(struct SwsContext *context, uint8_t* srcSlice[], int srcStride[], + int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]); #if LIBSWSCALE_VERSION_MAJOR < 1 /** * @deprecated Use sws_scale() instead. */ -int sws_scale_ordered(struct SwsContext *context, uint8_t* src[], int srcStride[], int srcSliceY, - int srcSliceH, uint8_t* dst[], int dstStride[]) attribute_deprecated; +int sws_scale_ordered(struct SwsContext *context, uint8_t* src[], + int srcStride[], int srcSliceY, int srcSliceH, + uint8_t* dst[], int dstStride[]) attribute_deprecated; #endif -int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4], int srcRange, const int table[4], int dstRange, int brightness, int contrast, int saturation); -int sws_getColorspaceDetails(struct SwsContext *c, int **inv_table, int *srcRange, int **table, int *dstRange, int *brightness, int *contrast, int *saturation); +int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4], + int srcRange, const int table[4], int dstRange, + int brightness, int contrast, int saturation); +int sws_getColorspaceDetails(struct SwsContext *c, int **inv_table, + int *srcRange, int **table, int *dstRange, + int *brightness, int *contrast, int *saturation); /** * Returns a normalized Gaussian curve used to filter stuff @@ -241,7 +248,8 @@ void sws_freeFilter(SwsFilter *filter); */ struct SwsContext *sws_getCachedContext(struct SwsContext *context, int srcW, int srcH, enum PixelFormat srcFormat, - int dstW, int dstH, enum PixelFormat dstFormat, int flags, - SwsFilter *srcFilter, SwsFilter *dstFilter, double *param); + int dstW, int dstH, enum PixelFormat dstFormat, + int flags, SwsFilter *srcFilter, + SwsFilter *dstFilter, double *param); #endif /* SWSCALE_SWSCALE_H */ -- cgit v1.2.3 From 350ad05cc93d7aaa066793477e8fa9689fb0f9dc Mon Sep 17 00:00:00 2001 From: reimar Date: Wed, 15 Apr 2009 08:38:39 +0000 Subject: libavformat is now the default for mov, update extension.c to match this. Fixes direct playback of e.g. http://accent.gmu.edu/soundtracks/japanese7.mov which was played by the native demuxer (and that one is broken for it). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29181 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/extension.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libmpdemux/extension.c b/libmpdemux/extension.c index 88cc17f3a7..3c0ad66cf7 100644 --- a/libmpdemux/extension.c +++ b/libmpdemux/extension.c @@ -21,9 +21,9 @@ static struct { { "vob", DEMUXER_TYPE_MPEG_PS }, { "m2v", DEMUXER_TYPE_MPEG_PS }, { "avi", DEMUXER_TYPE_AVI }, - { "mp4", DEMUXER_TYPE_MOV }, - { "mov", DEMUXER_TYPE_MOV }, - { "qt", DEMUXER_TYPE_MOV }, + { "mp4", DEMUXER_TYPE_LAVF }, + { "mov", DEMUXER_TYPE_LAVF }, + { "qt", DEMUXER_TYPE_LAVF }, { "asx", DEMUXER_TYPE_ASF }, { "asf", DEMUXER_TYPE_ASF }, { "wmv", DEMUXER_TYPE_ASF }, -- cgit v1.2.3 From 10295ba5a0ecd3765118ccd2cb6dd0c5211f1064 Mon Sep 17 00:00:00 2001 From: diego Date: Wed, 15 Apr 2009 17:08:41 +0000 Subject: Simplify OS detection functions. The return statement in the functions appears unnecessary; remove it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29182 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/configure b/configure index fa09962c77..202a368005 100755 --- a/configure +++ b/configure @@ -110,26 +110,26 @@ die () { issystem() { test "`echo $system_name | tr A-Z a-z`" = "`echo $1 | tr A-Z a-z`" } -linux() { issystem "Linux" || issystem "uClinux" ; return "$?" ; } -sunos() { issystem "SunOS" ; return "$?" ; } -hpux() { issystem "HP-UX" ; return "$?" ; } -irix() { issystem "IRIX" ; return "$?" ; } -aix() { issystem "AIX" ; return "$?" ; } -cygwin() { issystem "CYGWIN" ; return "$?" ; } -freebsd() { issystem "FreeBSD" || issystem "GNU/kFreeBSD"; return "$?" ; } -netbsd() { issystem "NetBSD" ; return "$?" ; } -bsdos() { issystem "BSD/OS" ; return "$?" ; } -openbsd() { issystem "OpenBSD" ; return "$?" ; } -dragonfly() { issystem "DragonFly" ; return "$?" ; } -qnx() { issystem "QNX" ; return "$?" ; } -darwin() { issystem "Darwin" ; return "$?" ; } -gnu() { issystem "GNU" ; return "$?" ; } -mingw32() { issystem "MINGW32" ; return "$?" ; } -morphos() { issystem "MorphOS" ; return "$?" ; } -amigaos() { issystem "AmigaOS" ; return "$?" ; } -win32() { cygwin || mingw32 ; return "$?" ; } -beos() { issystem "BEOS" ; return "$?" ; } -os2() { issystem "OS/2" ; return "$?" ; } +aix() { issystem "AIX"; } +amigaos() { issystem "AmigaOS"; } +beos() { issystem "BEOS"; } +bsdos() { issystem "BSD/OS"; } +cygwin() { issystem "CYGWIN"; } +darwin() { issystem "Darwin"; } +dragonfly() { issystem "DragonFly"; } +freebsd() { issystem "FreeBSD" || issystem "GNU/kFreeBSD"; } +gnu() { issystem "GNU"; } +hpux() { issystem "HP-UX"; } +irix() { issystem "IRIX"; } +linux() { issystem "Linux"; } +mingw32() { issystem "MINGW32"; } +morphos() { issystem "MorphOS"; } +netbsd() { issystem "NetBSD"; } +openbsd() { issystem "OpenBSD"; } +os2() { issystem "OS/2"; } +qnx() { issystem "QNX"; } +sunos() { issystem "SunOS"; } +win32() { cygwin || mingw32; } # arch test boolean functions # x86/x86pc is used by QNX -- cgit v1.2.3 From b6d31704a9999199a80bf97625446f56b54555a9 Mon Sep 17 00:00:00 2001 From: diego Date: Wed, 15 Apr 2009 20:00:26 +0000 Subject: Replace all `` by $(), it is more readable and easier to nest. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29183 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 446 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 223 insertions(+), 223 deletions(-) diff --git a/configure b/configure index 202a368005..852f5cfb75 100755 --- a/configure +++ b/configure @@ -108,7 +108,7 @@ die () { # OS test booleans functions issystem() { - test "`echo $system_name | tr A-Z a-z`" = "`echo $1 | tr A-Z a-z`" + test "$(echo $system_name | tr A-Z a-z)" = "$(echo $1 | tr A-Z a-z)" } aix() { issystem "AIX"; } amigaos() { issystem "AmigaOS"; } @@ -192,14 +192,14 @@ echores() { ############################################################################# # Check how echo works in this /bin/sh -case `echo -n` in +case $(echo -n) in -n) _echo_n= _echo_c='\c' ;; # SysV echo *) _echo_n='-n ' _echo_c= ;; # BSD echo esac -msg_lang_all=`echo help/help_mp-??.h help/help_mp-??_??.h | sed -e "s:help/help_mp-\(..\).h:\1:g" -e "s:help/help_mp-\(.....\).h:\1:g"` -man_lang_all=`echo DOCS/man/??/mplayer.1 DOCS/man/??_??/mplayer.1 | sed -e "s:DOCS/man/\(..\)/mplayer.1:\1:g" -e "s:DOCS/man/\(.._..\)/mplayer.1:\1:g"` -doc_lang_all=`echo DOCS/xml/??/ DOCS/xml/??_??/ | sed -e "s:DOCS/xml/\(..\)/:\1:g" -e "s:DOCS/xml/\(.._..\)/:\1:g"` +msg_lang_all=$(echo help/help_mp-??.h help/help_mp-??_??.h | sed -e "s:help/help_mp-\(..\).h:\1:g" -e "s:help/help_mp-\(.....\).h:\1:g") +man_lang_all=$(echo DOCS/man/??/mplayer.1 DOCS/man/??_??/mplayer.1 | sed -e "s:DOCS/man/\(..\)/mplayer.1:\1:g" -e "s:DOCS/man/\(.._..\)/mplayer.1:\1:g") +doc_lang_all=$(echo DOCS/xml/??/ DOCS/xml/??_??/ | sed -e "s:DOCS/xml/\(..\)/:\1:g" -e "s:DOCS/xml/\(.._..\)/:\1:g") show_help(){ cat << EOF @@ -526,19 +526,19 @@ _libavutil_so=auto _libavcodec_a=auto _libamr_nb=auto _libamr_wb=auto -_libavdecoders_all=`sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'` -_libavdecoders=` echo $_libavdecoders_all | sed -e 's/ LIB[A-Z0-9_]*_DECODER//g' -e s/MPEG4AAC_DECODER//` -_libavencoders_all=`sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'` -_libavencoders=` echo $_libavencoders_all | sed 's/ LIB[A-Z0-9_]*_ENCODER//g'` -_libavparsers_all=`sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'` +_libavdecoders_all=$(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') +_libavdecoders=$(echo $_libavdecoders_all | sed -e 's/ LIB[A-Z0-9_]*_DECODER//g' -e s/MPEG4AAC_DECODER//) +_libavencoders_all=$(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') +_libavencoders=$(echo $_libavencoders_all | sed 's/ LIB[A-Z0-9_]*_ENCODER//g') +_libavparsers_all=$(sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') _libavparsers=$_libavparsers_all -_libavbsfs_all=`sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'` +_libavbsfs_all=$(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') _libavbsfs=$_libavbsfs_all -_libavdemuxers_all=`sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'` -_libavdemuxers=`echo $_libavdemuxers_all | sed -e 's/ LIB[A-Z0-9_]*_DEMUXER//g' -e s/REDIR_DEMUXER// -e s/RTSP_DEMUXER// -e s/SDP_DEMUXER// -e s/AVISYNTH_DEMUXER// ` -_libavmuxers_all=`sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'` -_libavmuxers=`echo $_libavmuxers_all | sed -e 's/ LIB[A-Z0-9_]*_MUXER//g' -e s/RTP_MUXER// ` -_libavprotocols_all=`sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'` +_libavdemuxers_all=$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]') +_libavdemuxers=$(echo $_libavdemuxers_all | sed -e 's/ LIB[A-Z0-9_]*_DEMUXER//g' -e s/REDIR_DEMUXER// -e s/RTSP_DEMUXER// -e s/SDP_DEMUXER// -e s/AVISYNTH_DEMUXER//) +_libavmuxers_all=$(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]') +_libavmuxers=$(echo $_libavmuxers_all | sed -e 's/ LIB[A-Z0-9_]*_MUXER//g' -e s/RTP_MUXER//) +_libavprotocols_all=$(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]') _libavcodec_so=auto _libavformat_a=auto _libavformat_so=auto @@ -738,113 +738,113 @@ for ac_option do show_help ;; --prefix=*) - _prefix=`echo $ac_option | cut -d '=' -f 2` + _prefix=$(echo $ac_option | cut -d '=' -f 2) ;; --bindir=*) - _bindir=`echo $ac_option | cut -d '=' -f 2` + _bindir=$(echo $ac_option | cut -d '=' -f 2) ;; --datadir=*) - _datadir=`echo $ac_option | cut -d '=' -f 2` + _datadir=$(echo $ac_option | cut -d '=' -f 2) ;; --mandir=*) - _mandir=`echo $ac_option | cut -d '=' -f 2` + _mandir=$(echo $ac_option | cut -d '=' -f 2) ;; --confdir=*) - _confdir=`echo $ac_option | cut -d '=' -f 2` + _confdir=$(echo $ac_option | cut -d '=' -f 2) ;; --libdir=*) - _libdir=`echo $ac_option | cut -d '=' -f 2` + _libdir=$(echo $ac_option | cut -d '=' -f 2) ;; --codecsdir=*) - _codecsdir=`echo $ac_option | cut -d '=' -f 2` + _codecsdir=$(echo $ac_option | cut -d '=' -f 2) ;; --win32codecsdir=*) - _win32codecsdir=`echo $ac_option | cut -d '=' -f 2` + _win32codecsdir=$(echo $ac_option | cut -d '=' -f 2) ;; --xanimcodecsdir=*) - _xanimcodecsdir=`echo $ac_option | cut -d '=' -f 2` + _xanimcodecsdir=$(echo $ac_option | cut -d '=' -f 2) ;; --realcodecsdir=*) - _realcodecsdir=`echo $ac_option | cut -d '=' -f 2` + _realcodecsdir=$(echo $ac_option | cut -d '=' -f 2) ;; --with-install=*) - _install=`echo $ac_option | cut -d '=' -f 2 ` + _install=$(echo $ac_option | cut -d '=' -f 2 ) ;; --with-xvmclib=*) - _xvmclib=`echo $ac_option | cut -d '=' -f 2` + _xvmclib=$(echo $ac_option | cut -d '=' -f 2) ;; --with-sdl-config=*) - _sdlconfig=`echo $ac_option | cut -d '=' -f 2` + _sdlconfig=$(echo $ac_option | cut -d '=' -f 2) ;; --with-freetype-config=*) - _freetypeconfig=`echo $ac_option | cut -d '=' -f 2` + _freetypeconfig=$(echo $ac_option | cut -d '=' -f 2) ;; --with-fribidi-config=*) - _fribidiconfig=`echo $ac_option | cut -d '=' -f 2` + _fribidiconfig=$(echo $ac_option | cut -d '=' -f 2) ;; --with-gtk-config=*) - _gtkconfig=`echo $ac_option | cut -d '=' -f 2` + _gtkconfig=$(echo $ac_option | cut -d '=' -f 2) ;; --with-glib-config=*) - _glibconfig=`echo $ac_option | cut -d '=' -f 2` + _glibconfig=$(echo $ac_option | cut -d '=' -f 2) ;; --with-dvdnav-config=*) - _dvdnavconfig=`echo $ac_option | cut -d '=' -f 2` + _dvdnavconfig=$(echo $ac_option | cut -d '=' -f 2) ;; --with-dvdread-config=*) - _dvdreadconfig=`echo $ac_option | cut -d '=' -f 2` + _dvdreadconfig=$(echo $ac_option | cut -d '=' -f 2) ;; --extra-cflags=*) - extra_cflags=`echo $ac_option | cut -d '=' -f 2-` + extra_cflags=$(echo $ac_option | cut -d '=' -f 2-) ;; --extra-ldflags=*) - extra_ldflags=`echo $ac_option | cut -d '=' -f 2-` + extra_ldflags=$(echo $ac_option | cut -d '=' -f 2-) ;; --extra-libs=*) - extra_libs=`echo $ac_option | cut -d '=' -f 2` + extra_libs=$(echo $ac_option | cut -d '=' -f 2) ;; --extra-libs-mplayer=*) - libs_mplayer=`echo $ac_option | cut -d '=' -f 2` + libs_mplayer=$(echo $ac_option | cut -d '=' -f 2) ;; --extra-libs-mencoder=*) - libs_mencoder=`echo $ac_option | cut -d '=' -f 2` + libs_mencoder=$(echo $ac_option | cut -d '=' -f 2) ;; --target=*) - _target=`echo $ac_option | cut -d '=' -f 2` + _target=$(echo $ac_option | cut -d '=' -f 2) ;; --cc=*) - _cc=`echo $ac_option | cut -d '=' -f 2` + _cc=$(echo $ac_option | cut -d '=' -f 2) ;; --host-cc=*) - _host_cc=`echo $ac_option | cut -d '=' -f 2` + _host_cc=$(echo $ac_option | cut -d '=' -f 2) ;; --as=*) - _as=`echo $ac_option | cut -d '=' -f 2` + _as=$(echo $ac_option | cut -d '=' -f 2) ;; --nm=*) - _nm=`echo $ac_option | cut -d '=' -f 2` + _nm=$(echo $ac_option | cut -d '=' -f 2) ;; --yasm=*) - _yasm=`echo $ac_option | cut -d '=' -f 2` + _yasm=$(echo $ac_option | cut -d '=' -f 2) ;; --ar=*) - _ar=`echo $ac_option | cut -d '=' -f 2` + _ar=$(echo $ac_option | cut -d '=' -f 2) ;; --ranlib=*) - _ranlib=`echo $ac_option | cut -d '=' -f 2` + _ranlib=$(echo $ac_option | cut -d '=' -f 2) ;; --windres=*) - _windres=`echo $ac_option | cut -d '=' -f 2` + _windres=$(echo $ac_option | cut -d '=' -f 2) ;; --charset=*) - _charset=`echo $ac_option | cut -d '=' -f 2` + _charset=$(echo $ac_option | cut -d '=' -f 2) ;; --language=*) - _language=`echo $ac_option | cut -d '=' -f 2` + _language=$(echo $ac_option | cut -d '=' -f 2) ;; --enable-static) @@ -863,7 +863,7 @@ for ac_option do _debug='-g' ;; --enable-debug=*) - _debug=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2` + _debug=$(echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2) ;; --disable-debug) _debug= @@ -1089,7 +1089,7 @@ for ac_option do --enable-vidix) _vidix=yes ;; --disable-vidix) _vidix=no ;; --with-vidix-drivers=*) - _vidix_drivers=`echo $ac_option | cut -d '=' -f 2` + _vidix_drivers=$(echo $ac_option | cut -d '=' -f 2) ;; --disable-vidix-pcidb) _vidix_pcidb=no ;; --enable-dhahelper) _dhahelper=yes ;; @@ -1124,16 +1124,16 @@ for ac_option do --disable-libamr_nb) _libamr_nb=no ;; --enable-libamr_wb) _libamr_wb=yes ;; --disable-libamr_wb) _libamr_wb=no ;; - --enable-decoder=*) _libavdecoders="$_libavdecoders `echo $ac_option | cut -d '=' -f 2`" ;; - --disable-decoder=*) _libavdecoders=`echo $_libavdecoders | sed "s/\`echo $ac_option | cut -d '=' -f 2\`//g"` ;; - --enable-encoder=*) _libavencoders="$_libavencoders `echo $ac_option | cut -d '=' -f 2`" ;; - --disable-encoder=*) _libavencoders=`echo $_libavencoders | sed "s/\`echo $ac_option | cut -d '=' -f 2\`//g"` ;; - --enable-parser=*) _libavparsers="$_libavparsers `echo $ac_option | cut -d '=' -f 2`" ;; - --disable-parser=*) _libavparsers=`echo $_libavparsers | sed "s/\`echo $ac_option | cut -d '=' -f 2\`//g"` ;; - --enable-demuxer=*) _libavdemuxers="$_libavdemuxers `echo $ac_option | cut -d '=' -f 2`" ;; - --disable-demuxer=*) _libavdemuxers=`echo $_libavdemuxers | sed "s/\`echo $ac_option | cut -d '=' -f 2\`//g"` ;; - --enable-muxer=*) _libavmuxers="$_libavmuxers `echo $ac_option | cut -d '=' -f 2`" ;; - --disable-muxer=*) _libavmuxers=`echo $_libavmuxers | sed "s/\`echo $ac_option | cut -d '=' -f 2\`//g"` ;; + --enable-decoder=*) _libavdecoders="$_libavdecoders $(echo $ac_option | cut -d '=' -f 2)" ;; + --disable-decoder=*) _libavdecoders=$(echo $_libavdecoders | sed "s/$(echo $ac_option | cut -d '=' -f 2)//g") ;; + --enable-encoder=*) _libavencoders="$_libavencoders $(echo $ac_option | cut -d '=' -f 2)" ;; + --disable-encoder=*) _libavencoders=$(echo $_libavencoders | sed "s/$(echo $ac_option | cut -d '=' -f 2)//g") ;; + --enable-parser=*) _libavparsers="$_libavparsers $(echo $ac_option | cut -d '=' -f 2)" ;; + --disable-parser=*) _libavparsers=$(echo $_libavparsers | sed "s/$(echo $ac_option | cut -d '=' -f 2)//g") ;; + --enable-demuxer=*) _libavdemuxers="$_libavdemuxers $(echo $ac_option | cut -d '=' -f 2)" ;; + --disable-demuxer=*) _libavdemuxers=$(echo $_libavdemuxers | sed "s/$(echo $ac_option | cut -d '=' -f 2)//g") ;; + --enable-muxer=*) _libavmuxers="$_libavmuxers $(echo $ac_option | cut -d '=' -f 2)" ;; + --disable-muxer=*) _libavmuxers=$(echo $_libavmuxers | sed "s/$(echo $ac_option | cut -d '=' -f 2)//g") ;; --enable-libavformat_a) _libavformat_a=yes ;; --disable-libavformat_a) _libavformat_a=no ;; --enable-libavformat_so) _libavformat_so=yes ;; @@ -1315,7 +1315,7 @@ test -z "$_libdir" && _libdir="$_prefix/lib" # Determine our OS name and CPU architecture if test -z "$_target" ; then # OS name - system_name=`uname -s 2>&1` + system_name=$(uname -s 2>&1) case "$system_name" in Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS) ;; @@ -1344,7 +1344,7 @@ if test -z "$_target" ; then # host's CPU/instruction set - host_arch=`uname -p 2>&1` + host_arch=$(uname -p 2>&1) case "$host_arch" in i386|sparc|ppc|alpha|arm|mips|vax) ;; @@ -1358,7 +1358,7 @@ if test -z "$_target" ; then # recognize. # x86/x86pc is used by QNX - case "`uname -m 2>&1`" in + case "$(uname -m 2>&1)" in i[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686|BePC) host_arch=i386 ;; ia64) host_arch=ia64 ;; x86_64|amd64) @@ -1386,8 +1386,8 @@ if test -z "$_target" ; then ;; esac else # if test -z "$_target" - system_name=`echo $_target | cut -d '-' -f 2` - case "`echo $system_name | tr A-Z a-z`" in + system_name=$(echo $_target | cut -d '-' -f 2) + case "$(echo $system_name | tr A-Z a-z)" in linux) system_name=Linux ;; freebsd) system_name=FreeBSD ;; gnu/kfreebsd) system_name=FreeBSD ;; @@ -1402,9 +1402,9 @@ else # if test -z "$_target" mingw32msvc) system_name=MINGW32 ;; esac # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed - host_arch=`echo $_target | cut -d '-' -f 1` - if test `echo $host_arch` != "x86_64" ; then - host_arch=`