[PD-cvs] SF.net SVN: pure-data: [9975] branches/pd-extended/v0-40/externals/pidip

sevyves at users.sourceforge.net sevyves at users.sourceforge.net
Sun Jun 8 13:49:53 CEST 2008


Revision: 9975
          http://pure-data.svn.sourceforge.net/pure-data/?rev=9975&view=rev
Author:   sevyves
Date:     2008-06-08 04:49:52 -0700 (Sun, 08 Jun 2008)

Log Message:
-----------
P.i.D.i.P. 0.12.23 ( My Mum\'s Cam )

Modified Paths:
--------------
    branches/pd-extended/v0-40/externals/pidip/CHANGES.LOG
    branches/pd-extended/v0-40/externals/pidip/configure.ac
    branches/pd-extended/v0-40/externals/pidip/include/pidip_config.h.in
    branches/pd-extended/v0-40/externals/pidip/modules/Makefile.in
    branches/pd-extended/v0-40/externals/pidip/system/pidip.c

Added Paths:
-----------
    branches/pd-extended/v0-40/externals/pidip/doc/pdp_ieee1394l-help.pd
    branches/pd-extended/v0-40/externals/pidip/doc/pdp_v4l2-help.pd
    branches/pd-extended/v0-40/externals/pidip/include/dv1394.h
    branches/pd-extended/v0-40/externals/pidip/modules/pdp_ieee1394l.c
    branches/pd-extended/v0-40/externals/pidip/modules/pdp_v4l2.c
    branches/pd-extended/v0-40/externals/pidip/patches/giss-audio-mp3.pd
    branches/pd-extended/v0-40/externals/pidip/patches/giss-audio-ogg.pd
    branches/pd-extended/v0-40/externals/pidip/patches/giss-dv-linux.pd
    branches/pd-extended/v0-40/externals/pidip/patches/giss.pd

Modified: branches/pd-extended/v0-40/externals/pidip/CHANGES.LOG
===================================================================
--- branches/pd-extended/v0-40/externals/pidip/CHANGES.LOG	2008-06-08 06:50:59 UTC (rev 9974)
+++ branches/pd-extended/v0-40/externals/pidip/CHANGES.LOG	2008-06-08 11:49:52 UTC (rev 9975)
@@ -1,3 +1,10 @@
+0.12.23 ( codename My Mum's Cam )
+  added pdp_v4l2 : video 4 linux 2 object
+    code template from pdp_v4l and xawtv ( v4l2 driver ),
+    thanks to Tom Schouten & Gerd Knorr <kraxel at bytesex.org>
+  added pdp_ieee1394 : finally, the firewire camera object for linux 
+    written by Lluis Gomez i Bigorda ( <lluisgomez at hangar.org> )
+
 0.12.22 ( codename Visual Junk )
   added pdp_dot : matrix printer effect
 

Modified: branches/pd-extended/v0-40/externals/pidip/configure.ac
===================================================================
--- branches/pd-extended/v0-40/externals/pidip/configure.ac	2008-06-08 06:50:59 UTC (rev 9974)
+++ branches/pd-extended/v0-40/externals/pidip/configure.ac	2008-06-08 11:49:52 UTC (rev 9975)
@@ -4,7 +4,7 @@
 AC_CANONICAL_HOST
 AC_CONFIG_HEADER(include/pidip_config.h)
 
-PDP_PIDIP_VERSION="0.12.22"
+PDP_PIDIP_VERSION="0.12.23"
 PD_DIR=/usr/local/pd
 PDP_DIR=/usr/local/pd/pdp
 FFMPEG_SOURCE_DIR=/SOURCES/ffmpeg
@@ -20,10 +20,11 @@
 enable_mpeg4ip=no
 enable_lcapture=no
 
+echo $host
 # Check for DarwinPorts and/or Fink on Mac OS X/Darwin
 case "$host" in
   *-darwin* | *-macos10*)
-	  PDP_CAPTURE_OBJECT="$PDP_CAPTURE_OBJECT pdp_ieee1394.o"
+     PDP_CAPTURE_OBJECT="pdp_ieee1394.o"
      if test -d /sw ; then
        # Fink
        PATH="/sw/bin:/sw/sbin:$PATH"
@@ -223,13 +224,25 @@
 
 if test $enable_lcapture == yes;
 then
-    PDP_CAPTURE_OBJECT="pdp_capture.o"
+    PDP_CAPTURE_OBJECT="$PDP_CAPTURE_OBJECT pdp_capture.o"
     AC_DEFINE(HAVE_IMAGE_MAGICK, 1, image magick capture capability)
     PDP_PIDIP_LIBS="$MAGICK_LIBS $PDP_PIDIP_LIBS"
     PDP_PIDIP_INCLUDES="$MAGICK_CFLAGS $PDP_PIDIP_INCLUDES"
     echo "building pdp_capture."
 fi
 
+AC_CHECK_HEADER(linux/videodev2.h,
+                PDP_CAPTURE_OBJECT="$PDP_CAPTURE_OBJECT pdp_v4l2.o"
+                AC_DEFINE(HAVE_V4L2, 1, build pdp_v4l2),
+                echo "   linux/videodev2.h not found: not building pdp_v4l2")
+
+AC_CHECK_HEADER(libdv/dv.h,
+                PDP_CAPTURE_OBJECT="$PDP_CAPTURE_OBJECT pdp_ieee1394l.o"
+                PDP_PIDIP_LIBS="-ldv $PDP_PIDIP_LIBS"
+                AC_DEFINE(HAVE_LIBDV, 1, build pdp_ieee1394 for linux),
+                echo "   libdv/dv.h not found: not building pdp_ieee1394")
+
+
 if test $enable_ffmpeg == yes;
 then
   echo -n "looking for ffmpeg sources (required) ... "

Added: branches/pd-extended/v0-40/externals/pidip/doc/pdp_ieee1394l-help.pd
===================================================================
--- branches/pd-extended/v0-40/externals/pidip/doc/pdp_ieee1394l-help.pd	                        (rev 0)
+++ branches/pd-extended/v0-40/externals/pidip/doc/pdp_ieee1394l-help.pd	2008-06-08 11:49:52 UTC (rev 9975)
@@ -0,0 +1,24 @@
+#N canvas 173 49 765 399 10;
+#X msg 151 -366 open /dev/dv1394/0;
+#X obj 92 -148 pdp_xv;
+#X obj 42 -369 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X obj 42 -342 metro 40;
+#X msg 194 -300 norm PAL;
+#X msg 164 -337 close;
+#X obj 91 -229 pdp_ieee1394;
+#X text 185 -134 written by Lluis Gomez i Bigorda ( lluisgomez at hangar.org
+);
+#X text 186 -158 pdp_ieee1394 ( source pdp_ieee1394l.c ) : fire wire
+capture object for linux;
+#X text 264 -300 setting video standard;
+#X msg 194 -277 norm SECAM;
+#X msg 195 -253 norm NTSC;
+#X connect 0 0 6 0;
+#X connect 2 0 3 0;
+#X connect 3 0 6 0;
+#X connect 4 0 6 0;
+#X connect 5 0 6 0;
+#X connect 6 0 1 0;
+#X connect 10 0 6 0;
+#X connect 11 0 6 0;


Property changes on: branches/pd-extended/v0-40/externals/pidip/doc/pdp_ieee1394l-help.pd
___________________________________________________________________
Name: svn:executable
   + *

Added: branches/pd-extended/v0-40/externals/pidip/doc/pdp_v4l2-help.pd
===================================================================
--- branches/pd-extended/v0-40/externals/pidip/doc/pdp_v4l2-help.pd	                        (rev 0)
+++ branches/pd-extended/v0-40/externals/pidip/doc/pdp_v4l2-help.pd	2008-06-08 11:49:52 UTC (rev 9975)
@@ -0,0 +1,65 @@
+#N canvas 508 213 927 686 10;
+#X obj 35 20 metro 40;
+#X msg 87 -19 stop;
+#X msg 35 -19 bang;
+#X msg 207 -159 open /dev/video0;
+#X msg 207 -135 open /dev/video1;
+#X text 339 -162 you can choose the input device using the 'open' message.
+the default is /dev/video0;
+#X msg 207 -110 close;
+#X text 347 -110 closes the video port;
+#X msg 208 -84 dim 320 240;
+#X msg 208 -61 dim 640 480;
+#X floatatom 209 -28 5 0 0 0 - - -;
+#X floatatom 212 137 5 0 0 0 - - -;
+#X msg 212 161 freq \$1;
+#X floatatom 273 137 5 0 0 0 - - -;
+#X msg 273 161 freqMHz \$1;
+#X text 317 135 sets the v4l tuner frequency (in v4l units and MHz)
+;
+#X text 325 253 pdp_v4l2 is an interface for video 4 linux 2 devices
+;
+#X text 324 268 it's very similar to pdp_v4l but should support more
+recent cameras \, if it doesn't with yours report bugs to ydegoyon at free.fr
+;
+#X obj 96 247 pdp_v4l2;
+#X text 321 202 creation arguments: <input device>;
+#X floatatom 210 20 5 0 0 0 - - -;
+#X msg 210 40 format \$1;
+#X text 294 18 sets the pixel format (like YUYV \, RGB32 \, ...);
+#X msg 209 -8 input \$1;
+#X text 293 -30 sets the v4l input (like camera \, tuner \, svideo
+\, ...);
+#X text 292 -19 see initialization phase for valid inputs;
+#X text 297 69 sets the video standard ( for tuner cards );
+#X text 294 29 see initialization phase for valid formats;
+#X text 297 81 see initialization phase for valid standards;
+#X floatatom 213 71 5 0 0 0 - - -;
+#X msg 213 91 standard \$1;
+#X obj 96 300 pdp_xv;
+#X msg 179 299 cursor 1;
+#X msg 167 271 posdim 0 0 1440 800;
+#X text 324 303 authors : Yves Degoyon and Lluis Gomez i Bigorda;
+#X text 325 317 code was inspired by pdp_v4l by Tom Schouten and xawtv
+by Gerd Knorr;
+#X connect 0 0 18 0;
+#X connect 1 0 0 0;
+#X connect 2 0 0 0;
+#X connect 3 0 18 0;
+#X connect 4 0 18 0;
+#X connect 6 0 18 0;
+#X connect 8 0 18 0;
+#X connect 9 0 18 0;
+#X connect 10 0 23 0;
+#X connect 11 0 12 0;
+#X connect 12 0 18 0;
+#X connect 13 0 14 0;
+#X connect 14 0 18 0;
+#X connect 18 0 31 0;
+#X connect 20 0 21 0;
+#X connect 21 0 18 0;
+#X connect 23 0 18 0;
+#X connect 29 0 30 0;
+#X connect 30 0 18 0;
+#X connect 32 0 31 0;
+#X connect 33 0 31 0;


Property changes on: branches/pd-extended/v0-40/externals/pidip/doc/pdp_v4l2-help.pd
___________________________________________________________________
Name: svn:executable
   + *

Added: branches/pd-extended/v0-40/externals/pidip/include/dv1394.h
===================================================================
--- branches/pd-extended/v0-40/externals/pidip/include/dv1394.h	                        (rev 0)
+++ branches/pd-extended/v0-40/externals/pidip/include/dv1394.h	2008-06-08 11:49:52 UTC (rev 9975)
@@ -0,0 +1,258 @@
+/*
+ * dv1394.h - DV input/output over IEEE 1394 on OHCI chips
+ *   Copyright (C)2001 Daniel Maas <dmaas at dcine.com>
+ *     receive, proc_fs by Dan Dennedy <dan at dennedy.org>
+ *
+ * based on:
+ *   video1394.h - driver for OHCI 1394 boards
+ *   Copyright (C)1999,2000 Sebastien Rougeaux <sebastien.rougeaux at anu.edu.au>
+ *                          Peter Schlaile <udbz at rz.uni-karlsruhe.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _DV_1394_H
+#define _DV_1394_H
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+
+/* This is the public user-space interface. Try not to break it. */
+
+#define DV1394_API_VERSION 0x20011127
+
+/* ********************
+   **                **
+   **   DV1394 API   **
+   **                **
+   ********************
+
+   There are two methods of operating the DV1394 DV output device.
+
+   1)
+
+   The simplest is an interface based on write(): simply write
+   full DV frames of data to the device, and they will be transmitted
+   as quickly as possible. The FD may be set for non-blocking I/O,
+   in which case you can use select() or poll() to wait for output
+   buffer space.
+
+   To set the DV output parameters (e.g. whether you want NTSC or PAL
+   video), use the DV1394_INIT ioctl, passing in the parameters you
+   want in a struct dv1394_init.
+ 
+   Example 1:
+         To play a raw .DV file:   cat foo.DV > /dev/dv1394
+	 (cat will use write() internally)
+
+   Example 2:
+           static struct dv1394_init init = {
+	      0x63,        (broadcast channel)
+              4,           (four-frame ringbuffer)
+	      DV1394_NTSC, (send NTSC video)
+	      0, 0         (default empty packet rate)
+           }
+
+	   ioctl(fd, DV1394_INIT, &init);
+
+	   while(1) {
+	          read( <a raw DV file>, buf, DV1394_NTSC_FRAME_SIZE );
+		  write( <the dv1394 FD>, buf, DV1394_NTSC_FRAME_SIZE );
+           }
+
+   2)
+
+   For more control over buffering, and to avoid unnecessary copies
+   of the DV data, you can use the more sophisticated the mmap() interface. 
+   First, call the DV1394_INIT ioctl to specify your parameters, 
+   including the number of frames in the ringbuffer. Then, calling mmap() 
+   on the dv1394 device will give you direct access to the ringbuffer
+   from which the DV card reads your frame data.
+
+   The ringbuffer is simply one large, contiguous region of memory
+   containing two or more frames of packed DV data. Each frame of DV data
+   is 120000 bytes (NTSC) or 144000 bytes (PAL).
+
+   Fill one or more frames in the ringbuffer, then use the DV1394_SUBMIT_FRAMES
+   ioctl to begin I/O. You can use either the DV1394_WAIT_FRAMES ioctl
+   or select()/poll() to wait until the frames are transmitted. Next, you'll
+   need to call the DV1394_GET_STATUS ioctl to determine which ringbuffer
+   frames are clear (ready to be filled with new DV data). Finally, use
+   DV1394_SUBMIT_FRAMES again to send the new data to the DV output.
+
+
+   Example: here is what a four-frame ringbuffer might look like
+            during DV transmission:
+
+
+         frame 0   frame 1   frame 2   frame 3
+
+        *--------------------------------------*
+        | CLEAR   | DV data | DV data | CLEAR  |
+        *--------------------------------------*
+                   <ACTIVE> 
+
+	transmission goes in this direction --->>>
+
+
+   The DV hardware is currently transmitting the data in frame 1.
+   Once frame 1 is finished, it will automatically transmit frame 2.
+   (if frame 2 finishes before frame 3 is submitted, the device
+   will continue to transmit frame 2, and will increase the dropped_frames
+   counter each time it repeats the transmission).
+
+ 
+   If you called DV1394_GET_STATUS at this instant, you would
+   receive the following values:
+   
+          n_frames          = 4
+          active_frame      = 1
+          first_clear_frame = 3
+          n_clear_frames    = 2
+
+   At this point, you should write new DV data into frame 3 and optionally
+   frame 0. Then call DV1394_SUBMIT_FRAMES to inform the device that
+   it may transmit the new frames.
+
+*/
+
+
+/* maximum number of frames in the ringbuffer */
+#define DV1394_MAX_FRAMES 32
+
+/* number of *full* isochronous packets per DV frame */
+#define DV1394_NTSC_PACKETS_PER_FRAME 250
+#define DV1394_PAL_PACKETS_PER_FRAME  300
+
+/* size of one frame's worth of DV data, in bytes */
+#define DV1394_NTSC_FRAME_SIZE (480 * DV1394_NTSC_PACKETS_PER_FRAME)
+#define DV1394_PAL_FRAME_SIZE  (480 * DV1394_PAL_PACKETS_PER_FRAME)
+
+
+enum pal_or_ntsc {
+	DV1394_NTSC = 0,
+	DV1394_PAL
+};
+
+
+/* this is the argument to DV1394_INIT */
+struct dv1394_init {
+	/* DV1394_API_VERSION */
+	unsigned int api_version;
+	
+	/* isochronous transmission channel to use */
+	unsigned int channel;
+
+	/* number of frames in the ringbuffer. Must be at least 2
+	   and at most DV1394_MAX_FRAMES. */
+	unsigned int n_frames;
+
+	/* send/receive PAL or NTSC video format */
+	enum pal_or_ntsc format;
+
+	/* the following are used only for transmission */
+ 
+	/* set these to zero unless you want a
+	   non-default empty packet rate (see below) */
+	unsigned long cip_n;
+	unsigned long cip_d;
+
+	/* set this to zero unless you want a
+	   non-default SYT cycle offset (default = 3 cycles) */
+	unsigned int syt_offset;
+};
+
+/* Q: What are cip_n and cip_d? */
+
+/*
+  A: DV video streams do not utilize 100% of the potential bandwidth offered
+  by IEEE 1394 (FireWire). To achieve the correct rate of data transmission,
+  DV devices must periodically insert empty packets into the 1394 data stream.
+  Typically there is one empty packet per 14-16 data-carrying packets.
+
+  Some DV devices will accept a wide range of empty packet rates, while others
+  require a precise rate. If the dv1394 driver produces empty packets at
+  a rate that your device does not accept, you may see ugly patterns on the
+  DV output, or even no output at all.
+
+  The default empty packet insertion rate seems to work for many people; if
+  your DV output is stable, you can simply ignore this discussion. However,
+  we have exposed the empty packet rate as a parameter to support devices that
+  do not work with the default rate. 
+
+  The decision to insert an empty packet is made with a numerator/denominator
+  algorithm. Empty packets are produced at an average rate of CIP_N / CIP_D.
+  You can alter the empty packet rate by passing non-zero values for cip_n
+  and cip_d to the INIT ioctl.
+  
+ */
+
+struct dv1394_status {
+	/* this embedded init struct returns the current dv1394
+	   parameters in use */
+	struct dv1394_init init;
+
+	/* the ringbuffer frame that is currently being
+	   displayed. (-1 if the device is not transmitting anything) */
+	int active_frame;
+
+	/* index of the first buffer (ahead of active_frame) that
+	   is ready to be filled with data */
+	unsigned int first_clear_frame;
+
+	/* how many buffers, including first_clear_buffer, are
+	   ready to be filled with data */
+	unsigned int n_clear_frames;
+
+	/* how many times the DV output has underflowed
+	   since the last call to DV1394_GET_STATUS */
+	unsigned int dropped_frames;
+
+	/* N.B. The dropped_frames counter is only a lower bound on the actual
+	   number of dropped frames, with the special case that if dropped_frames
+	   is zero, then it is guaranteed that NO frames have been dropped
+	   since the last call to DV1394_GET_STATUS.
+	*/
+};
+
+/* Get the driver ready to transmit video.  pass a struct dv1394_init* as
+ * the parameter (see below), or NULL to get default parameters */
+#define DV1394_INIT			_IOW('#', 0x06, struct dv1394_init)
+
+/* Stop transmitting video and free the ringbuffer */
+#define DV1394_SHUTDOWN		_IO ('#', 0x07)
+
+/* Submit N new frames to be transmitted, where the index of the first new
+ * frame is first_clear_buffer, and the index of the last new frame is
+ * (first_clear_buffer + N) % n_frames */
+#define DV1394_SUBMIT_FRAMES	_IO ('#', 0x08)
+
+/* Block until N buffers are clear (pass N as the parameter) Because we
+ * re-transmit the last frame on underrun, there will at most be n_frames
+ * - 1 clear frames at any time */
+#define DV1394_WAIT_FRAMES		_IO ('#', 0x09)
+
+/* Capture new frames that have been received, where the index of the
+ * first new frame is first_clear_buffer, and the index of the last new
+ * frame is (first_clear_buffer + N) % n_frames */
+#define DV1394_RECEIVE_FRAMES	_IO ('#', 0x0a)
+
+/* Tell card to start receiving DMA */
+#define DV1394_START_RECEIVE	_IO ('#', 0x0b)
+
+/* Pass a struct dv1394_status* as the parameter */
+#define DV1394_GET_STATUS		_IOR('#', 0x0c, struct dv1394_status)
+
+#endif /* _DV_1394_H */


