[Gridflow-cvs] [svn] commit: r6092 - in /trunk/src: dc1394.cxx gridflow.hxx jpeg.cxx png.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Sat Aug 14 18:27:28 EDT 2010


Author: matju
Date: Sat Aug 14 18:27:28 2010
New Revision: 6092

Log:
shortcuts

Modified:
    trunk/src/dc1394.cxx
    trunk/src/gridflow.hxx
    trunk/src/jpeg.cxx
    trunk/src/png.cxx

Modified: trunk/src/dc1394.cxx
==============================================================================
--- trunk/src/dc1394.cxx (original)
+++ trunk/src/dc1394.cxx Sat Aug 14 18:27:28 2010
@@ -204,30 +204,22 @@
 	//\attr uint16 contrast();
 	//\attr uint16 whiteness();
 	void setup ();
-	\decl 0 get (t_symbol *s=0);
-	\decl 0 size (int height, int width);
+	\decl 0 get (t_symbol *s=0) {
+		FObject::_0_get(s);
+		if (!s) {
+			{t_atom2 a[2] = {camera.frame_height,camera.frame_width}; out[0](gensym("size"),2,a);} // abnormal (does not use nested list)
+			unsigned int width,height;
+			IO(dc1394_query_format7_max_image_size,MODE_FORMAT7_0,&width,&height);
+			{t_atom2 a[2] = {height,width}; out[0](gensym("maxsize"),2,a);} // abnormal (does not use nested list)
+		}
+	}
+	\decl 0 size (int height, int width) {
+		IO(dc1394_set_format7_image_size,MODE_FORMAT7_0,width,height);
+		this->height = height;
+		this->width = width;
+		setup();
+	}
 };
-
-\def 0 get (t_symbol *s=0) {
-	FObject::_0_get(s);
-	t_atom a[2];
-	if (!s) {
-		SETFLOAT(a+0,camera.frame_height);
-		SETFLOAT(a+1,camera.frame_width);
-		outlet_anything(outlets[0],gensym("size"),2,a); // abnormal (does not use nested list)
-		unsigned int width,height;
-		IO(dc1394_query_format7_max_image_size,MODE_FORMAT7_0,&width,&height);
-		SETFLOAT(a+0,height);
-		SETFLOAT(a+1,width);
-		outlet_anything(outlets[0],gensym("maxsize"),2,a); // abnormal (does not use nested list)
-	}
-}
-\def 0 size (int height, int width) {
-	IO(dc1394_set_format7_image_size,MODE_FORMAT7_0,width,height);
-	this->height = height;
-	this->width = width;
-	setup();
-}
 
 \def unsigned brightness () {unsigned value;  dc1394_get_brightness(rh,usenode,&value); return value;}
 \def 0        brightness    (unsigned value) {dc1394_set_brightness(rh,usenode, value);}

Modified: trunk/src/gridflow.hxx
==============================================================================
--- trunk/src/gridflow.hxx (original)
+++ trunk/src/gridflow.hxx Sat Aug 14 18:27:28 2010
@@ -829,7 +829,7 @@
 	void operator () (t_symbol *s, int argc, t_atom *argv) {outlet_anything(p,s,  argc,argv);}
 	void operator () (t_atom *a);
 };
-void outlet_atom2 (t_outlet *self, t_atom *av);
+void outlet_atom2 (PtrOutlet self, t_atom *av);
 
 // represents objects that have inlets/outlets
 \class FObject {

Modified: trunk/src/jpeg.cxx
==============================================================================
--- trunk/src/jpeg.cxx (original)
+++ trunk/src/jpeg.cxx Sat Aug 14 18:27:28 2010
@@ -90,7 +90,7 @@
 \def 0 bang () {
 	//off_t off = ftell(f);
 	//fseek(f,off,SEEK_SET);
-	if (gfeof(f)) {outlet_bang(bself->te_outlet); return;}
+	if (gfeof(f)) {out[0](); return;}
 	djpeg.err = jpeg_std_error(&jerr);
 	jpeg_create_decompress(&djpeg);
 	jpeg_stdio_src(&djpeg,f);

Modified: trunk/src/png.cxx
==============================================================================
--- trunk/src/png.cxx (original)
+++ trunk/src/png.cxx Sat Aug 14 18:27:28 2010
@@ -78,7 +78,7 @@
 
 \def 0 bang () {
 	uint8 sig[8];
-	if (!fread(sig, 1, 8, f)) {outlet_bang(bself->te_outlet); return;}
+	if (!fread(sig, 1, 8, f)) {out[0](); return;}
 	if (png_sig_cmp(sig,0,8)) RAISE("bad signature");
 	png = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
 	if (!png) RAISE("!png");



More information about the Gridflow-cvs mailing list