开发者

How to detect a Laptop Web Camera device Using java

开发者 https://www.devze.com 2023-02-13 07:42 出处:网络
I a开发者_StackOverflowm using JMF . I am not able to detect my Laptop Web Camera device using java code . Can anybody help me in doing this ?.

I a开发者_StackOverflowm using JMF . I am not able to detect my Laptop Web Camera device using java code . Can anybody help me in doing this ?.

Thanx in advance.


I recomend to check this site.It should help you


This doesnt directly say it, but the code and explanation is in there. Or just use JMF Registry that gets installed with JMF.

How to capture video using JMF, but without installing JMF


public void Capture()
{

    di = CaptureDeviceManager.getDevice("vfw:Microsoft WDM Image Capture (Win32):0");

    ml = new MediaLocator("vfw://0");

    try {
        player=Manager.createRealizedPlayer(ml);
        win.getContentPane().add(player.getVisualComponent(),BorderLayout.CENTER);
        player.start();

    } catch (Exception ex)
    {

    }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消