We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › OPENGL, WEBCAM, and PIMAGE
Pages: 1 2 
OPENGL, WEBCAM, and PIMAGE (Read 6218 times)
Re: OPENGL, WEBCAM, and PIMAGE
Reply #15 - May 11th, 2009, 10:34pm
 
Forgive me for not understanding, but you can or cannot run the above example?
Re: OPENGL, WEBCAM, and PIMAGE
Reply #16 - May 12th, 2009, 8:18am
 
it shows nothing, unless I delete the opengl line in setup...

So no, it doesnt work
Re: OPENGL, WEBCAM, and PIMAGE
Reply #17 - May 12th, 2009, 8:26am
 
Any messages in the console window?
Re: OPENGL, WEBCAM, and PIMAGE
Reply #18 - May 12th, 2009, 1:14pm
 
nope
Re: OPENGL, WEBCAM, and PIMAGE
Reply #19 - May 12th, 2009, 3:08pm
 
Hmm...
What OS, version of Processing/JOGL, video card, yadda do you have?

A quick search found a similar problem reported in an earlier version.
http://dev.processing.org/bugs/show_bug.cgi?id=882
Re: OPENGL, WEBCAM, and PIMAGE
Reply #20 - May 12th, 2009, 3:42pm
 
I have OS X (latest update), processing 1.0.3, and the video card that comes with the first generation mac mini.

Quote:
The workaround for this bug is to place this code inside setup(), and
*before* size():

try {
quicktime.QTSession.open();
} catch (quicktime.QTException qte) {
qte.printStackTrace();
}

In all other situations, you should never place code before the size()
method inside setup(), but desperate times call for desperate measures.


I tried that, this is how the code looks like:

Code:
import processing.opengl.*;
import processing.video.*;

Movie myMovie;

void setup() {
{
quicktime.QTSession.open();
}
catch (quicktime.QTException qte) {
qte.printStackTrace();
}
size(640, 480, OPENGL);
background(0);
// Load and play the video in a loop
myMovie = new Movie(this, "station.mov");
myMovie.loop();
}

void movieEvent(Movie myMovie) {
myMovie.read();
}

void draw() {
set(160, 100, myMovie);
}


but I get this error in the console:

expecting RCURLY, found 'catch'
Re: OPENGL, WEBCAM, and PIMAGE
Reply #21 - May 12th, 2009, 10:47pm
 
Just before the bracket:

Quote:
{
   quicktime.QTSession.open();
 }


Add "try" so it becomes:
Code:
void setup() {
 try {
   quicktime.QTSession.open();
 }
 catch (quicktime.QTException qte) {
...
Re: OPENGL, WEBCAM, and PIMAGE
Reply #22 - May 13th, 2009, 4:44am
 
your the man Smiley

it works Cheesy

whooooooooooot  Cheesy
Pages: 1 2