javax.media.control
Interface PortControl

All Superinterfaces:
Control

public interface PortControl
extends 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.


Field Summary
static int COMPACT_DISC
          Specifies a compact disc port.
static int COMPOSITE_VIDEO
          Specifies a composite video port.
static int COMPOSITE_VIDEO_2
          Specifies a second composite video port.
static int HEADPHONE
          Specifies a headphone port.
static int LINE_IN
          Specifies a line in port.
static int LINE_OUT
          Specifies a line out port.
static int MICROPHONE
          Specifies a microphone port.
static int SPEAKER
          Specifies a speaker port.
static int SVIDEO
          Specifies a S-Video port.
static int TV_TUNER
          Specifies a TV-Tuner input port.
 
Method Summary
 int getPorts()
          Obtains the set of ports currently enabled.
 int getSupportedPorts()
          Obtains the set of ports supported by the device that is controlled by this PortControl object.
 int setPorts(int ports)
          Set the enabled ports.
 
Methods inherited from interface javax.media.Control
getControlComponent
 

Field Detail

MICROPHONE

public static final int MICROPHONE
Specifies a microphone port.

See Also:
Constant Field Values

LINE_IN

public static final int LINE_IN
Specifies a line in port.

See Also:
Constant Field Values

SPEAKER

public static final int SPEAKER
Specifies a speaker port.

See Also:
Constant Field Values

HEADPHONE

public static final int HEADPHONE
Specifies a headphone port.

See Also:
Constant Field Values

LINE_OUT

public static final int LINE_OUT
Specifies a line out port.

See Also:
Constant Field Values

COMPACT_DISC

public static final int COMPACT_DISC
Specifies a compact disc port.

See Also:
Constant Field Values

SVIDEO

public static final int SVIDEO
Specifies a S-Video port.

See Also:
Constant Field Values

COMPOSITE_VIDEO

public static final int COMPOSITE_VIDEO
Specifies a composite video port.

See Also:
Constant Field Values

TV_TUNER

public static final int TV_TUNER
Specifies a TV-Tuner input port.

See Also:
Constant Field Values

COMPOSITE_VIDEO_2

public static final int COMPOSITE_VIDEO_2
Specifies a second composite video port.

See Also:
Constant Field Values
Method Detail

setPorts

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

Parameters:
ports - the logical "OR" of the bit mask value of the ports.
Returns:
the integer bit mask of the all the ports that are enabled.

getPorts

public int getPorts()
Obtains the set of ports currently enabled.

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

getSupportedPorts

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

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