KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inzyme > jmds > DSCaptureDeviceManager


1 package com.inzyme.jmds;
2
3 import java.util.ArrayList JavaDoc;
4 import java.util.List JavaDoc;
5
6 /**
7  * DSCaptureDeviceManager provides an interface to enumerating DirectShow
8  * video capture devices.
9  *
10  * @author Mike Schrag
11  */

12 public class DSCaptureDeviceManager {
13     static {
14         System.loadLibrary("jmds");
15     }
16
17     /**
18      * Returns an array of capture devices that are connected to your machine.
19      *
20      * @return an array of capture devices that are connected to your machine
21      */

22     public static DSCaptureDeviceInfo[] getCaptureDevices() {
23         List JavaDoc devicesList = new ArrayList JavaDoc();
24         fillInDevices(devicesList);
25         DSCaptureDeviceInfo[] devices = (DSCaptureDeviceInfo[]) devicesList.toArray(new DSCaptureDeviceInfo[devicesList.size()]);
26         return devices;
27     }
28
29     private static native void fillInDevices(List JavaDoc _devicesList);
30 }
31
Popular Tags