])
])
+AC_ARG_ENABLE(merge-ffmpeg,
+[ --enable-merged-ffmpeg merge FFMPEG-based plugins (default disabled)],, [
+ enable_merge_ffmpeg="no"
+])
+AM_CONDITIONAL([MERGE_FFMPEG], [test "$enable_merge_ffmpeg" != "no"])
+
dnl
dnl avcodec decoder/encoder plugin
dnl
CFLAGS="${CFLAGS} ${AVFORMAT_CFLAGS}"
AC_CHECK_HEADERS(libavformat/avformat.h ffmpeg/avformat.h)
AC_CHECK_HEADERS(libavutil/avutil.h ffmpeg/avutil.h)
- VLC_ADD_PLUGIN([avformat])
- VLC_ADD_LIBS([avformat],[$AVFORMAT_LIBS $AVUTIL_LIBS])
- VLC_ADD_CFLAGS([avformat],[$AVFORMAT_CFLAGS $AVUTIL_CFLAGS])
+ AS_IF([test "$enable_merge_ffmpeg" = "no"], [
+ VLC_ADD_PLUGIN([avformat])
+ VLC_ADD_LIBS([avformat],[$AVFORMAT_LIBS $AVUTIL_LIBS])
+ VLC_ADD_CFLAGS([avformat],[$AVFORMAT_CFLAGS $AVUTIL_CFLAGS])
+ ], [
+ VLC_ADD_LIBS([avcodec],[$AVFORMAT_LIBS $AVUTIL_LIBS])
+ VLC_ADD_CFLAGS([avcodec],[$AVFORMAT_CFLAGS $AVUTIL_CFLAGS])
+ ])
VLC_RESTORE_FLAGS
],[
AC_MSG_ERROR([Could not find libavformat or libavutil. Use --disable-avformat to ignore this error.])
libavcodec_plugin_la_LIBADD = $(AM_LIBADD)
libavcodec_plugin_la_DEPENDENCIES =
+if MERGE_FFMPEG
+libavcodec_plugin_la_SOURCES += \
+ ../../demux/avformat/demux.c
+if ENABLE_SOUT
+libavcodec_plugin_la_SOURCES += \
+ ../../demux/avformat/mux.c
+endif
+libavcodec_plugin_la_CFLAGS += -DMERGE_FFMPEG
+endif
+
libvlc_LTLIBRARIES += \
$(LTLIBavcodec)
N_("rd"), N_("bits"), N_("simple") };
#endif
+#ifdef MERGE_FFMPEG
+# include "../../demux/avformat/avformat.h"
+#endif
+
/*****************************************************************************
* Module descriptor
*****************************************************************************/
set_description( N_("FFmpeg deinterlace video filter") )
add_shortcut( "ffmpeg-deinterlace" )
+#ifdef MERGE_FFMPEG
+ add_submodule ()
+# include "../../demux/avformat/avformat.c"
+#endif
vlc_module_end ()
/*****************************************************************************
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
+#ifndef MERGE_FFMPEG
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "avformat.h"
-/*****************************************************************************
- * Module descriptor
- *****************************************************************************/
vlc_module_begin ()
+#endif /* MERGE_FFMPEG */
add_shortcut( "ffmpeg" )
set_category( CAT_INPUT )
set_subcategory( SUBCAT_INPUT_DEMUX )
MUX_LONGTEXT, true )
set_callbacks( OpenMux, CloseMux )
#endif
+#ifndef MERGE_FFMPEG
vlc_module_end ()
+#endif