Hello,

Since it's my first post, I'll try to avoid one of the most common pitfalls and 
state that: 
Yes, I've (intensely) searched through as many forums / sites I could find.

My task:
To record a steady 25fps movie, with audio of a Java Application encoded in 
Xvid. 
For the recording and encoding I am succesfully using JMF. 

What's the problem then?
The recording of (eg. Taking snapshots of the program) is far too slow.
In my current best solution I use a custom RepaintManager to only take 
snapshots of the "dirty" regions of the screen.
But the process is too slow when I go to resolutions beyond 800x600 and the 
entire program becomes "dirty".

My solutions:
- Take entire snapshot of program
        - Java.AWT.Robot, constant time, time is dependant on resolution. 
        - paintComponent(Graphics g) using BufferedImage, depending on 
complexity of component, faster than Robot, no problem of increased resolution 
on simple applications
        - printComponent(Graphics g) using BufferdImage, sometimes faster than 
paint, depends on component complexity
        - paint/printComponent(Graphics g) using VolatileImage, extremely fast 
(0-1ms), as expected as you are copying from another volatileimage 
(backbuffer). Drawback: going from VolatileImage to BufferedImage is slow (3x 
as slow as Java.AWT.Robot)
- Custom RepaintManager
        - Take snapshot of dirty region using Java.AWT.Robot, drawback that 
it's too slow if a full repaint is called
                + You get inconsistencies if using a scrollpanel.

The Questions:
Can I directly hook into the VolatileImage / BufferedImage of the 
BackBufferStrategy, a feature which was to be implemented according to this 
post: http://forums.java.net/jive/message.jspa?messageID=41182#41182 , dating 
back to 2003. (Haven't found anything in the BackbufferStrategy API)
Is there a fast(er) way to transform a VI into a BI besides VI.getSnapshot() or 
BI.getGraphics.drawImage(VI)?
Can I adapt the RepaintManager to use the paint/print function and still only 
print a small part of the program? print and paint seem to ignore the 
Graphics.setClip()
Are there any other solutions to this problem?

Any help would be greatly appreciated because I am at the end of my latin.

TAGS:
Screen capture, Screen recording, Screenshot, java.awt.Robot, paint, 
paintComponent, print, printComponent, BufferedImage, VolatileImage, 
RepaintManager
[Message sent by forum member 'methius' (methius)]

http://forums.java.net/jive/thread.jspa?messageID=342669

===========================================================================
To unsubscribe, send email to lists...@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
lists...@java.sun.com and include in the body of the message "help".

Reply via email to