aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorN.N. <sevyves@users.sourceforge.net>2004-11-14 22:52:23 +0000
committerN.N. <sevyves@users.sourceforge.net>2004-11-14 22:52:23 +0000
commitbf6d0609625714ed52acf19a007a378645de2faa (patch)
tree90043f233bffdd86898813e0fe7cb92582b8459a
parent5ad46a9a497ae0e6565b54aaefd4357eac6be0dd (diff)
PiDiP v 0.12.17
svn path=/trunk/externals/pidip/; revision=2272
-rw-r--r--CHANGES.LOG83
-rw-r--r--INSTALL20
-rw-r--r--Makefile18
-rw-r--r--Makefile.in4
-rw-r--r--acinclude.m42
-rw-r--r--aclocal.m42
-rwxr-xr-xconfigure234
-rw-r--r--configure.ac117
-rw-r--r--configure.in117
-rw-r--r--doc/help-pdp_ascii.pd32
-rw-r--r--doc/help-pdp_compose.pd73
-rw-r--r--doc/help-pdp_ctrack.pd10
-rw-r--r--doc/help-pdp_ffmpeg~.pd2
-rw-r--r--doc/help-pdp_form.pd14
-rw-r--r--doc/help-pdp_live~.pd8
-rw-r--r--doc/help-pdp_ocanvas.pd42
-rw-r--r--doc/help-pdp_pen.pd120
-rw-r--r--doc/help-pdp_streaming.pd10
-rw-r--r--doc/help-pdp_text.pd22
-rw-r--r--doc/help-pdp_yqt.pd2
-rw-r--r--doc/rs_pdp_live~.pd165
-rw-r--r--include/pdp_streaming.h2
-rw-r--r--modules/Makefile7
-rw-r--r--modules/Makefile.in7
-rw-r--r--modules/pdp_ascii.c1
-rw-r--r--modules/pdp_compose.c47
-rw-r--r--modules/pdp_ctrack.c4
-rw-r--r--modules/pdp_ffmpeg~.c42
-rw-r--r--modules/pdp_form.c18
-rw-r--r--modules/pdp_i.c49
-rw-r--r--modules/pdp_live~.c324
-rw-r--r--modules/pdp_o.c25
-rw-r--r--modules/pdp_ocanvas.c22
-rw-r--r--modules/pdp_pen.c22
-rw-r--r--modules/pdp_rec~.c5
-rw-r--r--modules/pdp_shape.c29
-rw-r--r--modules/pdp_text.c20
-rw-r--r--modules/pdp_underwatch.c7
-rw-r--r--modules/pdp_yqt.c5
-rw-r--r--patches/help_pdp-tatiana.pd910
-rw-r--r--patches/help_pdp_effects_rack.pd59
-rw-r--r--system/pidip.c20
42 files changed, 1776 insertions, 946 deletions
diff --git a/CHANGES.LOG b/CHANGES.LOG
index e369e49..d76102e 100644
--- a/CHANGES.LOG
+++ b/CHANGES.LOG
@@ -1,3 +1,38 @@
+0.12.17 ( codename No pasa nada )
+ added pdp_theorout~ : theora file recorder
+ fixed pdp_theorin~ : fixed buggy end of file detection
+ fixed pdp_theorin~ : now, it's able to read files without sound
+ added pdp_cropper : a video cropper for image compositing
+ ( see patch cutandpaste.pd )
+ added pdp_background : a simple background generator
+ modified pdp_ocanvas : added an alpha channel for each source
+ modified pdp_text, pdp_form, pdp_pen : added an alpha channel ( global )
+
+0.12.16 ( codename Fadaiat )
+ added pdp_theorin~ : threaded theora file reader
+ ( warning : requires theora, ogg & vorbis static libs )
+
+ modified pdp_live~ : added an autoplay option ( default = true )
+ modified pdp_live~ : made the files seekable
+ ( added an input for the frame number, works with ffmpeg >= 0.4.9 )
+ modified pdp_live~ : better disconnection mechanism
+ modified pdp_live~ : reworked on a/v synchronisation
+
+ fixed pdp_i/pdp_o : fixed huffman encoding and freezings
+ fixed pdp_i/pdp_o : fix communication between macs and pcs ( endianness problem )
+
+ added --with-ffmpeg=PATH and --with-mpeg4ip=PATH configure options
+ ( --enable-ffmpeg and --enable-mpeg4ip are dead )
+
+0.12.15 ( codename Technologia Del Sur )
+ added morphology patches : patches/morphology : opening, closing, thinning, thickening, skeletization
+ added morphology operator : distance transform
+ ( inspired by Paul Rosin, 91, http://www.cs.cf.ac.uk/User/Paul.Rosin/resources/sdt/ )
+ added morphology operators : erosion ( pdp_erode ), dilation ( pdp_dilate ), hit and miss ( pdp_hitandmiss )
+ added pdp_binary : transform an image to a binary image ( using yuv settings, a filter for morphology )
+ ( for all the theory on morphology, thanx to the excellent site : http://homepages.inf.ed.ac.uk/rbf/HIPR2 )
+ added pdp_disintegration : a new effect based on piksels summing and averaging
+
0.12.14 ( codename Naveen's Ethiopian Cafe )
added pdp_mp4player~ : a quicktime stream reader ( compiled against meg4ip v1.0, needs some testing )
fixed pdp_mp4live~ : fixed audio encoding
@@ -5,6 +40,7 @@
fixed pdp_canvas : fixed a huge memory leak ( reported by Ian Smith Heisters )
added colorgrid : a color picker written by Lluis Gomez i Bigorda ( http://www.artefacte.org/pd )
added help_pdp-tatiana.pd : a more simple to use help patch for effects, contribution from Tatiana de la O.
+
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 )
@@ -12,6 +48,7 @@
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
@@ -19,12 +56,14 @@
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
( it's an abstraction using basic pdp_objects )
fixed compilation problem with latest ffmpeg ( AVFMT_NOHEADER --> AVFMTCTX_NOHEADER )
commented pdp_aa : it introduces useless dependencies ( aalib ) and is not very good
added pdp_ocanvas : canvas with some overlay
+
0.12.10
fixed crashes and 'resize' bug in pdp_text
added pdp_xcanvas : pdp_canvas + pdp_xv in one ( for performances reasons )
@@ -33,74 +72,96 @@
added pdp_fcqt : fast quicktime reader ( same as pdp_fqt but frames are compressed )
added help patches for pdp_yqt, pdp_fqt and pdp_fcqt
adaptations for newer autoconfs
+
0.12.9
fixed pdp_ripple
added pdp_shape : a shape recognition object (based on color, similar to color tracker )
added "fill" in pdp_pen
( on request from ben )
+
0.12.8
added pdp_pen : a free hand drawing object
( on request from patrick/11h11.com )
+
0.12.7
added pdp_canvas : a canvas to display several video sources
+
0.12.6
fix conflict between pdp_text and pdp_imgloader ( and the likes using Imlib2 )
fix successive loading of images in pdp_imgloader
set help patches for all objects and install them in PD's doc folder ( compliant with 0.37 )
+
0.12.5
pdp_cache : hiding triangular zones from a video stream to let you do some collage
( see collage.pd patch )
pdp_imgloader : added "hide" method for triangles to let you do some collage
( see collage.pd patch )
pdp_transition : added "page" transitions
+
0.12.4
added pdp_imgsaver : save an image from the current video stream
pdp_transition : added "melt" and "blend" transitions
+
0.12.3
added pdp_imgloader : load an image and blend it with a video
added pdp_transition : some funky transitions, "circle", "wipe" and "random"
added pdp_lumafilt : lumosity filter, useful to isolate some objects
added pdp_smuck : same as pdp_transform ( mode 5 ) but setable, ported from veejay
+
0.12.2
Fixed problems with Image Magick includes
+
0.12.1
Added color components output in pdp_ctrack
+
0.12.0
Compatibility with PDP 0.12
+
0.11.3
Nicolas Lhommet added scroll parameter in pdp_text
+
0.11.2
added pdp_capture : capture a portion of screen : lets you import browser data, etc ....
fixed pdp_compose
+
0.11.1
added pdp_juxta : allow juxtaposition of frames
+
0.11.0
change some packet allocation policies to comply with PDP 0.11
no new object
+
0.10.1
added pdp_noquark object : moving object are clear, the background is noisy
added tolerance input in pdp_quark
+
0.10.0
added pdp_segsnd~ : produces sound from a segment of the video ( similar to pdp_scanxy~ )
binary compatible with pdp v.0.10
improved installation instructions
+
0.9.2
fixed disconnection phase in pdp_live~
+
0.9.1
remove synchronization proposed by martin pi : it lead to some deadlocks sometimes
+
0.9.0
fixed audio encoding/decoding in pdp_ffmpeg~/pdp_live~ ( which caused a lot of crashes )
add synchronization in pdp_live~ and other nice features ( thanks to martin pi )
made the audio decoding in pdp_live~ optional
add "set cursor" message in pdp_cmap, pdp_ctrack, pdp_compose
( used in conjonction with coordinates output of pdp_xv v0.9 )
+
0.8.4
added pdp_live~ : receive a video feed, at least from a ffmpeg server ( ffserver )
fixed resampling in pdp_ffmpeg~ : resizing to a bigger image used to crash PD
( now, you can't resize to a bigger scale, blame it on libavcodec )
+
0.8.3
pdp_rec became pdp_rec~ : it can record audio now
fix crash in pdp_ascii, pdp_nervous, pdp_quark
+
0.8.2
added pdp_ffmpeg : stream to a ffmpeg server with possibly several formats ( mpeg, asf, ... )
NOTE : although there is an experimental audio streaming possibility,
@@ -108,73 +169,95 @@
added a ratio action in pdp_ascii
added a planes number action in pdp_quark and pdp_nervous ( plays on speed of switching )
fixed index bug in pdp_ctrack, pdp_cmap
+
0.8.1
fixed colors in pdp_warhol
+
0.8.0
added pdp_ascii : rendering of videos in ASCII art using character maps
+
0.7.7
added pdp_aa : rendering of videos in ASCII art using aalib
+
0.7.6
added pdp_cmap : color mapper ( thanx to liz for the suggestion )
added actions in color tracker ( steady mode, cursor on/off, frame on/off ), generally improved
fixed colors in pdp_spiral, pdp_dice
+
0.7.5
added pdp_form : addition of geometric forms
added pdp_compose : color-based video compositor ( thanx to liz for the suggestion )
added actions in pdp_text ( rotations, font, resize, dither, blend )
fixed colors in pdp_transform, pdp_warp
fix install stage
+
0.7.4
added pdp_text : text addition on videos ( requires imlib2 )
use the automake/autoconf system
optimized streaming again (pdp_i/pdp_o)
fixed colors in pdp_puzzle
+
0.7.3
fixed streaming objects pdp_i/pdp_o
added "smoothing" and "framerate" controls to act on the bandwidth
+
0.7.2
added shagadelic, dice and puzzle from effecTV
modified objects to use PDP queue
+
0.7.1
added cycle and transform : first effetTV objects using PDP queue
( i know i changed my mind )
all other objects must be modified to use PDP queue
+
0.7.0
compatibility with PDP 0.7
+
0.6.2
added pdp_ctrack : color tracker : lets you follow an object
+
0.6.1
added pdp_i/pdp_o : PDP packets streaming objects using bz2
added pdp_mgrid : motion grid detects movement within a grid
+
0.6.0
added pdp_rec : a video recording object
fixed a bug in pdp_edge
incremented PDP release number : it's now 0.6
set proper credits for each effecTV plugin
+
0.5.8
added pdp_spigot : a video signal routing utility
+
0.5.7
added nervous and quark objects
these will be the last effecTV objects added
some effectv have been left aside ( fireTV, ... )
because they are just clones of some other effects
or because i simply wasn't interested in porting them
+
0.5.6
added radioactiv and warhol objects
+
0.5.5
added edge and spiral objects
happy new year 2003
+
0.5.4
renamed to PiDiP
added rev and mosaic objects
+
0.5.3
added parameter "increment" to ripple
fix "threshold" in ripple
added warp and mosaic object
+
0.5.2
remove buggy support of GREY packets
+
0.5.1
added aging and ripple effects
+
0.5
initial release
it is called 0.5 because it should be used with PDP 0.5
diff --git a/INSTALL b/INSTALL
index 6f4c601..3e51fcf 100644
--- a/INSTALL
+++ b/INSTALL
@@ -5,33 +5,31 @@ 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
+***** theora : http://www.theora.org/files/
+ ----> watchout !! you will need the static libs ( theora.a, ogg.a, vorbis.a )
***** Image Magick : http://www.imagemagick.org
----> watchout !! configure with --enable-shared
OPTIONALLY ::
=============
***** ffmpeg : http://ffmpeg.sourceforge.net/cvs
-( --enable-ffmpeg ) ----> watchout, it requires the cvs snapshot !
+( --with-ffmpeg=PATH ) ----> watchout, it requires the cvs snapshot !
+ don't forget to activate mp3 and vorbis support in ffmpeg :
./configure --enable-mp3lame --enable-vorbis
OR
***** mpeg4ip : http://mpeg4ip.sourceforge.net/ ( download mpeg4ip v1.0 )
-( --enable-mpeg4ip )
+( --with-mpeg4ip=PATH )
-b/ fix PD, PDP and FFMPEG/MPEG4IP paths in configure.ac
+b/ ./configure --with-pd=PATH --with-pdp=PATH [--with-ffmpeg=PATH] OR [--with-mpeg4ip=PATH] ( not both )
-c/ autoconf
+c/ make clean
-d/ ./configure [--enable-ffmpeg] OR [--enable-mpeg4ip] ( not both )
+d/ make
-e/ make clean
+e/ as root, make install
-f/ make
-
-g/ as root, make install
-
-h/ modify your pd start-up script :
+f/ modify your pd start-up script :
pidip is a library, it should be loaded
with the "-lib <path>/pidip" command line option
diff --git a/Makefile b/Makefile
index 7c8c670..fa0eac9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,15 @@
PD_DIR = /usr/local/pd
PDP_DIR = /usr/local/pd/pdp
-FFMPEG_SOURCE_DIR = /SOURCES/ffmpeg
+FFMPEG_SOURCE_DIR = /SOURCES/ffmpeg-cvs-2003-03-04
-PDP_PIDIP_LIBS = -lbz2 -lz -ldl -lmp3lame -logg -lvorbis -lvorbisenc /SOURCES/ffmpeg/libavformat/libavformat.a /SOURCES/ffmpeg/libavcodec/libavcodec.a
+PDP_PIDIP_LIBS = -lbz2 -lz -ldl -lmp3lame -logg -lvorbis -lvorbisenc /SOURCES/ffmpeg-cvs-2003-03-04/libavformat/libavformat.a /SOURCES/ffmpeg-cvs-2003-03-04/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_INCLUDES = -I/usr/local/pd/src -I. -I/usr/local/pd/pdp/include -I../include -I../charmaps -I/SOURCES/ffmpeg/libavcodec -I/SOURCES/ffmpeg/libavformat
-PDP_PIDIP_VERSION = 0.12.14
+IMLIB_LIBS = -L/usr/local/lib -lImlib2 -lfreetype -lz -lm -ldl -lXext -lXext -lX11 -L/usr/X11R6/lib
+MAGICK_CFLAGS = -I/usr/X11R6/include -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -Wall -pthread
+MAGICK_LIBS = -L/usr/X11R6/lib -lMagick -lMagick -ltiff -lfreetype -ljpeg -lpng -ldpstk -ldps -lXext -lXt -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lpthread -lm -lpthread -L/usr/lib -L/usr/X11R6/lib -lfreetype -lz -L/usr/lib
+THEORA_LIBS = /usr/lib/libtheora.a /usr/lib/libogg.a /usr/lib/libvorbis.a /usr/lib/libvorbisenc.a
+PDP_PIDIP_INCLUDES = -I/usr/local/pd/src -I. -I/usr/local/pd/pdp/include -I../include -I../charmaps -I/SOURCES/ffmpeg-cvs-2003-03-04/libavcodec -I/SOURCES/ffmpeg-cvs-2003-03-04/libavformat
+PDP_PIDIP_VERSION = 0.12.17
MPEG4IP_CFLAGS =
PDP_PIDIP_DISTRO = /mnt/c/ydegoyon.free.fr/pidip-$(PDP_PIDIP_VERSION)
@@ -35,7 +36,7 @@ pdp_pidip_all:
pidip.pd_linux: pdp_pidip_all
rm -f pidip.pd_linux
- g++ -export_dynamic -shared -o pidip.pd_linux modules/*.o system/*.o $(PDP_PIDIP_LIBS) $(IMLIB_LIBS) $(MAGICK_LIBS)
+ g++ -export_dynamic -shared -o pidip.pd_linux modules/*.o system/*.o $(THEORA_LIBS) $(PDP_PIDIP_LIBS) $(IMLIB_LIBS) $(MAGICK_LIBS)
strip --strip-unneeded pidip.pd_linux
clean:
@@ -43,6 +44,7 @@ clean:
rm -f pidip.pd_linux
install:
+ if test ! -d /usr/X11R6/lib/X11/fonts/TTF; then mkdir /usr/X11R6/lib/X11/fonts/TTF; fi
cp fonts/* /usr/X11R6/lib/X11/fonts/TTF
cp -f --remove-destination doc/* $(PD_DIR)/doc/5.reference
diff --git a/Makefile.in b/Makefile.in
index dfbd4c5..0370aab 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -7,6 +7,7 @@ IMLIB_CFLAGS = @IMLIB_CFLAGS@
IMLIB_LIBS = @IMLIB_LIBS@
MAGICK_CFLAGS = @MAGICK_CFLAGS@
MAGICK_LIBS = @MAGICK_LIBS@
+THEORA_LIBS = @THEORA_LIBS@
PDP_PIDIP_INCLUDES = @PDP_PIDIP_INCLUDES@
PDP_PIDIP_VERSION = @PDP_PIDIP_VERSION@
MPEG4IP_CFLAGS = @MPEG4IP_CFLAGS@
@@ -35,7 +36,7 @@ pdp_pidip_all:
pidip.pd_linux: pdp_pidip_all
rm -f pidip.pd_linux
- g++ -export_dynamic -shared -o pidip.pd_linux modules/*.o system/*.o $(PDP_PIDIP_LIBS) $(IMLIB_LIBS) $(MAGICK_LIBS)
+ g++ -export_dynamic -shared -o pidip.pd_linux modules/*.o system/*.o $(THEORA_LIBS) $(PDP_PIDIP_LIBS) $(IMLIB_LIBS) $(MAGICK_LIBS)
strip --strip-unneeded pidip.pd_linux
clean:
@@ -43,6 +44,7 @@ clean:
rm -f pidip.pd_linux
install:
+ if test ! -d /usr/X11R6/lib/X11/fonts/TTF; then mkdir /usr/X11R6/lib/X11/fonts/TTF; fi
cp fonts/* /usr/X11R6/lib/X11/fonts/TTF
cp -f --remove-destination doc/* $(PD_DIR)/doc/5.reference
diff --git a/acinclude.m4 b/acinclude.m4
index bdce5c2..2eaf6f0 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 <gusl@cse.unsw.edu.au>
-dnl @version $Id: acinclude.m4,v 1.7 2004-05-18 00:59:44 sevyves Exp $
+dnl @version $Id: acinclude.m4,v 1.8 2004-11-14 22:52:19 sevyves Exp $
AC_DEFUN(AC_PATH_GENERIC,
[dnl
diff --git a/aclocal.m4 b/aclocal.m4
index 116cada..439dd2b 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 <gusl@cse.unsw.edu.au>
-dnl @version $Id: aclocal.m4,v 1.7 2004-05-18 00:59:44 sevyves Exp $
+dnl @version $Id: aclocal.m4,v 1.8 2004-11-14 22:52:19 sevyves Exp $
AC_DEFUN(AC_PATH_GENERIC,
[dnl
diff --git a/configure b/configure
index 58d1c98..9058c00 100755
--- a/configure
+++ b/configure
@@ -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 MPEG4IP_SOURCE_DIR MPEG4IP_CFLAGS PDP_STREAMING_OBJECTS PDP_PIDIP_LIBS PDP_PIDIP_INCLUDES 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 THEORA_LIBS 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,14 +802,16 @@ 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
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pd=PATH pd source tree
+ --with-pdp=PATH pdp source tree
+ --with-ffmpeg=PATH ffmpeg source tree
+ --with-mpeg4ip=PATH mpeg4ip source tree
--with-dmalloc use dmalloc, as in
ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz
--with-imlib2-prefix=PFX Prefix where imlib2 is installed (optional)
@@ -1264,27 +1266,96 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
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"
+PDP_PIDIP_VERSION="0.12.17"
PD_DIR=/usr/local/pd
PDP_DIR=/usr/local/pd/pdp
FFMPEG_SOURCE_DIR=/SOURCES/ffmpeg
MPEG4IP_SOURCE_DIR=/SOURCES/mpeg4ip
PDP_STREAMING_OBJECTS=
+enable_ffmpeg=no
+enable_mpeg4ip=no
+
+
+# Check whether --with-pdsources or --without-pdsources was given.
+if test "${with_pdsources+set}" = set; then
+ withval="$with_pdsources"
+
+fi;
+if ! test -z "${with_pd}"
+then
+ pd_tree="`cd ${with_pd} 2>/dev/null && pwd`"
+ if test -z "${pd_tree}"
+ then
+ { { echo "$as_me:$LINENO: error: pd sources not found in ${with_pd}" >&5
+echo "$as_me: error: pd sources not found in ${with_pd}" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ PD_DIR=${pd_tree}
+ fi
+fi
+
+
+# Check whether --with-pdpsources or --without-pdpsources was given.
+if test "${with_pdpsources+set}" = set; then
+ withval="$with_pdpsources"
+
+fi;
+if ! test -z "${with_pdp}"
+then
+ pdp_tree="`cd ${with_pdp} 2>/dev/null && pwd`"
+ if test -z "${pdp_tree}"
+ then
+ { { echo "$as_me:$LINENO: error: pdp sources not found in ${with_pdp}" >&5
+echo "$as_me: error: pdp sources not found in ${with_pdp}" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ PDP_DIR=${pdp_tree}
+ fi
+fi
+
+
+# Check whether --with-ffmpeg or --without-ffmpeg was given.
+if test "${with_ffmpeg+set}" = set; then
+ withval="$with_ffmpeg"
+
+fi;
+if ! test -z "${with_ffmpeg}"
+then
+ ffmpeg_tree="`cd ${with_ffmpeg} 2>/dev/null && pwd`"
+ if test -z "${ffmpeg_tree}"
+ then
+ { { echo "$as_me:$LINENO: error: ffmpeg sources not found in ${with_ffmpeg}" >&5
+echo "$as_me: error: ffmpeg sources not found in ${with_ffmpeg}" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ FFMPEG_SOURCE_DIR=${ffmpeg_tree}
+ enable_ffmpeg=yes
+ fi
+fi
+
+
+# Check whether --with-mpeg4ip or --without-mpeg4ip was given.
+if test "${with_mpeg4ip+set}" = set; then
+ withval="$with_mpeg4ip"
+
+fi;
+if ! test -z "${with_mpeg4ip}"
+then
+ mpeg4ip_tree="`cd ${with_mpeg4ip} 2>/dev/null && pwd`"
+ if test -z "${mpeg4ip_tree}"
+ then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ { { echo "$as_me:$LINENO: error: mpeg4ip sources not found in ${with_mpeg4ip}" >&5
+echo "$as_me: error: mpeg4ip sources not found in ${with_mpeg4ip}" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ MPEG4IP_SOURCE_DIR=${mpeg4ip_tree}
+ enable_mpeg4ip=yes
+ fi
+fi
+
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 -I../charmaps"
@@ -4561,6 +4632,84 @@ echo "$as_me: error: streaming requires vorbis encoder library!!" >&2;}
fi
+echo "$as_me:$LINENO: checking for theora_encode_init in -ltheora" >&5
+echo $ECHO_N "checking for theora_encode_init in -ltheora... $ECHO_C" >&6
+if test "${ac_cv_lib_theora_theora_encode_init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltheora -lm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char theora_encode_init ();
+int
+main ()
+{
+theora_encode_init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_theora_theora_encode_init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_theora_theora_encode_init=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_theora_theora_encode_init" >&5
+echo "${ECHO_T}$ac_cv_lib_theora_theora_encode_init" >&6
+if test $ac_cv_lib_theora_theora_encode_init = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBTHEORA 1
+_ACEOF
+
+ LIBS="-ltheora $LIBS"
+
+else
+ { { echo "$as_me:$LINENO: error: theora library needed! sorry..." >&5
+echo "$as_me: error: theora library needed! sorry..." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
MAGICK_LIBS="-L/usr/X11R6/lib -lMagick `Magick-config --libs` `Magick-config --ldflags`"
@@ -4568,13 +4717,49 @@ MAGICK_CFLAGS="-I/usr/X11R6/include `Magick-config --cflags` "
+THEORA_LIBS=""
+if test -f /usr/lib/libtheora.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/lib/libtheora.a"
+fi
+if test -f /usr/local/lib/libtheora.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/local/lib/libtheora.a"
+fi
+if test -f /usr/lib/libogg.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/lib/libogg.a"
+fi
+if test -f /usr/local/lib/libogg.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/local/lib/libogg.a"
+fi
+if test -f /usr/lib/libvorbis.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/lib/libvorbis.a"
+fi
+if test -f /usr/local/lib/libvorbis.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/local/lib/libvorbis.a"
+fi
+if test -f /usr/lib/libvorbisenc.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/lib/libvorbisenc.a"
+fi
+if test -f /usr/local/lib/libvorbisenc.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/local/lib/libvorbisenc.a"
+fi
+
+
+
echo -n "looking for pd sources (required) ... "
if test -f $PD_DIR/src/m_pd.h
then
echo "ok."
else
- echo "pd source tree not found... install it, fix the path in configure.ac and run autoconf"
+ echo "pd source tree not found... install it and use the --with-pd=<path> configuration option."
exit -1
fi
@@ -4584,7 +4769,7 @@ then
echo "ok."
else
- echo "pdp source tree not found... install it, fix the path in configure.ac and run autoconf"
+ echo "pdp source tree not found... install it and use the --with-pdp=<path> configuration option."
exit -1
fi
@@ -4594,7 +4779,7 @@ then
if test -f $FFMPEG_SOURCE_DIR/libavformat/avformat.h
then
- PDP_STREAMING_OBJECTS="$PDP_STREAMING_OBJECTS pdp_live~.o pdp_ffmpeg~.o"
+ PDP_STREAMING_OBJECTS="pdp_live~.o pdp_ffmpeg~.o"
cat >>confdefs.h <<\_ACEOF
#define HAVE_PIDIP_FFMPEG 1
@@ -4604,7 +4789,7 @@ _ACEOF
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"
+ echo "ffmpeg source tree not found... install it and use the --with-ffmpeg=<path> configuration option."
exit -1
fi
fi
@@ -4615,7 +4800,7 @@ then
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"
+ 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
@@ -4627,7 +4812,7 @@ _ACEOF
echo "ok."
else
- echo "mpeg4ip source tree not found... install it, fix the path in configure.ac and run autoconf"
+ echo "mpeg4ip source tree not found... install it and use the --with-mpeg4ip=<path> configuration option."
exit -1
fi
fi
@@ -5275,6 +5460,7 @@ s,@IMLIB2_LIBS@,$IMLIB2_LIBS,;t t
s,@PDP_PIDIP_VERSION@,$PDP_PIDIP_VERSION,;t t
s,@MAGICK_LIBS@,$MAGICK_LIBS,;t t
s,@MAGICK_CFLAGS@,$MAGICK_CFLAGS,;t t
+s,@THEORA_LIBS@,$THEORA_LIBS,;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
diff --git a/configure.ac b/configure.ac
index 759dd2a..9bf0afb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,19 +2,71 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT
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"
+
+PDP_PIDIP_VERSION="0.12.17"
PD_DIR=/usr/local/pd
PDP_DIR=/usr/local/pd/pdp
FFMPEG_SOURCE_DIR=/SOURCES/ffmpeg
MPEG4IP_SOURCE_DIR=/SOURCES/mpeg4ip
PDP_STREAMING_OBJECTS=
+enable_ffmpeg=no
+enable_mpeg4ip=no
+
+AC_ARG_WITH(pdsources, [ --with-pd=PATH pd source tree])
+if ! test -z "${with_pd}"
+then
+ pd_tree="`cd ${with_pd} 2>/dev/null && pwd`"
+ if test -z "${pd_tree}"
+ then
+ dnl The given directory can't be found
+ AC_MSG_ERROR([pd sources not found in ${with_pd}])
+ else
+ PD_DIR=${pd_tree}
+ fi
+fi
+
+AC_ARG_WITH(pdpsources, [ --with-pdp=PATH pdp source tree])
+if ! test -z "${with_pdp}"
+then
+ pdp_tree="`cd ${with_pdp} 2>/dev/null && pwd`"
+ if test -z "${pdp_tree}"
+ then
+ dnl The given directory can't be found
+ AC_MSG_ERROR([pdp sources not found in ${with_pdp}])
+ else
+ PDP_DIR=${pdp_tree}
+ fi
+fi
+
+AC_ARG_WITH(ffmpeg, [ --with-ffmpeg=PATH ffmpeg source tree])
+if ! test -z "${with_ffmpeg}"
+then
+ ffmpeg_tree="`cd ${with_ffmpeg} 2>/dev/null && pwd`"
+ if test -z "${ffmpeg_tree}"
+ then
+ dnl The given directory can't be found
+ AC_MSG_ERROR([ffmpeg sources not found in ${with_ffmpeg}])
+ else
+ FFMPEG_SOURCE_DIR=${ffmpeg_tree}
+ enable_ffmpeg=yes
+ fi
+fi
+
+AC_ARG_WITH(mpeg4ip, [ --with-mpeg4ip=PATH mpeg4ip source tree])
+if ! test -z "${with_mpeg4ip}"
+then
+ mpeg4ip_tree="`cd ${with_mpeg4ip} 2>/dev/null && pwd`"
+ if test -z "${mpeg4ip_tree}"
+ then
+ dnl The given directory can't be found
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([mpeg4ip sources not found in ${with_mpeg4ip}])
+ else
+ MPEG4IP_SOURCE_DIR=${mpeg4ip_tree}
+ enable_mpeg4ip=yes
+ fi
+fi
+
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 -I../charmaps"
@@ -50,6 +102,7 @@ AC_CHECK_LIB(mp3lame, InitMP3, , AC_MSG_ERROR(streaming requires lame library!!)
AC_CHECK_LIB(ogg, ogg_stream_init, , AC_MSG_ERROR(streaming requires ogg library!!), -lm)
AC_CHECK_LIB(vorbis, vorbis_analysis_init, , AC_MSG_ERROR(streaming requires vorbis library!!), -lm)
AC_CHECK_LIB(vorbisenc, vorbis_encode_setup_init, , AC_MSG_ERROR(streaming requires vorbis encoder library!!), -lm)
+AC_CHECK_LIB(theora, theora_encode_init, , AC_MSG_ERROR(theora library needed! sorry...), -lm)
AC_SUBST(PDP_PIDIP_VERSION)
@@ -58,13 +111,49 @@ MAGICK_CFLAGS="-I/usr/X11R6/include `Magick-config --cflags` "
AC_SUBST(MAGICK_LIBS)
AC_SUBST(MAGICK_CFLAGS)
+THEORA_LIBS=""
+if test -f /usr/lib/libtheora.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/lib/libtheora.a"
+fi
+if test -f /usr/local/lib/libtheora.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/local/lib/libtheora.a"
+fi
+if test -f /usr/lib/libogg.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/lib/libogg.a"
+fi
+if test -f /usr/local/lib/libogg.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/local/lib/libogg.a"
+fi
+if test -f /usr/lib/libvorbis.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/lib/libvorbis.a"
+fi
+if test -f /usr/local/lib/libvorbis.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/local/lib/libvorbis.a"
+fi
+if test -f /usr/lib/libvorbisenc.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/lib/libvorbisenc.a"
+fi
+if test -f /usr/local/lib/libvorbisenc.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/local/lib/libvorbisenc.a"
+fi
+
+AC_SUBST(THEORA_LIBS)
+
echo -n "looking for pd sources (required) ... "
if test -f $PD_DIR/src/m_pd.h
then
AC_SUBST(PD_DIR)
echo "ok."
else
- echo "pd source tree not found... install it, fix the path in configure.ac and run autoconf"
+ echo "pd source tree not found... install it and use the --with-pd=<path> configuration option."
exit -1
fi
@@ -74,7 +163,7 @@ then
AC_SUBST(PDP_DIR)
echo "ok."
else
- echo "pdp source tree not found... install it, fix the path in configure.ac and run autoconf"
+ echo "pdp source tree not found... install it and use the --with-pdp=<path> configuration option."
exit -1
fi
@@ -84,13 +173,13 @@ then
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"
+ 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"
+ echo "ffmpeg source tree not found... install it and use the --with-ffmpeg=<path> configuration option."
exit -1
fi
fi
@@ -101,7 +190,7 @@ then
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"
+ 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"
@@ -109,7 +198,7 @@ then
AC_SUBST(MPEG4IP_CFLAGS)
echo "ok."
else
- echo "mpeg4ip source tree not found... install it, fix the path in configure.ac and run autoconf"
+ echo "mpeg4ip source tree not found... install it and use the --with-mpeg4ip=<path> configuration option."
exit -1
fi
fi
diff --git a/configure.in b/configure.in
index 759dd2a..9bf0afb 100644
--- a/configure.in
+++ b/configure.in
@@ -2,19 +2,71 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT
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"
+
+PDP_PIDIP_VERSION="0.12.17"
PD_DIR=/usr/local/pd
PDP_DIR=/usr/local/pd/pdp
FFMPEG_SOURCE_DIR=/SOURCES/ffmpeg
MPEG4IP_SOURCE_DIR=/SOURCES/mpeg4ip
PDP_STREAMING_OBJECTS=
+enable_ffmpeg=no
+enable_mpeg4ip=no
+
+AC_ARG_WITH(pdsources, [ --with-pd=PATH pd source tree])
+if ! test -z "${with_pd}"
+then
+ pd_tree="`cd ${with_pd} 2>/dev/null && pwd`"
+ if test -z "${pd_tree}"
+ then
+ dnl The given directory can't be found
+ AC_MSG_ERROR([pd sources not found in ${with_pd}])
+ else
+ PD_DIR=${pd_tree}
+ fi
+fi
+
+AC_ARG_WITH(pdpsources, [ --with-pdp=PATH pdp source tree])
+if ! test -z "${with_pdp}"
+then
+ pdp_tree="`cd ${with_pdp} 2>/dev/null && pwd`"
+ if test -z "${pdp_tree}"
+ then
+ dnl The given directory can't be found
+ AC_MSG_ERROR([pdp sources not found in ${with_pdp}])
+ else
+ PDP_DIR=${pdp_tree}
+ fi
+fi
+
+AC_ARG_WITH(ffmpeg, [ --with-ffmpeg=PATH ffmpeg source tree])
+if ! test -z "${with_ffmpeg}"
+then
+ ffmpeg_tree="`cd ${with_ffmpeg} 2>/dev/null && pwd`"
+ if test -z "${ffmpeg_tree}"
+ then
+ dnl The given directory can't be found
+ AC_MSG_ERROR([ffmpeg sources not found in ${with_ffmpeg}])
+ else
+ FFMPEG_SOURCE_DIR=${ffmpeg_tree}
+ enable_ffmpeg=yes
+ fi
+fi
+
+AC_ARG_WITH(mpeg4ip, [ --with-mpeg4ip=PATH mpeg4ip source tree])
+if ! test -z "${with_mpeg4ip}"
+then
+ mpeg4ip_tree="`cd ${with_mpeg4ip} 2>/dev/null && pwd`"
+ if test -z "${mpeg4ip_tree}"
+ then
+ dnl The given directory can't be found
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([mpeg4ip sources not found in ${with_mpeg4ip}])
+ else
+ MPEG4IP_SOURCE_DIR=${mpeg4ip_tree}
+ enable_mpeg4ip=yes
+ fi
+fi
+
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 -I../charmaps"
@@ -50,6 +102,7 @@ AC_CHECK_LIB(mp3lame, InitMP3, , AC_MSG_ERROR(streaming requires lame library!!)
AC_CHECK_LIB(ogg, ogg_stream_init, , AC_MSG_ERROR(streaming requires ogg library!!), -lm)
AC_CHECK_LIB(vorbis, vorbis_analysis_init, , AC_MSG_ERROR(streaming requires vorbis library!!), -lm)
AC_CHECK_LIB(vorbisenc, vorbis_encode_setup_init, , AC_MSG_ERROR(streaming requires vorbis encoder library!!), -lm)
+AC_CHECK_LIB(theora, theora_encode_init, , AC_MSG_ERROR(theora library needed! sorry...), -lm)
AC_SUBST(PDP_PIDIP_VERSION)
@@ -58,13 +111,49 @@ MAGICK_CFLAGS="-I/usr/X11R6/include `Magick-config --cflags` "
AC_SUBST(MAGICK_LIBS)
AC_SUBST(MAGICK_CFLAGS)
+THEORA_LIBS=""
+if test -f /usr/lib/libtheora.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/lib/libtheora.a"
+fi
+if test -f /usr/local/lib/libtheora.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/local/lib/libtheora.a"
+fi
+if test -f /usr/lib/libogg.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/lib/libogg.a"
+fi
+if test -f /usr/local/lib/libogg.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/local/lib/libogg.a"
+fi
+if test -f /usr/lib/libvorbis.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/lib/libvorbis.a"
+fi
+if test -f /usr/local/lib/libvorbis.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/local/lib/libvorbis.a"
+fi
+if test -f /usr/lib/libvorbisenc.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/lib/libvorbisenc.a"
+fi
+if test -f /usr/local/lib/libvorbisenc.a
+then
+ THEORA_LIBS="$THEORA_LIBS /usr/local/lib/libvorbisenc.a"
+fi
+
+AC_SUBST(THEORA_LIBS)
+
echo -n "looking for pd sources (required) ... "
if test -f $PD_DIR/src/m_pd.h
then
AC_SUBST(PD_DIR)
echo "ok."
else
- echo "pd source tree not found... install it, fix the path in configure.ac and run autoconf"
+ echo "pd source tree not found... install it and use the --with-pd=<path> configuration option."
exit -1
fi
@@ -74,7 +163,7 @@ then
AC_SUBST(PDP_DIR)
echo "ok."
else
- echo "pdp source tree not found... install it, fix the path in configure.ac and run autoconf"
+ echo "pdp source tree not found... install it and use the --with-pdp=<path> configuration option."
exit -1
fi
@@ -84,13 +173,13 @@ then
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"
+ 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"
+ echo "ffmpeg source tree not found... install it and use the --with-ffmpeg=<path> configuration option."
exit -1
fi
fi
@@ -101,7 +190,7 @@ then
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"
+ 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"
@@ -109,7 +198,7 @@ then
AC_SUBST(MPEG4IP_CFLAGS)
echo "ok."
else
- echo "mpeg4ip source tree not found... install it, fix the path in configure.ac and run autoconf"
+ echo "mpeg4ip source tree not found... install it and use the --with-mpeg4ip=<path> configuration option."
exit -1
fi
fi
diff --git a/doc/help-pdp_ascii.pd b/doc/help-pdp_ascii.pd
index d678c46..120ea20 100644
--- a/doc/help-pdp_ascii.pd
+++ b/doc/help-pdp_ascii.pd
@@ -1,8 +1,8 @@
-#N canvas 84 12 763 664 10;
+#N canvas 368 56 763 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 1
+#X obj 124 114 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0
1;
#X msg 370 44 open \$1;
#X obj 369 20 openpanel;
@@ -33,7 +33,6 @@
#X msg 302 372 brightness \$1;
#X floatatom 404 373 5 0 0 0 - - -;
#X floatatom 302 398 5 0 0 0 - - -;
-#X obj 191 444 pdp_xv;
#X obj 366 300 openpanel;
#X obj 438 301 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
@@ -45,7 +44,8 @@
#X text 393 347 Activate/suppress colors;
#X text 462 300 Load a characters map;
#X obj 346 203 pdp_v4l;
-#X obj 95 307 pdp_scale 800 600;
+#X obj 95 307 pdp_scale 600 480;
+#X obj 191 444 pdp_xv;
#X connect 0 0 9 0;
#X connect 1 0 14 0;
#X connect 2 0 1 0;
@@ -56,23 +56,23 @@
#X connect 7 0 9 0;
#X connect 8 0 6 0;
#X connect 9 0 14 0;
-#X connect 10 0 37 0;
+#X connect 10 0 36 0;
#X connect 11 0 10 0;
#X connect 12 0 10 0;
-#X connect 13 0 37 0;
-#X connect 14 0 38 0;
+#X connect 13 0 36 0;
+#X connect 14 0 37 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 22 0 32 0;
+#X connect 22 0 31 0;
#X connect 23 0 22 0;
-#X connect 24 0 32 0;
+#X connect 24 0 31 0;
#X connect 25 0 24 0;
-#X connect 26 0 32 1;
-#X connect 28 0 30 0;
-#X connect 29 0 28 0;
-#X connect 30 0 32 0;
-#X connect 32 0 27 0;
-#X connect 37 0 38 0;
-#X connect 38 0 32 0;
+#X connect 26 0 31 1;
+#X connect 27 0 29 0;
+#X connect 28 0 27 0;
+#X connect 29 0 31 0;
+#X connect 31 0 38 0;
+#X connect 36 0 37 0;
+#X connect 37 0 31 0;
diff --git a/doc/help-pdp_compose.pd b/doc/help-pdp_compose.pd
index 4c4e8f7..2404bff 100644
--- a/doc/help-pdp_compose.pd
+++ b/doc/help-pdp_compose.pd
@@ -3,7 +3,7 @@
#X obj 100 167 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
-1;
#X msg 54 201 loop \$1;
-#X obj 55 179 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 1
+#X obj 55 179 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 1 1
;
#X msg 39 146 open \$1;
#X obj 38 122 openpanel;
@@ -12,20 +12,20 @@
#X msg 123 144 stop;
#X obj 121 168 metro 70;
#X obj 116 200 pdp_yqt;
-#X floatatom 244 273 5 0 0;
-#X floatatom 253 294 5 0 0;
-#X floatatom 270 315 5 0 0;
-#X floatatom 288 339 5 0 0;
+#X floatatom 244 273 5 0 0 0 - - -;
+#X floatatom 253 294 5 0 0 0 - - -;
+#X floatatom 270 315 5 0 0 0 - - -;
+#X floatatom 288 339 5 0 0 0 - - -;
#X text 269 614 written by Yves Degoyon ( ydegoyon@free.fr );
#X text 290 273 R component;
#X text 298 293 G component;
#X text 315 314 B component;
-#X floatatom 299 360 5 0 0;
+#X floatatom 299 360 5 0 0 0 - - -;
#X text 336 338 X coordinate of cursor ( pick );
#X text 347 359 Y coordinate of cursor ( pick );
#X msg 14 443 pick;
#X text 11 422 Pick up the color;
-#X floatatom 309 380 5 0 0;
+#X floatatom 309 380 5 0 0 0 - - -;
#X text 356 380 Tolerance ( default = 50 );
#X text 269 583 pdp_compose : video compositor;
#X text 269 599 change all pixels of a given color by a second video
@@ -48,12 +48,12 @@ source;
1;
#X obj 589 507 pdp_control;
#X msg 589 480 thread \$1;
-#X floatatom 589 568 5 0 0;
+#X floatatom 589 568 5 0 0 0 - - -;
#X obj 589 539 route pdp_drop;
#X obj 97 305 pdp_form ---------;
#X msg 116 246 ellipse 69 124 59 78;
-#X floatatom 130 274 5 0 0;
-#X floatatom 176 274 5 0 0;
+#X floatatom 130 274 5 0 0 0 - - -;
+#X floatatom 176 274 5 0 0 0 - - -;
#X msg 317 410 luminosity \$1;
#X obj 419 411 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
@@ -62,7 +62,6 @@ source;
#X obj 362 524 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
-1;
#X msg 322 523 stop;
-#X text 269 628 idea suggested by liz;
#X obj 165 466 pdp_compose ----;
#X obj 394 132 pdp_v4l;
#X obj 403 101 metro 70;
@@ -71,7 +70,7 @@ source;
#X msg 405 68 stop;
#X msg 490 99 open /dev/video;
#X text 471 67 Live;
-#X floatatom 514 66 5 0 0;
+#X floatatom 514 66 5 0 0 0 - - -;
#X obj 401 437 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X msg 325 436 cursor \$1;
@@ -82,7 +81,8 @@ source;
#X msg 155 561 cursor \$1;
#X obj 233 562 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X connect 0 0 64 0;
+#X obj 16 517 route press;
+#X connect 0 0 69 0;
#X connect 1 0 8 0;
#X connect 2 0 9 0;
#X connect 3 0 2 0;
@@ -92,13 +92,13 @@ source;
#X connect 7 0 8 0;
#X connect 8 0 9 0;
#X connect 9 0 43 0;
-#X connect 10 0 54 2;
-#X connect 11 0 54 3;
-#X connect 12 0 54 4;
-#X connect 13 0 54 5;
-#X connect 18 0 54 6;
-#X connect 21 0 54 0;
-#X connect 23 0 54 7;
+#X connect 10 0 53 2;
+#X connect 11 0 53 3;
+#X connect 12 0 53 4;
+#X connect 13 0 53 5;
+#X connect 18 0 53 6;
+#X connect 21 0 53 0;
+#X connect 23 0 53 7;
#X connect 27 0 34 0;
#X connect 28 0 35 0;
#X connect 29 0 28 0;
@@ -107,31 +107,32 @@ source;
#X connect 32 0 31 0;
#X connect 33 0 34 0;
#X connect 34 0 35 0;
-#X connect 35 0 54 1;
+#X connect 35 0 53 1;
#X connect 38 0 40 0;
#X connect 39 0 42 0;
#X connect 40 0 39 0;
#X connect 42 0 41 0;
-#X connect 43 0 54 0;
+#X connect 43 0 53 0;
#X connect 44 0 43 0;
#X connect 45 0 43 2;
#X connect 46 0 43 3;
-#X connect 47 0 54 0;
+#X connect 47 0 53 0;
#X connect 48 0 47 0;
-#X connect 49 0 54 1;
+#X connect 49 0 53 1;
#X connect 50 0 49 0;
#X connect 51 0 50 0;
#X connect 52 0 50 0;
-#X connect 54 0 0 0;
-#X connect 55 0 43 0;
+#X connect 53 0 0 0;
+#X connect 54 0 43 0;
+#X connect 55 0 54 0;
#X connect 56 0 55 0;
-#X connect 57 0 56 0;
-#X connect 58 0 56 0;
-#X connect 59 0 55 0;
-#X connect 61 0 56 1;
-#X connect 62 0 63 0;
-#X connect 63 0 54 0;
-#X connect 64 0 54 0;
-#X connect 64 0 21 0;
-#X connect 68 0 0 0;
-#X connect 69 0 68 0;
+#X connect 57 0 55 0;
+#X connect 58 0 54 0;
+#X connect 60 0 55 1;
+#X connect 61 0 62 0;
+#X connect 62 0 53 0;
+#X connect 63 0 53 0;
+#X connect 63 0 21 0;
+#X connect 67 0 0 0;
+#X connect 68 0 67 0;
+#X connect 69 0 63 0;
diff --git a/doc/help-pdp_ctrack.pd b/doc/help-pdp_ctrack.pd
index 85687c4..7850e1d 100644
--- a/doc/help-pdp_ctrack.pd
+++ b/doc/help-pdp_ctrack.pd
@@ -1,9 +1,9 @@
#N canvas 42 26 781 666 10;
-#X obj 35 493 pdp_xv;
+#X obj 19 504 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;
@@ -67,13 +67,13 @@
#X obj 594 281 route pdp_drop;
#X msg 118 379 setcur \$1 \$2;
#X text 6 378 Set the cursor;
-#X msg 12 527 cursor \$1;
-#X obj 85 529 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+#X msg 7 425 cursor \$1;
+#X obj 80 427 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#X floatatom 123 591 5 0 0 0 - - -;
#X floatatom 173 592 5 0 0 0 - - -;
#X floatatom 220 591 5 0 0 0 - - -;
-#X text 140 631 Color components;
+#X text 139 624 Color components;
#X text 135 609 R;
#X text 186 609 G;
#X text 230 609 B;
diff --git a/doc/help-pdp_ffmpeg~.pd b/doc/help-pdp_ffmpeg~.pd
index 5b9f10a..bcb5394 100644
--- a/doc/help-pdp_ffmpeg~.pd
+++ b/doc/help-pdp_ffmpeg~.pd
@@ -62,8 +62,8 @@ server;
#X obj 501 251 spigot~;
#X floatatom 128 194 5 0 0 0 - - -;
#X obj 122 273 pdp_affine;
-#X msg 319 358 feed http://www.xicnet.com:8000/feed1.ffm;
#X msg 318 415 feed http://localhost:8090/feed1.ffm;
+#X msg 320 357 feed http://www.xicnet.com:8000/sin1.ffm;
#X connect 0 0 9 0;
#X connect 1 0 46 0;
#X connect 2 0 1 0;
diff --git a/doc/help-pdp_form.pd b/doc/help-pdp_form.pd
index 8fd8871..8be2e0c 100644
--- a/doc/help-pdp_form.pd
+++ b/doc/help-pdp_form.pd
@@ -21,12 +21,12 @@
#X msg 357 139 stop;
#X msg 442 170 open /dev/video;
#X obj 252 167 pdp_yqt;
-#X obj 606 530 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+#X obj 628 513 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X obj 606 582 pdp_control;
-#X msg 606 555 thread \$1;
-#X floatatom 606 643 5 0 0 0 - - -;
-#X obj 606 614 route pdp_drop;
+#X obj 628 565 pdp_control;
+#X msg 628 538 thread \$1;
+#X floatatom 628 626 5 0 0 0 - - -;
+#X obj 628 597 route pdp_drop;
#X text 222 631 written by Yves Degoyon (ydegoyon@free.fr);
#X obj 189 362 hdl 15 1 0 10 empty empty empty 0 -6 0 8 -262144 -1
-1 0;
@@ -59,6 +59,9 @@
#X msg 179 333 ellipse 89 120 56 78 0 255 0;
#X text 222 605 pdp_form : geometric forms addition in PDP;
#X obj 144 562 pdp_form -----------------;
+#X obj 346 540 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144
+-1 -1 0 1;
+#X text 487 540 alpha ( global );
#X connect 1 0 10 0;
#X connect 2 0 16 0;
#X connect 3 0 2 0;
@@ -94,3 +97,4 @@
#X connect 48 0 51 0;
#X connect 49 0 51 0;
#X connect 51 0 0 0;
+#X connect 52 0 51 9;
diff --git a/doc/help-pdp_live~.pd b/doc/help-pdp_live~.pd
index a12f862..a490a18 100644
--- a/doc/help-pdp_live~.pd
+++ b/doc/help-pdp_live~.pd
@@ -2,14 +2,16 @@
#X obj 128 113 rs_pdp_live~;
#X obj 156 158 dac~;
#X text 51 321 written by Yves Degoyon (ydegoyon@free.fr);
-#X text 51 308 ( at least from ffserver );
-#X text 51 295 pdp_live~ : decodes a live video stream;
#X text 236 112 <-- everything is in this box;
#X text 265 127 where the block size is redefined;
#X text 265 142 this is necessary for an;
#X text 266 154 ( acceptable? ) audio decoding;
#X obj 395 221 loadbang;
#X msg 395 251 \; pd dsp 1;
+#X text 51 308 and the video files supported by your ffmpeg (avi \,
+mpg \, ..);
+#X text 51 295 pdp_live~ : decodes a live video stream from ffmpeg
+;
#X connect 0 0 1 0;
#X connect 0 1 1 1;
-#X connect 9 0 10 0;
+#X connect 7 0 8 0;
diff --git a/doc/help-pdp_ocanvas.pd b/doc/help-pdp_ocanvas.pd
index 2069ead..c0191ae 100644
--- a/doc/help-pdp_ocanvas.pd
+++ b/doc/help-pdp_ocanvas.pd
@@ -2,7 +2,7 @@
#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 1
+#X obj 124 117 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0
1;
#X msg 119 80 open \$1;
#X obj 118 56 openpanel;
@@ -68,14 +68,14 @@ overlay;
#X floatatom 697 165 5 0 0 0 - - -;
#X text 36 605 note : the maximum number of inputs is 10;
#X text 36 618 ( easily hackable in the code );
-#X text 544 397 Change offsets of first video source;
-#X obj 548 351 pack f f;
-#X floatatom 549 312 5 0 0 0 - - -;
-#X floatatom 599 312 5 0 0 0 - - -;
-#X obj 589 331 t b f;
-#X text 564 294 X;
-#X text 609 293 Y;
-#X msg 548 375 offset 1 \$1 \$2;
+#X text 530 349 Change offsets of first video source;
+#X obj 534 303 pack f f;
+#X floatatom 639 304 5 0 0 0 - - -;
+#X floatatom 699 304 5 0 0 0 - - -;
+#X obj 597 302 t b f;
+#X text 679 302 X;
+#X text 740 304 Y;
+#X msg 534 327 offset 1 \$1 \$2;
#X obj 81 315 loadbang;
#X msg 173 540 select \$1 \$2;
#X msg 279 539 drag \$1 \$2;
@@ -86,11 +86,11 @@ overlay;
#X obj 307 255 pdp_scale 320 240;
#X obj 496 254 pdp_scale 320 240;
#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
+#X msg 535 438 average \$1;
+#X obj 615 439 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 text 533 461 Average sources at intersections;
+#X text 533 473 ( default = 0 );
#X msg 104 476 cursor 0;
#X obj 224 425 pdp_ocanvas 640 480 3;
#X obj 234 469 pdp_xv;
@@ -98,6 +98,15 @@ overlay;
#X obj 228 449 pdp_scale 320 240;
#X msg 105 446 cursor 1;
#X obj 358 315 pdp_i 5000;
+#X obj 535 369 pack f f;
+#X floatatom 640 370 5 0 0 0 - - -;
+#X floatatom 737 370 5 0 0 0 - - -;
+#X obj 598 368 t b f;
+#X msg 535 393 alpha \$1 \$2;
+#X text 680 368 S;
+#X text 531 415 Change alpha values for each source;
+#X text 697 391 Alpha [0.0-1.0];
+#X obj 696 368 / 100;
#X connect 0 0 7 0;
#X connect 1 0 8 0;
#X connect 2 0 1 0;
@@ -172,3 +181,10 @@ overlay;
#X connect 79 0 77 0;
#X connect 80 0 77 0;
#X connect 81 0 76 3;
+#X connect 82 0 86 0;
+#X connect 83 0 82 0;
+#X connect 84 0 90 0;
+#X connect 85 0 82 0;
+#X connect 85 1 82 1;
+#X connect 86 0 76 0;
+#X connect 90 0 85 0;
diff --git a/doc/help-pdp_pen.pd b/doc/help-pdp_pen.pd
index b82766f..5b8436b 100644
--- a/doc/help-pdp_pen.pd
+++ b/doc/help-pdp_pen.pd
@@ -2,7 +2,7 @@
#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;
@@ -30,42 +30,45 @@
#X text 85 498 pdp_pen : free hand drawing object;
#X text 85 514 written by Yves Degoyon ( ydegoyon@free.fr );
#X text 85 528 on request from patrick ( 11h11.com );
-#X obj 238 387 pdp_xv;
#X msg 282 463 draw \$1 \$2;
-#X msg 383 241 clear;
-#X text 431 242 Clear all drawings;
-#X msg 382 270 width \$1;
-#X floatatom 455 271 5 0 0 0 - - -;
-#X text 503 271 Width of the pen ( default = 3 );
-#X msg 381 302 rgb \$1 \$2 \$3;
-#X obj 479 305 pack f f f;
-#X floatatom 513 330 5 0 0 0 - - -;
-#X text 524 343 R;
-#X floatatom 562 331 5 0 0 0 - - -;
-#X floatatom 610 331 5 0 0 0 - - -;
-#X text 622 343 B;
-#X obj 610 303 t b f;
-#X text 572 343 G;
-#X obj 563 304 t b f;
-#X text 381 328 Color of the pen;
-#X msg 381 358 mode \$1;
-#X obj 447 360 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+#X msg 403 238 clear;
+#X text 451 239 Clear all drawings;
+#X msg 402 267 width \$1;
+#X floatatom 470 267 5 0 0 0 - - -;
+#X text 523 268 Width of the pen ( default = 3 );
+#X msg 401 299 rgb \$1 \$2 \$3;
+#X obj 499 302 pack f f f;
+#X floatatom 533 327 5 0 0 0 - - -;
+#X text 544 340 R;
+#X floatatom 582 328 5 0 0 0 - - -;
+#X floatatom 630 328 5 0 0 0 - - -;
+#X text 642 340 B;
+#X obj 630 300 t b f;
+#X text 592 340 G;
+#X obj 583 301 t b f;
+#X text 401 325 Color of the pen;
+#X msg 401 355 mode \$1;
+#X obj 467 357 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X text 473 361 Mode ( 0=drawing \, 1=erase );
-#X text 473 374 ( default=0 );
-#X obj 466 396 unpack f f;
-#X obj 469 418 f;
-#X obj 515 418 f;
-#X msg 381 395 fill \$1 \$2;
-#X obj 469 441 pack f f;
-#X obj 551 397 t b b;
-#X msg 600 397 bang;
-#X text 640 398 Fill a region;
+#X text 493 358 Mode ( 0=drawing \, 1=erase );
+#X text 493 371 ( default=0 );
+#X obj 486 393 unpack f f;
+#X obj 489 415 f;
+#X obj 535 415 f;
+#X msg 401 392 fill \$1 \$2;
+#X obj 489 438 pack f f;
+#X obj 571 394 t b b;
+#X msg 620 394 bang;
+#X text 660 395 Fill a region;
#X obj 238 419 route press drag release;
#X floatatom 280 214 5 0 0 0 - - -;
#X floatatom 333 213 5 0 0 0 - - -;
#X text 273 197 X Offset;
#X text 329 197 Y Offset;
+#X obj 406 213 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144
+-1 -1 8800 1;
+#X text 543 213 alpha;
+#X obj 239 387 pdp_xv;
#X connect 0 0 9 0;
#X connect 1 0 10 0;
#X connect 2 0 1 0;
@@ -86,33 +89,34 @@
#X connect 17 0 20 0;
#X connect 18 0 17 0;
#X connect 20 0 19 0;
-#X connect 21 0 25 0;
-#X connect 25 0 55 0;
+#X connect 21 0 61 0;
+#X connect 25 0 21 0;
#X connect 26 0 21 0;
-#X connect 27 0 21 0;
-#X connect 29 0 21 0;
-#X connect 30 0 29 0;
-#X connect 32 0 21 0;
+#X connect 28 0 21 0;
+#X connect 29 0 28 0;
+#X connect 31 0 21 0;
+#X connect 32 0 31 0;
#X connect 33 0 32 0;
-#X connect 34 0 33 0;
-#X connect 36 0 41 0;
-#X connect 37 0 39 0;
-#X connect 39 0 33 0;
-#X connect 39 1 33 2;
-#X connect 41 0 33 0;
-#X connect 41 1 33 1;
-#X connect 43 0 21 0;
-#X connect 44 0 43 0;
-#X connect 47 0 48 1;
-#X connect 47 1 49 1;
-#X connect 48 0 51 0;
-#X connect 49 0 51 1;
-#X connect 50 0 21 0;
-#X connect 51 0 50 0;
-#X connect 52 0 48 0;
-#X connect 52 1 49 0;
-#X connect 53 0 52 0;
-#X connect 55 0 47 0;
-#X connect 55 1 26 0;
-#X connect 56 0 21 1;
-#X connect 57 0 21 2;
+#X connect 35 0 40 0;
+#X connect 36 0 38 0;
+#X connect 38 0 32 0;
+#X connect 38 1 32 2;
+#X connect 40 0 32 0;
+#X connect 40 1 32 1;
+#X connect 42 0 21 0;
+#X connect 43 0 42 0;
+#X connect 46 0 47 1;
+#X connect 46 1 48 1;
+#X connect 47 0 50 0;
+#X connect 48 0 50 1;
+#X connect 49 0 21 0;
+#X connect 50 0 49 0;
+#X connect 51 0 47 0;
+#X connect 51 1 48 0;
+#X connect 52 0 51 0;
+#X connect 54 0 46 0;
+#X connect 54 1 25 0;
+#X connect 55 0 21 1;
+#X connect 56 0 21 2;
+#X connect 59 0 21 3;
+#X connect 61 0 54 0;
diff --git a/doc/help-pdp_streaming.pd b/doc/help-pdp_streaming.pd
index f8a26ad..0cc34e5 100644
--- a/doc/help-pdp_streaming.pd
+++ b/doc/help-pdp_streaming.pd
@@ -3,7 +3,7 @@
#X obj 263 66 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
-1;
#X msg 165 92 loop \$1;
-#X obj 166 70 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 1
+#X obj 166 70 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 1 1
;
#X msg 150 45 open \$1;
#X obj 149 21 openpanel;
@@ -13,7 +13,7 @@
#X msg 227 66 stop;
#X obj 233 92 metro 70;
#X text 386 588 written by Yves Degoyon ( ydegoyon@free.fr );
-#X obj 169 156 pdp_yqt;
+#X obj 155 165 pdp_yqt;
#X obj 160 315 pdp_o;
#X msg 267 154 connect localhost 4578;
#X msg 267 179 disconnect;
@@ -24,8 +24,8 @@
#X floatatom 180 512 5 0 0 0 - - -;
#X text 229 512 Connection state;
#X text 249 492 Number of frames received;
-#X symbolatom 220 470 10 0 0 0 - - -;
-#X text 301 472 Address of the emitter;
+#X symbolatom 220 470 15 0 0 0 - - -;
+#X text 332 470 Address of the emitter;
#X msg 267 253 refresh;
#X msg 267 279 framerate \$1;
#X floatatom 366 280 5 0 0 0 - - -;
@@ -50,6 +50,7 @@
#X text 413 255 by changing these two parameters :;
#X floatatom 207 341 5 0 0 0 - - -;
#X text 259 340 Bandwidth (in kb);
+#X msg 268 133 connect 193.171.120.173 4578;
#X connect 1 0 9 0;
#X connect 2 0 11 0;
#X connect 3 0 2 0;
@@ -81,3 +82,4 @@
#X connect 38 0 37 0;
#X connect 40 0 41 0;
#X connect 41 0 12 0;
+#X connect 47 0 12 0;
diff --git a/doc/help-pdp_text.pd b/doc/help-pdp_text.pd
index dd03714..735afc0 100644
--- a/doc/help-pdp_text.pd
+++ b/doc/help-pdp_text.pd
@@ -1,5 +1,5 @@
#N canvas 84 12 763 664 10;
-#X obj 92 608 pdp_xv;
+#X obj 152 627 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;
@@ -21,12 +21,12 @@
#X msg 357 139 stop;
#X msg 442 170 open /dev/video;
#X obj 252 167 pdp_yqt;
-#X obj 606 530 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+#X obj 648 451 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X obj 606 582 pdp_control;
-#X msg 606 555 thread \$1;
-#X floatatom 606 643 5 0 0 0 - - -;
-#X obj 606 614 route pdp_drop;
+#X obj 648 503 pdp_control;
+#X msg 648 476 thread \$1;
+#X floatatom 648 564 5 0 0 0 - - -;
+#X obj 648 535 route pdp_drop;
#X text 221 617 pdp_text : text rendering in PDP;
#X text 222 631 written by Yves Degoyon (ydegoyon@free.fr);
#X msg 144 282 text moshi-moshi 34 58;
@@ -57,7 +57,7 @@
#X msg 30 387 delete 1;
#X msg 30 421 resize 20;
#X msg 30 489 font helmetr/14;
-#X obj 155 585 pdp_text -----------------;
+#X obj 155 598 pdp_text -----------------;
#X text 139 254 text <text> x y [ r g b angle ];
#X floatatom 331 554 5 0 0 0 - - -;
#X text 379 553 Angle;
@@ -68,8 +68,11 @@
#X floatatom 14 562 5 0 0 0 - - -;
#X msg 64 560 antialias \$1;
#X msg 29 458 font helmetr/5;
-#X floatatom 365 577 5 0 0 0 - - -;
-#X text 411 577 Scroll;
+#X floatatom 354 572 5 0 0 0 - - -;
+#X text 400 572 Scroll;
+#X obj 380 594 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144
+-1 -1 0 1;
+#X text 517 594 Alpha ( global );
#X connect 1 0 10 0;
#X connect 2 0 16 0;
#X connect 3 0 2 0;
@@ -116,3 +119,4 @@
#X connect 60 0 51 0;
#X connect 61 0 51 0;
#X connect 62 0 51 8;
+#X connect 64 0 51 9;
diff --git a/doc/help-pdp_yqt.pd b/doc/help-pdp_yqt.pd
index b3b6809..70c671b 100644
--- a/doc/help-pdp_yqt.pd
+++ b/doc/help-pdp_yqt.pd
@@ -3,7 +3,7 @@
#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/rs_pdp_live~.pd b/doc/rs_pdp_live~.pd
index 50f6b80..e30e721 100644
--- a/doc/rs_pdp_live~.pd
+++ b/doc/rs_pdp_live~.pd
@@ -1,73 +1,108 @@
-#N canvas 168 29 842 529 10;
-#X text 460 551 written by Yves Degoyon (ydegoyon@free.fr);
-#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;
+#N canvas 393 46 872 636 10;
+#X text 455 594 written by Yves Degoyon (ydegoyon@free.fr);
+#X floatatom 223 540 5 0 0 0 - - -;
+#X text 268 540 Streaming status;
+#X floatatom 243 519 5 0 0 0 - - -;
#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 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;
-#X text 23 580 a prefered solution would be to use mp3cast~/mp3amp~
+#X text 325 111 Disconnect from the current stream;
+#X msg 247 109 disconnect;
+#X text 292 520 Number of video frames decoded;
+#X text 452 570 ( at least from ffserver );
+#X text 21 570 NOTE : as for pdp_ffmpeg~ \, transmitting audio;
+#X text 20 588 with the video stream produces some unsteady sound;
+#X text 21 603 a prefered solution would be to use mp3cast~/mp3amp~
;
-#X msg 246 335 priority \$1;
-#X floatatom 335 336 5 0 0 0 - - -;
-#X text 385 357 ( optional \, if you know what you're doing );
-#X obj 70 493 outlet~;
-#X obj 146 486 outlet~;
-#X text 387 342 ([-20 \, 20 ] default : 0 );
-#X text 390 329 Set the priority of decoding thread;
-#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 \, .... )
+#X msg 253 415 priority \$1;
+#X floatatom 342 416 5 0 0 0 - - -;
+#X text 388 439 ( optional \, if you know what you're doing );
+#X obj 72 543 outlet~;
+#X text 393 411 Set the priority of decoding thread;
+#X msg 247 214 connect \$1;
+#X text 455 556 pdp_live~ : decodes a live video stream;
+#X text 453 582 and reads most common files ( avi \, mpg \, .... )
;
-#X text 325 175 Read video file;
-#X obj 247 154 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+#X text 325 164 Read video file;
+#X obj 247 143 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#X obj 247 176 openpanel;
-#X msg 248 296 audio \$1;
-#X obj 317 298 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+#X obj 247 165 openpanel;
+#X msg 253 384 audio \$1;
+#X obj 322 386 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 247 200 makefilename file://%s;
-#X msg 9 388 autocreate 1;
+#X text 353 386 Activate decoding of audio ( default : off );
+#X obj 247 189 makefilename file://%s;
#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
+#X obj 327 355 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;
-#X msg 248 259 thread \$1;
-#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 msg 253 355 thread \$1;
+#X obj 383 355 loadbang;
+#X msg 348 355 1;
+#X text 451 355 Activate threading ( default : on );
+#X floatatom 259 496 5 0 0 0 - - -;
+#X text 305 496 Reception framerate;
+#X text 333 476 End of stream reached;
+#X floatatom 286 475 5 0 0 0 - - -;
+#X obj 115 424 pdp_live~;
+#X obj 341 257 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
+1;
+#X obj 397 255 loadbang;
+#X msg 362 255 1;
+#X msg 250 256 autoplay \$1;
+#X text 465 255 Activate auto play mode ( default : on );
+#X msg 252 291 bang;
+#X msg 392 293 bang;
+#X floatatom 433 294 5 0 0 0 - - -;
+#X text 485 292 In manual mode \, read next frame ( autoplay = off
+);
+#X obj 328 293 metro 70;
+#X msg 254 319 loop \$1;
+#X obj 316 320 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
+1;
+#X obj 372 318 loadbang;
+#X msg 337 318 1;
+#X text 440 318 Activate loop mode for files ( default : on );
+#X floatatom 75 252 5 0 0 0 - - -;
+#X text 6 194 Frame seek;
+#X msg 289 292 stop;
+#X obj 134 543 outlet~;
+#X text 390 424 ([0 \, 20 ] default : 1 );
+#X text 6 222 ffmpeg >= 0.4.9;
+#X text 6 207 warning : works only with;
+#X obj 35 501 pdp_xv;
+#X obj 66 61 block~ 1024;
#X msg 246 78 connect http://gollum.artefacte.org:8090/osas.mpg;
-#X obj 113 374 pdp_live~;
-#X connect 7 0 43 0;
-#X connect 13 0 43 0;
-#X connect 14 0 13 0;
-#X connect 20 0 43 0;
-#X connect 24 0 25 0;
-#X connect 25 0 29 0;
-#X connect 26 0 43 0;
-#X connect 27 0 26 0;
-#X connect 29 0 20 0;
-#X connect 30 0 4 0;
-#X connect 31 0 43 0;
-#X connect 33 0 34 0;
-#X connect 34 0 43 0;
-#X connect 35 0 36 0;
-#X connect 36 0 33 0;
-#X connect 42 0 43 0;
-#X connect 43 0 4 0;
-#X connect 43 1 16 0;
-#X connect 43 2 17 0;
-#X connect 43 3 1 0;
-#X connect 43 4 3 0;
-#X connect 43 5 38 0;
-#X connect 43 6 41 0;
+#X connect 6 0 37 0;
+#X connect 12 0 37 0;
+#X connect 13 0 12 0;
+#X connect 17 0 37 0;
+#X connect 21 0 22 0;
+#X connect 22 0 26 0;
+#X connect 23 0 37 0;
+#X connect 24 0 23 0;
+#X connect 26 0 17 0;
+#X connect 27 0 37 0;
+#X connect 28 0 29 0;
+#X connect 29 0 37 0;
+#X connect 30 0 31 0;
+#X connect 31 0 28 0;
+#X connect 37 0 60 0;
+#X connect 37 1 15 0;
+#X connect 37 2 56 0;
+#X connect 37 3 1 0;
+#X connect 37 4 3 0;
+#X connect 37 5 33 0;
+#X connect 37 6 36 0;
+#X connect 38 0 41 0;
+#X connect 39 0 40 0;
+#X connect 40 0 38 0;
+#X connect 41 0 37 0;
+#X connect 43 0 37 0;
+#X connect 44 0 47 0;
+#X connect 45 0 47 1;
+#X connect 47 0 37 0;
+#X connect 48 0 37 0;
+#X connect 49 0 48 0;
+#X connect 50 0 51 0;
+#X connect 51 0 49 0;
+#X connect 53 0 37 1;
+#X connect 55 0 47 0;
+#X connect 62 0 37 0;
diff --git a/include/pdp_streaming.h b/include/pdp_streaming.h
index 648c0c6..6f3f038 100644
--- a/include/pdp_streaming.h
+++ b/include/pdp_streaming.h
@@ -30,5 +30,5 @@ typedef struct _hpacket
int width;
int height;
struct timeval etime; // valid until 2038
- unsigned int clength;
+ int clength;
} t_hpacket;
diff --git a/modules/Makefile b/modules/Makefile
index 1bca11a..66847ff 100644
--- a/modules/Makefile
+++ b/modules/Makefile
@@ -15,7 +15,10 @@ OBJECTS = pdp_intrusion.o pdp_yqt.o pdp_simura.o pdp_underwatch.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_spotlight.o pdp_colorgrid.o pdp_live~.o pdp_ffmpeg~.o
- # pdp_xcanvas.o pdp_aa.o
+ pdp_ocanvas.o pdp_spotlight.o pdp_colorgrid.o \
+ pdp_binary.o pdp_erode.o pdp_dilate.o pdp_hitandmiss.o \
+ pdp_disintegration.o pdp_distance.o pdp_theorin~.o \
+ pdp_theorout~.o pdp_cropper.o pdp_background.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 7d9daad..56fe02b 100644
--- a/modules/Makefile.in
+++ b/modules/Makefile.in
@@ -15,7 +15,10 @@ OBJECTS = pdp_intrusion.o pdp_yqt.o pdp_simura.o pdp_underwatch.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_spotlight.o pdp_colorgrid.o @PDP_STREAMING_OBJECTS@
- # pdp_xcanvas.o pdp_aa.o
+ pdp_ocanvas.o pdp_spotlight.o pdp_colorgrid.o \
+ pdp_binary.o pdp_erode.o pdp_dilate.o pdp_hitandmiss.o \
+ pdp_disintegration.o pdp_distance.o pdp_theorin~.o \
+ pdp_theorout~.o pdp_cropper.o pdp_background.o \
+ @PDP_STREAMING_OBJECTS@ # pdp_xcanvas.o pdp_aa.o
all_modules: $(OBJECTS)
diff --git a/modules/pdp_ascii.c b/modules/pdp_ascii.c
index a43956c..e81d3f2 100644
--- a/modules/pdp_ascii.c
+++ b/modules/pdp_ascii.c
@@ -27,6 +27,7 @@
#include "yuv.h"
#include "default.map"
#include <math.h>
+#include <stdio.h>
#define LINE_MAX_LENGTH 1024
diff --git a/modules/pdp_compose.c b/modules/pdp_compose.c
index aad03a9..998c3a3 100644
--- a/modules/pdp_compose.c
+++ b/modules/pdp_compose.c
@@ -61,7 +61,9 @@ typedef struct pdp_compose_struct
t_float x_f;
t_int x_packet0;
+ t_int x_packet1;
t_int x_dropped;
+ t_int x_queue_id;
t_int x_vwidth;
t_int x_vheight;
@@ -228,6 +230,8 @@ static void pdp_compose_process_yv12(t_pdp_compose *x)
{
t_pdp *header = pdp_packet_header(x->x_packet0);
short int *data = (short int *)pdp_packet_data(x->x_packet0);
+ t_pdp *newheader = pdp_packet_header(x->x_packet1);
+ short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
t_int i, cf;
t_int px=0, py=0, ppx=0, ppy=0, found=0, xcell=0, ycell=0;
t_int celldiff=0, cellwidth=0, cellheight=0;
@@ -285,9 +289,9 @@ static void pdp_compose_process_yv12(t_pdp_compose *x)
pfY = x->x_frame;
pfV = x->x_frame+x->x_vsize;
pfU = x->x_frame+x->x_vsize+(x->x_vsize>>2);
- pdY = data;
- pdV = data+x->x_vsize;
- pdU = data+x->x_vsize+(x->x_vsize>>2);
+ pdY = newdata;
+ pdV = newdata+x->x_vsize;
+ pdU = newdata+x->x_vsize+(x->x_vsize>>2);
prY = x->x_right_frame;
prV = x->x_right_frame+x->x_vsize;
prU = x->x_right_frame+x->x_vsize+(x->x_vsize>>2);
@@ -326,11 +330,18 @@ static void pdp_compose_process_yv12(t_pdp_compose *x)
}
}
- pdp_packet_pass_if_valid(x->x_pdp_output, &x->x_packet0);
-
return;
}
+static void pdp_compose_sendpacket(t_pdp_compose *x)
+{
+ pdp_packet_mark_unused(x->x_packet0);
+ x->x_packet0=-1;
+
+ /* unregister and propagate if valid dest packet */
+ pdp_packet_pass_if_valid(x->x_pdp_output, &x->x_packet1);
+}
+
static void pdp_compose_process(t_pdp_compose *x)
{
int encoding;
@@ -344,7 +355,8 @@ static void pdp_compose_process(t_pdp_compose *x)
switch(pdp_packet_header(x->x_packet0)->info.image.encoding){
case PDP_IMAGE_YV12:
- pdp_compose_process_yv12(x);
+ x->x_packet1 = pdp_packet_clone_rw(x->x_packet0);
+ pdp_queue_add(x, pdp_compose_process_yv12, pdp_compose_sendpacket, &x->x_queue_id);
break;
case PDP_IMAGE_GREY:
@@ -365,20 +377,24 @@ static void pdp_compose_input_1(t_pdp_compose *x, t_symbol *s, t_floatarg f)
{
short int *rightdata = (short int *)pdp_packet_data((int)f);
- if (s== gensym("register_rw")) memcpy(x->x_right_frame, rightdata, (x->x_vsize + (x->x_vsize>>1))<<1 );
+ if ( s== gensym("register_rw") )
+ {
+ memcpy(x->x_right_frame, rightdata, (x->x_vsize + (x->x_vsize>>1))<<1 );
+ }
+
+ pdp_packet_mark_unused( (int)f );
}
static void pdp_compose_input_0(t_pdp_compose *x, t_symbol *s, t_floatarg f)
{
- /* if this is a register_ro message or register_rw message, register with packet factory */
-
- if (s== gensym("register_rw"))
+ if ( s== gensym("register_rw") )
+ {
x->x_dropped = pdp_packet_convert_ro_or_drop(&x->x_packet0, (int)f, pdp_gensym("image/YCrCb/*") );
+ }
- if ((s == gensym("process")) && (-1 != x->x_packet0) && (!x->x_dropped)){
-
+ if ((s == gensym("process")) && (-1 != x->x_packet0) && (!x->x_dropped))
+ {
pdp_compose_process(x);
-
}
}
@@ -386,7 +402,8 @@ static void pdp_compose_free(t_pdp_compose *x)
{
int i;
- pdp_packet_mark_unused(x->x_packet0);
+ pdp_queue_finish(x->x_queue_id);
+ pdp_packet_mark_unused(x->x_packet1);
pdp_compose_free_ressources( x );
}
@@ -416,6 +433,8 @@ void *pdp_compose_new(void)
x->x_colorV = (yuv_RGBtoV( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8;
x->x_packet0 = -1;
+ x->x_packet1 = -1;
+ x->x_queue_id = -1;
x->x_cursX = -1;
x->x_cursY = -1;
diff --git a/modules/pdp_ctrack.c b/modules/pdp_ctrack.c
index ed35c9b..fa56ea6 100644
--- a/modules/pdp_ctrack.c
+++ b/modules/pdp_ctrack.c
@@ -86,8 +86,8 @@ typedef struct pdp_ctrack_struct
t_outlet *x_x2; // output x2 coordinate of block which has been detected
t_outlet *x_y2; // output y2 coordinate of block which has been detected
t_outlet *x_R; // output R component of selected color
- t_outlet *x_G; // output R component of selected color
- t_outlet *x_B; // output R component of selected color
+ t_outlet *x_G; // output G component of selected color
+ t_outlet *x_B; // output B component of selected color
t_canvas *x_canvas;
diff --git a/modules/pdp_ffmpeg~.c b/modules/pdp_ffmpeg~.c
index 58cdd61..3e229af 100644
--- a/modules/pdp_ffmpeg~.c
+++ b/modules/pdp_ffmpeg~.c
@@ -441,9 +441,18 @@ static void pdp_ffmpeg_process_yv12(t_pdp_ffmpeg *x)
oheight = x->x_avcontext->streams[i]->codec.height;
if (x->x_img_resample_ctx) img_resample_close(x->x_img_resample_ctx);
+
+#if LIBAVCODEC_BUILD > 4715
+ x->x_img_resample_ctx = img_resample_full_init(
+ owidth, oheight,
+ x->x_vwidth, x->x_vheight,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0);
+#else
x->x_img_resample_ctx = img_resample_full_init(
owidth, oheight,
x->x_vwidth, x->x_vheight, 0, 0, 0, 0);
+#endif
size = avpicture_get_size(x->x_avcontext->streams[i]->codec.pix_fmt,
owidth, oheight );
@@ -472,6 +481,9 @@ static void pdp_ffmpeg_process_yv12(t_pdp_ffmpeg *x)
// encode and send the picture
{
AVFrame aframe;
+#if LIBAVCODEC_BUILD > 4715
+ AVPacket vpkt;
+#endif
t_int fsize, ret;
memset(&aframe, 0, sizeof(AVFrame));
@@ -482,7 +494,21 @@ static void pdp_ffmpeg_process_yv12(t_pdp_ffmpeg *x)
fsize = avcodec_encode_video(&x->x_avcontext->streams[i]->codec,
x->x_video_buffer, VIDEO_BUFFER_SIZE,
&aframe);
+
+#if LIBAVCODEC_BUILD > 4715
+ av_init_packet(&vpkt);
+
+ vpkt.pts = aframe.pts;
+ if((&x->x_avcontext->streams[i]->codec)->coded_frame->key_frame)
+ vpkt.flags |= PKT_FLAG_KEY;
+ vpkt.stream_index= i;
+ vpkt.data= (uint8_t *)x->x_video_buffer;
+ vpkt.size= fsize;
+
+ if ( ( ret = av_write_frame( x->x_avcontext, &vpkt) ) < 0 )
+#else
if ( ( ret = av_write_frame( x->x_avcontext, i, x->x_video_buffer, fsize) ) < 0 )
+#endif
{
post ("pdp_ffmpeg~ : error : could not send frame : (ret=%d)", ret );
return;
@@ -549,10 +575,26 @@ static void pdp_ffmpeg_process_yv12(t_pdp_ffmpeg *x)
while (fifo_read(&x->x_audio_fifo[saudioindex], (uint8_t*)pencbuf, framebytes,
&x->x_audio_fifo[saudioindex].rptr) == 0)
{
+#if LIBAVCODEC_BUILD > 4715
+ AVPacket apkt;
+#endif
encsize = avcodec_encode_audio(&x->x_avcontext->streams[i]->codec,
(uint8_t*)&x->x_audio_out, sizeof(x->x_audio_out),
(short *)pencbuf);
+#if LIBAVCODEC_BUILD > 4715
+ av_init_packet(&apkt);
+
+ apkt.pts = etime.tv_sec*1000000 + etime.tv_usec;
+ if((&x->x_avcontext->streams[i]->codec)->coded_frame->key_frame)
+ apkt.flags |= PKT_FLAG_KEY;
+ apkt.stream_index= i;
+ apkt.data= (uint8_t *)x->x_audio_out;
+ apkt.size= encsize;
+
+ av_write_frame(x->x_avcontext, &apkt);
+#else
av_write_frame(x->x_avcontext, i, x->x_audio_out, encsize);
+#endif
}
saudioindex++;
}
diff --git a/modules/pdp_form.c b/modules/pdp_form.c
index ccbd510..b3a59b3 100644
--- a/modules/pdp_form.c
+++ b/modules/pdp_form.c
@@ -74,6 +74,7 @@ typedef struct pdp_form_struct
t_int x_nbforms;
t_int x_current;
t_int x_capacity;
+ t_float x_alpha;
/* imlib data */
Imlib_Image x_image;
@@ -312,6 +313,14 @@ static void pdp_form_delete(t_pdp_form *x, t_floatarg fnum )
}
}
+static void pdp_form_alpha(t_pdp_form *x, t_floatarg falpha )
+{
+ if ( ( falpha >= 0. ) && ( falpha <= 1. ) )
+ {
+ x->x_alpha = falpha;
+ }
+}
+
static void pdp_form_resize(t_pdp_form *x, t_floatarg fnewsize )
{
t_form *forms;
@@ -448,11 +457,11 @@ static void pdp_form_process_yv12(t_pdp_form *x)
u = yuv_RGBtoU(imdata[py*x->x_vwidth+px]);
v = yuv_RGBtoV(imdata[py*x->x_vwidth+px]);
- *(pY) = y<<7;
+ *(pY) = (y<<7)*x->x_alpha + (*pY)*(1-x->x_alpha);
if ( (px%2==0) && (py%2==0) )
{
- *(pV) = (v-128)<<8;
- *(pU) = (u-128)<<8;
+ *(pV) = ((v-128)<<8)*x->x_alpha + (*pV)*(1-x->x_alpha);
+ *(pU) = ((u-128)<<8)*x->x_alpha + (*pU)*(1-x->x_alpha);
}
}
pY++;
@@ -549,6 +558,7 @@ void *pdp_form_new(void)
inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("r"));
inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("g"));
inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("b"));
+ inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("alpha"));
x->x_outlet0 = outlet_new(&x->x_obj, &s_anything);
x->x_packet0 = -1;
@@ -567,6 +577,7 @@ void *pdp_form_new(void)
x->x_nbforms = 0;
x->x_current = -1;
+ x->x_alpha = 1.;
return (void *)x;
}
@@ -601,6 +612,7 @@ void pdp_form_setup(void)
class_addmethod(pdp_form_class, (t_method)pdp_form_clear, gensym("clear"), A_NULL);
class_addmethod(pdp_form_class, (t_method)pdp_form_delete, gensym("delete"), A_DEFFLOAT, A_NULL);
class_addmethod(pdp_form_class, (t_method)pdp_form_resize, gensym("resize"), A_DEFFLOAT, A_NULL);
+ class_addmethod(pdp_form_class, (t_method)pdp_form_alpha, gensym("alpha"), A_DEFFLOAT, A_NULL);
class_sethelpsymbol( pdp_form_class, gensym("pdp_form.pd") );
}
diff --git a/modules/pdp_i.c b/modules/pdp_i.c
index e18a077..a89a56c 100644
--- a/modules/pdp_i.c
+++ b/modules/pdp_i.c
@@ -178,7 +178,7 @@ static void pdp_i_recv(t_pdp_i *x)
t_hpacket *pheader;
if ( ( ret = recv(x->x_socket, (void*) (x->x_inbuffer + x->x_inwriteposition),
- (size_t)((x->x_inbuffersize-x->x_inwriteposition)),
+ (size_t)((x->x_inbuffersize-x->x_inwriteposition-1)),
MSG_NOSIGNAL) ) < 0 )
{
post( "pdp_i : receive error" );
@@ -189,7 +189,7 @@ static void pdp_i_recv(t_pdp_i *x)
{
// post( "pdp_i : received %d bytes at %d on %d ( up to %d)",
// ret, x->x_inwriteposition, x->x_socket,
- // x->x_inbuffersize-x->x_inwriteposition*sizeof( unsigned long) );
+ // x->x_inbuffersize-x->x_inwriteposition );
if ( ret == 0 )
{
@@ -197,29 +197,34 @@ static void pdp_i_recv(t_pdp_i *x)
outlet_float( x->x_connection_status, 0 );
pdp_i_closesocket( x->x_socket );
sys_rmpollfn(x->x_socket);
+ post( "pdp_i : lost the connection." );
x->x_socket = -1;
}
else
{
// check we don't overflow input buffer
- if ( x->x_inwriteposition+ret >= x->x_inbuffersize )
+ if ( x->x_inwriteposition+ret >= x->x_inbuffersize/2 )
{
post( "pdp_i : too much input...resetting" );
x->x_inwriteposition=0;
+ memset( (char*) x->x_inbuffer, 0x00, x->x_inbuffersize );
return;
}
x->x_inwriteposition += ret;
- if ( pheader = (t_hpacket*) strstr( (char*) x->x_inbuffer, PDP_PACKET_START ) )
+ if ( ( ( pheader = (t_hpacket*) strstr( (char*) x->x_inbuffer, PDP_PACKET_START ) ) != NULL ) ||
+ ( ( pheader = (t_hpacket*) strstr( (char*) x->x_inbuffer, PDP_PACKET_DIFF ) ) != NULL ) )
{
// check if a full packet is present
- if ( x->x_inwriteposition >= (int)((char*)pheader - (char*)(x->x_inbuffer)) + (int)sizeof(t_hpacket) + (int)pheader->clength )
+ if ( x->x_inwriteposition >=
+ (int)((char*)pheader - (char*)(x->x_inbuffer)) +
+ (int)sizeof(t_hpacket) + (int)ntohl(pheader->clength) )
{
- if ( ( x->x_vwidth != pheader->width ) ||
- ( x->x_vheight != pheader->height ) )
+ if ( ( x->x_vwidth != (t_int)ntohl(pheader->width) ) ||
+ ( x->x_vheight != (t_int)ntohl(pheader->height) ) )
{
pdp_i_free_ressources(x);
- x->x_vheight = pheader->height;
- x->x_vwidth = pheader->width;
+ x->x_vheight = ntohl(pheader->height);
+ x->x_vwidth = ntohl(pheader->width);
x->x_vsize = x->x_vheight*x->x_vwidth;
pdp_i_allocate(x);
post( "pdp_i : allocated buffers : vsize=%d : hsize=%d", x->x_vsize, x->x_hsize );
@@ -230,18 +235,18 @@ static void pdp_i_recv(t_pdp_i *x)
x->x_data = (short int *)pdp_packet_data(x->x_packet);
memcpy( x->x_data, x->x_bdata, x->x_bsize );
- // post( "pdp_i : decompress %d in %d bytes", pheader->clength, x->x_hsize );
+ // post( "pdp_i : decompress %d in %d bytes", ntohl(pheader->clength), x->x_hsize );
x->x_bzsize = x->x_hsize;
if ( ( ret = BZ2_bzBuffToBuffDecompress( (char*)x->x_hdata,
&x->x_bzsize,
(char *) pheader+sizeof(t_hpacket),
- pheader->clength,
+ ntohl(pheader->clength),
0, 0 ) ) == BZ_OK )
{
- // post( "pdp_i : bz2 decompression (%d)->(%d)", pheader->clength, x->x_bzsize );
+ // post( "pdp_i : bz2 decompression (%d)->(%d)", ntohl(pheader->clength), x->x_bzsize );
- switch( pheader->encoding )
+ switch( ntohl(pheader->encoding) )
{
case REGULAR :
memcpy( x->x_ddata, x->x_hdata, x->x_bzsize );
@@ -285,8 +290,8 @@ static void pdp_i_recv(t_pdp_i *x)
x->x_header->info.image.width = x->x_vwidth;
x->x_header->info.image.height = x->x_vheight;
- pdp_packet_pass_if_valid(x->x_pdp_output, &x->x_packet);
// post( "pdp_i : propagate packet : %d", x->x_packet );
+ pdp_packet_pass_if_valid(x->x_pdp_output, &x->x_packet);
outlet_float( x->x_frames, ++x->x_framesreceived );
}
else
@@ -297,8 +302,20 @@ static void pdp_i_recv(t_pdp_i *x)
memcpy( x->x_bdata, x->x_data, x->x_bsize );
// roll buffer
- x->x_inwriteposition -= (int)((char*)pheader-(char*)(x->x_inbuffer)) + sizeof(t_hpacket) + pheader->clength;
- memcpy( x->x_inbuffer, pheader+sizeof(t_hpacket) + pheader->clength, x->x_inwriteposition );
+ x->x_inwriteposition -= (int)((char*)pheader-(char*)(x->x_inbuffer)) + sizeof(t_hpacket) + ntohl(pheader->clength);
+ if ( x->x_inwriteposition > 0 )
+ {
+ memcpy( x->x_inbuffer, pheader+sizeof(t_hpacket) + ntohl(pheader->clength), x->x_inwriteposition );
+ }
+ else
+ {
+ x->x_inwriteposition = 0;
+ memset( (char*) x->x_inbuffer, 0x00, x->x_inbuffersize );
+ }
+ }
+ else
+ {
+ // post( "pdp_i : not a full frame" );
}
}
}
diff --git a/modules/pdp_live~.c b/modules/pdp_live~.c
index cae6a65..c403a15 100644
--- a/modules/pdp_live~.c
+++ b/modules/pdp_live~.c
@@ -35,6 +35,8 @@
#include <sys/time.h>
#include <sys/resource.h>
#include <avformat.h>
+#include <sys/types.h>
+#include <signal.h>
#define VIDEO_BUFFER_SIZE (1024*1024)
#define MAX_AUDIO_PACKET_SIZE (128 * 1024)
@@ -46,8 +48,8 @@
#define DEFAULT_HEIGHT 240
#define DEFAULT_FRAME_RATE 25
#define END_OF_STREAM 20
-#define MIN_PRIORITY -20
-#define DEFAULT_PRIORITY 0
+#define MIN_PRIORITY 0
+#define DEFAULT_PRIORITY 1
#define MAX_PRIORITY 20
/* a trick to cope with ffmpeg versions */
@@ -66,7 +68,7 @@ typedef struct pdp_live_struct
t_int x_dropped;
t_pdp *x_header;
- short int *x_data;
+ unsigned char *x_data;
t_int x_vwidth;
t_int x_vheight;
t_int x_vsize;
@@ -82,10 +84,14 @@ typedef struct pdp_live_struct
pthread_t x_connectchild; // thread used for connecting to a stream
pthread_t x_decodechild; // stream decoding thread
t_int x_usethread; // flag to activate decoding in a thread
+ t_int x_autoplay; // flag to autoplay the file ( default = true )
+ t_int x_nextimage; // flag to play next image in manual mode
t_int x_priority; // priority of decoding thread
char *x_url;
t_int x_streaming; // streaming flag
+ t_int x_decoding; // decoding flag
+ t_int x_loop; // looping flag ( default = on )
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
@@ -108,6 +114,7 @@ typedef struct pdp_live_struct
AVPicture x_picture_decoded;
long long int x_pts; // presentation time stamp
long long int x_previouspts; // previous presentation time stamp
+ long long int x_firstpts; // first presentation time stamp ( time origin )
t_int x_newpicture;
/* audio structures */
@@ -137,19 +144,80 @@ static void pdp_live_threadify(t_pdp_live *x, t_floatarg fusethread )
static void pdp_live_audio(t_pdp_live *x, t_floatarg faudio )
{
- if ( ( faudio == 0.0 ) || ( faudio == 1 ) )
+ if ( ( faudio == 0. ) || ( faudio == 1. ) )
{
x->x_audio = (int)faudio;
}
}
+static void pdp_live_autoplay(t_pdp_live *x, t_floatarg fautoplay )
+{
+ if ( ( fautoplay == 0. ) || ( fautoplay == 1. ) )
+ {
+ x->x_autoplay = (int)fautoplay;
+ }
+}
+
+static void pdp_live_loop(t_pdp_live *x, t_floatarg floop )
+{
+ if ( ( floop == 0. ) || ( floop == 1. ) )
+ {
+ x->x_loop = (int)floop;
+ }
+}
+
+static void pdp_live_bang(t_pdp_live *x)
+{
+ if ( x->x_nextimage == 1 )
+ {
+ // post( "pdp_live~ : banging too fast, previous image is not decoded yet... ignored" );
+ return;
+ }
+ x->x_nextimage = 1;
+}
+
+static void pdp_live_frame_cold(t_pdp_live *x, t_floatarg frameindex)
+{
+ int frame = (int)frameindex;
+ int ret;
+ uint64_t newpts;
+
+ if (!(x->x_streaming)) return;
+
+#if FFMPEG_VERSION_INT >= 0x000409
+ if ( ( ( x->x_avcontext->iformat->flags & AVFMT_NOFILE ) == 0 ) && ( x->x_videoindex != -1 ) )
+ {
+ if ( x->x_framerate != 0 )
+ {
+ newpts = x->x_firstpts + ( frame * 1000000 ) / x->x_framerate;
+ }
+ else
+ {
+ post( "pdp_live~ : couldn't seek requested frame ( framerate = %d )", x->x_framerate );
+ return;
+ }
+ if ( ( ret = av_seek_frame(x->x_avcontext, x->x_videoindex, newpts) ) < 0 )
+ {
+ post( "pdp_live~ : couldn't seek the requested frame (ret=%d)", ret );
+ }
+ }
+#else
+ post( "pdp_live~ : no seek function with ffmpeg < 4.0.9");
+#endif
+}
+
static t_int pdp_live_decode_packet(t_pdp_live *x)
{
- t_int chunksize=0, length;
+ t_int chunksize=0, length, err, ret;
t_int audiosize, sizeout, imagesize, pictureok;
AVFrame frame;
uint8_t *pcktptr;
- struct timeval etime;
+ unsigned char *pY, *pU, *pV;
+ uint8_t *psY, *psU, *psV;
+ t_int px, py;
+ long long tplaying;
+ long long ttheoretical;
+ struct timeval ctime;
struct timespec mwait;
if ( !x->x_streaming )
@@ -159,13 +227,35 @@ static t_int pdp_live_decode_packet(t_pdp_live *x)
// post( "pdp_live~ : trying to read packet" );
// read new packet on the stream
- if (av_read_packet(x->x_avcontext, &x->x_pkt) < 0)
+ if ( x->x_streaming && av_read_packet(x->x_avcontext, &x->x_pkt) < 0)
{
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;
+ if ( x->x_loop )
+ {
+
+#if FFMPEG_VERSION_INT >= 0x000409
+
+ if ( ( x->x_avcontext->iformat->flags & AVFMT_NOFILE ) == 0 )
+ {
+ post( "pdp_live~ : looping file reading..." );
+ if ( ( ret = av_seek_frame(x->x_avcontext, x->x_videoindex, 0) ) < 0 )
+ {
+ post( "pdp_live~ : couldn't seek the requested frame (ret=%d)", ret );
+ }
+ else
+ {
+ x->x_endofstream = 0;
+ }
+ }
+
+#else
+ post( "pdp_live~ : no seek function with ffmpeg < 4.0.9");
+#endif
+ }
}
return -1;
}
@@ -182,6 +272,7 @@ static t_int pdp_live_decode_packet(t_pdp_live *x)
pcktptr = x->x_pkt.data;
while (length > 0)
{
+ if ( !x->x_streaming ) break;
switch(x->x_avcontext->streams[x->x_pkt.stream_index]->codec.codec_type)
{
case CODEC_TYPE_AUDIO:
@@ -240,7 +331,7 @@ static t_int pdp_live_decode_packet(t_pdp_live *x)
post( "pdp_live~ : audio overflow : packet ignored...");
x->x_audioin_position = 0;
}
- if ( ( x->x_audioin_position > x->x_blocksize ) && (!x->x_audioon) )
+ if ( ( x->x_audioin_position > 4*x->x_blocksize ) && (!x->x_audioon) )
{
x->x_audioon = 1;
// post( "pdp_live~ : audio on" );
@@ -253,20 +344,9 @@ static t_int pdp_live_decode_packet(t_pdp_live *x)
x->x_avcontext->streams[x->x_pkt.stream_index]->codec.height * 3) / 2; // yuv planar
x->x_framerate = x->x_avcontext->streams[x->x_pkt.stream_index]->codec.frame_rate / 10000;
+ if ( x->x_framerate == 0 ) x->x_framerate = DEFAULT_FRAME_RATE;
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;
- // post ("pdp_live~ : frame rate is %d", x->x_framerate );
-
chunksize = avcodec_decode_video(
&x->x_avcontext->streams[x->x_pkt.stream_index]->codec,
&frame, &pictureok,
@@ -304,37 +384,74 @@ 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 )
+ // create a new pdp packet from BITMAP YV12 image format
+ x->x_packet0 = pdp_packet_new_bitmap_yv12( x->x_vwidth, x->x_vheight );
+ x->x_header = pdp_packet_header(x->x_packet0);
+ x->x_data = (unsigned char *)pdp_packet_data(x->x_packet0);
+
+ pY = x->x_data;
+ pV = x->x_data+x->x_vsize;
+ pU = x->x_data+x->x_vsize+(x->x_vsize>>2);
+
+ psY = x->x_picture_decoded.data[0];
+ psU = x->x_picture_decoded.data[1];
+ psV = x->x_picture_decoded.data[2];
+
+ for ( py=0; py<x->x_vheight; py++)
+ {
+ memcpy( (void*)pY, (void*)psY, x->x_vwidth );
+ pY += x->x_vwidth;
+ psY += x->x_picture_decoded.linesize[0];
+ if ( py%2==0 )
+ {
+ memcpy( (void*)pU, (void*)psU, (x->x_vwidth>>1) );
+ memcpy( (void*)pV, (void*)psV, (x->x_vwidth>>1) );
+ pU += (x->x_vwidth>>1);
+ pV += (x->x_vwidth>>1);
+ psU += x->x_picture_decoded.linesize[1];
+ psV += x->x_picture_decoded.linesize[2];
+ }
+ }
+
+ if ( x->x_firstpts == -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
+ x->x_firstpts = x->x_pts;
}
+ x->x_previouspts = x->x_pts;
+ x->x_pts = frame.pts;
+ // post( "pdp_live : frame pts : %ld", x->x_pts );
+ if ( x->x_nbframes > 0 )
+ {
+ if ( gettimeofday(&ctime, NULL) == -1)
+ {
+ post("pdp_theorin~ : could not read time" );
+ }
+
+ tplaying = ( ctime.tv_sec-x->x_starttime.tv_sec )*1000 +
+ ( ctime.tv_usec-x->x_starttime.tv_usec )/1000;
+ ttheoretical = ((x->x_nbframes)*1000 )/x->x_framerate;
+ // post( "pdp-theorin~ : %d playing since : %lldms ( theory : %lldms )",
+ // x->x_nbframes, tplaying, ttheoretical );
+
+ if ( tplaying < ttheoretical )
+ {
+ mwait.tv_sec = 0;
+ mwait.tv_nsec = (ttheoretical - tplaying)*1000000;
+
+ // wait between the two successive frames
+ if ( x->x_autoplay ) nanosleep( &mwait, NULL );
+ }
+ }
}
break;
}
pcktptr += chunksize;
length -= chunksize;
- if ( !x->x_streaming ) break;
}
av_free_packet(&x->x_pkt);
@@ -353,18 +470,10 @@ static void *pdp_decode_stream_from_url(void *tdata)
twait.tv_sec = 0;
twait.tv_nsec = 10000000; // 10 ms
- schedprio.sched_priority = 0;
- if ( sched_setscheduler(0,SCHED_OTHER,&schedprio) == -1)
- {
- post("pdp_live~ : couldn't set scheduler for decoding thread.\n");
- }
- if ( setpriority( PRIO_PROCESS, 0, x->x_priority ) < 0 )
- {
- post("pdp_live~ : couldn't set priority to %d for decoding thread.\n", x->x_priority );
- }
- else
+ schedprio.sched_priority = sched_get_priority_min(SCHED_FIFO) + x->x_priority;
+ if ( sched_setscheduler(0,SCHED_FIFO,&schedprio) == -1)
{
- post("pdp_live~ : priority set to %d for thread %d.\n", x->x_priority, x->x_decodechild );
+ post("pdp_theorin~ : couldn't set priority for decoding thread.");
}
if ( ! (x->x_avcontext->iformat->flags & AVFMT_NOHEADER ) )
@@ -376,19 +485,27 @@ static void *pdp_decode_stream_from_url(void *tdata)
post( "pdp_live~ : read header." );
}
- while ( x->x_streaming )
+ while ( x->x_decodechild )
{
- while ( x->x_newpicture ) nanosleep( &twait, NULL );
+ if ( ( x->x_streaming ) && ( ( x->x_autoplay ) || ( x->x_nextimage == 1 ) ) )
+ {
+ x->x_decoding = 1;
+ while ( x->x_newpicture ) nanosleep( &twait, NULL );
- // decode incoming packets
- if ( pdp_live_decode_packet( x ) < 0 )
+ // decode incoming packets
+ if ( ( x->x_streaming ) && ( pdp_live_decode_packet( x ) < 0 ) )
+ {
+ nanosleep( &twait, NULL ); // nothing to read, just wait
+ }
+ x->x_nextimage = -1;
+ }
+ else
{
- nanosleep( &twait, NULL ); // nothing to read, just wait
+ x->x_decoding = 0;
+ nanosleep( &twait, NULL ); // nothing to do, just wait
}
-
}
- post( "pdp_live~ : decoding thread %d exiting....", x->x_decodechild );
x->x_decodechild = 0;
pthread_exit(NULL);
}
@@ -419,7 +536,6 @@ static void *pdp_live_connect_to_url(void *tdata)
if ( err == -5 ) post( "pdp_live~ : not enough memory" );
if ( err == -6 ) post( "pdp_live~ : unknown format ( stream not found? )" );
x->x_connectchild = 0;
- x->x_avcontext = av_mallocz(sizeof(AVFormatContext));
pthread_exit(NULL);
}
/* If not enough info to get the stream parameters, we decode the
@@ -507,11 +623,13 @@ static void *pdp_live_connect_to_url(void *tdata)
x->x_nopackets = 0;
x->x_endofstream = 0;
x->x_nbframes = 0;
+ x->x_pts = -1;
+ x->x_previouspts = -1;
+ x->x_firstpts = -1;
- x->x_connectchild = 0;
-
- if ( x->x_usethread )
+ if ( x->x_usethread && ( x->x_decodechild == 0 ))
{
+ x->x_decodechild = 1; // trick & treets
// launch decoding thread
if ( pthread_attr_init( &decode_child_attr ) < 0 )
{
@@ -556,15 +674,15 @@ static void pdp_live_disconnect(t_pdp_live *x)
{
x->x_streaming = 0;
x->x_newpicture = 0;
- post("pdp_live~ : waiting for the end of decoding thread..." );
- while ( x->x_decodechild && ( count < 100 ) )
+ post("pdp_live~ : waiting end of decoding..." );
+ while ( x->x_decoding ) nanosleep( &twait, NULL );
+ /* close each decoder */
+ for(i=0;i<x->x_avcontext->nb_streams;i++)
{
- count++;
- sleep( 1 );
- }
- if ( x->x_decodechild )
- {
- post("pdp_live~ : zombie thread, i guess" );
+ if (avcodec_close(&x->x_avcontext->streams[i]->codec) < 0)
+ {
+ post("pdp_live~ : error while closing codec for stream #%d", i);
+ }
}
post("pdp_live~ : closing input file..." );
av_close_input_file(x->x_avcontext);
@@ -631,9 +749,6 @@ static t_int *pdp_live_perform(t_int *w)
t_float *out2 = (t_float *)(w[2]); // right audio inlet
t_pdp_live *x = (t_pdp_live *)(w[3]);
int n = (int)(w[4]); // number of samples
- short int *pY, *pU, *pV;
- uint8_t *psY, *psU, *psV;
- t_int pixRGB, px, py;
short sampleL, sampleR;
struct timeval etime;
t_int sn;
@@ -650,7 +765,6 @@ static t_int *pdp_live_perform(t_int *w)
if ( x->x_audioon )
{
sn=0;
- n=n*DEFAULT_CHANNELS;
while (n--)
{
sampleL=x->x_audio_in[ sn++ ];
@@ -670,7 +784,7 @@ static t_int *pdp_live_perform(t_int *w)
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 )
+ if ( x->x_audioin_position <= 0 )
{
x->x_audioon = 0;
// post( "pdp_live~ : audio off" );
@@ -694,7 +808,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 );
+ if (x->x_streaming) outlet_float( x->x_outlet_framerate, x->x_secondcount );
x->x_secondcount = 0;
}
if ( x->x_secondcount >= x->x_framerate )
@@ -705,45 +819,13 @@ static t_int *pdp_live_perform(t_int *w)
// output image if there's a new one decoded
if ( x->x_newpicture )
{
- // create a new pdp packet from PIX_FMT_YUV420P image format
- x->x_packet0 = pdp_packet_new_image_YCrCb( x->x_vwidth, x->x_vheight );
- x->x_header = pdp_packet_header(x->x_packet0);
- x->x_data = (short int *)pdp_packet_data(x->x_packet0);
-
- pY = x->x_data;
- pV = x->x_data+x->x_vsize;
- pU = x->x_data+x->x_vsize+(x->x_vsize>>2);
-
- psY = x->x_picture_decoded.data[0];
- psU = x->x_picture_decoded.data[1];
- psV = x->x_picture_decoded.data[2];
-
- for ( py=0; py<x->x_vheight; py++)
- {
- for ( px=0; px<x->x_vwidth; px++)
- {
- *(pY) = ( *(psY+px) << 7 );
- *(pV) = ( ((*(psV+(px>>1)))-128) << 8 );
- *(pU) = ( ((*(psU+(px>>1)))-128) << 8 );
- pY++;
- if ( (px%2==0) && (py%2==0) )
- {
- pV++; pU++;
- }
- }
- psY += x->x_picture_decoded.linesize[0];
- if ( py%2==0 ) psU += x->x_picture_decoded.linesize[1];
- if ( py%2==0 ) psV += x->x_picture_decoded.linesize[2];
- }
-
pdp_packet_pass_if_valid(x->x_pdp_out, &x->x_packet0);
+ x->x_newpicture = 0;
// update streaming status
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 );
@@ -760,18 +842,19 @@ static void pdp_live_free(t_pdp_live *x)
{
int i;
+ if ( x->x_decodechild )
+ {
+ x->x_decodechild = 0;
+ x->x_decoding = 0;
+ sleep( 5 ); // let the decoding thread exiting
+ }
+
if ( x->x_streaming )
{
pdp_live_disconnect(x);
- sleep(3);
}
post( "pdp_live~ : freeing object" );
pdp_packet_mark_unused(x->x_packet0);
- if (x->x_audio_resample_ctx)
- {
- audio_resample_close(x->x_audio_resample_ctx);
- x->x_audio_resample_ctx = NULL;
- }
av_free_static();
}
@@ -783,6 +866,8 @@ void *pdp_live_new(void)
t_pdp_live *x = (t_pdp_live *)pd_new(pdp_live_class);
+ inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("frame_cold"));
+
x->x_pdp_out = outlet_new(&x->x_obj, &s_anything);
x->x_outlet_left = outlet_new(&x->x_obj, &s_signal);
@@ -796,6 +881,7 @@ void *pdp_live_new(void)
x->x_packet0 = -1;
x->x_connectchild = 0;
x->x_decodechild = 0;
+ x->x_decoding = 0;
x->x_usethread = 1;
x->x_priority = DEFAULT_PRIORITY;
x->x_framerate = DEFAULT_FRAME_RATE;
@@ -807,15 +893,19 @@ void *pdp_live_new(void)
x->x_secondcount = 0;
x->x_audio_resample_ctx = NULL;
x->x_nbvideostreams = 0;
- x->x_videoindex = 0;
+ x->x_videoindex = -1;
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_autoplay = 1;
+ x->x_loop = 1;
+ x->x_nextimage = 0;
x->x_pts = -1;
x->x_previouspts = -1;
+ x->x_firstpts = -1;
x->x_avcontext = av_mallocz(sizeof(AVFormatContext));
if ( !x->x_avcontext )
@@ -851,7 +941,11 @@ void pdp_live_tilde_setup(void)
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_autoplay, gensym("autoplay"), A_FLOAT, A_NULL);
+ class_addmethod(pdp_live_class, (t_method)pdp_live_loop, gensym("loop"), A_FLOAT, A_NULL);
class_addmethod(pdp_live_class, (t_method)pdp_live_threadify, gensym("thread"), A_FLOAT, A_NULL);
+ class_addmethod(pdp_live_class, (t_method)pdp_live_bang, gensym("bang"), A_NULL);
+ class_addmethod(pdp_live_class, (t_method)pdp_live_frame_cold, gensym("frame_cold"), A_FLOAT, A_NULL);
class_sethelpsymbol( pdp_live_class, gensym("pdp_live~.pd") );
}
diff --git a/modules/pdp_o.c b/modules/pdp_o.c
index ee5e084..30157cf 100644
--- a/modules/pdp_o.c
+++ b/modules/pdp_o.c
@@ -182,7 +182,7 @@ static void pdp_o_smoothe(t_pdp_o *x, short int *source, t_int size )
static int pdp_o_huffman(t_pdp_o *x, char *source, char *dest, t_int size, t_int *csize )
{
t_int i;
- char value = source[0];
+ int value = source[0];
char count = 0;
t_int tcount=0;
char *pcount=dest;
@@ -198,14 +198,14 @@ static int pdp_o_huffman(t_pdp_o *x, char *source, char *dest, t_int size, t_int
}
else
{
- value=source[i];
*(pcount)=count;
*(pvalue) = value;
tcount+=count;
- count=1;
pcount+=2;
pvalue+=2;
*(csize)+=2;
+ value=source[i];
+ count=1;
}
}
*(pcount)=count;
@@ -221,7 +221,7 @@ static int pdp_o_huffman(t_pdp_o *x, char *source, char *dest, t_int size, t_int
else
{
// post( "pdp_o : huffman : compression ratio %d/%d : %f (total count=%d)", size, (*csize),
- // (t_float)size/(t_float)(*csize), tcount );
+ // (t_float)size/(t_float)(*csize), tcount );
return HUFFMAN;
}
}
@@ -349,7 +349,8 @@ static void pdp_o_process_yv12(t_pdp_o *x)
{
// post( "pdp_o : y value out of range : %d", downvalue );
}
- if ( data[i] != x->x_previous_frame[i] )
+ if ( ( data[i] != x->x_previous_frame[i] ) ||
+ ( !strcmp( x->x_hpacket.tag, PDP_PACKET_TAG ) ) )
{
x->x_diff_frame[i] = (char)downvalue;
}
@@ -368,7 +369,8 @@ static void pdp_o_process_yv12(t_pdp_o *x)
{
// post( "pdp_o : y value out of range : %d", downvalue );
}
- if ( data[i] != x->x_previous_frame[i] )
+ if ( ( data[i] != x->x_previous_frame[i] ) ||
+ ( !strcmp( x->x_hpacket.tag, PDP_PACKET_TAG ) ) )
{
x->x_diff_frame[i] = (char)downvalue;
}
@@ -378,8 +380,8 @@ static void pdp_o_process_yv12(t_pdp_o *x)
}
}
- x->x_hpacket.width = x->x_vwidth;
- x->x_hpacket.height = x->x_vheight;
+ x->x_hpacket.width = htonl(x->x_vwidth);
+ x->x_hpacket.height = htonl(x->x_vheight);
if ( gettimeofday(&x->x_hpacket.etime, NULL) == -1)
{
post("pdp_o : could not set emit time" );
@@ -391,13 +393,16 @@ static void pdp_o_process_yv12(t_pdp_o *x)
x->x_bandwidthcount = 0;
}
+ x->x_hpacket.etime.tv_sec = htonl( x->x_hpacket.etime.tv_sec );
+ x->x_hpacket.etime.tv_usec = htonl( x->x_hpacket.etime.tv_usec );
+
// do not send the frame if too many frames
// have been sent in the current second
if ( x->x_secondcount < x->x_framerate )
{
// try a huffman coding
- x->x_hpacket.encoding = pdp_o_huffman(x, x->x_diff_frame, x->x_hdata, x->x_vsize+(x->x_vsize>>1), &x->x_hsize );
+ x->x_hpacket.encoding = htonl( pdp_o_huffman(x, x->x_diff_frame, x->x_hdata, x->x_vsize+(x->x_vsize>>1), &x->x_hsize ) );
x->x_hpacket.clength = (x->x_vsize+(x->x_vsize>>1))*1.01+600;
// compress the graphic data
@@ -415,6 +420,7 @@ static void pdp_o_process_yv12(t_pdp_o *x)
memcpy( x->x_previous_frame, data, (x->x_vsize+(x->x_vsize>>1))<<1 );
// send header
+ x->x_hpacket.clength = htonl( x->x_hpacket.clength );
count = send(x->x_fd, &x->x_hpacket, sizeof(x->x_hpacket), MSG_NOSIGNAL);
if(count < 0)
{
@@ -430,6 +436,7 @@ static void pdp_o_process_yv12(t_pdp_o *x)
}
x->x_bandwidthcount += count/1024;
}
+ x->x_hpacket.clength = ntohl( x->x_hpacket.clength );
// send data
count = send(x->x_fd, x->x_cdata, x->x_hpacket.clength, MSG_NOSIGNAL);
diff --git a/modules/pdp_ocanvas.c b/modules/pdp_ocanvas.c
index c92253b..598821e 100644
--- a/modules/pdp_ocanvas.c
+++ b/modules/pdp_ocanvas.c
@@ -53,6 +53,7 @@ typedef struct pdp_ocanvas_struct
t_int *x_heights;
t_float *x_xoffsets;
t_float *x_yoffsets;
+ t_float *x_alphas;
t_int *x_sizes;
t_int x_owidth;
@@ -105,7 +106,7 @@ static void pdp_ocanvas_process_yv12(t_pdp_ocanvas *x)
piU = idata+x->x_sizes[ii]+(x->x_sizes[ii]>>2);
ppx = px-(int)x->x_xoffsets[ii];
ppy = py-(int)x->x_yoffsets[ii];
- *(pY+py*x->x_owidth+px) += *(piY+ppy*x->x_widths[ii]+ppx);
+ *(pY+py*x->x_owidth+px) += *(piY+ppy*x->x_widths[ii]+ppx)*x->x_alphas[ii];
if ( (px%2==0) && (py%2==0) )
{
*(pU+(py>>1)*(x->x_owidth>>1)+(px>>1)) +=
@@ -175,6 +176,21 @@ static void pdp_ocanvas_offset(t_pdp_ocanvas *x, t_floatarg ni, t_floatarg xoffs
x->x_yoffsets[(int)ni-1] = yoffset;
}
+static void pdp_ocanvas_alpha(t_pdp_ocanvas *x, t_floatarg ni, t_floatarg xalpha)
+{
+ if ( ( ni < 1 ) || ( ni > x->x_nbinputs ) )
+ {
+ post( "pdp_ocanvas : alpha : wrong source : %d : must be between 1 and %d", ni, x->x_nbinputs );
+ return;
+ }
+ if ( ( xalpha < .0 ) || ( xalpha > 1.0 ) )
+ {
+ post( "pdp_ocanvas : alpha : wrong alpha value : %f : must be between 0 and 1", xalpha );
+ return;
+ }
+ x->x_alphas[(int)ni-1] = xalpha;
+}
+
static void pdp_ocanvas_select(t_pdp_ocanvas *x, t_floatarg X, t_floatarg Y)
{
t_int ii;
@@ -324,6 +340,7 @@ static void pdp_ocanvas_free(t_pdp_ocanvas *x)
if ( x->x_sizes ) freebytes( x->x_sizes, x->x_nbinputs*sizeof(t_int) );
if ( x->x_xoffsets ) freebytes( x->x_xoffsets, x->x_nbinputs*sizeof(t_float) );
if ( x->x_yoffsets ) freebytes( x->x_yoffsets, x->x_nbinputs*sizeof(t_float) );
+ if ( x->x_alphas ) freebytes( x->x_alphas, x->x_nbinputs*sizeof(t_float) );
}
t_class *pdp_ocanvas_class;
@@ -381,6 +398,7 @@ void *pdp_ocanvas_new(t_symbol *s, int argc, t_atom *argv)
x->x_sizes = ( t_int* ) getbytes( x->x_nbinputs*sizeof(t_int) );
x->x_xoffsets = ( t_float* ) getbytes( x->x_nbinputs*sizeof(t_float) );
x->x_yoffsets = ( t_float* ) getbytes( x->x_nbinputs*sizeof(t_float) );
+ x->x_alphas = ( t_float* ) getbytes( x->x_nbinputs*sizeof(t_float) );
x->x_opacket = pdp_packet_new_image_YCrCb( x->x_owidth, x->x_oheight );
@@ -391,6 +409,7 @@ void *pdp_ocanvas_new(t_symbol *s, int argc, t_atom *argv)
x->x_packets[ii] = -1;
x->x_xoffsets[ii] = 0.;
x->x_yoffsets[ii] = 0.;
+ x->x_alphas[ii] = 1.;
}
x->x_current = -1;
x->x_average = 0;
@@ -426,6 +445,7 @@ void pdp_ocanvas_setup(void)
class_addmethod(pdp_ocanvas_class, (t_method)pdp_ocanvas_input8, gensym("pdp8"), A_SYMBOL, A_DEFFLOAT, A_NULL);
class_addmethod(pdp_ocanvas_class, (t_method)pdp_ocanvas_input9, gensym("pdp9"), A_SYMBOL, A_DEFFLOAT, A_NULL);
class_addmethod(pdp_ocanvas_class, (t_method)pdp_ocanvas_offset, gensym("offset"), A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, A_NULL);
+ class_addmethod(pdp_ocanvas_class, (t_method)pdp_ocanvas_alpha, gensym("alpha"), A_DEFFLOAT, A_DEFFLOAT, A_NULL);
class_addmethod(pdp_ocanvas_class, (t_method)pdp_ocanvas_select, gensym("select"), A_DEFFLOAT, A_DEFFLOAT, A_NULL);
class_addmethod(pdp_ocanvas_class, (t_method)pdp_ocanvas_drag, gensym("drag"), A_DEFFLOAT, A_DEFFLOAT, A_NULL);
class_addmethod(pdp_ocanvas_class, (t_method)pdp_ocanvas_unselect, gensym("unselect"), A_NULL);
diff --git a/modules/pdp_pen.c b/modules/pdp_pen.c
index dad5167..6aa263c 100644
--- a/modules/pdp_pen.c
+++ b/modules/pdp_pen.c
@@ -52,6 +52,7 @@ typedef struct pdp_pen_struct
t_int x_blue;
t_int x_xoffset;
t_int x_yoffset;
+ t_float x_alpha;
t_int x_pwidth;
t_int x_mode; // 0=draw ( default), 1=erase
@@ -317,6 +318,14 @@ static void pdp_pen_yoffset(t_pdp_pen *x, t_floatarg yoffset)
x->x_yoffset = (int) yoffset;
}
+static void pdp_pen_alpha(t_pdp_pen *x, t_floatarg falpha)
+{
+ if ( falpha >= 0. && falpha <= 1. )
+ {
+ x->x_alpha = falpha;
+ }
+}
+
static void pdp_pen_mode(t_pdp_pen *x, t_floatarg mode)
{
if ( ( mode == 0. ) || ( mode == 1. ) )
@@ -394,11 +403,15 @@ static void pdp_pen_process_yv12(t_pdp_pen *x)
{
if ( *(pbY+(py-x->x_yoffset)*x->x_vwidth+(px-x->x_xoffset)) != 0 )
{
- *(pnY+py*x->x_vwidth+px) = *(pbY+(py-x->x_yoffset)*x->x_vwidth+(px-x->x_xoffset));
+ *(pnY+py*x->x_vwidth+px) =
+ (*(pbY+(py-x->x_yoffset)*x->x_vwidth+(px-x->x_xoffset))*x->x_alpha) +
+ (*(pnY+py*x->x_vwidth+px)*(1-x->x_alpha));
*(pnU+(py>>1)*(x->x_vwidth>>1)+(px>>1)) =
- *(pbU+((py-x->x_yoffset)>>1)*(x->x_vwidth>>1)+((px-x->x_xoffset)>>1));
+ (*(pbU+((py-x->x_yoffset)>>1)*(x->x_vwidth>>1)+((px-x->x_xoffset)>>1))*x->x_alpha) +
+ (*(pnU+(py>>1)*(x->x_vwidth>>1)+(px>>1))*(1-x->x_alpha));
*(pnV+(py>>1)*(x->x_vwidth>>1)+(px>>1)) =
- *(pbV+((py-x->x_yoffset)>>1)*(x->x_vwidth>>1)+((px-x->x_xoffset)>>1));
+ (*(pbV+((py-x->x_yoffset)>>1)*(x->x_vwidth>>1)+((px-x->x_xoffset)>>1))*x->x_alpha) +
+ (*(pnV+(py>>1)*(x->x_vwidth>>1)+(px>>1))*(1-x->x_alpha));
}
}
}
@@ -482,6 +495,7 @@ void *pdp_pen_new(void)
x->x_outlet0 = outlet_new(&x->x_obj, &s_anything);
inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("xoffset"));
inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("yoffset"));
+ inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("alpha"));
x->x_packet0 = -1;
x->x_packet1 = -1;
@@ -498,6 +512,7 @@ void *pdp_pen_new(void)
x->x_pwidth = 3;
x->x_mode = 0;
+ x->x_alpha = 1.;
return (void *)x;
}
@@ -525,6 +540,7 @@ void pdp_pen_setup(void)
class_addmethod(pdp_pen_class, (t_method)pdp_pen_mode, gensym("mode"), A_DEFFLOAT, A_NULL);
class_addmethod(pdp_pen_class, (t_method)pdp_pen_xoffset, gensym("xoffset"), A_DEFFLOAT, A_NULL);
class_addmethod(pdp_pen_class, (t_method)pdp_pen_yoffset, gensym("yoffset"), A_DEFFLOAT, A_NULL);
+ class_addmethod(pdp_pen_class, (t_method)pdp_pen_alpha, gensym("alpha"), A_DEFFLOAT, A_NULL);
}
diff --git a/modules/pdp_rec~.c b/modules/pdp_rec~.c
index 2a0d68e..5b217dd 100644
--- a/modules/pdp_rec~.c
+++ b/modules/pdp_rec~.c
@@ -445,8 +445,8 @@ static t_int *pdp_rec_perform(t_int *w)
if (fsample < -1.0) { fsample = -1.0; }
isample=(short) (32767.0 * fsample);
x->x_audio_buf[1][x->x_audioin_position]=isample;
- 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 )
+ x->x_audioin_position=(x->x_audioin_position+1)%(MAX_AUDIO_PACKET_SIZE);
+ if ( x->x_audioin_position == MAX_AUDIO_PACKET_SIZE-1 )
{
post( "pdp_rec~ : reaching end of audio buffer" );
}
@@ -624,6 +624,7 @@ static void pdp_rec_free(t_pdp_rec *x)
pdp_packet_mark_unused(x->x_packet0);
// close video file if existing
pdp_rec_close(x);
+ pdp_rec_free_ressources(x);
for ( i=0; i<x->x_channels; i++)
{
if ( x->x_audio_buf[i] ) freebytes( x->x_audio_buf[i], MAX_AUDIO_PACKET_SIZE*sizeof(int16_t) );
diff --git a/modules/pdp_shape.c b/modules/pdp_shape.c
index 27239c4..5f21518 100644
--- a/modules/pdp_shape.c
+++ b/modules/pdp_shape.c
@@ -26,7 +26,7 @@
#include "yuv.h"
#include <math.h>
-static char *pdp_shape_version = "pdp_shape: version 0.1, shape recongnition object written by Yves Degoyon (ydegoyon@free.fr)";
+static char *pdp_shape_version = "pdp_shape: version 0.1, shape recognition object written by Yves Degoyon (ydegoyon@free.fr)";
typedef struct pdp_shape_struct
{
@@ -79,15 +79,15 @@ static void pdp_shape_allocate(t_pdp_shape *x, t_int newsize)
{
int i;
- if ( x->x_bdata ) freebytes( x->x_bdata, (( x->x_vsize + (x->x_vsize>>1))<<1));
- if ( x->x_bbdata ) freebytes( x->x_bbdata, (( x->x_vsize + (x->x_vsize>>1))<<1));
- if ( x->x_checked ) freebytes( x->x_checked, x->x_vsize );
+ if ( x->x_bdata ) free( x->x_bdata );
+ if ( x->x_bbdata ) free( x->x_bbdata );
+ if ( x->x_checked ) free( x->x_checked );
x->x_vsize = newsize;
- x->x_bdata = (short int *)getbytes((( x->x_vsize + (x->x_vsize>>1))<<1));
- x->x_bbdata = (short int *)getbytes((( x->x_vsize + (x->x_vsize>>1))<<1));
- x->x_checked = (char *)getbytes( x->x_vsize );
+ x->x_bdata = (short int *)malloc((( x->x_vsize + (x->x_vsize>>1))<<1));
+ x->x_bbdata = (short int *)malloc((( x->x_vsize + (x->x_vsize>>1))<<1));
+ x->x_checked = (char *)malloc( x->x_vsize );
}
static void pdp_shape_tolerance(t_pdp_shape *x, t_floatarg ftolerance )
@@ -451,12 +451,15 @@ static void pdp_shape_process_yv12(t_pdp_shape *x)
if ( x->x_cursX != -1 ) pdp_shape_frame_detect( x, x->x_cursX, x->x_cursY );
// paint cursor in red for debug purpose
- pbbY = x->x_bbdata;
- pbbU = (x->x_bbdata+x->x_vsize);
- pbbV = (x->x_bbdata+x->x_vsize+(x->x_vsize>>2));
- *(pbbY+x->x_cursY*x->x_vwidth+x->x_cursX) = (yuv_RGBtoY( 0xff ))<<7;
- *(pbbU+(x->x_cursY>>1)*(x->x_vwidth>>1)+(x->x_cursX>>1)) = ((yuv_RGBtoU( 0xff )-128)<<8);
- *(pbbV+(x->x_cursY>>1)*(x->x_vwidth>>1)+(x->x_cursX>>1)) = ((yuv_RGBtoV( 0xff )-128)<<8);
+ if ( x->x_cursX != -1 )
+ {
+ pbbY = x->x_bbdata;
+ pbbU = (x->x_bbdata+x->x_vsize);
+ pbbV = (x->x_bbdata+x->x_vsize+(x->x_vsize>>2));
+ *(pbbY+x->x_cursY*x->x_vwidth+x->x_cursX) = (yuv_RGBtoY( 0xff ))<<7;
+ *(pbbU+(x->x_cursY>>1)*(x->x_vwidth>>1)+(x->x_cursX>>1)) = ((yuv_RGBtoU( 0xff )-128)<<8);
+ *(pbbV+(x->x_cursY>>1)*(x->x_vwidth>>1)+(x->x_cursX>>1)) = ((yuv_RGBtoV( 0xff )-128)<<8);
+ }
memcpy( newdata, x->x_bbdata, (x->x_vsize+(x->x_vsize>>1))<<1 );
diff --git a/modules/pdp_text.c b/modules/pdp_text.c
index d4eef94..5d2d633 100644
--- a/modules/pdp_text.c
+++ b/modules/pdp_text.c
@@ -60,6 +60,7 @@ typedef struct pdp_text_struct
t_int *x_g;
t_int *x_b;
t_float *x_angle;
+ t_float x_alpha;
t_int *x_scroll;
t_int x_nbtexts;
@@ -154,7 +155,7 @@ static void pdp_text_add(t_pdp_text *x, t_symbol *s, int argc, t_atom *argv)
{
x->x_angle[x->x_nbtexts] = argv[6].a_w.w_float;
}
- if ( (argc>=8) && (argv[7].a_type == A_FLOAT) )
+ if ( (argc>=8) && (argv[7].a_type == A_FLOAT) )
{
x->x_scroll[x->x_nbtexts] = (int)argv[7].a_w.w_float;
}
@@ -224,6 +225,14 @@ static void pdp_text_angle(t_pdp_text *x, t_floatarg fangle )
}
}
+static void pdp_text_alpha(t_pdp_text *x, t_floatarg falpha )
+{
+ if ( ( falpha >= 0. ) && ( falpha <= 1. ) )
+ {
+ x->x_alpha = falpha;
+ }
+}
+
static void pdp_text_scroll(t_pdp_text *x, t_floatarg fscroll )
{
if ( ( x->x_current >= 0 ) && ( x->x_current < x->x_nbtexts ) )
@@ -456,11 +465,11 @@ static void pdp_text_process_yv12(t_pdp_text *x)
u = yuv_RGBtoU(imdata[py*x->x_vwidth+px]);
v = yuv_RGBtoV(imdata[py*x->x_vwidth+px]);
- *(pY) = y<<7;
+ *(pY) = ((y)<<7)*x->x_alpha + (*pY)*(1-x->x_alpha);
if ( (px%2==0) && (py%2==0) )
{
- *(pV) = (v-128)<<8;
- *(pU) = (u-128)<<8;
+ *(pV) = ((v-128)<<8)*x->x_alpha + *(pV)*(1-x->x_alpha);
+ *(pU) = ((u-128)<<8)*x->x_alpha + *(pU)*(1-x->x_alpha);
}
}
pY++;
@@ -557,6 +566,7 @@ void *pdp_text_new(void)
inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("textb"));
inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("angle"));
inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("scroll"));
+ inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("alpha"));
x->x_outlet0 = outlet_new(&x->x_obj, &s_anything);
x->x_packet0 = -1;
@@ -585,6 +595,7 @@ void *pdp_text_new(void)
x->x_nbtexts = 0;
x->x_current = -1;
+ x->x_alpha = 1.;
return (void *)x;
}
@@ -618,6 +629,7 @@ void pdp_text_setup(void)
class_addmethod(pdp_text_class, (t_method)pdp_text_resize, gensym("resize"), A_DEFFLOAT, A_NULL);
class_addmethod(pdp_text_class, (t_method)pdp_text_font, gensym("font"), A_SYMBOL, A_NULL);
class_addmethod(pdp_text_class, (t_method)pdp_text_angle, gensym("angle"), A_DEFFLOAT, A_NULL);
+ class_addmethod(pdp_text_class, (t_method)pdp_text_alpha, gensym("alpha"), A_DEFFLOAT, A_NULL);
class_addmethod(pdp_text_class, (t_method)pdp_text_scroll, gensym("scroll"), A_DEFFLOAT, A_NULL);
class_addmethod(pdp_text_class, (t_method)pdp_text_dither, gensym("dither"), A_DEFFLOAT, A_NULL);
class_addmethod(pdp_text_class, (t_method)pdp_text_blend, gensym("blend"), A_DEFFLOAT, A_NULL);
diff --git a/modules/pdp_underwatch.c b/modules/pdp_underwatch.c
index 674582f..c999ceb 100644
--- a/modules/pdp_underwatch.c
+++ b/modules/pdp_underwatch.c
@@ -73,19 +73,12 @@ static void pdp_underwatch_process_yv12(t_pdp_underwatch *x)
short int *p=0, *po=0, *pu=0, *pv=0, *pou=0, *pov=0;
int i;
- unsigned int u_offset;
- unsigned int v_offset;
- unsigned int totnbpixels;
int px, py, pd, t;
x->x_vwidth = header->info.image.width;
x->x_vheight = header->info.image.height;
x->x_vsize = x->x_vwidth*x->x_vheight;
- u_offset = x->x_vsize;
- v_offset = x->x_vsize + (x->x_vsize>>2);
- totnbpixels = x->x_vsize + (x->x_vsize>>1);
-
newheader->info.image.encoding = header->info.image.encoding;
newheader->info.image.width = x->x_vwidth;
newheader->info.image.height = x->x_vheight;
diff --git a/modules/pdp_yqt.c b/modules/pdp_yqt.c
index d0ada83..8795f77 100644
--- a/modules/pdp_yqt.c
+++ b/modules/pdp_yqt.c
@@ -237,7 +237,7 @@ static void pdp_yqt_bang(t_pdp_yqt *x)
if ( gettimeofday(&etime, NULL) == -1)
{
- post("pdp_fcqt : could not get time" );
+ post("pdp_yqt : could not get time" );
}
if ( etime.tv_sec != x->x_cursec )
{
@@ -248,7 +248,6 @@ static void pdp_yqt_bang(t_pdp_yqt *x)
x->x_framescount++;
outlet_float(x->x_curframe, (float)pos);
- pdp_packet_pass_if_valid(x->x_outlet0, &object);
// fills in the audio buffer with a chunk if necessary
if ( x->x_audio && x->x_outunread < MIN_AUDIO_INPUT )
@@ -285,6 +284,8 @@ static void pdp_yqt_bang(t_pdp_yqt *x)
}
}
+ pdp_packet_pass_if_valid(x->x_outlet0, &object);
+
}
static void pdp_yqt_loop(t_pdp_yqt *x, t_floatarg loop)
diff --git a/patches/help_pdp-tatiana.pd b/patches/help_pdp-tatiana.pd
index b1382ea..f73a5ef 100644
--- a/patches/help_pdp-tatiana.pd
+++ b/patches/help_pdp-tatiana.pd
@@ -1,481 +1,509 @@
-#N canvas 4 0 986 675 10;
-#X msg 143 146 loop \$1;
-#X msg 63 170 open \$1;
-#X floatatom 215 155 5 0 0 0 - - -;
-#X obj 260 113 metro 70;
-#X obj 168 186 pdp_yqt;
-#X obj 316 188 pdp_v4l;
-#X obj 315 161 metro 70;
-#X obj 453 120 bng 15 250 50 0 empty webcam1 empty 20 8 0 8 -262144
+#N canvas 4 0 780 312 10;
+#X msg 157 21 loop \$1;
+#X msg 77 45 open \$1;
+#X floatatom 229 30 5 0 0 0 - - -;
+#X obj 274 -12 metro 70;
+#X obj 182 61 pdp_yqt;
+#X obj 330 63 pdp_v4l;
+#X obj 329 36 metro 70;
+#X obj 467 -5 bng 15 250 50 0 empty webcam1 empty 20 8 0 8 -262144
-1 -1;
-#X msg 470 188 stop;
-#X msg 518 163 open /dev/video;
-#X obj 102 219 tgl 15 0 empty aging empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 29 228 pdp_spigot;
-#X text 419 119 Live;
-#X obj 226 220 tgl 15 0 empty baltan empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 151 233 pdp_spigot;
-#X floatatom 28 278 5 0 0 0 - ag1 -;
-#X floatatom 69 279 5 0 0 0 - ag2 -;
-#X obj 28 255 pdp_aging;
-#X obj 153 255 pdp_baltan;
-#X floatatom 153 274 10 0 0 0 - balt1 -;
-#X obj 339 221 tgl 15 0 empty edge empty 0 -6 0 8 -262144 -1 -1 0 1
+#X msg 484 63 stop;
+#X msg 532 38 open /dev/video;
+#X obj 116 94 tgl 15 0 empty aging empty 0 -6 0 8 -262144 -1 -1 0 1
;
-#X obj 267 232 pdp_spigot;
-#X obj 265 255 pdp_edge;
-#X obj 448 220 tgl 15 0 empty intr1 empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 375 231 pdp_spigot;
-#X msg 389 282 bang;
-#X floatatom 424 283 5 0 0 0 - intr2 -;
-#X obj 375 253 pdp_intrusion;
-#X obj 556 219 tgl 15 0 empty lens empty 0 -6 0 8 -262144 -1 -1 0 1
+#X obj 43 103 pdp_spigot;
+#X text 433 -6 Live;
+#X obj 240 95 tgl 15 0 empty baltan empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 165 108 pdp_spigot;
+#X floatatom 42 153 5 0 0 0 - ag1 -;
+#X floatatom 83 154 5 0 0 0 - ag2 -;
+#X obj 42 130 pdp_aging;
+#X obj 167 130 pdp_baltan;
+#X floatatom 167 149 10 0 0 0 - balt1 -;
+#X obj 353 96 tgl 15 0 empty edge empty 0 -6 0 8 -262144 -1 -1 0 1
;
-#X obj 484 228 pdp_spigot;
-#X obj 484 252 pdp_lens;
-#X floatatom 483 276 5 0 0 0 - - -;
-#X floatatom 522 276 5 0 0 0 - - -;
-#X floatatom 483 291 5 0 0 0 - - -;
-#X floatatom 522 291 5 0 0 0 - - -;
-#X obj 551 252 tgl 15 0 empty lensmove empty 0 -6 0 8 -262144 -1 -1
+#X obj 281 107 pdp_spigot;
+#X obj 279 130 pdp_edge;
+#X obj 462 95 tgl 15 0 empty intr1 empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X obj 389 106 pdp_spigot;
+#X msg 403 157 bang;
+#X floatatom 438 158 5 0 0 0 - intr2 -;
+#X obj 389 128 pdp_intrusion;
+#X obj 570 94 tgl 15 0 empty lens empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X obj 498 103 pdp_spigot;
+#X obj 498 127 pdp_lens;
+#X floatatom 497 151 5 0 0 0 - - -;
+#X floatatom 536 151 5 0 0 0 - - -;
+#X floatatom 497 166 5 0 0 0 - - -;
+#X floatatom 536 166 5 0 0 0 - - -;
+#X obj 565 127 tgl 15 0 empty lensmove empty 0 -6 0 8 -262144 -1 -1
0 1;
-#X obj 670 217 tgl 15 0 empty mosaic empty 0 -6 0 8 -262144 -1 -1 0
+#X obj 684 92 tgl 15 0 empty mosaic empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X obj 599 228 pdp_spigot;
-#X msg 600 269 bang;
-#X obj 600 250 pdp_mosaic;
-#X floatatom 637 271 5 0 0 0 - mosaic2 -;
-#X obj 745 304 tgl 15 0 empty nervous empty 0 -6 0 8 -262144 -1 -1
+#X obj 613 103 pdp_spigot;
+#X msg 614 144 bang;
+#X obj 614 125 pdp_mosaic;
+#X floatatom 651 146 5 0 0 0 - mosaic2 -;
+#X obj 759 179 tgl 15 0 empty nervous empty 0 -6 0 8 -262144 -1 -1
0 1;
-#X obj 674 315 pdp_spigot;
-#X obj 675 337 pdp_nervous;
-#X obj 676 360 tgl 15 0 empty nervous1 empty 0 -6 0 8 -262144 -1 -1
+#X obj 688 190 pdp_spigot;
+#X obj 689 212 pdp_nervous;
+#X obj 690 235 tgl 15 0 empty nervous1 empty 0 -6 0 8 -262144 -1 -1
0 1;
-#X obj 566 309 tgl 15 0 empty quark empty 0 -6 0 8 -262144 -1 -1 0
+#X obj 580 184 tgl 15 0 empty quark empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X obj 494 320 pdp_spigot;
-#X obj 494 343 pdp_quark;
-#X obj 454 308 tgl 15 0 empty radiac empty 0 -6 0 8 -262144 -1 -1 0
+#X obj 508 195 pdp_spigot;
+#X obj 508 218 pdp_quark;
+#X obj 468 183 tgl 15 0 empty radiac empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X obj 381 318 pdp_spigot;
-#X floatatom 382 380 5 0 0 0 - radi1 -;
-#X obj 381 341 pdp_radioactiv;
-#X obj 381 363 hdl 15 1 0 4 empty empty empty 0 -6 0 8 -262144 -1 -1
+#X obj 395 193 pdp_spigot;
+#X floatatom 396 255 5 0 0 0 - radi1 -;
+#X obj 395 216 pdp_radioactiv;
+#X obj 395 238 hdl 15 1 0 4 empty empty empty 0 -6 0 8 -262144 -1 -1
0;
-#X floatatom 426 379 5 0 0 0 - radi2 -;
-#X obj 349 308 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 278 319 pdp_spigot;
-#X floatatom 275 360 5 0 0 0 - rev1 -;
-#X floatatom 316 360 5 0 0 0 - rev2 -;
-#X floatatom 275 375 5 0 0 0 - rev3 -;
-#X floatatom 316 377 5 0 0 0 - rev4 -;
-#X obj 278 341 pdp_rev;
-#X obj 235 303 tgl 15 0 empty ripple empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 164 316 pdp_spigot;
-#X msg 177 363 bang;
-#X obj 161 365 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 164 343 pdp_ripple;
-#X floatatom 160 382 5 0 0 0 - rip1 -;
-#X floatatom 199 381 5 0 0 0 - rip2 -;
-#X obj 116 302 tgl 15 0 empty simura empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 43 312 pdp_spigot;
-#X obj 43 336 pdp_simura;
-#X floatatom 41 374 5 0 0 0 - simura2 -;
-#X obj 28 356 hdl 15 1 0 9 empty empty empty 0 -6 0 8 -262144 -1 -1
+#X floatatom 440 254 5 0 0 0 - radi2 -;
+#X obj 363 183 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 292 194 pdp_spigot;
+#X floatatom 289 235 5 0 0 0 - rev1 -;
+#X floatatom 330 235 5 0 0 0 - rev2 -;
+#X floatatom 289 250 5 0 0 0 - rev3 -;
+#X floatatom 330 252 5 0 0 0 - rev4 -;
+#X obj 292 216 pdp_rev;
+#X obj 249 178 tgl 15 0 empty ripple empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 178 191 pdp_spigot;
+#X msg 191 238 bang;
+#X obj 175 240 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 178 218 pdp_ripple;
+#X floatatom 174 257 5 0 0 0 - rip1 -;
+#X floatatom 213 256 5 0 0 0 - rip2 -;
+#X obj 130 177 tgl 15 0 empty simura empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 57 187 pdp_spigot;
+#X obj 57 211 pdp_simura;
+#X floatatom 55 249 5 0 0 0 - simura2 -;
+#X obj 42 231 hdl 15 1 0 9 empty empty empty 0 -6 0 8 -262144 -1 -1
0;
-#X obj 97 398 tgl 15 0 empty spiral empty 0 -6 0 8 -262144 -1 -1 0
+#X obj 111 273 tgl 15 0 empty spiral empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X obj 25 409 pdp_spigot;
-#X floatatom 25 466 5 0 0 0 - spi1 -;
-#X obj 19 447 hdl 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1 -1
+#X obj 39 284 pdp_spigot;
+#X floatatom 39 341 5 0 0 0 - spi1 -;
+#X obj 33 322 hdl 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1 -1
0;
-#X floatatom 66 465 5 0 0 0 - spi2 -;
-#X floatatom 110 466 5 0 0 0 - spi3 -;
-#X floatatom 26 484 5 0 0 0 - spi4 -;
-#X floatatom 67 483 5 0 0 0 - spi5 -;
-#X obj 110 481 tgl 15 0 empty spi6 empty 0 -6 0 8 -262144 -1 -1 0 1
+#X floatatom 80 340 5 0 0 0 - spi2 -;
+#X floatatom 124 341 5 0 0 0 - spi3 -;
+#X floatatom 40 359 5 0 0 0 - spi4 -;
+#X floatatom 81 358 5 0 0 0 - spi5 -;
+#X obj 124 356 tgl 15 0 empty spi6 empty 0 -6 0 8 -262144 -1 -1 0 1
;
-#X obj 129 481 tgl 15 0 empty spi7 empty 0 -6 0 8 -262144 -1 -1 0 1
+#X obj 143 356 tgl 15 0 empty spi7 empty 0 -6 0 8 -262144 -1 -1 0 1
;
-#X obj 25 430 pdp_spiral;
-#X obj 236 397 tgl 15 0 empty under empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 164 408 pdp_spigot;
-#X floatatom 163 448 5 0 0 0 - under2 -;
-#X obj 163 426 pdp_underwatch;
-#X obj 358 397 tgl 15 0 empty verti empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 285 408 pdp_spigot;
-#X obj 481 398 tgl 15 0 empty warh1 empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 408 409 pdp_spigot;
-#X obj 599 400 tgl 15 0 empty warp1 empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 529 409 pdp_spigot;
-#X obj 284 426 pdp_vertigo;
-#X floatatom 283 446 5 0 0 0 - verti1 -;
-#X floatatom 322 446 5 0 0 0 - verti2 -;
-#X floatatom 408 450 5 0 0 0 - warh2 -;
-#X obj 408 430 pdp_warhol;
-#X floatatom 452 450 5 0 0 0 - warh3 -;
-#X obj 408 466 hdl 15 1 0 9 empty empty empty 0 -6 0 8 -262144 -1 -1
+#X obj 39 305 pdp_spiral;
+#X obj 250 272 tgl 15 0 empty under empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 178 283 pdp_spigot;
+#X floatatom 177 323 5 0 0 0 - under2 -;
+#X obj 177 301 pdp_underwatch;
+#X obj 372 272 tgl 15 0 empty verti empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 299 283 pdp_spigot;
+#X obj 495 273 tgl 15 0 empty warh1 empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 422 284 pdp_spigot;
+#X obj 613 275 tgl 15 0 empty warp1 empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 543 284 pdp_spigot;
+#X obj 298 301 pdp_vertigo;
+#X floatatom 297 321 5 0 0 0 - verti1 -;
+#X floatatom 336 321 5 0 0 0 - verti2 -;
+#X floatatom 422 325 5 0 0 0 - warh2 -;
+#X obj 422 305 pdp_warhol;
+#X floatatom 466 325 5 0 0 0 - warh3 -;
+#X obj 422 341 hdl 15 1 0 9 empty empty empty 0 -6 0 8 -262144 -1 -1
0;
-#X floatatom 410 484 5 0 0 0 - warh4 -;
-#X floatatom 450 484 5 0 0 0 - warh5 -;
-#X floatatom 490 484 5 0 0 0 - warh6 -;
-#X obj 529 446 tgl 15 0 empty warp2 empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X floatatom 547 447 5 0 0 0 - warp3 -;
-#X obj 529 429 pdp_warp;
-#X obj 700 402 tgl 15 0 empty cyc1 empty 0 -6 0 8 -262144 -1 -1 0 1
+#X floatatom 424 359 5 0 0 0 - warh4 -;
+#X floatatom 464 359 5 0 0 0 - warh5 -;
+#X floatatom 504 359 5 0 0 0 - warh6 -;
+#X obj 543 321 tgl 15 0 empty warp2 empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X floatatom 561 322 5 0 0 0 - warp3 -;
+#X obj 543 304 pdp_warp;
+#X obj 714 277 tgl 15 0 empty cyc1 empty 0 -6 0 8 -262144 -1 -1 0 1
;
-#X obj 631 412 pdp_spigot;
-#X floatatom 499 126 5 0 0 0 - - -;
-#X floatatom 403 650 5 0 0 0 - - -;
-#X msg 485 583 open /tmp/output.mov;
-#X msg 485 602 start;
-#X msg 485 622 stop;
-#X msg 164 689 cursor \$1;
-#X obj 174 671 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 3 604 pdp_zoom;
-#X floatatom 45 565 5 0 0 0 - - -;
-#X obj 120 509 hsl 300 15 0.01 100 1 1 empty empty empty -2 -6 0 8
+#X obj 645 287 pdp_spigot;
+#X floatatom 513 1 5 0 0 0 - - -;
+#X floatatom 417 525 5 0 0 0 - - -;
+#X msg 499 458 open /tmp/output.mov;
+#X msg 499 477 start;
+#X msg 499 497 stop;
+#X msg 178 564 cursor \$1;
+#X obj 188 546 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 17 479 pdp_zoom;
+#X floatatom 59 440 5 0 0 0 - - -;
+#X obj 134 384 hsl 300 15 0.01 100 1 1 empty zoomtot empty -2 -6 0
+8 -262144 -1 -1 14950 1;
+#X floatatom 108 482 5 0 0 0 - - -;
+#X obj 128 429 hsl 300 15 0.01 100 1 1 empty zoomh empty -2 -6 0 8
+-262144 -1 -1 14950 1;
+#X msg 15 546 zoomx \$1;
+#X msg 144 482 zoomy \$1;
+#X floatatom 109 460 5 0 0 0 - - -;
+#X obj 133 405 hsl 300 15 0.01 100 1 1 empty zoomv empty -2 -6 0 8
-262144 -1 -1 14950 1;
-#X floatatom 94 607 5 0 0 0 - - -;
-#X obj 114 554 hsl 300 15 0.01 100 1 1 empty empty empty -2 -6 0 8
--262144 -1 -1 14200 1;
-#X msg 131 585 zoomx \$1;
-#X msg 130 607 zoomy \$1;
-#X floatatom 95 585 5 0 0 0 - - -;
-#X obj 119 530 hsl 300 15 0.01 100 1 1 empty empty empty -2 -6 0 8
--262144 -1 -1 16000 1;
-#X msg 230 642 centerx \$1;
-#X floatatom 234 620 5 0 0 0 - - -;
-#X floatatom 305 618 5 0 0 0 - - -;
-#X msg 303 641 centery \$1;
-#X obj 241 572 hsl 128 15 -1 1 0 1 empty empty empty -2 -6 0 8 -262144
--1 -1 6900 1;
-#X obj 256 589 hsl 128 15 -1 1 0 1 empty empty empty -2 -6 0 8 -262144
+#X msg 244 517 centerx \$1;
+#X floatatom 248 495 5 0 0 0 - - -;
+#X floatatom 319 493 5 0 0 0 - - -;
+#X msg 317 516 centery \$1;
+#X obj 255 447 hsl 128 15 -1 1 0 1 empty empty empty -2 -6 0 8 -262144
+-1 -1 7900 1;
+#X obj 270 464 hsl 128 15 -1 1 0 1 empty empty empty -2 -6 0 8 -262144
-1 -1 7300 1;
-#X msg 1 523 center 0 0;
-#X obj 630 433 pdp_cycle;
-#X obj 627 453 tgl 15 0 empty cyc2 empty 0 -6 0 8 -262144 -1 -1 0 1
+#X msg 15 398 center 0 0;
+#X obj 644 308 pdp_cycle;
+#X obj 641 328 tgl 15 0 empty cyc2 empty 0 -6 0 8 -262144 -1 -1 0 1
;
-#X obj 653 454 tgl 15 0 empty cyc3 empty 0 -6 0 8 -262144 -1 -1 0 1
+#X obj 667 329 tgl 15 0 empty cyc3 empty 0 -6 0 8 -262144 -1 -1 0 1
;
-#X obj 675 454 tgl 15 0 empty cyc4 empty 0 -6 0 8 -262144 -1 -1 0 1
+#X obj 689 329 tgl 15 0 empty cyc4 empty 0 -6 0 8 -262144 -1 -1 0 1
;
-#X obj 793 402 tgl 15 0 empty transf empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 723 412 pdp_spigot;
-#X obj 723 433 pdp_transform;
-#X obj 723 455 hdl 15 1 0 6 empty empty empty 0 -6 0 8 -262144 -1 -1
+#X obj 807 277 tgl 15 0 empty transf empty 0 -6 0 8 -262144 -1 -1 0
+5;
+#X obj 737 287 pdp_spigot;
+#X obj 737 308 pdp_transform;
+#X obj 737 330 hdl 15 1 0 6 empty empty empty 0 -6 0 8 -262144 -1 -1
0;
-#X obj 840 308 tgl 15 0 empty shaga empty 0 -6 0 8 -262144 -1 -1 0
+#X obj 854 183 tgl 15 0 empty shaga empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X obj 770 316 pdp_spigot;
-#X obj 769 338 pdp_shagadelic;
-#X floatatom 769 360 5 0 0 0 - shaga1 -;
-#X obj 814 359 * 100;
-#X obj 776 219 tgl 15 0 empty dice empty 0 -6 0 8 -262144 -1 -1 0 1
+#X obj 784 191 pdp_spigot;
+#X obj 783 213 pdp_shagadelic;
+#X floatatom 783 235 5 0 0 0 - shaga1 -;
+#X obj 828 234 * 100;
+#X obj 790 94 tgl 15 0 empty dice empty 0 -6 0 8 -262144 -1 -1 0 1
;
-#X obj 705 228 pdp_spigot;
-#X floatatom 705 270 5 0 0 0 - dice2 -;
-#X obj 704 249 pdp_dice;
-#X obj 780 481 tgl 15 0 empty puzz1 empty 0 -6 0 8 -262144 -1 -1 1
-1;
-#X obj 711 491 pdp_spigot;
-#X floatatom 807 510 5 0 0 0 - puzz2 -;
-#X obj 710 512 pdp_puzzle;
-#X msg 708 535 up;
-#X msg 741 535 down;
-#X msg 776 535 left;
-#X msg 811 535 right;
-#X obj 730 579 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 730 624 pdp_control;
-#X msg 730 601 thread \$1;
-#X floatatom 730 678 5 0 0 0 - - -;
-#X obj 730 653 route pdp_drop;
-#X msg 485 642 framerate 10;
-#X obj 192 206 dac~;
-#X floatatom 261 136 5 0 0 0 - - -;
-#X obj 649 506 tgl 15 0 empty ascii1 empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 580 514 pdp_spigot;
-#X obj 579 535 pdp_ascii;
-#X floatatom 641 536 5 0 0 0 - ascii2 -;
-#X floatatom 496 365 5 0 0 0 - qu1 -;
-#X floatatom 715 359 5 0 0 0 - nervous2 -;
-#X obj 260 158 t b f;
-#X obj 417 586 adc~;
-#X obj 655 311 tgl 15 0 empty noquark empty 0 -6 0 8 -262144 -1 -1
+#X obj 719 103 pdp_spigot;
+#X floatatom 719 145 5 0 0 0 - dice2 -;
+#X obj 718 124 pdp_dice;
+#X obj 794 356 tgl 15 0 empty puzz1 empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 725 366 pdp_spigot;
+#X floatatom 821 385 5 0 0 0 - puzz2 -;
+#X obj 724 387 pdp_puzzle;
+#X msg 722 410 up;
+#X msg 755 410 down;
+#X msg 790 410 left;
+#X msg 825 410 right;
+#X obj 744 454 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 744 499 pdp_control;
+#X msg 744 476 thread \$1;
+#X floatatom 744 553 5 0 0 0 - - -;
+#X obj 744 528 route pdp_drop;
+#X msg 499 517 framerate 10;
+#X obj 206 81 dac~;
+#X floatatom 275 11 5 0 0 0 - - -;
+#X obj 663 381 tgl 15 0 empty ascii1 empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 594 389 pdp_spigot;
+#X obj 593 410 pdp_ascii;
+#X floatatom 655 411 5 0 0 0 - ascii2 -;
+#X floatatom 510 240 5 0 0 0 - qu1 -;
+#X floatatom 729 234 5 0 0 0 - nervous2 -;
+#X obj 274 33 t b f;
+#X obj 431 461 adc~;
+#X obj 669 186 tgl 15 0 empty noquark empty 0 -6 0 8 -262144 -1 -1
0 1;
-#X obj 582 321 pdp_spigot;
-#X floatatom 625 365 5 0 0 0 - noqu2 -;
-#X obj 583 343 pdp_noquark;
-#X floatatom 582 365 5 0 0 0 - noqu1 -;
-#X floatatom 536 365 5 0 0 0 - qu2 -;
-#X obj 236 666 pdp_affine;
-#X floatatom 314 667 5 0 0 0 - - -;
-#X floatatom 358 667 5 0 0 0 - - -;
-#X msg 208 719 display 81.66.163.16:0;
-#X obj 481 671 pdp_ffmpeg~;
-#X msg 589 686 starve;
-#X obj 76 654 pdp_i 2003;
-#X obj 512 506 tgl 15 0 empty charc1 empty 0 -6 0 8 -262144 -1 -1 1
-1;
-#X obj 436 527 pdp_spigot;
-#X obj 459 556 pdp_charcoal;
-#X floatatom 525 536 5 0 0 0 - charc2 -;
-#X obj 26 198 pdp_scale 320 240;
-#X msg 298 694 pos 0 0;
-#X msg 353 693 dim 1024 768;
-#X floatatom 151 205 5 0 0 0 - - -;
-#X obj 582 642 adc~;
-#X floatatom 459 707 5 0 0 0 - - -;
-#X floatatom 499 705 5 0 0 0 - - -;
-#X floatatom 537 704 5 0 0 0 - - -;
-#X msg 179 484 1;
-#X obj 221 479 loadbang;
-#X msg 587 708 feed http://localhost:8090/feed1.ffm;
-#X obj 403 624 pdp_rec~;
-#X text 478 164 Load;
-#X obj 73 96 r openp;
-#X obj 73 119 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+#X obj 596 196 pdp_spigot;
+#X floatatom 639 240 5 0 0 0 - noqu2 -;
+#X obj 597 218 pdp_noquark;
+#X floatatom 596 240 5 0 0 0 - noqu1 -;
+#X floatatom 550 240 5 0 0 0 - qu2 -;
+#X obj 250 541 pdp_affine;
+#X floatatom 328 542 5 0 0 0 - - -;
+#X floatatom 372 542 5 0 0 0 - - -;
+#X msg 222 594 display 81.66.163.16:0;
+#X obj 495 546 pdp_ffmpeg~;
+#X msg 603 561 starve;
+#X obj 251 570 pdp_glx;
+#X obj 90 529 pdp_i 2003;
+#X obj 526 381 tgl 15 0 empty charc1 empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 450 402 pdp_spigot;
+#X obj 473 431 pdp_charcoal;
+#X floatatom 539 411 5 0 0 0 - charc2 -;
+#X obj 40 73 pdp_scale 320 240;
+#X msg 312 569 pos 0 0;
+#X msg 367 568 dim 1024 768;
+#X floatatom 165 80 5 0 0 0 - - -;
+#X obj 618 506 adc~;
+#X floatatom 473 582 5 0 0 0 - - -;
+#X floatatom 513 580 5 0 0 0 - - -;
+#X floatatom 551 579 5 0 0 0 - - -;
+#X msg 193 359 1;
+#X obj 235 354 loadbang;
+#X obj 417 499 pdp_rec~;
+#X obj 22 579 pdp_glx;
+#X text 492 39 Load;
+#X obj 86 13 openpanel;
+#X obj 84 -16 r openp;
+#X obj 45 -7 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#X obj 145 97 r loop;
-#X obj 307 93 r ventanaabr;
-#X obj 145 122 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 1
-1;
-#X obj 284 96 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
+#X obj 166 -16 r loop;
+#X obj 333 -12 r ventanaabr;
+#X obj 141 0 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 1
+;
+#X obj 294 -41 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
-1;
-#X msg 200 123 stop;
-#X obj 199 95 r stopenlat;
-#X obj 6 -646 cnv 15 180 150 empty empty :::Enlatados::: 20 20 1 20
--257472 -1 0;
-#X obj 188 -648 cnv 15 400 600 empty empty ::::Effectos:::: 20 20 1
+#X msg 220 6 stop;
+#X obj 209 -18 r stopenlat;
+#X obj -7 -364 cnv 15 120 100 empty empty :::Enlatados::: 2 10 1 12
+-198007 -1 0;
+#X obj 114 -364 cnv 15 550 310 empty empty ::::Efectos:::: 20 20 1
20 -224508 -1 0;
-#X text 234 -615 Aging;
-#X obj 274 -614 tgl 15 0 aging empty empty 0 -6 0 8 -262144 -1 -1 0
+#X text 160 -331 Aging;
+#X obj 200 -330 tgl 15 0 aging empty empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X text 229 -598 Baltan;
-#X obj 274 -596 tgl 15 0 baltan empty empty 0 -6 0 8 -262144 -1 -1
+#X text 155 -314 Baltan;
+#X obj 200 -312 tgl 15 0 baltan empty empty 0 -6 0 8 -262144 -1 -1
0 1;
-#X text 240 -581 Edge;
-#X obj 274 -579 tgl 15 0 edge empty empty 0 -6 0 8 -262144 -1 -1 0
+#X text 166 -297 Edge;
+#X obj 200 -295 tgl 15 0 edge empty empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X floatatom 297 -614 5 0 0 0 - - ag1;
-#X floatatom 338 -614 5 0 0 0 - - ag2;
-#X floatatom 297 -596 10 0 0 0 - - balt1;
-#X text 209 -563 Intrusion;
-#X obj 274 -561 tgl 15 0 intr1 empty empty 0 -6 0 8 -262144 -1 -1 0
+#X floatatom 223 -330 5 0 0 0 - - ag1;
+#X floatatom 264 -330 5 0 0 0 - - ag2;
+#X floatatom 223 -312 10 0 0 0 - - balt1;
+#X text 135 -279 Intrusion;
+#X obj 200 -277 tgl 15 0 intr1 empty empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X floatatom 297 -561 5 0 0 0 - - intr2;
-#X obj 336 -561 bng 15 250 50 0 intrbang empty BANG 18 8 1 12 -258699
+#X floatatom 223 -277 5 0 0 0 - - intr2;
+#X obj 262 -277 bng 15 250 50 0 intrbang empty BANG 18 8 1 12 -62784
-1 -1;
-#X obj 344 283 bng 15 250 50 0 empty intrbang empty 0 -6 0 8 -262144
+#X obj 358 158 bng 15 250 50 0 empty intrbang empty 0 -6 0 8 -262144
-1 -1;
-#X text 240 -546 Lens;
-#X obj 274 -544 tgl 15 0 lens empty empty 0 -6 0 8 -262144 -1 -1 0
+#X text 166 -262 Lens;
+#X obj 200 -260 tgl 15 0 lens empty empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X obj 274 -526 tgl 15 0 mosaic empty empty 0 -6 0 8 -262144 -1 -1
+#X obj 200 -242 tgl 15 0 mosaic empty empty 0 -6 0 8 -262144 -1 -1
0 1;
-#X obj 274 -508 tgl 15 0 dice empty empty 0 -6 0 8 -262144 -1 -1 0
+#X obj 200 -224 tgl 15 0 dice empty empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X obj 274 -491 tgl 15 0 simura empty empty 0 -6 0 8 -262144 -1 -1
+#X obj 200 -207 tgl 15 0 simura empty empty 0 -6 0 8 -262144 -1 -1
0 1;
-#X obj 297 -544 tgl 15 0 lensmove empty Move 18 8 1 8 -262144 -1 -258699
+#X obj 223 -260 tgl 15 0 lensmove empty Move 18 8 1 8 -262144 -1 -62784
0 1;
-#X text 227 -528 Mosaic;
-#X obj 334 -527 bng 15 250 50 0 mosaicbang empty BANG 18 8 1 12 -258699
+#X text 153 -244 Mosaic;
+#X obj 260 -243 bng 15 250 50 0 mosaicbang empty BANG 18 8 1 12 -62784
-1 -1;
-#X floatatom 297 -526 5 0 0 0 - - mosaic2;
-#X obj 576 287 bng 15 250 50 0 empty mosaicbang empty 0 -6 0 8 -262144
+#X floatatom 223 -242 5 0 0 0 - - mosaic2;
+#X obj 590 162 bng 15 250 50 0 empty mosaicbang empty 0 -6 0 8 -262144
-1 -1;
-#X text 240 -510 Dice;
-#X floatatom 297 -508 5 0 0 0 - - dice2;
-#X text 226 -493 Simura;
-#X floatatom 297 -491 5 0 0 0 - - simura2;
-#X obj 274 -473 tgl 15 0 ripple empty empty 0 -6 0 8 -262144 -1 -1
+#X text 166 -224 Dice;
+#X floatatom 223 -224 5 0 0 0 - - dice2;
+#X text 152 -209 Simura;
+#X floatatom 223 -207 5 0 0 0 - - simura2;
+#X obj 200 -189 tgl 15 0 ripple empty empty 0 -6 0 8 -262144 -1 -1
0 1;
-#X text 226 -476 Ripple;
-#X obj 376 -474 bng 15 250 50 0 ripplebang empty BANG 18 8 1 12 -258699
+#X text 152 -192 Ripple;
+#X obj 306 -191 bng 15 250 50 0 ripplebang empty BANG 18 8 1 12 -62784
-1 -1;
-#X floatatom 339 -474 5 0 0 0 - - rip2;
-#X floatatom 297 -474 5 0 0 0 - - rip1;
-#X obj 239 360 bng 15 250 50 0 empty ripplebang empty 0 -6 0 8 -262144
+#X floatatom 265 -190 5 0 0 0 - - rip2;
+#X floatatom 223 -190 5 0 0 0 - - rip1;
+#X obj 253 235 bng 15 250 50 0 empty ripplebang empty 0 -6 0 8 -262144
-1 -1;
-#X obj 274 -456 tgl 15 0 rev empty empty 0 -6 0 8 -262144 -1 -1 0 1
+#X obj 200 -172 tgl 15 0 rev empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
-#X floatatom 339 -456 5 0 0 0 - - rev2;
-#X floatatom 297 -456 5 0 0 0 - - rev1;
-#X text 244 -457 Rev;
-#X floatatom 424 -456 5 0 0 0 - - rev4;
-#X floatatom 381 -456 5 0 0 0 - - rev3;
-#X obj 274 -437 tgl 15 0 radiac empty empty 0 -6 0 8 -262144 -1 -1
+#X floatatom 265 -172 5 0 0 0 - - rev2;
+#X floatatom 223 -172 5 0 0 0 - - rev1;
+#X text 170 -173 Rev;
+#X floatatom 350 -172 5 0 0 0 - - rev4;
+#X floatatom 307 -172 5 0 0 0 - - rev3;
+#X obj 200 -153 tgl 15 0 radiac empty empty 0 -6 0 8 -262144 -1 -1
0 1;
-#X floatatom 339 -437 5 0 0 0 - - radi2;
-#X floatatom 297 -437 5 0 0 0 - - radi1;
-#X text 197 -438 Radioactive;
-#X obj 274 -419 tgl 15 0 quark empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X floatatom 339 -419 5 0 0 0 - - qu2;
-#X floatatom 297 -419 5 0 0 0 - - qu1;
-#X text 232 -420 Quark;
-#X obj 274 -401 tgl 15 0 noquark empty empty 0 -6 0 8 -262144 -1 -1
+#X floatatom 265 -153 5 0 0 0 - - radi2;
+#X floatatom 223 -153 5 0 0 0 - - radi1;
+#X text 123 -154 Radioactive;
+#X obj 200 -135 tgl 15 0 quark empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X floatatom 265 -135 5 0 0 0 - - qu2;
+#X floatatom 223 -135 5 0 0 0 - - qu1;
+#X text 158 -136 Quark;
+#X obj 200 -117 tgl 15 0 noquark empty empty 0 -6 0 8 -262144 -1 -1
0 1;
-#X floatatom 339 -401 5 0 0 0 - - noqu2;
-#X floatatom 297 -401 5 0 0 0 - - noqu1;
-#X text 222 -402 NoQuark;
-#X obj 296 -382 tgl 15 0 nervous1 empty empty 0 -6 0 8 -262144 -1 -1
+#X floatatom 265 -117 5 0 0 0 - - noqu2;
+#X floatatom 223 -117 5 0 0 0 - - noqu1;
+#X text 148 -118 NoQuark;
+#X obj 222 -98 tgl 15 0 nervous1 empty empty 0 -6 0 8 -262144 -1 -1
0 1;
-#X floatatom 319 -382 5 0 0 0 - - nervous2;
-#X obj 274 -382 tgl 15 0 nervous empty empty 0 -6 0 8 -262144 -1 -1
+#X floatatom 245 -98 5 0 0 0 - - nervous2;
+#X obj 200 -98 tgl 15 0 nervous empty empty 0 -6 0 8 -262144 -1 -1
0 1;
-#X text 222 -383 Nervous;
-#X obj 274 -363 tgl 15 0 shaga empty empty 0 -6 0 8 -262144 -1 -1 0
+#X text 148 -99 Nervous;
+#X obj 200 -79 tgl 15 0 shaga empty empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X floatatom 297 -363 5 0 0 0 - - shaga1;
-#X text 201 -363 Shagadelic;
-#X floatatom 296 -327 5 0 0 0 - - spi1;
-#X obj 296 -346 hdl 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1
+#X floatatom 223 -79 5 0 0 0 - - shaga1;
+#X text 127 -79 Shagadelic;
+#X floatatom 456 -294 5 0 0 0 - - spi1;
+#X obj 456 -313 hdl 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1
-1 0;
-#X floatatom 337 -328 5 0 0 0 - - spi2;
-#X floatatom 380 -328 5 0 0 0 - - spi3;
-#X floatatom 297 -309 5 0 0 0 - - spi4;
-#X floatatom 339 -310 5 0 0 0 - - spi5;
-#X obj 381 -310 tgl 15 0 spi6 empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X text 201 -363 Shagadelic;
-#X obj 274 -346 tgl 15 0 spiral empty empty 0 -6 0 8 -262144 -1 -1
+#X floatatom 497 -295 5 0 0 0 - - spi2;
+#X floatatom 540 -295 5 0 0 0 - - spi3;
+#X floatatom 457 -276 5 0 0 0 - - spi4;
+#X floatatom 499 -277 5 0 0 0 - - spi5;
+#X obj 541 -277 tgl 15 0 spi6 empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X text 127 -79 Shagadelic;
+#X obj 434 -313 tgl 15 0 spiral empty empty 0 -6 0 8 -262144 -1 -1
0 1;
-#X text 228 -344 Spiral;
-#X obj 339 -491 hdl 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1
+#X text 388 -311 Spiral;
+#X obj 265 -207 hdl 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1
-1 0;
-#X obj 432 -475 s simura3;
-#X obj -6 315 r simura3;
-#X obj 419 -332 s spirale;
-#X obj 3 500 r spirale;
-#X obj 398 -310 tgl 15 0 spi7 empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 274 -292 tgl 15 0 under empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X floatatom 297 -292 5 0 0 0 - - under2;
-#X text 201 -290 Underwatch;
-#X obj 274 -274 tgl 15 0 verti empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X floatatom 297 -274 5 0 0 0 - - verti1;
-#X floatatom 339 -274 5 0 0 0 - - verti2;
-#X text 220 -274 Vertigo;
-#X floatatom 297 -256 5 0 0 0 - - warh2;
-#X floatatom 341 -256 5 0 0 0 - - warh3;
-#X obj 297 -240 hdl 15 1 0 9 empty empty empty 0 -6 0 8 -262144 -1
+#X obj 364 -192 s simura3;
+#X obj 8 190 r simura3;
+#X obj 579 -298 s spirale;
+#X obj 17 375 r spirale;
+#X obj 558 -277 tgl 15 0 spi7 empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 434 -259 tgl 15 0 under empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X floatatom 457 -259 5 0 0 0 - - under2;
+#X text 361 -257 Underwatch;
+#X obj 434 -241 tgl 15 0 verti empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X floatatom 457 -241 5 0 0 0 - - verti1;
+#X floatatom 499 -241 5 0 0 0 - - verti2;
+#X text 380 -241 Vertigo;
+#X floatatom 499 -224 5 0 0 0 - - warh2;
+#X floatatom 457 -224 5 0 0 0 - - warh3;
+#X obj 457 -207 hdl 15 1 0 9 empty empty empty 0 -6 0 8 -262144 -1
-1 0;
-#X floatatom 297 -222 5 0 0 0 - - warh4;
-#X floatatom 338 -222 5 0 0 0 - - warh5;
-#X floatatom 377 -222 5 0 0 0 - - warh6;
-#X obj 274 -258 tgl 15 0 warh1 empty empty 0 -6 0 8 -262144 -1 -1 0
+#X floatatom 457 -189 5 0 0 0 - - warh4;
+#X floatatom 498 -189 5 0 0 0 - - warh5;
+#X floatatom 537 -189 5 0 0 0 - - warh6;
+#X obj 434 -223 tgl 15 0 warh1 empty empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X text 220 -257 Warhol;
-#X obj 326 477 r warh;
-#X obj 421 -223 s warh;
-#X obj 296 -204 tgl 15 0 warp2 empty empty 0 -6 0 8 -262144 -1 -1 0
+#X text 387 -222 Warhol;
+#X obj 340 352 r warh;
+#X obj 580 -192 s warh;
+#X obj 456 -171 tgl 15 0 warp2 empty empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X floatatom 319 -204 5 0 0 0 - - warp3;
-#X obj 274 -204 tgl 15 0 warp1 empty empty 0 -6 0 8 -262144 -1 -1 0
+#X floatatom 479 -171 5 0 0 0 - - warp3;
+#X obj 434 -171 tgl 15 0 warp1 empty empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X text 224 -205 Warp;
-#X obj 296 -183 tgl 15 0 cyc2 empty empty 0 -6 0 8 -262144 -1 -1 0
+#X text 401 -172 Warp;
+#X obj 456 -150 tgl 15 0 cyc2 empty empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X obj 274 -183 tgl 15 0 cyc1 empty empty 0 -6 0 8 -262144 -1 -1 0
+#X obj 434 -150 tgl 15 0 cyc1 empty empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X obj 341 -183 tgl 15 0 cyc4 empty empty 0 -6 0 8 -262144 -1 -1 0
+#X obj 501 -150 tgl 15 0 cyc4 empty empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X obj 319 -183 tgl 15 0 cyc3 empty empty 0 -6 0 8 -262144 -1 -1 0
+#X obj 479 -150 tgl 15 0 cyc3 empty empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X text 224 -184 Cycle;
-#X obj 274 -162 tgl 15 0 transf empty empty 0 -6 0 8 -262144 -1 -1
+#X text 393 -151 Cycle;
+#X obj 434 -129 tgl 15 0 transf empty empty 0 -6 0 8 -262144 -1 -1
0 1;
-#X obj 299 -162 hdl 15 1 0 6 empty empty empty 0 -6 0 8 -262144 -1
+#X obj 459 -129 hdl 15 1 0 6 empty empty empty 0 -6 0 8 -262144 -1
-1 0;
-#X obj 410 -145 s transf;
-#X obj 623 485 r transf;
-#X text 195 -162 Transform;
-#X obj 273 -140 tgl 15 0 ascii1 empty empty 0 -6 0 8 -262144 -1 -1
+#X obj 551 -114 s transf;
+#X obj 637 360 r transf;
+#X text 364 -129 Transform;
+#X obj 433 -107 tgl 15 0 ascii1 empty empty 0 -6 0 8 -262144 -1 -1
0 1;
-#X floatatom 297 -140 5 0 0 0 - - ascii2;
-#X text 223 -141 Ascii;
-#X obj 273 -121 tgl 15 0 charc1 empty empty 0 -6 0 8 -262144 -1 -1
-1 1;
-#X floatatom 297 -121 5 0 0 0 - - charc2;
-#X text 206 -122 Charcoal;
-#X obj 273 -102 tgl 15 0 puzz1 empty empty 0 -6 0 8 -262144 -1 -1 1
-1;
-#X floatatom 297 -102 5 0 0 0 - - puzz2;
-#X text 206 -103 Puzzle;
-#X obj 356 -102 bng 15 250 50 0 left empty empty 0 -6 0 8 -262144 -1
+#X floatatom 457 -107 5 0 0 0 - - ascii2;
+#X text 392 -108 Ascii;
+#X obj 434 -332 tgl 15 0 charc1 empty empty 0 -6 0 8 -262144 -1 -1
+0 1;
+#X floatatom 458 -332 5 0 0 0 - - charc2;
+#X text 366 -333 Charcoal;
+#X obj 434 -84 tgl 15 0 puzz1 empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X floatatom 458 -84 5 0 0 0 - - puzz2;
+#X text 386 -85 Puzzle;
+#X obj 507 -84 bng 15 250 50 0 left empty empty 0 -6 0 8 -62784 -1
-1;
-#X obj 371 -117 bng 15 250 50 0 up empty empty 0 -6 0 8 -262144 -1
+#X obj 522 -99 bng 15 250 50 0 up empty empty 0 -6 0 8 -62784 -1 -1
+;
+#X obj 536 -85 bng 15 250 50 0 right empty empty 0 -6 0 8 -62784 -1
-1;
-#X obj 385 -103 bng 15 250 50 0 right empty empty 0 -6 0 8 -262144
--1 -1;
-#X obj 371 -88 bng 15 250 50 0 down empty empty 0 -6 0 8 -262144 -1
+#X obj 522 -70 bng 15 250 50 0 down empty empty 0 -6 0 8 -62784 -1
-1;
-#X obj 794 576 bng 15 250 50 0 empty left empty 0 -6 0 8 -262144 -1
+#X obj 808 451 bng 15 250 50 0 empty left empty 0 -6 0 8 -262144 -1
-1;
-#X obj 809 561 bng 15 250 50 0 empty up empty 0 -6 0 8 -262144 -1 -1
+#X obj 823 436 bng 15 250 50 0 empty up empty 0 -6 0 8 -262144 -1 -1
;
-#X obj 823 575 bng 15 250 50 0 empty right empty 0 -6 0 8 -262144 -1
+#X obj 837 450 bng 15 250 50 0 empty right empty 0 -6 0 8 -262144 -1
-1;
-#X obj 809 590 bng 15 250 50 0 empty down empty 0 -6 0 8 -262144 -1
+#X obj 823 465 bng 15 250 50 0 empty down empty 0 -6 0 8 -262144 -1
-1;
-#X obj 140 -557 bng 15 250 50 0 ventanaabr empty empty 20 8 0 8 -262144
--1 -1;
-#X obj 140 -580 tgl 15 0 loop empty empty 20 8 0 8 -262144 -1 -1 1
-1;
-#X obj 139 -601 bng 15 250 50 0 openp empty empty 20 8 0 8 -262144
+#X obj 91 -307 bng 15 250 50 0 ventanaabr empty empty 20 8 0 8 -262144
-1 -1;
-#X text 93 -603 Cargar;
-#X text 43 -558 Abrir ventana;
-#X text 99 -534 Parar;
-#X text 105 -581 Loop;
-#X obj 140 -535 bng 15 250 50 0 stopenlat empty empty 0 -6 0 8 -262144
+#X obj 91 -325 tgl 15 0 loop empty empty 20 8 0 8 -262144 -1 -1 0 1
+;
+#X obj 91 -343 bng 15 250 50 0 openp empty empty 20 8 0 8 -262144 -1
+-1;
+#X text 45 -345 Cargar;
+#X text -5 -308 Abrir ventana;
+#X text 51 -288 Parar;
+#X text 57 -326 Loop;
+#X obj 91 -289 bng 15 250 50 0 stopenlat empty empty 0 -6 0 8 -262144
-1 -1;
-#X obj 8 -490 cnv 15 180 150 empty empty :::Webcam::: 20 20 1 20 -228992
+#X obj -7 -263 cnv 15 120 85 empty empty :::Webcam::: 2 10 1 12 -258740
-1 0;
-#X obj 140 -423 bng 15 250 50 0 webcam1 empty empty 20 8 0 8 -262144
+#X obj 88 -220 bng 15 250 50 0 webcam1 empty empty 20 8 0 8 -262144
+-1 -1;
+#X obj 88 -238 bng 15 250 50 0 loadwebcam empty empty 20 8 0 8 -262144
+-1 -1;
+#X text 47 -201 Parar;
+#X obj 88 -202 bng 15 250 50 0 webcam2 empty empty 0 -6 0 8 -262144
+-1 -1;
+#X obj 583 12 bng 15 250 50 0 empty loadwebcam empty 0 -6 0 8 -262144
+-1 -1;
+#X text 49 -220 Live;
+#X obj 553 61 bng 15 250 50 0 empty webcam2 empty 0 -6 0 8 -262144
-1 -1;
-#X obj 141 -445 bng 15 250 50 0 loadwebcam empty empty 20 8 0 8 -262144
+#X obj 665 -363 cnv 15 100 310 empty empty :::Zoom::: 2 10 1 12 -225271
+-1 0;
+#X obj 680 -83 bng 15 250 50 0 zoom1 empty empty 20 8 0 8 -62784 -1
+-1;
+#X obj 237 332 bng 15 250 50 0 empty zoom1 empty 0 -6 0 8 -262144 -1
+-1;
+#X text 700 -82 Zoom 1:1;
+#X obj 612 538 bng 15 250 50 0 empty starve empty 0 -6 0 8 -262144
-1 -1;
-#X text 99 -400 Parar;
-#X obj 140 -401 bng 15 250 50 0 webcam2 empty empty 0 -6 0 8 -262144
+#X obj 686 540 bng 15 250 50 0 empty stream empty 0 -6 0 8 -262144
-1 -1;
-#X obj 569 137 bng 15 250 50 0 empty loadwebcam empty 0 -6 0 8 -262144
+#X obj -7 -177 cnv 15 120 110 empty empty :::Stream::: 2 10 1 12 -220278
+-1 0;
+#X obj 87 -158 bng 15 250 50 0 stream empty empty 20 8 0 8 -262144
-1 -1;
-#X text 101 -422 Live;
-#X obj 539 186 bng 15 250 50 0 empty webcam2 empty 0 -6 0 8 -262144
+#X text 46 -135 Parar;
+#X obj 87 -136 bng 15 250 50 0 starve empty empty 0 -6 0 8 -262144
-1 -1;
-#X obj 240 688 pdp_xv;
-#X obj 72 138 openpanel;
-#X text 22 -447 Abrir /dev/video;
+#X text 366 -333 Charcoal;
+#X text 33 -157 Stream;
+#X text 194 108 comment;
+#X obj 678 -323 vsl 15 200 1.27 127 0 0 zoomtot empty Total -3 -8 0
+8 -44832 -1 -1 0 1;
+#X obj 706 -324 vsl 15 200 -100 100 0 0 zoomv empty Horiz -4 -8 0 8
+-262144 -1 -1 0 1;
+#X obj 732 -324 vsl 15 200 0 127 0 0 zoomh empty Vert -1 -8 0 8 -262144
+-1 -90133 0 1;
+#X text -3 -239 Abrir camara;
+#X msg 601 585 feed http://media1.fadaiat.net:8090/feed1.ffm;
#X connect 0 0 4 0;
#X connect 1 0 4 0;
#X connect 2 0 3 1;
#X connect 3 0 4 0;
-#X connect 4 0 190 0;
-#X connect 4 3 193 0;
+#X connect 4 0 191 0;
+#X connect 4 3 194 0;
#X connect 4 4 163 0;
#X connect 4 5 163 1;
-#X connect 5 0 190 0;
+#X connect 5 0 191 0;
#X connect 6 0 5 0;
#X connect 7 0 6 0;
#X connect 8 0 6 0;
@@ -600,7 +628,7 @@
#X connect 111 0 201 0;
#X connect 112 0 201 0;
#X connect 113 0 201 0;
-#X connect 114 0 352 0;
+#X connect 114 0 185 0;
#X connect 115 0 114 0;
#X connect 116 0 179 0;
#X connect 117 0 116 1;
@@ -654,9 +682,9 @@
#X connect 162 0 201 0;
#X connect 164 0 171 0;
#X connect 165 0 166 1;
-#X connect 166 0 187 0;
+#X connect 166 0 188 0;
#X connect 166 1 167 0;
-#X connect 167 0 187 0;
+#X connect 167 0 188 0;
#X connect 168 0 167 1;
#X connect 169 0 47 1;
#X connect 170 0 43 2;
@@ -671,55 +699,57 @@
#X connect 176 0 46 0;
#X connect 177 0 176 1;
#X connect 178 0 47 2;
-#X connect 179 0 201 0;
-#X connect 179 0 352 0;
+#X connect 179 0 185 0;
#X connect 179 0 183 0;
+#X connect 179 0 201 0;
#X connect 180 0 179 1;
#X connect 181 0 179 2;
-#X connect 182 0 352 0;
-#X connect 183 0 195 0;
-#X connect 183 1 196 0;
-#X connect 183 2 197 0;
+#X connect 182 0 185 0;
+#X connect 183 0 196 0;
+#X connect 183 1 197 0;
+#X connect 183 2 198 0;
#X connect 184 0 183 0;
-#X connect 185 0 352 0;
-#X connect 186 0 187 1;
-#X connect 187 0 116 0;
-#X connect 187 1 188 0;
+#X connect 186 0 185 0;
+#X connect 187 0 188 1;
#X connect 188 0 116 0;
-#X connect 189 0 188 1;
-#X connect 190 0 11 0;
-#X connect 191 0 352 0;
-#X connect 192 0 352 0;
-#X connect 194 0 183 0;
-#X connect 194 1 183 1;
-#X connect 198 0 118 0;
-#X connect 199 0 198 0;
-#X connect 200 0 183 0;
+#X connect 191 0 11 0;
+#X connect 192 0 185 0;
+#X connect 193 0 185 0;
+#X connect 195 0 183 0;
+#X connect 195 1 183 1;
+#X connect 199 0 118 0;
+#X connect 199 0 124 0;
+#X connect 199 0 120 0;
+#X connect 200 0 199 0;
#X connect 201 0 110 0;
-#X connect 203 0 204 0;
-#X connect 204 0 353 0;
-#X connect 205 0 207 0;
-#X connect 206 0 208 0;
-#X connect 207 0 0 0;
-#X connect 208 0 3 0;
-#X connect 209 0 3 0;
-#X connect 210 0 209 0;
-#X connect 226 0 25 0;
-#X connect 236 0 38 0;
-#X connect 246 0 63 0;
-#X connect 273 0 285 0;
-#X connect 282 0 283 0;
-#X connect 284 0 72 0;
-#X connect 286 0 76 0;
-#X connect 297 0 304 0;
-#X connect 303 0 100 0;
-#X connect 315 0 316 0;
-#X connect 317 0 139 0;
-#X connect 332 0 155 0;
-#X connect 333 0 153 0;
-#X connect 334 0 156 0;
-#X connect 335 0 154 0;
-#X connect 349 0 9 0;
-#X connect 351 0 8 0;
-#X connect 353 0 1 0;
+#X connect 204 0 1 0;
+#X connect 205 0 206 0;
+#X connect 206 0 204 0;
+#X connect 207 0 209 0;
+#X connect 208 0 210 0;
+#X connect 209 0 0 0;
+#X connect 210 0 3 0;
+#X connect 211 0 3 0;
+#X connect 212 0 211 0;
+#X connect 228 0 25 0;
+#X connect 238 0 38 0;
+#X connect 248 0 63 0;
+#X connect 275 0 287 0;
+#X connect 284 0 285 0;
+#X connect 286 0 72 0;
+#X connect 288 0 76 0;
+#X connect 299 0 306 0;
+#X connect 305 0 100 0;
+#X connect 317 0 318 0;
+#X connect 319 0 139 0;
+#X connect 334 0 155 0;
+#X connect 335 0 153 0;
+#X connect 336 0 156 0;
+#X connect 337 0 154 0;
+#X connect 351 0 9 0;
+#X connect 353 0 8 0;
+#X connect 356 0 199 0;
+#X connect 358 0 184 0;
+#X connect 359 0 371 0;
+#X connect 371 0 183 0;
#X coords 0 0 0.00151515 0.00153374 200 140 0;
diff --git a/patches/help_pdp_effects_rack.pd b/patches/help_pdp_effects_rack.pd
index 7654ac3..4c47cbb 100644
--- a/patches/help_pdp_effects_rack.pd
+++ b/patches/help_pdp_effects_rack.pd
@@ -1,4 +1,4 @@
-#N canvas 4 0 986 675 10;
+#N canvas 39 1 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;
@@ -139,7 +139,7 @@
#X floatatom 481 407 5 0 0 0 - - -;
#X floatatom 527 407 5 0 0 0 - - -;
#X floatatom 572 407 5 0 0 0 - - -;
-#X obj 618 365 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+#X obj 618 365 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;
#X floatatom 638 366 5 0 0 0 - - -;
#X obj 618 345 pdp_warp;
@@ -156,16 +156,16 @@
1;
#X obj 19 544 pdp_zoom;
#X floatatom 68 500 5 0 0 0 - - -;
-#X obj 152 436 hsl 300 15 0.01 100 1 1 empty empty empty -2 -6 0 8
--262144 -1 -1 15104 1;
+#X obj 119 437 hsl 300 15 0.01 100 1 1 empty empty empty -2 -6 0 8
+-262144 -1 -1 15314 1;
#X floatatom 122 547 5 0 0 0 - - -;
-#X obj 146 487 hsl 300 15 0.01 100 1 1 empty empty empty -2 -6 0 8
--262144 -1 -1 14200 1;
+#X obj 118 484 hsl 300 15 0.01 100 1 1 empty empty empty -2 -6 0 8
+-262144 -1 -1 15200 1;
#X msg 165 522 zoomx \$1;
#X msg 164 548 zoomy \$1;
#X floatatom 124 523 5 0 0 0 - - -;
-#X obj 150 460 hsl 300 15 0.01 100 1 1 empty empty empty -2 -6 0 8
--262144 -1 -1 14800 1;
+#X obj 118 460 hsl 300 15 0.01 100 1 1 empty empty empty -2 -6 0 8
+-262144 -1 -1 15900 1;
#X msg 278 588 centerx \$1;
#X floatatom 281 562 5 0 0 0 - - -;
#X floatatom 363 560 5 0 0 0 - - -;
@@ -217,11 +217,11 @@
#X msg 568 588 framerate 10;
#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
+#X obj 791 432 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;
-#X obj 675 443 pdp_spigot;
-#X obj 674 466 pdp_ascii;
-#X floatatom 744 467 5 0 0 0 - - -;
+#X obj 712 443 pdp_spigot;
+#X obj 711 466 pdp_ascii;
+#X floatatom 781 467 5 0 0 0 - - -;
#X floatatom 580 272 5 0 0 0 - - -;
#X floatatom 829 266 5 0 0 0 - - -;
#X obj 313 44 t b f;
@@ -243,17 +243,27 @@
#X msg 421 687 starve;
#X obj 285 641 pdp_xv;
#X obj 102 601 pdp_i 2003;
-#X obj 598 433 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+#X obj 660 435 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X obj 519 444 pdp_spigot;
-#X obj 518 467 pdp_charcoal;
-#X floatatom 613 468 5 0 0 0 - - -;
+#X obj 581 446 pdp_spigot;
+#X obj 581 467 pdp_charcoal;
+#X floatatom 669 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 msg 233 409 1;
-#X obj 272 411 loadbang;
+#X msg 204 411 1;
+#X obj 240 411 loadbang;
+#X obj 511 429 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 432 440 pdp_spigot;
+#X floatatom 508 448 5 0 0 0 - - -;
+#X obj 432 467 pdp_disintegration;
+#X floatatom 537 428 5 0 0 0 - - -;
+#X obj 776 498 openpanel;
+#X obj 848 499 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X msg 714 498 load \$1;
#X connect 0 0 8 0;
#X connect 1 0 9 0;
#X connect 2 0 1 0;
@@ -471,12 +481,21 @@
#X connect 189 0 116 0;
#X connect 194 0 193 0;
#X connect 195 0 196 1;
-#X connect 196 0 122 0;
+#X connect 196 0 206 0;
#X connect 196 1 197 0;
-#X connect 197 0 122 0;
+#X connect 197 0 206 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;
#X connect 203 0 124 0;
#X connect 204 0 203 0;
+#X connect 205 0 206 1;
+#X connect 206 0 122 0;
+#X connect 206 1 208 0;
+#X connect 207 0 208 1;
+#X connect 208 0 122 0;
+#X connect 209 0 208 2;
+#X connect 210 0 212 0;
+#X connect 211 0 210 0;
+#X connect 212 0 173 0;
diff --git a/system/pidip.c b/system/pidip.c
index 8a62a6f..21c8d2d 100644
--- a/system/pidip.c
+++ b/system/pidip.c
@@ -64,6 +64,16 @@ extern "C"
void pdp_shape_setup(void);
void pdp_spotlight_setup(void);
void pdp_colorgrid_setup(void);
+ void pdp_binary_setup(void);
+ void pdp_erode_setup(void);
+ void pdp_dilate_setup(void);
+ void pdp_hitandmiss_setup(void);
+ void pdp_disintegration_setup(void);
+ void pdp_distance_setup(void);
+ void pdp_theorin_tilde_setup(void);
+ void pdp_theorout_tilde_setup(void);
+ void pdp_cropper_setup(void);
+ void pdp_background_setup(void);
#ifdef HAVE_PIDIP_FFMPEG
void pdp_ffmpeg_tilde_setup(void);
@@ -135,6 +145,16 @@ void pidip_setup(void){
pdp_shape_setup();
pdp_spotlight_setup();
pdp_colorgrid_setup();
+ pdp_binary_setup();
+ pdp_erode_setup();
+ pdp_dilate_setup();
+ pdp_hitandmiss_setup();
+ pdp_disintegration_setup();
+ pdp_distance_setup();
+ pdp_theorin_tilde_setup();
+ pdp_theorout_tilde_setup();
+ pdp_cropper_setup();
+ pdp_background_setup();
#ifdef HAVE_PIDIP_FFMPEG
pdp_ffmpeg_tilde_setup();