Property changes on: branches/pd-extended/v0-40/externals/pidip/include/dv1394.h
___________________________________________________________________
Name: svn:executable
   + *

Modified: branches/pd-extended/v0-40/externals/pidip/include/pidip_config.h.in
===================================================================
--- branches/pd-extended/v0-40/externals/pidip/include/pidip_config.h.in	2008-06-08 06:50:59 UTC (rev 9974)
+++ branches/pd-extended/v0-40/externals/pidip/include/pidip_config.h.in	2008-06-08 11:49:52 UTC (rev 9975)
@@ -9,3 +9,9 @@
 
 /* Define to 1 if you have mpeg4ip source tree */
 #undef HAVE_PIDIP_MPEG4IP
+
+/* Define to 1 if you have video 4 linux 2 */
+#undef HAVE_V4L2
+
+/* Define to 1 if you have libdv for firewire camera */
+#undef HAVE_LIBDV

Modified: branches/pd-extended/v0-40/externals/pidip/modules/Makefile.in
===================================================================
--- branches/pd-extended/v0-40/externals/pidip/modules/Makefile.in	2008-06-08 06:50:59 UTC (rev 9974)
+++ branches/pd-extended/v0-40/externals/pidip/modules/Makefile.in	2008-06-08 11:49:52 UTC (rev 9975)
@@ -20,7 +20,7 @@
           pdp_disintegration.o pdp_distance.o pdp_theorin~.o \
           pdp_theorout~.o pdp_cropper.o pdp_background.o \
           pdp_mapper.o pdp_theonice~.o pdp_icedthe~.o\
-          pdp_fdiff.o pdp_hue.o pdp_dot.o pdp_qtext.o \
-	  @PDP_CAPTURE_OBJECT@ @PDP_STREAMING_OBJECTS@ # pdp_xcanvas.o pdp_aa.o
+          pdp_fdiff.o pdp_hue.o pdp_dot.o pdp_qtext.o\
+         @PDP_CAPTURE_OBJECT@ @PDP_STREAMING_OBJECTS@ # pdp_xcanvas.o pdp_aa.o
 
 all_modules: $(OBJECTS) 

Added: branches/pd-extended/v0-40/externals/pidip/modules/pdp_ieee1394l.c
===================================================================
--- branches/pd-extended/v0-40/externals/pidip/modules/pdp_ieee1394l.c	                        (rev 0)
+++ branches/pd-extended/v0-40/externals/pidip/modules/pdp_ieee1394l.c	2008-06-08 11:49:52 UTC (rev 9975)
@@ -0,0 +1,546 @@
+/*
+ *   Pure Data Packet module.
+ *   Copyright (c) by Lluis Gomez i Bigorda <lluisgomez at hangar.org>
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 2 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+
+#include "pdp_config.h"
+#include "pdp.h"
+#include "pdp_llconv.h"
+#include "pdp_imageproc.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <unistd.h>
+#include <string.h>
+#include <assert.h>
+#include <getopt.h>             /* getopt_long() */
+#include <ctype.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <malloc.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <linux/types.h>
+#include <sched.h>
+#include <pthread.h>
+
+#include "dv1394.h"
+#include <libdv/dv.h>
+
+#define N_BUF 2 /*DV1394_MAX_FRAMES/4*/
+#define PAL 0
+#define NTSC 1
+
+
+typedef struct pdp_ieee1394_struct
+{
+  t_object x_obj;
+  
+  t_outlet *x_outlet0;
+
+  int x_width;
+  int x_height;
+
+  int dvfd;
+  unsigned char *videobuf;
+  unsigned char *decodedbuf;
+  bool x_frame_ready;
+  int  x_frame, x_lastframe;
+  bool x_continue_thread;
+  pthread_t x_thread_id;
+
+  int x_framesize;
+  unsigned char *x_mmapbuf;
+
+  dv_decoder_t *x_decoder;
+
+  bool x_haveVideo;
+  bool x_capturing;
+  bool x_norm;
+  char* x_devicename;
+  int x_devicenum;
+
+} t_pdp_ieee1394;
+
+
+
+static void
+process_image                   (t_pdp_ieee1394 *x)
+{
+	
+    unsigned int w,h;
+    int object,length,pos,i,encoding;
+    t_pdp* header;
+    t_image* image;
+    short int * data;
+	
+    //fputc ('.', stdout);
+    //fflush (stdout);
+	
+	
+	
+    /* create new packet */
+    w = x->x_width;
+    h = x->x_height;
+
+
+    object = pdp_packet_new_image(PDP_IMAGE_YV12, w, h);
+    header = pdp_packet_header(object);
+    image = pdp_packet_image_info(object);
+
+    if (!header){
+	post("pdp_v4l: ERROR: can't allocate packet");
+	return;
+    }
+
+    data = (short int *) pdp_packet_data(object);
+	
+    /* convert data to pdp packet */
+    //pdp_llconv(x->decodedbuf, RIF_YVYU_P____U8, data, RIF_YVU__P411_S16, w, h); 
+    pdp_llconv(x->decodedbuf, RIF_RGB__P____U8, data, RIF_YVU__P411_S16, w, h); //
+
+
+    pdp_packet_pass_if_valid(x->x_outlet0, &object);
+}
+
+static int pdp_ieee1394_read_frame(t_pdp_ieee1394 *x)
+{
+
+  if (!x->x_decoder)return 0;
+  if (!x->x_frame_ready) {
+	//x->x_image.newimage = 0;
+  }
+  else {
+    dv_parse_header(x->x_decoder, x->videobuf);
+    dv_parse_packs (x->x_decoder, x->videobuf);
+    if(dv_frame_changed(x->x_decoder)) {
+      int pitches[3] = {0,0,0};
+      //      pitches[0]=x_decoder->width*3; // rgb
+      //      pitches[0]=x_decoder->width*((x_reqFormat==GL_RGBA)?3:2);
+      pitches[0]=x->x_decoder->width*3;
+      x->x_height=x->x_decoder->height;
+      x->x_width=x->x_decoder->width;
+      
+      /* decode the DV-data to something we can handle and that is similar to the wanted format */
+      //      dv_report_video_error(x_decoder, videobuf);  // do we need this ?
+      // gosh, this(e_dv_color_rgb) is expansive:: the decoding is done in software only...
+      //      dv_decode_full_frame(x_decoder, videobuf, ((x_reqFormat==GL_RGBA)?e_dv_color_rgb:e_dv_color_yuv), &decodedbuf, pitches);
+      dv_decode_full_frame(x->x_decoder, x->videobuf, e_dv_color_rgb, &x->decodedbuf, pitches);
+
+      //     post("sampling %d", x_decoder->sampling);
+
+      /* convert the colour-space to the one we want */
+      /*
+       * btw. shouldn't this be done in [pix_video] rather than here ?
+       * no because [pix_video] knows nothing about the possible colourspaces in here
+       */
+
+      // letting the library do the conversion to RGB and then doing the conversion to RGBA
+      // is really stupid.
+      // let's do it all ourselfes:
+      //      if (x_reqFormat==GL_RGBA)x_image.image.fromRGB(decodedbuf); else
+      //x_image.image.fromYVYU(decodedbuf);
+    	process_image (x);
+	
+    }
+
+    x->x_frame_ready = false;
+  }
+	
+  return 1;
+}
+
+
+static void *pdp_ieee1394_thread(void *voidx)
+{
+    t_pdp_ieee1394 *x = ((t_pdp_ieee1394 *)voidx);
+
+  int fd=x->dvfd;
+  int framesize = x->x_framesize;
+  struct dv1394_status dvst;
+  int n_frames = N_BUF;
+  unsigned char* mmapbuf = x->x_mmapbuf;
+
+  /* this will hang if no ieee1394-device is present, what to do about it ??? */
+  x->x_haveVideo=false;
+  if(ioctl(fd, DV1394_WAIT_FRAMES, 1)) {
+    perror("error: ioctl WAIT_FRAMES");
+    x->x_capturing=false; return NULL;
+  }
+  if (ioctl(fd, DV1394_GET_STATUS, &dvst))   {
+    perror("ioctl GET_STATUS");
+    x->x_capturing=false; return NULL;
+  }
+  x->x_haveVideo=true;
+  x->x_capturing=true;
+
+  //fprintf(stderr,"aqui1");
+  while(x->x_continue_thread){
+  //fprintf(stderr,"aqui2");
+    if(ioctl(fd, DV1394_WAIT_FRAMES, n_frames - 1)) {
+      perror("error: ioctl WAIT_FRAMES");
+      x->x_capturing=false; return NULL;
+    }
+    if (ioctl(fd, DV1394_GET_STATUS, &dvst))   {
+      perror("ioctl GET_STATUS");
+      x->x_capturing=false; return NULL;
+    }
+  //fprintf(stderr,"aqui3");
+    /*
+      dvst.init
+      dvst.active_frame
+      dvst.first_clear_frame
+      dvst.n_clear_frames
+      dvst.dropped_frames
+    */	
+    if (dvst.dropped_frames > 0) {
+      verbose(1,"dv1394: dropped at least %d frames", dvst.dropped_frames);
+    }
+    /*
+      memcpy( g_current_frame->data, 
+      (g_dv1394_map + (dvst.first_clear_frame * DV1394_PAL_FRAME_SIZE)),
+      DV1394_PAL_FRAME_SIZE );
+    */
+    x->videobuf = mmapbuf + (dvst.first_clear_frame * framesize);
+
+    //post("thread %d\t%x %x", me->frame, me->tvfd, me->vmmap);
+    if (ioctl(fd, DV1394_RECEIVE_FRAMES, 1) < 0)    {
+      perror("receiving...");
+    }
+    x->x_lastframe=x->x_frame;
+    x->x_frame++;
+    x->x_frame%=N_BUF;
+    x->x_frame_ready = true;
+  }
+  x->x_capturing=false;
+
+  //process_image  (x, x->videobuf);
+
+    return 0;
+}
+
+static void
+close_device                    (t_pdp_ieee1394 *x)
+{
+  if(x->x_mmapbuf!=NULL)munmap(x->x_mmapbuf, N_BUF*x->x_framesize);
+  if(x->dvfd>=0)close(x->dvfd);
+  x->x_haveVideo=false;
+
+}
+
+
+static int
+startTransfer (t_pdp_ieee1394 *x)
+{
+  //if ((x->dvfd=openDevice(format))<0){
+  //  verbose(1, "DV4L: closed");
+  //  return(0);
+  //}
+  //x->x_image.newimage=0;
+  //x->x_image.image.data=0;
+  //x->x_image.image.xsize=720;
+  //x->x_image.image.ysize=576;
+  //x->x_image.image.setCsizeByFormat(x->x_reqFormat);
+  //x->x_image.image.reallocate();
+  x->videobuf=NULL;
+
+  x->x_frame_ready = false; 
+
+  if(x->x_decoder!=NULL)dv_decoder_free(x->x_decoder);
+  if (!(x->x_decoder=dv_decoder_new(1, 1, 1))){
+    //error("DV4L: unable to create DV-decoder...closing");
+    close_device(x);
+    return(0);
+  }
+  //x->x_decoder->quality=x->x_quality;
+  x->x_decoder->quality = DV_QUALITY_BEST;
+  verbose(1, "DV4L: DV decoding quality %d ", x->x_decoder->quality);
+  //fprintf(stderr,"before");
+  x->x_continue_thread = true;
+  pthread_create(&x->x_thread_id, 0, pdp_ieee1394_thread, x);
+  return 1;
+}
+
+static int
+stopTransfer                   (t_pdp_ieee1394 *x)
+{
+  /* close the dv4l device and dealloc buffer */
+  /* terminate thread if there is one */
+  x->x_continue_thread=false;
+  int i=0;
+  if(x->x_haveVideo){
+    while(x->x_capturing){
+      struct timeval sleep;
+      sleep.tv_sec=0;  sleep.tv_usec=10; /* 10us */
+      select(0,0,0,0,&sleep);
+      i++;
+    }
+    verbose(1, "DV4L: shutting down dv1394 after %d usec", i*10);
+    ioctl(x->dvfd, DV1394_SHUTDOWN);
+  }
+  close_device(x);
+  return(1);
+}
+
+
+static void pdp_ieee1394_close(t_pdp_ieee1394 *x)
+{
+  /* close the v4l device and dealloc buffer */
+
+    void *dummy;
+    //x->x_initialized = false;
+    /* terminate thread if there is one */
+    if(x->x_continue_thread){
+	x->x_continue_thread = 0;
+	pthread_join (x->x_thread_id, &dummy);
+    }
+
+
+        //stop_capturing (x);
+
+        //uninit_device (x);
+
+        close_device (x);
+	
+	if (-1 == close (x->dvfd))
+	        post ("close");
+
+        x->dvfd = -1;
+}
+
+
+static int pdp_ieee1394_open(t_pdp_ieee1394 *x, t_symbol *name)
+{
+  x->x_devicename = name->s_name;
+
+  if(x->x_haveVideo){
+    verbose(1, "Stream already going on. Doing some clean-up...");
+    stopTransfer(x);
+  }
+
+  /*
+  All of the errors in this method return -1 anyhow, so fd should be 0 to allow
+  successful open if everything goes ok.
+
+  Ico Bukvic ico at vt.edu 2-18-07
+  */
+  int fd = 0; 
+  struct dv1394_init init = {
+    DV1394_API_VERSION, // api version 
+    0x63,              // isochronous transmission channel
+    N_BUF,             // number of frames in ringbuffer
+    (x->x_norm==NTSC)?DV1394_NTSC:DV1394_PAL,         // PAL or NTSC
+    //DV1394_PAL,         // PAL or NTSC
+    0, 0 , 0                // default packet rate
+  };
+
+  x->x_framesize=(x->x_norm==NTSC)?DV1394_NTSC_FRAME_SIZE:DV1394_PAL_FRAME_SIZE;
+  //x->x_framesize=DV1394_PAL_FRAME_SIZE;
+
+  if(x->x_devicename){
+    if ((fd = open(x->x_devicename, O_RDWR)) < 0) {
+        perror(x->x_devicename);
+        return -1;
+    }
+  } else {
+    signed char devnum=(x->x_devicenum<0)?0:(signed char)x->x_devicenum;
+    char buf[256];
+    buf[255]=0;buf[32]=0;buf[33]=0;
+    if (devnum<0)devnum=0;
+    snprintf(buf, 32, "/dev/ieee1394/dv/host%d/%s/in", devnum, (x->x_norm==NTSC)?"NTSC":"PAL");
+    //snprintf(buf, 32, "/dev/ieee1394/dv/host%d/%s/in", devnum, "PAL");
+    if ((fd = open(buf, O_RDWR)) < 0)    {
+      snprintf(buf, 32, "/dev/dv1394/%d", devnum);
+      if ((fd = open(buf, O_RDWR)) < 0) {
+	if ((fd=open("/dev/dv1394", O_RDWR)) < 0)    {
+	  perror(buf);
+	  return -1;
+	}
+      }
+    }
+  }
+  if (ioctl(fd, DV1394_INIT, &init) < 0)    {
+    perror("initializing");
+    close(fd);
+    return -1;
+  }
+  
+  x->x_mmapbuf = (unsigned char *) mmap( NULL, N_BUF*x->x_framesize,
+				       PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
+  if(x->x_mmapbuf == MAP_FAILED) {
+    perror("mmap frame buffers");
+    close(fd);
+    return -1;
+  }
+  
+  if(ioctl(fd, DV1394_START_RECEIVE, NULL)) {
+    perror("dv1394 START_RECEIVE ioctl");
+    close(fd);
+    return -1;
+  }
+  /*Extra verbosity never hurt anyone...
+
+  Ico Bukvic ico at vt.edu 2-18-07
+  */
+  post("DV4L: Successfully opened...");
+  startTransfer(x);
+  x->dvfd=fd;
+
+  return 1;
+	
+}
+
+
+static int pdp_ieee1394_norm(t_pdp_ieee1394 *x, t_symbol *s)
+{
+  int inorm = x->x_norm;
+  char* norm=s->s_name;
+  switch(norm[0]){
+  case 'N': case 'n':
+    inorm=NTSC;
+    break;
+  case 'P': case 'p':
+    inorm=PAL;
+    break;
+  }
+  if (inorm==x->x_norm)return 0;
+  x->x_norm=inorm;
+  return 0;
+}
+
+
+static void pdp_ieee1394_bang(t_pdp_ieee1394 *x)
+{
+   
+  /* if initialized, grab a frame and output it */
+
+
+
+    /* convert data to pdp packet */
+/*
+    switch(x->x_v4l_palette){
+    case  VIDEO_PALETTE_YUV420P:
+	pdp_llconv(newimage, RIF_YUV__P411_U8, data, RIF_YVU__P411_S16, w, h); 
+	break;*/
+	
+	/* long live standards. v4l's rgb is in fact ogl's bgr */
+/*    case  VIDEO_PALETTE_RGB24:
+	pdp_llconv(newimage, RIF_BGR__P____U8, data, RIF_YVU__P411_S16, w, h); 
+	break;
+
+    case  VIDEO_PALETTE_RGB32:
+	pdp_llconv(newimage, RIF_BGRA_P____U8, data, RIF_YVU__P411_S16, w, h); 
+	break;
+
+    case  VIDEO_PALETTE_YUV422:
+	pdp_llconv(newimage, RIF_YUYV_P____U8, data, RIF_YVU__P411_S16, w, h); 
+	break;*/
+
+
+    /*default:
+	post("pdp_ieee1394: unsupported palette");
+	break;
+    }*/
+
+/*
+    if (PDP_IMAGE_YV12 == x->x_pdp_image_type){
+	pixel_unpack_u8s16_y(&newimage[0], data, nbpixels>>3, x->x_state_data->gain);
+	pixel_unpack_u8s16_uv(&newimage[plane1], &data[plane2], nbpixels>>5, x->x_state_data->gain);
+	pixel_unpack_u8s16_uv(&newimage[plane2], &data[plane1], nbpixels>>5, x->x_state_data->gain);
+    }
+*/
+    //x->x_v4l_palette = VIDEO_PALETTE_YUV420P;
+    //x->x_v4l_palette = VIDEO_PALETTE_RGB24;
+
+/*
+
+    else if(PDP_IMAGE_GREY == x->x_pdp_image_type){
+	pixel_unpack_u8s16_y(&newimage[0], data, nbpixels>>3, x->x_state_data->gain);
+    }
+*/
+    //post("pdp_ieee1394: mark unused %d", object);
+
+    /*pdp_packet_pass_if_valid(x->x_outlet0, &object);*/
+
+}
+
+
+
+static void pdp_ieee1394_free(t_pdp_ieee1394 *x)
+{
+  //pdp_ieee1394_close(x);
+  if(x->x_haveVideo)stopTransfer(x);
+  //if(x->decodedbuf)delete[]decodedbuf;
+  if(x->x_decoder!=NULL)dv_decoder_free(x->x_decoder);
+}
+
+t_class *pdp_ieee1394_class;
+
+
+
+void *pdp_ieee1394_new(t_symbol *vdef, t_symbol *format)
+{
+    t_pdp_ieee1394 *x = (t_pdp_ieee1394 *)pd_new(pdp_ieee1394_class);
+
+    x->x_outlet0 = outlet_new(&x->x_obj, &s_anything);
+
+    //x->x_channel = 0;//0x63;
+    x->x_devicenum  = 0;
+    x->x_norm = PAL;
+    x->x_decoder=NULL;
+    x->x_frame_ready=false;
+    x->x_width=720;
+    x->x_height=576;
+    x->x_framesize=DV1394_PAL_FRAME_SIZE;
+    //x->x_quality = DV_QUALITY_BEST;
+    //x->decodedbuf = new unsigned char[720*576*3];
+    x->decodedbuf = malloc (720*576*3*sizeof(unsigned char));
+    x->x_haveVideo=false;
+
+    return (void *)x;
+}
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+void pdp_ieee1394_setup(void)
+{
+    post( " pdp_ieee1394 : linux dv interface by Lluis Gomez i Bigorda (lluisgomez at hangar.org)" );
+
+    pdp_ieee1394_class = class_new(gensym("pdp_ieee1394"), (t_newmethod)pdp_ieee1394_new,
+    	(t_method)pdp_ieee1394_free, sizeof(t_pdp_ieee1394), 0, A_DEFSYMBOL, A_DEFSYMBOL, A_NULL);
+
+
+    class_addmethod(pdp_ieee1394_class, (t_method)pdp_ieee1394_read_frame, gensym("bang"), A_NULL);
+    class_addmethod(pdp_ieee1394_class, (t_method)pdp_ieee1394_close, gensym("close"), A_NULL);
+    class_addmethod(pdp_ieee1394_class, (t_method)pdp_ieee1394_open, gensym("open"), A_SYMBOL, A_NULL);
+    class_addmethod(pdp_ieee1394_class, (t_method)pdp_ieee1394_norm, gensym("norm"), A_SYMBOL, A_NULL);
+
+}
+
+#ifdef __cplusplus
+}
+#endif


