FileDocCategorySizeDatePackage
FormatControl.javaAPI DocJMF 2.1.1e1983Mon May 12 12:20:36 BST 2003javax.media.control

FormatControl

public interface FormatControl implements Control
The FormatControl interfaces is implemented by objects which supports format setting.
since
JMF 2.0

Fields Summary
Constructors Summary
Methods Summary
public javax.media.FormatgetFormat()
Obtain the format that this object is set to.

return
the current format.

public javax.media.Format[]getSupportedFormats()
Lists the possible input formats supported by this plug-in.

return
an array of the supported formats

public booleanisEnabled()
Return the state of the track.

return
A boolean telling whether or not the track is enabled.

public voidsetEnabled(boolean enabled)
Enable or disable the track.

param
enabled true if the track is to be enabled.

public javax.media.FormatsetFormat(javax.media.Format format)
Sets the data format. The method returns null if the format is not supported. Otherwise, it returns the format that's actually set.

However in some situations, returning a non-null format does not necessarily mean that the format is supported since determining the supported formats may be state dependent or simply too costly. In such cases, the setFormat call will succeed but the object may fail in another state-transition operation such as when the object is being initialized.

Alternatively, the getSupportedFormats method can be used to query for the list of supported formats. The resulting list can be used to screen for the valid formats before setting that on the object.

return
null if the format is not supported; otherwise return the format that's actually set.