javax.media
Class CaptureDeviceManager

java.lang.Object
  |
  +--javax.media.CaptureDeviceManager

public class CaptureDeviceManager
extends java.lang.Object

This is a manager class that fetches a list of devices available on the system. It uses a registry mechanism and/or query mechanism to locate devices and return CaptureDeviceInfo objects for each available device. The CaptureDeviceManager can also be used to register new devices.

Since:
JMF 2.0

Constructor Summary
CaptureDeviceManager()
           
 
Method Summary
static boolean addDevice(CaptureDeviceInfo newDevice)
          Adds a CaptureDeviceInfo object to the list.
static void commit()
          Permanently stores information about the list of devices in a registry.
static CaptureDeviceInfo getDevice(java.lang.String deviceName)
          Returns the CaptureDeviceInfo corresponding to the specified name of the device.
static java.util.Vector getDeviceList(Format format)
          Returns a list of CaptureDeviceInfo objects corresponding to devices that can capture data with the specified data format.
static boolean removeDevice(CaptureDeviceInfo device)
          Remove a CaptureDeviceInfo object from the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CaptureDeviceManager

public CaptureDeviceManager()
Method Detail

getDevice

public static CaptureDeviceInfo getDevice(java.lang.String deviceName)
Returns the CaptureDeviceInfo corresponding to the specified name of the device. For example: "SunVideo". Returns null if the device could not be found.
Returns:
the CaptureDeviceInfo corresponding to the specified name of the device.

getDeviceList

public static java.util.Vector getDeviceList(Format format)
Returns a list of CaptureDeviceInfo objects corresponding to devices that can capture data with the specified data format. If format is null then it returns all registered devices as CaptureDeviceInfo objects.
Returns:
a list of CaptureDeviceInfo objects for the given data format.

addDevice

public static boolean addDevice(CaptureDeviceInfo newDevice)
Adds a CaptureDeviceInfo object to the list. This information is not stored permanently in any registry.
Returns:
true if the object could be added, false otherwise.
See Also:
commit()

removeDevice

public static boolean removeDevice(CaptureDeviceInfo device)
Remove a CaptureDeviceInfo object from the list.
See Also:
commit()

commit

public static void commit()
                   throws java.io.IOException
Permanently stores information about the list of devices in a registry. Throws an IOException if the registry could not be committed to disk due to an IO error.