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
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 \
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"
uninstall:
rm "$(DESTDIR)$(libdir)/mlt/libmltavformat$(LIBSUF)"
+ rm "$(DESTDIR)$(libdir)/mlt/libmltffmpeg$(LIBSUF)"
rm -rf "$(DESTDIR)$(prefix)/share/mlt/avformat"
ifneq ($(wildcard .depend),)
--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.
export avformat_suffix=
export swscale=
export codecs=true
+ export filters=true
for i in "$@"
do
--avformat-swscale ) swscale=true ;;
--avformat-swscaler ) swscale=true ;;
--avformat-no-codecs ) codecs=false ;;
+ --avformat-no-filters ) filters=false ;;
esac
done
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
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;
}
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
}