javax.media
类 CaptureDeviceManager

java.lang.Object
  继承者 javax.media.CaptureDeviceManager

public class CaptureDeviceManager
extends java.lang.Object

CaptureDeviceManager is a manager class that provides access to a list of the capture devices available on a system. CaptureDeviceManager uses a registry and query mechanisms to locate devices and return CaptureDeviceInfo objects for available devices. The CaptureDeviceManager is also used to register new capture devices.

从以下版本开始:
JMF 2.0

构造方法摘要
CaptureDeviceManager()
           
 
方法摘要
static boolean addDevice(CaptureDeviceInfo newDevice)
          Adds a CaptureDeviceInfo object for a new capture device to the list of devices maintained by the CaptureDeviceManager.
static void commit()
          Permanently stores information about the list of devices in the registry.
static CaptureDeviceInfo getDevice(java.lang.String deviceName)
          Gets a CaptureDeviceInfo object that corresponds to the specified device.
static java.util.Vector getDeviceList(Format format)
          Gets a list of CaptureDeviceInfo objects that correspond to devices that can capture data in the specified Format.
static boolean removeDevice(CaptureDeviceInfo device)
          Removes a CaptureDeviceInfo object from the list of devices maintained by the CaptureDeviceManager.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

CaptureDeviceManager

public CaptureDeviceManager()
方法详细信息

getDevice

public static CaptureDeviceInfo getDevice(java.lang.String deviceName)
Gets a CaptureDeviceInfo object that corresponds to the specified device.

参数:
deviceName - A String that contains the name of the device for which you want to get a CaptureDeviceInfo object. For example: "SunVideo".
返回:
A CaptureDeviceInfo object that corresponds to the specified device name. Returns null if the specified device could not be found.

getDeviceList

public static java.util.Vector getDeviceList(Format format)
Gets a list of CaptureDeviceInfo objects that correspond to devices that can capture data in the specified Format. If no Format is specified, this method returns a list of CaptureDeviceInfo objects for all of the available capture devices.

返回:
A Vector that contains CaptureDeviceInfo objects for the devices that support the specified Format.

addDevice

public static boolean addDevice(CaptureDeviceInfo newDevice)
Adds a CaptureDeviceInfo object for a new capture device to the list of devices maintained by the CaptureDeviceManager. This information is not stored permanently in any registry unless commit is called.

参数:
newDevice - A CaptureDeviceInfo object that identifies the new device.
返回:
true if the object is added successfully, false if it is not.
另请参见:
commit()

removeDevice

public static boolean removeDevice(CaptureDeviceInfo device)
Removes a CaptureDeviceInfo object from the list of devices maintained by the CaptureDeviceManager. The change is not stored permanently in any registry unless commit is called.

参数:
device - A CaptureDeviceInfo object that identifies the device to remove.
返回:
true if the object is removed successfully, false if it is not.
另请参见:
commit()

commit

public static void commit()
                   throws java.io.IOException
Permanently stores information about the list of devices in the registry. Commit must be called to save changes made to the device list by calling addDevice or removeDevice.

抛出:
java.io.IOException - If the registry could not be committed to disk due to an IO error.