Property changes on: branches/pd-extended/v0-40/externals/pidip/modules/pdp_ieee1394l.c
___________________________________________________________________
Name: svn:executable
   + *

Added: branches/pd-extended/v0-40/externals/pidip/modules/pdp_v4l2.c
===================================================================
--- branches/pd-extended/v0-40/externals/pidip/modules/pdp_v4l2.c	                        (rev 0)
+++ branches/pd-extended/v0-40/externals/pidip/modules/pdp_v4l2.c	2008-06-08 11:49:52 UTC (rev 9975)
@@ -0,0 +1,852 @@
+/*
+ *   PiDiP module
+ *   Authors : Yves Degoyon ( ydegoyon at free.fr ) and Lluis Gomez i Bigorda
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 2 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+/*  This object is a video 4 linux 2 driver wrapper,
+ *  inspired by pdp_v4l by Tom Schouten
+ *  and some driver code from xawtv ( thanks to Gerd Knorr <kraxel at bytesex.org> )
+ */
+
+
+#include "pdp_config.h"
+#include "pdp.h"
+#include "pdp_llconv.h"
+#include "pdp_imageproc.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <unistd.h>
+#include <string.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <linux/types.h>
+#include <linux/videodev.h>
+#include <linux/videodev2.h>
+#include <sys/mman.h>
+#include <sched.h>
+#include <pthread.h>
+
+// dont open any more after a set number 
+// of failed attempts
+// this is to prevent locks on auto-open
+// is reset when manually opened or closed
+#define PDP_XV_RETRIES 10
+
+
+#define DEVICENO 0
+#define NBUF 2
+#define COMPOSITEIN 1
+#define WANTED_BUFFERS 2
+#define MAX_INPUT   16
+#define MAX_NORM    16
+#define MAX_FORMAT  32
+#define MAX_CTRL    32
+
+
+typedef struct pdp_v4l2_struct
+{
+  t_object x_obj;
+  t_float x_f;
+  
+  t_outlet *x_outlet0;
+
+  bool x_initialized;
+  bool x_auto_open;
+
+  unsigned int x_width;
+  unsigned int x_height;
+
+  int x_curinput;
+  int x_curstandard;
+  int x_curformat;
+  int x_freq;
+
+  // video 4 linux 2 structures
+  int x_ninputs;
+  int x_nstandards;
+  int x_nformats;
+  struct v4l2_capability x_vcap;
+  struct v4l2_input x_inputs[MAX_INPUT];
+  struct v4l2_standard x_standards[MAX_NORM];
+  struct v4l2_fmtdesc x_formats[MAX_FORMAT];
+  struct v4l2_streamparm x_streamparam;
+  struct v4l2_queryctrl x_controls[MAX_CTRL*2];
+  struct v4l2_buffer x_v4l2_buf[WANTED_BUFFERS];
+  struct v4l2_format x_v4l2_format;
+  struct v4l2_requestbuffers x_reqbufs;
+
+  unsigned char *x_pdp_buf[WANTED_BUFFERS];
+ 
+  int x_tvfd;
+  int x_frame;
+  int x_skipnext;
+  int x_mytopmargin, x_mybottommargin;
+  int x_myleftmargin, x_myrightmargin;
+
+  t_symbol *x_device;
+
+  pthread_t x_thread_id;
+  int x_continue_thread;
+  int x_frame_ready;
+  int x_only_new_frames;
+  int x_last_frame;
+
+  int x_open_retry;
+
+  u32 x_minwidth;
+  u32 x_maxwidth;
+  u32 x_minheight;
+  u32 x_maxheight;
+
+  int x_debug;
+} t_pdp_v4l2;
+
+static void pdp_v4l2_close(t_pdp_v4l2 *x)
+{
+  /* close the v4l device and dealloc buffer */
+
+  void *dummy;
+  int i;
+
+    /* terminate thread if there is one */
+    if(x->x_continue_thread){
+	x->x_continue_thread = 0;
+	pthread_join (x->x_thread_id, &dummy);
+    }
+
+    if (x->x_tvfd >= 0)
+    {
+        close(x->x_tvfd);
+        x->x_tvfd = -1;
+    }
+
+    if (x->x_initialized){
+        for( i=0; i<WANTED_BUFFERS; i++ )
+        {
+           munmap(x->x_pdp_buf[i], x->x_v4l2_buf[i].length);
+        }
+	x->x_initialized = false;
+    }
+
+}
+
+static void pdp_v4l2_close_manual(t_pdp_v4l2 *x)
+{
+    x->x_open_retry = PDP_XV_RETRIES;
+    pdp_v4l2_close(x);
+}
+
+static void pdp_v4l2_close_error(t_pdp_v4l2 *x)
+{
+    pdp_v4l2_close(x);
+    if(x->x_open_retry) x->x_open_retry--;
+}
+
+static int pdp_v4l2_capture_frame(t_pdp_v4l2* x)
+{
+    x->x_v4l2_buf[x->x_frame].index  = x->x_frame;
+    x->x_v4l2_buf[x->x_frame].type   = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+    x->x_v4l2_buf[x->x_frame].memory = V4L2_MEMORY_MMAP;
+ 
+    if (-1 == ioctl (x->x_tvfd, VIDIOC_DQBUF, &x->x_v4l2_buf[x->x_frame])) 
+    {
+       switch (errno) 
+       {
+          case EAGAIN:
+            return 0;
+
+          case EIO:
+           // could ignore EIO, see spec
+
+          default:
+            post( "pdp_v4l2 : error reading buffer : thread exiting");
+            exit(-1);
+       }
+    }
+
+    // reenqueing buffer
+    if (-1 == ioctl (x->x_tvfd, VIDIOC_QBUF, &x->x_v4l2_buf[x->x_frame]))
+    {
+       perror("pdp_v4l2 : error queing buffers : thread exiting");
+       exit(-1);
+    }
+
+    return 0;
+} 
+
+static void pdp_v4l2_wait_frame(t_pdp_v4l2* x)
+{
+    // wait an event on file descriptor
+    fd_set fds;
+    struct timeval tv;
+    int ret;
+
+    FD_ZERO (&fds);
+    FD_SET (x->x_tvfd, &fds);
+
+    // Timeout. 
+    tv.tv_sec = 2;
+    tv.tv_usec = 0;
+
+    ret = select (x->x_tvfd + 1, &fds, NULL, NULL, &tv);
+
+    if (-1 == ret) {
+       if (EINTR == errno) return;
+       post ( "pdp_v4l2 : select timeout : thread exiting");
+       exit (-1);
+    }
+    if (0 == ret) 
+    {
+       post ( "pdp_v4l2 : select timeout : thread exiting");
+       exit (-1);
+    }
+}
+
+static int pdp_v4l2_start_capturing(t_pdp_v4l2 *x)
+{
+  enum v4l2_buf_type type;
+
+    type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+    if (-1 == ioctl (x->x_tvfd, VIDIOC_STREAMON, &type))
+    {
+       perror("pdp_v4l2 : error starting streaming");
+       return -1;
+    }
+    post("pdp_v4l2 : capture started");
+    return 0;
+}
+
+static int pdp_v4l2_stop_capturing(t_pdp_v4l2 *x)
+{
+  enum v4l2_buf_type type;
+
+    type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+    if (-1 == ioctl (x->x_tvfd, VIDIOC_STREAMOFF, &type))
+    {
+       perror("pdp_v4l2 : error stopping streaming");
+       return -1;
+    }
+    return 0;
+}
+
+static void *pdp_v4l2_thread(void *voidx)
+{
+    t_pdp_v4l2 *x = ((t_pdp_v4l2 *)voidx);
+
+    x->x_frame ^= 0x1;
+    if ( -1 == pdp_v4l2_start_capturing( x ) )
+    {
+       post( "pdp_v4l2 : problem starting capture.. exiting " );
+       exit( -1 );
+    }
+
+    /* capture with a double buffering scheme */
+    while (x->x_continue_thread)
+    {
+        /* schedule capture command for next frame */
+        pdp_v4l2_wait_frame(x);
+
+        /* wait until previous capture is ready */
+        x->x_frame ^= 0x1;
+        pdp_v4l2_capture_frame(x);
+
+        /* setup pointers for main thread */
+        x->x_frame_ready = 1;
+        x->x_last_frame = x->x_frame;
+    }
+
+    if ( -1 == pdp_v4l2_stop_capturing( x ) )
+    {
+       post( "pdp_v4l2 : problem stopping capture.. " );
+    }
+
+    post( "pdp_v4l2 : capture thread quitting" );
+    return 0;
+}
+
+static void pdp_v4l2_setlegaldim(t_pdp_v4l2 *x, int xx, int yy);
+
+static int pdp_v4l2_set_format(t_pdp_v4l2 *x, t_int index)
+{
+    x->x_v4l2_format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+    x->x_v4l2_format.fmt.pix.pixelformat = x->x_formats[index].pixelformat;
+    x->x_v4l2_format.fmt.pix.width = x->x_width;
+    x->x_v4l2_format.fmt.pix.height = x->x_height;
+    x->x_v4l2_format.fmt.pix.field = V4L2_FIELD_ANY;
+    x->x_v4l2_format.fmt.pix.bytesperline = 0;
+
+    post( "pdp_v4l2 : setting format : pixel format : %c%c%c%c", 
+            x->x_v4l2_format.fmt.pix.pixelformat & 0xff,
+            (x->x_v4l2_format.fmt.pix.pixelformat >>  8) & 0xff,
+            (x->x_v4l2_format.fmt.pix.pixelformat >> 16) & 0xff,
+            (x->x_v4l2_format.fmt.pix.pixelformat >> 24) & 0xff );
+
+    if (-1 == ioctl(x->x_tvfd, VIDIOC_S_FMT, &x->x_v4l2_format, EINVAL))
+    { 
+       perror( "pdp_v4l2 : setting format" );
+       return -1;
+    }
+
+    if ( x->x_v4l2_format.fmt.pix.pixelformat != x->x_formats[index].pixelformat )
+    {
+       post( "pdp_v4l2 : couldn't set format : wrong pixel format " );
+       return -1;
+    }
+    post( "pdp_v4l2 : capture format : width : %d : height :%d : bytesperline : %d : image size : %d",
+          x->x_v4l2_format.fmt.pix.width , x->x_v4l2_format.fmt.pix.height,
+          x->x_v4l2_format.fmt.pix.bytesperline, x->x_v4l2_format.fmt.pix.sizeimage );
+    return 0;
+}
+
+static int pdp_v4l2_init_mmap(t_pdp_v4l2 *x)
+{
+  unsigned int i;
+
+    // get mmap numbers 
+    x->x_reqbufs.count  = WANTED_BUFFERS;
+    x->x_reqbufs.type   = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+    x->x_reqbufs.memory = V4L2_MEMORY_MMAP;
+    if (-1 == ioctl(x->x_tvfd, VIDIOC_REQBUFS, &x->x_reqbufs, 0))
+    {
+        post( "pdp_v4l2 : error : couldn't init driver buffers" ); 
+        return -1;
+    }
+    post("pdp_v4l2: got %d buffers type %d memory %d", 
+        x->x_reqbufs.count, x->x_reqbufs.type, x->x_reqbufs.memory );
+
+    for (i = 0; i < x->x_reqbufs.count; i++) 
+    {
+        x->x_v4l2_buf[i].index  = i;
+        x->x_v4l2_buf[i].type   = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+        x->x_v4l2_buf[i].memory = V4L2_MEMORY_MMAP;
+        if (-1 == ioctl(x->x_tvfd, VIDIOC_QUERYBUF, &x->x_v4l2_buf[i], 0))
+        {
+            post( "pdp_v4l2 : error : couldn't query buffer %d", i ); 
+            return -1;
+        }
+        x->x_pdp_buf[i] = (unsigned char *) mmap(NULL, x->x_v4l2_buf[i].length,
+                          PROT_READ | PROT_WRITE, MAP_SHARED,
+                          x->x_tvfd, x->x_v4l2_buf[i].m.offset);
+        if (MAP_FAILED == x->x_pdp_buf[i]) 
+        {
+            perror("pdp_v4l2 : mmap");
+            return -1;
+        }
+    }
+    post( "pdp_v4l2 : mapped %d buffers", x->x_reqbufs.count ); 
+
+    for (i = 0; i < WANTED_BUFFERS; i++) 
+    {
+        x->x_v4l2_buf[i].type        = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+        x->x_v4l2_buf[i].memory      = V4L2_MEMORY_MMAP;
+        x->x_v4l2_buf[i].index       = i;
+
+        if (-1 == ioctl (x->x_tvfd, VIDIOC_QBUF, &x->x_v4l2_buf[i]))
+        {
+            perror("pdp_v4l2 : error queing buffers");
+            return -1;
+        }
+    }
+    post( "pdp_v4l2 : queued %d buffers", x->x_reqbufs.count ); 
+
+    return 0;
+}
+
+static void pdp_v4l2_open(t_pdp_v4l2 *x, t_symbol *name)
+{
+    // open a v4l device and allocate a buffer
+
+    unsigned int size;
+    int i;
+
+    unsigned int width, height;
+
+    /* if already opened -> close */
+    if (x->x_initialized) pdp_v4l2_close(x);
+
+    /* exit if retried too much */
+    if (!x->x_open_retry){
+	post("pdp_v4l2: retry count reached zero for %s", name->s_name);
+	post("pdp_v4l2: try to open manually");
+	return;
+    }
+
+    post("pdp_v4l2: opening %s", name->s_name);
+
+    x->x_device = name;
+
+    if ((x->x_tvfd = open(name->s_name, O_RDWR)) < 0)
+    {
+        post("pdp_v4l2: error: open %s: %s",name->s_name,strerror(errno));
+        perror(name->s_name);
+        pdp_v4l2_close_error(x);
+        x->x_initialized = false;
+        return;
+    }
+
+    if (ioctl(x->x_tvfd, VIDIOC_QUERYCAP, &x->x_vcap) < 0)
+    {
+        perror("get capabilities");
+        return;
+    }
+
+    post("pdp_v4l2: driver info: %s %d.%d.%d / %s @ %s",
+          x->x_vcap.driver, (x->x_vcap.version >> 16) & 0xff, (x->x_vcap.version >>  8) & 0xff, x->x_vcap.version & 0xff, x->x_vcap.card, x->x_vcap.bus_info);
+
+    for (x->x_ninputs = 0; x->x_ninputs < MAX_INPUT; x->x_ninputs++) {
+        x->x_inputs[x->x_ninputs].index = x->x_ninputs;
+        if (-1 == ioctl(x->x_tvfd, VIDIOC_ENUMINPUT, &x->x_inputs[x->x_ninputs], EINVAL))
+        {
+            // perror("get inputs");
+            break;
+        }
+        else
+        {
+            post ("pdp_v4l2 : input %d : %s",  x->x_ninputs, x->x_inputs[x->x_ninputs].name );
+        }
+    }
+    if (x->x_debug) post("pdp_v4l2: device has %d inputs", x->x_ninputs );
+
+    if ( x->x_ninputs > 0 )
+    {
+      if (x->x_curinput < 0) x->x_curinput = 0;
+      if (x->x_curinput >= x->x_ninputs) x->x_curinput = x->x_ninputs-1;
+
+      if (ioctl(x->x_tvfd, VIDIOC_S_INPUT, &x->x_curinput) < 0)
+      {
+          perror("pdp_v4l2: error: VIDIOC_S_INPUT");
+          post("pdp_v4l2: cant switch to input %d",x->x_curinput);
+      }
+      else
+      {
+         post("pdp_v4l2: switched to input %d", x->x_curinput);
+      }
+
+      if (ioctl(x->x_tvfd, VIDIOC_G_INPUT, &x->x_curinput) < 0)
+      {
+          post("pdp_v4l2: cant get current input %d",x->x_curinput);
+      }
+      else
+      {
+          post("pdp_v4l2: current input is %d",x->x_curinput);
+      }
+    }
+
+    for (x->x_nstandards = 0; x->x_nstandards < MAX_NORM; x->x_nstandards++) {
+        x->x_standards[x->x_nstandards].index = x->x_nstandards;
+        if (-1 == ioctl(x->x_tvfd, VIDIOC_ENUMSTD, &x->x_standards[x->x_nstandards], EINVAL))
+        {
+            // perror("get standards");
+            break;
+        }
+        else
+        {
+            post ("pdp_v4l2 : standard %d : %s",  x->x_nstandards, x->x_standards[x->x_nstandards].name );
+        }
+    }
+    if (x->x_debug) post("pdp_v4l2: device supports %d standards", x->x_nstandards );
+
+    // switch to desired norm ( if available )
+    if ( x->x_nstandards > 0 )
+    {
+      if (x->x_curstandard < 0) x->x_curstandard = 0;
+      if (x->x_curstandard >= x->x_nstandards) x->x_curstandard = x->x_nstandards-1;
+
+      if (ioctl(x->x_tvfd, VIDIOC_S_STD, &x->x_curstandard) < 0)
+      {
+          perror("pdp_v4l2: error: VIDIOC_S_STD");
+          post("pdp_v4l2: cant switch to standard %d",x->x_curstandard);
+      }
+      else
+      {
+         post("pdp_v4l2: switched to standard %d", x->x_curstandard);
+      }
+
+      if (ioctl(x->x_tvfd, VIDIOC_G_STD, &x->x_curstandard) < 0)
+      {
+          post("pdp_v4l2: cant get current standard %d",x->x_curstandard);
+      }
+      else
+      {
+          post("pdp_v4l2: current standard is %d",x->x_curstandard);
+      }
+    }
+
+    if (x->x_freq > 0){
+        if (ioctl(x->x_tvfd, VIDIOC_S_FREQUENCY, &x->x_freq) < 0)
+            perror ("couldn't set frequency :");
+    }
+
+    for (x->x_nformats = 0; x->x_nformats < MAX_FORMAT; x->x_nformats++) {
+        x->x_formats[x->x_nformats].index = x->x_nformats;
+        x->x_formats[x->x_nformats].type  = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+        if (-1 == ioctl(x->x_tvfd, VIDIOC_ENUM_FMT, &x->x_formats[x->x_nformats], EINVAL))
+        {
+            // perror("get formats");
+            break;
+        }
+        else
+        {
+            post ("pdp_v4l2 : format %d : %s",  x->x_nformats, x->x_formats[x->x_nformats].description );
+        }
+    }
+    if (x->x_debug) post("pdp_v4l2: device supports %d formats", x->x_nformats );
+
+    x->x_streamparam.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+    ioctl(x->x_tvfd,VIDIOC_G_PARM,&x->x_streamparam);
+
+        /* controls */
+    for (i = 0; i < MAX_CTRL; i++) {
+        x->x_controls[i].id = V4L2_CID_BASE+i;
+        if (-1 == ioctl(x->x_tvfd, VIDIOC_QUERYCTRL, &x->x_controls[i], EINVAL) ||
+            (x->x_controls[i].flags & V4L2_CTRL_FLAG_DISABLED))
+            x->x_controls[i].id = -1;
+        else if (x->x_debug) post( "control %d active (i:%d)", x->x_controls[i].id, i );
+    }
+    for (i = 0; i < MAX_CTRL; i++) {
+        x->x_controls[i+MAX_CTRL].id = V4L2_CID_PRIVATE_BASE+i;
+        if (-1 == ioctl(x->x_tvfd, VIDIOC_QUERYCTRL, &x->x_controls[i+MAX_CTRL], EINVAL) ||
+            (x->x_controls[i+MAX_CTRL].flags & V4L2_CTRL_FLAG_DISABLED))
+            x->x_controls[i+MAX_CTRL].id = -1;
+        else if (x->x_debug) post( "control %d active (i:%d)", x->x_controls[i+MAX_CTRL].id, i );
+    }
+
+    if ( x->x_nformats > 0 )
+    {
+      if (x->x_curformat < 0) x->x_curformat = 0;
+      if (x->x_curformat >= x->x_nformats) x->x_curformat = x->x_nformats-1;
+
+      // set the first available format
+      if ( pdp_v4l2_set_format(x, x->x_curformat) < 0 )
+      {
+         post( "pdp_v4l2 : couldn't set format : closing..." );
+         pdp_v4l2_close_error(x);
+         x->x_initialized = false;
+         return;
+      }
+    }
+    else
+    {
+      post( "pdp_v4l2 : error : no available formats : closing..." );
+      pdp_v4l2_close_error(x);
+      x->x_initialized = false;
+      return;
+    }
+
+    if ( pdp_v4l2_init_mmap(x) < 0 )
+    {
+      post( "pdp_v4l2 : error : couldn't initialize memory mapping : closing..." );
+      pdp_v4l2_close_error(x);
+      x->x_initialized = false;
+      return;
+    }
+
+    x->x_initialized=true;
+    post( "pdp_v4l2 : device initialized" );
+
+    // create thread 
+    x->x_continue_thread = 1;
+    x->x_frame_ready = 0;
+    pthread_create(&x->x_thread_id, 0, pdp_v4l2_thread, x);
+    post( "pdp_v4l2 : created thread : %u", x->x_thread_id );
+
+}
+
+static void pdp_v4l2_open_manual(t_pdp_v4l2 *x, t_symbol *name)
+{
+    x->x_open_retry = PDP_XV_RETRIES;
+    pdp_v4l2_open(x, name);
+}
+
+
+static void pdp_v4l2_input(t_pdp_v4l2 *x, t_float f)
+{
+    if (!x->x_initialized){
+       post( "pdp_v4l2 : cannot set input : no device opened ");
+       return;
+    }
+    if ( ( (int)f < 0 ) || ( (int)f >= x->x_ninputs ) )
+    {
+       post( "pdp_v4l2 : input number %d out of range", (int)f );
+       return;
+    }
+    if (x->x_initialized){
+        pdp_v4l2_close(x);
+        x->x_curinput = (int)f;
+        pdp_v4l2_open(x, x->x_device);
+    }
+}
+
+static void pdp_v4l2_standard(t_pdp_v4l2 *x, t_float f)
+{
+    if (!x->x_initialized){
+       post( "pdp_v4l2 : cannot set standard : no device opened ");
+       return;
+    }
+    if ( ( (int)f < 0 ) || ( (int)f >= x->x_nstandards ) )
+    {
+       post( "pdp_v4l2 : standard number %d out of range", (int)f );
+       return;
+    }
+    if (x->x_initialized){
+        pdp_v4l2_close(x);
+        x->x_curstandard = (int)f;
+        pdp_v4l2_open(x, x->x_device);
+    }
+}
+
+static void pdp_v4l2_format(t_pdp_v4l2 *x, t_float f)
+{
+    if (!x->x_initialized){
+       post( "pdp_v4l2 : cannot set format : no device opened ");
+       return;
+    }
+    if ( ( (int)f < 0 ) || ( (int)f >= x->x_nformats ) )
+    {
+       post( "pdp_v4l2 : format number %d out of range", (int)f );
+       return;
+    }
+    if (x->x_initialized){
+        pdp_v4l2_close(x);
+        x->x_curformat = (int)f;
+        pdp_v4l2_open(x, x->x_device);
+    }
+}
+
+static void pdp_v4l2_freq(t_pdp_v4l2 *x, t_float f)
+{
+    if (!x->x_initialized){
+       post( "pdp_v4l2 : cannot set format : no device opened ");
+       return;
+    }
+    x->x_freq = (int)f;
+    if (x->x_freq > 0)
+    {
+       if (ioctl(x->x_tvfd, VIDIOC_S_FREQUENCY, &x->x_freq) < 0)
+       {
+         perror ("couldn't set frequency :");
+       }
+       else 
+       {
+         post("pdp_v4l2: tuner frequency set to : %f MHz", f / 16.0f);
+       }
+    }
+}
+
+static void pdp_v4l2_freqMHz(t_pdp_v4l2 *x, t_float f)
+{
+   pdp_v4l2_freq(x, f*16.0f); 
+}
+
+
+static void pdp_v4l2_bang(t_pdp_v4l2 *x)
+{
+   
+  /* if initialized, grab a frame and output it */
+
+  unsigned int w,h,nbpixels,packet_size,plane1,plane2;
+  unsigned char *newimage=NULL;
+  int pdp_packt,length,pos,i,encoding;
+  t_pdp* header;
+  t_image* image;
+  short int * data;
+
+  static short int gain[4] = {0x7fff, 0x7fff, 0x7fff, 0x7fff};
+
+  if (!(x->x_initialized)){
+	post("pdp_v4l2: no device opened");
+
+	if (x->x_auto_open){
+	  post("pdp_v4l2: attempting auto open");
+	  pdp_v4l2_open(x, x->x_device);
+	  if (!(x->x_initialized)){
+	    post("pdp_v4l2: auto open failed");
+	    return;
+	  }
+	}
+	else return;
+    }
+
+    /* do nothing if there is no frame ready */
+    if((!x->x_frame_ready) && (x->x_only_new_frames)) return;
+    x->x_frame_ready = 0;
+
+    newimage = x->x_pdp_buf[x->x_last_frame];
+
+    /* create new packet */
+
+    pdp_packt = pdp_packet_new_image(PDP_IMAGE_YV12, x->x_width, x->x_height);
+    header = pdp_packet_header(pdp_packt);
+    image = pdp_packet_image_info(pdp_packt);
+
+    if (!header){
+	post("pdp_v4l2: ERROR: can't allocate packet");
+	return;
+    }
+
+    data = (short int *) pdp_packet_data(pdp_packt);
+
+    /* convert data to pdp packet */
+
+    switch(x->x_v4l2_format.fmt.pix.pixelformat){
+    case  V4L2_PIX_FMT_YUV420:
+	pdp_llconv(newimage, RIF_YUV__P411_U8, data, RIF_YVU__P411_S16, x->x_width, x->x_height); 
+	break;
+	
+	/* long live standards. v4l's rgb is in fact ogl's bgr */
+    case  V4L2_PIX_FMT_RGB24:
+	pdp_llconv(newimage, RIF_BGR__P____U8, data, RIF_YVU__P411_S16, x->x_width, x->x_height); 
+	break;
+
+    case  V4L2_PIX_FMT_RGB32:
+	pdp_llconv(newimage, RIF_BGRA_P____U8, data, RIF_YVU__P411_S16, x->x_width, x->x_height); 
+	break;
+
+    case  V4L2_PIX_FMT_YUYV:
+	pdp_llconv(newimage, RIF_YUYV_P____U8, data, RIF_YVU__P411_S16, x->x_width, x->x_height); 
+	break;
+
+    case  V4L2_PIX_FMT_UYVY: 
+        pdp_llconv(newimage, RIF_UYVY_P____U8, data, RIF_YVU__P411_S16, x->x_width, x->x_height);
+        break;
+
+    default:
+	post("pdp_v4l2: unsupported color model");
+	break;
+    }
+
+    pdp_packet_pass_if_valid(x->x_outlet0, &pdp_packt);
+
+}
+
+
+static void pdp_v4l2_setlegaldim(t_pdp_v4l2 *x, int xx, int yy)
+{
+
+    unsigned int w,h;
+
+    w  = pdp_imageproc_legalwidth((int)xx);
+    h  = pdp_imageproc_legalheight((int)yy);
+    
+    w = (w < x->x_maxwidth) ? w : x->x_maxwidth;
+    w = (w > x->x_minwidth) ? w : x->x_minwidth;
+
+    h = (h < x->x_maxheight) ? h : x->x_maxheight;
+    h = (h > x->x_minheight) ? h : x->x_minheight;
+
+    x->x_width = w;
+    x->x_height = h;
+}
+
+static void pdp_v4l2_dim(t_pdp_v4l2 *x, t_floatarg xx, t_floatarg yy)
+{
+    if (!x->x_initialized){
+       post( "pdp_v4l2 : cannot set dim : no device opened ");
+       return;
+    }
+    if (x->x_initialized){
+        pdp_v4l2_close(x);
+        pdp_v4l2_setlegaldim(x, (int)xx, (int)yy);
+        pdp_v4l2_open(x, x->x_device);
+    }
+}
+
+static void pdp_v4l2_free(t_pdp_v4l2 *x)
+{
+    pdp_v4l2_close(x);
+}
+
+t_class *pdp_v4l2_class;
+
+void *pdp_v4l2_new(t_symbol *vdef)
+{
+    t_pdp_v4l2 *x = (t_pdp_v4l2 *)pd_new(pdp_v4l2_class);
+
+    x->x_outlet0 = outlet_new(&x->x_obj, &s_anything);
+
+    x->x_initialized = false;
+
+    x->x_tvfd = -1;
+    x->x_ninputs = 0;
+    x->x_curinput = -1;
+    x->x_curstandard = -1;
+    x->x_curformat = -1;
+    x->x_freq = -1;
+    x->x_nstandards = 0;
+    x->x_nformats = 0;
+    x->x_frame = 0;
+    x->x_last_frame = 0;
+
+    x->x_auto_open = true;
+    if (vdef != gensym("")){
+	x->x_device = vdef;
+    }
+    else{
+	x->x_device = gensym("/dev/video0");
+    }
+
+    x->x_continue_thread = 0;
+    x->x_only_new_frames = 1;
+
+    x->x_width = 320;
+    x->x_height = 240;
+
+    x->x_open_retry = PDP_XV_RETRIES;
+
+    x->x_minwidth = pdp_imageproc_legalwidth(0);
+    x->x_maxwidth = pdp_imageproc_legalwidth_round_down(0x7fffffff);
+    x->x_minheight = pdp_imageproc_legalheight(0);
+    x->x_maxheight = pdp_imageproc_legalheight_round_down(0x7fffffff);
+
+    x->x_debug = 1;
+
+    return (void *)x;
+}
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+void pdp_v4l2_setup(void)
+{
+    pdp_v4l2_class = class_new(gensym("pdp_v4l2"), (t_newmethod)pdp_v4l2_new,
+    	(t_method)pdp_v4l2_free, sizeof(t_pdp_v4l2), 0, A_DEFSYMBOL, A_DEFSYMBOL, A_NULL);
+
+    class_addmethod(pdp_v4l2_class, (t_method)pdp_v4l2_close_manual, gensym("close"), A_NULL);
+    class_addmethod(pdp_v4l2_class, (t_method)pdp_v4l2_open_manual, gensym("open"), A_SYMBOL, A_NULL);
+    class_addmethod(pdp_v4l2_class, (t_method)pdp_v4l2_input, gensym("input"), A_FLOAT, A_NULL);
+    class_addmethod(pdp_v4l2_class, (t_method)pdp_v4l2_format, gensym("format"), A_FLOAT, A_NULL);
+    class_addmethod(pdp_v4l2_class, (t_method)pdp_v4l2_standard, gensym("standard"), A_FLOAT, A_NULL);
+    class_addmethod(pdp_v4l2_class, (t_method)pdp_v4l2_dim, gensym("dim"), A_FLOAT, A_FLOAT, A_NULL);
+    class_addmethod(pdp_v4l2_class, (t_method)pdp_v4l2_freq, gensym("freq"), A_FLOAT, A_NULL);
+    class_addmethod(pdp_v4l2_class, (t_method)pdp_v4l2_freqMHz, gensym("freqMHz"), A_FLOAT, A_NULL);
+    class_addmethod(pdp_v4l2_class, (t_method)pdp_v4l2_bang, gensym("bang"), A_NULL);
+
+}
+
+#ifdef __cplusplus
+}
+#endif


