Go Back   Velocity Reviews > Newsgroups > Java
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

Java - JMF & Draw over video

 
Thread Tools Search this Thread
Old 02-27-2006, 12:03 PM   #1
Default JMF & Draw over video


Hi, I would like to draw over a a video that I display with jmf...
This is my code, but don't work, I see the panel "above" my video.I
read several posts in the jmf forum, but I don't find any solution.Can
you help me?
I would draw in the drawpanel...

private void buildUI() {
this.rootPane.setDoubleBuffered(true);
this.layeredPane=new JLayeredPane();
Component videopanel = null;
this.layeredPane.add(videopanel, 0);
this.layeredPane.add(drawpanel, 10);

JFileChooser fileChooser = new JFileChooser("E:/");
int status = fileChooser.showOpenDialog(this);
if (status == JFileChooser.APPROVE_OPTION) {
File file = fileChooser.getSelectedFile();
try {
URL url = file.toURL();
final Container contentPane = getContentPane();
Manager.setHint(Manager.LIGHTWEIGHT_RENDERER, new Boolean(true));
Manager.setHint(Manager.PLUGIN_PLAYER, new Boolean(true));

this.player = Manager.createRealizedPlayer(url);
videopanel = this.player.getVisualComponent();
if (videopanel != null){
contentPane.add(videopanel, BorderLayout.CENTER);

}
this.addMouseListener(this);
Component controlPanelComponent = this.player
.getControlPanelComponent();
Dimension d=videopanel.getMaximumSize();


if (controlPanelComponent != null)
contentPane.add(controlPanelComponent, BorderLayout.SOUTH);
pack();
this.player.start();
} catch (Exception e) {
System.out.println(e);
System.exit(-1);
}
}
}



Zarathustra
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert Video files to MP4 for iPod ivan DVD Video 0 04-26-2006 08:38 AM
Very slow recognising DVD disc Terry Pinnell DVD Video 1 03-28-2006 06:53 PM
Now I introduce some popular software of multimedia eightsome@gmail.com DVD Video 0 03-28-2006 02:29 PM
Video Converters, and Movie and Video Splitters and Joiners, 2003 TEL4 tel2003@pathfinder.gr, tel2003@popmail.com, tel4@ath.forthnet.gr DVD Video 1 09-28-2003 03:13 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46