Hey! So i'd like to learn the JMF api. And to start i wanted to build an application that can capture frames/video from a webcam. Now, i started by trying to list all the devices:

                Vector info = CaptureDeviceManager.getDeviceList(null);

                if (info == null || info.size()==0)
                        System.out.println("No Capture devices known to JMF");
                else {
                        System.out.println("The following " + info.size()
                                + " capture devices are known to the JMF ");
                        for (int i = 0; i < info.size(); i++)
                            System.out
                            .println("\t"+ i + (CaptureDeviceInfo) info.elementAt(i));
                }

However it doesn't register anything at all. The webcam im trying to use is installed properply, however not sure whether JMF is basically i just added the JMF.jar to the project path(im using ecplipse).

The best solution i have found via google, which isn't using another library, is to run the JMFRegistry but i dont quite understand why this would help?(also i've only managed to find the source code, and cant find the packages i need to compile it so i havn't actually run it. Its the "com.sun.media.protocol.dsound.DirectSoundStream" i can't find) Anyone have any ideas on what im doing wrong and how to fix it?

Thanks for your time :)

i know its late to reply but it will be better you post the errors that you are facing..

Sorry if my question is unclear! But i don't have any actual errors, my problem is just that i cant get the library JMF to detect my web cam. Basically when i use the .getDeviceList it just returns an empty Vector, meaning that it doesnt detect any sources, which it should since my webcam is connected and turned on!
As far as i can tell alot(this being a relative term based on google searching ^_^) of people have this problem but the only solution i can find is to use another library, which i would like to avoid.

can you post your entire code..it may be useful to comment further about your problem..
as far as i understand , i dont feel that it is the problem of jmf library..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.