Доброго времени суток! есть код:
Vector devices = CaptureDeviceManager.getDeviceList(new YUVFormat());
if (devices.size()<1) {
System.out.println("No capture devices available!");
System.exit(1);
} else {
cam = (CaptureDeviceInfo)devices.elementAt(0);
}
player = Manager.createRealizedPlayer(cam.getLocator());
Component comp;
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setSize(640,480);
if((comp = player.getVisualComponent()) != null )
{
Component controlPanel, visualComponent;
if ((controlPanel = player.getControlPanelComponent()) != null)
f.add(controlPanel);
f.add(visualComponent);
player.start();
}
else{
System.out.println("not visual component");
System.exit(1);
}
f.setVisible(true);
проблема в том, что отображается только черный экран, в чем может быть проблема?