This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WebCam Through Java

 
suraj kurumkar
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How we can access webcam through java..???
 
naga raaju
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic