[3306] in java-interest
Re: ImageProducer/Consumer classes
daemon@ATHENA.MIT.EDU (David Gourley)
Tue Nov 7 00:06:11 1995
From: David Gourley <dgourley@cs.berkeley.edu>
To: java-interest@java.Eng.Sun.COM
Cc: dgourley@cs.berkeley.edu
In-Reply-To: Your message of "Sun, 05 Nov 1995 19:18:08 PST."
<9511060318.AA15425@bendenweyr.Eng.Sun.COM>
Date: Mon, 06 Nov 1995 19:14:31 -0800
Hi,
I have another question(sorry...) regarding when an ImageConsumer removes
itself from an ImageProducer. I have the following code frag:
public void frameCallback(String frame, int width, int height) {
System.out.println("Java: frameCallback received " + frame + " " +
width + " " + height);
if(theConsumer != null)
System.out.println("Consumer has not been removed");
byte frameB[];
frameB = new byte[width*height];
frame.getBytes(0, frame.length(), frameB, 0);
theConsumer.setPixels(0, 0, width, height,
parentFrame.getColorModel(), frameB, 0, width);
theConsumer.imageComplete(theConsumer.SINGLEFRAMEDONE);
}
If I put a test print in the removeConsumer method from my ImageProducer I
see that it is called to remove "theConsumer" after frameCallBack is called
for the first time. Any ideas?
I init my stream using a frame that I have created and its
createImage(ImageProducer) method. I then set the ImageProducer in motion
via a native method call and the native libs callback the above to
"hopefully" display frames.
Thanks.
-david
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com