Property changes on: branches/pd-extended/v0-40/externals/pidip/modules/pdp_v4l2.c
___________________________________________________________________
Name: svn:executable
   + *

Added: branches/pd-extended/v0-40/externals/pidip/patches/giss-audio-mp3.pd
===================================================================
--- branches/pd-extended/v0-40/externals/pidip/patches/giss-audio-mp3.pd	                        (rev 0)
+++ branches/pd-extended/v0-40/externals/pidip/patches/giss-audio-mp3.pd	2008-06-08 11:49:52 UTC (rev 9975)
@@ -0,0 +1,531 @@
+#N canvas 0 0 996 665 10;
+#N canvas 0 0 999 654 streaming 0;
+#X msg 277 386 disconnect;
+#X floatatom 701 564 5 0 0 0 - - -;
+#X text 714 584 Streaming status;
+#X floatatom 216 532 13 0 0 0 - - -;
+#X obj 142 366 inlet~;
+#X obj 216 366 inlet~;
+#X obj 786 373 loadbang;
+#X msg 41 371 \; pd dsp 1;
+#X obj 700 654 select 1;
+#X obj 714 788 f;
+#X msg 688 759 bang;
+#X floatatom 745 732 3 0 29 0 - - -;
+#X msg 731 691 13;
+#X msg 698 691 16;
+#X obj 288 8 r connect;
+#X obj 277 365 r disconnect;
+#X obj 265 463 s audio;
+#X obj 347 63 r server-name;
+#X obj 318 89 symbol;
+#X symbolatom 318 112 30 0 0 0 - - -;
+#X obj 318 65 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X symbolatom 468 87 30 0 0 0 - - -;
+#X obj 468 40 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 497 38 r mount-point;
+#X obj 601 16 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 630 14 r port-number;
+#X obj 318 30 t b b b;
+#X obj 289 29 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X msg 322 166 connect \$1 \$2 \$3;
+#X msg 168 165 passwd \$1;
+#X obj 168 141 symbol;
+#X symbolatom 219 144 10 0 0 0 - - -;
+#X obj 167 109 r password;
+#X obj 320 140 pack s s f;
+#X msg 711 843 \; bstatus color \$1 \$2 \$3;
+#X msg 659 719 \; bstatus 1;
+#X msg 744 775 \; bstatus 0;
+#X obj 714 816 pack 0 0 0;
+#X obj 264 415 env~;
+#X obj 265 441 - 80;
+#X obj 63 343 loadbang;
+#X obj 46 16 loadbang;
+#X obj 47 67 s iserver-name;
+#X obj 47 92 s server-name;
+#X obj 42 132 loadbang;
+#X obj 43 183 s iport-number;
+#X obj 43 208 s port-number;
+#X msg 45 40 symbol stream.giss.tv;
+#X msg 41 156 8000;
+#X obj 468 64 symbol;
+#X obj 601 40 float;
+#X floatatom 602 62 5 0 0 0 - - -;
+#X msg 817 458 2;
+#N canvas 135 92 534 518 metadata 0;
+#X obj 66 445 outlet;
+#X obj 292 375 r stream-genre;
+#X obj 347 45 loadbang;
+#X obj 366 422 s istream-genre;
+#X msg 256 306 symbol giss stream;
+#X obj 257 328 s istream-description;
+#X obj 201 284 r stream-description;
+#X msg 239 213 symbol http://giss.tv;
+#X msg 195 120 symbol various;
+#X obj 196 142 s istream-artist;
+#X obj 140 98 r stream-artist;
+#X obj 142 46 s istream-title;
+#X msg 142 24 symbol pd stream;
+#X obj 87 3 r stream-title;
+#X obj 31 140 print title;
+#X obj 184 191 r stream-location;
+#X obj 240 235 s istream-location;
+#X msg 174 256 LOCATION \$1;
+#X msg 110 167 ARTIST \$1;
+#X msg 49 75 TITLE \$1;
+#X msg 183 349 DESCRIPTION \$1;
+#X msg 288 417 GENRE \$1;
+#X msg 202 490 COPYRIGHT \$1;
+#X obj 206 448 r stream-copyright;
+#X msg 326 467 symbol none;
+#X obj 332 494 s istream-copyright;
+#X msg 361 396 symbol free media;
+#X connect 1 0 21 0;
+#X connect 2 0 26 0;
+#X connect 2 0 4 0;
+#X connect 2 0 7 0;
+#X connect 2 0 8 0;
+#X connect 2 0 12 0;
+#X connect 2 0 24 0;
+#X connect 4 0 5 0;
+#X connect 6 0 20 0;
+#X connect 7 0 16 0;
+#X connect 8 0 9 0;
+#X connect 10 0 18 0;
+#X connect 12 0 11 0;
+#X connect 13 0 19 0;
+#X connect 15 0 17 0;
+#X connect 17 0 0 0;
+#X connect 18 0 0 0;
+#X connect 19 0 0 0;
+#X connect 19 0 14 0;
+#X connect 20 0 0 0;
+#X connect 21 0 0 0;
+#X connect 22 0 0 0;
+#X connect 23 0 22 0;
+#X connect 24 0 25 0;
+#X connect 26 0 3 0;
+#X restore 312 269 pd metadata;
+#X obj 669 626 print status;
+#X text 261 549 Number of ogg pages emitted;
+#X obj 217 569 s pages;
+#X msg 399 481 server \$1;
+#X obj 481 481 r server-type;
+#X msg 836 404 1;
+#X obj 836 430 s iserver-type;
+#X text 376 365 vorbis <samplerate> <channels> <max.br> <nom.br> <min.br>
+;
+#X obj 718 514 s istream-srate;
+#X msg 722 490 44100;
+#X obj 814 486 s istream-channels;
+#X obj 540 212 f;
+#X obj 654 211 r stream-srate;
+#X obj 541 258 f;
+#X obj 652 234 r stream-channels;
+#X obj 540 235 f;
+#X msg 376 382 vorbis \$1 \$2 \$3 \$4 \$5;
+#X obj 376 408 print vorbis;
+#X obj 401 290 pack f f f f f;
+#X obj 543 280 f;
+#X obj 544 301 f;
+#X obj 653 258 r stream-maxbitrate;
+#X obj 653 280 r stream-bitrate;
+#X obj 656 301 r stream-minbitrate;
+#X obj 572 301 t b b b b f;
+#X obj 572 280 t b b b b f;
+#X obj 570 258 t b b b b f;
+#X obj 570 234 t b b b b f;
+#X obj 570 211 t f b b b b;
+#X obj 844 543 s istream-maxbitrate;
+#X obj 845 591 s istream-minbitrate;
+#X obj 844 639 s istream-bitrate;
+#X obj 159 490 oggcast~ 1 2 512;
+#X msg 843 518 128;
+#X msg 844 565 64;
+#X msg 843 613 96;
+#X connect 0 0 86 0;
+#X connect 1 0 8 0;
+#X connect 1 0 54 0;
+#X connect 3 0 56 0;
+#X connect 4 0 38 0;
+#X connect 4 0 86 0;
+#X connect 6 0 59 0;
+#X connect 6 0 63 0;
+#X connect 6 0 52 0;
+#X connect 6 0 87 0;
+#X connect 6 0 88 0;
+#X connect 6 0 89 0;
+#X connect 8 0 13 0;
+#X connect 8 1 12 0;
+#X connect 8 1 36 0;
+#X connect 9 0 37 0;
+#X connect 10 0 9 0;
+#X connect 11 0 9 1;
+#X connect 11 0 10 0;
+#X connect 12 0 11 0;
+#X connect 13 0 11 0;
+#X connect 13 0 35 0;
+#X connect 14 0 27 0;
+#X connect 15 0 0 0;
+#X connect 17 0 18 1;
+#X connect 18 0 19 0;
+#X connect 19 0 33 0;
+#X connect 20 0 18 0;
+#X connect 21 0 33 1;
+#X connect 22 0 49 0;
+#X connect 23 0 49 1;
+#X connect 24 0 50 0;
+#X connect 25 0 50 1;
+#X connect 26 0 20 0;
+#X connect 26 1 22 0;
+#X connect 26 2 24 0;
+#X connect 27 0 26 0;
+#X connect 28 0 86 0;
+#X connect 29 0 86 0;
+#X connect 30 0 29 0;
+#X connect 32 0 30 0;
+#X connect 32 0 31 0;
+#X connect 33 0 28 0;
+#X connect 37 0 34 0;
+#X connect 38 0 39 0;
+#X connect 39 0 16 0;
+#X connect 40 0 7 0;
+#X connect 41 0 47 0;
+#X connect 44 0 48 0;
+#X connect 47 0 42 0;
+#X connect 47 0 43 0;
+#X connect 48 0 45 0;
+#X connect 48 0 46 0;
+#X connect 49 0 21 0;
+#X connect 50 0 51 0;
+#X connect 51 0 33 2;
+#X connect 52 0 64 0;
+#X connect 53 0 86 0;
+#X connect 57 0 86 0;
+#X connect 58 0 57 0;
+#X connect 59 0 60 0;
+#X connect 63 0 62 0;
+#X connect 65 0 72 0;
+#X connect 66 0 82 0;
+#X connect 67 0 72 2;
+#X connect 68 0 81 0;
+#X connect 69 0 72 1;
+#X connect 70 0 71 0;
+#X connect 70 0 86 0;
+#X connect 72 0 70 0;
+#X connect 73 0 72 3;
+#X connect 74 0 72 4;
+#X connect 75 0 80 0;
+#X connect 76 0 79 0;
+#X connect 77 0 78 0;
+#X connect 78 0 65 0;
+#X connect 78 1 69 0;
+#X connect 78 2 67 0;
+#X connect 78 3 73 0;
+#X connect 78 4 74 0;
+#X connect 79 0 65 0;
+#X connect 79 1 69 0;
+#X connect 79 2 67 0;
+#X connect 79 3 74 0;
+#X connect 79 4 73 0;
+#X connect 80 0 65 0;
+#X connect 80 1 69 0;
+#X connect 80 2 73 0;
+#X connect 80 3 74 0;
+#X connect 80 4 67 0;
+#X connect 81 0 65 0;
+#X connect 81 1 67 0;
+#X connect 81 2 73 0;
+#X connect 81 3 74 0;
+#X connect 81 4 69 0;
+#X connect 82 0 65 0;
+#X connect 82 1 69 0;
+#X connect 82 2 67 0;
+#X connect 82 3 73 0;
+#X connect 82 4 74 0;
+#X connect 86 0 1 0;
+#X connect 86 1 3 0;
+#X connect 87 0 83 0;
+#X connect 88 0 84 0;
+#X connect 89 0 85 0;
+#X restore 346 277 pd streaming;
+#X obj 158 560 cnv 15 250 75 empty empty empty 10 5 1 10 -128992 -66577
+0;
+#X floatatom 175 583 8 0 0 0 - pages -;
+#X obj 470 510 cnv 15 200 120 empty empty empty 20 12 0 14 -62784 -66577
+0;
+#X text 535 545 start;
+#X text 544 584 stop;
+#X obj 596 540 bng 25 250 50 0 connect empty empty 0 -6 0 8 -24198
+-1 -1;
+#X obj 598 580 bng 25 250 50 0 disconnect empty empty 0 -6 0 8 -258699
+-1 -1;
+#X obj 417 513 vu 15 120 audio empty -1 -8 0 8 -66577 -1 1 0;
+#X obj 240 274 dac~;
+#X obj 47 306 cnv 15 300 160 empty empty empty 20 12 0 14 -236851 -66577
+0;
+#X text 50 307 Server configuration;
+#X symbolatom 130 336 30 0 0 0 server: iserver-name server-name;
+#X symbolatom 130 378 30 0 0 0 mountpoint: - mount-point;
+#X symbolatom 129 398 30 0 0 0 password: - password;
+#X obj 362 570 tgl 40 0 empty bstatus empty 0 -6 0 8 -24198 -262144
+-262144 0 1;
+#X obj 52 559 cnv 15 100 75 empty empty empty 20 12 0 14 -99865 -66577
+0;
+#X text 74 562 G.I.S.S.;
+#X text 70 579 streaming;
+#X text 82 598 patch;
+#X obj 670 32 cnv 15 300 120 empty empty empty 20 12 0 14 -236851 -66577
+0;
+#X obj 750 131 tgl 15 0 mic-mute empty mute: -65 8 0 12 -24198 -1 -1
+0 1;
+#X floatatom 129 356 5 0 0 0 port: iport-number port-number;
+#X text 344 473 <<<<<<<<<<<<<< Emission >>>>>>>>>>>>>>>>>;
+#X obj 364 304 cnv 15 300 160 empty empty empty 20 12 0 14 -236851
+-66577 0;
+#X symbolatom 450 323 30 0 0 0 title: istream-title stream-title;
+#X symbolatom 451 378 30 0 0 0 description: istream-description stream-description
+;
+#X symbolatom 451 398 30 0 0 0 genre: istream-genre stream-genre;
+#X symbolatom 450 340 30 0 0 0 artist: istream-artist stream-artist
+;
+#X symbolatom 450 359 30 0 0 0 location: istream-location stream-location
+;
+#X obj 674 305 cnv 15 300 160 empty empty empty 20 12 0 14 -236851
+-66577 0;
+#X floatatom 831 346 5 0 0 0 channels_(1..2): istream-channels stream-channels
+;
+#X floatatom 834 364 5 0 0 0 Samplerate: istream-srate stream-srate
+;
+#X floatatom 833 381 5 0 0 0 Bitrate: istream-bitrate stream-bitrate
+;
+#X floatatom 832 398 5 0 0 0 Max_bitrate: istream-maxbitrate stream-maxbitrate
+;
+#X text 678 307 Stream quality :;
+#X text 535 518 EMISSION;
+#X text 416 494 level;
+#X text 686 643 support : ydegoyon at free.fr;
+#X text 300 8 <<<<<<<<<<<<<< Input files and microphone >>>>>>>>>>>>>>>>>
+;
+#X text 673 33 Microphone;
+#X obj 807 43 vsl 15 80 0 3 0 0 mic-level imic-level empty 0 -8 0 8
+-44926 -1 -1 2633 1;
+#X text 794 131 level;
+#X obj 854 44 vu 15 80 mic-db empty -1 -8 0 8 -66577 -1 1 0;
+#X text 685 630 Authors : autoperro;
+#N canvas 251 329 450 300 mic 0;
+#X obj 218 91 adc~;
+#X obj 216 144 *~ 1;
+#X obj 272 144 *~ 1;
+#X obj 278 108 hsl 128 15 0 3 0 0 empty mic-level empty -2 -6 0 8 -260818
+-1 -1 4233 1;
+#X obj 328 192 env~;
+#X obj 332 221 - 88;
+#X obj 340 256 s mic-db;
+#X obj 297 20 r mic-mute;
+#X obj 385 83 f;
+#X obj 392 56 r mic-level;
+#X msg 276 79 float 0;
+#X msg 341 79 bang;
+#X obj 84 66 loadbang;
+#X msg 85 96 float 1;
+#X obj 84 123 s imic-level;
+#X obj 296 49 route 1;
+#X obj 186 209 outlet~;
+#X obj 257 208 outlet~;
+#X connect 0 0 1 0;
+#X connect 0 1 2 0;
+#X connect 1 0 16 0;
+#X connect 1 0 4 0;
+#X connect 2 0 17 0;
+#X connect 2 0 4 0;
+#X connect 3 0 2 1;
+#X connect 3 0 1 1;
+#X connect 4 0 5 0;
+#X connect 5 0 6 0;
+#X connect 7 0 15 0;
+#X connect 8 0 3 0;
+#X connect 9 0 8 1;
+#X connect 10 0 3 0;
+#X connect 11 0 8 0;
+#X connect 12 0 13 0;
+#X connect 13 0 14 0;
+#X connect 15 0 10 0;
+#X connect 15 1 11 0;
+#X restore 283 258 pd mic;
+#X text 239 584 Ogg pages emitted;
+#X text 66 612 ( audio );
+#X obj 149 422 vradio 15 1 0 2 server-type iserver-type empty 0 -6
+0 8 -262144 -1 -1 1;
+#X text 49 420 server type :;
+#X text 172 421 JRoar or old icecast;
+#X text 172 436 icecast 2;
+#X symbolatom 451 417 30 0 0 0 copyright: istream-copyright stream-copyright
+;
+#X text 369 305 Meta data ( _ will be replaced by spaces );
+#X floatatom 833 417 5 0 0 0 Min_bitrate: istream-minbitrate stream-minbitrate
+;
+#X obj 699 509 cnv 15 200 120 empty empty empty 20 12 0 14 -261689
+-66577 0;
+#X text 734 535 G.I.S.S.;
+#X text 824 556 is not;
+#X text 790 586 T. V.;
+#N canvas 0 0 996 665 mp3 0;
+#X obj 111 134 playlist mp3 250 100 {Helvetica 10 bold} #457782 yellow
+black red;
+#X msg 168 417 open \$1;
+#X obj 94 448 loadbang;
+#X msg 129 414 1;
+#X obj 176 244 hsl 160 15 0 2000 0 0 empty empty seek: -45 6 0 12 -262144
+-1 -1 556 1;
+#X obj 174 293 tgl 15 0 empty empty loop: -40 6 0 12 -260818 -1 -1
+1 1;
+#X obj 175 318 tgl 15 0 empty empty start!: -50 6 0 12 -24198 -1 -1
+0 1;
+#X msg 251 388 70;
+#X obj 336 494 spigot;
+#X obj 323 388 route 1;
+#X msg 322 417 start;
+#X msg 372 416 stop;
+#X msg 45 418 seek \$1;
+#X obj 373 138 vsl 15 128 0 5 0 0 empty empty empty 0 -8 0 8 -262144
+-1 -1 2540 1;
+#X text 358 275 level;
+#X obj 271 593 *~ 1;
+#X obj 207 592 *~ 1;
+#X obj 447 270 loadbang;
+#X msg 446 301 1;
+#X floatatom 173 267 5 0 0 0 position: - -;
+#X obj 192 548 mp3streamin~ \$0 1;
+#X obj 197 497 mp3fileout~;
+#X obj 445 464 f \$0;
+#X floatatom 468 493 5 0 0 0 - - -;
+#X obj 448 440 loadbang;
+#X msg 396 530 connect localhost \$1;
+#X msg 414 416 disconnect;
+#X obj 265 630 outlet~;
+#X obj 196 630 outlet~;
+#X msg 525 441 bang;
+#X obj 462 581 block~ 512;
+#X connect 0 0 1 0;
+#X connect 1 0 21 0;
+#X connect 2 0 3 0;
+#X connect 2 0 7 0;
+#X connect 3 0 5 0;
+#X connect 4 0 12 0;
+#X connect 5 0 8 1;
+#X connect 6 0 9 0;
+#X connect 7 0 4 0;
+#X connect 8 0 10 0;
+#X connect 9 0 10 0;
+#X connect 9 1 11 0;
+#X connect 10 0 21 0;
+#X connect 11 0 21 0;
+#X connect 12 0 21 0;
+#X connect 13 0 15 1;
+#X connect 13 0 16 1;
+#X connect 15 0 27 0;
+#X connect 16 0 28 0;
+#X connect 17 0 18 0;
+#X connect 18 0 13 0;
+#X connect 20 0 16 0;
+#X connect 20 1 15 0;
+#X connect 21 1 19 0;
+#X connect 21 2 8 0;
+#X connect 22 0 23 0;
+#X connect 22 0 25 0;
+#X connect 24 0 22 0;
+#X connect 25 0 21 0;
+#X connect 26 0 21 0;
+#X connect 29 0 22 0;
+#X coords 0 -1 1 1 300 240 1 100 100;
+#X restore 334 34 pd mp3 files;
+#N canvas 0 0 996 665 ogg/vorbis 1;
+#X obj 111 134 playlist ogg 250 100 {Helvetica 10 bold} #457782 yellow
+black red;
+#X msg 168 417 open \$1;
+#X obj 106 480 loadbang;
+#X msg 121 437 1;
+#X obj 169 247 hsl 160 15 0 2000 0 0 empty empty seek: -45 6 0 12 -262144
+-1 -1 556 1;
+#X obj 166 291 tgl 15 0 empty empty loop: -40 6 0 12 -260818 -1 -1
+1 1;
+#X obj 166 315 tgl 15 0 empty empty start!: -50 6 0 12 -24198 -1 -1
+1 1;
+#X msg 251 388 70;
+#X obj 197 497 oggread~;
+#X obj 336 494 spigot;
+#X obj 323 388 route 1;
+#X msg 322 417 start;
+#X msg 372 416 stop;
+#X msg 318 357 seek \$1;
+#X obj 373 138 vsl 15 128 0 5 0 0 empty empty empty 0 -8 0 8 -262144
+-1 -1 2540 1;
+#X text 358 275 level;
+#X obj 271 593 *~ 1;
+#X obj 207 592 *~ 1;
+#X obj 447 270 loadbang;
+#X msg 446 301 1;
+#X floatatom 166 270 5 0 0 0 position: - -;
+#X obj 265 630 outlet~;
+#X obj 196 630 outlet~;
+#X obj 298 288 cnv 15 100 50 empty empty empty 20 12 0 14 -262144 -66577
+0;
+#X msg 290 314 1;
+#X msg 387 446 0;
+#X obj 143 383 t b s;
+#X connect 0 0 26 0;
+#X connect 1 0 8 0;
+#X connect 2 0 3 0;
+#X connect 2 0 7 0;
+#X connect 3 0 5 0;
+#X connect 4 0 13 0;
+#X connect 5 0 9 1;
+#X connect 6 0 10 0;
+#X connect 7 0 4 0;
+#X connect 8 0 17 0;
+#X connect 8 1 16 0;
+#X connect 8 2 20 0;
+#X connect 8 3 9 0;
+#X connect 9 0 11 0;
+#X connect 10 0 11 0;
+#X connect 10 1 12 0;
+#X connect 11 0 8 0;
+#X connect 11 0 24 0;
+#X connect 12 0 8 0;
+#X connect 12 0 25 0;
+#X connect 13 0 8 0;
+#X connect 14 0 16 1;
+#X connect 14 0 17 1;
+#X connect 16 0 21 0;
+#X connect 17 0 22 0;
+#X connect 18 0 19 0;
+#X connect 19 0 14 0;
+#X connect 24 0 6 0;
+#X connect 25 0 6 0;
+#X connect 26 0 11 0;
+#X connect 26 1 1 0;
+#X coords 0 -1 1 1 300 240 1 100 100;
+#X restore 29 33 pd ogg/vorbis files;
+#X obj 16 271 cnv 15 800 30 empty empty empty 20 12 0 14 -262144 -66577
+0;
+#X text 320 282 <<<<<<<<<<<<<< Stream configuration >>>>>>>>>>>>>>>>>
+;
+#X connect 45 0 0 0;
+#X connect 45 0 9 0;
+#X connect 45 1 0 1;
+#X connect 45 1 9 1;
+#X connect 59 0 0 0;
+#X connect 59 0 9 0;
+#X connect 59 1 0 1;
+#X connect 59 1 9 1;
+#X connect 60 0 0 0;
+#X connect 60 0 9 0;
+#X connect 60 1 9 1;
+#X connect 60 1 0 1;
+#X coords 0 0 1 1 85 60 0;


