Hi all! We just put together an OAuth library to use with Processing in our projects so we thought we'd share.
It's based on this fabulous Java OAuth library called Scribe, which means you can easily tweak it to talk to tons of different services. The current example set includes talking to Facebook, Flickr, Twitter, and OpenPaths (openpaths.cc). blprnt (Jer Thorp) was also kind enough to include one of his examples.
It's otherwise pretty basic at the moment (v0.1.1!
), but let us know what you think, what you've used it for (or want to use it for), and of course if you come across any bugs. Downloads, source code, etc. all in the link below.
It looks like past frames that I render with GLGraphics (regardless of whether I use GSVideo), show up when I run projects that play GSVideo by copying to a GLGraphics texture.
Setup:
Sun Java 1.6.0_26
Ubuntu 11.10
Gnome 3
GSVideo + GLGraphics 1.0.0
Details:
Suppose I first run a project that renders a simple cube rendered in GLGraphics:
import processing.opengl.*;
import codeanticode.glgraphics.*;
void setup() {
size(640, 480, GLConstants.GLGRAPHICS);
}
void draw() {
background(0);
fill(255, 100, 130);
pushMatrix();
translate(130, height/2, 0);
rotateY(1.25);
rotateX(-0.4);
box(100);
popMatrix();
}
This works as normal:
I can also run the
GSVideo/Movie (without using GLGraphics) example and it works as normal:
If I close the pink cube and then run the
GSVideo/GLGraphics/Movie example, then I get this:
Note that there is no longer any code about a pink cube, but this is what I see every other frame. Every other frame is normal (i.e. black where the pink cube is).
If I close the GSVideo/GLGraphics/Movie example and next run the
GLGraphics/Texture/GLBlendModes example, it again appears normal like this:
Now I run
GSVideo/GLGraphics/Movie again and I get some lovely post-modernist video art (this time every frame, as far as my eye can tell):
Any suggestions? It is quite the amusing and frustrating bug, I must say. I feel like I ought to be able to force-clean the buffer or something, but the GSVideo javadocs can't tell me if that's possible. In my actual project, the residual problem shows up as past frames of the same movie ghosting over current running frames (you get flashing humans with 12 arms, for example.)
I realize troubleshooting gsvideo+jar-ing appears to have been asked a few times already, but I've tried all the proposed solutions and I still get my peculiar error when running my jar from the command line. (The jar is actually made in Eclipse and I have no problems launching from Eclipse.) I've tried setting
GSVideo.localGStreamerPath explicitly in my code, I've tried using the
-Djava.library.path=./lib/gstreamer/macosx32 command line argument (both relative and absolute paths), and I've tried copying the
gstreamer folder into the same directory as my jar file, and directly into the compressed jar file, etc. -- and nothing seems to work. I hope I'm not missing something obvious. The error is as follows:
GSVideo version: 1.0.0
Exception in thread "Animation Thread" java.lang.StringIndexOutOfBoundsException: String index out of range: -12
at java.lang.String.substring(String.java:1937)
at codeanticode.gsvideo.GSLibraryPath.get(Unknown Source)
at codeanticode.gsvideo.GSVideo.lookForGlobalGStreamer(Unknown Source)
at codeanticode.gsvideo.GSVideo.setMacOSXPath(Unknown Source)
at codeanticode.gsvideo.GSVideo.initImpl(Unknown Source)
at codeanticode.gsvideo.GSVideo.init(Unknown Source)
at codeanticode.gsvideo.GSPlayer.initGStreamer(Unknown Source)
at codeanticode.gsvideo.GSPlayer.<init>(Unknown Source)
Any other insight would be appreciated! Meanwhile I suppose I'm off to investigate Ant/Maven's options for native library management (I eventually have to get this project running on both Mac and Linux...) Thanks in advance.
I'm trying to align a block of text to a right edge, and it looks like the automated line breaks are still put after spaces in the way they are done for textAlign(LEFT), but this ends up giving me an uneven amount of space at the end of each right-aligned line.
Has anyone else had this problem? Am I doing something wrong?
Thanks in advance...
String forecast = "Mostly cloudy in the morning, then partly cloudy. High of 63F. Winds from the ENE at 5 to 15 mph.";