Radu Bogdan Rusu wrote:
> Hi Paul,
>
> I haven't really dealt with applets, but it should be pretty
> straightforward. After all, you need to instantiate an object of type
> CameraInterface, and then use the awt graphics to display the results in
> the applet image.
I was guessing it must be done that way, but my problem was with awt: I
didn't know how to display image that comes from memory, not from URL or
a file. Another problem was with jpeg compression, since all video
sources I have are compressed. Finally I have found JPEG codec in SUN
Java documentation that creates BufferedImage object which is easy to
show. I have attached example applet (which can also be used as a plain
application since I have prepared main() method). Unfortunately, there's
a big problem with it: it works much too slow. I have realised that the
most time consuming method is readAll() (to realise this I had to use
non-threaded implementation).
Also, to use this class as an applet in web browser I had to remove all
(two) calls to System.getProperty in PlayerClient.java (it causes
Permission Denied exception).
> I was thinking that since you've already done enough work for
> Player/Stage, maybe you would like to contribute something for our
> Javaclient community as well.
Well... I'm not saying yes nor not. I had to use Java for one particular
project (simple demo for vlab.pjwstk.edu.pl) and I don't know if I write
something more in near future. I guess Javaclient will be included in
our project, since we plan that our users would be able to upload their
programs written in many different languages and run them on our server
to operate our robots that way.
> I am also thinking about talking to Brian
> and see if there is a way to actually "insert" Javaclient directly into
> P/S at some point. Or use SWIG to generate some basic functionality and
> then extend it with the stuff that we've already done.
In my opinion, all bindings (including Javaclient and guileplayer)
should be included to main Player distribution.
This would lead to better usability of whole thing.
Best regards,
Paul
|