[Gridflow-cvs] [svn] commit: r4389 - in /trunk/format: mpeg3.c quicktimehw.c videodev.c x11.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Sun Oct 25 10:49:45 EDT 2009


Author: matju
Date: Sun Oct 25 10:49:44 2009
New Revision: 4389

Log:
avoid using t_atom2::operator long () const, because of WEIRD problems

Modified:
    trunk/format/mpeg3.c
    trunk/format/quicktimehw.c
    trunk/format/videodev.c
    trunk/format/x11.c

Modified: trunk/format/mpeg3.c
==============================================================================
--- trunk/format/mpeg3.c (original)
+++ trunk/format/mpeg3.c Sun Oct 25 10:49:44 2009
@@ -2,7 +2,7 @@
 	$Id$
 
 	GridFlow
-	Copyright (c) 2001-2008 by Mathieu Bouchard
+	Copyright (c) 2001-2009 by Mathieu Bouchard
 
 	This program is free software; you can redistribute it and/or
 	modify it under the terms of the GNU General Public License
@@ -45,13 +45,13 @@
 	#endif
 		if (!mpeg) RAISE("IO Error: can't open file `%s': %s", filename.data(), strerror(errno));
 	}
-	\decl 0 seek (long frame);
+	\decl 0 seek (int32 frame);
 	\decl 0 rewind ();
 	\decl 0 bang ();
 };
 
-\def 0 seek (long frame) {
-	mpeg3_set_frame(mpeg,clip(frame,0L,mpeg3_video_frames(mpeg,track)-1),track);
+\def 0 seek (int32 frame) {
+	mpeg3_set_frame(mpeg,clip(frame,int32(0),int32(mpeg3_video_frames(mpeg,track)-1)),track);
 }
 \def 0 rewind () {_0_seek(0,0,0);}
 

Modified: trunk/format/quicktimehw.c
==============================================================================
--- trunk/format/quicktimehw.c (original)
+++ trunk/format/quicktimehw.c Sun Oct 25 10:49:44 2009
@@ -66,7 +66,7 @@
 		bit_packing = new BitPacking(is_le(),3,3,mask);
 	}
 	\decl 0 bang ();
-	\decl 0 seek (long frame);
+	\decl 0 seek (int32 frame);
 	\decl 0 rewind ();
 	\decl 0 force_size (int32 height, int32 width);
 	\decl 0 codec (string c);
@@ -79,8 +79,8 @@
 };
 
 \def 0 force_size (int32 height, int32 width) { force = new Dim(height, width); }
-\def 0 seek (long frame) {
-	quicktime_set_video_position(anim,clip(frame,0L,quicktime_video_length(anim,track)-1),track);
+\def 0 seek (int32 frame) {
+	quicktime_set_video_position(anim,clip(frame,int32(0),int32(quicktime_video_length(anim,track)-1)),track);
 }
 \def 0 rewind () {_0_seek(0,0,0);}
 

Modified: trunk/format/videodev.c
==============================================================================
--- trunk/format/videodev.c (original)
+++ trunk/format/videodev.c Sun Oct 25 10:49:44 2009
@@ -2,7 +2,7 @@
 	$Id$
 
 	GridFlow
-	Copyright (c) 2001-2008 by Mathieu Bouchard
+	Copyright (c) 2001-2009 by Mathieu Bouchard
 
 	This program is free software; you can redistribute it and/or
 	modify it under the terms of the GNU General Public License
@@ -248,7 +248,7 @@
 	\decl 0 transfer (string sym, int queuemax=2);
 
 	\attr t_symbol *colorspace;
-	\attr long   frequency();
+	\attr int32  frequency();
 	\attr uint16 brightness();
 	\attr uint16 hue();
 	\attr uint16 colour();
@@ -600,14 +600,15 @@
 \def 0      contrast   (uint16 contrast)  {PICTURE_ATTR(   contrast)}
 \def uint16 whiteness  ()                 {PICTURE_ATTRGET(whiteness)}
 \def 0      whiteness  (uint16 whiteness) {PICTURE_ATTR(   whiteness)}
-\def long frequency  () {
-	long value;
+\def int32 frequency  () {
+	int32 value;
 	//if (ioctl(fd, VIDIOCGFREQ, &value)<0) {has_frequency=false; return 0;}
 	WIOCTL(fd, VIDIOCGFREQ, &value);
 	return value;
 }
-\def 0 frequency (long frequency) {
-	WIOCTL(fd, VIDIOCSFREQ, &frequency);
+\def 0 frequency (int32 frequency) {
+    long frequency_ = frequency;
+	WIOCTL(fd, VIDIOCSFREQ, &frequency_);
 }
 
 \def 0 colorspace (t_symbol *colorspace) { /* y yuv rgb magic */

Modified: trunk/format/x11.c
==============================================================================
--- trunk/format/x11.c (original)
+++ trunk/format/x11.c Sun Oct 25 10:49:44 2009
@@ -117,12 +117,12 @@
 			i=1;
 		} else if (domain==gensym("local")) {
 			if (argc<2) RAISE("open x11 local: not enough args");
-			sprintf(host,":%ld",long(argv[1]));
+			sprintf(host,":%d",int32(argv[1]));
 			open_display(host);
 			i=2;
 		} else if (domain==gensym("remote")) {
 			if (argc<3) RAISE("open x11 remote: not enough args");
-			sprintf(host,"%s:%ld",string(argv[1]).data(),long(argv[2]));
+			sprintf(host,"%s:%d",string(argv[1]).data(),int32(argv[2]));
 			open_display(host);
 			i=3;
 		} else if (domain==gensym("display")) {



More information about the Gridflow-cvs mailing list