Dynamic drawing on frames

Hi,

I would like to draw dynamically on displayed frames of a video. The program stops the video and lets the user draw. A previous "Draw on video" topic used an Effect to do this. Because the video is stopped, this won't work.

Best would be using the setGlassPane() method. However, the heavyweight nature of JMF viewer prevents this from working (on Windows with performance pack). After much experimentation, I have abandoned this approach.

Is there a way to get the current frame's contents and interact with the video frame just as you would with anything drawn in awt? Does the video frame have a Graphics object that is accessible? Can it be replaced with one that does?

In the extreme case, I imagine the video going to an invisible buffer. This buffer is converted to an Image that displays. You can draw all over it. Then, the next frame is processed in a similar fashion. I can use standard methods to make the drawing dynamic.

I will appreciate any insights and suggestions.

Harry

[1051 byte] By [hekeller] at [2007-9-26 1:39:56]
# 1

You can actually try using a lightweight component for your video by adding a line like this to your code:

Manager.setHint(Manager.LIGHTWEIGHT_RENDERER, new Boolean(true));

See http://java.sun.com/products/java-media/jmf/2.1.1/solutions/SwingJMF.html for all the cool details.

Daniel Roth

droth27 at 2007-6-29 2:29:44 > top of Java-index,Security,Cryptography...