javax.media
Class 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.
- Since:
- JMF 2.0
Method Summary |
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 . |
Methods inherited from class 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.
- Parameters:
deviceName
- A String
that contains the name of the device for
which you want to get a CaptureDeviceInfo
object.
For example: "SunVideo".- Returns:
- 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.
- Returns:
- 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.
- Parameters:
newDevice
- A CaptureDeviceInfo
object that identifies the new device.- Returns:
true
if the object is added successfully, false
if it is not.- See Also:
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.
- Parameters:
device
- A CaptureDeviceInfo
object that identifies the device to remove.- Returns:
true
if the object is removed successfully, false
if it is not.- See Also:
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
.
- Throws:
- java.io.IOException - If the registry could not be committed to disk due
to an IO error.
Submit a bug or feature
Copyright 1999-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved. See the Specification License for more details.
Sun, Sun Microsystems, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.