FileDocCategorySizeDatePackage
PortControl.javaAPI DocJMF 2.1.1e2677Mon May 12 12:20:36 BST 2003javax.media.control

PortControl

public interface PortControl implements Control
The PortControl interface represents a control to access the input or output ports of a device. A device in this case could be an capture device (CaptureDevice) or a renderer (Renderer). Methods are provided to find out what ports the device includes, to find out which ports are currently turned on, and to turn a port on or off.

Fields Summary
public static final int
MICROPHONE
Specifies a microphone port.
public static final int
LINE_IN
Specifies a line in port.
public static final int
SPEAKER
Specifies a speaker port.
public static final int
HEADPHONE
Specifies a headphone port.
public static final int
LINE_OUT
Specifies a line out port.
public static final int
COMPACT_DISC
Specifies a compact disc port.
public static final int
SVIDEO
Specifies a S-Video port.
public static final int
COMPOSITE_VIDEO
Specifies a composite video port.
public static final int
TV_TUNER
Specifies a TV-Tuner input port.
public static final int
COMPOSITE_VIDEO_2
Specifies a second composite video port.
Constructors Summary
Methods Summary
public intgetPorts()
Obtains the set of ports currently enabled.

return
the set of enabled ports. The value returned is the logical "OR" of the bit mask value of the enabled ports.

public intgetSupportedPorts()
Obtains the set of ports supported by the device that is controlled by this PortControl object.

return
the set of supported ports. The value returned is the logical "OR" of the bit mask value of the enabled ports.

public intsetPorts(int ports)
Set the enabled ports. The enabled ports are given as the logical "OR" of the bit mask value of the desired ports.

For example, to enable microphone and line in, use setPorts(MICROPHONE | LINE_IN).

param
ports the logical "OR" of the bit mask value of the ports.
return
the integer bit mask of the all the ports that are enabled.