Property changes on: branches/pd-extended/v0-40/externals/pidip/patches/giss-audio-mp3.pd
___________________________________________________________________
Name: svn:executable
   + *

Added: branches/pd-extended/v0-40/externals/pidip/patches/giss-audio-ogg.pd
===================================================================
--- branches/pd-extended/v0-40/externals/pidip/patches/giss-audio-ogg.pd	                        (rev 0)
+++ branches/pd-extended/v0-40/externals/pidip/patches/giss-audio-ogg.pd	2008-06-08 11:49:52 UTC (rev 9975)
@@ -0,0 +1,523 @@
+#N canvas 0 0 996 665 10;
+#N canvas 0 0 999 654 streaming 0;
+#X msg 277 386 disconnect;
+#X floatatom 701 564 5 0 0 0 - - -;
+#X text 714 584 Streaming status;
+#X floatatom 216 532 13 0 0 0 - - -;
+#X obj 142 366 inlet~;
+#X obj 216 366 inlet~;
+#X obj 786 373 loadbang;
+#X msg 41 371 \; pd dsp 1;
+#X obj 700 654 select 1;
+#X obj 714 788 f;
+#X msg 688 759 bang;
+#X floatatom 745 732 3 0 29 0 - - -;
+#X msg 731 691 13;
+#X msg 698 691 16;
+#X obj 288 8 r connect;
+#X obj 277 365 r disconnect;
+#X obj 265 463 s audio;
+#X obj 347 63 r server-name;
+#X obj 318 89 symbol;
+#X symbolatom 318 112 30 0 0 0 - - -;
+#X obj 318 65 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X symbolatom 468 87 30 0 0 0 - - -;
+#X obj 468 40 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 497 38 r mount-point;
+#X obj 601 16 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 630 14 r port-number;
+#X obj 318 30 t b b b;
+#X obj 289 29 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X msg 322 166 connect \$1 \$2 \$3;
+#X msg 168 165 passwd \$1;
+#X obj 168 141 symbol;
+#X symbolatom 219 144 10 0 0 0 - - -;
+#X obj 167 109 r password;
+#X obj 320 140 pack s s f;
+#X msg 711 843 \; bstatus color \$1 \$2 \$3;
+#X msg 659 719 \; bstatus 1;
+#X msg 744 775 \; bstatus 0;
+#X obj 714 816 pack 0 0 0;
+#X obj 264 415 env~;
+#X obj 265 441 - 80;
+#X obj 63 343 loadbang;
+#X obj 46 16 loadbang;
+#X obj 47 67 s iserver-name;
+#X obj 47 92 s server-name;
+#X obj 42 132 loadbang;
+#X obj 43 183 s iport-number;
+#X obj 43 208 s port-number;
+#X msg 45 40 symbol stream.giss.tv;
+#X msg 41 156 8000;
+#X obj 468 64 symbol;
+#X obj 601 40 float;
+#X floatatom 602 62 5 0 0 0 - - -;
+#X msg 817 458 2;
+#N canvas 135 92 534 518 metadata 0;
+#X obj 66 445 outlet;
+#X obj 292 375 r stream-genre;
+#X obj 347 45 loadbang;
+#X obj 366 422 s istream-genre;
+#X msg 256 306 symbol giss stream;
+#X obj 257 328 s istream-description;
+#X obj 201 284 r stream-description;
+#X msg 239 213 symbol http://giss.tv;
+#X msg 195 120 symbol various;
+#X obj 196 142 s istream-artist;
+#X obj 140 98 r stream-artist;
+#X obj 142 46 s istream-title;
+#X msg 142 24 symbol pd stream;
+#X obj 87 3 r stream-title;
+#X obj 31 140 print title;
+#X obj 184 191 r stream-location;
+#X obj 240 235 s istream-location;
+#X msg 174 256 LOCATION \$1;
+#X msg 110 167 ARTIST \$1;
+#X msg 49 75 TITLE \$1;
+#X msg 183 349 DESCRIPTION \$1;
+#X msg 288 417 GENRE \$1;
+#X msg 202 490 COPYRIGHT \$1;
+#X obj 206 448 r stream-copyright;
+#X msg 326 467 symbol none;
+#X obj 332 494 s istream-copyright;
+#X msg 361 396 symbol free media;
+#X connect 1 0 21 0;
+#X connect 2 0 26 0;
+#X connect 2 0 4 0;
+#X connect 2 0 7 0;
+#X connect 2 0 8 0;
+#X connect 2 0 12 0;
+#X connect 2 0 24 0;
+#X connect 4 0 5 0;
+#X connect 6 0 20 0;
+#X connect 7 0 16 0;
+#X connect 8 0 9 0;
+#X connect 10 0 18 0;
+#X connect 12 0 11 0;
+#X connect 13 0 19 0;
+#X connect 15 0 17 0;
+#X connect 17 0 0 0;
+#X connect 18 0 0 0;
+#X connect 19 0 0 0;
+#X connect 19 0 14 0;
+#X connect 20 0 0 0;
+#X connect 21 0 0 0;
+#X connect 22 0 0 0;
+#X connect 23 0 22 0;
+#X connect 24 0 25 0;
+#X connect 26 0 3 0;
+#X restore 312 269 pd metadata;
+#X obj 669 626 print status;
+#X text 261 549 Number of ogg pages emitted;
+#X obj 217 569 s pages;
+#X msg 399 481 server \$1;
+#X obj 481 481 r server-type;
+#X msg 836 404 1;
+#X obj 836 430 s iserver-type;
+#X text 376 365 vorbis <samplerate> <channels> <max.br> <nom.br> <min.br>
+;
+#X obj 718 514 s istream-srate;
+#X msg 722 490 44100;
+#X obj 814 486 s istream-channels;
+#X obj 540 212 f;
+#X obj 654 211 r stream-srate;
+#X obj 541 258 f;
+#X obj 652 234 r stream-channels;
+#X obj 540 235 f;
+#X msg 376 382 vorbis \$1 \$2 \$3 \$4 \$5;
+#X obj 376 408 print vorbis;
+#X obj 401 290 pack f f f f f;
+#X obj 543 280 f;
+#X obj 544 301 f;
+#X obj 653 258 r stream-maxbitrate;
+#X obj 653 280 r stream-bitrate;
+#X obj 656 301 r stream-minbitrate;
+#X obj 572 301 t b b b b f;
+#X obj 572 280 t b b b b f;
+#X obj 570 258 t b b b b f;
+#X obj 570 234 t b b b b f;
+#X obj 570 211 t f b b b b;
+#X obj 844 543 s istream-maxbitrate;
+#X obj 845 591 s istream-minbitrate;
+#X obj 844 639 s istream-bitrate;
+#X obj 159 490 oggcast~ 1 2 512;
+#X msg 843 518 96;
+#X msg 844 565 32;
+#X msg 843 613 64;
+#X connect 0 0 86 0;
+#X connect 1 0 8 0;
+#X connect 1 0 54 0;
+#X connect 3 0 56 0;
+#X connect 4 0 86 0;
+#X connect 4 0 38 0;
+#X connect 5 0 38 0;
+#X connect 6 0 59 0;
+#X connect 6 0 63 0;
+#X connect 6 0 52 0;
+#X connect 6 0 87 0;
+#X connect 6 0 88 0;
+#X connect 6 0 89 0;
+#X connect 8 0 13 0;
+#X connect 8 1 12 0;
+#X connect 8 1 36 0;
+#X connect 9 0 37 0;
+#X connect 10 0 9 0;
+#X connect 11 0 9 1;
+#X connect 11 0 10 0;
+#X connect 12 0 11 0;
+#X connect 13 0 11 0;
+#X connect 13 0 35 0;
+#X connect 14 0 27 0;
+#X connect 15 0 0 0;
+#X connect 17 0 18 1;
+#X connect 18 0 19 0;
+#X connect 19 0 33 0;
+#X connect 20 0 18 0;
+#X connect 21 0 33 1;
+#X connect 22 0 49 0;
+#X connect 23 0 49 1;
+#X connect 24 0 50 0;
+#X connect 25 0 50 1;
+#X connect 26 0 20 0;
+#X connect 26 1 22 0;
+#X connect 26 2 24 0;
+#X connect 27 0 26 0;
+#X connect 28 0 86 0;
+#X connect 29 0 86 0;
+#X connect 30 0 29 0;
+#X connect 32 0 30 0;
+#X connect 32 0 31 0;
+#X connect 33 0 28 0;
+#X connect 37 0 34 0;
+#X connect 38 0 39 0;
+#X connect 39 0 16 0;
+#X connect 40 0 7 0;
+#X connect 41 0 47 0;
+#X connect 44 0 48 0;
+#X connect 47 0 42 0;
+#X connect 47 0 43 0;
+#X connect 48 0 45 0;
+#X connect 48 0 46 0;
+#X connect 49 0 21 0;
+#X connect 50 0 51 0;
+#X connect 51 0 33 2;
+#X connect 52 0 64 0;
+#X connect 53 0 86 0;
+#X connect 57 0 86 0;
+#X connect 58 0 57 0;
+#X connect 59 0 60 0;
+#X connect 63 0 62 0;
+#X connect 65 0 72 0;
+#X connect 66 0 82 0;
+#X connect 67 0 72 2;
+#X connect 68 0 81 0;
+#X connect 69 0 72 1;
+#X connect 70 0 71 0;
+#X connect 70 0 86 0;
+#X connect 72 0 70 0;
+#X connect 73 0 72 3;
+#X connect 74 0 72 4;
+#X connect 75 0 80 0;
+#X connect 76 0 79 0;
+#X connect 77 0 78 0;
+#X connect 78 0 65 0;
+#X connect 78 1 69 0;
+#X connect 78 2 67 0;
+#X connect 78 3 73 0;
+#X connect 78 4 74 0;
+#X connect 79 0 65 0;
+#X connect 79 1 69 0;
+#X connect 79 2 67 0;
+#X connect 79 3 74 0;
+#X connect 79 4 73 0;
+#X connect 80 0 65 0;
+#X connect 80 1 69 0;
+#X connect 80 2 73 0;
+#X connect 80 3 74 0;
+#X connect 80 4 67 0;
+#X connect 81 0 65 0;
+#X connect 81 1 67 0;
+#X connect 81 2 73 0;
+#X connect 81 3 74 0;
+#X connect 81 4 69 0;
+#X connect 82 0 65 0;
+#X connect 82 1 69 0;
+#X connect 82 2 67 0;
+#X connect 82 3 73 0;
+#X connect 82 4 74 0;
+#X connect 86 0 1 0;
+#X connect 86 1 3 0;
+#X connect 87 0 83 0;
+#X connect 88 0 84 0;
+#X connect 89 0 85 0;
+#X restore 296 274 pd streaming;
+#X obj 158 560 cnv 15 250 75 empty empty empty 10 5 1 10 -128992 -66577
+0;
+#X floatatom 175 583 8 0 0 0 - pages -;
+#X obj 470 510 cnv 15 200 120 empty empty empty 20 12 0 14 -62784 -66577
+0;
+#X text 535 545 start;
+#X text 544 584 stop;
+#X obj 596 540 bng 25 250 50 0 connect empty empty 0 -6 0 8 -24198
+-1 -1;
+#X obj 598 580 bng 25 250 50 0 disconnect empty empty 0 -6 0 8 -258699
+-1 -1;
+#X obj 417 513 vu 15 120 audio empty -1 -8 0 8 -66577 -1 1 0;
+#X obj 240 274 dac~;
+#X obj 47 306 cnv 15 300 160 empty empty empty 20 12 0 14 -236851 -66577
+0;
+#X text 50 307 Server configuration;
+#X symbolatom 130 336 30 0 0 0 server: iserver-name server-name;
+#X symbolatom 130 378 30 0 0 0 mountpoint: - mount-point;
+#X symbolatom 129 398 30 0 0 0 password: - password;
+#X obj 362 570 tgl 40 0 empty bstatus empty 0 -6 0 8 -258699 -262144
+-262144 0 1;
+#X obj 52 559 cnv 15 100 75 empty empty empty 20 12 0 14 -99865 -66577
+0;
+#X text 74 562 G.I.S.S.;
+#X text 70 579 streaming;
+#X text 82 598 patch;
+#X obj 670 32 cnv 15 300 120 empty empty empty 20 12 0 14 -236851 -66577
+0;
+#X obj 750 131 tgl 15 0 mic-mute empty mute: -65 8 0 12 -24198 -1 -1
+0 1;
+#X floatatom 129 356 5 0 0 0 port: iport-number port-number;
+#X text 344 473 <<<<<<<<<<<<<< Emission >>>>>>>>>>>>>>>>>;
+#X obj 364 304 cnv 15 300 160 empty empty empty 20 12 0 14 -236851
+-66577 0;
+#X symbolatom 450 323 30 0 0 0 title: istream-title stream-title;
+#X symbolatom 451 378 30 0 0 0 description: istream-description stream-description
+;
+#X symbolatom 451 398 30 0 0 0 genre: istream-genre stream-genre;
+#X symbolatom 450 340 30 0 0 0 artist: istream-artist stream-artist
+;
+#X symbolatom 450 359 30 0 0 0 location: istream-location stream-location
+;
+#X obj 674 305 cnv 15 300 160 empty empty empty 20 12 0 14 -236851
+-66577 0;
+#X floatatom 831 346 5 0 0 0 channels_(1..2): istream-channels stream-channels
+;
+#X floatatom 834 364 5 0 0 0 Samplerate: istream-srate stream-srate
+;
+#X floatatom 833 381 5 0 0 0 Bitrate: istream-bitrate stream-bitrate
+;
+#X floatatom 832 398 5 0 0 0 Max_bitrate: istream-maxbitrate stream-maxbitrate
+;
+#X text 678 307 Stream quality :;
+#X text 535 518 EMISSION;
+#X text 416 494 level;
+#X text 686 643 support : ydegoyon at free.fr;
+#X text 300 8 <<<<<<<<<<<<<< Input files and microphone >>>>>>>>>>>>>>>>>
+;
+#X text 673 33 Microphone;
+#X obj 807 43 vsl 15 80 0 3 0 0 mic-level imic-level empty 0 -8 0 8
+-44926 -1 -1 2633 1;
+#X text 794 131 level;
+#X obj 854 44 vu 15 80 mic-db empty -1 -8 0 8 -66577 -1 1 0;
+#X text 685 630 Authors : autoperro;
+#N canvas 251 329 450 300 mic 0;
+#X obj 218 91 adc~;
+#X obj 216 144 *~ 1;
+#X obj 272 144 *~ 1;
+#X obj 278 108 hsl 128 15 0 3 0 0 empty mic-level empty -2 -6 0 8 -260818
+-1 -1 4233 1;
+#X obj 328 192 env~;
+#X obj 332 221 - 88;
+#X obj 340 256 s mic-db;
+#X obj 297 20 r mic-mute;
+#X obj 385 83 f;
+#X obj 392 56 r mic-level;
+#X msg 276 79 float 0;
+#X msg 341 79 bang;
+#X obj 84 66 loadbang;
+#X msg 85 96 float 1;
+#X obj 84 123 s imic-level;
+#X obj 296 49 route 1;
+#X obj 186 209 outlet~;
+#X obj 257 208 outlet~;
+#X connect 0 0 1 0;
+#X connect 0 1 2 0;
+#X connect 1 0 16 0;
+#X connect 1 0 4 0;
+#X connect 2 0 17 0;
+#X connect 2 0 4 0;
+#X connect 3 0 2 1;
+#X connect 3 0 1 1;
+#X connect 4 0 5 0;
+#X connect 5 0 6 0;
+#X connect 7 0 15 0;
+#X connect 8 0 3 0;
+#X connect 9 0 8 1;
+#X connect 10 0 3 0;
+#X connect 11 0 8 0;
+#X connect 12 0 13 0;
+#X connect 13 0 14 0;
+#X connect 15 0 10 0;
+#X connect 15 1 11 0;
+#X restore 283 258 pd mic;
+#X text 239 584 Ogg pages emitted;
+#X text 66 612 ( audio );
+#X obj 149 422 vradio 15 1 0 2 server-type iserver-type empty 0 -6
+0 8 -262144 -1 -1 1;
+#X text 49 420 server type :;
+#X text 172 421 JRoar or old icecast;
+#X text 172 436 icecast 2;
+#X symbolatom 451 417 30 0 0 0 copyright: istream-copyright stream-copyright
+;
+#X text 369 305 Meta data ( _ will be replaced by spaces );
+#X floatatom 833 417 5 0 0 0 Min_bitrate: istream-minbitrate stream-minbitrate
+;
+#X obj 699 509 cnv 15 200 120 empty empty empty 20 12 0 14 -261689
+-66577 0;
+#X text 734 535 G.I.S.S.;
+#X text 824 556 is not;
+#N canvas 0 0 996 665 ogg/vorbis 0;
+#X obj 111 134 playlist ogg 250 100 {Helvetica 10 bold} #457782 yellow
+black red;
+#X msg 177 453 open \$1;
+#X obj 106 480 loadbang;
+#X msg 121 437 1;
+#X obj 169 247 hsl 160 15 0 2000 0 0 empty empty seek: -45 6 0 12 -262144
+-1 -1 556 1;
+#X obj 166 291 tgl 15 0 empty empty loop: -40 6 0 12 -260818 -1 -1
+1 1;
+#X obj 166 315 tgl 15 0 empty pl1start start!: -50 6 0 12 -24198 -1
+-1 0 1;
+#X msg 251 388 70;
+#X obj 197 497 oggread~;
+#X obj 265 498 spigot;
+#X obj 323 388 route 1;
+#X msg 322 417 start;
+#X msg 372 416 stop;
+#X msg 55 418 seek \$1;
+#X obj 373 138 vsl 15 128 0 5 0 0 empty empty empty 0 -8 0 8 -262144
+-1 -1 2540 1;
+#X text 358 275 level;
+#X obj 271 593 *~ 1;
+#X obj 207 592 *~ 1;
+#X obj 447 270 loadbang;
+#X msg 446 301 1;
+#X floatatom 166 270 5 0 0 0 position: - -;
+#X obj 265 630 outlet~;
+#X obj 196 630 outlet~;
+#X obj 299 288 cnv 15 100 50 empty empty empty 20 12 0 14 -262144 -66577
+0;
+#X obj 143 383 t b s;
+#X msg 99 384 1;
+#X obj 15 384 s pl1start;
+#X connect 0 0 24 0;
+#X connect 1 0 8 0;
+#X connect 2 0 3 0;
+#X connect 2 0 7 0;
+#X connect 3 0 5 0;
+#X connect 4 0 13 0;
+#X connect 5 0 9 1;
+#X connect 6 0 10 0;
+#X connect 7 0 4 0;
+#X connect 8 0 17 0;
+#X connect 8 1 16 0;
+#X connect 8 2 20 0;
+#X connect 8 3 9 0;
+#X connect 9 0 11 0;
+#X connect 10 0 11 0;
+#X connect 10 1 12 0;
+#X connect 11 0 8 0;
+#X connect 12 0 8 0;
+#X connect 13 0 8 0;
+#X connect 14 0 16 1;
+#X connect 14 0 17 1;
+#X connect 16 0 21 0;
+#X connect 17 0 22 0;
+#X connect 18 0 19 0;
+#X connect 19 0 14 0;
+#X connect 24 0 25 0;
+#X connect 24 1 1 0;
+#X connect 25 0 26 0;
+#X coords 0 -1 1 1 300 240 1 100 100;
+#X restore 43 35 pd ogg/vorbis files;
+#X obj 28 274 cnv 15 800 30 empty empty empty 20 12 0 14 -262144 -66577
+0;
+#X text 319 280 <<<<<<<<<<<<<< Stream configuration >>>>>>>>>>>>>>>>>
+;
+#N canvas 0 0 996 665 ogg/vorbis 0;
+#X obj 111 134 playlist ogg 250 100 {Helvetica 10 bold} #457782 yellow
+black red;
+#X msg 177 453 open \$1;
+#X obj 106 480 loadbang;
+#X msg 121 437 1;
+#X obj 169 247 hsl 160 15 0 2000 0 0 empty empty seek: -45 6 0 12 -262144
+-1 -1 556 1;
+#X obj 166 291 tgl 15 0 empty empty loop: -40 6 0 12 -260818 -1 -1
+1 1;
+#X obj 166 315 tgl 15 0 empty pl2start start!: -50 6 0 12 -24198 -1
+-1 0 1;
+#X msg 251 388 70;
+#X obj 197 497 oggread~;
+#X obj 265 498 spigot;
+#X obj 323 388 route 1;
+#X msg 322 417 start;
+#X msg 372 416 stop;
+#X msg 55 418 seek \$1;
+#X obj 373 138 vsl 15 128 0 5 0 0 empty empty empty 0 -8 0 8 -262144
+-1 -1 2540 1;
+#X text 358 275 level;
+#X obj 271 593 *~ 1;
+#X obj 207 592 *~ 1;
+#X obj 447 270 loadbang;
+#X msg 446 301 1;
+#X floatatom 166 270 5 0 0 0 position: - -;
+#X obj 265 630 outlet~;
+#X obj 196 630 outlet~;
+#X obj 299 288 cnv 15 100 50 empty empty empty 20 12 0 14 -262144 -66577
+0;
+#X obj 143 383 t b s;
+#X msg 99 384 1;
+#X obj 15 384 s pl2start;
+#X connect 0 0 24 0;
+#X connect 1 0 8 0;
+#X connect 2 0 3 0;
+#X connect 2 0 7 0;
+#X connect 3 0 5 0;
+#X connect 4 0 13 0;
+#X connect 5 0 9 1;
+#X connect 6 0 10 0;
+#X connect 7 0 4 0;
+#X connect 8 0 17 0;
+#X connect 8 1 16 0;
+#X connect 8 2 20 0;
+#X connect 8 3 9 0;
+#X connect 9 0 11 0;
+#X connect 10 0 11 0;
+#X connect 10 1 12 0;
+#X connect 11 0 8 0;
+#X connect 12 0 8 0;
+#X connect 13 0 8 0;
+#X connect 14 0 16 1;
+#X connect 14 0 17 1;
+#X connect 16 0 21 0;
+#X connect 17 0 22 0;
+#X connect 18 0 19 0;
+#X connect 19 0 14 0;
+#X connect 24 0 25 0;
+#X connect 24 1 1 0;
+#X connect 25 0 26 0;
+#X coords 0 -1 1 1 300 240 1 100 100;
+#X restore 359 35 pd ogg/vorbis files;
+#X text 790 586 radiomercial;
+#X connect 45 0 0 0;
+#X connect 45 0 9 0;
+#X connect 45 1 0 1;
+#X connect 45 1 9 1;
+#X connect 58 0 0 0;
+#X connect 58 0 9 0;
+#X connect 58 1 9 1;
+#X connect 58 1 0 1;
+#X connect 61 0 0 0;
+#X connect 61 0 9 0;
+#X connect 61 1 0 1;
+#X connect 61 1 9 1;
+#X coords 0 0 1 1 85 60 0;


