summaryrefslogtreecommitdiffstats
path: root/debian/transcode/transcode-1.1.7/multiplex
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-09-11 14:38:47 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-09-11 14:38:47 +0900
commit884c8093d63402a1ad0b502244b791e3c6782be3 (patch)
treea600d4ab0d431a2bdfe4c15b70df43c14fbd8dd0 /debian/transcode/transcode-1.1.7/multiplex
parent14e1aa2006796f147f3f4811fb908a6b01e79253 (diff)
downloadextra-dependencies-884c8093d63402a1ad0b502244b791e3c6782be3.tar.gz
extra-dependencies-884c8093d63402a1ad0b502244b791e3c6782be3.zip
Added debian extra dependency packages.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'debian/transcode/transcode-1.1.7/multiplex')
-rw-r--r--debian/transcode/transcode-1.1.7/multiplex/Makefile.am37
-rw-r--r--debian/transcode/transcode-1.1.7/multiplex/Makefile.in696
-rw-r--r--debian/transcode/transcode-1.1.7/multiplex/multiplex_avi.c257
-rw-r--r--debian/transcode/transcode-1.1.7/multiplex/multiplex_null.c145
-rw-r--r--debian/transcode/transcode-1.1.7/multiplex/multiplex_raw.c257
-rw-r--r--debian/transcode/transcode-1.1.7/multiplex/multiplex_y4m.c397
6 files changed, 1789 insertions, 0 deletions
diff --git a/debian/transcode/transcode-1.1.7/multiplex/Makefile.am b/debian/transcode/transcode-1.1.7/multiplex/Makefile.am
new file mode 100644
index 00000000..a7bfe36c
--- /dev/null
+++ b/debian/transcode/transcode-1.1.7/multiplex/Makefile.am
@@ -0,0 +1,37 @@
+# # Process this file with automake to produce Makefile.in.
+
+AM_CPPFLAGS = \
+ $(PTHREAD_CFLAGS) \
+ -DMOD_PATH=\"$(MOD_PATH)\" \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src
+
+pkgdir = $(MOD_PATH)
+
+if HAVE_MJPEGTOOLS
+MODS_MJPEGTOOLS = \
+ multiplex_y4m.la
+endif
+
+if ENABLE_EXPERIMENTAL
+pkg_LTLIBRARIES = \
+ multiplex_raw.la \
+ multiplex_avi.la \
+ $(MODS_MJPEGTOOLS) \
+ multiplex_null.la
+endif
+
+multiplex_avi_la_SOURCES = multiplex_avi.c
+multiplex_avi_la_LDFLAGS = -module -avoid-version
+
+multiplex_raw_la_SOURCES = multiplex_raw.c
+multiplex_raw_la_LDFLAGS = -module -avoid-version
+
+multiplex_null_la_SOURCES = multiplex_null.c
+multiplex_null_la_LDFLAGS = -module -avoid-version
+
+multiplex_y4m_la_SOURCES = multiplex_y4m.c
+multiplex_y4m_la_CPPFLAGS = $(AM_CPPFLAGS) $(MJPEGTOOLS_CFLAGS)
+multiplex_y4m_la_LDFLAGS = -module -avoid-version
+multiplex_y4m_la_LIBADD = $(MJPEGTOOLS_LIBS)
+
diff --git a/debian/transcode/transcode-1.1.7/multiplex/Makefile.in b/debian/transcode/transcode-1.1.7/multiplex/Makefile.in
new file mode 100644
index 00000000..be0fa8c9
--- /dev/null
+++ b/debian/transcode/transcode-1.1.7/multiplex/Makefile.in
@@ -0,0 +1,696 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# # Process this file with automake to produce Makefile.in.
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = multiplex
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(pkgdir)"
+LTLIBRARIES = $(pkg_LTLIBRARIES)
+multiplex_avi_la_LIBADD =
+am_multiplex_avi_la_OBJECTS = multiplex_avi.lo
+multiplex_avi_la_OBJECTS = $(am_multiplex_avi_la_OBJECTS)
+multiplex_avi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(multiplex_avi_la_LDFLAGS) $(LDFLAGS) -o $@
+@ENABLE_EXPERIMENTAL_TRUE@am_multiplex_avi_la_rpath = -rpath $(pkgdir)
+multiplex_null_la_LIBADD =
+am_multiplex_null_la_OBJECTS = multiplex_null.lo
+multiplex_null_la_OBJECTS = $(am_multiplex_null_la_OBJECTS)
+multiplex_null_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(multiplex_null_la_LDFLAGS) $(LDFLAGS) -o $@
+@ENABLE_EXPERIMENTAL_TRUE@am_multiplex_null_la_rpath = -rpath \
+@ENABLE_EXPERIMENTAL_TRUE@ $(pkgdir)
+multiplex_raw_la_LIBADD =
+am_multiplex_raw_la_OBJECTS = multiplex_raw.lo
+multiplex_raw_la_OBJECTS = $(am_multiplex_raw_la_OBJECTS)
+multiplex_raw_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(multiplex_raw_la_LDFLAGS) $(LDFLAGS) -o $@
+@ENABLE_EXPERIMENTAL_TRUE@am_multiplex_raw_la_rpath = -rpath $(pkgdir)
+am__DEPENDENCIES_1 =
+multiplex_y4m_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_multiplex_y4m_la_OBJECTS = multiplex_y4m_la-multiplex_y4m.lo
+multiplex_y4m_la_OBJECTS = $(am_multiplex_y4m_la_OBJECTS)
+multiplex_y4m_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(multiplex_y4m_la_LDFLAGS) $(LDFLAGS) -o $@
+@ENABLE_EXPERIMENTAL_TRUE@@HAVE_MJPEGTOOLS_TRUE@am_multiplex_y4m_la_rpath = \
+@ENABLE_EXPERIMENTAL_TRUE@@HAVE_MJPEGTOOLS_TRUE@ -rpath \
+@ENABLE_EXPERIMENTAL_TRUE@@HAVE_MJPEGTOOLS_TRUE@ $(pkgdir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/autotools/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(multiplex_avi_la_SOURCES) $(multiplex_null_la_SOURCES) \
+ $(multiplex_raw_la_SOURCES) $(multiplex_y4m_la_SOURCES)
+DIST_SOURCES = $(multiplex_avi_la_SOURCES) \
+ $(multiplex_null_la_SOURCES) $(multiplex_raw_la_SOURCES) \
+ $(multiplex_y4m_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+A52_CFLAGS = @A52_CFLAGS@
+A52_LIBS = @A52_LIBS@
+ACLIB_LIBS = @ACLIB_LIBS@
+ACLOCAL = @ACLOCAL@
+ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVILIB_LIBS = @AVILIB_LIBS@
+AWK = @AWK@
+BSDAV_CFLAGS = @BSDAV_CFLAGS@
+BSDAV_LIBS = @BSDAV_LIBS@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXXCPP = @CXXCPP@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLDARWIN_CFLAGS = @DLDARWIN_CFLAGS@
+DLDARWIN_LIBS = @DLDARWIN_LIBS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FAAC_CFLAGS = @FAAC_CFLAGS@
+FAAC_LIBS = @FAAC_LIBS@
+FGREP = @FGREP@
+FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@
+FREETYPE2_LIBS = @FREETYPE2_LIBS@
+GREP = @GREP@
+IBP_LIBS = @IBP_LIBS@
+ICONV_CFLAGS = @ICONV_CFLAGS@
+ICONV_LIBS = @ICONV_LIBS@
+IMAGEMAGICK_CFLAGS = @IMAGEMAGICK_CFLAGS@
+IMAGEMAGICK_LIBS = @IMAGEMAGICK_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LAME_CFLAGS = @LAME_CFLAGS@
+LAME_LIBS = @LAME_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBAVCODEC_CFLAGS = @LIBAVCODEC_CFLAGS@
+LIBAVCODEC_LIBS = @LIBAVCODEC_LIBS@
+LIBAVFORMAT_CFLAGS = @LIBAVFORMAT_CFLAGS@
+LIBAVFORMAT_LIBS = @LIBAVFORMAT_LIBS@
+LIBDVDREAD_CFLAGS = @LIBDVDREAD_CFLAGS@
+LIBDVDREAD_LIBS = @LIBDVDREAD_LIBS@
+LIBDV_CFLAGS = @LIBDV_CFLAGS@
+LIBDV_LIBS = @LIBDV_LIBS@
+LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@
+LIBJPEG_LIBS = @LIBJPEG_LIBS@
+LIBMPEG2CONVERT_CFLAGS = @LIBMPEG2CONVERT_CFLAGS@
+LIBMPEG2CONVERT_LIBS = @LIBMPEG2CONVERT_LIBS@
+LIBMPEG2_CFLAGS = @LIBMPEG2_CFLAGS@
+LIBMPEG2_LIBS = @LIBMPEG2_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBPOSTPROC_CFLAGS = @LIBPOSTPROC_CFLAGS@
+LIBPOSTPROC_LIBS = @LIBPOSTPROC_LIBS@
+LIBQUICKTIME_CFLAGS = @LIBQUICKTIME_CFLAGS@
+LIBQUICKTIME_LIBS = @LIBQUICKTIME_LIBS@
+LIBS = @LIBS@
+LIBTCAUDIO_LIBS = @LIBTCAUDIO_LIBS@
+LIBTCVIDEO_LIBS = @LIBTCVIDEO_LIBS@
+LIBTC_LIBS = @LIBTC_LIBS@
+LIBTOOL = @LIBTOOL@
+LIBV4L2_CFLAGS = @LIBV4L2_CFLAGS@
+LIBV4L2_LIBS = @LIBV4L2_LIBS@
+LIBV4LCONVERT_CFLAGS = @LIBV4LCONVERT_CFLAGS@
+LIBV4LCONVERT_LIBS = @LIBV4LCONVERT_LIBS@
+LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
+LIBXML2_LIBS = @LIBXML2_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LZO_CFLAGS = @LZO_CFLAGS@
+LZO_LIBS = @LZO_LIBS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@
+MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@
+MKDIR_P = @MKDIR_P@
+MOD_PATH = @MOD_PATH@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OGG_CFLAGS = @OGG_CFLAGS@
+OGG_LIBS = @OGG_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PATH_TO_AWK = @PATH_TO_AWK@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PROF_PATH = @PROF_PATH@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+PVM3_CFLAGS = @PVM3_CFLAGS@
+PVM3_LIBS = @PVM3_LIBS@
+PVM3_PVMGS = @PVM3_PVMGS@
+RANLIB = @RANLIB@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_LIBS = @SDL_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIMD_FLAGS = @SIMD_FLAGS@
+STRIP = @STRIP@
+THEORA_CFLAGS = @THEORA_CFLAGS@
+THEORA_LIBS = @THEORA_LIBS@
+USE_DLDARWIN = @USE_DLDARWIN@
+VERSION = @VERSION@
+VORBIS_CFLAGS = @VORBIS_CFLAGS@
+VORBIS_LIBS = @VORBIS_LIBS@
+WAVLIB_LIBS = @WAVLIB_LIBS@
+X264_CFLAGS = @X264_CFLAGS@
+X264_LIBS = @X264_LIBS@
+XIO_CFLAGS = @XIO_CFLAGS@
+XIO_LIBS = @XIO_LIBS@
+XMKMF = @XMKMF@
+XVID_CFLAGS = @XVID_CFLAGS@
+XVID_LIBS = @XVID_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+a52_config = @a52_config@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+bsdav_config = @bsdav_config@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+faac_config = @faac_config@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+iconv_config = @iconv_config@
+imagemagick_config = @imagemagick_config@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+lame_config = @lame_config@
+libdir = @libdir@
+libdvdread_config = @libdvdread_config@
+libexecdir = @libexecdir@
+libjpeg_config = @libjpeg_config@
+libjpegmmx_config = @libjpegmmx_config@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lzo_config = @lzo_config@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pvm3_config = @pvm3_config@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+xvid_config = @xvid_config@
+AM_CPPFLAGS = \
+ $(PTHREAD_CFLAGS) \
+ -DMOD_PATH=\"$(MOD_PATH)\" \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src
+
+pkgdir = $(MOD_PATH)
+@HAVE_MJPEGTOOLS_TRUE@MODS_MJPEGTOOLS = \
+@HAVE_MJPEGTOOLS_TRUE@ multiplex_y4m.la
+
+@ENABLE_EXPERIMENTAL_TRUE@pkg_LTLIBRARIES = \
+@ENABLE_EXPERIMENTAL_TRUE@ multiplex_raw.la \
+@ENABLE_EXPERIMENTAL_TRUE@ multiplex_avi.la \
+@ENABLE_EXPERIMENTAL_TRUE@ $(MODS_MJPEGTOOLS) \
+@ENABLE_EXPERIMENTAL_TRUE@ multiplex_null.la
+
+multiplex_avi_la_SOURCES = multiplex_avi.c
+multiplex_avi_la_LDFLAGS = -module -avoid-version
+multiplex_raw_la_SOURCES = multiplex_raw.c
+multiplex_raw_la_LDFLAGS = -module -avoid-version
+multiplex_null_la_SOURCES = multiplex_null.c
+multiplex_null_la_LDFLAGS = -module -avoid-version
+multiplex_y4m_la_SOURCES = multiplex_y4m.c
+multiplex_y4m_la_CPPFLAGS = $(AM_CPPFLAGS) $(MJPEGTOOLS_CFLAGS)
+multiplex_y4m_la_LDFLAGS = -module -avoid-version
+multiplex_y4m_la_LIBADD = $(MJPEGTOOLS_LIBS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu multiplex/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu multiplex/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)"
+ @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \
+ }
+
+uninstall-pkgLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \
+ done
+
+clean-pkgLTLIBRARIES:
+ -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES)
+ @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+multiplex_avi.la: $(multiplex_avi_la_OBJECTS) $(multiplex_avi_la_DEPENDENCIES)
+ $(multiplex_avi_la_LINK) $(am_multiplex_avi_la_rpath) $(multiplex_avi_la_OBJECTS) $(multiplex_avi_la_LIBADD) $(LIBS)
+multiplex_null.la: $(multiplex_null_la_OBJECTS) $(multiplex_null_la_DEPENDENCIES)
+ $(multiplex_null_la_LINK) $(am_multiplex_null_la_rpath) $(multiplex_null_la_OBJECTS) $(multiplex_null_la_LIBADD) $(LIBS)
+multiplex_raw.la: $(multiplex_raw_la_OBJECTS) $(multiplex_raw_la_DEPENDENCIES)
+ $(multiplex_raw_la_LINK) $(am_multiplex_raw_la_rpath) $(multiplex_raw_la_OBJECTS) $(multiplex_raw_la_LIBADD) $(LIBS)
+multiplex_y4m.la: $(multiplex_y4m_la_OBJECTS) $(multiplex_y4m_la_DEPENDENCIES)
+ $(multiplex_y4m_la_LINK) $(am_multiplex_y4m_la_rpath) $(multiplex_y4m_la_OBJECTS) $(multiplex_y4m_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multiplex_avi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multiplex_null.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multiplex_raw.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multiplex_y4m_la-multiplex_y4m.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+multiplex_y4m_la-multiplex_y4m.lo: multiplex_y4m.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiplex_y4m_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT multiplex_y4m_la-multiplex_y4m.lo -MD -MP -MF $(DEPDIR)/multiplex_y4m_la-multiplex_y4m.Tpo -c -o multiplex_y4m_la-multiplex_y4m.lo `test -f 'multiplex_y4m.c' || echo '$(srcdir)/'`multiplex_y4m.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/multiplex_y4m_la-multiplex_y4m.Tpo $(DEPDIR)/multiplex_y4m_la-multiplex_y4m.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='multiplex_y4m.c' object='multiplex_y4m_la-multiplex_y4m.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiplex_y4m_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o multiplex_y4m_la-multiplex_y4m.lo `test -f 'multiplex_y4m.c' || echo '$(srcdir)/'`multiplex_y4m.c
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+ for dir in "$(DESTDIR)$(pkgdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-pkgLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pkgLTLIBRARIES
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-pkgLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-pkgLTLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-pkgLTLIBRARIES install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-pkgLTLIBRARIES
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/debian/transcode/transcode-1.1.7/multiplex/multiplex_avi.c b/debian/transcode/transcode-1.1.7/multiplex/multiplex_avi.c
new file mode 100644
index 00000000..6091a8a5
--- /dev/null
+++ b/debian/transcode/transcode-1.1.7/multiplex/multiplex_avi.c
@@ -0,0 +1,257 @@
+/*
+ * multiplex_avi.c -- multiplex frames in an AVI file using avilib.
+ * (C) 2005-2010 Francesco Romani <fromani at gmail dot com>
+ *
+ * This file is part of transcode, a video stream processing tool.
+ *
+ * transcode is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * transcode is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#include "transcode.h"
+#include "libtc/optstr.h"
+
+#include "libtc/tcmodule-plugin.h"
+
+#include "avilib/avilib.h"
+
+#define MOD_NAME "multiplex_avi.so"
+#define MOD_VERSION "v0.0.2 (2005-12-29)"
+#define MOD_CAP "create an AVI stream using avilib"
+
+#define MOD_FEATURES \
+ TC_MODULE_FEATURE_MULTIPLEX|TC_MODULE_FEATURE_VIDEO|TC_MODULE_FEATURE_AUDIO
+
+#define MOD_FLAGS \
+ TC_MODULE_FLAG_RECONFIGURABLE
+
+
+/* default FourCC to use if given one isn't known or if it's just absent */
+#define DEFAULT_FOURCC "RGB"
+
+static const char avi_help[] = ""
+ "Overview:\n"
+ " this module create an AVI stream using avilib.\n"
+ " AVI streams produced by this module can have a\n"
+ " maximum of one audio and video track.\n"
+ " You can add more tracks with further processing.\n"
+ "Options:\n"
+ " help produce module overview and options explanations\n";
+
+typedef struct {
+ avi_t *avifile;
+ int force_kf; /* boolean flag */
+} AVIPrivateData;
+
+static int avi_inspect(TCModuleInstance *self,
+ const char *param, const char **value)
+{
+ TC_MODULE_SELF_CHECK(self, "inspect");
+
+ if (optstr_lookup(param, "help")) {
+ *value = avi_help;
+ }
+
+ return TC_OK;
+}
+
+static int avi_configure(TCModuleInstance *self,
+ const char *options, vob_t *vob)
+{
+ const char *fcc = NULL;
+ AVIPrivateData *pd = NULL;
+ int arate = (vob->mp3frequency != 0)
+ ?vob->mp3frequency :vob->a_rate;
+ int abitrate = (vob->ex_a_codec == CODEC_PCM)
+ ?(vob->a_rate*4)/1000*8 :vob->mp3bitrate;
+
+ TC_MODULE_SELF_CHECK(self, "configure");
+ TC_MODULE_SELF_CHECK(vob, "configure"); /* hackish? */
+
+ pd = self->userdata;
+
+ fcc = tc_codec_fourcc(vob->ex_v_codec);
+ if (fcc == NULL) {
+ fcc = DEFAULT_FOURCC;
+ }
+ if (verbose >= TC_DEBUG) {
+ tc_log_info(MOD_NAME, "AVI FourCC: '%s'", fcc);
+ }
+
+ if (vob->ex_v_codec == CODEC_RGB || vob->ex_v_codec == TC_CODEC_RGB
+ || vob->ex_v_codec == CODEC_YUV || vob->ex_v_codec == TC_CODEC_YUV420P
+ || vob->ex_v_codec == CODEC_YUV422 || vob->ex_v_codec == TC_CODEC_YUV422P) {
+ pd->force_kf = TC_TRUE;
+ } else {
+ pd->force_kf = TC_FALSE;
+ }
+
+ pd->avifile = AVI_open_output_file(vob->video_out_file);
+ if(!pd->avifile) {
+ tc_log_error(MOD_NAME, "avilib error: %s", AVI_strerror());
+ return TC_ERROR;
+ }
+
+ AVI_set_video(pd->avifile, vob->ex_v_width, vob->ex_v_height,
+ vob->ex_fps, fcc);
+
+ AVI_set_audio_track(pd->avifile, vob->a_track);
+ AVI_set_audio(pd->avifile, vob->dm_chan, arate, vob->dm_bits,
+ vob->ex_a_codec, abitrate);
+ AVI_set_audio_vbr(pd->avifile, vob->a_vbr);
+
+ return TC_OK;
+}
+
+static int avi_stop(TCModuleInstance *self)
+{
+ AVIPrivateData *pd = NULL;
+
+ TC_MODULE_SELF_CHECK(self, "stop");
+
+ pd = self->userdata;
+
+ if (pd->avifile != NULL) {
+ AVI_close(pd->avifile);
+ pd->avifile = NULL;
+ }
+
+ return TC_OK;
+}
+
+static int avi_multiplex(TCModuleInstance *self,
+ vframe_list_t *vframe, aframe_list_t *aframe)
+{
+ uint32_t size_before, size_after;
+ int ret;
+
+ AVIPrivateData *pd = NULL;
+
+ TC_MODULE_SELF_CHECK(self, "multiplex");
+
+ pd = self->userdata;
+ size_before = AVI_bytes_written(pd->avifile);
+
+ if (vframe != NULL && vframe->video_len > 0) {
+ int key = ((vframe->attributes & TC_FRAME_IS_KEYFRAME)
+ || pd->force_kf) ?1 :0;
+
+ ret = AVI_write_frame(pd->avifile, (const char*)vframe->video_buf,
+ vframe->video_len, key);
+
+ if(ret < 0) {
+ tc_log_error(MOD_NAME, "avilib error writing video: %s",
+ AVI_strerror());
+ return TC_ERROR;
+ }
+ }
+
+ if (aframe != NULL && aframe->audio_len > 0) {
+ ret = AVI_write_audio(pd->avifile, (const char*)aframe->audio_buf,
+ aframe->audio_len);
+ if (ret < 0) {
+ tc_log_error(MOD_NAME, "avilib error writing audio: %s",
+ AVI_strerror());
+ return TC_ERROR;
+ }
+ }
+
+ size_after = AVI_bytes_written(pd->avifile);
+
+ return (size_after - size_before);
+}
+
+static int avi_init(TCModuleInstance *self, uint32_t features)
+{
+ AVIPrivateData *pd = NULL;
+
+ TC_MODULE_SELF_CHECK(self, "init");
+ TC_MODULE_INIT_CHECK(self, MOD_FEATURES, features);
+
+ pd = tc_malloc(sizeof(AVIPrivateData));
+ if (!pd) {
+ return TC_ERROR;
+ }
+
+ pd->avifile = NULL;
+ pd->force_kf = TC_FALSE;
+
+ if (verbose) {
+ tc_log_info(MOD_NAME, "%s %s", MOD_VERSION, MOD_CAP);
+ if (verbose >= TC_DEBUG) {
+ tc_log_info(MOD_NAME, "max AVI-file size limit = %lu bytes",
+ (unsigned long)AVI_max_size());
+ }
+ }
+
+ self->userdata = pd;
+ return TC_OK;
+}
+
+static int avi_fini(TCModuleInstance *self)
+{
+ TC_MODULE_SELF_CHECK(self, "fini");
+
+ avi_stop(self);
+
+ tc_free(self->userdata);
+ self->userdata = NULL;
+
+ return TC_OK;
+}
+
+/*************************************************************************/
+
+static const TCCodecID avi_codecs_in[] = {
+ TC_CODEC_PCM, TC_CODEC_AC3, TC_CODEC_MP2, TC_CODEC_MP3,
+ TC_CODEC_AAC, /* FIXME: that means asking for troubles */
+ TC_CODEC_YUV420P, TC_CODEC_DV,
+ TC_CODEC_DIVX3, TC_CODEC_DIVX4, TC_CODEC_DIVX5, TC_CODEC_XVID,
+ TC_CODEC_H264, /* FIXME: that means asking for troubles */
+ TC_CODEC_MPEG4VIDEO, TC_CODEC_MPEG1VIDEO, TC_CODEC_MJPEG,
+ TC_CODEC_LZO1, TC_CODEC_LZO2, TC_CODEC_RGB,
+ TC_CODEC_ERROR
+};
+static const TCFormatID avi_formats_out[] = { TC_FORMAT_AVI, TC_FORMAT_ERROR };
+/* a multiplexor is at the end of pipeline */
+TC_MODULE_MPLEX_FORMATS_CODECS(avi);
+
+TC_MODULE_INFO(avi);
+
+static const TCModuleClass avi_class = {
+ TC_MODULE_CLASS_HEAD(avi),
+
+ .init = avi_init,
+ .fini = avi_fini,
+ .configure = avi_configure,
+ .stop = avi_stop,
+ .inspect = avi_inspect,
+
+ .multiplex = avi_multiplex,
+};
+
+TC_MODULE_ENTRY_POINT(avi)
+
+/*************************************************************************/
+
+/*
+ * Local variables:
+ * c-file-style: "stroustrup"
+ * c-file-offsets: ((case-label . *) (statement-case-intro . *))
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vim: expandtab shiftwidth=4:
+ */
+
diff --git a/debian/transcode/transcode-1.1.7/multiplex/multiplex_null.c b/debian/transcode/transcode-1.1.7/multiplex/multiplex_null.c
new file mode 100644
index 00000000..a8f12e0f
--- /dev/null
+++ b/debian/transcode/transcode-1.1.7/multiplex/multiplex_null.c
@@ -0,0 +1,145 @@
+/*
+ * multiplex_null.c -- fake multiplexor that discards any given frame.
+ * (C) 2005-2010 Francesco Romani <fromani at gmail dot com>
+ *
+ * This file is part of transcode, a video stream processing tool.
+ *
+ * transcode is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * transcode is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#include "transcode.h"
+#include "libtc/optstr.h"
+
+#include "libtc/tcmodule-plugin.h"
+
+#define MOD_NAME "multiplex_null.so"
+#define MOD_VERSION "v0.0.2 (2005-12-29)"
+#define MOD_CAP "discard each encoded frame"
+
+#define MOD_FEATURES \
+ TC_MODULE_FEATURE_MULTIPLEX|TC_MODULE_FEATURE_VIDEO|TC_MODULE_FEATURE_AUDIO
+
+
+#define MOD_FLAGS \
+ TC_MODULE_FLAG_RECONFIGURABLE
+
+
+static const char null_help[] = ""
+ "Overview:\n"
+ " this module simply discard given encoded write audio and video frames.\n"
+ " Is used for test, benchmark and debug purposes.\n"
+ "Options:\n"
+ " help produce module overview and options explanations\n";
+
+static int null_init(TCModuleInstance *self, uint32_t features)
+{
+ TC_MODULE_SELF_CHECK(self, "init");
+ TC_MODULE_INIT_CHECK(self, MOD_FEATURES, features);
+
+ if (verbose) {
+ tc_log_info(MOD_NAME, "%s %s", MOD_VERSION, MOD_CAP);
+ }
+ self->userdata = NULL;
+
+ return TC_OK;
+}
+
+static int null_fini(TCModuleInstance *self)
+{
+ TC_MODULE_SELF_CHECK(self, "fini");
+
+ return TC_OK;
+}
+
+static int null_configure(TCModuleInstance *self,
+ const char *options, vob_t *vob)
+{
+ TC_MODULE_SELF_CHECK(self, "configure");
+
+ return TC_OK;
+}
+
+static int null_inspect(TCModuleInstance *self,
+ const char *param, const char **value)
+{
+ TC_MODULE_SELF_CHECK(self, "inspect");
+
+ if (optstr_lookup(param, "help")) {
+ *value = null_help;
+ }
+
+ return TC_OK;
+}
+
+static int null_stop(TCModuleInstance *self)
+{
+ TC_MODULE_SELF_CHECK(self, "stop");
+
+ return TC_OK;
+}
+
+static int null_multiplex(TCModuleInstance *self,
+ vframe_list_t *vframe, aframe_list_t *aframe)
+{
+ int asize = 0, vsize = 0;
+
+ TC_MODULE_SELF_CHECK(self, "multiplex");
+
+ if (vframe != NULL) {
+ vsize = vframe->video_len;
+ }
+
+ if (aframe != NULL) {
+ asize = aframe->audio_len;
+ }
+
+ return vsize + asize;
+}
+
+/*************************************************************************/
+
+static const TCCodecID null_codecs_in[] = { TC_CODEC_ANY, TC_CODEC_ERROR };
+static const TCFormatID null_formats_out[] = { TC_FORMAT_NULL, TC_FORMAT_ERROR };
+/* a multiplexor is at the end of pipeline */
+TC_MODULE_MPLEX_FORMATS_CODECS(null);
+
+TC_MODULE_INFO(null);
+
+static const TCModuleClass null_class = {
+ TC_MODULE_CLASS_HEAD(null),
+
+ .init = null_init,
+ .fini = null_fini,
+ .configure = null_configure,
+ .stop = null_stop,
+ .inspect = null_inspect,
+
+ .multiplex = null_multiplex,
+};
+
+TC_MODULE_ENTRY_POINT(null)
+
+/*************************************************************************/
+
+/*
+ * Local variables:
+ * c-file-style: "stroustrup"
+ * c-file-offsets: ((case-label . *) (statement-case-intro . *))
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vim: expandtab shiftwidth=4:
+ */
+
diff --git a/debian/transcode/transcode-1.1.7/multiplex/multiplex_raw.c b/debian/transcode/transcode-1.1.7/multiplex/multiplex_raw.c
new file mode 100644
index 00000000..5732e1a0
--- /dev/null
+++ b/debian/transcode/transcode-1.1.7/multiplex/multiplex_raw.c
@@ -0,0 +1,257 @@
+/*
+ * multiplex_raw.c -- write a separate plain file for each stream.
+ * (C) 2005-2010 Francesco Romani <fromani at gmail dot com>
+ *
+ * This file is part of transcode, a video stream processing tool.
+ *
+ * transcode is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * transcode is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#include "transcode.h"
+#include "libtc/optstr.h"
+
+#include "libtc/tcmodule-plugin.h"
+
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <string.h>
+#include <errno.h>
+
+#define MOD_NAME "multiplex_raw.so"
+#define MOD_VERSION "v0.0.3 (2006-03-06)"
+#define MOD_CAP "write each stream in a separate file"
+
+#define MOD_FEATURES \
+ TC_MODULE_FEATURE_MULTIPLEX|TC_MODULE_FEATURE_VIDEO|TC_MODULE_FEATURE_AUDIO
+
+#define MOD_FLAGS \
+ TC_MODULE_FLAG_RECONFIGURABLE
+
+
+#define RAW_VID_EXT "vid"
+#define RAW_AUD_EXT "aud"
+
+static const char raw_help[] = ""
+ "Overview:\n"
+ " this module simply write audio and video streams in\n"
+ " a separate plain file for each stream.\n"
+ "Options:\n"
+ " help produce module overview and options explanations\n";
+
+typedef struct {
+ int fd_aud;
+ int fd_vid;
+} RawPrivateData;
+
+static int raw_inspect(TCModuleInstance *self,
+ const char *options, const char **value)
+{
+ TC_MODULE_SELF_CHECK(self, "inspect");
+
+ if (optstr_lookup(options, "help")) {
+ *value = raw_help;
+ }
+
+ return TC_OK;
+}
+
+static int raw_configure(TCModuleInstance *self,
+ const char *options, vob_t *vob)
+{
+ char vid_name[PATH_MAX];
+ char aud_name[PATH_MAX];
+ RawPrivateData *pd = NULL;
+
+ TC_MODULE_SELF_CHECK(self, "configure");
+
+ pd = self->userdata;
+
+ // XXX
+ if (vob->audio_out_file == NULL
+ || !strcmp(vob->audio_out_file, "/dev/null")) {
+ /* use affine names */
+ tc_snprintf(vid_name, PATH_MAX, "%s.%s",
+ vob->video_out_file, RAW_VID_EXT);
+ tc_snprintf(aud_name, PATH_MAX, "%s.%s",
+ vob->video_out_file, RAW_AUD_EXT);
+ } else {
+ /* copy names verbatim */
+ strlcpy(vid_name, vob->video_out_file, PATH_MAX);
+ strlcpy(aud_name, vob->audio_out_file, PATH_MAX);
+ }
+
+ /* avoid fd loss in case of failed configuration */
+ if (pd->fd_vid == -1) {
+ pd->fd_vid = open(vid_name,
+ O_RDWR|O_CREAT|O_TRUNC,
+ S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
+ if (pd->fd_vid == -1) {
+ tc_log_error(MOD_NAME, "failed to open video stream file");
+ return TC_ERROR;
+ }
+ }
+
+ /* avoid fd loss in case of failed configuration */
+ if (pd->fd_aud == -1) {
+ pd->fd_aud = open(aud_name,
+ O_RDWR|O_CREAT|O_TRUNC,
+ S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
+ if (pd->fd_aud == -1) {
+ tc_log_error(MOD_NAME, "failed to open audio stream file");
+ return TC_ERROR;
+ }
+ }
+ if (vob->verbose >= TC_DEBUG) {
+ tc_log_info(MOD_NAME, "video output: %s (%s)",
+ vid_name, (pd->fd_vid == -1) ?"FAILED" :"OK");
+ tc_log_info(MOD_NAME, "audio output: %s (%s)",
+ aud_name, (pd->fd_aud == -1) ?"FAILED" :"OK");
+ }
+ return TC_OK;
+}
+
+static int raw_stop(TCModuleInstance *self)
+{
+ RawPrivateData *pd = NULL;
+ int verr, aerr;
+
+ TC_MODULE_SELF_CHECK(self, "stop");
+
+ pd = self->userdata;
+
+ if (pd->fd_vid != -1) {
+ verr = close(pd->fd_vid);
+ if (verr) {
+ tc_log_error(MOD_NAME, "closing video file: %s",
+ strerror(errno));
+ return TC_ERROR;
+ }
+ pd->fd_vid = -1;
+ }
+
+ if (pd->fd_aud != -1) {
+ aerr = close(pd->fd_aud);
+ if (aerr) {
+ tc_log_error(MOD_NAME, "closing audio file: %s",
+ strerror(errno));
+ return TC_ERROR;
+ }
+ pd->fd_aud = -1;
+ }
+
+ return TC_OK;
+}
+
+static int raw_multiplex(TCModuleInstance *self,
+ vframe_list_t *vframe, aframe_list_t *aframe)
+{
+ ssize_t w_aud = 0, w_vid = 0;
+
+ RawPrivateData *pd = NULL;
+
+ TC_MODULE_SELF_CHECK(self, "multiplex");
+
+ pd = self->userdata;
+
+ if (vframe != NULL && vframe->video_len > 0) {
+ w_vid = tc_pwrite(pd->fd_vid, vframe->video_buf, vframe->video_len);
+ if(w_vid < 0) {
+ return TC_ERROR;
+ }
+ }
+
+ if (aframe != NULL && aframe->audio_len > 0) {
+ w_aud = tc_pwrite(pd->fd_aud, aframe->audio_buf, aframe->audio_len);
+ if (w_aud < 0) {
+ return TC_ERROR;
+ }
+ }
+
+ return (int)(w_vid + w_aud);
+}
+
+static int raw_init(TCModuleInstance *self, uint32_t features)
+{
+ RawPrivateData *pd = NULL;
+
+ TC_MODULE_SELF_CHECK(self, "init");
+ TC_MODULE_INIT_CHECK(self, MOD_FEATURES, features);
+
+ pd = tc_malloc(sizeof(RawPrivateData));
+ if (pd == NULL) {
+ return TC_ERROR;
+ }
+
+ pd->fd_aud = -1;
+ pd->fd_vid = -1;
+
+ if (verbose) {
+ tc_log_info(MOD_NAME, "%s %s", MOD_VERSION, MOD_CAP);
+ }
+
+ self->userdata = pd;
+ return TC_OK;
+}
+
+static int raw_fini(TCModuleInstance *self)
+{
+ TC_MODULE_SELF_CHECK(self, "fini");
+
+ raw_stop(self);
+
+ tc_free(self->userdata);
+ self->userdata = NULL;
+
+ return TC_OK;
+}
+
+
+/*************************************************************************/
+
+static const TCCodecID raw_codecs_in[] = { TC_CODEC_ANY, TC_CODEC_ERROR };
+static const TCFormatID raw_formats_out[] = { TC_FORMAT_RAW, TC_FORMAT_ERROR };
+/* a multiplexor is at the end of pipeline */
+TC_MODULE_MPLEX_FORMATS_CODECS(raw);
+
+TC_MODULE_INFO(raw);
+
+static const TCModuleClass raw_class = {
+ TC_MODULE_CLASS_HEAD(raw),
+
+ .init = raw_init,
+ .fini = raw_fini,
+ .configure = raw_configure,
+ .stop = raw_stop,
+ .inspect = raw_inspect,
+
+ .multiplex = raw_multiplex,
+};
+
+TC_MODULE_ENTRY_POINT(raw)
+
+/*************************************************************************/
+
+/*
+ * Local variables:
+ * c-file-style: "stroustrup"
+ * c-file-offsets: ((case-label . *) (statement-case-intro . *))
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vim: expandtab shiftwidth=4:
+ */
+
diff --git a/debian/transcode/transcode-1.1.7/multiplex/multiplex_y4m.c b/debian/transcode/transcode-1.1.7/multiplex/multiplex_y4m.c
new file mode 100644
index 00000000..78932750
--- /dev/null
+++ b/debian/transcode/transcode-1.1.7/multiplex/multiplex_y4m.c
@@ -0,0 +1,397 @@
+/*
+ * multiplex_y4m.c -- pack a yuv420p stream in YUV4MPEG2 format
+ * and/or a pcm stream in WAVE format
+ * (C) 2005-2010 Francesco Romani <fromani at gmail dot com>
+ *
+ * This file is part of transcode, a video stream processing tool.
+ *
+ * transcode is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * transcode is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#include "config.h"
+
+#include "transcode.h"
+#include "libtc/optstr.h"
+#include "libtc/ratiocodes.h"
+
+#include "libtc/tcmodule-plugin.h"
+
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <string.h>
+#include <errno.h>
+
+#if defined(HAVE_MJPEGTOOLS_INC)
+#include "yuv4mpeg.h"
+#include "mpegconsts.h"
+#else
+#include "mjpegtools/yuv4mpeg.h"
+#include "mjpegtools/mpegconsts.h"
+#endif
+
+#include "avilib/wavlib.h"
+
+#define MOD_NAME "multiplex_y4m.so"
+#define MOD_VERSION "v0.0.1 (2006-03-22)"
+#define MOD_CAP "write YUV4MPEG2 video and WAVE audio streams"
+
+#define MOD_FEATURES \
+ TC_MODULE_FEATURE_MULTIPLEX|TC_MODULE_FEATURE_VIDEO|TC_MODULE_FEATURE_AUDIO
+
+
+#define MOD_FLAGS \
+ TC_MODULE_FLAG_RECONFIGURABLE
+
+
+
+#define YW_VID_EXT "y4m"
+#define YW_AUD_EXT "wav"
+
+/*
+ * 'yw_' prefix is used internally to avoid any name clash
+ * with mjpegtools's y4m_* routines
+ */
+
+
+/* XXX */
+static const char yw_help[] = ""
+ "Overview:\n"
+ " this module writes a yuv420p video stream using YUV4MPEG2 format\n"
+ " and/or a pcm stream using WAVE format.\n"
+ "Options:\n"
+ " help produce module overview and options explanations\n";
+
+typedef struct {
+ int fd_vid;
+ WAV wav;
+
+ y4m_frame_info_t frameinfo;
+ y4m_stream_info_t streaminfo;
+
+ int width;
+ int height;
+
+} YWPrivateData;
+
+
+static int yw_inspect(TCModuleInstance *self,
+ const char *options, const char **value)
+{
+ TC_MODULE_SELF_CHECK(self, "inspect");
+
+ if (optstr_lookup(options, "help")) {
+ *value = yw_help;
+ }
+
+ return TC_OK;
+}
+
+static int yw_open_video(YWPrivateData *pd, const char *filename,
+ vob_t *vob)
+{
+ int asr, ret;
+ y4m_ratio_t framerate;
+ y4m_ratio_t asr_rate;
+
+ /* avoid fd loss in case of failed configuration */
+ if (pd->fd_vid == -1) {
+ pd->fd_vid = open(filename,
+ O_RDWR|O_CREAT|O_TRUNC,
+ S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
+ if (pd->fd_vid == -1) {
+ tc_log_error(MOD_NAME, "failed to open video stream file '%s'"
+ " (reason: %s)", filename,
+ strerror(errno));
+ return TC_ERROR;
+ }
+ }
+ y4m_init_stream_info(&(pd->streaminfo));
+
+ //note: this is the real framerate of the raw stream
+ framerate = (vob->ex_frc == 0) ?mpeg_conform_framerate(vob->ex_fps)
+ :mpeg_framerate(vob->ex_frc);
+ if (framerate.n == 0 && framerate.d == 0) {
+ framerate.n = vob->ex_fps * 1000;
+ framerate.d = 1000;
+ }
+
+ asr = (vob->ex_asr < 0) ?vob->im_asr :vob->ex_asr;
+ tc_asr_code_to_ratio(asr, &asr_rate.n, &asr_rate.d);
+
+ y4m_init_stream_info(&(pd->streaminfo));
+ y4m_si_set_framerate(&(pd->streaminfo), framerate);
+ if (vob->encode_fields == TC_ENCODE_FIELDS_TOP_FIRST) {
+ y4m_si_set_interlace(&(pd->streaminfo), Y4M_ILACE_TOP_FIRST);
+ } else if (vob->encode_fields == TC_ENCODE_FIELDS_BOTTOM_FIRST) {
+ y4m_si_set_interlace(&(pd->streaminfo), Y4M_ILACE_BOTTOM_FIRST);
+ } else if (vob->encode_fields == TC_ENCODE_FIELDS_PROGRESSIVE) {
+ y4m_si_set_interlace(&(pd->streaminfo), Y4M_ILACE_NONE);
+ }
+ /* XXX */
+ y4m_si_set_sampleaspect(&(pd->streaminfo),
+ y4m_guess_sar(pd->width,
+ pd->height,
+ asr_rate));
+ y4m_si_set_height(&(pd->streaminfo), pd->height);
+ y4m_si_set_width(&(pd->streaminfo), pd->width);
+ /* Y4M_CHROMA_420JPEG 4:2:0, H/V centered, for JPEG/MPEG-1 */
+ /* Y4M_CHROMA_420MPEG2 4:2:0, H cosited, for MPEG-2 */
+ /* Y4M_CHROMA_420PALDV 4:2:0, alternating Cb/Cr, for PAL-DV */
+ y4m_si_set_chroma(&(pd->streaminfo), Y4M_CHROMA_420JPEG); // XXX
+
+ ret = y4m_write_stream_header(pd->fd_vid, &(pd->streaminfo));
+ if (ret != Y4M_OK) {
+ tc_log_warn(MOD_NAME, "failed to write video YUV4MPEG2 header: %s",
+ y4m_strerr(ret));
+ return TC_ERROR;
+ }
+ return TC_OK;
+}
+
+static int yw_open_audio(YWPrivateData *pd, const char *filename,
+ vob_t *vob)
+{
+ WAVError err;
+ int rate;
+
+ pd->wav = wav_open(filename, WAV_WRITE, &err);
+ if (!pd->wav) {
+ tc_log_error(MOD_NAME, "failed to open audio stream file '%s'"
+ " (reason: %s)", filename,
+ wav_strerror(err));
+ return TC_ERROR;
+ }
+
+ rate = (vob->mp3frequency != 0) ?vob->mp3frequency :vob->a_rate;
+ wav_set_bits(pd->wav, vob->dm_bits);
+ wav_set_rate(pd->wav, rate);
+ wav_set_bitrate(pd->wav, vob->dm_chan * rate * vob->dm_bits/8);
+ wav_set_channels(pd->wav, vob->dm_chan);
+
+ return TC_OK;
+}
+
+static int yw_configure(TCModuleInstance *self,
+ const char *options, vob_t *vob)
+{
+ char vid_name[PATH_MAX];
+ char aud_name[PATH_MAX];
+ YWPrivateData *pd = NULL;
+ int ret;
+
+ TC_MODULE_SELF_CHECK(self, "configure");
+
+ pd = self->userdata;
+
+ if (vob->audio_out_file == NULL
+ || !strcmp(vob->audio_out_file, "/dev/null")) {
+ /* use affine names */
+ tc_snprintf(vid_name, PATH_MAX, "%s.%s",
+ vob->video_out_file, YW_VID_EXT);
+ tc_snprintf(aud_name, PATH_MAX, "%s.%s",
+ vob->video_out_file, YW_AUD_EXT);
+ } else {
+ /* copy names verbatim */
+ strlcpy(vid_name, vob->video_out_file, PATH_MAX);
+ strlcpy(aud_name, vob->audio_out_file, PATH_MAX);
+ }
+
+ pd->width = vob->ex_v_width;
+ pd->height = vob->ex_v_height;
+
+ ret = yw_open_video(pd, vid_name, vob);
+ if (ret != TC_OK) {
+ return ret;
+ }
+ ret = yw_open_audio(pd, aud_name, vob);
+ if (ret != TC_OK) {
+ return ret;
+ }
+ if (vob->verbose >= TC_DEBUG) {
+ tc_log_info(MOD_NAME, "video output: %s (%s)",
+ vid_name, (pd->fd_vid == -1) ?"FAILED" :"OK");
+ tc_log_info(MOD_NAME, "audio output: %s (%s)",
+ aud_name, (pd->wav == NULL) ?"FAILED" :"OK");
+ }
+ return TC_OK;
+}
+
+static int yw_stop(TCModuleInstance *self)
+{
+ YWPrivateData *pd = NULL;
+ int verr, aerr;
+
+ TC_MODULE_SELF_CHECK(self, "stop");
+
+ pd = self->userdata;
+
+ if (pd->fd_vid != -1) {
+ verr = close(pd->fd_vid);
+ if (verr) {
+ tc_log_error(MOD_NAME, "closing video file: %s",
+ strerror(errno));
+ return TC_ERROR;
+ }
+ y4m_fini_frame_info(&pd->frameinfo);
+ y4m_fini_stream_info(&(pd->streaminfo));
+
+ pd->fd_vid = -1;
+ }
+
+ if (pd->wav != NULL) {
+ aerr = wav_close(pd->wav);
+ if (aerr != 0) {
+ tc_log_error(MOD_NAME, "closing audio file: %s",
+ wav_strerror(wav_last_error(pd->wav)));
+ return TC_ERROR;
+ }
+ pd->wav = NULL;
+ }
+
+ return TC_OK;
+}
+
+static int yw_multiplex(TCModuleInstance *self,
+ vframe_list_t *vframe, aframe_list_t *aframe)
+{
+ ssize_t w_aud = 0, w_vid = 0;
+
+ YWPrivateData *pd = NULL;
+
+ TC_MODULE_SELF_CHECK(self, "multiplex");
+
+ pd = self->userdata;
+
+ if (vframe != NULL && vframe->video_len > 0) {
+ uint8_t *planes[3];
+ int ret = 0;
+ y4m_init_frame_info(&pd->frameinfo);
+ YUV_INIT_PLANES(planes, vframe->video_buf, IMG_YUV420P,
+ pd->width, pd->height);
+
+ ret = y4m_write_frame(pd->fd_vid, &(pd->streaminfo),
+ &pd->frameinfo, planes);
+ if (ret != Y4M_OK) {
+ tc_log_warn(MOD_NAME, "error while writing video frame: %s",
+ y4m_strerr(ret));
+ return TC_ERROR;
+ }
+ w_vid = vframe->video_len;
+ }
+
+ if (aframe != NULL && aframe->audio_len > 0) {
+ w_aud = wav_write_data(pd->wav, aframe->audio_buf, aframe->audio_len);
+ if (w_aud != aframe->audio_len) {
+ tc_log_warn(MOD_NAME, "error while writing audio frame: %s",
+ wav_strerror(wav_last_error(pd->wav)));
+ return TC_ERROR;
+ }
+ }
+
+ return (int)(w_vid + w_aud);
+}
+
+static int yw_init(TCModuleInstance *self, uint32_t features)
+{
+ YWPrivateData *pd = NULL;
+
+ TC_MODULE_SELF_CHECK(self, "init");
+ TC_MODULE_INIT_CHECK(self, MOD_FEATURES, features);
+
+ pd = tc_malloc(sizeof(YWPrivateData));
+ if (pd == NULL) {
+ return TC_ERROR;
+ }
+
+ pd->width = 0;
+ pd->height = 0;
+ pd->fd_vid = -1;
+ pd->wav = NULL;
+ y4m_init_stream_info(&(pd->streaminfo));
+ /* frameinfo will be initialized at each multiplex call */
+
+ if (verbose) {
+ tc_log_info(MOD_NAME, "%s %s", MOD_VERSION, MOD_CAP);
+ }
+
+ self->userdata = pd;
+ return TC_OK;
+}
+
+static int yw_fini(TCModuleInstance *self)
+{
+ TC_MODULE_SELF_CHECK(self, "fini");
+
+ yw_stop(self);
+
+ tc_free(self->userdata);
+ self->userdata = NULL;
+
+ return TC_OK;
+}
+
+
+/*************************************************************************/
+
+static const TCCodecID yw_codecs_in[] = { TC_CODEC_YUV420P, TC_CODEC_PCM,
+ TC_CODEC_ERROR };
+
+/* a multiplexor is at the end of pipeline */
+static const TCCodecID yw_codecs_out[] = { TC_CODEC_ERROR };
+static const TCFormatID yw_formats_in[] = { TC_FORMAT_ERROR };
+static const TCFormatID yw_formats_out[] = {
+ TC_FORMAT_YUV4MPEG, TC_FORMAT_WAV, TC_FORMAT_ERROR
+};
+
+static const TCModuleInfo yw_info = {
+ .features = MOD_FEATURES,
+ .flags = MOD_FLAGS,
+ .name = MOD_NAME,
+ .version = MOD_VERSION,
+ .description = MOD_CAP,
+ .codecs_in = yw_codecs_in,
+ .codecs_out = yw_codecs_out,
+ .formats_in = yw_formats_in,
+ .formats_out = yw_formats_out
+};
+
+static const TCModuleClass yw_class = {
+ TC_MODULE_CLASS_HEAD(yw),
+
+ .init = yw_init,
+ .fini = yw_fini,
+ .configure = yw_configure,
+ .stop = yw_stop,
+ .inspect = yw_inspect,
+
+ .multiplex = yw_multiplex,
+};
+
+TC_MODULE_ENTRY_POINT(yw);
+
+/*************************************************************************/
+
+/*
+ * Local variables:
+ * c-file-style: "stroustrup"
+ * c-file-offsets: ((case-label . *) (statement-case-intro . *))
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vim: expandtab shiftwidth=4:
+ */
+