javax.media.control
Interface PortControl


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.

LINE_IN

public static final int LINE_IN
Specifies a line in port.

SPEAKER

public static final int SPEAKER
Specifies a speaker port.

HEADPHONE

public static final int HEADPHONE
Specifies a headphone port.

LINE_OUT

public static final int LINE_OUT
Specifies a line out port.

COMPACT_DISC

public static final int COMPACT_DISC
Specifies a compact disc port.

SVIDEO

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

COMPOSITE_VIDEO

public static final int COMPOSITE_VIDEO
Specifies a composite video port.

TV_TUNER

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

COMPOSITE_VIDEO_2

public static final int COMPOSITE_VIDEO_2
Specifies a second composite video port.
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.


Submit a bug or feature
Copyright 1994-2004 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.