[MPlayer-dev-eng] [PATCH] make Matroska demuxer compilation unconditional

Diego Biurrun diego at biurrun.de
Sun May 7 17:04:30 CEST 2006


Hey,

I just stumbled over the old check for the internal Matroska demuxer in
configure.  I believe it is an old leftover from the times when we had
the C++ Matroska demuxer and support for an external Matroska demuxer.

Since we compile all demuxers unconditionally and our internal Matroska
demuxer is stable I don't see a point in arbitrarily allowing just one
demuxer to be disabled.

This has the benefit of getting rid of a couple of #ifdef in mplayer.c
and other places.

Diego
-------------- next part --------------
--- configure	7 May 2006 14:00:07 -0000	1.1188
+++ configure	7 May 2006 14:45:14 -0000
@@ -279,7 +279,6 @@
   --disable-vorbis       disable OggVorbis support entirely [autodetect]
   --disable-speex        disable Speex support [autodetect]
   --enable-theora        build with OggTheora support [autodetect]
-  --disable-internal-matroska disable internal Matroska support [enabled]
   --enable-external-faad build with external FAAD2 (AAC) support [autodetect]
   --disable-internal-faad disable internal FAAD2 (AAC) support [autodetect]
   --disable-faac         disable support for FAAC (AAC encoder) [autodetect]
@@ -1578,7 +1577,6 @@
 _liba52=yes
 _libdts=auto
 _libmpeg2=yes
-_matroska_internal=yes
 _tremor=no
 _faad_internal=auto
 _faad_external=auto
@@ -1793,8 +1791,6 @@
   --disable-libmpeg2)	_libmpeg2=no	;;
   --enable-musepack)	_musepack=yes	;;
   --disable-musepack)	_musepack=no	;;
-  --enable-internal-matroska)  _matroska_internal=yes ;;
-  --disable-internal-matroska) _matroska_internal=no ;;
   --enable-internal-faad)	_faad_internal=yes	_faad_external=no	;;
   --disable-internal-faad)	_faad_internal=no	;;
   --enable-external-faad)	_faad_external=yes	_faad_internal=no	;;
@@ -5715,16 +5711,6 @@
 echores "$_musepack"
 
 
-echocheck "Matroska support"
-if test "$_matroska_internal" = yes ; then
-  _inputmodules="matroska $_inputmodules"
-  _def_matroska='#define HAVE_MATROSKA 1'
-else
-  _noinputmodules="matroska $_noinputmodules"
-  _def_matroska='#undef HAVE_MATROSKA'
-fi
-echores "$_matroska_internal"
-
 echocheck "FAAC (AAC encoder) support"
 if test "$_faac" = auto ; then
   cat > $TMPC <<EOF
@@ -7320,7 +7306,6 @@
 CONFIG_PP = yes
 CONFIG_MP3LAME = $_mp3lame
 LIBMENU = $_menu
-MATROSKA = $_matroska_internal
 
 OPENDIVX = $_opendivx
 
@@ -8061,9 +8046,6 @@
 /* enable OggTheora support */
 $_def_theora
 
-/* enable Matroska support */
-$_def_matroska
-
 /* enable FAAD (AAC) support */
 $_def_faad
 $_def_faad_internal

--- mplayer.c	5 May 2006 17:30:52 -0000	1.952
+++ mplayer.c	7 May 2006 14:45:14 -0000
@@ -183,9 +183,7 @@
 #include "libmpdemux/demuxer.h"
 #include "libmpdemux/stheader.h"
 //#include "parse_es.h"
-#ifdef HAVE_MATROSKA
 #include "libmpdemux/matroska.h"
-#endif
 
 #include "libmpcodecs/dec_audio.h"
 #include "libmpcodecs/dec_video.h"
@@ -1843,7 +1841,6 @@
             return 1;
         }
 #endif
-#ifdef HAVE_MATROSKA
         if (demuxer->type == DEMUXER_TYPE_MATROSKA && dvdsub_id >= 0) {
             char lang[40] = MSGTR_Unknown;
             demux_mkv_get_sub_lang(demuxer, dvdsub_id, lang, 9);
@@ -1851,7 +1848,6 @@
             snprintf(*(char**)arg, 63, "(%d) %s", dvdsub_id, lang);
             return 1;
         }
