| Author |
WebCam Through Java
|
suraj kurumkar
Greenhorn
Joined: Feb 20, 2007
Posts: 5
|
|
|
How we can access webcam through java..???
|
 |
naga raaju
Greenhorn
Joined: Mar 14, 2008
Posts: 29
|
|
hi suraj, in java we have one good frmaework ie JavaMediaFrameWork(JMF). so first you download that software and set path . and run this program public class TestJMF4 { CaptureDeviceInfo device; MediaLocator ml; Player player; Component videoScreen; public static void main(String args[]){ new TestJMF4(); } TestJMF4(){ try { //gets a list of devices how support the given videoformat Vector deviceList = CaptureDeviceManager.getDeviceList(new YUVFormat()); device = (CaptureDeviceInfo) deviceList.firstElement(); ml = device.getLocator(); player = Manager.createRealizedPlayer(ml); player.start(); videoScreen = player.getVisualComponent(); Frame frm=new Frame(); frm.setBounds(10,10,300,300); frm.add(videoScreen); frm.setVisible(true); } catch(Exception e) { System.out.println(e); } } } ans my advice is study the JMF API. so you can understand the concepts. ok na have a nice day. bye naga
|
 |
 |
|
|
subject: WebCam Through Java
|
|
|