From 8e9fc9a0ec0840927fb78a5415604c1a2fe5f7d1 Mon Sep 17 00:00:00 2001 From: benfry Date: Sun, 19 Oct 2008 11:56:44 +0000 Subject: [PATCH] remove changes made for bug #882, caused to many other regressions --- video/src/processing/video/Capture.java | 14 +++++++------- video/src/processing/video/Movie.java | 20 ++++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/video/src/processing/video/Capture.java b/video/src/processing/video/Capture.java index c9cd671af..6ef58b9d8 100755 --- a/video/src/processing/video/Capture.java +++ b/video/src/processing/video/Capture.java @@ -137,7 +137,7 @@ public class Capture extends PImage implements Runnable { * is defined in the host PApplet, then it will be called every * time a new frame is available from the capture device. */ - public Capture(final PApplet parent, + public Capture(final PApplet parent, final int requestWidth, final int requestHeight, final String name, final int frameRate) { // Running on EDT because of weird hang on OS X @@ -146,14 +146,14 @@ public class Capture extends PImage implements Runnable { // being run from the EDT. Not sure if that's a mistaken expectation in // QTJava (we hadn't had trouble in the past because we did everything // on the EDT) or if something broken in more recent QTJ. Or (maybe most - // likely) we're simply hitting some other threading strangeness, and + // likely) we're simply hitting some other threading strangeness, and // using invokeLater() isolates us from that. Which is a nice way of // saying that it's a hack. - SwingUtilities.invokeLater(new Runnable() { - public void run() { - init(parent, requestWidth, requestHeight, name, frameRate); - } - }); + //SwingUtilities.invokeLater(new Runnable() { + // public void run() { + init(parent, requestWidth, requestHeight, name, frameRate); + //} + //}); } diff --git a/video/src/processing/video/Movie.java b/video/src/processing/video/Movie.java index 6831ef014..db0d32f8e 100644 --- a/video/src/processing/video/Movie.java +++ b/video/src/processing/video/Movie.java @@ -98,14 +98,14 @@ public class Movie extends PImage implements PConstants, Runnable { super(1, 1, RGB); // http://dev.processing.org/bugs/show_bug.cgi?id=882 - SwingUtilities.invokeLater(new Runnable() { - public void run() { - init(parent, filename, ifps); - } - }); + //SwingUtilities.invokeLater(new Runnable() { + //public void run() { + init(parent, filename, ifps); + //} + //}); } - - + + public void init(PApplet parent, String filename, int fps) { this.parent = parent; this.fps = fps; @@ -680,7 +680,7 @@ public class Movie extends PImage implements PConstants, Runnable { if (movieEventMethod == null) { // If no special handling, then automatically read from the movie. read(); - + } else { try { movieEventMethod.invoke(parent, new Object[] { this }); @@ -725,8 +725,8 @@ public class Movie extends PImage implements PConstants, Runnable { runner = null; QTSession.close(); } - - + + /** * General error reporting, all corraled here just in case * I think of something slightly more intelligent to do.