FileDocCategorySizeDatePackage
CaptureDevice.javaAPI DocJMF 2.1.1e3093Mon May 12 12:20:42 BST 2003javax.media.protocol

CaptureDevice

public interface CaptureDevice
CaptureDevice is the interface for all capture devices.

A capture device is a DataSource of the type PullDataSource, PullBufferDataSource, PushDataSource or PushBufferDataSource. It also implements the CaptureDevice interface which further specializes the DataSource to handle data capturing.

A capture DataSource contains an array of SourceStream'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.

see
DataSource
see
SourceStream
see
FormatControl
since
JMF 2.0

Fields Summary
Constructors Summary
Methods Summary
public voidconnect()
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.

exception
IOException Thrown if there are IO problems when connect is called.

public voiddisconnect()
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.

public javax.media.CaptureDeviceInfogetCaptureDeviceInfo()
Return the CaptureDeviceInfo object that describes this device.

return
The CaptureDeviceInfo object that describes this device.

public javax.media.control.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.

return
an array for FormatControls.

public voidstart()
Start the data capture.

public voidstop()
Stop the data capture.