Skip to main content

Is it possible to integrate javaFX with JMF?

3 replies [Last post]
killsushi
Offline
Joined: 2006-03-25
Points: 0

i just work on a project which needs to desgin a web UI supporting video capture. I know JMF (Java Media Framework ) supports capturing video from an input device and streaming between Java clients, and JavaFX only support video playback right now, so i wonder if i can integrate JMF with it. Maybe that`s not a real problem, please give some suggestion, thanks!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
alexsch
Offline
Joined: 2007-07-12
Points: 0

[code]
public class JavaComponent extends SwingComponent{
var comp: java.awt.Component;

public override function createJComponent():javax.swing.JComponent{
var panel = new javax.swing.JPanel();
panel.add(comp);
return panel;
}
}

public class MyMedia extends CustomNode {

var xpos: Number;
var ypos: Number;
var dx: Number;

var url: java.net.URL;
var autoPlay: Boolean;

public override function create(): Node{
Manager.setHint(Manager.LIGHTWEIGHT_RENDERER, true);

var player = Manager.createRealizedPlayer(url);
if (autoPlay) {
player.start();
}

return Group{
content: [
JavaComponent {
comp: player.getVisualComponent()
}
JavaComponent {
comp: player.getControlPanelComponent()
}
]
transforms: Transform.translate(xpos, ypos)
}
}
}
[/code]

killsushi
Offline
Joined: 2006-03-25
Points: 0

thanks a lot!

alexsch
Offline
Joined: 2007-07-12
Points: 0