]> git.sesse.net Git - mlt/commitdiff
avformat/configure, avformat/Makfile, avformat/factory.c: Add a --avformat-no-filters
authorddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Mon, 22 Dec 2008 04:26:12 +0000 (04:26 +0000)
committerddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Mon, 22 Dec 2008 04:26:12 +0000 (04:26 +0000)
configure option to facilitate building a codecs and muxers only module. Change the
module filename for a no-codecs build to libmltffmpeg.so to prevent a clash with
a no-filters module (libmltavformat.so).

git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1283 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/avformat/Makefile
src/modules/avformat/configure
src/modules/avformat/factory.c

index 0007fd9f90e2e0664e283caa2aed8435b39ba46e..5c8b8afaca2ee68ab8373345fac61d2994e6b1ef 100644 (file)
@@ -1,16 +1,23 @@
 include ../../../config.mak
 include config.mak
 
+ifndef CODECS
+TARGET = ../libmltffmpeg$(LIBSUF)
+else
 TARGET = ../libmltavformat$(LIBSUF)
+endif
 
-OBJS = factory.o \
-          filter_avcolour_space.o \
-          filter_avresample.o \
-          filter_avdeinterlace.o
+OBJS = factory.o
 
+ifdef FILTERS
+OBJS += filter_avcolour_space.o \
+           filter_avresample.o \
+           filter_avdeinterlace.o
 ifdef SWSCALE
 OBJS += filter_swscale.o
 endif
+CFLAGS += -DFILTERS
+endif
 
 ifdef CODECS
 OBJS += producer_avformat.o \
@@ -58,7 +65,7 @@ distclean:    clean
 
 clean: 
        #if [ $(LOCAL_FFMPEG) ] ; then $(MAKE) -C ffmpeg clean ; fi
-       rm -f $(OBJS) $(TARGET)
+       rm -f $(OBJS) ../libmltffmpeg$(LIBSUF) ../libmltavformat$(LIBSUF)
 
 install: all
        install -m 755 $(TARGET) "$(DESTDIR)$(libdir)/mlt"
@@ -67,6 +74,7 @@ install: all
 
 uninstall:
        rm "$(DESTDIR)$(libdir)/mlt/libmltavformat$(LIBSUF)"
+       rm "$(DESTDIR)$(libdir)/mlt/libmltffmpeg$(LIBSUF)"
        rm -rf "$(DESTDIR)$(prefix)/share/mlt/avformat" 
 
 ifneq ($(wildcard .depend),)
index 27b65ce912097953e612610917e29d2d9bb3f8c9..365cb2cf69279d1cdfd57f09beeb74b814fcbb68 100755 (executable)
@@ -21,6 +21,7 @@ FFMPEG/avformat options:
   --avformat-suffix=suff  - Specify a custom suffix for an ffmpeg shared build
   --avformat-swscale      - Use ffmpeg libswcale instead of img_convert
   --avformat-no-codecs    - Disable the producer and consumer to avoid the FFmpeg codecs
+  --avformat-no-filters   - Disable the filters to make a codecs+muxers-only plugin
 
   NOTE: The recommended version of FFmpeg is SVN-r$svn_rev.
 
@@ -59,6 +60,7 @@ else
        export avformat_suffix=
        export swscale=
        export codecs=true
+       export filters=true
 
        for i in "$@"
        do
@@ -73,6 +75,7 @@ else
                        --avformat-swscale )    swscale=true ;;
                        --avformat-swscaler )   swscale=true ;;
                        --avformat-no-codecs )  codecs=false ;;
+                       --avformat-no-filters ) filters=false ;;
                esac
        done
 
@@ -158,6 +161,7 @@ else
        echo "EXTRA_LIBS=$extra_libs" >> config.mak
        echo "AVFORMAT_SUFFIX=$avformat_suffix" >> config.mak
        [ "$codecs" = "true" ] && echo "CODECS=1" >> config.mak
+       [ "$filters" = "true" ] && echo "FILTERS=1" >> config.mak
        exit 0
 
 fi
index 0952a95c4e850c817fb9b0b2fa03d3bdf63f5796..992b9f24d5b0fa9dd2b4b7675254956c3991fb91 100644 (file)
@@ -106,14 +106,18 @@ static void *create_service( mlt_profile profile, mlt_service_type type, const c
                        return consumer_avformat_init( profile, arg );
        }
 #endif
+#ifdef FILTERS
        if ( !strcmp( id, "avcolour_space" ) )
                return filter_avcolour_space_init( arg );
        if ( !strcmp( id, "avdeinterlace" ) )
                return filter_avdeinterlace_init( arg );
        if ( !strcmp( id, "avresample" ) )
                return filter_avresample_init( arg );
+#ifdef SWSCALE
        if ( !strcmp( id, "swscale" ) )
                return filter_swscale_init( profile, arg );
+#endif
+#endif
        return NULL;
 }
 
@@ -149,9 +153,13 @@ MLT_REPOSITORY
        MLT_REGISTER( producer_type, "avformat", create_service );
        MLT_REGISTER_METADATA( producer_type, "avformat", avformat_metadata, NULL );
 #endif
+#ifdef FILTERS
        MLT_REGISTER( filter_type, "avcolour_space", create_service );
        MLT_REGISTER( filter_type, "avcolor_space", create_service );
        MLT_REGISTER( filter_type, "avdeinterlace", create_service );
        MLT_REGISTER( filter_type, "avresample", create_service );
+#ifdef SWSCALE
        MLT_REGISTER( filter_type, "swscale", create_service );
+#endif
+#endif
 }