-#endif
 #ifdef HAVE_OGGVORBIS
         if (demuxer->type == DEMUXER_TYPE_OGG && d_dvdsub && dvdsub_id >= 0) {
             char *lang = demux_ogg_sub_lang(demuxer, dvdsub_id);
@@ -1947,7 +1943,6 @@
             if (demuxer->type == DEMUXER_TYPE_OGG)
                 d_dvdsub->id = demux_ogg_sub_id(demuxer, dvdsub_id);
 #endif
-#ifdef HAVE_MATROSKA
             if (demuxer->type == DEMUXER_TYPE_MATROSKA) {
                 d_dvdsub->id = demux_mkv_change_subs(demuxer, dvdsub_id);
                 if (d_dvdsub->id >= 0 &&
@@ -1971,7 +1966,6 @@
                     }
                 }
             }
-#endif
         }
     } else { // off
 #ifdef USE_SUB
@@ -3100,13 +3094,11 @@
 }
 inited_flags|=INITED_DEMUXER;
 
-#ifdef HAVE_MATROSKA
 if (demuxer->type==DEMUXER_TYPE_MATROSKA) {
   // setup global sub numbering
   global_sub_indices[SUB_SOURCE_DEMUX] = global_sub_size; // the global # of the first demux-specific sub.
   global_sub_size += demux_mkv_num_subs(demuxer);
 }
-#endif
 #ifdef HAVE_OGGVORBIS
 if (demuxer->type==DEMUXER_TYPE_OGG) {
   // setup global sub numbering
@@ -3246,7 +3238,6 @@
 }
 #endif
 
-#ifdef HAVE_MATROSKA
 if ((vo_spudec == NULL) && (demuxer->type == DEMUXER_TYPE_MATROSKA) &&
     (d_dvdsub->sh != NULL) && (((mkv_sh_sub_t *)d_dvdsub->sh)->type == 'v')) {
   mkv_sh_sub_t *mkv_sh_sub = (mkv_sh_sub_t *)d_dvdsub->sh;
@@ -3257,7 +3248,6 @@
                              mkv_sh_sub->height);
   forced_subs_only = mkv_sh_sub->forced_subs_only;
 }
-#endif
 
 if (vo_spudec==NULL) {
   current_module="spudec_init_normal";

--- libmpdemux/Makefile	18 Apr 2006 14:41:41 -0000	1.103
+++ libmpdemux/Makefile	7 May 2006 14:45:14 -0000
@@ -86,6 +86,7 @@
         demux_viv.c \
         demux_vqf.c \
         demux_y4m.c \
+        demux_mkv.c ebml.c \
 
 ifeq ($(HAVE_DVD),yes)
 SRCS += stream_dvd.c
@@ -96,9 +97,6 @@
 ifneq ($(W32_LIB),)
 SRCS += demux_avs.c
 endif
-ifeq ($(MATROSKA),yes)
-SRCS += demux_mkv.c ebml.c
-endif
 
 # Muxers
 MUXERS = muxer.c \

--- libmpdemux/demux_mkv.c	24 Apr 2006 07:20:34 -0000	1.60
+++ libmpdemux/demux_mkv.c	7 May 2006 14:45:15 -0000
@@ -7,7 +7,6 @@
  */
 
 #include "config.h"
-#ifdef HAVE_MATROSKA
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -3618,5 +3617,3 @@
   demux_mkv_seek,
   demux_mkv_control
 };
-
-#endif /* HAVE_MATROSKA */

--- libmpdemux/demuxer.c	27 Apr 2006 11:13:21 -0000	1.222
+++ libmpdemux/demuxer.c	7 May 2006 14:45:15 -0000
@@ -81,9 +81,7 @@
   &demuxer_desc_nuv,
   &demuxer_desc_real,
   &demuxer_desc_smjpeg,
-#ifdef HAVE_MATROSKA
   &demuxer_desc_matroska,
-#endif
   &demuxer_desc_realaudio,
   &demuxer_desc_vqf,
   &demuxer_desc_mov,

--- libmpdemux/ebml.c	13 Jul 2005 17:24:42 -0000	1.6
+++ libmpdemux/ebml.c	7 May 2006 14:45:15 -0000
@@ -6,7 +6,6 @@
  */
 
 #include "config.h"
-#ifdef HAVE_MATROSKA
 
 #include <stdlib.h>
 
@@ -363,5 +362,3 @@
 
   return str;
 }
-
-#endif /* HAVE_MATROSKA */


More information about the MPlayer-dev-eng mailing list