's. These SourceStreams
provide
the interface for the captured data streams to be read.
The formats of the captured data can be manipulated by the
FormatControl
objects. There is one FormatControl
per each capture stream. These controls can be obtained by the
getFormatControls
method.
A few methods from the DataSource
are re-defined
to support semantics of capture devices.
- Since:
- JMF 2.0
- See Also:
DataSource
,
SourceStream
,
FormatControl
getCaptureDeviceInfo
public CaptureDeviceInfo getCaptureDeviceInfo()
- Return the
CaptureDeviceInfo
object that describes
this device.
- Returns:
- The
CaptureDeviceInfo
object that describes
this device.
getFormatControls
public FormatControl[] getFormatControls()
- Returns an array of
FormatControl
objects. Each of
them can be used to set and get the format of each capture stream.
This method can be used before connect to set and get the
capture formats.
- Returns:
- an array for FormatControls.
connect
public void connect()
throws java.io.IOException
- Initialize the capture device. The device will be initialized to
the formats specified by using the
FormatControl
.
The default will be used if no formats were specified.
After connect, the resources required by the device will be
allocated. If the device is an exclusive device, connect from
other capture DataSource
's referring to the same
device will fail.
- Throws:
java.io.IOException
- Thrown if there are IO problems
when connect
is called.
disconnect
public void disconnect()
- Close the capture device. It frees the resources held by the device.
If stop
hasn't already been called,
calling disconnect
implies a stop.
connect
may be called again to re-open the device.
start
public void start()
throws java.io.IOException
- Start the data capture.
java.io.IOException
stop
public void stop()
throws java.io.IOException
- Stop the data capture.
java.io.IOException