From e166e8943388389bb4fc2927aac8758387c42846 Mon Sep 17 00:00:00 2001 From: "N.N." Date: Tue, 30 Mar 2004 01:56:16 +0000 Subject: PiDiP 0.12.13 svn path=/trunk/externals/pidip/; revision=1508 --- CHANGES.LOG | 14 ++ INSTALL | 42 ++-- Makefile | 36 ++-- Makefile.in | 34 ++-- acinclude.m4 | 2 +- aclocal.m4 | 2 +- config.log | 409 +++++++++++++++++++------------------ config.status | 245 +++++++++++++++++++--- configure | 426 ++++++++++++++++++++++++++++++++------- configure.ac | 65 +++++- configure.in | 68 +++++-- doc/help-pdp_dice.pd | 4 +- doc/help-pdp_ffmpeg~.pd | 69 ++++--- doc/help-pdp_fqt.pd | 38 ++-- doc/help-pdp_imgloader.pd | 2 +- doc/help-pdp_ocanvas.pd | 140 ++++++------- doc/help-pdp_shape.pd | 81 ++++---- doc/rs_pdp_live~.pd | 62 ++++-- modules/Makefile | 7 +- modules/Makefile.in | 7 +- modules/pdp_cmap.c | 9 +- modules/pdp_compose.c | 9 +- modules/pdp_ctrack.c | 10 +- modules/pdp_ffmpeg~.c | 37 ++-- modules/pdp_imgloader.c | 4 +- modules/pdp_live~.c | 121 ++++++++--- modules/pdp_shape.c | 20 +- modules/pdp_simura.c | 4 +- modules/pdp_spigot.c | 4 +- modules/pdp_xcanvas.c | 3 +- modules/pdp_yqt.c | 4 +- modules/pdp_yvu2rgb.c | 4 +- patches/collage.pd | 1 - patches/help_pdp_effects_rack.pd | 67 +++--- patches/pdp_charcoal.pd | 40 +++- system/pidip.c | 25 ++- 36 files changed, 1451 insertions(+), 664 deletions(-) diff --git a/CHANGES.LOG b/CHANGES.LOG index 9eb4155..19eca68 100644 --- a/CHANGES.LOG +++ b/CHANGES.LOG @@ -1,4 +1,18 @@ +0.12.14 ( codename Naveen's Ethiopian Cafe ) + added pdp_mp4player~ : a quicktime stream picker ( compiled against meg4ip v1.0 ) +0.12.13 ( codename Gollum Club Riereta ) + improved decoding in pdp_live~, in particular for audio/video synchronization + added a "end of stream" outlet in pdp_live~ ( when reaching the end of a file ) + added frame rates in pdp_ffmpeg~, pdp_live~ + added pdp_spotlight : a spotlight, for cabaret (for pep') + added pdp_cabaret patch : a patch to track someone with a spotlight ( poursuite ) + added pdp_ieee1394 : firewire capture object for OSX based on pix_video ( OSX only ) 0.12.12 + added pdp_mp4live~ : mpeg4ip streaming object to stream to a darwin server + note : now, building of streaming objects is optional + ( with --enable-ffmpeg OR --enable-mpeg4ip : warning, you can't enable both, they are conflicting ) + fixed some crashes when objects like pdp_ctrack, pdp_cmap, pdp_compose were in a sub-patch + ( problem reported by Mark Widmer ) added offsets messages in pdp_pen 0.12.11 added pdp_charcoal to the effect rack : charcoal effect using edge detection, blur, normalization and negate diff --git a/INSTALL b/INSTALL index 38420e5..6f4c601 100644 --- a/INSTALL +++ b/INSTALL @@ -1,29 +1,37 @@ -first, install : +a/ first, install : -imlib2 ( http://sourceforge.net/project/showfiles.php?group_id=2 ) -Image Magick ( http://www.imagemagick.org ) - ----> watchout !! configure with --enable-shared -and ffmpeg - ----> watchout, it requires the cvs snapshot ! : http://ffmpeg.sourceforge.net/cvs - + don't forget to activate mp3 and vorbis support in ffmpeg : ./configure --enable-mp3lame --enable-vorbis +MANDATORY :: +============ +***** PD sources : http://www-crca.ucsd.edu/~msp/software.html +***** PDP and its deps : http://zwizwa.fartit.com/pd/pdp/ +***** imlib2 : http://sourceforge.net/project/showfiles.php?group_id=2 +***** Image Magick : http://www.imagemagick.org + ----> watchout !! configure with --enable-shared -you should also have installed libquicktime that is necessary for PDP -( http://sourceforge.net/projects/libquicktime ). +OPTIONALLY :: +============= +***** ffmpeg : http://ffmpeg.sourceforge.net/cvs +( --enable-ffmpeg ) ----> watchout, it requires the cvs snapshot ! + + don't forget to activate mp3 and vorbis support in ffmpeg : + ./configure --enable-mp3lame --enable-vorbis +OR -gone through it ?? yeh, i know it's a lot. -ok, first stage reached ) +***** mpeg4ip : http://mpeg4ip.sourceforge.net/ ( download mpeg4ip v1.0 ) +( --enable-mpeg4ip ) -fix PD, PDP and FFMPEG paths in configure.ac +b/ fix PD, PDP and FFMPEG/MPEG4IP paths in configure.ac -autoconf +c/ autoconf -./configure +d/ ./configure [--enable-ffmpeg] OR [--enable-mpeg4ip] ( not both ) -make clean +e/ make clean -make +f/ make -as root, make install +g/ as root, make install + +h/ modify your pd start-up script : pidip is a library, it should be loaded with the "-lib /pidip" command line option diff --git a/Makefile b/Makefile index 8d50da2..1d21e1a 100644 --- a/Makefile +++ b/Makefile @@ -2,25 +2,30 @@ PD_DIR = /usr/local/pd PDP_DIR = /usr/local/pd/pdp FFMPEG_SOURCE_DIR = /SOURCES/ffmpeg -LIBS = -lvorbisenc -lvorbis -logg -lmp3lame -ldl -lz -lbz2 -lMagick -lbz2 -lz -ldl -lmp3lame -logg -lvorbis -lvorbisenc +PDP_PIDIP_LIBS = -lbz2 -lz -ldl -lmp3lame -logg -lvorbis -lvorbisenc /SOURCES/ffmpeg/libavformat/libavformat.a /SOURCES/ffmpeg/libavcodec/libavcodec.a IMLIB_CFLAGS = -I/usr/local/include -I/usr/X11R6/include IMLIB_LIBS = -L/usr/local/lib -lImlib2 -lttf -lm -ldl -lXext -lXext -lX11 -L/usr/X11R6/lib MAGICK_CFLAGS = -I/usr/X11R6/include -g -O2 -Wall MAGICK_LIBS = -L/usr/X11R6/lib -lMagick -lMagick -ltiff -lfreetype -ljasper -ljpeg -lpng -lXext -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lpthread -lm -L/usr/local/lib -L/usr/X11R6/lib -L/usr/X11R6/lib -L/usr/local/lib -PDP_PIDIP_VERSION = 0.12.12 +PDP_PIDIP_INCLUDES = -I/usr/local/pd/src -I. -I/usr/local/pd/pdp/include -I../include -I/SOURCES/ffmpeg/libavcodec -I/SOURCES/ffmpeg/libavformat +PDP_PIDIP_VERSION = 0.12.14 +MPEG4IP_CFLAGS = PDP_PIDIP_DISTRO = /mnt/c/ydegoyon.free.fr/pidip-$(PDP_PIDIP_VERSION) PDP_PIDIP_TARBALL = $(PDP_PIDIP_DISTRO).tar.gz -# build flags -PDP_PIDIP_INCLUDE = -I$(PD_DIR)/src -I. -I$(PDP_DIR)/include -I$(FFMPEG_SOURCE_DIR)/libavcodec -I$(FFMPEG_SOURCE_DIR)/libavformat -I../include -PDP_PIDIP_CFLAGS = $(MAGICK_CFLAGS) $(IMLIB_CFLAGS) \ + +PDP_PIDIP_CFLAGS = $(MPEG4IP_CFLAGS) $(MAGICK_CFLAGS) $(IMLIB_CFLAGS) \ + -DPD -DX_DISPLAY_MISSING -O2 -funroll-loops -fomit-frame-pointer -ffast-math \ + -Wall -W -Wstrict-prototypes \ + -Wno-unused -Wno-parentheses -Wno-switch \ + -DPDP_PIDIP_VERSION=\"$(PDP_PIDIP_VERSION)\" -g + +PDP_PIDIP_CPPFLAGS = $(MPEG4IP_CFLAGS) $(MAGICK_CFLAGS) $(IMLIB_CFLAGS) \ -DPD -DX_DISPLAY_MISSING -O2 -funroll-loops -fomit-frame-pointer -ffast-math \ -Wall -W -Wstrict-prototypes \ -Wno-unused -Wno-parentheses -Wno-switch \ - -DPDP_PIDIP_VERSION=\"$(PDP_PIDIP_VERSION)\" \ - -g -PDP_PIDIP_CPPFLAGS = -O + -DPDP_PIDIP_VERSION=\"$(PDP_PIDIP_VERSION)\" -g all: pidip.pd_linux @@ -30,28 +35,27 @@ pdp_pidip_all: pidip.pd_linux: pdp_pidip_all rm -f pidip.pd_linux - gcc -export_dynamic -shared -o pidip.pd_linux modules/*.o system/*.o $(FFMPEG_SOURCE_DIR)/libavformat/libavformat.a $(FFMPEG_SOURCE_DIR)/libavcodec/libavcodec.a $(LIBS) $(IMLIB_LIBS) $(MAGICK_LIBS) + g++ -export_dynamic -shared -o pidip.pd_linux modules/*.o system/*.o $(PDP_PIDIP_LIBS) $(IMLIB_LIBS) $(MAGICK_LIBS) + strip --strip-unneeded pidip.pd_linux clean: rm -f */*.o rm -f pidip.pd_linux - rm -f *~ install: cp fonts/* /usr/X11R6/lib/X11/fonts/TTF cp -f --remove-destination doc/* $(PD_DIR)/doc/5.reference distro: clean all - rm */*.o - strip --strip-unneeded pidip.pd_linux + rm -f */*.o + rm -rf autom4te.cache cd .. && cp -rf pidip /tmp/pidip-$(PDP_PIDIP_VERSION) cd /tmp && tar vczf $(PDP_PIDIP_TARBALL) pidip-$(PDP_PIDIP_VERSION) - cp /mnt/c/ydegoyon.free.fr/pidip-$(PDP_PIDIP_VERSION).tar.gz /mnt/c/Yves + cp /mnt/c/ydegoyon.free.fr/pidip-$(PDP_PIDIP_VERSION).tar.gz /mnt/c/Yves/Software rm -rf /tmp/pidip-$(PDP_PIDIP_VERSION) .c.o: - gcc $(PDP_PIDIP_CFLAGS) $(PDP_PIDIP_INCLUDE) -o $*.o -c $*.c + gcc $(PDP_PIDIP_CFLAGS) $(PDP_PIDIP_INCLUDES) -o $*.o -c $*.c .cpp.o: - g++ $(PDP_PIDIP_CPPFLAGS) $(PDP_PIDIP_INCLUDE) -o $*.o -c $*.cpp - + g++ $(PDP_PIDIP_CPPFLAGS) $(PDP_PIDIP_INCLUDES) -o $*.o -c $*.cpp diff --git a/Makefile.in b/Makefile.in index 72097bc..bf7ae0e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -2,25 +2,30 @@ PD_DIR = @PD_DIR@ PDP_DIR = @PDP_DIR@ FFMPEG_SOURCE_DIR = @FFMPEG_SOURCE_DIR@ -LIBS = @LIBS@ +PDP_PIDIP_LIBS = @PDP_PIDIP_LIBS@ IMLIB_CFLAGS = @IMLIB_CFLAGS@ IMLIB_LIBS = @IMLIB_LIBS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ +PDP_PIDIP_INCLUDES = @PDP_PIDIP_INCLUDES@ PDP_PIDIP_VERSION = @PDP_PIDIP_VERSION@ +MPEG4IP_CFLAGS = @MPEG4IP_CFLAGS@ PDP_PIDIP_DISTRO = /mnt/c/ydegoyon.free.fr/pidip-$(PDP_PIDIP_VERSION) PDP_PIDIP_TARBALL = $(PDP_PIDIP_DISTRO).tar.gz -# build flags -PDP_PIDIP_INCLUDE = -I$(PD_DIR)/src -I. -I$(PDP_DIR)/include -I$(FFMPEG_SOURCE_DIR)/libavcodec -I$(FFMPEG_SOURCE_DIR)/libavformat -I../include -PDP_PIDIP_CFLAGS = $(MAGICK_CFLAGS) $(IMLIB_CFLAGS) \ + +PDP_PIDIP_CFLAGS = $(MPEG4IP_CFLAGS) $(MAGICK_CFLAGS) $(IMLIB_CFLAGS) \ + -DPD -DX_DISPLAY_MISSING -O2 -funroll-loops -fomit-frame-pointer -ffast-math \ + -Wall -W -Wstrict-prototypes \ + -Wno-unused -Wno-parentheses -Wno-switch \ + -DPDP_PIDIP_VERSION=\"$(PDP_PIDIP_VERSION)\" -g + +PDP_PIDIP_CPPFLAGS = $(MPEG4IP_CFLAGS) $(MAGICK_CFLAGS) $(IMLIB_CFLAGS) \ -DPD -DX_DISPLAY_MISSING -O2 -funroll-loops -fomit-frame-pointer -ffast-math \ -Wall -W -Wstrict-prototypes \ -Wno-unused -Wno-parentheses -Wno-switch \ - -DPDP_PIDIP_VERSION=\"$(PDP_PIDIP_VERSION)\" \ - -g -PDP_PIDIP_CPPFLAGS = -O + -DPDP_PIDIP_VERSION=\"$(PDP_PIDIP_VERSION)\" -g all: pidip.pd_linux @@ -30,28 +35,27 @@ pdp_pidip_all: pidip.pd_linux: pdp_pidip_all rm -f pidip.pd_linux - gcc -export_dynamic -shared -o pidip.pd_linux modules/*.o system/*.o $(FFMPEG_SOURCE_DIR)/libavformat/libavformat.a $(FFMPEG_SOURCE_DIR)/libavcodec/libavcodec.a $(LIBS) $(IMLIB_LIBS) $(MAGICK_LIBS) + g++ -export_dynamic -shared -o pidip.pd_linux modules/*.o system/*.o $(PDP_PIDIP_LIBS) $(IMLIB_LIBS) $(MAGICK_LIBS) + strip --strip-unneeded pidip.pd_linux clean: rm -f */*.o rm -f pidip.pd_linux - rm -f *~ install: cp fonts/* /usr/X11R6/lib/X11/fonts/TTF cp -f --remove-destination doc/* $(PD_DIR)/doc/5.reference distro: clean all - rm */*.o - strip --strip-unneeded pidip.pd_linux + rm -f */*.o + rm -rf autom4te.cache cd .. && cp -rf pidip /tmp/pidip-$(PDP_PIDIP_VERSION) cd /tmp && tar vczf $(PDP_PIDIP_TARBALL) pidip-$(PDP_PIDIP_VERSION) - cp /mnt/c/ydegoyon.free.fr/pidip-$(PDP_PIDIP_VERSION).tar.gz /mnt/c/Yves + cp /mnt/c/ydegoyon.free.fr/pidip-$(PDP_PIDIP_VERSION).tar.gz /mnt/c/Yves/Software rm -rf /tmp/pidip-$(PDP_PIDIP_VERSION) .c.o: - gcc $(PDP_PIDIP_CFLAGS) $(PDP_PIDIP_INCLUDE) -o $*.o -c $*.c + gcc $(PDP_PIDIP_CFLAGS) $(PDP_PIDIP_INCLUDES) -o $*.o -c $*.c .cpp.o: - g++ $(PDP_PIDIP_CPPFLAGS) $(PDP_PIDIP_INCLUDE) -o $*.o -c $*.cpp - + g++ $(PDP_PIDIP_CPPFLAGS) $(PDP_PIDIP_INCLUDES) -o $*.o -c $*.cpp diff --git a/acinclude.m4 b/acinclude.m4 index c332b72..fba5137 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -24,7 +24,7 @@ dnl At present there is no support for additional "MODULES" (see AM_PATH_GTK) dnl (shamelessly stolen from gtk.m4 and then hacked around a fair amount) dnl dnl @author Angus Lees -dnl @version $Id: acinclude.m4,v 1.5 2003-12-08 22:45:54 sevyves Exp $ +dnl @version $Id: acinclude.m4,v 1.6 2004-03-30 01:56:15 sevyves Exp $ AC_DEFUN(AC_PATH_GENERIC, [dnl diff --git a/aclocal.m4 b/aclocal.m4 index 3fcda50..a2d857e 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -36,7 +36,7 @@ dnl At present there is no support for additional "MODULES" (see AM_PATH_GTK) dnl (shamelessly stolen from gtk.m4 and then hacked around a fair amount) dnl dnl @author Angus Lees -dnl @version $Id: aclocal.m4,v 1.5 2003-12-08 22:45:54 sevyves Exp $ +dnl @version $Id: aclocal.m4,v 1.6 2004-03-30 01:56:15 sevyves Exp $ AC_DEFUN(AC_PATH_GENERIC, [dnl diff --git a/config.log b/config.log index fc3d33b..768b4df 100644 --- a/config.log +++ b/config.log @@ -2,19 +2,19 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by configure, which was -generated by GNU Autoconf 2.58. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was - $ ./configure + $ ./configure --enable-ffmpeg ## --------- ## ## Platform. ## ## --------- ## -hostname = dhcp-132-100 +hostname = localhost uname -m = i686 -uname -r = 2.5.7 +uname -r = 2.6.1 uname -s = Linux -uname -v = #18 SMP Thu Jul 3 02:12:40 CEST 2003 +uname -v = #7 SMP Tue Feb 10 23:56:11 EST 2004 /usr/bin/uname -p = unknown /bin/uname -X = unknown @@ -59,83 +59,83 @@ PATH: /usr/local/ant/bin ## Core tests. ## ## ----------- ## -configure:1311: checking for gcc -configure:1327: found /usr/bin/gcc -configure:1337: result: gcc -configure:1581: checking for C compiler version -configure:1584: gcc --version &5 +configure:1339: checking for gcc +configure:1355: found /usr/bin/gcc +configure:1365: result: gcc +configure:1609: checking for C compiler version +configure:1612: gcc --version &5 gcc (GCC) 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -configure:1587: $? = 0 -configure:1589: gcc -v &5 +configure:1615: $? = 0 +configure:1617: gcc -v &5 Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/specs Configured with: ../configure --prefix=/usr --libdir=/usr/lib --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --enable-long-long --enable-__cxa_atexit --enable-languages=c,c++,ada,f77,objc,java --host=i586-mandrake-linux-gnu --with-system-zlib Thread model: posix gcc version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk) -configure:1592: $? = 0 -configure:1594: gcc -V &5 +configure:1620: $? = 0 +configure:1622: gcc -V &5 gcc: argument to `-V' is missing -configure:1597: $? = 1 -configure:1620: checking for C compiler default output file name -configure:1623: gcc conftest.c >&5 -configure:1626: $? = 0 -configure:1672: result: a.out -configure:1677: checking whether the C compiler works -configure:1683: ./a.out -configure:1686: $? = 0 -configure:1703: result: yes -configure:1710: checking whether we are cross compiling -configure:1712: result: no -configure:1715: checking for suffix of executables -configure:1717: gcc -o conftest conftest.c >&5 -configure:1720: $? = 0 -configure:1745: result: -configure:1751: checking for suffix of object files -configure:1772: gcc -c conftest.c >&5 -configure:1775: $? = 0 -configure:1797: result: o -configure:1801: checking whether we are using the GNU C compiler -configure:1825: gcc -c conftest.c >&5 -configure:1831: $? = 0 -configure:1835: test -z +configure:1625: $? = 1 +configure:1648: checking for C compiler default output file name +configure:1651: gcc conftest.c >&5 +configure:1654: $? = 0 +configure:1700: result: a.out +configure:1705: checking whether the C compiler works +configure:1711: ./a.out +configure:1714: $? = 0 +configure:1731: result: yes +configure:1738: checking whether we are cross compiling +configure:1740: result: no +configure:1743: checking for suffix of executables +configure:1745: gcc -o conftest conftest.c >&5 +configure:1748: $? = 0 +configure:1773: result: +configure:1779: checking for suffix of object files +configure:1800: gcc -c conftest.c >&5 +configure:1803: $? = 0 +configure:1825: result: o +configure:1829: checking whether we are using the GNU C compiler +configure:1853: gcc -c conftest.c >&5 +configure:1859: $? = 0 +configure:1863: test -z || test ! -s conftest.err -configure:1838: $? = 0 -configure:1841: test -s conftest.o -configure:1844: $? = 0 -configure:1857: result: yes -configure:1863: checking whether gcc accepts -g -configure:1884: gcc -c -g conftest.c >&5 -configure:1890: $? = 0 -configure:1894: test -z +configure:1866: $? = 0 +configure:1869: test -s conftest.o +configure:1872: $? = 0 +configure:1885: result: yes +configure:1891: checking whether gcc accepts -g +configure:1912: gcc -c -g conftest.c >&5 +configure:1918: $? = 0 +configure:1922: test -z || test ! -s conftest.err -configure:1897: $? = 0 -configure:1900: test -s conftest.o -configure:1903: $? = 0 -configure:1914: result: yes -configure:1931: checking for gcc option to accept ANSI C -configure:2001: gcc -c -g -O2 conftest.c >&5 -configure:2007: $? = 0 -configure:2011: test -z +configure:1925: $? = 0 +configure:1928: test -s conftest.o +configure:1931: $? = 0 +configure:1942: result: yes +configure:1959: checking for gcc option to accept ANSI C +configure:2029: gcc -c -g -O2 conftest.c >&5 +configure:2035: $? = 0 +configure:2039: test -z || test ! -s conftest.err -configure:2014: $? = 0 -configure:2017: test -s conftest.o -configure:2020: $? = 0 -configure:2038: result: none needed -configure:2056: gcc -c -g -O2 conftest.c >&5 +configure:2042: $? = 0 +configure:2045: test -s conftest.o +configure:2048: $? = 0 +configure:2066: result: none needed +configure:2084: gcc -c -g -O2 conftest.c >&5 conftest.c:2: parse error before "me" -configure:2062: $? = 1 +configure:2090: $? = 1 configure: failed program was: | #ifndef __cplusplus | choke me | #endif -configure:2197: checking for strerror in -lcposix -configure:2227: gcc -o conftest -g -O2 conftest.c -lcposix >&5 +configure:2225: checking for strerror in -lcposix +configure:2255: gcc -o conftest -g -O2 conftest.c -lcposix >&5 /usr/bin/ld: cannot find -lcposix collect2: ld returned 1 exit status -configure:2233: $? = 1 +configure:2261: $? = 1 configure: failed program was: | /* confdefs.h. */ | @@ -160,54 +160,54 @@ configure: failed program was: | ; | return 0; | } -configure:2259: result: no -configure:2313: checking for gcc -configure:2339: result: gcc -configure:2583: checking for C compiler version -configure:2586: gcc --version &5 +configure:2287: result: no +configure:2341: checking for gcc +configure:2367: result: gcc +configure:2611: checking for C compiler version +configure:2614: gcc --version &5 gcc (GCC) 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -configure:2589: $? = 0 -configure:2591: gcc -v &5 +configure:2617: $? = 0 +configure:2619: gcc -v &5 Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/specs Configured with: ../configure --prefix=/usr --libdir=/usr/lib --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --enable-long-long --enable-__cxa_atexit --enable-languages=c,c++,ada,f77,objc,java --host=i586-mandrake-linux-gnu --with-system-zlib Thread model: posix gcc version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk) -configure:2594: $? = 0 -configure:2596: gcc -V &5 +configure:2622: $? = 0 +configure:2624: gcc -V &5 gcc: argument to `-V' is missing -configure:2599: $? = 1 -configure:2602: checking whether we are using the GNU C compiler -configure:2658: result: yes -configure:2664: checking whether gcc accepts -g -configure:2715: result: yes -configure:2732: checking for gcc option to accept ANSI C -configure:2839: result: none needed -configure:2857: gcc -c -g -O2 conftest.c >&5 +configure:2627: $? = 1 +configure:2630: checking whether we are using the GNU C compiler +configure:2686: result: yes +configure:2692: checking whether gcc accepts -g +configure:2743: result: yes +configure:2760: checking for gcc option to accept ANSI C +configure:2867: result: none needed +configure:2885: gcc -c -g -O2 conftest.c >&5 conftest.c:2: parse error before "me" -configure:2863: $? = 1 +configure:2891: $? = 1 configure: failed program was: | #ifndef __cplusplus | choke me | #endif -configure:2999: checking for gcc option to accept ANSI C -configure:3061: gcc -c -g -O2 conftest.c >&5 -configure:3067: $? = 0 -configure:3071: test -z +configure:3027: checking for gcc option to accept ANSI C +configure:3089: gcc -c -g -O2 conftest.c >&5 +configure:3095: $? = 0 +configure:3099: test -z || test ! -s conftest.err -configure:3074: $? = 0 -configure:3077: test -s conftest.o -configure:3080: $? = 0 -configure:3095: result: none needed -configure:3111: checking how to run the C preprocessor -configure:3146: gcc -E conftest.c -configure:3152: $? = 0 -configure:3184: gcc -E conftest.c +configure:3102: $? = 0 +configure:3105: test -s conftest.o +configure:3108: $? = 0 +configure:3123: result: none needed +configure:3139: checking how to run the C preprocessor +configure:3174: gcc -E conftest.c +configure:3180: $? = 0 +configure:3212: gcc -E conftest.c conftest.c:9:28: ac_nonexistent.h: No such file or directory -configure:3190: $? = 1 +configure:3218: $? = 1 configure: failed program was: | /* confdefs.h. */ | @@ -218,12 +218,12 @@ configure: failed program was: | #define PACKAGE_BUGREPORT "" | /* end confdefs.h. */ | #include -configure:3229: result: gcc -E -configure:3253: gcc -E conftest.c -configure:3259: $? = 0 -configure:3291: gcc -E conftest.c +configure:3257: result: gcc -E +configure:3281: gcc -E conftest.c +configure:3287: $? = 0 +configure:3319: gcc -E conftest.c conftest.c:9:28: ac_nonexistent.h: No such file or directory -configure:3297: $? = 1 +configure:3325: $? = 1 configure: failed program was: | /* confdefs.h. */ | @@ -234,116 +234,116 @@ configure: failed program was: | #define PACKAGE_BUGREPORT "" | /* end confdefs.h. */ | #include -configure:3341: checking for egrep -configure:3351: result: grep -E -configure:3356: checking for ANSI C header files -configure:3381: gcc -c -g -O2 conftest.c >&5 -configure:3387: $? = 0 -configure:3391: test -z +configure:3369: checking for egrep +configure:3379: result: grep -E +configure:3384: checking for ANSI C header files +configure:3409: gcc -c -g -O2 conftest.c >&5 +configure:3415: $? = 0 +configure:3419: test -z || test ! -s conftest.err -configure:3394: $? = 0 -configure:3397: test -s conftest.o -configure:3400: $? = 0 -configure:3486: gcc -o conftest -g -O2 conftest.c >&5 -configure:3489: $? = 0 -configure:3491: ./conftest -configure:3494: $? = 0 -configure:3509: result: yes -configure:3557: checking for a BSD-compatible install -configure:3612: result: /usr/bin/install -c -configure:3623: checking whether make sets $(MAKE) -configure:3643: result: yes -configure:3652: checking whether build environment is sane -configure:3695: result: yes -configure:3698: checking whether to enable maintainer-specific portions of Makefiles -configure:3707: result: no -configure:3721: checking if malloc debugging is wanted -configure:3742: result: no -configure:3780: checking for imlib2-config -configure:3798: found /usr/local/bin/imlib2-config -configure:3811: result: /usr/local/bin/imlib2-config -configure:3818: checking for imlib2 - version >= 1.0.0 -configure:3876: result: yes -configure:3909: checking for XWindowByProperty in -lMagick -configure:3939: gcc -o conftest -g -O2 conftest.c -lMagick -I/usr/X11R6/include -L/usr/X11R6/lib >&5 -configure:3945: $? = 0 -configure:3949: test -z +configure:3422: $? = 0 +configure:3425: test -s conftest.o +configure:3428: $? = 0 +configure:3514: gcc -o conftest -g -O2 conftest.c >&5 +configure:3517: $? = 0 +configure:3519: ./conftest +configure:3522: $? = 0 +configure:3537: result: yes +configure:3585: checking for a BSD-compatible install +configure:3640: result: /usr/bin/install -c +configure:3651: checking whether make sets $(MAKE) +configure:3671: result: yes +configure:3680: checking whether build environment is sane +configure:3723: result: yes +configure:3726: checking whether to enable maintainer-specific portions of Makefiles +configure:3735: result: no +configure:3749: checking if malloc debugging is wanted +configure:3770: result: no +configure:3808: checking for imlib2-config +configure:3826: found /usr/local/bin/imlib2-config +configure:3839: result: /usr/local/bin/imlib2-config +configure:3846: checking for imlib2 - version >= 1.0.0 +configure:3904: result: yes +configure:3937: checking for XWindowByProperty in -lMagick +configure:3967: gcc -o conftest -g -O2 conftest.c -lMagick -I/usr/X11R6/include -L/usr/X11R6/lib >&5 +configure:3973: $? = 0 +configure:3977: test -z || test ! -s conftest.err -configure:3952: $? = 0 -configure:3955: test -s conftest -configure:3958: $? = 0 -configure:3971: result: yes -configure:3987: checking for BZ2_bzBuffToBuffCompress in -lbz2 -configure:4017: gcc -o conftest -g -O2 conftest.c -lbz2 -lMagick >&5 -configure:4023: $? = 0 -configure:4027: test -z +configure:3980: $? = 0 +configure:3983: test -s conftest +configure:3986: $? = 0 +configure:3999: result: yes +configure:4015: checking for BZ2_bzBuffToBuffCompress in -lbz2 +configure:4045: gcc -o conftest -g -O2 conftest.c -lbz2 -lMagick >&5 +configure:4051: $? = 0 +configure:4055: test -z || test ! -s conftest.err -configure:4030: $? = 0 -configure:4033: test -s conftest -configure:4036: $? = 0 -configure:4049: result: yes -configure:4065: checking for deflate in -lz -configure:4095: gcc -o conftest -g -O2 conftest.c -lz -lbz2 -lMagick >&5 -configure:4101: $? = 0 -configure:4105: test -z +configure:4058: $? = 0 +configure:4061: test -s conftest +configure:4064: $? = 0 +configure:4077: result: yes +configure:4093: checking for deflate in -lz +configure:4123: gcc -o conftest -g -O2 conftest.c -lz -lbz2 -lMagick >&5 +configure:4129: $? = 0 +configure:4133: test -z || test ! -s conftest.err -configure:4108: $? = 0 -configure:4111: test -s conftest -configure:4114: $? = 0 -configure:4127: result: yes -configure:4143: checking for dlopen in -ldl -configure:4173: gcc -o conftest -g -O2 conftest.c -ldl -lz -lbz2 -lMagick >&5 -configure:4179: $? = 0 -configure:4183: test -z +configure:4136: $? = 0 +configure:4139: test -s conftest +configure:4142: $? = 0 +configure:4155: result: yes +configure:4171: checking for dlopen in -ldl +configure:4201: gcc -o conftest -g -O2 conftest.c -ldl -lz -lbz2 -lMagick >&5 +configure:4207: $? = 0 +configure:4211: test -z || test ! -s conftest.err -configure:4186: $? = 0 -configure:4189: test -s conftest -configure:4192: $? = 0 -configure:4205: result: yes -configure:4221: checking for InitMP3 in -lmp3lame -configure:4251: gcc -o conftest -g -O2 conftest.c -lmp3lame -lm -ldl -lz -lbz2 -lMagick >&5 -configure:4257: $? = 0 -configure:4261: test -z +configure:4214: $? = 0 +configure:4217: test -s conftest +configure:4220: $? = 0 +configure:4233: result: yes +configure:4249: checking for InitMP3 in -lmp3lame +configure:4279: gcc -o conftest -g -O2 conftest.c -lmp3lame -lm -ldl -lz -lbz2 -lMagick >&5 +configure:4285: $? = 0 +configure:4289: test -z || test ! -s conftest.err -configure:4264: $? = 0 -configure:4267: test -s conftest -configure:4270: $? = 0 -configure:4283: result: yes -configure:4299: checking for ogg_stream_init in -logg -configure:4329: gcc -o conftest -g -O2 conftest.c -logg -lm -lmp3lame -ldl -lz -lbz2 -lMagick >&5 -configure:4335: $? = 0 -configure:4339: test -z +configure:4292: $? = 0 +configure:4295: test -s conftest +configure:4298: $? = 0 +configure:4311: result: yes +configure:4327: checking for ogg_stream_init in -logg +configure:4357: gcc -o conftest -g -O2 conftest.c -logg -lm -lmp3lame -ldl -lz -lbz2 -lMagick >&5 +configure:4363: $? = 0 +configure:4367: test -z || test ! -s conftest.err -configure:4342: $? = 0 -configure:4345: test -s conftest -configure:4348: $? = 0 -configure:4361: result: yes -configure:4377: checking for vorbis_analysis_init in -lvorbis -configure:4407: gcc -o conftest -g -O2 conftest.c -lvorbis -lm -logg -lmp3lame -ldl -lz -lbz2 -lMagick >&5 -configure:4413: $? = 0 -configure:4417: test -z +configure:4370: $? = 0 +configure:4373: test -s conftest +configure:4376: $? = 0 +configure:4389: result: yes +configure:4405: checking for vorbis_analysis_init in -lvorbis +configure:4435: gcc -o conftest -g -O2 conftest.c -lvorbis -lm -logg -lmp3lame -ldl -lz -lbz2 -lMagick >&5 +configure:4441: $? = 0 +configure:4445: test -z || test ! -s conftest.err -configure:4420: $? = 0 -configure:4423: test -s conftest -configure:4426: $? = 0 -configure:4439: result: yes -configure:4455: checking for vorbis_encode_setup_init in -lvorbisenc -configure:4485: gcc -o conftest -g -O2 conftest.c -lvorbisenc -lm -lvorbis -logg -lmp3lame -ldl -lz -lbz2 -lMagick >&5 -configure:4491: $? = 0 -configure:4495: test -z +configure:4448: $? = 0 +configure:4451: test -s conftest +configure:4454: $? = 0 +configure:4467: result: yes +configure:4483: checking for vorbis_encode_setup_init in -lvorbisenc +configure:4513: gcc -o conftest -g -O2 conftest.c -lvorbisenc -lm -lvorbis -logg -lmp3lame -ldl -lz -lbz2 -lMagick >&5 +configure:4519: $? = 0 +configure:4523: test -z || test ! -s conftest.err -configure:4498: $? = 0 -configure:4501: test -s conftest -configure:4504: $? = 0 -configure:4517: result: yes -configure:4701: creating ./config.status +configure:4526: $? = 0 +configure:4529: test -s conftest +configure:4532: $? = 0 +configure:4545: result: yes +configure:4733: creating ./config.status ## ---------------------- ## ## Running config.status. ## ## ---------------------- ## This file was extended by config.status, which was -generated by GNU Autoconf 2.58. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = CONFIG_HEADERS = @@ -351,11 +351,12 @@ generated by GNU Autoconf 2.58. Invocation command line was CONFIG_COMMANDS = $ ./config.status -on dhcp-132-100 +on localhost -config.status:655: creating Makefile -config.status:655: creating system/Makefile -config.status:655: creating modules/Makefile +config.status:671: creating Makefile +config.status:671: creating system/Makefile +config.status:671: creating modules/Makefile +config.status:775: creating include/pidip_config.h ## ---------------- ## ## Cache variables. ## @@ -405,10 +406,10 @@ am_cv_prog_cc_stdc= ## ----------------- ## CC='gcc' -CFLAGS='-g -O2 -Wall' +CFLAGS='-g -O2' CPP='gcc -E' CPPFLAGS='' -DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_LIBMAGICK=1 -DHAVE_LIBBZ2=1 -DHAVE_LIBZ=1 -DHAVE_LIBDL=1 -DHAVE_LIBMP3LAME=1 -DHAVE_LIBOGG=1 -DHAVE_LIBVORBIS=1 -DHAVE_LIBVORBISENC=1 ' +DEFS='-DHAVE_CONFIG_H' ECHO_C='' ECHO_N='-n' ECHO_T='' @@ -425,13 +426,15 @@ INSTALL_PROGRAM='${INSTALL}' INSTALL_SCRIPT='${INSTALL}' LDFLAGS='' LIBOBJS='' -LIBS='-lvorbisenc -lvorbis -logg -lmp3lame -ldl -lz -lbz2 -lMagick -lbz2 -lz -ldl -lmp3lame -logg -lvorbis -lvorbisenc' +LIBS='-lvorbisenc -lvorbis -logg -lmp3lame -ldl -lz -lbz2 -lMagick ' LTLIBOBJS='' MAGICK_CFLAGS='-I/usr/X11R6/include -g -O2 -Wall ' MAGICK_LIBS='-L/usr/X11R6/lib -lMagick -lMagick -ltiff -lfreetype -ljasper -ljpeg -lpng -lXext -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lpthread -lm -L/usr/local/lib -L/usr/X11R6/lib -L/usr/X11R6/lib -L/usr/local/lib' MAINT='#' MAINTAINER_MODE_FALSE='' MAINTAINER_MODE_TRUE='#' +MPEG4IP_CFLAGS='' +MPEG4IP_SOURCE_DIR='/SOURCES/mpeg4ip' OBJEXT='o' PACKAGE_BUGREPORT='' PACKAGE_NAME='' @@ -440,7 +443,10 @@ PACKAGE_TARNAME='' PACKAGE_VERSION='' PATH_SEPARATOR=':' PDP_DIR='/usr/local/pd/pdp' -PDP_PIDIP_VERSION='0.12.12' +PDP_PIDIP_INCLUDES='-I/usr/local/pd/src -I. -I/usr/local/pd/pdp/include -I../include -I/SOURCES/ffmpeg/libavcodec -I/SOURCES/ffmpeg/libavformat' +PDP_PIDIP_LIBS=' -lbz2 -lz -ldl -lmp3lame -logg -lvorbis -lvorbisenc /SOURCES/ffmpeg/libavformat/libavformat.a /SOURCES/ffmpeg/libavcodec/libavcodec.a' +PDP_PIDIP_VERSION='0.12.14' +PDP_STREAMING_OBJECTS=' pdp_live~.o pdp_ffmpeg~.o' PD_DIR='/usr/local/pd' SET_MAKE='' SHELL='/bin/sh' @@ -476,6 +482,7 @@ target_alias='' #define HAVE_LIBVORBIS 1 #define HAVE_LIBVORBISENC 1 #define HAVE_LIBZ 1 +#define HAVE_PIDIP_FFMPEG 1 #define PACKAGE_BUGREPORT "" #define PACKAGE_NAME "" #define PACKAGE_STRING "" diff --git a/config.status b/config.status index d1a7ff7..abef25d 100755 --- a/config.status +++ b/config.status @@ -260,7 +260,7 @@ _ASBOX cat >&5 <<_CSEOF This file was extended by $as_me, which was -generated by GNU Autoconf 2.58. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -272,6 +272,7 @@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 config_files=" Makefile system/Makefile modules/Makefile" +config_headers=" include/pidip_config.h" ac_cs_usage="\ \`$as_me' instantiates files from templates according to the @@ -286,15 +287,20 @@ Usage: $0 [OPTIONS] [FILE]... --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files +Configuration headers: +$config_headers + Report bugs to ." ac_cs_version="\ config.status -configured by ./configure, generated by GNU Autoconf 2.58, - with options \"\" +configured by ./configure, generated by GNU Autoconf 2.59, + with options \"'--enable-ffmpeg'\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation @@ -373,8 +379,8 @@ if $ac_cs_silent; then fi if $ac_cs_recheck; then - echo "running /bin/sh ./configure " $ac_configure_extra_args " --no-create --no-recursion" >&6 - exec /bin/sh ./configure $ac_configure_extra_args --no-create --no-recursion + echo "running /bin/sh ./configure " '--enable-ffmpeg' $ac_configure_extra_args " --no-create --no-recursion" >&6 + exec /bin/sh ./configure '--enable-ffmpeg' $ac_configure_extra_args --no-create --no-recursion fi for ac_config_target in $ac_config_targets @@ -384,6 +390,7 @@ do "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "system/Makefile" ) CONFIG_FILES="$CONFIG_FILES system/Makefile" ;; "modules/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/Makefile" ;; + "include/pidip_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/pidip_config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; @@ -396,6 +403,7 @@ done # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree @@ -459,13 +467,13 @@ s,@mandir@,${prefix}/man,;t t s,@build_alias@,,;t t s,@host_alias@,,;t t s,@target_alias@,,;t t -s,@DEFS@,-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_LIBMAGICK=1 -DHAVE_LIBBZ2=1 -DHAVE_LIBZ=1 -DHAVE_LIBDL=1 -DHAVE_LIBMP3LAME=1 -DHAVE_LIBOGG=1 -DHAVE_LIBVORBIS=1 -DHAVE_LIBVORBISENC=1 ,;t t +s,@DEFS@,-DHAVE_CONFIG_H,;t t s,@ECHO_C@,,;t t s,@ECHO_N@,-n,;t t s,@ECHO_T@,,;t t -s,@LIBS@,-lvorbisenc -lvorbis -logg -lmp3lame -ldl -lz -lbz2 -lMagick -lbz2 -lz -ldl -lmp3lame -logg -lvorbis -lvorbisenc,;t t +s,@LIBS@,-lvorbisenc -lvorbis -logg -lmp3lame -ldl -lz -lbz2 -lMagick ,;t t s,@CC@,gcc,;t t -s,@CFLAGS@,-g -O2 -Wall,;t t +s,@CFLAGS@,-g -O2,;t t s,@LDFLAGS@,,;t t s,@CPPFLAGS@,,;t t s,@ac_ct_CC@,gcc,;t t @@ -485,12 +493,17 @@ s,@IMLIB_LIBS@,-L/usr/local/lib -lImlib2 -lttf -lm -ldl -lXext -lXext -lX11 -L/u s,@IMLIB_CFLAGS@,-I/usr/local/include -I/usr/X11R6/include,;t t s,@IMLIB2_CFLAGS@,-I/usr/local/include -I/usr/X11R6/include,;t t s,@IMLIB2_LIBS@,-L/usr/local/lib -lImlib2 -lttf -lm -ldl -lXext -lXext -lX11 -L/usr/X11R6/lib,;t t -s,@PDP_PIDIP_VERSION@,0.12.12,;t t +s,@PDP_PIDIP_VERSION@,0.12.14,;t t s,@MAGICK_LIBS@,-L/usr/X11R6/lib -lMagick -lMagick -ltiff -lfreetype -ljasper -ljpeg -lpng -lXext -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lpthread -lm -L/usr/local/lib -L/usr/X11R6/lib -L/usr/X11R6/lib -L/usr/local/lib,;t t s,@MAGICK_CFLAGS@,-I/usr/X11R6/include -g -O2 -Wall ,;t t s,@PD_DIR@,/usr/local/pd,;t t s,@PDP_DIR@,/usr/local/pd/pdp,;t t s,@FFMPEG_SOURCE_DIR@,/SOURCES/ffmpeg,;t t +s,@MPEG4IP_SOURCE_DIR@,/SOURCES/mpeg4ip,;t t +s,@MPEG4IP_CFLAGS@,,;t t +s,@PDP_STREAMING_OBJECTS@, pdp_live~.o pdp_ffmpeg~.o,;t t +s,@PDP_PIDIP_LIBS@, -lbz2 -lz -ldl -lmp3lame -logg -lvorbis -lvorbisenc /SOURCES/ffmpeg/libavformat/libavformat.a /SOURCES/ffmpeg/libavcodec/libavcodec.a,;t t +s,@PDP_PIDIP_INCLUDES@,-I/usr/local/pd/src -I. -I/usr/local/pd/pdp/include -I../include -I/SOURCES/ffmpeg/libavcodec -I/SOURCES/ffmpeg/libavformat,;t t s,@LIBOBJS@,,;t t s,@LTLIBOBJS@,,;t t CEOF @@ -608,40 +621,43 @@ case $srcdir in ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -case "$ac_dir" in -.) ac_abs_builddir=$ac_builddir;; + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; *) - case $ac_builddir in - .) ac_abs_builddir="$ac_dir";; - [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; - *) ac_abs_builddir="$ac_dir"/$ac_builddir;; + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in - .) ac_abs_top_builddir="$ac_dir";; + .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in - .) ac_abs_srcdir="$ac_dir";; + .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in - .) ac_abs_top_srcdir="$ac_dir";; + .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac @@ -726,4 +742,185 @@ s,@INSTALL@,$ac_INSTALL,;t t done +# +# CONFIG_HEADER section. +# + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + # Do quote $f, to prevent DOS paths from being IFS'd. + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + + # Handle all the #define templates only if necessary. + if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then + # If there are no defines, we may have an empty if/fi + : + cat >$tmp/defines.sed <$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in + + fi # grep + + # Handle all the #undef templates + cat >$tmp/undefs.sed <$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +done + { (exit 0); exit 0; } diff --git a/configure b/configure index 60839ce..443039b 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.58. +# Generated by GNU Autoconf 2.59. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation @@ -271,7 +271,7 @@ PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT IMLIB2_CONFIG IMLIB_LIBS IMLIB_CFLAGS IMLIB2_CFLAGS IMLIB2_LIBS PDP_PIDIP_VERSION MAGICK_LIBS MAGICK_CFLAGS PD_DIR PDP_DIR FFMPEG_SOURCE_DIR LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT IMLIB2_CONFIG IMLIB_LIBS IMLIB_CFLAGS IMLIB2_CFLAGS IMLIB2_LIBS PDP_PIDIP_VERSION MAGICK_LIBS MAGICK_CFLAGS PD_DIR PDP_DIR FFMPEG_SOURCE_DIR MPEG4IP_SOURCE_DIR MPEG4IP_CFLAGS PDP_STREAMING_OBJECTS PDP_PIDIP_LIBS PDP_PIDIP_INCLUDES LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -802,6 +802,8 @@ if test -n "$ac_init_help"; then Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-ffmpeg enable ffmpeg streaming support (no) + --enable-mpeg4ip enable mpeg4ip streaming support (no) --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer @@ -858,40 +860,43 @@ case $srcdir in ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -case "$ac_dir" in -.) ac_abs_builddir=$ac_builddir;; + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; *) - case $ac_builddir in - .) ac_abs_builddir="$ac_dir";; - [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; - *) ac_abs_builddir="$ac_dir"/$ac_builddir;; + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in - .) ac_abs_top_builddir="$ac_dir";; + .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in - .) ac_abs_srcdir="$ac_dir";; + .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in - .) ac_abs_top_srcdir="$ac_dir";; + .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac @@ -930,7 +935,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.58. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1257,10 +1262,33 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -PDP_PIDIP_VERSION=0.12.12 + ac_config_headers="$ac_config_headers include/pidip_config.h" + +# Check whether --enable-ffmpeg or --disable-ffmpeg was given. +if test "${enable_ffmpeg+set}" = set; then + enableval="$enable_ffmpeg" + +else + enable_ffmpeg=no +fi; +# Check whether --enable-mpeg4ip or --disable-mpeg4ip was given. +if test "${enable_mpeg4ip+set}" = set; then + enableval="$enable_mpeg4ip" + +else + enable_mpeg4ip=no +fi; + +PDP_PIDIP_VERSION="0.12.14" PD_DIR=/usr/local/pd PDP_DIR=/usr/local/pd/pdp FFMPEG_SOURCE_DIR=/SOURCES/ffmpeg +MPEG4IP_SOURCE_DIR=/SOURCES/mpeg4ip +PDP_STREAMING_OBJECTS= +PDP_PIDIP_LIBS="$PDP_PIDIP_LIBS -lbz2 -lz -ldl -lmp3lame -logg -lvorbis -lvorbisenc" +PDP_PIDIP_INCLUDES="-I$PD_DIR/src -I. -I$PDP_DIR/include -I../include" + +make clean ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -4560,18 +4588,53 @@ else exit -1 fi -echo -n "looking for ffmpeg sources (required) ... " -if test -f $FFMPEG_SOURCE_DIR/libavformat/avformat.h +if test $enable_ffmpeg == yes; then + echo -n "looking for ffmpeg sources (required) ... " + if test -f $FFMPEG_SOURCE_DIR/libavformat/avformat.h + then - echo "ok." -else - echo "ffmpeg source tree not found... install it, fix the path in configure.ac and run autoconf" - exit -1 + PDP_STREAMING_OBJECTS="$PDP_STREAMING_OBJECTS pdp_live~.o pdp_ffmpeg~.o" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PIDIP_FFMPEG 1 +_ACEOF + + PDP_PIDIP_LIBS="$PDP_PIDIP_LIBS $FFMPEG_SOURCE_DIR/libavformat/libavformat.a $FFMPEG_SOURCE_DIR/libavcodec/libavcodec.a" + PDP_PIDIP_INCLUDES="$PDP_PIDIP_INCLUDES -I$FFMPEG_SOURCE_DIR/libavcodec -I$FFMPEG_SOURCE_DIR/libavformat" + echo "ok." + else + echo "ffmpeg source tree not found... install it, fix the path in configure.ac and run autoconf" + exit -1 + fi fi -LIBS="$LIBS -lbz2 -lz -ldl -lmp3lame -logg -lvorbis -lvorbisenc" -CFLAGS="$CFLAGS -Wall" +if test $enable_mpeg4ip == yes; +then + echo -n "looking for mpeg4ip sources (required) ... " + if test -f $MPEG4IP_SOURCE_DIR/server/mp4live/mp4live_common.h + then + + PDP_STREAMING_OBJECTS="$PDP_STREAMING_OBJECTS pdp_mp4config.o pdp_mp4videosource.o pdp_mp4audiosource.o pdp_mp4live~.o pdp_mp4player~.o pdp_mp4audiosync.o pdp_mp4videosync.o pdp_mp4playermedia.o pdp_mp4playersession.o" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PIDIP_MPEG4IP 1 +_ACEOF + + PDP_PIDIP_LIBS="$PDP_PIDIP_LIBS $MPEG4IP_SOURCE_DIR/player/src/our_bytestream_file.o $MPEG4IP_SOURCE_DIR/player/src/our_config_file.o $MPEG4IP_SOURCE_DIR/player/src/qtime_file.o $MPEG4IP_SOURCE_DIR/player/src/mp4_file.o $MPEG4IP_SOURCE_DIR/player/src/mpeg3_file.o $MPEG4IP_SOURCE_DIR/player/src/avi_file.o $MPEG4IP_SOURCE_DIR/player/src/ip_port.o $MPEG4IP_SOURCE_DIR/player/src/media_utils.o $MPEG4IP_SOURCE_DIR/player/src/mpeg2t_thread.o $MPEG4IP_SOURCE_DIR/player/src/mpeg2t_thread_nx.o $MPEG4IP_SOURCE_DIR/player/src/*bytestream.o $MPEG4IP_SOURCE_DIR/player/src/*plugin.o $MPEG4IP_SOURCE_DIR/player/src/player_sdp.o $MPEG4IP_SOURCE_DIR/player/src/player_util.o $MPEG4IP_SOURCE_DIR/player/src/audio.o $MPEG4IP_SOURCE_DIR/player/src/video.o $MPEG4IP_SOURCE_DIR/server/mp4live/video_util_mpeg4.o $MPEG4IP_SOURCE_DIR/server/mp4live/sdp_file.o $MPEG4IP_SOURCE_DIR/server/mp4live/util.o $MPEG4IP_SOURCE_DIR/server/mp4live/video_encoder.o $MPEG4IP_SOURCE_DIR/server/mp4live/video_xvid.o $MPEG4IP_SOURCE_DIR/server/mp4live/media_source.o $MPEG4IP_SOURCE_DIR/server/mp4live/video_util_rgb.o $MPEG4IP_SOURCE_DIR/server/mp4live/video_util_resize.o $MPEG4IP_SOURCE_DIR/server/mp4live/resample.o $MPEG4IP_SOURCE_DIR/server/mp4live/video_encoder_base.o $MPEG4IP_SOURCE_DIR/server/mp4live/audio_encoder.o $MPEG4IP_SOURCE_DIR/server/mp4live/audio_encoder_base.o $MPEG4IP_SOURCE_DIR/server/mp4live/audio_encoder_tables.o $MPEG4IP_SOURCE_DIR/server/mp4live/audio_lame.o $MPEG4IP_SOURCE_DIR/server/mp4live/audio_faac.o $MPEG4IP_SOURCE_DIR/server/mp4live/rtp_transmitter.o $MPEG4IP_SOURCE_DIR/server/mp4live/h261/.libs/*.a $MPEG4IP_SOURCE_DIR/lib/sdp/.libs/libsdp.so $MPEG4IP_SOURCE_DIR/player/lib/mp4util/.libs/libmp4util.so $MPEG4IP_SOURCE_DIR/player/lib/libhttp/.libs/libhttp.a $MPEG4IP_SOURCE_DIR/lib/config_file/.libs/libconfig_file.so $MPEG4IP_SOURCE_DIR/lib/msg_queue/.libs/libmsg_queue.so $MPEG4IP_SOURCE_DIR/lib/mp4av/.libs/libmp4av.so $MPEG4IP_SOURCE_DIR/lib/mp4/.libs/libmp4.so $MPEG4IP_SOURCE_DIR/lib/mp4v2/.libs/libmp4v2.so $MPEG4IP_SOURCE_DIR/lib/SDL/src/.libs/libSDL.so $MPEG4IP_SOURCE_DIR/lib/rtp/*.o $MPEG4IP_SOURCE_DIR/player/lib/rtsp/.libs/librtsp.a $MPEG4IP_SOURCE_DIR/common/video/libmpeg32/.libs/*.a $MPEG4IP_SOURCE_DIR/lib/avi/.libs/libavi.al $MPEG4IP_SOURCE_DIR/lib/mpeg2t/.libs/libmpeg2_transport.al $MPEG4IP_SOURCE_DIR/player/lib/audio/mp3util/.libs/libmp3utils.al -lm -L/usr/X11R6/lib -lX11 -lXext -lpthread $MPEG4IP_SOURCE_DIR/lib/SDL/src/main/libSDLmain.a -ldl -Wl,--rpath -Wl,/usr/local/lib -lfaac -lmpeg4ip_xvid" + PDP_PIDIP_INCLUDES="$PDP_PIDIP_INCLUDES -I/usr/include/SDL -I/usr/local/include/SDL -I$MPEG4IP_SOURCE_DIR/server/mp4live -I$MPEG4IP_SOURCE_DIR/player/src -I$MPEG4IP_SOURCE_DIR/player/lib -I$MPEG4IP_SOURCE_DIR/lib/msg_queue -I$MPEG4IP_SOURCE_DIR/lib" + MPEG4IP_CFLAGS="-D_REENTRANT -DNOCONTROLS -fexceptions -Wno-char-subscripts -Wno-unknown-pragmas -Wno-deprecated -DPLAYER_PLUGIN_DIR=\"/usr/local/lib/mp4player_plugin\" -g -O2 -DUSE_MMX -DMPEG4IP" + + echo "ok." + else + echo "mpeg4ip source tree not found... install it, fix the path in configure.ac and run autoconf" + exit -1 + fi +fi + + + + ac_config_files="$ac_config_files Makefile system/Makefile modules/Makefile" @@ -4649,38 +4712,7 @@ s/^[^=]*=[ ]*$//; }' fi -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g -t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g -t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed - +DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= @@ -4969,7 +5001,7 @@ _ASBOX cat >&5 <<_CSEOF This file was extended by $as_me, which was -generated by GNU Autoconf 2.58. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -5014,17 +5046,22 @@ Usage: $0 [OPTIONS] [FILE]... --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files +Configuration headers: +$config_headers + Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.58, +configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. @@ -5129,6 +5166,7 @@ do "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "system/Makefile" ) CONFIG_FILES="$CONFIG_FILES system/Makefile" ;; "modules/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/Makefile" ;; + "include/pidip_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/pidip_config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; @@ -5141,6 +5179,7 @@ done # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree @@ -5239,6 +5278,11 @@ s,@MAGICK_CFLAGS@,$MAGICK_CFLAGS,;t t s,@PD_DIR@,$PD_DIR,;t t s,@PDP_DIR@,$PDP_DIR,;t t s,@FFMPEG_SOURCE_DIR@,$FFMPEG_SOURCE_DIR,;t t +s,@MPEG4IP_SOURCE_DIR@,$MPEG4IP_SOURCE_DIR,;t t +s,@MPEG4IP_CFLAGS@,$MPEG4IP_CFLAGS,;t t +s,@PDP_STREAMING_OBJECTS@,$PDP_STREAMING_OBJECTS,;t t +s,@PDP_PIDIP_LIBS@,$PDP_PIDIP_LIBS,;t t +s,@PDP_PIDIP_INCLUDES@,$PDP_PIDIP_INCLUDES,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF @@ -5361,40 +5405,43 @@ case $srcdir in ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -case "$ac_dir" in -.) ac_abs_builddir=$ac_builddir;; + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; *) - case $ac_builddir in - .) ac_abs_builddir="$ac_dir";; - [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; - *) ac_abs_builddir="$ac_dir"/$ac_builddir;; + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in - .) ac_abs_top_builddir="$ac_dir";; + .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in - .) ac_abs_srcdir="$ac_dir";; + .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in - .) ac_abs_top_srcdir="$ac_dir";; + .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac @@ -5476,6 +5523,229 @@ s,@INSTALL@,$ac_INSTALL,;t t done _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + # Do quote $f, to prevent DOS paths from being IFS'd. + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +done +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -5506,3 +5776,7 @@ if test "$no_create" != yes; then $ac_cs_success || { (exit 1); exit 1; } fi + +echo "used configure options:" +echo " --enable-ffmpeg=$enable_ffmpeg" +echo " --enable-mpeg4ip=$enable_mpeg4ip" diff --git a/configure.ac b/configure.ac index 6d55e6f..9c9bc0f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,10 +1,24 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT -PDP_PIDIP_VERSION=0.12.12 +AC_CONFIG_HEADER(include/pidip_config.h) +AC_ARG_ENABLE(ffmpeg, + [ --enable-ffmpeg enable ffmpeg streaming support (no)], , + enable_ffmpeg=no) +AC_ARG_ENABLE(mpeg4ip, + [ --enable-mpeg4ip enable mpeg4ip streaming support (no)], , + enable_mpeg4ip=no) + +PDP_PIDIP_VERSION="0.12.14" PD_DIR=/usr/local/pd PDP_DIR=/usr/local/pd/pdp FFMPEG_SOURCE_DIR=/SOURCES/ffmpeg +MPEG4IP_SOURCE_DIR=/SOURCES/mpeg4ip +PDP_STREAMING_OBJECTS= +PDP_PIDIP_LIBS="$PDP_PIDIP_LIBS -lbz2 -lz -ldl -lmp3lame -logg -lvorbis -lvorbisenc" +PDP_PIDIP_INCLUDES="-I$PD_DIR/src -I. -I$PDP_DIR/include -I../include" + +make clean AC_ISC_POSIX AC_PROG_CC @@ -64,18 +78,45 @@ else exit -1 fi -echo -n "looking for ffmpeg sources (required) ... " -if test -f $FFMPEG_SOURCE_DIR/libavformat/avformat.h +if test $enable_ffmpeg == yes; then - AC_SUBST(FFMPEG_SOURCE_DIR) - echo "ok." -else - echo "ffmpeg source tree not found... install it, fix the path in configure.ac and run autoconf" - exit -1 + echo -n "looking for ffmpeg sources (required) ... " + if test -f $FFMPEG_SOURCE_DIR/libavformat/avformat.h + then + AC_SUBST(FFMPEG_SOURCE_DIR) + PDP_STREAMING_OBJECTS="$PDP_STREAMING_OBJECTS pdp_live~.o pdp_ffmpeg~.o" + AC_DEFINE(HAVE_PIDIP_FFMPEG, 1, build pdp_live~/pdp_ffmpeg~) + PDP_PIDIP_LIBS="$PDP_PIDIP_LIBS $FFMPEG_SOURCE_DIR/libavformat/libavformat.a $FFMPEG_SOURCE_DIR/libavcodec/libavcodec.a" + PDP_PIDIP_INCLUDES="$PDP_PIDIP_INCLUDES -I$FFMPEG_SOURCE_DIR/libavcodec -I$FFMPEG_SOURCE_DIR/libavformat" + echo "ok." + else + echo "ffmpeg source tree not found... install it, fix the path in configure.ac and run autoconf" + exit -1 + fi fi -LIBS="$LIBS -lbz2 -lz -ldl -lmp3lame -logg -lvorbis -lvorbisenc" -CFLAGS="$CFLAGS -Wall" +if test $enable_mpeg4ip == yes; +then + echo -n "looking for mpeg4ip sources (required) ... " + if test -f $MPEG4IP_SOURCE_DIR/server/mp4live/mp4live_common.h + then + AC_SUBST(MPEG4IP_SOURCE_DIR) + PDP_STREAMING_OBJECTS="$PDP_STREAMING_OBJECTS pdp_mp4config.o pdp_mp4videosource.o pdp_mp4audiosource.o pdp_mp4live~.o pdp_mp4player~.o pdp_mp4audiosync.o pdp_mp4videosync.o pdp_mp4playermedia.o pdp_mp4playersession.o" + AC_DEFINE(HAVE_PIDIP_MPEG4IP, 1, build pdp_mp4live~/pdp_mp4player~) + PDP_PIDIP_LIBS="$PDP_PIDIP_LIBS $MPEG4IP_SOURCE_DIR/player/src/our_bytestream_file.o $MPEG4IP_SOURCE_DIR/player/src/our_config_file.o $MPEG4IP_SOURCE_DIR/player/src/qtime_file.o $MPEG4IP_SOURCE_DIR/player/src/mp4_file.o $MPEG4IP_SOURCE_DIR/player/src/mpeg3_file.o $MPEG4IP_SOURCE_DIR/player/src/avi_file.o $MPEG4IP_SOURCE_DIR/player/src/ip_port.o $MPEG4IP_SOURCE_DIR/player/src/media_utils.o $MPEG4IP_SOURCE_DIR/player/src/mpeg2t_thread.o $MPEG4IP_SOURCE_DIR/player/src/mpeg2t_thread_nx.o $MPEG4IP_SOURCE_DIR/player/src/*bytestream.o $MPEG4IP_SOURCE_DIR/player/src/*plugin.o $MPEG4IP_SOURCE_DIR/player/src/player_sdp.o $MPEG4IP_SOURCE_DIR/player/src/player_util.o $MPEG4IP_SOURCE_DIR/player/src/audio.o $MPEG4IP_SOURCE_DIR/player/src/video.o $MPEG4IP_SOURCE_DIR/server/mp4live/video_util_mpeg4.o $MPEG4IP_SOURCE_DIR/server/mp4live/sdp_file.o $MPEG4IP_SOURCE_DIR/server/mp4live/util.o $MPEG4IP_SOURCE_DIR/server/mp4live/video_encoder.o $MPEG4IP_SOURCE_DIR/server/mp4live/video_xvid.o $MPEG4IP_SOURCE_DIR/server/mp4live/media_source.o $MPEG4IP_SOURCE_DIR/server/mp4live/video_util_rgb.o $MPEG4IP_SOURCE_DIR/server/mp4live/video_util_resize.o $MPEG4IP_SOURCE_DIR/server/mp4live/resample.o $MPEG4IP_SOURCE_DIR/server/mp4live/video_encoder_base.o $MPEG4IP_SOURCE_DIR/server/mp4live/audio_encoder.o $MPEG4IP_SOURCE_DIR/server/mp4live/audio_encoder_base.o $MPEG4IP_SOURCE_DIR/server/mp4live/audio_encoder_tables.o $MPEG4IP_SOURCE_DIR/server/mp4live/audio_lame.o $MPEG4IP_SOURCE_DIR/server/mp4live/audio_faac.o $MPEG4IP_SOURCE_DIR/server/mp4live/rtp_transmitter.o $MPEG4IP_SOURCE_DIR/server/mp4live/h261/.libs/*.a $MPEG4IP_SOURCE_DIR/lib/sdp/.libs/libsdp.so $MPEG4IP_SOURCE_DIR/player/lib/mp4util/.libs/libmp4util.so $MPEG4IP_SOURCE_DIR/player/lib/libhttp/.libs/libhttp.a $MPEG4IP_SOURCE_DIR/lib/config_file/.libs/libconfig_file.so $MPEG4IP_SOURCE_DIR/lib/msg_queue/.libs/libmsg_queue.so $MPEG4IP_SOURCE_DIR/lib/mp4av/.libs/libmp4av.so $MPEG4IP_SOURCE_DIR/lib/mp4/.libs/libmp4.so $MPEG4IP_SOURCE_DIR/lib/mp4v2/.libs/libmp4v2.so $MPEG4IP_SOURCE_DIR/lib/SDL/src/.libs/libSDL.so $MPEG4IP_SOURCE_DIR/lib/rtp/*.o $MPEG4IP_SOURCE_DIR/player/lib/rtsp/.libs/librtsp.a $MPEG4IP_SOURCE_DIR/common/video/libmpeg32/.libs/*.a $MPEG4IP_SOURCE_DIR/lib/avi/.libs/libavi.al $MPEG4IP_SOURCE_DIR/lib/mpeg2t/.libs/libmpeg2_transport.al $MPEG4IP_SOURCE_DIR/player/lib/audio/mp3util/.libs/libmp3utils.al -lm -L/usr/X11R6/lib -lX11 -lXext -lpthread $MPEG4IP_SOURCE_DIR/lib/SDL/src/main/libSDLmain.a -ldl -Wl,--rpath -Wl,/usr/local/lib -lfaac -lmpeg4ip_xvid" + PDP_PIDIP_INCLUDES="$PDP_PIDIP_INCLUDES -I/usr/include/SDL -I/usr/local/include/SDL -I$MPEG4IP_SOURCE_DIR/server/mp4live -I$MPEG4IP_SOURCE_DIR/player/src -I$MPEG4IP_SOURCE_DIR/player/lib -I$MPEG4IP_SOURCE_DIR/lib/msg_queue -I$MPEG4IP_SOURCE_DIR/lib" + MPEG4IP_CFLAGS="-D_REENTRANT -DNOCONTROLS -fexceptions -Wno-char-subscripts -Wno-unknown-pragmas -Wno-deprecated -DPLAYER_PLUGIN_DIR=\"/usr/local/lib/mp4player_plugin\" -g -O2 -DUSE_MMX -DMPEG4IP" + AC_SUBST(MPEG4IP_CFLAGS) + echo "ok." + else + echo "mpeg4ip source tree not found... install it, fix the path in configure.ac and run autoconf" + exit -1 + fi +fi + +AC_SUBST(PDP_STREAMING_OBJECTS) +AC_SUBST(PDP_PIDIP_LIBS) +AC_SUBST(PDP_PIDIP_INCLUDES) AC_CONFIG_FILES([ Makefile @@ -83,3 +124,7 @@ system/Makefile modules/Makefile ]) AC_OUTPUT + +echo "used configure options:" +echo " --enable-ffmpeg=$enable_ffmpeg" +echo " --enable-mpeg4ip=$enable_mpeg4ip" diff --git a/configure.in b/configure.in index 790f094..9c9bc0f 100644 --- a/configure.in +++ b/configure.in @@ -1,10 +1,24 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT -PDP_PIDIP_VERSION=0.12.12 +AC_CONFIG_HEADER(include/pidip_config.h) +AC_ARG_ENABLE(ffmpeg, + [ --enable-ffmpeg enable ffmpeg streaming support (no)], , + enable_ffmpeg=no) +AC_ARG_ENABLE(mpeg4ip, + [ --enable-mpeg4ip enable mpeg4ip streaming support (no)], , + enable_mpeg4ip=no) + +PDP_PIDIP_VERSION="0.12.14" PD_DIR=/usr/local/pd PDP_DIR=/usr/local/pd/pdp FFMPEG_SOURCE_DIR=/SOURCES/ffmpeg +MPEG4IP_SOURCE_DIR=/SOURCES/mpeg4ip +PDP_STREAMING_OBJECTS= +PDP_PIDIP_LIBS="$PDP_PIDIP_LIBS -lbz2 -lz -ldl -lmp3lame -logg -lvorbis -lvorbisenc" +PDP_PIDIP_INCLUDES="-I$PD_DIR/src -I. -I$PDP_DIR/include -I../include" + +make clean AC_ISC_POSIX AC_PROG_CC @@ -64,23 +78,53 @@ else exit -1 fi -echo -n "looking for ffmpeg sources (required) ... " -if test -f $FFMPEG_SOURCE_DIR/libavformat/avformat.h +if test $enable_ffmpeg == yes; then - AC_SUBST(FFMPEG_SOURCE_DIR) - echo "ok." -else - echo "ffmpeg source tree not found... install it, fix the path in configure.ac and run autoconf" - exit -1 + echo -n "looking for ffmpeg sources (required) ... " + if test -f $FFMPEG_SOURCE_DIR/libavformat/avformat.h + then + AC_SUBST(FFMPEG_SOURCE_DIR) + PDP_STREAMING_OBJECTS="$PDP_STREAMING_OBJECTS pdp_live~.o pdp_ffmpeg~.o" + AC_DEFINE(HAVE_PIDIP_FFMPEG, 1, build pdp_live~/pdp_ffmpeg~) + PDP_PIDIP_LIBS="$PDP_PIDIP_LIBS $FFMPEG_SOURCE_DIR/libavformat/libavformat.a $FFMPEG_SOURCE_DIR/libavcodec/libavcodec.a" + PDP_PIDIP_INCLUDES="$PDP_PIDIP_INCLUDES -I$FFMPEG_SOURCE_DIR/libavcodec -I$FFMPEG_SOURCE_DIR/libavformat" + echo "ok." + else + echo "ffmpeg source tree not found... install it, fix the path in configure.ac and run autoconf" + exit -1 + fi fi -LIBS="$LIBS -lbz2 -lz -ldl -lmp3lame -logg -lvorbis -lvorbisenc" -CFLAGS="$CFLAGS -Wall" +if test $enable_mpeg4ip == yes; +then + echo -n "looking for mpeg4ip sources (required) ... " + if test -f $MPEG4IP_SOURCE_DIR/server/mp4live/mp4live_common.h + then + AC_SUBST(MPEG4IP_SOURCE_DIR) + PDP_STREAMING_OBJECTS="$PDP_STREAMING_OBJECTS pdp_mp4config.o pdp_mp4videosource.o pdp_mp4audiosource.o pdp_mp4live~.o pdp_mp4player~.o pdp_mp4audiosync.o pdp_mp4videosync.o pdp_mp4playermedia.o pdp_mp4playersession.o" + AC_DEFINE(HAVE_PIDIP_MPEG4IP, 1, build pdp_mp4live~/pdp_mp4player~) + PDP_PIDIP_LIBS="$PDP_PIDIP_LIBS $MPEG4IP_SOURCE_DIR/player/src/our_bytestream_file.o $MPEG4IP_SOURCE_DIR/player/src/our_config_file.o $MPEG4IP_SOURCE_DIR/player/src/qtime_file.o $MPEG4IP_SOURCE_DIR/player/src/mp4_file.o $MPEG4IP_SOURCE_DIR/player/src/mpeg3_file.o $MPEG4IP_SOURCE_DIR/player/src/avi_file.o $MPEG4IP_SOURCE_DIR/player/src/ip_port.o $MPEG4IP_SOURCE_DIR/player/src/media_utils.o $MPEG4IP_SOURCE_DIR/player/src/mpeg2t_thread.o $MPEG4IP_SOURCE_DIR/player/src/mpeg2t_thread_nx.o $MPEG4IP_SOURCE_DIR/player/src/*bytestream.o $MPEG4IP_SOURCE_DIR/player/src/*plugin.o $MPEG4IP_SOURCE_DIR/player/src/player_sdp.o $MPEG4IP_SOURCE_DIR/player/src/player_util.o $MPEG4IP_SOURCE_DIR/player/src/audio.o $MPEG4IP_SOURCE_DIR/player/src/video.o $MPEG4IP_SOURCE_DIR/server/mp4live/video_util_mpeg4.o $MPEG4IP_SOURCE_DIR/server/mp4live/sdp_file.o $MPEG4IP_SOURCE_DIR/server/mp4live/util.o $MPEG4IP_SOURCE_DIR/server/mp4live/video_encoder.o $MPEG4IP_SOURCE_DIR/server/mp4live/video_xvid.o $MPEG4IP_SOURCE_DIR/server/mp4live/media_source.o $MPEG4IP_SOURCE_DIR/server/mp4live/video_util_rgb.o $MPEG4IP_SOURCE_DIR/server/mp4live/video_util_resize.o $MPEG4IP_SOURCE_DIR/server/mp4live/resample.o $MPEG4IP_SOURCE_DIR/server/mp4live/video_encoder_base.o $MPEG4IP_SOURCE_DIR/server/mp4live/audio_encoder.o $MPEG4IP_SOURCE_DIR/server/mp4live/audio_encoder_base.o $MPEG4IP_SOURCE_DIR/server/mp4live/audio_encoder_tables.o $MPEG4IP_SOURCE_DIR/server/mp4live/audio_lame.o $MPEG4IP_SOURCE_DIR/server/mp4live/audio_faac.o $MPEG4IP_SOURCE_DIR/server/mp4live/rtp_transmitter.o $MPEG4IP_SOURCE_DIR/server/mp4live/h261/.libs/*.a $MPEG4IP_SOURCE_DIR/lib/sdp/.libs/libsdp.so $MPEG4IP_SOURCE_DIR/player/lib/mp4util/.libs/libmp4util.so $MPEG4IP_SOURCE_DIR/player/lib/libhttp/.libs/libhttp.a $MPEG4IP_SOURCE_DIR/lib/config_file/.libs/libconfig_file.so $MPEG4IP_SOURCE_DIR/lib/msg_queue/.libs/libmsg_queue.so $MPEG4IP_SOURCE_DIR/lib/mp4av/.libs/libmp4av.so $MPEG4IP_SOURCE_DIR/lib/mp4/.libs/libmp4.so $MPEG4IP_SOURCE_DIR/lib/mp4v2/.libs/libmp4v2.so $MPEG4IP_SOURCE_DIR/lib/SDL/src/.libs/libSDL.so $MPEG4IP_SOURCE_DIR/lib/rtp/*.o $MPEG4IP_SOURCE_DIR/player/lib/rtsp/.libs/librtsp.a $MPEG4IP_SOURCE_DIR/common/video/libmpeg32/.libs/*.a $MPEG4IP_SOURCE_DIR/lib/avi/.libs/libavi.al $MPEG4IP_SOURCE_DIR/lib/mpeg2t/.libs/libmpeg2_transport.al $MPEG4IP_SOURCE_DIR/player/lib/audio/mp3util/.libs/libmp3utils.al -lm -L/usr/X11R6/lib -lX11 -lXext -lpthread $MPEG4IP_SOURCE_DIR/lib/SDL/src/main/libSDLmain.a -ldl -Wl,--rpath -Wl,/usr/local/lib -lfaac -lmpeg4ip_xvid" + PDP_PIDIP_INCLUDES="$PDP_PIDIP_INCLUDES -I/usr/include/SDL -I/usr/local/include/SDL -I$MPEG4IP_SOURCE_DIR/server/mp4live -I$MPEG4IP_SOURCE_DIR/player/src -I$MPEG4IP_SOURCE_DIR/player/lib -I$MPEG4IP_SOURCE_DIR/lib/msg_queue -I$MPEG4IP_SOURCE_DIR/lib" + MPEG4IP_CFLAGS="-D_REENTRANT -DNOCONTROLS -fexceptions -Wno-char-subscripts -Wno-unknown-pragmas -Wno-deprecated -DPLAYER_PLUGIN_DIR=\"/usr/local/lib/mp4player_plugin\" -g -O2 -DUSE_MMX -DMPEG4IP" + AC_SUBST(MPEG4IP_CFLAGS) + echo "ok." + else + echo "mpeg4ip source tree not found... install it, fix the path in configure.ac and run autoconf" + exit -1 + fi +fi -AC_OUTPUT([ +AC_SUBST(PDP_STREAMING_OBJECTS) +AC_SUBST(PDP_PIDIP_LIBS) +AC_SUBST(PDP_PIDIP_INCLUDES) + +AC_CONFIG_FILES([ Makefile system/Makefile modules/Makefile -confdefs.h ]) AC_OUTPUT + +echo "used configure options:" +echo " --enable-ffmpeg=$enable_ffmpeg" +echo " --enable-mpeg4ip=$enable_mpeg4ip" diff --git a/doc/help-pdp_dice.pd b/doc/help-pdp_dice.pd index e1882c8..2afdc65 100644 --- a/doc/help-pdp_dice.pd +++ b/doc/help-pdp_dice.pd @@ -1,9 +1,9 @@ #N canvas 84 12 712 664 10; -#X obj 263 378 pdp_xv; +#X obj 203 379 pdp_xv; #X obj 268 64 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 -1; #X msg 123 136 loop \$1; -#X obj 124 114 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 +#X obj 124 114 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 1 1; #X msg 370 44 open \$1; #X obj 369 20 openpanel; diff --git a/doc/help-pdp_ffmpeg~.pd b/doc/help-pdp_ffmpeg~.pd index a61ed57..dd0819a 100644 --- a/doc/help-pdp_ffmpeg~.pd +++ b/doc/help-pdp_ffmpeg~.pd @@ -19,7 +19,6 @@ -1; #X msg 465 106 stop; #X msg 550 137 open /dev/video; -#X obj 282 199 pdp_yqt; #X obj 606 530 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X obj 606 582 pdp_control; @@ -27,8 +26,7 @@ #X floatatom 606 643 5 0 0 0 - - -; #X obj 606 614 route pdp_drop; #X text 82 562 written by Yves Degoyon (ydegoyon@free.fr); -#X text 579 359 Set and open the feed; -#X msg 316 359 feed http://localhost:8090/feed1.ffm; +#X text 631 358 Set and open the feed; #X floatatom 193 439 5 0 0 0 - - -; #X text 241 440 Streaming status; #X floatatom 229 462 5 0 0 0 - - -; @@ -44,7 +42,6 @@ time; #X text 78 598 NOTE : although there is an experimental audio support here \,; #X text 78 611 you'd better stream with mp3cast~ because; -#X obj 193 413 pdp_ffmpeg~; #X text 81 547 pdp_ffmeg~ : streams video & audio towards an ffmpeg server; #X obj 620 284 pdp_xv; @@ -59,44 +56,50 @@ server; #X obj 548 223 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X msg 674 285 close; -#X msg 318 415 feed http://www.xicnet.com:8090/feed1.ffm; +#X msg 317 358 feed http://online.loeil.org:8090/feed1.ffm; +#X msg 318 415 feed http://localhost:8090/feed1.ffm; +#X obj 193 413 pdp_ffmpeg~; +#X floatatom 306 505 5 0 0 0 - - -; +#X text 352 505 Emission framerate; +#X obj 282 199 pdp_yqt; #X connect 0 0 9 0; -#X connect 1 0 15 0; +#X connect 1 0 49 0; #X connect 2 0 1 0; -#X connect 3 0 15 0; +#X connect 3 0 49 0; #X connect 4 0 3 0; #X connect 5 0 4 0; #X connect 6 0 9 1; #X connect 7 0 9 0; #X connect 8 0 6 0; -#X connect 9 0 15 0; +#X connect 9 0 49 0; #X connect 10 0 36 0; -#X connect 10 0 39 0; +#X connect 10 0 46 0; #X connect 11 0 10 0; #X connect 12 0 11 0; #X connect 13 0 11 0; #X connect 14 0 10 0; -#X connect 15 0 36 0; -#X connect 15 0 39 0; -#X connect 15 4 43 0; -#X connect 15 4 36 0; -#X connect 15 5 43 0; -#X connect 15 5 36 1; -#X connect 16 0 18 0; -#X connect 17 0 20 0; -#X connect 18 0 17 0; -#X connect 20 0 19 0; -#X connect 23 0 36 0; -#X connect 29 0 36 0; -#X connect 36 0 24 0; -#X connect 36 1 26 0; -#X connect 36 2 31 0; -#X connect 39 1 38 0; -#X connect 40 0 39 1; -#X connect 41 0 36 0; -#X connect 41 1 36 1; -#X connect 43 1 42 1; -#X connect 43 1 42 0; -#X connect 45 0 43 1; -#X connect 46 0 38 0; -#X connect 47 0 36 0; +#X connect 15 0 17 0; +#X connect 16 0 19 0; +#X connect 17 0 16 0; +#X connect 19 0 18 0; +#X connect 27 0 46 0; +#X connect 36 1 35 0; +#X connect 37 0 36 1; +#X connect 38 0 46 0; +#X connect 38 1 46 1; +#X connect 40 1 39 1; +#X connect 40 1 39 0; +#X connect 42 0 40 1; +#X connect 43 0 35 0; +#X connect 44 0 46 0; +#X connect 45 0 46 0; +#X connect 46 0 22 0; +#X connect 46 1 24 0; +#X connect 46 2 29 0; +#X connect 46 3 47 0; +#X connect 49 0 36 0; +#X connect 49 0 46 0; +#X connect 49 4 40 0; +#X connect 49 4 46 0; +#X connect 49 5 40 0; +#X connect 49 5 46 1; diff --git a/doc/help-pdp_fqt.pd b/doc/help-pdp_fqt.pd index 0f997a6..73ec897 100644 --- a/doc/help-pdp_fqt.pd +++ b/doc/help-pdp_fqt.pd @@ -10,27 +10,27 @@ #X obj 323 68 hsl 300 15 0 1000 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X obj 257 135 metro 70; -#X obj 558 272 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +#X obj 558 398 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; -#X obj 558 324 pdp_control; -#X msg 558 297 thread \$1; -#X floatatom 558 385 5 0 0 0 - - -; -#X obj 558 356 route pdp_drop; -#X floatatom 264 257 5 0 0 0 - - -; -#X floatatom 295 282 5 0 0 0 - - -; -#X text 315 257 Number of frames decoded; -#X text 344 281 Total number of frames; -#X text 81 360 pdp_fqt : fast quicktime movie reader; -#X text 81 377 ( frames are cached in memory and no audio decoding +#X obj 558 450 pdp_control; +#X msg 558 423 thread \$1; +#X floatatom 558 511 5 0 0 0 - - -; +#X obj 558 482 route pdp_drop; +#X floatatom 264 383 5 0 0 0 - - -; +#X floatatom 295 408 5 0 0 0 - - -; +#X text 315 383 Number of frames decoded; +#X text 344 407 Total number of frames; +#X text 81 486 pdp_fqt : fast quicktime movie reader; +#X text 81 503 ( frames are cached in memory and no audio decoding ); -#X floatatom 317 164 5 0 0 0 - - -; -#X text 368 164 Frame command; -#X obj 316 183 t b f; -#X text 81 394 written by Yves Degoyon; -#X obj 218 293 pdp_xv; -#X floatatom 328 304 5 0 0 0 - - -; -#X text 373 304 Frame rate; -#X obj 225 222 pdp_fqt; +#X floatatom 317 290 5 0 0 0 - - -; +#X text 368 290 Frame command; +#X obj 316 309 t b f; +#X text 81 520 written by Yves Degoyon; +#X obj 218 419 pdp_xv; +#X floatatom 328 430 5 0 0 0 - - -; +#X text 373 430 Frame rate; +#X obj 225 348 pdp_fqt; #X connect 0 0 7 0; #X connect 1 0 26 0; #X connect 2 0 1 0; diff --git a/doc/help-pdp_imgloader.pd b/doc/help-pdp_imgloader.pd index 3a0787b..49afe7d 100644 --- a/doc/help-pdp_imgloader.pd +++ b/doc/help-pdp_imgloader.pd @@ -39,7 +39,7 @@ #X text 27 241 load ; #X text 28 228 Load an image ( types supported by imlib2 ); #X obj 469 279 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 0 1; +-1 -1 10200 1; #X text 468 262 Blending factor; #X text 491 364 Unhide ; #X text 439 340 Hide ; diff --git a/doc/help-pdp_ocanvas.pd b/doc/help-pdp_ocanvas.pd index 8c034c0..8d9c989 100644 --- a/doc/help-pdp_ocanvas.pd +++ b/doc/help-pdp_ocanvas.pd @@ -1,9 +1,8 @@ -#N canvas 121 0 828 668 10; -#X obj 234 469 pdp_xv; +#N canvas 507 -5 828 668 10; #X obj 227 100 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 -1; #X msg 123 139 loop \$1; -#X obj 124 117 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 +#X obj 124 117 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 1 1; #X msg 119 80 open \$1; #X obj 118 56 openpanel; @@ -34,7 +33,7 @@ overlay; #X obj 470 99 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 -1; #X msg 366 138 loop \$1; -#X obj 367 116 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 +#X obj 367 116 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 1 1; #X msg 362 79 open \$1; #X obj 361 55 openpanel; @@ -81,92 +80,93 @@ overlay; #X msg 173 540 select \$1 \$2; #X msg 279 539 drag \$1 \$2; #X msg 367 538 unselect; -#X msg 101 452 cursor 1; #X msg 82 341 offset 2 320 0; #X msg 81 365 offset 3 256 240; #X obj 134 258 pdp_scale 320 240; #X obj 307 255 pdp_scale 320 240; #X obj 496 254 pdp_scale 320 240; -#X msg 83 393 dim 640 480; -#X obj 234 432 pdp_ocanvas 640 480 3; #X obj 234 497 route press drag release; #X msg 546 428 average \$1; #X obj 629 429 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X text 544 451 Average sources at intersections; #X text 544 463 ( default = 0 ); -#X obj 101 423 pdp_trigger b p; -#X connect 0 0 74 0; +#X msg 104 476 cursor 0; +#X obj 224 425 pdp_ocanvas 640 480 3; +#X obj 234 469 pdp_xv; +#X msg 96 417 dim 640 480; +#X obj 228 449 pdp_scale 320 240; +#X msg 105 446 cursor 1; +#X connect 0 0 7 0; #X connect 1 0 8 0; -#X connect 2 0 9 0; -#X connect 3 0 2 0; -#X connect 4 0 9 0; +#X connect 2 0 1 0; +#X connect 3 0 8 0; +#X connect 4 0 3 0; #X connect 5 0 4 0; -#X connect 6 0 5 0; +#X connect 6 0 7 0; #X connect 7 0 8 0; -#X connect 8 0 9 0; -#X connect 9 0 69 0; -#X connect 10 0 69 0; +#X connect 8 0 67 0; +#X connect 9 0 67 0; +#X connect 10 0 9 0; #X connect 11 0 10 0; -#X connect 12 0 11 0; -#X connect 13 0 11 0; -#X connect 14 0 16 0; -#X connect 15 0 18 0; -#X connect 16 0 15 0; -#X connect 18 0 17 0; -#X connect 20 0 9 1; +#X connect 12 0 10 0; +#X connect 13 0 15 0; +#X connect 14 0 17 0; +#X connect 15 0 14 0; +#X connect 17 0 16 0; +#X connect 19 0 8 1; +#X connect 23 0 30 0; #X connect 24 0 31 0; -#X connect 25 0 32 0; -#X connect 26 0 25 0; -#X connect 27 0 32 0; +#X connect 25 0 24 0; +#X connect 26 0 31 0; +#X connect 27 0 26 0; #X connect 28 0 27 0; -#X connect 29 0 28 0; +#X connect 29 0 30 0; #X connect 30 0 31 0; -#X connect 31 0 32 0; -#X connect 32 0 70 0; -#X connect 33 0 70 0; +#X connect 31 0 68 0; +#X connect 32 0 68 0; +#X connect 33 0 32 0; #X connect 34 0 33 0; -#X connect 35 0 34 0; -#X connect 36 0 34 0; -#X connect 37 0 32 1; +#X connect 35 0 33 0; +#X connect 36 0 31 1; +#X connect 37 0 44 0; #X connect 38 0 45 0; -#X connect 39 0 46 0; -#X connect 40 0 39 0; -#X connect 41 0 46 0; +#X connect 39 0 38 0; +#X connect 40 0 45 0; +#X connect 41 0 40 0; #X connect 42 0 41 0; -#X connect 43 0 42 0; +#X connect 43 0 44 0; #X connect 44 0 45 0; -#X connect 45 0 46 0; -#X connect 46 0 71 0; -#X connect 47 0 71 0; +#X connect 45 0 69 0; +#X connect 46 0 69 0; +#X connect 47 0 46 0; #X connect 48 0 47 0; -#X connect 49 0 48 0; -#X connect 50 0 48 0; -#X connect 51 0 46 1; -#X connect 55 0 61 0; -#X connect 56 0 55 0; -#X connect 57 0 58 0; -#X connect 58 0 55 0; -#X connect 58 1 55 1; -#X connect 61 0 73 0; -#X connect 62 0 67 0; -#X connect 62 0 68 0; -#X connect 62 0 72 0; -#X connect 63 0 73 0; -#X connect 64 0 73 0; -#X connect 65 0 73 0; -#X connect 66 0 0 0; -#X connect 67 0 73 0; -#X connect 68 0 73 0; -#X connect 69 0 73 1; -#X connect 70 0 73 2; -#X connect 71 0 73 3; -#X connect 72 0 0 0; -#X connect 73 0 79 0; -#X connect 74 0 63 0; -#X connect 74 1 64 0; -#X connect 74 2 65 0; -#X connect 75 0 73 0; -#X connect 76 0 75 0; -#X connect 79 0 66 0; -#X connect 79 1 0 0; +#X connect 49 0 47 0; +#X connect 50 0 45 1; +#X connect 54 0 60 0; +#X connect 55 0 54 0; +#X connect 56 0 57 0; +#X connect 57 0 54 0; +#X connect 57 1 54 1; +#X connect 60 0 76 0; +#X connect 61 0 65 0; +#X connect 61 0 66 0; +#X connect 62 0 76 0; +#X connect 63 0 76 0; +#X connect 64 0 76 0; +#X connect 65 0 76 0; +#X connect 66 0 76 0; +#X connect 67 0 76 1; +#X connect 68 0 76 2; +#X connect 69 0 76 3; +#X connect 70 0 62 0; +#X connect 70 1 63 0; +#X connect 70 2 64 0; +#X connect 71 0 76 0; +#X connect 72 0 71 0; +#X connect 75 0 77 0; +#X connect 76 0 79 0; +#X connect 77 0 70 0; +#X connect 78 0 77 0; +#X connect 79 0 77 0; +#X connect 80 0 77 0; diff --git a/doc/help-pdp_shape.pd b/doc/help-pdp_shape.pd index 0721f09..16a31fe 100644 --- a/doc/help-pdp_shape.pd +++ b/doc/help-pdp_shape.pd @@ -4,22 +4,22 @@ #X msg 34 125 loop \$1; #X obj 35 103 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 1 1 ; -#X msg 244 41 open \$1; -#X obj 243 17 openpanel; -#X obj 228 0 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 +#X msg 27 56 open \$1; +#X obj 26 32 openpanel; +#X obj 11 15 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 -1; -#X floatatom 190 96 5 0 0 0 - - -; +#X floatatom 168 83 5 0 0 0 - - -; #X msg 99 62 stop; -#X obj 197 65 hsl 300 15 0 1000 0 0 empty empty empty -2 -6 0 8 -262144 +#X obj 175 52 hsl 300 15 0 1000 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X obj 131 132 metro 70; #X obj 126 164 pdp_yqt; -#X obj 242 152 pdp_v4l; -#X obj 251 122 metro 70; -#X obj 296 88 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 +#X obj 245 134 pdp_v4l; +#X obj 254 104 metro 70; +#X obj 299 70 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 -1; -#X msg 253 89 stop; -#X msg 338 120 open /dev/video; +#X msg 256 71 stop; +#X msg 341 102 open /dev/video; #X obj 567 476 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X obj 567 528 pdp_control; @@ -28,30 +28,30 @@ #X obj 567 560 route pdp_drop; #X text 85 514 written by Yves Degoyon ( ydegoyon@free.fr ); #X obj 127 417 pdp_xv; -#X msg 292 303 rgb \$1 \$2 \$3; -#X obj 391 303 pack f f f; -#X floatatom 573 302 5 0 0 0 - - -; -#X text 584 321 R; -#X floatatom 622 303 5 0 0 0 - - -; -#X floatatom 670 304 5 0 0 0 - - -; -#X text 681 321 B; -#X obj 522 303 t b f; -#X text 631 321 G; -#X obj 474 303 t b f; +#X msg 326 273 rgb \$1 \$2 \$3; +#X obj 425 273 pack f f f; +#X floatatom 607 272 5 0 0 0 - - -; +#X text 618 291 R; +#X floatatom 656 273 5 0 0 0 - - -; +#X floatatom 700 273 5 0 0 0 - - -; +#X text 711 290 B; +#X obj 556 273 t b f; +#X text 662 291 G; +#X obj 508 273 t b f; #X obj 128 467 route press drag release; -#X msg 292 187 pick \$1 \$2; -#X text 383 186 Pick the color of the shape; -#X msg 291 215 detect \$1 \$2; -#X text 389 215 Detect a shape of that color; -#X msg 292 240 tolerance \$1; -#X floatatom 389 242 5 0 0 0 - - -; +#X msg 271 171 pick \$1 \$2; +#X text 362 170 Pick the color of the shape; +#X msg 291 194 detect \$1 \$2; +#X text 389 194 Detect a shape of that color; +#X msg 304 218 tolerance \$1; +#X floatatom 401 220 5 0 0 0 - - -; #X text 86 498 pdp_shape : shape recognition object; -#X text 433 242 Set tolerance ( default = 20 ); -#X text 294 323 Set the color of the shape; -#X msg 293 270 paint \$1; -#X obj 363 271 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +#X text 445 220 Set tolerance ( default = 20 ); +#X text 328 293 Set the color of the shape; +#X msg 317 247 paint \$1; +#X obj 387 248 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; -#X text 388 270 Paint option ( default = off ); +#X text 412 247 Paint option ( default = off ); #X floatatom 325 399 5 0 0 0 - - -; #X floatatom 286 417 5 0 0 0 - - -; #X floatatom 375 399 5 0 0 0 - - -; @@ -61,11 +61,18 @@ #X text 259 416 Y1; #X text 259 439 Y2; #X text 332 426 Coordinates of detected shape; -#X obj 397 346 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +#X obj 440 311 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; -#X msg 295 346 luminosity \$1; -#X text 425 345 Use luminosity ( default = on ); +#X msg 338 311 luminosity \$1; +#X text 468 310 Use luminosity ( default = on ); #X obj 127 361 pdp_shape; +#X msg 45 401 cursor 1; +#X obj 431 339 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 +1; +#X msg 352 337 shape \$1; +#X text 459 338 Draw shape option ( default = on ); +#X obj 504 369 loadbang; +#X msg 469 370 1; #X connect 0 0 9 0; #X connect 1 0 10 0; #X connect 2 0 1 0; @@ -111,3 +118,9 @@ #X connect 58 2 47 0; #X connect 58 3 48 0; #X connect 58 4 49 0; +#X connect 59 0 22 0; +#X connect 60 0 61 0; +#X connect 61 0 58 0; +#X connect 63 0 64 0; +#X connect 64 0 55 0; +#X connect 64 0 60 0; diff --git a/doc/rs_pdp_live~.pd b/doc/rs_pdp_live~.pd index a112ed5..387d943 100644 --- a/doc/rs_pdp_live~.pd +++ b/doc/rs_pdp_live~.pd @@ -1,13 +1,13 @@ #N canvas 168 29 842 529 10; #X text 460 551 written by Yves Degoyon (ydegoyon@free.fr); -#X floatatom 226 441 5 0 0 0 - - -; -#X text 272 440 Streaming status; -#X floatatom 221 419 5 0 0 0 - - -; +#X floatatom 223 475 5 0 0 0 - - -; +#X text 269 474 Streaming status; +#X floatatom 244 453 5 0 0 0 - - -; #X obj 36 449 pdp_xv; -#X text 550 79 Connect to a live stream; +#X text 611 77 Connect to a live stream; #X text 325 118 Disconnect from the current stream; #X msg 247 116 disconnect; -#X text 270 420 Number of video frames decoded; +#X text 293 454 Number of video frames decoded; #X text 457 527 ( at least from ffserver ); #X text 23 547 NOTE : as for pdp_ffmpeg~ \, transmitting audio; #X text 22 565 with the video stream produces some unsteady sound; @@ -20,7 +20,6 @@ #X obj 146 486 outlet~; #X text 387 342 ([-20 \, 20 ] default : 0 ); #X text 390 329 Set the priority of decoding thread; -#X obj 65 60 block~ 4096; #X msg 247 225 connect \$1; #X text 460 513 pdp_live~ : decodes a live video stream; #X text 458 539 and reads most common files ( avi \, mpg \, .... ) @@ -33,23 +32,42 @@ #X obj 317 298 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X text 348 298 Activate decoding of audio ( default : off ); -#X obj 113 390 pdp_live~; #X obj 247 200 makefilename file://%s; #X msg 9 388 autocreate 1; -#X msg 246 78 connect http://www.xicnet.com:8000/cruzados.mpg; -#X connect 7 0 30 0; -#X connect 13 0 30 0; +#X msg 246 78 connect http://www.hackitectura.net:8090/test2.mpg; +#X msg 244 52 connect http://localhost:8090/test1.mpg; +#X obj 65 61 block~ 1024; +#X obj 322 261 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 +1; +#X msg 248 259 thread \$1; +#X obj 113 374 pdp_live~; +#X obj 378 259 loadbang; +#X msg 343 259 1; +#X text 449 259 Activate threading ( default : on ); +#X floatatom 260 430 5 0 0 0 - - -; +#X text 306 430 Reception framerate; +#X text 333 411 End of stream reached; +#X floatatom 287 409 5 0 0 0 - - -; +#X connect 7 0 36 0; +#X connect 13 0 36 0; #X connect 14 0 13 0; -#X connect 21 0 30 0; -#X connect 25 0 26 0; -#X connect 26 0 31 0; -#X connect 27 0 30 0; -#X connect 28 0 27 0; +#X connect 20 0 36 0; +#X connect 24 0 25 0; +#X connect 25 0 29 0; +#X connect 26 0 36 0; +#X connect 27 0 26 0; +#X connect 29 0 20 0; #X connect 30 0 4 0; -#X connect 30 1 16 0; -#X connect 30 2 17 0; -#X connect 30 3 1 0; -#X connect 30 4 3 0; -#X connect 31 0 21 0; -#X connect 32 0 4 0; -#X connect 33 0 30 0; +#X connect 31 0 36 0; +#X connect 32 0 36 0; +#X connect 34 0 35 0; +#X connect 35 0 36 0; +#X connect 36 0 4 0; +#X connect 36 1 16 0; +#X connect 36 2 17 0; +#X connect 36 3 1 0; +#X connect 36 4 3 0; +#X connect 36 5 40 0; +#X connect 36 6 43 0; +#X connect 37 0 38 0; +#X connect 38 0 34 0; diff --git a/modules/Makefile b/modules/Makefile index 14b6c92..5d93176 100644 --- a/modules/Makefile +++ b/modules/Makefile @@ -11,10 +11,11 @@ OBJECTS = pdp_intrusion.o pdp_yqt.o pdp_simura.o pdp_underwatch.o \ pdp_cycle.o pdp_transform.o pdp_shagadelic.o \ pdp_dice.o pdp_puzzle.o pdp_text.o pdp_form.o \ pdp_compose.o pdp_cmap.o pdp_ascii.o \ - pdp_ffmpeg~.o pdp_live~.o pdp_segsnd~.o pdp_noquark.o \ - pdp_juxta.o pdp_capture.o pdp_smuck.o pdp_lumafilt.o \ + pdp_segsnd~.o pdp_noquark.o pdp_juxta.o \ + pdp_capture.o pdp_smuck.o pdp_lumafilt.o \ pdp_transition.o pdp_imgloader.o pdp_imgsaver.o pdp_cache.o \ pdp_canvas.o pdp_pen.o pdp_shape.o pdp_fqt.o pdp_fcqt.o \ - pdp_ocanvas.o # pdp_xcanvas.o pdp_aa.o + pdp_ocanvas.o pdp_spotlight.o pdp_live~.o pdp_ffmpeg~.o + # pdp_xcanvas.o pdp_aa.o all_modules: $(OBJECTS) diff --git a/modules/Makefile.in b/modules/Makefile.in index 14b6c92..0b221e6 100644 --- a/modules/Makefile.in +++ b/modules/Makefile.in @@ -11,10 +11,11 @@ OBJECTS = pdp_intrusion.o pdp_yqt.o pdp_simura.o pdp_underwatch.o \ pdp_cycle.o pdp_transform.o pdp_shagadelic.o \ pdp_dice.o pdp_puzzle.o pdp_text.o pdp_form.o \ pdp_compose.o pdp_cmap.o pdp_ascii.o \ - pdp_ffmpeg~.o pdp_live~.o pdp_segsnd~.o pdp_noquark.o \ - pdp_juxta.o pdp_capture.o pdp_smuck.o pdp_lumafilt.o \ + pdp_segsnd~.o pdp_noquark.o pdp_juxta.o \ + pdp_capture.o pdp_smuck.o pdp_lumafilt.o \ pdp_transition.o pdp_imgloader.o pdp_imgsaver.o pdp_cache.o \ pdp_canvas.o pdp_pen.o pdp_shape.o pdp_fqt.o pdp_fcqt.o \ - pdp_ocanvas.o # pdp_xcanvas.o pdp_aa.o + pdp_ocanvas.o pdp_spotlight.o @PDP_STREAMING_OBJECTS@ + # pdp_xcanvas.o pdp_aa.o all_modules: $(OBJECTS) diff --git a/modules/pdp_cmap.c b/modules/pdp_cmap.c index ae2f516..547208d 100644 --- a/modules/pdp_cmap.c +++ b/modules/pdp_cmap.c @@ -22,6 +22,7 @@ */ #include "pdp.h" +#include "g_canvas.h" #include "yuv.h" #include #include @@ -118,7 +119,7 @@ static void pdp_cmap_r(t_pdp_cmap *x, t_floatarg fr ) x->x_colors[x->x_current].y = (yuv_RGBtoY( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB ))<<7; x->x_colors[x->x_current].u = (yuv_RGBtoU( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8; x->x_colors[x->x_current].v = (yuv_RGBtoV( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8; - pdp_cmap_draw_color( x, x->x_colorR, x->x_colorG, x->x_colorB ); + if (glist_isvisible(x->x_canvas)) pdp_cmap_draw_color( x, x->x_colorR, x->x_colorG, x->x_colorB ); } } @@ -130,7 +131,7 @@ static void pdp_cmap_g(t_pdp_cmap *x, t_floatarg fg ) x->x_colors[x->x_current].y = (yuv_RGBtoY( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB ))<<7; x->x_colors[x->x_current].u = (yuv_RGBtoU( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8; x->x_colors[x->x_current].v = (yuv_RGBtoV( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8; - pdp_cmap_draw_color( x, x->x_colorR, x->x_colorG, x->x_colorB ); + if (glist_isvisible(x->x_canvas)) pdp_cmap_draw_color( x, x->x_colorR, x->x_colorG, x->x_colorB ); } } @@ -142,7 +143,7 @@ static void pdp_cmap_b(t_pdp_cmap *x, t_floatarg fb ) x->x_colors[x->x_current].y = (yuv_RGBtoY( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB ))<<7; x->x_colors[x->x_current].u = (yuv_RGBtoU( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8; x->x_colors[x->x_current].v = (yuv_RGBtoV( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8; - pdp_cmap_draw_color( x, x->x_colorR, x->x_colorG, x->x_colorB ); + if (glist_isvisible(x->x_canvas)) pdp_cmap_draw_color( x, x->x_colorR, x->x_colorG, x->x_colorB ); } } @@ -280,7 +281,7 @@ static void pdp_cmap_pick(t_pdp_cmap *x) x->x_colorR = yuv_YUVtoR( y, u, v ); x->x_colorG = yuv_YUVtoG( y, u, v ); x->x_colorB = yuv_YUVtoB( y, u, v ); - pdp_cmap_draw_color( x, x->x_colorR, x->x_colorG, x->x_colorB ); + if (glist_isvisible(x->x_canvas)) pdp_cmap_draw_color( x, x->x_colorR, x->x_colorG, x->x_colorB ); x->x_colors[x->x_current].y = 255; x->x_colors[x->x_current].u = 255; x->x_colors[x->x_current].v = 255; diff --git a/modules/pdp_compose.c b/modules/pdp_compose.c index e3fda24..aad03a9 100644 --- a/modules/pdp_compose.c +++ b/modules/pdp_compose.c @@ -23,6 +23,7 @@ */ #include "pdp.h" +#include "g_canvas.h" #include "yuv.h" #include #include @@ -117,7 +118,7 @@ static void pdp_compose_r(t_pdp_compose *x, t_floatarg fr ) x->x_colorY = (yuv_RGBtoY( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB ))<<7; x->x_colorU = (yuv_RGBtoU( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8; x->x_colorV = (yuv_RGBtoV( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8; - pdp_compose_draw_color( x ); + if (glist_isvisible(x->x_canvas)) pdp_compose_draw_color( x ); } } @@ -129,7 +130,7 @@ static void pdp_compose_g(t_pdp_compose *x, t_floatarg fg ) x->x_colorY = (yuv_RGBtoY( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB ))<<7; x->x_colorU = (yuv_RGBtoU( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8; x->x_colorV = (yuv_RGBtoV( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8; - pdp_compose_draw_color( x ); + if (glist_isvisible(x->x_canvas)) pdp_compose_draw_color( x ); } } @@ -141,7 +142,7 @@ static void pdp_compose_b(t_pdp_compose *x, t_floatarg fb ) x->x_colorY = (yuv_RGBtoY( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB ))<<7; x->x_colorU = (yuv_RGBtoU( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8; x->x_colorV = (yuv_RGBtoV( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8; - pdp_compose_draw_color( x ); + if (glist_isvisible(x->x_canvas)) pdp_compose_draw_color( x ); } } @@ -201,7 +202,7 @@ static void pdp_compose_pick(t_pdp_compose *x) x->x_colorR = yuv_YUVtoR( y, u, v ); x->x_colorG = yuv_YUVtoG( y, u, v ); x->x_colorB = yuv_YUVtoB( y, u, v ); - pdp_compose_draw_color( x ); + if (glist_isvisible(x->x_canvas)) pdp_compose_draw_color( x ); } } diff --git a/modules/pdp_ctrack.c b/modules/pdp_ctrack.c index e9e631b..ed35c9b 100644 --- a/modules/pdp_ctrack.c +++ b/modules/pdp_ctrack.c @@ -22,6 +22,7 @@ */ #include "pdp.h" +#include "g_canvas.h" #include "yuv.h" #include #include @@ -124,7 +125,7 @@ static void pdp_ctrack_r(t_pdp_ctrack *x, t_floatarg fr ) x->x_colorY = (yuv_RGBtoY( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB ))<<7; x->x_colorU = (yuv_RGBtoU( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8; x->x_colorV = (yuv_RGBtoV( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8; - pdp_ctrack_draw_color( x ); + if (glist_isvisible(x->x_canvas)) pdp_ctrack_draw_color( x ); outlet_float( x->x_R, x->x_colorR ); } } @@ -137,7 +138,7 @@ static void pdp_ctrack_g(t_pdp_ctrack *x, t_floatarg fg ) x->x_colorY = (yuv_RGBtoY( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB ))<<7; x->x_colorU = (yuv_RGBtoU( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8; x->x_colorV = (yuv_RGBtoV( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8; - pdp_ctrack_draw_color( x ); + if (glist_isvisible(x->x_canvas)) pdp_ctrack_draw_color( x ); outlet_float( x->x_G, x->x_colorG ); } } @@ -150,7 +151,7 @@ static void pdp_ctrack_b(t_pdp_ctrack *x, t_floatarg fb ) x->x_colorY = (yuv_RGBtoY( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB ))<<7; x->x_colorU = (yuv_RGBtoU( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8; x->x_colorV = (yuv_RGBtoV( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8; - pdp_ctrack_draw_color( x ); + if (glist_isvisible(x->x_canvas)) pdp_ctrack_draw_color( x ); outlet_float( x->x_B, x->x_colorB ); } } @@ -218,6 +219,7 @@ static void pdp_ctrack_pick(t_pdp_ctrack *x) if ( x->x_frame && ( x->x_cursX > 0 ) && ( x->x_cursX < x->x_vwidth ) && ( x->x_cursY > 0 ) && ( x->x_cursY < x->x_vheight ) ) { + // post( "pdp_ctrack : picking up color : x=%d y=%d", x->x_cursX, x->x_cursY ); x->x_colorY = x->x_frame[ x->x_cursY*x->x_vwidth+x->x_cursX ]; x->x_colorV = x->x_frame[ x->x_vsize + (x->x_cursY>>1)*(x->x_vwidth>>1)+(x->x_cursX>>1) ]; x->x_colorU = x->x_frame[ x->x_vsize + (x->x_vsize>>2) + (x->x_cursY>>1)*(x->x_vwidth>>1)+(x->x_cursX>>1) ]; @@ -230,7 +232,7 @@ static void pdp_ctrack_pick(t_pdp_ctrack *x) outlet_float( x->x_G, x->x_colorG ); x->x_colorB = yuv_YUVtoB( y, u, v ); outlet_float( x->x_B, x->x_colorB ); - pdp_ctrack_draw_color( x ); + if (glist_isvisible(x->x_canvas)) pdp_ctrack_draw_color( x ); } } diff --git a/modules/pdp_ffmpeg~.c b/modules/pdp_ffmpeg~.c index ef215ad..5669e96 100644 --- a/modules/pdp_ffmpeg~.c +++ b/modules/pdp_ffmpeg~.c @@ -1,6 +1,6 @@ /* - * Pure Data Packet module. - * Copyright (c) by Tom Schouten + * PiDiP module. + * Copyright (c) by Yves Degoyon (ydegoyon@free.fr) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -52,6 +52,7 @@ typedef struct pdp_ffmpeg_struct t_outlet *x_outlet_streaming; // indicates the action of streaming t_outlet *x_outlet_nbframes; // number of frames emitted + t_outlet *x_outlet_framerate; // real framerate t_outlet *x_outlet_nbframes_dropped; // number of frames dropped char *x_feedname; @@ -310,7 +311,7 @@ static void pdp_ffmpeg_process_yv12(t_pdp_ffmpeg *x) short int *data = (short int *)pdp_packet_data(x->x_packet0); t_pdp *newheader = 0; short int *newdata = 0; - t_int newpacket = -1, i; + t_int newpacket = -1, i, j; short int *pY, *pU, *pV; uint8_t *pnY, *pnU, *pnV; t_int px, py; @@ -348,14 +349,11 @@ static void pdp_ffmpeg_process_yv12(t_pdp_ffmpeg *x) for(px=0; pxx_vwidth; px++) { *pnY = (uint8_t) (*(pY++)>>7); - if ( *pnY > 255 ) *pnY=255; pnY++; if ( (px%2==0) && (py%2==0) ) { *pnV = (uint8_t) (((*(pV++))>>8)+128); - if ( *pnV > 255 ) *pnV=255; *pnU = (uint8_t) (((*(pU++))>>8)+128); - if ( *pnU > 255 ) *pnU=255; pnU++;pnV++; } } @@ -387,12 +385,20 @@ static void pdp_ffmpeg_process_yv12(t_pdp_ffmpeg *x) if ( etime.tv_sec != x->x_cursec ) { x->x_cursec = etime.tv_sec; - x->x_secondcount[ svideoindex ] = 0; + outlet_float( x->x_outlet_framerate, x->x_secondcount[ svideoindex ] ); + for (j=0; jx_nbvideostreams; j++) + { + x->x_secondcount[ j ] = 0; + } } - if ( x->x_secondcount[ svideoindex ] >= x->x_avcontext->streams[i]->codec.frame_rate/10000 ) + if ( x->x_secondcount[ svideoindex ] >= (x->x_avcontext->streams[i]->codec.frame_rate/10000) ) { - x->x_nbframes_dropped++; - continue; + // post("pdp_ffmpeg : index=%d actual : %d, nominal : %d", + // svideoindex, + // x->x_secondcount[ svideoindex ], + // (x->x_avcontext->streams[i]->codec.frame_rate/10000) ); + x->x_nbframes_dropped++; + continue; } if ( x->x_avcontext->streams[i]->codec.pix_fmt != PIX_FMT_YUV420P ) @@ -463,14 +469,14 @@ static void pdp_ffmpeg_process_yv12(t_pdp_ffmpeg *x) x->x_final_picture = x->x_formatted_picture; } - // encode and send the picture + // encode and send the picture { AVFrame aframe; t_int fsize, ret; memset(&aframe, 0, sizeof(AVFrame)); *(AVPicture*)&aframe= *x->x_final_picture; - + aframe.pts = etime.tv_sec*1000000 + etime.tv_usec; aframe.quality = x->x_avcontext->streams[i]->quality; fsize = avcodec_encode_video(&x->x_avcontext->streams[i]->codec, @@ -484,7 +490,9 @@ static void pdp_ffmpeg_process_yv12(t_pdp_ffmpeg *x) else { x->x_nbframes++; - x->x_secondcount[ svideoindex++ ]++; + x->x_secondcount[ svideoindex ]++; + // post ("pdp_ffmpeg~ : index=%d count=%d", svideoindex, x->x_secondcount[ svideoindex ] ); + svideoindex++; } } } @@ -583,7 +591,7 @@ static t_int *pdp_ffmpeg_perform(t_int *w) x->x_audioin_position=(x->x_audioin_position+1)%(2*MAX_AUDIO_PACKET_SIZE); if ( x->x_audioin_position == 2*MAX_AUDIO_PACKET_SIZE-1 ) { - post( "pdp_ffmpeg~ : reaching end of audio buffer" ); + // post( "pdp_ffmpeg~ : reaching end of audio buffer" ); } fsample=*(in2++); if (fsample > 1.0) { fsample = 1.0; } @@ -686,6 +694,7 @@ void *pdp_ffmpeg_new(void) x->x_outlet_streaming = outlet_new(&x->x_obj, &s_float); x->x_outlet_nbframes = outlet_new(&x->x_obj, &s_float); x->x_outlet_nbframes_dropped = outlet_new(&x->x_obj, &s_float); + x->x_outlet_framerate = outlet_new(&x->x_obj, &s_float); x->x_packet0 = -1; x->x_queue_id = -1; diff --git a/modules/pdp_imgloader.c b/modules/pdp_imgloader.c index fbc0714..752e4bc 100644 --- a/modules/pdp_imgloader.c +++ b/modules/pdp_imgloader.c @@ -98,8 +98,8 @@ static void pdp_imgloader_load(t_pdp_imgloader *x, t_symbol *filename, t_floatar x->x_iwidth = imlib_image_get_width(); x->x_iheight = imlib_image_get_height(); post( "pdp_imgloader : loaded : %s (%dx%d)", filename->s_name, x->x_iwidth, x->x_iheight ); - x->x_xoffset = (int) fx; - x->x_yoffset = (int) fy; + if ( fx!= 0.) x->x_xoffset = (int) fx; + if ( fy!= 0.) x->x_yoffset = (int) fy; } static void pdp_imgloader_xoffset(t_pdp_imgloader *x, t_floatarg fx ) diff --git a/modules/pdp_live~.c b/modules/pdp_live~.c index 6b8823f..cae6a65 100644 --- a/modules/pdp_live~.c +++ b/modules/pdp_live~.c @@ -1,6 +1,6 @@ /* - * Pure Data Packet module. - * Copyright (c) by Tom Schouten + * PiDiP module. + * Copyright (c) by Yves Degoyon (ydegoyon@free.fr) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -38,14 +38,22 @@ #define VIDEO_BUFFER_SIZE (1024*1024) #define MAX_AUDIO_PACKET_SIZE (128 * 1024) -#define MIN_AUDIO_SIZE (64 * 1024) +#define MIN_AUDIO_SIZE (512) #define AUDIO_PACKET_SIZE (2*1152) #define DEFAULT_CHANNELS 1 -#define DEFAULT_FRAME_RATE 25 #define DEFAULT_WIDTH 320 #define DEFAULT_HEIGHT 240 +#define DEFAULT_FRAME_RATE 25 +#define END_OF_STREAM 20 +#define MIN_PRIORITY -20 #define DEFAULT_PRIORITY 0 +#define MAX_PRIORITY 20 + +/* a trick to cope with ffmpeg versions */ +#ifndef AVFMT_NOHEADER +#define AVFMT_NOHEADER AVFMTCTX_NOHEADER +#endif static char *pdp_live_version = "pdp_live~: version 0.1, a video stream decoder ( ydegoyon@free.fr)."; @@ -68,6 +76,8 @@ typedef struct pdp_live_struct t_outlet *x_outlet_right; // right audio output t_outlet *x_outlet_streaming; // indicates the action of streaming t_outlet *x_outlet_nbframes; // number of frames emitted + t_outlet *x_outlet_framerate; // real framerate + t_outlet *x_outlet_endofstream;// for signaling the end of the stream pthread_t x_connectchild; // thread used for connecting to a stream pthread_t x_decodechild; // stream decoding thread @@ -76,22 +86,28 @@ typedef struct pdp_live_struct char *x_url; t_int x_streaming; // streaming flag + t_int x_nopackets; // no packet to decode + t_int x_endofstream; // end of the stream reached t_int x_nbframes; // number of frames emitted t_int x_framerate; // framerate t_int x_samplerate; // audio sample rate t_int x_audiochannels; // audio channels t_int x_audioon; // enough audio data to start playing + t_int x_blocksize; // audio block size struct timeval x_starttime; // streaming starting time t_int x_cursec; // current second t_int x_secondcount; // number of frames received in the current second t_int x_nbvideostreams; // number of video streams t_int x_nbaudiostreams; // number of audio streams + t_int x_videoindex; // index of the first video stream /* AV data structures */ AVFormatContext *x_avcontext; AVFormatParameters x_avparameters; // unused but the call is necessary to allocate structures AVPacket x_pkt; // packet received on the stream AVPicture x_picture_decoded; + long long int x_pts; // presentation time stamp + long long int x_previouspts; // previous presentation time stamp t_int x_newpicture; /* audio structures */ @@ -105,7 +121,10 @@ typedef struct pdp_live_struct static void pdp_live_priority(t_pdp_live *x, t_floatarg fpriority ) { - x->x_priority = (int)fpriority; + if ( ( x->x_priority >= MIN_PRIORITY ) && ( x->x_priority <= MAX_PRIORITY ) ) + { + x->x_priority = (int)fpriority; + } } static void pdp_live_threadify(t_pdp_live *x, t_floatarg fusethread ) @@ -131,24 +150,32 @@ static t_int pdp_live_decode_packet(t_pdp_live *x) AVFrame frame; uint8_t *pcktptr; struct timeval etime; + struct timespec mwait; if ( !x->x_streaming ) { return -1; } + // post( "pdp_live~ : trying to read packet" ); // read new packet on the stream if (av_read_packet(x->x_avcontext, &x->x_pkt) < 0) { - // post( "pdp_live~ : decoding thread : nothing to decode" ); + x->x_nopackets++; + // post( "pdp_live~ : decoding thread : nothing to decode : no packets :%d", x->x_nopackets ); + if ( x->x_nopackets > END_OF_STREAM ) + { + x->x_endofstream = 1; + } return -1; } // post( "pdp_live~ : read packet ( size=%d )", x->x_pkt.size ); + x->x_nopackets = 0; if (x->x_pkt.stream_index >= x->x_avcontext->nb_streams) { post("pdp_live~ : stream received out of range !! "); - return 0; + return -1; } length = x->x_pkt.size; @@ -211,8 +238,9 @@ static t_int pdp_live_decode_packet(t_pdp_live *x) else { post( "pdp_live~ : audio overflow : packet ignored..."); + x->x_audioin_position = 0; } - if ( ( x->x_audioin_position > MIN_AUDIO_SIZE ) && (!x->x_audioon) ) + if ( ( x->x_audioin_position > x->x_blocksize ) && (!x->x_audioon) ) { x->x_audioon = 1; // post( "pdp_live~ : audio on" ); @@ -224,19 +252,19 @@ static t_int pdp_live_decode_packet(t_pdp_live *x) imagesize = (x->x_avcontext->streams[x->x_pkt.stream_index]->codec.width * x->x_avcontext->streams[x->x_pkt.stream_index]->codec.height * 3) / 2; // yuv planar - // do not believe the declared framerate - // x->x_framerate = x->x_avcontext->streams[x->x_pkt.stream_index]->codec.frame_rate / 10000; + x->x_framerate = x->x_avcontext->streams[x->x_pkt.stream_index]->codec.frame_rate / 10000; + x->x_videoindex = x->x_pkt.stream_index; // calculate actual frame rate - if ( gettimeofday(&etime, NULL) == -1) - { - post("pdp_live~ : could not read time" ); - } - if ( ( etime.tv_sec - x->x_starttime.tv_sec ) > 0 ) - { - x->x_framerate = x->x_nbframes / ( etime.tv_sec - x->x_starttime.tv_sec ); - } - if ( x->x_framerate == 0 ) x->x_framerate = 1; + // if ( gettimeofday(&etime, NULL) == -1) + // { + // post("pdp_live~ : could not read time" ); + // } + // if ( ( etime.tv_sec - x->x_starttime.tv_sec ) > 0 ) + // { + // x->x_framerate = x->x_nbframes / ( etime.tv_sec - x->x_starttime.tv_sec ); + // } + // if ( x->x_framerate == 0 ) x->x_framerate = 1; // post ("pdp_live~ : frame rate is %d", x->x_framerate ); chunksize = avcodec_decode_video( @@ -276,9 +304,31 @@ static t_int pdp_live_decode_packet(t_pdp_live *x) else { x->x_newpicture=1; + x->x_previouspts = x->x_pts; + x->x_pts = frame.pts; + // post( "pdp_live : frame pts : %ld", x->x_pts ); x->x_vwidth = x->x_avcontext->streams[x->x_pkt.stream_index]->codec.width; x->x_vheight = x->x_avcontext->streams[x->x_pkt.stream_index]->codec.height; x->x_vsize = x->x_vwidth*x->x_vheight; + + if ( x->x_previouspts != -1 ) + { + mwait.tv_sec = 0; + mwait.tv_nsec = (x->x_pts - x->x_previouspts)*1000; + + if ( ( x->x_pts == 0 ) ) + { + // post("pdp_live~ : no presentation time stamp, using framerate :%d", + // x->x_framerate ); + mwait.tv_sec = 0; + mwait.tv_nsec = 1000000000/((x->x_framerate+5)); // the +5 is experimental + // it comes from the time used in decoding + } + + nanosleep( &mwait, NULL ); // wait between the two successive frames + // i know, cheap flow control + } + } break; } @@ -335,6 +385,7 @@ static void *pdp_decode_stream_from_url(void *tdata) { nanosleep( &twait, NULL ); // nothing to read, just wait } + } post( "pdp_live~ : decoding thread %d exiting....", x->x_decodechild ); @@ -353,6 +404,7 @@ static void *pdp_live_connect_to_url(void *tdata) x->x_avparameters.channels = DEFAULT_CHANNELS; x->x_avparameters.frame_rate = DEFAULT_FRAME_RATE; x->x_avparameters.width = DEFAULT_WIDTH; + if ( x->x_framerate = 0 ) x->x_framerate = DEFAULT_FRAME_RATE; x->x_avparameters.height = DEFAULT_HEIGHT; x->x_avparameters.image_format = PIX_FMT_YUV420P; @@ -452,6 +504,8 @@ static void *pdp_live_connect_to_url(void *tdata) post("pdp_live~ : could not set start time" ); } x->x_streaming = 1; + x->x_nopackets = 0; + x->x_endofstream = 0; x->x_nbframes = 0; x->x_connectchild = 0; @@ -490,7 +544,7 @@ static void pdp_live_disconnect(t_pdp_live *x) struct timespec twait; twait.tv_sec = 0; - twait.tv_nsec = 100000000; // 100 ms + twait.tv_nsec = 10000000; // 10 ms if (!x->x_streaming) { @@ -520,6 +574,8 @@ static void pdp_live_disconnect(t_pdp_live *x) outlet_float( x->x_outlet_streaming, x->x_streaming ); x->x_nbframes = 0; outlet_float( x->x_outlet_nbframes, x->x_nbframes ); + x->x_framerate = 0; + outlet_float( x->x_outlet_framerate, x->x_framerate ); if (x->x_audio_resample_ctx) { @@ -583,11 +639,13 @@ static t_int *pdp_live_perform(t_int *w) t_int sn; // decode a packet if not in thread mode - if ( !x->x_usethread ) + if ( !x->x_usethread && x->x_streaming ) { pdp_live_decode_packet( x ); } + x->x_blocksize = n; + // just read the buffer if ( x->x_audioon ) { @@ -609,8 +667,8 @@ static t_int *pdp_live_perform(t_int *w) out1++; out2++; } - x->x_audioin_position-=sn; memcpy( &x->x_audio_in[0], &x->x_audio_in[sn], 4*MAX_AUDIO_PACKET_SIZE-sn ); + x->x_audioin_position-=sn; // post( "pdp_live~ : audio in position : %d", x->x_audioin_position ); if ( x->x_audioin_position <= sn ) { @@ -636,6 +694,7 @@ static t_int *pdp_live_perform(t_int *w) if ( etime.tv_sec != x->x_cursec ) { x->x_cursec = etime.tv_sec; + if (x->x_streaming) outlet_float( x->x_outlet_framerate, x->x_framerate ); x->x_secondcount = 0; } if ( x->x_secondcount >= x->x_framerate ) @@ -680,13 +739,14 @@ static t_int *pdp_live_perform(t_int *w) pdp_packet_pass_if_valid(x->x_pdp_out, &x->x_packet0); // update streaming status - outlet_float( x->x_outlet_streaming, x->x_streaming ); x->x_nbframes++; x->x_secondcount++; outlet_float( x->x_outlet_nbframes, x->x_nbframes ); x->x_newpicture = 0; } + outlet_float( x->x_outlet_streaming, x->x_streaming ); + outlet_float( x->x_outlet_endofstream, x->x_endofstream ); return (w+5); } @@ -730,22 +790,32 @@ void *pdp_live_new(void) x->x_outlet_streaming = outlet_new(&x->x_obj, &s_float); x->x_outlet_nbframes = outlet_new(&x->x_obj, &s_float); + x->x_outlet_framerate = outlet_new(&x->x_obj, &s_float); + x->x_outlet_endofstream = outlet_new(&x->x_obj, &s_float); x->x_packet0 = -1; x->x_connectchild = 0; x->x_decodechild = 0; x->x_usethread = 1; x->x_priority = DEFAULT_PRIORITY; - x->x_nbframes = 0; x->x_framerate = DEFAULT_FRAME_RATE; + x->x_nbframes = 0; + x->x_framerate = 0; x->x_samplerate = 0; x->x_audiochannels = 0; x->x_cursec = 0; x->x_secondcount = 0; x->x_audio_resample_ctx = NULL; x->x_nbvideostreams = 0; + x->x_videoindex = 0; x->x_audioin_position = 0; x->x_newpicture = 0; + x->x_endofstream = 0; + x->x_nopackets = 0; + x->x_blocksize = MIN_AUDIO_SIZE; + + x->x_pts = -1; + x->x_previouspts = -1; x->x_avcontext = av_mallocz(sizeof(AVFormatContext)); if ( !x->x_avcontext ) @@ -776,11 +846,12 @@ void pdp_live_tilde_setup(void) pdp_live_class = class_new(gensym("pdp_live~"), (t_newmethod)pdp_live_new, (t_method)pdp_live_free, sizeof(t_pdp_live), 0, A_NULL); - class_addmethod(pdp_live_class, (t_method)pdp_live_dsp, gensym("dsp"), 0); + class_addmethod(pdp_live_class, (t_method)pdp_live_dsp, gensym("dsp"), A_NULL); class_addmethod(pdp_live_class, (t_method)pdp_live_connect, gensym("connect"), A_SYMBOL, A_NULL); class_addmethod(pdp_live_class, (t_method)pdp_live_disconnect, gensym("disconnect"), A_NULL); class_addmethod(pdp_live_class, (t_method)pdp_live_priority, gensym("priority"), A_FLOAT, A_NULL); class_addmethod(pdp_live_class, (t_method)pdp_live_audio, gensym("audio"), A_FLOAT, A_NULL); + class_addmethod(pdp_live_class, (t_method)pdp_live_threadify, gensym("thread"), A_FLOAT, A_NULL); class_sethelpsymbol( pdp_live_class, gensym("pdp_live~.pd") ); } diff --git a/modules/pdp_shape.c b/modules/pdp_shape.c index d437144..27239c4 100644 --- a/modules/pdp_shape.c +++ b/modules/pdp_shape.c @@ -56,6 +56,7 @@ typedef struct pdp_shape_struct t_int x_tolerance; // tolerance t_int x_paint; // paint option + t_int x_shape; // drawing shape option t_int x_luminosity; // use luminosity or not short int *x_bdata; @@ -113,6 +114,14 @@ static void pdp_shape_paint(t_pdp_shape *x, t_floatarg fpaint ) } } +static void pdp_shape_shape(t_pdp_shape *x, t_floatarg fshape ) +{ + if ( ( (t_int)fshape == 0 ) || ( (t_int)fshape == 1 ) ) + { + x->x_shape = (t_int)fshape; + } +} + static void pdp_shape_do_detect(t_pdp_shape *x, t_floatarg X, t_floatarg Y); static void pdp_shape_frame_detect(t_pdp_shape *x, t_floatarg X, t_floatarg Y); @@ -191,9 +200,12 @@ static void pdp_shape_do_detect(t_pdp_shape *x, t_floatarg X, t_floatarg Y) { // paint it white // post( "pdp_shape_do_detect : paint : %d %d", nX, nY ); - *(pbbY+nY*x->x_vwidth+nX) = (0xff<<7); - *(pbbU+(nY>>1)*(x->x_vwidth>>1)+(nX>>1)) = (0xff<<8); - *(pbbV+(nY>>1)*(x->x_vwidth>>1)+(nX>>1)) = (0xff<<8); + if ( x->x_shape ) + { + *(pbbY+nY*x->x_vwidth+nX) = (0xff<<7); + *(pbbU+(nY>>1)*(x->x_vwidth>>1)+(nX>>1)) = (0xff<<8); + *(pbbV+(nY>>1)*(x->x_vwidth>>1)+(nX>>1)) = (0xff<<8); + } if ( ( nX < x->x_vx1 ) || ( x->x_vx1 == -1 ) ) { @@ -542,6 +554,7 @@ void *pdp_shape_new(void) x->x_tolerance = 20; x->x_paint = 0; + x->x_shape = 1; x->x_luminosity = 1; x->x_cursX = -1; @@ -574,6 +587,7 @@ void pdp_shape_setup(void) class_addmethod(pdp_shape_class, (t_method)pdp_shape_rgb, gensym("rgb"), A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, A_NULL); class_addmethod(pdp_shape_class, (t_method)pdp_shape_tolerance, gensym("tolerance"), A_FLOAT, A_NULL); class_addmethod(pdp_shape_class, (t_method)pdp_shape_paint, gensym("paint"), A_FLOAT, A_NULL); + class_addmethod(pdp_shape_class, (t_method)pdp_shape_shape, gensym("shape"), A_FLOAT, A_NULL); class_addmethod(pdp_shape_class, (t_method)pdp_shape_luminosity, gensym("luminosity"), A_FLOAT, A_NULL); } diff --git a/modules/pdp_simura.c b/modules/pdp_simura.c index 87a471c..3bae7a8 100644 --- a/modules/pdp_simura.c +++ b/modules/pdp_simura.c @@ -1,6 +1,6 @@ /* - * Pure Data Packet module. - * Copyright (c) by Tom Schouten + * PiDiP module. + * Copyright (c) by Yves Degoyon (ydegoyon@free.fr) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/modules/pdp_spigot.c b/modules/pdp_spigot.c index c25859c..4fd5d6a 100644 --- a/modules/pdp_spigot.c +++ b/modules/pdp_spigot.c @@ -1,6 +1,6 @@ /* - * Pure Data Packet module. - * Copyright (c) by Tom Schouten + * PiDiP module. + * Copyright (c) by Yves Degoyon (ydegoyon@free.fr) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/modules/pdp_xcanvas.c b/modules/pdp_xcanvas.c index 071f530..90f2700 100644 --- a/modules/pdp_xcanvas.c +++ b/modules/pdp_xcanvas.c @@ -18,7 +18,8 @@ * */ -/* This object is an object allowing juxtaposition of frames from two inlets +/* This object is a video canvas which is also handling the graphical operations + * ( no need to plug it in pdp_xv ) * Written by Yves Degoyon */ diff --git a/modules/pdp_yqt.c b/modules/pdp_yqt.c index 2a37414..d0ada83 100644 --- a/modules/pdp_yqt.c +++ b/modules/pdp_yqt.c @@ -1,6 +1,6 @@ /* - * Pure Data Packet module. - * Copyright (c) by Tom Schouten + * PiDiP module. + * Copyright (c) by Yves Degoyon (ydegoyon@free.fr) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/modules/pdp_yvu2rgb.c b/modules/pdp_yvu2rgb.c index 2a9156c..a536268 100644 --- a/modules/pdp_yvu2rgb.c +++ b/modules/pdp_yvu2rgb.c @@ -1,6 +1,6 @@ /* - * Pure Data Packet module. - * Copyright (c) by Tom Schouten + * PiDiP module. + * Copyright (c) by Yves Degoyon (ydegoyon@free.fr) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/patches/collage.pd b/patches/collage.pd index 6e4c4aa..0bfbcff 100644 --- a/patches/collage.pd +++ b/patches/collage.pd @@ -151,7 +151,6 @@ #X connect 39 0 40 0; #X connect 40 0 41 0; #X connect 41 0 44 0; -#X connect 42 0 32 0; #X connect 43 0 70 0; #X connect 44 0 6 0; #X connect 45 0 6 0; diff --git a/patches/help_pdp_effects_rack.pd b/patches/help_pdp_effects_rack.pd index cdf211e..9495acb 100644 --- a/patches/help_pdp_effects_rack.pd +++ b/patches/help_pdp_effects_rack.pd @@ -1,8 +1,8 @@ -#N canvas 19 12 986 661 10; +#N canvas 4 0 986 675 10; #X obj 230 7 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 -1; #X msg 150 44 loop \$1; -#X obj 151 22 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 1 +#X obj 151 22 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 1 1 ; #X msg 86 45 open \$1; #X obj 78 21 openpanel; @@ -18,29 +18,29 @@ -1; #X msg 376 8 stop; #X msg 441 41 open /dev/video; -#X obj 130 99 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X obj 48 111 pdp_spigot; +#X obj 131 106 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X obj 49 118 pdp_spigot; #X text 7 20 Load; #X text 436 7 Live; -#X obj 272 101 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X obj 190 113 pdp_spigot; -#X floatatom 46 167 5 0 0 0 - - -; -#X floatatom 93 168 5 0 0 0 - - -; -#X obj 46 141 pdp_aging; -#X obj 190 140 pdp_baltan; -#X floatatom 190 162 10 0 0 0 - - -; -#X obj 403 102 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X obj 321 114 pdp_spigot; -#X obj 320 141 pdp_edge; -#X obj 518 104 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X obj 436 116 pdp_spigot; -#X msg 436 165 bang; -#X floatatom 476 166 5 0 0 0 - - -; -#X obj 436 141 pdp_intrusion; +#X obj 272 108 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X obj 190 120 pdp_spigot; +#X floatatom 47 174 5 0 0 0 - - -; +#X floatatom 94 175 5 0 0 0 - - -; +#X obj 47 148 pdp_aging; +#X obj 190 147 pdp_baltan; +#X floatatom 190 169 10 0 0 0 - - -; +#X obj 401 109 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X obj 319 121 pdp_spigot; +#X obj 318 148 pdp_edge; +#X obj 525 108 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X obj 443 120 pdp_spigot; +#X msg 443 169 bang; +#X floatatom 483 170 5 0 0 0 - - -; +#X obj 443 145 pdp_intrusion; #X obj 648 106 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X obj 566 118 pdp_spigot; @@ -215,7 +215,7 @@ #X floatatom 845 629 5 0 0 0 - - -; #X obj 845 600 route pdp_drop; #X msg 568 588 framerate 10; -#X obj 225 93 dac~; +#X obj 246 93 dac~; #X floatatom 312 21 5 0 0 0 - - -; #X obj 754 432 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; @@ -248,6 +248,10 @@ #X obj 519 444 pdp_spigot; #X obj 518 467 pdp_charcoal; #X floatatom 613 468 5 0 0 0 - - -; +#X obj 45 82 pdp_scale 320 240; +#X msg 355 646 pos 0 0; +#X msg 418 645 dim 1024 768; +#X floatatom 197 93 5 0 0 0 - - -; #X connect 0 0 8 0; #X connect 1 0 9 0; #X connect 2 0 1 0; @@ -257,10 +261,11 @@ #X connect 6 0 8 1; #X connect 7 0 8 0; #X connect 8 0 9 0; -#X connect 9 0 16 0; -#X connect 9 3 169 0; -#X connect 9 4 169 1; -#X connect 10 0 16 0; +#X connect 9 0 199 0; +#X connect 9 3 202 0; +#X connect 9 4 169 0; +#X connect 9 5 169 1; +#X connect 10 0 199 0; #X connect 11 0 10 0; #X connect 12 0 11 0; #X connect 13 0 11 0; @@ -457,17 +462,17 @@ #X connect 183 0 182 1; #X connect 184 0 53 2; #X connect 185 0 189 0; -#X connect 185 0 190 0; #X connect 185 0 193 0; #X connect 186 0 185 1; #X connect 187 0 185 2; #X connect 188 0 193 0; #X connect 189 0 116 0; -#X connect 191 0 190 0; -#X connect 192 0 190 0; #X connect 194 0 193 0; #X connect 195 0 196 1; #X connect 196 0 122 0; #X connect 196 1 197 0; #X connect 197 0 122 0; #X connect 198 0 197 1; +#X connect 199 0 16 0; +#X connect 200 0 193 0; +#X connect 201 0 193 0; diff --git a/patches/pdp_charcoal.pd b/patches/pdp_charcoal.pd index f417506..f0aa9c1 100644 --- a/patches/pdp_charcoal.pd +++ b/patches/pdp_charcoal.pd @@ -1,8 +1,8 @@ -#N canvas 355 35 712 664 10; +#N canvas 376 20 712 664 10; #X obj 268 64 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 -1; #X msg 123 136 loop \$1; -#X obj 124 114 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 +#X obj 124 114 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 1 1; #X msg 370 44 open \$1; #X obj 369 20 openpanel; @@ -28,7 +28,7 @@ #X obj 549 443 route pdp_drop; #X floatatom 322 407 5 0 0 0 - - -; #X text 389 405 Blur factor; -#N canvas 346 16 870 675 edge_detect 0; +#N canvas 346 16 870 675 edge_detect 1; #X obj 343 530 pdp_mul; #X obj 132 421 inlet; #X obj 234 621 outlet; @@ -66,6 +66,20 @@ #X msg 47 179 10; #X msg 325 177 10; #X obj 234 584 pdp_add; +#X obj 492 416 pack f f f; +#X msg 349 407 hmask \$1 \$2 \$3; +#X floatatom 490 369 5 0 0 0 - - -; +#X floatatom 534 368 5 0 0 0 - - -; +#X floatatom 579 368 5 0 0 0 - - -; +#X obj 530 390 t b f; +#X obj 579 389 t b f; +#X msg 386 466 vmask \$1 \$2 \$3; +#X obj 520 495 pack f f f; +#X floatatom 518 448 5 0 0 0 - - -; +#X floatatom 562 447 5 0 0 0 - - -; +#X floatatom 607 447 5 0 0 0 - - -; +#X obj 558 469 t b f; +#X obj 607 468 t b f; #X connect 0 0 36 1; #X connect 1 0 3 0; #X connect 3 0 5 0; @@ -118,6 +132,26 @@ #X connect 35 0 22 0; #X connect 35 0 26 0; #X connect 36 0 2 0; +#X connect 37 0 38 0; +#X connect 38 0 4 0; +#X connect 38 0 5 0; +#X connect 39 0 37 0; +#X connect 40 0 42 0; +#X connect 41 0 43 0; +#X connect 42 0 37 0; +#X connect 42 1 37 1; +#X connect 43 0 37 0; +#X connect 43 1 37 2; +#X connect 44 0 4 0; +#X connect 44 0 5 0; +#X connect 45 0 44 0; +#X connect 46 0 45 0; +#X connect 47 0 49 0; +#X connect 48 0 50 0; +#X connect 49 0 45 0; +#X connect 49 1 45 1; +#X connect 50 0 45 0; +#X connect 50 1 45 2; #X restore 216 328 pd edge_detect; #X floatatom 333 330 5 0 0 0 - - -; #N canvas 0 0 450 300 blur 0; diff --git a/system/pidip.c b/system/pidip.c index 710dc51..90b7faa 100644 --- a/system/pidip.c +++ b/system/pidip.c @@ -1,5 +1,6 @@ #include #include "pdp.h" +#include "pidip_config.h" /* all symbols are C style */ @@ -46,8 +47,6 @@ extern "C" void pdp_cmap_setup(void); // void pdp_aa_setup(void); void pdp_ascii_setup(void); - void pdp_ffmpeg_tilde_setup(void); - void pdp_live_tilde_setup(void); void pdp_segsnd_tilde_setup(void); void pdp_noquark_setup(void); void pdp_juxta_setup(void); @@ -63,7 +62,17 @@ extern "C" void pdp_ocanvas_setup(void); void pdp_pen_setup(void); void pdp_shape_setup(void); + void pdp_spotlight_setup(void); +#ifdef HAVE_PIDIP_FFMPEG + void pdp_ffmpeg_tilde_setup(void); + void pdp_live_tilde_setup(void); +#endif + +#ifdef HAVE_PIDIP_MPEG4IP + void pdp_mp4live_tilde_setup(void); + void pdp_mp4player_tilde_setup(void); +#endif /* library setup routine */ void pidip_setup(void){ @@ -108,8 +117,6 @@ void pidip_setup(void){ pdp_cmap_setup(); // pdp_aa_setup(); pdp_ascii_setup(); - pdp_ffmpeg_tilde_setup(); - pdp_live_tilde_setup(); pdp_segsnd_tilde_setup(); pdp_noquark_setup(); pdp_juxta_setup(); @@ -125,7 +132,17 @@ void pidip_setup(void){ pdp_ocanvas_setup(); pdp_pen_setup(); pdp_shape_setup(); + pdp_spotlight_setup(); +#ifdef HAVE_PIDIP_FFMPEG + pdp_ffmpeg_tilde_setup(); + pdp_live_tilde_setup(); +#endif + +#ifdef HAVE_PIDIP_MPEG4IP + pdp_mp4live_tilde_setup(); + pdp_mp4player_tilde_setup(); +#endif } #ifdef __cplusplus -- cgit v1.2.1