Property changes on: branches/pd-extended/v0-40/externals/pidip/patches/giss-audio-ogg.pd
___________________________________________________________________
Name: svn:executable
   + *

Added: branches/pd-extended/v0-40/externals/pidip/patches/giss-dv-linux.pd
===================================================================
--- branches/pd-extended/v0-40/externals/pidip/patches/giss-dv-linux.pd	                        (rev 0)
+++ branches/pd-extended/v0-40/externals/pidip/patches/giss-dv-linux.pd	2008-06-08 11:49:52 UTC (rev 9975)
@@ -0,0 +1,624 @@
+#N canvas 1 1 996 688 10;
+#N canvas 0 0 999 654 streaming 0;
+#X text 737 451 ==== VIDEOS SETTINGS ========;
+#X text 736 552 ==== AUDIO SETTINGS ========;
+#X msg 738 500 videoquality \$1;
+#X msg 740 524 videobitrate \$1;
+#X msg 738 573 audioquality \$1;
+#X msg 739 601 audiobitrate \$1;
+#X msg 277 386 disconnect;
+#X floatatom 41 530 5 0 0 0 - - -;
+#X text 83 531 Streaming status;
+#X floatatom 68 551 13 0 0 0 - - -;
+#X text 177 551 Number of video frames emitted;
+#X floatatom 96 571 7 0 0 0 - - -;
+#X text 147 571 Number of video frames dropped;
+#X floatatom 124 594 5 0 0 0 - - -;
+#X text 168 593 Emission framerate;
+#X msg 738 474 framerate \$1;
+#X floatatom 145 617 7 0 0 0 - - -;
+#X text 201 618 Audio stream time;
+#X floatatom 165 639 7 0 0 0 - - -;
+#X text 220 639 Video stream time;
+#X obj 518 622 block~ 512;
+#X obj 142 366 inlet~;
+#X obj 216 366 inlet~;
+#X obj 159 490 pdp_theonice~;
+#X obj 686 321 / 10;
+#X obj 767 265 loadbang;
+#X floatatom 691 216 5 0 0 0 - - -;
+#X msg 693 260 200;
+#X msg 41 371 \; pd dsp 1;
+#X obj 40 620 select 1;
+#X obj 54 754 f;
+#X msg 28 725 bang;
+#X floatatom 85 698 3 0 29 0 - - -;
+#X msg 71 657 13;
+#X msg 38 657 16;
+#X obj 126 688 s frames;
+#X obj 145 714 s audiotime;
+#X obj 166 738 s videotime;
+#X obj 288 8 r connect;
+#X obj 277 365 r disconnect;
+#X obj 272 672 -;
+#X obj 273 697 abs;
+#X floatatom 275 720 5 0 0 0 - - -;
+#X obj 275 743 moses 30;
+#X floatatom 328 769 5 0 0 0 - - -;
+#X floatatom 275 769 5 0 0 0 - - -;
+#X obj 388 800 t b;
+#X obj 420 800 s disconnect;
+#X obj 477 822 s connect;
+#X obj 70 443 pdp_affine;
+#X floatatom 120 417 5 0 0 0 - stream-lum -;
+#X floatatom 165 418 5 0 0 0 - - -;
+#X msg 124 394 1;
+#X obj 265 463 s audio;
+#X obj 421 821 del 500;
+#X obj 164 234 pdp_scale 160 128;
+#X obj 347 63 r server-name;
+#X obj 318 89 symbol;
+#X symbolatom 318 112 30 0 0 0 - - -;
+#X obj 318 65 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X symbolatom 468 87 30 0 0 0 - - -;
+#X obj 468 40 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 497 38 r mount-point;
+#X obj 601 16 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 630 14 r port-number;
+#X obj 318 30 t b b b;
+#X obj 289 29 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X msg 322 166 connect \$1 \$2 \$3;
+#X msg 45 80 passwd \$1;
+#X obj 45 56 symbol;
+#X symbolatom 96 59 10 0 0 0 - - -;
+#X obj 44 24 r password;
+#X obj 320 140 pack s s f;
+#X msg 51 809 \; bstatus color \$1 \$2 \$3;
+#X msg -1 685 \; bstatus 1;
+#X msg 84 741 \; bstatus 0;
+#X obj 54 782 pack 0 0 0;
+#X obj 264 415 env~;
+#X obj 265 441 - 80;
+#X obj 63 343 loadbang;
+#X obj 736 120 loadbang;
+#X obj 737 171 s iserver-name;
+#X obj 737 196 s server-name;
+#X obj 895 119 loadbang;
+#X obj 896 170 s iport-number;
+#X obj 896 195 s port-number;
+#X msg 735 144 symbol stream.giss.tv;
+#X msg 894 143 8000;
+#X obj 468 64 symbol;
+#X obj 601 40 float;
+#X floatatom 602 62 5 0 0 0 - - -;
+#X obj 164 194 r pdp_pckt;
+#X obj 347 439 pdp_spigot;
+#X obj 346 463 pdp_glx;
+#X obj 425 422 tgl 15 0 empty stream-preview empty 0 -6 0 8 -262144
+-1 -1 0 1;
+#X msg 798 350 2;
+#N canvas 135 92 534 518 metadata 0;
+#X obj 66 445 outlet;
+#X obj 292 375 r stream-genre;
+#X msg 288 417 genre \$1;
+#X obj 347 45 loadbang;
+#X msg 360 395 symbol free_media;
+#X obj 366 422 s istream-genre;
+#X msg 256 306 symbol giss_stream;
+#X obj 257 328 s istream-description;
+#X obj 201 284 r stream-description;
+#X msg 183 349 description \$1;
+#X obj 184 191 r stream-url;
+#X msg 239 213 symbol http://giss.tv;
+#X obj 240 235 s istream-url;
+#X msg 174 256 url \$1;
+#X msg 195 120 symbol various;
+#X msg 110 167 artist \$1;
+#X obj 196 142 s istream-artist;
+#X obj 140 98 r stream-artist;
+#X obj 142 46 s istream-title;
+#X msg 142 24 symbol pd_stream;
+#X obj 87 3 r stream-title;
+#X msg 49 75 title \$1;
+#X obj 31 140 print title;
+#X connect 1 0 2 0;
+#X connect 2 0 0 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 0 11 0;
+#X connect 3 0 14 0;
+#X connect 3 0 19 0;
+#X connect 4 0 5 0;
+#X connect 6 0 7 0;
+#X connect 8 0 9 0;
+#X connect 9 0 0 0;
+#X connect 10 0 13 0;
+#X connect 11 0 12 0;
+#X connect 13 0 0 0;
+#X connect 14 0 16 0;
+#X connect 15 0 0 0;
+#X connect 17 0 15 0;
+#X connect 19 0 18 0;
+#X connect 20 0 21 0;
+#X connect 21 0 0 0;
+#X connect 21 0 22 0;
+#X restore 764 625 pd metadata;
+#X obj 388 268 f;
+#X obj 391 210 r stream-width;
+#X msg 619 147 320;
+#X obj 619 170 s istream-width;
+#X obj 619 122 loadbang;
+#X obj 392 238 t b b f;
+#X obj 450 268 f;
+#X obj 414 300 pack f f;
+#X msg 415 324 dim \$1 \$2;
+#X obj 502 239 t b b f;
+#X obj 501 212 r stream-height;
+#X obj 495 122 loadbang;
+#X msg 495 147 240;
+#X obj 495 170 s istream-height;
+#X obj 422 352 print;
+#X msg 817 296 7;
+#X msg 845 408 64;
+#X msg 685 298 5;
+#X msg 703 382 32;
+#X obj 835 474 r stream-framerate;
+#X obj 817 322 s istream-framerate;
+#X obj 854 499 r stream-vqual;
+#X obj 795 378 s istream-vqual;
+#X obj 843 434 s istream-vbitrate;
+#X obj 859 523 r stream-vbitrate;
+#X obj 857 576 r stream-aqual;
+#X obj 677 349 s istream-aqual;
+#X obj 699 406 s istream-abitrate;
+#X obj 859 600 r stream-abitrate;
+#X obj 433 454 route 0;
+#X msg 416 484 close;
+#X obj 472 754 + 1;
+#X obj 484 776 s reconnects;
+#X obj 443 753 f 1;
+#X obj 9 592 print status;
+#X connect 2 0 23 0;
+#X connect 3 0 23 0;
+#X connect 4 0 23 0;
+#X connect 5 0 23 0;
+#X connect 6 0 23 0;
+#X connect 7 0 29 0;
+#X connect 7 0 131 0;
+#X connect 9 0 35 0;
+#X connect 15 0 23 0;
+#X connect 16 0 36 0;
+#X connect 16 0 40 1;
+#X connect 18 0 37 0;
+#X connect 18 0 40 0;
+#X connect 21 0 23 0;
+#X connect 21 0 77 0;
+#X connect 22 0 23 1;
+#X connect 23 0 7 0;
+#X connect 23 1 9 0;
+#X connect 23 2 11 0;
+#X connect 23 3 13 0;
+#X connect 23 4 16 0;
+#X connect 23 5 18 0;
+#X connect 24 0 123 0;
+#X connect 25 0 112 0;
+#X connect 25 0 114 0;
+#X connect 25 0 115 0;
+#X connect 25 0 95 0;
+#X connect 25 0 27 0;
+#X connect 25 0 113 0;
+#X connect 27 0 26 0;
+#X connect 29 0 34 0;
+#X connect 29 1 33 0;
+#X connect 29 1 75 0;
+#X connect 30 0 76 0;
+#X connect 31 0 30 0;
+#X connect 32 0 30 1;
+#X connect 32 0 31 0;
+#X connect 33 0 32 0;
+#X connect 34 0 32 0;
+#X connect 34 0 74 0;
+#X connect 38 0 66 0;
+#X connect 39 0 6 0;
+#X connect 40 0 41 0;
+#X connect 41 0 42 0;
+#X connect 42 0 43 0;
+#X connect 43 0 45 0;
+#X connect 43 1 44 0;
+#X connect 44 0 46 0;
+#X connect 46 0 47 0;
+#X connect 46 0 54 0;
+#X connect 46 0 130 0;
+#X connect 49 0 23 0;
+#X connect 49 0 92 0;
+#X connect 50 0 49 1;
+#X connect 51 0 49 2;
+#X connect 52 0 49 1;
+#X connect 54 0 48 0;
+#X connect 55 0 49 0;
+#X connect 56 0 57 1;
+#X connect 57 0 58 0;
+#X connect 58 0 72 0;
+#X connect 59 0 57 0;
+#X connect 60 0 72 1;
+#X connect 61 0 88 0;
+#X connect 62 0 88 1;
+#X connect 63 0 89 0;
+#X connect 64 0 89 1;
+#X connect 65 0 59 0;
+#X connect 65 1 61 0;
+#X connect 65 2 63 0;
+#X connect 66 0 65 0;
+#X connect 67 0 23 0;
+#X connect 68 0 23 0;
+#X connect 69 0 68 0;
+#X connect 71 0 69 0;
+#X connect 71 0 70 0;
+#X connect 72 0 67 0;
+#X connect 76 0 73 0;
+#X connect 77 0 78 0;
+#X connect 78 0 53 0;
+#X connect 79 0 28 0;
+#X connect 79 0 52 0;
+#X connect 80 0 86 0;
+#X connect 83 0 87 0;
+#X connect 86 0 81 0;
+#X connect 86 0 82 0;
+#X connect 87 0 84 0;
+#X connect 87 0 85 0;
+#X connect 88 0 60 0;
+#X connect 89 0 90 0;
+#X connect 90 0 72 2;
+#X connect 91 0 55 0;
+#X connect 92 1 93 0;
+#X connect 94 0 92 1;
+#X connect 94 0 126 0;
+#X connect 95 0 119 0;
+#X connect 96 0 23 0;
+#X connect 97 0 104 0;
+#X connect 98 0 102 0;
+#X connect 99 0 100 0;
+#X connect 101 0 99 0;
+#X connect 102 0 97 0;
+#X connect 102 1 103 0;
+#X connect 102 2 97 1;
+#X connect 103 0 104 1;
+#X connect 104 0 105 0;
+#X connect 105 0 55 0;
+#X connect 105 0 111 0;
+#X connect 106 0 97 0;
+#X connect 106 1 103 0;
+#X connect 106 2 103 1;
+#X connect 107 0 106 0;
+#X connect 108 0 109 0;
+#X connect 109 0 110 0;
+#X connect 112 0 117 0;
+#X connect 113 0 120 0;
+#X connect 114 0 24 0;
+#X connect 115 0 124 0;
+#X connect 116 0 15 0;
+#X connect 118 0 2 0;
+#X connect 121 0 3 0;
+#X connect 122 0 4 0;
+#X connect 125 0 5 0;
+#X connect 126 0 127 0;
+#X connect 127 0 93 0;
+#X connect 128 0 130 1;
+#X connect 130 0 128 0;
+#X connect 130 0 129 0;
+#X restore 788 570 pd streaming;
+#X obj 838 513 adc~;
+#X obj 156 497 cnv 15 250 75 empty empty empty 10 5 1 10 -128992 -66577
+0;
+#X floatatom 166 501 8 0 0 0 - frames -;
+#X floatatom 166 531 8 0 0 0 - videotime -;
+#X floatatom 166 516 8 0 0 0 - audiotime -;
+#X text 223 502 Frames emitted;
+#X text 224 517 Audio stream time;
+#X text 227 532 Video stream time;
+#X obj 504 495 cnv 15 200 120 empty empty empty 20 12 0 14 -62784 -66577
+0;
+#X text 569 530 start;
+#X text 578 569 stop;
+#X obj 630 525 bng 25 250 50 0 connect empty empty 0 -6 0 8 -24198
+-1 -1;
+#X obj 632 565 bng 25 250 50 0 disconnect empty empty 0 -6 0 8 -258699
+-1 -1;
+#X obj 417 513 vu 15 120 audio empty -1 -8 0 8 -66577 -1 1 0;
+#X obj 825 592 dac~;
+#X obj 47 306 cnv 15 300 120 empty empty empty 20 12 0 14 -236851 -66577
+0;
+#X text 50 307 Server configuration;
+#X symbolatom 130 336 30 0 0 0 server: iserver-name server-name;
+#X symbolatom 130 378 30 0 0 0 mountpoint: - mount-point;
+#X symbolatom 129 398 30 0 0 0 password: - password;
+#X obj 360 508 tgl 40 0 empty bstatus empty 0 -6 0 8 -24198 -262144
+-262144 0 1;
+#X obj 50 497 cnv 15 100 75 empty empty empty 20 12 0 14 -99865 -66577
+0;
+#X text 72 500 G.I.S.S.;
+#X text 68 517 streaming;
+#X text 80 536 patch;
+#X floatatom 129 356 5 0 0 0 port: iport-number port-number;
+#N canvas 0 0 996 665 quicktime 0;
+#X obj 111 134 playlist mov 250 100 {Helvetica 10 bold} #457782 yellow
+black red;
+#X obj 197 497 pdp_yqt;
+#X msg 189 462 open \$1;
+#X msg 107 478 loop \$1;
+#X obj 167 240 tgl 15 0 empty empty loop: -35 8 0 12 -262144 -1 -1
+1 1;
+#X obj 194 530 s pdp_pckt;
+#X obj 286 564 s~ lchan;
+#X obj 320 532 s~ rchan;
+#X obj 87 564 loadbang;
+#X msg 67 499 1;
+#X floatatom 309 332 5 0 0 0 - - -;
+#X obj 171 260 hsl 160 15 20 300 0 0 empty empty speed: -45 6 0 12
+-262144 -1 -1 2839 1;
+#X obj 269 457 metro 70;
+#X obj 169 281 tgl 15 0 empty empty preview: -60 6 0 12 -260818 -1
+-1 1 1;
+#X obj 449 292 pdp_spigot;
+#X obj 449 323 pdp_glx;
+#X obj 169 303 tgl 15 0 empty empty start!: -50 6 0 12 -24198 -1 -1
+0 1;
+#X msg 251 388 70;
+#X obj 453 262 route 0;
+#X msg 521 269 close;
+#X connect 0 0 2 0;
+#X connect 1 0 5 0;
+#X connect 1 0 14 0;
+#X connect 1 4 6 0;
+#X connect 1 5 7 0;
+#X connect 2 0 1 0;
+#X connect 3 0 1 0;
+#X connect 4 0 3 0;
+#X connect 8 0 9 0;
+#X connect 8 0 17 0;
+#X connect 9 0 4 0;
+#X connect 9 0 13 0;
+#X connect 10 0 12 1;
+#X connect 11 0 10 0;
+#X connect 12 0 1 0;
+#X connect 13 0 14 1;
+#X connect 13 0 18 0;
+#X connect 14 1 15 0;
+#X connect 16 0 12 0;
+#X connect 17 0 11 0;
+#X connect 18 0 19 0;
+#X connect 19 0 15 0;
+#X coords 0 -1 1 1 300 240 1 100 100;
+#X restore 37 32 pd quicktime files;
+#X obj 784 537 r~ lchan;
+#X obj 851 537 r~ rchan;
+#X obj 767 513 r~ llchan;
+#X obj 876 512 r~ rrchan;
+#N canvas 0 0 996 665 theora 0;
+#X obj 111 134 playlist ogg 250 100 {Helvetica 10 bold} #457782 yellow
+black red;
+#X msg 189 462 open \$1;
+#X obj 194 530 s pdp_pckt;
+#X obj 87 564 loadbang;
+#X msg 67 499 1;
+#X floatatom 309 332 5 0 0 0 - - -;
+#X obj 173 244 hsl 160 15 20 300 0 0 empty empty speed: -45 6 0 12
+-262144 -1 -1 1136 1;
+#X obj 171 265 tgl 15 0 empty empty preview: -60 6 0 12 -260818 -1
+-1 1 1;
+#X obj 345 413 pdp_spigot;
+#X obj 345 444 pdp_glx;
+#X obj 171 287 tgl 15 0 empty empty start!: -50 6 0 12 -24198 -1 -1
+0 1;
+#X obj 197 497 pdp_theorin~;
+#X obj 269 457 metro 40;
+#X msg 251 388 40;
+#X msg 183 576 autoplay 0;
+#X obj 319 532 s~ rrchan;
+#X obj 286 564 s~ llchan;
+#X obj 428 394 route 0;
+#X msg 434 421 close;
+#X connect 0 0 1 0;
+#X connect 1 0 11 0;
+#X connect 3 0 4 0;
+#X connect 3 0 13 0;
+#X connect 3 0 14 0;
+#X connect 4 0 7 0;
+#X connect 5 0 12 1;
+#X connect 6 0 5 0;
+#X connect 7 0 8 1;
+#X connect 7 0 17 0;
+#X connect 8 1 9 0;
+#X connect 10 0 12 0;
+#X connect 11 0 2 0;
+#X connect 11 0 8 0;
+#X connect 11 1 16 0;
+#X connect 11 2 15 0;
+#X connect 12 0 11 0;
+#X connect 13 0 6 0;
+#X connect 14 0 11 0;
+#X connect 17 0 18 0;
+#X connect 18 0 9 0;
+#X coords 0 -1 1 1 300 240 1 100 100;
+#X restore 352 32 pd theora files ( good machine );
+#X text 300 8 <<<<<<<<<<<<<< Input files or cameras >>>>>>>>>>>>>>>>>
+;
+#X text 318 281 <<<<<<<<<<<<<< Stream configuration >>>>>>>>>>>>>>>>>
+;
+#X text 344 473 <<<<<<<<<<<<<< Emission >>>>>>>>>>>>>>>>>;
+#X obj 364 304 cnv 15 300 120 empty empty empty 20 12 0 14 -236851
+-66577 0;
+#X symbolatom 450 323 30 0 0 0 title: istream-title stream-title;
+#X symbolatom 451 378 30 0 0 0 description: istream-description stream-description
+;
+#X symbolatom 451 398 30 0 0 0 genre: istream-genre stream-genre;
+#X text 367 305 Meta data ( without spaces );
+#X symbolatom 450 340 30 0 0 0 artist: istream-artist stream-artist
+;
+#X symbolatom 450 359 30 0 0 0 url: istream-url stream-url;
+#X obj 674 305 cnv 15 300 120 empty empty empty 20 12 0 14 -236851
+-66577 0;
+#X floatatom 867 305 5 0 0 0 width: istream-width stream-width;
+#X floatatom 868 323 5 0 0 0 height: istream-height stream-height;
+#X floatatom 871 341 5 0 0 0 Framerate_(1..100): istream-framerate
+stream-framerate;
+#X floatatom 868 358 5 0 0 0 Video_quality_(0..63): istream-vqual stream-vqual
+;
+#X floatatom 869 375 5 0 0 0 Video_bitrate_(45..2000): istream-vbitrate
+stream-vbitrate;
+#X floatatom 870 392 5 0 0 0 Audio_quality_(-0.1..1.0): istream-aqual
+stream-aqual;
+#X floatatom 871 410 5 0 0 0 Audio_bitrate_(8..2000): istream-abitrate
+stream-abitrate;
+#X text 677 306 Stream quality :;
+#X text 569 503 EMISSION;
+#X obj 745 494 cnv 15 200 120 empty empty empty 20 12 0 14 -261689
+-66577 0;
+#X text 773 514 G.I.S.S.;

@@ Diff output truncated at 100000 characters. @@

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Pd-cvs mailing list