From 0c1d23b59cdb27904ea444df1e51fd566fd0dfcd Mon Sep 17 00:00:00 2001 From: Takashi Hirata Date: Thu, 29 Jul 2010 04:57:40 +0900 Subject: [PATCH 1/2] Fix compilation to support L-SMASH. Based on r1683. --- Makefile | 7 ++----- configure | 28 ---------------------------- x264.c | 14 +------------- 3 files changed, 3 insertions(+), 46 deletions(-) diff --git a/Makefile b/Makefile index 0f4d0cf..b1a7ccf 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,8 @@ SRCS = common/mc.c common/predict.c common/pixel.c common/macroblock.c \ SRCCLI = x264.c input/input.c input/timecode.c input/raw.c input/y4m.c \ output/raw.c output/matroska.c output/matroska_ebml.c \ - output/flv.c output/flv_bytestream.c filters/filters.c \ + output/flv.c output/flv_bytestream.c \ + output/mp4.c output/isom.c output/isom_util.c output/mp4sys.c filters/filters.c \ filters/video/video.c filters/video/source.c filters/video/internal.c \ filters/video/resize.c filters/video/cache.c filters/video/fix_vfr_pts.c \ filters/video/select_every.c filters/video/crop.c @@ -42,10 +43,6 @@ ifneq ($(findstring HAVE_FFMS, $(CONFIG)),) SRCCLI += input/ffms.c endif -ifneq ($(findstring HAVE_GPAC, $(CONFIG)),) -SRCCLI += output/mp4.c -endif - # Visualization sources ifeq ($(VIS),yes) SRCS += common/visualize.c common/display-x11.c diff --git a/configure b/configure index 565eb98..3dcacfb 100755 --- a/configure +++ b/configure @@ -10,7 +10,6 @@ echo " --help print this message" echo " --disable-avs disables avisynth support (windows only)" echo " --disable-lavf disables libavformat support" echo " --disable-ffms disables ffmpegsource support" -echo " --disable-gpac disables gpac support" echo " --disable-pthread disables multithreaded encoding" echo " --disable-swscale disables swscale support" echo " --disable-asm disables platform-specific assembly optimizations" @@ -137,7 +136,6 @@ DEVNULL='/dev/null' avs="auto" lavf="auto" ffms="auto" -gpac="auto" pthread="auto" swscale="auto" asm="auto" @@ -189,9 +187,6 @@ for opt do --disable-ffms) ffms="no" ;; - --disable-gpac) - gpac="no" - ;; --extra-asflags=*) ASFLAGS="$ASFLAGS ${opt#--extra-asflags=}" ;; @@ -630,28 +625,6 @@ elif [ "$swscale" = "yes" ]; then CFLAGS="$CFLAGS $SWSCALE_CFLAGS" fi -GPAC_LIBS="-lgpac_static" -if [ $SYS = MINGW ]; then - GPAC_LIBS="$GPAC_LIBS -lwinmm" -fi -if [ "$gpac" = "auto" ] ; then - gpac="no" - if cc_check gpac/isomedia.h "$GPAC_LIBS" ; then - if cc_check gpac/isomedia.h "$GPAC_LIBS" "gf_isom_set_pixel_aspect_ratio(0,0,0,0,0);" ; then - gpac="yes" - else - echo "Warning: gpac is too old, update to 2007-06-21 UTC or later" - fi - fi -fi -if [ "$gpac" = "yes" ] ; then - define HAVE_GPAC - if cc_check gpac/isomedia.h "-Werror $GPAC_LIBS" "gf_malloc(1); gf_free(NULL);" ; then - define HAVE_GF_MALLOC - fi - LDFLAGSCLI="$GPAC_LIBS $LDFLAGSCLI" -fi - if [ "$avs" = "auto" ] ; then avs="no" if [ $SYS = MINGW ] && cc_check extras/avisynth_c.h ; then @@ -780,7 +753,6 @@ asm: $asm avs: $avs lavf: $lavf ffms: $ffms -gpac: $gpac pthread: $pthread filters: $filters debug: $debug diff --git a/x264.c b/x264.c index 4e9a1c7..57a9b31 100644 --- a/x264.c +++ b/x264.c @@ -100,9 +100,7 @@ static const char * const muxer_names[] = "raw", "mkv", "flv", -#if HAVE_GPAC "mp4", -#endif 0 }; @@ -309,7 +307,7 @@ static void Help( x264_param_t *defaults, int longhelp ) " .264 -> Raw bytestream\n" " .mkv -> Matroska\n" " .flv -> Flash Video\n" - " .mp4 -> MP4 if compiled with GPAC support (%s)\n" + " .mp4 -> MP4\n" "Output bit depth: %d (configured at compile time)\n" "\n" "Options:\n" @@ -334,11 +332,6 @@ static void Help( x264_param_t *defaults, int longhelp ) #else "no", #endif -#if HAVE_GPAC - "yes", -#else - "no", -#endif BIT_DEPTH ); H0( "Example usage:\n" ); @@ -894,7 +887,6 @@ static int select_output( const char *muxer, char *filename, x264_param_t *param if( !strcasecmp( ext, "mp4" ) ) { -#if HAVE_GPAC output = mp4_output; param->b_annexb = 0; param->b_dts_compress = 0; @@ -904,10 +896,6 @@ static int select_output( const char *muxer, char *filename, x264_param_t *param x264_cli_log( "x264", X264_LOG_WARNING, "cbr nal-hrd is not compatible with mp4\n" ); param->i_nal_hrd = X264_NAL_HRD_VBR; } -#else - x264_cli_log( "x264", X264_LOG_ERROR, "not compiled with MP4 output support\n" ); - return -1; -#endif } else if( !strcasecmp( ext, "mkv" ) ) { -- 1.7.0.2.msysgit.0